Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not change Image shape and size #1805

Closed
Shunichi09 opened this issue Apr 12, 2021 · 3 comments
Closed

Can not change Image shape and size #1805

Shunichi09 opened this issue Apr 12, 2021 · 3 comments
Labels

Comments

@Shunichi09
Copy link

I noticed that from version 2.2.22, the default image size became (height: 720, width: 1280) from (height: 480, width: 640) when I run this launch file

<launch>
    <group>
        <include file="$(find realsense2_camera)/launch/rs_camera.launch" >
            <arg name="align_depth" value="true" />
            <arg name="filters" value="disparity,spatial,temporal,decimation,hole_filling"/>
       </include>
    </group>
</launch>

Therefore, I would like to change my image size to old style (height: 480, width: 640), but /camera/image_raw/camera_info showed the shape was still (height: 720, width: 1280).
How to fix this problem ??

<launch>
    <group>
        <!-- https://github.com/IntelRealSense/librealsense/blob/master/doc/post-processing-filters.md -->
        <include file="$(find realsense2_camera)/launch/rs_camera.launch" >
            <arg name="fisheye_width"       default="640"/>
            <arg name="fisheye_height"      default="480"/>
            <arg name="enable_fisheye"      default="false"/>
            <arg name="depth_width"         default="640"/>
            <arg name="depth_height"        default="480"/>
            <arg name="enable_depth"        default="true"/>
            <arg name="infra_width"        default="640"/>
            <arg name="infra_height"       default="480"/>
            <arg name="enable_infra1"       default="true"/>
            <arg name="enable_infra2"       default="true"/>
            <arg name="color_width"         default="640"/>
            <arg name="color_height"        default="480"/>
            <arg name="enable_color"        default="true"/>
            <arg name="align_depth" value="true" />
            <arg name="filters" value="disparity,spatial,temporal,decimation,hole_filling"/>
       </include>
    </group>
</launch>

I'm using realsense d435i and melodic.
Thank you for your help.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Apr 12, 2021

Hi @Shunichi09 A discussion in the link below describes the changes from RealSense ROS wrapper 2.2.22 onward in regard to profiles.

#1757

To set a custom configuration you should specify three parameters for each stream type that you are configuring: Width, Height and FPS. You can place these definitions in the rs_camera.launch roslaunch instruction.

@Shunichi09
Copy link
Author

Thank you for your comments !!
I understood and I can change my image size by defining the fps as well as other parameters.

@MartyG-RealSense
Copy link
Collaborator

Excellent news @Shunichi09 - thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants