function [mouthcenter,nosecenter,eyecenter]=fceocinos(faceImage)                       
%nalezeni pozice stedu oci  a ust a spicky nosu, ulozeni souradnic
[x,y,z]=size(faceImage);

%nos
noseDetector = vision.CascadeObjectDetector('Nose');
noseBBox=step(noseDetector, faceImage);
if length(noseBBox(:,1))>0
    nosecenter=[noseBBox(1,2)+round(noseBBox(1,4)/2),noseBBox(1,1)+round(noseBBox(1,3)/2)];
else 
    nosecenter=[0,0];
end

%oci
faceImage1=faceImage;
if nosecenter(1)~=0
    faceImage1(nosecenter(1)-10:x,:,:)=0;
end
eyesDetector=vision.CascadeObjectDetector('RightEye');
eyeBBox=(step(eyesDetector, faceImage1));
if length(eyeBBox(:))>=8 %detekovány obě oči
    eyecenter(1,1:4)=[eyeBBox(1,2)+round(eyeBBox(1,4)/2),eyeBBox(1,1)+round(eyeBBox(1,3)/2),eyeBBox(2,2)+round(eyeBBox(2,4)/2),eyeBBox(2,1)+round(eyeBBox(2,3)/2)];
else
    eyecenter=[0 0 0 0];
end
if eyecenter(1,2)>eyecenter(1,4) 
    z=eyecenter(1,1:2);
    eyecenter(1,1:2)=eyecenter(1,3:4);
    eyecenter(1,3:4)=z;
end
    
%usta
if nosecenter(1)>1
    faceImage(1:nosecenter(1)-10,:,:)=0;
end
if nosecenter(2)>0
    faceImage(:,1:round(3*nosecenter(2)/4),:)=0;
    if (round(4*nosecenter(2)/3)) < y
        faceImage(:,round(5*nosecenter(2)/4):y,:)=0;
    end
end
mouthDetector = vision.CascadeObjectDetector('Mouth');
mouthBBox=step(mouthDetector, faceImage);
if length(mouthBBox(:,1))>0
    mouthcenter=[mouthBBox(1,2)+round(mouthBBox(1,4)/2),mouthBBox(1,1)+round(mouthBBox(1,3)/2)];
else 
    mouthcenter=[0,0];
end



