You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| [openCamera](open-camera.md) | openCamera action allows users to access their device's camera within the app for capturing images and videos. |
11876
-
| [openFaceCamera](open-face-camera.md) | openFaceCamera action provides face-aware capture with alignment guidance and optional auto-capture for selfie and verification flows. |
11876
+
| [openFaceCamera](open-face-camera.md) | openFaceCamera action provides a camera plugin that detects face in real-time. flows. |
11877
11877
| [getLocation](get-location.md) | getLocation action retrieves the device's current location, enabling location-based functionalities within the app. |
11878
11878
| [requestNotificationAccess](request-notification-access.md) | requestNotificationAccess action prompts users to grant permission for the app to send notifications to their device. |
11879
11879
| [showNotification](show-notification.md) | showNotification action displays local notifications within the app, notifying users of important events or information. |
@@ -13865,7 +13865,6 @@ Applicable on iOS/Android only. Opens the app settings page where the user can m
13865
13865
| assistSpeed | object | Show assist message whenever camera is moving faster than maxSpeed. [see properties](#values-for-optionsassistspeed) |
13866
13866
| autoCaptureInterval | integer | If set any number n, on each n interval camera will capture |
13867
13867
| captureOverlay | boolean | If set picture will be cropped according to overlay widget |
| message | string | use this pass a message above the camera |
13891
-
| messageStyle | object | style applied to the message widget |
13892
-
| showControls | boolean | set false to hide all controls |
13893
-
| showCaptureControl | boolean | set false to hide capture control icon |
13894
-
| showFlashControl | boolean | set false to hide flash control control icon |
13895
-
| showCameraLensControl | boolean | set false to hide camera lens control icon |
13896
-
| indicatorShape | string | use this to change the shape of the face indicator `circle`, `square` |
13897
-
| autoDisableCaptureControl | boolean | set true to disable capture control widget when no face is detected |
13898
-
| autoCapture | boolean | set true to capture image on face detected |
13899
-
| imageResolution | string | use this to set image resolution `low`, `medium`, `high` |
13900
-
| defaultFlashMode | string | use this to set initial flash mode `off`, `auto`, `always` |
13901
-
| performanceMode | string | Use this to set your preferred performance mode. `accurate`, `fast` |
13902
-
| accuracyConfig | object | Use this to set accuracy config for face detection. Accuracy config is only supported on web. [see properties](#values-for-optionsfacedetectionaccuracyconfig) |
13903
-
13904
-
##### Values for options.faceDetection.accuracyConfig
| detectionThreshold | number | Minimum confidence score required to consider a face detection valid. |
13912
-
| intersectionRatioThreshold | number | Minimum allowed overlap ratio between the detected face and expected region. |
13913
-
| extraHeightFactor | number | Additional height factor added to the face bounding box. |
13914
-
| inputSize | number | Size of the input image used for face detection. |
13915
-
| landmarkRatio | number | Minimum acceptable alignment accuracy for facial landmarks. |
13916
-
| frameMargin | number | Margin ratio to ensure face is not too close to frame edges. |
13917
-
| tiltAngleThreshold | number | Maximum allowed tilt angle of the detected face (in degrees). |
13918
-
| horizontalCenterTolerance | number | Allowed tolerance for how centered the face must be horizontally. |
13919
-
| earThreshold | number | Minimum Eye Aspect Ratio (EAR) to detect open eyes. |
13920
-
| minFaceWidthRatio | number | Minimum ratio of face width relative to the frame. |
13921
-
| maxFaceWidthRatio | number | Maximum ratio of face width relative to the frame. |
13922
-
| qualityPassThreshold | number | Minimum quality score required for a face to pass detection. |
13923
-
| yawLowerThreshold | number | Lower bound of acceptable yaw (left-right head rotation) ratio. |
13924
-
| yawUpperThreshold | number | Upper bound of acceptable yaw (left-right head rotation) ratio. |
13925
-
13926
-
13927
13884
**Usage Examples**
13928
13885
13929
-
13930
-
13931
13886
```yaml
13932
13887
View:
13933
13888
header:
@@ -14101,106 +14056,22 @@ You can clear previous camera results while recapturing using `cameraId.clear()`
14101
14056
id: captureLatest
14102
14057
```
14103
14058
14104
-
Capture image on face detected
14105
-
14106
-
```yaml
14107
-
- Button:
14108
-
label: Open Camera
14109
-
onTap:
14110
-
openCamera:
14111
-
id: cameraWithFaceDetection
14112
-
options:
14113
-
initialCamera: front
14114
-
faceDetection:
14115
-
enabled: true
14116
-
autoCapture: false
14117
-
performanceMode: accurate
14118
-
accuracyConfig: # accuracyConfig is only supported on web
14119
-
detectionThreshold: 0.5
14120
-
intersectionRatioThreshold: 0.9
14121
-
extraHeightFactor: 0.6
14122
-
inputSize: 224
14123
-
landmarkRatio: 0.95
14124
-
frameMargin: 0.05
14125
-
tiltAngleThreshold: 6
14126
-
horizontalCenterTolerance: 0.08
14127
-
earThreshold: 0.25
14128
-
minFaceWidthRatio: 0.18
14129
-
maxFaceWidthRatio: 0.82
14130
-
qualityPassThreshold: 0.8
14131
-
yawLowerThreshold: 0.85
14132
-
yawUpperThreshold: 1.15
14133
-
message: "Align your face in the square"
14134
-
messageStyle:
14135
-
color: "#FF0000"
14136
-
fontSize: 20
14137
-
onCapture:
14138
-
uploadFiles:
14139
-
id: uploader
14140
-
files: ${cameraWithFaceDetection.files[0]}
14141
-
uploadApi: fileUploadApi
14142
-
fieldName: file
14143
-
onComplete:
14144
-
showDialog:
14145
-
body:
14146
-
Column:
14147
-
children:
14148
-
- TextInput:
14149
-
value: ${cameraWithFaceDetection.files[0]}
14150
-
- Image:
14151
-
source: ${cameraWithFaceDetection.files[0].path}
14152
-
```
14153
-
14154
-
14155
14059
To learn more about openCamera functionalities, test it out here in [Ensemble Kitchen Sink](https://studio.ensembleui.com/app/e24402cb-75e2-404c-866c-29e6c3dd7992/screen/USuOaOZApSgzE2uVrqlv) app.
14156
14060
14157
14061
---
14158
14062
14159
14063
# openFaceCamera
14160
14064
14161
-
## Overview
14065
+
`openFaceCamera` action opens the device camera with real-time face detection. It automatically captures an image when the face is properly aligned (position, angle, etc.), making it ideal for selfies, profile photos, or any face-detection task on mobile and web. Use the `id` property to bind the captured image result (e.g. to a variable or data binding).
14162
14066
14163
-
The `ensemble_face_camera` module adds real-time face detection to the Ensemble framework.
14164
-
It is extracted from the original `ensemble_camera` package and focused on face-based capture workflows across Mobile and Web.
14067
+
### Setup in Ensemble Studio
14165
14068
14166
-
## What It Does
14069
+
1. Go to https://studio.ensembleui.com/
14070
+
2. Open your app
14071
+
3. From the left sidebar, click **Build & Deploy**
14072
+
4. In the **Build Settings** tab, enable the **Face Camera** module/feature and update.
14073
+
5. If building for iOS: switch to the **iOS** tab and add the required camera usage description (e.g. "We use the camera to capture your face for verification") and any face-related privacy descriptions
Without this registration, the `openFaceCamera` action will not work.
14200
-
14201
-
## Action
14202
-
14203
-
Use `openFaceCamera` in YAML.
14204
14075
14205
14076
### Properties
14206
14077
@@ -14401,6 +14272,8 @@ Use strict face detection thresholds for web capture.
14401
14272
message: "Error capturing image: ${event.error}"
14402
14273
```
14403
14274
14275
+
To learn more about openCamera functionalities, test it out here in [Ensemble Kitchen Sink](https://studio.ensembleui.com/app/e24402cb-75e2-404c-866c-29e6c3dd7992/screen/iLJkHUPgX3ii9EdQ1D8K) app.
14276
+
14404
14277
---
14405
14278
14406
14279
# openPlaidLink
@@ -17819,85 +17692,58 @@ To learn more about openCamera functionalities, test it out here in [Ensemble Ki
17819
17692
17820
17693
# openFaceCamera
17821
17694
17822
-
Use `openFaceCamera` when you need face-aware capture (for example selfie verification, identity checks, or attendance) instead of generic photo capture.
17695
+
Use `openFaceCamera` when you need **real-time** face detection — such as selfies, profile photos etc — instead of plain camera access.
17823
17696
17824
-
`openFaceCamera` provides guided framing, face validation, and optional auto-capture once the face qualifies.
17697
+
It adds face detection, alignment guidance (framing overlay), status messages, and optional **auto-capture** when the face meets quality criteria.
17825
17698
17826
-
## When to use this instead of openCamera
17699
+
### When to use this instead of `openCamera`
17827
17700
17828
-
- You need face alignment guidance before capture.
17829
-
- You need automatic capture when a valid face is detected.
17830
-
- You need stricter face quality checks, especially on web via `accuracyConfig`.
17701
+
- You want visual guidance to center and align the face before capture
17702
+
- You need automatic capture once a valid face is detected
17703
+
- You want stricter face quality rules (especially on web with `accuracyConfig`)
17831
17704
17832
-
For generic photo/video capture or gallery-first flows, continue using [`openCamera`](#opencamera).
| accuracyConfig | object | Fine-grained face detection thresholds. Web only. |
17714
+
### Quick Examples
17863
17715
17864
-
## Usage
17865
-
17866
-
### Basic
17716
+
**Basic face capture**
17867
17717
17868
17718
```yaml
17869
17719
- Button:
17870
17720
label: Open Face Camera
17871
17721
onTap:
17872
17722
openFaceCamera:
17873
-
id: myFaceCamera
17723
+
id: myFace
17874
17724
```
17875
-
17876
-
### Auto-capture
17725
+
**Auto-capture verified selfie**
17877
17726
17878
17727
```yaml
17879
17728
- Button:
17880
-
label: Capture verified selfie
17729
+
label: Capture Verified Selfie
17881
17730
onTap:
17882
17731
openFaceCamera:
17883
17732
id: profilePhoto
17884
17733
options:
17885
17734
initialCamera: front
17886
17735
autoCapture: true
17736
+
message: "Align your face in the frame"
17887
17737
performanceMode: accurate
17888
-
message: "Align your face"
17889
17738
onCapture:
17890
-
executeCode:
17891
-
body: |
17892
-
console.log('Captured face image: ' + profilePhoto.files[0].path);
17739
+
showToast:
17740
+
message: "Selfie captured!"
17893
17741
onError:
17894
17742
showToast:
17895
-
message: "Error capturing image: ${event.error}"
17743
+
message: "Capture failed: ${event.error}"
17896
17744
```
17897
17745
17898
-
## Full Reference
17899
-
17900
-
For complete module setup, advanced `accuracyConfig` fields, and more examples, see [`openFaceCamera` action docs](#openfacecamera).
17746
+
To learn more about openCamera functionalities, test it out here in [Ensemble Kitchen Sink](https://studio.ensembleui.com/app/e24402cb-75e2-404c-866c-29e6c3dd7992/screen/iLJkHUPgX3ii9EdQ1D8K) app.
0 commit comments