• Skip to primary navigation
  • Skip to main content
OpenCV

OpenCV

Open Computer Vision Library

  • Library
    • Releases
    • Platforms
    • License
  • Forum
    • OpenCV Forum (New!)
    • Askbot (Old Forum)
  • OpenCV University
    • All Courses
      • Mastering OpenCV with Python
      • Fundamentals of CV & IP
      • Deep Learning with PyTorch
      • Deep Learning with TensorFlow & Keras
      • Advanced Vision Applications with Deep Learning & Transformers
      • Mastering Generative AI for Art
    • CVDL Master Program
    • Courses [Enrolled Users]
    • For Organizations
    • Student Discount
    • CareerX
  • Free Courses
    • VLM Bootcamp NEW
    • PyTorch Bootcamp NEW
    • TensorFlow Keras Course
    • OpenCV Bootcamp
    • Python for Beginners
  • Services
  • Face Recognition
  • Contribute
    • Area Chairs
    • Membership
      • Platinum
      • Gold
    • Development Partnership
    • Course Partnership
  • Resources
    • Research Papers
    • Get Started
    • Podcast
    • Tools
      • Roboflow
    • Links
    • Official OpenCV Logos & Media Kit
    • Leadership
    • About

OpenCV4Android Samples

OpenCV provides a set of samples for Android developers. These samples show how OpenCV can be used from both Java and native C++ levels of Android. There are 2 groups of samples: samples for Java and C++ OpenCV API, and a group of sample applications. The first group is named as “Tutorial #” and  considers important aspects for a beginner: using OpenCV in regular apps, working with a standard camera, mixing both Java and C++ calls to OpenCV in a single application. The sample application works with both Mavel Central AAR package and OpenCV for Android SDK.

Java and C++ API usage

The first group of samples illustrates how to use OpenCV Java API in your project. Follow the tutorial “Introduction into Android Development” to install all needed prerequisites, build the applications and understand their behavior.

  • Tutorial 1 – Camera Preview – shows the simplest way Android application can use OpenCV, i.e. via OpenCV application helper classes. It displays full screen preview and shows OpenCV API to get camera frames for processing and rendering.
  • Tutorial 2 – Mixed Processing – shows ways of  pre-processing camera preview frames with filters implemented in Java and C++ calls to OpenCV.

Tutorial 3 – Camera Control – shows a way of basic manipulations with camera in an OpenCV based Android application. In particular it changes camera preview resolution, activates camera built-in effects, takes and saves a still picture.

Sample applications

There are also several sample applications written mostly in Java. They get a frame from camera, do some processing with OpenCV and visualize the frame on a device screen.

  • Sample – image-manipulations – this example demonstrates how OpenCV can be used as an image processing and manipulation library. It supports several filters, demonstrates color space conversions and working with histograms. It doesn’t have special relation to computer vision, but OpenCV has powerful core and imgproc modules, which may be useful in a wide range of applications, especially in the field of Computational Photography.
  • Sample – 15-puzzle – shows how a simple game can be implemented with just a few calls to OpenCV. It is available on Google Play.
  • Sample – face-detection – is the simplest implementation of the face detection functionality on Android. The Sample uses FaceDetection API and DNN module.
  • Sample – color-blob-detection – this sample shows a trivial implementation of color blob tracker. User points to some region, and algorithms tries to select the whole blob of a similar color. Work with touch interface and contours is demonstrated.
  • Sample – mobilenet-objdetect – shows MobileNet SSD network usage on Android. The network may be replaced by your own with minor modifications.
  • Sample – qr-detection – demonstrates two QR code detection and decoding pipelines implemented in OpenCV. The pipelines use classic computer vision.

Sample – video-recorder – is a simple video recording and playback application on top of OpenCV video i/o API. The sample features may vary on Android version and OpenCV build options.

This page was last updated February 28th, 2024.

Become a Member

Stay up to date on OpenCV and Computer Vision news

Join our Newsletter  

Free Courses

  • PyTorch Bootcamp
  • TensorFlow & Keras Bootcamp
  • OpenCV Bootcamp
  • Python for Beginners
  • PyTorch Bootcamp
  • TensorFlow & Keras Bootcamp
  • OpenCV Bootcamp
  • Python for Beginners

Courses

  • Mastering OpenCV with Python
  • Fundamentals of CV & IP
  • Deep Learning with PyTorch
  • Deep Learning with TensorFlow & Keras
  • Advanced Vision Applications with Deep Learning & Transformers
  • Mastering Generative AI for Art
  • Mastering OpenCV with Python
  • Fundamentals of CV & IP
  • Deep Learning with PyTorch
  • Deep Learning with TensorFlow & Keras
  • Advanced Vision Applications with Deep Learning & Transformers
  • Mastering Generative AI for Art

Partnership

  • Intel, OpenCV’s Platinum Member
  • Gold Membership
  • Development Partnership
  • CUDA
  • ARM
  • Intel, OpenCV’s Platinum Member
  • Gold Membership
  • Development Partnership
  • CUDA
  • ARM

Resources

  • Books
  • Podcast
  • Links
  • Official OpenCV Logos & Media Kit
  • Web Stories
  • Books
  • Podcast
  • Links
  • Official OpenCV Logos & Media Kit
  • Web Stories

General Link

  • About
  • Releases
  • License
  • About
  • Releases
  • License
Copyright © 2025, OpenCV team
  • Contact Us
  • Terms and Conditions
  • Privacy Policy
  • Contact Us
  • Terms and Conditions
  • Privacy Policy

Free Courses

  • PyTorch Bootcamp
  • TensorFlow & Keras Bootcamp
  • OpenCV Bootcamp
  • Python for Beginners

Courses

  • Mastering OpenCV with Python
  • Fundamentals of CV & IP
  • Deep Learning with PyTorch
  • Deep Learning with TensorFlow & Keras
  • Advanced Vision Applications with Deep Learning & Transformers
  • Mastering Generative AI for Art

Partnership

  • Intel, OpenCV’s Platinum Member
  • Gold Membership
  • Development Partnership
  • CUDA
  • ARM

Resources

  • Books
  • Podcast
  • Links
  • Official OpenCV Logos & Media Kit
  • Web Stories

General Link

  • About
  • Releases
  • License

Copyright © 2025 , OpenCV team
Contact Us | Privacy Policy | Terms & Conditions