From the course: Code Clinic: JavaScript

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Detecting faces with a jQuery plugin

Detecting faces with a jQuery plugin - JavaScript Tutorial

From the course: Code Clinic: JavaScript

Start my 1-month free trial

Detecting faces with a jQuery plugin

- [Instructor] So now that we can drag an image into our application, it's time to finish up the uploading of the images and then the displaying of the faces. Now to do this using a plug in and it's this face detection jQuery plugin. We're using jQuery so you're going to see some things like this jQuery selector for DropZone and we're going to continue that. Right, so what I want to do is add an additional function here in this function is going to try to detect image faces and let's go ahead and add a comment here. And then in here I want to check to see if an image has been dropped, so I'll use this dropped image variable and to make sure that its undefined. We're going to perform the following things. And what I want to do is remove whatever faces I have currently showing in this section. So I'm going to do a dollar sign selector here and then say if there are any faces currently in here then we're going to just remove them. So this removed method is a jQuery method that just…

Contents