Skip to content

Experimental Unity project integrating USB Camera for Unity Android and OpenCV for Unity. Demonstrates capturing video from USB web cameras on Android, converting frames to OpenCV Mat format, and applying image processing workflows. Intended for research, evaluation, and technical verification.

License

Notifications You must be signed in to change notification settings

EnoxSoftware/USBCameraWithOpenCVForUnityExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

USBCamera With OpenCVForUnity Example

screenshot01.jpg

Overview

This repository provides an experimental Unity sample project intended for research, evaluation, and technical verification of USB-connected camera usage in Android-based Unity applications.
It integrates [USB Camera for Unity Android] and [OpenCV for Unity] to demonstrate how to acquire video streams from USB web cameras and apply OpenCV-based image processing directly on Android devices.

By using the helper class USBCamera2MatHelper, USB camera frames can be converted into OpenCV Mat format, making it easy to apply existing OpenCVForUnity sample code and image processing workflows.
Please note that this helper class currently supports only a single USB camera connection at a time.

As important limitations, [USB Camera for Unity Android] requires the graphics API to be set to OpenGLES3. In addition, depending on the connected camera model, the application may crash when the USB device is unplugged.
It is recommended to test the behavior with your camera hardware using the demo application provided on the [USB Camera for Unity Android] Asset Store page before integrating it into your own project.

Environment

Setup

  1. Download the latest release unitypackage. USBCameraWithOpenCVForUnityExample.unitypackage
  2. Create a new project. (USBCameraWithOpenCVForUnityExample)
    • Change the platform to Android in the "Build Settings" window.
  3. Import and setup the USB Camera for Unity Android. Refer to the ReadMe.pdf on the Asset Store introduction page.
  4. Import and setup the OpenCV for Unity.
  5. Import the USBCameraWithOpenCVForUnityExample.unitypackage.
  6. Add the "Assets/USBCameraWithOpenCVForUnityExample/*.unity" files to the "Scenes In Build" list in the "Build Settings" window.
  7. Build and Deploy.

About

Experimental Unity project integrating USB Camera for Unity Android and OpenCV for Unity. Demonstrates capturing video from USB web cameras on Android, converting frames to OpenCV Mat format, and applying image processing workflows. Intended for research, evaluation, and technical verification.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages