8 Replies Latest reply on Sep 29, 2011 12:25 PM by Bruce Kirchoff

    Create a scale bar? Thoughts?

    alanterra Level 2

      Hi

       

      I was wondering if anyone has thought about the best way to create a scale bar for a photo, that is automatically the right size.

       

      My photos have an exif field "Subject Distance" which, along with the sensor size and the lens length, could be used to create a scale bar that can be put into a photo.

       

      I am uncertain whether it would be better to try to do this in Photoshop, or to build a frame in In Design. It would be really wonderful if I could figure out how to add the scale bar after I crop the image (since I have a lot of images already cropped), but that might be asking too much?

       

      Any thoughts before I explore all the blind alleys?

       

      FWIW, I am quite comfortable scripting in AppleScript, but have never tried the JavaScript abilities for Photoshop (a big learning curve, I would guess).

       

      Thanks

       

      Alan

        • 1. Re: Create a scale bar? Thoughts?
          c.pfaffenbichler Level 9

          I doubt that I could tackle the task, but could you post sample files?

          Best would be some test images of rulers, I guess, so that one can start from there, knowing the actual measurements.

          • 2. Re: Create a scale bar? Thoughts?
            Muppet Mark Level 5

             

            FWIW, I am quite comfortable scripting in AppleScript, but have never tried the JavaScript abilities for Photoshop (a big learning curve, I would guess).

             

            If you do quite a lot of scripting with Photoshop… Then its well worth learning the basics of JavaScript at the least… Action Manager code will at the very least quadruple what you can access and edit in images opened with Photoshop… Almost all the examples of this 'in use' are by users calling it from JavaScript/ExtendScript… Yup there's the usual learning curve as with all these subjects… but only you can decide if it warrants the effort or not… You will find plenty of examples of things that you just can't do using the regular object model…

            • 3. Re: Create a scale bar? Thoughts?
              Michael L Hale Level 5

              I researched this for a client. The good news is if you have Photoshop Extended it is easy for a script to set the scale and create a scale bar.

               

              The bad news is that although the idea that you can determine the subjects scale from the exif data may work in theory I could not use that info to determine the scale with any accuracy. If you are just working with one camera you may be able to come up with something using emprical data but I just don't think it is possible to create a general method that works for any camera.

               

              Another issue I found is some camera makers don't give accurate info on sensor size. Or that the full sensor is not used to create the image. Also in my test with a limited number of cameras most did not record the same subject distance I expected from where I had the lens focused.

               

              To me a scale bar implies accuracy so I dropped the project.

              1 person found this helpful
              • 4. Re: Create a scale bar? Thoughts?
                c.pfaffenbichler Level 9

                Also in my test with a limited number of cameras most did not record the same subject distance I expected from where I had the lens focused.

                Now that sounds discouraging.

                 

                May I ask what business that customer was in?

                Just curious because previous scale-matters usually seemed to be related to scientific/archeological purposes.

                • 5. Re: Create a scale bar? Thoughts?
                  Michael L Hale Level 5

                  It was scientific/academic. Something to do with plant research at a university.

                  • 6. Re: Create a scale bar? Thoughts?
                    alanterra Level 2

                    Thank you all for the advice. Yes, I will have to research accuracy before I embark on this, and given Michael's comments, perhaps I can't do it any way.

                     

                    Michael, can you easily explain what the difference is between Photoshop and Photoshop Extended that makes it easy? I don't have Extended, and but would consider springing for it if it makes my life easier (after testing, obviously).

                     

                    And, thanks for the encouragement Muppet Mark, I'll put this on the list of things that I want to do soon.

                     

                    A

                    • 7. Re: Create a scale bar? Thoughts?
                      Michael L Hale Level 5

                      The extended versions of Photoshop adds features that the standard version does not have. One of those is a new menu named 'Analysis'. That adds a few menuItems. Of intrest to this thread is 'Set Measurement Scale' and "Place Scale Marker'. Both of those can be access in scripting using the Action Manager. In fact Set Measurement Scale calls a script provided by Adobe named MeasurementScaleMarker.jsx.

                      1 person found this helpful
                      • 8. Re: Create a scale bar? Thoughts?
                        Bruce Kirchoff

                        Hi alanterra (et al.),

                         

                        It was Steve Baskauf at Vanderbilt who worked out a proposed method for putting scale bars automaically on photographs based on lens-to-object distance. This was part of our joint work on standarizing methods for photographing plants, methods that Steve pioneered. I have pased a link to his suggested method, below. It still needs to be thoroghly tested. I would appreciate your keeping me informed of how your work on this issue procceds. I am kirchoff(at)uncg.edu (Bruce Kirchoff).

                         

                        https://sites.google.com/site/liveplantimagegroup/handling-image-metadata/creating-scale-b ars-from-metadata