
Hexxen
Italy
Asked
— Edited
I'm coding the software for Zeus.
I want to have a full screen image from the webcam.
I've followed the #18 tutorial and now I have a working camera but in fullscreen the red bars are too big.
Is there a way to have only the camera image?
The updatepreview function is the only way to update images?
In this way I can't use the FrameRate attribute.
your framerate is set by the number of updatePreview calls. If you call the update 30 times in a second, you'll have 30 frames per second. Rather than having an event executed on every frame (which leads to thread execution timing issues related to your processing speed), it's a much safer method of working with an image at the time.
You also have access to the raw bitmap if you wish.
Error HRESULT E_FAIL has been returned from a call to a COM component.
in this line of code: lbl_fps.Text =_camera.FrameRate.ToString();
The way to change the framrate is to call the UpdatePreview() more often
timer1.Interval = 50;
timer1.Start();
_camera.StartCamera(WebcamChosen, panel1);
private void timer1_Tick(object sender, EventArgs e)
{
_camera.UpdatePreview();
lbl_fps.Text = _camera.FrameRate.ToString();
}
btw red stripes are far away from the screen. thx for that
Code:
Thx for the support