Questions tagged [scikit-image]
scikit-image is a Python image processing toolbox for SciPy.
1,881
questions
2
votes
1
answer
26
views
SSIM is large but the two images are not similar at all
I want to use the structural similarity index measure for computing the mean structural similarity index between two images: the original one and the reconstructed one.
This is the original one:
...
0
votes
0
answers
33
views
i got sytem error while installing scikit-image
I have been triying the install scikit-image but i got errors while installing. I have 64bit ad 32bit python 3.9.13. both of them installed on my computer. Also my computer has 64bit system.
I create ...
0
votes
0
answers
41
views
Python connected components in skimage label vs ndimage vs cv2
I have a need to find connected components in a binary uint8 image of size 480x640. I have over 3500 such images that need their connected components (8 way connectivity) found. I found that using ...
1
vote
2
answers
47
views
How Can I Improve Line Detection Accuracy when Analyzing Images for Extending Arms from Object Centers in Python?
I am attempting to identify projected lines from the center of the object, as depicted in the images below.
So far, I have tried filling the object after finding its contour, then extracting the ...
1
vote
1
answer
71
views
Is there a Python function equivalent to a Matlab bwmorph?
I recently transferred Matlab code to Python, and I've tried OpenCV's cv2.morphologyEx and skimage's skimage.morphology, but the result is not the same as in Matlab. I can't find the equivalent ...
0
votes
1
answer
55
views
How to Convert cutoff_frequency_ratio to Cycles/Pixel in Butterworth Filtering in scikit-image
I'm employing the butterworth filter function from skimage.filters, as detailed in its source code here . My primary goal is to understand the relationship between the cutoff_frequency_ratio parameter ...
1
vote
0
answers
33
views
How to Improve rigid registration for 2D images
I am looking for a way to improve the rigid registration procedure of 2D images and evaluate metrics for better rigid registration using SimpleITK, here is my code
import SimpleITK as sitk
import ...
1
vote
0
answers
31
views
Why openCV's implementation of Blob Detection is different from skimage?
For a long time, I thought that OpenCV implementation of SimpleBlobDetector is the approach mentioned in Wikipedia, in which a stack of images with different blurring parameters is created and then a ...
0
votes
0
answers
12
views
Symmetry-preserving mesh from marching cube in python
I want to obtain a mesh from a marching cube that preserves the mirror symmetries along x, along y and z of my object. The position of the vertices do preserve these symmetries, but not the faces. How ...
0
votes
1
answer
47
views
Crop an image without specifying the coordinates using python
I am trying to crop the image with only the area that is useful for processing. However cropping the image by providing the coordinates will not be efficient since the images that I am trying to ...
-1
votes
0
answers
56
views
ValueError: the input array must have size 3 along `channel_axis`, got (512, 512)
I have working on edge detection code with python and I got an error message.
I put my code last. I have googled and of cource, there are some website or stackoverflow page that explains the similar ...
0
votes
1
answer
20
views
Python (scikit-image): Most performant way to determine most common color in a masked area
I'm modding a strategy game and have two RGB images. One defines the province areas on the map, each province being a unique color. The other image defines the terrain of the map.
I have a python ...
0
votes
2
answers
86
views
Why does multiplying an image, loaded using scikit-image, by 0.5 show it brighter in matplotlib?
I simply want to darken an image that I've loaded using scikit-image in python.
If I do this:
test_image = io.imread("TestProvs2.bmp")
test_image = test_image * 0.5
show_map(test_image)
...
1
vote
1
answer
58
views
Enhancing blob detection in image
I have an image with varying brightness across the image. I wanted to predict all the dots present in the image. Converted the image into grayscale and applied THRESH_BINARY_INV and THRESH_OTSU to ...
0
votes
1
answer
43
views
"num_pixels" gives keyError for regionprops_table in scikit-image as property
import skimage
import numpy as np
array = np.array(([1,1],[1,0]))
skimage.measure.regionprops_table(array, properties=("num_pixels", "area_filled"))
gives keyError for "...
0
votes
2
answers
46
views
Skimage random_noise : can't use "var" parameter
Skimage documentation includes a "var" parameter, but when I try to use it noise_image = random_noise(image, mode=chosen_noise_mode, var=0.1) I got the following error:
var keyword not in ...
1
vote
1
answer
64
views
Mean filter on 2D array with Numpy, SciPy or Scikit-image
I'm looking for a 2D mean filter with 3x3 window. I tried NumPy:
a = np.arange(25).reshape(5, 5)
b = np.average(a, axis=(0, 1), weights=np.ones((3, 3)))
but it fails with:
TypeError: 1D weights ...
1
vote
1
answer
70
views
Python Skimage: hessian() filter. Why are filter result values <= 0 set to 1?
I am currently working with ridge detection filters such as frangi(), sato() and hessian() within the python skimage package. In my project, I am using the hessian() filter to detect river-like ...
0
votes
0
answers
11
views
Change of values in the traditional Metal Artefact Reduction (MAR) method using radon inverse and filtered back projection
I'm implementing a traditional interpolation-based metal artefact reduction (MAR) method using the Radon transform and its inverse, which consists of the following steps:
The metal body is extracted ...
1
vote
0
answers
52
views
Reading metadata of TIFF image in Python
I'm analyzing electron microscopy images currently and when I open the TIFF images in a text editor there are several hundred rows of image information such as the Image Pixel Size accounting for the ...
0
votes
0
answers
30
views
Using skimage view_as_windows with step of (w,h)
I'm using skimage view_as_windows to get patches of a 3d image (RGB) of shape (100,150,3).
My windows shape is (20,25,3) and my step (stride) is (9,12). I need to input the step variable as a tuple ...
0
votes
1
answer
61
views
Cube Edge detection
I am trying to get the edges of a cube in the image below using the Hough transform in the Scikit-Image library .
Update
Here is the code I am working with:
smoothed_image = filters.frangi(gray_image)...
1
vote
1
answer
91
views
Is there any python library function to perform blob detection?
I was trying to implement blob detection in Python. I have gone through an implemented Matlab code. But, there is a problem I couldn't understand the code. Is there any function related to this one in ...
1
vote
1
answer
76
views
skimage hog returns no feature vector with length 0
I am trying to extract hog descriptors for some ROI on a given image (2D) using the implementation in skimage.feature. I have attached some samples of the ROI that I have extracted. I am just using ...
0
votes
0
answers
28
views
image labelling and anisotropy
I have a 3d image which I want to label. Typically I use from label from scipy.ndimage. I want to ask how do you handle anisotropy, the z-dimension is cut more coarsely than x and y.
My structuring ...
1
vote
0
answers
48
views
How to pre-process brightness and contrast to find accurate differences between images in Python?
I am making a program that compares and points out the differences between the two images using the skimage library.
def get_structural_simlarity(first_image, second_image):
print("[Console] ...
1
vote
1
answer
176
views
skimage.io.imsave is executed with empty file but without error
I am deskewing a tiff-image with the python lib "skimage" and try to save it back to disk. But I can not save an image with the call "skimage.io.imsave". It does not work. No ...
0
votes
0
answers
50
views
ValueError: shape mismatch: value array of shape (2,1) could not be broadcast to indexing result of shape (2,)
This is the code I'm working on, the edge detection part works perfectly it's just that the corrected image is not being plotted for some reason. Please advice.
The error points to the 2nd last code ...
1
vote
0
answers
42
views
Is it possible to use CV2 to remove internal contours in this binary mask?
I'm working on a network that outputs binary masks for corneal endothelial cells. At first, the masks look like this:
I only want to retain the whole cells of the mask (complete enclosed edges, want ...
0
votes
0
answers
64
views
Issues with Scikit-Image regionprops for multichannel intensity image
I am attempting to extract region intensity for each color channel using the following:
props = regionprops_table(mask,intensity_image=img,
properties=['label',
...
1
vote
1
answer
45
views
Inconsistancy of raw moments between skimage and opencv
I am trying to replace opencv functions with a more pythonic approach by using similar functions in numpy and skimage. The raw moments are not the same but the centroids are similar. I was wondering ...
0
votes
0
answers
55
views
How can I crop out the perimeter of a circular petri dish to evaluate only what is inside the circular dish using Python 3.11 and scikit-image?
I have been tasked with taking scanned images of a petri dish with bacterial colonies growing on it over time and performing an analysis of different statistics such as growth rate, time of appearance,...
2
votes
1
answer
99
views
Detection of too many tiny areas when measuring large particles in binary images
I am moving from ImageJ to Python for doing image processing of images showing particles - either on a bench or falling - and trying to write my first code for 1) opening images of particles, 2) ...
0
votes
0
answers
43
views
Skimage: trying to find a straight line with Hough_Line
This is my first ever python-project and I am a little stuck. I am trying to detect a straight horizontal line in an image. The image is a black and white picture of a drop on a surface and I want to ...
4
votes
2
answers
151
views
Detect wrinkle with Hessian matrix
Currently, I am trying to use Hessian matrix to detect wrinkles on the forehead. How could I remove out noises around these wrinkles? Below are my current code and result.
from skimage.feature import ...
0
votes
2
answers
240
views
Accurately correcting the offset between two objects with the same shape from two different images where segmentation is not possible
I have two images of an object with the same shape at different positions. My goal is to modify one of the images so that the position of the object aligns with the object of the reference image.
See ...
0
votes
0
answers
27
views
I encountered the following error when trying to run BT-Unet: a TensorFlow program on pycharm
2023-05-06 17:30:37.471901: W tensorflow/core/framework/op_kernel.cc:1680] Unknown: AttributeError: 'tensorflow.python.framework.ops.EagerTensor' object has no attribute 'swapaxes'
Traceback (most ...
0
votes
0
answers
26
views
Filling objects based on the boundaries
I would like to fill the objects based on their boundaries. I did found something similar has been done already as shown here. But with this I am not able to fill more than one object. For example, my ...
0
votes
1
answer
49
views
2d Ridge Peak Detection // Extracting Line Segments from a Density Plot Image using OpenCV
I have density plots for line locations. When visualizing the density plot image, multiple lines can be observed, each composed of one or more segments. I'm looking for a solution that would allow me ...
1
vote
0
answers
83
views
Decompose SSIM to luminous, contrast, and Structure instead of luminous, and Contrast-Structure
Referring to this this paper, authors proposed to use structural similarity index measure (SSIM) with different luminous, contrast and structure weights. I have seen different implementations for SSIM ...
0
votes
1
answer
83
views
Regionprops in skimage does not return intensity_mean
Regionprops in skimage does not return intensity_mean and returns an error. A minimal example is here:
from skimage import data, util
from skimage.measure import label, regionprops
img = util....
0
votes
0
answers
94
views
The function to fill the ring in the grayscale image the fastest
I have a picture of a ring type part and I want to measure the outer and inner diameters of this part. I use a library called subpixel-edges to find edge coordinates. However, my problem is that the ...
0
votes
1
answer
48
views
How many bins are applied to an image of different types in skimage.measure.shannon_entropy()
How does the skimage.measure.shannon_entropy() compute the histogram before returning the entropy result? I pass images in the format of 1,2 and 4 byte signed and unsigned grayscale images and also ...
0
votes
0
answers
125
views
How do I unwrap the phase from a Fourier transform in a way that makes physical sense?
To extract data from an 2D image, I have:
Fourier transformed the image using scipy.fft.fft2()
cropped out a specific peak that I want to investigate
performed the inverse Fourier transform with ...
0
votes
1
answer
111
views
'RegionProperties' object has no attribute 'mean_intensity'
I'm having some issues with calculating mean instensity with skimage. All other prop regions (area, feret diameter, etc.) work fine so I am not sure what the issue is? I use Python 3.8.0 with skimage ...
0
votes
0
answers
112
views
PyInstaller .exe is producing Value Error when executed, error log traces it back to skimage.metrics import
I wrote a programm using the skimage library (from skimage.metrics import structural_similarity). It works just fine, also creating the .exe using PyInstaller (pyinstaller name.py --debug=all -c --...
1
vote
1
answer
197
views
How can I calculate SSIM between 2 images using scikit-image?
I am trying to find the SSIM between two images that I'm storing using the Image data structure from PIL. the structural_similarity function requires both images to be stored as numpy arrays of the ...
1
vote
2
answers
256
views
skimage.transform.warp vs cv2.warpPerspective
This is a topic that has also struck me recently, namely the differences between skimage geometric transforms and their equivalences in opencv. My goal is to replace the skimage.transform.warp ...
0
votes
1
answer
79
views
Count overlapping filaments in image
I am trying to count filaments in binary images. They are segmentation masks for cell filopodia, and they are often overlapping. This overlapping makes it difficult to accurately count them.
I am ...
0
votes
1
answer
59
views
How to vectorize a for-loop numpy.where
I'm fairly new to numpy, and currently unable to vectorize the for-loop in the following code:
# Build an image_array by label discrimination, using seg and seg_4col, expanding discrimated labels in ...