You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,25 @@ phonegap plugin to detect faces on pictures
5
5
6
6
sample phonegap project with the face detect iOS plugin.
7
7
8
-
if it detects faces return a string with this format {{x1,y1},{widht1,height1}}{{x2,y2}{width2,height2}...{{xn,yn},{widthn,heightn}}
8
+
if it detects faces return an array with the faces.
9
+
Each face have the face rectangle and the eyes and mouth points (see the index.html example for more info)
9
10
10
-
each {{x,y}{width,height}} is a rectangle or square
11
-
x is the x point on the original image where the square start
12
-
y is the y point on the original image where the square start
11
+
The face is a rectangle or square whit this format {{x,y},{widht,height}} (default rectangle to string conversion, contact me if you want another format)
12
+
The eyes and mouth poinths have this format {x,y} (default point to string conversion, contact me if you want another format)
13
+
14
+
x is the x coordinate on the original image
15
+
y is the y coordinate on the original image
13
16
width is the width of the face on the original image
14
17
height is the height of the face on the original image
18
+
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.
15
19
16
-
if it doesn't detect a face alerts 'No faces.'
20
+
if it doesn't detect a face it retunr 'No faces.'
17
21
18
22
The sample project uses the camera sample code
19
23
It uses the camera function with destinationType.FILE_URI (IMPORTANT!!!)
24
+
25
+
Steps to use in your own project:
26
+
1.- You have to include the QuarzCore and CoreImage frameworks to your project
27
+
2.- Put this line in your plugins section inside config.xml <pluginname="FaceDetect"value="FaceDetect" />
28
+
3.- Drag FaceDetec.h and FaceDetect.m to your project
29
+
4.- Put the FaceDetect.js inside your www folder and link it in your index.html
0 commit comments