How to detect 8 barcode ?

2 views (last 30 days)
Yusuf Hamzah
Yusuf Hamzah on 13 Aug 2021
Edited: darova on 15 Aug 2021
Hello please someone help me to solve my problem, im beginner and still training with matlab but i have a trouble on my program.
Here is my code:
I = imread("multiple.png");
imshow(I)
% ROIs obtained using drawrectangle
roi = [28 69.500000000000000 265 81
329 74.500000000000000 256 68
33 2.255000000000000e+02 261 76
3.280000000000001e+02 2.245000000000000e+02 2.589999999999999e+02 76
34 3.845000000000000e+02 260 66
329 3.825000000000000e+02 258 73
35 5.345000000000000e+02 263 73
3.280000000000001e+02 5.365000000000000e+02 2.589999999999999e+02 72];
imSize=size(I);
for i=1:size(roi,2)
[msg, format, locs] = readBarcode(I,roi(i,:));
disp("Decoded format and message: " + format + ", " + msg)
% Insert a line to indicate the scan row of the barcode.
xyBegin = locs(1,:);
I = insertShape(I,"Line",[1 xyBegin(2) imSize(2) xyBegin(2)], ...
"LineWidth", 5);
% Annotate image with decoded message.
I = insertText(I, xyBegin, msg, "BoxOpacity", 1, "FontSize", 20);
end
imshow(I)
i want to show the output is 8 barcode scanned but im just can show 4 output, please help me
Thanks

Answers (0)

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by