CropFace
This class will try to find the most interesting point in the image by trying to find a face and center the crop on that
todo |
implement |
---|---|
see |
__construct(string $imagePath)
string
getFaceList() : array
access |
protected |
---|---|
array
getFaceListFromClassifier(string $classifier) : array
access |
protected |
---|---|
string
array
getSafeZoneList() : array
access |
private |
---|---|
array
getSpecialOffset(\Imagick $original, int $targetWidth, int $targetHeight) : array
\Imagick
int
int
array
getEntropyOffsets(\Imagick $original, int $targetWidth, int $targetHeight) : array
\Imagick
int
int
array
getOffsetFromEntropy(\Imagick $originalImage, $targetWidth, int $targetHeight) : array
\Imagick
int
array
slice(mixed $image, mixed $originalSize, mixed $targetSize, mixed $axis) : void
access |
protected |
---|---|
mixed
mixed
mixed
mixed
h=horizontal, v = vertical
getLimit(string $position, int $offset) : int|null
access |
protected |
---|---|
string
(top|bottom|left|right)
int
int|null
grayscaleEntropy(\Imagick $image) : float
A higher value of entropy means more noise / liveliness / color / business
see | |
---|---|
\Imagick
float
colorEntropy(\Imagick $image) : float
If the source image is in color we need to transform RGB into a grayscale image so we can calculate the entropy more performant.
\Imagick
float
CLASSIFIER_FACE
CLASSIFIER_PROFILE
imagePath
var | |
---|---|
access |
protected |
safeZoneList
var | |
---|---|
access |
protected |