Infrared image enhancement method for adaptive brightness adjustment and computer program product
The infrared image enhancement method with adaptive brightness adjustment statistically maps the average brightness of the image and sets the upper and lower brightness limits to perform brightness enhancement or suppression operations, which solves the problem of infrared images being too bright or too dark in different scenes and improves image quality.
Patent Information
- Application Number
- CN202510794372.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-09-19
AI Technical Summary
Infrared images have a large dynamic range and low contrast. The parameter selection of existing technologies in different scenarios causes the images to be too bright or too dark, resulting in poor visual effects.
By counting the average brightness of the mapped image after tone mapping, setting the upper and lower brightness limits, performing brightness enhancement or suppression operations, and keeping the average brightness within a limited range, adaptive brightness adjustment is achieved.
The overall contrast of the image is improved, the visual effect is improved, and the problem of the image being too bright or too dark due to parameter selection in different scenes is avoided.
Smart Images

Figure CN120672634A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an infrared image enhancement method with adaptive brightness adjustment and a computer program product. Background Art
[0002] The basic principle of infrared imaging is to use an infrared detector to convert infrared thermal radiation images into electrical images, which are then processed and output to a display device, where they are converted into optical images for display.
[0003] Infrared images are thermal radiation images. Due to the relatively small temperature difference between the target and the background in a scene, infrared images have a large dynamic range, low contrast, and a low signal-to-noise ratio. To accurately identify targets in infrared images, they must be enhanced. When tone mapping many infrared images, due to parameter selection issues, the same parameter or set of parameters can result in images that are too bright or too dark in different scenarios, resulting in poor overall contrast and poor visual quality.
[0004] Therefore, providing an infrared image enhancement method with adaptive brightness adjustment to improve image quality is a technical problem that needs to be solved urgently. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide an infrared image enhancement method and a computer program product with adaptive brightness adjustment, which can ensure that the brightness of the image is adaptively limited to a limited range, thereby improving the image quality.
[0006] In order to solve the above problems, the present invention provides an infrared image enhancement method with adaptive brightness adjustment, which includes the following steps: acquiring a frame of infrared image; performing tone mapping imaging to map the infrared image into an 8-bit mapping image; counting the average brightness of the mapping image and setting an upper brightness limit and a lower brightness limit; and comparing the average brightness with the upper brightness limit and the lower brightness limit, performing a brightness enhancement operation when the average brightness is less than the lower brightness limit, performing a brightness suppression operation when the average brightness is greater than the upper brightness limit, and maintaining the original brightness of the mapping image when the average brightness is between the lower brightness limit and the upper brightness limit.
[0007] In order to solve the above problem, the present invention further provides a computer program product, comprising a computer program, wherein the computer program implements the steps of the above method of the present invention when executed by a processor.
[0008] The above technical solution calculates the average brightness of the mapped image after tone mapping and sets the upper and lower brightness limits. According to the relationship between the average brightness and the upper and lower brightness limits, a brightness enhancement operation or a brightness suppression operation is performed, or the original brightness of the mapped image is maintained. The average brightness can be limited to the upper and lower brightness limits, thereby ultimately being able to adaptively improve the imaging effect in all scenes, thereby improving the image quality, and avoiding the problem that when the existing infrared image is tone mapped, due to the problem of parameter selection, the same or a group of parameters may appear too bright or too dark in different scenes, resulting in poor overall contrast and poor visual effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0010] Figure 1 This is a flow chart of an infrared image enhancement method with adaptive brightness adjustment provided by an embodiment of the present invention; Figure 2 1 is a schematic diagram of a brightness improvement curve provided by an embodiment of the present invention; Figure 3 2 is a schematic diagram of an imaging effect with improved brightness provided by an embodiment of the present invention; Figure 4 is a schematic diagram of a brightness suppression curve provided by an embodiment of the present invention; Figure 5 FIG. 1 is a schematic diagram of an imaging effect of brightness suppression provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0011] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0012] Please also refer to Figures 1 to 5 ,in, Figure 1 This is a flow chart of an infrared image enhancement method with adaptive brightness adjustment provided by an embodiment of the present invention; Figure 2 1 is a schematic diagram of a brightness improvement curve provided by an embodiment of the present invention; Figure 3 2 is a schematic diagram of an imaging effect with improved brightness provided by an embodiment of the present invention; Figure 4 is a schematic diagram of a brightness suppression curve provided by an embodiment of the present invention; Figure 5 FIG. 1 is a schematic diagram of an imaging effect of brightness suppression provided by an embodiment of the present invention.
[0013] like Figure 1 As shown, the infrared image enhancement method with adaptive brightness adjustment described in this embodiment includes the following steps: S1, collecting a frame of infrared image through an infrared detection device; S2, performing tone mapping imaging to map the infrared image into an 8-bit mapping image; S3, counting the average brightness of the mapping image, and setting the upper and lower brightness limits; and S4, comparing the average brightness with the upper and lower brightness limits, performing a brightness enhancement operation when the average brightness is less than the lower brightness limit, performing a brightness suppression operation when the average brightness is greater than the upper brightness limit, and maintaining the original brightness of the mapping image when the average brightness is between the lower and upper brightness limits.
[0014] By calculating the average brightness of the mapped image after tone mapping and setting an upper brightness limit and a lower brightness limit, a brightness enhancement operation or a brightness suppression operation is performed according to the relationship between the average brightness and the upper brightness limit and the lower brightness limit, or the original brightness of the mapped image is maintained, the average brightness can be limited to the upper and lower brightness limits, thereby ultimately being able to adaptively improve the imaging effect in all scenes, thereby improving the image quality, and avoiding the problem that when the existing infrared image is tone mapped, due to the problem of parameter selection, the same or a group of parameters may appear too bright or too dark in different scenes, resulting in poor overall contrast and poor visual effects.
[0015] Regarding step S1, a frame of infrared image is captured.
[0016] Specifically, an infrared image frame may be captured by an infrared detection device. In some embodiments, the number of bits of the infrared image is greater than 8 bits. For example, the number of bits of the infrared image may be 12 bits or 14 bits.
[0017] Regarding step S2, tone mapping imaging is performed to map the infrared image into an 8-bit mapping image.
[0018] Specifically, a platform histogram equalization algorithm may be used as a tone mapping algorithm, and a platform value may be selected to perform global tone mapping imaging, so as to map the infrared image into an 8-bit mapping image.
[0019] Regarding step S3, the average brightness of the mapped image is calculated, and an upper brightness limit and a lower brightness limit are set.
[0020] In some embodiments, the following formula may be used to calculate the average brightness: ; Wherein, b_mean is the average brightness, height is the height of the mapped image, width is the width of the mapped image, and I1(i, j) is the brightness value corresponding to when the X-axis coordinate value of the mapped image is i and the Y-axis coordinate value is j.
[0021] Some scenes may appear brighter, some may appear darker, and some may appear normal. By calculating the average brightness and setting upper and lower brightness limits, brightness can be adjusted for scenes that are too bright or too dark. In some embodiments, the upper brightness limit is 100 and the lower brightness limit is 55, which can achieve a relatively good visual effect.
[0022] Regarding step S4, the average brightness is compared with the upper and lower brightness limits. When the average brightness is less than the lower brightness limit, a brightness boost operation is performed; when the average brightness is greater than the upper brightness limit, a brightness suppression operation is performed; and when the average brightness is between the lower and upper brightness limits, the original brightness of the mapped image is maintained. In other words, by performing a brightness boost operation, a brightness suppression operation, or maintaining the original brightness of the mapped image based on the relationship between the average brightness and the upper and lower brightness limits, the average brightness can be limited to within the upper and lower brightness limits, ultimately adaptively improving imaging effects in all scenarios and thereby enhancing image quality.
[0023] In some embodiments, the step of performing a brightness enhancement operation when the average brightness is less than the brightness lower limit specifically includes: (411) calculating and obtaining a brightness enhancement parameter; (412) substituting the brightness enhancement parameter into a brightness enhancement function; (413) using the brightness enhancement function to perform a brightness enhancement transformation on each pixel in the mapped image to obtain a final enhanced image.
[0024] Specifically, the calculation formula of the brightness improvement parameter is: ; Wherein, α is the brightness enhancement parameter, b_mean is the average brightness, and b_down is the brightness lower limit.
[0025] Specifically, the brightness improvement function formula is: ; Wherein, La is the brightness enhancement function, and I is a brightness value in the range of 0 to 255.
[0026] Specifically, the brightness improvement transformation formula is: ; Wherein, I2(i, j) is the brightness value corresponding to when the X-axis coordinate value of the enhanced image is i and the Y-axis coordinate value is j, and I1(i, j) is the brightness value corresponding to when the X-axis coordinate value of the mapped image is i and the Y-axis coordinate value is j.
[0027] In some embodiments, the brightness enhancement effect of the enhanced image is proportional to the value of the brightness enhancement parameter; the value of the brightness enhancement parameter is inversely proportional to the value of the average brightness, and the value of the brightness enhancement parameter is proportional to the value of the brightness lower limit. That is, the smaller the average brightness b_mean value is and the larger the brightness lower limit b_down value is, the larger the brightness enhancement parameter α value is; and when the brightness enhancement parameter α value is larger, the pixel brightness is enhanced. The brightness enhancement curves corresponding to different α values are as follows: Figure 2 shown. Figure 2 In the figure, the horizontal axis is the original brightness value of the mapped image, which ranges from 0 to 255; the vertical axis is the brightness value of the enhanced image after the brightness enhancement transformation, which also ranges from 0 to 255.
[0028] According to the adaptive brightness enhancement method, for scenes where the overall image after tone mapping is dark, the effect of brightness enhancement transformation is improved as follows: Figure 3 shown. Figure 3 Part (a) in the middle is the image obtained by directly mapping the infrared image through the platform histogram. The image is generally dark. Figure 3 Part (b) shows the imaging effect after adding the above-mentioned adaptive brightness enhancement method of the present invention. Figure 3 It can be seen that the enhanced image obtained by adopting the above-mentioned adaptive brightness enhancement method of the present invention has a better overall contrast and a better visual effect, which effectively improves the image quality.
[0029] In some embodiments, the step of performing a brightness suppression operation when the average brightness is greater than the brightness upper limit specifically includes: (421) calculating and obtaining a brightness suppression parameter; (422) substituting the brightness suppression parameter into a brightness suppression function; (423) using the brightness suppression function to perform a brightness suppression transformation on each pixel in the mapped image to obtain a final enhanced image.
[0030] Specifically, the calculation formula of the brightness suppression parameter is: ; Wherein, β is the brightness suppression parameter, b_mean is the average brightness, and b_up is the brightness upper limit.
[0031] Specifically, the brightness suppression function formula is: ; in, is the brightness suppression function, and I is a brightness value in the range of 0 to 255.
[0032] Specifically, the brightness improvement transformation formula is: ; Among them, I2(i, j) is the brightness value corresponding to when the X-axis coordinate value of the enhanced image is i and the Y-axis coordinate value is j, and I1(i, j) is the brightness value corresponding to when the X-axis coordinate value of the mapped image is i and the Y-axis coordinate value is j.
[0033] In some embodiments, the brightness suppression effect of the enhanced image is proportional to the value of the brightness suppression parameter; the value of the brightness suppression parameter is proportional to the value of the average brightness, and the value of the brightness suppression parameter is inversely proportional to the value of the brightness upper limit. That is, the larger the average brightness b_mean value is and the smaller the brightness upper limit b_up value is, the larger the absolute value of the brightness suppression parameter β is (in this case, β is a negative value). When the brightness suppression parameter β value is larger, the suppression of pixel brightness is greater. The specific brightness suppression curves corresponding to different β values are as follows: Figure 4 shown. Figure 4 In the figure, the horizontal axis is the original brightness value of the mapped image, which ranges from 0 to 255; the vertical axis is the brightness value of the enhanced image after the brightness suppression transformation, which also ranges from 0 to 255.
[0034] According to the adaptive brightness enhancement method, for scenes where the overall mapped image is too bright after tone mapping, the effect of brightness suppression transformation is improved as follows: Figure 5 shown. Figure 5 Part (a) in the middle is the image obtained by directly mapping the infrared image through the platform histogram. The image is generally too bright. Figure 5 Part (b) shows the imaging effect after adding the above-mentioned adaptive brightness suppression method of the present invention. Figure 5 It can be seen that the enhanced image obtained by adopting the above-mentioned adaptive brightness suppression method of the present invention has a better overall contrast and a better visual effect, which effectively improves the image quality.
[0035] When the average brightness is between the lower brightness limit and the upper brightness limit, the original brightness of the mapped image is maintained, that is, I2 = I1, where I2 is the enhanced image and I1 is the mapped image.
[0036] In the above embodiment, by calculating the average brightness of the mapped image after tone mapping and setting the upper and lower brightness limits, a brightness enhancement operation or a brightness suppression operation is performed according to the relationship between the average brightness and the upper and lower brightness limits, or the original brightness of the mapped image is maintained. The average brightness can be limited to the upper and lower brightness limits, thereby ultimately being able to adaptively improve the imaging effect in all scenes, thereby improving the image quality, and avoiding the problem that when the existing infrared image is tone mapped, due to the problem of parameter selection, the same or a group of parameters may cause the image to be too bright or too dark in different scenes, resulting in poor overall contrast and poor visual effects.
[0037] Based on the same inventive concept, the present invention further provides a computer program product, including a computer program, which implements the steps of the aforementioned method of the present invention when executed by a processor.
[0038] Based on the same inventive concept, the present invention also provides a computer device, comprising: a memory for storing a computer program; a processor connected to the memory and for executing the computer program to implement the steps of the aforementioned method of the present invention.
[0039] Based on the same inventive concept, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the aforementioned method of the present invention when executed by a processor.
[0040] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media used in the various embodiments provided herein may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAM bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAM bus dynamic RAM (RDRAM).
[0041] It should be noted that, in the above-mentioned embodiments, each embodiment focuses on the differences from other embodiments, and the same / similar parts between the embodiments can be referred to in detail.
[0042] The terms "including" and "having" and their variations referred to in the present invention document are intended to cover non-exclusive inclusions. The terms "first", "second", etc. are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence, unless the context clearly indicates otherwise, and it should be understood that the data used in this way can be interchanged where appropriate. The term "one or more" depends at least in part on the context and can be used to describe features, structures or characteristics in a singular sense, or can be used to describe features, structures or combinations of features in a plural sense. The term "based on" can be understood as not necessarily intended to express a set of exclusive factors, but can alternatively, also at least in part on the context, allow for the presence of other factors that are not necessarily explicitly described. In addition, the embodiments of the present invention and the features in the embodiments can be combined with each other unless there is a conflict. In addition, in the above description, the description of well-known components and technologies has been omitted to avoid unnecessary confusion of the concepts of the present invention.
[0043] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It should be noted that those skilled in the art may make various improvements and modifications without departing from the principles of the present invention, and such improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for infrared image enhancement with adaptive brightness adjustment, characterized in that: The method includes the following steps: capturing a frame of infrared image; performing tone mapping imaging to map the infrared image into an 8-bit mapping image; calculating the average brightness of the mapping image and setting an upper brightness limit and a lower brightness limit; and comparing the average brightness with the upper brightness limit and the lower brightness limit, performing a brightness enhancement operation when the average brightness is less than the lower brightness limit, performing a brightness suppression operation when the average brightness is greater than the upper brightness limit, and maintaining the original brightness of the mapping image when the average brightness is between the lower brightness limit and the upper brightness limit.
2. The method according to claim 1, characterized in that The number of bits of the infrared image is greater than 8 bits.
3. The method according to claim 1, characterized in that The step of performing tone mapping imaging to map the infrared image into an 8-bit mapping image specifically includes: selecting a platform value for global tone mapping imaging through a platform histogram equalization algorithm to map the infrared image into an 8-bit mapping image.
4. The method according to claim 1, wherein The step of counting the average brightness of the mapped image specifically uses the following formula to count the average brightness: ; Wherein, b_mean is the average brightness, height is the height of the mapped image, width is the width of the mapped image, and I1(i, j) is the brightness value corresponding to when the X-axis coordinate value of the mapped image is i and the Y-axis coordinate value is j.
5. The method according to claim 1, wherein The upper limit of brightness is 100, and the lower limit of brightness is 55.
6. The method according to claim 1, characterized in that The step of performing a brightness boost operation when the average brightness is less than the brightness lower limit specifically includes: calculating and obtaining a brightness boost parameter, and the calculation formula is: ; Wherein, α is the brightness enhancement parameter, b_mean is the average brightness, and b_down is the brightness lower limit; the brightness enhancement parameter is substituted into the brightness enhancement function, and the brightness enhancement function formula is: Wherein, La is the brightness enhancement function, and I is a brightness value in the range of 0 to 255; the brightness enhancement function is used to perform a brightness enhancement transformation on each pixel in the mapped image to obtain the final enhanced image, and the brightness enhancement transformation formula is: ; Wherein, I2(i, j) is the brightness value corresponding to when the X-axis coordinate value of the enhanced image is i and the Y-axis coordinate value is j, and I1(i, j) is the brightness value corresponding to when the X-axis coordinate value of the mapped image is i and the Y-axis coordinate value is j.
7. The method according to claim 6, characterized in that The brightness enhancement effect of the enhanced image is proportional to the value of the brightness enhancement parameter; the value of the brightness enhancement parameter is inversely proportional to the value of the average brightness, and the value of the brightness enhancement parameter is proportional to the value of the brightness lower limit.
8. The method according to claim 1, characterized in that The step of performing brightness suppression operation when the average brightness is greater than the brightness upper limit specifically includes: calculating and obtaining a brightness suppression parameter, and the calculation formula is: ; Wherein, β is the brightness suppression parameter, b_mean is the average brightness, and b_up is the brightness upper limit; the brightness suppression parameter is brought into the brightness suppression function, and the brightness suppression function formula is: ;in, is the brightness suppression function, I is a brightness value in the range of 0 to 255; the brightness suppression function is used to perform brightness suppression transformation on each pixel in the mapped image to obtain the final enhanced image, and the brightness enhancement transformation formula is: ; Wherein, I2(i, j) is the brightness value corresponding to when the X-axis coordinate value of the enhanced image is i and the Y-axis coordinate value is j, and I1(i, j) is the brightness value corresponding to when the X-axis coordinate value of the mapped image is i and the Y-axis coordinate value is j.
9. The method according to claim 8, characterized in that The brightness suppression effect of the enhanced image is proportional to the value of the brightness suppression parameter; the value of the brightness suppression parameter is proportional to the value of the average brightness, and the value of the brightness suppression parameter is inversely proportional to the value of the brightness upper limit.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Image brightness reinforcing method
CN101345820A
Human visual perception simulation-based self-adaptive low-illumination image enhancement method
CN105046663A
Image edge enhancement method and device
CN106846270A
Image enhancement method for scene self-adaptive wide dynamic infrared thermal imaging
CN111899205A
Adaptive brightness adjustment method suitable for fusion camera
CN117939307A