Image enhancement method, device and system based on PFGA
By segmenting and enhancing images under low illumination conditions, generating grayscale mapping conversion tables and stitching processing, the problem of insufficient brightness and contrast of low illumination images is solved, and the image details are significantly improved and visibility is improved.
Patent Information
- Application Number
- CN202411818912.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-04
AI Technical Summary
Under low illumination conditions, images often exhibit low brightness and low contrast, resulting in difficult to distinguish details and blurred edges of objects. The prior art is difficult to effectively improve the visibility of images and the ability to express details.
Using the PFGA-based image enhancement method, by segmenting the original image into several sub-maps, performing sub-histogram statistics and threshold shearing techniques, a grayscale mapping conversion table is generated, and an enhancement sub-map is generated, and the final enhanced image is generated through stitching processing.
The image brightness and contrast ratio under low illumination conditions are achieved, which greatly enhances the image detail information, improves the image visibility and detail expression ability, and achieves the enhanced display effect of the detector module under low illumination conditions.
Smart Images

Figure CN119559057A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and in particular relates to an image enhancement method, device and system based on PFGA. Background Art
[0002] Low-light CMOS devices are a type of image sensor designed for image capture under low-light conditions, with the characteristics of high sensitivity, low noise, low power consumption, wide dynamic range and fast response. They play an important role in low-light imaging fields, such as night vision, medical, astronomical, scientific imaging, etc., and can provide high-quality images for target detection in extreme illumination environments.
[0003] Contrast enhancement technology is important in low-light imaging. In a dimly lit environment, images often show low brightness and low contrast, making it difficult to discern details and blurring the edges of objects. Through contrast enhancement, the visibility and detail information expression of the image can be effectively improved. By enhancing the difference between dark and bright areas, contrast enhancement can also make the details in the image more obvious and provide richer information, which is crucial for identifying objects, distinguishing features, and analyzing scenes in complex backgrounds. Summary of the invention
[0004] In view of the above problems, the present invention proposes an image enhancement method, device and system based on PFGA, which can effectively improve the image enhancement effect.
[0005] In order to achieve the above technical objectives and the above technical effects, the present invention is implemented through the following technical solutions: In a first aspect, the present invention provides an image enhancement method based on PFGA, comprising: Segment the acquired original image to generate several original sub-images; After executing a preset enhancement processing method on each original sub-image, a corresponding enhanced sub-image is obtained; All enhanced sub-images are spliced together to generate the final enhanced image; The preset enhancement processing method includes: Perform sub-histogram statistics on the original sub-image. In the histogram statistics process, threshold clipping and sub-histogram redistribution techniques are used to generate a grayscale mapping conversion table. Based on the grayscale mapping conversion table and the original sub-image, an enhanced sub-image is generated.
[0006] In combination with the first aspect, optionally, the method for generating the original subgraph includes: The original image is divided into 4×4 original sub-images.
[0007] In combination with the first aspect, optionally, the PFGA-based image enhancement method further includes: Process each original sub-image into an 8-bit image.
[0008] In combination with the first aspect, optionally, before performing sub-histogram statistics, the following steps are performed: If the frame valid signal is low level, it means that the statistics of the frame image have been completed; If the frame valid signal is high level and the sub-block row valid signal is high level, it means that the current pixel belongs to the sub-block area, and the row valid signals of each sub-block do not overlap according to the sub-block area division.
[0009] In combination with the first aspect, optionally, the method for generating the grayscale mapping conversion table includes: Based on the grayscale value of the pixel, the accumulated count value corresponding to the grayscale value is increased by one; If the accumulated count value corresponding to the current pixel is greater than the set clipping threshold, the clipping grayscale total counter is incremented by one; When all pixels have been counted, the total value of the sheared grayscale sum counter is evenly distributed to each grayscale level to obtain the original statistical data of each grayscale level; The original statistical data of each gray level are accumulated and normalized, and then multiplied by 255 to form a grayscale mapping conversion table. The calculation formula used is: ; in, is the new grayscale mapping, is a subhistogram i Grayscale statistics of the grayscale level, n is the total number of pixels within the subhistogram block.
[0010] In combination with the first aspect, optionally, the adding one to the accumulated count value corresponding to the grayscale value based on the grayscale value of the current pixel includes: If the grayscale value of the previous pixel is the same as that of the current pixel, the current cumulative count value is directly increased by one; If the grayscale values of the previous pixel and the current pixel are different, the accumulated count value corresponding to the current pixel is re-read with the grayscale value as the address and added by one.
[0011] In combination with the first aspect, optionally, the grayscale mapping conversion table generation operation and the enhanced sub-image display operation are performed alternately in two RAMs, ie, a "ping-pong" operation.
[0012] In combination with the first aspect, optionally, a bilinear interpolation algorithm is used when performing the splicing process.
[0013] In a second aspect, the present invention provides an image enhancement device based on PFGA, comprising: An image segmentation module is used to segment the acquired original image to generate a number of original sub-images; A sub-image enhancement module is used to obtain a corresponding enhanced sub-image after executing a preset enhancement processing method on each original sub-image; The image stitching module is used to stitch all enhanced sub-images to generate the final enhanced image; The preset enhancement processing method includes: Perform sub-histogram statistics on the original sub-image. In the histogram statistics process, threshold clipping and sub-histogram redistribution techniques are used to generate a grayscale mapping conversion table. Based on the grayscale mapping conversion table and the original sub-image, an enhanced sub-image is generated.
[0014] In a third aspect, the present invention provides an image enhancement system based on PFGA, including a storage medium and a processor; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the method according to any one of the first aspects.
[0015] Compared with the prior art, the present invention has the following beneficial effects: The present invention realizes real-time high-speed adaptive enhancement of low-light-level images based on an FPGA platform. The processing method not only improves the brightness and contrast of the image, but also greatly enhances the details of the image, thereby achieving an enhanced display effect of the detector module under low-light conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor, among which: Figure 1 A schematic diagram of a process of an image enhancement method based on PFGA according to an embodiment of the present invention; Figure 2 The figure is a schematic diagram of a process of sub-histogram statistics according to an embodiment of the present invention. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention. Example 1
[0019] An embodiment of the present invention provides an image enhancement method based on PFGA, comprising the following steps: (1) Segment the acquired original image to generate several original sub-images; (2) After executing the preset enhancement processing method on each original sub-image, the corresponding enhanced sub-image is obtained; (3) All enhanced sub-images are spliced together to generate the final enhanced image; The preset enhancement processing method includes: Perform sub-histogram statistics on the original sub-image. In the histogram statistics process, threshold clipping and sub-histogram redistribution techniques are used to generate a grayscale mapping conversion table. Based on the grayscale mapping conversion table and the original sub-image, an enhanced sub-image is generated.
[0020] Imaging under low light conditions has a lot of shot noise (which can also be regarded as "details"). Too many blocks will cause the noise to be amplified, which will deteriorate the image quality. At the same time, a large number of blocks will also lead to a geometric increase in the amount of calculation and storage. To this end, in a specific implementation of an embodiment of the present invention, the method for generating the original sub-image includes: The original image is divided into 4×4 original sub-images.
[0021] The original image bit width is 12 bits, but in actual observation, the resolution ability of the human eye and the characteristics of common images limit the perception of subtle differences between 8-bit and 12-bit images. Combined with factors such as the complexity of histogram statistical calculation, therefore, in a specific implementation of the embodiment of the present invention, the PFGA-based image enhancement method also includes: Process each original sub-image into an 8-bit image (256 gray levels).
[0022] In a specific implementation of the embodiment of the present invention, Figure 2As shown, before performing subhistogram statistics, the following steps are performed: If the frame valid signal is low level, it means that the statistics of the frame image have been completed; If the frame valid signal is high level and the sub-block row valid signal is high level, it means that the current pixel belongs to the sub-block area, and the row valid signals of each sub-block do not overlap according to the sub-block area division.
[0023] The histogram of a low-light image is often concentrated in a small range. The setting of the clipping threshold can avoid introducing too much contrast enhancement in areas with small brightness changes, thereby reducing noise amplification and excessive image enhancement. This is particularly important for suppressing noise and enhancing details in low-light images. To this end, in a specific implementation of the present invention, Figure 2 As shown, the method for generating the grayscale mapping conversion table includes: Based on the grayscale value of the pixel, the accumulated count value corresponding to the grayscale value is increased by one; If the accumulated count value corresponding to the current pixel is greater than the set clipping threshold, the clipping grayscale total counter is incremented by one; When all pixels have been counted, the total value of the sheared grayscale sum counter is evenly distributed to each grayscale level to obtain the original statistical data of each grayscale level; The original statistical data of each gray level are accumulated and normalized, and then multiplied by 255 to form a grayscale mapping conversion table. The calculation formula used is: ; in, is the new grayscale mapping, is a subhistogram i Grayscale statistics of the grayscale level, n is the total number of pixels within the subhistogram block.
[0024] In a specific implementation of the embodiment of the present invention, Figure 2 As shown, the step of adding one to the accumulated count value corresponding to the grayscale value based on the grayscale value of the current pixel includes: If the grayscale value of the previous pixel is the same as that of the current pixel, the current cumulative count value is directly increased by one; If the grayscale value of the previous pixel is different from that of the current pixel, the cumulative count value corresponding to the current pixel is re-read with the grayscale value as the address, and one is added. During the statistical process, the statistical results need to be saved and read at any time. In the embodiment of the present invention, it is proposed to determine whether the grayscale value of the previous pixel is the same as that of the current pixel to determine whether the cumulative count value needs to be re-read, which can reduce the frequent reading of the on-chip RAM to improve the statistical efficiency.
[0025] In a specific implementation of the embodiment of the present invention, the grayscale mapping conversion table generation operation and the enhanced sub-image display operation are performed alternately in two RAMs respectively, so as to realize a "ping-pong operation" of simultaneous storage and reading in the chip.
[0026] Since the image is divided into several blocks for independent processing, this will cause discontinuous grayscale changes between adjacent blocks. In order to reduce the block effect, in a specific implementation of the embodiment of the present invention, a bilinear interpolation algorithm is used when performing splicing processing. The bilinear interpolation module is used to estimate the value of the intermediate pixel by weighted average between adjacent pixels at the edge of the image block, which can effectively reduce the block effect and make the pixels of adjacent blocks transition smoothly, thereby eliminating discontinuity and making the image transition smoother and more natural. The pixel grayscale value output by the cache control module is used as the address to retrieve the mapping grayscale value from the 16 sub-block mapping table, and then the weighted operation is accelerated by external calculation acceleration SRAM. In addition, the frame valid and line valid signals are encoded to generate a line synchronization signal (HSYNC) and a field synchronization signal (VSYNC) to provide the necessary display synchronization signals for the subsequent display module. Example 2
[0027] An embodiment of the present invention provides an image enhancement device based on PFGA, comprising: An image segmentation module is used to segment the acquired original image to generate a number of original sub-images; A sub-image enhancement module is used to obtain a corresponding enhanced sub-image after executing a preset enhancement processing method on each original sub-image; The image stitching module is used to stitch all enhanced sub-images to generate the final enhanced image; The preset enhancement processing method includes: Perform sub-histogram statistics on the original sub-image. In the histogram statistics process, threshold clipping and sub-histogram redistribution techniques are used to generate a grayscale mapping conversion table. Based on the grayscale mapping conversion table and the original sub-image, an enhanced sub-image is generated.
[0028] The rest are the same as in Example 1. Example 3
[0029] An embodiment of the present invention provides an image enhancement system based on PFGA, including a storage medium and a processor; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the method according to any one of the embodiments 1.
[0030] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0031] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0032] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0033] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0034] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.
[0035] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. An image enhancement method based on PFGA, characterized in that: include: Segment the acquired original image to generate several original sub-images; After executing a preset enhancement processing method on each original sub-image, a corresponding enhanced sub-image is obtained; All enhanced sub-images are spliced together to generate the final enhanced image; The preset enhancement processing method includes: Perform sub-histogram statistics on the original sub-image. In the histogram statistics process, threshold clipping and sub-histogram redistribution techniques are used to generate a grayscale mapping conversion table. Based on the grayscale mapping conversion table and the original sub-image, an enhanced sub-image is generated.
2. The image enhancement method based on PFGA according to claim 1, characterized in that: The method for generating the original subgraph includes: The original image is divided into 4×4 original sub-images.
3. The image enhancement method based on PFGA according to claim 1, characterized in that: The PFGA-based image enhancement method also includes: Process each original sub-image into an 8-bit image.
4. The image enhancement method based on PFGA according to claim 1, characterized in that: Before performing subhistogram statistics, perform the following steps: If the frame valid signal is low level, it means that the statistics of the frame image have been completed; If the frame valid signal is high level and the sub-block row valid signal is high level, it means that the current pixel belongs to the sub-block area, and the row valid signals of each sub-block do not overlap according to the sub-block area division.
5. The image enhancement method based on PFGA according to claim 1, characterized in that: The method for generating the grayscale mapping conversion table includes: Based on the grayscale value of the pixel, the accumulated count value corresponding to the grayscale value is increased by one; If the accumulated count value corresponding to the current pixel is greater than the set clipping threshold, the clipping grayscale total counter is incremented by one; When all pixels have been counted, the total value of the sheared grayscale sum counter is evenly distributed to each grayscale level to obtain the original statistical data of each grayscale level; The original statistical data of each gray level are accumulated and normalized, and then multiplied by 255 to form a grayscale mapping conversion table. The calculation formula used is: ; in, is the new grayscale mapping, is a subhistogram i Grayscale statistics of the grayscale level, n is the total number of pixels within the subhistogram block.
6. The PFGA-based image enhancement method according to claim 5, characterized in that: The step of increasing the accumulated count value corresponding to the grayscale value based on the grayscale value of the current pixel by one comprises: If the grayscale value of the previous pixel is the same as that of the current pixel, the current cumulative count value is directly increased by one; If the grayscale values of the previous pixel and the current pixel are different, the accumulated count value corresponding to the current pixel is re-read with the grayscale value as the address and added by one.
7. The image enhancement method based on PFGA according to claim 5, characterized in that: The grayscale mapping conversion table generation operation and the enhanced sub-image display operation are performed alternately in two RAMs respectively.
8. The PFGA-based image enhancement method according to claim 1, characterized in that: The bilinear interpolation algorithm is used when performing stitching.
9. An image enhancement device based on PFGA, characterized in that: include: An image segmentation module is used to segment the acquired original image to generate a number of original sub-images; A sub-image enhancement module is used to obtain a corresponding enhanced sub-image after executing a preset enhancement processing method on each original sub-image; The image stitching module is used to stitch all enhanced sub-images to generate the final enhanced image; The preset enhancement processing method includes: Perform sub-histogram statistics on the original sub-image. In the histogram statistics process, threshold clipping and sub-histogram redistribution techniques are used to generate a grayscale mapping conversion table. Based on the grayscale mapping conversion table and the original sub-image, an enhanced sub-image is generated.
10. An image enhancement system based on PFGA, characterized in that: including storage media and processors; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the method according to any one of claims 1-8.