【ARToolkit】History function increases stability and reduces accuracy

      We know that in ARToolkit, the real-world video is first captured by the camera, and then sent to the computer. The computer then matches the identification card. If it is found, it calculates the relative matrix, adjusts the position and orientation of the model, and finally displays it.

      Among them, when displaying, if you bring the object close to the camera and press the 'c' key, there will be differences. One is very stable, and the other image will shake. One of the important reasons is whether to use the history function, the history function can increase the stability and appear the image faster, but it will reduce the accuracy, take simpleTest.c as an example, in the mainloop function


The function arGetTransMatCont uses information from previous image frames to reduce the jitter of the badge. Using the function arGetTransMat, only the information of the current image frame is used to calculate the position of the marker. When using the history function, the accuracy of the results is reduced because the use of historical information increases the loss of accuracy. 

In the detection phase, ARToolKit provides another historical function to ensure stability. This function is arDetectMarker. In simpletest.c, the function that does not use historical information in the detection phase is arDetectMarkerLite. We use the following code to arDetectMarkerLite replaces arGetTransMatCont to enhance stability, but it will reduce accuracy, and the graphics are in a 'jittery' state


Recompile simpletest, align the identification card with the camera, and in the detection phase, you will find that the graphics are in the 'jumping' phase. There is a slight jitter at the edges of the image,

The reason for the jumping is that there is no information of the previous frame, and the position of the logo is not good enough, so that the detection is not effective enough. Therefore, using the history function can know the information of the previous frame, which can make the image more stable.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325604732&siteId=291194637