I can accurately measure the diameter of dark-colored filaments, but I can’t detect the diameter of light-colored filaments. How can I fix this?
Hi, you can use different color tracking thresholds for the lighter filament, or you can do edge detection methods to show the edge of the wire. See the find_line_segments() or adaptive thresholding values of things like the mean/median filter.
E.g.
kernel = [-1, -1, -1,
-1, 8, -1,
-1, -1, -1]
img.morph(1, kernel)
