Questions tagged [scikit-image]

scikit-image is a Python image processing toolbox for SciPy.

scikit-image is a collection of algorithms for image processing with SciPy. The scikit-image SciKit extends scipy.ndimage to provide a versatile set of image processing routines.

1871 questions
11
votes
1 answer

Is there a way to automatically correct the color balance?

I'm looking for a solution to automatically adjust the color balance? I would like to use the pictures for color analysis and comparison, therefore color balance is important. I was hoping a feature such as histogram equalization with scikit-image…
Laurent R
  • 783
  • 1
  • 6
  • 25
11
votes
1 answer

How to correctly use cv2.imwrite to save an image in openCV with cv2.selectROI

I am trying out OpenCV's ROI function. With this I am trying to crop out a section of an image that I load. After that I am trying to save the image as well as show it. Showing it is not much of a problem, but saving it is. The image is being stored…
TheTank
  • 495
  • 2
  • 9
  • 21
11
votes
1 answer

Scikit-image expanding active contour (snakes)

I followed the example from this link. However, the contour contracts from the init points. Is it possible to do contour that expands out? I want something like the image shown. The image on the left is what it looks like, and the image on the right…
matchifang
  • 5,190
  • 12
  • 47
  • 76
11
votes
1 answer

How to extract green channel from RGB image in Python using Scikit-Image library?

I am extremely new to scikit-image (skimage) library in Python for image processing (started few minutes ago!). I have used imread to read an image file in a numpy.ndarray. The array is 3 dimensional where the size of the third dimension is 3…
exAres
  • 4,806
  • 16
  • 53
  • 95
10
votes
2 answers

Convert boolean numpy array to pillow image

I'm currently working with image processing in python using the scikit-image library. I'm trying to make a binary image using sauvola thresholding with the following code: from PIL import Image import numpy from skimage.color import rgb2gray from…
10
votes
1 answer

The kernel appears to have died. It will restart automatically

When running: from skimage import data in jupyter notebook I always get the error : "The kernel appears to have died. It will restart automatically" I use: Anaconda 4.2.0 (64-bit) Python 3.5.2 scikit-image 0.12.3 np111py35_1 When I run a notebook…
finlouarn
  • 169
  • 1
  • 1
  • 6
10
votes
5 answers

How to export contours created in scikit-image find_contours to shapefile or geojson?

I'm trying to export the results of the scikit-image.measure.find_contours() function as a shapefile or geojson after running on a satellite image. The output is an array like (row, column) with coordinates along the contours, of which there are…
Cate
  • 431
  • 1
  • 7
  • 22
10
votes
3 answers

Denoise and filter an image

I am doing a license-plate recognition. I have crop out the plate but it is very blurred. Therefore I cannot split out the digits/characters and recognize it. Here is my image: I have tried to denoise it through using scikit image function. First,…
VICTOR
  • 1,894
  • 5
  • 25
  • 54
10
votes
5 answers

Why is Gaussian Filter different between cv2 and skimage?

I've got an image that I apply a Gaussian Blur to using both cv2.GaussianBlur and skimage.gaussian_filter libraries, but I get significantly different results. I'm curious as to why, and what can be done to make skimage look more like cv2. I know…
waldol1
  • 1,841
  • 2
  • 18
  • 22
10
votes
4 answers

crop image in skimage?

I'm using skimage to crop a rectangle in a given image, now I have (x1,y1,x2,y2) as the rectangle coordinates, then I had loaded the image image = skimage.io.imread(filename) cropped = image(x1,y1,x2,y2) However this is the wrong way to crop the…
user824624
  • 7,077
  • 27
  • 106
  • 183
10
votes
1 answer

Finding pits in an image

One of my friend was working on following project: Below is the microscopic (SEM) image of the surface of stainless steel. But you can see, it is corroded a little bit (after long exposure to marine environment) and some pits are formed on the…
Abid Rahman K
  • 51,886
  • 31
  • 146
  • 157
9
votes
4 answers

How to convert PNG to JPG in Python?

I'm trying to compare two images, one a .png and the other a .jpg. So I need to convert the .png file to a .jpg to get closer values for SSIM. Below is the code that I've tried, but I'm getting this error: AttributeError: 'tuple' object has no…
E K
  • 119
  • 1
  • 1
  • 6
9
votes
1 answer

Which SSIM is correct : skimage.metrics.structural_similarity()?

Stackoverflow comunity, I'm trying to compute SSIM (Structural SIMilarity) between two bmp images on Python. I've found structural_similarity() function implemented in the skimage python library and the equivalent code from the original MatLab…
asendjasni
  • 963
  • 1
  • 16
  • 36
9
votes
2 answers

How to resize a labeled mask with nearest neighbor interpolation using scikit-image

I want to resize a labeled segmentation mask specifically with nearest neighbor interpolation. scikit-image has two relevant functions: resize and rescale But neither of these functions allow you to specify the interpolation method. It is very…
cdeepakroy
  • 2,203
  • 3
  • 19
  • 23
9
votes
3 answers

Updating .Spec file for Pyinstaller gets reset

I am trying to modify the default .spec file created by Pyinstaller to include hidden imports and datas however everytime I run pyinstaller and specify the spec file like pyinstaller source.py spource.spec my source.spec gets rest to its default…
Amr Abdu
  • 91
  • 1
  • 4