试验了好久了,终于成功了!用OpenNI获取彩色和深度数据流,转化成OpenCV的Mat图像格式。
对相机进行标定,获取相机的内部参数:
Calibration results after optimization (with uncertainties): //优化后的参数值
Focal Length: fc = [ 510.99171 513.71815 ] ? [ 1.99569 2.13975 ] //焦距
Principal point: cc = [ 324.12889 236.29232 ] ? [ 3.66214 3.41361 ] //关键点
Skew: alpha_c = [ 0.00000 ] ? [ 0.00000 ] => angle of pixel axes = 90.00000 ? 0.00000 degrees
Distortion: kc = [ 0.06196 -0.25035 -0.00173 0.00098 0.00000 ] ? [ 0.02152 0.08623 0.00242 0.00263 0.00000 ]
Pixel error: err = [ 0.33426 0.40108 ]
设(u, v)是像素坐标系的坐标,(Xw, Yw,