public interface TFObjectDetector extends CameraStreamSource
Modifier and Type | Interface and Description |
---|---|
static class |
TFObjectDetector.Parameters
TFObjectDetector.Parameters provides configuration information for instantiating the TFObjectDetector |
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activates this TFObjectDetector so it starts recognizing objects.
|
void |
deactivate()
Deactivates this TFObjectDetector so it stops recognizing objects.
|
java.util.List<Recognition> |
getRecognitions()
Returns the list of recognitions.
|
java.util.List<Recognition> |
getUpdatedRecognitions()
Returns the list of recognitions, but only if they are different than the last call to
getUpdatedRecognitions() . |
void |
loadModelFromAsset(java.lang.String assetName,
java.lang.String... labels)
Loads a TFLite model from the indicated application asset, which must be of
type .tflite.
|
void |
loadModelFromFile(java.lang.String absoluteFileName,
java.lang.String... labels)
Loads a TFLite model from the indicated file, which must be a .tflite file and contain the
full file path.
|
void |
setClippingMargins(int left,
int top,
int right,
int bottom)
Sets the number of pixels to obscure on the left, top, right, and bottom edges of each image
passed to the TensorFlow object detector.
|
void |
setZoom(double magnification,
double aspectRatio)
Indicates that only the zoomed center area of each image will be passed to the TensorFlow
object detector.
|
void |
shutdown()
Perform whatever cleanup is necessary to release all acquired resources.
|
getFrameBitmap
void loadModelFromAsset(java.lang.String assetName, java.lang.String... labels)
assetName
- the name of the .tflite model asset to loadlabels
- the labels of the objects in the modelvoid loadModelFromFile(java.lang.String absoluteFileName, java.lang.String... labels)
absoluteFileName
- the full path to the .tflite model file to loadlabels
- the labels of the objects in the modelvoid activate()
void deactivate()
void setClippingMargins(int left, int top, int right, int bottom)
void setZoom(double magnification, double aspectRatio)
java.util.List<Recognition> getUpdatedRecognitions()
getUpdatedRecognitions()
.java.util.List<Recognition> getRecognitions()
void shutdown()