araobp / android-camera

CameraX + OpenCV + TesorFlow Lite basic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Android camera

Android CameraX image analysis demo with OpenCV4 and TesorFlow Lite

(Work in progress) Develop virtual camara mode.

Real camera mode

[Image sensor]-->[CameraX]-->[OpenCV4]--+-----------------------+
                     |                  |                       |
                     +------------------+--->[TensorFlow Lite]--+---> Final output


Virtual camera mode (for Unity)

[Unity camera]-->[RenderTexture]-- MQTT --->[OpenCV4]--+-----------------------+
                                    |                  |                       |
                                    +------------------+--->[TensorFlow Lite]--+---> Final output

Background and motivation

I think 4G/5G smart phones (or 4G/5G with Android-based cameras) with 4K/8K image sensors will replace the traditional PTZ monitoring cameras.

Traditional PTZ monitoring camera

                             Edge AI
  [Camera]---ONVIF/PoE---[Edge computer]---Ethernet---[Video recorder]---[Video management system]
  

Android-based monitoring cameras are cheaper and more flexible than the traditional ones.

    Edge AI
  [Smartphone]---4G/5G network---[Cloud storage]---[Video management app on cloud]
        |
 Direct communication over 4G/5G network
        |
  [Smartphone]

This project is just a skeleton of such an AI camera.

Requirements

OpenCV4 Android SDK has to be installed properly in this project -- it is not included in this repo.

The other components are installed by Gradle automatically.

Image processing filters with OpenCV4

  • Color filter
  • Optical flow
  • Difference extraction

TensorFlow Lite

  • Object detection

CameraX beta getting started

opencv-4.4.0-android-sdk.zip

About

CameraX + OpenCV + TesorFlow Lite basic

License:Apache License 2.0


Languages

Language:Kotlin 81.8%Language:Java 18.2%