function [centersStrong,LH,LD,PH,PD,centers] = findCircles(im)
     LH = [];
     LD = [];
     PD = [];
     PH = [];
    im2 = rgb2lab(im); 
    [rIm, cIm] = size(im2);
    halfHigh = round(rIm/2);
    halfWidth = round(cIm/6);                                        
    a = im2(:,:,2);
    a = a>18;  
    a2 = bwareaopen(a, 250); 
    [centers] = imfindcircles(a2,[8 35],'Method','TwoStage','Sensitivity',0.6); 

    if length(centers)>=4
        centersStrong = centers(1:4,:);   %najdu 4 "nejsilnější" kružnice
        [rCent] = size(centersStrong);

    else
        [rCent] = size(centers);
        centersStrong = centers(1:rCent,:); 
      
    end
    if rCent>0
    for k = 1:rCent            %rozdělení bodů na levý horní, pravý dolní, atd.
        if (centersStrong(k,2) < halfHigh && centersStrong(k,1)< halfWidth)
            LH(end+1,:) = centersStrong(k,:);
        end
        if (centersStrong(k,2) > halfHigh && centersStrong(k,1)< halfWidth)
            LD(end+1,:) = centersStrong(k,:);
        end
         if (centersStrong(k,2) > halfHigh && centersStrong(k,1)> halfWidth)
            PD(end+1,:) = centersStrong(k,:);
         end
         if (centersStrong(k,2) < halfHigh && centersStrong(k,1)> halfWidth)
            PH(end+1,:) = centersStrong(k,:);
         end
     end
    
       
    end
                        %zobrazím kružnice
end

