Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Italy
Asked — Edited

Camera Image Without Red Bars

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.

PRO
Synthiam
#1  
set the bars to be located off the screeen by their cordinates:)

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.:)
#2  
thank you Dj. I will do so with the bars but I've tried fast the framerate and gives this error:
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();
PRO
Synthiam
#3  
yes, don't change that framerate. you can't change it or you'll get an error.

The way to change the framrate is to call the UpdatePreview() more often:)
#4  
I'll post you the piece of code since I don't understand what you mean:

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
PRO
Synthiam
#5  

Code:


timer1.Interval = 50;
timer1.Start();

lbl_fps.Text = (1000 / timer1.Interval).ToString();

_camera.StartCamera(WebcamChosen, panel1);

private void timer1_Tick(object sender, EventArgs e) {

_camera.UpdatePreview();
}
#6  
Oh I didn't thought that the number should be so manual. Fixed and everything works. THe only "problem" now are the backgrounds of the images and labels that can't be transparent on visual studio 2010:(

Thx for the support