Automate the Angle Measurement Tool

Hi everyone. I have a project that requires me to calculate the angles of the grains of a magnet (on the picture below, this area is the grey area) using Imagej. I have several images to analyse. I figured that it would be quite cumbersome to measure the angles using the Angle Tool on the Imagej tool bar.

I have tried recording a Macro, but the Macro only gives me the angle of an image at that particular dimension the Macro was recorded at. Please is there a way that I could automatically achieve this measurement?

A glimpse of the image to be analysed is shown below. The angle I am trying to measure is the angle between two adjacent grains.


If you can define an object, you can get that object’s angle relative to the horizontal using the Feret angle. Not 100% sure that is what you are asking for, but it can be done in ImageJ.
See Feret here

Thank you @Research_Associate. I have the Feret’s angle but that is not what is required of me. The required angle is the angle between the grains or the angle between two circles that are adjacent to one another.