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
6
votes
1 answer

Python Scikit-image Install Failing Using Pip

I'm attempting to install scikit-image and am obtaining this error output message. I'm unsure how to actually display the text properly, so just a simple paste I have done. building 'skimage.external.tifffile._tifffile' extension compiling C…
Kyle
  • 793
  • 6
  • 24
6
votes
1 answer

How can I detect edges on an image of a document, and cut sections into seperate images?

The task is to take an image of a document, and leverage straight lines surrounding different 'sections' in order to split up the image into different documents for further parsing. Size of the different 'sections' is completely variable from page…
6
votes
1 answer

Sliding window in Python for GLCM calculation

I am trying to do texture analysis in a satellite imagery using GLCM algorithm. The scikit-image documentation is very helpful on that but for GLCM calculation we need a window size looping over the image. This is too slow in Python. I found many…
Johny
  • 319
  • 3
  • 12
6
votes
1 answer

Use scikit-image to read in an image buffer

I already have an in-memory file of an image. I would like to use skimage's io.imread (or equivalent) to read in the image. However, skimage.io.imread() take a file not a buffer example buffer:
benwiz
  • 2,167
  • 3
  • 22
  • 33
6
votes
1 answer

Tricky filling holes in an image

I need to fill holes in images using python. This is the image with objects that I managed to get - they are really edges of objects I want, so I need to fill them. It seemed very straightforward using ndimage.binary_fill_holes(A), but the problem…
Phlya
  • 5,726
  • 4
  • 35
  • 54
6
votes
4 answers

skimage resize giving weird output

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 =…
RHankins
  • 147
  • 1
  • 1
  • 9
6
votes
1 answer

ssim image compare error ''window_shape incompatible with arr_in.shape"

I want to use ssim to compare similarity in 2 images. I'm getting this error window_shape is incompatible with arr_in.shape . Why? (What does it mean?) from skimage.measure import structural_similarity as ssim from skimage import io img1 =…
Alex
  • 5,759
  • 1
  • 32
  • 47
6
votes
3 answers

Image convolution at specific points

Is there a way in scipy (or other similar library) to get the convolution of an image with a given kernel only at some desired points? I'm looking for something like: ndimage.convolve(image, kernel, mask=mask) Where mask contains True (or 1)…
Imanol Luengo
  • 15,366
  • 2
  • 49
  • 67
6
votes
5 answers

fitting a circle to a binary image

I have been using skim age's thresholding algorithms to get some binary mask. For example, I obtain binary images like this: What I am trying to figure out is how can I fit a circle to this binary mask. The constraint is the circle should cover as…
Luca
  • 10,458
  • 24
  • 107
  • 234
6
votes
1 answer

rotation matrix in openCV

I am creating a rotation matrix in python as follows: import numpy as np def make_rot(angle): cost = np.cos(np.deg2rad(angle)) sint = np.sin(np.deg2rad(angle)) rot = np.array([[cost, -sint, 0], [sint, cost, 0], …
Luca
  • 10,458
  • 24
  • 107
  • 234
6
votes
1 answer

How can I extract the boundary curve of an image region in scikit-image?

How can I extract the boundary curve of an image region enumerated by measure.regionprops? By boundary curve, I mean a list of border pixels of the region in, say, clockwise direction around the region's perimeter, such that I can, for example,…
DCS
  • 3,354
  • 1
  • 24
  • 40
6
votes
2 answers

Why is skimage.transform.rotate significantly slower than PIL's Image.rotate?

I'm in the process of converting some PIL-based code over to NumPy, but I've found that the skimage.transform.rotate function is significantly slower than PIL's Image.rotate. As a rough comparison, using skimage's rotate on a ~1000x1000 pixel image…
David Wolever
  • 148,955
  • 89
  • 346
  • 502
5
votes
2 answers

Extract street network from a raster image

I have a 512x512 image of a street grid: I'd like to extract polylines for each of the streets in this image (large blue dots = intersections, small blue dots = points along polylines): I've tried a few techniques! One idea was to start with…
danvk
  • 15,863
  • 5
  • 72
  • 116
5
votes
0 answers

Multi-curve detection in noisy images in Python

I have images similar to the one below. First of all, I am trying to detect the curves in these images. The curves I want to capture are marked on the image. Next, I want to fit these curves into the circle. I will use the radii of these circles as…
5
votes
1 answer

skimage profile_line does not make sense

I´m trying to use measure profile to detect fluorescence in a serie of tubes so I write the following code import numpy as np import matplotlib.pyplot as plt from scipy import ndimage from skimage.measure import profile_line import os import…
omaqIX
  • 145
  • 11