shimat / opencvsharp

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

VideoCapture for 4K image black image captured #1533

Open stone89son opened 1 year ago

stone89son commented 1 year ago

Summary of your issue

I use VideoCapture to capture 4k image from camera but give me black image.

Environment

Win 10 Pro

Write your environment. Net Framework 4.8 OpenCvSharp4 4.3.0.20200701 OpenCvSharp4.runtime.win 4.6.0.20220608

What did you do when you faced the problem?

I set

_capture.FrameWidth=1280;
_capture.FrameHeight=960;

to normal working... but i want to working with 4k image because object to detect too small (0.1-0.2 cm) camera supported 4k and I tested when use with EmguCV is worked.

Example code:

_capture = new VideoCapture();
_capture.Open(0);
_capture.FrameWidth=3840;
_capture.FrameHeight=2160;

Output:

Saved from Mat object is black image. 4k2

What did you intend to be?

normal image receive.

stale[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.