A method for dynamic range compression of infrared images
Through the two-level mapping method, combined with the platform histogram equalization and linear dynamic compression algorithm, dynamic range compression of infrared images is performed, solving the problems of image information loss and details loss, and achieving efficient image compression and contrast enhancement.
Patent Information
- Application Number
- CN202210322203.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-29
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2042-03-29
AI Technical Summary
When the existing infrared image dynamic range compression method is used to process high dynamic range infrared images, it often leads to loss of image information, especially the lack of details of the target area.
Using the two-level mapping method, firstly, firstly, first-level compression is performed through the platform histogram equalization algorithm to obtain the first-level mapping histogram image, and then second-level compression is performed on the histogram image based on the linear dynamic compression algorithm to obtain the second-level mapping histogram image.
It effectively reduces image flicker, enhances local contrast, takes into account imaging quality and efficiency, and is suitable for parallel processing and FPGA terminal transplantation.
Smart Images

Figure CN114677451B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of infrared image processing, and in particular to a method for compressing the dynamic range of an infrared image. Background Art
[0002] As infrared thermal imaging technology matures, users have higher and higher requirements for the imaging quality of thermal imagers. The output signal of infrared detectors is usually 14bit or 16bit, while display devices can generally only display 8bit images, so it is necessary to compress the dynamic range of infrared images. There are two common dynamic range compression methods: linear mapping and nonlinear mapping. When the dynamic range of infrared images is large and the proportion of invalid gray levels is large, the effective gray levels are small after linear mapping, and the image information is seriously lost. Nonlinear mapping usually uses histogram equalization and its improved algorithm to perform tone mapping according to the probability distribution of image gray levels. The contrast of gray levels with a large proportion is stretched, and the contrast of gray levels with a small proportion is compressed. In infrared images, the gray levels of the background area are relatively concentrated, and the targets are usually small and have fewer gray levels. Histogram mapping can better display the layers of the background area of the image, but targets with less gray levels often lack details. Summary of the invention
[0003] In view of the above problems, the present invention is proposed to provide an infrared image dynamic range compression method that overcomes the above problems or at least partially solves the above problems.
[0004] In order to solve the above technical problems, the embodiment of the present application discloses the following technical solution: providing an infrared image dynamic range compression method, comprising:
[0005] S100. Obtain a high dynamic range infrared image I output by the infrared detector src ;
[0006] S200. Use platform histogram equalization algorithm to process infrared image I src Perform first-level compression to obtain the first-level mapped histogram image I0 dst ;
[0007] S300. Based on the linear dynamic compression algorithm and the histogram mapping image I0 dst Perform secondary compression to obtain the secondary mapped histogram image I dst .
[0008] Preferably, S200 specifically includes:
[0009] For infrared image I src Processing is performed to obtain a platform histogram mapping table nPlatHistMapTable;
[0010] Traverse each pixel value in the high dynamic range infrared image, bring each pixel value into the platform histogram mapping table nPlatHistMapTable for table lookup, and obtain the first-level mapped histogram mapping image I0 dst .
[0011] Preferably, the infrared image I src After processing, the platform histogram mapping table nPlatHistMapTable is obtained, which includes:
[0012] For high dynamic range infrared images src Calculate and obtain the infrared image grayscale histogram nHist;
[0013] For infrared image I src The number of occurrences of each gray level is counted, and the histogram length is nHistLen;
[0014] According to the preset platform threshold nPlatThr, the first formula is used to limit the infrared image grayscale histogram nHist to obtain the platform histogram nPlatHist;
[0015] According to the platform histogram nPlatHist, the cumulative histogram nPlatHistCum is calculated using the second formula;
[0016] The third formula is used to perform equalization processing on the cumulative histogram nPlatHistCum to obtain the platform histogram mapping table nPlatHistMapTable.
[0017] Preferably, the cumulative histogram nPlatHistCum is equalized using the third formula, and the third formula is:
[0018]
[0019] Among them, nPlatHistMapTable is the platform histogram mapping table, and nPlatHistCum is the cumulative histogram.
[0020] Preferably, S300 includes:
[0021] Construct a local image block centered on each pixel;
[0022] Based on the local image block, local linear mapping is performed to obtain the histogram mapping image I of the secondary mapping. dst .
[0023] Preferably, before constructing the local image block with each pixel as the center, the method further includes:
[0024] Get the boundary line of the image and the boundary pixels at a set distance from the boundary line;
[0025] Each boundary pixel is mapped with its corresponding boundary line as the symmetry line to expand the boundary of the image and ensure that there is no crossing of the boundary when dividing the boundary pixels into blocks.
[0026] Preferably, local linear mapping is performed based on the local image block to obtain a secondary mapped histogram image I dst include:
[0027] Traverse each pixel in the image, take the local image block according to the preset size with the pixel as the center, and calculate the mean value nAve(i,j) of the current image block;
[0028] Perform block-by-block linear mapping on the current image block mean nAve(i,j) to obtain the secondary mapped histogram image I dst .
[0029] Preferably, based on the linear dynamic compression algorithm and the histogram map image I0 dst Perform secondary compression to obtain the secondary mapped histogram image I dst include:
[0030] The histogram image I0 is compressed using a linear dynamic compression algorithm. dst Perform secondary compression to obtain the secondary mapped histogram image I dst ;or,
[0031] The linear dynamic compression algorithm is used to compress the high dynamic range infrared image src Linear compression is used to obtain a linearly compressed image. The linearly compressed image is used to map the image I0 to its histogram. dst Compensate and get the histogram map image I dst .
[0032] Preferably, a high dynamic range infrared image I output by the infrared detector is obtained. src , High Dynamic Range Infrared Image I src 14bit or 16bit.
[0033] Furthermore, the present invention also discloses an electronic device, comprising:
[0034] a memory for storing instructions executable by a processor;
[0035] A processor is configured to execute the instructions to implement any of the methods described above.
[0036] The beneficial effects of the above technical solution provided by the embodiment of the present invention include at least:
[0037] The present invention discloses an infrared image dynamic range compression method, comprising:
[0038] Get the high dynamic range infrared image I output by the infrared detector src ; Use platform histogram equalization algorithm to process infrared image I src Perform first-level compression to obtain the first-level mapped histogram image I0 dst ; Use linear dynamic compression algorithm to histogram map image I0 dst Perform secondary compression to obtain the secondary mapped histogram image I dst .
[0039] In the present invention, the first level mapping is performed by the platform histogram, and then the second level mapping is performed by linear dynamic compression. The two-level mapping method can effectively reduce image flicker. Moreover, the local area usually has a small dynamic range, a relatively low proportion of invalid gray levels, and the linear mapping speed is the fastest. The use of linear mapping to enhance local contrast can take into account both imaging quality and efficiency.
[0040] Furthermore, the present invention performs block processing with each pixel as the center, and the calculations of different pixels are independent of each other, which is suitable for parallel processing and transplantation on the FPGA side.
[0041] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0043] Figure 1 This is a flow chart of a method for compressing dynamic range of infrared images in Embodiment 1 of the present invention;
[0044] Figure 2 This is a flow chart of a method for compressing dynamic range of infrared images in Embodiment 2 of the present invention. DETAILED DESCRIPTION
[0045] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0046] In order to solve the problems existing in the prior art, an embodiment of the present invention provides an infrared image dynamic range compression method.
[0047] Embodiment 1:
[0048] This embodiment provides an infrared image dynamic range compression method, including:
[0049] S100. Obtain a high dynamic range infrared image I output by the infrared detector src ;
[0050] S200. Use platform histogram equalization algorithm to process infrared image I src Perform first-level compression to obtain the first-level mapped histogram image I0 dst ;
[0051] S300. Based on the linear dynamic compression algorithm and the histogram mapping image I0 dst Perform secondary compression to obtain a secondary mapped histogram image Idst.
[0052] In this embodiment, S200 specifically includes:
[0053] For infrared image I src Processing is performed to obtain a platform histogram mapping table nPlatHistMapTable; in an optional solution, the high dynamic range infrared image I src Calculate and get the infrared image grayscale histogram nHist; src The number of occurrences of each gray level is counted, and the histogram length nHistLen is obtained; according to the preset platform threshold nPlatThr, the first formula is used to limit the infrared image gray histogram nHist to obtain the platform histogram nPlatHist; according to the platform histogram nPlatHist, the second formula is used to calculate the cumulative histogram nPlatHistCum; the third formula is used to equalize the cumulative histogram nPlatHistCum to obtain the platform histogram mapping table nPlatHistMapTable. The first formula, the second formula, and the third formula are described in detail below.
[0054] In actual application scenarios, when the grayscale distribution in the image is relatively concentrated, histogram equalization can easily cause excessive contrast enhancement and loss of details. Platform histogram equalization limits the number of pixels in the grayscale histogram by presetting the platform threshold, reducing the proportion of grayscale values with higher frequency in the cumulative histogram and increasing the proportion of grayscale values with lower frequency, thereby suppressing background noise and reducing information loss.
[0055] Furthermore, each pixel value in the high dynamic range infrared image is traversed, and each pixel value is brought into the platform histogram mapping table nPlatHistMapTable for table lookup to obtain the first-level mapped histogram mapping image I0 dst .
[0056] The above mainly describes the use of platform histogram equalization algorithm to perform global mapping on infrared images. The histogram equalization algorithm selectively expands the dynamic range of high-frequency gray levels, compresses the dynamic range of low-frequency gray levels, and changes the grayscale histogram of the image to an approximately uniform distribution, thereby enhancing the image contrast.
[0057] The following describes a scheme for performing secondary compression of infrared images based on a linear dynamic range compression algorithm. In an optional scheme, the histogram mapping image I0 dst As a data source for secondary compression, S300 specifically includes: using histogram mapping image I0 dst A local image block is constructed with each pixel in as the center; local linear mapping is performed based on the local image block to obtain a secondary mapped histogram mapping image Idst, where the size of the local image block is (2*w+1)*(2*w+1), and w is 3 by default.
[0058] In an optional embodiment, each pixel in the image is traversed, and a local image block is taken according to a preset size with the pixel as the center, and the mean value nAve(i, j) of the current image block is counted; according to the obtained histogram mapping image I0 dst and the current image block mean nAve(i,j), use the fifth formula to perform block linear mapping to obtain the secondary mapped histogram mapping image Idst. The fifth formula is:
[0059] I dst (i,j)=nContrast*(I0 dst (i,j)-nAve(i,j))
[0060] Among them, I dst (i, j) is the histogram mapping image of the secondary mapping, nContrast is the manually set local linear mapping contrast expectation, and when nContrast is greater than 1, the image contrast is enhanced, and when nContrast is between (0, 1), the image contrast is suppressed.
[0061] In this embodiment, the first level mapping is performed by the platform histogram, and then the second level mapping is performed by linear dynamic compression. The two-level mapping method can effectively reduce image flicker. Moreover, the local area usually has a small dynamic range, a relatively low proportion of invalid gray levels, and the linear mapping speed is the fastest. The use of linear mapping to enhance local contrast can take into account both imaging quality and efficiency.
[0062] In actual application scenarios, during the block processing, pixels located at the boundary are prone to cross the boundary during the block processing. In order to solve the above problem, before constructing the local image block with each pixel as the center, the method further includes: obtaining the histogram map image I0 dstThe boundary line and the boundary pixels at the set distance from the boundary line; each boundary pixel is mapped with its corresponding boundary line as the symmetry line to map the histogram image I0 dst Boundary expansion is performed to ensure that there is no cross-border when boundary pixels are divided into blocks.
[0063] The above-mentioned image I0 is directly mapped to the histogram dst As an implementation method for performing secondary compression on the data source, some details will be lost. In order to avoid the above situation, in a preferred embodiment, a linear dynamic compression algorithm is used to compress the high dynamic range infrared image I src Perform linear compression to obtain a linear compressed image, and use the linear compressed image to map the histogram image I0 dst Compensate and get the histogram map image I dst .
[0064] Specifically, the infrared image I src A local image block is constructed with each pixel in as the center; local linear mapping is performed based on the local image block to obtain a secondary mapped histogram mapping image Idst, where the size of the local image block is (2*w+1)*(2*w+1), and w is 3 by default.
[0065] In an optional embodiment, traversing the infrared image I src For each pixel in the image, take the pixel as the center, take a local image block according to the preset size, and count the mean value nAve(i,j) of the current image block; according to the high dynamic range infrared image I src The block-by-block linear mapping is performed with the current image block mean nAve(i,j) to obtain a linearly compressed image. The histogram mapping image I0 is obtained by the linearly compressed image. dst Compensation is performed to obtain a secondary mapped histogram image Idst. The secondary mapping is specifically performed according to the following formula:
[0066] I dst (i,j)=nContrast*(I src (i,j)-nAve)+I0 dst (i,j)
[0067] Among them, I dst (i, j) is the histogram mapping image of the secondary mapping, nContrast is the manually set local linear mapping contrast expectation, and when nContrast is greater than 1, the image contrast is enhanced, and when nContrast is between (0, 1), the image contrast is suppressed.
[0068] The present embodiment discloses a method for dynamic range compression of infrared images. Compared with linear mapping and platform histogram mapping, the obtained infrared images contain richer information, have higher local contrast, and provide better visual experience. The present embodiment is not only applicable to infrared images, but also to infrared videos. Usually, block processing of infrared videos will inevitably cause obvious image flickering. The two-level mapping method is adopted to effectively reduce image flickering. The present embodiment is not only applicable to dynamic range compression of infrared images, but also to contrast enhancement of 8-bit / 14-bit / 16-bit high dynamic range images after adjusting the algorithm. The present embodiment performs block processing with each pixel as the center, and the calculations of different pixels are independent of each other, which is suitable for parallel processing and transplantation on the FPGA side.
[0069] Example 2
[0070] Based on the above-mentioned embodiment 1, this embodiment discloses another infrared image dynamic range compression method, such as Figure 2 ,include:
[0071] S100. Obtain a high dynamic range infrared image I output by the infrared detector src In this embodiment, the infrared image is an electrical signal output by the infrared detector, which can be directly obtained by the infrared detector. The infrared detector output signal is usually 14-bit or 16-bit, while the display device can generally only display 8-bit images, so the infrared image needs to be compressed in dynamic range.
[0072] S200. Infrared image I src The number of occurrences of each gray level is counted, and the histogram length is nHistLen. Specifically, histogram statistics is a basic method of image processing. The histogram allows you to understand the overall image pixel intensity distribution. The X-axis is the pixel value (generally ranging from 0 to 255), and the Y-axis is the number of pixels with this pixel value in the image.
[0073] S300. According to the preset platform threshold nPlatThr, the first formula is used to limit the grayscale histogram of the infrared image to obtain the platform histogram nPlatHist; specifically, in this embodiment, the first formula for obtaining the histogram length nPlatHist is:
[0074]
[0075] Where i represents the gray level of the high dynamic range infrared image.
[0076] S400. According to the platform histogram nPlatHist, the cumulative histogram nPlatHistCum is calculated using the second formula; in S400 of the present embodiment, the second formula for calculating the cumulative histogram nPlatHistCum is:
[0077]
[0078] Among them, nPlatHist is the platform histogram, and nPlatHistCum is the cumulative histogram.
[0079] S500. The cumulative histogram nPlatHistCum is equalized using the third formula to obtain a platform histogram mapping table nPlatHistMapTable; in S500 of this embodiment, the histogram equalization formula is:
[0080]
[0081] Among them, nPlatHistMapTable is the platform histogram mapping table, and nPlatHistCum is the cumulative histogram.
[0082] S600. Traversing high dynamic range infrared image I src Each pixel value in the histogram mapping table nPlatHistMapTable is brought into the table for lookup to obtain the first-level mapped histogram mapping image I0 dst ; Specifically, the table lookup formula is:
[0083] I0 dst (i,j)=nPlatHistMapTable(I src (i,j))
[0084] Among them, nPlatHistMapTable is the platform histogram mapping table, I0 dst A histogram image of the first-level map.
[0085] S700. Map the histogram image I0 in a boundary mirroring manner dst Boundary extension processing is performed to ensure that there is no cross-border when the image boundary pixels are divided into blocks; specifically, boundary extension is a basic method of image processing, and the extension methods include the closest pixel copy extension, boundary pixel mirroring, boundary flipping and constant filling, etc. This embodiment uses the boundary mirroring method.
[0086] S800. Traverse each pixel in the image, take the pixel as the center, take a local image block of a preset size, and use the fourth formula to calculate the mean value nAve(i,j) of the current image block; in this embodiment, the size of the local image block is (2*w+1)*(2*w+1), and w defaults to 3.
[0087] In S800 of this embodiment, the fourth formula is used to calculate the mean value nAve(i,j) of the current image block. The fourth formula is:
[0088] Among them, nAve(i,j) is the mean value of the current image block, I0 dst (m, n) is the histogram map image.
[0089] S900. Map the image I0 according to the obtained histogram dst and the current image block mean nAve(i,j), use the fifth formula to perform block linear mapping to obtain the secondary mapped histogram mapping image I dst .
[0090] In S900 of this embodiment, the fifth formula is used to perform block linear mapping to obtain a secondary mapped histogram mapping image I dst , the fifth formula is:
[0091] I dst (i,j)=nContrast*(I0 dst (i,j)-nAve(i,j))
[0092] Among them, I dst (i, j) is the histogram mapping image of the secondary mapping, nContrast is the manually set local linear mapping contrast expectation, and when nContrast is greater than 1, the image contrast is enhanced, and when nContrast is between (0, 1), the image contrast is suppressed.
[0093] The present embodiment discloses an infrared image dynamic range compression method, comprising: obtaining a high dynamic range infrared image output by an infrared detector; counting the number of occurrences of each gray level of the infrared image, and obtaining a histogram length of; limiting the gray level histogram of the infrared image according to a preset platform threshold value to obtain a platform histogram; calculating a cumulative histogram according to the platform histogram; performing equalization processing on the cumulative histogram to obtain a platform histogram mapping table; traversing each pixel value in the high dynamic range infrared image, bringing each pixel value into a histogram mapping table for table lookup, and obtaining a histogram mapping image of a primary mapping; performing boundary extension processing on the histogram mapping image in a boundary mirroring manner to ensure that no crossing of the boundary occurs when dividing the image boundary pixels into blocks; traversing each pixel in the image, taking the pixel as the center, taking a local image block according to a preset size, and using the fourth formula to count the average value of the current image block; performing block linear mapping according to the obtained histogram mapping image and the average value of the current image block to obtain a histogram mapping image of a secondary mapping.
[0094] Compared with linear mapping and platform histogram mapping, the infrared image obtained in this embodiment contains richer information, has higher local contrast, and gives people a better visual experience. This embodiment is not only applicable to infrared images, but also to infrared videos. Usually, block processing of infrared videos will inevitably cause obvious image flickering. The two-level mapping method is adopted to effectively reduce image flickering. This embodiment is not only applicable to infrared image dynamic range compression, but also to 8bit / 14bit / 16bit high dynamic range image contrast enhancement after adjusting the algorithm. This embodiment performs block processing with each pixel as the center, and the calculations of different pixels are independent of each other, which is suitable for parallel processing and transplantation on the FPGA side.
[0095] Example 3
[0096] The present invention also discloses an electronic device, comprising: a memory for storing instructions executable by a processor; and a processor configured to execute the instructions to implement the methods described in Embodiment 1 and Embodiment 2.
[0097] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process can be rearranged without departing from the scope of protection of the present disclosure. The attached method claims present the elements of the various steps in an exemplary order and are not intended to be limited to the specific order or hierarchy described.
[0098] In the above detailed description, various features are grouped together in a single embodiment to simplify the disclosure. This method of disclosure should not be interpreted as reflecting an intention that the embodiments of the claimed subject matter require more features than are clearly stated in each claim. On the contrary, as reflected in the appended claims, the invention is in a state of having less than all the features of the disclosed individual embodiments. Therefore, the appended claims are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.
[0099] Those skilled in the art will also appreciate that the various illustrative logic blocks, modules, circuits, and algorithmic steps described in conjunction with the embodiments herein can all be implemented as electronic hardware, computer software, or a combination thereof. In order to clearly illustrate the interchangeability between hardware and software, various illustrative components, blocks, modules, circuits, and steps are generally described above around their functions. Whether such functions are implemented as hardware or software depends on specific applications and the design constraints imposed on the entire system. A skilled person can implement the described functions in an alternative manner for each specific application, but such implementation decisions should not be interpreted as departing from the scope of protection of the present disclosure.
[0100] The steps of the method or algorithm described in conjunction with the embodiments herein may be directly embodied as hardware, a software module executed by a processor, or a combination thereof. The software module may be located in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a mobile disk, a CD-ROM, or any other form of storage medium well known in the art. An exemplary storage medium is connected to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium may also be an integral part of the processor. The processor and the storage medium may be located in an ASIC. The ASIC may be located in a user terminal. Of course, the processor and the storage medium may also be present in a user terminal as discrete components.
[0101] For software implementation, the techniques described in this application can be implemented with modules (e.g., procedures, functions, etc.) that perform the functions described in this application. These software codes can be stored in a memory unit and executed by a processor. The memory unit can be implemented within the processor or outside the processor. In the latter case, it is coupled to the processor in a communication manner via various means, which are well known in the art.
[0102] The above description includes examples of one or more embodiments. Of course, it is impossible to describe all possible combinations of components or methods for the purpose of describing the above embodiments, but it should be recognized by those skilled in the art that the various embodiments may be further combined and arranged. Therefore, the embodiments described herein are intended to cover all such changes, modifications and variations that fall within the scope of protection of the appended claims. In addition, with respect to the term "comprising" used in the specification or claims, the word is covered in a manner similar to the term "including", just as "including," is explained as a transitional word in the claims. In addition, any term "or" used in the specification of the claims is intended to mean "non-exclusive or".
Claims
1. A method for compressing the dynamic range of an infrared image, characterized in that: include: S100. Obtain a high dynamic range infrared image I output by the infrared detector src ; S200. Use platform histogram equalization algorithm to process infrared image I src Perform first-level compression to obtain the first-level mapped histogram image I0 dst ; S200 specifically includes: For infrared image I src Processing is performed to obtain a platform histogram mapping table nPlatHistMapTable; Traverse each pixel value in the high dynamic range infrared image, bring each pixel value into the platform histogram mapping table nPlatHistMapTable for table lookup, and obtain the first-level mapped histogram mapping image I0 dst ; For infrared image I src After processing, the platform histogram mapping table nPlatHistMapTable is obtained, which specifically includes: For high dynamic range infrared images src Calculate and obtain the infrared image grayscale histogram nHist; For infrared image I src The number of occurrences of each gray level is counted, and the histogram length is nHistLen; According to the preset platform threshold nPlatThr, the infrared image grayscale histogram nHist is limited by the first formula to obtain the platform histogram nPlatHist; the first formula is: Wherein, nPlatThr is the preset platform threshold, nHist is the grayscale histogram of the infrared image, nPlatHist is the platform histogram, and i represents the grayscale level of the high dynamic range infrared image; According to the platform histogram nPlatHist, the cumulative histogram nPlatHistCum is calculated using the second formula; the second formula is: Among them, nPlatHist is the platform histogram, and nPlatHistCum is the cumulative histogram; The third formula is used to perform equalization processing on the cumulative histogram nPlatHistCum to obtain the platform histogram mapping table nPlatHistMapTable; The third formula is: Among them, nPlatHistMapTable is the platform histogram mapping table, nHistLen is the histogram length, and nPlatHistCum is the cumulative histogram; S300. Based on the linear dynamic compression algorithm and the histogram mapping image I0 dst Perform secondary compression to obtain the secondary mapped histogram image I dst .
2. The infrared image dynamic range compression method according to claim 1, characterized in that: S300 includes: Construct a local image block centered on each pixel; Based on the local image block, local linear mapping is performed to obtain the histogram mapping image I of the secondary mapping. dst .
3. The infrared image dynamic range compression method according to claim 2, characterized in that: Before constructing a local image block centered on each pixel, the following steps are also included: Get the boundary line of the image and the boundary pixels at a set distance from the boundary line; Each boundary pixel is mapped with its corresponding boundary line as the symmetry line to expand the boundary of the image and ensure that there is no crossing of the boundary when dividing the boundary pixels into blocks.
4. The infrared image dynamic range compression method according to claim 2, characterized in that: Based on the local image block, local linear mapping is performed to obtain the histogram mapping image I of the secondary mapping. dst include: Traverse each pixel in the image, take the local image block according to the preset size with the pixel as the center, and calculate the mean value nAve(i,j) of the current image block; Perform block-by-block linear mapping on the current image block mean nAve(i,j) to obtain the secondary mapped histogram image I dst .
5. The infrared image dynamic range compression method according to claim 1, characterized in that: Based on the linear dynamic compression algorithm and the histogram mapping image I0 dst Perform secondary compression to obtain the secondary mapped histogram image I dst include: The histogram image I0 is compressed using a linear dynamic compression algorithm. dst Perform secondary compression to obtain the secondary mapped histogram image I dst ;or, The linear dynamic compression algorithm is used to compress the high dynamic range infrared image src Linear compression is used to obtain a linearly compressed image. The linearly compressed image is used to map the image I0 to its histogram. dst Compensate and get the histogram map image I dst .
6. The infrared image dynamic range compression method according to claim 1, characterized in that: Get the high dynamic range infrared image I output by the infrared detector src , High Dynamic Range Infrared Image I src 14bit or 16bit.
7. An electronic device, characterized in that: include: a memory for storing instructions executable by a processor; A processor configured to execute the instructions to implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Infrared image wide dynamic compression method
CN108805942A