AIFotoONLUS.Core
Represents a detected text region produced by the detection network.
Bounding rectangle of the detection in image coordinates.
Combined confidence score for the detection (objectness * class probability).
Class index predicted by the network (index into ).
Center X coordinate (in pixels) of the bounding box, used to order detections left-to-right.
Represents a detected text region produced by the detection network.
Bounding rectangle of the detection in image coordinates.
Combined confidence score for the detection (objectness * class probability).
Class index predicted by the network (index into ).
Center X coordinate (in pixels) of the bounding box, used to order detections left-to-right.
Bounding rectangle of the detection in image coordinates.
Combined confidence score for the detection (objectness * class probability).
Class index predicted by the network (index into ).
Center X coordinate (in pixels) of the bounding box, used to order detections left-to-right.
Represents the result of recognizing a single region: recognized text,
its bounding box and confidence.
Recognized text for the region (usually a sequence of digits).
Bounding rectangle of the recognition result.
Confidence score associated with the recognition.
Represents the result of recognizing a single region: recognized text,
its bounding box and confidence.
Recognized text for the region (usually a sequence of digits).
Bounding rectangle of the recognition result.
Confidence score associated with the recognition.
Recognized text for the region (usually a sequence of digits).
Bounding rectangle of the recognition result.
Confidence score associated with the recognition.
Aggregated result for a processed image.
Name of the image file.
Comma-separated recognized texts found in the image (may be empty).
Full path to the processed image file.
Aggregated result for a processed image.
Name of the image file.
Comma-separated recognized texts found in the image (may be empty).
Full path to the processed image file.
Name of the image file.
Comma-separated recognized texts found in the image (may be empty).
Full path to the processed image file.
Configuration options that control model file locations, input sizes
and runtime thresholds used by .
Path to the Darknet configuration (.cfg) file for the detection network.
Path to the Darknet weights (.weights) file for the detection network.
Path to the Darknet configuration (.cfg) file for the recognition network.
Path to the Darknet weights (.weights) file for the recognition network.
Confidence threshold used to filter out low-probability detections.
Non-maximum suppression (NMS) IoU threshold used to remove overlapping
detection boxes.
Input size used when preparing the blob for the detection network.
Input size used when preparing the blob for the recognition network.
Labels representing digit classes in the recognition model. The order
must match the class ordering used by the trained recognition network.
When enabled, request OpenCV DNN CUDA backend/target for inference.
The installed OpenCV runtime must have CUDA support or model loading/forwarding may fail.
When enabled, recognition crops will be saved to disk under
"logs/crops" for diagnostic inspection. Disabled by default.
Create a new instance of using the
provided . The constructor loads the
detection and recognition Darknet model files and prepares the OpenCV
DNN nets for CPU inference.
Model configuration containing file paths, thresholds
and other options. Must not be null.
This constructor will throw when
any of the expected model files are missing. For logging purposes an
overload accepting an is available.
Create a new instance of with an
optional . The logger will receive diagnostic
messages and errors produced by the engine during processing.
Model configuration containing file paths and
runtime thresholds.
Optional logger for diagnostic messages.
May be null.
Thrown when
is null.
Thrown when one of the model
files referenced by does not exist.
Detect text regions in the supplied image using the detection network.
Input image as an OpenCvSharp .
Must not be null.
An enumerable of containing the
bounding boxes, confidence and class information for each detected
region. The results are already filtered with the configured
confidence and NMS thresholds.
Recognize digits inside a cropped image region using the recognition
network. The method runs the recognition network and returns the
concatenated sequence of recognized digit labels ordered left-to-right.
Cropped image containing digits as
. Must not be null.
Optional context string used for diagnostics
(e.g. when saving crop image files).
A string containing recognized digits in left-to-right order.
Returns an empty string when no digits are recognized above the
configured confidence threshold.
Small DTO that describes the name and shape of a detection network
forward output used for diagnostics.
Layer/output name.
Number of rows in the output Mat.
Number of columns in the output Mat.
Small DTO that describes the name and shape of a detection network
forward output used for diagnostics.
Layer/output name.
Number of rows in the output Mat.
Number of columns in the output Mat.
Layer/output name.
Number of rows in the output Mat.
Number of columns in the output Mat.
Result returned by , contains
the recognized text result and an array describing detection network
forward outputs (shapes and names) which are useful for debugging
model output layout mismatches.
Recognition result for the processed image.
Array describing detection net outputs.
Result returned by , contains
the recognized text result and an array describing detection network
forward outputs (shapes and names) which are useful for debugging
model output layout mismatches.
Recognition result for the processed image.
Array describing detection net outputs.
Recognition result for the processed image.
Array describing detection net outputs.
Process a single image file and return the recognition result together
with detection network forward output shapes for diagnostics. This
method reads the image from disk, runs a forward pass over the
detection network to capture the raw output Mat shapes and then calls
the normal processing pipeline to return the recognized text.
Process a single image file and return the recognized text as an
. The method detects candidate text regions
and runs recognition on each crop. Multiple recognized digit sequences
are joined with a comma in the returned .
Path to an image file on disk. Supported
formats depend on OpenCV (typically JPEG, PNG, ...).
An containing the file name and
recognized text (possibly empty).
Process all JPEG images in a directory and return the recognition
results. This is a blocking wrapper over .
Path to a directory containing images.
If true, files whose names start with
"tn_" will be skipped (convention used to mark text-negative images).
Collection of ordered by file name.
Progress statistics reported during directory processing.
Total number of image files to process.
Number of files processed so far.
Current processing throughput in images/second.
Progress statistics reported during directory processing.
Total number of image files to process.
Number of files processed so far.
Current processing throughput in images/second.
Total number of image files to process.
Number of files processed so far.
Current processing throughput in images/second.