Author Topic: How to translate real drone camera specs to CoronaCamera?  (Read 1442 times)

2022-09-05, 14:47:09

juninholiveira

  • Active Users
  • **
  • Posts: 15
    • View Profile
Hello guys. I'm trying to do some matching with real drone footage, but before trying to do the alignment, I want to match the CoronaCamera sensor and lens settings to the real camera, which I already have the specs. It's the following:

DJI Mavic Pro
  • Sensor   1/2.3” (CMOS), Effective pixels:12.35 M (Total pixels:12.71M)
  • Lens   FOV 78.8° 26 mm (35 mm format equivalent) f/2.2
  • Distortion < 1.5% Focus from 0.5 m to ∞
  • ISO Range   video: 100-3200
  • photo: 100-1600
  • Electronic Shutter Speed   8s -1/8000 s
  • Image Size   4000×3000

In 3DS Max we have thos options for the CoronaCamera:

Field of View OR Focal Length [mm]
Film Width [mm]
Zoom Factor
ISO
F-Stop

How should I translate those camera specs to my CoronaCamera. Other thing, I can do a predefined Lens Correction in photoshop. Should I do it before the matching?

2022-09-05, 16:49:43
Reply #1

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
This seems to be a 6.4 x 4.8 mms sensor, so it's 6.4 mms for film width. When you use 26mm as focal width it should produce the given fov.
However, if you want to be on the safe side use 78.8 degs for fov instead of focal width since this is what the lens effectively sees.

As for matching... not sure but I guess matching apps should be able to use exif data correctly nowadays and have a lens database to correct for any distortion. In any case, don't use Photoshop's correction, it crops images (changing the effective fov) and produces wrong results if the lens is not included in their database. I would go without any lens correction and only try if the match is obviously wrong.

2022-09-05, 20:21:42
Reply #2

juninholiveira

  • Active Users
  • **
  • Posts: 15
    • View Profile
This seems to be a 6.4 x 4.8 mms sensor, so it's 6.4 mms for film width. When you use 26mm as focal width it should produce the given fov.
However, if you want to be on the safe side use 78.8 degs for fov instead of focal width since this is what the lens effectively sees.

As for matching... not sure but I guess matching apps should be able to use exif data correctly nowadays and have a lens database to correct for any distortion. In any case, don't use Photoshop's correction, it crops images (changing the effective fov) and produces wrong results if the lens is not included in their database. I would go without any lens correction and only try if the match is obviously wrong.

Thank you! Well, so now I know that this 1/2.3" sensor should go into the Filmd Width slot. But I still don't understand the relation of it with the other values (FOV and Focal Length). At first, I inserted the 78.8° in the FOV of my CoronaCamera, like the drone specs told me, but the matching was wrong. So with a little help of the Perspective Match tool in 3DS Max I was able to get a very good matching. But the surprise is that the resulting FOV was around 65°.

But then I inserted the Filmd Width of 6.4mm like you told, based on the sensor. I know this will only affect the DoF, not the projection, so it makes no difference for me now, but somehow, when I modify the Film Width with my FOV selected and setted, the greyed out Focal Length changes to around 5mm. I don't understando very well the relation between those values, how one affects the others. And if I'm using the FOV option, the greyed out Focal Length has no influence in the camera, right?

If you can point me to some docs or tutorials that explain this better, I would appreciete. Been getting a lot of jobs lately that require real footage matching, for stills and animations.

2022-09-06, 11:06:45
Reply #3

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
I answered your post yesterday without trying the values in Max and you're right, they're producing confusing results...

From my knowledge, using the FOV should give you a match as this is the deciding factor of what area the lens actually sees, with whatever values you use for focal length and sensor size. With a different sensor size your DOF result will not be able to match, though. But, as this is a wide lens, DOF will be deep throughout almost all distances, blurriness will be negligible.

This may be a different lens design... then again they are stating that its 26mm are 35mm equivalent. I'm confused, too.

A note on the Perspective Match tool - watch out for its side effects: it sometimes (always?) produces non-uniformly scaled cameras to match the source, this might be a problem in rendering and other post prod matching tools you might want to use (such as exporting camera to AE etc).

When you use the Perspective Match tool, what do you get for focal length / fov on the camera the tool creates?

2022-09-06, 12:24:39
Reply #4

Juraj

  • Active Users
  • **
  • Posts: 4743
    • View Profile
    • studio website
There is problem with nomenclature being incompletely used in photography (and CGI) field. It's almost never specified if they talk about Horizontal or Diagonal FOV.

But, we also know:

1) Camera&Lens companies almost always advertise diagonal FOV. It's simply bigger number ;- ).
2) 3dsMax for some reason implement Horizontal FOV (and CoronaCam likewise thus).

We also know majority of devices never use the full sensor width, so ignore the specified 1/2.2 nonsense. It can just as well crop to 1/2.5 physically or software side. But the FOV is probably accurate before distortion correction. (which can automatically be applied and baked into file format of said device).

Since DJI crop to 4:3 ratio, 79 DEG diagonally, corresponds to +/- 67 DEG horizontally. So your 3dsMax camera match got it pretty good :- ).

Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2022-09-06, 15:11:22
Reply #5

pokoy

  • Active Users
  • **
  • Posts: 1850
    • View Profile
Well that could be the reason. Didn't think about that... thanks Juraj for chiming in.

2022-09-23, 01:45:02
Reply #6

DPS

  • Active Users
  • **
  • Posts: 118
    • View Profile
I've found for camera matching, the best way to get the specs from photos is to use exiftool. https://exiftool.org/

Drag a raw file onto the software icon and it gives you heaps of hidden metadata including the (horizontal) FOV.

And FYI if you're ever given a focal length that says 35mm equivalent, then you can leave your 3DS Max Film width at it's default 36mm. (the 35mm equivalent refers to the vertical dimension of film including the border, but it's still 36mm wide - a little confusing).
There's a big caveat though - if the photo was taken in Portrait, then whilst the focal length obviously remains the same, the film width in Max needs to be changed to 24mm (as the 35mm equivalent Full frame sensor is 36x24mm, so if you rotate the camera 90 degrees then (in Max) 24mm becomes the horizontal width of the sensor).

Example (from Mavic 3 I think?):

ExifTool Version Number         : 10.29
File Name                       : PANO0001.DNG
Directory                       : F:/2203-001
File Size                       : 41 MB
File Modification Date/Time     : 2022:06:08 16:10:45+10:00
File Access Date/Time           : 2022:06:08 19:37:49+10:00
File Creation Date/Time         : 2022:06:08 19:37:49+10:00
File Permissions                : rw-rw-rw-
File Type                       : DNG
File Type Extension             : dng
MIME Type                       : image/x-adobe-dng
Exif Byte Order                 : Little-endian (Intel, II)
Make                            : Hasselblad
Camera Model Name               : L2D-20c
Orientation                     : Horizontal (normal)
Software                        : 10.21.51.34
Modify Date                     : 2022:06:08 08:39:42
Image Width                     : 5376
Image Height                    : 3956
Bits Per Sample                 : 16
Compression                     : Uncompressed
Photometric Interpretation      : Color Filter Array
Strip Offsets                   : 829952
Samples Per Pixel               : 1
Rows Per Strip                  : 3956
Strip Byte Counts               : 42534912
Planar Configuration            : Chunky
CFA Repeat Pattern Dim          : 2 2
CFA Pattern 2                   : 0 1 1 2
CFA Plane Color                 : Red,Green,Blue
CFA Layout                      : Rectangular
Black Level Repeat Dim          : 2 2
Black Level                     : 4096 4096 4096 4096
White Level                     : 65472
Default Scale                   : 1 1
Default Crop Origin             : 4 4
Default Crop Size               : 5272 3948
Bayer Green Split               : 0
Anti Alias Strength             : 1
Best Quality Scale              : 1
Active Area                     : 0 0 3956 5280
Opcode List 3                   : (Binary data 12564 bytes, use -b option to extract)
Default User Crop               : 0 0 1 1
Subfile Type                    : Reduced-resolution image
Preview Image Start             : 100864
Preview Image Length            : 728612
Y Cb Cr Coefficients            : 0.299 0.587 0.114
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Y Cb Cr Positioning             : Co-sited
Reference Black White           : 0 255 128 255 128 255
About                           : DJI Meta Data
Format                          : image/dng
Gps Status                      : Invalid
Altitude Type                   : GpsFusionAlt
Gps Latitude                    : -27.500423052
Gps Longitude                   : +152.977122224
Absolute Altitude               : +10.851
Relative Altitude               : +25.400
Gimbal Roll Degree              : +0.00
Gimbal Yaw Degree               : -73.20
Gimbal Pitch Degree             : -1.60
Flight Roll Degree              : -2.80
Flight Yaw Degree               : -53.10
Flight Pitch Degree             : -0.40
Flight X Speed                  : 0.0
Flight Y Speed                  : 0.0
Flight Z Speed                  : 0.0
Cam Reverse                     : 0
Gimbal Reverse                  : 0
Self Data                       :
Version                         : 7.0
Has Settings                    : False
Has Crop                        : False
Already Applied                 : False
Exposure Time                   : 1/1000
F Number                        : 2.8
Exposure Program                : Program AE
ISO                             : 100
Sensitivity Type                : Recommended Exposure Index
Exif Version                    : 0230
Date/Time Original              : 2022:06:08 08:39:42
Create Date                     : 2022:06:08 08:39:42
Shutter Speed Value             : 1/1000
Aperture Value                  : 2.8
Exposure Compensation           : +0.7
Max Aperture Value              : 2.8
Subject Distance                : 0 m
Metering Mode                   : Average
Light Source                    : Unknown
Flash                           : No Flash
Focal Length                    : 12.3 mm
File Source                     : Digital Camera
Scene Type                      : Directly photographed
Custom Rendered                 : Normal
Exposure Mode                   : Auto
White Balance                   : Manual
Digital Zoom Ratio              : 1
Focal Length In 35mm Format     : 24 mm
Scene Capture Type              : Standard
Gain Control                    : None
Contrast                        : Normal
Saturation                      : Normal
Sharpness                       : Normal
Serial Number                   : 493OJAC7AA05VA
Lens Info                       : 24mm f/2.8-11
GPS Version ID                  : 2.3.0.0
GPS Latitude Ref                : South
GPS Longitude Ref               : East
GPS Altitude Ref                : Above Sea Level
GPS Status                      : Measurement Void
GPS Map Datum                   : WGS-84
XP Comment                      : 0.9.142
XP Keywords                     : pano_original
DNG Version                     : 1.4.0.0
DNG Backward Version            : 1.3.0.0
Unique Camera Model             : Hasselblad L2D-20c
Color Matrix 1                  : 1.3364 -0.8291 0.123 -0.3009 1.1905 0.3937 0.0446 -0.0215 0.8437
Color Matrix 2                  : 0.8575 -0.3219 -0.0868 -0.3351 1.1451 0.1593 0.0207 0.0468 0.4876
Analog Balance                  : 1 1 1
As Shot Neutral                 : 0.4284967047 1 0.5445360277
Baseline Exposure               : 0.01
Baseline Noise                  : 1
Baseline Sharpness              : 1
Linear Response Limit           : 1
Camera Serial Number            : 493OJAC7AA05VA
Shadow Scale                    : 1
DNG Private Data                : (Binary data 47904 bytes, use -b option to extract)
Calibration Illuminant 1        : Standard Light A
Calibration Illuminant 2        : D65
Profile Name                    : Embedded
Profile Hue Sat Map Dims        : 18 6 1
Profile Hue Sat Map Data 1      : (Binary data 3700 bytes, use -b option to extract)
Profile Hue Sat Map Data 2      : (Binary data 3692 bytes, use -b option to extract)
Profile Tone Curve              : (Binary data 4544 bytes, use -b option to extract)
Profile Embed Policy            : Allow Copying
Noise Profile                   : 5.88172456e-005 3.241287029e-008
Original Default Final Size     : 0 0
Original Best Quality Size      : 0 0
Original Default Crop Size      : 0 0
Aperture                        : 2.8
CFA Pattern                     : [Red,Green][Green,Blue]
GPS Altitude                    : 10.8 m Above Sea Level
GPS Latitude                    : 27 deg 30' 1.52" S
GPS Longitude                   : 152 deg 58' 37.64" E
GPS Position                    : 27 deg 30' 1.52" S, 152 deg 58' 37.64" E
Image Size                      : 5376x3956
Megapixels                      : 21.3
Preview Image                   : (Binary data 728612 bytes, use -b option to extract)
Scale Factor To 35 mm Equivalent: 2.0
Shutter Speed                   : 1/1000
Circle Of Confusion             : 0.015 mm
Field Of View                   : 73.7 deg
Focal Length                    : 12.3 mm (35 mm equivalent: 24.0 mm)
Hyperfocal Distance             : 3.51 m
Light Value                     : 12.9
-- press RETURN --
Specs: AMD 1950X, Aorus Gaming 7 x399, 64GB RAM, 1080ti. Win10, Max 2017, Corona 1.7.3