1, 安装cheese确认摄像头可用, cheese黑屏:在VM设置(切换USB2.0/3.0 之后重新disconnect/connect) camara。
2, 分辨率设置:
<!-- Camera driver -->
<node pkg="usb_cam" type="usb_cam_node" name="camera">
<param name="video_device" value="/dev/video0" />
<param name="image_width" value="640" />
<param name="image_height" value="480" />
<param name="pixel_format" value="yuyv" />
<param name="camera_frame_id" value="usb_cam" />
<param name="io_method" value="mmap"/>
</node>
<!-- Show video output -->
<group if="$(arg view)">
<!-- Image viewer (non-rectified image) -->
<node pkg="image_view" type="image_view" name="image_raw">
<remap from="image" to="camera/image_raw"/>
<param name="autosize" value="true" />
</node>
</group>
******************************************** sterie camera to cloud point ******************
3, Depth Estimation From Stereo Video
https://cn.mathworks.com/help/vision/examples/depth-estimation-from-stereo-video.html
4: QUESTION : At this moment, we are working with a standard Videre stereo camera and make use of standard nodes available from ROS repositories to publish a dense point cloud (stereo_image_proc: node). It would be of great help if we could have some suggestions on how to correlate a point on a 2D stereo images to a 3D point in a point cloud? Do we need to make a new node to perform this operation? What would be its feasibility, accuracy?
ANSWER :
1. If you want to associate points in the 3D cloud with real pixels in the image, look at the points2 message (of type PointCloud2) that stereo_image_proc publishes. The points in the points2 message are arranged in an array that corresponds to the original image array, so points[x][y] corresponds to image[x][y].
2. If you want to project a new point in space onto the image, look at the image_geometry package (http://www.ros.org/wiki/image_geometry).
SEE ALSO : http://wiki.ros.org/stereo_image_proc http://wiki.ros.org/image_geometry
https://blog.youkuaiyun.com/qq_25241325/article/details/82705003
ROS:使用usb_cam软件包调试usb摄像头