}
}
private void button1_Click(object sender, EventArgs e)
{
//Initialize the capture device
grabber = new Capture();
grabber.QueryFrame();
//Initialize the FrameGraber event
Application.Idle += new EventHandler(FrameGrabber);
button1.Enabled = false;
}
private void button2_Click(object sender, System.EventArgs e)
{
try
{
//O'rgatilgan yuz hisoblagich
ContTrain = ContTrain + 1;
//Suratga olish qurilmasidan kulrang ramka oling
gray = grabber.QueryGrayFrame().Resize(320, 240, Emgu.CV.CvEnum.INTER.CV_INTER_CUBIC);
//Face Detector
MCvAvgComp[][] facesDetected = gray.DetectHaarCascade(
face,
1.2,
10,
Emgu.CV.CvEnum.HAAR_DETECTION_TYPE.DO_CANNY_PRUNING,
Do'stlaringiz bilan baham: |