Reputation: 169
I am trying capture frames with higher resolution (eg. 800x600) and brightness using EmguCV(emgucv 2.1.0.793).
I am using A4 Tech PK-730MJ Web Cam.
I tried to set capture property like this _capture.SetCaptureProperty(Emgu.CV.CvEnum.CAP_PROP.CV_CAP_PROP_FRAME_HEIGHT, 600);
But it always capturing 640x480 frame. How to set the frame capture, brightness property? Is this capture property camera specific? If yes, What camera should I use? Will Logitech Webcam Pro 9000 work?
Upvotes: 2
Views: 5917
Reputation: 2710
You are on the right track!
Using Emgu.CV 3.2.0.2721 You really should use:
VideoCapture Camera = new VideoCapture(0);
Camera.SetCaptureProperty(CapProp.FrameWidth, 1280);
Camera.SetCaptureProperty(CapProp.FrameHeight, 720);
Camera.SetCaptureProperty(CapProp.Autofocus, 39);
Camera.SetCaptureProperty(CapProp.Fps, 60); // 60Fps for USB 3.0, 30 Fps for USB 2.0!
This will solve your problems, changing the Default Resolution: 640 x 480 to the HD Resolution you set for your Camera.
See: CapProp Enumeration
Upvotes: 1
Reputation: 11
try this,
Image<Bgr, Byte> frame = capture.QueryFrame().Resize(1024,768,Emgu.CV.CvEnum.INTER.CV_INTER_LINEAR).Copy();
Upvotes: 1
Reputation: 36
Hope you solved the problem. For anyone who might be interested, you can only set it to one of the default resolutions, e.g 1280*1024, 600*480. I guess 800*600 is not one of the default settings. Try setting the height to 1024. It works for me. ^ ^
Upvotes: 2