OpenScanEu / OpenScan

All you need to build your 3D Scanner
732 stars 53 forks source link

Add EXIF metadata serialNumber based on #scanRun or based on hashed settings #4

Open ExtReMLapin opened 4 years ago

ExtReMLapin commented 4 years ago

For example, Meshroom uses the serial number in the EXIF informations to detect if two identical cameras (same model) were used in one scene.

I guess it's used by Meshroom/Alicevision to prevent any confusion with a set of pictures that differs from the rest, it's later maybe applying a less strict matching algorithm to merge the sets from the two cameras.

Applying a serial number from the run ID of the scan could be really simple, but it could maybe lead to issues if you do a very short complementary scan (with only 10 pictures of a specific angle, for example), meshroom could refuse to merge it, maybe.

Applying a serial number based on a hash of the camera settings could be a better alternative.

You can either choose to specify the cameraBody serial number of the cameraLens serial number.

Based on aliceVision sourcecode : https://github.com/alicevision/AliceVision/blob/5eadcfab5c291e238edc61bb23c309202fc63668/src/aliceVision/sfmData/View.hpp#L290 https://github.com/alicevision/AliceVision/blob/5eadcfab5c291e238edc61bb23c309202fc63668/src/aliceVision/sfmData/View.hpp#L299

here are the possible strings you could write to in the exif metadata :