Infrared image processing method, device and storage medium

By compressing and detail enhancement processing of infrared images and fusing the processed infrared images, the problem of low flexibility in infrared image processing in the prior art is solved, and the effects of high tolerance and high contrast are achieved.

CN118154491BActive Publication Date: 2025-02-11GUANGZHOU ZHUOYAN SOFTWARE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410107696.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-25
Publication Date
2025-02-11
Estimated Expiration
2044-01-25

AI Technical Summary

Technical Problem

The existing infrared image processing methods have low flexibility and are difficult to effectively deal with the problems of low image contrast and blur in infrared images.

Method used

By compressing the infrared image to be processed, a target infrared image with a higher tolerance is obtained, and the detail enhancement and compression process are performed on the to-process area where the target power device is located to obtain the target area image. The target infrared image is then fused with the target area image to generate the processed infrared image.

Benefits of technology

It realizes high tolerance of infrared image pictures, while ensuring high contrast in the area where the target power device is located, and improving the flexibility of infrared image processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118154491B_ABST
    Figure CN118154491B_ABST
Patent Text Reader

Abstract

The present application provides an infrared image processing method, device, and storage medium, which improves the flexibility of infrared image processing. The method includes: compressing the infrared image to be processed to obtain a target infrared image, the tolerance of the target infrared image is higher than the tolerance of the infrared image to be processed; performing target segmentation processing on the target infrared image to determine the area to be processed in the target infrared image, the area to be processed includes the target power device; performing detail enhancement processing and compression processing on the area to be processed to obtain a target area image; fusing the above target infrared image and the above target area image to obtain a processed infrared image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method and device for processing infrared images, and a storage medium. Background Art

[0002] Infrared images are the product of the combination of infrared technology and imaging technology. Compared with visible light images, infrared images mostly have the characteristics of low image contrast, blurred images, and low signal-to-noise ratio. Therefore, it is very necessary to properly process infrared images.

[0003] However, the above infrared image processing method has the problem of low flexibility. Summary of the invention

[0004] The present application provides an infrared image processing method and device, and a storage medium, which improve the flexibility of infrared image processing.

[0005] In a first aspect, a method for processing an infrared image is provided, the method comprising: compressing the infrared image to be processed to obtain a target infrared image, the tolerance of the target infrared image being higher than the tolerance of the infrared image to be processed; performing target segmentation processing on the target infrared image to determine a region to be processed in the target infrared image, the region to be processed including a target electrical device; performing detail enhancement processing and compression processing on the region to be processed to obtain a target region image; and fusing the target infrared image and the target region image to obtain a processed infrared image.

[0006] In the present application, the infrared image to be processed is compressed to obtain a target infrared image, the area to be processed is subjected to detail enhancement and compression processing to obtain a target area image, and the above target infrared image and the above target area image are fused to obtain a processed infrared image. Among them, the tolerance of the target infrared image is higher than the tolerance of the infrared image to be processed, and the area to be processed is determined by performing target segmentation processing on the target infrared image, and the area to be processed includes target power devices. In other words, by performing different image processing on the area to be processed where the target power device is located than other areas, a high tolerance of the infrared image is achieved while ensuring a high contrast in the area where the target power device is located, thereby improving the flexibility of infrared image processing.

[0007] In a second aspect, an infrared image processing device is provided, comprising: a compression module and a segmentation module, wherein the compression module is used to compress the infrared image to be processed to obtain a target infrared image, wherein the tolerance of the target infrared image is higher than the tolerance of the infrared image to be processed; the segmentation module is used to perform target segmentation processing on the target infrared image to determine a region to be processed in the target infrared image, wherein the region to be processed includes a target electrical device; the compression module is also used to perform detail enhancement processing and compression processing on the region to be processed to obtain a target region image; and the above-mentioned target infrared image and the above-mentioned target region image are fused to obtain a processed infrared image.

[0008] In a third aspect, another infrared image processing device is provided, including a processor, the processor is coupled to a memory, and can be used to execute instructions in the memory to implement the method in any possible implementation of the first aspect. Optionally, the infrared image processing device also includes a memory. Optionally, the infrared image processing device also includes a communication interface, and the processor is coupled to the communication interface.

[0009] In a fourth aspect, a processor is provided, comprising: an input circuit, an output circuit and a processing circuit. The processing circuit is used to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any possible implementation of the first aspect.

[0010] In the specific implementation process, the processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a trigger, and various logic circuits. The input signal received by the input circuit can be, for example, but not limited to, received and input by a receiver, and the signal output by the output circuit can be, for example, but not limited to, output to a transmitter and transmitted by the transmitter, and the input circuit and the output circuit can be the same circuit, which is used as an input circuit and an output circuit at different times. The embodiments of the present application do not limit the specific implementation methods of the processor and various circuits.

[0011] In a fifth aspect, a processing device is provided, comprising a processor and a memory. The processor is used to read instructions stored in the memory, and can receive signals through a receiver and transmit signals through a transmitter to execute the method in any possible implementation of the first aspect.

[0012] Optionally, there are one or more processors and one or more memories.

[0013] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0014] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips respectively. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.

[0015] It should be understood that the relevant data interaction process, such as sending indication information, can be a process of outputting indication information from a processor, and receiving capability information can be a process of receiving input capability information from a processor. Specifically, the processed output data can be output to a transmitter, and the input data received by the processor can come from a receiver. Among them, the transmitter and the receiver can be collectively referred to as a transceiver.

[0016] The processing device in the fifth aspect mentioned above can be a chip. The processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor, which is implemented by reading the software code stored in the memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.

[0017] In a sixth aspect, a computer program product is provided, the computer program product comprising: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute a method in any possible implementation of the first aspect.

[0018] In a seventh aspect, a computer-readable storage medium is provided, which stores a computer program (also referred to as code, or instructions) which, when executed on a computer, enables the computer to execute a method in any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a schematic diagram of a processed infrared image;

[0020] Figure 2 is a schematic diagram of a system architecture of an electronic device provided in an embodiment of the present application;

[0021] Figure 3 is a schematic flow chart of an infrared image processing method provided in an embodiment of the present application;

[0022] Figure 4 is a schematic flow chart of a first specific example of a method for processing an infrared image provided in an embodiment of the present application;

[0023] Figure 5is a schematic diagram of an infrared image of a target provided in an embodiment of the present application;

[0024] Figure 6 is a schematic diagram of another target infrared image provided by an embodiment of the present application;

[0025] Figure 7 is a schematic diagram of a target area image provided in an embodiment of the present application;

[0026] Figure 8 is a schematic diagram of a processed infrared image provided in an embodiment of the present application;

[0027] Fig. 9 is a schematic diagram of another processed infrared image provided by an embodiment of the present application;

[0028] Fig.10 is a schematic diagram of another processed infrared image provided in an embodiment of the present application;

[0029] Fig.11 is a schematic diagram of another processed infrared image provided in an embodiment of the present application;

[0030] Fig.12 is a schematic flow chart of a second specific example of the infrared image processing method provided in an embodiment of the present application;

[0031] Fig.13 is a schematic block diagram of an infrared image processing device provided in an embodiment of the present application;

[0032] Fig.14 It is a schematic block diagram of another infrared image processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0034] Infrared images are the product of the combination of infrared technology and imaging technology. Compared with visible light images, infrared images mostly have the characteristics of low image contrast, blurred images, and low signal-to-noise ratio. Therefore, it is very necessary to properly process infrared images.

[0035] However, the above infrared image processing method has the problem of low flexibility.

[0036] Figure 1 is a schematic diagram of a processed infrared image 100. Figure 1As shown, the processed infrared image 100 includes a variety of power devices, such as insulators, etc. Since the infrared image processing method is not flexible, the different power devices included in the processed infrared image obtained do not present uniform effects. For example, the contrast of the insulator in the figure is low, and the detail clarity is insufficient compared with other power devices.

[0037] In view of this, the embodiments of the present application provide a method and device for processing infrared images, a storage medium, compressing the infrared image to be processed to obtain a target infrared image, performing detail enhancement processing and compression processing on the area to be processed to obtain a target area image, and fusing the above-mentioned target infrared image and the above-mentioned target area image to obtain a processed infrared image. Among them, the tolerance of the target infrared image is higher than the tolerance of the infrared image to be processed, and the area to be processed is determined by performing target segmentation processing on the target infrared image, and the area to be processed includes target power devices. In other words, by performing different image processing on the area to be processed where the target power device is located than other areas, the high tolerance of the infrared image is achieved, and the high contrast of the area where the target power device is located is also guaranteed, thereby improving the flexibility of infrared image processing.

[0038] It should be understood that the infrared image processing method provided in the present application can be executed by an electronic device with an image processing function, referred to as an electronic device.

[0039] For example, Figure 2 A schematic diagram of a system architecture of an electronic device provided in an embodiment of the present application.

[0040] like Figure 2 As shown, the electronic device includes a processor 210, a transceiver 220 and a display unit 270. The display unit 270 may include a display screen.

[0041] Optionally, the electronic device may further include a memory 230. The processor 210, the transceiver 220 and the memory 230 may communicate with each other through an internal connection path to transfer data. The memory 230 is used to store a computer program, and the processor 210 is used to call and run the computer program from the memory 230.

[0042] The processor 210 and the memory 230 may be combined into a processing device, or more commonly, they are independent components, and the processor 210 is used to execute the program code stored in the memory 230 to implement the above functions. In specific implementation, the memory 230 may also be integrated into the processor 210, or may be independent of the processor 210.

[0043] In addition, in order to make the functions of the electronic device more complete, the electronic device may further include one or more of an input unit 260 , an audio circuit 280 , and a sensor 201 .

[0044] Optionally, the electronic device may further include a power supply 250 for providing power to various devices or circuits in the electronic device.

[0045] Understandably, Figure 2 The operations and / or functions of each module in the electronic device shown are respectively for implementing the corresponding processes in the following method embodiments. For details, please refer to the description in the following method embodiments, and the detailed description is appropriately omitted here to avoid repetition.

[0046] Understandably, Figure 2 The processor 210 in the electronic device shown may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a base station processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0047] The processor 210 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.

[0048] Understandably, Figure 2 The power supply 250 shown is used to supply power to the processor 210 , the memory 230 , the display unit 270 , the input unit 260 , the transceiver 220 , and the like.

[0049] The transceiver 220 can provide wireless communication solutions for electronic devices including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The transceiver 220 can be one or more devices integrating at least one communication processing module.

[0050] The display unit 270 is used to display images, videos, etc. The display unit 270 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc.

[0051] The memory 230 may be used to store computer executable program codes, which include instructions. The memory 230 may include a program storage area and a data storage area. The program storage area may store an operating system, at least one application required for a function, and the like. The data storage area may store data created during the use of the electronic device, and the like. In addition, the memory 230 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), and the like. The processor 210 executes various functional applications and data processing of the electronic device by running instructions stored in the memory 230 and / or instructions stored in a memory provided in the processor.

[0052] The electronic device can implement audio functions such as music playing and recording through the audio circuit 280 and the application processor.

[0053] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0054] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.

[0055] It should be noted that, in this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0056] In addition, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.

[0057] In order to make the purpose and technical solution of the present application clearer and more intuitive, the infrared image processing method, device and storage medium provided by the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0058] Figure 3 FIG. 3 is a schematic flow chart of an infrared image processing method 300 provided in an embodiment of the present application. Figure 3 As shown, the method 300 may include the following steps:

[0059] S301, the electronic device compresses the infrared image to be processed to obtain a target infrared image, wherein the tolerance of the target infrared image is higher than the tolerance of the infrared image to be processed.

[0060] Exemplarily, the electronic device may grayscale process the infrared image to be processed to obtain a grayscale infrared image, and then adjust the tolerance of the infrared image by adjusting the grayscale level of the grayscale infrared image, that is, obtain the target infrared image with higher tolerance.

[0061] It should be understood that before S301, the electronic device may also obtain the infrared image to be processed by photographing or other methods.

[0062] S302, the electronic device performs target segmentation processing on the target infrared image to determine a region to be processed in the target infrared image, where the region to be processed includes the target power device.

[0063] It should be understood that the electronic device can first identify the area to be processed in the target infrared image, and then segment the area to be processed for further processing. The target power device can be pre-set, or can also be set based on user operation, which is not limited in this application.

[0064] In a possible case, the target electrical device may be at least one electrical device among the electrical devices included in the above target infrared image.

[0065] Exemplarily, the target infrared image includes a first power device, a second power device and a third power device. The present application can pre-set at least one of the first power device, the second power device and the third power device as a target power device. Alternatively, the user can also select and determine at least one power device as the target power device here among the first power device, the second power device and the second power device. Correspondingly, the area to be processed is the area where the target power device is located.

[0066] In another possible case, the target electrical device may also be an electrical device whose device parameters in the target infrared image meet the parameter threshold.

[0067] Exemplarily, as above, the target infrared image includes a first power device, a second power device, and a third power device. The present application can pre-set power device parameters and parameter thresholds so that the electronic device can determine the power device whose device parameters meet the parameter thresholds among the first power device, the second power device, and the third power device as the target power device. Alternatively, the user can also set the power device parameters and parameter thresholds so that the electronic device can determine the target power device among the multiple power devices based on the power device parameters and parameter thresholds set by the user.

[0068] It should be understood that the power device parameters shown above may be power device temperature, power device temperature difference, power device area, etc., and this application does not limit this.

[0069] S303, the electronic device performs detail enhancement processing and compression processing on the area to be processed to obtain an image of the target area.

[0070] It should be understood that in order to avoid performing multiple image processing and causing loss to the above infrared image, the electronic device can enhance the details of the area to be processed of the target infrared image, and then obtain a grayscale area image through grayscale processing, and then adjust the grayscale of the grayscale area image to adjust the contrast of the area to be processed, that is, to obtain the above target area image with higher contrast.

[0071] S304, the electronic device fuses the target infrared image and the target area image to obtain a processed infrared image.

[0072] Exemplarily, the electronic device may fuse the target infrared image that has been subjected to the compression process once with the target area image that has been subjected to the compression process twice and the detail enhancement process to obtain the infrared image after the processing. The target infrared image maintains a high tolerance, and the target area image has a high contrast, which meets the requirement of highlighting the target area image.

[0073] In the present application, the infrared image to be processed is compressed to obtain a target infrared image, the area to be processed is subjected to detail enhancement and compression processing to obtain a target area image, and the above target infrared image and the above target area image are fused to obtain a processed infrared image. Among them, the tolerance of the target infrared image is higher than the tolerance of the infrared image to be processed, and the area to be processed is determined by performing target segmentation processing on the target infrared image, and the area to be processed includes target power devices. In other words, by performing different image processing on the area to be processed where the target power device is located than other areas, a high tolerance of the infrared image is achieved while ensuring a high contrast in the area where the target power device is located, thereby improving the flexibility of infrared image processing.

[0074] It should be understood that the electronic device can obtain the grayscale histogram of the infrared image to determine the cumulative probability of each grayscale level corresponding to the infrared image, thereby realizing the compression processing of the infrared image. Among them, the grayscale histogram can be used to reflect the relationship between the frequency of occurrence of each grayscale pixel in an image and the grayscale level. For example, with the grayscale level as the horizontal axis and the frequency as the vertical axis, the image of the relationship between the frequency and the grayscale level is the histogram of the corresponding grayscale image. Simply put, the number of times each pixel in an image appears is first counted, and then the number of times each pixel appears is divided by the total number of pixels, and the frequency of occurrence of the pixel (i.e., the cumulative probability) is obtained, and then the pixel and the frequency of occurrence of the pixel are represented by a graph, which is the grayscale histogram.

[0075] The infrared image processing method provided in the present application is described in detail below by taking the target power device as a power device whose device parameters (such as temperature difference) in the target infrared image meet the parameter threshold (such as temperature difference threshold) as an example.

[0076] It should be understood that the temperature difference here may refer to the temperature difference between the temperature of the power device and the temperature of the environment.

[0077] Figure 4 FIG. 4 is a schematic flow chart of an infrared image processing method 400 provided in an embodiment of the present application. Figure 4 As shown, the method 400 may include the following steps:

[0078] S401, the electronic device obtains an infrared image to be processed.

[0079] Exemplarily, the electronic device may obtain the infrared image to be processed by photographing or from a stored infrared image. For example, the infrared image to be processed may be an infrared image of an electric device including an insulator.

[0080] S402, the electronic device performs grayscale processing on the infrared image to be processed to obtain a grayscale infrared image.

[0081] S403, the electronic device performs histogram statistics on the grayscale value of each pixel in the grayscale infrared image and calculates the cumulative probability of each grayscale level in the grayscale infrared image.

[0082] It should be understood that the cumulative probability of each gray level here may include an upper cumulative probability and a lower cumulative probability. The upper cumulative probability is the cumulative probability of each gray level below the first maximum gray level calculated by the electronic device based on the first maximum gray level, and the lower cumulative probability is the cumulative probability of each gray level above the first minimum gray level calculated by the electronic device based on the first minimum gray level.

[0083] It should also be understood that the first maximum grayscale value and the first minimum grayscale value are determined based on the maximum grayscale threshold and the minimum grayscale threshold, respectively.

[0084] S404: The electronic device adjusts each gray level according to the cumulative probability of each gray level and the first gray level probability threshold to obtain an infrared image of the target.

[0085] It should be understood that the first grayscale cumulative probability threshold includes a first grayscale cumulative probability upper threshold and a first grayscale cumulative probability lower threshold.

[0086] It should also be understood that in practical applications, the electronic device can increase the grayscale probability upper threshold (i.e., grayscale probability upper limit threshold), that is, it can reduce the weakening of bright details to improve the high tolerance of the image and ensure that the overall picture has a larger brightness range. Therefore, the first grayscale probability threshold here can be a new and larger grayscale probability upper limit threshold that the electronic device can determine based on the display capability.

[0087] Exemplarily, the electronic device can determine the second grayscale value according to the cumulative probability of each grayscale level and the first grayscale cumulative probability threshold, and the second grayscale value includes a second maximum grayscale value and a second minimum grayscale value. And adjust the grayscale value distribution within the second maximum grayscale value and the second minimum grayscale value to be within a preset grayscale value interval. For example, (0-255), the grayscale value greater than the second maximum grayscale value is the maximum grayscale value in the preset grayscale value interval, such as 255, and the grayscale value less than the second minimum grayscale value is the minimum grayscale value in the preset grayscale value interval, such as 0, to obtain the target infrared image. Among them, the second maximum grayscale value is determined by the electronic device based on the grayscale cumulative probability upper threshold, and the second minimum grayscale value is determined by the electronic device based on the grayscale cumulative probability lower threshold.

[0088] It should be understood that the target infrared image here has a high tolerance. Among them, tolerance refers to the ability of the image to record the brightest and darkest details and levels. The higher the tolerance, the wider the display of the brightest and darkest light difference will be. The details of the picture with different light intensities can be preserved more intact; on the contrary, the lower the tolerance, the display of light difference can only be limited to a small area, and the light and dark pictures outside this area will be deleted, which can also be understood as not being recorded.

[0089] Figure 5 Schematic diagram of a target infrared image 500 provided in an embodiment of the present application. Figure 5 As shown, compared to Figure 1 In the infrared image shown, the various electrical components and details in the target infrared image 500 are more clearly highlighted. That is, the target infrared image here has a high tolerance.

[0090] S405, the electronic device performs target segmentation processing on the target infrared image to determine a to-be-processed area in the target infrared image, where the to-be-processed area includes a target electric device, and a temperature difference of the target electric device satisfies a temperature difference threshold.

[0091] Exemplarily, when the infrared image to be processed is an infrared image of an electric device such as an insulator, the target electric device may be an electric device whose temperature difference is less than the temperature difference threshold, such as an insulator. That is, the area to be processed is the area where the insulator is located.

[0092] Figure 6FIG. 6 is a schematic diagram of another target infrared image 600 provided in the present application. Figure 6 As shown, the target infrared image 600 includes a to-be-processed area 601 , and the to-be-processed area 601 includes an insulator, ie, a target power device.

[0093] In a possible implementation, the electronic device can detect and segment the above-mentioned area to be processed, such as the area where the above-mentioned insulator is located, in the above-mentioned target infrared image through a target detection and instance segmentation model. The target detection and instance segmentation model can be trained based on sample infrared image data including the target power device.

[0094] Exemplarily, the electronic device can detect and segment the target infrared image to determine the above-mentioned area to be processed by using the Mark R-CNN target detection and instance segmentation model. Mask R-CNN achieves pixel-level segmentation of each detected target by extending Faster R-CNN.

[0095] Exemplarily, the electronic device can also detect and segment the above-mentioned area to be processed in the above-mentioned target infrared image through the YOLACT target detection and instance segmentation model. Among them, the YOLACT can transform the instance segmentation problem into a linear combination problem, and generate a mask of the instance by only focusing on the coefficients of the object. This method makes YOLACT have high performance when processing a large number of instances.

[0096] S406: The electronic device performs detail enhancement on the area to be processed to obtain a reference area image.

[0097] In a possible implementation, the electronic device may enhance the details of the area to be processed by using a digital detail enhancement (DDE) technology to obtain the reference area image.

[0098] Exemplarily, the electronic device may perform a grayscale enhancement operation and a noise suppression operation on the above-mentioned area to be processed to obtain the above-mentioned reference area image.

[0099] S407, the electronic device performs grayscale processing on the reference area image to obtain a grayscale area image.

[0100] S408, the electronic device performs histogram statistics on the grayscale value of each pixel in the grayscale area image and calculates the cumulative probability of each grayscale level in the grayscale area image.

[0101] It should be understood that the cumulative probability of each gray level here may include an upper cumulative probability and a lower cumulative probability. The upper cumulative probability is the cumulative probability of each gray level below the first maximum gray level calculated by the electronic device based on the first maximum gray value in the gray area image, and the lower cumulative probability is the cumulative probability of each gray level above the first minimum gray value calculated by the electronic device based on the first minimum gray level in the gray area image.

[0102] It should also be understood that the first maximum grayscale value and the first minimum grayscale value are determined based on the maximum grayscale threshold and the minimum grayscale threshold of the grayscale area image, respectively.

[0103] S409: The electronic device adjusts each gray level according to the cumulative probability of each gray level and the second gray cumulative probability threshold to obtain a target area image.

[0104] It should be understood that the second grayscale cumulative probability threshold includes a second grayscale cumulative probability upper threshold and a second grayscale cumulative probability lower threshold, and the range of the second grayscale cumulative probability threshold is smaller than the range of the first grayscale cumulative probability threshold.

[0105] It should be understood that the electronic device can emphasize the processing of dark details by increasing the grayscale probability lower threshold (i.e., the grayscale probability lower limit threshold) to increase the contrast of the image. The second grayscale cumulative probability threshold here can be a new and larger grayscale probability lower limit threshold determined by the electronic device based on the display capability. That is, the second grayscale cumulative probability threshold is less than the above-mentioned first grayscale probability threshold.

[0106] Exemplarily, the electronic device may adjust the grayscale value distribution in the grayscale area image to a preset grayscale value interval, such as (0-255), according to the cumulative probabilities of the grayscale levels and the second grayscale cumulative probability threshold, to obtain the target area image.

[0107] Figure 7 FIG. 7 is a schematic diagram of a target area image 700 provided in this application. Figure 7 The insulator shown is Figure 6 or Figure 5 Compared with the insulators in FIG. 7 , the contrast of the insulators included in the target area image 700 is improved.

[0108] S410, the electronic device fuses the target infrared image and the target area image to obtain a processed infrared image.

[0109] Exemplarily, the electronic device may fuse a high-tolerance target infrared image with a high-contrast target area image to obtain the above-processed target infrared image.

[0110] Figure 8FIG. 8 is a schematic diagram of a processed infrared image 800 provided in the present application. Figure 8 As shown, the processed infrared image 800 is Figure 5 Based on the infrared image of the target shown, the above Figure 7 The target area image shown is the insulator. This ensures the high tolerance of the overall infrared image and emphasizes the high contrast of the target area image.

[0111] In addition, the present application also shows other processed infrared images obtained when the insulator is the target power device, which can be specifically seen in Fig. 9 and Fig.11 To avoid repetition, I will not go into details here.

[0112] It should be understood that in addition to the temperature difference shown above being the temperature difference between the temperature of the power device and the temperature of the environment, the temperature difference can also be the temperature difference between the temperature of the power device and the temperature of a reference object (such as the power device with the highest temperature), and this application does not limit this.

[0113] It should be understood that in order to further improve the accuracy of detail enhancement of infrared images, the electronic device can perform detail enhancement on multiple layers of the processed area separately to obtain a reference area image with less loss, and then obtain the above-mentioned processed infrared image based on the reference area image.

[0114] The infrared image processing method provided in the present application is described in detail below by taking the target power device as a power device whose device parameters (such as area) in the target infrared image meet a parameter threshold (such as area threshold) as an example.

[0115] It should be understood that the area here may be the area of ​​the electric device in the above target infrared image.

[0116] Fig.12 1 is a schematic flow chart of an infrared image processing method 1200 provided in an embodiment of the present application. Fig.12 As shown, the method 1200 may include the following steps:

[0117] S1201, the electronic device obtains an infrared image to be processed.

[0118] Exemplarily, the electronic device may obtain the infrared image to be processed by photographing or from a stored infrared image. For example, the infrared image to be processed does not include an infrared image of an electric device such as an insulator.

[0119] S1202, the electronic device performs grayscale processing on the infrared image to be processed to obtain a grayscale infrared image.

[0120] S1203, the electronic device performs histogram statistics on the grayscale value of each pixel in the grayscale infrared image and calculates the cumulative probability of each grayscale level corresponding to the grayscale infrared image.

[0121] S1204: The electronic device adjusts each gray level according to the cumulative probability of each gray level and the first gray level probability threshold to obtain a target infrared image.

[0122] As above, the electronic device can determine the second grayscale value according to the cumulative probability of each grayscale value and the first grayscale cumulative probability threshold, and the second grayscale value includes a second maximum grayscale value and a second minimum grayscale value. And adjust the grayscale value distribution within the second maximum grayscale value and the second minimum grayscale value to be within a preset grayscale value interval. For example, (0-255), the grayscale value greater than the second maximum grayscale value is the maximum grayscale value in the preset grayscale value interval, such as 255, and the grayscale value less than the second minimum grayscale value is the minimum grayscale value in the preset grayscale value interval, such as 0, to obtain the target infrared image.

[0123] S1205, the electronic device performs target segmentation processing on the target infrared image to determine a region to be processed in the target infrared image, where the region to be processed includes a target power device, and an area of ​​the target power device meets an area threshold.

[0124] In a possible implementation, the electronic device may detect and segment the target infrared image to determine the area to be processed by using a target detection and instance segmentation model.

[0125] Exemplarily, as above, the electronic device can detect and segment the above-mentioned area to be processed in the above-mentioned target infrared image through other models such as the Mark R-CNN target detection and instance segmentation model, or the YOLACT target detection and instance segmentation model, and the present application does not limit this.

[0126] It should be understood that, as above, the electronic device can achieve detail enhancement of the area to be processed through digital detail enhancement DDE technology to obtain the above-mentioned reference area image. For specific details, please refer to S1206 to S1208 below.

[0127] S1206, the electronic device performs a first grayscale enhancement operation and a first noise suppression operation on the base layer of the above-mentioned area to be processed to obtain a target base layer, where the base layer contains low-frequency information in the above-mentioned area to be processed.

[0128] It should be understood that the low-frequency information in the area to be processed here can also be called a low-frequency component or a low-frequency signal. The low-frequency information can correspond to an area in the image where the gray value changes slowly, or a large flat area in the image, that is, information of a large range and scale, such as the so-called background, which is the general outline and contour of the image, and is the approximate information of the image.

[0129] S1207, the electronic device performs a second grayscale enhancement operation and a second noise suppression operation on the detail layer of the above-mentioned area to be processed to obtain a target detail layer, and the detail layer contains high-frequency information in the above-mentioned area to be processed.

[0130] It should be understood that the high-frequency information in the area to be processed here can also be called a high-frequency component or a high-frequency signal. The high-frequency information corresponds to the area where the gray value changes dramatically in the image, corresponding to the edge, noise and detail part of the image, and reflects the detail information in a small range.

[0131] S1208, the electronic device merges the above target basic layer and the above target detail layer to obtain a reference area image.

[0132] It should be understood that in order to further improve the detail enhancement effect of the above-mentioned area to be processed, the electronic device can also merge the above-mentioned target base layer and the above-mentioned target detail layer according to the merging ratio. Among them, the merging ratio can be preset or determined based on the user setting operation, and this application does not limit this.

[0133] S1209, the electronic device performs grayscale processing on the reference area image to obtain a grayscale area image.

[0134] S1210: The electronic device performs histogram statistics on the grayscale value of each pixel in the grayscale area image and calculates the cumulative probability of each grayscale level in the grayscale area image.

[0135] S1211: The electronic device adjusts each gray level according to the cumulative probability of each gray level and the second gray cumulative probability threshold to obtain a target area image.

[0136] Similarly, the electronic device can adjust the grayscale value distribution in the grayscale area image to a preset grayscale value range, such as (0-255), according to the cumulative probability of each grayscale level and the second grayscale cumulative probability threshold, to obtain the target area image.

[0137] S1212, the electronic device fuses the target infrared image and the target area image to obtain a processed infrared image.

[0138] Exemplarily, the electronic device may fuse a high-tolerance target infrared image with a high-contrast target area image to obtain the above-processed target infrared image.

[0139] It should be understood that before the above S1206, the electronic device may also perform an operation of determining the base layer and detail layer of the above area to be processed.

[0140] Exemplarily, the electronic device may perform bilateral filtering, guided filtering, Gaussian filtering or other methods on the above-mentioned area to be processed to separate and determine the basic layer and the detail layer of the above-mentioned area to be processed.

[0141] It should be understood that the above embodiments may be coupled to each other, and this application does not limit this. Moreover, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0142] Combined with the above Figures 1 to 12 , describes in detail the infrared image processing method of the embodiment of the present application, and will be combined with Fig.13 and Fig.14 , a detailed description of the infrared image processing device of an embodiment of the present application is described.

[0143] Fig.13 The infrared image processing device 1300 provided in the embodiment of the present application is shown. The infrared image processing device 1300 includes: a compression module 1301 and a segmentation module 1302 .

[0144] Among them, the compression module 1301 is used to: compress the infrared image to be processed to obtain a target infrared image, the tolerance of the target infrared image is higher than the tolerance of the infrared image to be processed; the segmentation module 1302 is used to: perform target segmentation processing on the target infrared image to determine the area to be processed in the target infrared image, and the area to be processed includes the target power device; the compression module 1301 is also used to: perform detail enhancement processing and compression processing on the area to be processed to obtain a target area image; and fuse the above-mentioned target infrared image and the above-mentioned target area image to obtain a processed infrared image.

[0145] Optionally, the compression module 1301 is used to: perform grayscale processing on the above-mentioned infrared image to be processed to obtain a grayscale infrared image; perform histogram statistics on the grayscale values ​​of each pixel in the above-mentioned grayscale infrared image and calculate the cumulative probability of each grayscale level corresponding to the above-mentioned grayscale infrared image; adjust the above-mentioned grayscale levels according to the cumulative probability of each grayscale level and the first grayscale probability threshold to obtain the above-mentioned target infrared image.

[0146] Optionally, the compression module 1301 is used to: increase some of the gray levels in the gray levels according to the cumulative probability of the above-mentioned gray levels and the first gray probability threshold, and obtain new cumulative probabilities of the above-mentioned gray levels; and obtain the target infrared image when it is determined that the new cumulative probability of the gray levels satisfies the above-mentioned first gray probability threshold.

[0147] Optionally, the compression module 1301 is used to: perform the above-mentioned detail enhancement processing on the above-mentioned area to be processed to obtain the reference area image; perform grayscale processing on the above-mentioned reference area image to obtain a grayscale area image; perform histogram statistics on the grayscale values ​​of each pixel in the above-mentioned grayscale area image and calculate the cumulative probability of each grayscale level corresponding to the above-mentioned grayscale area image; adjust the above-mentioned grayscale levels according to the cumulative probability of each grayscale level and the second grayscale cumulative probability threshold to obtain the above-mentioned target area image, and the above-mentioned second grayscale cumulative probability threshold is less than the first grayscale probability threshold.

[0148] Optionally, the compression module 1301 is used to: increase some gray levels in each gray level according to the cumulative probability of each gray level and a second gray cumulative probability threshold, and obtain new cumulative probabilities of each gray level; and obtain a target area image when it is determined that the new cumulative probabilities of each gray level meet the second gray cumulative probability threshold.

[0149] Optionally, the compression module 1301 is used to: perform a first grayscale enhancement operation and a first noise suppression operation on the base layer of the above-mentioned area to be processed to obtain a target base layer, and the above-mentioned base layer contains the low-frequency information in the above-mentioned area to be processed; perform a second grayscale enhancement operation and a second noise suppression operation on the detail layer of the above-mentioned area to be processed to obtain a target detail layer, and the above-mentioned detail layer contains the high-frequency information in the above-mentioned area to be processed; merge the above-mentioned target base layer and the above-mentioned target detail layer to obtain the above-mentioned reference area image.

[0150] Optionally, the segmentation module 1302 is used to: detect and segment the above-mentioned area to be processed in the above-mentioned target infrared image through a target detection and instance segmentation model, and the target detection and instance segmentation model is trained based on sample infrared image data including the target power device.

[0151] It should be understood that the infrared image processing device 1300 here is embodied in the form of a functional module. The term "module" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, a merged logic circuit and / or other suitable components that support the described functions. In an optional example, those skilled in the art may understand that the infrared image processing device 1300 may be specifically an electronic device in the above-mentioned embodiment, or the functions of the electronic device in the above-mentioned embodiment may be integrated in the infrared image processing device 1300, and the infrared image processing device 1300 may be used to execute the various processes and / or steps corresponding to the electronic device in the above-mentioned method embodiment, and in order to avoid repetition, it will not be repeated here.

[0152] The infrared image processing device 1300 has the function of implementing the corresponding steps performed by the electronic device in the above method; the above functions can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0153] In the embodiments of the present application, Fig.13 The infrared image processing device 1300 may also be a chip or a chip system, for example, a system on chip (SoC).

[0154] Fig.14 Another infrared image processing device 1400 provided in an embodiment of the present application is shown. The infrared image processing device 1400 includes: a processor 1401 and a memory 1402, a communication interface 1403 and a bus 1404. The memory 1402 is used to store instructions, and the processor 1401 is used to execute the instructions stored in the memory 1402. The processor 1401, the memory 1402 and the communication interface 1403 are connected to each other through the bus 1404.

[0155] Among them, processor 1401 is used to: compress the infrared image to be processed to obtain a target infrared image, the tolerance of the target infrared image is higher than the tolerance of the infrared image to be processed; perform target segmentation processing on the target infrared image to determine the area to be processed in the target infrared image, and the area to be processed includes the target power device; perform detail enhancement processing and compression processing on the area to be processed to obtain a target area image; and fuse the above-mentioned target infrared image and the above-mentioned target area image to obtain a processed infrared image.

[0156] It should be understood that the infrared image processing device 1400 can specifically be the electronic device in the above-mentioned embodiment, or the functions of the electronic device in the above-mentioned embodiment can be integrated into the infrared image processing device 1400, and the infrared image processing device 1400 can be used to execute the various steps and / or processes corresponding to the electronic device in the above-mentioned method embodiment.

[0157] Optionally, the memory 1402 may include a read-only memory and a random access memory, and provide instructions and data to the processor 1401. A portion of the memory 1402 may also include a non-volatile random access memory. For example, the memory 1402 may also store information about the device type. The processor 1401 may be used to execute the instructions stored in the memory, and when the processor executes the instructions, the processor 1401 may execute the various steps and / or processes corresponding to the electronic device in the above method embodiment.

[0158] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0159] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor executes the instructions in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0160] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0161] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0162] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0163] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0164] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0165] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.

[0166] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for processing infrared images, characterized in that: include: compressing the infrared image to be processed to obtain a target infrared image, wherein the tolerance of the target infrared image is higher than the tolerance of the infrared image to be processed; Performing target segmentation processing on the target infrared image to determine a region to be processed in the target infrared image, wherein the region to be processed includes a target electric device; The performing target segmentation processing on the target infrared image to determine the area to be processed in the target infrared image includes: Detecting and segmenting the target infrared image to determine the area to be processed by a target detection and instance segmentation model, wherein the target detection and instance segmentation model is trained based on sample infrared image data including the target power device; Performing detail enhancement and compression processing on the area to be processed to obtain a target area image, wherein the contrast of the target area image is higher than the contrast of the area to be processed; The target infrared image and the target area image are fused to obtain a processed infrared image.

2. The method according to claim 1, characterized in that The step of compressing the infrared image to be processed to obtain the target infrared image includes: Performing grayscale processing on the infrared image to be processed to obtain a grayscale infrared image; Performing histogram statistics on the grayscale value of each pixel in the grayscale infrared image, and calculating the cumulative probability of each grayscale level in the grayscale infrared image, wherein the cumulative probability of each grayscale level includes an upper cumulative probability and a lower cumulative probability; According to the cumulative probability of each gray level and a first gray level cumulative probability threshold, each gray level in the gray level infrared image is adjusted to obtain the target infrared image, wherein the first gray level cumulative probability threshold includes a first gray level cumulative probability upper threshold and a first gray level cumulative probability lower threshold.

3. The method according to claim 2, characterized in that The step of adjusting each gray level in the grayscale infrared image according to the cumulative probability of each gray level and the first grayscale cumulative probability threshold to obtain the target infrared image includes: Determine a second grayscale value according to the cumulative probability of each grayscale level and the first grayscale cumulative probability threshold, wherein the second grayscale value includes a second maximum grayscale value and a second minimum grayscale value; Adjust the grayscale values ​​within the range of the second maximum grayscale value and the second minimum grayscale value to be distributed in a preset grayscale value interval, the grayscale value greater than the second maximum grayscale value is the maximum grayscale value in the preset grayscale value interval, and the grayscale value less than the second minimum grayscale value is the minimum grayscale value in the preset grayscale value interval, so as to obtain the target infrared image.

4. The method according to claim 1, characterized in that: The step of performing detail enhancement and compression processing on the area to be processed to obtain an image of the target area includes: Performing the detail enhancement processing on the area to be processed to obtain a reference area image; Performing grayscale processing on the reference area image to obtain a grayscale area image; Performing histogram statistics on the grayscale value of each pixel in the grayscale region image and calculating the cumulative probability of each grayscale level in the grayscale region image, wherein the cumulative probability of each grayscale level includes an upper cumulative probability and a lower cumulative probability; According to the cumulative probability of each gray level and the second gray level cumulative probability threshold, each gray level in the gray level area image is adjusted to obtain the target area image, the second gray level cumulative probability threshold includes a second gray level cumulative probability upper threshold and a second gray level cumulative probability lower threshold, and the range of the second gray level cumulative probability threshold is smaller than the range of the first gray level cumulative probability threshold.

5. The method according to claim 4, characterized in that The step of adjusting each gray level in the gray area image according to the cumulative probability of each gray level and the second gray cumulative probability threshold to obtain the target area image comprises: According to the cumulative probability of each gray level and the second gray cumulative probability threshold, the value distribution of each gray level in the gray area image is adjusted to be within a preset gray value interval to obtain the target area image.

6. The method according to claim 4, characterized in that The performing the detail enhancement process on the area to be processed to obtain a reference area image includes: Performing a first grayscale enhancement operation and a first noise suppression operation on the base layer of the area to be processed to obtain a target base layer, wherein the base layer contains low-frequency information in the area to be processed; Performing a second grayscale enhancement operation and a second noise suppression operation on the detail layer of the area to be processed to obtain a target detail layer, wherein the detail layer contains high-frequency information in the area to be processed; The target base layer and the target detail layer are merged to obtain the reference area image.

7. An infrared image processing device, characterized in that: include: A compression module, used for compressing the infrared image to be processed to obtain a target infrared image, wherein the tolerance of the target infrared image is higher than the tolerance of the infrared image to be processed; A segmentation module, used for performing target segmentation processing on the target infrared image, and determining a to-be-processed area in the target infrared image, wherein the to-be-processed area includes a target electric device; The segmentation module is further used to detect and segment the target infrared image to determine the area to be processed through a target detection and instance segmentation model, wherein the target detection and instance segmentation model is trained based on sample infrared image data including the target power device; The compression module is also used to perform detail enhancement and compression processing on the area to be processed to obtain a target area image, wherein the contrast of the target area image is higher than the contrast of the area to be processed; and to fuse the target infrared image and the target area image to obtain a processed infrared image.

8. An infrared image processing device, characterized in that: The system comprises a processor and a memory, wherein the memory is used to store code instructions; and the processor is used to run the code instructions to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Histogram statistic extension and gradient filtering-based method for enhancing infrared image details

    CN102222323A

  • Image enhancement method and system for infrared image of power equipment

    CN115035002A

  • Image processing method and device, electronic equipment and storage medium

    CN116934646A