CameraApp is a high-performance Android camera application designed to demonstrate advanced image processing, manual hardware control, and machine learning integration. Built with modern Android architecture, it leverages the power of GPU for real-time effects and ML Kit for intelligent face tracking.
- ISO: Manual sensitivity control ranging from 100 to 6400.
- Shutter Speed: Precision control from 1/10s to 1/1000s to capture motion or low-light scenes.
- White Balance: Kelvin-based manual adjustment (2000K - 10000K) using custom RGB gains.
- Manual Focus: Tap-to-focus functionality with a visual focus ring feedback.
- Real-time Filters: All image processing is offloaded to the GPU using OpenGL ES 2.0 for lag-free performance.
- Advanced Shaders:
- Convolution Matrices: High-pass filter for the "Sharpen" effect.
- Color Transformation Matrices: Used for Vivid, Sepia, and B&W filters.
- HDR Simulation: Implements the ACES Filmic Tone Mapping algorithm to digitally enhance dynamic range.
- Intelligent Tracking: Uses Google ML Kit to detect faces in the camera stream asychronously.
- Dynamic AR Filter: A "Sunglasses" filter that automatically scales, positions, and rotates based on the user's eye coordinates and head tilt.
- Mirror Effect Correction: Corrects mirroring and rotation logic for seamless AR experiences on both front and back cameras.
- RAW (DNG) Support: Ability to capture uncompressed 10/12-bit digital negatives for professional post-processing.
- Filtered JPEG: Captures the exact frame processed by the OpenGL pipeline, burning the selected filters and AR elements directly into the image.
- Hardware Discovery: Automatically detects and handles multiple lenses, including Wide Angle support if available on the device.
- Fullscreen Viewer: Browse photos with a high-performance ViewPager2 implementation.
- Metadata Viewer: View technical details such as file path, size, type, and capture date.
- Safe Deletion: Permanent file deletion with user confirmation.
- Kotlin: Primary development language.
- CameraX & Camera2 Interop: Low-level hardware control through a modern API.
- OpenGL ES 2.0 & GLSL: Shader programming for GPU-based effects.
- Google ML Kit: On-device machine learning for face detection.
- View Binding: Type-safe UI component access.
- Material Design 3: Modern and intuitive user interface.
Follow these steps to run the project locally:
-
Clone the Repository:
git clone https://github.com/cemgolo/CameraApp.git
-
Open in Android Studio:
- Launch Android Studio.
- Select
File -> Openand choose the clonedKameraDeneme2folder.
-
Sync Gradle:
- Wait for the IDE to download dependencies and sync the project.
- If prompted, click
Sync Project with Gradle Files.
-
Device Requirements:
- Real Device Recommended: Due to OpenGL and Camera2 hardware requirements, a physical Android device (API 24+) is strongly recommended over an emulator.
- Ensure the device supports the Camera2 API.
-
Run the App:
- Connect your device via USB or WiFi.
- Click the
Run(Green play) button in Android Studio.
- Switching Modes: Use the bottom selector to toggle between Photo and Wide-angle modes.
- Applying Filters: Tap the star icon in the top bar to reveal the filter strip.
- Manual Settings: Tap the gear icon to open sliders for ISO, Shutter Speed, and White Balance.
- Focusing: Simply tap anywhere on the camera preview to lock focus on that specific point.
Developed by cemgolo