Infrared image contrast enhancement method and device based on time domain filtering
By performing temporal filtering on the normalized cumulative histogram of infrared images and smoothing the images using information from consecutive frames, the problem of large brightness variations between infrared image frames was solved, thus improving image quality.
Patent Information
- Application Number
- CN202410941589.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-11-05
AI Technical Summary
Existing infrared image contrast enhancement methods only process single-frame images, resulting in large brightness variations between frames and causing image flickering.
By performing temporal filtering on the normalized cumulative histogram and smoothing the image using information from previous and subsequent frames, an enhanced image is generated.
It effectively reduces brightness variations between infrared image frames, eliminates image flicker, and improves image quality.
Smart Images

Figure CN118898564A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of infrared image processing technology, and in particular to a method and device for infrared image contrast enhancement based on time domain filtering. Background Art
[0002] Infrared imaging technology is a technology that uses infrared radiation to generate images. It is based on the infrared radiation emitted by the object, which is converted into electrical signals by the detector, and then processed and displayed to form an infrared image. Infrared imaging technology is used in many fields. For example, in security monitoring, infrared imaging technology can be used for night monitoring and target detection; in industrial detection, it can be used to detect thermal failures of equipment and energy loss of buildings; in medical diagnosis, infrared imaging technology can be used to detect the temperature distribution of the human body and assist in the diagnosis of diseases. In general, infrared imaging technology is a very useful technology that provides non-contact, real-time and temperature-sensitive imaging solutions for many fields. With the continuous development of technology, the application scope of infrared imaging technology will continue to expand.
[0003] In the related art, infrared image contrast enhancement mostly adopts the enhancement method of histogram equalization, which effectively enhances the image contrast by counting the histogram information of the infrared image, enlarging the data range of the grayscale level of the main area of the image, and compressing the data range of the grayscale level of the non-main area. However, this method only processes a single frame of image without considering the image information of the previous and next frames, because the image enhancement effects of different frames are also different, which leads to large changes in brightness between image frames, resulting in image flickering.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field.
[0005] Application Contents
[0006] In view of at least one of the above technical problems, the present application provides an infrared image contrast enhancement method and device based on time domain filtering.
[0007] According to a first aspect of an embodiment of the present application, a method for enhancing infrared image contrast based on time domain filtering is provided, comprising:
[0008] Acquire an infrared image, and generate a normalized cumulative histogram according to the infrared image;
[0009] Determine whether the infrared image is the first frame image;
[0010] If it is not the first frame image, perform time domain filtering on the normalized cumulative histogram;
[0011] The normalized cumulative histogram after filtering is gray-scale mapped to generate an enhanced image.
[0012] One of the above technical solutions has at least one of the following advantages or beneficial effects: This method smoothes the brightness changes between infrared image frames by performing time domain filtering on the normalized cumulative histogram, thereby solving the problem of flickering caused by large brightness changes between infrared image frames.
[0013] In some possible implementations, a normalized cumulative histogram is generated, including:
[0014] Generate a grayscale histogram based on the infrared image;
[0015] Generate a cumulative histogram based on the grayscale histogram;
[0016] Normalize Cumulative Histogram generates a normalized cumulative histogram.
[0017] In some possible implementations, after the normalized cumulative histogram is subjected to time domain filtering, the method further includes:
[0018] The normalized cumulative histogram after filtering is stored to generate a temporary image.
[0019] In some possible implementations, time domain filtering is performed on the normalized cumulative histogram, including:
[0020] Call the temporary image of the previous infrared image;
[0021] The normalized cumulative histogram is subjected to time domain filtering according to the temporarily stored image of the previous infrared image.
[0022] In some possible implementations, the normalized cumulative histogram is filtered in the time domain using the following formula:
[0023] normCumHist after =a*normCumHist+(1-a)*lastNormCumHist
[0024] Where normCumHist after To complete the normalized cumulative histogram after filtering, normCumHist is the normalized cumulative histogram, lastNormCumHist is the temporary image of the previous infrared image, and a is the filter coefficient, which is an empirical value.
[0025] In some possible implementations, the following formula is used to perform grayscale mapping to generate an enhanced image:
[0026] y = normCumHist after_x *(L-1),0≤x≤L-1
[0027] Where y is the pixel value corresponding to the pixel after enhancement, normCumHist after_x To complete the normalized cumulative histogram after filtering, x is the pixel value of any pixel point in the infrared image, and L is the maximum grayscale level.
[0028] In some possible implementations, determining whether the infrared image is a first frame image further includes:
[0029] If it is the first frame image, grayscale mapping is performed on the normalized cumulative histogram to generate an enhanced image.
[0030] In some possible implementations, the following formula is used to perform grayscale mapping to generate an enhanced image:
[0031] y = normCumHist x *(L-1),0≤x≤L-1
[0032] Where y is the pixel value corresponding to the pixel after enhancement, normCumHist x is the normalized cumulative histogram, x is the pixel value of any pixel in the infrared image, and L is the maximum grayscale level.
[0033] According to a second aspect of an embodiment of the present application, there is provided an infrared image contrast enhancement device based on time domain filtering, comprising:
[0034] The first processing module is used to acquire an infrared image and generate a normalized cumulative histogram according to the infrared image;
[0035] A first judging module, used for judging whether the infrared image is a first frame image;
[0036] The second processing module is used for performing time domain filtering on the normalized cumulative histogram if it is not the first frame image;
[0037] The third processing module is used to perform grayscale mapping on the filtered normalized cumulative histogram to generate an enhanced image.
[0038] In some possible implementations, the method further includes: a storage module, configured to store the normalized cumulative histogram after filtering to generate a temporary image.
[0039] The present application is further described below in conjunction with the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 is a schematic flow chart of an infrared image contrast enhancement method provided in an embodiment of the present application;
[0042] Figure 2 is a schematic structural diagram of an infrared image contrast enhancement device provided in an embodiment of the present application; DETAILED DESCRIPTION
[0043] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present application, so the present application is not limited by the specific embodiments disclosed below.
[0044] Infrared imaging technology is a technology that uses infrared radiation to generate images. It is based on the infrared radiation emitted by the object, which is converted into electrical signals by the detector, and then processed and displayed to form an infrared image. Infrared imaging technology is used in many fields. For example, in security monitoring, infrared imaging technology can be used for night monitoring and target detection; in industrial detection, it can be used to detect thermal failures of equipment and energy loss of buildings; in medical diagnosis, infrared imaging technology can be used to detect the temperature distribution of the human body and assist in the diagnosis of diseases. In general, infrared imaging technology is a very useful technology that provides non-contact, real-time and temperature-sensitive imaging solutions for many fields. With the continuous development of technology, the application scope of infrared imaging technology will continue to expand.
[0045] In the related art, infrared image contrast enhancement mostly adopts the enhancement method of histogram equalization, which effectively enhances the image contrast by counting the histogram information of the infrared image, enlarging the data range of the grayscale level of the main area of the image, and compressing the data range of the grayscale level of the non-main area. However, this method only processes a single frame of image without considering the image information of the previous and next frames, because the image enhancement effects of different frames are also different, which leads to large changes in brightness between image frames, resulting in image flickering.
[0046] One of the above technical solutions has at least one of the following advantages or beneficial effects: This method smoothes the brightness changes between infrared image frames by performing time domain filtering on the normalized cumulative histogram, thereby solving the problem of flickering caused by large brightness changes between infrared image frames.
[0047] like Figure 1 As shown, an embodiment provides an infrared image contrast enhancement method based on time domain filtering, including: S100 to S400. The infrared image contrast enhancement method is applied to an infrared imaging device.
[0048] S100, acquiring an infrared image in an infrared imaging device, and generating a normalized cumulative histogram according to the infrared image.
[0049] In this step, the infrared imaging device is aimed at the target, and at least two infrared images, namely two frames of infrared images, are captured, and the infrared images are processed in sequence so as to be processed into a normalized cumulative histogram.
[0050] S200, the infrared imaging device determines whether the infrared image is a first frame image.
[0051] S300: If it is not the first frame image, perform time domain filtering on the normalized cumulative histogram.
[0052] By performing time domain filtering on the normalized cumulative histogram and enhancing the features in the normalized cumulative histogram, it is helpful to highlight specific attributes in the infrared image, thereby achieving the purpose of image enhancement.
[0053] S400, performing grayscale mapping on the filtered normalized cumulative histogram to generate an enhanced image.
[0054] like Figure 1 As shown, in some embodiments, generating a normalized cumulative histogram includes: generating a grayscale histogram according to the infrared image; generating a cumulative histogram according to the grayscale histogram; and normalizing the cumulative histogram to generate a normalized cumulative histogram. By generating a normalized histogram, the grayscale level distribution of the infrared image can be quickly analyzed, and the calculation and processing of the normalized cumulative histogram are relatively fast, thereby improving processing efficiency.
[0055] like Figure 1 As shown, in some embodiments, after the normalized cumulative histogram is subjected to time domain filtering, the method further includes: storing the normalized cumulative histogram after filtering to generate a temporary image. By caching the normalized cumulative histogram of the current frame, when processing the next infrared image frame, the normalized cumulative histogram of the latest frame and the cached normalized cumulative histogram of the previous frame are subjected to time domain filtering.
[0056] like Figure 1As shown, in some embodiments, time domain filtering is performed on the normalized cumulative histogram, including:
[0057] Call the temporary image of the previous infrared image;
[0058] The normalized cumulative histogram is subjected to time domain filtering according to the temporarily stored image of the previous infrared image.
[0059] Specifically, the normalized cumulative histogram is filtered in the time domain using the following formula:
[0060] normCumHist after =a*normCumHist+(1-a)*lastNormCumHist
[0061] Where normCumHist after To complete the normalized cumulative histogram after filtering, normCumHist is the normalized cumulative histogram, lastNormCumHist is the temporary image of the previous infrared image, and a is the filter coefficient, which is an empirical value. Among them, the filter coefficient is an adjustable parameter, which is an empirical value obtained through testing in different scenarios.
[0062] Specifically, the following formula is used to perform grayscale mapping to generate an enhanced image:
[0063] y = normCumHist after_x *(L-1),0≤x≤L-1
[0064] Where y is the pixel value corresponding to the pixel after enhancement, normCumHist after_x To complete the normalized cumulative histogram after filtering, x is the pixel value of any pixel point in the infrared image, and L is the maximum grayscale level.
[0065] like Figure 1 As shown, in some embodiments, determining whether the infrared image is a first frame image further includes:
[0066] S500: If it is the first frame image, grayscale mapping is performed on the normalized cumulative histogram to generate an enhanced image.
[0067] Specifically, the following formula is used to perform grayscale mapping to generate an enhanced image:
[0068] y = normCumHist x *(L-1),0≤x≤L-1
[0069] Where y is the pixel value corresponding to the pixel after enhancement, normCumHist xis the normalized cumulative histogram, x is the pixel value of any pixel in the infrared image, and L is the maximum grayscale level.
[0070] like Figure 2 As shown, an embodiment provides an infrared image contrast enhancement device based on time domain filtering, comprising:
[0071] The first processing module 100 is used to acquire an infrared image and generate a normalized cumulative histogram according to the infrared image;
[0072] The first judging module 200 is used to judge whether the infrared image is a first frame image;
[0073] The second processing module 300 is used for performing time domain filtering on the normalized cumulative histogram if it is not the first frame image;
[0074] The third processing module 500 is used to perform grayscale mapping on the filtered normalized cumulative histogram to generate an enhanced image.
[0075] like Figure 1 As shown, in some embodiments, it also includes: a storage module 400, which is used to store the normalized cumulative histogram after filtering to generate a temporary image.
[0076] like Figure 2 As shown, in some embodiments, the first processing module specifically includes: generating a grayscale histogram according to the infrared image; generating a cumulative histogram according to the grayscale histogram; and normalizing the cumulative histogram to generate a normalized cumulative histogram. By generating a normalized histogram, the grayscale level distribution of the infrared image can be quickly analyzed, and the calculation and processing of the normalized cumulative histogram are relatively fast, thereby improving processing efficiency.
[0077] like Figure 2 As shown, in some embodiments, the second processing module specifically includes: calling the temporary stored image of the previous infrared image; and performing time domain filtering on the normalized cumulative histogram according to the temporary stored image of the previous infrared image.
[0078] Specifically, the normalized cumulative histogram is filtered in the time domain using the following formula:
[0079] normCumHist after =a*normCumHist+(1-a)*lastNormCumHist
[0080] Where normCumHist afterTo complete the normalized cumulative histogram after filtering, normCumHist is the normalized cumulative histogram, lastNormCumHist is the temporary image of the previous infrared image, and a is the filter coefficient, which is an empirical value. Among them, the filter coefficient is an adjustable parameter, which is an empirical value obtained through testing in different scenarios.
[0081] Specifically, the following formula is used to perform grayscale mapping to generate an enhanced image:
[0082] y = normCumHist after_x *(L-1),0≤x≤L-1
[0083] Where y is the pixel value corresponding to the pixel after enhancement, normCumHist after_x To complete the normalized cumulative histogram after filtering, x is the pixel value of any pixel point in the infrared image, and L is the maximum grayscale level.
[0084] In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0085] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0086] In addition, various aspects or features of the present application can be implemented as methods, devices or products using standard programming and / or engineering techniques. The term "product" used in this application covers computer programs that can be accessed from any computer-readable device, carrier or medium. For example, computer-readable media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks or tapes, etc.), optical disks (e.g., compact discs (CDs), digital versatile discs (DVDs), etc.), smart cards and flash memory devices (e.g., erasable programmable read-only memory (EPROM), cards, sticks or key drives, etc.). In addition, the various storage media described herein may represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and / or carrying instructions and / or data.
[0087] It should also be understood that in the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0088] 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, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. 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.
[0089] 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.
[0090] 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 below are only schematic, for example, the division of units is only a logical function division, and 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. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or can be electrical, mechanical or other forms of connection.
[0091] 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 embodiments of the present application.
[0092] The above are only preferred embodiments of the present application, and do not constitute any formal limitation on the present application. Any technician familiar with the art can use the above disclosed methods and technical contents to make many possible changes and modifications to the technical solution of the present application without departing from the scope of the technical solution of the present application, or modify it into an equivalent embodiment of equivalent changes. Therefore, all equivalent changes made according to the shape, structure and principle of the present application without departing from the content of the technical solution of the present application should be included in the protection scope of the present application.
Claims
1. A method for infrared image contrast enhancement based on time domain filtering, characterized in that: include: Acquire an infrared image, and generate a normalized cumulative histogram according to the infrared image; Determining whether the infrared image is a first frame image; If it is not the first frame image, performing time domain filtering on the normalized cumulative histogram; The normalized cumulative histogram after filtering is gray-scale mapped to generate an enhanced image.
2. The infrared image contrast enhancement method based on time domain filtering according to claim 1 is characterized in that: Generates a normalized cumulative histogram, including: generating a grayscale histogram according to the infrared image; Generating a cumulative histogram according to the grayscale histogram; The cumulative histogram is normalized to generate the normalized cumulative histogram.
3. The infrared image contrast enhancement method based on time domain filtering according to claim 1 is characterized in that: After performing time domain filtering on the normalized cumulative histogram, the method further includes: The normalized cumulative histogram after filtering is stored to generate a temporary image.
4. The infrared image contrast enhancement method based on time domain filtering according to claim 3 is characterized in that: Performing time domain filtering on the normalized cumulative histogram includes: Calling the temporarily stored image of the previous infrared image frame; The normalized cumulative histogram is subjected to time domain filtering according to the temporarily stored image of the previous infrared image frame.
5. The infrared image contrast enhancement method based on time domain filtering according to claim 4 is characterized in that: The normalized cumulative histogram is subjected to time domain filtering using the following formula: normCumHist after =a*normCumHist+(1-a)*lastNormCumHist Where normCumHist after To complete the normalized cumulative histogram after filtering, normCumHist is the normalized cumulative histogram, lastNormCumHist is the temporary image of the previous infrared image, a is the filter coefficient, and the filter coefficient is an empirical value.
6. The infrared image contrast enhancement method based on time domain filtering according to claim 5 is characterized in that: The following formula is used to generate the enhanced image by grayscale mapping: y=normCumHist after_x *(L-1),0≤x≤L-1 Where y is the pixel value corresponding to the pixel after enhancement, normCumHist after_x To complete the normalized cumulative histogram after filtering, x is the pixel value of any pixel point in the infrared image, and L is the maximum grayscale level.
7. The infrared image contrast enhancement method based on time domain filtering according to claim 1 is characterized in that: The step of determining whether the infrared image is a first frame image further includes: If it is the first frame image, grayscale mapping is performed on the normalized cumulative histogram to generate an enhanced image.
8. The infrared image contrast enhancement method based on time domain filtering according to claim 7 is characterized in that: The following formula is used to generate the enhanced image by grayscale mapping: y=normCumHist x *(L-1),0≤x≤L-1 Where y is the pixel value corresponding to the pixel after enhancement, normCumHist x is the normalized cumulative histogram, x is the pixel value of any pixel in the infrared image, and L is the maximum grayscale level.
9. An infrared image contrast enhancement device based on time domain filtering, characterized in that: include: A first processing module, used for acquiring an infrared image and generating a normalized cumulative histogram according to the infrared image; A first judging module, used for judging whether the infrared image is a first frame image; A second processing module, for performing time domain filtering on the normalized cumulative histogram if it is not the first frame image; The third processing module is used to perform grayscale mapping on the filtered normalized cumulative histogram to generate an enhanced image.
10. The infrared image contrast enhancement device based on time domain filtering according to claim 9, characterized in that: Also includes: The storage module is used to store the normalized cumulative histogram after filtering to generate a temporary image.
Citation Information
Patent Citations
Video image contrast intensifying method and apparatus
CN101179650A
Color enhancement for graphic images
CN101621704A
Infrared digital image gray mapping method
CN114998163A
Self-adaptive image enhancement method and device and electronic equipment
CN117745552A
Monocular structured light three-dimensional reconstruction method based on fringe projection image enhancement
CN118037577A
