ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Why is the image from PointGray camera displaying in grayscale?

asked 2017-08-21 16:15:21 -0500

ckirksey gravatar image

updated 2017-08-22 18:08:45 -0500

I'm pulling an image stream from a PointGrey camera using the FlyCapture SDK. When I display the camera feed in PointGrey's FlyCap2, the image displays in color, but when I look at the feed in RVIZ (or export the bag to jpg) it shows grayscale images. How should I address this?

Script for getting image and publishing to ROS topic

edit retag flag offensive close merge delete

Comments

Please edit your question to show the exact command you are running to view the image (or which topic you are using in rviz) and which topics are available. My suspicion is that you are not looking at the color image topic, but without more information it is difficult to provide an answer.

Thomas D gravatar image Thomas D  ( 2017-08-21 18:47:05 -0500 )edit

I'm getting the image_raw camera topic that's published by the referenced script. The raw image is coming over from the FlyCapture SDK in the bayer_gbrg8 encoding format

ckirksey gravatar image ckirksey  ( 2017-08-22 18:10:04 -0500 )edit
1

Do you see any topics such as image_color or image_rect_color? You probably need to run a node like image_proc to convert your raw images and calibration info (sensor_msgs/CameraInfo) to color/rectified images.

Thomas D gravatar image Thomas D  ( 2017-08-25 12:19:43 -0500 )edit

FYI, eventually you will need a separate calibration message (sensor_msgs/CameraInfo) per camera. Right now you have an array of images (one for each detected camera) but only a single calibration message being published.

Thomas D gravatar image Thomas D  ( 2017-08-25 12:20:35 -0500 )edit

image_proc did the trick! Thanks. I used this gist to publish CameraInfo for each camera from the yaml config file: https://gist.github.com/rossbar/ebb28...

ckirksey gravatar image ckirksey  ( 2017-08-29 18:44:45 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-08-29 20:08:50 -0500

Thomas D gravatar image

Do you see any topics such as image_color or image_rect_color? You probably need to run a node like image_proc to convert your raw images and calibration info (sensor_msgs/CameraInfo) to color/rectified images.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-08-21 16:15:21 -0500

Seen: 1,308 times

Last updated: Aug 29 '17