Ask Your Question
0

I want to change the autosize parameter

asked 2019-06-14 13:35:30 -0500

Nirvenesh gravatar image

I want edit a parameter from this package link text under stereo_view I have no idea on how to do it as by default i launch it like rosrun image_view stereo_view stereo:=/stereo image:=image_rect_colorbut i want to be able to edit the window size of it

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2019-06-20 09:10:32 -0500

tryan gravatar image

updated 2019-06-20 09:12:30 -0500

The stereo_view node does not allow for direct manipulation of the image size. The autosize parameter only determines whether the window will be fixed and sized to the image (autosize = true), or the user will be able to change the size (autosize = false). To change the parameter, you can write a launch file to launch the node and set the parameter:

<launch>
  <node name="stereo_view" pkg="image_view" type="stereo_view">
    <param name="autosize" value="false" />
    <remap from="image" to="image_rect_color" />
  </node>
</launch>

Since you mention editing the window size, there are at least three ways to resize the window:

  1. The ROS-iest way to do it is to use the image_proc/resize nodelet to make the image the size you want it to be before displaying it. You can then use the resized image as input to the stereo_view node and set autosize = true to force the output window to remain that size.

  2. Another option would be to modify the stereo_view node source code (or write your own node). There you can use OpenCV commands (e.g., cv2.resize) to change the image/window size.

  3. A (perhaps messier) option would be to write a separate script to resize the window (with autosize = false). For this option, I would suggest searching somewhere like Stack Overflow (e.g., this answer mentions the Python win32gui package).

edit flag offensive delete link more

Comments

1

Just a tip, the rosrun equivilent of the above launch file would be:

rosrun image_view stereo_view stereo:=/stereo image:=image_rect_color _autosize:=false
davrsky gravatar imagedavrsky ( 2019-06-20 11:09:32 -0500 )edit
0

answered 2019-06-20 08:53:02 -0500

xinwf gravatar image

Set autosize to false

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

1 follower

Stats

Asked: 2019-06-14 13:35:30 -0500

Seen: 188 times

Last updated: Jun 20