I have a problem with my project ,
I think it's about web camera/ camera problem ,
I have developed my application ,and i have test on my pc ,
it was successfully when i am using my camera,
then i try to use webcam it was not move to webcam ,and still using my camera ,
What I have tried:
this is my code
using Emgu.CV;
using Emgu.CV.CvEnum;
using Emgu.CV.Structure;
using OfficeOpenXml;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Media;
using System.Net.NetworkInformation;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AplikasiAbsen16082020
{
public partial class Form1 : Form
{
Capture camera;
Image<Bgr, Byte> currentFrame;
List<Image<Gray, byte>> trainingimages = new List<Image<Gray, byte>>();
public Form1()
{
InitializeComponent();
face = new HaarCascade("haarcascade_frontalface_default.xml");
}
private void Form1_Load(object sender, EventArgs e)
{
camera = new Capture(1);
camera.QueryFrame();
Application.Idle += new EventHandler(FrameGrabber);
}
private void FrameGrabber(object sender, EventArgs e)
{
currentFrame = camera.QueryFrame().Resize(440, 330, Emgu.CV.CvEnum.INTER.CV_INTER_CUBIC);
currentFrame.Flip(Emgu.CV.CvEnum.FLIP.HORIZONTAL);
gray = currentFrame.Convert<Gray, Byte>();
camera.SetCaptureProperty(CAP_PROP.CV_CAP_PROP_FRAME_WIDTH, 640.01);
camera.SetCaptureProperty(CAP_PROP.CV_CAP_PROP_FRAME_HEIGHT, 480.01);
imageBox1.Image = currentFrame;
}
}
}
is there any way how to connect my application into webcam