gonmrm
gonmrm

Reputation: 89

How to detect aruco markers on low resolution image

I have an image where I want to detect aruco markers DICT_4X4_50. However, the image resolution seems to present itself as a major problem. But it is rather strange, since aruco detection function is able to detect markers on much difficult images, but not this one. Is there any way to detect them?

I already tried changing some parameter values of detector parameters, but it didn't help, and modifying values randomly does not seem to be the best option at all. This is the image: aruco markers bad resolution

This was my basic code:


import cv2
from cv2 import aruco

img = cv2.imread('image.png')

aruco_dict = aruco.Dictionary_get(aruco.DICT_4X4_50)
parameters = aruco.DetectorParameters_create()

# Detect the markers.
corners, ids, rejectedImgPoints = aruco.detectMarkers(img,aruco_dict,parameters=parameters)

out = aruco.drawDetectedMarkers(img, corners, ids)

cv2.imshow("out",out)
cv2.waitKey(0)
cv2.destroyAllWindows()

Thank you!

Upvotes: 3

Views: 3734

Answers (2)

gonmrm
gonmrm

Reputation: 89

Found the problem. Symbols are vertically rotated. If the image is flipped, it will be fine. :P No wonder Aruco could not solve that.

Upvotes: 0

Yashu Agrawal
Yashu Agrawal

Reputation: 79

In you code you have not defined the detect markers code cv2.detectMarkers()

Upvotes: 0

Related Questions