Skip to content

Commit

Permalink
Merge pull request #2 from meitiever/STEVE
Browse files Browse the repository at this point in the history
[New Feature] add image view package.
  • Loading branch information
meitiever authored Apr 19, 2019
2 parents 9cb2173 + 0842fbe commit c853f43
Show file tree
Hide file tree
Showing 18 changed files with 2,655 additions and 0 deletions.
188 changes: 188 additions & 0 deletions image_view/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
1.12.23 (2018-05-10)
--------------------

1.12.22 (2017-12-08)
--------------------

1.12.21 (2017-11-05)
--------------------
* call namedWindow from same thread as imshow, need waitKay, now cvStartWindowThreads is null funciton on window_QT.h (`#279 <https://github.com/ros-perception/image_pipeline/issues/279>`_)
* Contributors: Kei Okada

1.12.20 (2017-04-30)
--------------------
* DisparityViewNodelet: fixed freeze (`#244 <https://github.com/ros-perception/image_pipeline/issues/244>`_)
* launch image view with a predefined window size (`#257 <https://github.com/ros-perception/image_pipeline/issues/257>`_)
* Remove python-opencv run_depend for image_view (`#270 <https://github.com/ros-perception/image_pipeline/issues/270>`_)
The `python-opencv` dependency pulls in the system OpenCV v2.4 which is
not required since the `image_view` package depends on `cv_bridge` which
pulls in `opencv3` and `opencv3` provides the python library that
`image_view` can use.
* Fix encoding error message (`#253 <https://github.com/ros-perception/image_pipeline/issues/253>`_)
* Fix encoding error message
* Update image_saver.cpp
Allow compilation on older compilers
* Including stereo_msgs dep fixes `#248 <https://github.com/ros-perception/image_pipeline/issues/248>`_ (`#249 <https://github.com/ros-perception/image_pipeline/issues/249>`_)
* Add no gui mode to just visualize & publish with image_view (`#241 <https://github.com/ros-perception/image_pipeline/issues/241>`_)
* stere_view: fixed empty left, right, disparity windows with opencv3
* Apply value scaling to depth/float image with min/max image value
If min/max image value is specified we just use it, and if not,
- 32FC1: we assume depth image with meter metric, and 10[m] as the max range.
- 16UC1: we assume depth image with milimeter metric, and 10 * 1000[mm] as the max range.
* Depends on cv_bridge 1.11.13 for CvtColorForDisplayOptions
Close `#238 <https://github.com/ros-perception/image_pipeline/issues/238>`_
* fix doc jobs
This is a proper fix for `#233 <https://github.com/ros-perception/image_pipeline/issues/233>`_
* address gcc6 build error
With gcc6, compiling fails with `stdlib.h: No such file or directory`,
as including '-isystem /usr/include' breaks with gcc6, cf.,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129.
This commit addresses this issue for this package in the same way
it was addressed in various other ROS packages. A list of related
commits and pull requests is at:
https://github.com/ros/rosdistro/issues/12783
Signed-off-by: Lukas Bulwahn <[email protected]>
* Contributors: Christopher Wecht, Kartik Mohta, Kei Okada, Kentaro Wada, Lukas Bulwahn, Leonard Gerard, Vincent Rabaud, cwecht, mryellow

1.12.19 (2016-07-24)
--------------------
* Add colormap option in video_recorder
* Merge pull request `#203 <https://github.com/ros-perception/image_pipeline/issues/203>`_ from wkentaro/video-recorder-timestamp
[image_view] Stamped video output filename for video recorder
* bump version requirement for cv_bridge dep
Closes `#215 <https://github.com/ros-perception/image_pipeline/issues/215>`_
* Request for saving image with start/end two triggers
* Stamped video output filename
- _filename:=output.avi _stamped_filename:=false -> output.avi
- _filename:=_out.avi _stamped_filename:=true -> 1466299931.584632829_out.avi
- _filename:=$HOME/.ros/.avi _stamped_filename:=true -> /home/ubuntu/.ros/1466299931.584632829.avi
* Revert max_depth_range to default value for cvtColorForDisplay
* Contributors: Kentaro Wada, Vincent Rabaud

1.12.18 (2016-07-12)
--------------------
* Use image_transport::Subscriber aside from ros::Subscriber
* Refactor: Remove subscription of camera_info in video_recorder
* Add colormap options for displaying image topic
* Use CvtColorForDisplayOptions for cvtColorForDisplay
* Contributors: Kentaro Wada, Vincent Rabaud

1.12.17 (2016-07-11)
--------------------
* Fix timestamp to get correct fps in video_recorder
* Get correct fps in video_recorder.cpp
* Do dynamic scaling for float images
* Contributors: Kentaro Wada

1.12.16 (2016-03-19)
--------------------
* Remove code for roslib on .cfg files
Closes `#185 <https://github.com/ros-perception/image_pipeline/issues/185>`_
* add cv::waitKey for opencv3 installed from source to fix freezing issue
* when no image is saved, do not save camera info
When the images are not recorded because "save_all_image" is false and "save_image_service" is false, the frame count should not be incremented and the camera info should not be written to disk.
* Add std_srvs to catkin find_package()
* Contributors: Jeremy Kerfs, Jochen Sprickerhof, Kentaro Wada, Krishneel

1.12.15 (2016-01-17)
--------------------
* simplify the OpenCV dependency
* [image_view] Configure do_dynamic_scaling param with dynamic_reconfigure
* [image_view] Scale 16UC1 depth image
* fix compilation
* Extract images which are synchronized with message_filters
* [image_view] Show full path when failed to save image
* [image_view] Enable to specify transport with arg
* [image_view] feedback: no need threading for callback
* [image_view/image_view] Make as a node
* Added sensor_msgs::Image conversion to cv::Mat from rqt_image_view in
order to be able to create videos from kinect depth images (cv_bridge
currently doesn't support 16UC1 image encoding).
Code adapted from:
https://github.com/ros-visualization/rqt_common_plugins/blob/groovy-devel/rqt_image_view/src/rqt_image_view/image_view.cpp
* simplify OpenCV3 conversion
* use the color conversion for display from cv_bridge
* Contributors: Carlos Costa, Kentaro Wada, Vincent Rabaud

1.12.14 (2015-07-22)
--------------------
* reduce the differences between OpenCV2 and 3
* do not build GUIs on Android
This fixes `#137 <https://github.com/ros-perception/image_pipeline/issues/137>`_
* Contributors: Vincent Rabaud

1.12.13 (2015-04-06)
--------------------

1.12.12 (2014-12-31)
--------------------
* Convert function to inline to avoid duplicates with image_transport
* Revert "remove GTK dependency"
This reverts commit a6e15e796a40385fbbf8da05966aa47d179dcb46.
Conflicts:
image_view/CMakeLists.txt
image_view/src/nodelets/disparity_nodelet.cpp
image_view/src/nodes/stereo_view.cpp
* Revert "make sure waitKey is called after imshow"
This reverts commit d13e3ed6af819459bca221ece779964a74beefac.
* Revert "brings back window_thread"
This reverts commit 41a655e8e99910c13a3e7f1ebfdd083207cef76f.
* Contributors: Gary Servin, Vincent Rabaud

1.12.11 (2014-10-26)
--------------------
* brings back window_thread
This fixes `#102 <https://github.com/ros-perception/image_pipeline/issues/102>`_ fully
* small optimizations
* add the image_transport parameter
* Contributors: Vincent Rabaud

1.12.10 (2014-09-28)
--------------------

1.12.9 (2014-09-21)
-------------------
* get code to compile with OpenCV3
fixes `#96 <https://github.com/ros-perception/image_pipeline/issues/96>`_
* Contributors: Vincent Rabaud

1.12.8 (2014-08-19)
-------------------

1.12.6 (2014-07-27)
-------------------
* make sure waitKey is called after imshow
* remove GTK dependency
* small speedups
* Contributors: Vincent Rabaud

1.12.5 (2014-05-11)
-------------------
* image_view: Add depend on gtk2
* Contributors: Scott K Logan

1.12.4 (2014-04-28)
-------------------
* fixes `#65 <https://github.com/ros-perception/image_pipeline/issues/65>`_
* Contributors: Vincent Rabaud

1.12.3 (2014-04-12)
-------------------

1.12.2 (2014-04-08)
-------------------

1.12.1 (2014-04-06)
-------------------
* get proper opencv dependency
* Contributors: Vincent Rabaud

1.11.7 (2014-03-28)
-------------------
* Added requirement for core.
* Contributors: Jonathan J Hunt

1.11.3 (2013-10-06 20:21:55 +0100)
----------------------------------
- #41: allow image_saver to save image topics
- #40: use proper download URL
90 changes: 90 additions & 0 deletions image_view/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
cmake_minimum_required(VERSION 2.8)
project(image_view)

find_package(catkin REQUIRED COMPONENTS camera_calibration_parsers cv_bridge dynamic_reconfigure image_transport message_filters message_generation nodelet rosconsole roscpp std_srvs stereo_msgs)
generate_dynamic_reconfigure_options(cfg/ImageView.cfg)

catkin_package(CATKIN_DEPENDS dynamic_reconfigure)
find_package(Boost REQUIRED COMPONENTS thread)
find_package(OpenCV REQUIRED)

include_directories(${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)

# Extra tools
add_executable(extract_images src/nodes/extract_images.cpp)
target_link_libraries(extract_images ${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)

add_executable(image_saver src/nodes/image_saver.cpp)
target_link_libraries(image_saver ${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)

add_executable(video_recorder src/nodes/video_recorder.cpp)
target_link_libraries(video_recorder ${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)

install(TARGETS extract_images image_saver video_recorder
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

# Deal with the GUI's
if(ANDROID)
return()
endif()

find_package(GTK2)
add_definitions(-DHAVE_GTK)
include_directories(${GTK2_INCLUDE_DIRS})

# Nodelet library
add_library(image_view src/nodelets/image_nodelet.cpp src/nodelets/disparity_nodelet.cpp src/nodelets/window_thread.cpp)
target_link_libraries(image_view ${catkin_LIBRARIES}
${GTK_LIBRARIES}
${GTK2_LIBRARIES}
${OpenCV_LIBRARIES}
${Boost_LIBRARIES}
)
install(TARGETS image_view
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)

# Image viewers
add_executable(image_view_exe src/nodes/image_view.cpp)
add_dependencies(image_view_exe ${PROJECT_NAME}_gencfg)
SET_TARGET_PROPERTIES(image_view_exe PROPERTIES OUTPUT_NAME image_view)
target_link_libraries(image_view_exe ${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
${Boost_LIBRARIES}
)

add_executable(disparity_view src/nodes/disparity_view.cpp)
target_link_libraries(disparity_view ${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)

add_executable(stereo_view src/nodes/stereo_view.cpp)
target_link_libraries(stereo_view ${Boost_LIBRARIES}
${catkin_LIBRARIES}
${GTK_LIBRARIES}
${GTK2_LIBRARIES}
${OpenCV_LIBRARIES}
)

install(TARGETS disparity_view image_view_exe stereo_view
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(FILES nodelet_plugins.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)

# Python programs
catkin_install_python(
PROGRAMS scripts/extract_images_sync
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
29 changes: 29 additions & 0 deletions image_view/cfg/ImageView.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#! /usr/bin/env python

PACKAGE='image_view'
from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

edit_method_colormap = gen.enum([
gen.const("NO_COLORMAP", int_t, -1, "NO_COLORMAP"),
gen.const("AUTUMN", int_t, 0, "COLORMAP_AUTUMN"),
gen.const("BONE", int_t, 1, "COLORMAP_BONE"),
gen.const("JET", int_t, 2, "COLORMAP_JET"),
gen.const("WINTER", int_t, 3, "COLORMAP_WINTER"),
gen.const("RAINBOW", int_t, 4, "COLORMAP_RAINBOW"),
gen.const("OCEAN", int_t, 5, "COLORMAP_OCEAN"),
gen.const("SUMMER", int_t, 6, "COLORMAP_SUMMER"),
gen.const("SPRING", int_t, 7, "COLORMAP_SPRING"),
gen.const("COOL", int_t, 8, "COLORMAP_COOL"),
gen.const("HSV", int_t, 9, "COLORMAP_HSV"),
gen.const("PINK", int_t, 10, "COLORMAP_PINK"),
gen.const("HOT", int_t, 11, "COLORMAP_HOT"),
], "colormap")

gen.add('do_dynamic_scaling', bool_t, 0, 'Do dynamic scaling about pixel values or not', False)
gen.add('colormap', int_t, 0, "colormap", -1, -1, 11, edit_method=edit_method_colormap);
gen.add('min_image_value', double_t, 0, "Minimum image value for scaling depth/float image.", default=0, min=0);
gen.add('max_image_value', double_t, 0, "Maximum image value for scaling depth/float image.", default=0, min=0);

exit(gen.generate(PACKAGE, 'image_view', 'ImageView'))
11 changes: 11 additions & 0 deletions image_view/mainpage.dox
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
@mainpage image_view

@htmlinclude manifest.html

@b image_view is a simple utility for viewing an image topic. For usage see
http://www.ros.org/wiki/image_view.

Currently this package has no public code API.

*/
11 changes: 11 additions & 0 deletions image_view/nodelet_plugins.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<library path="lib/libimage_view">

<class name="image_view/image" type="image_view::ImageNodelet" base_class_type="nodelet::Nodelet">
<description>Nodelet to view a sensor_msgs/Image topic</description>
</class>

<class name="image_view/disparity" type="image_view::DisparityNodelet" base_class_type="nodelet::Nodelet">
<description>Nodelet to view a stereo_msgs/DisparityImage topic</description>
</class>

</library>
48 changes: 48 additions & 0 deletions image_view/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<package>
<name>image_view</name>
<version>1.12.23</version>
<description>
A simple viewer for ROS image topics. Includes a specialized viewer
for stereo + disparity images.
</description>
<author>Patrick Mihelich</author>
<maintainer email="[email protected]">Vincent Rabaud</maintainer>
<maintainer email="[email protected]">Steven Macenski</maintainer>
<maintainer email="[email protected]">Autonomoustuff team</maintainer>
<license>BSD</license>
<url>http://www.ros.org/wiki/image_view</url>

<export>
<rosdoc config="rosdoc.yaml" />
<nodelet plugin="${prefix}/nodelet_plugins.xml" />
</export>

<buildtool_depend>catkin</buildtool_depend>

<test_depend>rostest</test_depend>

<build_depend>camera_calibration_parsers</build_depend>
<build_depend version_gte="1.11.13">cv_bridge</build_depend>
<build_depend>dynamic_reconfigure</build_depend>
<build_depend>gtk2</build_depend>
<build_depend>image_transport</build_depend>
<build_depend>message_filters</build_depend>
<build_depend>message_generation</build_depend>
<build_depend>nodelet</build_depend>
<build_depend>rosconsole</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>std_srvs</build_depend>
<build_depend>stereo_msgs</build_depend>

<run_depend>camera_calibration_parsers</run_depend>
<run_depend version_gte="1.11.13">cv_bridge</run_depend>
<run_depend>dynamic_reconfigure</run_depend>
<run_depend>gtk2</run_depend>
<run_depend>image_transport</run_depend>
<run_depend>message_filters</run_depend>
<run_depend>nodelet</run_depend>
<run_depend>rosconsole</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>std_srvs</run_depend>
</package>
4 changes: 4 additions & 0 deletions image_view/rosdoc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- builder: doxygen
name: C++ API
output_dir: c++
file_patterns: '*.c *.cpp *.h *.cc *.hh *.dox'
Loading

0 comments on commit c853f43

Please sign in to comment.