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: