Automatic GCP points using ArUco markers

Hi,

I’m working on automatic GCP points using ArUco markers. The opendronemap website explains how to use it.

  1. Install Python3, OpenCV and OpenCV contrib on your machine
  2. Download the source code from GitHub
  3. Generate ArUco markers
  4. Put the markers on the field
  5. Make the flight
  6. Collect the GCP’s 3D coordinates in a TXT file
  7. Run gcp_find.py
  8. Add the generated gcp_list.txt to your ODM project and start ODM processing

All steps are clear to me except one.

I have installed the software, but don’t know how to use it further? At point 7 it says Run gcp_find.py but how do i open it? And how does gcp_find.py know where my drone images are? Hopefully someone can provide some additional information on the above? Thanks

1 Like

First of all thank you for pointing at this blog post : https://www.opendronemap.org/2021/04/automatize-gcp-image-coordinate-collection/
It was exactly what I was looking for.

Based on my understanding here is how it works.

You need to run :

python \path\to\gcp_find.py path\to\image.png -t ODM -i .\path\to\gcp_coord.txt --epsg gcp_epsg_code -o \path\to\gcp_list.txt

Where gcp_coord.txt is a file containing the coordinates of the various gcp used like “id_gcp lat long alt” :

1 4.482 4.201 0.370
2 5.758 3.859 -0.557
3 2.822 4.201 0.359
4 2.173 4.202 -0.153
5 4.119 3.764 -0.518
6 1.041 3.712 -0.560

and gcp_epsg_code is the EPSG code corresponding to the coordinates in this gcp_coord.txt file.

It will then ouput a gcp_list.txt file where you ask it corresponding to the ODM format. Do not forget to check the -d option and make sure it match the ArUco you have generated.

Perhaps there is a way to run it on several images but for now I just run it for each image and then concatenate the result. I will keep you up to date if I find anything else.

For now all this is pure theory, I have juste read the code and doc of the command. I will generate, capture and try it on real data as soon as possible.

1 Like

Welcome, barryV!

Looks like bernarde gave you an excellent summary of how to use the tool!

Bernarde, you should be able to loop through the folder, right? I’m really bad with Python, though.

Thanks for giving such great instructions!

From the examples on github should be possible of running it on multiple images if the name is a regex :

samples/DJI_017[234].JPG

But on my machine I have an error

processing samples\DJI_017[234].JPG
error reading image: samples\DJI_017[234].JPG

Not sure if it is because I am running it on Windows and the method use is not cross-platform or because of a bug. Will investigate later.

Let me know if the regex naming work for you.

1 Like

Hi Bernard, thank you so much for your explanation! I’m on vacation right now so I can’t test it yet. I am curious about your results when you start working with real data! greetings, Barry

1 Like

After discussion with zsiki from the Find-GCP project I can add that :

  • To be clear they are note regex but jokers
  • As I guessed it was already natively working on linux but not on windows
  • It is now working on Windows
  • you can anyways precise multiple input files to the input command like this for instace :
    python \path\to\gcp_find.py -t ODM -i .\path\to\gcp_coord.txt --epsg gcp_epsg_code -o \path\to\gcp_list.txt path\to\image1.png path\to\image2.png path\to\image3.png

Concerning the real data, capture is in progress. I should be able to retrieve the data at the end of the day and work on it the next days.

1 Like

Good to hear Bernard! I am also curious whether the flight height still determines the quality. good luck with the implementation!:v:

1 Like

OK first tests were à disaster so I Will not share thé datasets but thé markers were badly designed.
(misunderstanding with a collaborator lead To too small markers dim 4x4 where I wanted 3x3 and flight was realized at 70m instead of 50m)

I just made New bigger markers in 3x3 and they should be used on a fly on tuesday.

4 Likes

Planning to make some this weekend. Will hopefully post a dataset.

3 Likes

Hi, I also tried to use markers last Tuesday. The markers had a size of 50x50 cm and the flight height was 35 m with a GSD of approx. 1.0. Unfortunately, the size of the marker also turned out not to be sufficient for a reliable dataset. Next time I’ll try again with an even bigger one!

2 Likes

image

2 Likes