function [tloustka souradnice] = pocitani(souradnice, obr)

%% zjistovani poctu jednickovych pixelu v okoli krizeni v puvodnim obraze
tloustka = zeros(1,length(souradnice));
for k = 1:length(souradnice)        % jednotliva krizeni
    for i = souradnice(1,k)-10:souradnice(1,k)+10   % radky masky 20x20
        for j = souradnice(2,k)-10:souradnice(2,k)+10   % sloupce masky
            if obr(i,j)== 1
                tloustka(k) = tloustka(k)+1;    % soucet jednickovych pixelu v okoli
            end
        end
    end
end

%% odstraneni krizeni mensich nez 200 bodu v okoli
mensi = find(tloustka<200);     % hledani oblasti mensich nez 200 bodu
i = 1;
while i <= length(mensi)
    souradnice(1,mensi(i))=0;   % vynulovani techto souradnic
    tloustka(mensi(i)) = 0;
    i = i+1;
end
[x,y] = find(souradnice==0);
souradnice(:,y(:))=[];          % odstraneni souradnic krizeni tenkych cev

i = 1;
while i <= length(tloustka)
    if tloustka(i) == 0
        tloustka(i) = [];
    else i = i+1;
    end
end
