Ask Your Question

Revision history [back]

ArUco detection x-y axis values are extremely different

Hello. My problem is that I am trying to detect aruco markers. I need coordinates aruco centered so I implemented this part of the code to c++ and checked. Some of the output:

    frame: 110
A X: -0.804775 Y: 0.208516 Z: 1.2107
R X: -0.791306 Y: 0.218932 Z: 1.23775
frame: 111
A X: -0.796757 Y: 0.199679 Z: 1.21298
R X: -0.794136 Y: 0.180792 Z: 1.20928
frame: 112
A X: -0.783294 Y: 0.193594 Z: 1.22591
R X: -0.760558 Y: 0.178313 Z: 1.24112
frame: 113
A X: -0.783294 Y: 0.193594 Z: 1.22591
frame: 114
A X: -0.772219 Y: 0.19086 Z: 1.22949
R X: -0.742878 Y: 0.185402 Z: 1.22981
frame: 115
A X: -0.760471 Y: 0.200374 Z: 1.23279
R X: -0.744311 Y: 0.256989 Z: 1.25096
frame: 116
A X: -0.731878 Y: 0.198095 Z: 1.26505
R X: -0.679766 Y: 0.171675 Z: 1.33831
frame: 117
A X: -0.695487 Y: 0.210412 Z: 1.30437
R X: -0.614995 Y: 0.227583 Z: 1.39838
frame: 118
A X: -0.368503 Y: 0.0875881 Z: 1.35784
R X: 0.565061 Y: -0.305894 Z: 1.4437
frame: 119
A X: -0.368503 Y: 0.0875881 Z: 1.35784
frame: 120
A X: -0.341719 Y: 0.0898316 Z: 1.38558
R X: -0.637176 Y: 0.265963 Z: 1.36194
frame: 121
A X: -0.325253 Y: 0.119372 Z: 1.39677
R X: -0.613902 Y: 0.289834 Z: 1.38308
frame: 122
A X: -0.325253 Y: 0.119372 Z: 1.39677
frame: 123
A X: -0.327192 Y: 0.153936 Z: 1.36274
R X: -0.622752 Y: 0.36584 Z: 1.26225
frame: 124
A X: -0.633316 Y: 0.331566 Z: 1.29572
R X: -0.659435 Y: 0.404626 Z: 1.17562
frame: 125
A X: -0.333012 Y: 0.149866 Z: 1.25675
R X: 0.564042 Y: -0.460838 Z: 1.20607

When I check 2 consecutive frames, we can see that even though there are almost no difference in images we get 30 centimeters of difference: Here

I calibrated well enough and I am sure of it because Z axis is very good. Results for Z axis very fine( in terms of world coordinates) but X and Y axis values are changing very different. Has anyone got the same problem? What could be the problem ?

Any idea is helpful. For the code you can check the permalink above. PS: Numbers in the image-> "Frame number: X Y"

ArUco detection x-y axis values are extremely different

Hello. My problem is that I am trying to detect aruco markers. I need coordinates aruco centered so I implemented this part of the code to c++ and checked. Some of the output:

    frame: 110
A X: -0.804775 Y: 0.208516 Z: 1.2107
R X: -0.791306 Y: 0.218932 Z: 1.23775
frame: 111
A X: -0.796757 Y: 0.199679 Z: 1.21298
R X: -0.794136 Y: 0.180792 Z: 1.20928
frame: 112
A X: -0.783294 Y: 0.193594 Z: 1.22591
R X: -0.760558 Y: 0.178313 Z: 1.24112
frame: 113
A X: -0.783294 Y: 0.193594 Z: 1.22591
frame: 114
A X: -0.772219 Y: 0.19086 Z: 1.22949
R X: -0.742878 Y: 0.185402 Z: 1.22981
frame: 115
A X: -0.760471 Y: 0.200374 Z: 1.23279
R X: -0.744311 Y: 0.256989 Z: 1.25096
frame: 116
A X: -0.731878 Y: 0.198095 Z: 1.26505
R X: -0.679766 Y: 0.171675 Z: 1.33831
frame: 117
A X: -0.695487 Y: 0.210412 Z: 1.30437
R X: -0.614995 Y: 0.227583 Z: 1.39838
frame: 118
A X: -0.368503 Y: 0.0875881 Z: 1.35784
R X: 0.565061 Y: -0.305894 Z: 1.4437
frame: 119
A X: -0.368503 Y: 0.0875881 Z: 1.35784
frame: 120
A X: -0.341719 Y: 0.0898316 Z: 1.38558
R X: -0.637176 Y: 0.265963 Z: 1.36194
frame: 121
A X: -0.325253 Y: 0.119372 Z: 1.39677
R X: -0.613902 Y: 0.289834 Z: 1.38308
frame: 122
A X: -0.325253 Y: 0.119372 Z: 1.39677
frame: 123
A X: -0.327192 Y: 0.153936 Z: 1.36274
R X: -0.622752 Y: 0.36584 Z: 1.26225
frame: 124
A X: -0.633316 Y: 0.331566 Z: 1.29572
R X: -0.659435 Y: 0.404626 Z: 1.17562
frame: 125
A X: -0.333012 Y: 0.149866 Z: 1.25675
R X: 0.564042 Y: -0.460838 Z: 1.20607

When I check 2 consecutive frames, we can see that even though there are almost no difference in images we get 30 centimeters of difference: Here

I calibrated well enough and I am sure of it because Z axis is very good. Results for Z axis very fine( in terms of world coordinates) but X and Y axis values are changing very different. Has anyone got the same problem? What could be the problem ?

Any idea is helpful. For the code you can check the permalink above. PS: Numbers in the image-> "Frame number: X Y"

Edit: Frame 110 and 121 below. Dict name -> cv::aruco::DICT_6X6_100

110 121

ArUco detection x-y axis values are extremely different

Hello. My problem is that I am trying to detect aruco markers. I need coordinates aruco centered so I implemented this part of the code to c++ and checked. Some of the output:

    frame: 110
A X: -0.804775 Y: 0.208516 Z: 1.2107
R X: -0.791306 Y: 0.218932 Z: 1.23775
frame: 111
A X: -0.796757 Y: 0.199679 Z: 1.21298
R X: -0.794136 Y: 0.180792 Z: 1.20928
frame: 112
A X: -0.783294 Y: 0.193594 Z: 1.22591
R X: -0.760558 Y: 0.178313 Z: 1.24112
frame: 113
A X: -0.783294 Y: 0.193594 Z: 1.22591
frame: 114
A X: -0.772219 Y: 0.19086 Z: 1.22949
R X: -0.742878 Y: 0.185402 Z: 1.22981
frame: 115
A X: -0.760471 Y: 0.200374 Z: 1.23279
R X: -0.744311 Y: 0.256989 Z: 1.25096
frame: 116
A X: -0.731878 Y: 0.198095 Z: 1.26505
R X: -0.679766 Y: 0.171675 Z: 1.33831
frame: 117
A X: -0.695487 Y: 0.210412 Z: 1.30437
R X: -0.614995 Y: 0.227583 Z: 1.39838
frame: 118
A X: -0.368503 Y: 0.0875881 Z: 1.35784
R X: 0.565061 Y: -0.305894 Z: 1.4437
frame: 119
A X: -0.368503 Y: 0.0875881 Z: 1.35784
frame: 120
A X: -0.341719 Y: 0.0898316 Z: 1.38558
R X: -0.637176 Y: 0.265963 Z: 1.36194
frame: 121
A X: -0.325253 Y: 0.119372 Z: 1.39677
R X: -0.613902 Y: 0.289834 Z: 1.38308
frame: 122
A X: -0.325253 Y: 0.119372 Z: 1.39677
frame: 123
A X: -0.327192 Y: 0.153936 Z: 1.36274
R X: -0.622752 Y: 0.36584 Z: 1.26225
frame: 124
A X: -0.633316 Y: 0.331566 Z: 1.29572
R X: -0.659435 Y: 0.404626 Z: 1.17562
frame: 125
A X: -0.333012 Y: 0.149866 Z: 1.25675
R X: 0.564042 Y: -0.460838 Z: 1.20607

When I check 2 consecutive frames, we can see that even though there are almost no difference in images we get 30 centimeters of difference: Here

I calibrated well enough and I am sure of it because Z axis is very good. Results for Z axis very fine( in terms of world coordinates) but X and Y axis values are changing very different. Has anyone got the same problem? What could be the problem ?

Any idea is helpful. For the code you can check the permalink above. PS: Numbers in the image-> "Frame number: X Y"

Edit: Frame 110 and 121 below. Dict name -> cv::aruco::DICT_6X6_100cv::aruco::DICT_6X6_100 And calibration matrix(copy pasting):

<?xml version="1.0"?>
<opencv_storage>
<calibration_Time>"Çrş 28 Kas 2018 12:26:15 CET"</calibration_Time>
<nrOfFrames>18</nrOfFrames>
<image_Width>640</image_Width>
<image_Height>480</image_Height>
<board_Width>9</board_Width>
<board_Height>6</board_Height>
<square_Size>2.5000000372529030e-02</square_Size>
<FixAspectRatio>1.</FixAspectRatio>
<!-- flags:  +fix_aspectRatio +fix_principal_point +zero_tangent_dist -->
<flagValue>14</flagValue>
<Camera_Matrix type_id="opencv-matrix">
  <rows>3</rows>
  <cols>3</cols>
  <dt>d</dt>
  <data>
    3.5605857107067891e+02 0. 320. 0. 3.5605857107067891e+02 240. 0. 0.
    1.</data></Camera_Matrix>
<Distortion_Coefficients type_id="opencv-matrix">
  <rows>5</rows>
  <cols>1</cols>
  <dt>d</dt>
  <data>
    -3.6909717721129226e-01 1.8826472886300075e-01 0. 0.
    -5.3866147191806595e-02</data></Distortion_Coefficients>
<Avg_Reprojection_Error>1.0509950499922032e+00</Avg_Reprojection_Error>
<Per_View_Reprojection_Errors type_id="opencv-matrix">
  <rows>18</rows>
  <cols>1</cols>
  <dt>f</dt>
  <data>
    4.21753258e-01 4.32509392e-01 5.25688529e-01 1.05710530e+00
    2.86682010e+00 3.88209701e-01 3.67245942e-01 3.48465264e-01
    5.46378076e-01 5.44550776e-01 3.82966489e-01 7.16525733e-01
    1.44962454e+00 3.42115909e-01 2.36480251e-01 3.18511754e-01
    3.61394346e-01 2.39512825e+00</data></Per_View_Reprojection_Errors>
<!-- a set of 6-tuples (rotation vector + translation vector) for each view -->
<Extrinsic_Parameters type_id="opencv-matrix">
  <rows>18</rows>
  <cols>6</cols>
  <dt>d</dt>
  <data>
    2.3581028259579853e-01 3.4539730619057274e-01 1.5523727598471431e+00
    6.9464469780005714e-02 -7.1694380841610492e-02
    2.0463295376002996e-01 2.9418612466600841e-01 4.2676946569039953e-01
    1.5364493644155324e+00 -4.6404770426430618e-02
    -8.4565075422056782e-02 2.6070531698922517e-01
    5.9691185609737846e-03 8.6559798484542996e-02 1.6962936517036924e+00
    -2.6473938720402771e-02 -8.7766539473429439e-02
    1.8687467346387215e-01 7.0130552689413717e-01 7.3882343349733670e-01
    1.4088088052476528e+00 2.2876335404880907e-01
    -3.9252476855882609e-02 4.3295500159094941e-01
    3.6420169858140539e-01 5.5503239295526918e-01 1.3842808555868522e+00
    3.8500024333253530e-02 3.8227889750786351e-02 4.6073001470197378e-01
    4.9913440052463015e-01 6.4511698850380506e-01 1.4040472224346119e+00
    1.5372913101538044e-01 -6.9727318344403169e-02
    2.1026752095524409e-01 2.4867644100931541e-01 2.1155425331581862e-01
    1.0833360018240219e+00 -8.9277884861856602e-02
    -5.7505480153457744e-02 2.7636181076417121e-01
    5.0049683625497488e-01 1.4667573142132226e-01 1.5479570605011996e+00
    1.9542080280279706e-02 -1.6139684495309319e-02
    3.0785585364881435e-01 3.4285133529340034e-01 1.8426958215181805e-01
    1.6380107852799111e+00 7.2066994089945616e-02
    -1.1623841164969324e-01 1.8225618963197235e-01
    1.7346308279257647e-01 1.0306068457409524e-01 1.6988854236892463e+00
    -3.8748602274881222e-02 -1.0505785959022078e-01
    1.8296145373312206e-01 6.3259254790171082e-01 5.2242977054390771e-01
    1.5509774010247288e+00 1.6159727649707073e-01
    -1.2754641230786581e-01 1.9665889763934019e-01
    1.9846684098363976e-01 3.8205315130670375e-01 1.5509453961009463e+00
    -7.7036794049779450e-02 -7.6206066240487522e-02
    2.5051726675420971e-01 6.8622350896385076e-01 2.3949573314491704e-01
    1.4269589534584088e+00 1.5778180182133075e-02
    -1.4989968578995053e-01 3.7309965747309826e-01
    2.6573184511757264e-01 2.6615917692392121e-01 1.5512812261896871e+00
    -1.8045034972342607e-02 -9.5223197452107777e-02
    2.8197527003124989e-01 1.5068834884307616e-01 6.4139545186130353e-02
    1.9685217727179372e+00 -6.9291829129256952e-02
    -1.1772227236425828e-01 3.4473521602563412e-01
    4.4730915438449298e-01 4.4432074273144823e-01 1.4585243030781976e+00
    6.5735408278935939e-02 -8.5038756333707943e-02
    2.9567322726385536e-01 6.7765344951514184e-01 4.2568754889520533e-01
    8.2808184592947853e-01 4.5146101431694771e-02
    -1.2967637962832648e-01 2.7086308987256902e-01
    6.8202115853238410e-01 2.2932931237326193e-01 1.0637596715838866e+00
    -2.7202954328139729e-02 -1.1480272501957763e-01
    3.9745759535277375e-01</data></Extrinsic_Parameters>

110 121C:\fakepath\110.png C:\fakepath\121.png