A visual imaging image reconstruction method based on motion blur effect analysis
By dividing the image into solid color regions and blurry regions, and combining motion compensation and pixel filling, the image blurring problem caused by rapid object movement is solved, and the blurry regions are effectively reconstructed and the sharpness is restored.
Patent Information
- Application Number
- CN202510895419.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-06-30
AI Technical Summary
Existing technologies struggle to effectively eliminate image blur caused by rapid object movement or camera shake, especially the overlapping effect of multiple images due to rapid object movement within the exposure time, which is difficult to determine.
By dividing and classifying solid color regions in continuously captured images, identifying the movement distance and direction of blurred regions, dividing the blurred regions into a first part to be reconstructed and a second part to be reconstructed, performing motion compensation correction on the pixels, and using the non-blurred regions for pixel filling and extension region updating, a clear image is reconstructed.
It effectively eliminates the blurring effect caused by fast-moving objects and fills the missing parts with color extension to ensure that the image clarity is not affected.
Smart Images

Figure CN120525764B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a visual imaging image reconstruction method based on motion blur effect analysis. BACKGROUND
[0002] Motion blur is a blur effect in images or videos caused by the rapid movement of objects or the shaking of cameras. This effect is usually caused by the movement of objects or cameras during the exposure time, and is common in photography, video shooting and computer vision. Camera shaking can be eliminated by reverse compensation of shaking measurement results. However, it is difficult to determine the rapid movement of different objects, which leads to the superposition effect of multiple images during the exposure time, so it is difficult to eliminate the blur effect caused by the rapid movement of objects. SUMMARY
[0003] To solve the above technical problems, a visual imaging image reconstruction method based on motion blur effect analysis is provided, which solves the problems raised in the background technology.
[0004] To achieve the above purpose, the technical scheme adopted by the present application is:
[0005] A visual imaging image reconstruction method based on motion blur effect analysis, comprising:
[0006] Obtaining at least one actual image continuously shot, and obtaining the exposure time of shooting;
[0007] Dividing the actual image according to pure color to obtain at least one pure color area;
[0008] Classifying the pure color area to obtain at least one blur area and non-blur area;
[0009] Identifying the movement of the blur area to obtain the movement distance and direction of the blur area;
[0010] Based on the movement distance and direction, the blur area is divided into a first to-be-reconstructed part and a second to-be-reconstructed part;
[0011] Classifying the pixel points in the first to-be-reconstructed part to obtain at least one pixel line, and the same type of pixel points are located on the same pixel line;
[0012] Moving compensation and correction are performed on the pixel points on the pixel line to obtain corrected pixel points;
[0013] Obtaining a non-blur area adjacent to the second to-be-reconstructed part as a target non-blur area;
[0014] Based on the target non-blur area, the second to-be-reconstructed part is segmented to obtain at least one extended area;
[0015] Based on the target non-blurred region, re-perform pixel filling on the extended region;
[0016] Update the first to-be-reconstructed part using the corrected pixel points, and update the second to-be-reconstructed part using the filled extended region, and when the first to-be-reconstructed part and the second to-be-reconstructed part are updated, the blurred region is completed, and the non-blurred region remains unchanged.
[0017] Preferably, the step of dividing the actual image into at least one pure color region according to pure colors comprises the following steps:
[0018] Aggregating the pixel points with equal pixel values in the actual image to form at least one same color region;
[0019] Taking the pixel points other than the same color region in the actual image as to-be-allocated points, randomly sorting the to-be-allocated points to obtain a to-be-allocated point sequence;
[0020] Allocating the to-be-allocated points according to the order of the to-be-allocated point sequence, deleting the allocated to-be-allocated points from the to-be-allocated point sequence, and repeating the allocation according to the order of the to-be-allocated point sequence until the to-be-allocated point sequence is empty;
[0021] When allocating, the to-be-allocated points are allocated to the same color region adjacent thereto, when there is no same color region adjacent to the to-be-allocated points, the to-be-allocated points are skipped, and when there are multiple same color regions adjacent to the to-be-allocated points, the difference between the pixel value of the to-be-allocated points and the pixel value of the adjacent same color region is calculated to obtain a pixel difference, and the to-be-allocated points are allocated to the same color region with the smallest pixel difference.
[0022] Preferably, the step of classifying the pure color region to obtain at least one blurred region and non-blurred region comprises the following steps:
[0023] Pre-acquire at least one sample image without object motion, divide the sample image according to pure colors to obtain at least one pure color sample region;
[0024] Narrow the contour of the pure color sample region with the center of the pure color sample region to obtain a feature contour, and the width of the annular region formed by the feature contour and the contour of the pure color sample region is equal to a preset value, and the preset value is the minimum value of the distance moved by the photographed object in the exposure time of the shooting in the historical data;
[0025] Take the maximum value of the pixel value difference of the pixel points in the annular region as an estimated value, and take the maximum value of at least one estimated value as a critical value;
[0026] The contour of the solid color region is reduced by the center of the solid color region to obtain a target contour, and the width of a ring-shaped region formed by the target contour and the contour of the solid color region is equal to a preset value;
[0027] The maximum value of the pixel value difference of the pixel points in the ring-shaped region is taken as a recognition value, and when the recognition value exceeds a threshold value, the solid color region is a fuzzy region, otherwise, the solid color region is a non-fuzzy region.
[0028] Preferably, the moving recognition of the fuzzy region to obtain the moving distance and the moving direction of the fuzzy region comprises the following steps:
[0029] The position coordinates of the center of the fuzzy region are obtained as first position coordinates;
[0030] The center of the fuzzy region in the next frame of actual image of the actual image where the fuzzy region is located is obtained as second position coordinates;
[0031] The direction of the vector generated by the difference between the second position coordinates and the first position coordinates is taken as the moving direction of the fuzzy region;
[0032] The distance between the second position coordinates and the first position coordinates is calculated using a distance formula to obtain the moving distance of the fuzzy region.
[0033] Preferably, the fuzzy region is divided into a first to-be-reconstructed part and a second to-be-reconstructed part based on the moving distance and the moving direction comprises the following steps:
[0034] The slope of the moving direction is taken as a target slope;
[0035] The contour of the fuzzy region is fitted to obtain a fuzzy contour fitting function, and the derivative of the fuzzy contour fitting function is obtained to obtain a tangent slope function;
[0036] The slope of the tangent of each point on the contour of the fuzzy region is calculated using the tangent slope function, and the point on the contour of the fuzzy region whose slope is equal to the target slope is obtained as a feature point;
[0037] The tangent of the contour of the fuzzy region at the feature point is recorded as a feature tangent, two of the feature tangents are selected as target tangents, and the region where the feature tangents are located between the two target tangents is taken as a target region, and the feature points corresponding to the target tangents are taken as target points;
[0038] The target points are connected to form a target line segment, and a cutting line is formed on both sides of the target line segment, and the distance from the cutting line to the target line segment is half of the moving distance of the fuzzy region;
[0039] The region between the cutting lines is taken as a cutting region, and the two parts of the contour of the fuzzy region outside the cutting region are taken as a first to-be-adjusted contour and a second to-be-adjusted contour, respectively.
[0040] translating the first to-be-adjusted contour and the second to-be-adjusted contour along the moving direction of the blur region until the end points of the first to-be-adjusted contour and the second to-be-adjusted contour coincide with the target line segment;
[0041] connecting the end point of the first to-be-adjusted contour with the end point of the second to-be-adjusted contour with which the first to-be-adjusted contour has the smallest distance, and the first to-be-adjusted contour and the second to-be-adjusted contour form a first to-be-reconstructed part after being connected;
[0042] taking the part of the blur region other than the first to-be-reconstructed part as a second to-be-reconstructed part.
[0043] Preferably, the step of classifying the pixel points in the first to-be-reconstructed part to obtain at least one pixel line comprises the following steps:
[0044] drawing a parallel line parallel to the moving direction of the blur region through the pixel point in the first to-be-reconstructed part, and removing the parallel line to obtain at least one pixel line, and the pixel points located on the same pixel line are of the same type.
[0045] Preferably, the step of performing movement compensation correction on the pixel points on the pixel line to obtain a corrected pixel point comprises the following steps:
[0046] acquiring the number of pixel points contained in the moving distance of the blur region in the actual image as a characteristic value;
[0047] sorting the pixel points on the pixel line according to the direction of the moving direction of the blur region to obtain a pixel point sequence;
[0048] taking the n pixel points after the pixel point in the pixel point sequence as the affiliated pixel points of the pixel point, n being the characteristic value minus one;
[0049] correcting the pixel point according to the order of the pixel point sequence, and obtaining the corrected pixel point after the correction, and during the correction, the pixel value of the affiliated pixel point of the pixel point is updated to the pixel value of the affiliated pixel point of the pixel point minus the pixel value of the pixel point.
[0050] Preferably, the step of acquiring a non-blur region adjacent to the second to-be-reconstructed part as a target non-blur region comprises the following steps:
[0051] taking the non-blur region having contour coincidence with the second to-be-reconstructed part as the target non-blur region.
[0052] Preferably, the step of segmenting the second to-be-reconstructed part to obtain at least one extended region comprises the following steps:
[0053] acquiring the contour coincidence part of the second to-be-reconstructed part and the target non-blur region as a coincidence contour line.
[0054] Segmenting the second part to be reconstructed using the tangent lines at the end points of the coincident contour lines to obtain a preliminary region;
[0055] Taking the part of the second part to be reconstructed other than the preliminary region as an evaluation region;
[0056] Collecting the pixel points in the evaluation region into the preliminary region with the smallest distance, and after the collection is completed, taking the preliminary region as an extended region and matching the target non-blurred region corresponding to the preliminary region to the extended region.
[0057] Preferably, the re-pixel filling of the extended region based on the target non-blurred region comprises the following steps:
[0058] Filling the extended region with the pixel values of the pixel points in the target non-blurred region corresponding to the extended region.
[0059] Compared with the prior art, the present application has the beneficial effects that:
[0060] By classifying the solid color region, dividing the blurred region into the first part to be reconstructed and the second part to be reconstructed, moving and compensating the pixel points on the pixel line and re-pixel filling the extended region, the moving speed of the object can be identified, and corresponding blur elimination can be performed according to the different moving speed and direction of the object, so that the effect of the object superimposed during exposure can be eliminated in a targeted manner, and the color of the vacancy part after elimination can be extended and filled, so that the image after blur elimination can not produce a jarring effect. BRIEF DESCRIPTION OF DRAWINGS
[0061] Figure 1 A flowchart of the visual imaging image reconstruction method based on the motion blur effect analysis of the present application;
[0062] Figure 2 A flowchart of dividing the actual image according to solid color to obtain at least one solid color region of the present application;
[0063] Figure 3 A flowchart of classifying the solid color region to obtain at least one blurred region and non-blurred region of the present application;
[0064] Figure 4 A flowchart of moving identification of the blurred region to obtain the moving distance and moving direction of the blurred region of the present application;
[0065] Figure 5 A flowchart of dividing the blurred region into the first part to be reconstructed and the second part to be reconstructed based on the moving distance and moving direction of the present application;
[0066] Figure 6 A flowchart for moving compensation correction of the pixel points on the pixel line to obtain the corrected pixel points is shown in the figure;
[0067] Figure 7 A flowchart for segmenting the second to-be-reconstructed part to obtain at least one extended region is shown in the figure. DETAILED DESCRIPTION
[0068] The following description is provided to enable those skilled in the art to carry out the present application. The preferred embodiments in the following description are only examples and other obvious modifications can be made by those skilled in the art.
[0069] Referring to Figure 1 The visual imaging image reconstruction method based on motion blur effect analysis includes:
[0070] At least one actual image continuously taken is obtained, and the exposure time of the taking is obtained;
[0071] The actual image is divided according to the pure color to obtain at least one pure color region;
[0072] The pure color region is classified to obtain at least one blur region and a non-blur region;
[0073] The blur region is identified for movement to obtain the movement distance and the movement direction of the blur region;
[0074] Based on the movement distance and the movement direction, the blur region is divided into a first to-be-reconstructed part and a second to-be-reconstructed part;
[0075] The pixel points in the first to-be-reconstructed part are classified to obtain at least one pixel line, and the pixel points of the same type are located on the same pixel line;
[0076] The pixel points on the pixel line are corrected for movement compensation to obtain corrected pixel points;
[0077] The non-blur region adjacent to the second to-be-reconstructed part is obtained as a target non-blur region;
[0078] Based on the target non-blur region, the second to-be-reconstructed part is segmented to obtain at least one extended region;
[0079] Based on the target non-blur region, the extended region is re-filled with pixels;
[0080] The first to-be-reconstructed part is updated using the corrected pixel points, and the second to-be-reconstructed part is updated using the filled extended region. When the first to-be-reconstructed part and the second to-be-reconstructed part are updated, the blur region is completed, and the non-blur region remains unchanged.
[0081] In actual image acquisition, the moving object in the image is usually uncertain in its speed and direction of movement, and the object motion blur is mainly caused by the exposure of the camera or the camera when each image is acquired. When the object moves, the multiple motion images of the object in the exposure time will be stacked, thereby forming a blurred effect. Different objects have different directions and speeds of movement, so the stacking of the objects is different. Therefore, the blur needs to be eliminated according to the actual situation. Since the object image is stacked, the area of the object blurred image will be larger than that of the clear image. When the blur is eliminated, the empty part generated after the elimination also needs to be processed. In the present scheme, the above-mentioned problems are solved.
[0082] For example, the virtual shadow of a car is slightly larger than itself.
[0083] Referring to Figure 2 The actual image is divided into at least one pure color area according to the following steps:
[0084] The pixel points with equal pixel values in the actual image are aggregated to form at least one same color area.
[0085] The pixel points in the actual image except the same color area are taken as the to-be-assigned points, the to-be-assigned points are randomly sorted to obtain a to-be-assigned point sequence.
[0086] The to-be-assigned points are assigned in the order of the to-be-assigned point sequence, the assigned to-be-assigned points are deleted from the to-be-assigned point sequence, and the repeated assignment is performed in the order of the to-be-assigned point sequence until the to-be-assigned points in the to-be-assigned point sequence are empty.
[0087] When assigning, the to-be-assigned points are assigned to the same color area adjacent to the to-be-assigned points. When there is no same color area adjacent to the to-be-assigned points, the to-be-assigned points are skipped. When there are multiple same color areas adjacent to the to-be-assigned points, the difference between the pixel values of the to-be-assigned points and the adjacent same color areas is calculated to obtain a pixel difference, and the to-be-assigned points are assigned to the same color area with the smallest pixel difference.
[0088] In order to reduce the difficulty of identification, the pure color region is divided when the blur is removed. In the image, different parts are different colors, so different division can be made, but when the division is made, it is not completely the same according to the color, because the division of the to-be-allocated point is also made, so in the pure color region, it contains similar colors, such as the same color but light or dark color. This division can divide the motion blur region into the same pure color region. For example, the same color part in the object, when moving, the edge of the image of the part will appear blurred, but it is the same color as the original color, only the color is lighter, so according to the division of the pure color region, the blurred image of the part will be divided into the same pure color region, so that the subsequent processing of the pure color region is carried out, that is, the blur is removed.
[0089] Referring to Figure 3 The classification of the pure color region is obtained by the following steps:
[0090] At least one sample image without object motion is obtained in advance, and the sample image is divided according to the pure color to obtain at least one pure color sample region;
[0091] The contour of the pure color sample region is reduced with the center of the pure color sample region to obtain a feature contour, and the width of the annular region formed by the feature contour and the contour of the pure color sample region is equal to a preset value, and the preset value is the minimum value of the distance moved by the photographed object in the exposure time of the shooting in the historical data;
[0092] The maximum value of the pixel value difference of the pixel points in the annular region is taken as an estimated value, and the maximum value of the at least one estimated value is taken as a critical value;
[0093] The contour of the pure color region is reduced with the center of the pure color region to obtain a target contour, and the width of the annular region formed by the target contour and the contour of the pure color region is equal to a preset value;
[0094] The maximum value of the pixel value difference of the pixel points in the annular region is taken as an estimated value, and the maximum value of the at least one estimated value is taken as a critical value;
[0095] The pure color region includes two kinds, one is without blur, that is, the image region of the object without motion or with slow motion, and the other is the image region of the object with fast motion. Because it is a pure color region, when it is not a blur region, the difference is very small, and the most blurred part of the blur region is the edge part, so the division of the pure color region is made according to the principle;
[0096] It is noted here that the width of the annular region refers to the width of the ring, not the width of the area covered by the entire ring, for example, for a circular ring with an inner diameter of 10 cm and an outer diameter of 11 cm, the width of the annular region is 1 cm, not 22 cm.
[0097] Referring to Figure 4 Fig. 2, the moving identification of the blur region to obtain the moving distance and the moving direction of the blur region includes the following steps:
[0098] Obtaining the position coordinates of the center of the blur region as the first position coordinates;
[0099] Obtaining the center of the blur region in the next frame of the actual image in which the blur region is located as the second position coordinates;
[0100] Taking the direction of the vector generated by the difference between the second position coordinates and the first position coordinates as the moving direction of the blur region;
[0101] Using the distance formula to calculate the distance between the second position coordinates and the first position coordinates to obtain the moving distance of the blur region.
[0102] Here, since the time difference between adjacent images is very small, the blur of the same object is consistent, so the movement of the center of the blur region is consistent with the actual movement of the object, and the center can be obtained by calculating the center of gravity of the blur region, which is a basic knowledge in calculus, and the coordinates of the center of gravity can be taken as the center;
[0103] Taking the second position coordinates (x, y) and the first position coordinates (z, w) as an example, the distance between the second position coordinates and the first position coordinates is .
[0104] Referring to Figure 5 Fig. 3, the division of the blur region into a first to-be-reconstructed part and a second to-be-reconstructed part based on the moving distance and the moving direction includes the following steps:
[0105] Taking the slope of the moving direction as the target slope;
[0106] Fitting the contour of the blur region to obtain a blur contour fitting function, and taking the derivative of the blur contour fitting function to obtain a tangent slope function;
[0107] Using the tangent slope function to calculate the slope of the tangent line of each point on the contour of the blur region, and obtaining the point on the contour of the blur region with a slope equal to the target slope as a feature point;
[0108] The tangent line of the contour of the blur area at the feature point is denoted as a feature tangent line, two of the feature tangent lines are selected as target tangent lines, and the region where the feature tangent lines are located between the two target tangent lines is satisfied, and the feature points corresponding to the target tangent lines are taken as target points;
[0109] The target points are connected to form a target line segment, and cutting lines are formed on both sides of the target line segment, and the distance from the cutting line to the target line segment is half of the moving distance of the blur area;
[0110] The region between the cutting lines is taken as a cutting region, and the two parts of the contour of the blur area outside the cutting region are taken as a first to-be-adjusted contour and a second to-be-adjusted contour respectively;
[0111] The first to-be-adjusted contour and the second to-be-adjusted contour are respectively translated along the moving direction of the blur area until the end points of the first to-be-adjusted contour and the second to-be-adjusted contour coincide with the target line segment;
[0112] The end point of the first to-be-adjusted contour is connected with the end point of the second to-be-adjusted contour which is closest to it, and the first to-be-adjusted contour and the second to-be-adjusted contour form a first to-be-reconstructed part after being connected;
[0113] The part of the blur area except the first to-be-reconstructed part is taken as a second to-be-reconstructed part.
[0114] When reconstructing the blur area, since the blur area is composed of the superposition of multiple motion images of the object, it will be slightly larger than the clear image, so it is necessary to determine the first to-be-reconstructed part for clear image reconstruction in the blur area. When determining the first to-be-reconstructed part, the moving distance and the moving direction of the blur area are determined, and the reduction of the blur area needs to be consistent with the moving distance of the blur area, because the extra part is caused by the moving distance of the blur area, and the blur is caused by the stacking of the object along its moving direction, so the reduction needs to be along the moving direction of the blur area;
[0115] Taking a car as an example, the target points must be located at certain positions on the top and bottom of the car, and then the lines connecting the target points are used to perform inward retraction from both sides, so the second to-be-reconstructed part will be distributed on both sides of the first to-be-reconstructed part, and thus will be narrower. Therefore, the filling effect will be better than the case where the second to-be-reconstructed part is concentrated on one side, because the filling of the second to-be-reconstructed part will not perfectly fit the environment, so the defects are more easily found when concentrated on one side;
[0116] In actual situations, the feature points may be more than two, so reduction is needed, and the two outermost feature points are used as target points according to the acquisition method.
[0117] Classifying the pixel points in the first to-be-reconstructed part to obtain at least one pixel line comprises the following steps:
[0118] Drawing a parallel line through the pixel points in the first to-be-reconstructed part and parallel to the moving direction of the blur area, de-duplicating the parallel line to obtain at least one pixel line, and the pixel points located on the same pixel line are of the same type.
[0119] Referring to Figure 6 Fig. 2, the moving compensation correction of the pixel points on the pixel line comprises the following steps:
[0120] Obtaining the number of pixel points contained in the moving distance of the blur area in the actual image as a characteristic value;
[0121] Sorting the pixel points on the pixel line according to the direction of the moving direction of the blur area to obtain a pixel point sequence;
[0122] Taking the n pixel points after the pixel point in the pixel point sequence as the affiliated pixel points of the pixel point, n being the characteristic value minus one;
[0123] Correcting the pixel points according to the order of the pixel point sequence, and obtaining the corrected pixel points after the correction, wherein the pixel value of the affiliated pixel points of the pixel points is updated to the pixel value of the affiliated pixel points of the pixel points minus the pixel value of the pixel points during the correction.
[0124] Each pixel point in the blur area is moved according to the moving distance and the moving direction of the blur area, so the position of each pixel point is needed to be obtained. The direction of the pixel point movement is along the pixel line, and the distance of the movement is the moving distance of the blur area within the exposure time. The number of pixel points contained in the moving distance of the blur area is the characteristic value. However, since the initial pixel point is contained, the pixel points that have the superposition effect of the initial pixel point are only the subsequent n pixel points. Therefore, the pixel values of the subsequent n pixel points of each pixel point on the pixel line are superimposed and eliminated, so that the superposition effect of the pixel points is eliminated. During the elimination, the order of the pixel point sequence must be followed, so that the superposition effect of each pixel point is eliminated in turn. Thus, the blur removal is completed.
[0125] Obtaining a non-blur area adjacent to the second to-be-reconstructed part as a target non-blur area comprises the following steps:
[0126] Taking the non-blur area that has contour coincidence with the second to-be-reconstructed part as the target non-blur area.
[0127] Referring to Figure 7 Fig. 3, the segmentation of the second to-be-reconstructed part to obtain at least one extended area comprises the following steps:
[0128] Obtaining a part of the second to-be-reconstructed part coinciding with the outline of the target non-blurred region as a coinciding outline;
[0129] Segmenting the second to-be-reconstructed part using a tangent line at an end point of the coinciding outline to obtain a preliminary region;
[0130] Taking a part of the second to-be-reconstructed part other than the preliminary region as an evaluation region;
[0131] Collecting pixel points in the evaluation region into the preliminary region with the smallest distance, and after the collection is completed, taking the preliminary region as an extended region and matching the target non-blurred region corresponding to the preliminary region to the extended region.
[0132] Re-performing pixel filling in the extended region based on the target non-blurred region includes the following steps:
[0133] Filling the extended region using pixel values of pixel points in the target non-blurred region corresponding to the extended region.
[0134] Further, the present application also provides a storage medium having a computer readable program stored thereon, and the computer readable program is called to execute the above-mentioned visual imaging image reconstruction method based on motion blur effect analysis.
[0135] It can be understood that the storage medium can be a magnetic medium, such as a floppy disk, a hard disk, a magnetic tape, an optical medium such as a DVD, or a semiconductor medium such as a solid state disk (SSD), etc.
[0136] In summary, the present application has the advantages that by classifying the pure color region, dividing the blurred region into a first to-be-reconstructed part and a second to-be-reconstructed part, moving compensation correction of the pixel points on the pixel line, and re-performing pixel filling in the extended region, the moving speed of the object can be identified, and corresponding blur elimination is performed according to the different moving speed and direction of the object, so that the effect of the object superimposed during exposure can be eliminated in a targeted manner, and the color of the eliminated vacancy part is filled, so that the image after blur elimination will not have a jarring effect.
[0137] The basic principles, main features and advantages of the present application are shown and described above. It should be understood by those skilled in the art that the present application is not limited by the above-mentioned embodiments, and the above-mentioned embodiments and descriptions in the specification are only the principles of the present application. Without departing from the spirit and scope of the present application, various changes and improvements can be made to the present application, and these changes and improvements all fall within the scope of the claimed present application. The scope of protection claimed by the present application is defined by the appended claims and their equivalents.
Claims
1. A method of visual imaging image reconstruction based on motion blur effect analysis, characterized in that, The method comprises the following steps: acquiring at least one actual image continuously shot, and acquiring an exposure time of the shot; dividing the actual image according to pure colors to obtain at least one pure color region; classifying the pure color region to obtain at least one blur region and a non-blur region; performing movement identification on the blur region to obtain a movement distance and a movement direction of the blur region; dividing the blur region into a first to-be-reconstructed part and a second to-be-reconstructed part based on the movement distance and the movement direction; classifying pixel points in the first to-be-reconstructed part to obtain at least one pixel line, and pixel points of the same kind are located on the same pixel line; performing movement compensation correction on the pixel points on the pixel line to obtain corrected pixel points; acquiring a non-blur region adjacent to the second to-be-reconstructed part as a target non-blur region; segmenting the second to-be-reconstructed part based on the target non-blur region to obtain at least one extended region; re-performing pixel filling on the extended region based on the target non-blur region; updating the first to-be-reconstructed part by using the corrected pixel points and updating the second to-be-reconstructed part by using the filled extended region, and when the first to-be-reconstructed part and the second to-be-reconstructed part are updated, the blur region is reconstructed, and the non-blur region remains unchanged.
2. The method of claim 1, wherein, The method comprises the following steps: aggregating pixel points with equal pixel values in the actual image to form at least one same-color region; sorting the pixel points to be distributed randomly to obtain a sequence of the pixel points to be distributed; distributing the pixel points to be distributed according to the sequence of the pixel points to be distributed, deleting the pixel points to be distributed from the sequence of the pixel points to be distributed after the distribution, and repeatedly distributing the pixel points to be distributed according to the sequence of the pixel points to be distributed until the sequence of the pixel points to be distributed is empty; when distributing, distributing the pixel points to be distributed to the same-color region adjacent to the pixel points to be distributed, when there is no same-color region adjacent to the pixel points to be distributed, skipping the pixel points to be distributed, and when there are multiple same-color regions adjacent to the pixel points to be distributed, calculating a difference between the pixel value of the pixel points to be distributed and the pixel value of the adjacent same-color region to obtain a pixel difference, and distributing the pixel points to be distributed to the same-color region with the smallest pixel difference.
3. The method of claim 2, wherein the method further comprises: The method comprises the following steps: pre-acquiring at least one sample image without object movement, dividing the sample image according to pure colors to obtain at least one pure color sample region; narrowing the contour of the pure color sample region to obtain a feature contour with the center of the pure color sample region, and the width of the annular region formed by the feature contour and the contour of the pure color sample region is equal to a preset value, and the preset value is the minimum value of the distance moved by the photographed object in the exposure time of the shot in historical data; taking the maximum value of the pixel value difference of the pixel points in the annular region as an estimated value, and taking the maximum value of at least one estimated value as a critical value; narrowing the contour of the pure color region to obtain a target contour with the center of the pure color region, and the width of the annular region formed by the target contour and the contour of the pure color region is equal to the preset value. The maximum value of the pixel value difference of the pixels in the annular region is taken as a recognition value, and when the recognition value exceeds a threshold value, the pure color region is a fuzzy region, otherwise, the pure color region is a non-fuzzy region.
4. The method of claim 3, wherein, The moving recognition of the fuzzy region to obtain the moving distance and the moving direction of the fuzzy region comprises the following steps: The position coordinates of the center of the fuzzy region are obtained as first position coordinates; The center of the fuzzy region in the next frame of the actual image of the actual image where the fuzzy region is located is obtained as second position coordinates; The direction of the vector obtained by subtracting the first position coordinates from the second position coordinates is taken as the moving direction of the fuzzy region; The distance between the second position coordinates and the first position coordinates is calculated using a distance formula to obtain the moving distance of the fuzzy region.
5. The method of claim 4, wherein, The fuzzy region is divided into a first to-be-reconstructed part and a second to-be-reconstructed part based on the moving distance and the moving direction, which comprises the following steps: The slope of the moving direction is taken as a target slope; The contour of the fuzzy region is fitted to obtain a fuzzy contour fitting function, and the derivative of the fuzzy contour fitting function is obtained to obtain a tangent slope function; The slope of the tangent of each point on the contour of the fuzzy region is calculated using the tangent slope function, and the point on the contour of the fuzzy region whose slope is equal to the target slope is obtained as a feature point; The tangent of the contour of the fuzzy region at the feature point is recorded as a feature tangent, and two target tangents are selected from the feature tangent, which satisfy that the feature tangents are located between the two target tangents, and the feature points corresponding to the target tangents are taken as target points; The target points are connected to form a target line segment, and cutting lines are formed on both sides of the target line segment, and the distance from the cutting line to the target line segment is half of the moving distance of the fuzzy region; The region between the cutting lines is taken as a cutting region, and the two parts of the contour of the fuzzy region outside the cutting region are taken as a first to-be-adjusted contour and a second to-be-adjusted contour, respectively. The first to-be-adjusted contour and the second to-be-adjusted contour are translated along the moving direction of the fuzzy region until the end points of the first to-be-adjusted contour and the second to-be-adjusted contour coincide with the target line segment. The end point of the first to-be-adjusted contour is connected with the end point of the second to-be-adjusted contour which is closest to it, and after the connection, the first to-be-adjusted contour and the second to-be-adjusted contour form a first to-be-reconstructed part. The part of the fuzzy region other than the first to-be-reconstructed part is taken as a second to-be-reconstructed part.
6. The method of claim 5, wherein the method further comprises: The pixel points in the first to-be-reconstructed part are classified to obtain at least one pixel line, which comprises the following steps: Parallel lines parallel to the moving direction of the fuzzy region are drawn through the pixel points in the first to-be-reconstructed part, and the parallel lines are de-duplicated to obtain at least one pixel line, and the pixel points located on the same pixel line are of the same type.
7. The method of claim 6, wherein the method further comprises: The pixel points on the pixel line are moved and compensated to obtain modified pixel points, which comprises the following steps: The number of pixel points contained in the moving distance of the fuzzy region in the actual image is taken as a feature value; The pixel points on the pixel line are sorted according to the direction of the moving direction of the fuzzy region to obtain a pixel point sequence; The n pixel points after the pixel point in the pixel point sequence are taken as the affiliated pixel points of the pixel point, and n is the feature value minus one. The pixel points are corrected in sequence of the pixel point sequence, and after the correction, the corrected pixel points are obtained; during the correction, the pixel value of the affiliated pixel point of the pixel point is updated as the pixel value of the affiliated pixel point of the pixel point minus the pixel value of the pixel point.
8. The method of claim 7, wherein the method further comprises: The step of obtaining the non-blurred area adjacent to the second part to be reconstructed as the target non-blurred area comprises the following steps: The non-blurred area which is profile coincident with the second part to be reconstructed is taken as the target non-blurred area.
9. The method of claim 8, wherein the method further comprises: The step of segmenting the second part to be reconstructed to obtain at least one extended area comprises the following steps: Obtaining the profile coincident part of the second part to be reconstructed and the target non-blurred area as the coincident profile line; Segmenting the second part to be reconstructed using the tangent line at the end point of the coincident profile line to obtain a preliminary area; Taking the part of the second part to be reconstructed other than the preliminary area as an area to be evaluated; The pixel points in the area to be evaluated are summarized into the preliminary area with the smallest distance, and after the summarization, the preliminary area is taken as the extended area, and the target non-blurred area corresponding to the preliminary area is matched to the extended area.
10. The method of claim 9, wherein, The step of re-performing pixel filling in the extended area based on the target non-blurred area comprises the following steps: The extended area is filled with the pixel value of the pixel point in the target non-blurred area corresponding to the extended area.
Citation Information
Patent Citations
Video recording method and device
CN105657311A
Image processing method, device and equipment and storage medium
CN111627026A