Automating GCP detection on images

I would like to introduce you my Find-GCP project. Using special ArUco code GCP markers we can find the marker centres on the images and the gcp_list.txt file can be generated as a batch process.
The project uses OpenCV and OpenCV contrib libraries and is written in Python.

The source code is available on GitHub GitHub - zsiki/Find-GCP: Find ArUco markers in digital photos
A paper has just been published about our work in Baltic Journal of Modern Computing Vol. 9 (2021) No 1: https://www.bjmc.lu.lv/fileadmin/user_upload/lu_portal/projekti/bjmc/Contents/9_1_06_Siki.pdf

Feed backs, bug reports, ideas are welcome on GitHub issue tracker.

9 Likes

Siki, many thanks for posting this. It looks very interesting indeed. I especially like how you have included a setting to automatically output the correct format for ODM!

I’d love to see this added into WebODM or one of the standalone GCP tools with a UI.

Might be useful to add references in to the ODM/WebODM documentation so it can easily be found.

Congratulations. Its always impressive to see open source keep up with proprietary software!

2 Likes

Love this idea, been looking into something similar for some time, but my programming skills just weren’t’ up to it. I will be giving this a go for sure.

This might be of interest. Not much info, but it is a commercial equivalent of a similar idea.

http://geobits.io/

Agreed, would be great to see this matured into inclusion into GCP Editor Pro or something.

Regards - Woody

2 Likes

W6oody, yeah geobits are interesting. The markers are Aruco based and open sourced. But the marker software is proprietary and embedded within DroneMappers processing software. Which is a pity.

Anyway thought I’d chance my leg and add a feature request to GCPEditorPro.

https://github.com/uav4geo/GCPEditorPro/issues/10

1 Like

@dsqndson and @W6oody thank for your encouraging answers.
I’ve sent a request to the ODM development team to join our project to ODM. It is on its way…
Probably a blog entry will be available on the ODM home page in the near future.

Regards,
Zoltan

4 Likes

Siki, are you taking feature requests yet?

I’d love a tool to help us determine the needed size to print the Aruco marker with a given camera megapixel and a given flight height. So for instance, if I’m going to use my GoPro Hero4 Black (12MP) at 400FT AGL, I’d need to get my Aruco printed at x by x inches.

2 Likes

Yes, feature requests are welcome!
This is good idea. There are two utilities in the Find-GCP repo (GitHub - zsiki/Find-GCP: Find ArUco markers in digital photos) aruco_make.py to generate printable standard ArUco markers and dict_gen_3x3.py to generate non-standard 3x3 markers. These programs generate png files. The missing step to calculate the necessary size for printing. From our tests we got that the minimal size of the markers to be detected in the images is 20 pixels (in case of 3x3 ArUco codes) and 30 pixels are optimal. We use DJI Phantom 4 Pro and 30 x 30 cm markers are detected from 70 metres. There are some statistics in the second part of our paper, see here:https://www.bjmc.lu.lv/fileadmin/user_upload/lu_portal/projekti/bjmc/Contents/9_1_06_Siki.pdf

What should be the input data for this calculation? Flight height, focal length, image size? What could be the general formula for this?

2 Likes

Pretty much nailed it:

1 Like

Thanks!
It’s perfect.

1 Like

I’ve created a small web application for the GSD and ArUco marker size calculation. A plan to make an UAV sensor database, now only DJI Phantom 4 Pro is filled. The URL to this application:
http://www.agt.bme.hu/on_line/gsd_calc/gsd_calc.html

Comments are welcome!

2 Likes

looks Great!

I’m not familiar with these markers but seems interesting.
does “ArUco size” means the matrix size (4x4, 5x5, 6x6, 7x7)?

I’m assuming “Flight height” is in meters.

1 Like

Yes, Aruco size is the size of matrix, if you double click in the field you get a list. 3 x 3 is also possible.

You are right, flight height should be in metres.

The unit for the field is written in the empty field as a placeholder.

2 Likes

I added the source code of gsd_calc to the Find-GCP project on GitHub, it is in the gsd_calc subdirectory (html, javascipt and css). You can translate it to any language, see hu.json file for Hungarian translation. Translations are welcome.
If you can extend the sensor database, plesae do it. The sensor data are in the sensordb.json file. Four data are stored for a sensor:
swidth - sensor width in millimetres
focal - focal length in millimetres (real focal length, not thr 35 mm equivalent)
iwidth - image width pixels
iheight - image height pixels

Pull requests are welcome on GitHub or you can drop data in the forum.

5 Likes

this is very good one:
https://www.handalselaras.com/calculator/

4 Likes

Is it possible to have a smaller Arcuo Matrix size, so that I could have smaller mats that are reliably detectable at 400ft with my 12MP sensor?

I’m thinking 4-5 markers will be sufficient (4 corners, one center). Would a 2x2 Aruco Matrix Dictionary cover this?

Using 2x2 matrix there are only five different shapes (I guess):

00 10 11 10 11
00 00 00 01 11

If these five are enough for you, it is possible. But there is a danger, the simpler the pattern the more false markers detected in the nature. For example the first pattern is an empty square…
I use mostly 3x3 matrix 30 x 30 centimeters, and I have several false positive matches on roofs. Using 4x4 markers the number of false matches are reduced significantly.

2 Likes

Oh, interesting. Thanks for helping me understand better. I guess I may have no choice but big mats…

2 Likes

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