바코드 리더 옵션 설정
using IronBarCode;

BarcodeReaderOptions myOptionsExample = new BarcodeReaderOptions()
{
    // Choose a reading speed from: Faster, Balanced, Detailed, ExtremeDetail
    // There is a tradeoff in performance as more detail is set
    Speed = ReadingSpeed.Balanced,

    // Reader will stop scanning once a single barcode is found (if set to true)
    ExpectMultipleBarcodes = true,

    // By default, all barcode formats are scanned for
    // Specifying a subset of barcode types to search for would improve performance
    ExpectBarcodeTypes = BarcodeEncoding.AllOneDimensional,

    // Utilize multiple threads to read barcodes from multiple images in parallel
    Multithreaded = true,

    // Maximum threads for parallelized barcode reading
    // Default is 4
    MaxParallelThreads = 2,

    // The area of each image frame in which to scan for barcodes
    // Specifying a crop area will significantly improve performance and avoid noisy parts of the image
    CropArea = new System.Drawing.Rectangle(),

    // Special setting for Code39 barcodes
    // If a Code39 barcode is detected, try to read with both the base and extended ASCII character sets
    UseCode39ExtendedMode = true,

    // Minimum scan lines that must agree on a result for it to be valid
    // Default is 2. Set to 1 for thin or low-quality barcodes
    MinScanLines = 1
};
NuGet 다운로드
PM > Install-Package BarCode
바코드 리더 옵션 설정

바코드 리더 옵션 설정

IronBarcode는 BarcodeReaderOptions 클래스 내에서 제품에 맞춤화되고 최적화된 바코드 읽기를 가능하게 하는 다양한 설정을 제공합니다. 이러한 옵션은 리소스를 정확성으로 맞바꾸고, 읽기 범위를 제어하며, 읽기 전략을 최적화할 수 있게 합니다.

사용할 수 있는 BarcodeReaderOptions 유형

  • BarcodeReaderOptions: 이 클래스는 바코드 읽기를 사용자 정의할 수 있는 옵션을 제공하여 특정 필요에 맞춰 보다 효율적이고 정확한 바코드 처리를 가능하게 합니다.
  • ExpectMultipleBarcodes: 이를 false로 설정하면 첫 번째 바코드를 찾은 후 읽기를 중단하여 하나의 바코드만 예상되는 경우 성능을 개선할 수 있습니다.
  • ExpectBarcodeTypes: 스캔할 BarcodeEncoding 유형을 지정하여 다양한 바코드 형식이 있을 때 과정을 단순화합니다.
  • CropArea: 이미지의 특정 영역에 집중할 수 있으며, 바코드 위치가 대략적으로 알려진 경우 읽기 시간과 정확성을 크게 향상시킬 수 있습니다.
  • MaxParallelThreads: 여러 CPU 코어가 있는 시스템에서 성능을 향상시키기 위해 병렬로 사용할 최대 스레드 수를 지정합니다.
  • MinScanLines: 바코드 결과가 유효한 것으로 간주되기 위해 일치해야 하는 최소 스캔 라인 수를 설정합니다. 기본값은 2입니다. 이 값을 1로 낮추면 얇거나 품질이 낮은 BARCODE에 대한 감도가 높아지며, 반대로 높이면 오탐이 줄어듭니다.

이 구성은 자원 사용, 속도 및 정확성의 균형을 맞추며, 특정 바코드 판독 요구에 맞게 조정됩니다.

IronBarcode로 이미지에서 바코드 읽기 배우기
GitHub에서 보기

시작할 준비 되셨나요?

NuGet 다운로드 수 2,575,633버전:2026.11방금 출시