海康VisionMaster绘制图形到显示窗口

颜色枚举

 /// <summary>
    /// 颜色枚举
    /// </summary>
    public enum ColorConstants
    {
        Red = 16711680,
        Green = 65280,
        Blue = 255,
    }

绘制圆

    public class CircleGraphic : VMControls.RenderInterface.ICircle
    {
        /// <summary>
        /// 圆心坐标
        /// </summary>
        public float CenterX{ get; set; }
        /// <summary>
        /// 圆心坐标
        /// </summary>
        public float CenterY{ get; set; }
        /// <summary>
        /// 内部圆环半径
        /// </summary>
        public float MinorRadius{ get; set; }
     
        private float _MajorRadius;
        /// <summary>
        /// 外部圆环半径
        /// </summary>
        public float MajorRadius
        {
            get { return _MajorRadius; }
            set { _MajorRadius = value;
                MinorRadius = _MajorRadius - 2;
            }
        }

        /// <summary>
        /// 圆的透明度
        /// </summary>
        public float Opacity{ get; set; }
        /// <summary>
        /// 系统提供的颜色设置
        /// </summary>
        public int Color{ get; set; }
        /// <summary>
        /// 系统提供的颜色设置
        /// </summary>
        public int FillColor{ get; set; }
        /// <summary>
        /// 显示细条粗细
        /// </summary>
        public float StrokeThickness{ get; set; }
        /// <summary>
        /// 颜色枚举
        /// </summary>
        public ColorConstants ColorConstants
        {
            set
            {
                Color = (int)value;
                FillColor = Color;
            }
        }

        public CircleGraphic()
        {
            this.ColorConstants = ColorConstants.Green;
            this.FillColor = this.Color;
            this.Opacity = 1;
            this.StrokeThickness = 10;
        }
    }

绘制文本

    /// <summary>
    /// 标签文本显示
    /// </summary>
    public class LableGraphic : VMControls.RenderInterface.IText,IDisposable
    {
        #region Public-Members
        /// <summary>
        /// 文本内容
        /// </summary>
        public string Content { get; set; }
        /// <summary>
        /// 显示位置
        /// </summary>
        public float PositionX { get; set; }
        /// <summary>
        /// 显示位置
        /// </summary>
        public float PositionY { get; set; }
        /// <summary>
        /// 显示文本框宽度
        /// </summary>
        public float Width { get; set; }
        /// <summary>
        /// 显示文本框高度
        /// </summary>
        public float Height { get; set; }
        /// <summary>
        /// 显示文本大小
        /// </summary>
        public int FontSize { get; set; }
        /// <summary>
        /// 显示文本透明度 , 0 不透明
        /// </summary>
        public float Opacity { get; set; }
        /// <summary>
        /// 显示文本颜色,取代系统的Color属性用
        /// </summary>
        public ColorConstants ColorConstants
        {
            set
            {
                Color = (int)value;
                FillColor = Color;
            }
        }
        /// <summary>
        /// 显示文本颜色,默认等于Color数值
        /// </summary>
        public int FillColor { get; set; }
        /// <summary>
        /// 显示文本粗细
        /// </summary>
        public float StrokeThickness { get; set; }
        /// <summary>
        /// 系统提供的颜色.Int 类型
        /// </summary>
        public int Color { get; set; }
        #endregion

        #region Private-Members
        #endregion

        #region Constructors-and-Factories
        public LableGraphic()
        {
            FontSize = 35;
            PositionX = 200;
            PositionY = 200;
            ColorConstants = ColorConstants.Green;
        }

        public void Dispose()
        {
           
        }

        #endregion

        #region Public-Methods


        #endregion

        #region Private-Methods


        #endregion
    }

绘制点

    /// <summary>
    /// 点类型图形
    /// </summary>
    public class PointGraphic : VMControls.RenderInterface.IPoint
    {
        /// <summary>
        /// 点位置坐标
        /// </summary>
        public float CenterX{ get; set; }
        /// <summary>
        /// 点位置坐标
        /// </summary>
        public float CenterY{ get; set; }
        /// <summary>
        /// 点透明度
        /// </summary>
        public float Opacity{ get; set; }
        /// <summary>
        /// 点颜色设置, 系统属性
        /// </summary>
        public int Color{ get; set; }
        /// <summary>
        /// 点颜色设置
        /// </summary>
        public int FillColor{ get; set; }
        /// <summary>
        /// 点显示的粗细
        /// </summary>
        public float StrokeThickness{ get; set; }
        /// <summary>
        /// 颜色枚举
        /// </summary>
        public ColorConstants colorConstants
        {
            set
            {
                Color = (int)value;
                FillColor = Color;
            }
        }

        public PointGraphic()
        {
            colorConstants = ColorConstants.Green;
            FillColor = Color;
            StrokeThickness = 10;
            Opacity = 1;
        }
    }

绘制线段

    /// <summary>
    /// 线段图形
    /// </summary>
    public class LineGraphic : VMControls.RenderInterface.ILine
    {
        /// <summary>
        /// 线段起始点
        /// </summary>
        public float StartPointX{ get; set; }
        /// <summary>
        /// 线段起始点
        /// </summary>
        public float StartPointY{ get; set; }
        /// <summary>
        /// 线段结束点
        /// </summary>
        public float EndPointX{ get; set; }
        /// <summary>
        /// 线段结束点
        /// </summary>
        public float EndPointY{ get; set; }
        /// <summary>
        /// 线段透明度
        /// </summary>
        public float Opacity{ get; set; }
        /// <summary>
        /// 线段颜色设置
        /// </summary>
        public int Color{ get; set; }
        /// <summary>
        /// 线段颜色设置
        /// </summary>
        public int FillColor{ get; set; }
        /// <summary>
        /// 线段粗细
        /// </summary>
        public float StrokeThickness{ get; set; }
        /// <summary>
        /// 线段颜色设置
        /// </summary>
        public ColorConstants colorConstants
        {
            set
            {
                Color = (int)value;
                FillColor = Color;
            }
        }

        public LineGraphic()
        {
            colorConstants = ColorConstants.Green;
            StrokeThickness = 10;
            Opacity = 1;

        }
    }
  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 要安装海康Vision Master的GigE驱动,您可以按照以下步骤进行操作: 首先,确保您已经获得了适用于海康Vision Master的GigE驱动程序。您可以从官方网站或其他可靠来源下载最新的驱动程序。 接下来,双击驱动程序安装文件,开始安装过程。通常情况下,将会出现一个安装向导,您只需要按照提示进行操作即可。 在安装过程中,可能需要您同意许可协议并选择安装位置。请根据您的个人需求选择适当的选项。 完成安装后,您需要将您的GigE设备连接到计算机。确保设备正常连接并电源供应正常。 然后,打开海康Vision Master软件。在软件界面上选择“设备配置”或类似选项,进入设备配置界面。 在设备配置界面上,您将看到可以添加设备的选项。选择添加设备,然后选择GigE设备类型。 在添加设备时,系统可能会自动搜索可用的设备。如果没有自动检测到设备,则可能需要手动输入设备的IP地址或其他必要信息。 完成设备添加后,您应该能够看到您的GigE设备在海康Vision Master软件中显示,并且可以正常操作和配置。 总结起来,安装海康Vision Master的GigE驱动涉及下载并安装适当的驱动程序,连接GigE设备,然后在软件中添加和配置设备。记得遵循安装向导的提示,并确保设备连接稳定。 ### 回答2: 要安装海康Vision Master摄像头的GigE驱动,首先要确保计算机已经安装了适当的操作系统,并且满足驱动程序的最低系统要求。在安装驱动程序之前,需要确保计算机上没有其他GigE网卡驱动程序或软件与之冲突。 接下来,可以从海康官方网站上下载最新版本的GigE驱动程序。下载完成后,双击安装程序进行安装。 安装过程中可能需要选择安装目录和设置相关选项,按照提示进行操作即可。安装完成后,需要重启计算机以完成驱动程序的安装。 安装完成后,可以将海康Vision Master摄像头连接到计算机的GigE网卡上,并确保摄像头的供电正常。然后,打开Vision Master软件,在设备管理器中搜索并添加相机设备。 如果驱动程序安装成功,相机设备应该能够被检测到并且可以正常使用。可以通过Vision Master软件进行相机参数的设置和图像的采集等操作。 总之,安装海康Vision Master摄像头的GigE驱动需要下载驱动程序,进行安装并重启计算机。安装完成后,可以通过Vision Master软件管理和使用相机设备。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值