Hello,
My goal is to capture individual trees in the image attached (Original_Image) for both area calculation and counting. But, a problem is my functions do not separate overlapping trees so capture a group or cluster of trees (please see Image2). This is not good when counting the trees. I tried to use “WatershedComponents”, which did not work either. I wonder if there are Wolfram functionalities that separate brownish background colour from greenish and bluish objects and also separate and capture overlapping objects individually. I really appreciate some inputs. Thank you very much!
counting those trees appears not to be an easy task - even if one tries it by hand. So I guess an approximation is the best one can expect. Here is what I tried:
I separated the trees by its color - as before;
then I applied a SkeletonTransform, which I blured;
finally WatershedComponents seems to do the trick.
My result looks like:
I think one can see here at least a not unreasonable separation of single trees. My code:
What is left for you to do (in case you find this meaningful at all) is to count occurrend colors (except black) down to some minimal patch size. Maybe this might be an approach.
thank you very much for your heartening words! Although I do not regard the above as a very robust solution. Maybe somebody is coming up really with a clever idea …
thank you very much for your heartening words! Although I do not regard the above as a very robust solution. Maybe somebody is coming up really with a clever idea …