Метод | Описание | |
---|---|---|
allFaces ( integer $from, integer $count ) : array | Get all faces | |
canAutogenerate ( ) | ||
countAllFaces ( ) | Count all faces | |
countNamedFaces ( ) | Get named faces | |
countOwnerFaces ( string $owner ) | Get faces owned by owner | |
countSearchFaces ( string $name ) | Seach faces for a name | |
createView ( integer $face_id, Ansel_Image $image, integer $x1, integer $y1, integer $x2, integer $y2 ) | Create a face image from the given data. | |
getFaceById ( integer $face_id, boolean $full = false ) : array | Get face data | |
getFaceImageObject ( integer $face_id ) : Horde_Image | Get a Horde_Image object representing the requested face. | |
getFaceUrl ( integer $image_id, integer $face_id, boolean $full = false ) : string | Get a URL for a face image suitable for using as the src attribute in an image tag. | |
getFaces ( Ansel_Image $image ) : mixed | Get all the coordinates for faces in an image. | |
getFromGallery ( integer $gallery_id, boolen $create = false, boolen $force = false ) : array | Get faces for all images in a gallery | |
getFromPicture ( mixed $image, boolen $create = false ) : array | Look for and save faces in a picture, and optionally create the face image. | |
getGalleryFaces ( integer $gallery_id ) : array | Get existing faces data for an entire gallery. | |
getImageFacesData ( integer $image_id, boolean $full = false ) : array | Get existing faces data from storage for the given image. | |
getSignatureFromFile ( integer $filename ) : binary | Get an image signature from an arbitrary file. Currently used when searching for faces that appear in a user-supplied image. | |
getSignatureMatches ( binary $signature, $face_id, integer $from, integer $count ) : binary | Get possible matches from sql index | |
namedFaces ( integer $from, integer $count ) : array | Get named faces | |
ownerFaces ( string $owner, integer $from, integer $count ) : array | Get faces owned by user | |
saveCustomFace ( integer $face_id, integer $image_id, integer $x1, integer $y1, integer $x2, integer $y2, string $name = '' ) : array | Associates a given rectangle with the given image and creates the face image. Used for setting a face range explicitly. | |
saveSignature ( integer $image_id, integer $face_id ) | Get face signature from an existing face image. | |
searchFaces ( string $name, integer $from, integer $count ) | Seach faces for a name | |
setName ( integer $face, string $name ) | Set face name | |
viewExists ( integer $image_id, integer $face_id, boolean $create = true ) : boolean | Checks to see that a given face image exists in the VFS. |
Метод | Описание | |
---|---|---|
_countFaces ( array $info ) : integer | Count faces | |
_fetchFaces ( array $info, integer $from, integer $count ) : mixed | Fetchs all faces from all galleries the current user has READ access to | |
_getFaces ( string $file ) | Get faces | |
_getParamsArray ( $image, $rect ) | ||
_getSignatureMatches ( array $a, array $b ) | Compare faces by similarity. |
protected _countFaces ( array $info ) : integer | ||
$info | array | Array of select criteria |
Результат | integer | The count of faces |
protected _getSignatureMatches ( array $a, array $b ) | ||
$a | array | |
$b | array |
public countOwnerFaces ( string $owner ) | ||
$owner | string | User |
public countSearchFaces ( string $name ) | ||
$name | string | Search string |
public createView ( integer $face_id, Ansel_Image $image, integer $x1, integer $y1, integer $x2, integer $y2 ) | ||
$face_id | integer | Face id to generate |
$image | Ansel_Image | Image face belongs to |
$x1 | integer | The top left corner of the cropped image. |
$y1 | integer | The top right corner of the cropped image. |
$x2 | integer | The bottom left corner of the cropped image. |
$y2 | integer | The bottom right corner of the cropped image. |
public getFaceImageObject ( integer $face_id ) : Horde_Image | ||
$face_id | integer | The requested face_id |
Результат | Horde_Image | The requested Horde_Image object |
public getFaceUrl ( integer $image_id, integer $face_id, boolean $full = false ) : string | ||
$image_id | integer | Image ID to get url for |
$face_id | integer | Face ID to get url for |
$full | boolean | Should we generate a full URL? |
Результат | string | The URL for the face image suitable for use as the src attribute in an tag. |
public getFromGallery ( integer $gallery_id, boolen $create = false, boolen $force = false ) : array | ||
$gallery_id | integer | The share_id/gallery_id of the gallery to check. |
$create | boolen | Create faces and signatures or just store coordniates? |
$force | boolen | Force recreation even if image has faces |
Результат | array | Faces found |
public getFromPicture ( mixed $image, boolen $create = false ) : array | ||
$image | mixed | Image Object/ID to check |
$create | boolen | Create images or store data? |
Результат | array | Faces found |
public getGalleryFaces ( integer $gallery_id ) : array | ||
$gallery_id | integer | gallery_id to get data for. |
Результат | array | An array of faces data. |
public getSignatureFromFile ( integer $filename ) : binary | ||
$filename | integer | Image filename to check |
Результат | binary | vector signature |
public getSignatureMatches ( binary $signature, $face_id, integer $from, integer $count ) : binary | ||
$signature | binary | Image signature |
$from | integer | Offset |
$count | integer | Limit |
Результат | binary | vector signature |
public saveCustomFace ( integer $face_id, integer $image_id, integer $x1, integer $y1, integer $x2, integer $y2, string $name = '' ) : array | ||
$face_id | integer | Face id to save |
$image_id | integer | Image face belongs to |
$x1 | integer | The top left corner of the cropped image. |
$y1 | integer | The top right corner of the cropped image. |
$x2 | integer | The bottom left corner of the cropped image. |
$y2 | integer | The bottom right corner of the cropped image. |
$name | string | Face name |
Результат | array | Faces found |
public saveSignature ( integer $image_id, integer $face_id ) | ||
$image_id | integer | Image ID face belongs to |
$face_id | integer | Face ID to check |
public viewExists ( integer $image_id, integer $face_id, boolean $create = true ) : boolean | ||
$image_id | integer | The image_id the face belongs to. |
$face_id | integer | The face_id we are checking for. |
$create | boolean | Automatically create the image if it is not found. |
Результат | boolean | True if image exists at end of function call, false otherwise. |