Marker position on screen

Hi there! I’m working on a project for my studies and am in need to find a way to detect the position of a certain marker (QR/Aruco/whatever) in the field of my webcam. It doesn’t need to be super specific, but I basically need to know if it’s in the left, middle or right of the screen so I can send that to an Arduino. I’ve tried nyartoolkit, but I can’t seem to make that work. Any suggestions?


1 Like


You can try to have a look at the OpenCV library:

You should be able to find plenty of useful information here and on the web.

Or you could also code it yourself. I don’t know the kind of images that you are dealing with but it can be quite easy to code something with a combination of threshold and flood fill algorithm that gives you good result.

1 Like

What kind of marker? Fiducial / QRCode, or spot color, or …?

In addition to OpenCV, BoofCV is another common library for fiducial tracking:

Thanks so much, I’ve been using the BoofCV and it works great! I’ve got the code where you can track a marker and it prints the location of the image on the screen in the console.

1 Like