scikit-image

How to concatenate three or more images vertically?

元气小坏坏 提交于 2019-12-24 11:24:02
问题 I try to concatenate three images vertically and I need some assistance with the code/function. So far I imported one image and cropped 3 smaller images with the same size. Now I want to concatenate them in one image that will be long, but narrow. However, I can't find an appropriate function or even if I find one I get an error message when I apply it to my code. I already tried to make a collection from my three pictures and then use the function skimage.io.concatenate_images(sf_collection)

Finding bright spots in a image using opencv

℡╲_俬逩灬. 提交于 2019-12-24 08:46:35
问题 I want to find the bright spots in the above image and tag them using some symbol. For this i have tried using the Hough Circle Transform algorithm that OpenCV already provides. But it is giving some kind of assertion error when i run the code. I also tried the Canny edge detection algorithm which is also provided in OpenCV but it is also giving some kind of assertion error. I would like to know if there is some method to get this done or if i can prevent those error messages. I am new to

Unexpected behavior in local binary pattern - python skimage

流过昼夜 提交于 2019-12-24 06:44:04
问题 I've been running into problems recently where the local binary pattern method in python skimage is producing unexpected results. Have a look at the cartoon example below. It shows two flat color circles on a flat color background. The local binary pattern (P=8 samples, Radius=1) output is: (Image is color coded in jet colors). The gray color correctly represents 255. However, the blue color is 85 (binary 01010101) . So while the method correctly shows the background and the circle on the

how to save an array representing an image with 40 band to a .tif file

北城余情 提交于 2019-12-24 04:40:14
问题 I have an array with 600×600×40 dimension that each band(from 40 band) represent a 600×600 image I want to save it to a multiple band .tif image. I have tried this functions from scikit-image and openCV but they can not save more than 3 band(as RGB). import cv2 cv2.imwrite('image.tif',600by600_just3band_array) 回答1: tifffile (https://pypi.org/project/tifffile/) supports multi-channel .tiff's and has an API similar to the one of scikit-image or OpenCV : In [1]: import numpy as np In [2]: import

Smooth a bumpy circle

假如想象 提交于 2019-12-23 20:04:46
问题 I am detecting edges of round objects and am obtaining "bumpy" irregular edges. Is there away to smooth the edges so that I have a more uniform shape? For example, in the code below I generate a "bumpy" circle (left). Is there a smoothing or moving average kind of function I could use to obtain or approximate the "smooth" circle (right). Preferably with some sort of parameter I can control as my actual images arn't perfectly circular. import numpy as np import matplotlib.pyplot as plt fig,

from ._sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \ImportError: DLL load failed: The specified module could not be found

安稳与你 提交于 2019-12-23 18:38:27
问题 I need your help please When I wrote: >>> from skimage import io I get at the end the following: from ._sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \ ImportError: DLL load failed: The specified module could not be found. How can I fix it? Any help would be appreciated 回答1: I believe I have solved your issue, as I encountered the same problem in a completely different way. You need to update your windows C++ redistributable compiler. To understand if this is the solution. Check

skimage resize giving weird output

我只是一个虾纸丫 提交于 2019-12-23 09:57:11
问题 I'm resizing an image using skimage.transform.resize but I'm getting a really weird output and I can't figure out why. Can anyone help? Here is my code: import matplotlib.pyplot as plt import skimage.transform plt.imshow(y) h,w,c = y.shape x = skimage.transform.resize(y, (256, (w*256)/h), preserve_range=True) plt.imshow(x) Here is my input image y (240, 320, 3): Here is my output image x (256, 341, 3): Edit: Okay it seems to work fine if I change preserve_range=False . But why won't it allow

Array conversion using scikit-image: from integer to float

僤鯓⒐⒋嵵緔 提交于 2019-12-23 03:42:20
问题 I am facing some kind of problem when converting an integer image to a float image using scikit-image. This is an example (the image is a 2 pixel image): from numpy import array,uint8; import skimage; rgb = array([array([[0,0,0],[0,0,5]])]) i1 = skimage.img_as_float(rgb)#rgb.dtype ->dtype('int32') i2 = skimage.img_as_float(rgb.astype(uint8)) i3 = skimage.img_as_float(rgb.astype(float)) print i1[0,1,:] print i2[0,1,:] print i3[0,1,:] I expected this: [ 0. 0. 5.] [ 0. 0. 5.] [ 0. 0. 5.] But I

How to find the length of a path (curve) in a picture?

a 夏天 提交于 2019-12-23 02:44:26
问题 I want to be able to find the length of a path in a picture, this could be the length of a worm, a curly human hair, Amazon river, etc. Consider this Amazon river picture: I tried to make an skeleton of my picture after its binarization, but the problem is that the skeletons (obtained by two methods) have many small branches that causes their area to be much more than the approximate length of the path. I used scikit-image to do this. Here's the code and results: from skimage.filter import

Upgrading skimage version on Raspberry pi

筅森魡賤 提交于 2019-12-22 11:08:34
问题 I've installed python packages using the synaptic package manager on Raspberry Pi-2. However, the skimage module version 0.6 is the latest available version in synaptic. Can someone guide me how to upgrade it to 0.11, as certain functions are missing in the older version. I tried pip install scikit-image , but it gives the output Running setup.py install for scikit image and then gets stuck there. 回答1: I don't think there is anything wrong there. It's just that there is a number of C