Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Someting wrong in my code,can you check it?thx~! [modified]

Someting wrong in my code,can you check it?thx~! [modified]

Scheduled Pinned Locked Moved C#
csharptutorialcomgraphicshelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    franva
    wrote on last edited by
    #1

    hello guys, I am a beginner.I am interesting in Aforge.net.It is a really fantanstic framework~! I want to know how to use AForge.net in C# to connect to a Camera.I found the Motion_Detection article but it's too diffcult to me.I can not to understand it.~_~; So what I want to know is just a very simple example to show how to connect to a camera and get a image from the camera. Thanks~! I am really really really really eager to know the answer asap. MSN:franva008@hotmail.com :confused: now this is my code: private void button1_Click(object sender, EventArgs e) { // enumerate video devices AForge.Video.DirectShow.FilterInfoCollection videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice); // create video source VideoCaptureDevice videoSource = new VideoCaptureDevice(videoDevices[0].MonikerString); //VideoCaptureDevice videoSource = new VideoCaptureDevice("Acer HD Crystal Eye webcam"); // set NewFrame event handler videoSource.NewFrame += new NewFrameEventHandler( video_NewFrame ); // start the video source videoSource.DesiredFrameRate = 25; videoSource.DesiredFrameSize = new Size(pictureBox1.Width, pictureBox1.Height); videoSource.Start( ); } private void video_NewFrame(object sender, NewFrameEventArgs eventArgs) { // get new frame //Bitmap bitmap = eventArgs.Frame; pictureBox1.Image = (Image)((object)bitmap); //pictureBox1.Image = (Image)eventArgs.Frame; // process the frame } Error message:invalue Parameters

    modified on Saturday, December 13, 2008 11:31 AM

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups