CN109118702B - Fire detection method, device and equipment - Google Patents

Fire detection method, device and equipment Download PDF

Info

Publication number
CN109118702B
CN109118702B CN201811151379.0A CN201811151379A CN109118702B CN 109118702 B CN109118702 B CN 109118702B CN 201811151379 A CN201811151379 A CN 201811151379A CN 109118702 B CN109118702 B CN 109118702B
Authority
CN
China
Prior art keywords
image
depth
infrared
block
comparison result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811151379.0A
Other languages
Chinese (zh)
Other versions
CN109118702A (en
Inventor
宋林东
王倩
吕思豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Optical Technology Co Ltd
Original Assignee
Goertek Optical Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Optical Technology Co Ltd filed Critical Goertek Optical Technology Co Ltd
Priority to CN201811151379.0A priority Critical patent/CN109118702B/en
Publication of CN109118702A publication Critical patent/CN109118702A/en
Application granted granted Critical
Publication of CN109118702B publication Critical patent/CN109118702B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B17/00Fire alarms; Alarms responsive to explosion
    • G08B17/12Actuation by presence of radiation or particles, e.g. of infrared radiation or of ions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • G06V20/13Satellite images
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B17/00Fire alarms; Alarms responsive to explosion
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B17/00Fire alarms; Alarms responsive to explosion
    • G08B17/12Actuation by presence of radiation or particles, e.g. of infrared radiation or of ions
    • G08B17/125Actuation by presence of radiation or particles, e.g. of infrared radiation or of ions by using a video camera to detect fire or smoke

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Emergency Management (AREA)
  • Multimedia (AREA)
  • Astronomy & Astrophysics (AREA)
  • Remote Sensing (AREA)
  • Theoretical Computer Science (AREA)
  • Fire-Detection Mechanisms (AREA)

Abstract

本发明实施例提供一种火灾检测方法、装置和设备,该方法包括:通过TOF深度模组获取深度图像和红外图像;对比所述深度图像与预设参考深度图像,获得第一对比结果;对比所述红外图像与预设参考红外图像,获得第二对比结果;根据所述第二对比结果与多个连续所述第一对比结果,确定是否存在火灾。通过将深度图像对应的深度灰度差值和红外图像对应的红外灰度差值进行对比,最终确定是否发生火灾,并进一步地可以基于图像确定发生火灾的位置,能够快速准确的确定是否发生火灾,并能够为工作人员提供发生火灾的准确位置信息和对应的图像信息。

Figure 201811151379

Embodiments of the present invention provide a fire detection method, device, and device. The method includes: obtaining a depth image and an infrared image through a TOF depth module; comparing the depth image with a preset reference depth image to obtain a first comparison result; comparing A second comparison result is obtained between the infrared image and the preset reference infrared image; whether there is a fire is determined according to the second comparison result and a plurality of consecutive first comparison results. By comparing the depth grayscale difference corresponding to the depth image with the infrared grayscale difference corresponding to the infrared image, it is finally determined whether a fire has occurred, and further, the location of the fire can be determined based on the image, and whether a fire has occurred can be quickly and accurately determined. , and can provide the accurate location information and corresponding image information of the fire for the staff.

Figure 201811151379

Description

火灾检测方法、装置和设备Fire detection method, device and equipment

技术领域technical field

本发明涉及图像处理技术领域,尤其涉及一种火灾检测方法、装置和设备。The present invention relates to the technical field of image processing, and in particular, to a fire detection method, device and equipment.

背景技术Background technique

目前,火灾监控检测设备被布置在各种公共场所,比如,学校、商场等。以便在火灾发生时,能够在最短时间内发现火情并及时报警。At present, fire monitoring and detection equipment is arranged in various public places, such as schools, shopping malls, etc. In order to find out the fire in the shortest time and call the police in time when a fire occurs.

在现有技术中,通常采用烟感器报警,该报警装置设备成本比较低,也是目前公共场所应用最为广泛的一种报警装置。但是,有的火灾可能是大火直接燃烧,当烟感器检测到烟雾时,可能火势已经发展到很严重的程度了,不能及时发现火情。现有的红外火灾报警器,由于室内温度和光线的变化,容易对检测结果产生干扰,容易发生误判,从而导致无法及时发现火情。In the prior art, a smoke detector is usually used for alarming, and the equipment cost of the alarming device is relatively low, and it is also the most widely used alarming device in public places at present. However, some fires may be directly burned by the fire. When the smoke detector detects smoke, the fire may have developed to a very serious level, and the fire cannot be detected in time. Existing infrared fire alarms, due to changes in indoor temperature and light, are prone to interfere with the detection results, and are prone to misjudgment, resulting in failure to detect fire in time.

基于此,需要一种能够及时、准确、简单的进行火灾检测的方案。Based on this, there is a need for a timely, accurate and simple solution for fire detection.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明实施例提供一种火灾检测方法、装置和设备,用以提高对室内火灾检测的实时性和准确性。In view of this, embodiments of the present invention provide a fire detection method, device, and device, so as to improve the real-time performance and accuracy of indoor fire detection.

第一方面,本发明实施例提供一种火灾检测方法,包括:In a first aspect, an embodiment of the present invention provides a fire detection method, including:

通过TOF深度模组获取深度图像和红外图像;Obtain depth image and infrared image through TOF depth module;

对比所述深度图像与预设参考深度图像,获得第一对比结果;Comparing the depth image with a preset reference depth image to obtain a first comparison result;

对比所述红外图像与预设参考红外图像,获得第二对比结果;Comparing the infrared image with the preset reference infrared image to obtain a second comparison result;

根据所述第二对比结果与多个连续所述第一对比结果,确定是否存在火灾。Whether there is a fire is determined according to the second comparison result and a plurality of consecutive first comparison results.

第二方面,本发明实施例提供一种火灾检测装置,包括:In a second aspect, an embodiment of the present invention provides a fire detection device, including:

获取模块,用于通过TOF深度模组深度图像和红外图像;The acquisition module is used to pass the depth image and infrared image of the TOF depth module;

第一对比模块,用于对比所述深度图像与预设参考深度图像,获得第一对比结果;a first comparison module, configured to compare the depth image with a preset reference depth image to obtain a first comparison result;

第二对比模块,用于对比所述红外图像与预设参考红外图像,获得第二对比结果;a second comparison module, configured to compare the infrared image with the preset reference infrared image to obtain a second comparison result;

确定模块,用于根据所述第二对比结果与多个连续所述第一对比结果,确定是否存在火灾。A determination module, configured to determine whether there is a fire according to the second comparison result and a plurality of consecutive first comparison results.

第三方面,本发明实施例提供一种电子设备,包括:存储器、处理器;其中,In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory and a processor; wherein,

所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行时实现如第一方面所述的火灾检测方法。The memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the fire detection method according to the first aspect.

本发明实施例提供的火灾检测方法,通过TOF深度模块同时获取深度图像和红外图像。将实施获取的深度图像和红外图像,分别与此前获取的参考深度图像和参考红外图像进行灰度值的对比。若深度图像对比结果与红外图像对比结果都为可能发生火灾,则认为发生了火灾。需要说明的是,在进行灰度值对比时,往往需要将图像进行分割为多个分块,并基于分块中的平均灰度值进行对比。在确认发生火灾后,及时通知工作人员。通过将深度图像对应的深度灰度差值和红外图像对应的红外灰度差值进行对比,最终确定是否发生火灾,并进一步地可以基于图像确定发生火灾的位置,能够快速准确的确定是否发生火灾,并能够为工作人员提供发生火灾的准确位置信息和对应的图像信息。In the fire detection method provided by the embodiment of the present invention, a depth image and an infrared image are simultaneously acquired through a TOF depth module. The acquired depth image and infrared image will be compared with the previously acquired reference depth image and reference infrared image respectively for gray value comparison. If the comparison result of the depth image and the comparison result of the infrared image are both possible fire, it is considered that a fire has occurred. It should be noted that, when performing gray value comparison, it is often necessary to divide an image into a plurality of sub-blocks, and perform comparison based on the average gray value in the sub-blocks. After confirming that a fire has occurred, notify the staff in time. By comparing the depth grayscale difference corresponding to the depth image with the infrared grayscale difference corresponding to the infrared image, it is finally determined whether a fire has occurred, and further, the location of the fire can be determined based on the image, and whether a fire has occurred can be quickly and accurately determined. , and can provide the accurate location information and corresponding image information of the fire for the staff.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.

图1为本发明实施例提供的火灾检测方法的流程图;1 is a flowchart of a fire detection method provided by an embodiment of the present invention;

图2为本发明实施例提供的图像划分的示意图;2 is a schematic diagram of image division provided by an embodiment of the present invention;

图3为本发明实施例提供的火灾检测装置与空间位置关系的示意图;3 is a schematic diagram of the relationship between a fire detection device and a spatial position according to an embodiment of the present invention;

图4为本发明实施例提供的火灾检测装置的结构示意图。FIG. 4 is a schematic structural diagram of a fire detection device according to an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义,“多种”一般包含至少两种,但是不排除包含至少一种的情况。The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a," "the," and "the" as used in the embodiments of the present invention and the appended claims are intended to include the plural forms as well, unless the context clearly dictates otherwise, "a plurality" Generally, at least two kinds are included, but the case of including at least one kind is not excluded.

应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the term "and/or" used in this document is only an association relationship to describe the associated objects, indicating that there may be three kinds of relationships, for example, A and/or B, which may indicate that A exists alone, and A and B exist at the same time. B, there are three cases of B alone. In addition, the character "/" in this document generally indicates that the related objects are an "or" relationship.

取决于语境,如在此所使用的词语“如果”、“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。Depending on the context, the words "if", "if" as used herein may be interpreted as "at" or "when" or "in response to determining" or "in response to detecting". Similarly, the phrases "if determined" or "if detected (the stated condition or event)" can be interpreted as "when determined" or "in response to determining" or "when detected (the stated condition or event)," depending on the context )" or "in response to detection (a stated condition or event)".

还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的商品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种商品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的商品或者系统中还存在另外的相同要素。It should also be noted that the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a commodity or system comprising a list of elements includes not only those elements, but also includes not explicitly listed other elements, or elements inherent to the commodity or system. Without further limitation, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the article or system that includes the element.

另外,下述各方法实施例中的步骤时序仅为一种举例,而非严格限定。In addition, the sequence of steps in the following method embodiments is only an example, and is not strictly limited.

图1为本发明实施例提供的火灾检测方法的流程示意图,进行室内火灾检测的主要步骤包括:1 is a schematic flowchart of a fire detection method provided by an embodiment of the present invention, and the main steps of indoor fire detection include:

101:通过TOF深度模组获取深度图像和红外图像。101: Obtain depth images and infrared images through the TOF depth module.

容易理解,TOF(Time of flight)深度模组发射红外光,拍摄获得同一帧中的深度图像和红外图像。在实际应用中,通过TOF深度模组获取图像时,按照设定的频率连续获取。在进行图像对比时,可以是将连续相邻两帧图像进行对比,也可以将当前图像与此前预存的参考图像进行对比。It is easy to understand that the TOF (Time of flight) depth module emits infrared light, and captures the depth image and infrared image in the same frame. In practical applications, when acquiring images through the TOF depth module, the images are acquired continuously according to the set frequency. When performing image comparison, two consecutive adjacent frames of images may be compared, or the current image may be compared with a previously pre-stored reference image.

102:对比所述深度图像与预设参考深度图像,获得第一对比结果。102: Compare the depth image with a preset reference depth image to obtain a first comparison result.

这里所说的预设参考深度图像,是指当前获取的深度信息图像的上一帧深度图像。在进行对比时,需要根据实时采集到的多张当前图像分别与前一帧的预设参考图像进行对比。The preset reference depth image mentioned here refers to the depth image of the previous frame of the currently acquired depth information image. During the comparison, it is necessary to compare the multiple current images collected in real time with the preset reference images of the previous frame respectively.

具体来说,将实时获取到的深度图像与预设参考深度图像进行灰度值的对比。计算当前深度图像与其前一帧深度图像(即预设参考深度图像)的差值,求其平方和,作为其差异值,计算连续多帧的差异值的和。Specifically, the gray value of the depth image obtained in real time is compared with the preset reference depth image. Calculate the difference between the current depth image and the depth image of the previous frame (that is, the preset reference depth image), calculate the sum of the squares, and use it as the difference value, and calculate the sum of the difference values of consecutive frames.

若是存在连续多幅深度图像的深度信息值与预设参考深度图像(各自前一帧深度图像)灰度值相比存在大幅度跳动现象(即,灰度差值超过第一预设阈值),则可判定该位置的深度信息值上下变化较大,呈现不稳定状态,则连续多帧深度图像的差异值的和较大,超过设定的深度差异阈值,则认为可能发生火灾,反之,若是则认为未检测到发生火灾。If there is a large jump phenomenon (that is, the grayscale difference exceeds the first preset threshold) compared with the grayscale value of the preset reference depth image (respectively the previous frame depth image), the depth information value of a plurality of consecutive depth images Then it can be determined that the depth information value of the position has a large change up and down, showing an unstable state, then the sum of the difference values of consecutive multi-frame depth images is large, and exceeds the set depth difference threshold, it is considered that a fire may occur, otherwise, if A fire is considered undetected.

103:对比所述红外图像与预设参考红外图像,获得第二对比结果。103: Compare the infrared image with the preset reference infrared image to obtain a second comparison result.

这里所说的预设参考红外图像,是在火灾检测设备(包含红外图像采集模组和红外图像采集模组)安装在指定位置之后,通过TOF模组获取未发生火灾状况下的图像,作为预设参考红外图像。为了使得获得的预设参考红外图像具有更好的参考作用,通常会采集多张参考红外图像,并对多张图像的像素值进行均值化处理。The preset reference infrared image mentioned here is to obtain the image under the condition of no fire through the TOF module after the fire detection equipment (including the infrared image acquisition module and the infrared image acquisition module) is installed in the designated position, as a pre- Set the reference infrared image. In order to make the obtained preset reference infrared images have a better reference function, usually multiple reference infrared images are collected, and pixel values of the multiple images are averaged.

具体来说,假设通过红外图像模组获取的红外图像解像力为1280*720,假设获取参考红外图像m张;进一步地,根据这m张图像,依次计算各个像素点对应的灰度值。以计算其中一个像素点的灰度值为例,假设计算(0,0)点的灰度值,利用公式Average=1/m*∑vali(val:像素值;i=1,2…n)。获得各个像素点的灰度值后,可以得到预设参考红外图像。Specifically, it is assumed that the resolution of the infrared image obtained by the infrared image module is 1280*720, and m reference infrared images are assumed to be obtained; further, according to the m images, the gray value corresponding to each pixel is sequentially calculated. Taking the calculation of the gray value of one of the pixel points as an example, assuming that the gray value of the (0,0) point is calculated, use the formula Average=1/m*∑vali(val: pixel value; i=1,2...n) . After obtaining the gray value of each pixel point, a preset reference infrared image can be obtained.

进一步地,将实时获取到的红外图像与预设参考红外图像进行灰度值的对比。容易理解,这里所说的第一对比结果存在两种情况,分别是红外图像灰度值超过参考红外图像灰度值,换言之,检测到可能发生火灾;另一种是红外图像灰度值未超过参考红外图像灰度值,换言之,未检测到发生火灾。Further, the gray value of the infrared image obtained in real time is compared with the preset reference infrared image. It is easy to understand that there are two situations in the first comparison result mentioned here, one is that the gray value of the infrared image exceeds the gray value of the reference infrared image, in other words, a fire may be detected; the other is that the gray value of the infrared image does not exceed the gray value of the reference infrared image. With reference to the infrared image gray value, in other words, no fire is detected.

104:根据所述第二对比结果与多个连续所述第一对比结果,确定是否存在火灾。104: Determine whether there is a fire according to the second comparison result and a plurality of consecutive first comparison results.

为了能够更加精准的判断是否发生或者,需要进一步判断第一对比结果与第二对比结果是否一致。进一步地,在基于第一对比结果进行判断是,需要获取多个连续的第一对比结果,若存在多个连续的第一对比结果都是超过第一预设阈值则标记为疑似发生火灾,若存在多个连续的第一对比结果都未超过第一预设阈值,则不进行疑似火灾标记。In order to be able to more accurately determine whether or not it occurs, it is necessary to further determine whether the first comparison result is consistent with the second comparison result. Further, when judging based on the first comparison result, it is necessary to obtain multiple consecutive first comparison results. If there are multiple consecutive first comparison results that all exceed the first preset threshold, it is marked as a suspected fire. If there are multiple consecutive first comparison results that do not exceed the first preset threshold, no suspected fire marking is performed.

例如,当第一对比结果为深度图像深度信息(灰度值)发生较大浮动的数值变化时(换言之,第一对比结果查过第一预设阈值),表示第一对比结果为疑似发生火灾,若深度图像的灰度值稳定,与参考深度图像灰度值相近,则表示第一对比结果未发生火灾;当第二对比结果为红外图像对应的灰度值超过预设参考红外图像对应的灰度值时,表示第二对比结果为疑似发生火灾,若小于则表示第二对比结果未发生火灾。For example, when the first comparison result is that the depth information (gray value) of the depth image has a large fluctuation in numerical value (in other words, the first comparison result has checked the first preset threshold), it means that the first comparison result is that a fire is suspected to have occurred , if the gray value of the depth image is stable and similar to the gray value of the reference depth image, it means that there is no fire in the first comparison result; when the second comparison result is that the gray value corresponding to the infrared image exceeds the value corresponding to the preset reference infrared image When the grayscale value is set, it means that the second comparison result is suspected of fire, and if it is less than the second comparison result, it means that no fire has occurred in the second comparison result.

进一步地,只有第一对比结果为疑似发生火灾、第二对比结果也为疑似发生火灾的情况下,最终输出结果为确定发生火灾。这样可以有效提高针对火灾检测的准确性。Further, only when the first comparison result is a suspected fire occurrence and the second comparison result is also a suspected fire occurrence, the final output result is that a fire is determined to have occurred. This can effectively improve the accuracy of fire detection.

在本发明的一个或者多个实施例中,所述获取深度图像和红外图像,具体可以包括:基于所述TOF深度模组实时获取深度图像和红外图像;其中,所述深度图像和所述红外图像是在同一帧获取。In one or more embodiments of the present invention, the acquiring a depth image and an infrared image may specifically include: acquiring a depth image and an infrared image in real time based on the TOF depth module; wherein, the depth image and the infrared image Images are acquired at the same frame.

为了确保对比结果的可靠性,在检测过程中,实时获取的图像的频率可以是1秒钟获取一次,也可以根据时段的不同,调整采集图像的频率;比如,白天人员都在的情况下,采集频率可以是一分钟一次,若晚上人员下班,可以调整采集频率为一秒钟一次。In order to ensure the reliability of the comparison results, during the detection process, the frequency of real-time acquisition of images can be acquired once per second, or the frequency of acquired images can be adjusted according to different time periods; for example, when people are present during the day, The collection frequency can be once a minute. If the staff is off work at night, the collection frequency can be adjusted to once a second.

在本发明的一个或者多个实施例中,所述对比所述深度图像与预设参考深度图像,获得第一对比结果,具体可以包括:划分所述深度图像,获得第一深度分块图像;标记所述第一深度分块图像中各深度分块索引号;划分所述预设参考深度图像,获得第一参考深度分块图像;标记所述第一参考深度分块图像中各深度分块索引号;根据所述深度分块索引号,对比所述第一深度分块图像与所述第一参考深度分块图像中的所述分块;获得第一对比结果。In one or more embodiments of the present invention, the comparing the depth image with a preset reference depth image to obtain a first comparison result may specifically include: dividing the depth image to obtain a first depth block image; marking each depth block index number in the first depth block image; dividing the preset reference depth image to obtain a first reference depth block image; marking each depth block in the first reference depth block image index number; according to the depth segment index number, compare the blocks in the first depth segment image and the first reference depth segment image; and obtain a first comparison result.

需要说明的是,在将深度图像与预设参考深度图像进行对比时,可以是一对一的对比,例如,将当前获取的深度图像与前一帧深度图像(预设参考深度图像)进行一对一对比;也可以的多帧深度图像与预设参考深度图像进行对比。It should be noted that when comparing the depth image with the preset reference depth image, it can be a one-to-one comparison. One-to-one comparison; it is also possible to compare multiple frames of depth images with preset reference depth images.

具体来说,例如,如图2所示,假设深度图像和预设参考深度图像的解像力为400*300,可以将该两个图像进行划分,划分为4*3共计12块。进一步地,对各个分开进行索引号的标记,比如,按照从左到右,从上到下的顺序,依次标记为1~12。Specifically, for example, as shown in FIG. 2 , assuming that the resolution of the depth image and the preset reference depth image is 400*300, the two images may be divided into 4*3 total 12 blocks. Further, each division is marked with an index number, for example, in the order from left to right and top to bottom, it is marked as 1 to 12 in turn.

在进行对比时,可以将同一索引号所对应的分开图像的灰度值进行对比。例如,将实时获取的深度图像中索引号为8的分块图像与预设参考深度图像中索引号为8的分块图像的灰度值进行对比。需要说明的是,在进行灰度值对比时,可以每个像素点依次进行对比,为了简化,也可以求得各个分块图像的灰度均值,利用均值进行对比。During the comparison, the grayscale values of the separate images corresponding to the same index number can be compared. For example, the gray value of the segmented image with index number 8 in the depth image acquired in real time is compared with the grayscale value of the segmented image with index number 8 in the preset reference depth image. It should be noted that, when comparing the grayscale values, each pixel point can be compared in turn. For simplicity, the grayscale mean value of each segmented image can also be obtained, and the mean value can be used for comparison.

在本发明的一个或者多个实施例中,所述根据所述深度分块索引号,对比所述第一深度分块图像与所述第一参考深度分块图像中的所述分块,具体可以包括:获得所述第一深度分块图像中各所述深度分块索引号对应的分块的第一灰度均值;获得所述第一参考深度分块图像中各所述深度分块索引号对应的分块的第一参考灰度均值;根据所述深度分块索引号,依次比较所述第一灰度均值和对应的所述第一参考灰度均值之间的深度灰度差值。以此原理,计算连续多帧第一深度图像与第一参考深度图像的深度灰度差值。In one or more embodiments of the present invention, according to the depth block index number, comparing the blocks in the first depth block image and the first reference depth block image, specifically It may include: obtaining the first grayscale mean value of the blocks corresponding to each of the depth block index numbers in the first depth block image; obtaining each of the depth block indexes in the first reference depth block image The first reference grayscale mean value of the block corresponding to the number; according to the depth block index number, sequentially compare the depth grayscale difference value between the first grayscale mean value and the corresponding first reference grayscale mean value . Based on this principle, the depth grayscale difference between the first depth image of consecutive multiple frames and the first reference depth image is calculated.

如图2所示,假设将解像力为400*300的图像划分为4*3块图像。每块的解像力为100*100,进一步地,可以利用AVG=1/n∑vali(i=1-10000)。假设,深度图像对应的第一灰度均值为AVG1,其前一帧深度图像(预设参考深度图像)对应第一参考灰度均值为AVG2,接下来用AVG1与AVG2进行做差,得到深度灰度差异值AVG3;进一步地计算连续多帧的深度图像的深度灰度差异值;As shown in Figure 2, it is assumed that an image with a resolution of 400*300 is divided into 4*3 images. The resolution of each block is 100*100, and further, AVG=1/nΣvali (i=1-10000) can be used. Suppose, the first grayscale mean value corresponding to the depth image is AVG1, and the first reference grayscale mean value corresponding to the depth image of the previous frame (preset reference depth image) is AVG2, and then the difference between AVG1 and AVG2 is used to obtain the depth grayscale degree difference value AVG3; further calculate the depth gray difference value of the depth images of consecutive multiple frames;

在本发明的一个或者多个实施例中,所述获得第一对比结果,具体可以包括:根据第一预设阈值,与所述深度灰度差异值和进行对比;若所述深度灰度差异值和大于所述第一预设阈值,则获取对应的所述深度分块索引号,获得第一对比结果。In one or more embodiments of the present invention, the obtaining the first comparison result may specifically include: comparing with the sum of the depth grayscale difference values according to a first preset threshold; if the depth grayscale difference If the sum of the values is greater than the first preset threshold, the corresponding index number of the depth block is obtained, and the first comparison result is obtained.

假设第一预设阈值为AVG4,在获得深度灰度差值AVG3之后,将AVG4与AVG3进行对比。假设,当多个连续的AVG3大于AVG4时,认为发生疑似火灾,则进一步地,需要获取对应的深度分开的索引号,第一对比结果与索引号是相对应的。Assuming that the first preset threshold is AVG4, after obtaining the depth grayscale difference value AVG3, AVG4 is compared with AVG3. Assuming that when a plurality of consecutive AVG3 is greater than AVG4, it is considered that a suspected fire has occurred, and further, it is necessary to obtain the corresponding index numbers separated by depth, and the first comparison result corresponds to the index numbers.

在本发明的一个或者多个实施例中,所述对比所述红外图像与预设参考红外图像,获得第二对比结果,具体可以包括:划分所述红外图像,获得第一红外分块图像;标记所述第一红外分块图像中各红外分块索引号;划分所述预设参考红外图像,获得第一参考红外分块图像;标记所述第一参考红外分块图像中各红外分块索引号;根据所述红外分块索引号,对比所述第一红外分块图像与所述第一参考红外分块图像中的所述分块;获得第二对比结果。In one or more embodiments of the present invention, the comparing the infrared image with a preset reference infrared image to obtain a second comparison result may specifically include: dividing the infrared image to obtain a first infrared segmented image; Marking the index numbers of each infrared block in the first infrared block image; dividing the preset reference infrared image to obtain a first reference infrared block image; marking each infrared block in the first reference infrared block image index number; according to the infrared segment index number, compare the segments in the first infrared segment image and the first reference infrared segment image; and obtain a second comparison result.

例如,假设红外图像和预设参考红外图像的解像力为400*300,可以将该两个图像进行划分,划分为4*3共计12块。进一步地,对各个分开进行索引号的标记,比如,按照从左到右,从上到下的顺序,依次标记为1~12。For example, assuming that the resolution of the infrared image and the preset reference infrared image is 400*300, the two images can be divided into 4*3 and a total of 12 blocks. Further, each division is marked with an index number, for example, in the order from left to right and top to bottom, it is marked as 1 to 12 in turn.

在进行对比时,可以将同一索引号所对应的分开图像的灰度值进行对比。例如,将实时获取的红外图像中索引号为10的分块图像与预设参考红外图像中索引号为10的分块图像的灰度值进行对比。需要说明的是,在进行灰度值对比时,可以每个像素点依次进行对比,为了简化,也可以求得各个分块图像的灰度均值,利用均值进行对比。During the comparison, the grayscale values of the separate images corresponding to the same index number can be compared. For example, the gray value of the segmented image with index number 10 in the infrared image acquired in real time is compared with the grayscale value of the segmented image with index number 10 in the preset reference infrared image. It should be noted that, when comparing the grayscale values, each pixel point can be compared in turn. For simplicity, the grayscale mean value of each segmented image can also be obtained, and the mean value can be used for comparison.

在本发明的一个或者多个实施例中,所述根据所述红外分块索引号,对比所述第一红外分块图像与所述第一参考红外分块图像中的所述分块,具体可以包括:获得所述第一红外分块图像中各所述红外分块索引号对应的分块的第一红外灰度均值;获得所述第一参考红外分块图像中各所述红外分块索引号对应的分块的第一参考红外灰度均值;根据所述红外分块索引号,依次比较所述第一红外灰度均值和对应的所述第一参考红外灰度均值之间的红外灰度差值。In one or more embodiments of the present invention, according to the infrared block index number, comparing the blocks in the first infrared block image and the first reference infrared block image, specifically The method may include: obtaining the first infrared grayscale mean value of the blocks corresponding to the index numbers of the infrared blocks in the first infrared block image; obtaining each of the infrared blocks in the first reference infrared block image The first reference infrared grayscale mean value of the block corresponding to the index number; according to the infrared block index number, compare the infrared grayscale value between the first infrared grayscale mean value and the corresponding first reference infrared grayscale mean value in turn. Grayscale difference.

假设将解像力为400*300的图像划分为4*3块图像。每块的解像力为100*100,进一步地,可以利用AVG=1/n∑vali(i=1-10000)。假设,红外图像对应的第二灰度均值为AVG5,参考红外图像对应第二参考灰度均值为AVG6,接下来用AVG5与AVG6进行做差,得到红外灰度差值AVG7。Suppose an image with a resolution of 400*300 is divided into 4*3 images. The resolution of each block is 100*100, and further, AVG=1/nΣvali (i=1-10000) can be used. Suppose that the second grayscale mean value corresponding to the infrared image is AVG5, and the second reference grayscale mean value corresponding to the reference infrared image is AVG6.

在本发明的一个或者多个实施例中,所述获得第二对比结果,具体可以包括:根据第二预设阈值,与所述红外灰度差值进行对比;若所述红外灰度差值大于所述第二预设阈值,则获取对应的所述红外分块索引号,获得第二对比结果。In one or more embodiments of the present invention, obtaining the second comparison result may specifically include: comparing with the infrared grayscale difference according to a second preset threshold; if the infrared grayscale difference If it is greater than the second preset threshold, the corresponding infrared segment index number is obtained, and a second comparison result is obtained.

假设第二预设阈值为AVG8,在获得红外灰度差值AVG7之后,将AVG8与AVG7进行对比。这里所说的红外灰度差值与第二预设阈值之间的大小关系可以根据人为设定的,在实际应用中,由于差值存在正负,所以作为判断发生火灾的条件,可以是红外灰度差值大于第二预设阈值,也可以是红外灰度差值小于第二预设阈值。假设,当红外灰度差值大于第二预设阈值时,认为发生疑似火灾,则进一步地,需要获取对应的红外分开的索引号,第二对比结果与索引号是相对应的。Assuming that the second preset threshold is AVG8, after obtaining the infrared grayscale difference value AVG7, AVG8 is compared with AVG7. The relationship between the infrared grayscale difference and the second preset threshold mentioned here can be manually set. In practical applications, since the difference is positive and negative, as a condition for judging a fire, it can be an infrared The grayscale difference is greater than the second preset threshold, or the infrared grayscale difference may be smaller than the second preset threshold. Assuming that when the infrared grayscale difference is greater than the second preset threshold, it is considered that a suspected fire has occurred, and further, the corresponding infrared separation index number needs to be obtained, and the second comparison result corresponds to the index number.

在本发明的一个或者多个实施例中,所述根据所述第二对比结果与多个连续所述第一对比结果,确定是否存在火灾,具体可以包括:若多个连续所述第一对比结果,和所述第二对比结果均为存在火灾,并且所述深度分块索引号与所述红外分块索引号对应,则确定存在火灾。In one or more embodiments of the present invention, the determining whether there is a fire according to the second comparison result and a plurality of consecutive first comparison results may specifically include: if a plurality of consecutive first comparison results As a result, the second comparison result is that there is a fire, and the index number of the depth segment corresponds to the index number of the infrared segment, it is determined that there is a fire.

为了提升检测结果的准确性,需要综合第一对比结果和第二对比结果,只有当多个连续的第一对比结果判断为疑似发生或者,并且第二对比结果判断为疑似发生火灾的情况下,可以判断为发生火灾。In order to improve the accuracy of the detection results, it is necessary to synthesize the first comparison result and the second comparison result. Only when multiple consecutive first comparison results are judged to be suspected to have occurred or, and the second comparison result is determined to be suspected of fire, It can be judged that a fire has occurred.

在本发明的一个或者多个实施例中,还包括:若确定存在火灾,根据预设空间位置与所述深度图像和/或所述红外图像之间的对应关系,确定发生火灾的空间位置。In one or more embodiments of the present invention, the method further includes: if it is determined that there is a fire, determining the spatial location of the fire according to the corresponding relationship between the preset spatial location and the depth image and/or the infrared image.

例如,如图3所示,假设火灾检测装置1安装在A1房间,火灾检测装置2安装在A2房间。当火灾检测装置1检测到发生火灾后,该火灾检测装置1会向控制装置或者工作人员发送检测到该火灾的设备号以及对应的房间编号,以便工作人员快速找到发生火灾的房间,并进行灭火工作。For example, as shown in FIG. 3 , it is assumed that the fire detection device 1 is installed in the A1 room, and the fire detection device 2 is installed in the A2 room. When the fire detection device 1 detects a fire, the fire detection device 1 will send the device number and the corresponding room number that detected the fire to the control device or the staff, so that the staff can quickly find the room where the fire occurred and put out the fire. Work.

进一步地,若被监控空间比较大,比如大型会议室或者大型仓库,还需要建立各个分块与实际空间位置的关系。假设,分块编号为1的分块图像对应是仓库的门口,分块编号为2的分块图像对应的是文件存储柜。在进行报警时,可以将分块编号一同发送给工作人员,以便实现更加精准的报警。Further, if the monitored space is relatively large, such as a large conference room or a large warehouse, it is also necessary to establish the relationship between each block and the actual space location. Assume that the block image with block number 1 corresponds to the door of the warehouse, and the block image with block number 2 corresponds to the file storage cabinet. When making an alarm, the block number can be sent to the staff together to achieve a more accurate alarm.

基于同样的思路,一种火灾检测装置,如图4所示,该装置包括:Based on the same idea, a fire detection device, as shown in Figure 4, includes:

获取模块41,用于通过TOF深度模组获取深度图像和红外图像;The acquisition module 41 is used to acquire the depth image and the infrared image through the TOF depth module;

第一对比模块42,用于对比所述深度图像与预设参考深度图像,获得第一对比结果;a first comparison module 42, configured to compare the depth image with a preset reference depth image to obtain a first comparison result;

第二对比模块43,用于对比所述红外图像与预设参考红外图像,获得第二对比结果;The second comparison module 43 is configured to compare the infrared image with the preset reference infrared image to obtain a second comparison result;

确定模块44,用于根据所述第二对比结果与多个连续所述第一对比结果,确定是否存在火灾。A determination module 44, configured to determine whether there is a fire according to the second comparison result and a plurality of consecutive first comparison results.

进一步地,获取模块41,用于基于所述TOF深度模组实时获取深度图像和红外图像;其中,所述深度图像和所述红外图像是在同一帧获取。Further, an acquisition module 41 is configured to acquire a depth image and an infrared image in real time based on the TOF depth module; wherein, the depth image and the infrared image are acquired in the same frame.

进一步地,第一对比模块42,用于划分所述深度图像,获得第一深度分块图像;Further, the first comparison module 42 is used to divide the depth image to obtain a first depth block image;

标记所述第一深度分块图像中各深度分块索引号;Marking the index number of each depth block in the first depth block image;

划分所述预设参考深度图像,获得第一参考深度分块图像;dividing the preset reference depth image to obtain a first reference depth block image;

标记所述第一参考深度分块图像中各深度分块索引号;Marking the index number of each depth block in the first reference depth block image;

根据所述深度分块索引号,对比所述第一深度分块图像与所述第一参考深度分块图像中的所述分块;comparing the blocks in the first depth block image and the first reference depth block image according to the depth block index number;

获得第一对比结果。Obtain the first comparison result.

进一步地,获得所述第一深度分块图像中各所述深度分块索引号对应的分块的第一灰度均值;Further, obtaining the first grayscale mean value of the blocks corresponding to each of the depth block index numbers in the first depth block image;

获得所述第一参考深度分块图像中各所述深度分块索引号对应的分块的第一参考灰度均值;obtaining the first reference grayscale mean value of the sub-block corresponding to each of the depth sub-block index numbers in the first reference depth sub-block image;

根据所述深度分块索引号,依次比较所述第一灰度均值和对应的所述第一参考灰度均值之间的深度灰度差值。According to the depth block index number, the depth grayscale difference between the first grayscale mean value and the corresponding first reference grayscale mean value is sequentially compared.

进一步地,根据第一预设阈值,与所述深度灰度差值进行对比;Further, comparing with the depth grayscale difference according to the first preset threshold;

若所述深度灰度差值大于所述第一预设阈值,则获取对应的所述深度分块索引号,获得第一对比结果。If the depth grayscale difference value is greater than the first preset threshold, obtain the corresponding depth block index number, and obtain a first comparison result.

第二对比模块43,划分所述红外图像,获得第一红外分块图像;The second comparison module 43 divides the infrared image to obtain a first infrared segmented image;

标记所述第一红外分块图像中各红外分块索引号;marking the index number of each infrared block in the first infrared block image;

划分所述预设参考红外图像,获得第一参考红外分块图像;dividing the preset reference infrared image to obtain a first reference infrared segmented image;

标记所述第一参考红外分块图像中各红外分块索引号;marking the index number of each infrared block in the first reference infrared block image;

根据所述红外分块索引号,对比所述第一红外分块图像与所述第一参考红外分块图像中的所述分块;comparing the blocks in the first infrared block image and the first reference infrared block image according to the infrared block index number;

获得第二对比结果。A second comparison result is obtained.

进一步地,获得所述第一红外分块图像中各所述红外分块索引号对应的分块的第一红外灰度均值;Further, obtaining the first infrared grayscale mean value of the segment corresponding to each of the infrared segment index numbers in the first infrared segment image;

获得所述第一参考红外分块图像中各所述红外分块索引号对应的分块的第一参考红外灰度均值;obtaining the first reference infrared grayscale mean value of the blocks corresponding to each of the infrared block index numbers in the first reference infrared block image;

根据所述红外分块索引号,依次比较所述第一红外灰度均值和对应的所述第一参考红外灰度均值之间的红外灰度差值。According to the infrared block index number, the infrared grayscale difference between the first infrared grayscale mean value and the corresponding first reference infrared grayscale mean value is sequentially compared.

进一步地,根据第二预设阈值,与所述红外灰度差值进行对比;Further, according to the second preset threshold, compare with the infrared grayscale difference;

若所述红外灰度差值大于所述第二预设阈值,则获取对应的所述红外分块索引号,获得第二对比结果。If the infrared grayscale difference is greater than the second preset threshold, obtain the corresponding index number of the infrared block, and obtain a second comparison result.

进一步地,所述确定模块44用于判断是否发生火灾,若多个连续所述第一对比结果,和所述第二对比结果均为存在火灾,并且所述深度分块索引号与所述红外分块索引号对应,则确定存在火灾。Further, the determining module 44 is used to determine whether a fire has occurred. If a plurality of consecutive first comparison results and the second comparison results are all fires, and the depth subsection index number is the same as the infrared If the block index number corresponds, it is determined that there is a fire.

进一步地,若确定存在火灾,根据预设空间位置与所述深度图像和/或所述红外图像之间的对应关系,确定发生火灾的空间位置。Further, if it is determined that there is a fire, the spatial position of the fire is determined according to the corresponding relationship between the preset spatial position and the depth image and/or the infrared image.

基于上述实施例,通过深度模块和红外模块,同时获取深度图像和红外图像。将实施获取的深度图像和红外图像,分别与此前获取的参考深度图像和参考红外图像进行灰度值的对比。若红外灰度差值和灰度差值都满足对应的预设差值,则认为发生了火灾。需要说明的是,在进行灰度值对比时,往往需要将图像进行分割为多个分块,并基于分块中的平均灰度值进行对比。在确认发生火灾后,及时通知工作人员。通过将深度图像对应的深度灰度差值和红外图像对应的红外灰度差值进行对比,最终确定是否发生火灾,并进一步地可以基于图像确定发生火灾的位置,能够快速准确的确定是否发生火灾,并能够为工作人员提供发生火灾的准确位置信息和对应的图像信息。Based on the above embodiment, the depth image and the infrared image are simultaneously acquired through the depth module and the infrared module. The acquired depth image and infrared image will be compared with the previously acquired reference depth image and reference infrared image respectively for gray value comparison. If both the infrared grayscale difference and the grayscale difference satisfy the corresponding preset difference, it is considered that a fire has occurred. It should be noted that, when performing gray value comparison, it is often necessary to divide an image into a plurality of sub-blocks, and perform comparison based on the average gray value in the sub-blocks. After confirming that a fire has occurred, notify the staff in time. By comparing the depth grayscale difference corresponding to the depth image with the infrared grayscale difference corresponding to the infrared image, it is finally determined whether a fire has occurred, and further, the location of the fire can be determined based on the image, and whether a fire has occurred can be quickly and accurately determined. , and can provide the accurate location information and corresponding image information of the fire for the staff.

基于同样的思路,本发明实施例还提供一种电子设备,包括:存储器、处理器;其中,Based on the same idea, an embodiment of the present invention also provides an electronic device, including: a memory and a processor; wherein,

所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行时实现如下方法:The memory is used to store one or more computer instructions, wherein when the one or more computer instructions are executed by the processor, the following methods are implemented:

通过TOF深度模组获取深度图像和红外图像;Obtain depth image and infrared image through TOF depth module;

对比所述深度图像与预设参考深度图像,获得第一对比结果;Comparing the depth image with a preset reference depth image to obtain a first comparison result;

对比所述红外图像与预设参考红外图像,获得第二对比结果;Comparing the infrared image with the preset reference infrared image to obtain a second comparison result;

根据所述第二对比结果与多个连续所述第一对比结果,确定是否存在火灾。Whether there is a fire is determined according to the second comparison result and a plurality of consecutive first comparison results.

以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed over multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助加必需的通用硬件平台的方式来实现,当然也可以通过硬件和软件结合的方式来实现。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以计算机产品的形式体现出来,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。From the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and certainly can also be implemented by combining hardware and software. Based on this understanding, the above-mentioned technical solutions can be embodied in the form of computer products in essence or that contribute to the prior art. In the form of a computer program product embodied on a medium (including but not limited to disk storage, CD-ROM, optical storage, etc.).

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程坐标确定设备的处理器以产生一个机器,使得通过计算机或其他可编程坐标确定设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable coordinate determination device to produce a machine such that the instructions executed by the processor of the computer or other programmable coordinate determination device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程坐标确定设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable coordinate determination apparatus to function in a particular manner, such that the instructions stored in the computer readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

这些计算机程序指令也可装载到计算机或其他可编程坐标确定设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable coordinate determination device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process such that a computer implemented on the computer or other programmable device The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.

在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.

内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-persistent memory in computer readable media, random access memory (RAM) and/or non-volatile memory in the form of, for example, read only memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.

计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media includes both persistent and non-permanent, removable and non-removable media, and storage of information may be implemented by any method or technology. Information may be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.

最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that it can still be The technical solutions described in the foregoing embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A fire detection method is applied to a TOF depth module and comprises the following steps:
acquiring a depth image and an infrared image through a TOF depth module; wherein, the obtaining of the depth image and the infrared image comprises: acquiring a depth image and an infrared image in real time based on the TOF depth module; wherein the depth image and the infrared image are acquired in the same frame;
comparing the depth image with a preset reference depth image to obtain a first comparison result; wherein the comparing the depth image with a preset reference depth image to obtain a first comparison result comprises: dividing the depth image to obtain a first depth block image; marking the index number of each depth block in the first depth block image; dividing the preset reference depth image to obtain a first reference depth block image; marking the index number of each depth block in the first reference depth block image; comparing the blocks in the first depth block image and the first reference depth block image according to the depth block index number; obtaining a first comparison result;
comparing the infrared image with a preset reference infrared image to obtain a second comparison result;
determining whether a fire exists according to the second comparison result and a plurality of consecutive first comparison results; the method comprises the following steps: if a plurality of continuous first comparison results and second comparison results are both in the presence of fire, and the depth block index numbers correspond to the infrared block index numbers, determining that the fire exists; the infrared blocking index number is obtained by performing blocking division and marking on the basis of the infrared image.
2. The method of claim 1, wherein comparing the tiles in the first depth tile image and the first reference depth tile image according to the depth tile index number comprises:
obtaining a first gray average value of a block corresponding to each depth block index number in the first depth block image;
obtaining a first reference gray level mean value of a block corresponding to each depth block index number in the first reference depth block image;
and sequentially comparing the depth gray level difference value between the first gray level mean value and the corresponding first reference gray level mean value according to the depth block index number.
3. The method of claim 2, wherein obtaining the first comparison result comprises:
comparing the depth gray level difference value with a first preset threshold value;
and if the depth gray level difference value is greater than the first preset threshold value, acquiring the corresponding depth block index number to obtain a first comparison result.
4. The method according to claim 1, wherein said comparing said infrared image with a preset reference infrared image to obtain a second comparison result comprises:
dividing the infrared image to obtain a first infrared block image;
marking the index number of each infrared block in the first infrared block image;
dividing the preset reference infrared image to obtain a first reference infrared block image;
marking the index number of each infrared block in the first reference infrared block image;
comparing the blocks in the first infrared block image and the first reference infrared block image according to the infrared block index numbers;
a second comparison result is obtained.
5. The method of claim 4, wherein comparing the patches in the first infrared patch image and the first reference infrared patch image according to the infrared patch index numbers comprises:
obtaining a first infrared gray level mean value of a block corresponding to each infrared block index number in the first infrared block image;
obtaining a first reference infrared gray level mean value of a block corresponding to each infrared block index number in the first reference infrared block image;
and sequentially comparing the infrared gray level difference value between the first infrared gray level average value and the corresponding first reference infrared gray level average value according to the infrared blocking index number.
6. The method of claim 5, wherein obtaining the second comparison result comprises:
comparing the infrared gray level difference with a second preset threshold value;
and if the infrared gray difference value is greater than the second preset threshold value, acquiring the corresponding infrared block index number and acquiring a second comparison result.
7. The method of claim 1, further comprising:
and if the fire disaster exists, determining the space position of the fire disaster according to the corresponding relation between the preset space position and the depth image and/or the infrared image.
8. A fire detection device, comprising:
the acquisition module is used for acquiring a depth image and an infrared image; wherein, the obtaining of the depth image and the infrared image comprises: acquiring a depth image and an infrared image in real time based on a TOF depth module; wherein the depth image and the infrared image are acquired in the same frame;
the first comparison module is used for comparing the depth image with a preset reference depth image to obtain a first comparison result; wherein the comparing the depth image with a preset reference depth image to obtain a first comparison result comprises: dividing the depth image to obtain a first depth block image; marking the index number of each depth block in the first depth block image; dividing the preset reference depth image to obtain a first reference depth block image; marking the index number of each depth block in the first reference depth block image; comparing the blocks in the first depth block image and the first reference depth block image according to the depth block index number; obtaining a first comparison result;
the second comparison module is used for comparing the infrared image with a preset reference infrared image to obtain a second comparison result;
a determining module for determining whether a fire exists according to the second comparison result and a plurality of consecutive first comparison results; the method comprises the following steps: if a plurality of continuous first comparison results and second comparison results are both in the presence of fire, and the depth block index numbers correspond to the infrared block index numbers, determining that the fire exists; the infrared blocking index number is obtained by performing blocking division and marking on the basis of the infrared image.
9. An electronic device, comprising: a memory, a processor; wherein,
the memory is to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the fire detection method of any of claims 1 to 7.
CN201811151379.0A 2018-09-29 2018-09-29 Fire detection method, device and equipment Active CN109118702B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811151379.0A CN109118702B (en) 2018-09-29 2018-09-29 Fire detection method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811151379.0A CN109118702B (en) 2018-09-29 2018-09-29 Fire detection method, device and equipment

Publications (2)

Publication Number Publication Date
CN109118702A CN109118702A (en) 2019-01-01
CN109118702B true CN109118702B (en) 2021-07-20

Family

ID=64857753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811151379.0A Active CN109118702B (en) 2018-09-29 2018-09-29 Fire detection method, device and equipment

Country Status (1)

Country Link
CN (1) CN109118702B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109916518A (en) * 2019-03-18 2019-06-21 杜峰斌 A kind of smoking detection device, system and method
CN110097732B (en) * 2019-05-08 2021-07-20 江西省天眼科技有限公司 Flame detection monitoring device and processing method thereof
US11651670B2 (en) 2019-07-18 2023-05-16 Carrier Corporation Flame detection device and method
CN112785587B (en) * 2021-02-04 2024-05-31 上海电气集团股份有限公司 Foreign matter detection method, system, equipment and medium in stacking production process

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101679148B1 (en) * 2015-06-15 2016-12-06 동의대학교 산학협력단 Detection System of Smoke and Flame using Depth Camera
CN106954021A (en) * 2017-03-03 2017-07-14 天津天地伟业信息系统集成有限公司 Infrared thermal imaging monitoring intelligent camera shield cloud deck
EP3428591A1 (en) * 2017-07-12 2019-01-16 Honeywell International Inc. Flame detector field of view verification via reverse infrared signaling

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3269453B2 (en) * 1998-04-08 2002-03-25 三菱電機株式会社 Fire detection system
CN101673448B (en) * 2009-09-30 2012-03-21 青岛科恩锐通信息技术有限公司 Method and system for detecting forest fire
CN103065413B (en) * 2012-12-13 2016-01-20 中国电子科技集团公司第十五研究所 Obtain method and the device of fire size class information
CN104504896B (en) * 2014-08-15 2017-06-27 上海市政工程设计研究总院(集团)有限公司 A kind of traffic offence automatic production record and method
CN105512667B (en) * 2014-09-22 2019-01-15 中国石油化工股份有限公司 Infrared and visible light video image fusion recognition fire method
CN105913604B (en) * 2016-05-18 2018-03-20 中国计量大学 Assay method and its device occur for the fire based on unmanned plane
CN107577981A (en) * 2016-07-04 2018-01-12 高德信息技术有限公司 A kind of road traffic index identification method and device
CN106251567B (en) * 2016-10-11 2019-06-21 广东工业大学 A kind of Intellective Fire Alarm System
CN106485229A (en) * 2016-10-14 2017-03-08 黑龙江科技大学 Agricultural ecotone remote sensing monitoring and early warning fire system
CN108131786B (en) * 2017-10-31 2020-05-29 珠海格力电器股份有限公司 Control method and device of air conditioner

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101679148B1 (en) * 2015-06-15 2016-12-06 동의대학교 산학협력단 Detection System of Smoke and Flame using Depth Camera
CN106954021A (en) * 2017-03-03 2017-07-14 天津天地伟业信息系统集成有限公司 Infrared thermal imaging monitoring intelligent camera shield cloud deck
EP3428591A1 (en) * 2017-07-12 2019-01-16 Honeywell International Inc. Flame detector field of view verification via reverse infrared signaling

Also Published As

Publication number Publication date
CN109118702A (en) 2019-01-01

Similar Documents

Publication Publication Date Title
CN109118702B (en) Fire detection method, device and equipment
US20240062518A1 (en) Method, apparatus, computer device and storage medium for detecting objects thrown from height
CN110490995B (en) Method, system, equipment and storage medium for monitoring abnormal running state of belt
US7840992B1 (en) System and method for environmentally aware data protection
CN105787248A (en) Anomaly sensing and prediction system and method based on analysis of time series data
US20140160295A1 (en) Road condition detection
US9291698B2 (en) Wireless communication device, wireless communication method, and computer program product
WO2019057048A1 (en) Low-frequency crawler identification method, device, readable storage medium and equipment
CN103761748A (en) Method and device for detecting abnormal behaviors
KR102002812B1 (en) Image Analysis Method and Server Apparatus for Detecting Object
KR102231160B1 (en) Intelligent fire identification apparatus, intelligent fire identification method and recording medium
EP2717600B1 (en) Emergency broadcasting systems and methods
CN117292247A (en) Improved indoor dangerous scene detection method based on YOLOv8 algorithm and tracking algorithm
CN107331101A (en) Building fire alarm system and method based on cloud computing
CN114298104B (en) Earthquake early warning method, earthquake early warning device, electronic equipment and computer readable storage medium
US20190116310A1 (en) Method of processing object in image and apparatus for same
CN103961108B (en) fall detection method
CN117037065A (en) Flame smoke concentration detection method, device, computer equipment and storage medium
CN107895453A (en) Building safety warning system and method
US20160135015A1 (en) Public service awareness of crowd movement and concentration
TW202014674A (en) System and method for building structural safety detection
CN118379844A (en) Fire initial detection method and device, electronic equipment and medium
WO2011087534A1 (en) Filtering sensor data to provide estimates of structures
KR102346970B1 (en) Lof-based senior loitering and missing children prevention systems and method
CN104020467A (en) Tracking and detecting device and method for invading foreign substances of power transmission line

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201027

Address after: 261061 north of Yuqing East Street, east of Dongming Road, Weifang High tech Zone, Weifang City, Shandong Province (Room 502, Geer electronic office building)

Applicant after: GoerTek Optical Technology Co.,Ltd.

Address before: 261031 No. 268 Dongfang Road, Weifang hi tech Industrial Development Zone, Shandong, Weifang

Applicant before: GOERTEK Inc.

CB02 Change of applicant information
CB02 Change of applicant information

Address after: 261061 east of Dongming Road, north of Yuqing East Street, high tech Zone, Weifang City, Shandong Province (Room 502, Geer electronics office building)

Applicant after: GoerTek Optical Technology Co.,Ltd.

Address before: 261061 North of Yuqing East Street, east of Dongming Road, Weifang High-tech Zone, Weifang City, Shandong Province (Room 502, Goertek Office Building)

Applicant before: GoerTek Optical Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant