Sir,how can i read the QR barcode in Matlab software
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
how can i read this type of QR code please anyone help me.
0 Kommentare
Antworten (1)
Cris LaPierre
am 15 Dez. 2022
Bearbeitet: Cris LaPierre
am 15 Dez. 2022
In testing this, it appears the function only works with truecolor or grayscale images, not binary, so that is why I multiplied by 255. Otherwise, the code comes straight from the example I linked to. Since your image is the QR Code, it was not necessary to specify an roi.
Note: this solution requires the Computer Vision toolbox.
I = imread("https://www.mathworks.com/matlabcentral/answers/uploaded_files/1232262/image.png");
I = I*255;
imshow(I)
[msg,~,loc] = readBarcode(I,"QR-CODE")
xyText = loc(2,:);
Imsg = insertText(I,xyText,msg,"BoxOpacity",1,"FontSize",25);
Imsg = insertShape(Imsg, "FilledCircle", [loc, ...
repmat(10, length(loc), 1)],"Color","red","Opacity",1);
figure
imshow(Imsg)
4 Kommentare
Walter Roberson
am 16 Dez. 2022
Bearbeitet: Walter Roberson
am 16 Dez. 2022
You need the Computer Vision Toolbox R2020a or later
Siehe auch
Kategorien
Mehr zu Computer Vision with Simulink finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!