Delete faces from VFS and DB storage.
static
void
delete
(
&$image, [
integer $face =
null],
Ansel_Image $image)
-
Ansel_Image
$image: Image object to delete faces for
-
integer
$face: Face id
-
&$image
Get filename extension
static void
getExtension
()
Output HTML for this face's tile
static void
getFaceTile
( $face)
Get face link. Points to the image that this face is from.
static string
getLink
(array $face)
Get image path
static void
getVFSPath
(integer $image)
-
integer
$image: Image ID to get
Get all faces
Note: I removed the 'random' parameter since it won't work across different RDBMS and it's incredibly resource intensive as it causes the RDBMS to generate a rand() number for each row and THEN sort the table by those numbers.
void
allFaces
([integer $from = 0], [integer $count = 0])
-
integer
$from: Offset
-
integer
$count: Limit
Tell if the driver can auto generate faces
void
autogenerate
([string $driver = null])
-
string
$driver: Driver name
Count all faces
void
countAllFaces
()
Get named faces
void
countNamedFaces
()
Get faces owned by owner
void
countOwnerFaces
(string $owner)
Seach faces for a name
void
countSearchFaces
(string $name)
-
string
$name: Search string
Create a face image from the given data.
mixed
createView
(integer $face_id, &$image, integer $x1, integer $y1, integer $x2, integer $y2, integer $image)
-
integer
$face_id: Face id to generate
-
integer
$image: Image face belongs to
-
integer
$x1: The top left corner of the cropped image.
-
integer
$y1: The top right corner of the cropped image.
-
integer
$x2: The bottom left corner of the cropped image.
-
integer
$y2: The bottom right corner of the cropped image.
-
&$image
Create instance
void
factory
([ $driver = null], [ $params = array()])
Get face data
void
getFaceById
(integer $face_id, [boolean $full = false])
-
integer
$face_id: Face id
-
boolean
$full: Retreive full face data?
Get a Horde_Image object representing the requested face.
mixed
getFaceImageObject
(integer $face_id)
-
integer
$face_id: The requested face_id
Get all the coordinates for faces in an image.
mixed
getFaces
( &$image, mixed $image)
-
mixed
$image: The Ansel_Image or a path to the image to check.
-
&$image
Get a URL for a face image suitable for using as the src attribute in an image tag.
string
getFaceUrl
(integer $image_id, integer $face_id, [boolean $full = false])
-
integer
$image_id: Image ID to get url for
-
integer
$face_id: Face ID to get url for
-
boolean
$full: Should we generate a full URL?
Get faces for all images in a gallery
array
getFromGallery
(integer $gallery_id, [boolen $create = false], [boolen $force = false])
-
integer
$gallery_id: The share_id/gallery_id of the gallery to check.
-
boolen
$create: Create faces and signatures or just store coordniates?
-
boolen
$force: Force recreation even if image has faces
Look for and save faces in a picture, and optionally create the face image.
array
getFromPicture
( &$image, [boolen $create = false], mixed $image)
-
mixed
$image: Image Object/ID to check
-
boolen
$create: Create images or store data?
-
&$image
Get existing faces data for an entire gallery.
mixed
getGalleryFaces
(integer $gallery)
-
integer
$gallery: gallery_id to get data for.\
Get existing faces data from storage for the given image.
Used if we need to build the face image at some point after it is detected.
mixed
getImageFacesData
(integer $image_id, [boolean $full = false])
-
integer
$image_id: The image_id of the Ansel_Image these faces are for.
-
boolean
$full: Get full face data or just face_id and face_name.
Get an image signature from an arbitrary file. Currently used when searching for faces that appear in a user-supplied image.
binary
getSignatureFromFile
(integer $filename)
-
integer
$filename: Image filename to check
Get possible matches from sql index
binary
getSignatureMatches
(binary $signature, [ $face_id = 0], [integer $from = 0], [integer $count = 0])
-
binary
$signature: Image signature
-
integer
$from: Offset
-
integer
$count: Limit
-
$face_id
Get named faces
void
namedFaces
([integer $from = 0], [integer $count = 0])
-
integer
$from: Offset
-
integer
$count: Limit
Get faces owned by user
void
ownerFaces
(string $owner, [integer $from = 0], [integer $count = 0])
-
string
$owner: User
-
integer
$from: Offset
-
integer
$count: Limit
Associates a given rectangle with the given image and creates the face image. Used for setting a face range explicitly.
array
saveCustomFace
(integer $face_id, integer $image, integer $x1, integer $y1, integer $x2, integer $y2, [string $name = ''])
-
integer
$face_id: Face id to save
-
integer
$image: Image face belongs to
-
integer
$x1: The top left corner of the cropped image.
-
integer
$y1: The top right corner of the cropped image.
-
integer
$x2: The bottom left corner of the cropped image.
-
integer
$y2: The bottom right corner of the cropped image.
-
string
$name: Face name
Get get face signature from an existing face image.
mixed
saveSignature
(integer $image_id, integer $face_id)
-
integer
$image_id: Image ID face belongs to
-
integer
$face_id: Face ID to check
Seach faces for a name
void
searchFaces
(string $name, [integer $from = 0], [integer $count = 0])
-
string
$name: Search string
-
integer
$from: Offset
-
integer
$count: Limit
Set face name
void
setName
(integer $face, string $name)
-
integer
$face: Face id
-
string
$name: Face name
Attempts to return a reference to a concrete Ansel_Faces instance.
void
&singleton
()
Checks to see that a given face image exists in the VFS.
If $create is true, the image is created if it does not exist. Otherwise false is returned if the image does not exist. True is returned both if the image already existed OR if it did not exist, but was successfully created.
boolean
viewExists
(integer $image_id, integer $face_id, [boolean $create = true])
-
integer
$image_id: The image_id the face belongs to.
-
integer
$face_id: The face_id we are checking for.
-
boolean
$create: Automatically create the image if it is not found.
Count faces
void
_countFaces
(array $info)
-
array
$info: Array of select criteria
Fetchs all faces from all galleries the current user has READ access to?
mixed
_fetchFaces
(array $info, [integer $from = 0], [integer $count = 0])
-
array
$info: Array of select criteria
-
integer
$from: Offset
-
integer
$count: Limit
Get faces
void
_getFaces
(string $file)
-
string
$file: Picture filename
Redefined in descendants as:
Compare faces by similarity.
void
_getSignatureMatches
(array $a, array $b)