资源简介

提供 1394或者usb相机的C#采集代码,避免自己重新开发,此程序本人已试过是可以用的,若出现问题可以把出错处的代码注释再运行,因为有点相机可能不支持某些功能

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Globalization;
using System.ComponentModel;


namespace Daheng.Camera
{
    [DefaultPropertyAttribute(“ResolutionMode“)]
    public class DHUsbCamera
    {
        public IntPtr m_hCamera;

        private Int32[] m_ImageWidth = new Int32[4];

        public Int32[] ImageWidth
        {
            get { return m_ImageWidth; }
            set { m_ImageWidth = value; }
        }
        
        private Int32[] m_ImageHeight = new Int32[4];

        public Int32[] ImageHeight
        {
            get { return m_ImageHeight; }
            set { m_ImageHeight = value; }
        }



        private String cameraType = ““;

        [CategoryAttribute(“摄像机信息“) ReadOnlyAttribute(true)]
        public String CameraType
        {
            get { return cameraType; }
            set { cameraType = value; }
        }        

        private String cameraSerialNum = ““;

        [CategoryAttribute(“摄像机信息“) ReadOnlyAttribute(true)]
        public String CameraSerialNum
        {
            get { return cameraSerialNum; }
            set { cameraSerialNum = value; }
        }
        private String companyName = ““;

        [CategoryAttribute(“摄像机信息“) ReadOnlyAttribute(true)]
        public String CompanyName
        {
            get { return companyName; }
            set { companyName = value; }
        }
        private String hardwareInfo = ““;

        [CategoryAttribute(“摄像机信息“) ReadOnlyAttribute(true)]
        public String HardwareInfo
        {
            get { return hardwareInfo; }
            set { hardwareInfo = value; }
        }
        private String cameraName = ““;

        [CategoryAttribute(“摄像机信息“) ReadOnlyAttribute(true)]
        public String CameraName
        {
            get { return cameraName; }
            set { cameraName = value; }
        }

        private HV_RESOLUTION resolutionMode = HV_RESOLUTION.RES_MODE0;

        [CategoryAttribute(“视频模式“)]
        public HV_RESOLUTION ResolutionMode
        {
            get { return resolutionMode; }
            set 
            { 
                resolutionMode = value;
                HVSetResolution(resolutionMode);
            }
        }

        private HV_SNAP_SPEED snapSpeed = HV_SNAP_SPEED.NORMAL_SPEED;

        [CategoryAttribute(“视频模式“)]
        public HV_SNAP_SPEED SnapSpeed
        {
            get { return snapSpeed; }
            set 
            { 
                snapSpeed = value;
                HVSetSnapSpeed(snapSpeed);
            }
        }

        private String exposureTimeUnit = “ms“;

        [CategoryAttribute(“快门控制“)]
        public String ExposureTimeUnit
        {
            get { return exposureTimeUnit; }
            set 
            {
                exposureTimeUnit = value;
                SetExposureTime(exposureTime

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      53248  2010-07-07 17:09  SingleUsbColorCamera\bin\Debug\SingleUsbCamera.exe

     文件      79360  2010-07-07 17:09  SingleUsbColorCamera\bin\Debug\SingleUsbCamera.pdb

     文件       5632  2005-09-23 06:56  SingleUsbColorCamera\bin\Debug\SingleUsbCamera.vshost.exe

     文件      23521  2007-04-24 11:10  SingleUsbColorCamera\DHUsbCamera.cs

     文件      13501  2010-09-19 10:35  SingleUsbColorCamera\DHUsbDll.cs

     文件      21020  2007-07-26 15:50  SingleUsbColorCamera\Form1.Designer.cs

     文件      15246  2007-07-26 16:05  SingleUsbColorCamera\MainFrm.cs

     文件       9100  2007-07-26 15:42  SingleUsbColorCamera\MainFrm.resx

     文件        903  2010-07-07 17:08  SingleUsbColorCamera\obj\Debug\SingleUsbCamera.csproj.GenerateResource.Cache

     文件      53248  2010-07-07 17:09  SingleUsbColorCamera\obj\Debug\SingleUsbCamera.exe

     文件       2234  2010-07-07 17:08  SingleUsbColorCamera\obj\Debug\SingleUsbCamera.MainFrm.resources

     文件      79360  2010-07-07 17:09  SingleUsbColorCamera\obj\Debug\SingleUsbCamera.pdb

     文件        180  2010-07-07 17:08  SingleUsbColorCamera\obj\Debug\SingleUsbCamera.Properties.Resources.resources

     文件        180  2010-07-07 17:08  SingleUsbColorCamera\obj\Debug\SingleUsbCamera.Viewer.resources

     文件       4608  2007-01-18 13:59  SingleUsbColorCamera\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

     文件        903  2007-06-26 13:14  SingleUsbColorCamera\obj\Release\SingleUsbCamera.csproj.GenerateResource.Cache

     文件      49152  2007-06-26 13:14  SingleUsbColorCamera\obj\Release\SingleUsbCamera.exe

     文件       2234  2007-06-26 13:14  SingleUsbColorCamera\obj\Release\SingleUsbCamera.MainFrm.resources

     文件      67072  2007-06-26 13:14  SingleUsbColorCamera\obj\Release\SingleUsbCamera.pdb

     文件        180  2007-06-26 13:14  SingleUsbColorCamera\obj\Release\SingleUsbCamera.Properties.Resources.resources

     文件        180  2007-06-26 13:14  SingleUsbColorCamera\obj\Release\SingleUsbCamera.Viewer.resources

     文件       4608  2007-04-24 10:59  SingleUsbColorCamera\obj\Release\TempPE\Properties.Resources.Designer.cs.dll

     文件        758  2010-08-26 13:51  SingleUsbColorCamera\obj\SingleUsbCamera.csproj.FileList.txt

     文件        484  2007-01-18 14:00  SingleUsbColorCamera\Program.cs

     文件       1290  2007-01-18 13:02  SingleUsbColorCamera\Properties\AssemblyInfo.cs

     文件       2855  2007-01-18 13:59  SingleUsbColorCamera\Properties\Resources.Designer.cs

     文件       5612  2007-01-18 13:02  SingleUsbColorCamera\Properties\Resources.resx

     文件       1094  2007-01-18 13:59  SingleUsbColorCamera\Properties\Settings.Designer.cs

     文件        249  2007-01-18 13:02  SingleUsbColorCamera\Properties\Settings.settings

     文件        766  2004-04-01 23:44  SingleUsbColorCamera\resource\Arrow4Way.cur

............此处省略43个文件信息

评论

共有 条评论