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
0
votes
2 answers

Clean up unlabeled pixels in image segmentation

I have image segmentation results that look like this: As you can see there are small gaps in the segmentation map. These gap pixels have been assigned the value 0; all other, non-gap pixels have been assigned a non-0 class value. Is there a…
0
votes
1 answer

Attempting to create a function to label image

I am attempting to threshold an image then label the objects. This is what i have so far: from skimage.measure import label from skimage.filters import threshold_otsu from skimage.segmentation import clear_border from skimage.measure import label,…
Jack Ryan
  • 21
  • 1
  • 5
0
votes
1 answer

regarding the array value of imread and rgb2gray

For a given image, if I read it using imread, will the values in the three channels be in the range of [0,255]? If I transfer this image using rgb2gray, will the value be in the range of [0,1]? based on the skimage doc, the calculation of rgb2gray…
user297850
  • 7,705
  • 17
  • 54
  • 76
0
votes
1 answer

Dimensionality problem in creation of patches

I have a binary image of 650x650 size. I want to create patches of 50x50. This means that I need 169 patches. I want to examine if there is in every patch is at least "ONE" element. I need also the result to be pairs of every patch. Here there is an…
0
votes
1 answer

How do I run ellipse detection on scikit-image for python on local images?

The scikit-image processing example code for circular and elliptical hough transformations and ellipse detection identifies ellipses in an image (link: scikit example code). However, the example only allows me to run the code on images from the…
0
votes
1 answer

skimage rotated image displays as black

I'm trying to do a simple rotation of a sample image, but when I try to display it, the file just shows black pixels. I can tell that it has rotated, because the dimensions are changed properly. from io import BytesIO import numpy as np from PIL…
Eric
  • 601
  • 7
  • 22
0
votes
1 answer

Skimage RAG merging for gray images

Can the skimage RAG support the gray images? For example, in RAG merging, it states This example constructs a Region Adjacency Graph (RAG) and progressively merges regions that are similar in color. But can we merge regions in terms of pixel…
user785099
  • 5,323
  • 10
  • 44
  • 62
0
votes
1 answer

regarding the code performing region boundary based RAGs using skimage

Regarding the Region Boundary based RAGs, I am not clear about the code on defining edges_rgb, if I perform the RAG analysis over a gray image, why I need to transfer the edges into rgb color? edges_rgb = color.gray2rgb(edges) g =…
user288609
  • 12,465
  • 26
  • 85
  • 127
0
votes
0 answers

How to determine the frequency of skimage.filter.gabor function?

I am now trying to use garbor function provided in skimage, the documentation is here, there is a parameter called frequency for this function, but how to determine the frequency, in the documentation, the frequency is described as "Spatial…
Jasper Zhou
  • 449
  • 1
  • 5
  • 13
0
votes
1 answer

Fitting a polygon in a image and finding the angles

I have an image of an object that I would like to fit a polygon and extract the internal angles: I tried to do that fitting lines to the edges of the object using Hough lines from the skimage package. After that I calculated the angles between the…
0
votes
1 answer

Slicing a 3D array vs projecting it

Link to array file I am new to image processing and trying to understand projection. So when we have a 3D image, it is simply a 3D numpy array and i view it by slicing a 2D array out of the 3D array. In order to do a orthogonal projection, i simply…
0
votes
0 answers

Array is not iterable, but how to use as argument in zip()?

I want to plot 3D visualizations of DICOM Scans, but I am stuck on this error. I am using the marching cubes method. First from mesh verts and faces and returned then passed into plt_3d. Modules imported: import numpy as np import pydicom as…
H. Garg
  • 41
  • 4
0
votes
2 answers

how to draw shapes (ellipses, rectange, circle, etc) with line width thicker than 1 pixel

The skimage.draw module has functions to draw circles, ellipses, lines, etc. However the line width seems to be fixed at 1 pixel. There doesn't appear to be a parameter to set the line width. Stefan van der Walt suggested that there is hidden…
BrendanSimon
  • 665
  • 1
  • 9
  • 23
0
votes
0 answers

Python Scikit Image find contours return the contours all in the first location of the list

I'm using scikit-image for computer vision. I will use find contours to obtain the contours of the grayscale image input but the list returned contain the contours in the image all in the first location. The result that I want to obtain is the…
0
votes
1 answer

Displaying both plt.show() images as Figure 1, Figure 2 at the same time

Running the following code, I am unable to display both images at the same time in separate windows, or go from figure1 to figure2 with the arrow button. Currently I am able to get figure2, only when I close figure1. I have tried the following code…
Carl C
  • 135
  • 8