abstract class FocusOn implements FocalGravityInterface, ObjectGravityInterface

Defines the objects that can be focused on.

Properties

QualifierMultiValue $value from ObjectGravityPriorityBuilderTrait

Methods

accessory()

Gravity accessory.

frisbee()

Gravity frisbee.

skis()

Gravity skis.

snowboard()

Gravity snowboard.

sportsBall()

Gravity sportsBall.

kite()

Gravity kite.

baseballBat()

Gravity baseballBat.

baseballGlove()

Gravity baseballGlove.

skateboard()

Gravity skateboard.

surfboard()

Gravity surfboard.

tennisracket()

Gravity tennisracket.

animal()

Gravity animal.

bird()

Gravity bird.

cat()

Gravity cat.

dog()

Gravity dog.

horse()

Gravity horse.

sheep()

Gravity sheep.

cow()

Gravity cow.

elephant()

Gravity elephant.

bear()

Gravity bear.

zebra()

Gravity zebra.

giraffe()

Gravity giraffe.

appliance()

Gravity appliance.

microwave()

Gravity microwave.

oven()

Gravity oven.

toaster()

Gravity toaster.

sink()

Gravity sink.

refrigerator()

Gravity refrigerator.

electronic()

Gravity electronic.

tvMonitor()

Gravity tvMonitor.

laptop()

Gravity laptop.

mouse()

Gravity mouse.

remote()

Gravity remote.

keyboard()

Gravity keyboard.

cellphone()

Gravity cellphone.

food()

Gravity food.

banana()

Gravity banana.

apple()

Gravity apple.

sandwich()

Gravity sandwich.

orange()

Gravity orange.

broccoli()

Gravity broccoli.

carrot()

Gravity carrot.

hotdog()

Gravity hotdog.

pizza()

Gravity pizza.

donut()

Gravity donut.

cake()

Gravity cake.

furniture()

Gravity furniture.

chair()

Gravity chair.

sofa()

Gravity sofa.

pottedPlant()

Gravity pottedPlant.

bed()

Gravity bed.

diningTable()

Gravity diningTable.

toilet()

Gravity toilet.

indoor()

Gravity indoor.

book()

Gravity book.

clock()

Gravity clock.

vase()

Gravity vase.

scissors()

Gravity scissors.

teddyBear()

Gravity teddyBear.

hairDrier()

Gravity hairDrier.

toothbrush()

Gravity toothbrush.

kitchen()

Gravity kitchen.

bottle()

Gravity bottle.

wineGlass()

Gravity wineGlass.

cup()

Gravity cup.

fork()

Gravity fork.

knife()

Gravity knife.

spoon()

Gravity spoon.

bowl()

Gravity bowl.

focus(int|null $weight = null)

Gives priority to objects that are in focus, with the specified weighting.

center(int|null $weight = null)

Gives priority to objects closer to the center of the asset, with the specified weighting.

large(int|null $weight = null)

Gives priority to larger objects, with the specified weighting.

priority(string $priorityName = null, int $weight = null)

Sets any priority to the specified weighting.

outdoor()

Gravity outdoor.

trafficLight()

Gravity trafficLight.

stopSign()

Gravity stopSign.

parkingMeter()

Gravity parkingMeter.

fireHydrant()

Gravity fireHydrant.

bench()

Gravity bench.

person()

Gravity person.

vehicle()

Gravity vehicle.

bicycle()

Gravity bicycle.

car()

Gravity car.

motorbike()

Gravity motorbike.

aeroplane()

Gravity aeroplane.

bus()

Gravity bus.

train()

Gravity train.

truck()

Gravity truck.

boat()

Gravity boat.

advancedFace(mixed ...$fallback)

Detects the largest face in an image with the Advanced Facial Attribute Detection add-on and makes it the focus of the transformation.

advancedFaces(mixed ...$fallback)

Detects all faces in an image with the Advanced Facial Attribute Detection add-on and makes them the focus of the transformation.

advancedEyes(mixed ...$fallback)

Detects all eyes in an image with the Advanced Facial Attribute Detection add-on and makes them the focus of the transformation.

body(mixed ...$fallback)

Detects human bodies in the asset and makes them the focus of the transformation.

face(mixed ...$fallback)

Detects the largest face in the asset and makes it the focus of the transformation.

faces(mixed ...$fallback)

Detects all the faces in the asset and makes them the focus of the transformation.

noFaces(mixed ...$fallback)

Gives priority to areas of the asset that do not contain faces.

custom(mixed ...$fallback)

Uses custom coordinates that were previously specified (for example, as part of the image upload method) and makes them the focus of the transformation.

customNoOverride(mixed ...$fallback)

Crops the image while giving higher priority to custom coordinates (custom coordinates don't override the automatic cropping).

ocrText(mixed ...$fallback)

Detects all text elements in an image using the OCR Text Detection and Extraction add-on and uses the detected bounding box coordinates as the focus of the transformation.

ocr(mixed ...$fallback)

Alias for Gravity::ocrText()

Details

static string accessory()

Gravity accessory.

Return Value

string

static string frisbee()

Gravity frisbee.

Return Value

string

static string skis()

Gravity skis.

Return Value

string

static string snowboard()

Gravity snowboard.

Return Value

string

static string sportsBall()

Gravity sportsBall.

Return Value

string

static string kite()

Gravity kite.

Return Value

string

static string baseballBat()

Gravity baseballBat.

Return Value

string

static string baseballGlove()

Gravity baseballGlove.

Return Value

string

static string skateboard()

Gravity skateboard.

Return Value

string

static string surfboard()

Gravity surfboard.

Return Value

string

static string tennisracket()

Gravity tennisracket.

Return Value

string

static string animal()

Gravity animal.

Return Value

string

static string bird()

Gravity bird.

Return Value

string

static string cat()

Gravity cat.

Return Value

string

static string dog()

Gravity dog.

Return Value

string

static string horse()

Gravity horse.

Return Value

string

static string sheep()

Gravity sheep.

Return Value

string

static string cow()

Gravity cow.

Return Value

string

static string elephant()

Gravity elephant.

Return Value

string

static string bear()

Gravity bear.

Return Value

string

static string zebra()

Gravity zebra.

Return Value

string

static string giraffe()

Gravity giraffe.

Return Value

string

static string appliance()

Gravity appliance.

Return Value

string

static string microwave()

Gravity microwave.

Return Value

string

static string oven()

Gravity oven.

Return Value

string

static string toaster()

Gravity toaster.

Return Value

string

static string sink()

Gravity sink.

Return Value

string

static string refrigerator()

Gravity refrigerator.

Return Value

string

static string electronic()

Gravity electronic.

Return Value

string

static string tvMonitor()

Gravity tvMonitor.

Return Value

string

static string laptop()

Gravity laptop.

Return Value

string

static string mouse()

Gravity mouse.

Return Value

string

static string remote()

Gravity remote.

Return Value

string

static string keyboard()

Gravity keyboard.

Return Value

string

static string cellphone()

Gravity cellphone.

Return Value

string

static string food()

Gravity food.

Return Value

string

static string banana()

Gravity banana.

Return Value

string

static string apple()

Gravity apple.

Return Value

string

static string sandwich()

Gravity sandwich.

Return Value

string

static string orange()

Gravity orange.

Return Value

string

static string broccoli()

Gravity broccoli.

Return Value

string

static string carrot()

Gravity carrot.

Return Value

string

static string hotdog()

Gravity hotdog.

Return Value

string

static string pizza()

Gravity pizza.

Return Value

string

static string donut()

Gravity donut.

Return Value

string

static string cake()

Gravity cake.

Return Value

string

static string furniture()

Gravity furniture.

Return Value

string

static string chair()

Gravity chair.

Return Value

string

static string sofa()

Gravity sofa.

Return Value

string

static string pottedPlant()

Gravity pottedPlant.

Return Value

string

static string bed()

Gravity bed.

Return Value

string

static string diningTable()

Gravity diningTable.

Return Value

string

static string toilet()

Gravity toilet.

Return Value

string

static string indoor()

Gravity indoor.

Return Value

string

static string book()

Gravity book.

Return Value

string

static string clock()

Gravity clock.

Return Value

string

static string vase()

Gravity vase.

Return Value

string

static string scissors()

Gravity scissors.

Return Value

string

static string teddyBear()

Gravity teddyBear.

Return Value

string

static string hairDrier()

Gravity hairDrier.

Return Value

string

static string toothbrush()

Gravity toothbrush.

Return Value

string

static string kitchen()

Gravity kitchen.

Return Value

string

static string bottle()

Gravity bottle.

Return Value

string

static string wineGlass()

Gravity wineGlass.

Return Value

string

static string cup()

Gravity cup.

Return Value

string

static string fork()

Gravity fork.

Return Value

string

static string knife()

Gravity knife.

Return Value

string

static string spoon()

Gravity spoon.

Return Value

string

static string bowl()

Gravity bowl.

Return Value

string

$this focus(int|null $weight = null)

Gives priority to objects that are in focus, with the specified weighting.

Parameters

Name Type Description
$weight int|null The priority weighting.

Return Value

$this

$this center(int|null $weight = null)

Gives priority to objects closer to the center of the asset, with the specified weighting.

Parameters

Name Type Description
$weight int|null The priority weighting.

Return Value

$this

$this large(int|null $weight = null)

Gives priority to larger objects, with the specified weighting.

Parameters

Name Type Description
$weight int|null The priority weighting.

Return Value

$this

$this priority(string $priorityName = null, int $weight = null)

Sets any priority to the specified weighting.

Parameters

Name Type Description
$priorityName string The name of the priority.
$weight int The priority weighting.

Return Value

$this

static string outdoor()

Gravity outdoor.

Return Value

string

static string trafficLight()

Gravity trafficLight.

Return Value

string

static string stopSign()

Gravity stopSign.

Return Value

string

static string parkingMeter()

Gravity parkingMeter.

Return Value

string

static string fireHydrant()

Gravity fireHydrant.

Return Value

string

static string bench()

Gravity bench.

Return Value

string

static string person()

Gravity person.

Return Value

string

static string vehicle()

Gravity vehicle.

Return Value

string

static string bicycle()

Gravity bicycle.

Return Value

string

static string car()

Gravity car.

Return Value

string

static string motorbike()

Gravity motorbike.

Return Value

string

static string aeroplane()

Gravity aeroplane.

Return Value

string

static string bus()

Gravity bus.

Return Value

string

static string train()

Gravity train.

Return Value

string

static string truck()

Gravity truck.

Return Value

string

static string boat()

Gravity boat.

Return Value

string

static FocalGravity advancedFace(mixed ...$fallback)

Detects the largest face in an image with the Advanced Facial Attribute Detection add-on and makes it the focus of the transformation.

For details, see the Advanced Facial Attribute Detection add-on documentation.

Parameters

Name Type Description
...$fallback mixed Fallback gravities.

Return Value

FocalGravity

See also

https://cloudinary.com/documentation/advanced_facial_attributes_detection_addon#face_detection_based_cropping

static FocalGravity advancedFaces(mixed ...$fallback)

Detects all faces in an image with the Advanced Facial Attribute Detection add-on and makes them the focus of the transformation.

For details, see the Advanced Facial Attribute Detection add-on documentation.

Parameters

Name Type Description
...$fallback mixed Fallback gravities.

Return Value

FocalGravity

See also

https://cloudinary.com/documentation/advanced_facial_attributes_detection_addon#face_detection_based_cropping

static FocalGravity advancedEyes(mixed ...$fallback)

Detects all eyes in an image with the Advanced Facial Attribute Detection add-on and makes them the focus of the transformation.

For details, see the Advanced Facial Attribute Detection add-on documentation.

Parameters

Name Type Description
...$fallback mixed Fallback gravities.

Return Value

FocalGravity

See also

https://cloudinary.com/documentation/advanced_facial_attributes_detection_addon#eyes_detection_based_cropping

static FocalGravity body(mixed ...$fallback)

Detects human bodies in the asset and makes them the focus of the transformation.

Parameters

Name Type Description
...$fallback mixed Fallback gravities.

Return Value

FocalGravity

static FocalGravity face(mixed ...$fallback)

Detects the largest face in the asset and makes it the focus of the transformation.

Parameters

Name Type Description
...$fallback mixed Fallback gravities.

Return Value

FocalGravity

static FocalGravity faces(mixed ...$fallback)

Detects all the faces in the asset and makes them the focus of the transformation.

Parameters

Name Type Description
...$fallback mixed Fallback gravities.

Return Value

FocalGravity

static FocalGravity noFaces(mixed ...$fallback)

Gives priority to areas of the asset that do not contain faces.

Parameters

Name Type Description
...$fallback mixed Fallback gravities.

Return Value

FocalGravity

static FocalGravity custom(mixed ...$fallback)

Uses custom coordinates that were previously specified (for example, as part of the image upload method) and makes them the focus of the transformation.

Defaults to 'center' gravity if no custom coordinates have been specified.

Parameters

Name Type Description
...$fallback mixed Fallback gravities.

Return Value

FocalGravity

static FocalGravity customNoOverride(mixed ...$fallback)

Crops the image while giving higher priority to custom coordinates (custom coordinates don't override the automatic cropping).

Parameters

Name Type Description
...$fallback mixed Fallback gravities.

Return Value

FocalGravity

static FocalGravity ocrText(mixed ...$fallback)

Detects all text elements in an image using the OCR Text Detection and Extraction add-on and uses the detected bounding box coordinates as the focus of the transformation.

For details, see the OCR Text Detection and Extraction add-on documentation.

Parameters

Name Type Description
...$fallback mixed Fallback gravities.

Return Value

FocalGravity

See also

https://cloudinary.com/documentation/ocr_text_detection_and_extraction_addon

static FocalGravity ocr(mixed ...$fallback)

Alias for Gravity::ocrText()

Parameters

Name Type Description
...$fallback mixed

Return Value

FocalGravity

See also

FocalGravity::ocrText