Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

This example shows how to convert VideoPlayer texture to OpenCV Mat using AsyncGPUReadback.

Notifications You must be signed in to change notification settings

EnoxSoftware/VideoPlayerWithOpenCVForUnityExample

Repository files navigation

⚠️ Archived Repository

This repository is no longer maintained or updated.
If you want to achieve similar functionality, please use the UnityVideoPlayer2MatHelper class included in OpenCVForUnity version 2.6.4 or later.

VideoPlayer With OpenCVForUnity Example

Overview

This example shows how to convert VideoPlayer texture to OpenCV Mat using AsyncGPUReadback.

  • VideoPlayerOnlyExample
  • VideoPlayerWithOpenCVForUnitySyncExample
  • VideoPlayerWithOpenCVForUnityAsyncExample
  • VideoPlayerToMatHelperExample
  • FaceDetectionYuNetV2Example
  • ObjectDetectionYOLOXExample
  • HandPoseEstimationMediaPipeExample
  • PoseEstimationMediaPipeExample
  • VideoCaptureTrackingExample
  • VideoPlayerTrackingExample

Environment

Demo

Setup

  1. Download the latest release unitypackage. VideoPlayerWithOpenCVForUnityExample.unitypackage
  2. Create a new project. (VideoPlayerWithOpenCVForUnityExample)
  3. Import OpenCVForUnity.
    • Select MenuItem[Tools/OpenCV for Unity/Open Setup Tools].
    • Click the [Open Example Assets Downloader] button, then click the [FaceDetectionYuNetV2Example],[ObjectDetectionYOLOXExample],[HandPoseEstimationMediaPipeExample],[PoseEstimationMediaPipeExample],[TrackingExample] buttons.
    • Click the [Move StreamingAssets Folder] button.
    • [WebGL] Click the [Enable MultiThreads Support] button or the [Enable SIMD Support] button. Set [Project Settings]-[Other Settings]-[Color Space] to [Gamma]. SetupTools.png ExampleAssetsDownloader.png
  4. Import the VideoPlayerWithOpenCVForUnityExample.unitypackage.
  5. Add the "Assets/VideoPlayerWithOpenCVForUnityExample/*.unity" files to the "Scenes In Build" list in the "Build Settings" window.
  6. Build and Deploy.

ScreenShot

screenshot01.png screenshot02.png screenshot03.png screenshot04.png

About

This example shows how to convert VideoPlayer texture to OpenCV Mat using AsyncGPUReadback.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages