An Android application for interfacing with MINI2 thermal cameras, supporting various models including MINI2-384, MINI2-256, and MINI2-640.
- USB camera connection and management
- Real-time thermal image display with hardware-accelerated rendering
- High-performance video recording at native camera framerates (25/50fps)
- Multiple palette options (White Hot, Sepia, Ironbow, etc.)
- Scene mode selection
- Brightness and contrast adjustment
- FFC (Flat Field Correction) control
- Raw frame capture for image enhancement
- Fullscreen viewing mode
- Support for different MINI2 camera models
- Android Studio Hedgehog | 2023.1.1 or newer
- Android SDK 35 or higher
- Minimum Android version: API 26 (Android 8.0)
- USB Host support on your Android device
- C++ development tools (NDK) for native code compilation
- Clone the repository:
git clone https://github.com/Kodrea/MINI2-Android-App.git-
Open Android Studio and select "Open an Existing Project"
-
Navigate to the cloned directory and click "OK"
-
Let Android Studio sync the project and download dependencies
-
Connect your Android device with USB debugging enabled
-
Build and run the project
The project uses Gradle with Kotlin DSL for build configuration. Key configurations:
- Target SDK: 35
- Minimum SDK: 26
- NDK support enabled for native code
- C++ STL: c++_shared
- CMake version: 3.22.1
/app/src/main/java/- Kotlin source filesCameraActivity.kt- Main camera interface with video recordingVideoRecorder.kt- MediaCodec H.264 video encodingIrcmdManager.kt- Camera command interfaceDeviceConfig.kt- Camera model configurations
/app/src/main/cpp/- Native C++ codeuvc_manager.cpp/h- UVC camera streaming and direct recordingircmd_manager.cpp/h- Thermal camera command processingnative-lib.cpp- JNI bridge functionsthird_party/- LibUVC, LibUSB, and LibYUV libraries
/app/src/main/res/- Resource files and UI layouts/app/src/main/AndroidManifest.xml- App manifest with USB permissions
The app implements a high-performance direct recording pipeline that achieves native camera framerates:
- UVC Frame Callback → Native YUYV→YUV420 conversion → MediaCodec Encoder
- Bypasses Android display pipeline entirely
- Achieves target 25/50fps recording performance
- Uses hardware-accelerated color space conversion via LibYUV
- TextureView.getBitmap(): ~60ms per frame bottleneck (16fps max)
- Surface Recording: Incompatible with thermal camera TextureView rendering
- RGB→YUV Conversion: Unnecessary color space conversion overhead
- AndroidX Core KTX
- AndroidX AppCompat
- Material Design Components
- ConstraintLayout
- Native Libraries:
- LibUVC (USB Video Class)
- LibUSB (USB device communication)
- LibYUV (Hardware-accelerated color conversion)
The app requires USB Host permissions to communicate with the thermal camera. Make sure your Android device supports USB Host mode and grant the necessary permissions when prompted.
Cody - [email protected] Project Link: https://github.com/Kodrea/https://github.com/Kodrea/MINI2-Android-App.git