A method for extracting multi-layer peak values of images based on FPGA
Through FPGA parallel processing and weighted square algorithm, the problems of noise sensitivity and high computational complexity of the existing multi-layer peak extraction method are solved, and high accuracy and high efficiency multi-layer peak extraction is achieved, which is suitable for high frame rate and high resolution image processing.
Patent Information
- Application Number
- CN202411585272.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2044-11-07
AI Technical Summary
The existing multi-layer peak extraction methods are noise sensitivity, high computational complexity, large computing resource requirements, poor real-time performance and difficulty in processing high frame rate and high resolution images, resulting in low accuracy and efficiency.
The FPGA parallel processing method is adopted to mark the starting point, peak top and end point of the image peak, combined with weighted square processing, accurately identify and screen the multi-layer peak value of the image, and use the parallel processing capability and weighting algorithm of FPGA to improve the accuracy and efficiency of peak extraction.
It improves the accuracy of multi-layer peak recognition in image, reduces noise interference, improves processing speed and efficiency, and meets the real-time requirements of high frame rate and high resolution images.
Smart Images

Figure CN119478574B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, in particular to a method for extracting multi-layer peak values of an image based on FPGA. Background Art
[0002] Extracting multiple peaks from an image—that is, identifying and locating multiple local extreme points or feature points—plays an important role in edge detection, image calibration, 3D reconstruction, and other image processing tasks. Currently, the following peak extraction methods are commonly used: The Sobel edge detector. This method primarily uses discrete differential operators to calculate the approximate gradient of an image. Convolution operations are typically performed using a Sobel kernel (typically 3x3 in size) to obtain the horizontal and vertical gradients of the image, thereby extracting the image's edge extreme points. Scale-invariant feature transformation. This method constructs a Gaussian pyramid and performs Difference of Gaussian (DoG) operations at different scales to detect extreme points and extract feature points. The orientation and scale of these points are calculated to ensure invariance to scale and rotation. Image histogram analysis. This method calculates the grayscale histogram of an image to analyze its grayscale value distribution. Peak detection is performed based on local maxima in the histogram. Machine learning-based methods use a large amount of labeled data to train a neural network to extract image features and peaks. The trained model is then used to automatically identify and extract feature points or peaks in the image.
[0003] The above four methods for multi-layer peak processing of images all have certain defects. The Sobel edge detector performs peak detection in a filtering manner, which is extremely sensitive to noise. In the presence of noise, inaccurate peak detection is prone to occur. The scale-invariant feature transform involves a large number of complex calculations. In practical applications, high-computing equipment is often required to handle tasks with low real-time requirements. The image histogram method is also greatly affected by noise, and its computational structure is simple and cannot process complex images. Machine learning-based methods require a large amount of data for training in the early stage and require powerful computing resources for inference. In addition, its model has poor interpretability. In practical applications, especially when the environment changes significantly, the model's generalization ability may be insufficient.
[0004] Moreover, the above four methods all have the disadvantage of low computing speed. They are mostly used on general-purpose processors such as CPU and GPU, and are difficult to apply to the processing of high-frame-rate and high-resolution images. Summary of the Invention
[0005] The present invention aims to solve at least one of the technical problems existing in the prior art; to this end, the present invention proposes a method for extracting multi-layer peak values of an image based on FPGA, which can improve the accuracy of peak recognition, reduce the degree of noise interference, parallelize processing, and have high efficiency and real-time performance.
[0006] To achieve the above object, a first aspect of the present invention provides a method for extracting multi-layer peak values of an image based on FPGA, comprising:
[0007] Input image, input high-speed image in parallel through FPGA, set each clock cycle to input multiple pixels of a row of high-speed image at the same time;
[0008] Marking the high-speed image peak, obtaining the complete high-speed image peak by determining the starting point, peak top, and end point of the high-speed image peak, and marking the high-speed image peak according to the starting point, peak top, and end point of the high-speed image peak;
[0009] Peak identification: After finding the starting point mark of multiple pixels input simultaneously in the same clock cycle in position order, ignore other marks of subsequent parallel image pixels and only find the peak top mark. After finding the peak top mark, only find the peak end mark. Circularly select complete peaks in the order of the starting point, peak top, and end point of the peak. Determine the number of peaks based on the number of peak tops to obtain multiple complete peaks.
[0010] Image delay, delaying the input high-speed image by two lines through the first-in first-out queue FIFO;
[0011] Peak points are obtained by weighted square, the multiple complete peaks identified are screened for effective values to obtain effective peaks, and weighted square processing is performed on the effective peaks to obtain multiple groups of peak points in the current row of the image.
[0012] Preferably, marking the high-speed image peak according to the starting point, peak top, and end point of the high-speed image peak includes:
[0013] All pixels arriving at the same clock cycle are judged in parallel, and pixels with values higher than the previous pixel value are marked as the starting point of the peak;
[0014] If the five pixels before and after the current pixel show a trend of first rising and then falling, and the difference is greater than the set threshold, the current pixel is marked as the peak;
[0015] The starting point of the next peak is determined as the end point of the current peak. If the current peak is the last peak, the end point of the image is marked as the end point of the peak.
[0016] Preferably, the multiple complete peaks identified are screened for effective values to obtain effective peaks, including: within the range of the current multiple complete peaks, when the complete peak pixel value is higher than half of the peak value, the current complete peak is deemed valid and the effective peak is obtained, otherwise the pixel point value is reset to zero.
[0017] Preferably, performing weighted square processing on the effective peak values to obtain multiple groups of peak points in the current row of the image includes:
[0018] Multiply the square of the current pixel value in the same complete peak by its column index, add them up, and use the sum as the dividend;
[0019] The squares of the current pixel values within the same complete peak are accumulated and summed, which is used as the divisor, and the dividend and the divisor are used to obtain the quotient;
[0020] The obtained quotient is used as the peak point of the same complete peak. The multiple complete peaks identified are weighted averaged to obtain multiple groups of peak points in the current row of the image.
[0021] Compared with the prior art, the present invention has the following beneficial effects:
[0022] The present invention can provide peak recognition accuracy and is less affected by noise interference. For the discrimination of the peak of the input image, the present invention adopts a method for discriminating the complete peak in sequence, and its starting point, peak, and end point are judged one by one in sequence to ensure the integrity of the peak without duplication or omission. In addition, the present invention adds a drop constraint condition under the condition of peak trend discrimination, which reduces the interference of noise on the discrimination, thereby effectively preventing misjudgment, wrong judgment, and missed judgment phenomena such as judging noise as a peak, merging two peaks into one peak, and missing peaks. For peak discrimination after determining the peak, a weighted average method is adopted. The pixels contained in the peak are subjected to threshold discrimination and weighted average, which can effectively overcome the offset problem of the peak point under noise interference conditions.
[0023] The present invention achieves high efficiency and real-time performance through parallel processing. FPGA parallel processing is used to process high-frame-rate and high-resolution images. Structurally: multiple tasks such as peak marking, discrimination and weighting algorithms are executed in parallel, and a pipeline is used between multiple task processes so that the processing processes do not interfere with each other. In data processing: multiple pixel data are received at the same time, and peak marking and peak discrimination are performed on them at the same time. Multiple pixels are processed at the same time, which significantly saves time. Through the parallel processing method of FPGA, the speed of extracting multi-layer peaks of images is greatly improved to meet the needs of high real-time applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0025] Figure 1 Schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0026] The technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0027] See also Figure 1 The first embodiment of the present application provides a method for extracting multi-layer peak values of an image based on FPGA, comprising:
[0028] Input image, input high-speed image in parallel through FPGA, set each clock cycle to input multiple pixels of a row of high-speed image at the same time;
[0029] Marking the high-speed image peak, obtaining the complete high-speed image peak by determining the starting point, peak top, and end point of the high-speed image peak, and marking the high-speed image peak according to the starting point, peak top, and end point of the high-speed image peak;
[0030] Furthermore, marking the high-speed image peak according to the starting point, peak top, and end point of the high-speed image peak includes:
[0031] All pixels arriving at the same clock cycle are judged in parallel, and pixels with values higher than the previous pixel value are marked as the starting point of the peak;
[0032] If the five pixels before and after the current pixel show a trend of first rising and then falling, and the difference is greater than the set threshold, the current pixel is marked as the peak;
[0033] The starting point of the next peak is determined as the end point of the current peak. If the current peak is the last peak, the end point of the image is marked as the end point of the peak.
[0034] Peak identification: After finding the starting point mark of multiple pixels input simultaneously in the same clock cycle in position order, ignore other marks of subsequent parallel image pixels and only find the peak top mark. After finding the peak top mark, only find the peak end mark. Circularly select complete peaks in the order of the starting point, peak top, and end point of the peak. Determine the number of peaks based on the number of peak tops to obtain multiple complete peaks.
[0035] Image delay, delaying the input high-speed image by two lines through the first-in first-out queue FIFO;
[0036] Peak points are obtained by weighted square, the multiple complete peaks identified are screened for effective values to obtain effective peaks, and weighted square processing is performed on the effective peaks to obtain multiple groups of peak points in the current row of the image.
[0037] Furthermore, the multiple complete peaks identified are screened for effective values to obtain effective peaks, including: within the range of the current multiple complete peaks, when the complete peak pixel value is higher than half of the peak value, the current complete peak is deemed valid and the effective peak is obtained, otherwise the pixel point value is reset to zero.
[0038] Specifically, the weighted square processing is performed on the effective peak to obtain multiple groups of peak points in the current row of the image, including:
[0039] Multiply the square of the current pixel value in the same complete peak by its column index, add them up, and use the sum as the dividend;
[0040] The squares of the current pixel values within the same complete peak are accumulated and summed, which is used as the divisor, and the dividend and the divisor are used to obtain the quotient;
[0041] The obtained quotient is used as the peak point of the same complete peak. The multiple complete peaks identified are weighted averaged to obtain multiple groups of peak points in the current row of the image.
[0042] The above embodiments are only used to illustrate the technical method of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A method for extracting multi-layer peak values of an image based on FPGA, characterized in that: include: Input image, input high-speed image in parallel through FPGA, set each clock cycle to input multiple pixels of a row of high-speed image at the same time; Marking the high-speed image peak, obtaining the complete high-speed image peak by determining the starting point, peak top, and end point of the high-speed image peak, and marking the high-speed image peak according to the starting point, peak top, and end point of the high-speed image peak; Peak identification: After finding the starting point mark of multiple pixels input simultaneously in the same clock cycle in position order, ignore other marks of subsequent parallel image pixels and only find the peak top mark. After finding the peak top mark, only find the peak end mark. Circularly select complete peaks in the order of the starting point, peak top, and end point of the peak. Determine the number of peaks based on the number of peak tops to obtain multiple complete peaks. Image delay, delaying the input high-speed image by two lines through the first-in first-out queue FIFO; Taking peak points by weighted square, performing effective value screening on the multiple complete peaks identified to obtain effective peaks, performing weighted square processing on the effective peaks to obtain multiple groups of peak points in the current row of the image; The step of marking the high-speed image peak according to the starting point, peak top, and end point of the high-speed image peak comprises: All pixels arriving at the same clock cycle are judged in parallel, and pixels with values higher than the previous pixel value are marked as the starting point of the peak; If the five pixels before and after the current pixel show a trend of first rising and then falling, and the difference is greater than the set threshold, the current pixel is marked as the peak; The starting point of the next peak is determined as the end point of the current peak. If the current peak is the last peak, the end point of the image is marked as the end point of the peak. The effective value screening of the identified multiple complete peaks to obtain the effective peak includes: within the range of the current multiple complete peaks, when the complete peak pixel value is higher than half of the peak value, then the current complete peak is considered to be effective and the effective peak is obtained; otherwise, the pixel value is reset to zero; The weighted square processing is performed on the effective peak value to obtain multiple groups of peak points of the current row of the image, including: Multiply the square of the current pixel value in the same complete peak by its column index, add them up, and use the sum as the dividend; The squares of the current pixel values within the same complete peak are accumulated and summed, which is used as the divisor, and the dividend and the divisor are used to obtain the quotient; The obtained quotient is used as the peak point of the same complete peak, and the multiple complete peaks identified are weighted averaged to obtain multiple groups of peak points in the current row of the image.
Citation Information
Patent Citations
FPGA-based quick peak searching method and system
CN103604449A
Real-time wavelength peak value extraction method and device, equipment and storage medium
CN116880907A