Solve PnP or Estimate Pose Single Markers: which is better?


I need a program to estimate the pose of an ArUco marker, and, as far as I know, I can code it with two different functions: cv2.solvePnp() or cv2.aruco.estimatePoseSingleMarker(). Which one is better? I read about them, and it seems easier to use cv2.aruco.estimatePoseSingleMarker(), but is it as accurate as cv2.solvePnP()?

I am a graduating student, and I need this information because I am doind a reaserch with a teacher.

Asked By: Matheus



Both functions, cv2.solvePnP() and cv2.aruco.estimatePoseSingleMarker(), can be used to estimate the pose of an ArUco marker. The main difference between them is that cv2.aruco.estimatePoseSingleMarker() is specifically designed to work with ArUco markers, while cv2.solvePnP() is a more general-purpose function for pose estimation.

cv2.aruco.estimatePoseSingleMarker() is a higher-level function that internally uses cv2.solvePnP() for pose estimation. It simplifies the process by taking care of marker detection and corner extraction, making it easier to use. In most cases, using cv2.aruco.estimatePoseSingleMarker() should be sufficient, and it should provide similar accuracy to cv2.solvePnP() since it uses cv2.solvePnP() internally.

However, if you require more control over the pose estimation process, such as using custom marker detection algorithms or applying additional constraints, you might want to use cv2.solvePnP() directly.

Answered By: Matteo Bianchi