Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Aruco Marker Corners Occasionally Mislocated

I have a situation where my Aruco markers are occasionally mislocated so that the marker is undersized. When this happens (<5% of images), it happens to all the markers in an image.

Here's an example of two consecutive frames:

Frame 30 is correctly located: raw image zoomed in with red stars on corners

Frame 31 with markers identified as undersized (all three are similar): raw image zoomed in with corners

I'm doing this using the Matlab wrappers from https://github.com/kyamagu/mexopencv

Aruco Marker Corners Occasionally Mislocated

I have a situation where my Aruco markers are occasionally mislocated so that the marker is undersized. When this happens (<5% of images), it happens to all the markers in an image.

Here's an example of two consecutive frames:

Frame 30 is correctly located: raw image zoomed in with red stars on corners

Frame 31 with markers identified as undersized (all three are similar): raw image zoomed in with corners

I'm doing this using the Matlab wrappers from https://github.com/kyamagu/mexopencv

Edit: identical results for the python wrappers

Everything uses defaults, here's my Matlab code:

dictionary = {'Predefined', '6x6_250'};
img=imread('frame31bad.png');

%detectorParams.cornerRefinementMethod = 'Subpix'; 
detectorParams.cornerRefinementMethod = 'Contour'; 
%detectorParams.cornerRefinementMethod = 'None';
[corners, ids, rejected] = cv.detectMarkers(img, dictionary,...
'DetectorParameters',detectorParams)


figure(2)
imshow(img)
hold all
for i=1:numel(corners)
    for j=1:4
        plot(corners{i}{j}(1),corners{i}{j}(2),'r*')
    end
end
hold off