I want to change the autosize parameter
I want edit a parameter from this package link text under stereoview I have no idea on how to do it as by default i launch it like `rosrun imageview stereoview stereo:=/stereo image:=imagerect_color`but i want to be able to edit the window size of it
Asked by Nirvenesh on 2019-06-14 13:35:30 UTC
Answers
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:
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 thestereo_view
node and setautosize = true
to force the output window to remain that size.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.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 Pythonwin32gui
package).
Asked by tryan on 2019-06-20 09:10:32 UTC
Comments
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
Asked by davrsky on 2019-06-20 11:09:32 UTC
Comments