使用Flir A310红外热成像仪做环境监控

使用Flir A310红外热成像仪做环境监控

使用厂家提供的C# SDK开发基于Flir A310的环境监控软件
显示效果

实时显示温度的代码段:

		// 温度监控
		private void timerIr1_Tick(object sender, EventArgs e)
        {
            if (!IsConnected(camera))
                return;

            try
            {
                if (camera.Image != null)
                {
                    camera.Image.EnterLock();

                    if (m_compareIr1)
                    {
                        ThresholdInfo irThre = thresholdSetForm.dictThreshold["IR1"];
                        int res = CompareTemp(ref camera, irThre);
                        if (!camera.IsWarning)
                        {
                            if (1 == res) // 1级告警
                            {
                                string str = string.Format("1级告警:[红外1_{0}] 温度超过{1:F01}!", camera.Ip, irThre.max1);
                                addWarnLog(str);
                                camera.ShowWarn();
                                camera.IsWarning = true;
                            }
                            else if (2 == res) // 2级告警
                            {
                                string str = string.Format("2级告警:[红外1_{0}] 温度超过{1:F01}!", camera.Ip, irThre.max2);
                                addWarnLog(str);
                                camera.ShowWarn();
                                camera.IsWarning = true;
                            }
                        }
                        else 若处于报警状态,CompareTemp判断正常,则将报警状态变回正常
                        {
                            if (0 == res)
                                camera.IsWarning = false;
                        }
                    }

                    camera.ClearAllMeasurments();
                    camera.ShowWarnRect();
                    this.pictureBoxIr1.Image = camera.GetMeasurementsImage();
                }
            }
            catch (Exception ex)
            {
                string msg = ex.Message;
            }
            finally
            {
                if (camera.Image != null)
                {
                    camera.Image.ExitLock();
                }
            }
        }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值