This package functions as a ROS node, facilitating the publication of images from the PC webcam for camera calibration tutorials.
~/catkin_webcam_ws/src
)catkin build
under ~/catkin_webcam_ws
source ~/catkin_webcam_ws/devel/setup.bash
check-108.pdf
under the checkboard
directoryTerminal #1:
roscore
Terminal #2:
roslaunch webcam_retrieval start_webcam.launch
Terminal #3:
rviz
Note that you need to change "Image Topic" to /image_view/image_raw
in Rviz to see the camera readings.
Terminal #4:
rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 image:=/image_view/image_raw
In order to get a good calibration you will need to move the checkerboard around in the camera frame such that:
At each step, hold the checkerboard still until the image is highlighted in the calibration window. As you move the checkerboard around you will see three bars on the calibration sidebar increase in length. When the "CALIBRATE" button lights, you have enough data for calibration and can click "CALIBRATE" to see the results.
Calibration can take about a minute. The windows might be greyed out but just wait, it is working. At the end of calibration process, you will see the results in the terminal as follows.
Click "SAVE" to save the results (in form of a zip file), including the intrinsic matrix and all the images captured for the camera calibration.
Cannot read or open camera.
Open the terminal and type ls /dev/video*
to list available serial ports for webcams connected to your system.
Use the command ffplay /dev/video0
with different available video IDs to identify the working webcam. Replace the number in cv2.VideoCapture(0)
with the correct ID in the webcam_node.py
file.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。