MATLAB: How can i differentiate image as tree, herb and shrubs in matlab

color segmentationImage Processing Toolboxleafusing any image processing algorithm

please provide code for this

Best Answer

You cannot do it with MATLAB.
The task requires close examination of the tissues to determine the portion of lignin to distinguish herbs, such as distinguishing palm (a tree) from banana (a similar looking plant that is an herb.)
Shrubs are "distinguished from trees by their multiple stems and shorter height, and are usually under 6 m (20 ft) tall" according to wikipedia. But Lilac https://en.wikipedia.org/wiki/Syringa_vulgaris is considered a shrub even though it is commonly 6m to 7m, because it will certainly grow up additional stems.
I have a Double Flowering Plum, which branches out close to the ground (but above ground) and so could be considered either a shrub or a tree; Wikipedia calls it "shrubby" rather than saying it is a shrub, and says it could be a tree.
I have a fair-sized apple (about 5m tall), which almost everyone would say is a tree. But every year it sends up one or two shoots and tries to grow them (but gives up when we accidentally mow them.) Sending up shoots like that is a shrub behavior.
Quaking Aspen is considered a tree. But it spreads by sending up shoots, creating large clonal groves, which is a shrub behavior.
You have to know a lot about botany to distinguish between herbs and trees and shrubs, and you are not going to be able to do so by image alone.
Related Question