Who is this for?

This is an introductory topic for developers who are interested in creating Computer Vision Applications with OpenCV on Android Devices.

What will you learn?

Upon completion of this Learning Path, you will be able to:

  • Describe what OpenCV is, and what it can offer.
  • Create and configure a project to add OpenCV support.
  • Process camera images using OpenCV.

Prerequisites

Before starting, you will need the following:

Summary

AI-assisted

This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.

Close
?
You’ll build an Android app that captures and processes camera frames with OpenCV. First, you’ll configure a Kotlin project, add camera access and a JavaCameraView, and implement frame handling with Mat objects. Then, you’ll apply adaptive thresholding when processing is enabled and run the app on a device to switch between the original and thresholded live views.

Frequently asked questions

AI-assisted

These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.

Close
?
What result should I expect when I run the app after adding OpenCV?
You should see a camera preview from JavaCameraView after granting camera permission. Starting the preview shows live frames. To switch to an adaptive thresholded image, check the processing checkbox.
Where do I add the camera view and UI controls?
Edit activity_main.xml to include a JavaCameraView, start and stop buttons, and a checkbox. Replace the existing layout with the provided XML so the controls appear correctly.
Which OpenCV component provides frames for processing in this app?
JavaCameraView supplies camera frames. You’ll process those frames as OpenCV Mat objects in your activity code.
Do I need to use the exact project and package names shown?
Using the provided names is recommended. However, you can choose different names, as long as you stay consistent across the project configuration and code.
What should I check if the camera preview doesn't appear?
Verify the app has camera permission and that the JavaCameraView is present in the layout. Use the start control to begin the preview before expecting frames to update.
Next