DataLab-Platform / DataLab

Open-source Platform for Scientific and Technical Data Processing and Visualization
https://datalab-platform.com
BSD 3-Clause "New" or "Revised" License
39 stars 4 forks source link

Contour detection: unexpected results outside ROI #34

Closed PierreRaybaut closed 8 months ago

PierreRaybaut commented 8 months ago

In DataLab, the "Computing > Contour detection" feature is based on scikit-image skimage.measure.find_contours as described in this tutorial.

image

When performing a contour detection on a ROI (which is a NumPy masked array in DataLab's model), some results still appear outside the ROI and should be ignored:

image

This issue is related to Issue #32.

PierreRaybaut commented 8 months ago

Now, thanks a workaround, the erroneous contours are filtered out.

A new test module cdl.tests.features.images.contour_fabryperot_app has been added to test the contour detection feature on a Fabry-Perot image (thanks to @emarin2642 for the contribution)

image

PierreRaybaut commented 8 months ago

I've just opened an issue on scikit-image GitHub project, in case it's relevant: https://github.com/scikit-image/scikit-image/issues/7300