GCP text file - software looks in the 'code' folder?

From @everydayduffy on Wed May 24 2017 18:27:10 GMT+0000 (UTC)

Hello,

I’m trying to run Opendronemap with a gcp text file as described in the wiki.

I’ve launched the following command in Docker on Windows 10:

docker run -it --rm -v C:/Software/OpenDroneMap/images:/code/images -v C:/Software/OpenDroneMap/odm_orthophoto:/code/odm_orthophoto -v C:/Software/OpenDroneMap/odm_texturing:/code/odm_texturing my_odm_image --min-num-features 12000 --use-pmvs --gcp C:/Software/OpenDroneMap/gcp_list.txt

I got the following output:

Whole texturing procedure took: 156.798s
[INFO] Running ODM Texturing Cell - Finished
[INFO] Running ODM Georeferencing Cell
[DEBUG] C:/Software/OpenDroneMap/gcp_list.txt
[INFO] Found /code/C:/Software/OpenDroneMap/gcp_list.txt
[DEBUG] running /code/build/bin/odm_georef -bundleFile /code/opensf
imagesListPath /code/opensfm/list_r000.out -bundleResizedTo 2400 -inp
outputFile /code/odm_texturing/odm_textured_model_geo.obj -inputPoint
-outputPointCloudFile /code/odm_georeferencing/odm_georeferenced_mode
erencing_log.txt -georefFileOutputPath /code/odm_georeferencing/odm_g
are/OpenDroneMap/gcp_list.txt -outputCoordFile /code/odm_georeferenci
Error in Georef:
Failed opening gcp file /code/C:/Software/OpenDroneMap/gcp_list.txt f

[ERROR] Georeferencing failed.
Traceback (most recent call last):
File “/code/scripts/odm_georeferencing.py”, line 146, in process
‘-outputCoordFile {coords}’.format(**kwargs))
File “/code/opendm/system.py”, line 28, in run
raise Exception(“Child returned {}”.format(retcode))
Exception: Child returned 1
[INFO] OpenDroneMap app finished - Wed May 24 13:20:40 2017

Is this an issue with the formar of my gcp text file, or am I right in thinking that the software is looking in the ‘code’ folder by default instead of looking at the path I provided for the --gcp flag?



Copied from original issue: https://github.com/OpenDroneMap/OpenDroneMap/issues/589

From @dakotabenjamin on Fri May 26 2017 15:23:01 GMT+0000 (UTC)

Docker and gcps are kinda weird. You need to add the gcp file as a volume mount like this: -v C:/Software/OpenDroneMap/gcp_list.txt:/code/gcp_list.txt. Since it is named in a standard fashion, you don’t need to specify --gcp

From @everydayduffy on Sat May 27 2017 10:52:24 GMT+0000 (UTC)

Thanks for the help @dakotabenjamin. I ran the following:

docker run -it --rm -v C:/Software/OpenDroneMap/gcp_list.txt:/code/gcp_list.txt -v C:/Software/OpenDroneMap/images:/code/images -v C:/Software/OpenDroneMap/odm_orthophoto:/code/odm_orthophoto -v C:/Software/OpenDroneMap/odm_texturing:/code/odm_texturing my_odm_image --min-num-features 12000 --use-pmvs --dem

And it got as far as:

Generating texture patches:
Running… done. (Took 4.661s)
1111 texture patches.
Running global seam leveling:
Create matrices for optimization… done.
Lhs dimensionality: 113230 x 113230
Calculating adjustments:
Color channel 1: CG took 100 iterations. Residual
Color channel 0: CG took 100 iterations. Residual
Color channel 2: CG took 101 iterations. Residual
Took 0.216 seconds
Adjusting texture patches 100%… done. (Took 1.05s)
Running local seam leveling:
Blending texture patches 100%… done. (Took 17.938s)
Generating texture atlases:
Sorting texture patches… done.
Working on atlas 10 100%… done.
Finalizing texture atlases… done. (Took: 4.09s)
Building objmodel:
Saving model… done.
Whole texturing procedure took: 126.963s
[INFO] Running ODM Texturing Cell - Finished
[INFO] Running ODM Georeferencing Cell
[DEBUG] None
[WARNING] No coordinates file. Generating coordinates file: /code
[INFO] Found /code/gcp_list.txt
[DEBUG] running /code/build/bin/odm_georef -bundleFile /code/op
imagesListPath /code/opensfm/list_r000.out -bundleResizedTo 2400
outputFile /code/odm_texturing/odm_textured_model_geo.obj -inputP
-outputPointCloudFile /code/odm_georeferencing/odm_georeferenced_
erencing_log.txt -georefFileOutputPath /code/odm_georeferencing/o
.txt -outputCoordFile /code/odm_georeferencing/coords.txt
Error in Georef:
Fewer than 3 GCPs have correspondences in the generated model.
[ERROR] Georeferencing failed.
Traceback (most recent call last):
File “/code/scripts/odm_georeferencing.py”, line 146, in proces
‘-outputCoordFile {coords}’.format(**kwargs))
File “/code/opendm/system.py”, line 28, in run
raise Exception(“Child returned {}”.format(retcode))
Exception: Child returned 1
[INFO] OpenDroneMap app finished - Sat May 27 10:17:52 2017

Is this indicative of an issue with my gcp_list.txt file? Or something else?

From @everydayduffy on Sat May 27 2017 10:53:18 GMT+0000 (UTC)

My GCP file looks like this…
gcp_list.txt

From @yjmenezes on Sat May 27 2017 14:46:54 GMT+0000 (UTC)

@everydayduffy

you have 4 control points.

I plot and saw some are aligned. ( A, B and C )

try a short gcp_list.txt and check if point D is selected in best triplet or you will have altimetric problems.

This is an issue i am observing with current georeferencing procedure.
gcp_positions.zip

From @yjmenezes on Sat May 27 2017 18:41:20 GMT+0000 (UTC)

@everydayduffy

I translate your GCP to UTM with PROJ4.

gcp_positions.zip