use of org.reactnative.facedetector.RNFaceDetector in project react-native-camera by react-native-community.
the class FileFaceDetectionAsyncTask method detectorForOptions.
private static RNFaceDetector detectorForOptions(ReadableMap options, Context context) {
RNFaceDetector detector = new RNFaceDetector(context);
detector.setTracking(false);
if (options.hasKey(MODE_OPTION_KEY)) {
detector.setMode(options.getInt(MODE_OPTION_KEY));
}
if (options.hasKey(RUN_CLASSIFICATIONS_OPTION_KEY)) {
detector.setClassificationType(options.getInt(RUN_CLASSIFICATIONS_OPTION_KEY));
}
if (options.hasKey(DETECT_LANDMARKS_OPTION_KEY)) {
detector.setLandmarkType(options.getInt(DETECT_LANDMARKS_OPTION_KEY));
}
return detector;
}
use of org.reactnative.facedetector.RNFaceDetector in project react-native-camera by react-native-community.
the class RNCameraView method setupFaceDetector.
/**
* Initial setup of the face detector
*/
private void setupFaceDetector() {
mFaceDetector = new RNFaceDetector(mThemedReactContext);
mFaceDetector.setMode(mFaceDetectorMode);
mFaceDetector.setLandmarkType(mFaceDetectionLandmarks);
mFaceDetector.setClassificationType(mFaceDetectionClassifications);
mFaceDetector.setTracking(mTrackingEnabled);
}
use of org.reactnative.facedetector.RNFaceDetector in project react-native-camera by lwansbrough.
the class RNCameraView method setupFaceDetector.
/**
* Initial setup of the face detector
*/
private void setupFaceDetector() {
mFaceDetector = new RNFaceDetector(mThemedReactContext);
mFaceDetector.setMode(mFaceDetectorMode);
mFaceDetector.setLandmarkType(mFaceDetectionLandmarks);
mFaceDetector.setClassificationType(mFaceDetectionClassifications);
mFaceDetector.setTracking(mTrackingEnabled);
}
use of org.reactnative.facedetector.RNFaceDetector in project react-native-camera by lwansbrough.
the class FileFaceDetectionAsyncTask method detectorForOptions.
private static RNFaceDetector detectorForOptions(ReadableMap options, Context context) {
RNFaceDetector detector = new RNFaceDetector(context);
detector.setTracking(false);
if (options.hasKey(MODE_OPTION_KEY)) {
detector.setMode(options.getInt(MODE_OPTION_KEY));
}
if (options.hasKey(RUN_CLASSIFICATIONS_OPTION_KEY)) {
detector.setClassificationType(options.getInt(RUN_CLASSIFICATIONS_OPTION_KEY));
}
if (options.hasKey(DETECT_LANDMARKS_OPTION_KEY)) {
detector.setLandmarkType(options.getInt(DETECT_LANDMARKS_OPTION_KEY));
}
return detector;
}
Aggregations