# simplevideomarkdetect

This plugin detects squares in the bottom left corner of the video frames. The squares have a width and height of respectively and . Even squares must be black and odd squares must be white.

When the pattern has been found, squares after the pattern squares are read as a bitarray. White squares represent a 1 bit and black squares a 0 bit. The bitarray will will included in the element message that is posted (see below).

After the pattern has been found and the data pattern has been read, an element message called `GstSimpleVideoMarkDetect` will be posted on the bus. If the pattern is no longer found in the frame, the same element message is posted with the have-pattern field set to FALSE. The message is only posted if the property is TRUE.

The message's structure contains these fields:

- gboolean `have-pattern`: if the pattern was found. This field will be set to TRUE for as long as the pattern was found in the frame and set to FALSE for the first frame that does not contain the pattern anymore.

- GstClockTime `timestamp`: the timestamp of the buffer that triggered the message.

- GstClockTime `stream-time`: the stream time of the buffer.

- GstClockTime `running-time`: the running_time of the buffer.

- GstClockTime `duration`: the duration of the buffer.

- guint64 `data`: the data-pattern found after the pattern or 0 when have-signal is FALSE.

## Example launch line

     gst-launch-1.0 videotestsrc ! simplevideomarkdetect ! videoconvert ! ximagesink

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstBaseTransform
                        ╰──GstVideoFilter
                            ╰──simplevideomarkdetect

## Factory details

Authors: – Wim Taymans

Classification: – `Filter/Effect/Video`

Rank – none

Plugin – videosignal

Package – GStreamer Bad Plug-ins

## Pad Templates

### `sink`

    video/x-raw:
             format: { I420, YV12, Y41B, Y42B, Y444, YUY2, UYVY, AYUV, YVYU }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]

Presence – always

Direction – sink

Object type – GstPad

### `src`

    video/x-raw:
             format: { I420, YV12, Y41B, Y42B, Y444, YUY2, UYVY, AYUV, YVYU }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]

Presence – always

Direction – src

Object type – GstPad

## Properties

### bottom-offset

    “bottom-offset” gint

The offset from the bottom border where the pattern starts

Flags : Read / Write / Construct

Default value : 0

### left-offset

    “left-offset” gint

The offset from the left border where the pattern starts

Flags : Read / Write / Construct

Default value : 0

### message

    “message” gboolean

Post detected data as bus messages

Flags : Read / Write / Construct

Default value : true

### pattern-center

    “pattern-center” gdouble

The center of the black/white separation (0.0 = lowest, 1.0 highest)

Flags : Read / Write / Construct

Default value : 0.5

### pattern-count

    “pattern-count” gint

The number of pattern markers

Flags : Read / Write / Construct

Default value : 4

### pattern-data-count

    “pattern-data-count” gint

The number of extra data pattern markers

Flags : Read / Write / Construct

Default value : 5

### pattern-height

    “pattern-height” gint

The height of the pattern markers

Flags : Read / Write / Construct

Default value : 16

### pattern-sensitivity

    “pattern-sensitivity” gdouble

The sensitivity around the center for detecting the markers (0.0 = lowest, 1.0 highest)

Flags : Read / Write / Construct

Default value : 0.3

### pattern-width

    “pattern-width” gint

The width of the pattern markers

Flags : Read / Write / Construct

Default value : 4

The results of the search are