Skip to content

Android app for biometric eye image capture with automatic quality evaluation, and dataset collection support.

Notifications You must be signed in to change notification settings

naveengv7/IrisQualityCapture

Repository files navigation

IrisQualityCapture

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

📱 Features

  • 📸 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

🛠️ Dependencies

Required:

  • 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.


🚀 Installation & Setup

1️⃣ Clone the repo

git clone https://github.com/YOUR_USERNAME/IrisQualityCapture.git
cd IrisQualityCapture

2️⃣ Open in Android Studio

  • Open IrisQualityCapture folder
  • Let Gradle sync complete

3️⃣ Download & integrate OpenCV Android SDK

  • Download OpenCV Android SDK from: https://opencv.org/releases/
  • Import sdk/native/libs into your project OR copy .so files into your app's jniLibs folder
  • Add OpenCV initialization:
static {
    System.loadLibrary("opencv_java4");
}

4️⃣ Integrate MediaPipe Tasks SDK

implementation 'com.google.mediapipe:tasks-vision:latest-version'

👉 replace latest-version with the current stable version.

5️⃣ Set up and connect to BIQT Iris Quality Evaluation Server

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.

⚠️ Note:

The app requires the server to be running for image evaluation.
If no server is available, images will not be evaluated or saved.

6️⃣ Build + Run

  • Connect Android device via USB
  • Run app from Android Studio

👉 First launch will ask for Camera and Storage permissions.


🎮 Using the App

  1. Enter:
    • Subject ID
    • Session ID
    • Trial Number
  2. Position subject’s face in frame
  3. App detects eyes → locks focus → evaluates image quality
  4. If quality passes, image is saved automatically
  5. Torch stays ON for stable lighting
  6. Repeat for left and right eyes
  7. Images stored in /Downloads/

👉 You can customize thresholds for quality scoring in MainActivity3.java → thresholds map


🎯 Quality Evaluation (default settings)

Metric Threshold
Overall Quality ≥ 50
Sharpness ≥ 70
Others optional (commented by default)

👉 Only images meeting all thresholds will be saved.


📝 Project Structure

/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

⚠️ Notes & Limitations

  • App designed for internal research dataset capture
  • Not for biometric matching in production systems (yet)
  • Requires real Android device with Camera2 support

📋 License

This project is licensed under the MIT License.


🙏 Acknowledgements

  • Google MediaPipe Tasks SDK
  • OpenCV Android SDK
  • Android Camera2 API
  • ISO/IEC 29794-6 Biometrics Quality Guidelines

💡 Future Improvements (Roadmap)

  • Add support for front camera
  • In-app live quality feedback overlay
  • Local fallback quality scoring (no server dependency)
  • Dataset export + dataset labeling automation

About

Android app for biometric eye image capture with automatic quality evaluation, and dataset collection support.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published