오인식
오인식을 어떻게 제거하나요?
바코드 읽기에서 오인식은 복잡한 배경 패턴이 바코드를 닮거나 노이즈와 아티팩트가 판독기가 잘못하여 유효한 바코드로 식별할 수 있는 의도치 않은 마크를 생성할 때 발생할 수 있습니다. 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.
}
}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
커티스 차우는 칼턴 대학교에서 컴퓨터 과학 학사 학위를 취득했으며, Node.js, TypeScript, JavaScript, React를 전문으로 하는 프론트엔드 개발자입니다. 직관적이고 미적으로 뛰어난 사용자 인터페이스를 만드는 데 열정을 가진 그는 최신 프레임워크를 활용하고, 잘 구성되고 시각적으로 매력적인 매뉴얼을 제작하는 것을 즐깁니다.