REAL-TIME IRIS DETECTOR

Matlab REAL-TIME IRIS DETECTOR

IRIS DETECTOR is used for many medical application. it is used for security system design and identifications application designing.

In india it is used for Adhaar for user identification.

Matlab REAL TIME IRIS DETECTOR

%matlab code
obj = VideoReader('irisavi.avi');
NumberOfFrames = obj.NumberOfFrames;
% 
la_imagen=read(obj,10);
filas=size(la_imagen,1);
columnas=size(la_imagen,2);
% Center
centro_fila=round(filas/2);
centro_columna=round(columnas/2);
 figure(1);
for cnt = 1:NumberOfFrames       
    la_imagen=read(obj,cnt);
    if size(la_imagen,3)==3
        la_imagen=rgb2gray(la_imagen);
    end
    subplot(212)
    piel=~im2bw(la_imagen,0.19);
    %     --
    piel=bwmorph(piel,'close');
    piel=bwmorph(piel,'open');
    piel=bwareaopen(piel,200);
    piel=imfill(piel,'holes');
    imagesc(piel);
    % Tagged objects in BW image
    L=bwlabel(piel);
    % Get areas and tracking rectangle
    out_a=regionprops(L);
    % Count the number of objects
    N=size(out_a,1);
    if N < 1 || isempty(out_a) % Returns if no object in the image
        solo_cara=[ ];
        continue
    end
    % ---
    % Select larger area
    areas=[out_a.Area];
    [area_max pam]=max(areas);
    subplot(211)
    imagesc(la_imagen);
    colormap gray
    hold on
    rectangle('Position',out_a(pam).BoundingBox,'EdgeColor',[1 0 0],...
        'Curvature', [1,1],'LineWidth',2)
    centro=round(out_a(pam).Centroid);
    X=centro(1);
    Y=centro(2);
    plot(X,Y,'g+')
    %     
    text(X+10,Y,['(',num2str(X),',',num2str(Y),')'],'Color',[1 1 1])
    if X<centro_columna && Y<centro_fila
        title('Top left')
    elseif X>centro_columna && Y<centro_fila
        title('Top right')
    elseif X<centro_columna && Y>centro_fila
        title('Bottom left')
    else
        title('Bottom right')
    end
    hold off
    % --
    drawnow;
end

Leave a Reply

Your email address will not be published. Required fields are marked *

Connect with us on social media and stay update with latest technology/ projects !

Flag Counter