Hello.
I would like to make a cropped image from raw image in python.
In my program,
I can subscribe `/usb_cam/image_raw` (`sensor_msgs/Image`, height=480, width=640) and `/usb_cam/camera_info` (`sensor_msgs/CameraInfo`).
Then, I modified roi in `/usb_cam/camera_info` like below,
edited_camera_info.roi.x_offset = 320
edited_camera_info.roi.y_offset = 240
and publish edited camera info and image.
pub_edited_image.publish(no_edited_image)
pub_edited_camera_info.publish(edited_camera_info)
However, there are no differences between `/usb_cam/image_raw` and `/editted_image_raw`.
Is it possible to crop a part of an image by modifying camera_info?
Or, is there any alternative ways to realize to crop an image?
↧