Decimation function of image_proc for dropping depth image resolution

asked 2014-10-06 11:18:26 -0500

yooncs8 gravatar image

updated 2014-10-06 17:02:38 -0500

Hi all,

Currently I am trying to use image_proc/crop_decimate to reduce the both rgb and depth image resolution of a sensor that I am using. I was able to drop the resolution for rgb image using decimation_x and decimation_y parameters. But for depth image case, it did not work. I am wondering if this image_proc/crop_decimate function is not for depth image, but only for rgb image. I am using Ubuntu 14.04 and ROS indigo. Is there anyone who has dealt with image_proc/crop_decimate for depth image? If there is something I missed, please let me know.

Thank you.

--edit

This is what my lauch file looks like

<launch>
    <!-- Image_proc -->
    <node pkg="image_proc" type="image_proc" name="image_proc">
    </node>

    <node pkg="nodelet" type="nodelet" name="downsample_depth" args="standalone image_proc/crop_decimate">
        <param name="decimation_x" type="int" value="4"/>
        <param name="decimation_y" type="int" value="4"/>

        <!-- remap input topics -->
        <remap from="camera/image_raw" to="Your_sensor/image_depth"/>
        <remap from="camera/image_info" to="Your_sensor/camera_info"/>
        <!-- remap output topics -->
        <remap from="camera_out/image_raw" to="image_depth_in"/>
        <remap from="camera_out/camera_info" to="depth_camera_info_in"/>
    </node>

    <node "Other package related nodes" />
</launch>

I simply replaced my real rostopic name of sensor with "Your_sensor". This works for RGB image, but for depth image like the above launch file, it does not work. I also checked that Your_sensor/image_depth and Your_sensor/camera_info rostopics being published correctly while rostopic echo /image_depth_in command gave nothing.

edit retag flag offensive close merge delete

Comments

I have some vague memory that this should probably work, but it's been a few years since I looked at it.

It may help if you describe exactly how the crop_decimate nodelet didn't work in your case, and the commands and launch files that you were using.

ahendrix gravatar imageahendrix ( 2014-10-06 13:35:37 -0500 )edit

I just edited my question. Hope you could remember something from it. Thanks.

yooncs8 gravatar imageyooncs8 ( 2014-10-06 17:01:02 -0500 )edit

I don't remember anything else offhand, but hopefully someone else will see this and be able to offer an answer. You may also want to play around with rqt_graph to confirm that your topics are connected properly and inspect the data rates on each topic.

ahendrix gravatar imageahendrix ( 2014-10-06 17:51:43 -0500 )edit