c# webcam
C#
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using AforgeCam;
using AForge.Video;
using AForge.Video.DirectShow;
namespace AforgeCam
{
public partial class Form1 : Form
{
private FilterInfoCollection VideoCaptureDevices;
private VideoCaptureDevice FinalVideo;
// Importante //
// Installare AForge //
public Form1() // init
{
InitializeComponent();
{
VideoCaptureDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);
foreach (FilterInfo VideoCaptureDevice in VideoCaptureDevices)
{
comboBox1.Items.Add(VideoCaptureDevice.Name);
}
comboBox1.SelectedIndex = 0;
}
}
private void button1_Click(object sender, EventArgs e)
{
FinalVideo = new VideoCaptureDevice(VideoCaptureDevices[comboBox1.SelectedIndex].MonikerString);
FinalVideo.NewFrame += new NewFrameEventHandler(FinalVideo_NewFrame);
FinalVideo.Start();
}
void FinalVideo_NewFrame(object sender, NewFrameEventArgs eventArgs)
{
Bitmap video = (Bitmap)eventArgs.Frame.Clone();
pictureBox1.Image = video;
}
private void button2_Click(object sender, EventArgs e)
{
FinalVideo.Stop();
}
}
Also in C#:
- Title
- c# one line set
- Category
- C#
- Title
- unity set sprite transparency
- Category
- C#
- Title
- c# push numbers to array
- Category
- C#
- Title
- unity how to check object position
- Category
- C#
- Title
- embed video to exe file with c#
- Category
- C#
- Title
- c# make string null
- Category
- C#
- Title
- max of array C#
- Category
- C#
- Title
- unity round
- Category
- C#
- Title
- asp.net core redirecttoaction with parameters
- Category
- C#
- Title
- list of vectors c#
- Category
- C#
- Title
- Execute code every x seconds with Update()
- Category
- C#
- Title
- how to make a float in C++
- Category
- C#
- Title
- remove all array elements c#
- Category
- C#
- Title
- how to insert into a list c#
- Category
- C#
- Title
- what function is called just before the a script is ended c#
- Category
- C#
- Title
- windows forms iterate through all controls
- Category
- C#
- Title
- leantween move ui
- Category
- C#
- Title
- c# get index of item in list
- Category
- C#
- Title
- enums c#
- Category
- C#
- Title
- c# inline if
- Category
- C#
- Title
- how to add an embedded resource in visual studio code
- Category
- C#
- Title
- how to insert <input> datatype <td> in asp.net core table
- Category
- C#
- Title
- c# two dimensional array
- Category
- C#
- Title
- c# change variable types
- Category
- C#
- Title
- c# float to string
- Category
- C#
- Title
- how to get array of children transform
- Category
- C#
- Title
- C# int to hex
- Category
- C#
- Title
- try catch c#
- Category
- C#
- Title
- c sharp create dictionary
- Category
- C#
- Title
- unity scene name get
- Category
- C#
- Title
- visual studio C# hintergrund bild ändern
- Category
- C#
- Title
- how to compare datetime in c#
- Category
- C#
- Title
- unity access child
- Category
- C#
- Title
- unity detect number key
- Category
- C#
- Title
- unity movetowards 2d
- Category
- C#
- Title
- C# .net core convert int to enum
- Category
- C#
- Title
- convert double to currency c#
- Category
- C#
- Title
- c# webcam
- Category
- C#
- Title
- unity print to console
- Category
- C#
- Title
- c# stop loop in method
- Category
- C#
- Title
- unity position ui element
- Category
- C#
- Title
- unity detect any key
- Category
- C#
- Title
- c# reverse string
- Category
- C#
- Title
- while loop c#
- Category
- C#
- Title
- convert base64 string to string c#
- Category
- C#
- Title
- visual c#
- Category
- C#
- Title
- isInstanceOf nunit
- Category
- C#
- Title
- unity create a child object
- Category
- C#
- Title
- inheritance c#
- Category
- C#
- Title
- find gameobject with tag
- Category
- C#
- Title
- c# math to radiant
- Category
- C#
- Title
- c# join array
- Category
- C#
- Title
- unity round vector 3 to nearest integer
- Category
- C#
- Title
- constructor in inherited class c#
- Category
- C#
- Title
- c# type of generic is string
- Category
- C#
- Title
- how to track a branch on github
- Category
- C#
- Title
- c# convert Unix time in seconds to datetime
- Category
- C#
- Title
- how to reference a child object unity
- Category
- C#
- Title
- How to search for a string from readline in c#
- Category
- C#
- Title
- c# start process
- Category
- C#
- Title
- nunit return parameter
- Category
- C#
- Title
- c sharp split by newline
- Category
- C#
- Title
- run async method parallel c#
- Category
- C#
- Title
- combine two arraylist c#
- Category
- C#
- Title
- isdaylightsavingtime in c#
- Category
- C#
- Title
- c# list length
- Category
- C#
- Title
- array c#
- Category
- C#
- Title
- convert string to boolean c#
- Category
- C#
- Title
- asp.net textarea disable resize
- Category
- C#
- Title
- get what week of the month c#
- Category
- C#
- Title
- if a method doesnt rutern a value, what shouyld i reeturn c#
- Category
- C#
- Title
- c sharp if string equals
- Category
- C#
- Title
- how to convert object in string JSON c#
- Category
- C#
- Title
- unity set list of strings
- Category
- C#
- Title
- onmouseover unity
- Category
- C#
- Title
- how to hide and show object in unity script
- Category
- C#
- Title
- list contains type c#
- Category
- C#
- Title
- C# how to expose an internal class to another project in the solution
- Category
- C#
- Title
- convert string to double c#
- Category
- C#
- Title
- unity vector3 smoothdamp not reaching target
- Category
- C#
- Title
- find month number from date C#
- Category
- C#
- Title
- unity check tag
- Category
- C#
- Title
- cursorlockmode cannot be used as a method C#
- Category
- C#
- Title
- foreach c#
- Category
- C#
- Title
- c# round number up
- Category
- C#
- Title
- wpf use enum description
- Category
- C#
- Title
- c# enum default
- Category
- C#
- Title
- why is c# say ; expected
- Category
- C#
- Title
- draw sphere cast unity with program
- Category
- C#
- Title
- c# sort array
- Category
- C#
- Title
- how to mock abstract httpcontext using moq .net core
- Category
- C#
- Title
- compile in one single exe c#
- Category
- C#
- Title
- iterate through dictionary c#
- Category
- C#
- Title
- unity move character
- Category
- C#
- Title
- c# timespan
- Category
- C#
- Title
- C# sprint key
- Category
- C#
- Title
- eventos c#
- Category
- C#
- Title
- c# make request to rest api
- Category
- C#
- Title
- c# list all files in a directory and subdirectory
- Category
- C#
- Title
- send type as argument c#
- Category
- C#