An Android app for biometric visible light iris image capture, featuring:
- Real-time MediaPipe face mesh detection
- Accurate Camera2 autofocus and region-of-interest targeting
- OpenCV quality evaluation for dataset-grade image filtering
- ISO/IEC 29794-6 image quality evaluation for high quality Iris capture
- Flashlight control for uniform eye illumination
- Automated file naming and dataset generation
- Designed for biometric dataset collection and research
- 📸 Camera2 + OpenCV + MediaPipe pipeline
- 👁️ Detects left and right eye landmarks in real-time
- 🎯 Locks focus on eye region before capture
- 💡 Flashlight (torch) mode
- ✅ Image quality evaluation (ISO/IEC 29794-6 inspired)
- 📝 Dataset-friendly file naming:
subjectID_sessionID_trial_left.png
subjectID_sessionID_trial_left_1.png
subjectID_sessionID_trial_left_2.png
subjectID_sessionID_trial_left_3.png
- 💾 All images saved in
Downloads
folder - 🚀 Ready for large-scale research dataset creation
- Android Studio Hedgehog (or newer)
- Android device running Android 8.0+ (API 26+)
- OpenCV Android SDK (
System.loadLibrary("opencv_java4")
) - MediaPipe Tasks SDK (Face Landmarker / Face Mesh Model)
- Android Camera2 API
👉 We recommend real devices. Emulators will NOT work due to lack of Camera2 + OpenCV hardware support.
git clone https://github.com/YOUR_USERNAME/IrisQualityCapture.git
cd IrisQualityCapture
- Open
IrisQualityCapture
folder - Let Gradle sync complete
- Download OpenCV Android SDK from: https://opencv.org/releases/
- Import
sdk/native/libs
into your project OR copy.so
files into your app'sjniLibs
folder - Add OpenCV initialization:
static {
System.loadLibrary("opencv_java4");
}
- Follow MediaPipe Android Tasks setup
- Add the dependencies in
build.gradle
:
implementation 'com.google.mediapipe:tasks-vision:latest-version'
👉 replace latest-version
with the current stable version.
This app uses the MITRE BIQT Iris Server for automatic quality scoring.
a) Start the server locally
b) Run the server
c) Update your Android app with server address
In MainActivity3.java
, set the server URL:
String serverUrl = "http://<your-server-ip>:5000/";
👉 The app will automatically send cropped eye images to this server for evaluation.
👉 Only images passing quality thresholds will be saved locally.
The app requires the server to be running for image evaluation.
If no server is available, images will not be evaluated or saved.
- Connect Android device via USB
- Run app from Android Studio
👉 First launch will ask for Camera and Storage permissions.
- Enter:
- Subject ID
- Session ID
- Trial Number
- Position subject’s face in frame
- App detects eyes → locks focus → evaluates image quality
- If quality passes, image is saved automatically
- Torch stays ON for stable lighting
- Repeat for left and right eyes
- Images stored in
/Downloads/
👉 You can customize thresholds for quality scoring in MainActivity3.java → thresholds map
Metric | Threshold |
---|---|
Overall Quality | ≥ 50 |
Sharpness | ≥ 70 |
Others | optional (commented by default) |
👉 Only images meeting all thresholds will be saved.
/app/src/main/java/com/example/irisqualitycapture/
├── medium/
│ ├── CameraConnectionFragment.java → Camera2 + focus + torch control
│ ├── MainActivity3.java → Main capture workflow
│ ├── OverlayView.java → Eye rectangle overlays
│ └── ImageUtils.java → Image conversion helpers
- App designed for internal research dataset capture
- Not for biometric matching in production systems (yet)
- Requires real Android device with Camera2 support
This project is licensed under the MIT License.
- Google MediaPipe Tasks SDK
- OpenCV Android SDK
- Android Camera2 API
- ISO/IEC 29794-6 Biometrics Quality Guidelines
- Add support for front camera
- In-app live quality feedback overlay
- Local fallback quality scoring (no server dependency)
- Dataset export + dataset labeling automation