public interface FaceOverlayFilter extends Filter
Filter
detects faces in a video feed. The face is then overlaid with an image.Modifier and Type | Interface and Description |
---|---|
static class |
FaceOverlayFilter.Builder |
Modifier and Type | Method and Description |
---|---|
void |
setOverlayedImage(String uri,
float offsetXPercent,
float offsetYPercent,
float widthPercent,
float heightPercent)
Sets the image to use as overlay on the detected faces.
|
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. |
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.
|
void |
unsetOverlayedImage()
Clear the image to be shown over each detected face.
|
void |
unsetOverlayedImage(Continuation<Void> cont)
Asynchronous version of unsetOverlayedImage:
Continuation.onSuccess(F) is called when the action is
done. |
void |
unsetOverlayedImage(Transaction tx)
Clear the image to be shown over each detected face.
|
addElementConnectedListener, addElementConnectedListener, addElementDisconnectedListener, addElementDisconnectedListener, addMediaFlowInStateChangeListener, addMediaFlowInStateChangeListener, addMediaFlowOutStateChangeListener, addMediaFlowOutStateChangeListener, addMediaTranscodingStateChangeListener, addMediaTranscodingStateChangeListener, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, getGstreamerDot, getGstreamerDot, getGstreamerDot, getGstreamerDot, getGstreamerDot, getGstreamerDot, getMaxOuputBitrate, getMaxOuputBitrate, getMaxOuputBitrate, getMaxOutputBitrate, getMaxOutputBitrate, getMaxOutputBitrate, getMinOuputBitrate, getMinOuputBitrate, getMinOuputBitrate, getMinOutputBitrate, getMinOutputBitrate, getMinOutputBitrate, getSinkConnections, getSinkConnections, getSinkConnections, getSinkConnections, getSinkConnections, getSinkConnections, getSinkConnections, getSinkConnections, getSinkConnections, getSourceConnections, getSourceConnections, getSourceConnections, getSourceConnections, getSourceConnections, getSourceConnections, getSourceConnections, getSourceConnections, getSourceConnections, getStats, getStats, getStats, getStats, getStats, getStats, isMediaFlowingIn, isMediaFlowingIn, isMediaFlowingIn, isMediaFlowingIn, isMediaFlowingIn, isMediaFlowingIn, isMediaFlowingOut, isMediaFlowingOut, isMediaFlowingOut, isMediaFlowingOut, isMediaFlowingOut, isMediaFlowingOut, isMediaTranscoding, isMediaTranscoding, isMediaTranscoding, isMediaTranscoding, isMediaTranscoding, isMediaTranscoding, removeElementConnectedListener, removeElementConnectedListener, removeElementDisconnectedListener, removeElementDisconnectedListener, removeMediaFlowInStateChangeListener, removeMediaFlowInStateChangeListener, removeMediaFlowOutStateChangeListener, removeMediaFlowOutStateChangeListener, removeMediaTranscodingStateChangeListener, removeMediaTranscodingStateChangeListener, setAudioFormat, setAudioFormat, setAudioFormat, setMaxOuputBitrate, setMaxOuputBitrate, setMaxOuputBitrate, setMaxOutputBitrate, setMaxOutputBitrate, setMaxOutputBitrate, setMinOuputBitrate, setMinOuputBitrate, setMinOuputBitrate, setMinOutputBitrate, setMinOutputBitrate, setMinOutputBitrate, setOutputBitrate, setOutputBitrate, setOutputBitrate, setVideoFormat, setVideoFormat, setVideoFormat
addErrorListener, addErrorListener, addTag, addTag, addTag, getChildren, getChildren, getChildren, getChilds, getChilds, getChilds, getCreationTime, getCreationTime, getCreationTime, getId, getId, getId, getMediaPipeline, getMediaPipeline, getMediaPipeline, getName, getName, getName, getParent, getParent, getParent, getSendTagsInEvents, getSendTagsInEvents, getSendTagsInEvents, getTag, getTag, getTag, getTags, getTags, getTags, removeErrorListener, removeErrorListener, removeTag, removeTag, removeTag, setName, setName, setName, setSendTagsInEvents, setSendTagsInEvents, setSendTagsInEvents
isCommited, release, release, release, waitCommited, whenCommited, whenCommited
void unsetOverlayedImage()
void unsetOverlayedImage(Continuation<Void> cont)
Continuation.onSuccess(F)
is called when the action is
done. If an error occurs, Continuation.onError(java.lang.Throwable)
is called.unsetOverlayedImage()
void unsetOverlayedImage(Transaction tx)
void setOverlayedImage(String uri, float offsetXPercent, float offsetYPercent, float widthPercent, float heightPercent)
uri
- URI where the image is locatedoffsetXPercent
- 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.
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.
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.
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.
void setOverlayedImage(String uri, float offsetXPercent, float offsetYPercent, float widthPercent, float heightPercent, Continuation<Void> cont)
Continuation.onSuccess(F)
is called when the action is
done. If an error occurs, Continuation.onError(java.lang.Throwable)
is called.uri
- URI where the image is locatedoffsetXPercent
- 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.
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.
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.
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.
setOverlayedImage(java.lang.String, float, float, float, float)
void setOverlayedImage(Transaction tx, String uri, float offsetXPercent, float offsetYPercent, float widthPercent, float heightPercent)
uri
- URI where the image is locatedoffsetXPercent
- 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.
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.
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.
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.
Copyright © 2020 Kurento. All rights reserved.