오인식
오인식을 어떻게 제거하나요?
바코드 읽기에서 오인식은 복잡한 배경 패턴이 바코드를 닮거나 노이즈와 아티팩트가 판독기가 잘못하여 유효한 바코드로 식별할 수 있는 의도치 않은 마크를 생성할 때 발생할 수 있습니다. IronBarcode의 판독 결과에서 오인식을 제거하기 위해 다음 단계가 취해질 수 있습니다:
-
예상되는 바코드 형식 지정: IronBarcode를 예상되는 바코드 형식만 읽도록 구성합니다. 옵션의 전체 목록은 여기에서 확인할 수 있습니다: BarcodeEncoding.
RemoveFalsePositive속성 활성화: 바코드를 스캔할 때, IronBarcode는 이미지에서 바코드와 유사한 '후보' 영역을 검색한 후 해당 영역을 디코딩하려고 시도합니다. 이 속성을true로 설정하면, IronBarcode는 인코딩에 오류가 없는 영역만 디코딩합니다. 기본적으로,RemoveFalsePositive는 이미true로 설정되어 있습니다.
using IronBarCode;
class BarcodeExample
{
static void Main()
{
// Create a BarcodeReaderOptions object with specific parameters.
BarcodeReaderOptions myOptionsExample = new BarcodeReaderOptions()
{
// Expect and return barcode results for only the Code 39 type.
ExpectBarcodeTypes = IronBarCode.BarcodeEncoding.Code39,
// Enable removal of false positives by setting to true.
RemoveFalsePositive = true
};
// Read the barcode from the specified image file using the given options.
var results = BarcodeReader.Read("barcode.png", myOptionsExample);
// Process the results here, e.g., display them, log them, etc.
}
}
using IronBarCode;
class BarcodeExample
{
static void Main()
{
// Create a BarcodeReaderOptions object with specific parameters.
BarcodeReaderOptions myOptionsExample = new BarcodeReaderOptions()
{
// Expect and return barcode results for only the Code 39 type.
ExpectBarcodeTypes = IronBarCode.BarcodeEncoding.Code39,
// Enable removal of false positives by setting to true.
RemoveFalsePositive = true
};
// Read the barcode from the specified image file using the given options.
var results = BarcodeReader.Read("barcode.png", myOptionsExample);
// Process the results here, e.g., display them, log them, etc.
}
}
Imports IronBarCode
Friend Class BarcodeExample
Shared Sub Main()
' Create a BarcodeReaderOptions object with specific parameters.
Dim myOptionsExample As New BarcodeReaderOptions() With {
.ExpectBarcodeTypes = IronBarCode.BarcodeEncoding.Code39,
.RemoveFalsePositive = True
}
' Read the barcode from the specified image file using the given options.
Dim results = BarcodeReader.Read("barcode.png", myOptionsExample)
' Process the results here, e.g., display them, log them, etc.
End Sub
End Class

