Reputation: 334
I'm Working on Image Processing With Emgu.CV (4.9.0.5494)
.
all things were ok until I tried to change the capture resolution:
_capture.Start();
_captureInProgress = true;
await Task.Delay(500);
_capture.Set(CapProp.FrameWidth, 1280);
_capture.Set(CapProp.FrameHeight, 720);
_capture.Set(CapProp.Fps, 30);
_capture.ImageGrabbed += ProcessFrame;
after change resolution i Got this: 'OpenCV: _step >= minstep'
On _capture.QueryFrame()
when I remove these lines, everything will be OK: (default resolution is 640*480)
_capture.Set(CapProp.FrameWidth, 1280);
_capture.Set(CapProp.FrameHeight, 720);
_capture.Set(CapProp.Fps, 30);
I attached a picture of debugging too. what should I do? thanks.
Upvotes: 0
Views: 89
Reputation: 334
I found the Solution!
I'm trying to set VideoCapture
parameters instead of using Set Functions
in Constructor
. like this:
and everything works fine!
Tuple<CapProp, int>[] prop = new Tuple<CapProp, int>[3];
prop[0] = new Tuple<CapProp, int>(CapProp.FrameWidth, 2560);
prop[1] = new Tuple<CapProp, int>(CapProp.FrameHeight, 1440);
prop[2] = new Tuple<CapProp, int>(CapProp.Fps, 30);
_capture = new VideoCapture(1, VideoCapture.API.Any, prop);
Upvotes: 1