IRONSOFTWAREHOME
불완전한 바코드 및 이미지 보정
using IronBarCode;
using IronSoftware.Drawing;

// Choose which filters are to be applied (in order)
// Set cacheAtEachIteration = true to save the intermediate image data after each filter is applied
var filtersToApply = new ImageFilterCollection(cacheAtEachIteration: true) {
    new SharpenFilter(),
    new InvertFilter(),
    new ContrastFilter(),
    new BrightnessFilter(),
    new AdaptiveThresholdFilter(),
    new BinaryThresholdFilter(),
    new GaussianBlurFilter(),
    new MedianBlurFilter(),
    new BilateralFilter()
};

BarcodeReaderOptions myOptionsExample = new BarcodeReaderOptions()
{
    // Set chosen filters in BarcodeReaderOptions
    ImageFilters = filtersToApply,

    Speed = ReadingSpeed.Balanced,
    ExpectMultipleBarcodes = true,
};

// Read with the options applied
BarcodeResults results = BarcodeReader.Read("screenshot.png", myOptionsExample);

AnyBitmap[] filteredImages = results.FilterImages();

// Export intermediate image files to disk
for (int i = 0 ; i < filteredImages.Length ; i++)
    filteredImages[i].SaveAs($"{i}_barcode.png");

// Or
results.ExportFilterImagesToDisk("filter-result.jpg");
Imports IronBarCode
Imports IronSoftware.Drawing

' Choose which filters are to be applied (in order)
' Set cacheAtEachIteration = true to save the intermediate image data after each filter is applied
Dim filtersToApply As New ImageFilterCollection(cacheAtEachIteration:=True) From {
    New SharpenFilter(),
    New InvertFilter(),
    New ContrastFilter(),
    New BrightnessFilter(),
    New AdaptiveThresholdFilter(),
    New BinaryThresholdFilter(),
    New GaussianBlurFilter(),
    New MedianBlurFilter(),
    New BilateralFilter()
}

Dim myOptionsExample As New BarcodeReaderOptions() With {
    .ImageFilters = filtersToApply,

    .Speed = ReadingSpeed.Balanced,
    .ExpectMultipleBarcodes = True
}

' Read with the options applied
Dim results As BarcodeResults = BarcodeReader.Read("screenshot.png", myOptionsExample)

Dim filteredImages As AnyBitmap() = results.FilterImages()

' Export intermediate image files to disk
For i As Integer = 0 To filteredImages.Length - 1
    filteredImages(i).SaveAs($"{i}_barcode.png")
Next

' Or
results.ExportFilterImagesToDisk("filter-result.jpg")
NuGet Download
PM > Install-Package BarCode
불완전한 바코드 및 이미지 보정

불완전한 바코드 및 이미지 보정

IronBarcode는 BarcodeReaderOptions 내에서 간편하게 적용할 수 있는 여러 이미지 전처리 필터를 제공합니다. 이미지의 판독을 개선할 수 있는 필터를 선택하세요, 예를 들어 Sharpen, 이진 임계값, 및 Contrast. 선택한 순서대로 필터가 적용된다는 점을 기억하십시오.

각 필터를 적용한 중간 이미지의 이미지 데이터를 저장하는 옵션이 있습니다. 이는 ImageFilterCollectionSaveAtEachIteration 속성으로 토글할 수 있습니다.

주요 코드 예제의 핵심 포인트:

  • 우리는 BarcodeReaderOptions의 인스턴스를 생성하고 다양한 이미지 필터로 구성합니다: Sharpen, Binary Threshold, 및 Contrast.
  • 필터는 적용 순서를 나타내는 특정 순서로 추가됩니다.
  • cacheAtEachIterationtrue로 설정함으로써, 라이브러리는 디버깅 및 분석에 유용한 각 필터 적용 후 중간 이미지를 저장합니다.
  • 마지막으로 이미지에서 바코드를 읽고 바코드 유형과 값을 콘솔에 출력합니다.
IronBarcode에서 이미지 보정에 대해 더 알아보세요
GitHub에서 보기

시작할 준비 되셨나요?

Nuget Downloads 2,422,100버전:2026.9방금 출시

Key in blue circle

무료 30일 체험 키를 즉시 받으세요.

Your trial license will be sent to your email address

제한 없음. 100% 무제한 이용. 신용카드 불필요.

bullet_checked신용카드나 계정 생성은 필요하지 않습니다.제한 없음. 100% 무제한 이용. 신용카드 불필요.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
무료 라이브 데모를 예약하세요
Booking Badge

전 세계 수백만 엔지니어들이 신뢰하는 제품입니다.

Iron Software의 고객 로고
부담 없는 무료 상담을 받아보세요
아래 양식을 작성하시거나 sales@ironsoftware.com으로 이메일을 보내주세요.
고객님의 정보는 항상 비밀로 유지됩니다.
전 세계 수백만 엔지니어들이 신뢰하는 제품입니다.
Iron Software의 고객 로고
지금 바로 30일 무료 체험판 키를 받으세요.
신용카드나 계정 생성은 필요하지 않습니다.