Target heat source segmentation method, electronic device, and storage medium

By performing translation processing and differential calculation on the infrared image, the target color block is obtained to determine the segmentation threshold, which solves the problem of difficult segmentation of target heat source in infrared image, achieves accurate target heat source segmentation, and reduces segmentation distortion.

CN115953424BActive Publication Date: 2026-02-27SHENZHEN SHULIAN TIANXIA INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211632750.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-19
Publication Date
2026-02-27
Estimated Expiration
2042-12-19

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately segment target heat sources in infrared images, especially at high frame rates and low resolutions, where severe noise interference, low contrast, and blurred edges of target heat sources make segmentation difficult.

Method used

By performing translation processing on the infrared image, a first translated image is obtained, and a difference calculation is performed between the translated image and the infrared image to obtain the target color block in the first difference image. A first segmentation threshold is determined, and the target heat source is segmented using this threshold.

Benefits of technology

It accurately segments the target heat source, reduces segmentation distortion, has wide applicability, and is not limited by the size of the area occupied by the target heat source in the infrared image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115953424B_ABST
    Figure CN115953424B_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of infrared image processing, and disclose a target heat source segmentation method, an electronic device and a storage medium. First, a translation process is performed on an acquired infrared imaging image to obtain a first translation image; and a difference calculation is performed on the first translation image and the infrared imaging image to obtain a first difference image. Then, a first target color block in the first difference image is acquired (the first target color block is a part in which a pixel region of the target heat source in the infrared imaging image and a pixel region of the target heat source in the first translation image do not overlap), and a first segmentation threshold is determined according to a first target pixel region in which the first target color block is mapped in the first translation image. Finally, the target heat source in the infrared imaging image is segmented by using the first segmentation threshold. In this embodiment, the first segmentation threshold considers the edge pixel region of the target heat source, can accurately segment the target heat source in the infrared imaging image, and reduces the case of segmentation distortion.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of infrared image processing, and particularly relate to a target heat source segmentation method, an electronic device and a storage medium. BACKGROUND

[0002] The infrared thermal imaging device is very suitable for security monitoring and intelligent application access in private places, such as bathrooms, bedrooms, fitting rooms, etc., because it only collects temperature information of the target and has low information resolution. Under the premise of protecting privacy, the dynamic behavior of the living body can be captured and analyzed. In the infrared imaging image collected by the infrared thermal imaging device, each pixel point reflects the temperature of the object in the corresponding space. When monitoring the living body (target), the target needs to be segmented from the infrared imaging image to facilitate monitoring the dynamic behavior of the target, for example, whether the target stays in a fixed small area and does not have the risk of moving position.

[0003] In order to facilitate the capture and analysis of the dynamic behavior of the living body (target) under the premise of protecting privacy, a high-frame-rate, low-resolution infrared thermal imaging device is usually used to obtain temperature distribution information in the scene to generate an infrared imaging image. The infrared imaging image with high frame rate is more susceptible to noise interference, and generally has the characteristics of low signal-to-noise ratio, low contrast, and blurred target heat source edge, which makes it difficult to segment the target heat source from the infrared imaging image. SUMMARY

[0004] Therefore, some embodiments of the present application provide a target heat source segmentation method, an electronic device and a storage medium, which can accurately segment the target heat source and are not constrained by the size of the area occupied by the target heat source in the infrared imaging image, and have wide applicability.

[0005] To solve the above technical problems, in a first aspect, a target heat source segmentation method is provided in the embodiments of the present application, comprising:

[0006] obtaining an infrared imaging image;

[0007] performing a translation process on the infrared imaging image to obtain a first translation image;

[0008] performing a difference calculation on the first translation image and the infrared imaging image to obtain a first difference image;

[0009] obtaining a first target color block in the first difference image, and determining a first segmentation threshold according to a first target pixel region in the first translation image mapped by the first target color block; wherein the first target color block is a part where the target heat source does not overlap in the pixel region in the infrared imaging image and the pixel region in the first translation image;

[0010] segmenting the target heat source in the infrared imaging image by using the first segmentation threshold.

[0011] In some embodiments, the aforementioned acquisition of the first target color patch in the first difference image includes:

[0012] The second segmentation threshold corresponding to the first difference image is calculated using the interquartile range detection method;

[0013] The first difference image is segmented into hot spots using a second segmentation threshold to obtain multiple connected color blocks;

[0014] The first target color block is determined to be a connected color block with a density greater than or equal to the density threshold and the largest area.

[0015] In some embodiments, determining the first target color patch as a connected color patch with a density greater than or equal to a density threshold and the largest area includes:

[0016] Select connected color patches with a size greater than or equal to m*n from multiple connected color patches as candidate color patches, where m*n is a pre-set resolution size;

[0017] The first target color block is determined as the candidate color block with the largest area and a density greater than or equal to the density threshold.

[0018] In some embodiments, determining the first segmentation threshold based on the first target pixel region mapped from the first target color patch to the infrared image includes:

[0019] The minimum pixel value in the first target pixel region is used as the first segmentation threshold.

[0020] In some embodiments, before the step of translating the infrared image to obtain a first translated image, the method further includes:

[0021] The pixel values ​​of pixels in the infrared image that are less than or equal to the first pixel threshold are set as the first pixel value to obtain a filled infrared image, wherein the first pixel value is a preset quantile of the pixel values ​​in the central region of the infrared image.

[0022] The aforementioned translation processing of the infrared image yields a first translated image, including:

[0023] The filled infrared image is translated to obtain the first translated image;

[0024] The aforementioned differential calculation between the first translation image and the infrared image to obtain the first difference image includes:

[0025] The first difference image is obtained by performing a difference calculation between the first translation image and the filled infrared image.

[0026] In some embodiments, the method further includes:

[0027] transforming the filled infrared image to obtain a plurality of transformed infrared images;

[0028] respectively performing translation processing on the plurality of transformed infrared images to obtain a plurality of second translation images;

[0029] respectively performing difference calculation on the second translation images and corresponding transformed infrared images to obtain a plurality of second difference images;

[0030] For each second difference image, a second target color block in the second difference image is obtained, and a third segmentation threshold is determined according to a second target pixel region in the corresponding second translation image mapped by the second target color block, wherein the second target color block is a part where the pixel region of the target heat source in the transformed infrared image and the pixel region of the target heat source in the second translation image do not overlap.

[0031] The foregoing segmenting the target heat source in the infrared imaging image by using the first segmentation threshold comprises:

[0032] determining a target segmentation threshold according to the first segmentation threshold and the plurality of third segmentation thresholds;

[0033] segmenting the target heat source in the infrared imaging image by using the target segmentation threshold.

[0034] In some embodiments, the foregoing determining the target segmentation threshold according to the first segmentation threshold and the plurality of third segmentation thresholds comprises:

[0035] calculating a mean value of the effective segmentation thresholds, the effective segmentation thresholds including the first segmentation threshold and the segmentation thresholds greater than or equal to the screening threshold in the plurality of third segmentation thresholds;

[0036] taking the mean value as the target segmentation threshold.

[0037] In some embodiments, the foregoing transformation processing includes 180° rotation, X-axis mirroring or Y-axis mirroring.

[0038] In a second aspect, the embodiments of the present application provide an electronic device, comprising:

[0039] at least one processor, and

[0040] a memory in communication connection with the at least one processor, wherein

[0041] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method of the first aspect.

[0042] In a third aspect, the embodiments of the present application provide a computer readable storage medium, which stores computer executable instructions. The computer executable instructions are used to make a computer device execute the method in the first aspect.

[0043] The embodiments of the present application have the following beneficial effects: Different from the prior art, the target heat source segmentation method provided by the embodiments of the present application first performs translation processing on the obtained infrared imaging image to obtain a first translation image; performs difference calculation on the first translation image and the infrared imaging image to obtain a first difference image. Then, a first target color block in the first difference image (the first target color block is a part where the pixel region of the target heat source in the infrared imaging image and the pixel region of the target heat source in the first translation image do not overlap) is obtained, and a first segmentation threshold is determined according to a first target pixel region in which the first target color block is mapped in the first translation image. Finally, the target heat source in the infrared imaging image is segmented by using the first segmentation threshold. In this embodiment, the first target color block in the first difference image is a part where the pixel region of the target heat source in the infrared imaging image and the pixel region of the target heat source in the first translation image do not overlap, which can reflect the edge of the target heat source, so that the first target pixel region obtained by mapping the first target color block in the first translation image is the edge pixel region of the target heat source. The first segmentation threshold determined according to the first target pixel region considers the edge pixel region of the target heat source, which can accurately distinguish the edge pixel region of the target heat source. Based on the distribution of the temperature of the target heat source in the infrared imaging image being high in the middle and low on both sides, the target heat source in the infrared imaging image can be accurately segmented, and the segmentation distortion is reduced.

[0044] In addition, compared with the case that a higher segmentation threshold is determined by counting the pixel value in the infrared image, and the target heat source with a large area cannot be segmented, in the embodiments of the present application, the first segmentation threshold is determined from the edge pixel region of the target heat source by using the translation processing and the difference calculation to simulate the contour of the dynamic target heat source recognized by the human eye, so that the first segmentation threshold is not constrained by the size of the area occupied by the target heat source in the infrared imaging image, and the applicability is wide. BRIEF DESCRIPTION OF DRAWINGS

[0045] One or more embodiments are illustrated by way of example with reference to the drawings, which are not limiting of the embodiments and which are merely meant to explain the embodiments. The elements in the figures are not drawn to scale, unless otherwise noted. The figures in the drawings are not limiting of the embodiments.

[0046] Figure 1 An application environment diagram of the target heat source segmentation method in some embodiments of the present application;

[0047] Figure 2 A diagram of the infrared imaging image in some embodiments of the present application;

[0048] Figure 3 Structure diagram of an electronic device in some embodiments of the present application;

[0049] Figure 4 Flow diagram of a target heat source segmentation method in some embodiments of the present application;

[0050] Figure 5 Diagram of a filling process in some embodiments of the present application;

[0051] Figure 6 Diagram of a translation process in some embodiments of the present application;

[0052] Figure 7 Diagram of a first difference image in some embodiments of the present application;

[0053] Figure 8 Diagram of a first target color block in some embodiments of the present application;

[0054] Figure 9 Diagram of a transformation process in some embodiments of the present application;

[0055] Figure 10 Comparison diagram of target heat source segmentation effects in some embodiments of the present application;

[0056] Figure 11 Structure block diagram of a target heat source segmentation device in some embodiments of the present application. DETAILED DESCRIPTION

[0057] The present application will be described in detail below with specific embodiments. The following embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any form. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made. These all belong to the protection scope of the present application.

[0058] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0059] It should be noted that the various features of the embodiments of the present application can be combined with each other, and are within the scope of the present application, if there is no conflict. In addition, although the functional modules are divided in the device schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from the module division in the device or the order in the flowchart. In addition, the terms "first", "second", "third" and the like used herein do not limit the data and execution order, but only distinguish the same items or similar items with basically the same function and effect.

[0060] Unless otherwise defined, all technical and scientific terms used in the present application have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used in the present application are only for the purpose of describing the specific embodiments of the present application, and are not intended to limit the present application. The term "and / or" used in the present application includes any and all combinations of one or more related listed items.

[0061] In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as there is no conflict.

[0062] In order to facilitate the understanding of the method provided by the embodiments of the present application, first, the terms involved in the embodiments of the present application are introduced:

[0063] (1) Infrared thermal imaging technology

[0064] Infrared thermal imaging technology uses photoelectric technology to detect the infrared signal of a specific wave band of the thermal radiation of an object, converts the signal into an infrared imaging image that can be distinguished by human vision, and can further calculate the temperature value. The value of each pixel point in the infrared imaging image is the temperature value of the object in the corresponding world coordinate system. Thus, the infrared thermal imaging technology enables humans to overcome visual barriers, so that people can "see" the temperature distribution of the object surface.

[0065] (2) Quantile

[0066] For a series of numbers x1, x2…, xN, define 0-100% quantile, 0% quantile is the minimum value of the series of numbers, and 100% quantile is the maximum value of the series of numbers. The middle quantile, such as 50% quantile Q n-1 , indicates that 50% of the numbers in the series are less than or equal to Q n , and similarly, 75% quantile Q 50 , indicates that 75% of the numbers in the series are less than or equal to Q 50 . It can be understood that Q 75 . It can be understood that Q 75 . It can be understood that Q 50It is not necessarily the number in the middle of the sequence of numbers ranked from small to large, but can be a number close to the middle number. There are existing algorithms for calculating quantiles, which will not be described here.

[0067] QL: Lower quartile, i.e. 25% quantile, represents one quarter of the values in the entire set of values are less than QL.

[0068] QU: Upper quartile, i.e. 75% quantile, represents one quarter of the values in the entire set of values are greater than QU.

[0069] IQR: Interquartile range, i.e. QU-QL = 75% quantile-25% quantile, contains half of the values in the entire set of values.

[0070] The infrared thermal imaging device acquires infrared images at a certain frequency. Under the premise of protecting privacy, the dynamic behavior of a living body can be captured and analyzed. Each pixel in the infrared image reflects the temperature of an object in the corresponding space. When monitoring a living body (target), the target heat source needs to be identified and segmented from the infrared image to facilitate monitoring the dynamic behavior of the target, such as whether the target stays in a fixed small area and does not move.

[0071] Before introducing the embodiments of the present application, the target heat source segmentation method known to the inventors of the present application will be briefly introduced, so that the subsequent embodiments of the present application can be easily understood.

[0072] In some schemes, the edge detection method is used to mark the pixel points with sudden changes in pixel values in the infrared image as edge points, and the regions surrounded by these edge points are divided into target heat sources.

[0073] This scheme is suitable for the case where the pixel values of different regions in the infrared image are clearly different, and the pixel values in the same region are small. When the edge of the target heat source is not clear, or there are multiple edges in the region, the segmentation effect is poor.

[0074] In some schemes, the region growing method is used to segment the target heat source. Specifically, first, a potential infrared hot spot seed point (such as the highest temperature point in the 8-neighborhood) is selected, and then the pixel points similar to the seed points are merged into a block to form various regional blocks.

[0075] Compared with the edge detection method, this scheme has strong anti-noise ability, but has the disadvantage of high computational complexity and strong dependence on the selection of initial seed region points and the formation order of regions.

[0076] In some schemes, a threshold method is used to segment the target heat source. Specifically, a histogram is generated by counting the pixel values of the infrared imaging image, and each peak in the histogram corresponds to a segmentation region. The advantages of this method are simple implementation, strong self-adaptation, no need for prior knowledge, fast speed, good segmentation effect for images with obvious histogram peak and valley characteristics, and the like. The disadvantages are that only the grayscale information (pixel value information) of the image is considered, the spatial information of the image is ignored, the continuity of the segmentation region cannot be guaranteed, and the segmentation effect is poor for images with unclear peak and valley characteristics.

[0077] To solve the above problems, an embodiment of the present application provides a target heat source segmentation method. First, a translation process is performed on the obtained infrared imaging image to obtain a first translation image. Then, a first difference image is obtained by performing a difference calculation on the first translation image and the infrared imaging image. Then, a first target color block in the first difference image is obtained (the first target color block is a part where the pixel region of the target heat source in the infrared imaging image and the pixel region of the target heat source in the first translation image do not overlap), and a first segmentation threshold is determined according to a first target pixel region in the first translation image to which the first target color block is mapped. Finally, the target heat source in the infrared imaging image is segmented by using the first segmentation threshold. In this embodiment, the first target color block in the first difference image is a part where the pixel region of the target heat source in the infrared imaging image and the pixel region of the target heat source in the first translation image do not overlap, which can reflect the edge of the target heat source. Therefore, the first target pixel region obtained by mapping the first target color block in the first translation image is the edge pixel region of the target heat source. The first segmentation threshold determined according to the first target pixel region considers the edge pixel region of the target heat source, which can accurately distinguish the edge pixel region of the target heat source. Based on the distribution of the target heat source in the infrared imaging image, which is high in the middle and low on both sides, the target heat source in the infrared imaging image can be accurately segmented, and the segmentation distortion can be reduced.

[0078] In addition, compared with determining a higher segmentation threshold by counting the pixel values in the infrared image, which cannot segment the target heat source with a large area ratio, in the embodiment of the present application, the first segmentation threshold is determined from the edge pixel region of the target heat source by translation processing and difference calculation, which simulates the contour of the dynamic target heat source recognized by the human eye. Therefore, the first segmentation threshold is not constrained by the size of the target heat source in the infrared imaging image, and has wide applicability.

[0079] The electronic device for implementing the target heat source segmentation method provided by the embodiment of the present application is described below. It can be understood that the electronic device has a computing processing capability, and the electronic device in the embodiment of the present application can be a monitoring device for on-site monitoring, or a terminal or a server in communication connection with the monitoring device.

[0080] In some embodiments, the monitoring device is an infrared thermal imaging device, such asFigure 1 As shown, the infrared thermal imaging device is installed on the ceiling corresponding to the indoor target area, at a distance h from the ground, and the infrared thermal imaging device faces the target area. The infrared thermal imaging device is in communication connection with the electronic device.

[0081] The infrared thermal imaging device adopts infrared thermal imaging technology to detect infrared energy (heat) by non-contact and convert it into an electrical signal, and then generate an infrared imaging map reflecting the temperature of each object in the target area. The infrared imaging map is equivalent to a temperature data array, and the pixel value of each pixel point is the temperature value of the corresponding space object.

[0082] Based on the value of each pixel point in the infrared imaging map being the temperature value of the object in the corresponding world coordinate system, the distribution range, approximate shape, and specific temperature value of the heat can be obtained from the infrared imaging map, and the target heat source (such as a human body) can be located and segmented. Please refer to Figure 2 , Figure 2 is a frame of infrared imaging map collected by an infrared thermal imaging device with low resolution (24*32) installed on the ceiling above the ground. Figure 2 The high-light area in the figure is the temperature distribution when a person (target heat source) lies on the ground. The temperature of the target heat source is higher than that of other background areas.

[0083] Please refer to Figure 3 , the electronic device 100 includes a processor 101 and a memory 102 in communication connection. Here, the communication connection can be connected by a bus, Figure 3 exemplarily illustrated by bus connection. It can be understood that, Figure 3 The electronic device shown is only an example and should not limit the function and use range of the embodiments of the present application.

[0084] Based on the communication connection between the electronic device and the infrared thermal imaging device, when the infrared thermal imaging device collects the infrared imaging map, the infrared imaging map is sent to the electronic device. Thus, the processor can obtain the infrared imaging map.

[0085] The processor 101 is configured to support the electronic device 100 to perform the corresponding functions in the target heat source segmentation method. The processor 101 can be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof. The hardware chip can be an application specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0086] The memory 102 is a non-transitory computer readable storage medium, which can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the target heat source segmentation method in the embodiments of the present application. The processor 101 can implement the target heat source segmentation method in any one of the method embodiments described below by running the non-transitory software programs, instructions and modules stored in the memory 102.

[0087] The memory 102 can include a volatile memory (VM), such as a random access memory (RAM); the memory 1002 can also include a non-volatile memory (NVM), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory 102 can also include a combination of the above types of memories.

[0088] It can be understood that the electronic device also includes other supporting running hardware and software. The hardware can include an antenna, various sensors, a microphone, etc. The software can include an operating system, etc., which is a program that manages and controls the hardware and software resources of the electronic device. The software can also include various application programs (apps). Here, other parts of the electronic device that are not improved by the embodiments of the present application are not described.

[0089] It is worth mentioning that in some embodiments, the electronic device can also be integrated with the infrared thermal imaging device as a monitoring device. In some embodiments, the electronic device can also be a terminal or a server, etc. In the embodiments of the present application, the form of the electronic device is not limited, and the electronic device can only have the ability to obtain the infrared image sequence and have the computing processing ability.

[0090] According to the above, it can be understood that the target heat source segmentation method provided in the embodiments of the present application can be implemented by various types of electronic devices with processing ability, for example, by the processor of the electronic device or by other devices with computing processing ability. The other devices with computing processing ability can be a smart terminal or a server in communication connection with the electronic device, etc.

[0091] The target heat source segmentation method provided in the embodiments of the present application will be described below in combination with the exemplary application and implementation of the electronic device provided in the embodiments of the present application. Please refer to Figure 4 , Figure 4 is a flowchart of the target heat source segmentation method provided in the embodiments of the present application. It can be understood that the execution subject of the target heat source segmentation method can be one or more processors of the electronic device.

[0092] As shown in Figure 4 , the method S100 can specifically include the following steps:

[0093] S10: Obtain an infrared imaging image.

[0094] It can be understood that the infrared imaging image can be captured by the infrared thermal imaging device in the above embodiments, and sent to the electronic device, so that the processor of the electronic device can obtain the infrared imaging image.

[0095] The pixel value of each pixel point in the infrared imaging image is the temperature value of the object in the corresponding world coordinate system. Therefore, the infrared imaging image reflects the temperature distribution of each object in a certain space. Since the temperature of the target heat source (for example, a person) is usually higher than the ambient temperature, the infrared imaging image can reflect the position of the target heat source in the environment. The dynamic behavior of the target heat source can be reflected by the plurality of infrared imaging images captured in succession.

[0096] S20: Perform translation processing on the infrared imaging image to obtain a first translation image.

[0097] The translation processing refers to adding a specified horizontal offset and a vertical offset to all pixel points in the image respectively, and the pixel points exceeding the original image range are cyclically filled into the blank place in the moved image. For example, the infrared imaging image is moved right by 3 pixel points, and the 3 columns of pixel points exceeding the rightmost side are cyclically filled into the leftmost 3 columns of blank places. That is, the translation processing moves all pixel points on the image according to the given offset, without changing the image content and size, but only changing the position of the pixel points in the image.

[0098] In some embodiments, the offset can be controlled so that the area of the non-overlapping part of the target heat source in the first translation image and the infrared imaging image does not exceed 25% of the area of the whole image, which is beneficial to subsequent identification of the pixel region of the non-overlapping part of the target heat source in the two images.

[0099] S30: performing difference calculation on the first translation image and the infrared imaging image to obtain a first difference image.

[0100] The difference calculation refers to subtracting the pixel values of the corresponding pixel points in the two images. Here, the difference calculation on the first translation image and the infrared imaging image can be performed according to the following formula:

[0101] D (i,j) =P (i,j) -H (i,j)

[0102] wherein P (i,j) is the pixel value of the i-th row and j-th column pixel point in the first translation image, H (i,j) is the pixel value of the i-th row and j-th column pixel point in the infrared imaging image, and D (i,j) is the pixel value (i.e. difference value) of the i-th row and j-th column pixel point in the first difference image.

[0103] It can be understood that the pixel region of the non-overlapping part of the target heat source in the two images corresponds to a larger difference value, and therefore the first difference image can reflect the pixel region of the non-overlapping part of the target heat source in the two images. In some embodiments, the negative difference value in the first difference image can be set to 0, and the positive difference value is retained, which is beneficial to subsequent identification of the pixel region of the non-overlapping part of the target heat source in the two images.

[0104] In some embodiments, before the foregoing step S20, the method S100 further comprises: setting the pixel value of the pixel point with a pixel value less than or equal to a first pixel threshold in the infrared imaging image to a first pixel value to obtain a filled infrared image, wherein the first pixel value is a pre-set quantile of the center region pixel value in the infrared imaging image.

[0105] It can be understood that, based on the principle that the farther the distance, the greater the loss of infrared radiation energy received by the infrared thermal imaging device, it can be known that there is a certain temperature error in the infrared imaging image collected by the infrared thermal imaging device, that is, the temperature reflected in the middle region of the image is accurate, and the temperature reflected in the peripheral region of the image is low. As shown in Figure 5 , the background temperature of the middle region of the infrared imaging image except the target heat source is obviously higher than the background temperature of the peripheral region.

[0106] If the middle region is moved to the edge, the background temperature difference between the first translated image after moving and the original infrared imaging image will be too large, which will affect the subsequent identification of the pixel region in which the target heat source does not overlap in the two images. Based on this, please refer to Figure 5 , the pixel value of the pixel point in the infrared imaging image whose pixel value is less than or equal to the first pixel threshold is set to the first pixel value, and a filled infrared image is obtained. The first pixel value is a preset quantile of the center region pixel value in the infrared imaging image. For example, the preset quantile is a 20% quantile Q 20 .

[0107] That is, the first pixel threshold is used to screen the peripheral background pixel points (pixel points whose pixel values are less than or equal to the first pixel threshold) in the infrared imaging image, and then the peripheral background pixel points with small pixel values are filled with the first pixel value, and the first pixel value can reflect the background temperature of the middle region of the infrared imaging image except the target heat source. Through the above-mentioned manner, as shown in Figure 5 , the background temperature of the middle region of the obtained filled image except the target heat source is uniform with the background temperature of the peripheral region.

[0108] In this embodiment, the foregoing step S20 specifically comprises: performing a translation processing on the filled infrared image to obtain a first translated image.

[0109] Please refer to Figure 6 , after the filled infrared image P1 is translated to the right by 3 pixel points, a first translated image P2 is obtained. In the filled infrared image P1 and the first translated image P2, the image content and size are not changed, only the position of the pixel points in the image is changed.

[0110] In this embodiment, the foregoing step S30 specifically comprises: performing a difference calculation on the first translated image and the filled infrared image to obtain a first difference image.

[0111] Please refer to Figure 7The first translation image P2 and the filled infrared image P1 are subjected to pixel value subtraction operation according to corresponding pixel point positions, a negative differential value is set to 0, and a positive differential value is retained to obtain a first differential image D1. Since the background temperature of the middle region of the first translation image P2 and the filled infrared image P1 except for the target heat source is the same as the background temperature of the surrounding, after the differential calculation, the first differential image D1 is cleaner, and can accurately reflect the pixel region of the target heat source which does not overlap, and reduces the recognition interference caused by too large background difference.

[0112] In this embodiment, first, the original infrared imaging image is subjected to filling processing by using the above filling method, so that the background temperature of the middle region of the obtained filled image except for the target heat source is uniform with the background temperature of the surrounding. Then, the filled infrared image is subjected to translation processing and differential calculation, and the first differential image D1 is cleaner, can accurately reflect the pixel region of the target heat source which does not overlap, and reduces the recognition interference caused by too large background difference, which is beneficial to subsequent identification of the pixel region of the target heat source which does not overlap in the two images.

[0113] S40: Obtain a first target color block in the first differential image, and determine a first segmentation threshold according to a first target pixel region in the first translation image which is mapped by the first target color block.

[0114] The first target color block is a part of the pixel region of the target heat source in the infrared imaging image which does not overlap with the pixel region in the first translation image. As shown in FIG. 4, the pixel value of the first target color block is much higher than that of other regions. In some embodiments, the first target color block can be identified by using threshold segmentation method. Figure 7

[0115] In some embodiments, the above-mentioned "obtaining a first target color block in the first differential image" specifically includes:

[0116] (1) A second segmentation threshold corresponding to the first differential image is calculated by using quartile distance detection method.

[0117] (2) The first differential image is subjected to hot spot segmentation by using the second segmentation threshold to obtain a plurality of connected color blocks.

[0118] (3) The first target color block is determined as the connected color block with density greater than or equal to a density threshold and the largest area.

[0119] ​The quartile range detection method is used to detect outliers by using a box plot. Generally, outliers are defined as less than QL-1.5IQR or QU+1.5IQR, where QL is the 25th percentile, QU is the 75th percentile, and IQR is the interquartile range, which is the difference between the 75th percentile QU and the 25th percentile QL. In this embodiment, most of the pixel values in the first difference image are small, and the pixel value of the first target color block is large. Therefore, the pixel value of the first target color block can be used as an outlier, and the quartile range detection method is used to detect the abnormal pixel value in the first difference image. These abnormal pixel values constitute the first target color block.

[0120] Specifically, the second segmentation threshold corresponding to the first difference image is calculated using the following formula:

[0121] Second segmentation threshold = QU + K*(QU-QL)

[0122] where QU is the 75th percentile of the pixel values in the first difference image, QL is the 25th percentile of the pixel values in the first difference image, and K is a weight. In some embodiments, K can take an empirical value of 3.

[0123] Then, the second segmentation threshold is used to perform hot spot segmentation on the first difference image to obtain a plurality of connected color blocks. Here, hot spot segmentation refers to extracting a pixel region with a high pixel value (high temperature). Specifically, the pixel points with a pixel value greater than or equal to the second segmentation threshold are retained to obtain a plurality of connected color blocks, and the pixel values of the pixel points with a pixel value less than the second segmentation threshold are uniformly set to a pixel value much smaller than the second segmentation threshold (for example, set to 0) to distinguish the connected color blocks. As shown in Figure 8 The segmented first difference image has fewer highlighted areas and is more neat than the original first difference image in Figure 7 .

[0124] Finally, the first target color block is determined to be the connected color block with the largest area and a density greater than or equal to a density threshold. The density of the connected color block can be calculated using the following formula:

[0125] Density = Area of connected color block / Area of circumscribed rectangle of connected color block

[0126] It can be understood that the connected color block with scattered holes is filtered out by using the density, and the connected color block with the largest area and a density reaching the density threshold is selected as the first target color block B diff , so that the first target color block is more accurate.

[0127] In this embodiment, the second segmentation threshold is determined by using the quartile range detection method to segment the first difference. Then, the density of the segmented multiple connected color blocks is screened to remove the scattered hollow connected color blocks, and the connected color block with the largest area and density greater than or equal to the density threshold is selected as the first target color block, so that the first target color block is more accurate.

[0128] In some embodiments, the aforementioned "determining the first target color block as the connected color block with the largest area and density greater than or equal to the density threshold" specifically includes: selecting the connected color block with a size greater than or equal to m*n from the multiple connected color blocks as a candidate color block, wherein m*n is a pre-set resolution size; and determining the first target color block as the candidate color block with the largest area and density greater than or equal to the density threshold.

[0129] In this embodiment, the resolution size m*n is set according to the size and shape of the target heat source, so that the connected color block with a shape that is not possible to be the pixel region of the non-overlapping part of the target heat source in the two images can be screened out.

[0130] Specifically, the connected color block with a size greater than or equal to m*n is selected from the multiple connected color blocks as a candidate color block, and the first target color block is determined as the candidate color block with the largest area and density greater than or equal to the density threshold, so that the shape of the first target color block conforms to the size and shape of the pixel region of the non-overlapping part of the target heat source in the two images.

[0131] In this embodiment, by using the m*n resolution size to screen the multiple connected color blocks, the connected color block with a shape that does not conform to the pixel region of the non-overlapping part of the target heat source in the two images can be screened out, and the one with the largest area and density greater than or equal to the density threshold is determined as the first target color block from the remaining candidate color blocks, so that the first target color block is optimal in shape, size, density and area, and is more accurate.

[0132] After obtaining the first target color block, the first segmentation threshold is determined according to the first target pixel region in the first translation image mapped by the first target color block. Specifically, the first target color block is mapped to the first translation image according to the pixel position to obtain the first target pixel region. It can be understood that the first target pixel region is the pixel region of the non-overlapping part of the target heat source in the first translation image and the infrared imaging image, which belongs to the edge pixel region of the target heat source.

[0133] According to the first target pixel region, the first segmentation threshold is determined, which is equivalent to determining the first segmentation threshold according to the edge pixel of the target heat source. Therefore, the first segmentation threshold considers the edge pixel region of the target heat source, and can accurately distinguish the edge pixel region of the target heat source. Based on the distribution of the target heat source in the infrared imaging image, the temperature is high in the middle and low on both sides, and then the target heat source in the infrared imaging image can be accurately segmented, and the segmentation distortion is reduced.

[0134] In some embodiments, the aforementioned "determining the first segmentation threshold according to the first target pixel region in which the first target color block is mapped in the infrared imaging image" specifically includes: taking the minimum pixel value in the first target pixel region as the first segmentation threshold.

[0135] It can be understood that the first target pixel region is obtained by moving and belongs to the edge pixel region of the target heat source. Taking the minimum pixel value of the edge pixel region of the target heat source as the first segmentation threshold is beneficial to clear segmentation boundary and more accurate segmentation of the target heat source.

[0136] S50: segmenting the target heat source in the infrared imaging image by using the first segmentation threshold.

[0137] Here, for the infrared imaging image, the pixel points with pixel values greater than or equal to the first segmentation threshold are retained to obtain a pixel region corresponding to the target heat source, and the pixel values of the pixel points with pixel values less than the first segmentation threshold are uniformly set to a pixel value much smaller than the first segmentation threshold (for example, set to 0) to distinguish the pixel region corresponding to the target heat source. Thus, the target heat source is extracted from the infrared imaging image by segmentation.

[0138] In this embodiment, based on the first target color block in the first difference image being a part where the pixel region of the target heat source in the infrared imaging image and the pixel region of the target heat source in the first translation image do not overlap, the first target color block can reflect the edge of the target heat source, and thus the first target pixel region obtained by mapping the first target color block in the first translation image is the edge pixel region of the target heat source. The first segmentation threshold determined according to the first target pixel region considers the edge pixel region of the target heat source, and can accurately distinguish the edge pixel region of the target heat source. Based on the distribution of the target heat source in the infrared imaging image, the temperature is high in the middle and low on both sides, and then the target heat source in the infrared imaging image can be accurately segmented, and the segmentation distortion is reduced.

[0139] In addition, compared with the case that a higher segmentation threshold is determined by counting the pixel values in the infrared image, and the target heat source with a large area cannot be segmented, in the embodiment of the present application, the first segmentation threshold is determined from the edge pixel region of the target heat source by translation processing and difference calculation, which simulates the contour of the dynamic target heat source recognized by the human eye, so that the first segmentation threshold is not constrained by the size of the area occupied by the target heat source in the infrared imaging image, and has wide applicability.

[0140] In some embodiments, when performing the shift processing on the filled infrared image, the shift processing can include horizontal shift (e.g., left shift or right shift) and / or vertical shift (e.g., up shift or down shift). In some embodiments, the filled infrared image is respectively shifted by N pixels up and N pixels right, thereby obtaining two first shift images. The two first shift images are subjected to difference calculation and determination of the first segmentation threshold in the manner described in the above embodiments, thereby obtaining two first segmentation thresholds. Finally, the average of the two first segmentation thresholds can be taken as the final first segmentation threshold to segment the target heat source from the infrared imaging image.

[0141] In this embodiment, different first target color blocks are generated by horizontal shift and vertical shift, and different first target color blocks correspond to edge pixel regions of different positions of the target heat source, thereby the two first segmentation thresholds determined from the edge pixel regions of different positions of the target heat source are averaged to obtain the final first segmentation threshold, which can accurately segment the boundaries of different positions of the target heat source, and is more accurate.

[0142] In some embodiments, the method further comprises:

[0143] S60: performing transformation processing on the filled infrared image to obtain a plurality of transformed infrared images.

[0144] Here, the transformation processing refers to position transformation of the pixels in the image without changing the image content and size. In some embodiments, the transformation processing includes 180° rotation, X-axis mirroring or Y-axis mirroring. As shown in FIG. 6B, the filled infrared image is respectively subjected to 180° rotation, X-axis mirroring or Y-axis mirroring, thereby obtaining three transformed infrared images, which is conducive to subsequent acquisition of more edge pixel information of the target heat source. Figure 9

[0145] S70: performing shift processing on the plurality of transformed infrared images to obtain a plurality of second shift images.

[0146] Here, the shift processing includes horizontal shift processing and / or vertical shift processing. For each transformed infrared image, two second shift images are obtained after the horizontal shift processing and the vertical shift processing. In the above embodiment of the three transformed infrared images, six second shift images can be obtained. That is, the number of the plurality of second shift images is related to the manner of the shift processing and the transformation processing, and here, no limitation is made.

[0147] S80: respectively performing difference calculation on the second shift images and the corresponding transformed infrared images to obtain a plurality of second difference images.

[0148] ​Here, the difference calculation manner in step S30 can be referred to, and the second translation image and the corresponding transformed infrared image are calculated to obtain a plurality of second difference images. The specific difference calculation manner is not described in detail here. It can be understood that the second difference image can reflect the pixel area of the non-overlapping part of the target heat source in the two images (the second translation image and the corresponding transformed infrared image).

[0149] S90: For each second difference image, a second target color block in the second difference image is obtained, and a third segmentation threshold is determined according to the second target color block mapping to a second target pixel area in the corresponding second translation image.

[0150] The second target color block is the non-overlapping part of the pixel area of the target heat source in the transformed infrared image and the pixel area of the target heat source in the second translation image. In some embodiments, the threshold method can be used to segment and identify the second target color block.

[0151] Here, the way of "obtaining the first target color block in the first difference image" in step S40 (refer to steps (1) to (3) described above) can be referred to, and the quartile range detection method is used for hot spot segmentation of each second difference image. Then, the plurality of connected color blocks segmented are screened by density to remove scattered hollow connected color blocks, and the connected color block with the largest area and the density reaching the density threshold is selected as the second target color block, so that the second target color block is more accurate.

[0152] In some embodiments, the way in step S40 can also be referred to, and the connected color block with a size greater than or equal to m*n is selected as a candidate color block from the plurality of connected color blocks, and the candidate color block with the largest area and the density greater than or equal to the density threshold is determined as the second target color block, so that the shape of the second target color block conforms to the size and shape of the pixel area of the non-overlapping part of the target heat source in the two images. In this way, the second target color block is optimal in shape, size, density and area, and is more accurate.

[0153] After the second target color block is obtained, a third segmentation threshold is determined according to the second target color block mapping to a second target pixel area in the corresponding second translation image. Here, the third segmentation threshold can be determined in the way of "determining the first segmentation threshold according to the first target color block mapping to the first target pixel area in the first translation image" in step S40, which is not repeated here. It can be understood that the second target pixel area is the pixel area of the non-overlapping part of the target heat source in the second translation image and the corresponding transformed infrared image, which belongs to the edge pixel area of the target heat source.

[0154] According to the second target pixel region, the third segmentation threshold is determined, which is equivalent to determining the third segmentation threshold according to the edge pixel region of the target heat source. Therefore, the third segmentation threshold considers the edge pixel region of the target heat source, and can accurately distinguish the edge pixel region of the target heat source. Based on the temperature distribution of the target heat source in the infrared imaging image, which is high in the middle and low on both sides, the target heat source in the infrared imaging image can be accurately segmented, and the segmentation distortion is reduced.

[0155] In some embodiments, the minimum pixel value in the second target pixel region can also be referred to as the third segmentation threshold in other ways in step S40. It can be understood that the second target pixel region is obtained by moving, and belongs to the edge pixel region of the target heat source. The minimum pixel value of the edge pixel region of the target heat source is used as the third segmentation threshold, which is beneficial to clear segmentation boundary and more accurate segmentation of the target heat source.

[0156] In this embodiment, the foregoing step S50 specifically comprises: determining a target segmentation threshold according to the first segmentation threshold and the plurality of third segmentation thresholds; and segmenting the target heat source in the infrared imaging image by using the target segmentation threshold.

[0157] It can be understood that the first segmentation threshold and the plurality of third segmentation thresholds are respectively determined according to the edge pixel regions at different positions of the target heat source. Thus, the target segmentation threshold can be determined according to the first segmentation threshold and the plurality of third segmentation thresholds.

[0158] In some embodiments, the foregoing "determining a target segmentation threshold according to the first segmentation threshold and the plurality of third segmentation thresholds" specifically comprises: calculating a mean value of effective segmentation thresholds, the effective segmentation thresholds including the segmentation thresholds greater than or equal to a screening threshold in the first segmentation threshold and the plurality of third segmentation thresholds; and taking the mean value as the target segmentation threshold.

[0159] It can be understood that due to the existence of abnormal pixel points in the infrared imaging image, the differential image also has abnormal differential values. For example, if an abnormal differential value is greater than a segmentation threshold, but does not belong to the edge pixel region of the target heat source, it is misclassified as a target color block. If the abnormal differential value corresponds to the minimum pixel value in the target pixel region, it becomes one of the first segmentation threshold and the plurality of third segmentation thresholds. The abnormal segmentation threshold corresponding to the abnormal differential value is too small and needs to be removed, and cannot be used as an effective segmentation threshold.

[0160] Therefore, the screening threshold is used to screen the effective segmentation threshold greater than or equal to the screening threshold from the first segmentation threshold and the plurality of third segmentation thresholds. In some embodiments, the screening threshold can be the 40th percentile Q 40 of the original infrared imaging image. That is, the minimum value of the first segmentation threshold and the plurality of third segmentation thresholds is less than Q 40The effective segmentation threshold is removed by the segmentation threshold elimination. The mean value of the effective segmentation threshold is taken as the target segmentation threshold, so that the target segmentation threshold is more accurate.

[0161] In this embodiment, the filled infrared image is processed by transformation, the obtained multiple transformed infrared images are respectively processed by translation and difference calculation, multiple second target color blocks reflecting edge pixel regions of the target heat source at different positions are obtained, then third segmentation thresholds are determined based on the second target color blocks, finally, the target segmentation threshold is determined according to the first segmentation threshold and the multiple third segmentation thresholds, so that the target segmentation threshold is determined based on the multiple edge pixel regions of the target heat source at different positions, and the target heat source can be accurately segmented out; thus, the target heat source in the infrared imaging image is more accurately segmented out by using the target segmentation threshold.

[0162] Referring to Figure 10 , Figure 10 (a) in the figure is an infrared imaging image, Figure 10 (b) in the figure is a schematic diagram of the target heat source segmented out by using the quartile range method, Figure 10 (c) in the figure is a schematic diagram of the target heat source segmented out by using the target segmentation threshold in the embodiment of the present application, it can be seen by comparison that the empirical threshold determined by the quartile range method in (b) is too large, and almost all the target heat source is removed, with great loss, while the target segmentation threshold in (c) is reasonable, and the target heat source in the infrared imaging image is more completely segmented out.

[0163] In summary, in the target heat source segmentation method in the embodiment of the present application, the obtained infrared imaging image is processed by translation to obtain a first translated image; the first translated image is calculated by difference with the infrared imaging image to obtain a first difference image. Then, a first target color block in the first difference image (the first target color block is a part in which the pixel region of the target heat source in the infrared imaging image and the pixel region of the target heat source in the first translated image do not overlap) is obtained, and a first segmentation threshold is determined according to the first target pixel region in the first translated image mapped by the first target color block. Finally, the target heat source in the infrared imaging image is segmented out by using the first segmentation threshold. In this embodiment, the first target color block in the first difference image is a part in which the pixel region of the target heat source in the infrared imaging image and the pixel region of the target heat source in the first translated image do not overlap, which can reflect the edge of the target heat source, so that the first target pixel region in the first translated image mapped by the first target color block is the edge pixel region of the target heat source. The first segmentation threshold determined according to the first target pixel region considers the edge pixel region of the target heat source, which can accurately distinguish the edge pixel region of the target heat source. Based on the distribution of the target heat source in the infrared imaging image in which the temperature is high in the middle and low on both sides, the target heat source in the infrared imaging image can be accurately segmented out, and the segmentation distortion is reduced.

[0164] In addition, compared with determining a higher segmentation threshold by the pixel value in the statistical infrared image, the target heat source with a large area cannot be segmented. In the embodiment of the present application, the contour of the dynamic target heat source is simulated by the translation processing and the differential calculation, the first segmentation threshold is determined by the edge pixel area of the target heat source, so that the first segmentation threshold is not restricted by the area size of the target heat source in the infrared imaging image, and the applicability is wide.

[0165] Please refer to Figure 11 , Figure 11 is a structural schematic diagram of a target heat source segmentation device provided by the embodiment of the present application. The target heat source segmentation device is applied to an electronic device, and specifically, the target heat source segmentation device is applied to one or more processors of the electronic device.

[0166] As shown in Figure 11 , the target heat source segmentation device 200 includes an acquisition module 201, a translation module 202, a differential calculation module 203, a threshold determination module 204, and a segmentation module 205.

[0167] The acquisition module 201 is configured to acquire an infrared imaging image. The translation module 202 is configured to perform translation processing on the infrared imaging image to obtain a first translation image. The differential calculation module 203 is configured to perform differential calculation on the first translation image and the infrared imaging image to obtain a first differential image. The threshold determination module 204 is configured to acquire a first target color block in the first differential image, and determine a first segmentation threshold according to a first target pixel area in the first translation image to which the first target color block is mapped. The first target color block is a part in which the pixel area of the target heat source in the infrared imaging image and the pixel area of the target heat source in the first translation image do not overlap. The segmentation module 205 is configured to segment the target heat source in the infrared imaging image by using the first segmentation threshold.

[0168] In this embodiment, the first target color block in the first differential image is a part in which the pixel area of the target heat source in the infrared imaging image and the pixel area of the target heat source in the first translation image do not overlap, which can reflect the edge of the target heat source, so that the first target pixel area obtained by mapping the first target color block in the first translation image is the edge pixel area of the target heat source. The first segmentation threshold determined according to the first target pixel area considers the edge pixel area of the target heat source, which can accurately distinguish the edge pixel area of the target heat source. Based on the distribution of the temperature of the target heat source in the infrared imaging image being high in the middle and low on both sides, the target heat source in the infrared imaging image can be accurately segmented, and the segmentation distortion is reduced.

[0169] In addition, compared with determining a higher segmentation threshold by the pixel value in the statistical infrared image, the device can not segment the target heat source with a large area ratio. The device simulates the contour of the dynamic target heat source by the panning processing and the differential calculation, determines the first segmentation threshold by the edge pixel area of the target heat source, and makes the first segmentation threshold not be constrained by the area size of the target heat source in the infrared imaging image, so that the device has wide applicability.

[0170] In the embodiments of the present application, the target heat source segmentation device can also be built by hardware devices, for example, the target heat source segmentation device can be built by one or more chips, and each chip can work in coordination with each other to complete the target heat source segmentation method described in each embodiment. For another example, the target heat source segmentation device can also be built by various logic devices, such as a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine), or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, or any combination of these components.

[0171] The target heat source segmentation device in the embodiments of the present application can be a device with an operating system. The operating system can be an Android operating system, an ios operating system, or other possible operating systems, and the embodiments of the present application do not make specific limitations.

[0172] The target heat source segmentation device provided in the embodiments of the present application can realize each process that can be realized by the target heat source segmentation method described above, and thus details are not repeated here.

[0173] It should be noted that the target heat source segmentation device described above can execute the target heat source segmentation method provided in the embodiments of the present application, and has the corresponding function modules and beneficial effects of executing the method. Technical details not described in detail in the target heat source segmentation device embodiments can be referred to the target heat source segmentation method provided in the embodiments of the present application.

[0174] The embodiments of the present application also provide a computer readable storage medium, for example, a memory including program codes, and the program codes can be executed by a processor to complete the target heat source segmentation method in the above embodiments. For example, the computer readable storage medium can be a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc Read-Only Memory, CDROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0175] The embodiment of the present application further provides a computer program product, which comprises one or more program codes stored in a computer readable storage medium. The processor of the electronic device reads the program codes from the computer readable storage medium, and the processor executes the program codes to complete the method steps of the target heat source segmentation method provided in the above embodiment.

[0176] It should be noted that the apparatus embodiments described above are merely illustrative, and the units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e., they can be located in one place or distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment.

[0177] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software plus a general hardware platform, and of course, can also be implemented by hardware. Those skilled in the art can understand that all or part of the processes in the above embodiment methods can be completed by a computer program instructing related hardware, and the program can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above embodiment methods. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM) or a random access memory (RAM), etc.

[0178] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; under the idea of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes of the different aspects of the present application as described above. In order to be brief, they are not provided in details; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A target heat source segmentation method characterized by comprising: The method comprises: acquiring an infrared imaging image; setting pixel values of pixel points with pixel values less than or equal to a first pixel threshold in the infrared imaging image to a first pixel value to obtain a filled infrared imaging image, wherein the first pixel value is a preset quantile of a central region pixel value in the infrared imaging image; performing translation processing on the filled infrared imaging image to obtain a first translation image; performing difference calculation on the first translation image and the filled infrared imaging image to obtain a first difference image; acquiring a first target color block in the first difference image, and determining a first segmentation threshold according to a first target pixel region in the first translation image mapped by the first target color block, wherein the first target color block is a part in which pixel regions in the filled infrared imaging image and pixel regions in the first translation image of the target heat source do not overlap respectively; segmenting the target heat source in the infrared imaging image by using the first segmentation threshold.

2. The method of claim 1, wherein, The acquiring of the first target color block in the first difference image comprises: calculating a second segmentation threshold corresponding to the first difference image by using a quartile range detection method; performing hot spot segmentation on the first difference image by using the second segmentation threshold to obtain a plurality of connected color blocks; determining the first target color block as a connected color block with a density greater than or equal to a density threshold and a largest area.

3. The method of claim 2, wherein, The determining of the first target color block as a connected color block with a density greater than or equal to the density threshold and a largest area comprises: selecting a connected color block with a size greater than or equal to m*n from the plurality of connected color blocks as a candidate color block, wherein m*n is a resolution size set in advance; determining the first target color block as the candidate color block with a density greater than or equal to the density threshold and a largest area.

4. The method of claim 1, wherein, The determining of the first segmentation threshold according to the first target pixel region in the first translation image mapped by the first target color block comprises: taking a minimum pixel value in the first target pixel region as the first segmentation threshold.

5. The method of claim 1, wherein, The method further comprises: performing transformation processing on the filled infrared imaging image to obtain a plurality of transformed infrared images; performing the translation processing on the plurality of transformed infrared images respectively to obtain a plurality of second translation images; performing difference calculation on the second translation images and corresponding transformed infrared images respectively to obtain a plurality of second difference images; for each second difference image, acquiring a second target color block in the second difference image, and determining a third segmentation threshold according to a second target pixel region in the corresponding second translation image mapped by the second target color block, wherein the second target color block is a part in which pixel regions in the transformed infrared image and pixel regions in the second translation image of the target heat source do not overlap respectively; The segmenting of the target heat source in the infrared imaging image by using the first segmentation threshold comprises: determining a target segmentation threshold according to the first segmentation threshold and a plurality of third segmentation thresholds; segmenting the target heat source in the infrared imaging image by using the target segmentation threshold.

6. The method of claim 5, wherein, The determining of the target segmentation threshold according to the first segmentation threshold and a plurality of third segmentation thresholds comprises: calculating a mean value of effective segmentation thresholds, the effective segmentation thresholds including the first segmentation threshold and segmentation thresholds greater than or equal to a screening threshold in the plurality of third segmentation thresholds; taking the mean value as the target segmentation threshold.

7. The method of claim 5, wherein, The transformation processing includes 180° rotation, X-axis mirroring, or Y-axis mirroring.

8. An electronic device, comprising: comprise: at least one processor, and a memory connected to the at least one processor in communication, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing the computer device to perform the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Method for detecting falling lying posture of human body, falling detection method and related device

    CN116543331A