QR Code Decoder
1 개요
2D 바코드 중 하나인 QR Code 코드를 인식하는 알고리즘입니다.
2 알고리즘 상세 설명
Result Image |
---|
![]() |
Fig. QR Code Decoder
3개의 Finder Pattern의 특징이 있습니다. QR Code의 인코딩 버전은 1~40까지 있으며, 모든 버전을 지원합니다.
3 파라미터 설정 및 사용 방법
SetSymbolType
- 인식할 코드의 심볼 타입을 설정합니다.
- Symbol Type1은 Version 1~20까지의 값을 enum으로 가지며, Symbol Type2은 Version 21~40까지의 값을 enum으로 가집니다.
- 기본 값은
EQRCodeSymbolType1_Decoding_All
,EQRCodeSymbolType2_Decoding_All
로 모든 코드를 인식합니다.
SetDenoisingMethod
- 노이즈 제거 처리 옵션을 설정합니다.
- 기본 값은
EDataCodeDecoderDenoisingMethod_FLDenoisingType1
입니다.
SetDetectingCount
- 검출 개수를 설정합니다.
- 기본 값은
EDataCodeDecoderDetectingCount_Single
입니다.
EnableRetryVariousMethod
- 검출 실패 시 추가 검사 동작을 설정합니다.
- 기본 값은
true
입니다.
GetResultQRCode
- 인식한 코드 결과를 가져옵니다.
- 코드의 영역 및 코드정보들을 포함합니다.
4 예제 코드
CQRCodeDecoder qrCode;
//////////////////////////////////
// 공통 파라미터 설정
//////////////////////////////////
//////////////////////////////////
// 추가 옵션 설정
//////////////////////////////////
qrCode.SetSymbolType(EQRCodeSymbolType1_Decoding_All, EQRCodeSymbolType2_Decoding_All);
qrCode.SetDetectingCount(EDataCodeDecoderDetectingCount_All);
qrCode.Execute();
// 인식에 성공한 코드 결과를 가져옵니다.
int resultCount = qrCode.GetResultCount();
for(int i = 0; i < resultCount; ++i)
{
CQRCodeDecoder::CQRCodeInformation codeResult;
qrCode.GetResultQRCode(i, codeResult);
}
5 관련 알고리즘
CBarcodeDecoder
,
CBarcodeEncoder
,
CDataMatrixDecoder
,
CDataMatrixEncoder
,
CDataMatrixVerifier
,
CQRCCodeEncoder
,
CQRCCodeVerifier
,
CMicroQRCodeDecoder
,
CMicroQRCodeEncoder
,
CMicroQRCodeVerifier
,
CUnifiedDataCodeDecoder
,