I'm taking a sequence of frames from intel real sense and detecting april tags, I noticed the axis is flickering even camera is not moving. euler angle y axis is changing(visually and numerically) from -12 to +4 (bottom of image.)
import cv2
from realsense_class import realsense
import apriltag
import numpy as np
from rot_to_eul import rotation_angles
rs =realsense()
detector = apriltag.Detector(None, searchpath=apriltag._get_dll_path())
while True:
frame = rs.frame()
result, overlay = apriltag.detect_tags(frame,
detector,
camera_params=(602.46772263,601.47613486, 317.73338684, 238.16057326),
tag_size=0.06,
vizualization=2,
verbose=0,
annotation=True
)
#camera pose estimation
if len(result) >0:
pose = result[1]
rotM = pose[:3, 0:3]
tvec = pose[0:3,3:4]
print("Euler_Angles",rotation_angles(rotM,'xyz'))