What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Is Automated Scale Marker Possible


CottonGargoyle

New Member
Messages
2
Likes
0
I would like to place a scale marker on my photos (fabric pictures). I can do it manually by using set measurement scale, but since I have hundreds of photos all taken using different focal lengths and camera distances I was wondering if there is a way to automate the process using the photo's EXIF data. Any help appreciated. Thanks!
 
Hi @CottonGargoyle
I am not sure I understand exactly what you want on the "scale" yet I will assume that "scale" yet will assume you want something similar to an inch ruler/scale to be added as an overlay to the images using existing EXIF information. My comments below will be based on the assumption above. I will also assume that no one has already manually entered any metadata into the EXIF that provides that information other than what the camera provides.

To get an accurate measurement several things would need to have occurred and be available.
- the distance from the camera lens to the subject material would need to be in the EXIF. That could be supplied by the focus distance to the material yet there are two issues a) not all cameras supply the focus distance to the subject and it also requires that the focus point was taken correctly (i.e. the focus point is not in front of or behind the material)
- If there is accurate focus to the subject and that focus distance is provided by the camera in the EXIF, then a rough scaling could be done based on the focal lenght of the lens and the size of the the camera sensor. I say rough because the angle of view of a lens even with a fixed local length lens is not constant. The angle of view can change a bit as you focus from infinity to much closer. There are equations to handle a simple lens situation. However, most lenses (and expecially zoom lenses) are made up of many elements which can move relative to each other making the exact angle of view more specific to a lens.

So if your camera(s) save the focus point in the EXIF, your focus was spot on to the subject, you have not already cropped the image, and you are OK with a not exact result, it could be done probably via scripting for a not perfect accuracy scale.

However, if you need very goog accuracy on the scale, it would be more difficult.
Just my thoughts/opinion
John Wheeler
 
Hi @CottonGargoyle
I am not sure I understand exactly what you want on the "scale" yet I will assume that "scale" yet will assume you want something similar to an inch ruler/scale to be added as an overlay to the images using existing EXIF information. My comments below will be based on the assumption above. I will also assume that no one has already manually entered any metadata into the EXIF that provides that information other than what the camera provides.

To get an accurate measurement several things would need to have occurred and be available.
- the distance from the camera lens to the subject material would need to be in the EXIF. That could be supplied by the focus distance to the material yet there are two issues a) not all cameras supply the focus distance to the subject and it also requires that the focus point was taken correctly (i.e. the focus point is not in front of or behind the material)
- If there is accurate focus to the subject and that focus distance is provided by the camera in the EXIF, then a rough scaling could be done based on the focal lenght of the lens and the size of the the camera sensor. I say rough because the angle of view of a lens even with a fixed local length lens is not constant. The angle of view can change a bit as you focus from infinity to much closer. There are equations to handle a simple lens situation. However, most lenses (and expecially zoom lenses) are made up of many elements which can move relative to each other making the exact angle of view more specific to a lens.

So if your camera(s) save the focus point in the EXIF, your focus was spot on to the subject, you have not already cropped the image, and you are OK with a not exact result, it could be done probably via scripting for a not perfect accuracy scale.

However, if you need very goog accuracy on the scale, it would be more difficult.
Just my thoughts/opinion
John Wheeler

Hi, Thanks for the info .. I suspected as much but wasn't certain that could be accomplished by scripting since I am new to Photoshop. To clarify I simply wanted the default scale marker that you get under "image"/"analysis"/"Place Scale marker"
 
Hi @CottonGargoyle
My understanding that the default settings will give you a pixel marker of a user specified length with or without text and choice of font and font size as per the image below.
Custom settings also allow it to be in any scale you desire.

If you want the scale to be an arbitrary fixed number of pixels, then you don't have to involve EXIF and just just an Action to put in a fix pixel length with the Scale marker

If you want the scale/bar to represent some particular length we still have the issues that I mention in my first reply. One must know or calculate that X pixels is equal to how many inches (or other dimension).

So it is still a bit unclear to me what length the bar is to represent and I already covered if you wanted have this calculated from EXIF data then this would need to be done via scripting I believe.
Just trying to figure out what you need in case there is an easier solution.
Other forum members may jump in and help as well.
John Wheeler
 

Back
Top