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

Digitize a colormap

Consider the following image: I'd like to print it as a grayscale image. I can do the conversion with scikit-image: from skimage.io import imread from matplotlib import pyplot as plt from skimage.color import rgb2gray img =…
cjorssen
  • 877
  • 2
  • 7
  • 22
5
votes
1 answer

Piecewise Affine Transform+warp output looks strange

I have an image I am trying to warp using skimage.PiecewiseAffineTransform and skimage.warp. I have a set of control points (true) mapped to a new set of control points (ideal) but the warp is not returning what I expect. In this example, I have a…
Joe Flip
  • 1,076
  • 4
  • 21
  • 37
5
votes
3 answers

Filling holes in image with OpenCV or Skimage

I m trying to fill holes for a chessboard for stereo application. The chessboard is at micro scale thus it is complicated to avoid dust... as you can see : Thus, the corners detection is impossible. I tried with SciPy's binary_fill_holes or similar…
user3601754
  • 3,792
  • 11
  • 43
  • 77
5
votes
2 answers

Why does the local_binary_pattern function in scikit-image provide same value for different patterns?

I am using the local_binary_pattern function in the scikit-image package. I would like to compute the rotation invariant uniform LBP of 8 neighbors within radius 1. Here is my Python code: import numpy as np from skimage.feature import…
Peter
  • 243
  • 1
  • 2
  • 8
5
votes
2 answers

How to modify scikit-learn's eigenface face recognition example

I am trying to adapt scikit-learn's eigenface face recognition script to be used on my own image dataset (of note, this script runs perfectly on my Python 3, sklearn 0.17). The below call to fetch_lfw_people() is what probably needs modification and…
pepe
  • 9,799
  • 25
  • 110
  • 188
5
votes
1 answer

Implementing GLCM texture feature with scikit-image and Python

I am trying to implement a texture image as described in this tutorial using Python and skimage. The issue is to move a 7x7 window over a large raster and replace the center of each pixel with the calculated texture from the 7x7 window. I manage to…
user2341961
5
votes
2 answers

Challenging image segmentation: background and objects are similar

I'm new to image segmentation, but I need to do it to get a database for the machine learning classifier. Essentially I have a video similar to this image: My job is to identify cows in the foreground, or at least any cow at all. I realize there…
Alex
  • 944
  • 4
  • 15
  • 28
5
votes
3 answers

ZeroDivisionError (Python)

I am getting a Zero Division Error with some images (Even though a lot of them work just fine) : Here's the code : image = skimage.io.imread('test.png', False) image_gray = skimage.io.imread('test.png', True) blurred =…
user5449712
5
votes
1 answer

How can I load an image with its alpha channel with skimage?

I am using an Anaconda distribution of Python with stuff like numpy, scipy, and scikit-image. When I call: from skimage import io img = io.imread('myimage.png') It ignores my alpha channel and returns the image as an array with shape (W, H, 3)…
Luis Masuelli
  • 12,079
  • 10
  • 49
  • 87
5
votes
1 answer

Trying to ROTATE a simple picture in Python using skimage.transform

I have a simple picture in Python 3.X I can display it. However, I cannot rotate it, using skimage.transform.rotate. The error is that my 'Picture' object has no shape. I've seen the .shape included after the rotate command, but it still does not…
B Furtado
  • 1,488
  • 3
  • 20
  • 34
5
votes
3 answers

Load JPEG from URL to skimage without temporary file

Is it possible to load image in skimage (numpy matrix) format from URL without creating temporary file? skimage itself uses temporary files: https://github.com/scikit-image/scikit-image/blob/master/skimage/io/util.py#L23 Is there any way to pass…
user1263702
  • 123
  • 1
  • 10
5
votes
1 answer

Overlay two numpy arrays treating fourth plane as alpha level

I have two numpy arrays of shape (256, 256, 4). I would like to treat the fourth 256 x 256 plane as an alpha level, and export an image where these arrays have been overlayed. Code example: import numpy as np from skimage import io fg =…
tsawallis
  • 1,035
  • 4
  • 13
  • 26
5
votes
1 answer

levels parameter in greycomatrix scikit-image python

I'm moving my Matlab image processing algorithms to Python using scikit-image tools, and I'm calculating the gray level co-occurrence matrix (GLCM) using greycomatrix. I have a problem if the parameter levels is lesser than the maximum value of the…
rpezoa
  • 51
  • 1
  • 2
5
votes
0 answers

Scikit-learn: ValueError: can not convert object to float64

I have experienced very strange problem related to scikit-image. Namely, I'm not able to run "started example": from skimage import data, io, filter image = data.coins() # or any NumPy array! edges = filter.sobel(image) io.imshow(edges) After that…
AS_Python
  • 51
  • 1
  • 3
5
votes
1 answer

Image filtering with scikit-image?

I'm moving to python from a Matlab background, and there are a few elementary operations I've yet to conquer in Python/skimage: How can I apply a user-generated linear filter (given as a small 2d array) to an image? I can do it with…
Alasdair
  • 1,300
  • 4
  • 16
  • 28