Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Barcode Recognition Performance C# Examples — Aspose.BarCode for .NET

NuGet .NET Examples

Standalone, build-validated C# code examples for Barcode Recognition Performance using Aspose.BarCode for .NET. Each file is a complete console application — copy it, run dotnet run, and it works.

Examples (81 files)

File Description
activate-qualitysettingsuseminimalxdimension-and-set-minimalxdimension-to-1-pixel-to-filter-sub-pixel-noise.cs Activate QualitySettings.UseMinimalXDimension and set MinimalXDimension to 1 pixel to filter sub‑pixel noise.
adjust-color-scheme-to-invert-colors-and-assess-recognition-performance-on-negative-image-barcodes.cs Adjust color scheme to invert colors and assess recognition performance on negative‑image barcodes.
adjust-qualitysettingsxdimension-to-3-pixels-to-match-typical-1d-barcode-element-widths.cs Adjust QualitySettings.XDimension to 3 pixels to match typical 1D barcode element widths.
apply-custom-color-scheme-to-enhance-detection-of-dark-barcodes-on-light-backgrounds.cs Apply a custom color scheme to enhance detection of dark barcodes on light backgrounds.
batch-process-directory-of-mixed-format-images-and-generate-csv-report-of-recognition-times.cs Batch process a directory of mixed‑format images and generate a CSV report of recognition times.
benchmark-effect-of-changing-minimalxdimension-from-0-to-2-pixels-on-false-positive-rates.cs Benchmark the effect of changing MinimalXDimension from 0 to 2 pixels on false positive rates.
benchmark-reading-speed-of-100-gif-barcode-images-under-highperformance-and-highquality-presets.cs Benchmark reading speed of 100 GIF barcode images under HighPerformance and HighQuality presets.
benchmark-recognition-of-stacked-linear-barcodes-versus-single-barcodes-to-evaluate-algorithm-scalability.cs Benchmark recognition of stacked linear barcodes versus single barcodes to evaluate algorithm scalability.
benchmark-time-saved-by-disabling-allowincorrectbarcodes-in-high-throughput-scanning-scenario.cs Benchmark the time saved by disabling AllowIncorrectBarcodes in a high‑throughput scanning scenario.
compare-barcode-detection-accuracy-between-grayscale-and-full-color-input-images-across-multiple-symbologies.cs Compare barcode detection accuracy between grayscale and full‑color input images across multiple symbologies.
compare-cpu-usage-between-highperformance-and-maxquality-presets-using-stopwatch-timing-measurements.cs Compare CPU usage between HighPerformance and MaxQuality presets using Stopwatch timing measurements.
compare-detection-accuracy-of-datamatrix-codes-when-xdimension-is-set-to-1-versus-3-pixels.cs Compare detection accuracy of DataMatrix codes when XDimension is set to 1 versus 3 pixels.
compare-detection-rates-of-small-barcodes-using-xdimension-mode-versus-default-detection.cs Compare detection rates of small barcodes using XDimension mode versus default detection.
compare-number-of-detected-barcodes-when-useminimalxdimension-is-toggled-on-versus-off-for-noisy-images.cs Compare the number of detected barcodes when UseMinimalXDimension is toggled on versus off for noisy images.
compare-recognition-speed-of-1d-barcodes-versus-2d-barcodes-under-identical-qualitysettings.cs Compare recognition speed of 1D barcodes versus 2D barcodes under identical QualitySettings.
configure-deconvolution-parameters-to-improve-recognition-of-blurred-qr-codes-in-jpeg-files.cs Configure deconvolution parameters to improve recognition of blurred QR codes in JPEG files.
configure-library-to-prioritize-code39-symbology-and-measure-any-change-in-overall-processing-speed.cs Configure the library to prioritize Code39 symbology and measure any change in overall processing speed.
configure-qualitysettingsxdimension-to-1-pixel-for-recognizing-ultra-fine-one-pixel-wide-barcodes-accurately.cs Configure QualitySettings.XDimension to 1 pixel for recognizing ultra‑fine one‑pixel wide barcodes accurately.
configure-recognition-to-ignore-quiet-zones-and-observe-effect-on-speed-for-large-code128-barcodes.cs Configure recognition to ignore quiet zones and observe effect on speed for large Code128 barcodes.
create-barcodereader-instance-that-reads-jpeg-images-and-applies-highquality-preset-for-balanced-speed.cs Create a BarCodeReader instance that reads JPEG images and applies HighQuality preset for balanced speed.
create-diagnostic-mode-that-logs-each-barcode-element-size-when-useminimalxdimension-is-active.cs Create a diagnostic mode that logs each barcode element size when UseMinimalXDimension is active.
create-performance-benchmark-that-records-cpu-usage-during-barcode-scanning-of-animated-gif-frames.cs Create a performance benchmark that records CPU usage during barcode scanning of animated GIF frames.
create-script-that-processes-all-images-in-zip-archive-and-outputs-summary-json-file.cs Create a script that processes all images in a zip archive and outputs a summary JSON file.
create-unit-test-that-verifies-recognition-speed-remains-under-150-ms-for-1-mb-png-files.cs Create a unit test that verifies recognition speed remains under 150 ms for 1‑MB PNG files.
create-unit-tests-ensuring-minimalxdimension-defaults-to-zero-when-useminimalxdimension-is-false.cs Create unit tests ensuring MinimalXDimension defaults to zero when UseMinimalXDimension is false.
deactivate-useminimalxdimension-after-processing-to-restore-default-element-size-handling.cs Deactivate UseMinimalXDimension after processing to restore default element size handling.
develop-diagnostic-mode-that-outputs-raw-pixel-matrix-used-for-barcode-detection-when-debugging.cs Develop a diagnostic mode that outputs the raw pixel matrix used for barcode detection when debugging.
enable-hardware-acceleration-if-available-and-compare-recognition-throughput-against-software-only-mode.cs Enable hardware acceleration if available and compare recognition throughput against software‑only mode.
enable-multi-threaded-recognition-and-compare-throughput-against-single-threaded-execution-on-set-of-images.cs Enable multi‑threaded recognition and compare throughput against single‑threaded execution on a set of images.
enable-qualitysettingsallowincorrectbarcodes-to-capture-potentially-unreadable-barcodes-during-debugging-sessions.cs Enable QualitySettings.AllowIncorrectBarcodes to capture potentially unreadable barcodes during debugging sessions.
evaluate-effect-of-disabling-deconvolution-on-recognition-accuracy-for-low-contrast-barcodes.cs Evaluate the effect of disabling deconvolution on recognition accuracy for low‑contrast barcodes.
evaluate-qr-code-detection-speed-when-useminimalxdimension-is-disabled-versus-enabled.cs Evaluate QR code detection speed when UseMinimalXDimension is disabled versus enabled.
evaluate-recognition-success-rate-for-rotated-datamatrix-codes-at-0-45-and-90-angles.cs Evaluate recognition success rate for rotated DataMatrix codes at 0°, 45°, and 90° angles.
generate-heat-map-visualizing-areas-where-barcode-elements-were-detected-using-xdimension-mode.cs Generate a heat map visualizing areas where barcode elements were detected using XDimension mode.
generate-performance-graphs-comparing-recognition-time-versus-xdimension-values-for-sample-dataset.cs Generate performance graphs comparing recognition time versus XDimension values for a sample dataset.
generate-summary-report-showing-average-confidence-per-preset-across-test-image-set.cs Generate a summary report showing average confidence per preset across a test image set.
implement-asynchronous-barcode-scanning-and-measure-latency-reduction-compared-to-synchronous-calls.cs Implement asynchronous barcode scanning and measure latency reduction compared to synchronous calls.
implement-feature-that-logs-exact-xdimension-and-minimalxdimension-values-used-for-each-image.cs Implement a feature that logs the exact XDimension and MinimalXDimension values used for each image.
implement-method-that-resets-all-qualitysettings-to-defaults-before-processing-new-image-batch.cs Implement a method that resets all QualitySettings to defaults before processing a new image batch.
implement-region-of-interest-scanning-to-limit-analysis-to-central-rectangle-and-measure-time-savings.cs Implement region‑of‑interest scanning to limit analysis to a central rectangle and measure time savings.
load-bmp-images-with-embedded-metadata-and-verify-that-metadata-does-not-affect-recognition-speed.cs Load BMP images with embedded metadata and verify that metadata does not affect recognition speed.
load-high-resolution-png-image-and-measure-barcode-recognition-time-using-default-settings.cs Load a high‑resolution PNG image and measure barcode recognition time using default settings.
log-detailed-timing-for-each-processing-stage-loading-preprocessing-detection-and-decoding-to-identify-bottlenecks.cs Log detailed timing for each processing stage—loading, preprocessing, detection, and decoding—to identify bottlenecks.
log-recognition-duration-for-each-image-when-varying-qualitysettings-presets-to-evaluate-performance-impact.cs Log recognition duration for each image when varying QualitySettings presets to evaluate performance impact.
measure-cpu-core-utilization-while-scanning-large-batch-of-10-000-barcode-images-in-parallel.cs Measure CPU core utilization while scanning a large batch of 10,000 barcode images in parallel.
measure-impact-of-increasing-image-resolution-from-72-dpi-to-300-dpi-on-detection-latency.cs Measure the impact of increasing image resolution from 72 DPI to 300 DPI on detection latency.
measure-memory-consumption-while-recognizing-barcodes-in-large-multi-page-pdf-document.cs Measure memory consumption while recognizing barcodes in a large multi‑page PDF document.
preprocess-input-images-with-gaussian-blur-removal-before-barcode-detection-to-assess-performance-impact.cs Preprocess input images with Gaussian blur removal before barcode detection to assess performance impact.
process-batch-of-tiff-images-with-varying-contrast-levels-and-record-average-recognition-accuracy.cs Process a batch of TIFF images with varying contrast levels and record average recognition accuracy.
process-directory-of-bmp-files-using-normalquality-preset-and-record-total-processing-time.cs Process a directory of BMP files using NormalQuality preset and record total processing time.
profile-effect-of-enabling-useminimalxdimension-on-multi-core-cpu-utilization-during-batch-processing.cs Profile the effect of enabling UseMinimalXDimension on multi‑core CPU utilization during batch processing.
profile-impact-of-allowincorrectbarcodes-on-overall-cpu-load-during-continuous-scanning.cs Profile the impact of AllowIncorrectBarcodes on overall CPU load during continuous scanning.
profile-impact-of-increasing-minimalxdimension-on-overall-batch-processing-throughput-in-tests.cs Profile the impact of increasing MinimalXDimension on overall batch processing throughput in tests.
profile-impact-of-large-image-dimensions-eg-4000x4000-on-recognition-time-with-highperformance-preset.cs Profile the impact of large image dimensions (e.g., 4000x4000) on recognition time with HighPerformance preset.
record-number-of-barcodes-detected-per-image-under-each-preset-to-analyze-consistency.cs Record the number of barcodes detected per image under each preset to analyze consistency.
record-number-of-false-positives-encountered-when-minimalxdimension-is-set-too-low.cs Record the number of false positives encountered when MinimalXDimension is set too low.
record-percentage-of-barcodes-successfully-decoded-under-each-preset-across-mixed-type-dataset.cs Record the percentage of barcodes successfully decoded under each preset across a mixed‑type dataset.
retrieve-barcoderesultconfidence-after-allowing-incorrect-barcodes-to-assess-detection-reliability.cs Retrieve BarCodeResult.Confidence after allowing incorrect barcodes to assess detection reliability.
run-recognition-on-low-light-jpeg-images-after-applying-histogram-equalization-and-record-improvement.cs Run recognition on low‑light JPEG images after applying histogram equalization and record improvement.
run-recognition-on-video-stream-extracting-one-frame-per-second-and-record-average-processing-time.cs Run recognition on a video stream extracting one frame per second and record average processing time.
set-qualitysettingspreset-to-highperformance-before-reading-batch-of-png-barcode-images.cs Set QualitySettings.Preset to HighPerformance before reading a batch of PNG barcode images.
set-qualitysettingsxdimension-to-6-pixels-for-detecting-large-barcodes-in-high-resolution-scans.cs Set QualitySettings.XDimension to 6 pixels for detecting large barcodes in high‑resolution scans.
set-recognition-timeout-of-200-milliseconds-and-log-any-barcodes-that-exceed-limit.cs Set a recognition timeout of 200 milliseconds and log any barcodes that exceed the limit.
switch-qualitysettingspreset-to-maxquality-to-prioritize-accuracy-when-scanning-high-resolution-tiff-files.cs Switch QualitySettings.Preset to MaxQuality to prioritize accuracy when scanning high‑resolution TIFF files.
test-barcode-detection-on-images-with-added-gaussian-noise-while-using-minimalxdimension-filtering.cs Test barcode detection on images with added Gaussian noise while using MinimalXDimension filtering.
test-deconvolution-on-heavily-compressed-jpeg-images-to-determine-optimal-quality-threshold-for-reliable-scanning.cs Test deconvolution on heavily compressed JPEG images to determine optimal quality threshold for reliable scanning.
test-effect-of-setting-minimalxdimension-to-05-pixels-on-detection-of-sub-pixel-barcode-elements.cs Test the effect of setting MinimalXDimension to 0.5 pixels on detection of sub‑pixel barcode elements.
test-recognition-of-code128-barcodes-with-xdimension-set-to-2-pixels-across-multiple-image-resolutions.cs Test recognition of Code128 barcodes with XDimension set to 2 pixels across multiple image resolutions.
test-recognition-of-very-large-barcodes-10-pixels-xdimension-using-large-mode-configuration.cs Test recognition of very large barcodes (>10 pixels XDimension) using Large mode configuration.
test-recognition-on-images-with-added-gaussian-noise-at-varying-signal-to-noise-ratios-and-log-success-rates.cs Test recognition on images with added Gaussian noise at varying signal‑to‑noise ratios and log success rates.
use-stopwatch-to-measure-time-spent-in-barcode-detection-versus-image-loading.cs Use a Stopwatch to measure time spent in barcode detection versus image loading.
validate-that-enabling-allowincorrectbarcodes-does-not-alter-decoded-codetext-of-valid-barcodes.cs Validate that enabling AllowIncorrectBarcodes does not alter the decoded CodeText of valid barcodes.
validate-that-resetting-qualitysettings-to-defaults-restores-original-cpu-consumption-patterns-during-processing.cs Validate that resetting QualitySettings to defaults restores original CPU consumption patterns during processing.
validate-that-setting-allowincorrectbarcodes-to-true-does-not-affect-confidence-of-correctly-decoded-barcodes.cs Validate that setting AllowIncorrectBarcodes to true does not affect confidence of correctly decoded barcodes.
validate-that-setting-both-useminimalxdimension-and-allowincorrectbarcodes-together-does-not-cause-conflicts.cs Validate that setting both UseMinimalXDimension and AllowIncorrectBarcodes together does not cause conflicts.
validate-that-setting-minimalxdimension-higher-than-xdimension-filters-out-valid-barcodes-unintentionally.cs Validate that setting MinimalXDimension higher than XDimension filters out valid barcodes unintentionally.
verify-that-switching-presets-mid-batch-does-not-corrupt-previously-obtained-results.cs Verify that switching presets mid‑batch does not corrupt previously obtained results.
write-documentation-examples-demonstrating-how-to-switch-between-highperformance-and-highquality-presets.cs Write documentation examples demonstrating how to switch between HighPerformance and HighQuality presets.
write-integration-tests-confirming-barcode-recognition-succeeds-after-toggling-useminimalxdimension-correctly.cs Write integration tests confirming barcode recognition succeeds after toggling UseMinimalXDimension correctly.
write-unit-tests-verifying-that-allowincorrectbarcodes-returns-barcoderesultconfidence-as-null.cs Write unit tests verifying that AllowIncorrectBarcodes returns BarCodeResult.Confidence as null.
write-wrapper-that-logs-both-recognition-time-and-cpu-usage-for-each-processed-image.cs Write a wrapper that logs both recognition time and CPU usage for each processed image.

Quick Start

# Install the package
dotnet add package Aspose.BarCode

# Run any example directly
dotnet-script example-file.csx
# or copy Program.cs into a new console project and run:
dotnet run

Resources

Updated: 2026-07-17 | Examples: 81