Equipment self-checking method, electronic equipment and computer readable storage medium

By acquiring images before and after infrared cut-off filter switching and analyzing the difference in gray value distribution, the problem of abnormal detection of infrared cut-off filter switching function in the prior art is solved, and self-test and cost reduction are achieved.

CN120378601APending Publication Date: 2025-07-25HANGZHOU HUACHENG NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510252515.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the prior art, abnormal detection of infrared cut-off filter switching function of the device requires relying on external devices, resulting in an increase in detection cost.

Method used

By acquiring the image acquired by the target device before and after the infrared cutoff filter switching, analyzing the gray value distribution, determining whether the infrared cutoff filter switching function is abnormal, including acquiring the gray value distribution of the first target image and the second target image, comparing the differences, and judging the functional status using the preset threshold.

Benefits of technology

The device's infrared cut-off filter switching function self-test is realized, without relying on external devices, reducing detection costs and improving detection accuracy and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378601A_ABST
    Figure CN120378601A_ABST
Patent Text Reader

Abstract

The invention discloses an equipment self-checking method, electronic equipment and a computer readable storage medium. The method comprises the following steps: acquiring a first target image and a second target image; wherein the first target image and the second target image are respectively generated based on at least one first initial image and at least one second initial image acquired by the target equipment, and the first initial image and the second initial image are respectively acquired by an image acquisition module of the target equipment before and after switching of the infrared cut-off filter; respectively acquiring a first gray value distribution condition of the first target image and a second gray value distribution condition of the second target image; and comparing the first gray value distribution condition with the second gray value distribution condition, and determining whether the switching function of the infrared cut-off filter of the target equipment is abnormal or not. Through the above mode, self-inspection of the switching function of the infrared cut-off filter of the equipment can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of device detection, and particularly to a device self-checking method, an electronic device, and a computer-readable storage medium. Background Art

[0002] If the infrared cut-off filter switching function of a device is abnormal, it will affect the normal use of the device. For example, if the infrared cut-off filter switching function of an intelligent lock is abnormal, it will cause the infrared night vision function of the intelligent lock to be abnormal at night or under low light conditions, resulting in the inability of the intelligent lock to perform security monitoring.

[0003] Currently, the detection of whether the infrared cut-off filter switching function of a device is abnormal relies on external devices, resulting in an increase in the detection cost of whether the infrared cut-off filter switching function of the device is abnormal. Summary of the Invention

[0004] The main technical problem to be solved by this application is to provide a device self-checking method, an electronic device, and a computer-readable storage medium, which can realize the self-checking of the infrared cut-off filter switching function of the device.

[0005] To solve the above technical problem, a technical solution adopted by this application is: to provide a device self-checking method, the method includes: obtaining a first target image and a second target image; wherein, the first target image and the second target image are respectively generated based on at least one first initial image and at least one second initial image collected by a target device, and the first initial image and the second initial image are respectively collected by an image acquisition module of the target device before and after the infrared cut-off filter is switched; respectively obtaining the first gray value distribution of the first target image and the second gray value distribution of the second target image; comparing the first gray value distribution and the second gray value distribution to determine whether the infrared cut-off filter switching function of the target device is abnormal.

[0006] Wherein, comparing the first gray value distribution and the second gray value distribution to determine whether the infrared cut-off filter switching function of the target device is abnormal includes: obtaining a first difference between the first gray value distribution and the second gray value distribution; based on the first difference, determining whether the infrared cut-off filter switching function of the target device is abnormal.

[0007] Among them, the second target image is the image corresponding to the case where the infrared cut-off filter of the target device is switched to an infrared transparent filter, and the first target image is the image corresponding to the case where the infrared cut-off filter of the target device is switched to an infrared non-transparent filter; obtaining a first difference between the first gray value distribution and the second gray value distribution includes: for each gray value, obtaining a first quantity corresponding to each gray value; where the first quantity corresponding to the gray value is the smaller of a second quantity and a third quantity, the second quantity is the number of pixel points with the gray value in the first target image, and the third quantity is the number of pixel points with the gray value in the second target image; and, obtaining a fourth quantity; where the fourth quantity is the number of pixel points in the first target image; based on the ratio between the sum of the quantities and the fourth quantity, obtaining the similarity between the first gray value distribution and the second gray value distribution as the first difference; where the sum of the quantities is the sum of the first quantities corresponding to each gray value.

[0008] Among them, the characterization value of the first difference between the first gray value distribution and the second gray value distribution includes the similarity between the first gray value distribution and the second gray value distribution; based on the first difference, determining whether the infrared cut-off filter switching function of the target device is abnormal includes: in response to the similarity being less than or equal to a first preset difference threshold, determining that the infrared cut-off filter switching function of the target device is normal; in response to the similarity being greater than the first preset difference threshold, determining that the infrared cut-off filter switching function of the target device is abnormal.

[0009] Among them, the device self-checking method further includes: obtaining a third target image and a fourth target image; where the third target image and the fourth target image are respectively generated based on at least one third initial image and at least one fourth initial image collected by the target device, and the third initial image and the fourth initial image are collected by the image acquisition module of the target device before and after the infrared fill light is turned on; respectively obtaining a first brightness condition of the third target image and a second brightness condition of the fourth target image; comparing the first brightness condition and the second brightness condition to determine whether the infrared fill light of the target device is abnormal.

[0010] Among them, comparing the first brightness condition and the second brightness condition to determine whether the infrared fill light of the target device is abnormal includes: obtaining a second difference between the first brightness condition and the second brightness condition, and based on the second difference, determining whether the infrared fill light of the target device is abnormal.

[0011] Among them, the characterization value of the first brightness situation includes the first brightness central tendency characterization value of each pixel point of the third target image, the characterization value of the second brightness situation includes the second brightness central tendency characterization value of each pixel point of the fourth target image, and the characterization value of the second difference includes the absolute value of the difference between the first brightness central tendency characterization value and the second brightness central tendency characterization value; determining whether the infrared supplementary light of the target device is abnormal based on the second difference includes: in response to the absolute value of the difference being greater than or equal to the second preset difference threshold, determining that the infrared supplementary light of the target device is normal; in response to the absolute value of the difference being less than the second preset difference threshold, determining that the infrared supplementary light of the target device is abnormal.

[0012] Among them, the initial images of one category are at least two; the step of obtaining the target image includes: obtaining at least two initial images corresponding to the category; fusing the at least two initial images corresponding to the category to obtain the target image corresponding to the category.

[0013] Among them, fusing the at least two initial images corresponding to the category to obtain the target image corresponding to the category includes: obtaining the central tendency characterization image corresponding to the at least two initial images corresponding to the category as the target image corresponding to the category.

[0014] Among them, the target device is an intelligent lock.

[0015] To solve the above technical problems, another technical solution adopted by this application is: providing an electronic device, which includes a memory and a processor, the memory stores program instructions, and the processor is used to execute the program instructions to implement the above device self-checking method.

[0016] To solve the above technical problems, another technical solution adopted by this application is: providing a computer-readable storage medium, which is used to store program instructions, and the program instructions can be executed to implement the above device self-checking method.

[0017] In the above technical solution, when the infrared cut-off filter switching function of the target device is normal, there are significant differences in the gray value distribution of the first target image and the second target image corresponding before and after the switching of the infrared cut-off filter of the target device; when the infrared cut-off filter switching function of the target device is abnormal, the gray value distribution of the first target image and the second target image corresponding before and after the switching of the infrared cut-off filter of the target device is similar. Therefore, by comparing the gray value distribution of the first target image and the second target image corresponding before and after the switching of the infrared cut-off filter of the target device, it is possible to determine whether the infrared cut-off filter switching function of the target device is abnormal and realize the self-check of the infrared cut-off filter switching function of the target device.

[0018] In addition, since it is determined whether the infrared cut-off filter switching function of the target device is abnormal by comparing the gray value distributions of the corresponding first target image and second target image before and after the infrared cut-off filter of the target device is switched, the device self-checking method provided in this application does not need to rely on external devices, reducing the cost of device self-checking. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a schematic flowchart of an embodiment of the device self-checking method provided in this application;

[0020] Figure 2 is a schematic diagram of the gray value distribution of a first target image provided in this application;

[0021] Figure 3 is Figure 1 a schematic flowchart of an embodiment of step S13 shown;

[0022] Figure 4 is a schematic flowchart of another embodiment of the device self-checking method provided in this application;

[0023] Figure 5 is Figure 4 a schematic flowchart of an embodiment of step S46 shown;

[0024] Figure 6 is Figure 1 a schematic flowchart of an embodiment of step S11 shown;

[0025] Figure 7 is a schematic diagram of fusing at least two initial images provided in this application;

[0026] Figure 8 is a schematic structural diagram of an embodiment of the device self-checking device provided in this application;

[0027] Figure 9 is a schematic structural diagram of an embodiment of the electronic device provided in this application;

[0028] Figure 10 is a schematic structural diagram of an embodiment of the computer-readable storage medium provided in this application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0029] The solutions of the embodiments of this application will be described in detail below with reference to the accompanying drawings of the specification.

[0030] In the following description, specific details such as specific system architectures, interfaces, and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand this application.

[0031] As used herein, the term "and / or" is merely a description of the relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. Additionally, the character " / " in this text generally indicates that the associated objects before and after are in an "or" relationship. Furthermore, "multiple" in this text means two or more than two. Additionally, the term "at least one" in this text means any one of multiple types or any combination of at least two of multiple types. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set composed of A, B, and C.

[0032] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of an embodiment of the device self-checking method provided by this application. It should be noted that if there are substantially the same results, this embodiment is not limited to Figure 1 the process sequence shown. As Figure 1 shown, this embodiment includes:

[0033] Step S11: Obtain a first target image and a second target image.

[0034] In this embodiment, a first target image and a second target image are obtained; wherein, the first target image and the second target image are respectively generated based on at least one first initial image and at least one second initial image collected by the target device, and the first initial image and the second initial image are respectively collected by the image acquisition module of the target device before and after the infrared cut-off filter is switched.

[0035] In one embodiment, specifically, the first target image and the second target image can be obtained from local storage or cloud storage. Of course, in other embodiments, the first initial image and the second initial image can also be collected in real time by the image acquisition module of the target device before and after the infrared cut-off filter is switched, and the first target image is generated based on the first initial image collected by the target device, and the second target image is generated based on the second initial image collected by the target device.

[0036] It should be noted that the state before the infrared cut-off filter is switched is not limited. For example, if the infrared cut-off filter is in the infrared transparent filter state before switching, then, the infrared cut-off filter is in the infrared opaque filter state after switching; or, if the infrared cut-off filter is in the infrared opaque filter state before switching, then, the infrared cut-off filter is in the infrared transparent filter state after switching. The infrared transparent filter allows infrared light of a specific wavelength band to pass through while blocking visible light and ultraviolet light; the infrared opaque filter allows visible light to pass through while blocking infrared light.

[0037] In addition, before and after the infrared cut-off filter is switched, the acquisition environment corresponding to the target device and the acquisition scene, acquisition angle, etc. corresponding to the image acquisition module of the target device are the same. For example, when the target device is in a bright environment and the infrared cut-off filter is in the infrared opaque filter state before switching, the image acquisition module of the target device is used to acquire an image of the target object A; then, the state of the infrared cut-off filter is switched, and when the infrared cut-off filter is in the infrared transparent filter state, the image acquisition module of the target device is used to acquire an image of the target object A. The acquisition angle, etc. of the image acquisition module of the target device for the target object A before and after the infrared cut-off filter is switched are the same. Another example is that when the target device is in a bright environment and the infrared cut-off filter is in the infrared transparent filter state before switching, the image acquisition module of the target device is used to acquire an image of the target object A; then, the state of the infrared cut-off filter is switched, and when the infrared cut-off filter is in the infrared opaque filter state, the image acquisition module of the target device is used to acquire an image of the target object A. The acquisition angle, etc. of the image acquisition module of the target device for the target object A before and after the infrared cut-off filter is switched are the same.

[0038] In one embodiment, if the image acquisition module of the target device is used to first acquire an image when the infrared cut-off filter is in the infrared opaque filter state, then, before the image acquisition module of the target device acquires the first initial image and the second initial image before and after the infrared cut-off filter is switched respectively, the infrared cut-off filter is switched to the infrared opaque filter state. Of course, in other embodiments, if the image acquisition module of the target device is used to first acquire an image when the infrared cut-off filter is in the infrared transparent filter state, then, before the image acquisition module of the target device acquires the first initial image and the second initial image before and after the infrared cut-off filter is switched respectively, the infrared cut-off filter is switched to the infrared transparent filter state.

[0039] In one embodiment, an infrared supplementary light is provided on the target device. Before the image acquisition module of the target device acquires the first initial image and the second initial image before and after the infrared cut-off filter is switched respectively, the infrared supplementary light is turned off. By turning off the infrared supplementary light of the target device, it is possible to avoid the infrared light generated by the infrared supplementary light from interfering with the acquisition of the first initial image and the second initial image by the image acquisition module of the target device, so that the image acquisition module of the target device can accurately acquire the first initial image and the second initial image that reflect the real situation before and after the infrared cut-off filter is switched. As a result, it is possible to accurately determine whether the infrared cut-off filter switching function of the target device is abnormal based on the first gray value distribution of the first target image and the second gray value distribution of the second target image, improving the accuracy and reliability of the self-check of the infrared cut-off filter switching function.

[0040] In one embodiment, the target device includes a photosensitive infrared cut-off filter automatic linkage function. Before using the image acquisition module of the target device to acquire the first initial image and the second initial image respectively before and after the infrared cut-off filter is switched, the photosensitive infrared cut-off filter automatic linkage function is turned off. In the daytime or in an environment with sufficient or bright light, the photosensitive infrared cut-off filter will automatically switch to the infrared opaque filter state, allowing visible light to pass through and blocking infrared light from passing through, ensuring that the image acquisition module of the target device can capture real colors; while at night or in an environment with insufficient or dark light, the photosensitive infrared cut-off filter will automatically switch to the infrared transparent filter state, so that the image acquisition module of the target device can make full use of infrared light for shooting and improve night vision performance. Before and after the infrared cut-off filter is switched, the acquisition environment corresponding to the target device is the same. For example, it is a bright environment; and in a bright environment, the photosensitive infrared cut-off filter will automatically switch to the infrared opaque filter state. If the photosensitive infrared cut-off filter automatic linkage function is not turned off, when the initial image is acquired after the infrared cut-off filter is switched to the infrared transparent filter state, the photosensitive infrared cut-off filter will automatically switch to the infrared opaque filter state, resulting in the failure of acquiring the initial image when the infrared cut-off filter is in the infrared transparent filter state, thus unable to obtain the target image when the infrared cut-off filter is in the infrared transparent filter state, and further unable to determine whether the infrared cut-off filter switching function of the target device is abnormal. Therefore, before using the image acquisition module of the target device to acquire the first initial image and the second initial image respectively before and after the infrared cut-off filter is switched, the photosensitive infrared cut-off filter automatic linkage function is turned off to avoid the situation of failure in acquiring the initial image when the infrared cut-off filter is in the infrared transparent filter state, thus avoiding the situation of being unable to obtain the target images in the states before and after the infrared cut-off filter is switched, and further being able to accurately determine whether the infrared cut-off filter switching function of the target device is abnormal.

[0041] In one embodiment, the target device includes an automatic brightness balance function. Before collecting a first initial image and a second initial image with the image acquisition module of the target device before and after the infrared cut-off filter is switched respectively, the automatic brightness balance function is turned off. The automatic brightness balance function of the target device will perform brightness balance on the first initial image and the second initial image collected by the image acquisition module of the target device before and after the infrared cut-off filter is switched respectively. That is, the automatic brightness balance function of the target device will automatically optimize the first initial image and the second initial image collected by the image acquisition module of the target device before and after the infrared cut-off filter is switched respectively, resulting in a difference between the obtained first initial image and second initial image and the actual situation. Consequently, the gray value distribution of the subsequent obtained first target image and second target image is different from the actual situation, further leading to the inability to accurately determine whether the infrared cut-off filter switching function of the target device is abnormal based on the first gray value distribution and the second gray value distribution. That is, the self-check result of the infrared cut-off filter switching function is inaccurate and unreliable. Therefore, before collecting the first initial image and the second initial image with the image acquisition module of the target device before and after the infrared cut-off filter is switched respectively, the automatic brightness balance function is turned off to avoid a difference between the first initial image and the second initial image collected before and after the infrared cut-off filter is switched respectively and the actual situation, thereby avoiding a difference between the gray value distribution of the obtained first target image and second target image and the actual situation, and further enabling the accurate determination of whether the infrared cut-off filter switching function of the target device is abnormal based on the first gray value distribution of the first target image and the second gray value distribution of the second target image. That is, the self-check result of the infrared cut-off filter switching function can be ensured to be accurate and reliable.

[0042] In one embodiment, the target device includes an intelligent picture gain function. Before using the image acquisition module of the target device to acquire a first initial image and a second initial image respectively before and after the infrared cut-off filter is switched, the intelligent picture gain function is turned off. The intelligent picture gain function of the target device will perform picture gain on the first initial image and the second initial image acquired by the image acquisition module of the target device respectively before and after the infrared cut-off filter is switched (for example, increasing the brightness of the image, increasing the contrast between light and dark of the image, etc.). That is, the intelligent picture gain function of the target device will automatically optimize the first initial image and the second initial image acquired by the image acquisition module of the target device respectively before and after the infrared cut-off filter is switched, resulting in a difference between the acquired first initial image and second initial image and the actual situation. Consequently, the gray value distribution of the subsequently acquired first target image and second target image is different from the actual situation, further leading to the inability to accurately determine whether the infrared cut-off filter switching function of the target device is abnormal based on the first gray value distribution and the second gray value distribution. That is, the self-check result of the infrared cut-off filter switching function is inaccurate and unreliable. Therefore, before using the image acquisition module of the target device to acquire a first initial image and a second initial image respectively before and after the infrared cut-off filter is switched, the intelligent picture gain function is turned off to avoid a difference between the first initial image and the second initial image acquired respectively before and after the infrared cut-off filter is switched and the actual situation, thereby avoiding a difference between the gray value distribution of the acquired first target image and second target image and the actual situation, and further enabling the accurate determination of whether the infrared cut-off filter switching function of the target device is abnormal based on the first gray value distribution of the first target image and the second gray value distribution of the second target image. That is, it can ensure that the self-check result of the infrared cut-off filter switching function is accurate and reliable.

[0043] In one embodiment, before using the image acquisition module of the target device to acquire a first initial image and a second initial image respectively before and after the infrared cut-off filter is switched, a fixed shutter speed is set. By setting a fixed shutter speed, the consistency of the initial image acquisition by the image acquisition module of the target device can be ensured, and the influence of the shutter speed change on the initial image quality can be avoided.

[0044] Among them, the size of the set fixed shutter speed is limited and can be specifically set according to actual usage needs.

[0045] In one embodiment, the first target image is generated based on a first initial image acquired by the target device, and the second target image is generated based on a second initial image acquired by the target device. That is, a first initial image acquired by the target device is directly used as the first target image, and a second initial image acquired by the target device is directly used as the first target image.

[0046] It should be noted that the image acquisition module of the target device can collect only one first initial image and directly use it as the first target image; or, the image acquisition module of the target device can collect multiple first initial images, and can randomly select one from the multiple collected first initial images as the first target image, or can also select the first initial image with the highest quality from the multiple collected first initial images as the first target image. Additionally, the image acquisition module of the target device can collect only one second initial image and directly use it as the second target image; or, the image acquisition module of the target device can collect multiple second initial images, and can randomly select one from the multiple collected second initial images as the second target image, or can also select the second initial image with the highest quality from the multiple collected second initial images as the second target image.

[0047] In other embodiments, the first target image is generated based on at least two first initial images collected by the target device, and the second target image is generated based on at least two second initial images collected by the target device.

[0048] Among them, the number of first initial images on which the first target image is based and the number of second initial images on which the second target image is based are not limited, and can be specifically set according to actual usage needs. For example, the first target image is generated based on 50, 60, or 70 first initial images collected by the target device, and the second target image is generated based on 50, 60, or 70 second initial images collected by the target device. Additionally, the at least two first initial images on which the first target image is based can be continuously collected by the image acquisition module of the target device, or can be collected at intervals by the image acquisition module of the target device; the at least two second initial images on which the second target image is based can be continuously collected by the image acquisition module of the target device, or can be collected at intervals by the image acquisition module of the target device.

[0049] Step S12: Obtain the first gray value distribution of the first target image and the second gray value distribution of the second target image respectively.

[0050] In this embodiment, the first gray value distribution of the first target image and the second gray value distribution of the second target image are obtained respectively. As Figure 2 shown, Figure 2 is a schematic diagram of the gray value distribution of a target image provided by this application.

[0051] When the infrared cut-off filter switching function of the target device is normal, the infrared cut-off filter of the target device will be in different states before and after switching. One state is the infrared opaque filter state, and the other state is the infrared transparent filter state. When the infrared cut-off filter of the target device is in the infrared opaque filter state, visible light is allowed to pass through while infrared light is blocked; that is, the infrared cut-off filter of the target device is in the visible light mode. When the infrared cut-off filter of the target device is in the infrared transparent filter state, infrared light is allowed to pass through while visible light is blocked; that is, the infrared cut-off filter of the target device is in the infrared mode.

[0052] When the infrared cut-off filter of the target device is in the infrared opaque filter state, that is, when the infrared cut-off filter of the target device is in the visible light mode, the image acquisition module of the target device uses visible light for imaging. When the infrared cut-off filter of the target device is in the infrared transparent filter state, that is, when the infrared cut-off filter of the target device is in the infrared mode, the image acquisition module of the target device uses infrared light for imaging. Therefore, when the infrared cut-off filter switching function of the target device is normal, there are significant differences in the gray value distributions of the first initial image and the second initial image collected by the image acquisition module of the target device before and after the infrared cut-off filter is switched. Therefore, there are significant differences in the gray value distributions of the first target image generated based on the first initial image collected by the target device and the second target image generated based on the second initial image collected by the target device.

[0053] When the infrared cut-off filter switching function of the target device is abnormal, the states of the infrared cut-off filter of the target device before and after switching may be the same.

[0054] For example, the infrared cut-off filter of the target device is currently in the infrared-opaque filter state, that is, the infrared cut-off filter of the target device is currently in the visible light mode; after the infrared cut-off filter of the target device is switched, the infrared cut-off filter of the target device remains in the infrared-opaque filter state, that is, the infrared cut-off filter of the target device remains in the visible light mode. When the infrared cut-off filter of the target device is in the infrared-opaque filter state, that is, when the infrared cut-off filter of the target device is in the visible light mode, the image acquisition module of the target device uses visible light for imaging; due to the abnormal switching function of the infrared cut-off filter of the target device, after the infrared cut-off filter of the target device is switched, the infrared cut-off filter of the target device still remains in the visible light mode and cannot effectively use infrared light for imaging, and still uses visible light for imaging. Since the infrared cut-off filter of the target device is in the visible light mode before and after the switching of the infrared cut-off filter of the target device and both use visible light for imaging, the gray value distribution of the first initial image and the second initial image collected by the image acquisition module of the target device before and after the switching of the infrared cut-off filter is similar, and both mainly reflect the information of visible light.

[0055] For another example, the infrared cut-off filter of the target device is currently in the infrared-transparent filter state, that is, the infrared cut-off filter of the target device is currently in the infrared mode; after the infrared cut-off filter of the target device is switched, the infrared cut-off filter of the target device remains in the infrared-transparent filter state, that is, the infrared cut-off filter of the target device remains in the infrared mode. When the infrared cut-off filter of the target device is in the infrared-transparent filter state, that is, when the infrared cut-off filter of the target device is in the infrared mode, the image acquisition module of the target device uses infrared light for imaging; due to the abnormal switching function of the infrared cut-off filter of the target device, after the infrared cut-off filter of the target device is switched, the infrared cut-off filter of the target device still remains in the infrared mode and cannot effectively use visible light for imaging, and still uses infrared light for imaging. Since the infrared cut-off filter of the target device is in the infrared mode before and after the switching of the infrared cut-off filter of the target device and both use infrared light for imaging, the gray value distribution of the first initial image and the second initial image collected by the image acquisition module of the target device before and after the switching of the infrared cut-off filter is similar, and both mainly reflect the information of infrared light.

[0056] Therefore, by obtaining the first gray value distribution of the first target image and the second gray value distribution of the second target image, it is possible to determine whether the switching function of the infrared cut-off filter of the target device is abnormal by comparing the first gray value distribution of the first target image and the second gray value distribution of the second target image in the future.

[0057] Step S13: Compare the first gray value distribution with the second gray value distribution to determine whether the infrared cut-off filter switching function of the target device is abnormal.

[0058] In this embodiment, by comparing the first gray value distribution with the second gray value distribution, it is determined whether the infrared cut-off filter switching function of the target device is abnormal. When the infrared cut-off filter switching function of the target device is normal, there are significant differences in the gray value distributions of the first target image and the second target image corresponding before and after the infrared cut-off filter of the target device is switched; when the infrared cut-off filter switching function of the target device is abnormal, the gray value distributions of the first target image and the second target image corresponding before and after the infrared cut-off filter of the target device is switched are similar. Therefore, by comparing the gray value distributions of the first target image and the second target image corresponding before and after the infrared cut-off filter of the target device is switched, it can be determined whether the infrared cut-off filter switching function of the target device is abnormal, realizing self-checking of the infrared cut-off filter switching function of the target device. In addition, since it is determined whether the infrared cut-off filter switching function of the target device is abnormal by comparing the gray value distributions of the first target image and the second target image corresponding before and after the infrared cut-off filter of the target device is switched; therefore, the device self-checking method provided in this application does not need to rely on external devices, reducing the cost of device self-checking.

[0059] Please refer to Figure 3 , Figure 3 is Figure 1 a schematic flowchart of an embodiment of step S13 shown in. It should be noted that if there are substantially the same results, this embodiment is not limited to Figure 3 the flow sequence shown in. As Figure 3 shown, this embodiment includes:

[0060] Step S31: Obtain the first difference between the first gray value distribution and the second gray value distribution.

[0061] In this embodiment, the first difference between the first gray value distribution and the second gray value distribution is obtained.

[0062] In one embodiment, the second target image is the image corresponding to the case where the infrared cut-off filter of the target device is switched to an infrared transparent filter, and the first target image is the image corresponding to the case where the infrared cut-off filter of the target device is switched to an infrared non-transparent filter; obtaining the first difference between the first gray value distribution and the second gray value distribution specifically includes the following sub-steps:

[0063] Step 1: For each gray value, obtain the first quantity corresponding to each gray value; where the first quantity corresponding to the gray value is the smaller of the second quantity and the third quantity, the second quantity is the number of pixel points with the gray value in the first target image, and the third quantity is the number of pixel points with the gray value in the second target image. The specific formula is as follows:

[0064] A(i)=min(H_1(i),H_2(i))

[0065] Among them, A(i) represents the first quantity corresponding to the gray value i, and the value range of the gray value i is 0 - 255; H_1(i) represents the number of pixel points with the gray value i in the first target image, that is, it represents the second quantity; H_2(i) represents the number of pixel points with the gray value i in the second target image, that is, it represents the third quantity.

[0066] Step 2: Obtain the fourth quantity; where the fourth quantity is the number of pixel points in the first target image. The specific formula is as follows:

[0067]

[0068] Among them, B represents the fourth quantity, that is, the number of pixel points in the first target image.

[0069] Step 3: Based on the ratio between the sum of quantities and the fourth quantity, obtain the similarity between the first gray value distribution and the second gray value distribution as the first difference; where the sum of quantities is the sum of the first quantities corresponding to each gray value. The specific formula is as follows:

[0070]

[0071] Among them, S_g represents the similarity between the first gray value distribution and the second gray value distribution; represents the sum of the first quantities corresponding to each gray value.

[0072] Step S32: Based on the first difference, determine whether the infrared cut-off filter switching function of the target device is abnormal.

[0073] In this embodiment, based on the first difference, determine whether the infrared cut-off filter switching function of the target device is abnormal.

[0074] In one embodiment, the characterization value of the first difference between the first gray value distribution and the second gray value distribution can be the similarity between the first gray value distribution and the second gray value distribution.

[0075] Of course, in other embodiments, the characterization value of the first difference between the first gray value distribution and the second gray value distribution may also be the degree of difference between the first gray value distribution and the second gray value distribution, etc., which is not limited herein.

[0076] In a specific embodiment, the characterization value of the first difference between the first gray value distribution and the second gray value distribution may be the similarity between the first gray value distribution and the second gray value distribution; at this time, based on the first difference, it is determined whether the infrared cut-off filter switching function of the target device is abnormal. Specifically: in response to the similarity being less than or equal to the first preset difference threshold, it is determined that the infrared cut-off filter switching function of the target device is normal; in response to the similarity being greater than the first preset difference threshold, it is determined that the infrared cut-off filter switching function of the target device is abnormal.

[0077] When the similarity between the gray value distributions of the first target image and the second target image is less than or equal to the first preset difference threshold, it indicates that there are significant differences in the gray value distributions of the first target image and the second target image corresponding to the states before and after the infrared cut-off filter is switched; when there are significant differences in the gray value distributions of the first target image and the second target image corresponding to the states before and after the infrared cut-off filter is switched, it indicates that before and after the infrared cut-off filter is switched, the infrared cut-off filter of the target device is in different states (for example, before switching, it is in the infrared opaque filter state (visible light mode), and after switching, it is in the infrared transparent filter state (infrared mode)), which also shows that the infrared cut-off filter switching function of the target device is normal.

[0078] When the similarity between the gray value distributions of the first target image and the second target image is greater than the first preset difference threshold, it indicates that the gray value distributions of the first target image and the second target image corresponding to the states before and after the infrared cut-off filter is switched are similar; when the gray value distributions of the first target image and the second target image corresponding to the states before and after the infrared cut-off filter is switched are similar, it indicates that before and after the infrared cut-off filter is switched, the infrared cut-off filter of the target device is in the same state (for example, before switching, it is in the infrared opaque filter state (visible light mode), and after switching, it is still in the infrared opaque filter state (visible light mode)), which also shows that the infrared cut-off filter switching function of the target device is abnormal.

[0079] Among them, the size of the first preset difference threshold is not limited and can be specifically set according to actual usage needs.

[0080] Please refer to Figure 4 , Figure 4 is a schematic flowchart of another embodiment of the device self-checking method provided by this application. It should be noted that if there are substantially the same results, this embodiment does notFigure 4 is limited to the process sequence shown. As Figure 4 shown, this embodiment includes:

[0081] Step S41: Obtain a first target image and a second target image.

[0082] Step S41 is similar to step S11 and will not be elaborated here.

[0083] Step S42: Obtain the first gray value distribution of the first target image and the second gray value distribution of the second target image respectively.

[0084] Step S42 is similar to step S12 and will not be elaborated here.

[0085] Step S43: Compare the first gray value distribution and the second gray value distribution to determine whether the infrared cut-off filter switching function of the target device is abnormal.

[0086] Step S43 is similar to step S13 and will not be elaborated here.

[0087] Step S44: Obtain a third target image and a fourth target image.

[0088] In this embodiment, a third target image and a fourth target image are obtained; wherein, the third target image and the fourth target image are respectively generated based on at least one third initial image and at least one fourth initial image collected by the target device, and the third initial image and the fourth initial image are collected by the image acquisition module of the target device before and after the infrared fill light is turned on.

[0089] In one embodiment, the third target image and the fourth target image can be specifically obtained from local storage or cloud storage. Of course, in other embodiments, the third initial image and the fourth initial image can also be collected by the image acquisition module of the target device before and after the infrared fill light is turned on in real time, and the third target image is generated based on the third initial image collected by the target device and the fourth target image is generated based on the fourth initial image collected by the target device.

[0090] It should be noted that before and after the infrared fill light is turned on, the acquisition environment corresponding to the target device and the acquisition scene, acquisition angle, etc. corresponding to the image acquisition module of the target device are the same. For example, when the target device is in a dark environment and the infrared fill light is in the off state, the image acquisition module of the target device is used to collect an image of the target object B; then, the infrared fill light is turned on, and the image acquisition module of the target device is used to collect an image of the target object B. The acquisition angle, etc. of the image acquisition module of the target device for the target object B before and after the infrared fill light is turned on are the same.

[0091] In one embodiment, if the image acquisition module of the target device first acquires an image with the infrared fill light turned off, then before the image acquisition module of the target device acquires the third initial image and the fourth initial image before and after the infrared fill light is turned on respectively, turn off the infrared fill light. Of course, in other embodiments, if the image acquisition module of the target device first acquires an image with the infrared fill light turned on, then before the image acquisition module of the target device acquires the third initial image and the fourth initial image before and after the infrared fill light is turned on respectively, turn on the infrared fill light.

[0092] In one embodiment, the target device includes an automatic brightness balance function. Before the image acquisition module of the target device acquires the third initial image and the fourth initial image before and after the infrared fill light is turned on respectively, turn off the automatic brightness balance function. The automatic brightness balance function of the target device will perform brightness balance on the third initial image and the fourth initial image acquired by the image acquisition module of the target device before and after the infrared fill light is turned on respectively. That is, the automatic brightness balance function of the target device will automatically optimize the third initial image and the fourth initial image acquired by the image acquisition module of the target device before and after the infrared fill light is turned on respectively, making the acquired third initial image and fourth initial image different from the actual situation. As a result, the brightness conditions of the subsequent acquired third target image and fourth target image are different from the actual situation, and further, based on the first brightness condition and the second brightness condition, it is impossible to accurately determine whether the infrared fill light of the target device is abnormal, that is, the self-check result of the infrared fill light of the target device is inaccurate and unreliable. Therefore, before the image acquisition module of the target device acquires the third initial image and the fourth initial image before and after the infrared fill light is turned on respectively, turn off the automatic brightness balance function to avoid the third initial image and the fourth initial image acquired before and after the infrared fill light is turned on being different from the actual situation, thereby avoiding the brightness conditions of the acquired third target image and fourth target image being different from the actual situation, and further being able to accurately determine whether the infrared fill light of the target device is abnormal based on the first brightness condition of the third target image and the second brightness condition of the second target image, that is, being able to ensure the accuracy and reliability of the self-check result of the infrared fill light.

[0093] In one embodiment, the target device includes an intelligent picture gain function. Before using the image acquisition module of the target device to acquire a third initial image and a fourth initial image before and after the infrared fill light is turned on respectively, the intelligent picture gain function is turned off. The intelligent picture gain function of the target device will perform picture gain on the third initial image and the fourth initial image acquired by the image acquisition module of the target device before and after the infrared fill light is turned on respectively (for example, increasing the brightness of the image, increasing the contrast between light and dark of the image, etc.). That is, the intelligent picture gain function of the target device will automatically optimize the third initial image and the fourth initial image acquired by the image acquisition module of the target device before and after the infrared fill light is turned on respectively, resulting in a difference between the obtained third initial image and fourth initial image and the actual situation. Consequently, the brightness of the subsequently obtained third target image and fourth target image is different from the actual situation, and further, based on the first brightness situation and the second brightness situation, it is impossible to accurately determine whether the infrared fill light of the target device is abnormal. That is, the self-check result of the infrared fill light of the target device is inaccurate and unreliable. Therefore, before using the image acquisition module of the target device to acquire a third initial image and a fourth initial image before and after the infrared fill light is turned on respectively, the intelligent picture gain function is turned off to avoid a difference between the third initial image and the fourth initial image acquired before and after the infrared fill light is turned on respectively and the actual situation, thereby avoiding a difference between the brightness of the obtained third target image and fourth target image and the actual situation, and further enabling an accurate determination of whether the infrared fill light of the target device is abnormal based on the first brightness situation of the third target image and the second brightness situation of the fourth target image. That is, it can ensure that the self-check result of the infrared fill light of the target device is accurate and reliable.

[0094] In one embodiment, before using the image acquisition module of the target device to acquire a third initial image and a fourth initial image before and after the infrared fill light is turned on respectively, a fixed shutter speed is set. By setting a fixed shutter speed, the consistency of the initial image acquisition by the image acquisition module of the target device can be ensured, and the influence of the shutter speed change on the initial image quality can be avoided.

[0095] Among them, the size of the set fixed shutter speed is limited and can be specifically set according to actual usage needs.

[0096] In one embodiment, the third target image is generated based on a third initial image acquired by the target device, and the fourth target image is generated based on a fourth initial image acquired by the target device. That is, a third initial image acquired by the target device is directly used as the third target image, and a fourth initial image acquired by the target device is directly used as the fourth target image.

[0097] It should be noted that the image acquisition module of the target device can capture only one third initial image and directly use it as the third target image; or, the image acquisition module of the target device can capture multiple third initial images, and can randomly select one from the multiple captured third initial images as the third target image, or can also select the third initial image with the highest quality from the multiple captured third initial images as the third target image. In addition, the image acquisition module of the target device can capture only one fourth initial image and directly use it as the fourth target image; or, the image acquisition module of the target device can capture multiple fourth initial images, and can randomly select one from the multiple captured fourth initial images as the fourth target image, or can also select the fourth initial image with the highest quality from the multiple captured fourth initial images as the fourth target image.

[0098] In other embodiments, the third target image is generated based on at least two third initial images captured by the target device, and the fourth target image is generated based on at least two fourth initial images captured by the target device.

[0099] Among them, the number of third initial images based on which the third target image is generated and the number of fourth initial images based on which the fourth target image is generated are not limited and can be specifically set according to actual usage needs. For example, the third target image is generated based on 50, 60, or 70 third initial images captured by the target device, and the fourth target image is generated based on 50, 60, or 70 fourth initial images captured by the target device. In addition, the at least two third initial images based on which the third target image is generated can be continuously captured by the image acquisition module of the target device, or can be captured at intervals by the image acquisition module of the target device; the at least two fourth initial images based on which the fourth target image is generated can be continuously captured by the image acquisition module of the target device, or can be captured at intervals by the image acquisition module of the target device.

[0100] Step S45: Obtain the first brightness condition of the third target image and the second brightness condition of the fourth target image respectively.

[0101] In this embodiment, the first brightness condition of the third target image and the second brightness condition of the fourth target image are obtained respectively.

[0102] The main function of the infrared supplementary light is to provide additional light sources for the image acquisition module of the target device in dark or low-light conditions, so that the image acquisition module of the target device can capture clear images.

[0103] When the infrared fill light of the target device is normal, in a dark environment or a low-light environment, there are significant differences in the brightness of the third initial image and the fourth initial image collected by the image acquisition module of the target device before and after the infrared fill light is turned on (the brightness of the initial image collected when the infrared fill light is turned on increases significantly). Therefore, there are significant differences in the brightness of the third target image generated based on the third initial image collected by the target device and the brightness of the fourth target image generated based on the fourth initial image collected by the target device.

[0104] When the infrared fill light of the target device is abnormal, in a dark environment or a low-light environment, the brightness of the third initial image and the fourth initial image collected by the image acquisition module of the target device before and after the infrared fill light is turned on are similar. Therefore, the brightness of the third target image generated based on the third initial image collected by the target device and the brightness of the fourth target image generated based on the fourth initial image collected by the target device are similar.

[0105] For example, the infrared fill light of the target device is currently in the off state; when the infrared fill light of the target device is turned on, the infrared fill light of the target device is still in the off state. Since the infrared fill light of the target device is in the off state before and after the infrared fill light of the target device is turned on, the brightness of the third initial image and the fourth initial image collected by the image acquisition module of the target device before and after the infrared fill light is turned on are similar.

[0106] For another example, the infrared fill light of the target device is currently in the off state; when the infrared fill light of the target device is turned on, the infrared fill light of the target device is in the on state, but the light source intensity of the infrared fill light is weak and cannot provide strong enough additional light source for the image acquisition module of the target device. Since the light source intensity of the infrared fill light of the target device is weak before and after the infrared fill light of the target device is turned on, the brightness of the third initial image and the fourth initial image collected by the image acquisition module of the target device before and after the infrared fill light is turned on are similar.

[0107] It should be noted that if the infrared fill light of the target device can be normally turned on but the light source intensity of the infrared fill light is weak, it can also be regarded as the abnormal function of the infrared fill light of the target device.

[0108] Therefore, by obtaining the first brightness of the third target image and the second brightness of the fourth target image, it is possible to determine whether the infrared fill light of the target device is abnormal by comparing the first brightness of the third target image and the second brightness of the fourth target image in the future.

[0109] Step S46: Compare the first brightness with the second brightness to determine whether the infrared fill light of the target device is abnormal.

[0110] In this embodiment, by comparing the first brightness condition and the second brightness condition, it is determined whether the infrared supplementary light of the target device is abnormal. When the infrared supplementary light of the target device is normal, there is a significant difference in the brightness conditions of the third target image and the fourth target image corresponding before and after the infrared supplementary light of the target device is turned on; when the infrared supplementary light of the target device is abnormal, the brightness conditions of the third target image and the fourth target image corresponding before and after the infrared supplementary light of the target device is turned on are similar. Therefore, by comparing the brightness conditions of the third target image and the fourth target image corresponding before and after the infrared supplementary light of the target device is turned on, it is possible to determine whether the infrared supplementary light of the target device is abnormal, realizing self-checking of the infrared supplementary light of the target device. In addition, since it is by comparing the brightness conditions of the third target image and the fourth target image corresponding before and after the infrared supplementary light of the target device is turned on to determine whether the infrared supplementary light of the target device is abnormal; therefore, the device self-checking method provided in this application does not need to rely on external devices, reducing the cost of device self-checking.

[0111] It should be noted that when it is necessary to perform self-checking on both the infrared cut-off filter switching function of the target device and the infrared supplementary light of the target device at the same time, the self-checking order of the infrared cut-off filter switching function of the target device and the infrared supplementary light of the target device is not limited; that is, the order of executing step S41-step S43 and executing step S44-step S46 is not limited. For example, if the self-checking of whether the infrared cut-off filter switching function of the target device is abnormal is performed first, and then the self-checking of whether the infrared supplementary light of the target device is abnormal is performed, then step S41-step S43 is executed first, and then step S44-step S46 is executed; and if the self-checking of whether the infrared cut-off filter switching function of the target device is abnormal is performed later, and the self-checking of whether the infrared supplementary light of the target device is abnormal is performed first, then step S44-step S46 is executed first, and then step S41-step S43 is executed.

[0112] In addition, when it is necessary to perform self-checking on both the infrared cut-off filter switching function of the target device and the infrared supplementary light of the target device at the same time, if the self-checking result of whether the infrared cut-off filter switching function of the target device is abnormal is that the infrared cut-off filter switching function of the target device is normal, and the self-checking result of the infrared supplementary light of the target device is that the infrared supplementary light of the target device is normal, then it indicates that the target device is normal and the self-checking of the target device passes; and if the self-checking result of whether the infrared cut-off filter switching function of the target device is abnormal is that the infrared cut-off filter switching function of the target device is abnormal, and / or, the self-checking result of the infrared supplementary light of the target device is that the infrared supplementary light of the target device is abnormal, then it indicates that the target device is abnormal and the self-checking of the target device fails.

[0113] In one embodiment, the target device is an intelligent lock. By self-checking the infrared cut-off filter switching function of the intelligent lock and self-checking the infrared supplementary light of the intelligent lock, it is ensured that the infrared cut-off filter switching function and the infrared supplementary light of the intelligent lock are normal, so that the intelligent lock can achieve security monitoring through the infrared night vision function at night or under low light conditions.

[0114] Please refer to Figure 5 , Figure 5 is Figure 4 the flowchart of an embodiment of step S46 shown. It should be noted that if there are substantially the same results, this embodiment is not limited to Figure 5 the shown process sequence. As Figure 5 shown, this embodiment includes:

[0115] Step S51: Obtain the second difference between the first brightness condition and the second brightness condition.

[0116] In this embodiment, the second difference between the first brightness condition and the second brightness condition is obtained.

[0117] In one embodiment, the characterization value of the first brightness condition includes the first brightness central tendency characterization value of each pixel point of the third target image, and the characterization value of the second brightness condition includes the second brightness central tendency characterization value of each pixel point of the fourth target image.

[0118] Among them, the first brightness central tendency characterization value and the second brightness central tendency characterization value are not limited. For example, the first brightness central tendency characterization value of each pixel point of the third target image can be the mean, median, etc. of the brightness of each pixel point of the third target image, and the second brightness central tendency characterization value of each pixel point of the fourth target image can be the mean, median, etc. of the brightness of each pixel point of the fourth target image.

[0119] Step S52: Determine whether the infrared supplementary light of the target device is abnormal based on the second difference.

[0120] In this embodiment, it is determined whether the infrared supplementary light of the target device is abnormal based on the second difference.

[0121] In one embodiment, the characterization value of the first brightness condition includes the first brightness central tendency characterization value of each pixel point of the third target image, the characterization value of the second brightness condition includes the second brightness central tendency characterization value of each pixel point of the fourth target image, and the characterization value of the second difference includes the absolute value of the difference between the first brightness central tendency characterization value and the second brightness central tendency characterization value. Among them, the specific formula is as follows:

[0122] D_b = |B_4 - B_3|

[0123] Among them, D_b represents the second difference; B_4 represents the first luminance central tendency characterization value; B_3 represents the second luminance central tendency characterization value.

[0124] In a specific embodiment, the characterization value of the first luminance situation includes the first luminance central tendency characterization value of each pixel of the third target image, the characterization value of the second luminance situation includes the second luminance central tendency characterization value of each pixel of the fourth target image, and the characterization value of the second difference includes the absolute value of the difference between the first luminance central tendency characterization value and the second luminance central tendency characterization value; at this time, based on the second difference, it is determined whether the infrared fill light of the target device is abnormal. Specifically: in response to the absolute value of the difference being greater than or equal to the second preset difference threshold, it is determined that the infrared fill light of the target device is normal; in response to the absolute value of the difference being less than the second preset difference threshold, it is determined that the infrared fill light of the target device is abnormal.

[0125] When the absolute value of the difference between the luminance central tendency characterization values of the third target image and the fourth target image is greater than or equal to the second preset difference threshold, it indicates that there is a significant difference in the luminance situations of the corresponding third target image and fourth target image before and after the infrared fill light is turned on; when there is a significant difference in the luminance situations of the corresponding third target image and fourth target image before and after the infrared fill light is turned on, it indicates that when the infrared fill light is in the on state, it can provide an additional sufficient intensity light source for the image acquisition module of the target device, which also shows that the infrared fill light of the target device is normal.

[0126] When the absolute value of the difference between the luminance central tendency characterization values of the third target image and the fourth target image is less than the second preset difference threshold, it indicates that the luminance situations of the corresponding third target image and fourth target image before and after the infrared fill light is turned on are similar; when the luminance situations of the corresponding third target image and fourth target image before and after the infrared fill light is turned on are similar, it indicates that when the infrared fill light is in the on state, it cannot provide an additional sufficient intensity light source for the image acquisition module of the target device or cannot provide an additional light source for the image acquisition module of the target device, which also shows that the infrared fill light of the target device is abnormal.

[0127] Among them, the magnitude of the second preset difference threshold is not limited and can be specifically set according to actual usage needs.

[0128] Please refer to Figure 6 , Figure 6 is Figure 1 a schematic flowchart of an embodiment of step S11 shown. It should be noted that if there are substantially the same results, this embodiment is not limited to Figure 6 the shown process sequence. As Figure 6 shown, the initial images of one category are at least two. This embodiment includes:

[0129] Step S61: Obtain at least two initial images corresponding to the category.

[0130] In this embodiment, at least two initial images corresponding to the category are obtained.

[0131] For example, if the first target image and the second target image are to be obtained, then at least two first initial images and at least two second initial images collected by the image acquisition module of the target device before and after the infrared cut-off filter is switched are obtained. Another example, if the third target image and the fourth target image are to be obtained, then at least two third initial images and at least two fourth initial images collected by the image acquisition module of the target device before and after the infrared fill light is turned on are obtained.

[0132] Step S62: Fuse at least two initial images corresponding to the category to obtain the target image corresponding to the category.

[0133] In this embodiment, at least two initial images corresponding to the category are fused to obtain the target image corresponding to the category. Specifically, as Figure 7 shown, Figure 7 is a schematic diagram of fusing at least two initial images provided by the present application. Pixel superposition is performed on at least two initial images corresponding to the category to achieve the fusion of at least two initial images corresponding to the category and obtain the target image corresponding to the category.

[0134] By fusing at least two initial images, the noise and random fluctuations in each initial image can be averaged, thereby improving the clarity and signal-to-noise ratio of the finally obtained target image. For example, the first initial image and the second initial image are collected in a bright environment. Although the light is sufficient, problems such as light fluctuations, reflections, or shadows that may exist still affect the image quality of the first initial image and the second initial image. By fusing multiple first initial images to obtain the first target image and by fusing multiple second initial images to obtain the second target image, the influence of these adverse factors can be weakened, making the finally obtained first target image and second target image smoother and clearer, so as to eliminate the influence of occasionally existing abnormal individual first initial images and / or second initial images on the device self-check result and improve the accuracy of the device self-check. Another example, the third initial image and the fourth initial image are collected in a dark environment. By fusing multiple third initial images to obtain the third target image and by fusing multiple fourth initial images to obtain the fourth target image, the signal-to-noise ratio and clarity of the finally obtained third target image and fourth target image can be improved, random noise can also be eliminated, and the image stability of the third target image and the fourth target image can be enhanced, so as to eliminate the influence of occasionally existing abnormal individual third initial images and / or fourth initial images on the device self-check result and improve the accuracy of the device self-check.

[0135] For example, if the first target image and the second target image are to be obtained, then at least two first initial images collected by the target device are fused to obtain the first target image, and at least two second initial images collected by the target device are fused to obtain the second target image. Another example is that if the third target image and the fourth target image are to be obtained, then at least two third initial images collected by the target device are fused to obtain the third target image, and at least two fourth initial images collected by the target device are fused to obtain the fourth target image.

[0136] In one embodiment, at least two initial images corresponding to a category are fused to obtain a target image corresponding to the category. Specifically, a central tendency representation image corresponding to at least two initial images corresponding to the category is obtained as the target image corresponding to the category.

[0137] Specifically, for each initial image, a central tendency representation value of the pixel values of the pixel points at the corresponding positions of each initial image is obtained as the pixel value of the pixel point at the corresponding position of the target image.

[0138] Among them, the central tendency representation value of the pixel values of the pixel points at the corresponding positions of each initial image can be the average value, median value, etc. of the pixel values of the pixel points at the corresponding positions of each initial image, which is not limited herein.

[0139] In other embodiments, at least two initial images corresponding to a category are fused to obtain a target image corresponding to the category. Specifically, at least two initial images corresponding to the category are weighted and fused to obtain the target image corresponding to the category.

[0140] Among them, the weight of the initial image with high quality can be set to be greater than the weight of the initial image with low quality.

[0141] Specifically, the pixel values of the pixel points at the corresponding positions of each initial image and the weights corresponding to each initial image are obtained; based on the pixel values of the pixel points at the corresponding positions of each initial image and the weights corresponding to each initial image, weighted summation is performed to obtain the pixel value of the pixel point at the corresponding position of the target image.

[0142] Please refer to Figure 8 , Figure 8It is a schematic structural diagram of an embodiment of the device self-checking apparatus provided by this application. The device self-checking apparatus 80 includes a first acquisition module 81, a second acquisition module 82, and a comparison module 83. The first acquisition module 81 is configured to acquire a first target image and a second target image; wherein, the first target image and the second target image are respectively generated based on at least one first initial image and at least one second initial image acquired by the target device, and the first initial image and the second initial image are respectively acquired by the image acquisition module of the target device before and after the infrared cut-off filter is switched; the second acquisition module 82 is configured to respectively acquire the first gray value distribution of the first target image and the second gray value distribution of the second target image; the comparison module 83 is configured to compare the first gray value distribution and the second gray value distribution to determine whether the infrared cut-off filter switching function of the target device is abnormal.

[0143] Wherein, the comparison module 83 is configured to compare the first gray value distribution and the second gray value distribution to determine whether the infrared cut-off filter switching function of the target device is abnormal, including: acquiring a first difference between the first gray value distribution and the second gray value distribution; based on the first difference, determining whether the infrared cut-off filter switching function of the target device is abnormal.

[0144] Wherein, the above-mentioned second target image is the corresponding image when the infrared cut-off filter of the target device is switched to an infrared transparent filter, and the first target image is the corresponding image when the infrared cut-off filter of the target device is switched to an infrared non-transparent filter; the comparison module 83 is configured to acquire a first difference between the first gray value distribution and the second gray value distribution, including: for each gray value, acquiring a first quantity corresponding to each gray value; wherein, the first quantity corresponding to the gray value is the smaller of a second quantity and a third quantity, the second quantity is the number of pixel points with the gray value in the first target image, and the third quantity is the number of pixel points with the gray value in the second target image; and, acquiring a fourth quantity; wherein, the fourth quantity is the number of pixel points of the first target image; based on the ratio between the sum of the quantities and the fourth quantity, obtaining the similarity between the first gray value distribution and the second gray value distribution as the first difference; wherein, the sum of the quantities is the sum of the first quantities corresponding to each gray value.

[0145] Wherein, the characterization value of the first difference between the first gray value distribution and the second gray value distribution includes the similarity between the first gray value distribution and the second gray value distribution; the comparison module 83 is configured to determine whether the infrared cut-off filter switching function of the target device is abnormal based on the first difference, including: in response to the similarity being less than or equal to a first preset difference threshold, determining that the infrared cut-off filter switching function of the target device is normal; in response to the similarity being greater than the first preset difference threshold, determining that the infrared cut-off filter switching function of the target device is abnormal.

[0146] Among them, the first acquisition module 81 is used to acquire a third target image and a fourth target image. The third target image and the fourth target image are respectively generated based on at least one third initial image and at least one fourth initial image collected by the target device. The third initial image and the fourth initial image are respectively collected by the image acquisition module of the target device before and after the infrared fill light is turned on. The second acquisition module 82 is used to respectively acquire the first brightness condition of the third target image and the second brightness condition of the fourth target image. The comparison module 83 is used to compare the first brightness condition and the second brightness condition to determine whether the infrared fill light of the target device is abnormal.

[0147] Among them, the comparison module 83 is used to compare the first brightness condition and the second brightness condition to determine whether the infrared fill light of the target device is abnormal, including: acquiring a second difference between the first brightness condition and the second brightness condition, and based on the second difference, determining whether the infrared fill light of the target device is abnormal.

[0148] Among them, the characterization value of the first brightness condition includes the first brightness central tendency characterization value of each pixel point of the third target image, the characterization value of the second brightness condition includes the second brightness central tendency characterization value of each pixel point of the fourth target image, and the characterization value of the second difference includes the absolute value of the difference between the first brightness central tendency characterization value and the second brightness central tendency characterization value. The comparison module 83 is used to determine whether the infrared fill light of the target device is abnormal based on the second difference, including: in response to the absolute value of the difference being greater than or equal to a second preset difference threshold, determining that the infrared fill light of the target device is normal; in response to the absolute value of the difference being less than the second preset difference threshold, determining that the infrared fill light of the target device is abnormal.

[0149] Among them, there are at least two initial images of one category. The acquisition step of the first acquisition module 81 for acquiring the target image includes: acquiring at least two initial images corresponding to the category; fusing the at least two initial images corresponding to the category to obtain the target image corresponding to the category.

[0150] Among them, the first acquisition module 81 is used to fuse at least two initial images corresponding to the category to obtain the target image corresponding to the category, including: acquiring a central tendency characterization image corresponding to the at least two initial images corresponding to the category as the target image corresponding to the category.

[0151] Among them, the above target device is an intelligent lock.

[0152] Please refer to Figure 9 , Figure 9It is a schematic structural diagram of an embodiment of an electronic device provided by this application. The electronic device 90 includes a mutually coupled memory 91 and a processor 92. The processor 92 is used to execute the program instructions stored in the memory 91 to implement the steps of any of the above-mentioned device self-checking method embodiments. In a specific implementation scenario, the electronic device 90 may include, but is not limited to: a microcomputer, a server. In addition, the electronic device 90 may also include mobile devices such as a laptop computer, a tablet computer, etc., which are not limited herein.

[0153] Specifically, the processor 92 is used to control itself and the memory 91 to implement the steps of any of the above-mentioned device self-checking method embodiments. The processor 92 may also be referred to as a CPU (Central Processing Unit, central processing unit). The processor 92 may be an integrated circuit chip with signal processing capabilities. The processor 92 may also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. In addition, the processor 92 may be implemented jointly by integrated circuit chips.

[0154] Please refer to Figure 10 , Figure 10 It is a schematic structural diagram of an embodiment of a computer-readable storage medium provided by this application. The computer-readable storage medium 100 of the embodiment of this application stores program instructions 101. When the program instructions 101 are executed, they implement the methods provided by any of the device self-checking method embodiments of this application and any non-conflicting combinations. Among them, the program instructions 101 may form a program file and be stored in the above-mentioned computer-readable storage medium 100 in the form of a software product, so that a computer device (which may be a personal computer, a server, or a network device, etc.) executes all or part of the steps of the methods of various implementation manners of this application. The foregoing computer-readable storage medium 100 includes: various media that can store program codes such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc, or a terminal device such as a computer, a server, a mobile phone, a tablet computer, etc.

[0155] If the technical solution of this application involves personal information, before the product applying the technical solution of this application processes personal information, it has clearly informed the personal information processing rules and obtained the autonomous consent of the individual. If the technical solution of this application involves sensitive personal information, before the product applying the technical solution of this application processes sensitive personal information, it has obtained the individual's separate consent and at the same time meets the requirements of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If an individual voluntarily enters the collection scope, it is regarded as consenting to the collection of their personal information; or on the device for personal information processing, when the personal information processing rules are informed by obvious signs / information, personal authorization is obtained through pop-up messages or by asking the individual to upload their personal information by themselves, etc.; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.

[0156] The above are only the implementation manners of this application, and do not limit the patent scope of this application accordingly. Any equivalent structural or equivalent process transformation made by using the content of the specification and drawings of this application, or directly or indirectly applied in other related technical fields, shall be included in the patent protection scope of this application by the same token.

Claims

1. A device self-checking method, characterized in that, The method includes: Obtaining a first target image and a second target image; wherein, the first target image and the second target image are respectively generated based on at least one first initial image and at least one second initial image collected by a target device, and the first initial image and the second initial image are respectively collected by an image acquisition module of the target device before and after switching an infrared cut-off filter; Respectively obtaining a first gray value distribution of the first target image and a second gray value distribution of the second target image; Comparing the first gray value distribution and the second gray value distribution to determine whether the infrared cut-off filter switching function of the target device is abnormal.

2. The method according to claim 1, wherein The comparing the first gray value distribution and the second gray value distribution to determine whether the infrared cut-off filter switching function of the target device is abnormal includes: Obtaining a first difference between the first gray value distribution and the second gray value distribution; Based on the first difference, determining whether the infrared cut-off filter switching function of the target device is abnormal.

3. The method according to claim 2, characterized in that, The second target image is an image corresponding to the case where the infrared cut-off filter of the target device is switched to an infrared transparent filter, and the first target image is an image corresponding to the case where the infrared cut-off filter of the target device is switched to an infrared non-transparent filter; the obtaining the first difference between the first gray value distribution and the second gray value distribution includes: For each gray value, obtaining a first quantity corresponding to each gray value; wherein, the first quantity corresponding to the gray value is the smaller of a second quantity and a third quantity, the second quantity is the number of pixel points with the gray value in the first target image, and the third quantity is the number of pixel points with the gray value in the second target image; And obtaining a fourth quantity; wherein, the fourth quantity is the number of pixel points of the first target image; Based on the ratio between the sum of the quantities and the fourth quantity, obtaining the similarity between the first gray value distribution and the second gray value distribution as the first difference; wherein, the sum of the quantities is the sum of the first quantities corresponding to each gray value.

4. The method according to claim 2, characterized in that, The characterization value of the first difference between the first gray value distribution and the second gray value distribution includes the similarity between the first gray value distribution and the second gray value distribution; the determining whether the infrared cut-off filter switching function of the target device is abnormal based on the first difference includes: In response to the similarity being less than or equal to a first preset difference threshold, determining that the infrared cut-off filter switching function of the target device is normal; In response to the similarity being greater than the first preset difference threshold, determining that the infrared cut-off filter switching function of the target device is abnormal.

5. The method according to claim 1, characterized in that The method further includes: Obtain a third target image and a fourth target image; wherein, the third target image and the fourth target image are respectively generated based on at least one third initial image and at least one fourth initial image collected by the target device, and the third initial image and the fourth initial image are respectively collected by the image acquisition module of the target device before and after the infrared fill light is turned on; Obtain the first brightness condition of the third target image and the second brightness condition of the fourth target image respectively; Compare the first brightness condition and the second brightness condition to determine whether the infrared fill light of the target device is abnormal.

6. The method according to claim 5, wherein The comparing the first brightness condition and the second brightness condition to determine whether the infrared fill light of the target device is abnormal includes: Obtain a second difference between the first brightness condition and the second brightness condition, Based on the second difference, determine whether the infrared fill light of the target device is abnormal.

7. The method according to claim 5, characterized in that, The characterization value of the first brightness condition includes the first brightness central tendency characterization value of each pixel point of the third target image, the characterization value of the second brightness condition includes the second brightness central tendency characterization value of each pixel point of the fourth target image, and the characterization value of the second difference includes the absolute value of the difference between the first brightness central tendency characterization value and the second brightness central tendency characterization value; The determining whether the infrared fill light of the target device is abnormal based on the second difference includes: In response to the absolute value of the difference being greater than or equal to a second preset difference threshold, determine that the infrared fill light of the target device is normal; In response to the absolute value of the difference being less than the second preset difference threshold, determine that the infrared fill light of the target device is abnormal.

8. The method according to claim 1 or 5, characterized in that, There are at least two initial images of one category; the step of obtaining the target image includes: Obtain at least two initial images corresponding to the category; Fuse at least two initial images corresponding to the category to obtain the target image corresponding to the category.

9. The method according to claim 8, wherein The fusing at least two initial images corresponding to the category to obtain the target image corresponding to the category includes: Obtain a central tendency characterization image corresponding to at least two initial images corresponding to the category as the target image corresponding to the category.

10. According to the method of claim 1, wherein, The target device is an intelligent lock.

11. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory stores program instructions, and the processor is configured to execute the program instructions to implement the method according to any one of claims 1-10.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program instructions, and the program instructions can be executed to implement the method according to any one of claims 1-10.