minor scale change in distance between pixels
This commit is contained in:
@ -874,8 +874,14 @@ cv::Point2f Feature::pixelDistanceAt(
|
||||
cam.distortion_coeffs,
|
||||
pure);
|
||||
|
||||
// returns the absolute pixel distance at pixels one metres away
|
||||
cv::Point2f distance(fabs(pure[0].x - pure[1].x), fabs(pure[2].y - pure[3].y));
|
||||
// transfrom position to camera frame
|
||||
// to get distance multiplier
|
||||
Eigen::Matrix3d R_w_c0 = quaternionToRotation(cam_state.orientation);
|
||||
const Eigen::Vector3d& t_c0_w = cam_state.position;
|
||||
Eigen::Vector3d p_c0 = R_w_c0 * (in_p-t_c0_w);
|
||||
|
||||
// returns the distance between the pixel points in space
|
||||
cv::Point2f distance(fabs(pure[0].x - pure[1].x)*p_c0[2], fabs(pure[2].y - pure[3].y)*p_c0[2]);
|
||||
|
||||
return distance;
|
||||
}
|
||||
|
Reference in New Issue
Block a user