I have some SEM images on different zoom ratio. I want to determine zoom ratio on every image. I am trying to write a macro but I need help on this step. This is one of the SEM images that I have.
Original TIF image: download
I make rectangle and crop with this codes:
makeRectangle(549, 1065, 124, 37); run("Crop");
I obtain this image and save it:
Then I open other images one by one and crop exactly as above.
Later I use imageCalculator to compare them.
imageCalculator("Subtract create", "x.tif", "y.tif"); getStatistics(area, mean);
If mean = 0 then I understand that both images has same zoom ratio. This method is working very well on most images. But I have problem on some images. Zoom Ratio is not written exactly same place on every image. Sometimes it slides a little bit because of date time and other settings. And I obtain this cropped image:
As you guess it doesn’t return mean = 0.
What can I do for determining zoom ratio correctly?
By the way, this is the first step of a macro that has several steps and I have to make this automatically since I have too many images.