-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to find pose data from 3x3 homography matrix ? #14
Comments
Hi, please read through issue #10 – I hope you will find some helpful information there. Let me know if you still have questions after reading it. |
Thank you for quick replay. as according to issue #10, the three values in the 4x4 pose matrix ( -0.41820917, -0.18913546, 1.33183182 ) show me the X, Y, and Z positions respectively. but the value of Z is wrong in my case. The actual distance in my case is 0.9 meter. so my question is, Why Pose matrix X, Y, and Z values show me wrong? |
This article I wrote describes what a homography matrix is: https://mzucker.github.io/2016/10/11/unprojecting-text-with-ellipses.html The homography matrix will not in general correspond directly to physical measurements because it is a product of the camera intrinsics and the pose of the tag. In this case, I believe the fact that the bottom-right entry resembles the distance you measured is a coincidence. What are the dimensions (resolution) of the images you are detecting tags in, and how did you obtain the calibration values listed above? |
calibration values are find via calibrate_camera.py code. Click the image of the chessboard via Logitech C270 camera and run calibrate_camera.py code. |
I don't trust the camera calibration values you provided for that camera. For the vast majority of desktop webcams you would expect to see focal lengths (fx, fy) on the order of image width and optical center (cx, cy) towards the center of the image. So for that camera, I would expect fx,fy to be in the 500-800 range, and the (cx, cy) point to be much closer to (320, 240) (that is 640/2, 480/2). If you attach your chessboard calibration images here, I can try verifying your calibration values. |
I can't access that image on Google drive, but github accepts attachments to replies. Note you must use multiple images to calibrate the camera. One is not sufficient! See for example https://github.com/swatbotics/apriltag/tree/master/images/mapping_feb_2014/calibration |
Right, the problem as I mentioned above is that you are only using a single image file. See the example images I linked to in my last message to get an idea of the number and variety of images you should be using. |
Ok got it. |
I would recommend in the range of 10-20 images. You will not get good data with 2 or 3 images. |
Ok sir .. |
first of all, thank you for writing an April Tag code in python.
My camera calibration values are fx, fy, cx, cy = (1600.686892782011, 1598.3654331406094, 640, 480)
Homography: [[ 2.92529352e-01 1.25090562e-01 5.47693202e+00]
[-5.70424844e-01 4.61686531e-01 3.91037508e+00]
[-4.98269301e-04 -4.78715645e-04 1.06762929e-02]]
Center: [512.99941666 366.26712251]
Corners: [[434.15356445 344.89123535]
[529.65270996 270.08859253]
[607.72912598 391.94927979]
[496.40701294 462.09399414]]
my homography matrix is accurate or not? because of the Homography matrix value change continuously.
if this matrix is accurate then how to find Pose data from the 3x3 matrix?
The text was updated successfully, but these errors were encountered: