Ask Your Question
6

compressed image to image

asked 2012-05-29 08:47:25 -0500

han gravatar image

I'm using rosjava to write code, but now when i use pi_face_tracker, i come across problems. The input of the pi_face_tracker should be type image, but what i get form the camera is compressed image. What should i do to solve it? Thank you.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
14

answered 2012-05-29 10:28:54 -0500

You can use the republish node to convert the transport from compressed to raw. Your call will look something like this:

rosrun image_transport republish compressed in:=(in_base_topic) raw out:=(out_base_topic)
edit flag offensive delete link more

Comments

I don't know what class i can use for this in rosjava, can you help me on it?

han gravatar image han  ( 2012-05-30 23:21:29 -0500 )edit

@han: I am not sure if I understand your question. You cannot call this in code from Java. It is a C++ binary. You should run it as a node alongside pi_face_tracker.

piyushk gravatar image piyushk  ( 2012-05-31 06:38:04 -0500 )edit

How could I include this rosrun inside of a launch file?

jorgelc79 gravatar image jorgelc79  ( 2015-05-14 05:32:03 -0500 )edit
5

answered 2016-07-29 03:23:44 -0500

jtim gravatar image

I know this is an old question, but if somebody is looking for how to do this in a launch file the answer is here: http://answers.ros.org/question/12216...

the code is:

<node name="republish" type="republish" pkg="image_transport" output="screen" args="compressed in:=/axis_camera raw out:=/axis_camera/image_raw" />
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

Stats

Asked: 2012-05-29 08:47:25 -0500

Seen: 10,822 times

Last updated: Jul 29 '16