michaelorella / droppy

Contact angle image processing analysis
GNU General Public License v3.0
24 stars 9 forks source link

IndexError: index 0 is out of bounds for axis 0 with size 0 #3

Open dlinUBC opened 2 years ago

dlinUBC commented 2 years ago

Error occurs in Line 80 of imageanalysis.py within auto_crop: if np.abs(angles[0]) < 80/180*np.pi:

This occurs with when running droppy.main(['filename', '--fitType', 'bashforth-adams']) as in the documentation.

Seems like hough_line_peaks(*hough_line(edges), num_peaks=1) of line 79 is producing an empty angles array.

Attached is the image being used: LOW_RES_2021_12_01_14_25_49_ptfe_tape

In the case this is a usage error, are there any image requirements like resolution, contrast, relative droplet size, droplet position, etc.? This image is already cropped from an image at too high a resolution for the hough_transform functions to work with.

aatird commented 7 months ago

The problem lies with a newer version of scikit-image. Installing scikit-image 0.18.3 worked perfectly fine for me.

All the best,

Ingo