المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Webcam Application



C# Programming
06-06-2013, 10:02 PM
I want to draw a rectangle inside webcam application and I have built the camera where should I write the code to insert ROI please help me.
My code:
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms; namespace Camera_app{ public partial class Form1 : Form { Camera c; List imag = new List(); public Form1() { InitializeComponent(); c = new Camera(cbox1); } private void panel1_Paint(object sender, PaintEventArgs e) { } private void button1_Click(object sender, EventArgs e) { c.Connect(cbox1, pbox1); } private void button3_Click(object sender, EventArgs e) { c.Disconnect(); } private void button2_Click(object sender, EventArgs e) { c.Capture(pbox2); } private void pbox2_Click(object sender, EventArgs e) { } private void panel3_Paint(object sender, PaintEventArgs e) { } private void panel3_Paint_1(object sender, PaintEventArgs e) { } private void pbox3_Click(object sender, EventArgs e) { } private void panel5_Paint(object sender, PaintEventArgs e) { } }}using System;using System.Collections.Generic;using System.Linq;using System.Threading.Tasks;using System.Windows.Forms; namespace Camera_app{ static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } }}