Interface FaceOverlayFilter

    • Method Detail

      • unsetOverlayedImage

        void unsetOverlayedImage()
        Clear the image to be shown over each detected face. Stops overlaying the faces.
      • unsetOverlayedImage

        void unsetOverlayedImage​(Transaction tx)
        Clear the image to be shown over each detected face. Stops overlaying the faces.
      • setOverlayedImage

        void setOverlayedImage​(String uri,
                               float offsetXPercent,
                               float offsetYPercent,
                               float widthPercent,
                               float heightPercent)
        Sets the image to use as overlay on the detected faces.
        Parameters:
        uri - URI where the image is located
        offsetXPercent - the offset applied to the image, from the X coordinate of the detected face upper right corner. A positive value indicates right displacement, while a negative value moves the overlaid image to the left. This offset is specified as a percentage of the face width. For example, to cover the detected face with the overlaid image, the parameter has to be 0.0. Values of 1.0 or -1.0 indicate that the image upper right corner will be at the face´s X coord, +- the face´s width.
        Note The parameter name is misleading, the value is not a percent but a ratio
        offsetYPercent - the offset applied to the image, from the Y coordinate of the detected face upper right corner. A positive value indicates up displacement, while a negative value moves the overlaid image down. This offset is specified as a percentage of the face width. For example, to cover the detected face with the overlaid image, the parameter has to be 0.0. Values of 1.0 or -1.0 indicate that the image upper right corner will be at the face´s Y coord, +- the face´s width.
        Note The parameter name is misleading, the value is not a percent but a ratio
        widthPercent - proportional width of the overlaid image, relative to the width of the detected face. A value of 1.0 implies that the overlaid image will have the same width as the detected face. Values greater than 1.0 are allowed, while negative values are forbidden.
        Note The parameter name is misleading, the value is not a percent but a ratio
        heightPercent - proportional height of the overlaid image, relative to the height of the detected face. A value of 1.0 implies that the overlaid image will have the same height as the detected face. Values greater than 1.0 are allowed, while negative values are forbidden.
        Note The parameter name is misleading, the value is not a percent but a ratio
      • setOverlayedImage

        void setOverlayedImage​(String uri,
                               float offsetXPercent,
                               float offsetYPercent,
                               float widthPercent,
                               float heightPercent,
                               Continuation<Void> cont)
        Asynchronous version of setOverlayedImage: Continuation.onSuccess(F) is called when the action is done. If an error occurs, Continuation.onError(java.lang.Throwable) is called.
        Parameters:
        uri - URI where the image is located
        offsetXPercent - the offset applied to the image, from the X coordinate of the detected face upper right corner. A positive value indicates right displacement, while a negative value moves the overlaid image to the left. This offset is specified as a percentage of the face width. For example, to cover the detected face with the overlaid image, the parameter has to be 0.0. Values of 1.0 or -1.0 indicate that the image upper right corner will be at the face´s X coord, +- the face´s width.
        Note The parameter name is misleading, the value is not a percent but a ratio
        offsetYPercent - the offset applied to the image, from the Y coordinate of the detected face upper right corner. A positive value indicates up displacement, while a negative value moves the overlaid image down. This offset is specified as a percentage of the face width. For example, to cover the detected face with the overlaid image, the parameter has to be 0.0. Values of 1.0 or -1.0 indicate that the image upper right corner will be at the face´s Y coord, +- the face´s width.
        Note The parameter name is misleading, the value is not a percent but a ratio
        widthPercent - proportional width of the overlaid image, relative to the width of the detected face. A value of 1.0 implies that the overlaid image will have the same width as the detected face. Values greater than 1.0 are allowed, while negative values are forbidden.
        Note The parameter name is misleading, the value is not a percent but a ratio
        heightPercent - proportional height of the overlaid image, relative to the height of the detected face. A value of 1.0 implies that the overlaid image will have the same height as the detected face. Values greater than 1.0 are allowed, while negative values are forbidden.
        Note The parameter name is misleading, the value is not a percent but a ratio
        See Also:
        setOverlayedImage(java.lang.String, float, float, float, float)
      • setOverlayedImage

        void setOverlayedImage​(Transaction tx,
                               String uri,
                               float offsetXPercent,
                               float offsetYPercent,
                               float widthPercent,
                               float heightPercent)
        Sets the image to use as overlay on the detected faces.
        Parameters:
        uri - URI where the image is located
        offsetXPercent - the offset applied to the image, from the X coordinate of the detected face upper right corner. A positive value indicates right displacement, while a negative value moves the overlaid image to the left. This offset is specified as a percentage of the face width. For example, to cover the detected face with the overlaid image, the parameter has to be 0.0. Values of 1.0 or -1.0 indicate that the image upper right corner will be at the face´s X coord, +- the face´s width.
        Note The parameter name is misleading, the value is not a percent but a ratio
        offsetYPercent - the offset applied to the image, from the Y coordinate of the detected face upper right corner. A positive value indicates up displacement, while a negative value moves the overlaid image down. This offset is specified as a percentage of the face width. For example, to cover the detected face with the overlaid image, the parameter has to be 0.0. Values of 1.0 or -1.0 indicate that the image upper right corner will be at the face´s Y coord, +- the face´s width.
        Note The parameter name is misleading, the value is not a percent but a ratio
        widthPercent - proportional width of the overlaid image, relative to the width of the detected face. A value of 1.0 implies that the overlaid image will have the same width as the detected face. Values greater than 1.0 are allowed, while negative values are forbidden.
        Note The parameter name is misleading, the value is not a percent but a ratio
        heightPercent - proportional height of the overlaid image, relative to the height of the detected face. A value of 1.0 implies that the overlaid image will have the same height as the detected face. Values greater than 1.0 are allowed, while negative values are forbidden.
        Note The parameter name is misleading, the value is not a percent but a ratio