๐Ÿ“ฆ jcesarmobile / faceDetect

phonegap plugin to detect faces on pictures

โ˜… 14 stars โ‘‚ 5 forks ๐Ÿ‘ 14 watching
๐Ÿ“ฅ Clone https://github.com/jcesarmobile/faceDetect.git
HTTPS git clone https://github.com/jcesarmobile/faceDetect.git
SSH git clone git@github.com:jcesarmobile/faceDetect.git
CLI gh repo clone jcesarmobile/faceDetect
jcesarmobile jcesarmobile Merge pull request #2 from lpmi-13/typofix 9ed1e5c 6 years ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“ cordova
๐Ÿ“ CordovaLib
๐Ÿ“ faceDetect
๐Ÿ“ www
๐Ÿ“„ .DS_Store
๐Ÿ“„ README.md
๐Ÿ“„ README.md

faceDetect ==========

phonegap plugin to detect faces on pictures

sample phonegap project with the face detect iOS plugin.

if it detects faces return an array with the faces. Each face has the face rectangle and the eyes and mouth points (see the index.html example for more info)

The face is a rectangle or square with this format {{x,y},{width,height}} (default rectangle to string conversion, contact me if you want another format) The eyes and mouth points have this format {x,y} (default point to string conversion, contact me if you want another format)

x is the x coordinate on the original image y is the y coordinate on the original image width is the width of the face on the original image height is the height of the face on the original image As I've said, the sizes and points are for the original image, if you resize the image you have to recalculate the coordinates for your size.

if it doesn't detect a face it returns 'No faces.'

The sample project uses the camera sample code It uses the camera function with destinationType.FILE_URI (IMPORTANT!!!)

Steps to use in your own project: 1.- You have to include the QuarzCore and CoreImage frameworks in your project 2.- Put this line in your plugins section inside config.xml 3.- Drag FaceDetect.h and FaceDetect.m to your project 4.- Put the FaceDetect.js inside your www folder and link it in your index.html