"readBarcode" cannot detect the circular QR code?
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!