Focus points
A focus point is an image’s ideal vertical and horizontal center after cropping. You can specify focus points using the following techniques:
- Using Brightspot’s image editor.
- Integrating the OpenIMAJ library.
- Integrating a cloud service such as Amazon Rekognition .
If you know that an image’s subject is always centered in the middle (as in time-lapse photography), you can return that coordinate in a
Focus
object. This technique ensures Brightspot generates crops around the image’s native center.
Class for setting focus point around image’s physical center
-
Declares this view model implements the
FocusCalculator
interface. -
Retrieves the image’s width and height from the metadata, divides each in half, and returns both values in a
Focus
object. -
Prints the focus point to the console.
Console output from class CenterFocusCalculator