Where to put the gcp_list.txt file in ODM project

I have run OpenDroneMap(ODM) on a bunch of drone images of a particular area. I have set the Ground Control Points(GCP) using Webodm gcp interface. Now, I have a gcp_list.txt file containing the images with appropriate latitude, longitude values. Now, in the OpenDroneMap Documentaion, it is stated that:

The gcp_list.txt file must be created in the base of your project folder.

Now, I have run ODM keeping the gcp_list.txt file in the images folder. But, I am not clear about where I should put the gcp_list.txt file exactly.

What does this actually mean?

What is the base of my project folder?

If your project is setup as such:


And your images are in images

The GCP should be in /path/to/project/gcp_list.txt

docker run -ti --rm -v /path/to:/datasets opendronemap/odm --project-path /datasets project

1 Like

Actually, I cloned the git repository and run ODM in linux using run.sh file. So, my project structure is like this:

“Output” is the name I set in the variable “project_path” in the settings.yaml file. Now, where should I keep my gcp_list.txt file?

Always one level up from your images directory. Cheers.

So, according to my file structure which is:

I should keep the gcp_list.txt file in the second “Output” folder i.e. second “Output” folder from the left in /pathto/ODM/Output/Output/images ? I just want to clarify.

Correct. Place it here :point_up_2:

1 Like

One more question. Do I need to set the path of the gcp_list.txt file in the settings.yaml file? There is a variable called “gcp” in the settings.yaml file. Do I need to set any value to that? Or will ODM autodetect the gcp_list.txt file I have placed in the second “OUTPUT” folder?

You only need to set that variable if the file is named something else or located someplace else.

1 Like

When I run ODM with gcp_list.txt in the above mentioned folder, my 3D mesh object(size of 20 MB) looks as expected, but the produced orthophoto is of only 2 KB and I can’t see anything when I open the orthophoto. Do you know why this might happen?

Can you post your gcp file?

+proj=utm +zone=46 +ellps=WGS84 +datum=WGS84 +units=m +no_defs
230649.94 2631114.55 4 2816.67 1477.78 DJI_0067.JPG gcp01
230649.94 2631114.55 4 2783.33 1972.22 DJI_0068.JPG gcp01
230649.94 2631114.55 4 2777.78 2300.00 DJI_0069.JPG gcp01
230649.94 2631114.55 4 1927.78 2744.44 DJI_0070.JPG gcp01
230649.94 2631114.55 4 2711.11 3211.11 DJI_0097.JPG gcp01
230649.94 2631114.55 4 2761.11 3500.00 DJI_0099.JPG gcp01
230611.95 2631112.15 4 2700.00 338.89 DJI_0067.JPG gcp03
230611.95 2631112.15 4 2661.11 705.56 DJI_0068.JPG gcp03
230611.95 2631112.15 4 2638.89 983.33 DJI_0069.JPG gcp03
230611.95 2631112.15 4 777.78 2044.44 DJI_0070.JPG gcp03
230611.95 2631112.15 4 4250.00 2988.89 DJI_0097.JPG gcp03
230611.95 2631112.15 4 2700.00 1950.00 DJI_0099.JPG gcp03
230611.95 2631112.15 4 2666.67 2377.78 DJI_0100.JPG gcp03
230611.95 2631112.15 4 2644.44 2916.67 DJI_0101.JPG gcp03
230653.73 2631285.26 4 2222.64 1906.35 DJI_0082.JPG gcp02
230653.73 2631285.26 4 3866.67 2238.89 DJI_0083.JPG gcp02
230625.73 2631282.79 4 1135.15 1685.39 DJI_0082.JPG gcp04
230625.73 2631282.79 4 3633.33 1133.33 DJI_0083.JPG gcp04
230625.73 2631282.79 4 2724.03 1724.00 DJI_0112.JPG gcp04
230625.73 2631282.79 4 3933.33 3155.56 DJI_0115.JPG gcp04
230595.88 2631148.82 4 2088.89 1611.11 DJI_0140.JPG gcp05
230595.88 2631148.82 4 2005.56 2644.44 DJI_0142.JPG gcp05
230739.00 2631208.42 4 3355.56 1655.56 DJI_0243.JPG gcp07
230739.00 2631208.42 4 3444.44 2638.89 DJI_0245.JPG gcp07
230739.00 2631208.42 4 3516.67 2772.22 DJI_0246.JPG gcp07
230591.68 2631151.98 4 1666.67 2050.00 DJI_0330.JPG gcp06
230591.68 2631151.98 4 1466.67 2811.11 DJI_0332.JPG gcp06
230591.68 2631151.98 4 1400.00 3300.00 DJI_0333.JPG gcp06

I am not sure if it’s the issue, but the last field that names the GCP isn’t compatible with the format (although it would make sense if that were part of the format, it is not).

So, try removing the GCP names and rerun. If that doesn’t work, we can dig deeper.

1 Like

Also, just to be sure: all your elevations are 4 meters? That’s suspiciously consistent and could cause issues if it’s not true. But start with removing the GCP name field and rerunning.

1 Like

My gcp_list.txt file was generated using Webodm’s GCP interface. So, this is how the output was generated. But, I will try removing the gcp names and running again.

Hmm. Ooops. Well, still worth testing the removal of that. But there’s probably something else going on.

I used 4 as the height because all my gcp points are on the road and the standard height in my area from sea level is 4m.
I removed the gcp names but it didn’t do any good. What else can go wrong? Any idea?

What kind of DJI is this?

DJI Mavic 2 Pro

Moreover, I kept the gcp_list.txt file in the folder @smathermather-cm told me to. But, when I opened the 3D mesh file in notepad to see the latitude, longitude values, they were not the expected values. Should I change something else? :\

I could set gcp file from the command line on Ubuntu 20.04 using ODM 2.4.1 in a docker container.
Copying the gcp_list.txt file to the images directory and using the command:

docker run -it --rm \
    -v "$(pwd)/images:/code/images" \
    -v "$(pwd)/odm_orthophoto:/code/odm_orthophoto" \
    -v "$(pwd)/odm_texturing:/code/odm_texturing" \
    -v "$(pwd)/odm_texturing:/code/odm_texturing" \
    opendronemap/odm --gcp ./images/gcp_list.txt

the GCP-s are found and used, it is written to the consol:

[INFO]    gcp: ./images/gcp_list.txt
[INFO]    Parsing SRS header: EPSG:23700
[INFO]    Generated coords file from GCP: WGS84 UTM 34N
[INFO]    Parsing SRS header: WGS84 UTM 34N
[INFO]    67 GCP points will be used for georeferencing

If I put simply the gcp_list.txt file into the project folder (as proposed above) GCPs are not found/considered.

1 Like