'Could not load type 'OpenCvSharp.VideoCapture' from assembly 'OpenCVSharp'
adsgreen opened this issue · comments
Summary of your issue
Clean visual studio 2022 console project using core7 / 8 targeting windows platform.
Installed opencvsharp4.windows to install the dll and the runtime.
I believe the environmen is all ok but the wiki's pages date back to 2014 so can't be sure.
Run small program with first line using var webcam = new VideoCapture(0);
Error occurs.
Environment
Windows 11
OpenCvSharp4 4.8.20230708
OpenCvSharp4.runtime.win 4.8.0.20230708
OpenCvSharp4.Extensions 4.8.0.20230708
Example code:
using OpenCvSharp;
using System.Drawing;
using System.Drawing.Imaging;
using WebCam_Sharp.Camera;
using VideoCapture webcam = new VideoCapture(0);
Output:
{"Could not load type 'OpenCvSharp.VideoCapture' from assembly 'OpenCVSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.":"OpenCvSharp.VideoCapture"}
What did you intend to be?
Create a video capture instance