EnoxSoftware / OpenCVForUnity

OpenCV for Unity (Untiy Asset Plugin)
https://assetstore.unity.com/packages/tools/integration/opencv-for-unity-21088
557 stars 175 forks source link

Camera is very slow to open when using the MSMF VideoCapture backend #178

Closed yingran-cn closed 9 months ago

yingran-cn commented 9 months ago

c++ can set putenv("OPENCV_VIDEOIO_MSMF_ENABLE_HW_TRANSFORMS=0") fix。

so,c# no warp this way.

EnoxSoftware commented 9 months ago

When trying the VideocaptureCameraInputExample, setting the value of OPENCV_VIDEOIO_MSMF_ENABLE_HW_TRANSFORMS to the environment variable changed the camera startup time. before : 30 - 60 second after : 1 - 2 second

  1. Set the environment variable OPENCV_VIDEOIO_MSMF_ENABLE_HW_TRANSFORMS=0.
  2. Restart PC.
  3. Run VideocaptureCameraInputExample.
OPENCV_VIDEOIO_MSMF_ENABLE_HW_TRANSFORMS
yingran-cn commented 9 months ago

work!good jod!