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

How to get contour area in skimage

I've defined contours in skimage following documenation: contours = measure.find_contours(img, 0.8) In OpenCV area could be obtained using: cv2.contourArea(cnt) Does skimage contains something similar (functionality for contour features)?
MykolaSharhan
  • 396
  • 7
  • 15
7
votes
2 answers

Creating a "white" image in numpy (2-D image)

Looks like I seem to have some fundamental gaps in my understanding of how images are represented in numpy arrays. img = np.ones([100,100,3], dtype=np.uint8)*255 plt.imshow(img) The above code creates a "white" 3 channel image. Each pixel has the…
Thalish Sajeed
  • 1,351
  • 11
  • 25
7
votes
3 answers

Finding the center of mass in an image

Here is my image: I want to find the center of mass in this image. I can find the approximate location of the center of mass by drawing two perpendicular lines as shown in this image: I want to find it using an image processing tool in python. I…
Leo
  • 479
  • 2
  • 6
  • 16
7
votes
2 answers

Scikit image: resize() got an unexpected keyword argument 'anti_aliasing'

I am trying to use the resize function using aliasing exactly as described in the documentation: http://scikit-image.org/docs/dev/auto_examples/transform/plot_rescale.html from skimage.transform import resize im_test = resize(im_test,…
ru111
  • 813
  • 3
  • 13
  • 27
7
votes
1 answer

Convert image to array for CNN

I am trying to categorize the dog breeding identification using CNN. I have converted the images to gray scale and re-scaled them in order to be smaller in size. So now I am trying to add them in numpy array and do the training. Also I will use Relu…
7
votes
4 answers

Transform an image to a bitmap

I'm trying to create like a bitmap for an image of a letter but I'm not having the desired result. It's been a few days that I started working with images. I tried to read the image, create a numpy array of it and save the content in a file. I wrote…
Leonardo Burrone
  • 339
  • 2
  • 5
  • 13
7
votes
2 answers

How to identify incomplete rectangles in openCV

How would I go around identifying and extracting rectangles from an image such as the one shown below. Note that my rectangles might be incomplete and have some missing edges and some sides might be partial lines. Thanks !
7
votes
2 answers

ellipse detection in opencv python

My image is here: i'm looking for a better solution or algorithm to detect the ellipse part (dish) in this photo and mask it in an other photo in Opencv. could you please give me some advice or solution. and my code is : circles =…
Mohammad Mostafavi
  • 337
  • 1
  • 3
  • 13
7
votes
3 answers

Create mask from skimage contour

I have an image that I found contours on with skimage.measure.find_contours() but now I want to create a mask for the pixels fully outside the largest closed contour. Any idea how to do this? Modifying the example in the documentation: import…
Joe Flip
  • 1,076
  • 4
  • 21
  • 37
7
votes
1 answer

How can I fill arbitrary closed regions in Matplotlib?

Let me start with where I am: I created the above image with the following code: import matplotlib.pyplot as plt import numpy as np color_palette_name = 'gist_heat' cmap = plt.cm.get_cmap(color_palette_name) bgcolor = cmap(np.random.rand()) f =…
JBWhitmore
  • 11,576
  • 10
  • 38
  • 52
7
votes
4 answers

Detecting similar points between two pictures and then overlaying them (Python)

I have two pictures of the same nerve cut at slightly different depths where a different dye was used for staining on each slice. I would like to overlay the two images but they are not perfectly aligned on the slide/photo to do this simply. What I…
Michael S.
  • 3,050
  • 4
  • 19
  • 34
7
votes
2 answers

Ideas how to measure the length of a skeleton using python

After applying skeletonization on an image(), I want to measure the longest branch, or spine of the skeleton using python. ImageJ has several tools that do this job one is Measure_Skeleton_length, another is AnalyzeSkeleton. Any tools or suggestions…
icypy
  • 3,062
  • 5
  • 25
  • 27
7
votes
1 answer

Object detection in images (HOG)

I want to detect objects inside cells of microscopy images. I have a lot of annotated images (app. 50.000 images with an object and 500.000 without an object). So far I tried to extract features using HOG and classifying using logistic regression…
honeymoon
  • 2,400
  • 5
  • 34
  • 43
7
votes
3 answers

Calculating just a specific property in regionprops python

I am using the measure.regionprops method available in scikit-image to measure the properties of the connected components. It computes a bunch of properties (Python-regionprops). However, I just need the area of each connected component. Is there a…
optimist
  • 1,018
  • 13
  • 26
7
votes
1 answer

skewing or shearing an image in python

I need to shear and skew some images using Python. I've come across this skimage module but I don't really understand how I'm supposed to use this. I've tried a few things which ended up in errors, because I realized later that I wasn't passing in…
user961627
  • 12,379
  • 42
  • 136
  • 210