Confusion about Camera Extrinsics and how to use
I want to utilize the Color camera and make some coordinate transforms using AprilTags for depth to compare against the Intel camera distance measurements.
1) I grab an color and a depth image. I can see the corner at Color=(771,642) and Depth=(295,255). I know the depth is d=.257m at this point as measured by the intel depth camera.
I get the Color to depth extrinsic matrix resulting in a R, t.
Using the deprojection formula on my color pixel (x,y)=(771,642)
Xc=d*(x-ppx_color)/fx_color
Yc=d*(y-ppy_color)/fy_color
Zc=d
Vc=[Xc, Yc, Zc]'
PointInDepth=R*Vc+t
However, when I use Pixel in the depth image eg (xd,yd)=(295,255)
Xd=d*(xd-ppx_depth)/fx_depth
Yd=d*(yd-ppy_depth)/fy_depth
Zd=d
PointDepthTest=[Xd Yd Zd]'
It does not match or even close - is this thinking correct or am I missing something?
-
As far reference:
Intrinsic of "Color" / 1920x1080 / {YUYV/RGB8/BGR8/RGBA8/BGRA8/Y16/RAW16}
Width: 1920
Height: 1080
PPX: 974.587890625
PPY: 558.511108398438
Fx: 1369.154296875
Fy: 1369.32470703125
Distortion: Inverse Brown Conrady
Coeffs: 0 0 0 0 0
FOV (deg): 70.07 x 43.04Intrinsic of "Depth" / 640x480 / {Z16}
Width: 640
Height: 480
PPX: 323.4189453125
PPY: 235.509460449219
Fx: 380.074157714844
Fy: 380.074157714844
Distortion: Brown Conrady
Coeffs: 0 0 0 0 0
FOV (deg): 80.19 x 64.54Extrinsic from "Color" To "Depth" :
Rotation Matrix:
0.999894 -0.0139659 -0.00408642
0.0139599 0.999901 -0.0014971
0.00410692 0.00143989 0.999991Translation Vector: -0.0147322081029415 -0.000222114700591192 -0.00035787993692793
Here:
Vc= 0.039880714122219
-0.056764902027478
0.257000000000000PointInDepth= 0.005142461480324
-0.019759122770648
0.283606551020812but
PointDepthTest=0.040226541210939
-0.040963929820769
0.257000000000000
Please sign in to leave a comment.
Comments
1 comment