OpenDroneMap / NodeMICMAC

A Lightweight REST API to Access MICMAC Photogrammetry and SFM Engine.
https://opendronemap.org/nodemicmac/
GNU General Public License v3.0
80 stars 22 forks source link

Error processing odm_data_aukerman dataset #15

Closed endast closed 5 years ago

endast commented 5 years ago

When trying to process the Aukerman data set from odm (https://github.com/OpenDroneMap/odm_data_aukerman)

I get the following error:


[DEBUG] Found GEOS DLL: , using it.
[DEBUG] Trying `CDLL(libc.so.6)`
[DEBUG] Library path: 'libc.so.6'
[DEBUG] DLL: 
[INFO] Initializing NodeMICMAC app - Tue May 21 04:08:38 2019
[INFO] Namespace(camera_cloud=False, image_footprint=False, images=None, matcher_distance=None, max_concurrency=7, multi_scale=False, name='076e5c5a-49af-4264-9117-6720f8eeec9d', project_path='/var/www/data', resize_to=1600, zoom=2)
[INFO] Starting..
[DEBUG] running exiftool -filename -gpslongitude -gpslatitude -gpsaltitude -T -n *.JPG > imageEXIF.txt
[INFO] UTM - 17
[INFO] Hemisphere - north
[INFO] JPG
[INFO] {'utm_zone': 17, 'hemisphere': 'north'}
[DEBUG] running mm3d XifGps2Txt .*.JPG
".*.JPG": 7 matches.
WARN !! , for camera DSC-WX220 cannot determine focale equiv-35mm
add it in include/XML_User/DicoCamera.xml
DSC00305.JPG : WGS84(rad) [-1.42685,0.720893,342.815] GeoC [688342,-4.74899e+06,4.18808e+06]
DSC00306.JPG : WGS84(rad) [-1.42685,0.720887,340.419] GeoC [688376,-4.74902e+06,4.18805e+06]
DSC00307.JPG : WGS84(rad) [-1.42684,0.72089,341.13] GeoC [688409,-4.749e+06,4.18806e+06]
DSC00308.JPG : WGS84(rad) [-1.42685,0.72089,338.915] GeoC [688368,-4.749e+06,4.18806e+06]
DSC00309.JPG : WGS84(rad) [-1.42685,0.720889,340.609] GeoC [688370,-4.74901e+06,4.18806e+06]
DSC00310.JPG : WGS84(rad) [-1.42686,0.720889,341.411] GeoC [688331,-4.74901e+06,4.18806e+06]
DSC00311.JPG : WGS84(rad) [-1.42687,0.72089,342.679] GeoC [688289,-4.74902e+06,4.18807e+06]
"GpsCoordinatesFromExif.txt": 1 matches.
[DEBUG] running mm3d XifGps2Xml .*.JPG RAWGNSS
".*.JPG": 7 matches.
WARN !! , for camera DSC-WX220 cannot determine focale equiv-35mm
add it in include/XML_User/DicoCamera.xml
DSC00305.JPG : WGS84(rad) [-1.42685,0.720893,342.815] GeoC [688342,-4.74899e+06,4.18808e+06]
DSC00306.JPG : WGS84(rad) [-1.42685,0.720887,340.419] GeoC [688376,-4.74902e+06,4.18805e+06]
DSC00307.JPG : WGS84(rad) [-1.42684,0.72089,341.13] GeoC [688409,-4.749e+06,4.18806e+06]
DSC00308.JPG : WGS84(rad) [-1.42685,0.72089,338.915] GeoC [688368,-4.749e+06,4.18806e+06]
DSC00309.JPG : WGS84(rad) [-1.42685,0.720889,340.609] GeoC [688370,-4.74901e+06,4.18806e+06]
DSC00310.JPG : WGS84(rad) [-1.42686,0.720889,341.411] GeoC [688331,-4.74901e+06,4.18806e+06]
DSC00311.JPG : WGS84(rad) [-1.42687,0.72089,342.679] GeoC [688289,-4.74902e+06,4.18807e+06]
[INFO] Image pairs by auto-distance
[DEBUG] running mm3d OriConvert "#F=N X Y Z" GpsCoordinatesFromExif.txt RAWGNSS_N ChSys=DegreeWGS84@RTLFromExif.xml MTD1=1 NameCple=dronemapperPair.xml DN=
Comment=[#]
Format=[N X Y Z]
WARN !! , for camera DSC-WX220 cannot determine focale equiv-35mm
add it in include/XML_User/DicoCamera.xml
------------------------------------------------------------
| Sorry, the following FATAL ERROR happened
|
| cMetaDataPhoto::Foc35 UnInit
|
------------------------------------------------------------
-------------------------------------------------------------
| (Elise's) LOCATION :
|
| Error was detected
| at line : 992
| of file : /var/www/micmac/src/util/dates.cpp
-------------------------------------------------------------
Bye (press enter)```
dronemapper-io commented 5 years ago

This error means that the EXIF metadata in each image doesn't have the appropriate tags in order for the software to determine the CCD sensor size in mm. In other words, make sure the FocalLength and 35mm FocalLength tags are set properly.. or if you'd like to send me the CCD sensor size width and height in mm I'll add this to the camera sensor database --- it should then automatically be detected. Thanks

smathermather commented 5 years ago

This is a from a Sony wx220: https://www.sony.com/electronics/cyber-shot-compact-cameras/dsc-wx220/specifications

6.17 x 4.55 mm is the sensor size.

dronemapper-io commented 5 years ago

Thanks. I will add to the camera database and figure out a more elegant solution to adding sensors without the proper EXIF metadata. I'll push an update tomorrow

kikislater commented 5 years ago

This camera is common and already discuss in MicMac forum. It needs to be like this :

<CameraEntry>
<Name>DSC-WX220</Name>
<SzCaptMm>  6.17  4.55 </SzCaptMm>
<ShortName>WX220</ShortName>
</CameraEntry>

Dji's users will have same problem. IMO if you add this ebee camera, you'll have to add more camera like we have in other opensource project : Tower, QGroundControl or Mission Planner for flight planning, Add Dji Camera ... But I think it was discuss previously in NodeODM.

Workaround without writing in DicoCamera.xml is to set exif with MicMac command. Example : mm3d SetExif ".*JPG" F=4.5724 F35=25.6 Cam="DSC-WX220" https://micmac.ensg.eu/index.php/SetExif

Another alternative is to write camera in MicMac-LocalChantierDescripteur.xml instead of DicoCamera.xml. Look also what they do in desktop python GUI here : https://github.com/micmacIGN/InterfaceCEREMA

dronemapper-io commented 5 years ago

Thanks for the additional detail and it is correct -- except for the DJI part -- most DJI sensors have all the required EXIF metadata for MicMac to automatically compute the CCD sensor size. I think the best option will be to add command line parameters and option to allow the user to pass the CCD width / height in millimeters and generate the MicMac-LocalChantierDescripteur.xml accordingly.

kikislater commented 5 years ago

Ok didn't know about Dji. It just miss 35mm equivalent in WX220, okay ! Good approach for update in XML I think and could be usefull if dataset have multiple camera model (it's common for 3d modelling : drone like phantom 4 + a6000 for example)

dronemapper-io commented 5 years ago

This PR addresses and fixes the issue. https://github.com/dronemapper-io/NodeMICMAC/commit/52add4e399324e1ac23e10085becd3c5418f39d4

--ccd-width 6.17 and --ccd-height 4.55 options now available. Generates MicMac-LocalChantierDescripteur.xml

Supporting multiple cameras and 3d models would be a future enhancement/feature.

odm_data_aukerman via NodeMICMAC:

image

Thanks