|
|
void | Dispose () |
| | IDisposable implementation.
|
| |
| T | GetConfig< T > () |
| | Retrieves the typed configuration for the decoder.
|
| |
| IEnumerable< Result > | Execute (ImagePlane imagePlane, int numMaxCodes=0) |
| | Executes the decoding process on the specified image plane.
|
| |
| IEnumerable< Result > | Execute (ImagePlane imagePlane, Rect aoi, int numMaxCodes=0) |
| | Executes the decoding process on the specified image plane inside area of interest.
|
| |
| TimeLimitedResult | ExecuteFor (ImagePlane imagePlane, TimeSpan timeSpan, int numMaxCodes=0) |
| | Executes the decoding process within a specified time limit.
|
| |
| TimeLimitedResult | ExecuteFor (ImagePlane imagePlane, Rect aoi, TimeSpan timeSpan, int numMaxCodes=0) |
| | Executes the decoding process within a specified time limit.
|
| |
|
| bool | BasicInkjetDPMEnabled [get, set] |
| | Enable/disable reading of Basic Inkjet DPM (Direct Part Marking). This mode can read poor quality inkjet images.
|
| |
|
CustomPerformance | CustomPerformance [get, set] |
| | The custom image processing method to improve decoding robustness and performance.
|
| |
|
CodeSearchSpeed | CodeSearchSpeed [get, set] |
| | Adjusts the trade-off between decoding speed, damage tolerance, and required code contrast. The default value (CodeSearchSpeed.Speed0) provides maximum damage tolerance allows detection of high-contrast codes. Higher values increase search speed but reduce damage tolerance and require higher code contrast: 0 - Maximum damage tolerance, detects low-contrast codes (default). 1 - Faster, reduced damage tolerance, detects low-contrast codes. 2 - Faster, further reduced damage tolerance, detects medium-contrast codes. 3 - Fastest, same damage tolerance as level 2, detects high-contrast codes only.
|
| |
| int | DetectorDensity [get, set] |
| | Sets detector density to increase or decrease the search aggressiveness for small barcodes.
|
| |
|
IntPtr | Handle [get] |
| | Native handle of the Decoder.
|
| |
|
bool | IsDisposed [get] |
| | Gets if the native handle has been disposed.
|
| |
Class for decoding.
This class provides the core functionality for detecting and decoding codes in images. Each code type can be configured using its corresponding configuration class.
To decode an image containing a supported code, start by creating a decoder. You can configure your decoder using the member function Decoder.GetConfig<T> which returns a reference to the desired configuration class.
After configuring the decoder, load an image containing the code(s) and execute the decoding process.The following code snippet demonstrates how to decode an image containing Data Matrix and QR codes:
using (var decoder = Decoder.Create())
{
config.SetEnabled(
true).SetPolarity(
Config.Polarity.DarkOnLight);
decoder.GetConfig<
DataMatrix>().SetEnabled(
true).SetPolarity(
Config.Polarity.DarkOnLight);
{
var results = decoder.Execute(image.Planes[0]);
}
}
The Common Vision Blox image.
Definition Image.cs:424
static FileImage FromFile(string fileName)
Loads an image with the given fileName .
Definition Image.cs:970
Definition CompositeCodeBase.cs:4
@ DataMatrix
Data Matrix.
Definition Result.cs:42
Retrieves the typed configuration for the decoder.
After a decoder is created with Create and before starting the decoding process with Execute, you should configure your decoder. The following code snippet shows exemplarily how to enable and configure the decoding of Data Matrix codes:
config.IsEnabled = true;
Polarity
Possible values for polarity.
Definition ConfigBase.cs:325
Note that you can enable and configure multiple code types simultaneously. The classes for all supported code types can be found within the Config namespace.
Alternatively, you can utilize the fluent interface pattern for seamless configuration:
- Template Parameters
-
| T | The class representing the code type. |
- Returns
- The configuration object.