A high-speed motion fast deblurring method and device based on one-dimensional derivative convolution
By extracting multi-scale edge features and adaptive compensation using a one-dimensional derivative convolution method, the problem of deblurring high-speed moving images is solved, achieving efficient and fast image restoration, and is suitable for resource-constrained embedded systems.
Patent Information
- Application Number
- CN202510801864.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2045-06-16
AI Technical Summary
Existing technologies struggle to balance deblurring accuracy, real-time performance, and system resource consumption when processing high-speed moving images. Traditional methods are costly, computationally complex, or have high hardware requirements, making them unsuitable for resource-constrained embedded systems.
A one-dimensional derivative convolution method is adopted, which integrates multi-scale edge extraction and adaptive compensation, including positive and negative first-order and second-order derivative convolution, to calculate the gradient compensation values of the transition zone and the edge, and directly process uint8 type image data, thereby reducing the amount of computation and memory consumption.
It achieves efficient deblurring of 1024×1024 resolution images within milliseconds, reduces artifacts, restores clear edges, adapts to different types of high-speed motion blur scenes, and meets real-time detection requirements.
Smart Images

Figure CN120689242B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of machine vision defect detection, and more specifically, to a method and apparatus for high-speed motion deblurring based on one-dimensional derivative convolution. Background Technology
[0002] With the rapid development of industrial automation and intelligent inspection technologies, high-speed motion image acquisition and processing are becoming increasingly popular in fields such as automated inspection, intelligent monitoring, and autonomous driving. However, traditional imaging systems often produce significant motion blur when capturing images of high-speed moving targets, resulting in the loss of image edge information and unclear details, which seriously affects the accuracy of subsequent target recognition and measurement.
[0003] Existing deblurring techniques can be mainly divided into two categories: hardware-based image stabilization and software-based image restoration. Hardware methods, such as electronic shutter switching, shake platform compensation, and coded exposure, can suppress motion blur to a certain extent, but they often require additional hardware investment, resulting in high costs and large size, making them unsuitable for applications where size and cost are limited.
[0004] Software methods primarily rely on blind / non-blind deconvolution algorithms and spatial domain filtering algorithms. Non-blind deconvolution algorithms, such as Wiener filtering and the Lucy-Richardson algorithm, perform well in restoring known or simply assumed motion blur kernels. However, in real-world scenarios, the motion blur kernel is difficult to estimate accurately, often resulting in artifacts or ringing artifacts in the restored image. While blind deconvolution algorithms can simultaneously estimate the blur kernel and the sharp image, their high computational complexity and numerous iterations make them unsuitable for real-time processing of high-resolution images. Furthermore, although some deblurring methods based on multi-frame fusion or deep learning offer improved accuracy, they often require large frame buffers or pre-training and demand high hardware computing power, making them unsuitable for deployment in resource-constrained embedded systems.
[0005] In summary, existing technologies struggle to balance deblurring accuracy, real-time performance, and system resource consumption when processing high-speed moving images with resolutions of 1024×1024 or higher. There is an urgent need for an efficient deblurring method that can quickly extract motion direction features while effectively suppressing artifacts and restoring clear edges. Summary of the Invention
[0006] The purpose of this invention is to achieve efficient deblurring of high-speed moving images within milliseconds by using fast multi-scale edge extraction and adaptive compensation fusion based on one-dimensional derivative convolution, while taking into account both deblurring accuracy and real-time performance.
[0007] The technical solution of this invention is: to provide a high-speed motion deblurring method based on one-dimensional derivative convolution, the method comprising:
[0008] S1. Capture a uint8 image with a fixed direction of motion blur, and use a 3*3 Gaussian kernel to denoise the image;
[0009] S2. On the one-dimensional trajectory consistent with the direction of motion blur, calculate the feature values of positive first derivative convolution, negative first derivative convolution, positive second derivative convolution and negative second derivative convolution for each pixel, and obtain the corresponding four feature maps to extract multi-scale edge features.
[0010] S3. For any pixel, calculate the positive and negative transition band compensation values for transition band suppression based on the feature map obtained in step S2.
[0011] S4. For any pixel, calculate the positive and negative edge gradient compensation values for edge gradient compensation based on the feature map obtained in step S2.
[0012] S5. Combine the compensation values in each direction to obtain the deblurred image.
[0013] In any of the above technical solutions, the calculation results obtained during the calculation process are further processed by the truncation and rounding function t(*), the specific expression of which is:
[0014]
[0015] Where z is a random number, [*] is the rounding function, t(*) truncates out-of-bounds values outside of 0 to 255 and rounds all values to the nearest integer.
[0016] In any of the above technical solutions, further, the eigenvalues of the positive first-order derivative convolution calculated in step S2 are... The calculation formula is:
[0017]
[0018] Eigenvalues of negative first derivative convolution The calculation formula is:
[0019]
[0020] Eigenvalues of positive second derivative convolution The calculation formula is:
[0021]
[0022] Eigenvalues of negative second derivative convolution The calculation formula is:
[0023]
[0024] Where P(x,y+i) is the gray value at pixel (x,y+i), n is any positive integer, and T i U i V i W i These are the coefficients of each eigenvalue, with specific values for T. -1 =-n, T0=0, T1=n; U -1 =n, U0=0, U1=-n; V -1 =n, V0 = -2n, V1 = n; W -1 =-n, W0=2n, W1=-n.
[0025] In any of the above technical solutions, the calculation formulas for step S3 of the positive compensation value Pos1(x,y) and the negative compensation value Neg1(x,y) of the transition band are as follows:
[0026]
[0027] In any of the above technical solutions, further, the calculation formulas for step S4 of the positive edge gradient compensation value Pos2(x,y) and the negative edge gradient compensation value Neg2(x,y) are as follows:
[0028]
[0029] In any of the above technical solutions, further, step S5 fuses the compensation values in each direction to obtain the grayscale value ω(x,y) of the deblurred image:
[0030] ω(x,y)=t(P(x,y)-Pos1(x,y)+Neg1(x,y)-Pos2(x,y)+Neg2(x,y)).
[0031] A deblurring apparatus using any of the above-described deblurring methods is also provided, the apparatus comprising: a camera, a memory, and a computing unit;
[0032] The camera is fixed in one position to capture high-speed moving objects in horizontal or vertical motion. The captured images are stored in the memory. The computing unit reads the images from the memory and calculates the feature values of positive first-order derivative convolution, negative first-order derivative convolution, positive second-order derivative convolution and negative second-order derivative convolution for each pixel on the one-dimensional trajectory in the direction of motion blur, and temporarily stores them in the memory.
[0033] The computing unit reads the image and the cached derivative convolution feature values again, calculates the positive compensation value of the transition band, the negative compensation value of the transition band, the positive compensation value of the edge gradient, and the negative compensation value of the edge gradient for each pixel. Finally, the computing unit fuses the compensation values in each direction to calculate the gray value of each pixel after compensation, and generates a deblurred image which is stored in the memory.
[0034] The beneficial effects of this invention are:
[0035] The technical solution in this invention uses one-dimensional derivative convolution in the motion direction to replace traditional two-dimensional global filtering or iterative blind deconvolution, which not only effectively extracts multi-scale edge features, but also significantly reduces the size of the convolution kernel and the computational dimension, so that the deblurring processing time of a 1024×1024 resolution image can be controlled within 20 milliseconds, meeting the needs of high-speed detection and real-time monitoring systems.
[0036] By employing one-dimensional convolution and a precise edge gradient compensation algorithm, this invention can effectively reduce the transition band caused by motion blur, avoid artifacts, and restore image details.
[0037] This invention directly processes uint8 type image data, avoiding the steps of normalization and data type conversion, reducing computation and memory consumption, thereby significantly improving processing speed and efficiency, and also enhancing its compatibility and universal applicability in practical applications.
[0038] This invention does not rely on complex fuzzy kernel estimation or deep learning models, and can adapt to different types of high-speed motion fuzzy scenes. It has strong versatility and adaptability, and can be widely used in the fields of high-speed image processing and automatic detection. Attached Figure Description
[0039] The advantages of the above and additional aspects of the present invention will become apparent and readily understood in the description of the embodiments in conjunction with the following drawings, wherein:
[0040] Figure 1 This is a schematic flowchart of a high-speed motion fast deblurring method based on one-dimensional derivative convolution according to an embodiment of the present invention;
[0041] Figure 2 This is a local image denoising image of a high-speed motion fast deblurring method based on one-dimensional derivative convolution according to an embodiment of the present invention, showing a gray line segment pixel sample image with the same motion direction after denoising.
[0042] Figure 3 This is a schematic diagram of the positive first-order derivative convolution result of a high-speed motion fast deblurring method based on one-dimensional derivative convolution, according to an embodiment of the present invention;
[0043] Figure 4 This is a schematic diagram of the negative first-order derivative convolution result of a high-speed motion fast deblurring method based on one-dimensional derivative convolution, according to an embodiment of the present invention.
[0044] Figure 5This is a schematic diagram of the positive second-order derivative convolution result of a high-speed motion fast deblurring method based on one-dimensional derivative convolution, according to an embodiment of the present invention;
[0045] Figure 6 This is a schematic diagram of the negative second-order derivative convolution result of a high-speed motion fast deblurring method based on one-dimensional derivative convolution, according to an embodiment of the present invention;
[0046] Figure 7 This is a schematic diagram comparing the negative compensation value (top) and the original image after noise reduction (bottom) in the transition band suppression processing of gray line segment pixel sampling of a high-speed motion fast deblurring method based on one-dimensional derivative convolution according to an embodiment of the present invention.
[0047] Figure 8 This is a schematic diagram comparing the value of positive compensation required for transition band suppression processing of gray line segment pixel sampling in a fast motion deblurring method based on one-dimensional derivative convolution according to an embodiment of the present invention (top) with the original image after noise reduction (bottom).
[0048] Figure 9 This is a schematic diagram comparing the negative edge gradient compensation value (top) calculated by sampling gray line segment pixels according to an embodiment of the present invention based on a high-speed motion fast deblurring method using one-dimensional derivative convolution with the original image after noise reduction (bottom).
[0049] Figure 10 This is a schematic diagram comparing the edge gradient compensation value calculated by sampling gray line segment pixels (top) with the original image after noise reduction (bottom) in a fast motion deblurring method based on one-dimensional derivative convolution according to an embodiment of the present invention.
[0050] Figure 11 This is a schematic diagram comparing the original image (right) and the image after algorithm processing (right) of a high-speed motion deblurring method based on one-dimensional derivative convolution according to an embodiment of the present invention.
[0051] Figure 12 This is a schematic diagram comparing the original image (dark) and the image after algorithm processing (light) of a high-speed motion deblurring method based on one-dimensional derivative convolution according to an embodiment of the present invention, showing a comparison of gray line segment pixel sampling. Detailed Implementation
[0052] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other.
[0053] In the following description, many specific details are set forth in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0054] like Figure 1 As shown, this embodiment provides a high-speed motion deblurring method based on one-dimensional derivative convolution. The method includes:
[0055] S1. The camera captures a uint8 image with a fixed direction of motion blur, and a 3*3 Gaussian kernel is used to denoise the image.
[0056] The 8-bit unsigned integer (uint8) type is a standard data format widely used in image display and transmission. This invention directly processes image data of the 8-bit unsigned integer (uint8) type, avoiding the steps of normalization and data type conversion, reducing the amount of computation and memory consumption, thereby significantly improving processing speed and efficiency, and also improving its compatibility and universal applicability in practical applications.
[0057] S2, such as Figures 2 to 6 As shown, on a one-dimensional trajectory consistent with the direction of motion blur, the feature values of positive first-order derivative convolution, negative first-order derivative convolution, positive second-order derivative convolution, and negative second-order derivative convolution are calculated for each pixel to obtain the corresponding four feature maps for extracting multi-scale edge features.
[0058] Eigenvalues of positive first derivative convolution The calculation formula is:
[0059]
[0060] Eigenvalues of negative first derivative convolution The calculation formula is:
[0061]
[0062] Eigenvalues of positive second derivative convolution The calculation formula is:
[0063]
[0064] Eigenvalues of negative second derivative convolution The calculation formula is:
[0065]
[0066] Where P(x,y+i) is the gray value at pixel (x,u+i), n is any positive integer, usually 1, and T i Ui V i W i These are the coefficients of each eigenvalue, with specific values for T. -1 =-n, T0=0, T1=n; U -1 =n, U0=0, U1=-n; V -1 =n, V0 = -2n, V1 = n; W -1 =-n, W0=2n, W1=-n. T i U i V i W i The value of can only be 0 or a multiple of n, and will be related to the formula. offset.
[0067] t(*) is the truncation and rounding function, and its specific expression is:
[0068]
[0069] Where z is a random number, [*] is the rounding function, t(*) truncates out-of-bounds values outside of 0 to 255 and rounds all values to the nearest integer, ensuring that the values after the rounding function are all 8-bit positive integers (0 to 255) compatible with the original image format.
[0070] The four feature maps mentioned above reflect the edge intensity and its rate of change in the direction of motion of the image. The first derivative represents the edge intensity, while the second derivative represents the rate of change of the edge intensity. Multiplying the two together yields the combined information of edge intensity and rate of change.
[0071] S3, such as Figure 7 , Figure 8 As shown, based on the feature map obtained in step S2, a positive transition band compensation value Pos1(x,y) and a negative transition band compensation value Neg1(x,y) are calculated for transition band suppression to reduce the additional transition region caused by motion blur. Specifically, for any pixel (x,y), based on the positive and negative first and second derivative eigenvalues, the positive transition band compensation value Pos1(x,y) and the negative transition band compensation value Neg1(x,y) are calculated according to the following formula:
[0072]
[0073] S4, such as Figure 9 , 10As shown, based on the feature map obtained in step S2, the positive edge gradient compensation value Pos2(x,y) and the negative edge gradient compensation value Neg2(x,y) are calculated for edge gradient compensation to recover the weakened gradient information in the motion direction. Specifically, for any pixel (x,y), the positive edge gradient compensation value Pos2(x,y) and the negative edge gradient compensation value Neg2(x,y) are calculated using the following formula:
[0074]
[0075] S5. Combine the compensation values from all directions to obtain the grayscale value ω(x,y) of the deblurred image. The calculation formula is as follows:
[0076] ω(x,y)=t(P(x,y)-Pos1(x,y)+Neg1(x,y)-Pos2(x,y)+Ney2(x,y)).
[0077] Specifically, the compensation value fusion process (the above formula) includes: subtracting the positive compensation value Pos1(x,y) from the gray value of each pixel in the image, then adding the negative compensation value Neg1(x,y), then subtracting the positive compensation value Pos2(x,y) from the edge gradient, and finally adding the negative compensation value Neg2(x,y) from the edge gradient. Since the gray value range of uint8 type pixels is 0 to 255, subtraction is performed first, then addition is performed first, and then the remaining subtraction and addition are performed to avoid truncation of gray values that exceed the range.
[0078] like Figure 11 As shown, for Figure 11 The motion-blurred image on the left undergoes the above processing to obtain the clearer image on the right. The pixel values before and after processing are as follows: Figure 12 As shown, the dark areas represent the pixel values of the unprocessed image, and the light areas represent the pixel values of the processed image.
[0079] In this invention Figure 2-10 and Figure 12 The curves are all function graphs of a series of pixel grayscale values (see reference). Figure 11 The two vertical gray lines (this is the sampling column) represent the coordinates of the pixels, and the vertical axis represents the gray value. The higher the vertical axis, the brighter the pixel.
[0080] The present invention also provides a deblurring device using the above-described deblurring method. The device includes a camera, a memory, and a computing unit. The camera is fixed in one position to capture images of a high-speed moving object moving horizontally or vertically. The captured images are stored in the memory. The computing unit reads the images from the memory and calculates the feature values of positive first-order derivative convolution, negative first-order derivative convolution, positive second-order derivative convolution, and negative second-order derivative convolution for each pixel along a one-dimensional trajectory in the motion blur direction. These feature values are then temporarily stored in the memory. The computing unit reads the image and the cached derivative convolution feature values again and calculates the positive transition band compensation value, negative transition band compensation value, positive edge gradient compensation value, and negative edge gradient compensation value for each pixel. Finally, the computing unit fuses the compensation values in each direction to calculate the compensated grayscale value of each pixel and generates a deblurred image, which is then stored in the memory.
[0081] In summary, this invention proposes a high-speed motion deblurring method based on one-dimensional derivative convolution, comprising:
[0082] S1. Capture a uint8 image with a fixed direction of motion blur, and use a 3*3 Gaussian kernel to denoise the image.
[0083] S2. On the one-dimensional trajectory consistent with the direction of motion blur, calculate the feature values of positive first derivative convolution, negative first derivative convolution, positive second derivative convolution and negative second derivative convolution respectively, and obtain the corresponding four feature maps to extract multi-scale edge features.
[0084] S3. For any pixel, calculate the positive and negative transition band compensation values for transition band suppression based on the feature map obtained in step S2.
[0085] S4. For any pixel, calculate the positive and negative edge gradient compensation values based on the feature map obtained in step S2.
[0086] S5. Combine the compensation values in each direction to obtain the deblurred image.
[0087] The steps in this invention can be adjusted, combined, or deleted according to actual needs.
[0088] The units in the device of the present invention can be merged, divided, or reduced according to actual needs.
[0089] Although the invention has been disclosed in detail with reference to the accompanying drawings, it should be understood that these descriptions are merely exemplary and not intended to limit the application of the invention. The scope of protection of the invention is defined by the appended claims and may include various modifications, alterations, and equivalents made to the invention without departing from the scope and spirit of the invention.
Claims
1. A fast motion deblurring method based on one-dimensional derivative convolution, characterized in that, The method includes: S1. Capture a uint8 image with a fixed direction of motion blur, and use a 3*3 Gaussian kernel to denoise the image; S2. On the one-dimensional trajectory consistent with the direction of motion blur, calculate the feature values of positive first derivative convolution, negative first derivative convolution, positive second derivative convolution and negative second derivative convolution for each pixel, and obtain the corresponding four feature maps to extract multi-scale edge features. S3. For any pixel, calculate the positive and negative transition band compensation values for transition band suppression based on the feature map obtained in step S2. S4. For any pixel, calculate the positive and negative edge gradient compensation values for edge gradient compensation based on the feature map obtained in step S2. S5. Combine the compensation values in each direction to obtain the deblurred image.
2. The high-speed motion deblurring method based on one-dimensional derivative convolution as described in claim 1, characterized in that, All calculation results obtained during the calculation process are processed by the truncation and rounding function t(*), the specific expression of which is: Where z is a random number, [*] is the rounding function, t(*) truncates out-of-bounds values outside of 0 to 255 and rounds all values to the nearest integer.
3. The high-speed motion deblurring method based on one-dimensional derivative convolution as described in claim 2, characterized in that, The eigenvalues of the positive first-order derivative convolution calculated in step S2 The calculation formula is: Eigenvalues of negative first derivative convolution The calculation formula is: Eigenvalues of positive second derivative convolution The calculation formula is: Eigenvalues of negative second derivative convolution The calculation formula is: Where P(x,y+i) is the gray value at pixel (x,y+i), n is any positive integer, and T i U i V i W i These are the coefficients of each eigenvalue, with specific values for T. -1 =-n, T0=0, T1=n; U -1 =n, U0=0, U1=-n; V -1 =n, V0 = -2n, V1 = n; W -1 =-n, W0=2n, W1=-n.
4. The high-speed motion deblurring method based on one-dimensional derivative convolution as described in claim 3, characterized in that, The formulas for calculating the positive compensation value Pos1(x,y) and the negative compensation value Neg1(x,y) of the transition band in step S3 are as follows:
5. The high-speed motion deblurring method based on one-dimensional derivative convolution as described in claim 3, characterized in that, The formulas for calculating the positive edge gradient compensation value Pos2(x,y) and the negative edge gradient compensation value Neg2(x,y) in step S4 are as follows:
6. The high-speed motion deblurring method based on one-dimensional derivative convolution as described in any one of claims 4 or 5, characterized in that, Step S5 fuses the compensation values from each direction to obtain the grayscale value ω(x,y) of the deblurred image: ω(x,y)=t(P(x,y)-Pos1(x,y)+Neg1(x,y)-Pos2(x,y)+Neg2(x,y)).
7. A deblurring apparatus using the high-speed motion deblurring method based on one-dimensional derivative convolution as described in any one of claims 1 to 6, characterized in that, The device includes: a camera, a memory, and a computing unit; The camera is fixed in one position to capture high-speed moving objects in horizontal or vertical motion. The captured images are stored in the memory. The computing unit reads the images from the memory and calculates the feature values of positive first-order derivative convolution, negative first-order derivative convolution, positive second-order derivative convolution and negative second-order derivative convolution for each pixel on the one-dimensional trajectory in the direction of motion blur, and temporarily stores them in the memory. The computing unit reads the image and the cached derivative convolution feature values again, calculates the positive compensation value of the transition band, the negative compensation value of the transition band, the positive compensation value of the edge gradient, and the negative compensation value of the edge gradient for each pixel. Finally, the computing unit fuses the compensation values in each direction to calculate the gray value of each pixel after compensation, and generates a deblurred image which is stored in the memory.
Citation Information
Patent Citations
Image deblurring method and device based on motion detection
CN103440624A
Visual saliency-based image deblurring method
CN103514582A
