I want to detect leaf shape by line tracing.
Show older comments
Hi, I am trying to mask leaf shapes using Matlab.
I reached to the stage where I can detect the difference between leaf / non-leaf by pixel (as you can see in the figure),
but I can't find a way to mask the whole leaf area.
Yes - the masking isn't perfectly done - but this is the best masking I can do right now.
The concept I am thinking about is making a leaf figure by line tracing, and masking the whole pixel inside the lines.
I've tried several ways, but can't find a way to mask the leaf.
(if possible, I want to divide three leaves in seperate masking - but if not, adding a straight line between the leaves is also possible.)
openfig Q;
2 Comments
I don't really understand the difference between,
"detect the difference between leaf / non-leaf by pixel "
and
"mask the whole leaf area"
The very definition of a mask is an image that shows the difference between one region and another, which you clearly have created because that's what your figure shows.
Aside from that, it is not clear what help you are looking for. You have shown us no code or input data for us to recommend changes to.
Argon
on 28 Feb 2025
Accepted Answer
More Answers (0)
Categories
Find more on Color Segmentation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
