Code covered by the BSD License  

Highlights from
Aztec barcode reader

image thumbnail
from Aztec barcode reader by Heuve
This program can read Aztec barcode from video or pictures. It is partial in Dutch

[horizontaal verticaal]=raster(A, x2, y2,afstand,detail,detail2)
function [horizontaal verticaal]=raster(A, x2, y2,afstand,detail,detail2)

horizontaal=[0 []];
verticaal=[0 []];

A=edge(A, 'log'); %'log' bij afbeeldingen
tellerh=sum(A);
gemh=mean(tellerh);
tellerv=sum(A,2);
gemv=mean(tellerv);

for a=1:x2
    if tellerh(a)>gemh
        horizontaal=[horizontaal a];
    end
end

for a=1:y2
    if tellerv(a)>gemv
        verticaal=[verticaal a];
    end
end



% for a=1:detail2:x2
%     for b=1:y2
%         if kleurh(b)==A(b,a)
%         else
%             tellerh=tellerh+1;
%             kleurh(b)=A(b,a);
%         end
%     end
%     if tellerh>detail
%         horizontaal=[horizontaal a];
%     end
%     tellerh=0;
% end
% 
% 
% for a=1:detail2:y2
%     for b=1:x2
%         if kleurv(b)==A(a,b)
%         else
%             tellerv=tellerv+1;
%             kleurv(b)=A(a,b);
%         end
%     end
%     if tellerv>detail
%         verticaal=[verticaal a];
%     end
%     tellerv=0;
% end

Contact us at files@mathworks.com