Go to the documentation of this file.
36 #ifndef JSK_RECOGNITION_UTILS_CAMERA_DEPTH_SENSOR_H_
37 #define JSK_RECOGNITION_UTILS_CAMERA_DEPTH_SENSOR_H_
40 #include <sensor_msgs/CameraInfo.h>
45 class CameraDepthSensor:
public PointCloudSensorModel
51 virtual void setCameraInfo(
const sensor_msgs::CameraInfo& info)
70 virtual bool isInside(
const cv::Point&
p)
const
85 return f*
f / (distance*distance) * area;
92 virtual cv::Mat
image(
const int type)
const
101 virtual int width()
const
110 virtual int height()
const
121 return cv::Point(std::min(std::max(
p.x, 0),
width()),
122 std::min(std::max(
p.y, 0),
height()));
virtual int width() const
width of camera in pixels.
virtual cv::Mat image(const int type) const
return an image from internal camera parameter.
virtual cv::Point limit2DPoint(const cv::Point &p) const
force point to be inside of field of view.
sensor_msgs::CameraInfo camera_info_
image_geometry::PinholeCameraModel model_
bool fromCameraInfo(const sensor_msgs::CameraInfo &msg)
virtual image_geometry::PinholeCameraModel getPinholeCameraModel() const
get instance of image_geometry::PinholeCameraModel.
virtual void setCameraInfo(const sensor_msgs::CameraInfo &info)
boost::shared_ptr< CameraDepthSensor > Ptr
virtual int height() const
height of camera in pixels.
virtual double expectedPointCloudNum(double distance, double area) const
Return the expected number of points according to distance and area. it is calculated according to: f...
virtual bool isInside(const cv::Point &p) const
return true if point p is inside of field-of-view.