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 : EventArgsInheritance
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
decodedTextstring-
The decoded text content of the DataMatrix.
rawDatabyte[]-
The raw data bytes from the DataMatrix.
symbolInfoSymbolInfo-
Information about the symbol structure.
cornersCorners-
The corner positions of the detected DataMatrix.
timestampTimeSpan-
The timestamp of the detection.
frameNumberlong-
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
DecodedText
Gets the decoded text content of the DataMatrix code.
public string DecodedText { get; }Property Value
FrameNumber
Gets the frame number in which the DataMatrix was detected.
public long FrameNumber { get; }Property Value
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
Timestamp
Gets the timestamp of the video frame at which the DataMatrix was detected.
public TimeSpan Timestamp { get; }