templatematch

templatematch

Properties

gboolean display Read / Write
gint method Read / Write
gchar * template Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstElement
                ╰── GstBaseTransform
                    ╰── GstVideoFilter
                        ╰── GstOpencvVideoFilter
                            ╰── GstTemplateMatch

Description

Performs template matching on videos and images, providing detected positions via bus messages.

Example launch line

1
gst-launch-1.0 videotestsrc ! decodebin ! videoconvert ! templatematch template=/path/to/file.jpg ! videoconvert ! xvimagesink

Synopsis

Element Information

plugin

opencv

author

Noam Lewis <jones.noamle@gmail.com>

class

Filter/Effect/Video

Element Pads

name

sink

direction

sink

presence

always

details

video/x-raw, format=(string)BGR, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

name

src

direction

source

presence

always

details

video/x-raw, format=(string)BGR, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

Functions

Types and Values

struct GstTemplateMatch

struct GstTemplateMatch;

Property Details

The “display” property

  “display”                  gboolean

Sets whether the detected template should be highlighted in the output.

Flags: Read / Write

Default value: TRUE


The “method” property

  “method”                   gint

Specifies the way the template must be compared with image regions. 0=SQDIFF, 1=SQDIFF_NORMED, 2=CCOR, 3=CCOR_NORMED, 4=CCOEFF, 5=CCOEFF_NORMED.

Flags: Read / Write

Allowed values: [0,5]

Default value: 3


The “template” property

  “template”                 gchar *

Filename of template image.

Flags: Read / Write

Default value: NULL