Show EOL distros: 

Package Summary

opencv_apps provides various nodes that run internally OpenCV's functionalities and publish the result as ROS topics. With opencv_apps, you can skip writing OpenCV application codes for a lot of its functionalities by simply running a launch file that corresponds to OpenCV's functionality you want.

  • You can have a look at all launch files provided here (be sure to choose the correct branch. As of Sept. 2016 indigo branch is used for ROS Indigo, Jade, and Kinetic distros).
  • Some of the features covered by opencv_apps are explained in the wiki.

The most of code is originally taken from https://github.com/Itseez/opencv/tree/master/samples/cpp

Package Summary

opencv_apps provides various nodes that run internally OpenCV's functionalities and publish the result as ROS topics. With opencv_apps, you can skip writing OpenCV application codes for a lot of its functionalities by simply running a launch file that corresponds to OpenCV's functionality you want.

  • You can have a look at all launch files provided here (be sure to choose the correct branch. As of Sept. 2016 indigo branch is used for ROS Indigo, Jade, and Kinetic distros).
  • Some of the features covered by opencv_apps are explained in the wiki.

The most of code is originally taken from https://github.com/Itseez/opencv/tree/master/samples/cpp

Package Summary

opencv_apps provides various nodes that run internally OpenCV's functionalities and publish the result as ROS topics. With opencv_apps, you can skip writing OpenCV application codes for a lot of its functionalities by simply running a launch file that corresponds to OpenCV's functionality you want.

  • You can have a look at all launch files provided here (be sure to choose the correct branch. As of Sept. 2016 indigo branch is used for ROS Indigo, Jade, and Kinetic distros).
  • Some of the features covered by opencv_apps are explained in the wiki.

The most of code is originally taken from https://github.com/Itseez/opencv/tree/master/samples/cpp

Package Summary

opencv_apps provides various nodes that run internally OpenCV's functionalities and publish the result as ROS topics. With opencv_apps, you can skip writing OpenCV application codes for a lot of its functionalities by simply running a launch file that corresponds to OpenCV's functionality you want.

  • You can have a look at all launch files provided here (be sure to choose the correct branch. As of Sept. 2016 indigo branch is used for ROS Indigo, Jade, and Kinetic distros).
  • Some of the features covered by opencv_apps are explained in the wiki.

The most of code is originally taken from https://github.com/Itseez/opencv/tree/master/samples/cpp

Package Summary

opencv_apps provides various nodes that run internally OpenCV's functionalities and publish the result as ROS topics. With opencv_apps, you can skip writing OpenCV application codes for a lot of its functionalities by simply running a launch file that corresponds to OpenCV's functionality you want.

  • You can have a look at all launch files provided here (be sure to choose the correct branch. As of Sept. 2016 indigo branch is used for ROS Indigo, Jade, and Kinetic distros).
  • Some of the features covered by opencv_apps are explained in the wiki.

The most of code is originally taken from https://github.com/Itseez/opencv/tree/master/samples/cpp

Package Summary

opencv_apps provides various nodes that run internally OpenCV's functionalities and publish the result as ROS topics. With opencv_apps, you can skip writing OpenCV application codes for a lot of its functionalities by simply running a launch file that corresponds to OpenCV's functionality you want.

  • You can have a look at all launch files provided here (be sure to choose the correct branch. As of Sept. 2016 indigo branch is used for ROS Indigo, Jade, and Kinetic distros).
  • Some of the features covered by opencv_apps are explained in the wiki.

The most of code is originally taken from https://github.com/Itseez/opencv/tree/master/samples/cpp

Introduction, usage

With opencv_apps, you can run a lot of functionalities OpenCV provides in the simplest manner in ROS, i.e., running a launch file that corresponds to the functionality.

  • You can have a look at all launch files provided here (be sure to choose the correct branch. As of Sept. 2016 indigo branch is used for ROS Indigo, Jade, and Kinetic distros).

  • Some of the features covered by opencv_apps are explained in this wiki.

Edge Detection Nodes

edge_detection

Apply edge detecion algorithm to input and output ROS sensor_msgs/Image topics.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • Ouptut edge image.

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show edge image
~edge_type (int, default: 0) ~canny_threshold1 (int, default: 100)
  • Specify second canny threashold value.
~canny_threshold2 (int, default: 200)
  • Specity first canny threashold value.
~apertureSize (int, default: 3)
  • Aperture size for the Sobel() operator.
~apply_blur_pre (bool, default: True)
  • Flag, applygin Blur() to input image
~postBlurSize (int, default: 13)
  • Aperture size for the Blur() to input image()
~postBlurSigma (int, default: 3.2) ~apply_blur_post (bool, default: False) ~L2gradient (bool, default: False) ~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

Edge detection examples

Outputs of Sobel Derivatives

Outputs of Laplace Operator

Outputs of Sobel Canny Edge Detector

Outputs of Sobel Derivatives

Outputs of Laplace Operator

Outputs of Sobel Canny Edge Detector

hough_lines

Apply Hough Transform to the input ROS sensor_msgs/Image and outputs detected lines as ROS opencv_apps/LineArrayStamped messages. See HoughLines_Demo.cpp for more info.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • A copy of input image which indicates detected lines
lines (opencv_apps/LineArrayStamped)
  • Array of detected lines in image coordiinates.

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show edge image
~hough_type (int, default: 0)
  • Apecify Hough transform type, 0 for Standard Hough Detection and 1 for Probabilistic Hough Detection
~threshould (int, default: 150)
  • Threshould value for hough line detection
~rho (double, default: 1.0)
  • The resolution of the parameter r in pixels.
~theta (double, default: 1.0)
  • The resolution of the parameter theta in radians.
~minLineLength (double, default: 30)
  • The minimum number of points that can form a line.
~maxLineGrap (double, default: 10)
  • The maximum gap between two points to be considered in the same line.
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

Hough transformation Line detection

Standard Hough Lines

Probabilistic Hough Lines

Outputs of Standard Hough Deteciton

Outputs of Probabilistic Hough Detection

hough_circles

Apply Hough Circle Transform to the input ROS sensor_msgs/Image and outputs detected lines as ROS opencv_apps/CircleArrayStamped messages. See HoughCircle_Demo.cpp for more info.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • A copy of input image which indicates detected circles
circles (opencv_apps/CircleArrayStamped)
  • Array of detected circles in image coordiinates.

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show edge image
~canny_threshold (int, default: 200)
  • Upper threshold for the internal Canny edge detector.
~accumulator_threshold (int, default: 50)
  • Threshold for center detection.
~gaussian_blur_size (int, default: 9)
  • The size of gaussian blur (should be odd number)
~gaussian_sigma_x (double, default: 2)
  • sigma x of gaussian kernel
~gaussian_sigma_y (double, default: 2)
  • sigma y of gaussian kernel
~dp (int, default: 2)
  • The inverse ratio of resolution
~min_circle_radius (int, default: 0)
  • the minimum size of the circle. If unknown, put zero as default.
~max_circle_radius (int, default: 0)
  • the maximum size of the circle. If unknown, put zero as default.
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

Hough transformation Circle detection

Standard Hough Circles

Outputs of Circle Hough Deteciton

Structual Analysis Nodes

find_contours

Find Contours to the input ROS sensor_msgs/Image and to find contours and outpus as ROS opencv_apps/ContoursArrayStamped messages. See findContours_Demo.cpp for more info.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • A copy of input image which indicates detected contours
contours (opencv_apps/ContourArrayStamped)
  • Detected contours. Each contour is stored as a vector of point

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show edge image
~canny_low_threshold (int, default: 10)
  • Lower threshold for the internal Canny edge detector.
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

convex_hull

Apply Convex Hull to the input ROS sensor_msgs/Image and to find contours and outpus as ROS opencv_apps/ContoursArrayStamped messages. See hull_demo.cpp for more info

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • A copy of input image which indicates detected convex hulls
hulls (opencv_apps/ContourArrayStamped)
  • Detected convex hulls of contours. Each contour is stored as a vector of point

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show edge image
~threshold (int, default: 100)
  • Treshold for the detecting edges.
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

general_contours

Creating Bounding rotated boxes and ellipses for contours to the input ROS sensor_msgs/Image and outpus as ROS opencv_apps/RotatedRectArrayStamped messages. See generalContours_demo2.cpp for more info.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • A copy of input image which indicates detected contours as bobxes or ellipses
rectangles (opencv_apps/RotatedRectArrayStamped)
  • Bounding rotated boxes of contours.
ellipses (opencv_apps/RotatedRectArrayStamped)
  • Bounding rotated ellipses of contours.

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show edge image
~threshold (int, default: 100)
  • Treshold for the detecting edges.
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

contour_moments

Calculating Image Moment of the input ROS sensor_msgs/Image and outpus as ROS opencv_apps/MomentArrayStamped messages. See moments_demo.cpp for more info.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • A copy of input image which indicates detected contours
moment (opencv_apps/MomentArrayStamped)
  • Image moments of contours.

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show edge image
~canny_low_threshold (int, default: 100)
  • Canny Edge low Threshold
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

Contours Moments

Find Contours

Find Convex Hull

Find contours

Convex Hull of contours

Find general contours

contour Moments

Bounding rotated boxe and ellipses for contours

Example of Image Moments Calculation

People/Face Detection Nodes

face_detection

Detect faces in ROS sensor_msgs/Image using Cascade Classifier and outputs detected faces as ROS opencv_apps/FaceArrayStamped message. See objectDetection.cpp for more info.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • A copy of input image which indicates detected faces position as a circle
faces (opencv_apps/FaceArrayStamped)
  • Array of detected face location in image coordiinates.
face_image (sensor_msgs/Image)
  • A cropped image of detected faces
~queue_size (invalid message type for MsgLink(msg/type))
  • Specigy queue_size of input image subscribers

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: true)
  • Specify whether the node displays a window to show edge image
~face_cascade_name (string, default: "/usr/share/opencv/haarcascades/haarcascade_frontalface_alt.xml")
  • Face dtection cascade Filename
~eyes_cascade_name (string, default: "/usr/share/opencv/haarcascades/haarcascade_eye_tree_eyeglasses.xml")
  • Eye dtection cascade Filename
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

Face Detection

Face Detection

Example of Face Detection

face_recognition

Recognize faces in ROS sensor_msgs/Image using Face Recognition and outputs detected faces with labels as ROS opencv_apps/FaceArrayStamped message. See Tutorials for more info.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.
faces (opencv_apps/FaceArrayStamped)
  • Array of detected face location in image coordiinates.

Published Topics

~output (opencv_apps/FaceArrayStamped)
  • A copy of input image which indicates detected faces position as a circle
~debug_image (sensor_msgs/Image)
  • A copy of input image which indicates detected faces' positions, labels and confidences

Parameters

~approximate_sync (bool, default: false)
  • Approximately synchronize messages of input image and face array
~queue_size (int, default: 100)
  • Size of queue for subscribing topics
~model_method (string, default: "eigen")
  • Method for face recognition (Either "eigen", "fisher" or "LBPH")
~use_saved_data (bool, default: true)
  • Load and train data from path specified by ~data_dir
~save_train_data (bool, default: true)
  • Save train data to path specified by ~data_dir for retraining
~data_dir (string, default: "~/.ros/opencv_apps/face_data")
  • Path to directory for saving train data
~face_model_width (int, default: 190)
  • Width of training face image
~face_model_height (int, default: 90)
  • Height of training face image
~face_padding (double, default: 0.1)
  • Padding ratio for each face
~model_num_components (int, default: 0)
  • Number of components for face recognizer model (0 is treated as unlimited)
~model_threshold (double, default: 8000.0)
  • Threshold for face recognizer model
~lbph_radius (int, default: 1)
  • Radius parameter (available only for LBPH model)
~lbph_neighbors (int, default: 8)
  • Neighbors parameter (available only for LBPH model)
~lbph_grid_x (int, default: 8)
  • grid_x parameter (available only for LBPH model)
~lbph_grid_y (int, default: 8)
  • grid_y parameter (available only for LBPH model)
~queue_size (int, default: 100)
  • Specigy queue_size of input image subscribers

Face Recognition

Face Recognition

Example of Face Recognition

people_detect

Detecting people using Histogram of Oriented Gradients(HOG)]. This node outputs <<MsgLink(opencv_apps::RectArrayStamped)>> message. See [[https://github.com/Itseez/opencv/blob/2.4/samples/cpp/peopledetect.cpp for more info

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • A copy of input image which indicates detected people position as a box
found (opencv_apps/RectArrayStamped)
  • Array of detected people location in image coordiinates.

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show edge image
~hit_threshold (double, default: 0)
  • Threshold for the distance between features and SVM classifying plane
~win_stride (int, default: 8)
  • Window stride. It must be a multiple of block stride.
~padding (int, default: 32)
  • Mock parameter to keep the CPU interface compatibility. It must be (0,0).
~scale0 (double, default: 1.05)
  • Coefficient of the detection window increase.
~group_threshold (int, default: 2)
  • Coefficient to regulate the similarity threshold. When detected, some objects can be covered by many rectangles. 0 means not to perform grouping.
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

HoG based People Detection

lk flow

Example of People Detection

Motion Analysis Nodes

goodfeature_track

Determines strong corners on input ROS sensor_msgs/Image using goodFeatureToTrack and outputs detected corners as ROS opencv_apps/Point2DArrayStamped message. See goodFeaturesToTrack_Demo.cpp for more info.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • A copy of input image which indicates detected corners
corners (opencv_apps/Point2DArrayStamped)
  • Array of detected corner location in image coordiinates.

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show edge image
~max_corners (int, default: 23)
  • Maximum number of corners to return. If there are more corners than are found, the strongest of them is returned.
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

Good Features to Track

Good Features to Track

Example of Good Features to Track

camshift

Find an object center, size and orientation of a input ROS sensor_msgs/Image using CamShift algorithm and outputs detected object as ROS invalid message type for MsgLink(msg/type) message. See camshiftdemo.cpp for more info.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • A copy of input image which indicates detected object as a ellipse
back_project (sensor_msgs/Image)
  • Back projection of the object histogram.
track_box (opencv_apps/RotatedRectStamped)
  • Detected objects

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show edge image
~histogram (array, default: [])
  • Histogram of tracked color object
~vmin (int, default: 10)
  • Min threshould of lightness.
~vmax (int, default: 256)
  • Max threshould of lightness.
~smin (int, default: 30)
  • Min value of saturation.
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

Camshift

Camshift Result

Camshift Back Project

Outputs of Camshift Results

Outputs of Camshift Back Projection of the object histogram

fback_flow

Calculate dense opetical flow using Gunnar Farneback Algorithm. This node outputs invalid message type for MsgLink(msg/type) message. See fback.cpp for more info.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • A copy of input image with computed optical flows.
flows (opencv_apps/FlowArrayStamped)
  • Computed optical flows.

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show edge image
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

lk_flow

Calculates an optical flow for a sparse feature set using the iterative Lucas-Kanade method with pyramids and outputs invalid message type for MsgLink(msg/type) message. See lkdemo.cpp for more info

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • A copy of input image with computed optical flows.
flows (opencv_apps/FlowArrayStamped)
  • Computed optical flows.

Services

initialize_points (invalid message type for SrvLink(srv/type))
  • Auto-initialize tracking.
delete_points (invalid message type for SrvLink(srv/type))
  • Delete all the points.
toggle_night_mode (invalid message type for SrvLink(srv/type))
  • switch the night mode on/off.

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show edge image
~quality_level (double, default: 0.01)
  • Parameter characterizing the minimal acceptance quality of image corners.
~min_distance (int, default: 10)
  • Minimum possible Euclidean distance between the returned corners.
~block_size (int, default: 3)
  • Size of an average block for computing a derivative covariation matrix over each pixel neighborhood.
~harris_k (double, default: 0.04)
  • Free parameter of the Harris detector
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

phase_corr

The node detects the translational shift in the frequency domain based on the Fourier shift theorem. See phase_corr.cpp for more info.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • A copy of input image with computed translational shift
shift (opencv_apps/Point2DStamped)
  • Computed translational shift

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show edge image
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

simple_flow

Calculate dense opetical flow using Simple Flow algorithm. This node outputs invalid message type for MsgLink(msg/type) message. See simpleflow_demo.cpp for more info.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.
flows (opencv_apps/FlowArrayStamped)
  • Computed optical flows.

Published Topics

image (sensor_msgs/Image)
  • A copy of input image with computed optical flows.

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show edge image
~scale (int, default: 4)
  • Specify the scale factor to calculate optical flow.
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

Optical Flow

fback flow

lk flow

Dense Optical Flow using Gunner Farenback Algorithm

Optical Flow for sparse features set using Lucas-Kanade Method

phase correct

simple flow

Translational shift in the frequency domain

Dense optical flow using Simple Flow algorithm

Object Segmentaion Nodes

segment_objects

This node apply Gaussian Mixture-based Background/Foreground Segmentation algorithm to input ROS sensor_msgs/Image and outputs segemted region as opencv_apps/ContourArrayStamped and area as std_msgs/Float64.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • A copy of input image which indicates segmented region
contours (opencv_apps/ContoruArrayStamped)
  • Contours of segmented region.
area (std_msgs/Float64)
  • Number of pixes in segmented area

Services

update_bg_model (invalid message type for SrvLink(srv/type))
  • Update Background Mdoel

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show edge image
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

watershed_segmentation

This node apply the watershed segmentation algorithm to input ROS sensor_msgs/Image and outputs segemted region as opencv_apps/ContourArrayStamped

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.
contours (opencv_apps/ContourArrayStamped)
  • segmented contours.

Published Topics

image (sensor_msgs/Image)
  • A copy of input image which indicates segmented region.

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show edge image
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

Object Segmentation

segment objects

simple flow

Gaussian Mixture-based Background/Foreground Segmentatoin

Watershed Segmentation

Histgrams Mathcing

New features since version 2.0.3

equalize_histogram

This node apply https://docs.opencv.org/2.4/modules/imgproc/doc/histograms.html#equalizehist and https://docs.opencv.org/3.4.7/d6/db6/classcv_1_1CLAHE.html to input ROS sensor_msgs/Image and normalizes the brightness and increases the contrast of the image.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.
contours (opencv_apps/ContourArrayStamped)
  • segmented contours.

Published Topics

image (sensor_msgs/Image)
  • A normalized grayscale image copy of the input image.

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show edge image
~queue_size (bool, default: true) ~histogram_equalization_type (int, default: 0)
  • Specify histogram equalization algorithm (0: Uses equalizeHist() Method, 1: CLAHE (Contrast Limited Adaptive Histogram Equalization) Method.)
~clahe_clip_limit (float, default: 20)
  • Clip Limit for CLAHE filter
~queue_size (float) (, default: 32)
  • X Tile Size for CLAHE filter
~queue_size (float, default: 32)
  • Y Tile Size for CLAHE filter

Histogram Equalization

segment objects

simple flow

equalizeHist() Method

CLAHE Method

Image Filter Nodes

New feature as of version 1.11.15

rgb_color_filter

This node filters the image by RGB color and generates a mask image.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • Mask image filterd by RGB color.

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show mask image
~r_limit_max (int, default: 250)
  • Maximum value of Red
~r_limit_min (int, default: 50)
  • Minimum value of Red
~g_limit_max (int, default: 200)
  • Maximum value of Green
~g_limit_min (int, default: 100)
  • Minimum value of Green
~b_limit_max (int, default: 150)
  • Maximum value of Blue
~b_limit_min (int, default: 20)
  • Minimum value of Blue
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

hls_color_filter

This node filters the image by HSL color and generates a mask image.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • Mask image filterd by HSL color.

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show mask image
~h_limit_max (int, default: 250)
  • Maximum value of Hue
~h_limit_min (int, default: 0)
  • Minimum value of Hue
~s_limit_max (int, default: 255)
  • Maximum value of Saturation
~s_limit_min (int, default: 150)
  • Minimum value of Saturation
~l_limit_max (int, default: 255)
  • Maximum value of Luminance
~l_limit_min (int, default: 50)
  • Minimum value of Luminance
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

hsv_color_filter

This node filters the image by HSL color and generates a mask image.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • Mask image filterd by HSV color.

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show mask image
~h_limit_max (int, default: 250)
  • Maximum value of Hue
~h_limit_min (int, default: 0)
  • Minimum value of Hue
~s_limit_max (int, default: 255)
  • Maximum value of Saturation
~s_limit_min (int, default: 150)
  • Minimum value of Saturation
~v_limit_max (int, default: 255)
  • Maximum value of Value
~v_limit_min (int, default: 50)
  • Minimum value of Value
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

lab_color_filter

This node filters the image by Lab color and generates a mask image. Note that L, a, and b have been converted so that their value ranges are in the range 0~255. (New feature since version 2.0.3)

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • Mask image filterd by Lab color space.

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show mask image
~l_limit_max (int, default: 255)
  • Maximum value of L.
~l_limit_min (int, default: 0)
  • Minimum value of L.
~a_limit_max (int, default: 255)
  • Maximum value of a.
~a_limit_min (int, default: 0)
  • Minimum value of a.
~b_limit_max (int, default: 255)
  • Maximum value of b.
~b_limit_min (int, default: 0)
  • Minimum value of b.
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

Color filter examples

Outputs of RGB color filter

Outputs of HSL color filter

Outputs of HSV color filter

Outputs of Lab color filter

Outputs of RGB color filter

Outputs of HSL color filter

Outputs of HSV color filter

Outputs of Lab color filter

morphology

This node apply morphology transformation (New feature since version 2.0.3). Please also check test/test-blob-extraction.test example, which apply erode->dilite->contour extraction to get blob of black-white images.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • Mask image filterd by HSV color.

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show mask image
~morph_operator (int, default: 0)
  • "Morphology Operation Methods 0: Opening, 1: Closing, 2: Gradient, 3: Top Hat, 4: Black Hat
~morph_element (int, default: 0)
  • Type of the kernel 0: Rect, 1: Cross, 2: Ellipse
~s_limit_max (int, default: 21)
  • Size of kernel(min:0, max 21)
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

Morphology Transformations examples

Outputs of color filter

Outputs of Opening transformation

Outputs of Closing transformation

Outputs of ellipse contours

Outputs of color filter

Outputs of Opening transformation

Outputs of Closing transformation

Outputs of ellipse contours

smoothing

This node apply smoothing filter (New feature since version 2.0.3). Please also check test/test-smoothing.test example, which applies homogeneous blur, gaussian blur, median blur, and bilateral blur to get blur images.

Subscribed Topics

image (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • Blurred image.

Parameters

~use_camera_info (bool, default: true)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~debug_view (bool, default: false)
  • Specify whether the node displays a window to show mask image
~filter_type (int, default: 1)
  • "Smoothing Methods 0: Homogeneous blur, 1: Gaussian blur, 2: Median blur, 3: Bilateral Filter
~kernel_size (int, default: 7)
  • Size of the kernel (only one because we use a square window). Must be odd.
~queue_size (int, default: 3)
  • Specigy queue_size of input image subscribers

Smoothing Filter examples

Outputs of homogeneous blur

Outputs of gaussian blur

Outputs of median filter

Outputs of bilateral filter

Outputs of Homogeneous blur

Outputs of Gaussian blur

Outputs of Median blur

Outputs of Bilateral filter

Simple Image Processing Nodes

adding_images

This node merges two images into one.

Subscribed Topics

image1 (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.
image2 (sensor_msgs/Image)
  • The image topic. Should be remapped to the name of the real image topic.

Published Topics

image (sensor_msgs/Image)
  • Merged image.

Parameters

~use_camera_info (bool, default: false)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~alpha (float, default: 0.5)
  • Specify the blending weight of the image1.
~beta (float, default: 0.5)
  • Specify the blending weight of the image2 (When auto_beta is true, this value is automatically set as (1 - alpha)).
~auto_beta (bool, default: true)
  • Automatically adjust beta value to keep (alpha + beta = 1).
~gamma (float, default: 0)
  • Add extra brightness to the result (0~255).

Wiki: opencv_apps (last edited 2022-02-15 10:19:42 by iory)