Messages and services

The messages and the services of opencv_apps, published and provided by the nodes.

opencv_apps/msg/Circle

Point2D center
float64 radius

opencv_apps/msg/CircleArray

Circle[] circles

opencv_apps/msg/CircleArrayStamped

std_msgs/Header header
Circle[] circles

opencv_apps/msg/Contour

Point2D[] points

opencv_apps/msg/ContourArray

Contour[] contours

opencv_apps/msg/ContourArrayStamped

std_msgs/Header header
Contour[] contours

opencv_apps/msg/Detection

# an object detected by dnn_object_detection or people_detect, or a code or a marker detected by qrcode_detection,
# barcode_detection and aruco_detection
string label        # class name of the object, QR_CODE, type of the barcode (e.g. EAN_13), or dictionary of the marker (e.g. DICT_4X4_50)
string data         # decoded text of the code, or empty
int32 id            # class id of the object, or id of the marker, or -1
float64 score       # confidence of the detection, 1.0 if not given
Rect rect           # bounding box, x-y is center point
Point2D[] corners   # corners of the code or the marker, empty for the objects

opencv_apps/msg/DetectionArray

Detection[] detections

opencv_apps/msg/DetectionArrayStamped

std_msgs/Header header
Detection[] detections

opencv_apps/msg/Face

Rect face
Rect[] eyes
string label
float64 confidence

opencv_apps/msg/FaceArray

Face[] faces

opencv_apps/msg/FaceArrayStamped

std_msgs/Header header
Face[] faces

opencv_apps/msg/Flow

Point2D point
Point2D velocity

opencv_apps/msg/FlowArray

Flow[] flow
bool[] status

opencv_apps/msg/FlowArrayStamped

std_msgs/Header header
Flow[] flow
bool[] status

opencv_apps/msg/FlowStamped

std_msgs/Header header
Flow flow

opencv_apps/msg/Keypoint

# a keypoint of a skeleton, e.g. a joint of a person estimated by dnn_pose_estimation
string name        # name of the keypoint, e.g. nose, left_shoulder
float64 x          # position in the image
float64 y
float64 visibility # probability that the keypoint is visible (not occluded) in the image, 0 to 1
float64 presence   # probability that the keypoint is within the image, 0 to 1

opencv_apps/msg/Line

Point2D pt1
Point2D pt2

opencv_apps/msg/LineArray

Line[] lines

opencv_apps/msg/LineArrayStamped

std_msgs/Header header
Line[] lines

opencv_apps/msg/Moment

# spatial moments
float64 m00
float64 m10
float64 m01
float64 m20
float64 m11
float64 m02
float64 m30
float64 m21
float64 m12
float64 m03

# central moments
float64 mu20
float64 mu11
float64 mu02
float64 mu30
float64 mu21
float64 mu12
float64 mu03

# central normalized moments
float64 nu20
float64 nu11
float64 nu02
float64 nu30
float64 nu21
float64 nu12
float64 nu03

# center of mass m10/m00, m01/m00
Point2D center
float64 length
float64 area

opencv_apps/msg/MomentArray

Moment[] moments

opencv_apps/msg/MomentArrayStamped

std_msgs/Header header
Moment[] moments

opencv_apps/msg/Point2D

float64 x
float64 y

opencv_apps/msg/Point2DArray

Point2D[] points

opencv_apps/msg/Point2DArrayStamped

std_msgs/Header header
Point2D[] points

opencv_apps/msg/Point2DStamped

std_msgs/Header header
Point2D point

opencv_apps/msg/Rect

# opencv Rect data type, x-y is center point
float64 x
float64 y
float64 width
float64 height

opencv_apps/msg/RectArray

Rect[] rects

opencv_apps/msg/RectArrayStamped

std_msgs/Header header
Rect[] rects

opencv_apps/msg/RotatedRect

float64 angle
Point2D center
Size size

opencv_apps/msg/RotatedRectArray

RotatedRect[] rects

opencv_apps/msg/RotatedRectArrayStamped

std_msgs/Header header
RotatedRect[] rects

opencv_apps/msg/RotatedRectStamped

std_msgs/Header header
RotatedRect rect

opencv_apps/msg/Size

float64 width
float64 height

opencv_apps/msg/Skeleton

# a skeleton (the keypoints of a pose), e.g. a person estimated by dnn_pose_estimation
string label          # class of the skeleton, e.g. person
int32 id              # id of the skeleton, the same while it is tracked over the images, or -1
float64 score         # confidence of the pose
Rect rect             # bounding box of the keypoints, x-y is center point
Keypoint[] keypoints  # keypoints in the order of the model, e.g. the 33 landmarks of MediaPipe

opencv_apps/msg/SkeletonArray

Skeleton[] skeletons

opencv_apps/msg/SkeletonArrayStamped

std_msgs/Header header
Skeleton[] skeletons

opencv_apps/srv/FaceRecognitionTrain

sensor_msgs/Image[] images
Rect[] rects
string[] labels
---
bool ok
string error

opencv_apps/srv/SetROI

# Set the region of interest, e.g. the target of the tracking node.
# The image on which the rect is given. If it is empty (no data), the rect is set on the next input image.
sensor_msgs/Image image
# The region of interest, x-y is its center point as in opencv_apps/Rect.
Rect rect
---
bool ok
string error