Our Other Sponsors
HI I am using visual studio.net (C#) i have downloaded a project with dll file to view webcam in my application i am writing a code for video processing i am using the method d.showWindow(Video) to display the webcam in picturebox named Video, now i want to capture the frames of the video for this i made a new Image variable (Image temp) and i am using temp = Video.Image; this method works fine when we want to get a picture from a picturebox, but as i am displaying video in the picturebox Video so Video.Image is not giving any result, can anyone tell me how can i get the frames for the processing or which method should i use or what mistake i am making? i am also posting code below private void Form1_Load(object sender, EventArgs e) { Device[] devices = DeviceManager.GetAllDevices(); Device d = DeviceManager.GetDevice(0); d.ShowWindow(Video); Display.SizeMode = PictureBoxSizeMode.StretchImage; Display.Image = Image.FromFile("Filled2.bmp"); } private void Display_Click(object sender, EventArgs e) { Image temp; temp = Video.Image; try { if (temp != null) { temp.Save("D:\\dip\\temp.bmp"); } } catch (Exception) { MessageBox.Show("There was a problem saving the file." + "Check the file permissions."); } }
> can anyone tell me how can i get the frames for the processing or which method should i use or what mistake i am making?
This is very difficult to answer. We have to know what type of camera you are using, and what SDK that have have available. The picture box control is only suited for displaying static images. To display streaming media you will have to use managed Direct X components.
Hope this helps.
JO