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

How to de-skew a text image and retrieve the new bounding box of that image Python OpenCV?

Here's a receipt image that I've got and I've plotted it using matplotlib and If you see the image the text in it is not straight. How can I de-skew and fix it? from skimage import io import cv2 # x1, y1, x2, y2, x3, y3, x4, y4 bbox_coords = [[20,…
user_12
  • 1,778
  • 7
  • 31
  • 72
4
votes
2 answers

What replaces scipy.misc.bytescale?

I am running old code using scipy 1.3.1 with the following import: from scipy.misc import bytescale with the following error: ImportError: cannot import name 'bytescale' I see that bytescale has been removed since 1.3 (source). The thread suggests…
Borealis
  • 8,044
  • 17
  • 64
  • 112
4
votes
1 answer

How to fill closed contour region with white

I'm trying to do a mask in cell image just with the ROI, so I applied the contours with OpenCV around the ROI but I've been struggling to get the region inside the contours. I want to have this region inside white and then discard the contours and…
4
votes
2 answers

from scipy.linalg import _fblas: ImportError: DLL load failed: The specified module could not be found

I did some changes on my Anaconda installation (I just uninstalled previous one, and installed a newer version). Now trying to run my code simply importing this: from skimage.measure import compare_ssim But it shows this error. How can I fix it?…
Tina J
  • 4,983
  • 13
  • 59
  • 125
4
votes
1 answer

Using skimage view_as_windows to make image patches and reconstruct patches

I want to extract color image patches from a 512x512 color image, and save them as individual image patches in a folder. How can I reconstruct my original image from these image patches? I have read and looked at afew of the similar questions and…
Kyr
  • 65
  • 1
  • 7
4
votes
0 answers

Confidence metric in the Hough transform: does one exist?

I am using the Hough Transform algorithm from scikit-image and Python to find the center of a crosshair. Overall this produces great results, but I need to quantify exactly how well the center of the crosshair has been found. The error propagation…
4
votes
4 answers

How to install scikit-image when the installation appears broken

I'm a newbie in Python, coming from R, and I'm not a programmer, so please be patient if my question is quite silly or trivial, but I cannot find a solution by myself. I'm using Python 3.7 in Spyder, in a Windows 10 machine. I'm following this…
s__
  • 9,270
  • 3
  • 27
  • 45
4
votes
3 answers

Read tiff tags in Python

I am trying to read the tags of a tiff file in Python. The file is RGB with uint16 values per channel. I am currently using tifffile: import tifffile img = tifffile.imread('file.tif') However, img is a numpy array, which only has pixel values. How…
Medical physicist
  • 2,510
  • 4
  • 34
  • 51
4
votes
0 answers

Scaling vertex coordinates of marching cubes algorithm output in skimage

I am trying to use skimage.measure.marching_cubes_lewiner to resolve some isosurface f(x,y,z)=0. In my case f is strongly nonlinear, and is best mapped when coordinates are given with logarithmic spacing. Because the marching cubes wants a regular…
4
votes
5 answers

AttributeError: module 'skimage.measure' has no attribute 'marching_cubes'

when I'm executing one of code that I found from the web it's given me "AttributeError: module 'skimage.measure' has no attribute 'marching_cubes'". Do you have any idea to fix this? Executed code segment: from skimage import measure def…
4
votes
2 answers

pytorch dataloader stucked if using opencv resize method

I can run all the cells of the tutorial notebook of Pytorch about dataloading (pytorch tutorial). But when I use OpenCV in place of Skimage to resize the image, the dataloader gets stuck, i.e nothing happens. In the Rescale class: class…
JMarc
  • 984
  • 1
  • 13
  • 21
4
votes
2 answers

Average colour of slic superpixel

I want to segment an image using slic superpixels and then replace the original colour of a superpixel with the average colour of said superpixel. import numpy as np import matplotlib.pyplot as plt from skimage import io from skimage.segmentation…
Steve Emman
  • 125
  • 10
4
votes
2 answers

Performing a reflective center pad on an image

This forum thread from an active Kaggle competition mentions something the author calls a "reflective center pad". Basically this is a transformation that takes the edges of the image and reflects them outwards, causing mirroring on the edges of the…
Aleksey Bilogur
  • 3,686
  • 3
  • 30
  • 57
4
votes
1 answer

Using Bivariate spline with scipy.ndimage.geometric_transform to register images

I am trying to align arrays (images). The arrays do not share homogeneous coordinates due to non-linear distortions and as such an affine transformation is not sufficient. Fortunately it is trivial to find coordinates of matching features between…
Jdog
  • 10,071
  • 4
  • 25
  • 42
4
votes
3 answers

Smooth a bumpy circle

I am detecting edges of round objects and am obtaining "bumpy" irregular edges. Is there away to smooth the edges so that I have a more uniform shape? For example, in the code below I generate a "bumpy" circle (left). Is there a smoothing or moving…
G_T
  • 1,555
  • 1
  • 18
  • 34