A method, apparatus, medium and device for enhancing a thermographic image
By analyzing the histogram information and adjusting the mapping curve of thermal imaging images, the problem of insufficient contrast and detail in the target area under high dynamic range was solved, thereby improving the display effect of the target area and preserving the image transparency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG UNIVIEW TECH CO LTD
- Filing Date
- 2021-12-21
- Publication Date
- 2026-06-02
Smart Images

Figure CN116309085B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus, medium and device for enhancing thermal imaging images. Background Technology
[0002] Thermal imaging technology refers to the use of infrared detectors and optical imaging lenses to receive the infrared radiation energy distribution pattern of the target object and reflect it onto the photosensitive element of the infrared detector, thereby obtaining an infrared thermal image. This thermal image corresponds to the thermal distribution field of the object's surface. In high dynamic range scenes, because the grayscale of the target area or region of interest in the thermal image accounts for a small proportion of the total grayscale, the final effect will be compressed, resulting in underexposure or overexposure, along with loss of detail.
[0003] Currently, to address the aforementioned issues of underexposure or overexposure, the common approach is image layering, where details are separated and then superimposed onto the original image. However, this method processes the entire image, resulting in significant differences in the improvement across different grayscale areas. It fails to specifically enhance the display of areas of interest or target regions, and the overall image may appear hazy and lacking in clarity.
[0004] Therefore, how to enhance the contrast and detail of the target area while preserving the original image transparency is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] This invention provides a method, apparatus, medium, and device for enhancing thermal imaging images. By analyzing the histogram information of the target area of a thermal imaging image before and after processing, a mapping curve can be regenerated, which can enhance the contrast and detail of the target area of the thermal imaging image and improve the display effect of the target area.
[0006] In a first aspect, embodiments of this application provide a method for enhancing thermal imaging images, the method comprising:
[0007] Acquire the raw thermal imaging image, and preprocess the raw image to obtain the image to be processed;
[0008] Extract the target region from the image to be processed;
[0009] Obtain the second histogram information of the target region in the image to be processed and the first histogram information of the target region in the original image;
[0010] If the second histogram information does not meet the preset conditions, an initial mapping curve is generated based on the first histogram information;
[0011] If the mapping result obtained using the initial mapping curve does not meet the preset conditions, then the mapping parameters of the initial mapping curve are adjusted so that the mapping result meets the preset conditions.
[0012] Secondly, embodiments of this application provide a thermal imaging image enhancement device, the device comprising:
[0013] The image preprocessing module is used to acquire the raw image of thermal imaging and preprocess the raw image to obtain the image to be processed.
[0014] The target region extraction module is used to extract the target region in the image to be processed;
[0015] The histogram information acquisition module is used to acquire the second histogram information of the target region in the image to be processed and the first histogram information of the target region in the original image;
[0016] The initial mapping curve determination module is used to generate an initial mapping curve based on the first histogram information if the second histogram information does not meet the preset conditions.
[0017] The mapping parameter adjustment module is used to adjust the mapping parameters of the initial mapping curve so that the mapping result meets the preset conditions if the mapping result obtained by the initial mapping curve does not meet the preset conditions.
[0018] Thirdly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the thermal imaging image enhancement method as described in embodiments of this application.
[0019] Fourthly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the thermal imaging image enhancement method as described in embodiments of this application.
[0020] The technical solution provided by the embodiments of the present invention can enhance the contrast and detail of the target area of the thermal imaging image and improve the display effect of the target area by analyzing the histogram information before and after processing the target area of the thermal imaging image and regenerating the mapping curve. Attached Figure Description
[0021] Figure 1 This is a flowchart of the thermal imaging image enhancement method provided in Embodiment 1 of the present invention;
[0022] Figure 2 This is a flowchart of another thermal imaging image enhancement method provided in Embodiment 2 of the present invention;
[0023] Figure 3This is a structural block diagram of a thermal imaging image enhancement device provided in Embodiment 3 of the present invention;
[0024] Figure 4 This is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present invention. Detailed Implementation
[0025] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present application, not the entire structure.
[0026] Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of these steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. The process can be terminated when its operation is complete, but may also have additional steps not included in the figures. The process can correspond to a method, function, procedure, subroutine, subroutine, etc.
[0027] Example 1
[0028] Figure 1 This is a flowchart of a thermal imaging image enhancement method provided in Embodiment 1 of the present invention. This embodiment is applicable to scenarios where thermal imaging images are enhanced. The method can be executed by the thermal imaging image enhancement device provided in this application embodiment. The device can be implemented by software and / or hardware and can be integrated into an electronic device.
[0029] like Figure 1 As shown, the method for enhancing the thermal imaging image includes:
[0030] S110. Acquire the original thermal imaging image and preprocess the original image to obtain the image to be processed.
[0031] The original thermal image is obtained by reflecting the infrared radiation energy distribution pattern of the target object, received by an infrared detector and an optical imaging objective lens, onto the photosensitive element of the infrared detector. It is understood that the thermal image can be a grayscale image, which, relative to the color image, has a grayscale value range of 0 to 255, i.e., pure black to pure white.
[0032] For example, preprocessing can involve histogram mapping, sharpening, or noise reduction of the original image to obtain an image to be processed with a specific number of bytes (e.g., 8 bits). For example, when performing histogram mapping on the original image, since there are many high-temperature or low-temperature regions in the original thermal imaging image (where high or low temperature is relative to the target region), the histogram of the target region may only occupy a small segment relative to the overall histogram. Using a global histogram mapping method would severely compress the mapping range of the target region in the final image, leading to the loss of some details. Therefore, a combination of traditional histogram equalization and histogram probability density curves can be used.
[0033] S120. Extract the target region from the image to be processed.
[0034] The target region is the region of interest of a moving object such as a person or vehicle in the image to be processed. Extraction of the target region from the image to be processed can be achieved through methods such as dynamic detection, background subtraction, or Gaussian modeling; this embodiment of the invention does not limit the extraction method.
[0035] For example, if the target of the image to be processed is a person in motion, the image acquired by the outdoor surveillance camera contains stationary objects such as streetlights and electric vehicles, as well as pedestrians in motion. Since the acquired image is a thermal image, it is generated based on the differences in infrared radiation of all targets in the image acquired by the outdoor surveillance camera. The rectangular frame tangent to the edge of the moving pedestrian is its target area. However, because the infrared radiation generated by the pedestrian and the surrounding environment is similar, the contrast of this target area is low, resulting in poor display quality.
[0036] It is understood that the image to be processed includes at least one target region.
[0037] S130. Obtain the second histogram information of the target region in the image to be processed and the first histogram information of the target region in the original image.
[0038] The histogram information reflects the grayscale distribution pattern of the target region in the image to be processed or the original image. It represents the number of pixels at each grayscale level in the image, but does not include the positional information of these pixels within the image. The histogram information can be obtained using built-in functions of OpenCV or NumPy.
[0039] It is understandable that obtaining the histogram information of the target region in the image to be processed or the original image is due to its low computational cost and its advantages such as invariance to image translation, rotation, and scaling.
[0040] S140. If the second histogram information does not meet the preset conditions, an initial mapping curve is generated based on the first histogram information.
[0041] In this scheme, the second histogram information not meeting the preset conditions could be due to the mean gray level in the second histogram not meeting the preset conditions, or the span of gray levels not meeting the preset conditions, and so on. For example, the mean gray level is less than 85 or greater than 100, or the maximum gray level is 128, the minimum gray level is 66, and the span does not exceed 64.
[0042] When the second histogram information does not meet the conditions, the first histogram information is histogram equalized and combined with the probability density curve to generate an initial mapping curve. The preset conditions are conditions that make the contrast and brightness of the target area moderate. It can be that the average brightness is stable within a preset range or the grayscale value is stable within a preset range.
[0043] In this embodiment, optionally, the initial mapping curve is generated based on histogram equalization combined with probability density curve.
[0044] Histogram equalization enhances image contrast by using the probability density curve to non-linearly stretch the image, redistributing gray values to make them approximately equal within a certain range. This enhances the contrast of the peaks in the original histogram and reduces the contrast of the valleys, resulting in a flatter histogram. It's understandable that since a histogram distributes the probability density of image gray values uniformly, only merging a few low-pixel gray levels into a new gray level while widening the spacing between higher-pixel gray levels, histogram equalization of discrete images cannot produce a completely flat histogram. Therefore, histogram equalization is necessary. The advantage of this approach is that by equalizing the histogram information of the target region in the image to be processed and the target region in the original image, an initial mapping curve can be generated, reducing image noise and initially improving the local display effect of the image.
[0045] S150. If the mapping result obtained by the initial mapping curve does not meet the preset conditions, the mapping parameters of the initial mapping curve are adjusted so that the mapping result meets the preset conditions.
[0046] Referring to the above example, if the target of the image to be processed is a person in motion, the image acquired by the outdoor surveillance camera contains stationary objects such as streetlights and electric vehicles, as well as moving pedestrians. The rectangular frame tangent to the edge of the moving pedestrian is the target area. After obtaining the mapping result of the target area in the image to be processed based on the initial mapping curve, it is determined whether the average brightness value is stable within a preset range. If the preset condition is not met, i.e., the average brightness value is not within the preset range, the mapping parameters of the initial mapping curve are adjusted to make the mapping result meet the preset condition. By adjusting the mapping parameters, the contrast and detail of the target area where the moving pedestrian is located can be enhanced in the enhanced thermal imaging image, improving the local display effect.
[0047] The thermal imaging image enhancement technology solution provided in this invention involves acquiring an original thermal imaging image, preprocessing the original image to obtain a image to be processed, extracting a target region from the image to be processed, acquiring second histogram information of the target region in the image to be processed and first histogram information of the target region in the original image, and generating an initial mapping curve based on the first histogram information if the second histogram information does not meet preset conditions. If the mapping result obtained with the initial mapping curve does not meet preset conditions, the mapping parameters of the initial mapping curve are adjusted to make the mapping result meet the preset conditions. This solution, through the above means, can regenerate the mapping curve by analyzing the histogram information of the target region of the thermal imaging image before and after processing, thereby enhancing the contrast and detail of the target region and improving the display effect of the target region.
[0048] Example 2
[0049] Figure 2 This is a flowchart of another thermal imaging image enhancement method provided in Embodiment 2 of the present invention. This embodiment is based on the above embodiment and optimized. Specifically, the optimization is as follows: adjusting the mapping parameters of the initial mapping curve so that the mapping result meets preset conditions, including: using the mapping result obtained from the initial mapping curve, and calculating the brightness information of the target area in the mapping result; if the brightness information does not conform to the preset brightness range, then determining a brightness adjustment coefficient based on the brightness information and the preset brightness range; using the brightness adjustment coefficient to adjust the mapping parameters of the initial mapping curve to obtain the final mapping curve.
[0050] like Figure 2 As shown, the method in this embodiment specifically includes the following steps:
[0051] S210. Acquire the original thermal imaging image and preprocess the original image to obtain the image to be processed.
[0052] S220. Extract the target region from the image to be processed.
[0053] S230. Obtain the second histogram information of the target region in the image to be processed and the first histogram information of the target region in the original image.
[0054] S240. If the second histogram information does not meet the preset conditions, an initial mapping curve is generated based on the first histogram information.
[0055] S250. Using the mapping result obtained from the initial mapping curve, calculate the brightness information of the target area in the mapping result.
[0056] The brightness information refers to information that characterizes the brightness of the target area in the image to be processed. It can be its grayscale data, its average brightness, or its average brightness.
[0057] Optionally, in the above technical solutions, calculating the brightness information of the target region in the image to be processed includes: mapping the first histogram information of the target region in the original image through the initial mapping curve to obtain the brightness information of the target region in the image to be processed.
[0058] Specifically, the brightness information can be the grayscale data and average brightness of the image. The brightness information can be calculated using the following method: Count the number of non-zero segments in the first histogram information of the target region in the original image. To avoid bad pixels or invalid pixels caused by infrared sensor failure or malfunction, remove pixels within a preset percentage threshold range from the beginning and end of the first histogram information to obtain the grayscale value distribution result of the target region in the original image. The preset percentage threshold is not fixed; for example, it can be 5%. Similarly, count the number of non-zero segments in the second histogram information of the target region in the image to be processed to obtain the grayscale value of the target region in the image to be processed, and calculate its average brightness.
[0059] S260. If the brightness information does not conform to the preset brightness range, then determine the brightness adjustment coefficient based on the brightness information and the preset brightness range.
[0060] The brightness range is determined by the user's preferred brightness range. It can be manually set by the user or obtained from empirical data to determine the human eye's preferred brightness range for thermal imaging images. Understandably, to improve the user's visual experience, if the brightness information does not conform to the specified range, it needs to be adjusted to achieve a satisfactory result.
[0061] Specifically, the acceptable brightness range can be defined as follows: the average brightness of the target region in the image to be processed is within a first preset threshold range, and the grayscale value of the target region in the image to be processed is greater than a second preset threshold. It is understood that a higher grayscale value results in a more refined image. This setting enhances the image display effect.
[0062] Optionally, in the above technical solutions, determining the brightness adjustment coefficient based on the brightness information and the brightness range includes: determining a preset average brightness value based on the brightness range; and using the ratio of the preset average brightness value to the brightness information as the brightness adjustment coefficient.
[0063] It's understandable that the human eye prefers a thermal imaging brightness average within the range of [85, 100]. Setting it this way can improve the user's viewing experience.
[0064] S270. The mapping parameters of the initial mapping curve are adjusted using the brightness adjustment coefficient to obtain the final mapping curve.
[0065] It is understood that the initial mapping curve is generated by combining histogram equalization with probability density curves based on the first histogram information. This can initially improve the image display effect, but it also compresses the brightness range of the target area in the image. To enhance the display effect of the target area in the image, the initial mapping curve needs to be further processed. Specifically, the brightness adjustment coefficient is multiplied by the initial mapping curve to obtain the final mapping curve of the target area.
[0066] The technical solution provided in this invention, after fitting an initial mapping curve of the target region based on the second histogram information and the first histogram information, further includes: calculating the brightness information of the target region in the image to be processed; if the brightness information does not conform to the brightness range, determining a brightness adjustment coefficient based on the brightness information and the brightness range; and adjusting the initial mapping curve using the brightness adjustment coefficient to obtain a final mapping curve. By adjusting the initial mapping curve according to the brightness adjustment coefficient, the display effect of the target region of the thermal imaging image can be enhanced while simultaneously improving its overall display effect and preserving the transparency of the original image.
[0067] In this embodiment, optionally, after obtaining the final mapping curve, the method further includes:
[0068] Determine the current frame of the original image in the thermal imaging video, and the curve transformation step size;
[0069] Starting from the current frame, the effective curve of the target area image of the thermal imaging video is calculated frame by frame using the transformation step size;
[0070] The target region image is mapped frame by frame using the effective curve until the final mapping curve is reached.
[0071] The curve transformation step size can be the transformation amplitude between two adjacent frames within the number of frames required to transform from the current frame to the target brightness state. The frame-by-frame activation curve can be the mapping curve used for each frame. This allows for a transition process between the current state and the target brightness state. The advantage of this setting is that it avoids sudden brightness changes that could negatively impact the user's viewing experience, thus improving the viewing experience.
[0072] Example 3
[0073] Figure 3 This is a structural block diagram of a thermal imaging image enhancement device provided in Embodiment 3 of the present invention. This device can execute the thermal imaging image enhancement method provided in any embodiment of the present invention, and possesses the corresponding functional modules and beneficial effects for executing the method. For example... Figure 3 As shown, the device may include:
[0074] Image preprocessing module 310 is used to acquire the original image of thermal imaging and preprocess the original image to obtain the image to be processed;
[0075] The target region extraction module 320 is used to extract the target region in the image to be processed.
[0076] The histogram information acquisition module 330 is used to acquire the second histogram information of the target region in the image to be processed and the first histogram information of the target region in the original image;
[0077] The initial mapping curve determination module 340 is used to generate an initial mapping curve based on the first histogram information if the second histogram information does not meet the preset conditions.
[0078] The mapping parameter adjustment module 350 is used to adjust the mapping parameters of the initial mapping curve so that the mapping result meets the preset conditions if the mapping result obtained by the initial mapping curve does not meet the preset conditions.
[0079] The thermal imaging image enhancement device provided in this embodiment of the invention acquires a raw thermal imaging image, preprocesses the raw image to obtain a to-be-processed image, extracts a target region from the to-be-processed image, acquires a second histogram information of the target region in the to-be-processed image and a first histogram information of the target region in the raw image, and if the second histogram information does not meet a preset condition, generates an initial mapping curve based on the first histogram information; if the mapping result obtained with the initial mapping curve does not meet the preset condition, adjusts the mapping parameters of the initial mapping curve to make the mapping result meet the preset condition. The technical solution provided in this embodiment of the invention, by analyzing the histogram information of the target region of the thermal imaging image before and after processing and regenerating the mapping curve, can enhance the contrast and detail of the target region of the thermal imaging image and improve the display effect of the target region.
[0080] Based on the above embodiments, optionally, the mapping parameter adjustment module is specifically used for:
[0081] The mapping result obtained from the initial mapping curve is used to calculate the brightness information of the target region in the mapping result;
[0082] If the brightness information does not conform to the preset brightness range, then the brightness adjustment coefficient is determined based on the brightness information and the preset brightness range;
[0083] The mapping parameters of the initial mapping curve are adjusted using the brightness adjustment coefficient to obtain the final mapping curve.
[0084] Based on the above embodiments, optionally, the brightness information calculation module is specifically used for:
[0085] The first histogram information of the target region in the original image is mapped using the initial mapping curve to obtain the mapping result, and the average brightness information of the target region in the mapping result is calculated.
[0086] Based on the above embodiments, optionally, the mapping parameter adjustment module is further configured to:
[0087] Determine the current frame of the original image in the thermal imaging video, and the curve transformation step size;
[0088] Starting from the current frame, the effective curve of the target area image of the thermal imaging video is calculated frame by frame using the transformation step size;
[0089] The target region image is mapped frame by frame using the effective curve until the final mapping curve is reached.
[0090] Based on the above embodiments, optionally, the initial mapping curve is generated based on histogram equalization combined with probability density curve.
[0091] Based on the above embodiments, optionally, the brightness range is a pixel value between 85 and 100; the preset average brightness pixel value is 90.
[0092] The above-mentioned product can perform the thermal imaging image enhancement method provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects of performing the method.
[0093] Example 4
[0094] Embodiment 4 of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the thermal imaging image enhancement method provided in all embodiments of the present application:
[0095] Acquire the raw thermal imaging image, and preprocess the raw image to obtain the image to be processed;
[0096] Extract the target region from the image to be processed;
[0097] Obtain the second histogram information of the target region in the image to be processed and the first histogram information of the target region in the original image;
[0098] An initial mapping curve for the target region is fitted based on the second histogram information and the first histogram information; if the second histogram information does not meet the preset conditions, the mapping parameters of the initial mapping curve are adjusted so that the second histogram information meets the preset conditions.
[0099] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0100] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0101] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0102] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0103] Example 5
[0104] Embodiment 5 of this application provides an electronic device. Figure 4 This is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present invention. Figure 4 As shown, this embodiment provides an electronic device 400, which includes: one or more processors 420; and a storage device 410 for storing one or more programs. When the one or more programs are executed by the one or more processors 420, the one or more processors 420 implement the thermal imaging image enhancement method provided in this application embodiment. The method includes:
[0105] Acquire the raw thermal imaging image, and preprocess the raw image to obtain the image to be processed;
[0106] Extract the target region from the image to be processed;
[0107] Obtain the second histogram information of the target region in the image to be processed and the first histogram information of the target region in the original image;
[0108] An initial mapping curve for the target region is fitted based on the second histogram information and the first histogram information; if the second histogram information does not meet the preset conditions, the mapping parameters of the initial mapping curve are adjusted so that the second histogram information meets the preset conditions.
[0109] Of course, those skilled in the art will understand that the processor 420 also implements the technical solutions of the thermal imaging image enhancement method provided in any embodiment of this application.
[0110] Figure 4 The electronic device 400 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0111] like Figure 4 As shown, the electronic device 400 includes a processor 420, a storage device 410, an input device 430, and an output device 440; the number of processors 420 in the electronic device can be one or more. Figure 4 Taking a processor 420 as an example; the processor 420, storage device 410, input device 430, and output device 440 in the electronic device can be connected via a bus or other means. Figure 4 For example, China and Israel are connected via bus 450.
[0112] Storage device 410, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and module units, such as the program instructions corresponding to the thermal imaging image enhancement method in the embodiments of this application.
[0113] Storage device 410 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, storage device 410 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, storage device 410 may further include memory remotely located relative to processor 420, which can be connected via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0114] Input device 430 can be used to receive input digital, character, or voice information, and to generate key signal inputs related to user settings and function control of the electronic device. Output device 440 may include electronic devices such as a display screen and a speaker.
[0115] The electronic device provided in this application embodiment can deploy proxy nodes to enable timely and effective communication between nodes, ensuring the immediacy and accuracy of data information exchange while also ensuring the security of blockchain nodes.
[0116] The thermal imaging image enhancement apparatus, medium, and electronic device provided in the above embodiments can execute the thermal imaging image enhancement method provided in any embodiment of this application, and have the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in the above embodiments can be found in the thermal imaging image enhancement method provided in any embodiment of this application.
[0117] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A method of enhancing a thermographic image, characterized by, The method includes: Acquire the raw thermal imaging image, and preprocess the raw image to obtain the image to be processed; Extract the target region from the image to be processed; wherein, the target region is the region of interest where a moving object is located in the image to be processed; Obtain the second histogram information of the target region in the image to be processed and the first histogram information of the target region in the original image; If the second histogram information does not meet the preset conditions, an initial mapping curve is generated based on the first histogram information; The mapping result is obtained by mapping the first histogram information of the target region in the original image with the initial mapping curve, and the brightness information of the target region in the mapping result is calculated. If the brightness information does not conform to the preset brightness range, then the brightness adjustment coefficient is determined based on the brightness information and the preset brightness range; The mapping parameters of the initial mapping curve are adjusted using the brightness adjustment coefficient to obtain the final mapping curve; After obtaining the final mapping curve, the method further includes: Determine the current frame of the original image in the thermal imaging video, and the curve transformation step size; Starting from the current frame, the effective curve of the target area image of the thermal imaging video is calculated frame by frame using the transformation step size; The target region image is mapped frame by frame using the effective curve until the final mapping curve is reached.
2. The method of claim 1, wherein, The mapping result is obtained by mapping the first histogram information of the target region in the original image using the initial mapping curve, and the brightness information of the target region in the mapping result is calculated, including: The first histogram information of the target region in the original image is mapped using the initial mapping curve to obtain the mapping result, and the average brightness information of the target region in the mapping result is calculated.
3. The method of claim 1, wherein, Determining the brightness adjustment coefficient based on the brightness information and the preset brightness range includes: Determine the preset average brightness value based on the preset brightness range; The ratio of the preset average brightness value to the brightness information is used as the brightness adjustment coefficient.
4. The method according to any one of claims 1 to 3, characterized in that, The initial mapping curve is generated based on histogram equalization combined with probability density curves.
5. An apparatus for enhancing a thermographic image, characterized by The device includes: The image preprocessing module is used to acquire the raw image of thermal imaging and preprocess the raw image to obtain the image to be processed. The target region extraction module is used to extract the target region in the image to be processed; wherein, the target region is the region of interest where a moving object is located in the image to be processed; The histogram information acquisition module is used to acquire the second histogram information of the target region in the image to be processed and the first histogram information of the target region in the original image; The initial mapping curve determination module is used to generate an initial mapping curve based on the first histogram information if the second histogram information does not meet the preset conditions. The mapping parameter adjustment module is used to process the mapping result obtained by mapping the first histogram information of the target region in the original image with the initial mapping curve, and to calculate the brightness information of the target region in the mapping result; If the brightness information does not conform to the preset brightness range, then the brightness adjustment coefficient is determined based on the brightness information and the preset brightness range; The mapping parameters of the initial mapping curve are adjusted using the brightness adjustment coefficient to obtain the final mapping curve; The mapping parameter adjustment module is further configured to: After obtaining the final mapping curve, determine the current frame of the original image in the thermal imaging video, as well as the curve transformation step size; Starting from the current frame, the effective curve of the target area image of the thermal imaging video is calculated frame by frame using the transformation step size; The target region image is mapped frame by frame using the effective curve until the final mapping curve is reached.
6. A computer-readable storage medium having stored thereon a computer program, characterized in that, When executed by a processor, the program implements the method for enhancing thermal imaging images as described in any one of claims 1-4.
7. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method for enhancing thermal imaging images as described in any one of claims 1-4.