ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I have been able to obtain the distance with a very simple line of code...
double distance;
distance = 0.001*cv_ptr->image.at<u_int16_t>(cv_ptr->image.rows/2, cv_ptr->image.cols/2);
This gives me the distance of the object in the center of the image.
2 | No.2 Revision |
I have been able to obtain the distance with a very simple line of code...
double distance;
distance = 0.001*cv_ptr->image.at<u_int16_t>(cv_ptr->image.rows/2, cv_ptr->image.cols/2);
This gives me the distance of the object in the center of the image.image. In meters.