OpenDroneMap / NodeMICMAC

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

An orthophoto could not be generated. To generate one, make sure GPS information is embedded in the EXIF tags of your images, or use Ground Control Points (GCP) file #41

Closed skywalkerisnull closed 2 years ago

skywalkerisnull commented 4 years ago

As the title says, I am getting this error:

An orthophoto could not be generated. To generate one, make sure GPS information is embedded in the EXIF tags of your images, or use a Ground Control Points (GCP) file.

All images are from a DJI Mavic 2 Pro, no modifications to the images have been done, they are straight out of the drone and into MicMac ODM.

This is running on the docker image with Digest ID: 82fea8cf501f

I have tried manually adding in the sensor size, different resizing resolutions (1000, 800, 500) and multiple data sets. These image process to an ortho in the ODM standard node.

Here is the full console log: https://gist.github.com/skywalkerisnull/8a0fcab6548454afce9b3e6c65dfab95

And the extract of the last sections of it:

[DEBUG]   running mm3d CenterBascule .*.JPG RadialStd RAWGNSS_N Ground_Init_RTL
BEGIN Pre-compile
DI -1Ray 2.27632e+28
------------------------------------------------------------
|   Sorry, the following FATAL ERROR happened
|
|    Radiale distorsion abnormaly high
|
------------------------------------------------------------
-------------------------------------------------------------
|       (Elise's)  LOCATION :
|
| Error was detected
|          at line : 3480
|          of file : /var/www/micmac/src/ori_phot/orilib.cpp
-------------------------------------------------------------
Bye  (press enter)
Com = /code/micmac/bin/mm3d Apero /code/micmac/include/XML_MicMac/Apero-Center-Bascule.xml  DirectoryChantier=./  +PatternAllIm=".*.JPG"  +AeroIn=RadialStd +AeroOut=Ground_Init_RTL +BDDC=RAWGNSS_N
[DEBUG]   running mm3d Campari .*.JPG Ground_Init_RTL Ground_RTL EmGPS=[RAWGNSS_N,5] AllFree=0
############## For Value Ground_Init_RTL ############
------------------------------------------------------------
|   Sorry, the following FATAL ERROR happened
|
|    Ori name is not a valid existing directory
|
------------------------------------------------------------
-------------------------------------------------------------
|       (Elise's)  LOCATION :
|
| Error was detected
|          at line : 4081
|          of file : /var/www/micmac/src/photogram/ChantierNameAssoc.cpp
-------------------------------------------------------------
Bye  (press enter)
[ERROR]   Child returned 1
[DEBUG]   running mm3d ChgSysCo .*.JPG Ground_RTL RTLFromExif.xml@SysUTM.xml Ground_UTM
############## For Value Ground_RTL ############
------------------------------------------------------------
|   Sorry, the following FATAL ERROR happened
|
|    Ori name is not a valid existing directory
|
------------------------------------------------------------
-------------------------------------------------------------
|       (Elise's)  LOCATION :
|
| Error was detected
|          at line : 4081
|          of file : /var/www/micmac/src/photogram/ChantierNameAssoc.cpp
-------------------------------------------------------------
Bye  (press enter)
[ERROR]   Child returned 1
[DEBUG]   running mm3d Malt Ortho .*.JPG Ground_UTM EZA=1 ZoomI=64 ZoomF=4 NbVI=2 HrOr=1 RoundResol=0 ResolOrtho=1 DefCor=0.0005 NbProc=16
############## For Value Ground_UTM ############
------------------------------------------------------------
|   Sorry, the following FATAL ERROR happened
|
|    Ori name is not a valid existing directory
|
------------------------------------------------------------
-------------------------------------------------------------
|       (Elise's)  LOCATION :
|
| Error was detected
|          at line : 4081
|          of file : /var/www/micmac/src/photogram/ChantierNameAssoc.cpp
-------------------------------------------------------------
Bye  (press enter)
[ERROR]   Child returned 1
[ERROR]   [Errno 2] No such file or directory: 'Ortho-MEC-Malt/Param-Tawny.xml'
Postprocessing: /var/www/data/fb87ae60-7f73-4c81-81eb-70feb985e321

No orthophoto found at odm_orthophoto/odm_orthophoto.tif: will skip tiling

No orthophoto found at odm_orthophoto/odm_orthophoto.tif: will skip MBTiles generation
kikislater commented 4 years ago

Your error is here :

| Sorry, the following FATAL ERROR happened 
|
| Radiale distorsion abnormaly high

This is probably due because dji write wrong exifs for elevation

skywalkerisnull commented 4 years ago

So how would I rectify this?

kikislater commented 4 years ago

Correct the exifs.

If you run exiftools on your Dji images, you will find these :

$ exiftool DJI_0009.jpg | grep Alt
GPS Altitude Ref                : Above Sea Level
Absolute Altitude               : +785.87
Relative Altitude               : +380.80
GPS Altitude                    : 785.8 m Above Sea Level

So Dji takes Absolute altitude whereas it should take Relative. If you look for commercial sotfware, they take it in consideration like here for example and it helps a lot for photogrammetry purpose : https://github.com/agisoft-llc/metashape-scripts/blob/master/src/read_altitude_from_DJI_meta.py

Could be also a rolling shutter problem ... In that case, it's still needed to be tested in MicMac and not implemented in NodeMicMac

skywalkerisnull commented 4 years ago

I will create a test with edited exif data and report back.

dronemapper-io commented 4 years ago

Thanks @kikislater and Thanks @skywalkerisnull for the detailed report. I have seen some weird thing happen with certain Mavic Pro 2 systems. It can also be related to the rolling shutter as mentioned. We recently saw a perfect collection with the Mavic Pro that wasn't able to be aligned due to some sort of problem with that actual camera itself. The client replaced their Mavic Pro 2 and did the exact same collection and it processed perfectly. Not suggesting you replace your drone but if you could share the images (privately if needed) I can take a look. It definitely doesn't seem to be an issue with tie-points as those numbers look good. Let us know Thanks

kikislater commented 4 years ago

For rolling shutter, you could read some here : https://github.com/micmacIGN/micmac/issues/142 I will test it under MicMac ...

skywalkerisnull commented 4 years ago

The Mavic is definitely doing something weird to the EXIF/XMP data:

Absolute Altitude               : +1.20
Relative Altitude               : +0.26
Gimbal Roll Degree              : +0.00
Gimbal Yaw Degree               : -52.70
Gimbal Pitch Degree             : -89.90
Flight Roll Degree              : -4.90
Flight Yaw Degree               : -40.50
Flight Pitch Degree             : -0.20
Cam Reverse                     : 0
Gimbal Reverse                  : 0
Self Data                       : Self data

Almost every image has a similar relative altitude which makes no sense at all. I have another dataset that uses a Canon 5D MkIII with an external PPK system that has had the same processing error/issues.

@dronemapper-io what is the best way to privately share them with you?

dronemapper-io commented 4 years ago

shoot me a message via the dronemapper.com contact page. i'll take a look. thanks

bradharley commented 2 years ago

Was there ever a resolution to this problem? I am having the exact same problem shooting with an air2s. thanks in advance.

roryfogerty commented 2 years ago

I was getting this error message after loading a .zip file. I solved it by importing the files directly i.e. not via a zip file.