afeld/node-face — pull request #1 by fvdm (2012-07-05 20:05:40+00:00)
Title: added faces.detect method

Example:

```js
face.faces.detect({
urls: 'http://upload.wikimedia.org/wikipedia/en/d/d8/U2-teenagers.jpg',
success: function( data ) {
console.log( require('util').inspect( data, false, 10 ) )
}
})
```

Output

```js
{ photos:
[ { url: 'http://upload.wikimedia.org/wikipedia/en/d/d8/U2-teenagers.jpg',
pid: 'F@af7fc3c98ee3189520f6b7bcfa67c433_315fd45dfcabc69f8f0dd066ac68b028',
width: 363,
height: 338,
tags:
[ { tid: 'TEMP_F@af7fc3c98ee3189520f6b7bcfa67c433_315fd45dfcabc69f8f0dd066ac68b028_10.74_36.98_0_0',
recognizable: true,
threshold: null,
uids: [],
gid: null,
label: '',
confirmed: false,
manual: false,
tagger_id: null,
width: 18.73,
height: 20.12,
center: { x: 10.74, y: 36.98 },
eye_left: { x: 7.56, y: 30.8 },
eye_right: { x: 16.25, y: 32.64 },
mouth_left: { x: 6.29, y: 41.61 },
mouth_center: { x: 10.59, y: 41.61 },
mouth_right: { x: 14.31, y: 42.77 },
nose: { x: 11.61, y: 36.5 },
ear_left: null,
ear_right: null,
chin: null,
yaw: -5.31,
roll: 10.42,
pitch: 5.47,
attributes:
{ face: { value: 'true', confidence: 94 },
gender: { value: 'female', confidence: 53 },
glasses: { value: 'true', confidence: 96 },
smiling: { value: 'false', confidence: 98 } } },
{ tid: 'TEMP_F@af7fc3c98ee3189520f6b7bcfa67c433_315fd45dfcabc69f8f0dd066ac68b028_31.96_46.15_0_0',
recognizable: true,
threshold: null,
uids: [],
gid: null,
label: '',
confirmed: false,
manual: false,
tagger_id: null,
width: 15.43,
height: 16.57,
center: { x: 31.96, y: 46.15 },
eye_left: { x: 28.28, y: 42.44 },
eye_right: { x: 35, y: 41.38 },
mouth_left: { x: 30.08, y: 50.44 },
mouth_center: { x: 32.86, y: 49.7 },
mouth_right: { x: 34.6, y: 49.61 },
nose: { x: 32.47, y: 46.18 },
ear_left: null,
ear_right: null,
chin: null,
yaw: -10.28,
roll: -9.52,
pitch: -7.63,
attributes:
{ face: { value: 'true', confidence: 95 },
gender: { value: 'male', confidence: 46 },
glasses: { value: 'false', confidence: 20 },
smiling: { value: 'false', confidence: 98 } } },
{ tid: 'TEMP_F@af7fc3c98ee3189520f6b7bcfa67c433_315fd45dfcabc69f8f0dd066ac68b028_56.75_44.08_0_0',
recognizable: true,
threshold: null,
uids: [],
gid: null,
label: '',
confirmed: false,
manual: false,
tagger_id: null,
width: 19.28,
height: 20.71,
center: { x: 56.75, y: 44.08 },
eye_left: { x: 52.83, y: 39.97 },
eye_right: { x: 60.56, y: 39.84 },
mouth_left: { x: 53.83, y: 48.73 },
mouth_center: { x: 57.44, y: 48.52 },
mouth_right: { x: 60.1, y: 48.23 },
nose: { x: 57.4, y: 44.49 },
ear_left: null,
ear_right: null,
chin: null,
yaw: -7.93,
roll: -3.11,
pitch: -3.24,
attributes:
{ face: { value: 'true', confidence: 98 },
gender: { value: 'male', confidence: 70 },
glasses: { value: 'false', confidence: 61 },
smiling: { value: 'false', confidence: 92 } } },
{ tid: 'TEMP_F@af7fc3c98ee3189520f6b7bcfa67c433_315fd45dfcabc69f8f0dd066ac68b028_87.05_42.31_0_0',
recognizable: false,
threshold: null,
uids: [],
gid: null,
label: '',
confirmed: false,
manual: false,
tagger_id: null,
width: 27.55,
height: 29.59,
center: { x: 87.05, y: 42.31 },
eye_left: { x: 81.1, y: 36.62 },
eye_right: { x: 92.48, y: 36.05 },
mouth_left: { x: 82.05, y: 49.56 },
mouth_center: { x: 87.69, y: 50.31 },
mouth_right: { x: 92.22, y: 49.24 },
nose: { x: 87.3, y: 45.18 },
ear_left: null,
ear_right: null,
chin: null,
yaw: -1.53,
roll: 2.06,
pitch: -13.28,
attributes:
{ face: { value: 'true', confidence: 89 },
gender: { value: 'male', confidence: 29 },
glasses: { value: 'false', confidence: 6 },
smiling: { value: 'false', confidence: 86 } } } ] } ],
status: 'success',
usage:
{ used: 2,
remaining: 4998,
limit: 5000,
reset_time_text: 'Thu, 05 Jul 2012 20:55:35 +0000',
reset_time: 1341521735 },
request_ids: [ 'ccc8853fac47b5333e65f0b13490477d' ] }
```