Windows ChallengE - ICOP Vortex86 and 1394 WebCam
You will be pleased to know that Starbucks in Taipei opened on time today, there's nothing like a Grande Vanilla Latte to wake one up in the morning especially when you're suffering with Jet Lag...
It's time to answer a common inbound question - A number of teams in the Windows ChallengE are using the eBoxII reference board https://www.icop.com.tw/products_detail.asp?ProductID=132 and are wanting to hook up a webcam - the MSDN “Get Embedded“ article https://msdn.microsoft.com/library/en-us/dnembedded/html/embedded09172002.asp describes how to hook up a 1394 webcam to a CEPC to get this working - unfortunately, the Vortex86 reference board doesn't have a PCI slot, so you can't attach a 1394 webcam - the reference board does have USB connectors, so you could potentially hook up a USB WebCam, unfortunately Windows CE .NET 4.2 doesn't ship with USB WebCam drivers - so, one way to get this working would be to use something like the eCAMIT IP camera from 3JTech - https://www.3jTech.com - you could pull images from the camera and display the output in a .NET Compact Framework application - the sample code below shows how to use the PictureBox control in a C# .NET Compact Framework application to display an image.
- Mike
using
System;
using
System.Drawing;
using
System.Collections;
using
System.Windows.Forms;
using
System.Data;
namespace
GetImage
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.Button GetImage;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
base.Dispose( disposing );
}
#region
Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.GetImage = new System.Windows.Forms.Button();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(8, 8);
this.pictureBox1.Size = new System.Drawing.Size(624, 328);
//
// GetImage
//
this.GetImage.Font = new System.Drawing.Font("Tahoma", 18F, System.Drawing.FontStyle.Regular);
this.GetImage.Location = new System.Drawing.Point(8, 344);
this.GetImage.Size = new System.Drawing.Size(616, 64);
this.GetImage.Text = "Get Image";
this.GetImage.Click += new System.EventHandler(this.GetImage_Click);
//
// openFileDialog1
//
this.openFileDialog1.Filter = "Bitmaps|*.bmp";
this.openFileDialog1.InitialDirectory = "\\Windows";
//
// Form1
//
this.Controls.Add(this.GetImage);
this.Controls.Add(this.pictureBox1);
this.Text = "Form1";
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main()
{
Application.Run(new Form1());
}
private void GetImage_Click(object sender, System.EventArgs e)
{
if (DialogResult.OK == openFileDialog1.ShowDialog( )) {
pictureBox1.Image=new System.Drawing.Bitmap(openFileDialog1.FileName);
}
}
}
}