"readBarcode" cannot detect the circular QR code?

조회 수: 6 (최근 30일)
xingxingcui
xingxingcui 2021년 2월 7일
편집: xingxingcui 2021년 2월 7일
I detected and recognized the square QR code, the circular QR code, and the circular square QR code. The first and third images were successfully detected and recognized, why the second image could not be detected no matter how to draw the ROI information? My code and image are as follows:
%% 测试一维二维码定位状态
img1 = imread('1.png');
isDetect = false;
while ~isDetect
imshow(img1);
ri = drawrectangle();
ROI = ri.Position;
[msg,detectedFormat,loc] = readBarcode(img1,ROI);
if msg~=""
isDetect = true;
end
end
if isDetect
img1 = insertShape(img1,'FilledCircle',[loc,8*ones(size(loc,1),1)],'color',[255,0,0]);
img1 = insertText(img1,mean(loc),msg,...
"TextColor",[255,0,0],...
"FontSize",18,...
"BoxOpacity",1);
imshow(img1)
end
************************************************************************************************************************************************************************************
results:

답변 (0개)

카테고리

Help CenterFile Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by