WO2022006739A1 - Control method, control apparatus, and infrared camera - Google Patents

Control method, control apparatus, and infrared camera Download PDF

Info

Publication number
WO2022006739A1
WO2022006739A1 PCT/CN2020/100637 CN2020100637W WO2022006739A1 WO 2022006739 A1 WO2022006739 A1 WO 2022006739A1 CN 2020100637 W CN2020100637 W CN 2020100637W WO 2022006739 A1 WO2022006739 A1 WO 2022006739A1
Authority
WO
WIPO (PCT)
Prior art keywords
face
area
evaluated
exposure amount
infrared camera
Prior art date
Application number
PCT/CN2020/100637
Other languages
French (fr)
Chinese (zh)
Inventor
邓宝华
袁田
Original Assignee
深圳市锐明技术股份有限公司
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 深圳市锐明技术股份有限公司 filed Critical 深圳市锐明技术股份有限公司
Priority to PCT/CN2020/100637 priority Critical patent/WO2022006739A1/en
Priority to CN202080001191.7A priority patent/CN111937497B/en
Publication of WO2022006739A1 publication Critical patent/WO2022006739A1/en

Links

Classifications

    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • H05B47/105Controlling the light source in response to determined parameters
    • H05B47/11Controlling the light source in response to determined parameters by determining the brightness or colour temperature of ambient light
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/165Detection; Localisation; Normalisation using facial parts and geometric relationships
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/65Control of camera operation in relation to power supply
    • H04N23/651Control of camera operation in relation to power supply for reducing power consumption by affecting camera operations, e.g. sleep mode, hibernation mode or power off of selective parts of the camera
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/74Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Studio Devices (AREA)

Abstract

The present application is applicable to the technical field of cameras. Provided are a control method, a control apparatus, and an infrared camera. The method comprises: detecting, in a turned-on state of an infrared lamp, whether an image collected by an infrared camera contains a human face to be evaluated; if the image collected by the infrared camera contains said human face, acquiring a human face area to be evaluated, with said human face area being the area of said human face; calculating, according to a preset relational expression, a target evaluation exposure amount corresponding to said human face area, wherein the relational expression is used for indicating the relationship between the area of the human face and the evaluation exposure amount; and determining, according to a first real-time exposure amount and the target evaluation exposure amount, whether to turn off the infrared lamp, wherein the first real-time exposure amount is a real-time exposure amount of a photosensitive element at the current moment. By means of the method, an infrared camera can automatically control an infrared lamp according to changes in an external environment, thereby reducing the power consumption of the infrared camera.

Description

一种控制方法、控制装置及红外摄像机A control method, control device and infrared camera 技术领域technical field
本申请属于摄像机技术领域,尤其涉及一种控制方法、控制装置、红外摄像机及计算机可读存储介质。The present application belongs to the technical field of cameras, and in particular, relates to a control method, a control device, an infrared camera, and a computer-readable storage medium.
背景技术Background technique
随着汽车行业的快速发展,在车内安装红外摄像机已经成为一种趋势。实际上,很多车内的交互功能都与红外摄像机息息相关,例如驾驶员疲劳监测和身份认证识别。然而,目前的红外摄像机无法根据外界环境(如环境照度)的变化对红外灯进行自动控制。With the rapid development of the automotive industry, it has become a trend to install infrared cameras in cars. In fact, many interactive functions in the car are closely related to infrared cameras, such as driver fatigue monitoring and identification. However, the current infrared cameras cannot automatically control the infrared lamps according to changes in the external environment (such as ambient illuminance).
技术问题technical problem
目前的红外摄像机无法根据外界环境(如环境照度)的变化对红外灯进行自动控制,导致红外摄像机的功耗增加。The current infrared camera cannot automatically control the infrared lamp according to the change of the external environment (such as the ambient illumination), which leads to an increase in the power consumption of the infrared camera.
技术解决方案technical solutions
有鉴于此,本申请提供了一种控制方法、控制装置、红外摄像机及计算机可读存储介质,可以使红外摄像机根据外界环境的变化对红外灯进行自动控制,从而降低红外摄像机的功耗。In view of this, the present application provides a control method, a control device, an infrared camera and a computer-readable storage medium, which can enable the infrared camera to automatically control the infrared lamp according to changes in the external environment, thereby reducing the power consumption of the infrared camera.
第一方面,本申请提供了一种控制方法,应用于红外摄像机,上述红外摄像机包括红外灯和用于接收红外光的感光元件,上述控制方法包括:In a first aspect, the present application provides a control method, which is applied to an infrared camera. The infrared camera includes an infrared lamp and a photosensitive element for receiving infrared light. The control method includes:
在上述红外灯的启动状态下,检测上述红外摄像机采集的图像中是否包含待评估人脸;In the activated state of the above-mentioned infrared light, detecting whether the image collected by the above-mentioned infrared camera contains the face to be evaluated;
若上述红外摄像机采集的图像中包含待评估人脸,则获取待评估人脸面积,上述待评估人脸面积为上述待评估人脸的面积;If the image collected by the above-mentioned infrared camera includes the face to be evaluated, the area of the face to be evaluated is obtained, and the above-mentioned area of the face to be evaluated is the area of the above-mentioned face to be evaluated;
根据预设的关系式,计算上述待评估人脸面积所对应的目标评估曝光量,上述关系式用于指示人脸的面积与评估曝光量之间的关系;Calculate the target evaluation exposure amount corresponding to the face area to be evaluated according to a preset relational expression, and the above relational expression is used to indicate the relationship between the face area and the evaluation exposure amount;
根据第一实时曝光量和上述目标评估曝光量确定是否关闭上述红外灯,其中,上述第一实时曝光量为上述感光元件在当前时刻的实时曝光量。Whether to turn off the infrared lamp is determined according to the first real-time exposure amount and the target evaluation exposure amount, wherein the first real-time exposure amount is the real-time exposure amount of the photosensitive element at the current moment.
第二方面,本申请提供了一种控制装置,应用于红外摄像机,上述红外摄像机包括红外灯和用于接收红外光的感光元件,上述控制装置包括:In a second aspect, the present application provides a control device, which is applied to an infrared camera. The infrared camera includes an infrared lamp and a photosensitive element for receiving infrared light. The control device includes:
人脸检测单元,用于在上述红外灯的启动状态下,检测上述红外摄像机采集的图像中是否包含待评估人脸;a face detection unit, configured to detect whether the image collected by the infrared camera contains a face to be evaluated when the infrared lamp is activated;
人脸面积获取单元,用于若上述红外摄像机采集的图像中包含待评估人脸,则获取待评估人脸面积,上述待评估人脸面积为上述待评估人脸的面积;a face area obtaining unit, configured to obtain the face area to be evaluated if the image collected by the infrared camera includes the face to be evaluated, and the area of the face to be evaluated is the area of the face to be evaluated;
评估曝光计算单元,用于根据预设的关系式,计算上述待评估人脸面积所对应的目标评估曝光量,上述关系式用于指示人脸的面积与评估曝光量之间的关系;An evaluation exposure calculation unit, used for calculating the target evaluation exposure amount corresponding to the above-mentioned face area to be evaluated according to a preset relational expression, and the above-mentioned relational expression is used to indicate the relationship between the area of the human face and the evaluation exposure amount;
红外灯控制单元,用于根据第一实时曝光量和上述目标评估曝光量确定是否关闭上述红外灯,其中,上述第一实时曝光量为上述感光元件在当前时刻的实时曝光量。The infrared lamp control unit is configured to determine whether to turn off the infrared lamp according to the first real-time exposure amount and the target evaluation exposure amount, wherein the first real-time exposure amount is the real-time exposure amount of the photosensitive element at the current moment.
第三方面,本申请提供了一种红外摄像机,包括红外灯、用于接收红外光的感光元件、存储器、处理器以及存储在上述存储器中并可在上述处理器上运行的计算机程序,上述处理器执行上述计算机程序时实现如上述第一方面所提供的方法。In a third aspect, the present application provides an infrared camera, comprising an infrared lamp, a photosensitive element for receiving infrared light, a memory, a processor, and a computer program stored in the memory and running on the processor. When the computer executes the above computer program, the method provided by the above first aspect is implemented.
第四方面,本申请提供了一种计算机可读存储介质,上述计算机可读存储介质存储有计算机程序,上述计算机程序被处理器执行时实现如第一方面所提供的方法。In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program implements the method provided in the first aspect when the computer program is executed by a processor.
第五方面,本申请提供了一种计算机程序产品,当计算机程序产品在红外摄像机上运行时,使得红外摄像机执行上述第一方面所提供的方法。In a fifth aspect, the present application provides a computer program product that, when the computer program product runs on an infrared camera, enables the infrared camera to execute the method provided in the first aspect.
有益效果beneficial effect
由上可见,本申请方案中在红外灯的启动状态下,首先检测红外摄像机采集的图像中是否包含待评估人脸,若上述红外摄像机采集的图像中包含待评估人脸,则获取待评估人脸面积,上述待评估人脸面积为上述待评估人脸的面积,然后根据预设的关系式,计算上述待评估人脸面积所对应的目标评估曝光量,上述关系式用于指示人脸的面积与评估曝光量之间的关系,最后根据第一实时曝光量和上述目标评估曝光量确定是否关闭上述红外灯,其中,上述第一实时曝光量为上述感光元件在当前时刻的实时曝光量。本申请方案预先建立人脸的面积与评估曝光量之间的关系式,然后通过该关系式计算待评估人脸面积对应的目标评估曝光量,通过比较当前时刻的第一实时曝光量与目标评估曝光量,可以评估当前的环境照度,从而使红外摄像机可以根据外界环境的变化对红外灯进行自动控制,在保证红外摄像机拍摄的图像质量的基础上,降低红外摄像机的功耗。As can be seen from the above, in the solution of the present application, when the infrared lamp is activated, it is first detected whether the image collected by the infrared camera contains the face to be evaluated. Face area, the above-mentioned face area to be evaluated is the area of the above-mentioned face to be evaluated, and then according to a preset relational formula, the target evaluation exposure amount corresponding to the above-mentioned face area to be evaluated is calculated, and the above-mentioned relational formula is used to indicate the face. The relationship between the area and the estimated exposure amount, and finally determine whether to turn off the infrared lamp according to the first real-time exposure amount and the target estimated exposure amount, wherein the first real-time exposure amount is the real-time exposure amount of the photosensitive element at the current moment. The solution of the present application establishes a relational expression between the area of the face and the estimated exposure in advance, and then calculates the target estimated exposure corresponding to the face area to be assessed through the relational expression, and compares the first real-time exposure at the current moment with the target estimated exposure. Exposure can evaluate the current environmental illumination, so that the infrared camera can automatically control the infrared lamp according to the changes of the external environment, and reduce the power consumption of the infrared camera on the basis of ensuring the image quality of the infrared camera.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only for the present application. In some embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1是本申请实施例提供的控制方法的流程示意图;1 is a schematic flowchart of a control method provided by an embodiment of the present application;
图2是本申请实施例提供的矩形框的示意图;2 is a schematic diagram of a rectangular frame provided by an embodiment of the present application;
图3是本申请实施例提供的图像区域的示意图;3 is a schematic diagram of an image area provided by an embodiment of the present application;
图4是本申请实施例提供的控制装置的结构框图;4 is a structural block diagram of a control device provided by an embodiment of the present application;
图5是本申请实施例提供的红外摄像机的结构示意图。FIG. 5 is a schematic structural diagram of an infrared camera provided by an embodiment of the present application.
本发明的实施方式Embodiments of the present invention
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are set forth in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It is to be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described feature, integer, step, operation, element and/or component, but does not exclude one or more other The presence or addition of features, integers, steps, operations, elements, components and/or sets thereof.
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It will also be understood that, as used in this specification and the appended claims, the term "and/or" refers to and including any and all possible combinations of one or more of the associated listed items.
如在本申请说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in the specification of this application and the appended claims, the term "if" may be contextually interpreted as "when" or "once" or "in response to determining" or "in response to detecting ". Similarly, the phrases "if it is determined" or "if the [described condition or event] is detected" may be interpreted, depending on the context, to mean "once it is determined" or "in response to the determination" or "once the [described condition or event] is detected. ]" or "in response to detection of the [described condition or event]".
另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In addition, in the description of the specification of the present application and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the description, and should not be construed as indicating or implying relative importance.
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。References in this specification to "one embodiment" or "some embodiments" and the like mean that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically emphasized otherwise. The terms "including", "including", "having" and their variants mean "including but not limited to" unless specifically emphasized otherwise.
在对本申请进一步详细说明之前,首先对本申请实施例中预设的关系式的建立方式进行说明。Before further describing the present application in detail, a method for establishing the preset relational expression in the embodiment of the present application will be described first.
S1、需要在完全黑暗(没有可见光,也没有红外光)的环境中确定红外灯的工作电流的大小。具体地,红外灯的工作电流的大小需满足以下条件:在完全黑暗的环境中,当红外灯以该工作电流工作时,使红外灯投射出一定强度的红外光。在红外摄像机位于最远设计距离进行拍摄的情况下,该一定强度的红外光使得感光元件的曝光量不会超过最大允许曝光量;在红外摄像机位于最近设计距离进行拍摄的情况下,该一定强度的红外光又使得感光元件的曝光量不会低于最小允许曝光量。其中,最远设计距离为红外摄像机被设计的最远的拍摄距离,相应地,最近设计距离为红外摄像机被设计的最近的拍摄距离。其中,最大允许曝光量为能够保证图像质量的最大的曝光量,最小允许曝光量为能够保证图像质量的最小的曝光量。具体地,最大允许曝光量和最小允许曝光量的大小可通过红外摄像机进行测试获得。S1. It is necessary to determine the working current of the infrared lamp in a completely dark environment (no visible light and no infrared light). Specifically, the size of the working current of the infrared lamp needs to meet the following conditions: in a completely dark environment, when the infrared lamp works with the working current, the infrared lamp projects a certain intensity of infrared light. When the infrared camera is located at the farthest design distance for shooting, the certain intensity of infrared light will prevent the exposure of the photosensitive element from exceeding the maximum allowable exposure; when the infrared camera is located at the closest design distance for shooting, the certain intensity The infrared light makes the exposure of the photosensitive element not lower than the minimum allowable exposure. The farthest design distance is the farthest shooting distance for which the infrared camera is designed, and correspondingly, the shortest design distance is the shortest shooting distance for which the infrared camera is designed. The maximum allowable exposure amount is the maximum exposure amount that can guarantee the image quality, and the minimum allowable exposure amount is the minimum exposure amount that can guarantee the image quality. Specifically, the size of the maximum allowable exposure amount and the minimum allowable exposure amount can be obtained by testing with an infrared camera.
S2、在红外灯以S1中的工作电流工作的情况下,红外摄像机在完全黑暗的环境中批量采集人脸从最近设计距离移动到最远设计距离过程中产生的实验数据,该实验数据包括人脸的五官信息以及感光元件的曝光量。举例说明,假设红外摄像机的最近设计距离为1米,最远设计距离为2米,使人脸从红外摄像机的镜头前1米处移动到镜头前2米处;在此过程中,红外摄像机捕捉到的画面中人脸的五官信息是变化的,且感光元件的曝光量也是变化的;采集人脸移动到每个位置时的五官信息和感光元件的曝光量,即可得到实验数据。可选地,可以分别使人脸的正脸、人脸的左侧脸和人脸的右侧脸从最近设计距离移动到最远设计距离,然后采集正脸从最近设计距离移动到最远设计距离过程中产生的实验数据、左侧脸从最近设计距离移动到最远设计距离过程中产生的实验数据和右侧脸从最近设计距离移动到最远设计距离过程中产生的实验数据。S2. Under the condition that the infrared lamp works with the working current in S1, the infrared camera batch collects the experimental data generated in the process of moving the face from the nearest design distance to the farthest design distance in a completely dark environment. The experimental data includes the human face. The facial features of the face and the exposure of the photosensitive element. For example, suppose the closest design distance of the infrared camera is 1 meter, and the farthest design distance is 2 meters, so that the face moves from 1 meter in front of the infrared camera to 2 meters in front of the lens; during this process, the infrared camera captures The facial feature information of the face in the obtained picture changes, and the exposure of the photosensitive element also changes; the experimental data can be obtained by collecting the facial feature information and the exposure of the photosensitive element when the face moves to each position. Optionally, the front face of the human face, the left face of the human face, and the right face of the human face can be moved from the nearest design distance to the farthest design distance, and then the front face is collected and moved from the nearest design distance to the farthest design distance. The experimental data generated in the process of distance, the experimental data generated in the process of moving the left face from the closest design distance to the farthest design distance, and the experimental data generated in the process of moving the right face from the closest design distance to the farthest design distance.
S3、需要根据采集到的五官信息计算人脸的面积,建立人脸的面积与感光元件的曝光量之间的对应关系。例如,人脸移动到红外摄像机的镜头前1.5米处时,红外摄像机捕捉到的画面中人脸的五官信息为五官信息 1.5,此时感光元件的曝光量为曝光量 1.5,根据五官信息 1.5计算的人脸的面积为面积 1.5,建立面积 1.5与曝光量 1.5之间的对应关系;人脸移动到红外摄像机的镜头前1.8米处时,红外摄像机捕捉到的画面中人脸的五官信息为五官信息 1.8,此时感光元件的曝光量为曝光量 1.8,根据五官信息 1.8计算的人脸的面积为面积 1.8,建立面积 1.8与曝光量 1.8之间的对应关系。 S3. It is necessary to calculate the area of the face according to the collected facial features information, and establish a corresponding relationship between the area of the face and the exposure amount of the photosensitive element. For example, the face is moved to the 1.5 meters in front of the lens of the infrared camera, an infrared camera to capture facial features information screen features for human face information 1.5, the exposure amount at this time is the amount of exposure of the photosensitive element 1.5, 1.5 is calculated according to information features The area of the face is 1.5 , and the corresponding relationship between the area 1.5 and the exposure 1.5 is established; when the face moves 1.8 meters in front of the lens of the infrared camera, the facial features of the face captured by the infrared camera are the facial features. Information 1.8 , at this time, the exposure of the photosensitive element is the exposure 1.8 , and the area of the face calculated according to the facial features information 1.8 is the area 1.8 , and the corresponding relationship between the area 1.8 and the exposure 1.8 is established.
S4、对于S3中得到的人脸的面积与感光元件的曝光量,还需要去除其中的冗余数据和无效数据。具体地,若某一人脸的面积对应有两个以上感光元件的曝光量,则将该两个以上感光元件的曝光量中最小的曝光量保留,将该两个以上感光元件的曝光量中除最小的曝光量以外的其它曝光量(即冗余数据)删除。若某一感光元件的曝光量超出预设的正常范围,则将该感光元件的曝光量(无效数据)删除。去除冗余数据和无效数据后,以人脸的面积作为横坐标,以感光元件的曝光量作为纵坐标,建立坐标系。接着,分别根据每一对具有对应关系的人脸的面积和感光元件的曝光量在坐标系中确定一个坐标点,然后对各个坐标点进行非线性拟合,生成拟合曲线。由于后续需要根据建立的关系式对红外灯的开启和关闭状态进行控制,为了保证红外灯不会频繁地开启和关闭,需要将拟合曲线向下作一定的平移,最后将平移后的拟合曲线对应的曲线方程作为建立得到的预设的关系式。需要说明的是,如果平移后的拟合曲线与坐标轴相交,则需要重新确定红外灯的工作电流的大小,即减小红外灯的工作电流,并重新执行S2、S3以及S4。S4. For the area of the face and the exposure amount of the photosensitive element obtained in S3, redundant data and invalid data need to be removed. Specifically, if the area of a certain face corresponds to the exposure amount of two or more photosensitive elements, the smallest exposure amount among the exposure amounts of the two or more photosensitive elements is retained, and the exposure amount of the two or more photosensitive elements is divided by the exposure amount. Exposures other than the smallest exposure (ie redundant data) are deleted. If the exposure amount of a certain photosensitive element exceeds the preset normal range, the exposure amount (invalid data) of the photosensitive element will be deleted. After removing redundant data and invalid data, a coordinate system is established with the area of the face as the abscissa and the exposure of the photosensitive element as the ordinate. Next, a coordinate point is determined in the coordinate system according to the area of each pair of corresponding faces and the exposure of the photosensitive element, and then nonlinear fitting is performed on each coordinate point to generate a fitting curve. Since the on and off states of the infrared lamps need to be controlled according to the established relationship in the future, in order to ensure that the infrared lamps will not be turned on and off frequently, it is necessary to shift the fitting curve downward to a certain extent. The curve equation corresponding to the curve is used as the preset relational expression obtained by establishment. It should be noted that if the translated fitting curve intersects the coordinate axis, it is necessary to re-determine the working current of the infrared lamp, that is, reduce the working current of the infrared lamp, and perform S2, S3 and S4 again.
应理解的是,上述预设的关系式的建立方式中提及的人脸为不戴口罩的人脸。本申请还可以针对戴口罩的人脸,通过上述S1、S2、S3及S4建立另一个关系式,这里将该另一个关系式称为戴口罩关系式,由于戴口罩关系式的建立方式与上述预设的关系式的建立方式相同,因此不再对戴口罩关系式的建立方式赘述。It should be understood that the face mentioned in the establishment method of the above-mentioned preset relational expression is a face that does not wear a mask. The present application can also establish another relational expression through the above-mentioned S1, S2, S3 and S4 for the face wearing a mask, and this other relational expression is here called the relational expression of wearing a mask. The way of establishing the preset relational expression is the same, so the method of establishing the relational expression of wearing a mask will not be repeated.
图1示出了本申请实施例提供的一种控制方法的流程图,该控制方法应用于红外摄像机,该红外摄像机包括红外灯和用于接收红外光的感光元件,详述如下:FIG. 1 shows a flowchart of a control method provided by an embodiment of the present application. The control method is applied to an infrared camera. The infrared camera includes an infrared lamp and a photosensitive element for receiving infrared light. The details are as follows:
步骤101,在红外灯的启动状态下,检测红外摄像机采集的图像中是否包含待评估人脸;Step 101, in the activated state of the infrared lamp, detect whether the image collected by the infrared camera contains the face to be evaluated;
在本申请实施例中,红外摄像机可以安装在车内,在红外灯的启动状态(即红外灯投射出红外光)下,红外摄像机会检测当前采集的图像中是否包含有待评估人脸。其中,待评估人脸可以是任一人脸,也即是说,只要红外摄像机当前采集的图像中包含任一人脸,则将该人脸确定为待评估人脸,并认为红外摄像机当前采集的图像中包含待评估人脸,若红外摄像机当前采集的图像中不包含人脸,则认为红外摄像机当前采集的图像中不包含待评估人脸。In the embodiment of the present application, the infrared camera may be installed in the vehicle. When the infrared light is activated (ie, the infrared light projects infrared light), the infrared camera will detect whether the currently collected image contains a face to be evaluated. The face to be evaluated can be any face, that is to say, as long as the image currently collected by the infrared camera contains any face, the face is determined as the face to be evaluated, and the image currently collected by the infrared camera is considered to be the face to be evaluated. contains the face to be evaluated. If the image currently collected by the infrared camera does not contain a face, it is considered that the image currently collected by the infrared camera does not contain the face to be evaluated.
步骤102,若红外摄像机采集的图像中包含待评估人脸,则获取待评估人脸面积;Step 102, if the image collected by the infrared camera includes the face to be evaluated, obtain the area of the face to be evaluated;
在本申请实施例中,若红外摄像机当前采集的图像中包含有待评估人脸,则获取红外摄像机当前采集的图像中该待评估人脸的面积,并将该待评估人脸的面积记作待评估人脸面积。In the embodiment of the present application, if the image currently collected by the infrared camera contains the face to be evaluated, the area of the face to be evaluated in the image currently collected by the infrared camera is acquired, and the area of the face to be evaluated is recorded as the face to be evaluated Assess face area.
示例性地,为了获取待评估人脸面积,可以先获取待评估人脸的五官信息,然后根据待评估人脸的五官信息,计算待评估人脸的面积,得到待评估人脸面积。例如,可以通过目标检测从红外摄像机当前采集的图像中识别出待评估人脸的眉、眼、口、鼻和耳,得到分别框选眉、眼、口、鼻和耳的矩形框,然后根据矩形框计算待评估人脸面积。Exemplarily, in order to obtain the area of the face to be evaluated, the facial feature information of the face to be evaluated can be obtained first, and then the area of the face to be evaluated is calculated according to the facial feature information of the face to be evaluated to obtain the area of the face to be evaluated. For example, the eyebrows, eyes, mouth, nose and ears of the face to be evaluated can be identified from the images currently collected by the infrared camera through target detection, and a rectangular frame for selecting the eyebrows, eyes, mouth, nose and ears can be obtained, and then according to The rectangular box calculates the face area to be evaluated.
可选地,五官信息包括五官的坐标,本申请实施例中根据待评估人脸的五官的坐标以及预设的人脸比例(即正常人脸的人脸比例,属于先验知识),可以确定一个用于框选待评估人脸的矩形框,具体可参阅图2。由于该矩形框为待评估人脸的外接矩形,因此矩形框的面积会大于待评估人脸面积。为了得到待评估人脸面积,可以将矩形框内的图像划分为至少两个图像区域,其中,每个图像区域的面积均相等;接下来将该至少两个图像区域中的所有高亮图像区域确定出来,具体可参阅图3,图3中的矩形框内的每一个方格代表一个图像区域,其中的黑色方格即为高亮图像区域;可以看到的是,在高亮图像区域中包括一个连通域,该连通域由若干个高亮图像区域组成,由于每个图像区域的面积均相等,因此,将图像区域的面积乘以连通域中高亮图像区域的数量,即可得到连通域的面积。最后,可以将该连通域的面积作为待评估人脸面积。Optionally, the facial features information includes the coordinates of the facial features. In the embodiment of the present application, it can be determined according to the coordinates of the facial features of the face to be evaluated and the preset facial proportion (that is, the facial proportion of a normal human face, which belongs to prior knowledge). A rectangular box for selecting faces to be evaluated, see Figure 2 for details. Since the rectangular frame is the circumscribing rectangle of the face to be evaluated, the area of the rectangular frame will be larger than the area of the face to be evaluated. In order to obtain the face area to be evaluated, the image in the rectangular frame can be divided into at least two image areas, wherein the area of each image area is equal; then all the highlighted image areas in the at least two image areas are Determined, please refer to Figure 3 for details. Each square in the rectangular frame in Figure 3 represents an image area, and the black square is the highlighted image area; it can be seen that in the highlighted image area It includes a connected domain, which consists of several highlighted image regions. Since the area of each image region is equal, the connected domain can be obtained by multiplying the area of the image region by the number of highlighted image regions in the connected domain. area. Finally, the area of the connected domain can be used as the face area to be evaluated.
举例说明,图3中矩形框内的图像被划分为40个图像区域,在该40 个图像区域中,包括13个高亮图像区域(即13个黑色方格),在该13个高亮图像区域中,又包括2个不属于连通域的高亮图像区域和11个属于连通域的高亮图像区域,假设每个图像区域的面积均为2cm 2,则连通域的面积为一个图像区域的面积2cm 2乘以属于连通域的高亮图像区域的数量11等于22cm 2。应理解的是,图3仅为一个示例,并不对本申请作任何限定。 For example, the image in the rectangular box in Fig. 3 is divided into 40 image areas. Among the 40 image areas, 13 highlighted image areas (ie 13 black squares) are included. In the area, there are 2 highlighted image areas that do not belong to the connected domain and 11 highlighted image areas that belong to the connected domain. Assuming that the area of each image area is 2cm 2 , the area of the connected domain is the area of one image area. The area of 2 cm 2 multiplied by the number of highlighted image regions belonging to the connected domain 11 equals 22 cm 2 . It should be understood that FIG. 3 is only an example, and does not limit the present application in any way.
示例性地,为了在至少两个图像区域中确定出高亮图像区域,可以先计算各个图像区域的平均亮度,例如,对于任一图像区域,可以计算该图像区域中所有像素点的亮度的平均值,得到该图像区域的平均亮度。同时,还需利用自适应阈值算法为矩形框内的图像计算对应的高亮度阈值。最后将每一个图像区域的平均亮度分别与该高亮度阈值进行比较,对于任一图像区域,若该图像区域的平均亮度要高于该高亮度阈值,则将该图像区域确定为高亮度图像区域。Exemplarily, in order to determine the highlighted image areas in at least two image areas, the average brightness of each image area may be calculated first, for example, for any image area, the average brightness of all pixel points in the image area may be calculated. value to get the average brightness of the image area. At the same time, it is also necessary to use an adaptive threshold algorithm to calculate the corresponding high-brightness threshold for the image in the rectangular frame. Finally, the average brightness of each image area is compared with the high-brightness threshold. For any image area, if the average brightness of the image area is higher than the high-brightness threshold, the image area is determined as a high-brightness image area. .
步骤103,根据预设的关系式,计算待评估人脸面积所对应的目标评估曝光量;Step 103, according to the preset relational formula, calculate the target evaluation exposure amount corresponding to the face area to be evaluated;
在本申请实施例中,预设的关系式通过上述步骤S1、S2、S3及S4建立得到,该预设的关系式用于指示人脸(不戴口罩的人脸)的面积与评估曝光量之间的关系。在获取到待评估人脸面积后,将待评估人脸面积代入该预设的关系式中进行计算,得到的计算结果即为待评估人脸面积所对应的评估曝光量,这里将待评估人脸面积对应的评估曝光量记作目标评估曝光量。In the embodiment of the present application, the preset relational expression is established through the above steps S1, S2, S3 and S4, and the preset relational expression is used to indicate the area of the face (face without a mask) and the estimated exposure amount The relationship between. After obtaining the face area to be assessed, the face area to be assessed is substituted into the preset relational expression for calculation, and the obtained calculation result is the estimated exposure amount corresponding to the face area to be assessed. The evaluation exposure corresponding to the face area is recorded as the target evaluation exposure.
可选地,若通过上述步骤S1、S2、S3及S4还建立了戴口罩关系式,则在上述步骤103之前,还需要检测待评估人脸是否戴有口罩。基于此,若检测到待评估人脸戴有口罩,则会将待评估人脸面积代入戴口罩关系式中进行计算,并将计算结果作为待评估人脸面积所对应的目标评估曝光量。其中,戴口罩关系式用于指示人脸(戴有口罩的人脸)的面积与评估曝光量之间的关系。相应地,若检测到待评估人脸未戴有口罩,则依然根据预设的关系式,计算待评估人脸面积所对应的目标评估曝光量。Optionally, if a mask wearing relationship is also established through the above steps S1, S2, S3 and S4, before the above step 103, it is also necessary to detect whether the face to be evaluated wears a mask. Based on this, if it is detected that the face to be assessed is wearing a mask, the face area to be assessed will be substituted into the mask wearing relationship for calculation, and the calculation result will be used as the target assessment exposure corresponding to the face area to be assessed. Among them, the mask-wearing relationship is used to indicate the relationship between the area of the face (face with a mask) and the estimated exposure. Correspondingly, if it is detected that the face to be evaluated does not wear a mask, the target evaluation exposure amount corresponding to the area of the face to be evaluated is still calculated according to the preset relational expression.
步骤104,根据第一实时曝光量和目标评估曝光量确定是否关闭红外灯。Step 104: Determine whether to turn off the infrared lamp according to the first real-time exposure amount and the target estimated exposure amount.
在本申请实施例中,第一实时曝光量即为感光元件在当前时刻的实时曝光量,其中,感光元件属于单色感光元件,只接收红外光。具体地,在红外灯的启动状态下,感光元件会接收到自然光中的红外光和红外灯投射出的红外光(属于窄波红外光),且以红外灯投射出的红外光为主要成分。而在红外灯的关闭状态(即红外灯不投射红外光)下,感光元件会接收到自然光中的红外光(属于宽波红外光),且以自然光中的红外光为主要成分。在计算出目标评估曝光量后,即可根据第一实时曝光量和目标评估曝光量来确定是否关闭红外灯。In the embodiment of the present application, the first real-time exposure amount is the real-time exposure amount of the photosensitive element at the current moment, wherein the photosensitive element belongs to a monochromatic photosensitive element and only receives infrared light. Specifically, when the infrared lamp is activated, the photosensitive element will receive the infrared light in the natural light and the infrared light projected by the infrared lamp (belonging to narrow-wave infrared light), and the infrared light projected by the infrared lamp is the main component. In the off state of the infrared lamp (that is, the infrared lamp does not project infrared light), the photosensitive element will receive infrared light in natural light (belonging to broadband infrared light), and the infrared light in natural light is the main component. After the target evaluation exposure amount is calculated, whether to turn off the infrared lamp can be determined according to the first real-time exposure amount and the target evaluation exposure amount.
示例性地,可以将第一实时曝光量和目标评估曝光量作比较,如果第一实时曝光量大于或等于目标评估曝光量,则不关闭红外灯,即红外灯继续处于开启状态下;如果第一实时曝光量小于目标评估曝光量,则说明在感光元件接收的光中,自然光中的红外光占比已经高于红外灯投射的红外光,此时,可以关闭红外灯。Exemplarily, the first real-time exposure can be compared with the target estimated exposure, and if the first real-time exposure is greater than or equal to the target estimated exposure, the infrared lamp is not turned off, that is, the infrared lamp continues to be on; If the real-time exposure is less than the target evaluation exposure, it means that the proportion of infrared light in the natural light is higher than the infrared light projected by the infrared light in the light received by the photosensitive element. At this time, the infrared light can be turned off.
可选地,还可以在预定时长内,周期性地检测第一实时曝光量是否小于目标评估曝光量。只有在该预定时长内第一实时曝光量均小于目标评估曝光量,才会关闭红外灯。举例说明,若在t1时刻,第一实时曝光量1小于目标评估曝光量1,在t2时刻,第一实时曝光量2小于目标评估曝光量2,则关闭红外灯;若在t1时刻,第一实时曝光量1小于目标评估曝光量1,而在t2时刻,第一实时曝光量2大于目标评估曝光量2,则不关闭红外灯。Optionally, it is also possible to periodically detect whether the first real-time exposure amount is less than the target estimated exposure amount within a predetermined period of time. The infrared light will be turned off only when the first real-time exposure amount is less than the target evaluation exposure amount within the predetermined time period. For example, if at time t1, the first real-time exposure 1 is less than the target estimated exposure 1, and at time t2, the first real-time exposure 2 is less than the target estimated exposure 2, then turn off the infrared light; if at t1, the first The real-time exposure amount 1 is less than the target evaluation exposure amount 1, and at time t2, the first real-time exposure amount 2 is greater than the target evaluation exposure amount 2, and the infrared lamp is not turned off.
可选地,在上述步骤101之后还包括:Optionally, after the above step 101, it also includes:
若红外摄像机采集的图像中不包含待评估人脸,则根据第一实时曝光量和预设的极值评估曝光量确定是否关闭上述红外灯。If the image collected by the infrared camera does not contain the face to be evaluated, it is determined whether to turn off the infrared lamp according to the first real-time exposure amount and the preset extreme value evaluation exposure amount.
在本申请实施例中,若红外摄像机当前采集的图像中不包含待评估人脸,则将第一实时曝光量和预设的极值评估曝光量作比较,其中,极值评估曝光量可以是根据预设的关系式计算的最大的评估曝光量,例如,极值评估曝光量为人脸位于红外摄像机的最近设计距离时,红外摄像机采集的图像中人脸的面积所对应的评估曝光量。若第一实时曝光量大于或等于极值评估曝光量,则不关闭红外灯;若第一实时曝光量小于极值评估曝光量,则关闭红外灯。In the embodiment of the present application, if the image currently collected by the infrared camera does not contain the face to be evaluated, the first real-time exposure is compared with the preset extreme value evaluation exposure, where the extreme value evaluation exposure may be The maximum estimated exposure calculated according to the preset relational expression, for example, the extreme estimated exposure is the estimated exposure corresponding to the area of the face in the image collected by the infrared camera when the face is located at the closest design distance of the infrared camera. If the first real-time exposure amount is greater than or equal to the extreme value evaluation exposure amount, the infrared lamp is not turned off; if the first real-time exposure amount is less than the extreme value evaluation exposure amount, the infrared lamp is turned off.
可选地,关闭红外灯后,红外灯将处于关闭状态,在红外灯的关闭状态下,红外摄像机可以获取第二实时曝光量,其中,第二实时曝光量即感光元件在当前时刻的实时曝光量,然后,根据第二实时曝光量和预设的欠曝光阈值,即可确定是否要启动红外灯。具体地,可以将第二实时曝光量和欠曝光阈值作比较,若第二实时曝光量要小于该欠曝光阈值,则说明红外摄像机当前采集的图像欠曝光,此时,会启动红外灯;若第二实时曝光量要大于或等于该欠曝光阈值,则不会启动红外灯,即红外灯继续处于关闭状态下。Optionally, after the infrared lamp is turned off, the infrared lamp will be in an off state, and in the off state of the infrared lamp, the infrared camera can obtain the second real-time exposure amount, wherein the second real-time exposure amount is the real-time exposure of the photosensitive element at the current moment. Then, according to the second real-time exposure amount and the preset underexposure threshold, it can be determined whether to activate the infrared lamp. Specifically, the second real-time exposure can be compared with the under-exposure threshold. If the second real-time exposure is less than the under-exposure threshold, it means that the image currently collected by the infrared camera is under-exposed, and at this time, the infrared light will be activated; If the second real-time exposure amount is greater than or equal to the under-exposure threshold, the infrared light will not be activated, that is, the infrared light will continue to be turned off.
可选地,由于红外灯可能会频繁地开启和关闭,为了避免出现这种情况,在红外摄像机的工作过程中,可以统计在预定时间段内,启动红外灯的次数与关闭红外灯的次数,然后将启动红外灯的次数与关闭红外灯的次数求和,得到开关总次数,其中,预定时间段为以当前时刻为截至时刻且时间跨度为预设时长的时间段。例如,假设当前时刻为3分16秒,预设时长为15秒,则预定时间段为3分1秒至3分16秒。在得到开关总次数后,可以将开关总次数与预设的次数上限值作比较,如果开关总次数达到了该次数上限值,则会对预设的关系式进行修正。具体地,可以根据预设的修正原则对预设的关系式进行修正,该修正原则为修正后的关系式对应的曲线(即在坐标系中能够代表修正后的关系式的曲线)不会形成凸包。应理解的是,修正后的关系式用于下一次计算待评估人脸面积所对应的目标评估曝光量。Optionally, since the infrared light may be turned on and off frequently, in order to avoid this situation, during the working process of the infrared camera, the number of times the infrared light is turned on and the number of times the infrared light is turned off can be counted within a predetermined period of time. Then, the number of times the infrared lamp is turned on and the number of times of closing the infrared lamp are summed to obtain the total number of switches, wherein the predetermined time period is the time period with the current moment as the cut-off moment and the time span as the preset duration. For example, assuming that the current time is 3 minutes and 16 seconds and the preset duration is 15 seconds, the predetermined time period is 3 minutes and 1 second to 3 minutes and 16 seconds. After the total number of switches is obtained, the total number of switches can be compared with a preset upper limit of the number of times, and if the total number of switches reaches the upper limit of the number of times, the preset relational expression will be corrected. Specifically, the preset relational expression can be corrected according to a preset correction principle, and the correction principle is that the curve corresponding to the corrected relational expression (that is, the curve that can represent the corrected relational expression in the coordinate system) will not form convex hull. It should be understood that the revised relational expression is used for the next calculation of the target evaluation exposure amount corresponding to the face area to be evaluated.
由上可见,本申请方案中在红外灯的启动状态下,首先检测红外摄像机采集的图像中是否包含待评估人脸,若上述红外摄像机采集的图像中包含待评估人脸,则获取待评估人脸面积,上述待评估人脸面积为上述待评估人脸的面积,然后根据预设的关系式,计算上述待评估人脸面积所对应的目标评估曝光量,上述关系式用于指示人脸的面积与评估曝光量之间的关系,最后根据第一实时曝光量和上述目标评估曝光量确定是否关闭上述红外灯,其中,上述第一实时曝光量为上述感光元件在当前时刻的实时曝光量。本申请方案预先建立人脸的面积与评估曝光量之间的关系式,然后通过该关系式计算待评估人脸面积对应的目标评估曝光量,通过比较当前时刻的第一实时曝光量与目标评估曝光量,可以评估当前的环境照度,从而使红外摄像机可以根据外界环境的变化对红外灯进行自动控制,在保证红外摄像机拍摄的图像质量的基础上,降低红外摄像机的功耗。As can be seen from the above, in the solution of the present application, when the infrared lamp is activated, it is first detected whether the image collected by the infrared camera contains the face to be evaluated. Face area, the above-mentioned face area to be evaluated is the area of the above-mentioned face to be evaluated, and then according to a preset relational formula, the target evaluation exposure amount corresponding to the above-mentioned face area to be evaluated is calculated, and the above-mentioned relational formula is used to indicate the face. The relationship between the area and the estimated exposure amount, and finally determine whether to turn off the infrared lamp according to the first real-time exposure amount and the target estimated exposure amount, wherein the first real-time exposure amount is the real-time exposure amount of the photosensitive element at the current moment. The solution of the present application establishes a relational expression between the area of the face and the estimated exposure in advance, and then calculates the target estimated exposure corresponding to the face area to be assessed through the relational expression, and compares the first real-time exposure at the current moment with the target estimated exposure. Exposure can evaluate the current environmental illumination, so that the infrared camera can automatically control the infrared lamp according to the changes of the external environment, and reduce the power consumption of the infrared camera on the basis of ensuring the image quality of the infrared camera.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence numbers of the steps in the above embodiments does not mean the sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
图4示出了本申请实施例提供的一种控制装置的结构示意图,该控制装置应用于红外摄像机,该红外摄像机包括红外灯和用于接收红外光的感光元件,为了便于说明,仅示出了与本申请实施例相关的部分。FIG. 4 shows a schematic structural diagram of a control device provided by an embodiment of the present application. The control device is applied to an infrared camera. The infrared camera includes an infrared lamp and a photosensitive element for receiving infrared light. For convenience of description, only the Parts related to the embodiments of the present application are described.
该控制装置400包括:The control device 400 includes:
人脸检测单元401,用于在上述红外灯的启动状态下,检测上述红外摄像机采集的图像中是否包含待评估人脸;A face detection unit 401, configured to detect whether the image collected by the infrared camera contains a face to be evaluated under the activation state of the infrared lamp;
人脸面积获取单元402,用于若上述红外摄像机采集的图像中包含待评估人脸,则获取待评估人脸面积,上述待评估人脸面积为上述待评估人脸的面积;A face area obtaining unit 402, configured to obtain the face area to be evaluated if the image collected by the infrared camera includes the face to be evaluated, and the area of the face to be evaluated is the area of the face to be evaluated;
评估曝光计算单元403,用于根据预设的关系式,计算上述待评估人脸面积所对应的目标评估曝光量,上述关系式用于指示人脸的面积与评估曝光量之间的关系;The evaluation exposure calculation unit 403 is used to calculate the target evaluation exposure amount corresponding to the above-mentioned face area to be evaluated according to a preset relational expression, and the above-mentioned relational expression is used to indicate the relationship between the area of the human face and the evaluation exposure amount;
红外灯控制单元404,用于根据第一实时曝光量和上述目标评估曝光量确定是否关闭上述红外灯,其中,上述第一实时曝光量为上述感光元件在当前时刻的实时曝光量。The infrared lamp control unit 404 is configured to determine whether to turn off the infrared lamp according to the first real-time exposure amount and the target evaluation exposure amount, wherein the first real-time exposure amount is the real-time exposure amount of the photosensitive element at the current moment.
可选地,上述人脸面积获取单元402还包括:Optionally, the above-mentioned face area obtaining unit 402 further includes:
五官信息获取子单元,用于若上述红外摄像机采集的图像中包含待评估人脸,则获取上述待评估人脸的五官信息;The facial features information acquisition subunit is configured to acquire the facial features information of the above-mentioned face to be evaluated if the image collected by the above-mentioned infrared camera includes the face to be evaluated;
第一人脸面积获取子单元,用于根据上述五官信息,获得上述待评估人脸面积。The first face area obtaining subunit is used to obtain the above-mentioned face area to be evaluated according to the above-mentioned facial feature information.
可选地,上述五官信息包括五官的坐标,上述第一人脸面积获取子单元还包括:Optionally, the above-mentioned facial features information includes the coordinates of facial features, and the above-mentioned first face area acquisition subunit further includes:
矩形框确定子单元,用于根据上述五官的坐标和预设的人脸比例,确定用于框选上述待评估人脸的矩形框;a rectangular frame determination subunit, used for determining a rectangular frame for frame selection of the above-mentioned face to be evaluated according to the coordinates of the above-mentioned facial features and a preset face ratio;
矩形框划分子单元,用于将上述矩形框内的图像划分为至少两个图像区域;a rectangular frame dividing subunit, used for dividing the image in the above-mentioned rectangular frame into at least two image areas;
高亮区确定子单元,用于在上述至少两个图像区域中确定出高亮图像区域;a highlight area determination subunit, configured to determine a highlight image area in the at least two image areas;
第二人脸面积获取子单元,用于将上述高亮图像区域中的连通域的面积作为上述待评估人脸面积。The second face area acquisition subunit is configured to use the area of the connected domain in the highlighted image area as the face area to be evaluated.
可选地,上述高亮区确定子单元还包括:Optionally, the above-mentioned highlight area determination subunit further includes:
亮度计算子单元,用于计算各个图像区域的平均亮度;a brightness calculation subunit, used to calculate the average brightness of each image area;
亮度阈值计算子单元,用于用自适应阈值算法为上述矩形框内的图像计算对应的高亮度阈值;a brightness threshold calculation subunit, used for calculating a corresponding high brightness threshold for the image in the above-mentioned rectangular frame with an adaptive threshold algorithm;
阈值确定高亮区子单元,用于将平均亮度高于上述高亮度阈值的图像区域确定为高亮图像区域。The threshold determination highlight subunit is used to determine an image area whose average brightness is higher than the aforementioned high brightness threshold as a highlight image area.
可选地,上述红外灯控制单元404,还用于若上述红外摄像机采集的图像中不包含待评估人脸,则根据上述第一实时曝光量和预设的极值评估曝光量确定是否关闭上述红外灯。Optionally, the above-mentioned infrared lamp control unit 404 is further configured to determine whether to close the above-mentioned according to the above-mentioned first real-time exposure amount and the preset extreme value evaluation exposure amount if the image collected by the above-mentioned infrared camera does not contain the face to be evaluated. Infrared light.
可选地,上述红外灯控制单元404,还用于在上述红外灯的关闭状态下,根据第二实时曝光量和预设的欠曝光阈值确定是否启动上述红外灯,其中,上述第二实时曝光量为上述感光元件在当前时刻的实时曝光量。Optionally, the above-mentioned infrared lamp control unit 404 is further configured to determine whether to activate the above-mentioned infrared lamp according to the second real-time exposure amount and the preset under-exposure threshold when the above-mentioned infrared lamp is turned off, wherein the above-mentioned second real-time exposure The amount is the real-time exposure amount of the above-mentioned photosensitive element at the current moment.
可选地,上述控制装置400还包括:Optionally, the above-mentioned control device 400 further includes:
次数统计单元,用于统计预定时间段内启动上述红外灯的次数与关闭上述红外灯的次数之和,得到开关总次数,上述预定时间段为以当前时刻为截止时刻的预设时长的时间段;The number of times counting unit is used to count the sum of the number of times of starting the above-mentioned infrared lamps and the times of turning off the above-mentioned infrared lamps within a predetermined period of time, to obtain the total number of switches, and the above-mentioned predetermined period of time is a preset time period with the current moment as the cut-off time. ;
关系式修正单元,用于若上述开关总次数达到预设的次数上限值,则对上述关系式进行修正。The relational expression correction unit is configured to correct the above-mentioned relational expression if the total number of times of switching reaches a preset upper limit of the number of times.
由上可见,本申请方案中在红外灯的启动状态下,首先检测红外摄像机采集的图像中是否包含待评估人脸,若上述红外摄像机采集的图像中包含待评估人脸,则获取待评估人脸面积,上述待评估人脸面积为上述待评估人脸的面积,然后根据预设的关系式,计算上述待评估人脸面积所对应的目标评估曝光量,上述关系式用于指示人脸的面积与评估曝光量之间的关系,最后根据第一实时曝光量和上述目标评估曝光量确定是否关闭上述红外灯,其中,上述第一实时曝光量为上述感光元件在当前时刻的实时曝光量。本申请方案预先建立人脸的面积与评估曝光量之间的关系式,然后通过该关系式计算待评估人脸面积对应的目标评估曝光量,通过比较当前时刻的第一实时曝光量与目标评估曝光量,可以评估当前的环境照度,从而使红外摄像机可以根据外界环境的变化对红外灯进行自动控制,在保证红外摄像机拍摄的图像质量的基础上,降低红外摄像机的功耗。As can be seen from the above, in the solution of the present application, when the infrared lamp is activated, it is first detected whether the image collected by the infrared camera contains the face to be evaluated. Face area, the above-mentioned face area to be evaluated is the area of the above-mentioned face to be evaluated, and then according to a preset relational formula, the target evaluation exposure amount corresponding to the above-mentioned face area to be evaluated is calculated, and the above-mentioned relational formula is used to indicate the face. The relationship between the area and the estimated exposure amount, and finally determine whether to turn off the infrared lamp according to the first real-time exposure amount and the target estimated exposure amount, wherein the first real-time exposure amount is the real-time exposure amount of the photosensitive element at the current moment. The solution of the present application establishes a relational expression between the area of the face and the estimated exposure in advance, and then calculates the target estimated exposure corresponding to the face area to be assessed through the relational expression, and compares the first real-time exposure at the current moment with the target estimated exposure. Exposure can evaluate the current environmental illumination, so that the infrared camera can automatically control the infrared lamp according to the changes of the external environment, and reduce the power consumption of the infrared camera on the basis of ensuring the image quality of the infrared camera.
图5为本申请一实施例提供的红外摄像机的结构示意图。如图5所示,该实施例的红外摄像机5包括:至少一个处理器50(图5中仅示出一个)、存储器51、存储在上述存储器51中并可在上述至少一个处理器50上运行的计算机程序52、红外灯53及用于接收红外光的感光元件54,上述处理器50执行上述计算机程序52时实现以下步骤:FIG. 5 is a schematic structural diagram of an infrared camera provided by an embodiment of the present application. As shown in FIG. 5 , the infrared camera 5 of this embodiment includes: at least one processor 50 (only one is shown in FIG. 5 ), a memory 51 , which is stored in the above-mentioned memory 51 and can run on the above-mentioned at least one processor 50 The computer program 52, the infrared lamp 53 and the photosensitive element 54 for receiving infrared light, the above-mentioned processor 50 implements the following steps when executing the above-mentioned computer program 52:
在上述红外灯的启动状态下,检测上述红外摄像机采集的图像中是否包含待评估人脸;In the activated state of the above-mentioned infrared light, detecting whether the image collected by the above-mentioned infrared camera contains the face to be evaluated;
若上述红外摄像机采集的图像中包含待评估人脸,则获取待评估人脸面积,上述待评估人脸面积为上述待评估人脸的面积;If the image collected by the above-mentioned infrared camera includes the face to be evaluated, the area of the face to be evaluated is obtained, and the above-mentioned area of the face to be evaluated is the area of the above-mentioned face to be evaluated;
根据预设的关系式,计算上述待评估人脸面积所对应的目标评估曝光量,上述关系式用于指示人脸的面积与评估曝光量之间的关系;Calculate the target evaluation exposure amount corresponding to the face area to be evaluated according to a preset relational expression, and the above relational expression is used to indicate the relationship between the face area and the evaluation exposure amount;
根据第一实时曝光量和上述目标评估曝光量确定是否关闭上述红外灯,其中,上述第一实时曝光量为上述感光元件在当前时刻的实时曝光量。Whether to turn off the infrared lamp is determined according to the first real-time exposure amount and the target evaluation exposure amount, wherein the first real-time exposure amount is the real-time exposure amount of the photosensitive element at the current moment.
假设上述为第一种可能的实施方式,则在第一种可能的实施方式作为基础而提供的第二种可能的实施方式中,上述若上述红外摄像机采集的图像中包含待评估人脸,则获取待评估人脸面积,包括:Assuming that the above is the first possible implementation manner, in the second possible implementation manner provided on the basis of the first possible implementation manner, if the above-mentioned image collected by the infrared camera includes the face to be evaluated, then Obtain the face area to be evaluated, including:
若上述红外摄像机采集的图像中包含待评估人脸,则获取上述待评估人脸的五官信息;If the image collected by the above-mentioned infrared camera includes the face to be evaluated, obtain the facial feature information of the above-mentioned face to be evaluated;
根据上述五官信息,获得上述待评估人脸面积。According to the above-mentioned facial features information, the above-mentioned face area to be evaluated is obtained.
在上述第二种可能的实施方式作为基础而提供的第三种可能的实施方式中,上述五官信息包括五官的坐标,上述根据上述五官信息,获得上述待评估人脸面积,包括:In the third possible implementation manner provided on the basis of the above-mentioned second possible implementation manner, the above-mentioned facial features information includes the coordinates of the facial features, and the above-mentioned obtaining the above-mentioned face area to be evaluated according to the above-mentioned facial feature information includes:
根据上述五官的坐标和预设的人脸比例,确定用于框选上述待评估人脸的矩形框;According to the coordinates of the above-mentioned facial features and the preset face ratio, determine a rectangular frame for selecting the above-mentioned face to be evaluated;
将上述矩形框内的图像划分为至少两个图像区域;dividing the image in the above-mentioned rectangular frame into at least two image areas;
在上述至少两个图像区域中确定出高亮图像区域;determining a highlighted image area in the at least two image areas;
将上述高亮图像区域中的连通域的面积作为上述待评估人脸面积。The area of the connected domain in the above highlighted image area is taken as the above face area to be evaluated.
在上述第三种可能的实施方式作为基础而提供的第四种可能的实施方式中,上述在上述至少两个图像区域中确定出高亮图像区域,包括:In the fourth possible implementation manner provided on the basis of the above-mentioned third possible implementation manner, the above-mentioned determination of the highlighted image area in the above-mentioned at least two image areas includes:
计算各个图像区域的平均亮度;Calculate the average brightness of each image area;
利用自适应阈值算法为上述矩形框内的图像计算对应的高亮度阈值;Use the adaptive threshold algorithm to calculate the corresponding high-brightness threshold for the image in the above-mentioned rectangular frame;
将平均亮度高于上述高亮度阈值的图像区域确定为高亮图像区域。An image area whose average brightness is higher than the above-mentioned high-brightness threshold is determined as a high-brightness image area.
在上述第一种可能的实施方式作为基础,或上述第二种可能的实施方式作为基础,或上述第三种可能的实施方式作为基础,或上述第四种可能的实施方式作为基础而提供的第五种可能的实施方式中,在上述检测上述红外摄像机采集的图像中是否包含待评估人脸之后,上述处理器50执行上述计算机程序52时实现以下步骤:Based on the above-mentioned first possible implementation manner, or the above-mentioned second possible implementation manner as a basis, or the above-mentioned third possible implementation manner as a basis, or the above-mentioned fourth possible implementation manner In a fifth possible implementation manner, after the above-mentioned detection of whether the image collected by the above-mentioned infrared camera contains a face to be evaluated, the above-mentioned processor 50 implements the following steps when executing the above-mentioned computer program 52:
若上述红外摄像机采集的图像中不包含待评估人脸,则根据上述第一实时曝光量和预设的极值评估曝光量确定是否关闭上述红外灯。If the image collected by the infrared camera does not contain the face to be evaluated, then whether to turn off the infrared lamp is determined according to the first real-time exposure amount and the preset extreme value evaluation exposure amount.
在上述第一种可能的实施方式作为基础,或上述第二种可能的实施方式作为基础,或上述第三种可能的实施方式作为基础,或上述第四种可能的实施方式作为基础而提供的第六种可能的实施方式中,上述处理器50执行上述计算机程序52时实现以下步骤:Based on the above-mentioned first possible implementation manner, or the above-mentioned second possible implementation manner as a basis, or the above-mentioned third possible implementation manner as a basis, or the above-mentioned fourth possible implementation manner In a sixth possible implementation manner, when the above-mentioned processor 50 executes the above-mentioned computer program 52, the following steps are implemented:
在上述红外灯的关闭状态下,根据第二实时曝光量和预设的欠曝光阈值确定是否启动上述红外灯,其中,上述第二实时曝光量为上述感光元件在当前时刻的实时曝光量。In the off state of the infrared lamp, whether to activate the infrared lamp is determined according to a second real-time exposure amount and a preset underexposure threshold, wherein the second real-time exposure amount is the real-time exposure amount of the photosensitive element at the current moment.
在上述第一种可能的实施方式作为基础,或上述第二种可能的实施方式作为基础,或上述第三种可能的实施方式作为基础,或上述第四种可能的实施方式作为基础而提供的第七种可能的实施方式中,上述处理器50执行上述计算机程序52时实现以下步骤:Based on the above-mentioned first possible implementation manner, or the above-mentioned second possible implementation manner as a basis, or the above-mentioned third possible implementation manner as a basis, or the above-mentioned fourth possible implementation manner In a seventh possible implementation manner, the processor 50 implements the following steps when executing the computer program 52:
统计预定时间段内启动上述红外灯的次数与关闭上述红外灯的次数之和,得到开关总次数,上述预定时间段为以当前时刻为截止时刻的预设时长的时间段;Counting the sum of the number of times of starting the above-mentioned infrared lamps and the times of turning off the above-mentioned infrared lamps within a predetermined time period to obtain the total number of switches, and the above-mentioned predetermined time period is a time period of a preset duration with the current moment as the cut-off time;
若上述开关总次数达到预设的次数上限值,则对上述关系式进行修正。If the above-mentioned total number of times of switching reaches the preset upper limit of the times, the above-mentioned relational expression is corrected.
上述红外摄像机可包括,但不仅限于,处理器50、存储器51。本领域技术人员可以理解,图5仅仅是红外摄像机5的举例,并不构成对红外摄像机5的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如还可以包括输入输出设备、网络接入设备等。The above infrared camera may include, but is not limited to, the processor 50 and the memory 51 . Those skilled in the art can understand that FIG. 5 is only an example of the infrared camera 5, and does not constitute a limitation on the infrared camera 5, and may include more or less components than the one shown, or combine some components, or different components , for example, may also include input and output devices, network access devices, and the like.
所称处理器50可以是中央处理单元(Central Processing Unit,CPU),该处理器50还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application Specific Integrated Circuit,ASIC)、现成可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 50 may be a central processing unit (Central Processing Unit, CPU), and the processor 50 may also be other general-purpose processors, digital signal processors (Digital Signal Processors) Processor, DSP), application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
上述存储器51在一些实施例中可以是上述红外摄像机5的内部存储单元,例如红外摄像机5的硬盘或内存。上述存储器51在另一些实施例中也可以是上述红外摄像机5的外部存储设备,例如上述红外摄像机5上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。进一步地,上述存储器51还可以既包括上述红外摄像机5的内部存储单元也包括外部存储设备。上述存储器51用于存储操作系统、应用程序、引导装载程序(BootLoader)、数据以及其他程序等,例如上述计算机程序的程序代码等。上述存储器51还可以用于暂时地存储已经输出或者将要输出的数据。The above-mentioned memory 51 may be an internal storage unit of the above-mentioned infrared camera 5 in some embodiments, such as a hard disk or a memory of the infrared camera 5 . In other embodiments, the above-mentioned memory 51 may also be an external storage device of the above-mentioned infrared camera 5, for example, a plug-in hard disk equipped on the above-mentioned infrared camera 5, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital) , SD) card, flash memory card (Flash Card), etc. Further, the above-mentioned memory 51 may also include both the internal storage unit of the above-mentioned infrared camera 5 and an external storage device. The above-mentioned memory 51 is used to store an operating system, an application program, a boot loader (Boot Loader), data, and other programs, for example, program codes of the above-mentioned computer programs. The above-mentioned memory 51 can also be used to temporarily store data that has been output or is to be output.
由上可见,本申请方案中在红外灯的启动状态下,首先检测红外摄像机采集的图像中是否包含待评估人脸,若上述红外摄像机采集的图像中包含待评估人脸,则获取待评估人脸面积,上述待评估人脸面积为上述待评估人脸的面积,然后根据预设的关系式,计算上述待评估人脸面积所对应的目标评估曝光量,上述关系式用于指示人脸的面积与评估曝光量之间的关系,最后根据第一实时曝光量和上述目标评估曝光量确定是否关闭上述红外灯,其中,上述第一实时曝光量为上述感光元件在当前时刻的实时曝光量。本申请方案预先建立人脸的面积与评估曝光量之间的关系式,然后通过该关系式计算待评估人脸面积对应的目标评估曝光量,通过比较当前时刻的第一实时曝光量与目标评估曝光量,可以评估当前的环境照度,从而使红外摄像机可以根据外界环境的变化对红外灯进行自动控制,在保证红外摄像机拍摄的图像质量的基础上,降低红外摄像机的功耗。As can be seen from the above, in the solution of the present application, when the infrared lamp is activated, it is first detected whether the image collected by the infrared camera contains the face to be evaluated. Face area, the above-mentioned face area to be evaluated is the area of the above-mentioned face to be evaluated, and then according to a preset relational formula, the target evaluation exposure amount corresponding to the above-mentioned face area to be evaluated is calculated, and the above-mentioned relational formula is used to indicate the face. The relationship between the area and the estimated exposure amount, and finally determine whether to turn off the infrared lamp according to the first real-time exposure amount and the target estimated exposure amount, wherein the first real-time exposure amount is the real-time exposure amount of the photosensitive element at the current moment. The solution of the present application establishes a relational expression between the area of the face and the estimated exposure in advance, and then calculates the target estimated exposure corresponding to the face area to be assessed through the relational expression, and compares the first real-time exposure at the current moment with the target estimated exposure. Exposure can evaluate the current environmental illumination, so that the infrared camera can automatically control the infrared lamp according to the changes of the external environment, and reduce the power consumption of the infrared camera on the basis of ensuring the image quality of the infrared camera.
需要说明的是,上述装置/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其具体功能及带来的技术效果,具体可参见方法实施例部分,此处不再赘述。It should be noted that the information exchange, execution process and other contents between the above-mentioned devices/units are based on the same concept as the method embodiments of the present application. For specific functions and technical effects, please refer to the method embodiments section. It is not repeated here.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将上述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned functions can be allocated to different functional units, The module is completed, that is, the internal structure of the above-mentioned apparatus is divided into different functional units or modules, so as to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit, and the above-mentioned integrated units may adopt hardware. It can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application. For the specific working process of the units and modules in the above-mentioned system, reference may be made to the corresponding process in the foregoing method embodiments, which will not be repeated here.
本申请实施例还提供了一种计算机可读存储介质,上述计算机可读存储介质存储有计算机程序,上述计算机程序被处理器执行时实现上述各个方法实施例中的步骤。An embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the steps in each of the foregoing method embodiments.
本申请实施例提供了一种计算机程序产品,当计算机程序产品在红外摄像机上运行时,使得红外摄像机执行上述各个方法实施例中的步骤。The embodiments of the present application provide a computer program product, when the computer program product is run on an infrared camera, the infrared camera is made to perform the steps in the foregoing method embodiments.
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,上述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,上述计算机程序包括计算机程序代码,上述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。上述计算机可读介质至少可以包括:能够将计算机程序代码携带到红外摄像机的任何实体或装置、记录介质、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质。例如U盘、移动硬盘、磁碟或者光盘等。在某些司法管辖区,根据立法和专利实践,计算机可读介质不可以是电载波信号和电信信号。If the above-mentioned integrated units are implemented in the form of software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on this understanding, the present application realizes all or part of the processes in the methods of the above-mentioned embodiments, which can be completed by instructing the relevant hardware through a computer program, and the above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program is in When executed by the processor, the steps of each of the above method embodiments can be implemented. Wherein, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code may be in the form of source code, object code form, executable file or some intermediate form. The above-mentioned computer-readable medium may include at least: any entity or device capable of carrying computer program codes to the infrared camera, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signals, telecommunication signals, and software distribution media. For example, U disk, mobile hard disk, disk or CD, etc. In some jurisdictions, under legislation and patent practice, computer readable media may not be electrical carrier signals and telecommunications signals.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the description of each embodiment has its own emphasis. For parts that are not described or described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的装置/网络设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/网络设备实施例仅仅是示意性的,例如,上述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed apparatus/network device and method may be implemented in other manners. For example, the apparatus/network device embodiments described above are only illustrative. For example, the division of the above modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or Components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The above-mentioned units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The recorded technical solutions 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 application, and should be included in the application. within the scope of protection.

Claims (10)

  1. 一种控制方法,其特征在于,应用于红外摄像机,所述红外摄像机包括红外灯和用于接收红外光的感光元件,所述控制方法包括:A control method, characterized in that it is applied to an infrared camera, the infrared camera includes an infrared lamp and a photosensitive element for receiving infrared light, and the control method includes:
    在所述红外灯的启动状态下,检测所述红外摄像机采集的图像中是否包含待评估人脸;In the activated state of the infrared light, detecting whether the image collected by the infrared camera contains the face to be evaluated;
    若所述红外摄像机采集的图像中包含待评估人脸,则获取待评估人脸面积,所述待评估人脸面积为所述待评估人脸的面积;If the image collected by the infrared camera includes the face to be evaluated, the area of the face to be evaluated is obtained, and the area of the face to be evaluated is the area of the face to be evaluated;
    根据预设的关系式,计算所述待评估人脸面积所对应的目标评估曝光量,所述关系式用于指示人脸的面积与评估曝光量之间的关系;Calculate the target evaluation exposure amount corresponding to the face area to be evaluated according to a preset relational expression, and the relational expression is used to indicate the relationship between the area of the human face and the evaluation exposure amount;
    根据第一实时曝光量和所述目标评估曝光量确定是否关闭所述红外灯,其中,所述第一实时曝光量为所述感光元件在当前时刻的实时曝光量。Whether to turn off the infrared lamp is determined according to the first real-time exposure amount and the target estimated exposure amount, wherein the first real-time exposure amount is the real-time exposure amount of the photosensitive element at the current moment.
  2. 根据权利要求1所述的控制方法,其特征在于,所述若所述红外摄像机采集的图像中包含待评估人脸,则获取待评估人脸面积,包括:The control method according to claim 1, wherein, if the image collected by the infrared camera includes a face to be evaluated, obtaining the area of the face to be evaluated includes:
    若所述红外摄像机采集的图像中包含待评估人脸,则获取所述待评估人脸的五官信息;If the image collected by the infrared camera includes the face to be evaluated, obtain the facial features information of the face to be evaluated;
    根据所述五官信息,获得所述待评估人脸面积。According to the facial features information, the face area to be evaluated is obtained.
  3. 根据权利要求2所述的控制方法,其特征在于,所述五官信息包括五官的坐标,所述根据所述五官信息,获得所述待评估人脸面积,包括:The control method according to claim 2, wherein the facial features information includes coordinates of facial features, and obtaining the face area to be evaluated according to the facial feature information includes:
    根据所述五官的坐标和预设的人脸比例,确定用于框选所述待评估人脸的矩形框;According to the coordinates of the facial features and a preset face ratio, determine a rectangular frame for frame selection of the face to be evaluated;
    将所述矩形框内的图像划分为至少两个图像区域;dividing the image in the rectangular frame into at least two image areas;
    在所述至少两个图像区域中确定出高亮图像区域;determining a highlighted image area in the at least two image areas;
    将所述高亮图像区域中的连通域的面积作为所述待评估人脸面积。The area of the connected domain in the highlighted image area is taken as the face area to be evaluated.
  4. 根据权利要求3所述的控制方法,其特征在于,所述在所述至少两个图像区域中确定出高亮图像区域,包括:The control method according to claim 3, wherein the determining a highlighted image area in the at least two image areas comprises:
    计算各个图像区域的平均亮度;Calculate the average brightness of each image area;
    利用自适应阈值算法为所述矩形框内的图像计算对应的高亮度阈值;Using an adaptive threshold algorithm to calculate a corresponding high-brightness threshold for the image in the rectangular frame;
    将平均亮度高于所述高亮度阈值的图像区域确定为高亮图像区域。An image region whose average brightness is higher than the high brightness threshold is determined as a highlight image region.
  5. 根据权利要求1至4任一项所述的控制方法,其特征在于,在所述检测所述红外摄像机采集的图像中是否包含待评估人脸之后,所述控制方法还包括:The control method according to any one of claims 1 to 4, wherein after detecting whether the image collected by the infrared camera contains a face to be evaluated, the control method further comprises:
    若所述红外摄像机采集的图像中不包含待评估人脸,则根据所述第一实时曝光量和预设的极值评估曝光量确定是否关闭所述红外灯。If the image collected by the infrared camera does not contain the face to be evaluated, it is determined whether to turn off the infrared lamp according to the first real-time exposure amount and the preset extreme value evaluation exposure amount.
  6. 根据权利要求1至4任一项所述的控制方法,其特征在于,所述控制方法还包括:The control method according to any one of claims 1 to 4, wherein the control method further comprises:
    在所述红外灯的关闭状态下,根据第二实时曝光量和预设的欠曝光阈值确定是否启动所述红外灯,其中,所述第二实时曝光量为所述感光元件在当前时刻的实时曝光量。In the off state of the infrared lamp, whether to activate the infrared lamp is determined according to a second real-time exposure amount and a preset underexposure threshold, wherein the second real-time exposure amount is the real-time exposure of the photosensitive element at the current moment. exposure.
  7. 根据权利要求1至4任一项所述的控制方法,其特征在于,所述控制方法还包括:The control method according to any one of claims 1 to 4, wherein the control method further comprises:
    统计预定时间段内启动所述红外灯的次数与关闭所述红外灯的次数之和,得到开关总次数,所述预定时间段为以当前时刻为截止时刻的预设时长的时间段;Counting the sum of the number of times of starting the infrared light and the number of times of turning off the infrared light within a predetermined time period to obtain the total number of switches, and the predetermined time period is a time period of a preset duration with the current time as the cut-off time;
    若所述开关总次数达到预设的次数上限值,则对所述关系式进行修正。If the total number of switches reaches a preset upper limit of the number of times, the relational expression is corrected.
  8. 一种控制装置,其特征在于,应用于红外摄像机,所述红外摄像机包括红外灯和用于接收红外光的感光元件,所述控制装置包括:A control device, characterized in that it is applied to an infrared camera, the infrared camera includes an infrared lamp and a photosensitive element for receiving infrared light, and the control device includes:
    人脸检测单元,用于在所述红外灯的启动状态下,检测所述红外摄像机采集的图像中是否包含待评估人脸;a face detection unit, configured to detect whether the image collected by the infrared camera contains a face to be evaluated when the infrared lamp is activated;
    人脸面积获取单元,用于若所述红外摄像机采集的图像中包含待评估人脸,则获取待评估人脸面积,所述待评估人脸面积为所述待评估人脸的面积;a face area obtaining unit, configured to obtain the face area to be assessed if the image collected by the infrared camera includes the face to be assessed, and the face area to be assessed is the area of the face to be assessed;
    评估曝光计算单元,用于根据预设的关系式,计算所述待评估人脸面积所对应的目标评估曝光量,所述关系式用于指示人脸的面积与评估曝光量之间的关系;An evaluation exposure calculation unit, configured to calculate the target evaluation exposure amount corresponding to the face area to be evaluated according to a preset relational expression, and the relational expression is used to indicate the relationship between the area of the human face and the evaluation exposure amount;
    红外灯控制单元,用于根据第一实时曝光量和所述目标评估曝光量确定是否关闭所述红外灯,其中,所述第一实时曝光量为所述感光元件在当前时刻的实时曝光量。An infrared lamp control unit, configured to determine whether to turn off the infrared lamp according to a first real-time exposure amount and the target evaluation exposure amount, wherein the first real-time exposure amount is the real-time exposure amount of the photosensitive element at the current moment.
  9. 一种红外摄像机,包括红外灯、用于接收红外光的感光元件、存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至7任一项所述的方法。An infrared camera, comprising an infrared lamp, a photosensitive element for receiving infrared light, a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that the processor A method as claimed in any one of claims 1 to 7 is implemented when the computer program is executed.
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7任一项所述的方法。A computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
PCT/CN2020/100637 2020-07-07 2020-07-07 Control method, control apparatus, and infrared camera WO2022006739A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/100637 WO2022006739A1 (en) 2020-07-07 2020-07-07 Control method, control apparatus, and infrared camera
CN202080001191.7A CN111937497B (en) 2020-07-07 2020-07-07 Control method, control device and infrared camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/100637 WO2022006739A1 (en) 2020-07-07 2020-07-07 Control method, control apparatus, and infrared camera

Publications (1)

Publication Number Publication Date
WO2022006739A1 true WO2022006739A1 (en) 2022-01-13

Family

ID=73335285

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/100637 WO2022006739A1 (en) 2020-07-07 2020-07-07 Control method, control apparatus, and infrared camera

Country Status (2)

Country Link
CN (1) CN111937497B (en)
WO (1) WO2022006739A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114993199A (en) * 2022-07-29 2022-09-02 保利长大工程有限公司 Tunnel deformation monitoring system and control method thereof
CN115294676A (en) * 2022-07-08 2022-11-04 重庆甲智甲创科技有限公司 Face recognition unlocking method and face recognition unlocking device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170061210A1 (en) * 2015-08-26 2017-03-02 Intel Corporation Infrared lamp control for use with iris recognition authentication
CN107734225A (en) * 2017-10-24 2018-02-23 维沃移动通信有限公司 A kind of image pickup method and device
CN110351543A (en) * 2018-04-03 2019-10-18 联发科技股份有限公司 The method and device of the infrared line projection's control of adaptability
CN110610176A (en) * 2019-08-08 2019-12-24 宁波中国科学院信息技术应用研究院 Exposure self-adaptive adjusting method based on face brightness

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109241908A (en) * 2018-09-04 2019-01-18 深圳市宇墨科技有限公司 Face identification method and relevant apparatus
CN110084207A (en) * 2019-04-30 2019-08-02 惠州市德赛西威智能交通技术研究院有限公司 Automatically adjust exposure method, device and the storage medium of face light exposure

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170061210A1 (en) * 2015-08-26 2017-03-02 Intel Corporation Infrared lamp control for use with iris recognition authentication
CN107734225A (en) * 2017-10-24 2018-02-23 维沃移动通信有限公司 A kind of image pickup method and device
CN110351543A (en) * 2018-04-03 2019-10-18 联发科技股份有限公司 The method and device of the infrared line projection's control of adaptability
CN110610176A (en) * 2019-08-08 2019-12-24 宁波中国科学院信息技术应用研究院 Exposure self-adaptive adjusting method based on face brightness

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115294676A (en) * 2022-07-08 2022-11-04 重庆甲智甲创科技有限公司 Face recognition unlocking method and face recognition unlocking device
CN115294676B (en) * 2022-07-08 2024-03-19 重庆甲智甲创科技有限公司 Face recognition unlocking method and face recognition unlocking device
CN114993199A (en) * 2022-07-29 2022-09-02 保利长大工程有限公司 Tunnel deformation monitoring system and control method thereof
CN114993199B (en) * 2022-07-29 2022-11-08 保利长大工程有限公司 Tunnel deformation monitoring system and control method thereof

Also Published As

Publication number Publication date
CN111937497B (en) 2024-02-09
CN111937497A (en) 2020-11-13

Similar Documents

Publication Publication Date Title
KR101916355B1 (en) Photographing method of dual-lens device, and dual-lens device
CN108322646B (en) Image processing method, image processing device, storage medium and electronic equipment
CN109166156B (en) Camera calibration image generation method, mobile terminal and storage medium
WO2021083059A1 (en) Image super-resolution reconstruction method, image super-resolution reconstruction apparatus, and electronic device
WO2022006739A1 (en) Control method, control apparatus, and infrared camera
WO2018223394A1 (en) Method and apparatus for photographing image
WO2017206444A1 (en) Method and device for detecting imaging difference, and computer storage medium
CN112672114A (en) Method, system, equipment and storage medium for switching day and night modes of monitoring equipment
WO2020034739A1 (en) Control method and apparatus, electronic device, and computer readable storage medium
WO2021046793A1 (en) Image acquisition method and apparatus, and storage medium
CN112532891A (en) Photographing method and device
CN112668636A (en) Camera shielding detection method and system, electronic equipment and storage medium
WO2022252877A1 (en) Image processing chip, and abnormality processing method applied to image processing chip
US10972676B2 (en) Image processing method and electronic device capable of optimizing hdr image by using depth information
CN111741228A (en) Exposure adjusting method and device for panoramic image
CN107343154B (en) Method, device and system for determining exposure parameters of camera device
US20190045100A1 (en) Image processing device, method, and program
WO2022105277A1 (en) Projection control method and apparatus, projection optical machine, and readable storage medium
CN116506737A (en) Method, device, equipment and storage medium for determining exposure parameters
CN109729276A (en) Near-infrared image capture method, device, equipment and storage medium
WO2022027432A1 (en) Photography method, photographic apparatus, and terminal device
CN114430461B (en) Method, device, terminal and storage medium for realizing soft photosensitivity based on deep learning
TWI630818B (en) Dynamic image feature enhancement method and system
US11575841B2 (en) Information processing apparatus, imaging apparatus, method, and storage medium
CN111479064B (en) Day and night mode switching control method and device applied to fog-penetrating camera

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20944208

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20944208

Country of ref document: EP

Kind code of ref document: A1