Posts

Showing posts with the label ai using javascript

Human Eye Detection using Javascript and OpenCV

Image
Hello everyone, in the previous topic we saw how we can detect single/multiple faces on images. In this topic we are going to see how we can detect human eye on such images Let's look at the result first In case you missed last topic here is the link : https://reactcodes.blogspot.com/2019/11/face-detection-with-javascript-and.html So for detecting eyes we are going to need eye haadcascade data From this  link  you can download that file  Once you have the file ready and you already have setup face detection using my face detection article, we may now load the eye file utils.loadImageToCanvas(imageUsed, 'imageInit') let faceCascadeFile = 'haarcascade_frontalface_default.xml'; let eyeCascadeFile = 'haarcascade_eye.xml'; utils.createFileFromUrl(faceCascadeFile, faceCascadeFile, () => { utils.createFileFromUrl(eyeCascadeFile, eyeCascadeFile, () => { console.log('eye cascade ready'); ...