Overflow Error: cannot convert float infinity to integer

Hi,
Yesterday I processed a 540 image orthomosaic using Lightning with no issues. Today I have been trying to process the same images, this time with GCPs.
The images still up load fine, but then about 2 minutes into the processing it fails with the following message:

[INFO] sm_no_align: False
[INFO] smrf_scalar: 1.25
[INFO] smrf_slope: 0.15
[INFO] smrf_threshold: 0.5
[INFO] smrf_window: 18.0
[INFO] split: 999999
[INFO] split_image_groups: None
[INFO] split_overlap: 150
[INFO] texturing_keep_unseen_faces: False
[INFO] texturing_skip_global_seam_leveling: False
[INFO] texturing_skip_local_seam_leveling: False
[INFO] tiles: False
[INFO] use_3dmesh: False
[INFO] use_exif: False
[INFO] use_fixed_camera_params: False
[INFO] use_hybrid_bundle_adjustment: False
[INFO] ==============
[INFO] Running dataset stage
[INFO] Loading dataset from: /var/www/data/831a79d4-4793-49b9-8fcf-2f39df8c404e/images
[INFO] Loading 540 images
[INFO] Wrote images database: /var/www/data/831a79d4-4793-49b9-8fcf-2f39df8c404e/images.json
[INFO] Found 540 usable images
[INFO] Parsing SRS header: EPSG:4326
[INFO] Parsing SRS header: WGS84 UTM 21N
[INFO] Parsing SRS header: WGS84 UTM 21N
[INFO] 42 GCP points will be used for georeferencing
Traceback (most recent call last):
File “/code/run.py”, line 59, in retcode = app.execute() File “/code/stages/odm_app.py”, line 117, in execute raise e File “/code/stages/odm_app.py”, line 81, in execute
self.first_stage.run()
File “/code/opendm/types.py”, line 361, in run self.process(self.args, outputs) File “/code/stages/dataset.py”, line 253, in process reconstruction.georeference_with_gcp(tree.odm_georeferencing_gcp,
File “/code/opendm/types.py”, line 134, in georeference_with_gcp x_off, y_off = int(np.round(np.mean(x_pos))), int(np.round(np.mean(y_pos)))
OverflowError: cannot convert float infinity to integer

The GCP file is copied below:

EPSG:4326
371460.235 445923.544 67.946 3845.1905606863766 1083.5640458630292 DJI_0795.JPG GCP01
371460.235 445923.544 67.946 3619.816760454829 2895.123062345042 DJI_0799.JPG GCP01
371460.235 445923.544 67.946 2225.467404002454 2368.4737612011404 DJI_0806.JPG GCP01
371363.319 446012.939 69.849 4357.613045690754 547.0625581145378 DJI_0776.JPG GCP02
371363.319 446012.939 69.849 4300.082945462029 1008.8095029853034 DJI_0777.JPG GCP02
371363.319 446012.939 69.849 4245.322700056789 1461.733218778887 DJI_0778.JPG GCP02
371363.319 446012.939 69.849 4194.55882100579 1924.3808210489153 DJI_0779.JPG GCP02
371363.319 446012.939 69.849 4159.640857083128 2381.7366626704475 DJI_0780.JPG GCP02
371363.319 446012.939 69.849 4065.2922220075284 3323.2853061307883 DJI_0782.JPG GCP02
371202.724 446103.538 73.294 1498.7383019744168 465.59880614065185 DJI_0741.JPG GCP04
371202.724 446103.538 73.294 1443.3734983175495 961.3277745855016 DJI_0742.JPG GCP04
371202.724 446103.538 73.294 1390.762186347923 1454.2345390895873 DJI_0743.JPG GCP04
371202.724 446103.538 73.294 1313.7034415752566 1965.4344700217991 DJI_0744.JPG GCP04
371202.724 446103.538 73.294 1255.222675910757 2469.2827528606877 DJI_0745.JPG GCP04
371202.724 446103.538 73.294 1253.5369852672698 2900.3866804125946 DJI_0746.JPG GCP04
371276.78 446070.708 70.471 901.6067272497579 511.41691145546383 DJI_0855.JPG GCP03
371276.78 446070.708 70.471 971.3883953192583 1010.734294671302 DJI_0856.JPG GCP03
371276.78 446070.708 70.471 1004.8057724588114 1517.6170827711285 DJI_0857.JPG GCP03
371276.78 446070.708 70.471 1051.7523882781798 2030.4121592098309 DJI_0858.JPG GCP03
371276.78 446070.708 70.471 1090.6451061360094 2581.8584161924437 DJI_0859.JPG GCP03
371276.78 446070.708 70.471 1098.0511517842378 3052.3620405540446 DJI_0860.JPG GCP03
371276.78 446070.708 70.471 4694.960278135475 559.1956244469905 DJI_0927.JPG GCP03
371321.408 445861.324 67.205 4578.66158561948 806.8521138347837 DJI_0454.JPG GCP05
371321.408 445861.324 67.205 4582.384215428712 1256.653882886975 DJI_0455.JPG GCP05
371321.408 445861.324 67.205 4566.454568490825 1720.2541768397843 DJI_0456.JPG GCP05
371321.408 445861.324 67.205 4567.113001682249 2194.6104482284964 DJI_0457.JPG GCP05
371321.408 445861.324 67.205 4562.074442008128 2665.361163975998 DJI_0458.JPG GCP05
371321.408 445861.324 67.205 4550.327253882621 3138.4900882823595 DJI_0459.JPG GCP05
371321.408 445861.324 67.205 1352.5650179118697 589.6216381725584 DJI_0484.JPG GCP05
371321.408 445861.324 67.205 1348.5918053609666 1069.4303338699474 DJI_0485.JPG GCP05
371321.408 445861.324 67.205 1365.1009272309764 1549.263216107603 DJI_0486.JPG GCP05
371321.408 445861.324 67.205 1385.2384155273578 2029.6420942514947 DJI_0487.JPG GCP05
371321.408 445861.324 67.205 1386.465883940833 2518.435783862994 DJI_0488.JPG GCP05
371321.408 445861.324 67.205 1412.0336938323762 3017.394842838747 DJI_0489.JPG GCP05
371321.408 445861.324 67.205 1441.9664365182575 3513.2668095438153 DJI_0490.JPG GCP05
371266.451 445920.983 69.119 2853.453060566634 769.1181289039971 DJI_0510.JPG GCP06
371266.451 445920.983 69.119 2880.9047402644096 1286.5064677556036 DJI_0511.JPG GCP06
371266.451 445920.983 69.119 2910.635573438373 1796.2461539715894 DJI_0512.JPG GCP06
371266.451 445920.983 69.119 3058.1529267006676 1265.074608346953 DJI_0562.JPG GCP06
371266.451 445920.983 69.119 3069.256013507725 1764.7437861124267 DJI_0563.JPG GCP06
371266.451 445920.983 69.119 3088.6055459079425 2276.369490564199 DJI_0564.JPG GCP06
371266.451 445920.983 69.119 3112.779166255285 2795.003644152965 DJI_0565.JPG GCP06

Any suggestions as to the issue?

Thanks,
Tim

1 Like

The coordinates are not in EPSG:4326. You need to choose an appropriate coordinate reference system and change the first line.

1 Like

Thanks. That’ll be because I’m an idiot who used an old spreadsheet as a template and didn’t check it…
Tim

2 Likes

Nah, mistakes happen :slight_smile:

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.