FPGA implementation method, system, and terminal for real-time quantization of wide dynamic range infrared images

Through the combination method of low-pass filtering and piecewise linear stretching, the problems of complex FPGA implementation, slow speed, large resource consumption and non-configurable input size are solved, real-time quantification of wide dynamic range infrared images is achieved, and the real-time performance of the system is improved. and resource utilization efficiency.

CN113870153BActive Publication Date: 2024-10-15HUAZHONG UNIV OF SCI & TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111110153.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-18
Publication Date
2024-10-15
Estimated Expiration
2041-09-18

AI Technical Summary

Technical Problem

Existing FPGA implementation methods for quantification of wide dynamic range infrared images have problems such as complex implementation, slow speed, large resource consumption, and non-configurable input image size, making it difficult to effectively deploy in real-time and resource-limited environments.

Method used

Low-pass filtering is used to decompose the image into a background layer and a detail layer. The interception threshold is obtained through the interception threshold calculation module, and the background layer and detail layer are quantized to 8 bits through piecewise linear stretching. A single cycle is performed by combining amplification and truncation operations. Compute,supports variable window design to adapt to different image,sizes.

Benefits of technology

It simplifies algorithm implementation, speeds up processing, reduces resource consumption, and supports the input of different dynamic ranges and visible light images, improving the real-time performance and application breadth of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113870153B_ABST
    Figure CN113870153B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of image processing technology, and discloses an FPGA implementation method, system, and terminal for real-time quantization of infrared images with a wide dynamic range. The FPGA implementation method for real-time quantization of infrared images with a wide dynamic range includes: using low-pass filtering to decompose the original image into a background layer and a detail layer, obtaining the interception threshold of the background layer and the detail layer through an interception threshold calculation module, quantizing the background layer and the detail layer to 8 bits through a piecewise linear stretching method, and fusing the quantization results of the background layer and the detail layer with a certain proportional coefficient. The FPGA implementation method for real-time quantization of infrared images with a wide dynamic range of the present invention is simple to implement, fast, consumes less resources, has configurable quantization parameters, configurable image input size, few hyperparameters, supports infrared images with different dynamic ranges, and supports contrast enhancement and detail enhancement of low-contrast visible light input images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image processing, and in particular relates to an FPGA implementation method, system and terminal for real-time quantization of wide dynamic range infrared images. Background Art

[0002] At present, in optoelectronic devices, high-bitwidth infrared detectors can obtain richer image details due to their high sensitivity, low noise, and high dynamic range of output images. Usually, the image input of display devices or neural networks only requires 8-bit data width, so high-bitwidth image data needs to be compressed to 8-bit bit width.

[0003] At present, the main algorithms for infrared image quantization include linear mapping, piecewise linear mapping and nonlinear mapping (such as a series of methods based on histogram equalization), as well as quantization methods based on detail layering.

[0004] Directly applying dynamic range compression techniques such as linear mapping or histogram equalization to the original image can easily cause the loss of image detail information and fail to effectively highlight the texture features in the image. Although some improved techniques based on the histogram equalization method have improved the effect to a certain extent, the algorithm is difficult to implement in hardware, consumes a lot of resources, and has low real-time performance. In addition, when the image input is too large, it is difficult to implement due to the limited on-chip storage resource size.

[0005] The quantization method based on detail layering first divides the original image into background layer and detail layer image through a low-pass filter, then quantizes the background layer and the background layer image to 8 bits respectively, and finally fuses the quantized background layer and detail layer image through a certain coefficient. The existing FPGA implementation of wide dynamic range infrared image quantization algorithm based on detail layering has the disadvantages of complex implementation, slow speed, high resource consumption, and non-configurable input image size.

[0006] Through the above analysis, the problems and defects of the existing technology are as follows: the existing FPGA implementation method is complex to implement, slow, consumes a lot of resources, and the input image size cannot be configured.

[0007] The difficulty of solving the above problems and defects is:

[0008] 1. The problem of complex implementation of existing FPGA quantization algorithms: Some of the latest infrared image algorithms based on detail stratification use filters with edge-preserving effects such as bilateral filters or guided filters in the detail stratification stage. However, bilateral filters involve a large number of multiplications, divisions and exponential operations, which are not conducive to FPGA implementation from the perspective of time and resources. In addition, they have many hyperparameters, and the process of adjusting hyperparameters in actual applications is complex and cumbersome. Guided filters also involve a large number of multiplications, divisions and the adjustment of a few hyperparameters.

[0009] 2. Regarding the slow speed problem: In the low-pass filtering stage, using a larger filter template requires more image rows to be cached, resulting in greater delays. In addition, due to the limitations of the algorithm itself, parallelization and pipelining are difficult to implement.

[0010] 3. Regarding the problem of high resource consumption: When quantizing high dynamic range images to 8 bits, nonlinear quantization algorithms such as histogram equalization or gamma transform require a large amount of on-chip storage resources or lookup table resources. The conventional segmented linear stretching threshold selection method based on histogram statistics requires the statistics of the histogram of the entire image, which also consumes a large amount of on-chip resources. When the image size or grayscale range is too large, the algorithm cannot be implemented on the FPGA due to the limitation of on-chip resources.

[0011] 4. The difficulty in achieving configurable image input size lies in how to implement the sliding window module of the variable window.

[0012] The significance of solving the above problems and defects is:

[0013] 1. Reducing the implementation complexity of the quantization algorithm can quickly promote and apply the algorithm and reduce the difficulty of operation during use.

[0014] 2. Speed ​​up the processing speed of the quantization algorithm. The algorithm can be applied to situations with high real-time requirements. Speed ​​up the system response speed.

[0015] 3. Reducing resource consumption can enable the algorithm to be deployed on resource-constrained platforms, making the algorithm more widely applicable. At the same time, it can effectively reduce application costs and system power consumption.

[0016] 4. The significance of making the image input size configurable is that after the quantization module is encapsulated into IP, the image size parameters of the quantization module can be configured through the parameter configuration interface to meet the application requirements of inputting images of different sizes. The image size parameters of the module can also be configured online to meet the module's time-sharing multiplexing requirements for images of different sizes. Summary of the invention

[0017] In view of the problems existing in the prior art, the present invention provides a method, system and terminal for realizing FPGA of real-time quantization of infrared images with a wide dynamic range.

[0018] The present invention is implemented as follows: a method for implementing wide dynamic range infrared image real-time quantization FPGA, the method comprising:

[0019] The original image is decomposed into a background layer and a detail layer by using a low-pass filter. The interception threshold of the background layer and the detail layer is obtained by the interception threshold calculation module. The background layer and the detail layer are quantized to 8 bits by piecewise linear stretching. The quantized results of the background layer and the detail layer are fused with a certain proportional coefficient.

[0020] Furthermore, the FPGA implementation method for real-time quantization of dynamic range infrared images includes the following steps:

[0021] Step 1: Obtain an infrared image, and use shift ram to perform window processing on the acquired infrared image to obtain a 3X3 filter window and calculate the mean;

[0022] Step 2: Subtract the original image from the background layer component pixel by pixel to obtain the detail layer component; calculate the low, medium and high interception thresholds of the piecewise linear stretching; and perform piecewise linear stretching on the input image according to the obtained interception thresholds;

[0023] Step three, the background layer image and the detail layer image are fused according to a certain ratio coefficient, and the enlarged set truncation method is used for single-cycle calculation to obtain an approximate division result.

[0024] Further, in step 1, the windowing process of the acquired infrared image using shift ram to obtain a 3×3 filter window includes:

[0025] Select the Variable Length Lossless configuration mode when instantiating the shift ram IP, and use external parameter configuration to match inputs of different image sizes;

[0026] After obtaining the 3X3 filter window value, the divider IP is replaced by amplification combined with truncation operation to perform single-cycle calculation to obtain an approximate division result.

[0027] Furthermore, the subtracting the original image from the background layer component pixel by pixel to obtain the detail layer component includes: adding 1 / 2 of the image dynamic range to the result pixel by pixel, and adjusting the gray value of each pixel to a positive number.

[0028] Furthermore, the calculation of the low, medium and high clipping thresholds of the piecewise linear stretching includes: the calculation result of the quantization parameter of the piecewise linear stretching process of the current image, that is, the clipping threshold of the previous frame image.

[0029] Further, the calculation of the interception threshold of the piecewise linear stretching includes:

[0030] The grayscale distribution of the image is approximately regarded as a normal distribution. The mean and standard deviation of the image are statistically analyzed, and the interception threshold of the piecewise linear stretching is obtained according to different parametric parameters.

[0031] Furthermore, the calculating of the interception threshold of the piecewise linear stretching also includes: the interception threshold of the piecewise linear stretching can be adjusted by external configuration.

[0032] Further, performing piecewise linear stretching on the input image according to the acquired interception threshold comprises:

[0033] Pixels smaller than the low-order interception threshold are quantized to 0, pixels from the low-order interception threshold to the middle-order interception threshold are quantized to 0-127, pixels from the middle-order interception threshold to the high-order interception threshold are quantized to 128-255, and pixels greater than the high-order interception threshold are quantized to 255.

[0034] Another object of the present invention is to provide a dynamic range infrared image real-time quantization FPGA implementation system for implementing the dynamic range infrared image real-time quantization FPGA implementation method, the dynamic range infrared image real-time quantization FPGA implementation system comprising:

[0035] Background detail separation module, used to perform windowing on the input infrared image to obtain a 3X3 filter window and calculate the mean;

[0036] The detail layer component acquisition module is used to subtract the original image from the background layer component pixel by pixel to obtain the detail layer component.

[0037] A parallel computing module, used for simultaneously performing background layer interception threshold calculation, background layer piecewise linear stretching, detail layer interception threshold calculation and detail layer piecewise linear stretching;

[0038] The fusion module is used to fuse the background layer image and the detail layer image according to a certain ratio coefficient, and use magnification combined with truncation to perform single-cycle calculation to obtain an approximate division result.

[0039] Another object of the present invention is to provide an information data processing terminal, which includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the FPGA implementation method for real-time quantization of dynamic range infrared images.

[0040] Combining all the above technical solutions, the advantages and positive effects of the present invention are as follows:

[0041] The present invention is simple to implement, fast, consumes less resources, has configurable quantization parameters, configurable image input size, few hyperparameters, supports infrared images with different dynamic ranges, and supports contrast enhancement and detail enhancement of low-contrast visible light input images.

[0042] In the low-pass filtering process, the present invention directly uses a mean filter to reduce the difficulty of FPGA implementation, and avoids the process of parameter adjustment, so the actual application process is simpler and more convenient. In order to reduce the artifact problem caused by the use of a mean filter on the final generated image, the present invention uses a 3X3 small filter template to layer the original image in detail, while extracting details, it minimizes the impact of artifacts on imaging quality.

[0043] In the low-pass filtering process, the present invention adopts a 3X3 small filter template to replace the filter of the large template, thereby reducing the number of image lines that need to be cached in advance during the windowing process and reducing the image cache delay. At the same time, the present invention improves the real-time performance of the quantization process by performing four steps in parallel: background layer interception threshold calculation, detail layer interception threshold calculation, background layer piecewise linear stretching, and detail layer piecewise linear stretching; and further improves the real-time performance of the quantization process by implementing global pipelining of the four steps of separating the background layer from the detail layer, quantizing, and fusing.

[0044] In the quantization process, the present invention adopts a piecewise linear stretching interception method of the mean standard deviation to replace the piecewise linear stretching interception threshold selection method based on histogram statistics. Since the calculation process of the mean and standard deviation does not require consumption of additional storage resources, the problem of high resource consumption of conventional quantization algorithms can be solved.

[0045] The quantization parameters of the present invention can be configured externally to perform dimming processing for different application scenarios. At the same time, the dimming parameters only include brightness and contrast, and there are fewer super parameters.

[0046] In the low-pass filtering process, the present invention can realize the input of infrared images of different sizes through the variable sliding window design. The present invention supports the input of infrared images with different dynamic ranges and is compatible with the input of visible light images, solving the problem of low contrast and unclear details of visible light images. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a diagram of a real-time quantization method for wide dynamic range infrared images based on detail layering provided in an embodiment of the present invention.

[0048] Figure 2 The present invention provides an FPGA block diagram of a wide dynamic range infrared image real-time quantization algorithm based on detail layering provided in an embodiment of the present invention.

[0049] Figure 3 The present invention provides a flowchart of a method for implementing a wide dynamic range infrared image real-time quantization FPGA.

[0050] Figure 4 It is a schematic diagram of the structure of a wide dynamic range infrared image real-time quantization FPGA implementation system provided by an embodiment of the present invention;

[0051] In the figure: 1. Background detail separation module; 2. Detail layer component acquisition module; 3. Parallel computing module; 4. Fusion module.

[0052] Figure 5 It is a block diagram of a background detail separation module provided by an embodiment of the present invention.

[0053] Figure 6 It is a block diagram of a sliding window module provided by an embodiment of the present invention.

[0054] Figure 7 This is an example diagram of an input image timing diagram provided by an embodiment of the present invention.

[0055] Figure 8 This is a working delay diagram of the quantization module provided by an embodiment of the present invention.

[0056] Fig. 9 This is a diagram of hardware resource consumption of a quantization module provided in an embodiment of the present invention.

[0057] Fig.10 It is a visual comparison diagram of the quantization result of the FPGA provided by the embodiment of the present invention and the quantization result implemented by the host computer using the C language. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0059] In view of the problems existing in the prior art, the present invention provides an FPGA implementation method for real-time quantization of infrared images with a wide dynamic range. The present invention is described in detail below in conjunction with the accompanying drawings.

[0060] like Figure 1-Figure 2 As shown, the FPGA implementation method for real-time quantization of wide dynamic range infrared images provided by the embodiment of the present invention includes:

[0061] The original image is decomposed into a background layer and a detail layer by using a low-pass filter. The interception threshold of the background layer and the detail layer is obtained by the interception threshold calculation module. The background layer and the detail layer are quantized to 8 bits by piecewise linear stretching. The quantized results of the background layer and the detail layer are fused with a certain proportional coefficient.

[0062] like Figure 3 As shown, the FPGA implementation method for real-time quantization of dynamic range infrared images provided by the embodiment of the present invention includes the following steps:

[0063] S101, acquiring an infrared image, and performing window processing on the acquired infrared image using shift ram to obtain a 3×3 filter window and calculate the mean;

[0064] S102, subtracting the original image from the background layer component pixel by pixel to obtain the detail layer component; calculating the low, medium and high interception thresholds of the piecewise linear stretching; and performing piecewise linear stretching on the input image according to the obtained interception thresholds;

[0065] S103, the background layer image and the detail layer image are merged according to a certain ratio coefficient, and a single-cycle calculation is performed by using an enlarged set truncation method to obtain an approximate division result.

[0066] The embodiment of the present invention provides a method for performing windowing processing on an acquired infrared image using shift ram to obtain a 3×3 filter window and includes:

[0067] Select the Variable Length Lossless configuration mode when instantiating the shift ram IP, and use external parameter configuration to match inputs of different image sizes;

[0068] After obtaining the 3X3 filter window value, the divider IP is replaced by amplification combined with truncation operation to perform single-cycle calculation to obtain an approximate division result.

[0069] The embodiment of the present invention provides that the pixel-by-pixel subtraction of the original image from the background layer component to obtain the detail layer component includes: adding 1 / 2 of the image dynamic range to the result pixel by pixel, and adjusting the gray value of each pixel to a positive number.

[0070] The calculation of the low, medium and high clipping thresholds for piecewise linear stretching provided by the embodiment of the present invention includes: the calculation result of the quantization parameter of the piecewise linear stretching process of the current image, that is, the clipping threshold of the previous frame image.

[0071] The interception threshold for calculating piecewise linear stretching provided by the embodiment of the present invention includes:

[0072] The grayscale distribution of the image is approximately regarded as a normal distribution. The mean and standard deviation of the image are statistically analyzed, and the interception threshold of the piecewise linear stretching is obtained according to different parametric parameters.

[0073] The calculation of the interception threshold of the piecewise linear stretching provided by the embodiment of the present invention further includes: the interception threshold of the piecewise linear stretching can be adjusted by external configuration.

[0074] The method of performing piecewise linear stretching on an input image according to an acquired interception threshold provided by an embodiment of the present invention includes:

[0075] Pixels smaller than the low-order interception threshold are quantized to 0, pixels from the low-order interception threshold to the middle-order interception threshold are quantized to 0-127, pixels from the middle-order interception threshold to the high-order interception threshold are quantized to 128-255, and pixels greater than the high-order interception threshold are quantized to 255.

[0076] like Figure 4 As shown, the FPGA implementation system for real-time quantization of dynamic range infrared images provided by the embodiment of the present invention includes:

[0077] Background detail separation module 1, used for performing window processing on the input infrared image to obtain a 3X3 filter window and calculate the mean;

[0078] The detail layer component acquisition module 2 is used to subtract the original image from the background layer component pixel by pixel to obtain the detail layer component.

[0079] A parallel computing module 3, used for simultaneously performing background layer interception threshold calculation, background layer piecewise linear stretching, detail layer interception threshold calculation and detail layer piecewise linear stretching;

[0080] The fusion module 4 is used to fuse the background layer image and the detail layer image according to a certain ratio coefficient, and perform single-cycle calculation by combining magnification with truncation to obtain an approximate division result.

[0081] The technical solution of the present invention is further described below in conjunction with specific embodiments.

[0082] Embodiment 1:

[0083] A real-time quantization algorithm for wide dynamic range infrared images based on detail layering has been implemented on FPGA. The algorithm block diagram is shown in the figure. Figure 1 As shown, the overall hardware block diagram is shown in Figure 2.

[0084] Step S1: The input infrared image is sent to the background detail separation module, in which the input image is windowed by shift ram to obtain a 3×3 filter window and calculate the mean.

[0085] In step S1: the Variable Length Lossless configuration mode is selected in the process of instantiating the shift ram IP, and the input of different image sizes can be supported through external parameter configuration.

[0086] In step S1: after obtaining the 3X3 filter window value, the divider IP is replaced by the amplification + truncation operation to achieve a single-cycle calculation of the approximate division result.

[0087] Step S2: Subtract the original image from the background layer component pixel by pixel to obtain the detail layer component.

[0088] In step S2: in order to facilitate the subsequent calculation of the interception threshold, the result is added with 1 / 2 of the image dynamic range pixel by pixel, so as to adjust the gray value of each pixel to a positive number.

[0089] Step S3: The interception threshold calculation module calculates the low, medium and high interception thresholds of the piecewise linear stretching. At the same time, the piecewise linear stretching modules work in parallel.

[0090] In step S3: the interception threshold calculation module and the piecewise linear stretching module are executed in parallel. Considering that the image is a continuous video stream input, the grayscale distribution of two adjacent frames of images is not much different, and the interception threshold calculation process takes a long time. In order to enhance the real-time performance of quantization, the quantization parameter of the current image piecewise linear stretching process is set to the calculation result of the interception threshold of the previous frame of the image.

[0091] In step S3, four processes of background layer interception threshold calculation, background layer piecewise linear stretching, detail layer interception threshold calculation, and detail layer piecewise linear stretching are executed in parallel, which can greatly improve the real-time performance of system processing.

[0092] In step S3: the method for calculating the interception threshold of the piecewise linear stretching is the "mean standard deviation method", and the specific implementation details are: the grayscale distribution of the image is approximately regarded as a normal distribution. In the normal distribution, the mean plus or minus one standard deviation accounts for 68% of all values, the mean plus or minus two standard deviations accounts for 95% of all values; the mean plus or minus three standard deviations accounts for 99% of all values. By counting the mean and standard deviation of the image, the interception threshold of the piecewise linear stretching can be obtained according to different parametric parameters. Since the process of counting the mean and standard deviation of the image does not require the storage of the histogram data of the image, the module does not need to consume additional on-chip storage resources, and the resource consumption is independent of the image size. It solves the disadvantage that the method of obtaining the piecewise linear stretching interception threshold based on histogram statistics requires a large amount of on-chip storage resources.

[0093] In step S3, the interception threshold of the piecewise linear stretching can be adjusted by external configuration.

[0094] Step S4: performing piecewise linear stretching on the input image according to the interception threshold value obtained by the interception threshold value calculation module.

[0095] In step S4: In order to increase the overall contrast of the image, the piecewise linear stretching algorithm quantizes pixels less than the low-order interception threshold to 0, quantizes the low-order interception threshold to the middle-order interception threshold to 0-127, quantizes the middle-order interception threshold to the high-order interception threshold to 128-255, and quantizes pixels greater than the high-order interception threshold to 255.

[0096] Step S5: The background layer image and the detail layer image are fused according to a certain ratio coefficient, and the divider IP is replaced by the enlargement + truncation method to realize the calculation of the approximate division result in a single cycle.

[0097] Step S6: Implement global pipeline of steps S1, S2, S3, S4, and S5 to further improve the real-time performance of system processing.

[0098] The hardware system is implemented on xilinx xc7k325tffg900, the input image size is 800*600 16-bit infrared image, and the system working clock is 100Mhz. Figure 5 As shown:

[0099] like Figure 3 and Figure 4 As shown, the input image is first windowed by a sliding window module, and the sliding window length of the shift ram can be configured according to the actual input image size.

[0100] like Figure 2 As shown in the figure, the four processes of background layer interception threshold calculation, background layer piecewise linear stretching, detail layer interception threshold calculation, and detail layer piecewise linear stretching are executed in parallel, and the four steps of background layer and detail layer separation, quantization, and fusion are implemented in a global pipeline. Figure 5 It can be seen that the delay from the original image input to the quantization result output is only 19us, and the main source of delay is the process of pre-caching two lines of input images during the shift RAM windowing process.

[0101] The low interception threshold, the middle interception threshold, and the high interception threshold are set to mean minus 2 standard deviations, mean, and mean + 2 standard deviations, respectively. The fusion coefficients of the background layer and the detail layer are set to 0.7 and 0.3.

[0102] Figure 6 The hardware resource consumption of this module on Xilinx xc7k325tffg900 shows that this solution occupies very little resources, especially storage resources.

[0103] Figure 7 The quantization results of FPGA are compared visually with those of the host computer using C language. The quantization results are basically consistent. The quantization results of FPGA are compared pixel by pixel with those of the host computer using C language. The maximum error is 3 gray levels, which is almost negligible in practical applications.

[0104] In the description of the present invention, unless otherwise specified, "plurality" means two or more than two; the orientations or positional relationships indicated by the terms "upper", "lower", "left", "right", "inner", "outer", "front end", "rear end", "head", "tail", etc. are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", "third", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0105] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.

[0106] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.

Claims

1. A FPGA implementation method for real-time quantization of wide dynamic range infrared images, It is characterized in that The wide dynamic range infrared image real-time quantization FPGA implementation method comprises: The original image is decomposed into a background layer and a detail layer by using a low-pass filter. The interception threshold of the background layer and the detail layer is obtained by using a interception threshold calculation module. The background layer and the detail layer are quantized by piecewise linear stretching, and the quantized results of the background layer and the detail layer are fused. The dynamic range infrared image real-time quantization FPGA implementation method comprises the following steps: Step 1: Obtain an infrared image, and use shift ram to perform window processing on the acquired infrared image to obtain a 3X3 filter window and calculate the mean; Step 2: Subtract the original image from the background layer component pixel by pixel to obtain the detail layer component; calculate the low, medium and high interception thresholds of the piecewise linear stretching; and perform piecewise linear stretching on the input image according to the obtained interception thresholds; Step 3: The background layer image and the detail layer image are fused according to a certain ratio coefficient, and a single-cycle calculation is performed by combining amplification and truncation to obtain an approximate division result; The calculation of the low, medium and high interception thresholds of the piecewise linear stretching includes: the calculation result of the quantization parameter of the piecewise linear stretching process of the current image, that is, the interception threshold of the previous frame image; The calculation of the interception threshold of the piecewise linear stretching includes: The grayscale distribution of the image is approximately regarded as a normal distribution. By calculating the mean and standard deviation of the image, the interception threshold of the piecewise linear stretching is obtained according to different parametric parameters. The calculating of the interception threshold of the piecewise linear stretching further includes: adjusting the interception threshold of the piecewise linear stretching by external configuration; The step of performing piecewise linear stretching on the input image according to the obtained interception threshold comprises: Pixels smaller than the low-order interception threshold are quantized to 0, pixels from the low-order interception threshold to the middle-order interception threshold are quantized to 0-127, pixels from the middle-order interception threshold to the high-order interception threshold are quantized to 128-255, and pixels greater than the high-order interception threshold are quantized to 255.

2. The FPGA implementation method for real-time quantization of wide dynamic range infrared images as claimed in claim 1, It is characterized in that In step 1, the windowing process of the acquired infrared image using shift ram to obtain a 3×3 filter window includes: Select the Variable Length Lossless configuration mode when instantiating the shift ram IP, and use external parameter configuration to match inputs of different image sizes; After obtaining the 3X3 filter window value, the divider IP is replaced by amplification combined with truncation operation to perform single-cycle calculation to obtain an approximate division result.

3. The FPGA implementation method for real-time quantization of wide dynamic range infrared images as claimed in claim 1, It is characterized in that The step of subtracting the original image from the background layer component pixel by pixel to obtain the detail layer component includes: adding 1 / 2 of the image dynamic range to the result pixel by pixel, and adjusting the gray value of each pixel to be a positive number.

4. A dynamic range infrared image real-time quantization FPGA implementation system for implementing the dynamic range infrared image real-time quantization FPGA implementation method according to any one of claims 1 to 3, It is characterized in that The dynamic range infrared image real-time quantization FPGA implementation system includes: Background detail separation module, used to perform windowing on the input infrared image to obtain a 3X3 filter window and calculate the mean; A detail layer component acquisition module is used to obtain detail layer components by subtracting the original image from the background layer components pixel by pixel; A parallel computing module, used for simultaneously performing background layer interception threshold calculation, background layer piecewise linear stretching, detail layer interception threshold calculation and detail layer piecewise linear stretching; The fusion module is used to fuse the background layer image and the detail layer image according to a certain ratio coefficient, and use magnification combined with truncation to perform single-cycle calculation to obtain an approximate division result.

5. An information data processing terminal, It is characterized in that The information data processing terminal includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the FPGA implementation method for real-time quantization of dynamic range infrared images as described in any one of claims 1-3.