Picture de-warping method and apparatus

By using a preset formula to convert the pixels of a blank image to the original image during the image distortion correction process, and assigning pixel values ​​based on the converted pixel positions, and removing solid color areas, the problem of view loss and solid color borders in existing technologies is solved, achieving a smaller view loss and borderless effect.

CN116309128BActive Publication Date: 2025-12-16NEOLITHIC HUITONG TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310127359.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-02
Publication Date
2025-12-16
Estimated Expiration
2043-02-02

AI Technical Summary

Technical Problem

Existing image distortion correction methods suffer from visual loss and invalid border regions during processing.

Method used

The pixels of the blank image are converted to the original image using a preset distortion correction formula. Then, the pixel values ​​are assigned based on whether the positions of the converted pixels are within the range of the original image. Finally, the solid color areas in the blank image are removed to obtain the distortion-corrected image.

Benefits of technology

This achieves both reduced visual loss and avoidance of solid color borders in the distorted image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116309128B_ABST
    Figure CN116309128B_ABST
Patent Text Reader

Abstract

The application provides a picture de-distortion method and device. Pixel points of a blank picture are converted to an original picture through a de-distortion formula, pixel value assignment is performed on the pixel points in the blank picture according to whether the converted pixel point positions are within the range of the original picture, and finally, a rectangular region obtained by cutting off a pure color region in the pixel value assigned blank picture is taken as a de-distorted picture, so that both a small loss of field of view and no pure color border around the picture can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image distortion correction technology, and more specifically, to an image distortion correction method and apparatus. Background Technology

[0002] Misalignment in camera lens manufacturing and assembly processes introduces distortion, leading to image distortion. Lens distortion is further categorized into radial distortion and tangential distortion (e.g.,...). Figure 1 In the distortion diagram shown, the left image represents the actual shape of the object, the middle image represents tangential distortion, and the right image represents radial distortion.

[0003] Images captured by a camera lens need to undergo distortion correction to restore the true shape of objects. Currently, the commonly used OpenCV distortion correction method results in a significant loss of the camera's field of view. If OpenCV's `getOptimalNewCameraMatrix` and `remap` functions are used, with the alpha parameter set to 1 (to preserve the maximum field of view), then solid-color borders (useless pixels) will be generated around the image. Summary of the Invention

[0004] This invention addresses the problem of existing distortion correction schemes for camera-captured images, which suffer from loss of field of view and the presence of useless pixels around the edges.

[0005] To address the aforementioned problems, this invention provides an image distortion correction method. The method includes: determining, according to a preset distortion correction formula, all first pixels in a blank image corresponding to second pixels before distortion correction; the preset distortion correction formula is used to determine the pixels in the original image and the pixels in the distorted image; the height and width of the blank image are greater than the height and width of the original image, respectively; determining whether the coordinates of the second pixel exceed the range of the original image; if so, assigning a preset value to the pixel value of the first pixel corresponding to the second pixel; if not, assigning the pixel value of the first pixel corresponding to the second pixel to the pixel value of the second pixel; determining the upper extreme value, lower extreme value, left extreme value, and right extreme value of a solid color region in the blank image; the solid color region is composed of pixels with pixel values ​​of the preset value; saving a rectangular region in the blank image after pixel value assignment as the distorted image; the rectangular region is determined by the upper extreme value, lower extreme value, left extreme value, and right extreme value.

[0006] Optionally, the upper extreme value is the ordinate of the closest point to the image region in the solid color region above the image region in the blank image, the lower extreme value is the ordinate of the closest point to the image region in the solid color region below the image region, the left extreme value is the abscissa of the leftmost point of the two solid color regions, and the right extreme value is the abscissa of the rightmost point of the two solid color regions; the image region is composed of pixels whose pixel value is the pixel value of the second pixel point.

[0007] Optionally, the method further includes: if the coordinates of the second pixel point exceed the range of the original image, then saving the original image coordinates corresponding to the first pixel point as a fixed value; if the coordinates of the second pixel point do not exceed the range of the original image, then saving the original image coordinates corresponding to the first pixel point as the coordinate value of the second pixel point.

[0008] Optionally, the method further includes: saving the original image coordinates corresponding to all the first pixels in the rectangular region to obtain remapping parameters.

[0009] Optionally, the method further includes: extracting identical rectangular regions from the remapped image based on the rectangular region, and saving them as a remapped parameter image; the remapped image stores the coordinates of the first pixel and the original image coordinates corresponding to the first pixel.

[0010] Optionally, the method further includes: if a new original image is obtained, mapping the new original image to the distortion-free image according to the remapping parameters or the remapping parameter image.

[0011] Optionally, the height and width of the blank image are twice the height and width of the original image, respectively.

[0012] Optionally, the preset value is different from the pixel value of the second pixel.

[0013] This invention provides an image distortion correction device, comprising: a distortion correction calculation module, configured to determine, according to a preset distortion correction formula, all first pixels in a blank image corresponding to second pixels before distortion correction; the preset distortion correction formula is used to determine the pixels in the original image as pixels in the image after distortion correction; the height and width of the blank image are greater than the height and width of the original image, respectively; a judgment module, configured to determine whether the coordinates of the second pixel exceed the range of the original image; and a pixel value assignment module, configured to, if the coordinates exceed the range of the original image, assign the second pixel to... The pixel value of the first pixel is assigned a preset value; if it does not exceed the range of the original image, the pixel value of the first pixel corresponding to the second pixel is assigned the pixel value of the second pixel; the extreme value determination module is used to determine the upper extreme value, lower extreme value, left extreme value and right extreme value of the solid color area in the blank image; the solid color area is composed of pixels with pixel values ​​of the preset value; the segmentation module is used to save the rectangular area in the blank image after pixel value assignment as a distortion-free image; the rectangular area is determined by the upper extreme value, lower extreme value, left extreme value and right extreme value.

[0014] Optionally, the upper extreme value is the ordinate of the closest point to the image region in the solid color region above the image region in the blank image, the lower extreme value is the ordinate of the closest point to the image region in the solid color region below the image region, the left extreme value is the abscissa of the leftmost point of the two solid color regions, and the right extreme value is the abscissa of the rightmost point of the two solid color regions; the image region is composed of pixels whose pixel value is the pixel value of the second pixel point.

[0015] This invention converts the pixels of a blank image to the original image using a distortion correction formula. Then, it assigns pixel values ​​to the pixels in the blank image based on whether the converted pixel positions are within the range of the original image. Finally, it uses the rectangular area obtained by cutting out the solid color area in the blank image as the distortion-corrected image. This approach achieves both minimal loss of field of view and the absence of solid color borders around the image. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0017] Figure 1 This is a diagram illustrating the distortion.

[0018] Figure 2The original image before distortion correction;

[0019] Figure 3 This is an image after distortion has been removed using the OpenCV undistort function;

[0020] Figure 4 This is a schematic flowchart illustrating an image distortion correction method provided in an embodiment of the present invention.

[0021] Figure 5 A blank image filled with pixels;

[0022] Figure 6 The image obtained from the new distortion correction algorithm;

[0023] Figure 7 This is a schematic diagram of the structure of an image distortion correction device according to an embodiment of the present invention. Detailed Implementation

[0024] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0025] Figure 2 The original image before distortion correction is shown. Figure 3 The image shown is an example of a distortion-removed image using the OpenCV undistort function. It can be observed that the distortion-removed image... Figure 2 A 25% loss of field of view is observed (the degree of loss can be determined by comparing the number of horizontal QR codes). If OpenCV's getOptimalNewCameraMatrix and remap functions are used, and alpha is set to 1, solid-color areas (usually black borders) will be generated around the image.

[0026] In response to the problems of the above image distortion correction schemes, how to design a distortion correction algorithm that results in less loss of field of view and no black borders around the image has become an urgent need for many image processing algorithms.

[0027] The image distortion correction algorithm is as follows:

[0028] Most camera intrinsic calibration algorithms use a polynomial to fit the radial and tangential distortions of the camera. Here, xmin represents the normalized coordinates before distortion correction, and xi... d y a denoted by , r represents the distance between the pixel and the optical center, and k and p are the radial and tangential distortion parameters to be determined.

[0029] The formula for tangential distortion is as follows:

[0030] x d =x(1+k1r) 2 +k2r 4 +k3r 6 ),

[0031] y d =y(1+k1r 2 +k2r 4 +k3r 6 (1)

[0032] The radial distortion formula is as follows:

[0033] x d =x+[2p1xy+p2(r) 2 +2x 2 )],

[0034] y d =y+[p1(r 2 +2y 2 )+2p2xy] (2)

[0035] This formula shows that if we consider the pixels (x) in a distorted image... d y d If there is no corresponding solution (x, y) in the original image, then black pixels are used to fill the image after distortion correction, which is the reason for the aforementioned black border.

[0036] Figure 4 This is a schematic flowchart of an image distortion correction method provided in an embodiment of the present invention. The method includes:

[0037] S402, based on the preset distortion correction formula, determine the second pixel point before distortion correction for all first pixel points in the blank image.

[0038] The preset distortion correction formula is used to determine the pixel points in the original image and their corresponding pixel points in the distorted image. Based on this formula, the coordinates of each pixel point in the original image can be converted to the coordinates of the corresponding pixel point in the distorted image, and correspondingly, the coordinates of each pixel point in the distorted image can also be converted to the coordinates of the pixel point in the original image. It should be noted that when converting the coordinates of each pixel point in the distorted image to the coordinates of the pixel point in the original image, a certain pixel point may not have a corresponding pixel point in the original image, that is, the coordinates of the pixel point are outside the coordinate range of the original image. For example, the preset distortion correction formula is as shown in formulas (1)-(2) above.

[0039] To ensure that all pixels in the original image have a corresponding pixel in the blank image, and because some pixels in the original image may be repositioned beyond their original position after distortion correction, the height and width of the blank image are set to be greater than those of the original image. For example, the height and width of the blank image are set to twice the height and width of the original image.

[0040] S404, determine whether the coordinates of the second pixel exceed the coordinate range of the original image. If yes, proceed to S406; otherwise, proceed to S408.

[0041] If the coordinates of the second pixel obtained based on the distortion correction formula exceed the coordinate range of the original image, then the first pixel actually has no corresponding pixel in the original image, and its pixel value can be set to a preset value. The coordinate range of the original image can be determined by the horizontal and vertical pixel counts of the original image, i.e., the area of ​​the original image is determined by its width and height. The second pixel obtained based on the distortion correction formula also uses the coordinate system of the original image. The pixel values ​​of all first pixels that have no corresponding pixel in the original image can be set to the same preset value. If the coordinates of the second pixel obtained based on the distortion correction formula are within the range of the original image, then the pixel value of the first pixel is normally set to the pixel value of the second pixel.

[0042] S406, assign the pixel value of the first pixel corresponding to the second pixel to the preset value.

[0043] This preset value differs from the pixel values ​​of each pixel in the original image, thus distinguishing between the first pixel that has a corresponding pixel in the original image and the first pixel that does not have a corresponding pixel in the original image. The first pixel that does not have a corresponding pixel in the original image constitutes a solid color area. This preset value can be the pixel value of colors such as black and red.

[0044] S408, assign the pixel value of the first pixel corresponding to the second pixel to the pixel value of the second pixel.

[0045] S410, determine the upper, lower, left, and right extreme values ​​of the solid color region in the blank image.

[0046] The solid-color region is composed of pixels with preset pixel values, that is, the first pixel that has no corresponding pixel in the original image. Based on the principle of distortion, the solid-color region is located at the edge of the blank image, with the center being the area composed of the first pixels that have corresponding pixels in the original image. To remove the solid-color region from the blank image after pixel value assignment, its upper, lower, left, and right extreme values ​​can be found to define a rectangular area containing no solid-color pixels.

[0047] As one feasible implementation, the upper and lower extreme values ​​can be the solid color pixels closest to the central region in the vertical direction, and the left and right extreme values ​​can be the solid color pixels closest to the central region in the horizontal direction. If the solid color regions are only distributed above and below the central region, then the left and right extreme values ​​can also be the solid color pixels furthest from the central region in the horizontal direction.

[0048] S412 saves the rectangular region in the blank image after pixel value assignment as the distortion-free image.

[0049] The rectangular region is defined by the top, bottom, left, and right extreme values. Specifically, the top and bottom extreme values ​​define two horizontal lines, and the left and right extreme values ​​define two vertical lines, which cut out a rectangular region. Within this rectangular region, there are no more solid-color pixels and the area is the largest.

[0050] The image distortion correction method provided in this embodiment of the invention converts the pixels of the blank image to the original image using a distortion correction formula. Then, it assigns pixel values ​​to the pixels in the blank image based on whether the converted pixel positions are within the range of the original image. Finally, it uses the rectangular area obtained by cutting out the solid color area in the blank image after assignment as the distorted image. This method can achieve both minimal loss of field of view and the absence of solid color borders around the image.

[0051] As a feasible implementation, the upper extreme value is the ordinate of the nearest point in the solid color region above the image region in the blank image; the lower extreme value is the ordinate of the nearest point in the solid color region below the image region; the left extreme value is the abscissa of the leftmost point of the two aforementioned solid color regions; and the right extreme value is the abscissa of the rightmost point of the two aforementioned solid color regions. The image region is composed of pixels whose pixel values ​​are the pixel values ​​of the second pixel mentioned above.

[0052] Based on the four extreme points mentioned above, the image within the rectangular region formed by the four points is the largest area of ​​the image that is undistorted and has no black borders after distortion removal.

[0053] This embodiment also provides a method for saving the pixel value mapping relationship and coordinate mapping relationship between the pixels of the original image and the pixels of the blank image. Based on this, the above method may further include:

[0054] If the coordinates of the second pixel point are outside the range of the original image, the original image coordinates corresponding to the first pixel point are saved as a fixed value; if the coordinates of the second pixel point are within the range of the original image, the original image coordinates corresponding to the first pixel point are saved as the coordinates of the second pixel point.

[0055] Furthermore, the above method also includes: saving the original image coordinates corresponding to all first pixels in the rectangular region to obtain remapping parameters. Based on these remapping parameters, the original image can be converted into a distortion-free image, the size of which is the same as the rectangular region. Optionally, the remapping parameters can be saved as another image, and the above method may further include:

[0056] Based on the aforementioned rectangular region, extract the same rectangular region from the remapped image and save it as a remapped parameter image. This remapped image contains both the coordinates of the first pixel and the corresponding coordinates of the original image, thus preserving the mapping relationship between the two.

[0057] The remapping parameters or remapping parameter images mentioned above can be reused. If a new original image needs to be distorted, the new original image can be mapped to the distorted image based on the remapping parameters or remapping parameter images mentioned above, including coordinate mapping and pixel value assignment, thereby avoiding redundant calculations.

[0058] The novel image distortion correction method provided in this invention includes the following specific implementation steps:

[0059] 1. Create an image with original height and width. Figure 2 Given a blank image A (multiplied by 1), and an image B with the same height and width but two channels, let's call image B the variable `remap` (i.e., the remapped image). `remap` is used to store the pixel coordinates of each pixel in the distorted image corresponding to the original image.

[0060] 2. Iterate through each pixel p(u, v) in A, and for each pixel p, use the radial and tangential distortion formulas to calculate the corresponding pixel P(u, v) in the original image. 2 v 2 ).

[0061] 3. Determine the coordinates of point P (u 2 v 2 Does it exceed the horizontal and vertical pixel count of the original image, i.e., the height and width of the image?

[0062] 4. If the image height and width do not exceed the original image's limits, take the pixel value at point P in the undistorted image as the pixel value at point p in the distorted image A, and update the corresponding value in image B. Specifically, save the pixel coordinates of point P in image B corresponding to the original image as the coordinates of point P (u...). 2 v 2 ).

[0063] 5. If the height and width limits of the original image are exceeded, it is determined that point p in the distorted image A has no corresponding pixel in the original image. The image is then filled with a preset solid color pixel, and the corresponding value in image B is set to -1. Figure 5 The image shows a blank image after pixel filling. Figure 5 The vertical direction is the longitudinal axis, with the vertical downward direction being the positive direction of the longitudinal axis; the horizontal direction is the transverse axis, with the horizontal rightward direction being the positive direction of the transverse axis.

[0064] 6. Re-traverse the entire distorted image A. For the upper half of the solid-color pixel region, find the largest u-value and mark this point as the vertex (top). For the lower half of the solid-color pixel region, find the smallest u-value and mark this point as the bottom. Simultaneously, for both the upper and lower pixel regions, find the smallest and largest v-values ​​and mark them as the left and right points respectively. This finds four extreme points. The rectangular area formed by these four points represents the largest area of ​​the distorted image without distortion or black borders. (i.e.,...) Figure 5 (The black rectangle in the middle)

[0065] 7. Extract a rectangular region from image A and save it as the final distortion-free image. Similarly, extract the same rectangular region from image B and save it. Image B can be reused for the same intrinsic parameters to avoid redundant calculations. Figure 6 The image obtained by the new distortion correction algorithm is shown. It can be seen that the new distortion correction algorithm results in a horizontal field of view loss of less than 5% and no vertical field of view loss.

[0066] This invention implements a novel image distortion correction algorithm that can preserve the field of view to the greatest extent possible in distorted images.

[0067] Figure 7 This is a schematic diagram of an image distortion correction device according to an embodiment of the present invention. The device includes:

[0068] The distortion correction calculation module 701 is used to determine the second pixel points before distortion correction corresponding to all first pixel points in the blank image according to a preset distortion correction formula; the preset distortion correction formula is used to determine the pixel points in the original image and the pixel points in the image after distortion correction; the height and width of the blank image are greater than the height and width of the original image, respectively.

[0069] The judgment module 702 is used to determine whether the coordinates of the second pixel point exceed the range of the original image;

[0070] The pixel value assignment module 703 is used to assign a preset value to the pixel value of the first pixel corresponding to the second pixel if the pixel value exceeds the range of the original image; and to assign the pixel value of the first pixel corresponding to the second pixel to the pixel value of the second pixel if the pixel value does not exceed the range of the original image.

[0071] The extreme value determination module 704 is used to determine the upper extreme value, lower extreme value, left extreme value and right extreme value of the solid color region in the blank image; the solid color region is composed of pixels with pixel values ​​of the preset value.

[0072] The segmentation module 705 is used to save a rectangular region in the blank image after pixel value assignment as a distortion-free image; the rectangular region is determined by the upper extreme value, lower extreme value, left extreme value and right extreme value.

[0073] The image distortion correction device provided in this embodiment of the invention converts the pixels of a blank image to the original image using a distortion correction formula. Then, it assigns pixel values ​​to the pixels in the blank image based on whether the converted pixel positions are within the range of the original image. Finally, it uses the rectangular area obtained by cutting out the solid color area in the blank image after assignment as the distorted image. This can achieve both minimal loss of field of view and the absence of solid color borders around the image.

[0074] As an example, the upper extreme value is the ordinate of the closest point to the image region in the solid color region above the image region in the blank image, the lower extreme value is the ordinate of the closest point to the image region in the solid color region below the image region, the left extreme value is the abscissa of the leftmost point of the two solid color regions, and the right extreme value is the abscissa of the rightmost point of the two solid color regions; the image region is composed of pixels whose pixel value is the pixel value of the second pixel point.

[0075] As one embodiment, the device further includes a remapping module, configured to: if the coordinates of the second pixel point exceed the range of the original image, save the original image coordinates corresponding to the first pixel point as a fixed value; if the coordinates of the second pixel point do not exceed the range of the original image, save the original image coordinates corresponding to the first pixel point as the coordinate value of the second pixel point.

[0076] As an example, the remapping module is further configured to: save the original image coordinates corresponding to all the first pixels in the rectangular region to obtain remapping parameters.

[0077] As an example, the remapping module is further configured to: extract identical rectangular regions from the remapped image based on the rectangular region, and save them as a remapping parameter image; the remapped image stores the coordinates of the first pixel and the original image coordinates corresponding to the first pixel.

[0078] As an example, the remapping module is further configured to: if a new original image is obtained, map the new original image to the distortion-free image according to the remapping parameters or the remapping parameter image.

[0079] As an example, the height and width of the blank image are twice the height and width of the original image, respectively.

[0080] As an example, the preset value is different from the pixel value of the second pixel.

[0081] Those skilled in the art will understand that all or part of the processes of the above embodiments can be implemented by computer-controlled devices. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above embodiments. The storage medium can be a memory, a disk, an optical disk, etc.

[0082] While the present invention has been disclosed above, it is not limited thereto. Any person skilled in the art can make various modifications and alterations without departing from the spirit and scope of the invention; therefore, the scope of protection of the present invention should be determined by the scope defined in the claims.

[0083] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0084] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0085] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A picture de-warping method, characterized by, The method comprises: determining, according to a preset de-distortion formula, a second pixel point corresponding to each first pixel point in a blank picture before de-distortion; the preset de-distortion formula is used to determine a pixel point in an original picture after de-distortion; the height and width of the blank picture are greater than those of the original picture respectively; judging whether the coordinates of the second pixel point are out of the coordinate range of the original picture; if yes, assigning a pixel value of the first pixel point corresponding to the second pixel point with a preset value; if no, assigning a pixel value of the first pixel point corresponding to the second pixel point with a pixel value of the second pixel point; determining an upper limit, a lower limit, a left limit and a right limit of a pure color region in the blank picture; the pure color region is composed of pixel points with the preset value; saving a rectangular region in the blank picture with the pixel value assignment as a picture after de-distortion; the rectangular region is determined by the upper limit, the lower limit, the left limit and the right limit.

2. The method of claim 1, wherein, the upper limit is a vertical coordinate of a nearest point in a pure color region above an image region in the blank picture, the lower limit is a vertical coordinate of a nearest point in a pure color region below the image region, the left limit is a horizontal coordinate of a leftmost point of two pure color regions, and the right limit is a horizontal coordinate of a rightmost point of the two pure color regions; the image region is composed of pixel points with a pixel value of the second pixel point.

3. The method of claim 1, wherein, The method further comprises: if the coordinates of the second pixel point are out of the range of the original picture, saving a coordinate of the original picture corresponding to the first pixel point as a fixed value; if the coordinates of the second pixel point are not out of the range of the original picture, saving the coordinate of the original picture corresponding to the first pixel point as a coordinate value of the second pixel point.

4. The method of claim 3, wherein, The method further comprises: saving coordinates of the original picture corresponding to all the first pixel points in the rectangular region to obtain a remapping parameter.

5. The method of claim 4, wherein, The method further comprises: cutting out a same rectangular region in a remapping picture according to the rectangular region, and saving it as a remapping parameter picture; the remapping picture saves the coordinates of the first pixel points and the coordinates of the original picture corresponding to the first pixel points.

6. The method according to claim 4 or 5, characterized in that, The method further comprises: if a new original picture is obtained, mapping the new original picture to a picture after de-distortion according to the remapping parameter or the remapping parameter picture.

7. The method of claim 1, wherein, The height and width of the blank picture are twice the height and width of the original picture respectively.

8. The method of claim 1, wherein, The preset value is different from the pixel value of the second pixel point.

9. An apparatus for picture de-warping, characterized by The device comprises: a de-distortion calculation module, configured to determine, according to a preset de-distortion formula, a second pixel point corresponding to each first pixel point in a blank picture before de-distortion; the preset de-distortion formula is used to determine a pixel point in an original picture after de-distortion; the height and width of the blank picture are greater than those of the original picture respectively; a judging module, configured to judge whether the coordinates of the second pixel point are out of the range of the original picture; The pixel value assignment module is configured to assign a pixel value of a first pixel point corresponding to the second pixel point as a preset value if the second pixel point is out of a range of the original picture, and assign the pixel value of the first pixel point corresponding to the second pixel point as a pixel value of the second pixel point if the second pixel point is not out of the range of the original picture; The extreme value determination module is configured to determine an upper extreme value, a lower extreme value, a left extreme value and a right extreme value of a pure color region in the blank picture, the pure color region being composed of pixel points with the preset value; The segmentation module is configured to save a rectangular region in the blank picture after pixel value assignment as a picture after distortion removal, the rectangular region being determined by the upper extreme value, the lower extreme value, the left extreme value and the right extreme value.

10. The apparatus of claim 9, wherein, The upper extreme value is a vertical coordinate of a nearest point in a pure color region above an image region in the blank picture to the image region, the lower extreme value is a vertical coordinate of a nearest point in a pure color region below the image region to the image region, the left extreme value is a horizontal coordinate of a leftmost point of the two pure color regions, and the right extreme value is a horizontal coordinate of a rightmost point of the two pure color regions. The image region is composed of pixel points with the pixel value of the second pixel point.

Citation Information

Patent Citations

  • Image perspective transformation method, device and equipment

    CN110060200A

  • Image remapping method and image processing device

    WO2022127841A1