GPS Position Not Available

Hi,

I am trying to create DSM from .tiff files and the size of each file is approx. 1 GB. Due to pixel limitation in the official Docker Image had created a custom Docker Image by changing `MAX_IMAGE_PIXELS’ value in PIL/Image.py file

As the GPS coordinates are unavailable in metadata, tried to pass these values with ‘–geo’ and geo.txt however while processing it gives these warning messages and does not create DSMs.

[WARNING] GPS position not available for 384235.tif
[WARNING] GPS position not available for 384237.tif
[WARNING] GPS position not available for 384239.tif
[WARNING] GPS position not available for 384241.tif
[WARNING] GPS position not available for 394039.tif
[WARNING] GPS position not available for 394041.tif
[WARNING] GPS position not available for 394043.tif
[WARNING] GPS position not available for 394045.tif
[WARNING] GPS position not available for 394047.tif
[WARNING] GPS position not available for 394049.tif
[WARNING] GPS position not available for 394051.tif
[WARNING] GPS position not available for 403912.tif
[WARNING] GPS position not available for 403914.tif
[WARNING] GPS position not available for 403916.tif
[WARNING] GPS position not available for 403918.tif
[WARNING] GPS position not available for 403920.tif
[WARNING] GPS position not available for 403922.tif
[WARNING] GPS position not available for 403924.tif
[WARNING] GPS position not available for 403926.tif
[WARNING] GPS position not available for 403928.tif
[WARNING] GPS position not available for 403930.tif
[WARNING] GPS position not available for 413713.tif
[WARNING] GPS position not available for 413715.tif
[WARNING] GPS position not available for 413717.tif
[WARNING] GPS position not available for 413719.tif
[WARNING] Could not generate coordinates file. The orthophoto will not be georeferenced.

Had tried to DSM using following commands:

docker exec -it python /code/run.py --project-path /datasets --dsm --geo

Had executed the above commands by placing geo.txt both inside & outside the container with the relevant file path, but it seems the file path is not recognized and gets the above warning that eventually fails to create DSMs.

Can someone please help here?

Also noticed the “odm_georeferencing” folder gets created but it is empty folder.

Below is the complete spinnet of command and its output:

docker exec -it 4a935f6ccdb3 python3 /code/run.py --project-path /datasets project --dsm --geo geo.txt
[INFO] Initializing ODM - Thu Sep 23 19:52:35 2021
[INFO] ==============
[INFO] build_overviews: False
[INFO] camera_lens: auto
[INFO] cameras: {}
[INFO] cog: False
[INFO] copy_to: None
[INFO] crop: 3
[INFO] debug: False
[INFO] dem_decimation: 1
[INFO] dem_euclidean_map: False
[INFO] dem_gapfill_steps: 3
[INFO] dem_resolution: 5
[INFO] depthmap_resolution: 640
[INFO] dsm: True
[INFO] dtm: False
[INFO] end_with: odm_postprocess
[INFO] fast_orthophoto: False
[INFO] feature_quality: high
[INFO] feature_type: sift
[INFO] force_gps: False
[INFO] gcp: None
[INFO] geo: geo.txt
[INFO] gps_accuracy: 10
[INFO] ignore_gsd: False
[INFO] matcher_distance: 0
[INFO] matcher_neighbors: 8
[INFO] matcher_type: flann
[INFO] max_concurrency: 32
[INFO] merge: all
[INFO] mesh_octree_depth: 11
[INFO] mesh_size: 200000
[INFO] min_num_features: 8000
[INFO] name: project
[INFO] optimize_disk_space: False
[INFO] orthophoto_compression: DEFLATE
[INFO] orthophoto_cutline: False
[INFO] orthophoto_kmz: False
[INFO] orthophoto_no_tiled: False
[INFO] orthophoto_png: False
[INFO] orthophoto_resolution: 5
[INFO] pc_classify: False
[INFO] pc_csv: False
[INFO] pc_ept: False
[INFO] pc_filter: 2.5
[INFO] pc_geometric: False
[INFO] pc_las: False
[INFO] pc_quality: medium
[INFO] pc_rectify: False
[INFO] pc_sample: 0
[INFO] pc_tile: False
[INFO] primary_band: auto
[INFO] project_path: /datasets
[INFO] radiometric_calibration: none
[INFO] rerun: None
[INFO] rerun_all: False
[INFO] rerun_from: None
[INFO] resize_to: 2048
[INFO] skip_3dmodel: False
[INFO] skip_band_alignment: False
[INFO] skip_report: False
[INFO] sm_cluster: None
[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_data_term: gmi
[INFO] texturing_keep_unseen_faces: False
[INFO] texturing_outlier_removal_type: gauss_clamping
[INFO] texturing_skip_global_seam_leveling: False
[INFO] texturing_skip_local_seam_leveling: False
[INFO] texturing_tone_mapping: none
[INFO] tiles: False
[INFO] time: False
[INFO] use_3dmesh: False
[INFO] use_exif: False
[INFO] use_fixed_camera_params: False
[INFO] use_hybrid_bundle_adjustment: False
[INFO] verbose: False
[INFO] ==============
Hi
Hi
/datasets/project
Hi
Hiii
[INFO] Running dataset stage
[INFO] Loading dataset from: /datasets/project/images
[INFO] Loading images database: /datasets/project/images.json
[INFO] Found 25 usable images
[WARNING] GPS position not available for 384235.tif
[WARNING] GPS position not available for 384237.tif
[WARNING] GPS position not available for 384239.tif
[WARNING] GPS position not available for 384241.tif
[WARNING] GPS position not available for 394039.tif
[WARNING] GPS position not available for 394041.tif
[WARNING] GPS position not available for 394043.tif
[WARNING] GPS position not available for 394045.tif
[WARNING] GPS position not available for 394047.tif
[WARNING] GPS position not available for 394049.tif
[WARNING] GPS position not available for 394051.tif
[WARNING] GPS position not available for 403912.tif
[WARNING] GPS position not available for 403914.tif
[WARNING] GPS position not available for 403916.tif
[WARNING] GPS position not available for 403918.tif
[WARNING] GPS position not available for 403920.tif
[WARNING] GPS position not available for 403922.tif
[WARNING] GPS position not available for 403924.tif
[WARNING] GPS position not available for 403926.tif
[WARNING] GPS position not available for 403928.tif
[WARNING] GPS position not available for 403930.tif
[WARNING] GPS position not available for 413713.tif
[WARNING] GPS position not available for 413715.tif
[WARNING] GPS position not available for 413717.tif
[WARNING] GPS position not available for 413719.tif
[WARNING] Could not generate coordinates file. The orthophoto will not be georeferenced.
[INFO] Finished dataset stage
[INFO] Running split stage
[INFO] Normal dataset, will process all at once.
[INFO] Finished split stage
[INFO] Running merge stage
[INFO] Normal dataset, nothing to merge.
[INFO] Finished merge stage
[INFO] Running opensfm stage
[WARNING] /datasets/project/opensfm/image_list.txt already exists, not rerunning OpenSfM setup
[WARNING] Detect features already done: /datasets/project/opensfm/features exists
[WARNING] Match features already done: /datasets/project/opensfm/matches exists
[WARNING] Found a valid OpenSfM tracks file in: /datasets/project/opensfm/tracks.csv
[WARNING] Found a valid OpenSfM reconstruction file in: /datasets/project/opensfm/reconstruction.json
[INFO] Already extracted cameras
[INFO] Export reconstruction stats
[WARNING] Found existing reconstruction stats /datasets/project/opensfm/stats/stats.json
[WARNING] Will skip exporting /datasets/project/opensfm/reconstruction.geocoords.json
[INFO] Undistorting /datasets/project/opensfm …
2021-09-23 19:52:40,088 DEBUG: Undistorting image 403930.tif
2021-09-23 19:52:40,089 DEBUG: Undistorting image 403918.tif
2021-09-23 19:52:40,097 DEBUG: Undistorting image 413715.tif
2021-09-23 19:52:40,106 DEBUG: Undistorting image 403926.tif
2021-09-23 19:52:40,098 DEBUG: Undistorting image 403928.tif
2021-09-23 19:52:40,129 DEBUG: Undistorting image 394039.tif
2021-09-23 19:52:40,111 DEBUG: Undistorting image 413713.tif
2021-09-23 19:52:40,165 DEBUG: Undistorting image 384241.tif
2021-09-23 19:52:40,145 DEBUG: Undistorting image 413719.tif
2021-09-23 19:52:40,190 DEBUG: Undistorting image 403922.tif
2021-09-23 19:52:40,165 DEBUG: Undistorting image 394041.tif
2021-09-23 19:52:40,248 DEBUG: Undistorting image 394043.tif
2021-09-23 19:52:40,144 DEBUG: Undistorting image 413717.tif
2021-09-23 19:52:40,285 DEBUG: Undistorting image 394047.tif
2021-09-23 19:52:40,189 DEBUG: Undistorting image 403924.tif
2021-09-23 19:52:40,472 DEBUG: Undistorting image 403912.tif
2021-09-23 19:52:40,285 DEBUG: Undistorting image 394045.tif
2021-09-23 19:52:40,215 DEBUG: Undistorting image 384237.tif
2021-09-23 19:52:40,129 DEBUG: Undistorting image 394049.tif
2021-09-23 19:52:40,213 DEBUG: Undistorting image 384239.tif
2021-09-23 19:52:40,354 DEBUG: Undistorting image 403914.tif
2021-09-23 19:52:40,500 DEBUG: Undistorting image 403920.tif
2021-09-23 19:52:40,473 DEBUG: Undistorting image 403916.tif
2021-09-23 19:52:40,353 DEBUG: Undistorting image 394051.tif
2021-09-23 19:52:40,248 DEBUG: Undistorting image 384235.tif

Really odd… Are you able to “burn” those coordinates into the images with something like EXIFTOOL to just verify that messing with PIL didn’t break things?

Yes as you see it in logs, any hint for the solution will be appreciated…

Vivek,

I am talking about tagging the images with something like EXIFTOOL prior to processing them and using the geo.txt

Can you please try that?

It works, thanks. Now have another problem.
The script abruptly stops while processing “code/SuperBuild/install/bin/opensfm/opensfm/undistort.py” script at line 157.

undistorted = cv2.remap(original, map1, map2, interpolation)

For some images, the above step succeeds while it fails for others images

1 Like

I’m wondering if something in OpenCV2 can’t handle the dimensions of your images…

We are kind of heading into uncharted waters here, haha.

Maybe an overflow for a data storage type?

Issue is fixed, there was a problem with one file.

2 Likes

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