I am trying to create a macro to analyze a set of experiments that will produce results that should look like the colored drawing attached to this post.
The overall goal of the macro is to determine what percentage of the pink area falls in each brown selection.
I would like the macro to automatically set the scale by first finding the center of mass of the two blue and green dots on the left side of the photo. Then it should create a line from one center of mass to the other that will be used to set the scale (as the resulting line should be ~1inch).
Then, I was thinking that the macro would use the brown lines to make an inverted mask to divide up the pink sections. Finally, the macro would then somehow measure the areas of each of the now separated section.
I have been trying to record a macro for a while but keep getting stuck because I don’t know how to pull center of mass data from the measurement window and put them back into the macro to create a line.
Someone please help!