Fire point detection method, device, electronic device and storage medium
By determining the target position of the focus lens group in the fire point detection method and using the fire point detection template and threshold judgment, the problem of insufficient accuracy of fire point detection in multi-object distance scenes is solved, and efficient and accurate detection of fire points is achieved.
Patent Information
- Application Number
- CN202011587808.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-29
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2040-12-29
AI Technical Summary
The existing fire point detection methods are insufficient in multi-object distance scenarios, especially when the fire point deviates from the effective depth of field of the camera, and the heat radiation intensity is insufficient, resulting in low imaging brightness.
By acquiring the minimum object distance and maximum object distance of the image acquisition device, the target position of the focus lens group is determined, and the fire point detection template moves in the image, the pixel value is used to determine whether it is a fire point area, the first and second fire point detection thresholds are set to improve detection accuracy, and the suspected fire point is confirmed through secondary detection.
In the multi-object distance scenario, the accuracy of fire point detection is improved, missed and missed detection is reduced, and the timeliness and accuracy of fire point detection is ensured.
Smart Images

Figure CN114758290B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of image monitoring, and in particular, to a method, device, electronic device, and storage medium for fire point detection. Background Art
[0002] Fire is a common and frequent disaster, which is characterized by strong suddenness, great destructiveness, and difficult disposal and rescue, seriously affecting people's lives and property safety. Therefore, in the fire monitoring link, the timeliness and accuracy of detecting fire points are particularly important, which can enable relevant personnel to take rescue measures as soon as possible and minimize the losses caused by fires.
[0003] Existing fire point detection methods can be detected by a thermal imaging pan-tilt camera. The thermal imaging pan-tilt camera is installed at a high monitoring point, and the monitoring scene is traversed and scanned, so as to achieve full coverage of fire point detection in the monitoring scene. Once a fire point is detected, the camera immediately sends an alarm to the control center through the network, and at the same time, the position information of the fire point can be located through the pan-tilt orientation. The control center can quickly discover the fire point and take measures in the early stage of the fire to avoid greater losses and disasters. In order to cover a farther monitoring distance, the focal length of the thermal imaging lens generally used in forest fire prevention or other large monitoring area fields is generally above 50mm. According to the lens imaging principle, the larger the focal length, the smaller the depth of field.
[0004] When the monitoring scene of the camera is a multi-object distance scene, if image acquisition is still performed according to the position of the fixed focusing lens group during the scanning cruise, when the fire point is at a position outside the effective depth of field of the camera and the area of the fire point is small, the thermal radiation intensity is insufficient, and the imaging brightness of the camera is not high, which will cause the problem of missed detection of the fire point. Summary of the Invention
[0005] Embodiments of the present invention provide a method, device, electronic device, and storage medium for fire point detection to improve the accuracy of fire point detection under multi-object distances.
[0006] In a first aspect, an embodiment of the present invention provides a method for fire point detection, including:
[0007] Obtaining a to-be-detected image collected by an image acquisition device based on a focusing lens group at a target position; wherein, the target position of the focusing lens group is determined according to the minimum object distance and the maximum object distance in the to-be-detected image;
[0008] Moving a fire point detection template in the to-be-detected image according to a preset moving rule, and using the range covered by the fire point detection template as a detection area;
[0009] Determining whether the detection area is a fire point area according to the pixel values in the detection area.
[0010] In a second aspect, an embodiment of the present invention further provides a fire point detection device, including:
[0011] An image acquisition module, configured to acquire a to-be-detected image collected by an image acquisition device at a target position based on a focusing lens group; wherein, the target position of the focusing lens group is determined according to the minimum object distance and the maximum object distance in the to-be-detected image;
[0012] A template moving module, configured to move a fire point detection template in the to-be-detected image according to a preset moving rule, and use the range covered by the fire point detection template as a detection area;
[0013] A fire point determination module, configured to determine whether the detection area is a fire point area according to the pixel values in the detection area.
[0014] In a third aspect, an embodiment of the present invention further provides an electronic device, including:
[0015] One or more processors;
[0016] A storage device, configured to store one or more programs,
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the fire point detection method as described in any embodiment of the present invention.
[0018] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the fire point detection method as described in any embodiment of the present invention.
[0019] An embodiment of the present invention determines the target position of a focusing lens group based on the minimum object distance and the maximum object distance in the collected image frame, and collects a to-be-detected image based on the target position; determines a detection area according to the moving result of a fire point detection template in the to-be-detected image, and determines whether the detection area is a fire point area according to the pixel values of the detection area. Determining the target position of the focusing lens group according to the object distance in the collected image frame enables the focusing lens group at the target position to achieve the maximum detection clarity under the current object distance, so as to ensure that in a multi-object distance scenario, multi-object distance fire points in the scene image can be detected, improving the accuracy of fire point detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a flowchart of the fire point detection method in Embodiment 1 of the present invention;
[0021] Figure 2 is a schematic diagram of an S-shaped scanning path;
[0022] Figure 3It is a schematic diagram of the fire point detection template;
[0023] Figure 4 It is a schematic diagram of the pixel value attenuation of the simulated fire point area near the imaging clear point;
[0024] Figure 5 It is a schematic diagram of the actual detection range of the suspected fire point area;
[0025] Figure 6 It is a flowchart of the fire point detection method in the second embodiment of the present invention;
[0026] Figure 7 It is a schematic diagram for determining the position of the fire point area in the image;
[0027] Figure 8 It is a schematic structural diagram of the fire point detection device in the third embodiment of the present invention;
[0028] Figure 9 It is a schematic structural diagram of the electronic device in the fourth embodiment of the present invention. Detailed implementation manners
[0029] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. Additionally, it should be noted that for the sake of description, only the parts related to the present invention are shown in the accompanying drawings, rather than all the structures.
[0030] Embodiment 1
[0031] Figure 1 It is a flowchart of the fire point detection method in the first embodiment of the present invention. This embodiment is applicable to the fire point detection in a multi-object distance scenario. This method can be executed by a fire point detection device, which can be implemented in software and / or hardware and can be configured in an electronic device. For example, the electronic device can be a device with communication and computing capabilities such as a background server. As Figure 1 shown, the method specifically includes:
[0032] Step 101, obtain a to-be-detected image collected by an image acquisition device at a target position based on a focusing lens group; wherein, the target position of the focusing lens group is determined according to the minimum object distance and the maximum object distance in the to-be-detected image.
[0033] Among them, the image acquisition device refers to a camera that can achieve long-distance monitoring. To achieve long-distance monitoring, the camera needs to use a telephoto lens. Based on the imaging principle of the telephoto lens, there is inevitably a problem of small depth of field. In the embodiments of the present invention, in order to improve the accuracy of fire point detection, the image acquisition device in the present invention is a thermal imaging pan-tilt camera. The camera can traverse and cruise scan the monitoring scene by rotating the pan-tilt, achieving full coverage of fire point detection in the monitoring scene. In the image acquisition device, in order to meet different monitoring distances, there is a group of lens groups whose positions can be adjusted in the lens, called the focusing lens group. The focusing lens group is driven by a focusing motor to move back and forth, so that objects at different object distances can be clearly imaged. And when the imaging is clear, the object distance and the position of the focusing lens are in one-to-one correspondence. The object distance refers to the distance between the camera and the observation target. The minimum object distance in the image to be detected refers to the closest monitoring distance in the image to be detected, and the maximum object distance refers to the farthest monitoring distance in the image to be detected. According to the camera imaging law, the minimum object distance refers to the distance between the observation target at the bottom of the image to be detected and the camera, and the maximum object distance refers to the distance between the observation target at the top of the image to be detected and the camera.
[0034] When the image acquisition device acquires images during the cruise scan, the target position of the focusing lens group is determined according to the minimum object distance and the maximum object distance in the acquired image frame, that is, the target position of the focusing motor is determined. Specifically, if the image acquisition device is to image the target object at the minimum object distance most clearly, there is a closest position of the focusing motor corresponding to this minimum object distance. Similarly, if the image acquisition device is to image the target object at the maximum object distance most clearly, there is also a farthest position of the focusing motor corresponding to this farthest object distance. When the focusing motor is at the closest position, the object at the bottom of the acquired image is imaged most clearly, and the farther away from the bottom object, the less clear the imaging; when the focusing motor is at the farthest position, the object at the top of the acquired image is imaged most clearly, and the farther away from the top object, the less clear the imaging. Therefore, the target position of the focusing lens group is determined according to the minimum object distance and the maximum object distance in the image to be detected so that the objects in the entire image frame are relatively the clearest. In order to balance the clarity of the entire image frame, the target position of the focusing lens group is set to F during the scan process, that is, the target position of the focusing motor is determined to be F, and F is located between the closest position and the farthest position of the focusing motor. Exemplarily, the closest position of the focusing motor is F N , and the farthest position is F F , then F = (F N + F F ) / 2, and the clarity of the image to be detected within the monitoring range is the best. In the embodiments of the present invention, the specific setting method of F is not limited.
[0035] Optionally, when the image acquisition device scans and cruises in the horizontal direction, the minimum object distance and the maximum object distance in the acquired image frame do not change significantly. When the image acquisition device scans and cruises in the vertical direction, the minimum object distance and the maximum object distance in the acquired image frame will change. Therefore, when it is obtained that the lens of the image acquisition device changes in the vertical direction, the minimum object distance and the maximum object distance in the acquired image are determined, and then the target position of the focusing lens group is determined; if it is not obtained that the lens of the image acquisition device changes in the vertical direction, when the image acquisition device only scans and cruises in the horizontal direction to acquire images, the position of the focusing lens group can be kept unchanged. Exemplarily, when it is monitored that the pan-tilt rotates in the vertical direction, the target position of the focusing lens group for acquiring the image to be detected is re-determined according to the minimum object distance and the maximum object distance in the current monitoring screen.
[0036] In a feasible embodiment, before step 101, it further includes:
[0037] Determine at least two calibration positions of the focusing lens group when the image acquisition device makes the objects at at least two calibration object distances image most clearly;
[0038] According to at least two calibration object distances and at least two calibration positions of the focusing lens group, determine the relationship between the object distance and the position of the focusing lens group when imaging is most clear;
[0039] Correspondingly, the target position of the focusing lens group is determined according to the minimum object distance and the maximum object distance in the image to be detected, including:
[0040] Based on the relationship between the object distance and the position of the focusing lens group, determine the nearest position and the farthest position of the associated focusing lens group according to the minimum object distance and the maximum object distance in the image to be detected;
[0041] Determine the target position of the focusing lens group according to the nearest position and the farthest position of the focusing lens group.
[0042] Wherein, the calibration object distance is determined according to the monitoring range. Select at least two object distances from the monitoring range as the calibration object distances. The number and range of the calibration object distances are set according to the accuracy required by the monitoring and the actual monitoring range used, and are not limited here. Exemplarily, if the monitoring range is from 10 meters to 50 meters, the calibration object distances can be set to 10 meters, 20 meters, 30 meters, 40 meters, and 50 meters.
[0043] Measure the position of the focusing lens group corresponding to the clearest imaging of the object at at least two selected calibration object distances, and determine it as the calibration position. Based on this, establish the corresponding relationship between the calibration object distance and the calibration position. Due to the imaging principle of the camera, the relationship between the object distance and the position of the clear-point focusing lens group is non-linear. Therefore, by performing piecewise interpolation based on the calibration object distance and the calibration position, the position of the focusing lens group corresponding to each object distance can be obtained.
[0044] When the image acquisition device needs to determine the target position of the focusing lens group, based on the piecewise interpolation result, determine the nearest position of the focusing lens group corresponding to the minimum object distance and the farthest position of the focusing lens group corresponding to the maximum object distance in the acquired image, so as to determine the target position of the focusing lens group. Exemplarily, after obtaining the minimum object distance, determine the two calibration object distances between which the minimum object distance is located, and then perform non-linear interpolation on the positions of the focusing motors corresponding to the two calibration object distances to obtain the target position of the focusing motor.
[0045] By pre-calibrating the relationship between the object distance and the position of the focusing motor, it is possible to quickly determine the target position of the focusing motor corresponding to the currently acquired image during actual scanning and cruising for image acquisition, improving the efficiency of image acquisition. This avoids the time-consuming process of determining the position of the focusing motor in real time during acquisition.
[0046] In a feasible embodiment, the scanning path for the image acquisition device to acquire images includes at least two scanning inflection points. At each scanning inflection point, the lens of the image acquisition device is rotated in the vertical direction. The method further includes:
[0047] Obtain the pre-scanned images after the image acquisition device rotates in the vertical direction at each scanning inflection point;
[0048] Determine the nearest position and the farthest position of the focusing lens group when the imaging is clear according to the minimum object distance and the maximum object distance in the pre-scanned images, and establish the association relationship between each scanning inflection point and the nearest position and the farthest position of the focusing lens group;
[0049] Correspondingly, the target position of the focusing lens group is determined according to the minimum object distance and the maximum object distance in the image to be detected, including:
[0050] Determine the currently experienced scanning inflection point of the image acquisition device;
[0051] Based on the association relationship between each scanning inflection point and the nearest position and the farthest position of the focusing lens group, determine the current nearest position and the current farthest position of the focusing lens group according to the currently experienced scanning inflection point;
[0052] Determine the target position of the focusing lens group according to the current nearest position and the current farthest position.
[0053] Among them, the image acquisition device performs cruise scanning according to a pre-planned scanning path and acquires images during the scanning process. The pre-planned scanning path is based on the defined scope of the monitoring area. Through reasonable planning, full coverage of the monitoring area can be achieved after the scanning is completed. The planning of the scanning path needs to be determined according to the angle of the monitoring area and the field of view angle of the current image acquisition device to ensure no repetition and no omission. In order to ensure full coverage of the monitoring area while making the scanning path scanned by the image acquisition device the shortest, the scanning path is generally planned as an S shape, as Figure 2 shown in the schematic diagram of an S-shaped scanning path. When acquiring images according to this scanning path, there are horizontal scans and vertical scans. The nearest position of the focusing lens group corresponding to the minimum object distance in the images acquired during the scanning process is the near clear point F N , and the farthest position of the focusing lens group corresponding to the maximum object distance is the far clear point F F . In each image acquired during the horizontal scan in the scanning path, F N and F F remain unchanged. Only F N and F F in the images acquired during the vertical scan in the scanning path will change.
[0054] Therefore, in order to improve the efficiency of determining the near clear point and the far clear point of the images acquired at each scanning point during the subsequent scanning process, after the scanning path is planned, the image acquisition device is controlled to perform a pre-scan in the vertical direction, obtain the pre-scan images at each scanning inflection point on the vertical scanning path, and perform autofocus on the minimum object distance and the maximum object distance in each pre-scan image respectively, and record F N and F F in each pre-scan image in turn, and establish the association relationship between the vertical direction of each scanning inflection point and the nearest position F N and the farthest position F F of the focusing lens group. Exemplarily, establish the mapping relationship between the vertical rotation direction of the pan-tilt and F N and F F .
[0055] During the formal scanning process, determine the current scanning inflection point that the image acquisition device is passing through, that is, determine the current vertical direction of the image acquisition device, and according to the vertical direction and the nearest position F N and the farthest position F FThe association relationship is used to determine the current nearest position and the current farthest position associated with the current vertical direction, and the target position of the focusing lens group is determined based on the current nearest position and the current farthest position. Exemplarily, if the average value of the nearest position and the farthest position in the scanned image is used as the target position, the association relationship between the vertical direction and the target position can be directly established, that is, the current target position can be directly determined according to the current vertical direction during the formal scanning process, further improving the efficiency of image acquisition.
[0056] Optionally, monitor the vertical direction of the image acquisition device. If no change is detected in the vertical direction, directly keep the current target position of the focusing lens group unchanged; if a change is detected in the vertical direction, at this time, it is necessary to re-determine the target position of the corresponding focusing lens group according to the current vertical direction, that is, determine the vertical direction when acquiring the image and update the current target position.
[0057] In the existing cruise scheme, generally, autofocus is performed automatically at each scanning inflection point, making the entire picture clear globally, but it is impossible to quantitatively judge the clarity of each local area. That is, it cannot be guaranteed that the position of the focusing lens group during autofocus can ensure the highest local clarity in the entire picture. Therefore, in the embodiments of the present invention, the target position of the focusing lens group is determined according to the minimum object distance and the maximum object distance in the acquired image, which not only ensures the clarity of the global image but also ensures the clarity of the local area, improving the accuracy of fire point detection.
[0058] Step 102: Move the fire point detection template in the image to be detected according to the pre-set movement rule, and use the range covered by the fire point detection template as the detection area.
[0059] Among them, the fire point detection template refers to the area template used to locate the fire point position, which can be determined according to the actual accuracy of fire point detection and is not limited here. Exemplarily, the schematic diagram of the fire point detection template is as Figure 3 shown. For Figure 3 the three types of fire point detection templates exemplified in it are just several examples, but are not limited to these three. For example, in the embodiments of the present invention, the fire point detection template of type a is adopted, that is, the target of four pixels is moved and traversed in the image to be detected for searching. The pre-set movement rule is used to set the movement step and the movement direction of the fire point detection template in the image to be detected. The movement step can be set according to the size of the fire point detection template and is not limited here.
[0060] Specifically, during the scanning and cruising of the image acquisition device, fire point detection is performed on each frame of the acquired image. After each frame of image is acquired, a fire point detection template is sequentially moved and traversed in the image to be detected to determine each detection area covered during the movement and traversal of the fire point detection template. The moving step size of the fire point detection template can also be set according to actual needs and is not limited herein.
[0061] Step 103: Determine whether the detection area is a fire point area according to the pixel values in the detection area.
[0062] Since the image acquisition device is a thermal imaging camera, the thermal imaging camera uses an infrared detector to capture the infrared light radiated by an object and then presents an image of the object according to the magnitude of the infrared radiation intensity. Taking a grayscale image as an example, the higher the pixel value, the stronger the infrared radiation at that point and the higher the temperature. Therefore, it can be determined whether the temperature in the detection area is too high according to the pixel value in the detection area. If it is too high, the detection area is determined to be a fire point area. Exemplarily, the average pixel value in each detection area is determined, and whether it is a fire point area is determined according to the comparison result between the average pixel value and a pre-determined fire point detection threshold. The fire point detection threshold can be determined according to the actual temperature of the fire point. Judging by the average pixel value of multiple pixel points in the detection area can reduce the interference of random noise of a single pixel point and improve the accuracy of fire point detection.
[0063] In a feasible embodiment, before step 103, it further includes:
[0064] Obtain a simulated image acquired by the image acquisition device for a simulated fire point at a simulated position based on a focusing lens group, and determine the pixel value of the simulated fire point area where the simulated fire point is located in the simulated image; wherein, the simulated position of the focusing lens group is determined according to the object distance between the simulated fire point and the image acquisition device;
[0065] Determine the pixel value of the non-simulated fire point area in the simulated image;
[0066] Determine a first fire point detection threshold and a second fire point detection threshold according to the pixel value of the simulated fire point area and the pixel value of the non-simulated fire point area; wherein, the pixel value of the simulated fire point area is greater than the first fire point detection threshold, the first fire point detection threshold is greater than the second fire point detection threshold, and the second fire point detection threshold is greater than the pixel value of the non-simulated fire point area.
[0067] Wherein, the simulated fire point is a selected fire source for simulating and testing a real fire point. For example, the simulated fire point can be an alcohol lamp or other easily controllable fire source. Using a simulated fire point for actual measurement to calibrate the fire point detection threshold in advance makes the determined fire point detection threshold closer to the real fire point and improves the accuracy of fire point detection.
[0068] Specifically, place the simulated fire point within the effective detection area of the image acquisition device. For example, place it at a position where the object distance from the image acquisition device is D. According to the working principle of the thermal imaging camera, the gray value of the image captured by the thermal imaging camera is related to the temperature of the object being photographed and the object distance between the object and the camera. However, in fields such as forest fire prevention with relatively long monitoring distances, the influence of the distance on the gray value of the captured image can be ignored. The detection threshold for fire point judgment only depends on the temperature difference between the fire point temperature and the surrounding environment temperature. Therefore, no specific limitation is imposed on the specific size of the object distance D.
[0069] Place the simulated fire point at a position where the object distance from the image acquisition device is D. Adjust the position of the focusing lens group by adjusting the position of the focusing motor of the image acquisition device to make the fire point image clearly in the image acquisition device. Exemplarily, use the method of automatic regional focusing on the simulated fire point area to achieve clear imaging of the simulated fire point. Determine the simulated fire point area where the simulated fire point is located according to the fire point detection template in the simulated image with clear imaging of the simulated fire point, determine the pixel value size of the simulated fire point area, and the pixel value size of the non-simulated fire point area. Exemplarily, use the average pixel value of the simulated fire point area as the average pixel value of the real fire point area, and use the average pixel value of the non-simulated fire point area as the average pixel value of the real non-fire point area. Since the simulated fire point is artificially placed, it can be determined that the simulated fire point area is the real fire point, which can reflect the pixel value level of the real fire point area, and it can also be determined that there is no fire point in the non-simulated fire point area. Therefore, the pixel value of the non-simulated fire point area can reflect the pixel value level of the background. Denote the pixel value of the simulated fire point area as I 火 , and denote the pixel value of the non-simulated fire point area as I b .
[0070] According to the camera imaging principle, when the simulated fire point is imaged most clearly on the imaging surface, the pixel value of the simulated fire point area is the largest. When the position of the focusing lens group deviates from the position corresponding to the clear point, the image of the simulated fire point begins to form a divergent light spot, and the pixel value of the simulated fire point area begins to decrease. The farther the position of the focusing lens group deviates from the clear point, the pixel value of the simulated fire point area gradually decreases to the same level I of the background of the non-fire point area b . Therefore, determine the first fire point detection threshold I1 and the second fire point detection threshold I2 between the pixel value I 火 of the simulated fire point area and the pixel value I b of the non-simulated fire point area, so that I 火 >I1>I2>I b。The fire point detection threshold should have a significant distinction in the background area to minimize misjudgment. Therefore, two fire point detection thresholds are set. The first fire point detection threshold is closest to the pixel value of the simulated fire point area to achieve accurate judgment of the fire point area. At the same time, for the captured image to be detected when the focusing lens group is in the target position, the fire points at all object distances can be imaged most clearly. Therefore, a second fire point detection threshold greater than the pixel value of the non-simulated fire point area and less than the first fire point detection threshold is set to avoid missing the detection of fire points that are not imaged most clearly. Exemplarily, the following formula is used to determine the first fire point detection threshold and the second fire point detection threshold: I1 = 0.1*I b + 0.9*I 火 ; I2 = 0.9*I b + 0.1*I 火 , but the embodiments of the present invention do not limit the setting of the specific fire point detection threshold.
[0071] In a feasible embodiment, step 103 includes:
[0072] If the pixel value in the detection area is greater than or equal to the first fire point detection threshold, it is determined that the detection area is a fire point area;
[0073] If the pixel value in the detection area is less than the second fire point detection threshold, it is determined that the detection area is not a fire point area.
[0074] Since the first fire point detection threshold is close to the pixel value of the simulated fire point area, if the pixel value in the detection area of the image to be detected is greater than or equal to the first fire point detection threshold, it can be considered that the detection area is a fire point area. Since the second fire point detection threshold is close to the pixel value of the non-simulated fire point area, if the pixel value in the detection area of the image to be detected is less than the second fire point detection threshold, it is determined that the detection area is not a fire point area and is closer to the background area.
[0075] Exemplarily, if the average pixel value in the detection area is greater than or equal to the first fire point detection threshold, it is determined that the detection area is a fire point area; if the average pixel value in the detection area is less than the second fire point detection threshold, it is determined that the detection area is not a fire point area.
[0076] In a feasible embodiment, step 103 further includes:
[0077] If the pixel value in the detection area is less than the first fire point detection threshold and greater than or equal to the second fire point detection threshold, it is determined that the detection area is a suspected fire point area;
[0078] Perform secondary detection on the suspected fire point area to obtain the fire point area in the suspected fire point area.
[0079] Since there may be fire points with multiple object distances in the image to be detected, but the fire points with multiple object distances will not form the clearest images on the same image. Therefore, to avoid missing the detection of fire points, if the pixel value in the detection area is between the first fire point detection threshold and the second fire point detection threshold, the detection area is determined as a suspected fire point area. For the suspected fire point area, it may be some sunlight reflections or high-temperature objects, or it may be a real fire point. However, because the suspected fire point area is outside the effective depth of field of the current imaging, the imaging of the suspected fire point on the image through the lens is relatively divergent, resulting in a low pixel value in the suspected fire point area and not meeting the judgment condition of the first fire point detection threshold. Therefore, it is necessary to perform a secondary detection on the suspected fire point area to ensure the accuracy of fire point detection and avoid false detection and missed detection.
[0080] After the detection of the detection areas in the entire image to be detected is completed, if no fire point area and suspected fire point area are found, the scanning of the next frame of image continues. If a suspected fire point area is found, a secondary detection is performed according to the number of suspected fire point areas.
[0081] In a feasible embodiment, performing a secondary detection on the suspected fire point area to obtain the fire point area in the suspected fire point area includes:
[0082] Determine the nearest position of the focusing lens group associated with the minimum object distance and the farthest position of the focusing lens group associated with the maximum object distance in the image to be detected. Move the focusing lens group from the nearest position to the farthest position, and collect at least two images during the movement. If the pixel value of the target suspected fire point area in any one of the at least two images is greater than or equal to the first fire point detection threshold, determine that the target suspected fire point area is a fire point area.
[0083] In an embodiment of the present invention, when detecting suspected fire point regions at multiple object distances in the same image, the focusing lens group is moved from the nearest position associated with the minimum object distance in the image to the farthest position, and multiple images are collected during the movement. For any suspected fire point region in these multiple images, there will be a corresponding image in which the imaging of the suspected fire point region is relatively clear. Therefore, if the pixel value of any suspected fire point region in any image is greater than or equal to the first fire point detection threshold, it is determined that the suspected fire point region is a fire point region; if the pixel values of a certain suspected fire point region in all images are less than the first fire point detection threshold, it is determined that the suspected fire point region is not a fire point region. Exemplarily, when controlling the position movement of the focusing lens group, the focusing motor can move according to a preset step size, and one frame of image is collected for each movement of the focusing motor by one step size. The pixel value of the corresponding suspected fire point region in each frame of image is compared with the first fire point detection threshold; if the pixel value of the suspected fire point region is greater than the first fire point detection threshold, it is determined that the target suspected fire point is a fire point region. The setting of the preset step size can be determined according to the object distance range and depth of field value in the images collected by the image acquisition device, which is not limited herein.
[0084] After the secondary detection of the suspected fire point regions is completed, if no fire point region is found in the image to be detected, the next frame of image is directly collected for detection; if a fire point region is found in the image to be detected, including the fire point region determined from the suspected fire point regions, the position information of all the fire point regions is determined.
[0085] In a feasible embodiment, the secondary detection of the suspected fire point regions to obtain the fire point regions in the suspected fire point regions includes:
[0086] Determine the number of suspected fire point regions in the image to be detected;
[0087] If the number of suspected fire point regions is one, perform regional autofocus on the suspected fire point region, and determine the focused pixel value of the suspected fire point region in the focused image. If the focused pixel value is greater than or equal to the first fire point detection threshold, it is determined that the suspected fire point region is a fire point region.
[0088] If after traversing the image to be detected, it is determined that there is only one suspected fire point area, then moving the focusing lens group from the nearest position to the farthest position for secondary detection will result in slow focusing efficiency. Therefore, when there is only one suspected fire point area in the image to be detected, directly perform regional autofocus on this area to make the imaging of the suspected fire point area the clearest. Recalculate the focusing pixel value of the suspected fire point area after focusing. If the focusing pixel value is greater than or equal to the first fire point detection threshold, then determine that this suspected fire point area is a fire point area. If the focusing pixel value is less than the first fire point detection threshold, then determine that this suspected fire point area is not a fire point area. Exemplarily, since the suspected fire point area is determined according to the fire point detection template, the number of pixel points occupied by the suspected fire point area is relatively small. Before autofocus, expand outward from the suspected fire point area to an area of interest, and after performing regional autofocus on this area of interest, determine the focusing pixel value of the suspected fire point area in the area of interest. Here, the size of the area of interest can be determined according to the actual focusing effect and is not limited herein.
[0089] Since there is only one suspected fire point area in the image to be detected, if this suspected fire point area is caused by a real fire point, after performing autofocus on it, the pixel value of this suspected fire point area is close to the pixel value of the simulated fire point area. Therefore, directly compare it with the first fire point detection pixel value to improve the accuracy of fire point detection.
[0090] On this basis, if after traversing the image to be detected, it is determined that there are at least two suspected fire point areas, it means that the two suspected fire point areas are at different object distances. Therefore, if directly perform autofocus on one of the suspected fire point areas, there will still be a situation where the focusing pixel value of the remaining suspected fire point area is less than the first fire point detection pixel value. Therefore, when performing secondary detection on at least two suspected fire point areas in the image to be detected, determine the nearest position of the focusing lens group associated with the minimum object distance and the farthest position of the focusing lens group associated with the maximum object distance in the image to be detected. Move the focusing lens group from the nearest position to the farthest position, and collect at least two images during the movement. If the pixel value of the target suspected fire point area in any one of the at least two images is greater than or equal to the first fire point detection threshold, then determine that the target suspected fire point area is a fire point area.
[0091] The secondary detection of the suspected fire point area needs to be determined according to the number of suspected fire point areas in the image to be detected, because different numbers indicate different object distances of the target detection object in the image. Therefore, targeted secondary detection can improve the detection efficiency.
[0092] In a feasible embodiment, the method further includes:
[0093] Move the position of the focusing lens group, and determine the first position and the second position of the focusing lens group when the pixel value of the analog fire point area is at the second fire point detection threshold on the pixel value attenuation path during the movement.
[0094] Determine the first object distance and the second object distance according to the first position and the second position of the focusing lens group.
[0095] Determine the actual detection object distance range for fire point detection in the image collected by the image acquisition device according to the first object distance and the second object distance.
[0096] Determine the scanning path of the image collected by the image acquisition device according to the actual detection object distance range.
[0097] When conducting the actual measurement of the analog fire point, there is only one position of the focusing clear point corresponding to the object distance of the analog fire point area. When deviating from this clear point, the pixel value of the analog fire point area will gradually decrease. As Figure 4 shown in the schematic diagram of the pixel value attenuation of the analog fire point area near the imaging clear point, Figure 4 where F is the position of the focusing lens group corresponding to the clearest imaging of the analog fire point on the imaging surface. When the focusing lens group is at position F, the pixel value of the analog fire point area on the analog image is I 火 , and the pixel value of the non-analog fire point area is I b . Between I 火 and I b , determine the values of I1 and I2. After the second fire point detection threshold is determined, there is a position of the focusing lens group (i.e., F1 and F2) on both sides of the clear point F, near and far, such that the pixel value of the analog fire point area is I2. If the position of the focusing lens group is set to F during the current analog image acquisition, but the position of the focusing lens group corresponding to the object distance where the actual analog fire point is placed should be F1 or F2, it can be seen that when the position of the focusing lens group is between F1 and F2, the pixel value detected for the analog fire point area in the analog image is greater than the second fire point detection threshold, and it can be judged as a suspected fire point. Further, when conducting a secondary detection on the suspected fire point area, gradually search by moving the position of the focusing lens group. As Figure 5 shown in the schematic diagram of the actual detection range of the suspected fire point area, from Figure 4 it can be determined that when the focusing lens group is at F1 or F2, the suspected fire point area corresponding to the object distance of this clear point can be detected, and the pixel value of the suspected fire point area satisfies the condition of being greater than the first fire point detection threshold.
[0098] Therefore, after the second fire point detection threshold is determined, the positions F1 and F2 of the focusing lens group corresponding to the fire points that can actually be detected in the simulated image can be determined. According to the pre-calibrated relationship between the object distance and the focusing lens group, the object distances D1 and D2 corresponding to F1 and F2 can be determined, that is, the range between D1 and D2 in the image to be detected is the actual detection object distance range for a single scan. If there is a real fire point outside this object distance range, the pixel value of the area of this real fire point will be less than the second fire point detection threshold, resulting in missed detection.
[0099] Therefore, if the range between F N and F F in the image to be detected collected by the image acquisition device is greater than the range between F1 and F2, and there is no overlapping part image set in the cruise scan path, it will cause missed detection of suspected fire points. In the embodiment of the present invention, the overlapping range of the collected images is set according to the actual detection object distance range, so as to achieve full coverage of the monitoring area during the scan according to the actual detection object distance range.
[0100] The embodiment of the present invention determines the target position of the focusing lens group based on the minimum object distance and the maximum object distance in the collected image frame, and collects the image to be detected based on this target position; determines the detection area through the moving result of the fire point detection template in the image to be detected, and determines whether the detection area is a fire point area according to the pixel value of the detection area. Determining the target position of the focusing lens group according to the object distance in the collected image frame enables the use of the focusing lens group at the target position to achieve the maximum detection clarity at the current object distance, so as to ensure that in a multi-object distance scenario, multi-object distance fire points in the scene image can be detected, improving the accuracy of fire point detection.
[0101] Embodiment 2
[0102] Figure 6 is the flowchart of the fire point detection method in Embodiment 2 of the present invention, and this Embodiment 2 is a preferred embodiment of the present invention. As Figure 6 shown, the method includes:
[0103] The embodiment of the present invention includes a set of thermal imaging pan-tilt cameras and their supporting network facilities. Among them, the thermal imaging pan-tilt camera uses a medium-long focal length thermal imaging lens, and the lens has an accurate focusing function, and can achieve clear imaging of objects at different object distances by adjusting the position of the focusing lens group.
[0104] Step 601, parameter calibration.
[0105] Parameter calibration refers to calibrating the necessary parameter information during the fire point detection process of a thermal imaging camera. The parameters to be calibrated include the relationship between the object distance and the position of the focusing motor. To achieve long-distance monitoring, a long focal length lens is required, and such a lens inevitably has a problem of a small depth of field. To meet different monitoring distances, there is a set of adjustable lens groups in the lens, called the focusing lens group, which is driven by the focusing motor to move back and forth, enabling clear imaging of objects at different object distances. The object distance and the clear focus point are in one-to-one correspondence. By measuring the positions of the focusing motor corresponding to the clear points at different object distances, the relationship between the object distance and the position of the focusing motor can be determined. The number of calibrated object distance groups and the range are determined according to the accuracy requirements of the detection and the actual monitoring range. When determining the position of the focusing motor corresponding to the non-calibrated object distance, interpolation by segmenting the data of the calibrated object distance is used for determination.
[0106] The parameters to be calibrated also include the fire point detection threshold, which includes the first fire point detection threshold and the second fire point detection threshold. According to the working principle of the thermal imaging camera, the gray value of the image collected by the thermal imaging camera is related to the temperature of the object being photographed and the distance between the object and the camera. However, in the field of forest fire prevention, the monitoring distance is relatively far, and the influence of the distance on the gray value of the image can be ignored. The fire point detection threshold depends on the temperature difference between the fire point area and the surrounding background environment temperature, and can generally be given through actual measurement.
[0107] Actual measurement is carried out using a simulated fire point. The simulated fire point can be an alcohol lamp or other fire sources. The simulated fire point is placed at a place where the object distance from the camera is D, and the position of the focusing motor of the camera is adjusted to make the simulated fire point clearly imaged in the camera. According to the fire point detection template, calculate the average gray value of the simulated fire point area, denoted as I 火 . At the same time, calculate the average gray value of the background non-simulated fire point area I b . According to the imaging principle of the camera, when the fire point is clearly imaged on the imaging surface, the gray value of the fire point area is the largest. When the position of the focusing motor deviates from the clear imaging point, the imaging starts to form a divergent light spot, and the image gray value starts to decrease. As the position of the focusing motor deviates further from the clear point, the gray value of the fire point area gradually decreases to the same level as the background I b , so, between I 火 and I b , select the first fire point detection threshold I1 and the second fire point detection threshold I2 to achieve I 火 >I1>I2>I b .
[0108] Step 602, scanning and cruising.
[0109] After the scanning path planning is completed, control the pan-tilt head to pre-scan vertically for one round, focus clearly on the upper and lower edges of the image corresponding to each formal scanning path respectively, and record the F of each round of scanning in sequence. F and F N values. During formal scanning, the target position of the focusing motor during image acquisition can be determined according to F F and F N .
[0110] In each scan, it is necessary to first determine the farthest and nearest monitoring object distances in the currently captured image. According to the camera imaging law, the farthest end is generally at the top of the image, and the nearest end is generally at the bottom of the image. Denote them as D F and D N respectively. According to the relationship between the calibrated object distance and the position of the focusing motor, the positions of the focusing motor F F and F N corresponding to these two monitoring distances can be obtained; or it can be directly determined according to the position value of the focusing motor obtained from the pre-scanning. In order to balance the clarity of the entire picture, the focusing motor position is set to F during the scanning process, where F is between F N and F F . When F=(F F +F N ) / 2, the monitoring range is the widest and the effect is the best, but the specific setting method of F is not limited in the embodiments of the present invention. When the pan-tilt head rotates horizontally, the general monitoring distance does not change; when the pan-tilt head rotates vertically, the monitoring distance changes, and at this time, it is necessary to re-determine the position of the focusing motor F during scanning according to the current monitoring object distance.
[0111] Step 603, fire point area judgment.
[0112] During the scanning cruise, fire point judgment is performed on each frame of image captured by the camera. The specific process is divided into two steps: the first-round judgment and the confirmation of suspected fire points. The first-round judgment is to traverse and search through a four-pixel fire point detection template, and calculate the average gray value I avg of all pixels within the template. Using the average gray value to judge fire points can reduce the interference of single-pixel random noise. If the average gray value I avgIf it is greater than the first fire point detection threshold I1, it is considered a fire point area. If the average gray value is less than I1 but greater than or equal to the second fire point detection threshold I2, it is considered a suspected fire point area. After the entire image search is completed, if no fire point area and suspected fire point area are found, the scanning of the next frame continues. If a suspected fire point area is found, it enters the confirmation process of the suspected fire point. For a suspected fire point, it may be some sunlight reflections or high-temperature objects, or it may be a real fire point. However, because the fire point is outside the effective depth of field of the current imaging, the imaging of the fire point on the image through the lens is relatively divergent, resulting in a relatively low average gray value and not meeting the judgment condition of the first fire point detection threshold. Therefore, it is necessary to further confirm the authenticity of the suspected fire point. According to the number of suspected fire points in the entire image, there are two processing methods. If one suspected fire point is found, it expands outward from the suspected fire point to an area of interest, and a regional autofocus is performed on this area to make the imaging of the suspected fire point the clearest. Recalculate the average gray value of the suspected fire point. If the gray value is greater than I1, it is considered a fire point area; otherwise, it is considered a non-fire point area. If multiple suspected fire point areas are found, the position of the focusing motor of the lens is placed at F N of this image, and then it moves to F F at a fixed step size. For each step the focusing motor moves, the camera acquires a frame of image, and the gray value of the suspected fire point area in this image is used to judge the fire point using the first fire point detection threshold. When the focusing motor moves to F F , the confirmation of the suspected fire point ends. During this process, the number of fire point areas and non-fire point areas in the suspected fire point area is counted. If all areas in the suspected fire point area are non-fire point areas and no fire point area is found in the first round of judgment, the cruise scan continues. If a fire point area is found in the final result, the next step of determining the fire point position is carried out.
[0113] Step 604, Determine the fire point position.
[0114] Determine the pan horizontal angle P of the image frame when the fire point area is acquired, the field of view angle α of this image frame, and the position (x, y) of the fire point area in the image. The schematic diagram for determining the position of the fire point area in the image is as shown in Figure 7 . Calculate the pan angle P L of the left edge of the image according to the pan horizontal angle P and the field of view angle α, which is P 火 = P - α / 2. Then, based on the pan angle of the left edge of the image, the width W and height H of the image, and the position (x, y) of the fire point area in the image, determine the pan angle of the fire point area, P L = P
[0115] After determining the pan-tilt angle of the fire point area, combining the longitude and latitude information of the installation of the pan-tilt camera and the object distance information from the fire point area to the pan-tilt camera, the actual longitude and latitude information of the fire point area can be determined. Among them, the object distance information from the fire point area to the pan-tilt camera can be determined according to the position of the focusing motor when the image frame is collected. According to the pre-calibrated relationship between the position of the focusing motor and the object distance, the object distance information of the fire point is obtained. After accurately positioning the fire point area, the position information is sent to the control center for fire point alarm.
[0116] In the embodiment of the present invention, based on the minimum object distance and the maximum object distance in the image, the position of the focusing motor is determined to realize the detection of multi-object distance fire points in the collected image within the largest range; secondly, after determining the suspected fire point area in the image, search between the nearest position and the farthest position of the focusing motor corresponding to the current image, so that the suspected fire point area in the image can be focused clearly, realizing the detection of the suspected fire point area under multi-object distances in the image, and improving the detection accuracy of the fire point; and after detecting the fire point area, the accurate position of the fire point can be accurately located without additional ranging means, improving the efficiency of fire blocking processing. The embodiment of the present invention enables the thermal imaging camera to detect fire points at different object distances in a multi-object distance scene during scanning and cruising, and improves the fire point detection accuracy.
[0117] Embodiment III
[0118] Figure 8 It is a schematic structural diagram of the fire point detection device in Embodiment III of the present invention. This embodiment is applicable to the fire point detection situation in a multi-object distance scene. As Figure 8 shown, the device includes:
[0119] An image acquisition module 810, configured to acquire a to-be-detected image collected by an image acquisition device based on a focusing lens group at a target position; wherein, the target position of the focusing lens group is determined according to the minimum object distance and the maximum object distance in the to-be-detected image;
[0120] A template moving module 820, configured to move a fire point detection template in the to-be-detected image according to a preset moving rule, and use the range covered by the fire point detection template as a detection area;
[0121] A fire point judgment module 830, configured to determine whether the detection area is a fire point area according to the pixel values in the detection area.
[0122] In an embodiment of the present invention, the target position of the focusing lens group is determined based on the minimum object distance and the maximum object distance in the captured image frame, and the image to be detected is captured based on the target position; the detection area is determined through the moving result of the fire point detection template in the image to be detected, and it is determined whether the detection area is a fire point area according to the pixel values of the detection area. Determining the target position of the focusing lens group according to the object distance in the captured image frame enables the use of the focusing lens group at the target position to achieve the maximum detection clarity under the current object distance, so as to ensure that in a multi-object distance scenario, multi-object distance fire points in the scene image can be detected, improving the accuracy of fire point detection.
[0123] Optionally, the device further includes a fire point detection threshold determination module, configured to: before determining whether the detection area is a fire point area according to the pixel values in the detection area, obtain a simulated image captured by the image capture device for a simulated fire point at a simulated position of the focusing lens group, and determine the pixel values of the simulated fire point area where the simulated fire point is located in the simulated image; wherein, the simulated position of the focusing lens group is determined according to the object distance between the simulated fire point and the image capture device;
[0124] Determine the pixel values of the non-simulated fire point area in the simulated image;
[0125] Determine a first fire point detection threshold and a second fire point detection threshold according to the pixel values of the simulated fire point area and the non-simulated fire point area; wherein, the pixel values of the simulated fire point area are greater than the first fire point detection threshold, the first fire point detection threshold is greater than the second fire point detection threshold, and the second fire point detection threshold is greater than the pixel values of the non-simulated fire point area.
[0126] Optionally, the fire point judgment module includes:
[0127] A fire point determination unit, configured to determine that the detection area is a fire point area if the pixel values in the detection area are greater than or equal to the first fire point detection threshold;
[0128] A non-fire point determination unit, configured to determine that the detection area is not a fire point area if the pixel values in the detection area are less than the second fire point detection threshold.
[0129] Optionally, the fire point judgment module further includes:
[0130] A suspected fire point determination unit, configured to determine that the detection area is a suspected fire point area if the pixel values in the detection area are less than the first fire point detection threshold and greater than or equal to the second fire point detection threshold;
[0131] A secondary detection unit, configured to perform secondary detection on the suspected fire point area to obtain the fire point area in the suspected fire point area.
[0132] Optionally, the secondary detection unit is specifically configured to:
[0133] Determine the nearest position of the focusing lens group associated with the minimum object distance and the farthest position of the focusing lens group associated with the maximum object distance in the image to be detected, move the focusing lens group from the nearest position to the farthest position, and collect at least two images during the movement. If the pixel value of the target suspected fire point area in any one of the at least two images is greater than or equal to the first fire point detection threshold, determine that the target suspected fire point area is a fire point area.
[0134] Optionally, the secondary detection unit is specifically configured to:
[0135] Determine the number of suspected fire point areas in the image to be detected;
[0136] If the number of the suspected fire point areas is one, perform regional autofocus on the suspected fire point area, and determine the focused pixel value of the suspected fire point area in the focused image. If the focused pixel value is greater than or equal to the first fire point detection threshold, determine that the suspected fire point area is a fire point area.
[0137] Optionally, the device further includes an object distance calibration module, configured to determine at least two calibration positions of the focusing lens group when the image acquisition device makes objects at at least two calibration object distances form the clearest images before acquiring the image to be detected collected by the focusing lens group at the target position;
[0138] According to the at least two calibration object distances and the at least two calibration positions of the focusing lens group, determine the relationship between the object distance and the position of the focusing lens group when the imaging is the clearest;
[0139] Correspondingly, the image acquisition module includes a first motor target position determination unit, configured to:
[0140] Based on the relationship between the object distance and the position of the focusing lens group, determine the nearest position and the farthest position of the associated focusing lens group according to the minimum object distance and the maximum object distance in the image to be detected;
[0141] Determine the target position of the focusing lens group according to the nearest position and the farthest position of the focusing lens group.
[0142] Optionally, the device further includes a scanning path determination module, configured to:
[0143] Move the position of the focusing lens group, and determine the first position and the second position of the focusing lens group when the pixel value of the simulated fire point area on the pixel value attenuation path during the movement is the second fire point detection threshold;
[0144] Determine a first object distance and a second object distance based on a first position and a second position of the focusing lens group;
[0145] Determine an actual detected object distance range for fire point detection in an image acquired by the image acquisition device based on the first object distance and the second object distance;
[0146] Determine a scanning path of the image acquired by the image acquisition device according to the actual detected object distance range.
[0147] Optionally, the scanning path of the image acquired by the image acquisition device includes at least two scanning inflection points. At each scanning inflection point, the lens of the image acquisition device is rotated in the vertical direction. The device further includes a pre-scanning module for:
[0148] Obtain pre-scanning images after the image acquisition device is rotated in the vertical direction at each scanning inflection point;
[0149] Determine a nearest position and a farthest position of the focusing lens group when the imaging is clear according to the minimum object distance and the maximum object distance in the pre-scanning images, and establish an association relationship between each scanning inflection point and the nearest position and the farthest position of the focusing lens group;
[0150] Correspondingly, the image acquisition module includes a second motor target position determination unit for:
[0151] Determine the currently experienced scanning inflection point of the image acquisition device;
[0152] Based on the association relationship between each scanning inflection point and the nearest position and the farthest position of the focusing lens group, determine the current nearest position and the current farthest position of the focusing lens group according to the currently experienced scanning inflection point;
[0153] Determine the target position of the focusing lens group according to the current nearest position and the current farthest position.
[0154] The fire point detection device provided by the embodiments of the present invention can execute the fire point detection method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the fire point detection method.
[0155] Embodiment 4
[0156] Figure 9 It is a schematic structural diagram of an electronic device provided by Embodiment 4 of the present invention. Figure 9 It shows a block diagram of an exemplary electronic device 12 suitable for implementing the embodiments of the present invention. Figure 9 The shown electronic device 12 is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present invention.
[0157] Such as Figure 9As shown, the electronic device 12 is presented in the form of a general-purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system storage device 28, and a bus 18 that connects different system components (including the system storage device 28 and the processing unit 16).
[0158] The bus 18 represents one or more of several types of bus architectures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0159] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and nonvolatile media, removable and non-removable media.
[0160] The system storage device 28 may include computer system readable media in the form of volatile storage, such as random access memory (RAM) 30 and / or cache storage 32. The electronic device 12 may further include other removable / non-removable, volatile / nonvolatile computer system storage media. By way of example only, a storage system 34 may be used for reading and writing on a non-removable, nonvolatile magnetic medium ( Figure 9 not shown, typically referred to as a "hard disk drive"). Although Figure 9 not shown in the figure, a disk drive for reading and writing on a removable nonvolatile disk (such as a "floppy disk"), and an optical disk drive for reading and writing on a removable nonvolatile optical disk (such as a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 through one or more data media interfaces. The storage device 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the embodiments of the present invention.
[0161] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the storage device 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods in the embodiments described in the present invention.
[0162] The electronic device 12 can also communicate with one or more external devices 14 (such as a keyboard, a pointing device, a display 24, etc.), and can also communicate with one or more devices that enable a user to interact with the device 12, and / or communicate with any device that enables the device 12 to communicate with one or more other computing devices (such as a network card, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 22. Moreover, the electronic device 12 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 20. As Figure 9 shown, the network adapter 20 communicates with other modules of the electronic device 12 through the bus 18. It should be understood that although Figure 9 not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0163] The processing unit 16 executes various functional applications and data processing by running programs stored in the system storage device 28, for example, implementing the fire point detection method provided by the embodiments of the present invention, including:
[0164] Obtaining a to-be-detected image collected by an image acquisition device based on a focusing lens group at a target position; wherein, the target position of the focusing lens group is determined according to the minimum object distance and the maximum object distance in the to-be-detected image;
[0165] Moving a fire point detection template in the to-be-detected image according to a preset moving rule, and using the range covered by the fire point detection template as a detection area;
[0166] Determining whether the detection area is a fire point area according to the pixel values in the detection area.
[0167] Embodiment Five
[0168] Embodiment Five of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the fire point detection method provided by the embodiments of the present invention, including:
[0169] Obtaining a to-be-detected image collected by an image acquisition device based on a focusing lens group at a target position; wherein, the target position of the focusing lens group is determined according to the minimum object distance and the maximum object distance in the to-be-detected image;
[0170] Moving a fire point detection template in the to-be-detected image according to a preset moving rule, and using the range covered by the fire point detection template as a detection area;
[0171] Determine whether the detection area is a fire point area according to the pixel values in the detection area.
[0172] The computer storage medium of the embodiments of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the computer-readable storage medium include: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0173] The computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries the computer-readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0174] The program code contained on the computer-readable medium may be transmitted by any appropriate medium, including but not limited to wireless, wire, optical fiber cable, RF, etc., or any suitable combination of the above.
[0175] The computer program code for performing the operations of the present invention may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0176] Note that the above are only the preferred embodiments of the present invention and the technical principles applied. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein. Various obvious changes, re-adjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments only. Without departing from the concept of the present invention, more other equivalent embodiments can be included, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A fire point detection method, characterized in that, Including: Obtaining a to-be-detected image collected by an image acquisition device based on a focusing lens group at a target position; wherein, the target position of the focusing lens group is determined according to the minimum object distance and the maximum object distance in the to-be-detected image; Moving a fire point detection template in the to-be-detected image according to a preset moving rule, and using the range covered by the fire point detection template as a detection area; Determining whether the detection area is a fire point area according to the pixel values in the detection area; Wherein, the scanning path of the image collected by the image acquisition device includes at least two scanning inflection points, and at each scanning inflection point, the lens of the image acquisition device is rotated in the vertical direction, including: Obtaining a pre-scanned image after the image acquisition device is rotated in the vertical direction at each scanning inflection point; Determining the nearest position and the farthest position of the focusing lens group when the imaging is clear according to the minimum object distance and the maximum object distance in the pre-scanned image, and establishing an association relationship between each scanning inflection point and the nearest position and the farthest position of the focusing lens group; Correspondingly, the target position of the focusing lens group is determined according to the minimum object distance and the maximum object distance in the to-be-detected image, including: Determining the currently experienced scanning inflection point of the image acquisition device; Based on the association relationship between each scanning inflection point and the nearest position and the farthest position of the focusing lens group, determining the current nearest position and the current farthest position of the focusing lens group according to the currently experienced scanning inflection point; Determining the target position of the focusing lens group according to the current nearest position and the current farthest position.
2. The method according to claim 1, characterized in that, Before determining whether the detection area is a fire point area according to the pixel values in the detection area, it further includes: Obtaining a simulated image collected by the image acquisition device based on the focusing lens group at a simulated position for a simulated fire point, and determining the pixel values of the simulated fire point area where the simulated fire point is located in the simulated image; wherein, the simulated position of the focusing lens group is determined according to the object distance between the simulated fire point and the image acquisition device; Determining the pixel values of the non-simulated fire point area in the simulated image; Determining a first fire point detection threshold and a second fire point detection threshold according to the pixel values of the simulated fire point area and the pixel values of the non-simulated fire point area; wherein, the pixel values of the simulated fire point area are greater than the first fire point detection threshold, the first fire point detection threshold is greater than the second fire point detection threshold, and the second fire point detection threshold is greater than the pixel values of the non-simulated fire point area.
3. The method according to claim 2, wherein Determining whether the detection area is a fire point area according to the pixel values in the detection area, including: If the pixel values in the detection area are greater than or equal to the first fire point detection threshold, determining that the detection area is a fire point area; If the pixel values in the detection area are less than the second fire point detection threshold, determining that the detection area is not a fire point area.
4. The method according to claim 3, characterized in that, Determining whether the detection area is a fire point area according to the pixel values in the detection area, further includes: If the pixel values in the detection area are less than the first fire point detection threshold and greater than or equal to the second fire point detection threshold, determining that the detection area is a suspected fire point area; Performing secondary detection on the suspected fire point area to obtain the fire point area in the suspected fire point area.
5. The method according to claim 4, wherein Perform secondary detection on the suspected fire point area to obtain the fire point area in the suspected fire point area, including: Determine the nearest position of the focusing lens group associated with the minimum object distance and the farthest position of the focusing lens group associated with the maximum object distance in the image to be detected. Move the focusing lens group from the nearest position to the farthest position, and collect at least two images during the movement. If the pixel value of the target suspected fire point area in any one of the at least two images is greater than or equal to the first fire point detection threshold, determine that the target suspected fire point area is a fire point area.
6. The method according to claim 4, characterized in that, Perform secondary detection on the suspected fire point area to obtain the fire point area in the suspected fire point area, including: Determine the number of suspected fire point areas in the image to be detected; If the number of the suspected fire point areas is one, perform regional autofocus on the suspected fire point area, and determine the focused pixel value of the suspected fire point area in the focused image. If the focused pixel value is greater than or equal to the first fire point detection threshold, determine that the suspected fire point area is a fire point area.
7. The method according to claim 1, wherein Before obtaining the image to be detected collected by the image acquisition device based on the focusing lens group at the target position, it further includes: Determine at least two calibration positions of the focusing lens group when the image acquisition device makes objects at at least two calibration object distances image most clearly; According to the at least two calibration object distances and the at least two calibration positions of the focusing lens group, determine the relationship between the object distance and the position of the focusing lens group when imaging is most clear; Correspondingly, the target position of the focusing lens group is determined according to the minimum object distance and the maximum object distance in the image to be detected, including: Based on the relationship between the object distance and the position of the focusing lens group, determine the nearest position and the farthest position of the associated focusing lens group according to the minimum object distance and the maximum object distance in the image to be detected; Determine the target position of the focusing lens group according to the nearest position and the farthest position of the focusing lens group.
8. The method according to claim 2, wherein The method further includes: Move the position of the focusing lens group, and determine the first position and the second position of the focusing lens group when the pixel value of the simulated fire point area is the second fire point detection threshold on the pixel value attenuation path during the movement; Determine the first object distance and the second object distance according to the first position and the second position of the focusing lens group; Determine the actual detection object distance range for fire point detection in the image collected by the image acquisition device according to the first object distance and the second object distance; Determine the scanning path of the image collected by the image acquisition device according to the actual detection object distance range.
9. A fire point detection device, characterized in that, It includes: An image acquisition module, configured to acquire an image to be detected collected by an image acquisition device based on a focusing lens group at a target position; wherein, the target position of the focusing lens group is determined according to the minimum object distance and the maximum object distance in the image to be detected; A template moving module, configured to move a fire point detection template in the image to be detected according to a preset moving rule, and use the range covered by the fire point detection template as a detection area; A fire point judgment module, configured to determine whether the detection area is a fire point area according to the pixel value in the detection area; The scanning path of the image acquisition device for acquiring images includes at least two scanning inflection points. At each scanning inflection point, the lens of the image acquisition device is rotated in the vertical direction. The device further includes a pre-scanning module for: obtaining pre-scanning images after the vertical rotation of the image acquisition device at each scanning inflection point; determining the nearest position and the farthest position of the focusing lens group when the imaging is clear according to the minimum object distance and the maximum object distance in the pre-scanning images, and establishing an association relationship between each scanning inflection point and the nearest position and the farthest position of the focusing lens group; The image acquisition module includes a second motor target position determination unit for determining the currently experienced scanning inflection point of the image acquisition device; based on the association relationship between each scanning inflection point and the nearest position and the farthest position of the focusing lens group, determining the current nearest position and the current farthest position of the focusing lens group according to the currently experienced scanning inflection point; and determining the target position of the focusing lens group according to the current nearest position and the current farthest position.
10. An electronic device, characterized in that, Comprising: One or more processors; A storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the hot spot detection method according to any one of claims 1-8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the hot spot detection method according to any one of claims 1-8.
Citation Information
Patent Citations
Infrared small target detection method under complex cloud background
CN107403433A
Automatic focusing method and device and electronic equipment
CN111818260A
Cited By
Method and apparatus for detecting fire spots, electronic device, and storage medium
WO2022143052A1