0

The scikit-image processing example code for circular and elliptical hough transformations and ellipse detection identifies ellipses in an image (link: scikit example code). However, the example only allows me to run the code on images from the scikit data directory. I cannot run the code on a local image.

I have tried merging the path to my local file with the path to the scikit data directory using os.path.join(). This does not seem to be working.

Any suggestions for how to run this example ellipse detection code on a locally stored image?

1 Answers1

0

Try the below code to read image and convert to grey:


from skimage.io import imread
from skimage.color import rgb2grey
image = imread("<full path to image>")
image = rgb2grey(image)
edges = canny(image, sigma=3, low_threshold=10, high_threshold=50)

Suman
  • 354
  • 3
  • 10