I am using 3 AruCo markers of size 1cm each for head pose estimation in C++ using OpenCV library on live webcam stream. I am able to detect the markers and their pose accurately but had issues with stability of the pose. I used the function aruco::estimatePoseSingleMarkers for the pose.
The inputs to this function are markerCorners, arucoSquareDimension, cameraMatrix, distanceCoefficients
. Since all the parameters other than markerCorners
are constant numbers, I thought the stability of pose depends on markerCorners
which is the output of the function aruco::detectMarkers. The input to this function is my webcam stream.
I did a small experiment and printed the corners of the marker, their positions and found out that if the corners are detected stable then the pose remains stable. For some marker ids the corner were more stable compared to others maybe because they have less vertices inside the square. Also increasing the white border outside the square helped. But still the values are fluctuating a bit and I need them to be constant in order to get the accurate pose of the head.
Any advice, tips, tricks, no matter how small or large are greatly appreciated. Thank you very much. If more details are needed, I am happy to supply them. Thanks again.