"readBarcode" cannot detect the circular QR code?

1 visualizzazione (ultimi 30 giorni)
cui,xingxing
cui,xingxing il 7 Feb 2021
Modificato: cui,xingxing il 7 Feb 2021
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:

Risposte (0)

Prodotti


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by