function [LH,LD,PD,PH] = nalezeniZbyvajicihoBodu(centers, im,LH,LD,PD,PH)   
    [r, c] = size(im);
    halfHigh = round(r/2);
    halfWidth = round(c/6);
    while (isempty(LH) || isempty(LD) || isempty(PH) || isempty(PD))
        if isempty(LH)
            [LH,LD,PD,PH,centers] = clickOnOrangePoint(im,[0 0 halfWidth halfHigh], centers,halfHigh,halfWidth,LH,LD,PD,PH);
        end
         if isempty(LD)
            [LH,LD,PD,PH,centers] = clickOnOrangePoint(im,[0 halfHigh halfWidth halfHigh],centers,halfHigh,halfWidth,LH,LD,PD,PH);
         end
        if isempty(PH)
            [LH,LD,PD,PH,centers] = clickOnOrangePoint(im,[halfWidth 0 halfWidth halfHigh],centers,halfHigh,halfWidth,LH,LD,PD,PH);
        end
         if isempty(PD)
            [LH,LD,PD,PH,centers] = clickOnOrangePoint(im,[halfWidth halfHigh halfWidth halfHigh],centers,halfHigh,halfWidth,LH,LD,PD,PH);
         end
         
    end
  
         thresh = 50;
             if numel(LH)>2
                 for i = 1:length(LH)
                     distLD = pdist([LH(i,1),LH(i,2),LD(1),LD(2)], 'euclidean');
                     distPH = pdist([LH(i,1),LH(i,2),PH(1),PH(2)], 'euclidean');
                     distPD = pdist([LH(i,1),LH(i,2),PD(1),PD(2)], 'euclidean');
                     if ~(anyExceed(distLD, 1876-thresh, 1876+thresh) || anyExceed(distPH, 2612-thresh, 2612+thresh) || anyExceed(distPD, 3279-thresh, 3279+thresh))
                        LH = LH(i,:);
                        break;
                     end
                 end
             end
             
            if numel(LD)>2
                 for i = 1:length(LD)
                     distLH = pdist([LD(i,1),LD(i,2),LH(1),LH(2)], 'euclidean');
                     distPH = pdist([LD(i,1),LD(i,2),PH(1),PH(2)], 'euclidean');
                     distPD = pdist([LD(i,1),LD(i,2),PD(1),PD(2)], 'euclidean');
                     if ~(anyExceed(distLH, 1876-thresh, 1876+thresh) || anyExceed(distPH, 3267-thresh, 3267+thresh) || anyExceed(distPD, 2695-thresh, 2695+thresh))
                        LD = LD(i,:);
                        break;
                     end
                 end
            end
             
            if numel(PH)>2
                 for i = 1:length(PH)
                     distLH = pdist([PH(i,1),PH(i,2),LH(1),LH(2)], 'euclidean');
                     distLD = pdist([PH(i,1),PH(i,2),LD(1),LD(2)], 'euclidean');
                     distPD = pdist([PH(i,1),PH(i,2),PD(1),PD(2)], 'euclidean');
                     if ~(anyExceed(distLH, 2612-thresh, 2612+thresh) || anyExceed(distLD, 3267-thresh, 3267+thresh) || anyExceed(distPD, 1958-thresh, 1958+thresh))
                        PH = PH(i,:);
                        break;
                     end
                 end
            end
             
             if numel(PD)>2
                 for i = 1:length(PD)
                     distLH = pdist([PD(i,1),PD(i,2),LH(1),LH(2)], 'euclidean');
                     distLD = pdist([PD(i,1),PD(i,2),LD(1),LD(2)], 'euclidean');
                     distPH = pdist([PD(i,1),PD(i,2),PH(1),PH(2)], 'euclidean');
                     if ~(anyExceed(distLH, 3279-thresh, 3279+thresh) || anyExceed(distLD, 2695-thresh, 2695+thresh) || anyExceed(distPH, 1958-thresh, 1958+thresh))
                        PD = PD(i,:);
                        break;
                     end
                 end
             end
             
   

end