scikit-image

ImportError: cannot import name '_validate_lengths'

ImportError: cannot import name '_validate_lengths' Question: I have started learning Tensorflow. I am using Pycharm and my environment is Ubuntu 16.04. I am following the tutorial. I cross check the nump. It is up-to-date. I don’t know the reason of this error. from numpy.lib.arraypad import _validate_lengths ImportError: cannot import name ‘_validate_lengths’ Need hint to resolve …

Total answers: 7

Performing sobel filters on rgb color components

Performing sobel filters on rgb color components Question: I’m trying to separate an image into it’s rgb color components, and then trying to perform sobel h and v filters on each of the color component images. I’m not really sure what the problem is, but I’m getting the following divide by 0 error. I think …

Total answers: 1

What is the right way to reshape a tensor?

What is the right way to reshape a tensor? Question: The code below is for lungs segmentation(2D) from Chest X-ray. It is supposed to generate lung masks from Chest X-rays using the trained model ‘trained_model.hdf5’. On giving a chest x-ray as input, it should be able to identify which are the lungs and create a …

Total answers: 1

Difference between cv2, scipy.misc and skimage

Difference between cv2, scipy.misc and skimage Question: What is the main difference between cv2.imread / resize/ imwrite scipy.misc.imread / imresize/ imsave skimage.io.imread / skimage.transform.resize / skimage.io.imsave and how to decide which one to use? I know cv2 and skimage have different encoder, and cv2 use ‘BGR’ not ‘RGB’ in default. But sometimes a script might …

Total answers: 1

How to label regions that they do not have same values?

How to label regions that they do not have same values? Question: I have stacked 5 probability map in a numpy array (a with the shape 256x256x5), that I have stacked them and then I get the argmax of all of them that final output is show by different 5 colors, however, the values correspond …

Total answers: 1

Converting RGB images to LAB using scikit-image

Converting RGB images to LAB using scikit-image Question: I’m trying to convert an RGB image into the LAB color space using skimage, but the result seems to be just noise. The same operation using opencv seems to work. cat = io.imread(‘https://poopr.org/images/2017/08/22/91615172-find-a-lump-on-cats-skin-632×475.jpg’) cat_sk_image_lab = skimage.color.rgb2lab(cat) plt.imshow(cat_sk_image_lab) cat_cv_lab = cv2.cvtColor(cat, cv2.COLOR_BGR2LAB) plt.imshow(cat_cv_lab) Asked By: waspinator || Source …

Total answers: 1

Skimage : rotate image and fill the new formed background

Skimage : rotate image and fill the new formed background Question: When rotating an image using import skimage result = skimage.transform.rotate(img, angle=some_angle, resize=True) # the result is the rotated image with black ‘margins’ that fill the blanks The algorithm rotates the image but leaves the newly formed background black and there is no way – …

Total answers: 5

Filling holes in image with OpenCV or Skimage

Filling holes in image with OpenCV or Skimage Question: I m trying to fill holes for a chessboard for stereo application. The chessboard is at micro scale thus it is complicated to avoid dust… as you can see : Thus, the corners detection is impossible. I tried with SciPy’s binary_fill_holes or similar approaches but i …

Total answers: 3

Split text lines in scanned document

Split text lines in scanned document Question: I am trying to find a way to break the split the lines of text in a scanned document that has been adaptive thresholded. Right now, I am storing the pixel values of the document as unsigned ints from 0 to 255, and I am taking the average …

Total answers: 2

How to read mp4 video to be processed by scikit-image?

How to read mp4 video to be processed by scikit-image? Question: I would like to apply a scikit-image function (specifically the template matching function match_template) to the frames of a mp4 video, h264 encoding. It’s important for my application to track the time of each frame, but I know the framerate so I can easily …

Total answers: 3