shimat / opencvsharp

OpenCV wrapper for .NET
Apache License 2.0
5.22k stars 1.13k forks source link

Compatibility of ver 4.9 with .Net 7.0 #1665

Open sirfana opened 2 months ago

sirfana commented 2 months ago

My apologies i could not find an option to ask a question so putting it here. I have recently migrated my Windows Forms app from .Net Framework 4.7 to .Net 7.0 and my code no longer works with cameras to capture images. Now Open() method is returning false: int camera = 0; this.f_frame = new Mat(); this.f_capture = new VideoCapture(camera, VideoCaptureAPIs.ANY); bool CamOpenStatus = this.f_capture.Open(camera);

Plz suggest a fix, if there is any. Thanks. Windows 11, C#, In settings, apps can access camera