I am new to ImageJ and am currently trying to use the macro functionnality to automaticaly detect the thickness of a plate measured under a microscope (=the thickness of the dark part).
I currently am following this to get the length:
-detect edges using canny Edge (using the function FeatureJ Edges). Filtering, Thresholding and Thinning of edges applied in this function
-Use hough transform to find the lines (function “Find Straight Lines” from Burger&Burge).
I end up with an ok solution as you can see here under (purple lines are detected edges) but I still have issues:
- the edge on the left is seldom correctly detected: rather than finding the edge of the black part, it detects the edge of the gray part.
-I am applying quite a high gauss filter and thresholding to remove all the unwanted edges that are found on the image usind Canny. I am unsure if this is not detrimental to the robustness of the method
My question would be if there is a better flow to measure the thickness of such a part? Thresholding before running edge detection for instance? Or is this the correct way to proceed and I need to find correct values for the smoothing filter and threshold values?
Any suggestion would be highly appreciated