A native Android application demonstrating the use of the Camera2 API to capture high-quality video and convert it into a sequence of images. This project serves as a practical example for developers looking to understand and implement the Camera2 API for video processing tasks.
- Camera2 API Integration: Utilizes Android's Camera2 API for advanced camera functionalities.
- Video Capture: Records video with manual control over focus, exposure, and white balance.
- Image Extraction: Converts recorded video into individual frames (images).
- Image Storage: Saves extracted images in a specified directory for further processing.
- Real-Time Preview: Displays a live camera feed during video recording.
-
Clone the repository:
git clone https://github.com/ManibalaSinha/Camera2VideoImage.git cd Camera2VideoImage -
Open the project: Open
Camera2VideoImagein Android Studio. -
Configure permissions: Ensure your
AndroidManifest.xmlincludes the necessary permissions:<uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-
Set up camera permissions: Request runtime permissions for camera and storage access in your activity.
-
Run the application: Connect an Android device or use an emulator, then run the app from Android Studio.
Camera2VideoImage/
├── app/
│ ├── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── example/
│ │ │ │ └── camera2videoimage/
│ │ │ │ ├── CameraActivity.java
│ │ │ │ ├── Camera2Helper.java
│ │ │ │ └── VideoProcessor.java
│ │ │ └── res/
│ │ │ └── layout/
│ │ │ └── activity_camera.xml
├── build.gradle
└── AndroidManifest.xml
- Initialize Camera2 API: Set up the camera device and configure capture sessions.
- Start Video Recording: Begin recording video with manual control over camera settings.
- Capture Frames: Extract frames from the video stream at specified intervals.
- Save Images: Store extracted images in the device's storage.
- Display Preview: Show a live preview of the camera feed during recording.
- Enhance UI: Improve the user interface for better usability.
- Add Filters: Implement image filters to apply effects to captured frames.
- Optimize Performance: Improve the efficiency of video processing and image extraction.
- Implement Sharing: Allow users to share captured images via social media or email.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature). - Commit your changes (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature/YourFeature). - Create a new Pull Request.
- Author: Manibala Sinha – GitHub Profile
- Email: manibalasinha1@gmail.com