Improve camera identification #1948
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently the camera id is created by combining camera make, camera model, width, height, projection type, focal length. However, this is not enough to cover the case when there are two or more drones with the same model and the same capture settings, this can happen on a large survey project where one drone's battery is not enough to cover the whole survey. And if not separating data from multiple drones, a single camera model will be used to optimize across all the images, leading worse accuracy.
This PR tries to solve this issue by utilizing serial number exists mostly in the drone image metadata. It will attach the serial number at the end of the camera id. Since there could be multiple tags used to represent the serial number from different drone/camera maker, I don't have enough data to cover all the scenario, my implementation is explained below, please suggest and if any other way to read serial number is missing, let me know.
The serial number will be
unknownby default, then, when loading metadata, the following exif and xmp tags will be used with the priority in ascending order, camera/len serial number should always be preferred over drone/body serial number, as some drones allow to change sensors.EXIF BodySerialNumber,EXIF LensSerialNumber,@drone-dji:DroneSerialNumber,@drone-dji:CameraSerialNumber