Esempio n. 1
0
        /// <summary>
        /// 关闭设备
        /// </summary>
        /// <returns></returns>
        public bool Close()
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.Close();
            }
            return(rt);
        }
Esempio n. 2
0
        /// <summary>
        /// 打开设备
        /// </summary>
        /// <returns></returns>
        public bool Open()
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.Open();
            }
            return(rt);
        }
Esempio n. 3
0
        /// <summary>
        /// 选择相机
        /// </summary>
        /// <param name="camSN">相机序列号</param>
        /// <returns></returns>
        public bool GetCameraBySN(string camSN)
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.GetCameraBySN(camSN);
            }
            return(rt);
        }
Esempio n. 4
0
        /// <summary>
        /// 选择相机
        /// </summary>
        /// <param name="camNmae">相机名称</param>
        /// <returns></returns>
        public bool GetCameraByName(string camNmae)
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.GetCameraByName(camNmae);
            }
            return(rt);
        }
Esempio n. 5
0
        public bool SetAcquisitionMode(ProCommon.Communal.AcquisitionMode acqmode, uint frameNum)
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.SetAcquisitionMode(acqmode, frameNum);
            }
            return(rt);
        }
Esempio n. 6
0
        /// <summary>
        /// 软件触发
        /// </summary>
        /// <returns></returns>
        public bool SoftTriggerOnce()
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.SoftTriggerOnce();
            }
            return(rt);
        }
Esempio n. 7
0
        /// <summary>
        /// 枚举在线相机
        /// </summary>
        /// <returns></returns>
        public bool EnumerateCameraList()
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.EnumerateCameraList();
            }
            return(rt);
        }
Esempio n. 8
0
        /// <summary>
        /// 注册相机异常委托
        /// </summary>
        /// <returns></returns>
        public bool RegisterExceptionCallBack()
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.RegisterExceptionCallBack();
            }
            return(rt);
        }
Esempio n. 9
0
        public bool GetCameraConnectedState(out bool isConnected)
        {
            bool rt = false; isConnected = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.GetCameraConnectedState(out isConnected);
            }
            return(rt);
        }
Esempio n. 10
0
        /// <summary>
        /// 显示相机参数设置窗口
        /// </summary>
        /// <returns></returns>
        public bool ShowCameraSetPage()
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.ShowCameraSetPage();
            }
            return(rt);
        }
Esempio n. 11
0
        public bool SetDebouncerTime(int lineIdx, float debouncertime)
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.SetDebouncerTime(lineIdx, debouncertime);
            }
            return(rt);
        }
Esempio n. 12
0
        /// <summary>
        /// 创建相机参数设置窗口
        /// </summary>
        /// <param name="windowHandle"></param>
        /// <param name="promption"></param>
        /// <returns></returns>
        public bool CreateCameraSetPage(System.IntPtr windowHandle, string promption)
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.CreateCameraSetPage(windowHandle, promption);
            }
            return(rt);
        }
Esempio n. 13
0
        /// <summary>
        /// 设置帧率
        /// </summary>
        /// <param name="fps"></param>
        /// <returns></returns>
        public bool SetFrameRate(float fps)
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.SetFrameRate(fps);
            }
            return(rt);
        }
Esempio n. 14
0
        /// <summary>
        /// 设置触发延迟时间
        /// </summary>
        /// <param name="lineIdx">外触发端口号</param>
        /// <param name="trigdelay"></param>
        /// <returns></returns>
        public bool SetTriggerDelay(int lineIdx, float trigdelay)
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.SetTriggerDelay(lineIdx, trigdelay);
            }
            return(rt);
        }
Esempio n. 15
0
        /// <summary>
        /// 设置曝光时间
        /// </summary>
        /// <param name="exposuretime"></param>
        /// <returns></returns>
        public bool SetExposureTime(float exposuretime)
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.SetExposureTime(exposuretime);
            }
            return(rt);
        }
Esempio n. 16
0
        /// <summary>
        /// 设置Bayer格式Gamma
        /// </summary>
        /// <param name="gamma"></param>
        /// <returns></returns>

        public bool SetGamma(float gamma)
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.SetGamma(gamma);
            }
            return(rt);
        }
Esempio n. 17
0
        /// <summary>
        /// 选择相机
        /// </summary>
        /// <param name="indx">相机索引</param>
        /// <returns></returns>
        public bool GetCameraByIdx(int indx)
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.GetCameraByIdx(indx);
            }
            return(rt);
        }
Esempio n. 18
0
        /// <summary>
        /// 停止采集
        /// </summary>
        /// <returns></returns>
        public bool StopGrab()
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.StopGrab();
            }
            return(rt);
        }
Esempio n. 19
0
        /// <summary>
        /// 方法:设置触发边沿信号模式
        /// </summary>
        /// <param name="edgemode">边缘模式</param>
        /// <returns></returns>
        public bool SetTriggerActivation(ProCommon.Communal.EffectiveSignal edgemode)
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.SetTriggerActivation(edgemode);
            }
            return(rt);
        }
Esempio n. 20
0
        /// <summary>
        /// 方法:获取相机输入端口状态
        /// </summary>
        /// <param name="lineIdx">输入端口号</param>
        /// <param name="onOff">输入端口状态</param>
        /// <returns></returns>
        public bool GetInPut(int lineIdx, out bool onOff)
        {
            bool rt = false; onOff = false;

            if (ICameraDriverable != null)
            {
                rt = ICameraDriverable.GetInPut(lineIdx, out onOff);
            }
            return(rt);
        }
Esempio n. 21
0
        /// <summary>
        /// 注册相机采集到图像委托
        /// </summary>
        /// <returns></returns>
        public bool RegisterImageGrabbedCallBack()
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                ICameraDriverable.CameraImageGrabbedEvt += new ProDriver.Driver.CameraImageGrabbedDel(OnCameraImageGrabbed);
                rt = ICameraDriverable.RegisterImageGrabbedCallBack();
            }
            return(rt);
        }
Esempio n. 22
0
        /// <summary>
        /// 方法:设置相机输出信号
        /// </summary>
        /// <param name="idx">输入端口号</param>
        /// <param name="triglogic">触发信号逻辑</param>
        /// <param name="delaytime">边沿信号时的延时,单位毫秒</param>
        /// <returns></returns>
        public bool SetOutPut(int idx, ProCommon.Communal.EffectiveSignal triglogic, int delaytime)
        {
            bool rt = false;

            if (ICameraDriverable != null)
            {
                switch (triglogic)
                {
                case ProCommon.Communal.EffectiveSignal.FallEdge:
                    rt = ICameraDriverable.SetOutPut(idx, true);
                    if (rt)
                    {
                        System.Threading.Thread.Sleep(delaytime);
                        rt = ICameraDriverable.SetOutPut(idx, false);
                    }
                    break;

                case ProCommon.Communal.EffectiveSignal.LogicFalse:
                    rt = ICameraDriverable.SetOutPut(idx, false);
                    break;

                case ProCommon.Communal.EffectiveSignal.LogicTrue:
                    rt = ICameraDriverable.SetOutPut(idx, true);
                    break;

                case ProCommon.Communal.EffectiveSignal.RaiseEdge:
                    rt = ICameraDriverable.SetOutPut(idx, false);
                    if (rt)
                    {
                        System.Threading.Thread.Sleep(delaytime);
                        rt = ICameraDriverable.SetOutPut(idx, true);
                    }
                    break;

                default: break;
                }
            }
            return(rt);
        }