I have made a macro script that takes an ROI and splits it into 3 parts and calculates the mean grey value per section. It also works through all the sub-directories in a folder. - macro attached. mean_grey_wing_thirds_multiFile.ijm (2.7 KB)
This is great but I has realised a potential issue. The photos I am using are of butterfly wings. AS the ROI is divided into 3 sections using a vertical line - this may result in different areas being selected if the wing is at a different angle.
For example compare the two images below.
The area selected in second image here represents more of the area I am looking for. However, as you can see the first image, due to the positioning of the wing is selecting a larger area.
Is there a way to either: 1) make the line used to divide the area follow the angle of the edge of the wing? Not the photo? OR 2) adapt my code so it is done on actual area of the wing?
I hope I have explained my problem in enough detail - let me know if I have missed anything. I attach the two original images to help in any problem solving.
Thank you so much for your help.