clc;clear all;close all;
%% vektory
G=1:67;G(18)=[];                       % není v databázi 18. pacient
%% shoda X neshoda
T=1:67;T(18)=[];
matrix1 = zeros(1,length(T));
matrix2 = zeros(1,length(T));
W = 0;Sp = 0;
for f=G
    if f==46|f==53                     % nemají 1. obrázek (2 = referenční)
        filename = ['Study01_000',num2str(f,'%02d'),'_002_registered.avi_average_image.tif_seg_vessels','.tif'];
        ref = imread(filename); 
       
        pic=ref;
        pic = CutEdges(pic);
        pic = SmallOut(pic);
        N = srovnani(pic,T);   
        R = filename(1:length(N));
        S = strcmp(R,N)

    else                               % normální snímky
        filename = ['Study01_000',num2str(f,'%02d'),'_001_registered.avi_average_image.tif_seg_vessels','.tif'];
        ref = imread(filename);
    
        pic=ref;
        pic = CutEdges(pic);
        pic = SmallOut(pic);
        N = srovnani(pic,T);
        R = filename(1:length(N));
        S = strcmp(R,N)        

    end  

    if S==0
        W = W+1;
    else
        Sp = Sp+1;
    end
    
end

eff = (Sp/(Sp+W))*100

