Author Topic: Croping a picture - how to update crop factor ?  (Read 198 times)

7tonin

  • Newbie
  • *
  • Posts: 7
Croping a picture - how to update crop factor ?
« on: February 28, 2021, 04:49:08 AM »
Hi,
a picture file is croped from ImageSize: 5152x2904 to ImageSize: 640x480
All metadata are copied, but how to update crop factor? field of view?


7tonin

  • Newbie
  • *
  • Posts: 7
Re: Croping a picture - how to update crop factor ?
« Reply #1 on: February 28, 2021, 04:58:31 PM »
I'm happy with this formula, which is the inverse ratio of the diagonals: ird = SQRT( ( 5152 ² + 2904 ² ) / ( 640 ² + 480 ² ) ) = 6.978...
Then read equivalent focal length
Code: [Select]
exiftool -FocalLengthIn35mmFormat filename.jpg
Focal Length In 35mm Format     : 150 mm

calculate 150 * ird = 150 * 6.978... = 1046.80...

Apply
Code: [Select]
exiftool -FocalLengthIn35mmFormat=1046.80 filename.jpg
Then -FOV (field of view) is updated, and maybe some others.

7tonin

  • Newbie
  • *
  • Posts: 7
Re: Croping a picture - how to update crop factor ?
« Reply #2 on: February 28, 2021, 05:20:18 PM »
The follogwing fields are updated (and maybe some others):
Code: [Select]
-FocalLengthIn35mmFormat
-ScaleFactor35efl
-CircleOfConfusion
-FOV
-FocalLength35efl
-HyperfocalDistance

fieldfromto
-FocalLengthIn35mmFormat150 mm1047 mm
-ScaleFactor35efl4.430.8
-CircleOfConfusion0.007 mm0.001 mm
-FOV13.7 deg2.0 deg
-FocalLength35efl34.0 mm (35 mm equivalent: 150.0 mm)34.0 mm (35 mm equivalent: 1047.0 mm)
-HyperfocalDistance60.62 m423.13 m

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 4854
Re: Croping a picture - how to update crop factor ?
« Reply #3 on: February 28, 2021, 08:07:38 PM »
You can check the Composite tags page to see what these tags are derived from.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

7tonin

  • Newbie
  • *
  • Posts: 7
Re: Croping a picture - how to update crop factor ?
« Reply #4 on: March 01, 2021, 06:48:03 AM »
Thank you very much !
By the way, I made a mistake in my ird value calculation. But my explaination is still ok.