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

SSIM for image comparison: issue with image shape

I am calculating the Structural Similarity Index between two images. I don't understand what the dimensionality should be. Both images (reference and target) are RGB images. If I shape my image as (256*256, 3), I obtain: ref =…
maurock
  • 527
  • 1
  • 7
  • 22
3
votes
3 answers

Find pixel indices within a shape: Opencv and Python

Suppose I have a mask of a hollow, curved (and not necessarily convex) shape that I've received from my pre-processing steps: I now want to try and select all pixels that occur inside that shape and add them to the mask, as so: How can I do this…
Clemson
  • 478
  • 5
  • 20
3
votes
2 answers

How to remove the noise on the border without losing data in the middle of mask

I am trying to segment out the tissue blobs from the image. I did some initial preprocessing and obtained the following result. My concern is the noise on the borders. If i erode with horizontal/vertical kernel, i loose some data in the middle as…
Anil Yadav
  • 149
  • 1
  • 14
3
votes
1 answer

Module not found for metrics within skimage. Everything else is ok

I keep getting No module named 'skimage.metrics' only for "metrics" everything else works fine. Is it deprecated? I have been unable to do anything and documentations doesn't mention anything.
ijzepeda
  • 55
  • 1
  • 6
3
votes
2 answers

Reverse skimage view_as_blocks() with numpy.reshape()

I want to divide a 4x4 image with 2 channes into multiple non-overlapping squares. After that, I want to rebuilt the image. from skimage.util import view_as_blocks # create testM array array([[[[0.53258505, 0.31525832, 0.21378392, 0.5019507 ], …
3
votes
2 answers

Segment photos of bio-samples to extract circular area of interest with Python image processing

I'm having issues with finishing the segmentation in some photos of bio-samples, I'm trying to analyze growth of bacteria with image processing, as in theory it should work. Here is one of the original images I have: I'm trying to segment the area…
3
votes
0 answers

Apply mask before computing metrics between 2 images with skimage

I am comparing in Python, 2 images A and B by computing various metrics with skimage.measure module, Let's say for example the structural similarity index with compare_ssim(A, B). I would like to apply a binary mask image C, to only take into…
Bapt29
  • 31
  • 1
3
votes
1 answer

how to convert bayerrg8 format image to rgb image

I've got a camera that provides images in Bayer RG8 format. I'm using skimage for processing images, but I could not find away to convert the Bayer RG8 format to standard RGB (to display on screen). Is there any way to do this with skimage? I did…
BrendanSimon
  • 665
  • 1
  • 9
  • 23
3
votes
1 answer

Straighten largest line in image

I have a large number of images of food items on a trey, the tray is the largest thing in the picture and it always contains the largest line. i.e. I had to Photoshop out the items on the trey i want a script that can align and straighten the trey,…
zaza
  • 892
  • 1
  • 18
  • 37
3
votes
0 answers

Converting RGB to Lab using skimage.color.rgb2lab

I have a strange observation when converting RGB pixel values to Lab space. Let's take the following reference values in RGB. import skimage colors = {'red': np.array((255, 0, 0)), 'orange': np.array((255, 69, 0)), 'yellow':…
akilat90
  • 5,436
  • 7
  • 28
  • 42
3
votes
0 answers

Finding the transformation between two matched shapes

Given two images with similar blobs, is there a simple way to find the transformation between them? As an example, I have two images like the following: The right is the output of a neural network, while the left is an approximate truth (from a…
ltab
  • 267
  • 2
  • 10
3
votes
2 answers

ValueError: Image is not numeric, but ndarray

I'm trying to save a sci-kit image, but I'm getting the error: ValueError: Image is not numeric, but ndarray. Code: from skimage import * import skimage.io import skimage.morphology as morphology def loadImage(f): return…
Alex
  • 159
  • 3
  • 16
3
votes
1 answer

How to remove small objects from 3D image?

Do you see that?There are some small objects spread below the brain. and I want to remove them to get a whole clean brain. A 3D image can be expressed as a 3D array in Numpy. Below is an approach to remove small objects in 2D image. from skimage…
Weiziyoung
  • 191
  • 1
  • 2
  • 12
3
votes
1 answer

Scale a 2D array logarithmically in Python

I have a 2D array of spectrogram data which I am scaling with scikit-image for display in a web browser. I would like to scale the array logarithmically in the y-axis." I can plot the data logarithmically in the y-axis using Matplotlib, but I want…
anchoress
  • 113
  • 7
3
votes
1 answer

Why does first import of skimage fail, but second one succeed?

When I import skimage, I get an odd error message that seems to be connected to version mismatch issues with scikit-image, numpy and dask, but if I immediately try to import again, everything is fine -- i.e. (base) me@balin:~$ python Python 2.7.15…
user1245262
  • 6,968
  • 8
  • 50
  • 77