Float Divison by zero error

Hello,

i have a problem processing drone images at work with WebODM. I bought the Installer Version and installed WebODM on Windows 7.
I have different flight paths to process and so far only one path out of many went through without any problems.
When i try to process the other pictures i get the same error every time. A part of the error message contains “ZeroDivisionError: float division by zero”, so i tried to change some options before processing which cointained a “0” as default. Sadly this didn´t help.

I would really appreciate some help. :slight_smile:
Sorry for my bad english.
You can find the full log below:

Marv

Log:
[INFO] Initializing OpenDroneMap app - Fri Mar 16 09:47:15 2018
[INFO] Running ODM Load Dataset Cell
[DEBUG] Loading dataset from: /var/www/data/0b34dfe8-c4e4-4834-a4fb-d0d8b7fd21e6/images
[DEBUG] /var/www/data/0b34dfe8-c4e4-4834-a4fb-d0d8b7fd21e6/images
[WARNING] Could not find ccd_width in file. Use --force-ccd or edit the sensor_data.json file to manually input ccd width
[DEBUG] Loaded YUN00259.jpg | camera: yuneec cgo3p | dimensions: 2048 x 1534 | focal: None | ccd: None | lat: -24.0386895 | lon: 31.1719059 | alt: 119.0
[WARNING] Could not find ccd_width in file. Use --force-ccd or edit the sensor_data.json file to manually input ccd width
[DEBUG] Loaded YUN00258.jpg | camera: yuneec cgo3p | dimensions: 2048 x 1534 | focal: None | ccd: None | lat: -24.0387848 | lon: 31.1718017 | alt: 119.0
[WARNING] Could not find ccd_width in file. Use --force-ccd or edit the sensor_data.json file to manually input ccd width
[DEBUG] Loaded YUN00257.jpg | camera: yuneec cgo3p | dimensions: 2048 x 1534 | focal: None | ccd: None | lat: -24.0390046 | lon: 31.1715047 | alt: 119.0
[WARNING] Could not find ccd_width in file. Use --force-ccd or edit the sensor_data.json file to manually input ccd width
[DEBUG] Loaded YUN00260.jpg | camera: yuneec cgo3p | dimensions: 2048 x 1534 | focal: None | ccd: None | lat: -24.0387949 | lon: 31.1720717 | alt: 119.0
[WARNING] Could not find ccd_width in file. Use --force-ccd or edit the sensor_data.json file to manually input ccd width
[DEBUG] Loaded YUN00254.jpg | camera: yuneec cgo3p | dimensions: 2048 x 1534 | focal: None | ccd: None | lat: -24.0386689 | lon: 31.1710921 | alt: 119.0
[WARNING] Could not find ccd_width in file. Use --force-ccd or edit the sensor_data.json file to manually input ccd width
[DEBUG] Loaded YUN00256.jpg | camera: yuneec cgo3p | dimensions: 2048 x 1534 | focal: None | ccd: None | lat: -24.0389015 | lon: 31.1713806 | alt: 119.0
[WARNING] Could not find ccd_width in file. Use --force-ccd or edit the sensor_data.json file to manually input ccd width
[DEBUG] Loaded YUN00255.jpg | camera: yuneec cgo3p | dimensions: 2048 x 1534 | focal: None | ccd: None | lat: -24.0387848 | lon: 31.1712372 | alt: 119.0
[WARNING] Could not find ccd_width in file. Use --force-ccd or edit the sensor_data.json file to manually input ccd width
[DEBUG] Loaded YUN00261.jpg | camera: yuneec cgo3p | dimensions: 2048 x 1534 | focal: None | ccd: None | lat: -24.0389276 | lon: 31.1722479 | alt: 120.0
[INFO] Found 8 usable images
[INFO] Running ODM Load Dataset Cell - Finished
[INFO] Running ODM OpenSfM Cell
[DEBUG] Altitude data detected, enabling it for GPS alignment
[DEBUG] running PYTHONPATH=/code/SuperBuild/install/lib/python2.7/dist-packages /code/SuperBuild/src/opensfm/bin/opensfm extract_metadata /var/www/data/0b34dfe8-c4e4-4834-a4fb-d0d8b7fd21e6/opensfm
2018-03-16 09:47:16,496 Extracting focal lengths for image YUN00259.jpg
2018-03-16 09:47:16,603 Extracting focal lengths for image YUN00258.jpg
2018-03-16 09:47:16,703 Extracting focal lengths for image YUN00257.jpg
2018-03-16 09:47:16,808 Extracting focal lengths for image YUN00260.jpg
2018-03-16 09:47:16,904 Extracting focal lengths for image YUN00254.jpg
2018-03-16 09:47:17,007 Extracting focal lengths for image YUN00256.jpg
2018-03-16 09:47:17,120 Extracting focal lengths for image YUN00255.jpg
2018-03-16 09:47:17,256 Extracting focal lengths for image YUN00261.jpg
[DEBUG] running PYTHONPATH=/code/SuperBuild/install/lib/python2.7/dist-packages /code/SuperBuild/src/opensfm/bin/opensfm detect_features /var/www/data/0b34dfe8-c4e4-4834-a4fb-d0d8b7fd21e6/opensfm
2018-03-16 09:47:18,580 Extracting ROOT_HAHOG features for image YUN00259.jpg
2018-03-16 09:47:19,098 Extracting ROOT_HAHOG features for image YUN00258.jpg

2018-03-16 09:47:26,430 Found 9804 points in 7.12616682053s
2018-03-16 09:47:27,318 Extracting ROOT_HAHOG features for image YUN00257.jpg
2018-03-16 09:47:28,231 Extracting ROOT_HAHOG features for image YUN00260.jpg

2018-03-16 09:47:36,161 Found 9779 points in 7.75575399399s
2018-03-16 09:47:36,886 Extracting ROOT_HAHOG features for image YUN00254.jpg
2018-03-16 09:47:37,970 Extracting ROOT_HAHOG features for image YUN00256.jpg

2018-03-16 09:47:45,548 Found 9981 points in 7.39916086197s
2018-03-16 09:47:49,152 Extracting ROOT_HAHOG features for image YUN00255.jpg
2018-03-16 09:47:50,682 Extracting ROOT_HAHOG features for image YUN00261.jpg

2018-03-16 09:47:57,923 Found 9768 points in 7.07590007782s
[DEBUG] running PYTHONPATH=/code/SuperBuild/install/lib/python2.7/dist-packages /code/SuperBuild/src/opensfm/bin/opensfm match_features /var/www/data/0b34dfe8-c4e4-4834-a4fb-d0d8b7fd21e6/opensfm
Traceback (most recent call last):
File “/code/SuperBuild/src/opensfm/bin/opensfm”, line 34, in
command.run(args)
File “/code/SuperBuild/src/opensfm/opensfm/commands/match_features.py”, line 29, in run
pairs = match_candidates_from_metadata(images, exifs, data)
File “/code/SuperBuild/src/opensfm/opensfm/commands/match_features.py”, line 150, in match_candidates_from_metadata
data.invent_reference_lla()
File “/code/SuperBuild/src/opensfm/opensfm/dataset.py”, line 394, in invent_reference_lla
w = 1.0 / d[‘gps’].get(‘dop’, 15)
ZeroDivisionError: float division by zero
Traceback (most recent call last):
File “/code/run.py”, line 47, in
plasm.execute(niter=1)
File “/code/scripts/opensfm.py”, line 108, in process
(context.pyopencv_path, context.opensfm_path, tree.opensfm))
File “/code/opendm/system.py”, line 34, in run
raise Exception(“Child returned {}”.format(retcode))
Exception: Child returned 1

Hey @s6mastra :hand: could you upload your images somewhere (dropbox, google drive, etc.) so that we can take a look? Perhaps there’s something wrong with your images’ EXIF tags.

Hi @pierotofy,
thanks for your response. Here is a Dropbox Link: Olifant River 60m Dropbox

...
GPS Version ID                  : 2.3.0.0
GPS Altitude Ref                : Above Sea Level
GPS Measure Mode                : 3-Dimensional Measurement
GPS Dilution Of Precision       : 0

The problem is in the Dilution of Precision (DOP) field being set to zero. https://en.wikipedia.org/wiki/Dilution_of_precision_(navigation)

Did you manually set some of these values, or did they come straight from the drone’s camera? If they came straight from the camera, we might want to open an issue on https://github.com/mapillary/OpenSfM/issues to see if we can add the necessary logic to handle zero DOP values.

Ok i see. I did not set any values, so the come straight from the drone´s camera.
Can you recommend any freeware to change the values?
Thanks a lot! :slight_smile:

@s6mastra – you might set that to a value between 3 and 5: https://en.wikipedia.org/wiki/Dilution_of_precision_(navigation)#Meaning_of_DOP_Values

I have added an issue to OpenSfM: