Issues with morphological closing of a binary image?
Show older comments
Hello!
I am currently performing analysis of some images. I had recorded a macro on ImageJ that was able to correctly threshold the input image, as shown below:

For various reasons, I would like to transfer the whole process to Matlab, however, when I try to apply the same procedures I used on ImageJ to Matlab, the image is not correctly thresholded.
The procedure I used in ImageJ was:
run("8-bit");
run("Auto Threshold", "method=Otsu");
run("Morphological Filters", "operation=Closing element=Square radius=10");
The issues I am experiencing with Matlab, is that the Morphological Filtering, closing with a square of size 10 is not effective in filling in the white area left by the light shining on the top of the picture ( I used imclose(), with different structural elements and tried varying the size as well). Does anyone have any idea of why this is happening?
I attached the code and the image.
Thanks!
2 Comments
Image Analyst
on 9 Nov 2021
I'm not sure if you think there's a problem with the thresholding or the closing. But you did not include your thresholding function. Also, your image doesn't seem to come up when I click on it in Firefox. I think it's corrupted. Can you attach the original color image again with either the frame icon or the paperclip icon, or both?
Francesca Perin
on 9 Nov 2021
Accepted Answer
More Answers (0)
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
