Ask Your Question
0

Problem with camera while running SVO live

asked 2015-01-15 01:54:19 -0500

JacoPisa gravatar image

hi everybody,

I'm trying to launch the live of SVO, but it gives me immediately this type of error:

[ INFO] [1418401675.780991894]: SVO initialized
[ INFO] [1418401675.791371920]: Found parameter: svo/cam_topic, value: /ardrone/front/image_raw
[ INFO] [1418401734.849896333]: RESET
terminate called after throwing an instance of 'std::runtime_error'
  what():  Frame: provided image has not the same size as the camera model or image is not grayscale
[svo-1] process has died [pid 11270, exit code -6, cmd /home/jacopo/catkin_ws/devel/lib/svo_ros/vo __name:=svo __log:=/home/jacopo/.ros/log/8b460c10-8218-11e4-ba87-001e6480e144/svo-1.log].
log file: /home/jacopo/.ros/log/8b460c10-8218-11e4-ba87-001e6480e144/svo-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

how i could solve it?? thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-01-15 02:41:58 -0500

From the error it looks like you might feed the system color images, but it only is able to process grayscale. Another possibility seems to be that the resolution (image size) stated in your camera_info and your image are not consistent. That would be my first guesses, given the message

Frame: provided image has not the same size as the camera model or image is not grayscale
edit flag offensive delete link more

Comments

how i can convert my image in grayscale??

JacoPisa gravatar image JacoPisa  ( 2015-01-15 02:50:41 -0500 )edit

I got the same question, can someone tell me how can i fix this problem?

zhujimson gravatar image zhujimson  ( 2016-12-19 05:05:07 -0500 )edit

you could just run the image_proc node to get the grayscale image or write your own subscriber and publisher to convert the rgb image to grayscale

nidamarthy gravatar image nidamarthy  ( 2019-05-15 16:47:27 -0500 )edit
0

answered 2021-03-11 22:57:52 -0500

Ankita gravatar image

I also encounter the same situation. This is how I solved it :

1) Convert your image to grayscale: frame = cv2.cvtColor(frame1, cv2.COLOR_BGR2GRAY) 2) Give the correct encoding to cv_bridge(in case you are using cv_bridge) : pub.publish(bridge.cv2_to_imgmsg(frame, "mono8")) 3) know your image size with : (frame.shape) and give that frame shape to your camera model yaml file. Hope this helps!!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2015-01-15 01:54:19 -0500

Seen: 1,201 times

Last updated: Jan 15 '15