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
22
votes
3 answers

Extract blocks or patches from NumPy Array

I have a 2-d numpy array as follows: a = np.array([[1,5,9,13], [2,6,10,14], [3,7,11,15], [4,8,12,16]] I want to extract it into patches of 2 by 2 sizes with out repeating the elements. The answer should…
Borys
  • 1,323
  • 6
  • 16
  • 40
20
votes
2 answers

Feature extraction and take color histogram

I am working on an image processing feature extraction. I have a photo of a bird in which I have to extract bird area and tell what color the bird has. I used canny feature extraction method to get the edges of a bird. How to extract only bird area…
18
votes
1 answer

libraries mkl_rt, openblas, lapack not found while installing scipy - How to change flags for libraries

I am new to python and pip ecosystem. I am trying to install scikit-image and it is installing scipy as a dependency I suppose. I am using macOS 11.1 and I know that support for this version is not great since it just released but I was able to…
G Patel
  • 181
  • 1
  • 3
  • 8
18
votes
5 answers

How to invert black and white with scikit-image?

I read an image with ndimage, which results in a binary image like this: I would like to invert the image such that white turns into black, and vice versa. Help is appreciated.
Pamungkas Jayuda
  • 1,194
  • 2
  • 13
  • 31
17
votes
2 answers

Error with pip install scikit-image

I am using Windows 8.1 64 bit and Python 2.7. While trying to install scikit-image from the shell pip install scikit-image I have encountered this error: Command "python setup.py egg_info" failed with error code 1 in…
FaCoffee
  • 7,609
  • 28
  • 99
  • 174
16
votes
2 answers

Calculating entropy from GLCM of an image

I am using skimage library for most of image analysis work. I have an RGB image and I intend to extract texture features like entropy, energy, homogeneity and contrast from the image. Below are the steps that I am performing: from skimage import…
Sreejith Menon
  • 1,057
  • 1
  • 18
  • 27
14
votes
2 answers

Detecting comic strip dialogue bubble regions in images

I have an grayscale image of a comic strip page that features several dialogue bubbles (=speech baloons, etc), that are enclosed areas with white background and solid black borders that contain text inside, i.e. something like that: I want to…
GreyCat
  • 16,622
  • 18
  • 74
  • 112
13
votes
4 answers

Input image dtype is bool. Interpolation is not defined with bool data type

I am facing this issue while using Mask_RCNN to train on my custom dataset with multiple classes. This error occurs when I start training. This is what I…
13
votes
2 answers

How to turn off skimage warnings

I want to turn off skimage UserWarning: I used this code but they are still enabled. with warnings.catch_warnings(): warnings.simplefilter("ignore") skimage.io.imsave
LearnToGrow
  • 1,656
  • 6
  • 30
  • 53
13
votes
1 answer

Skimage - Weird results of resize function

I am trying to resize a .jpg image with skimage.transform.resize function. Function returns me weird result (see image below). I am not sure if it is a bug or just wrong use of the function. import numpy as np from skimage import io, color from…
Primoz
  • 1,324
  • 2
  • 16
  • 34
13
votes
2 answers

How can i convert images from scikit-image to opencv2 and other libraries?

I tried to find contour with cv2 python library in a skeletonized image created with scikit-image and i got this error: contours, hierarchy = cv2.findContours(skel,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE) TypeError: data type = 0 is not…
improc
  • 415
  • 2
  • 9
  • 17
12
votes
1 answer

Curve Fitting in 2D Images With Missing Data

I have split contours in a image and I want to connect them assuming they are parametrized curves. I was considering some curve fitting or curve tracing - but I do not know, how can I implement it. I have exactly 1 px wide split contours: import…
Foreen
  • 369
  • 2
  • 17
12
votes
3 answers

bins must increase monotonically

I just want to draw Matplotlib histograms from skimage.exposure but I get a ValueError: bins must increase monotonically. The original image comes from here and here my code: from skimage import io, exposure import matplotlib.pyplot as plt img =…
Aurélien Vasseur
  • 135
  • 1
  • 1
  • 9
12
votes
1 answer

Save numpy array as image with high precision (16 bits) with scikit-image

I am working with 2D floating-point numpy arrays that I would like to save to greyscale .png files with high precision (e.g. 16 bits). I would like to do this using the scikit-image skimage.io package if possible. Here's the main thing I've…
tsawallis
  • 1,035
  • 4
  • 13
  • 26
12
votes
1 answer

Geometric warp of image in python

I would like to use python to perform a geometric transform over an image, to 'straighten' or rectify an image along a given curve. It seems that scikit-image ProjectiveTransform() and warp() are very good for this, but the documentation is sparse.…
tiago
  • 22,602
  • 12
  • 72
  • 88