Table of Contents

Class DataMatrixDecoderEventArgs

Namespace
VisioForge.Core.Types.X
Assembly
VisioForge.Core.dll

Provides data for DataMatrix detection events within the VisioForge X engine. This class encapsulates information about the detected DataMatrix code, including its decoded text, symbol information, corner positions, and the timestamp of detection.

public class DataMatrixDecoderEventArgs : EventArgs

Inheritance

Inherited Members

Examples

// Assume an event handler is registered for a DataMatrix detection event from the X engine.
public void OnDataMatrixDetected(object sender, DataMatrixDecoderEventArgs e)
{
    Console.WriteLine($"DataMatrix Detected! Text: {e.DecodedText}");
    Console.WriteLine($"  Symbol: {e.SymbolInfo.Rows}x{e.SymbolInfo.Cols}");
    Console.WriteLine($"  Detected at timestamp: {e.Timestamp}");

    // Process the decoded data based on your application needs
    if (e.DecodedText.StartsWith("URL:"))
    {
        Console.WriteLine("  This DataMatrix contains a URL!");
    }
}

Remarks

This event argument is used when a DataMatrix code is successfully identified and decoded in a video frame processed by the X engine. It allows applications to react to DataMatrix detections, such as logging the information, triggering actions, or displaying results.

Constructors

DataMatrixDecoderEventArgs(string, byte[], SymbolInfo, Corners, TimeSpan, long)

Initializes a new instance of the VisioForge.Core.Types.X.DataMatrixDecoderEventArgs class.

public DataMatrixDecoderEventArgs(string decodedText, byte[] rawData, SymbolInfo symbolInfo, Corners corners, TimeSpan timestamp, long frameNumber)

Parameters

decodedText string

The decoded text content of the DataMatrix.

rawData byte[]

The raw data bytes from the DataMatrix.

symbolInfo SymbolInfo

Information about the symbol structure.

corners Corners

The corner positions of the detected DataMatrix.

timestamp TimeSpan

The timestamp of the detection.

frameNumber long

The frame number where detection occurred.

Properties

Corners

Gets the corner positions of the detected DataMatrix code in the image.

public Corners Corners { get; }

Property Value

Corners

DecodedText

Gets the decoded text content of the DataMatrix code.

public string DecodedText { get; }

Property Value

string

FrameNumber

Gets the frame number in which the DataMatrix was detected.

public long FrameNumber { get; }

Property Value

long

RawData

Gets the raw data bytes from the DataMatrix code.

public byte[] RawData { get; }

Property Value

byte[]

SymbolInfo

Gets information about the DataMatrix symbol structure.

public SymbolInfo SymbolInfo { get; }

Property Value

SymbolInfo

Timestamp

Gets the timestamp of the video frame at which the DataMatrix was detected.

public TimeSpan Timestamp { get; }

Property Value

TimeSpan