nowusing face_detection detectmultiscaleperform actual face detection faces face_detection detectmultiscale(gray nowdraw rectangle around the whole facefor ( , , ,hin facesimg cv rectangle(img,( , ),( +wy+ ),( , , ), cv imwrite('face_ab jpg',imgthis python program will create an image named face_ab jpg with face detection as showneye detection eye detection is another fascinating application of computer vision which makes it more realistic as well as futuristic opencv has built-in facility to perform eye detection we are going to use the haar cascade classifier for eye detection example the following example gives the python code using haar cascade to detect the face of amitabh bachan given in the following image