Image processing method and device, terminal equipment, storage medium and program product

By determining the target distance between a location point and a line segment in a grid image, the problem of inaccurate distortion information determination in the image acquisition module is solved, achieving efficient and accurate distortion detection.

CN121462897APending Publication Date: 2026-02-03BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411047824.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately determine image distortion information acquired by image acquisition modules, especially when dedicated equipment and 3D mesh charts are not used, leading to inaccurate distortion correction.

Method used

By acquiring grid line segments in the grid image, the target distance between each location point and the grid line segment is determined. Based on the distance information, image distortion is judged, including determining the geometric center and intersection of the grid image, identifying the endpoints and intermediate locations of the grid line segments, and calculating the degree of distortion.

Benefits of technology

It improves the accuracy and convenience of image distortion information, reduces the reliance on 3D grid charts, and can accurately determine the distortion information of the image acquisition module.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121462897A_ABST
    Figure CN121462897A_ABST
Patent Text Reader

Abstract

The invention relates to an image processing method and device, terminal equipment, a storage medium and a program product. The image processing method comprises the steps that a grid image is acquired; wherein the grid image comprises m grid line segments, and the grid line segments are line segments formed by imaging a plurality of parallel line segments included in the grid object; in the m grid line segments, target distances between a plurality of position points on the ith grid line segment and the jth grid line segment are determined; wherein the ith grid line segment and the jth grid line segment are grid line segments determined in the same direction according to sorting, i is not equal to j, i is smaller than or equal to m, and j is smaller than or equal to m; and determining distortion information of the grid image according to the target distance. The accuracy and convenience of determining the image distortion information are improved, so that the distortion information of the image acquisition module can be determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing technology, and in particular to an image processing method, apparatus, terminal device, storage medium, and computer program product. Background Technology

[0002] With the development of technology, more and more terminal devices have emerged, and their functions have become increasingly rich. Each terminal device can be applied in its corresponding use case, and different terminal devices may have different use cases and different functions.

[0003] Terminal devices can include devices with image acquisition capabilities, such as mobile phones, tablets, cameras, and drones. These terminal devices include image acquisition modules, which may produce distortion during the image acquisition process. Summary of the Invention

[0004] This disclosure provides an image processing method, apparatus, terminal device, storage medium, and computer program product.

[0005] A first aspect of this disclosure provides an image processing method, comprising: acquiring a grid image; wherein the grid image includes m grid line segments, each grid line segment being a line segment formed by imaging multiple parallel line segments comprising a grid object; determining target distances between multiple position points on the i-th grid line segment and the j-th grid line segment, respectively, among the m grid line segments; wherein the i-th grid line segment and the j-th grid line segment are grid line segments ordered along the same direction, i≠j, i≤m, j≤m; and determining distortion information of the grid image based on the target distances.

[0006] In one embodiment, determining the target distances between multiple location points on the i-th grid segment and the j-th grid segment includes: determining a first location point on the i-th grid segment; wherein the first location point is a point other than an endpoint of the i-th grid segment; determining a second location point on the i-th grid segment; wherein the second location point includes at least one endpoint; and determining the target distance from the first location point to the j-th grid segment and the target distance from the second location point to the j-th grid segment.

[0007] In one embodiment, determining the first location point on the i-th grid line segment includes: determining the geometric center of the grid image; determining the central intersection point based on the geometric center; wherein the central intersection point is the intersection point of each grid line segment in the grid image that is closest to the geometric center; and determining the intersection point of the i-th grid line segment that is located on the same grid line segment as the central intersection point as the first location point.

[0008] In one embodiment, determining the second location point of the i-th grid line segment includes: determining a target pixel on the i-th grid line segment; wherein, on the side pointed to by the extension direction of the i-th grid line segment, the grayscale of each pixel adjacent to the target pixel is different from the grayscale of the pixel at the first location point; determining the location of the target pixel as the second location point; wherein, the grayscale of the pixels where each grid line segment in the grid image is located is different from the grayscale of the pixels in the area outside each grid line segment in the grid image.

[0009] In one embodiment, determining the target pixel on the i-th grid line segment includes: taking the pixel where the first position point is located as the starting pixel, moving to one side of the extension direction of the i-th grid line segment, and traversing pixels with the same gray level as the starting pixel; during the traversal, determining pixels whose gray level is different from that of the pixel where the first position point is located as the target pixel; wherein, the adjacent pixels are adjacent pixels located on one side of the extension direction of the i-th grid line segment.

[0010] In one embodiment, determining the second position point of the i-th grid line segment includes: extracting feature points of the i-th grid line segment; and determining the endpoints of the i-th grid line segment based on the feature points.

[0011] In one embodiment, before determining the target distances between multiple locations on the i-th grid line segment and the j-th grid line segment, the method further includes: determining the geometric center of the grid image; determining a central intersection point based on the geometric center; wherein the central intersection point is the intersection point of each grid line in the grid image that is closest to the geometric center; and taking the grid line in the grid image that passes through the central intersection point as the j-th grid line segment.

[0012] In one embodiment, acquiring the grid image includes: acquiring a planar chessboard image; extracting the contour information of each cell in the chessboard image to obtain the grid image.

[0013] In one embodiment, determining the distortion information of the grid image based on the target distance includes: determining that the grid image is distorted when any two target distances are different; and determining that the grid image is not distorted when all target distances are the same.

[0014] In one embodiment, determining the distortion information of the grid image based on each of the target distances includes: when any two target distances are different, determining the degree of distortion based on the maximum distance difference between the target distances; wherein the magnitude of the maximum distance difference is positively correlated with the degree of distortion.

[0015] A second aspect of this disclosure provides an image processing apparatus, comprising: an acquisition module for acquiring a grid image; wherein the grid image includes m grid line segments, the grid line segments being line segments formed by imaging multiple parallel line segments comprising a grid object; a first determination module for determining, among the m grid line segments, target distances between multiple position points on the i-th grid line segment and the j-th grid line segment; wherein the i-th and j-th grid line segments are grid line segments ordered along the same direction, i≠j, i≤m, j≤m; and a second determination module for determining distortion information of the grid image based on the target distances.

[0016] A third aspect of this disclosure provides a terminal device, including: a processor and a memory for storing executable instructions capable of running on the processor, wherein: when the processor runs the executable instructions, the executable instructions perform the method described in any of the above embodiments.

[0017] A fourth aspect of this disclosure provides a non-transitory computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the method described in any of the above embodiments.

[0018] A fifth aspect of this disclosure provides a computer program product, including a computer program or executable instructions, which, when executed by a processor, implement the method described in any of the above embodiments.

[0019] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0020] The solution of this embodiment acquires a grid image, determines the target distance between multiple points on the i-th grid line segment and the j-th grid line segment among the m grid line segments included in the grid image, and determines the distortion information of the grid image based on the target distance.

[0021] This solution can determine the distortion information of the grid image acquired by the image acquisition module by analyzing grid lines on a single plane, such as a checkerboard pattern. This includes determining whether distortion occurs and the degree of distortion when it does. It eliminates the need for specialized equipment and grid-based stereoscopic charts for image acquisition. It also reduces the likelihood of inaccurate distortion determination after distortion correction when using grid-based stereoscopic charts. This improves the accuracy and convenience of determining image distortion information, thus aiding in the determination of distortion information within the image acquisition module.

[0022] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0023] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0024] Figure 1 This is a schematic diagram illustrating an image processing method according to an exemplary embodiment;

[0025] Figure 2 This is a schematic diagram illustrating an embodiment of acquiring a grid image;

[0026] Figure 3 This is a schematic diagram illustrating a grid image according to an exemplary embodiment;

[0027] Figure 4 This is a schematic diagram illustrating a grid image containing grid line segments according to an exemplary embodiment;

[0028] Figure 5 This is a schematic diagram illustrating a dilated grid image according to an exemplary embodiment;

[0029] Figure 6 This is a schematic diagram illustrating the determination of the j-th grid line segment according to an exemplary embodiment;

[0030] Figure 7 This is a schematic diagram illustrating the intersections of a grid image according to an exemplary embodiment;

[0031] Figure 8 This is a schematic diagram illustrating a central intersection point according to an exemplary embodiment;

[0032] Figure 9 This is a schematic diagram illustrating the intersection point of the j-th grid line segment according to an exemplary embodiment;

[0033] Figure 10This is a schematic diagram illustrating a method for determining target distance according to an exemplary embodiment;

[0034] Figure 11 This is a schematic diagram illustrating the determination of a first position point according to an exemplary embodiment;

[0035] Figure 12 This is a schematic diagram illustrating the determination of a second position point according to an exemplary embodiment;

[0036] Figure 13 This is a schematic diagram illustrating the determination of a target pixel according to an exemplary embodiment;

[0037] Figure 14 This is a schematic diagram illustrating a traversal method according to an exemplary embodiment;

[0038] Figure 15 This is a schematic diagram illustrating the endpoint of the i-th grid line segment according to an exemplary embodiment;

[0039] Figure 16 This is a schematic diagram illustrating the determination of distortion information according to an exemplary embodiment;

[0040] Figure 17 This is a schematic diagram illustrating the target distance between a first location point and the j-th grid line segment according to an exemplary embodiment;

[0041] Figure 18 This is a schematic diagram of an image processing apparatus according to an exemplary embodiment;

[0042] Figure 19 This is a block diagram illustrating a terminal device according to an exemplary embodiment. Detailed Implementation

[0043] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses consistent with some aspects of this disclosure as detailed in the appended claims.

[0044] refer to Figure 1 This is a schematic diagram of an image processing method, which includes:

[0045] S100, acquire a grid image; wherein, the grid image includes m grid line segments, and the grid line segments are the line segments after imaging multiple parallel line segments included in the grid object.

[0046] S200, among m grid segments, determine the target distances between multiple points on the i-th grid segment and the j-th grid segment. The i-th and j-th grid segments are grid segments ordered along the same direction, where i ≠ j, i ≤ m, and j ≤ m.

[0047] S300 determines the distortion information of the grid image based on the target distance.

[0048] The solution in this embodiment can be applied to terminal devices, and the executing entity can be a terminal device, which can include mobile terminal devices and fixed terminal devices, etc. Mobile terminal devices can include mobile phones, tablets, in-vehicle central control devices, wearable devices, smart devices, and aircraft, etc. Smart devices can include smart office equipment, smart home equipment, and robots, etc.

[0049] For example, the terminal device has an image acquisition module with image acquisition function, which can perform image acquisition.

[0050] For example, the image acquisition module may include a wide-angle image acquisition module, such as a wide-angle camera. It may also be an ultra-wide-angle image acquisition module, such as an ultra-wide-angle camera. Alternatively, it may be a fisheye camera or other cameras with a large field of view. Images acquired by these image acquisition modules typically exhibit distortion.

[0051] For example, the image acquisition module can also be other image acquisition modules, such as telephoto cameras and macro cameras, and the images acquired by these cameras may also be distorted.

[0052] For S100, an image can be acquired by the image acquisition module. To facilitate the determination of the distortion information of the image acquisition module, the distortion information of the grid image can be determined through the various steps in this embodiment. Therefore, the distortion information of the image acquisition module can be determined based on the distortion information of the grid image. The distortion information of the image acquisition module can be represented and reflected through the distortion information of the grid image acquired by the image acquisition module.

[0053] The image acquired by the image acquisition module is referred to as a grid image. This grid image can be obtained by acquiring images of a grid object.

[0054] For example, the shape and pattern of the mesh in a mesh image may differ from the shape and pattern of the mesh included in a mesh object. When the mesh image is not distorted, the shape and pattern of the mesh in the mesh image and the mesh in the mesh object are identical. When the mesh image is distorted, the shape and pattern of the mesh in the mesh image and the mesh in the mesh object are different.

[0055] By acquiring images of the grid object using the image acquisition module, a grid image containing the grid can be obtained.

[0056] The mesh object here can include multiple parallel line segments, and the number of parallel line segments is not limited. Any carrier or object that includes multiple parallel line segments can be used as a mesh object. The length of the parallel line segments is also not limited and can be determined according to requirements.

[0057] For example, multiple parallel line segments may include multiple parallel line segments that are parallel to each other in a first direction, multiple parallel line segments that are parallel to each other in a second direction, or multiple parallel line segments that are parallel to each other in the first direction and multiple parallel line segments that are parallel to each other in the second direction.

[0058] For example, the first direction and the second direction can be perpendicular or they can be two non-perpendicular directions.

[0059] For example, a grid object comprises a planar grid formed by N rows of parallel line segments and M columns of parallel line segments, all on the same plane. The N rows of parallel line segments and the M columns of parallel line segments in the grid object are perpendicular, and a line segment in any row intersects a line segment in any column, with intersection points. N and M are positive integers. N and M can be equal or different.

[0060] For example, a grid object may include a checkerboard pattern, and may also include grid cards.

[0061] For example, in addition to multiple parallel line segments, a grid object may also include multiple non-parallel line segments; that is, the grid in a grid object may include multiple parallel line segments and multiple non-parallel line segments.

[0062] After acquiring an image of the grid object using the image acquisition module, a grid image is obtained. The grid image includes m grid line segments, which are the line segments formed by imaging multiple parallel line segments included in the grid object. The value of m is not limited and can be determined based on the field of view angle during image acquisition of the grid object. Since the grid object includes multiple parallel line segments, these parallel line segments will also be included in the grid image after imaging. The grid line segments in the grid image are the imaging result of the parallel line segments included in the grid object. m is a positive integer.

[0063] For example, the m grid lines can be arranged in a preset direction, that is, there are m grid line segments arranged in the same direction.

[0064] For example, m grid segments can be arranged in two different directions, m1 grid segments in a third direction, and m2 grid segments in a fourth direction, where the sum of m1 and m2 equals m. The third and fourth directions can be non-parallel, including mutually perpendicular directions, or two directions at a preset angle.

[0065] When a mesh object comprises multiple parallel line segments forming a grid, acquiring an image of the mesh object using an image acquisition module facilitates the determination of distortion information. If each grid line segment in the mesh image changes from a straight line to a non-straight line, then distortion has occurred in the mesh image. If each grid line segment in the mesh image remains straight, then the mesh image is not distorted.

[0066] For S200, after obtaining the grid image, each grid line segment in the grid image can be identified.

[0067] After determining each grid line segment in the grid image, we can determine the target distances between multiple points on the i-th grid line segment and the j-th grid line segment. That is, each point on the i-th grid line segment has a target distance, such as a perpendicular distance, between it and the j-th grid line segment.

[0068] For example, there are 10 location points on the i-th grid line segment, such as location point 1 to location point 10. Then there is a target distance 1 between location point 1 and the j-th grid line segment, a target distance 2 between location point 2 and the j-th grid line segment, and so on. There is a target distance 10 between location point 10 and the j-th grid line segment.

[0069] The i-th and j-th grid segments here include: grid segments determined by sorting along the same direction. For example, in a grid image, the i-th and j-th grid segments are determined from m grid segments according to the sorting of the grid segments in the top-to-bottom direction.

[0070] For example, the i-th grid line segment and the j-th grid line segment include: grid lines formed by two parallel line segments in the grid object and imaged in the grid image.

[0071] The i-th and j-th grid segments are two different grid segments in the grid image.

[0072] For example, when each grid line segment in the grid object is located within the field of view of the image acquisition module, that is, each parallel line segment in the grid object has a corresponding grid line segment in the grid image.

[0073] In a grid object, all points on one line segment are equidistant from the other. When an image is captured by the image acquisition module and distortion occurs, the degree of distortion in the edge regions differs from that in the center regions. For example, the distortion is greater closer to the edge regions and less closer to the center of the grid image.

[0074] If the target distances from each point on the i-th grid line segment to the j-th grid line segment are different, it indicates that the i-th and / or j-th grid line segments have distortion, such as bending, and thus the grid image is distorted. If the target distances from each point on the i-th grid line segment to the j-th grid line segment are the same, it indicates that the i-th and / or j-th grid line segments have no distortion, and thus the grid image is not distorted.

[0075] For example, there can be a preset distance between the various points on the i-th grid line segment, such as the intersection of various grid lines on the i-th grid line segment in the grid image. The more points there are on the i-th grid line segment, the more accurate the distortion information will be.

[0076] For example, the i-th and j-th grid segments are not limited; they can be any two different grid segments from the m grid segments, arranged in the same direction. That is, i and j are variable and can be any value from 1 to m. Both i and j are positive integers.

[0077] This allows the target distance to be determined based on each i-th and j-th grid line segment in the grid image, reducing the possibility of inaccurate distortion information in the determined grid image when the distortion information is determined based on two fixed grid line segments, since neither of these two fixed grid line segments has produced distortion.

[0078] For S300, after determining the target distances from each point on the i-th grid segment to the j-th grid segment, the distortion information of the grid image can be determined based on these target distances. If all target distances are the same, it indicates that the i-th grid segment and the j-th grid segment are parallel, and the grid image is not distorted. If at least two target distances are different, it indicates that the i-th grid segment and the j-th grid segment are not parallel, and the grid image is distorted.

[0079] For example, when a grid image is distorted, the degree of distortion of the grid image can be determined. The larger the difference between any two nearest distances, the greater the degree of distortion, and the smaller the difference between any two nearest distances, the smaller the degree of distortion.

[0080] This scheme images an arbitrary grid object with multiple parallel line segments, such as grid lines on a single plane, like a checkerboard pattern, to obtain a grid image of m grid line segments. Then, based on the target distances between multiple points on the i-th grid line segment and the j-th grid line segment, the distortion information of the grid image acquired by the image acquisition module is determined, such as whether distortion occurs and the degree of distortion when it does occur. This eliminates the need for dedicated equipment and stereoscopic charts with grid lines for image acquisition, and reduces the likelihood of inaccurate distortion information after distortion correction when using stereoscopic charts with grid lines. It improves the accuracy and convenience of determining image distortion information, thus aiding in the determination of distortion information for the image acquisition module.

[0081] In one embodiment, S200, determining the target distances between multiple location points on the i-th grid segment and the j-th grid segment includes:

[0082] With the i-th grid segment unchanged, determine the target distances between the location point and different j-th grid segments. That is, i is a fixed value, the i-th grid segment is fixed, j can have different values, and the j-th grid segment is also different.

[0083] When determining the distances between multiple points on the i-th grid segment and the j-th grid segment, the i-th grid segment can remain unchanged, while the j-th grid segment can be different.

[0084] Since there are multiple parallel line segments in a grid object, and a line segment can be parallel to multiple line segments, there can also be corresponding grid line segments in the grid image.

[0085] For example, a grid object includes four parallel line segments: line segment A, line segment B, line segment C, and line segment D. After imaging line segments A, B, C, and D, the grid image contains grid line segments that are the imaging results of line segments A, B, C, and D respectively. For instance, grid line segment A' in the grid image is the grid line segment imaged from line A in the grid object; grid line segment B' is the grid line segment imaged from line B in the grid object; grid line segment C' is the grid line segment imaged from line C in the grid object; and grid line segment D' is the grid line segment imaged from line D in the grid object.

[0086] If we take grid segment A' in the grid image as the i-th grid segment, and there are 10 different location points on the i-th grid segment, and take grid segments B', C', and D' as the grid segments with different values ​​of j (i.e., different j-th grid segments), then we can determine the target distances between these 10 different location points and grid segment B', the target distances between these 10 different location points and grid segment C', and the distances between these 10 different location points and grid segment D'. In other words, we can sequentially determine the target distances between different location points on the i-th grid segment and different j-th grid segments.

[0087] By traversing each j-th grid line segment, if the distances between any j-th grid line segment and each position point in the i-th grid line segment are not the same, it indicates that the i-th grid line segment and / or the j-th grid line segment are distorted, thus indicating that the grid image is distorted.

[0088] This allows us to determine the target distances between points in the i-th grid segment and each of the j-th grid segments. This facilitates determining whether the i-th and / or j-th grid segments are curved. If the distances between each point in the i-th grid segment and any j-th grid segment are different, it indicates that the i-th and / or j-th grid segments are curved. The curvature of the i-th and / or j-th grid segments indicates distortion, thus proving that the grid image is distorted.

[0089] In one embodiment, S200, determining the target distances between multiple locations on the i-th grid segment and the j-th grid segment includes:

[0090] With the j-th grid segment unchanged, determine the target distances corresponding to the position points on different i-th grid segments and the j-th grid segment. That is, j is a fixed value, the j-th grid segment is fixed, i can have different values, and the i-th grid segment is also different.

[0091] When determining the distances between multiple points on the i-th grid segment and the j-th grid segment, the j-th grid segment can remain unchanged, while the i-th grid segment can be different.

[0092] Since there are multiple parallel line segments in a grid object, and a line segment can be parallel to multiple line segments, there can also be corresponding grid line segments in the grid image.

[0093] For example, a grid object includes four parallel line segments: line segment A, line segment B, line segment C, and line segment D. After imaging line segments A, B, C, and D, the grid image contains grid line segments that are the imaging results of line segments A, B, C, and D respectively. For instance, grid line segment A' in the grid image is the grid line segment imaged from line A in the grid object; grid line segment B' is the grid line segment imaged from line B in the grid object; grid line segment C' is the grid line segment imaged from line C in the grid object; and grid line segment D' is the grid line segment imaged from line D in the grid object.

[0094] If we take grid segment A' in the grid image as the j-th grid segment, and grid segments B', C', and D' as grid segments with different values ​​of i (i.e., different i-th grid segments), and each i-th grid segment has 10 different location points, then we can determine the target distances between the j-th grid segment A' and each of these 10 different location points on the i-th grid segment B', the j-th grid segment A' and each of these 10 different location points on the i-th grid segment C', and the j-th grid segment A' and each of these 10 different location points on the i-th grid segment D'. In other words, we can sequentially determine the target distances between the j-th grid segment and each location point on different i-th grid segments, and the j-th grid segment has a target distance with each location point on every i-th grid segment.

[0095] When traversing the i-th grid line segment for each different value of i, if the target distances corresponding to each position point in any i-th grid line segment are not the same, it indicates that the i-th grid line segment and / or the j-th grid line segment are distorted, thus indicating that the grid image is distorted.

[0096] This allows us to determine the distances between each point in different grid segments of the i-th grid line segment and the same grid segment of the j-th grid line segment. This facilitates determining whether the i-th and / or j-th grid line segments are curved. If the distances between each point in the i-th grid line segment and any grid segment of the j-th grid line segment are different, it indicates that the i-th and / or j-th grid line segments are curved. The curvature of the i-th and / or j-th grid line segments indicates distortion, thus proving that the grid image is distorted.

[0097] In one embodiment, reference Figure 2 This is a schematic diagram of acquiring a grid image. S100, acquiring a grid image containing a grid image includes:

[0098] S101, acquire the chessboard image of the planar chessboard.

[0099] S102, extract the contour information of each cell in the checkerboard image to obtain a grid image.

[0100] After acquiring the checkerboard image, the contour information of each cell in the checkerboard image is extracted to obtain a grid image. The method for obtaining the contour information is not limited; it can be obtained through contour extraction algorithms and high-frequency filters, including but not limited to edge detection algorithms such as Sobel and Canny.

[0101] refer to Figure 3 This is a schematic diagram of a grid image. Figure 3 The grid image shown is a grid obtained by image acquisition of a planar checkerboard pattern. (Reference) Figure 4 This is a schematic diagram of a grid image containing grid line segments.

[0102] In one embodiment, the method may further include: dilating the grid lines in the grid image to make the grid lines in the grid image clearer, reducing the number of breaks in each grid line in the grid image, and improving the continuity of each grid line in the grid image.

[0103] refer to Figure 5 This is a schematic diagram of a grid image after dilation, relative to... Figure 4 The grid lines in the grid image shown have fewer breaks and better continuity.

[0104] In one embodiment, reference Figure 6 This is a schematic diagram for determining the j-th grid line segment. Before determining the target distances between multiple locations on the i-th grid line segment and the j-th grid line segment, the following steps are also included:

[0105] S10, determine the geometric center of the grid image.

[0106] S20, determine the central intersection point based on the geometric center; where the central intersection point is the intersection point of each grid line segment within the grid image that is closest to the geometric center.

[0107] S30, take the grid line segment that passes through the center intersection point in the grid image as the j-th grid line segment.

[0108] In this embodiment, at least some grid line segments within the grid image intersect, including any two grid line segments intersecting. The more intersections there are, the more accurate the determined center intersection point will be.

[0109] The geometric center of a grid image can be determined based on its diagonals; the intersection of the diagonals is taken as the geometric center. Alternatively, the geometric center can be determined based on the geometric centers of the grids formed by the individual grid segments; the geometric centers of the grids formed by the individual grid segments are taken as the geometric center of the grid image.

[0110] Since a grid image has multiple intersection points, any two intersecting grid line segments will have an intersection point. The geometric center is closest to the intersection point located at the center of the grid image. After determining the geometric center of the grid image, the intersection point closest to this geometric center can be identified as the central intersection point, and this central intersection point can be used as the central intersection point among all intersection points in the grid image.

[0111] refer to Figure 7 This is a schematic diagram of the intersection points in a grid image. Figure 7 The points shown are pairs Figure 3 or Figure 4 The intersection points obtained after feature point extraction from the grid image shown can include the corner points of the checkerboard. Feature point extraction can be determined through feature point detection. Figure 7 Intersections in the model, such as feature point detection algorithms, including but not limited to corner detection algorithms like the Harris algorithm and the FAST algorithm.

[0112] After determining the intersection points and the geometric center of the grid image, the intersection point closest to the geometric center can be identified. (Reference) Figure 8 This is a schematic diagram of a central intersection point. (Reference) Figure 9 This is a schematic diagram of the intersection points of the j-th grid line segment. Figure 9 The bold dots shown represent intersections on the j-th grid segment, and the horizontally arranged bold dots represent the j-th grid segment. Figure 5 The horizontally bolded grid line segments without arrows. The vertically arranged bolded dots represent a different type of grid line segment, such as... Figure 5 The vertically thickened grid lines without arrows.

[0113] In one embodiment, reference Figure 10 This is a schematic diagram for determining target distance. S200, determining the target distance between multiple points on the i-th grid segment and the j-th grid segment, including:

[0114] S201, determine the first position point on the i-th grid line segment; where the first position point is a point outside the endpoint of the i-th grid line segment.

[0115] S202, determine the second position point of the i-th grid line segment; wherein the second position point includes at least one endpoint.

[0116] S203, determine the target distance from the first position point to the j-th grid line segment and the target distance from the second position point to the j-th grid line segment.

[0117] There is no order between S201 and S202; S201 can be executed first, or S202 can be executed first.

[0118] The methods for determining the first position point and the second position point are not limited, and any method that can determine the first position point and the second position point is within the protection scope of this embodiment.

[0119] For example, the endpoint of the i-th grid line segment may include the boundary point of the i-th grid line segment at the edge of the grid image. When the i-th grid line segment in the grid image extends to the boundary of the grid image, it indicates that at least one end of the i-th grid line segment has reached the boundary of the grid image, and the first position point is the boundary point of the i-th grid line segment at the boundary of the grid image.

[0120] For example, the endpoints of the i-th grid line segment may include: when the i-th grid line segment is located in the middle region of the grid image, that is, when the i-th grid line does not extend to the boundary of the grid image, the points at both ends of the i-th grid line segment are the endpoints.

[0121] By combining the endpoints of the i-th grid line segment and the target distances of points outside the endpoints to the j-th grid line segment, the accuracy of determining the distortion information of the grid image can be improved.

[0122] For example, the first location point can be a location point in the middle part of the i-th grid line segment, and the second location point can be an endpoint of the i-th grid line segment. Because the distortion generated when the image acquisition module acquires an image is smaller in the middle region and larger in the edge region, the distortion in the acquired grid image is also smaller in the middle region and larger in the edge region.

[0123] For example, the first and second position points can be determined by image recognition and feature point detection. The i-th grid line segment can be identified, and feature point detection can be performed on the i-th grid line segment to determine the endpoints of the i-th grid line segment and the position points located outside the endpoints of the i-th grid line segment.

[0124] For example, the first location point may include the midpoint of the i-th grid line segment.

[0125] For example, the distance between the endpoint of the i-th grid segment and the j-th grid segment is the smallest, and the distance between the midpoint of the i-th grid segment and the j-th grid segment is the largest. This allows us to determine the maximum distortion of the i-th grid segment.

[0126] In one embodiment, reference Figure 11 This is a schematic diagram for determining a first position point. S201, determining the first position point on the i-th grid line segment includes:

[0127] S2011, Determine the geometric center of the grid image.

[0128] S2012, Determine the central intersection point based on the geometric center; where the central intersection point is the intersection point of all grid lines in the grid image that is closest to the geometric center.

[0129] S2013, the intersection point of the i-th grid line segment and the center intersection point on the same grid line segment is determined as the first position point.

[0130] The geometric center of a grid image can be determined based on its diagonals; the intersection of the diagonals is taken as the geometric center. Alternatively, the geometric center of the grid image can be determined based on the geometric center of the grid formed by the grid line segments within it; the geometric center of the grid image is taken as the geometric center of the grid line segments within it.

[0131] Since a grid image has multiple intersection points, any two intersecting grid line segments will have an intersection point. The geometric center is closest to the intersection point located at the center of the grid image. After determining the geometric center of the grid image, the intersection point closest to this geometric center can be identified as the central intersection point, and this central intersection point can be used as the central intersection point among all intersection points in the grid image.

[0132] After determining the central intersection point, the grid line segments passing through the central intersection point can be identified. The intersection point of the i-th grid line segment that is on the same grid line segment as the central intersection point is determined as the first position point.

[0133] The center intersection point can be used as a reference. Figure 8 The first position point can be referenced from the points other than the intersection of the vertically arranged bold dots in 9.

[0134] For example, any intersection point of the i-th grid line segment that intersects with the center point on the same grid line segment can be used as the first location point.

[0135] refer to Figure 5 , Figure 5 The dot in the middle of the horizontal line with an arrow is a first position point. Figure 5The horizontal line with the arrow shown is the i-th grid segment. Figure 5 The horizontal grid line without an arrow is the j-th grid line segment.

[0136] Figure 5 The dot in the middle of the vertical line with the arrow is another type of first position point. Figure 5 The vertical line with the arrow shown is another type of i-th grid line segment. Figure 5 The vertical grid lines without arrows are another type of j-th grid line segment.

[0137] In one embodiment, reference Figure 12 S202 is a schematic diagram for determining the second position point. Determining the second position point of the i-th grid line segment includes:

[0138] S2021, determine the target pixel on the i-th grid line segment; wherein, on the side to which the extension direction of the i-th grid line segment points, the grayscale of each pixel adjacent to the target pixel is different from the grayscale of the pixel where the first position point is located.

[0139] S2022, the location of the target pixel is determined as the second location point.

[0140] In this grid image, the grayscale of the pixels containing each grid line segment differs from the grayscale of pixels outside the grid image. For example, the grayscale of the pixels containing the grid line segment might be 255, while the grayscale of pixels outside the grid image might be 0. Alternatively, the grayscale of the pixels containing the grid line segment might be 0, while the grayscale of pixels outside the grid image might be 255.

[0141] For example, it may also include: binarizing the grid image in the grid image and the area outside the grid image, so that the gray level of the pixel where each grid line segment in the grid image is located is different from the gray level of the pixel where the area outside each grid line segment in the grid image is located.

[0142] The target pixel here is the pixel where the second location point is located, such as the pixel where the endpoint of the i-th grid line segment is located. In the grid image, each pixel has surrounding neighboring pixels. On the side pointed to by the extension direction of the i-th grid line segment, the grayscale of the pixels adjacent to the target pixel is different from the grayscale of the pixel where the first location point is located. In this case, it means that there are no longer any pixels with the same grayscale as the pixel where the first location point is located in that extension direction, indicating that this pixel is the endpoint of the i-th grid line segment.

[0143] In one embodiment, reference Figure 13 S2021, a schematic diagram for determining a target pixel, involves determining the target pixel on the i-th grid line segment, including:

[0144] S20211, taking the pixel where the first position point is located as the starting pixel, moves to the side pointed to by the extension direction of the i-th grid line segment, and traverses the pixels with the same gray level as the starting pixel.

[0145] S20212, During the traversal process, pixels whose gray levels are different from those of the pixel at the first position point are identified as target pixels.

[0146] Here, adjacent pixels are those located on the side to which the extension direction of the i-th grid line segment points.

[0147] refer to Figure 14 This is a diagram illustrating one traversal method, combined with... Figure 5 , Figure 13 and Figure 14 ,by Figure 5 The central dot on the i-th grid line segment with the horizontal arrow is the first position point, and the pixel containing this first position point is taken as the starting pixel. Move along the side pointed to by the extension direction of the i-th grid line segment, for example... Figure 5 As shown on the left, according to Figure 14 The traversal method shown iterates through pixels with the same grayscale as the starting pixel. When traversing to the left, the left-side neighbor of the starting pixel is designated as the first priority traversal pixel (first selection). If the grayscale of the first selection pixel differs from that of the starting pixel, the pixel adjacent to the top-left position of the starting pixel is designated as the second priority traversal pixel (second selection), or the pixel adjacent to the bottom-left position is designated as the third priority traversal pixel (third selection). The traversal priorities of the second and third selection pixels can be interchanged.

[0148] After traversing from the starting pixel to the next pixel, the current pixel is used as the starting pixel, and the traversal is repeated using the above method. This process continues until a pixel is identified on the side pointed to by the extension direction of the i-th grid line segment, whose grayscale value differs from that of the pixel at the first location point. This pixel is the target pixel.

[0149] When the extension direction of the i-th grid line segment is to the right, then through Figure 14 The traversal is performed according to the traversal method corresponding to direction 2 shown in the figure. When the extension direction of the i-th grid line segment is upward, then it is done by... Figure 14 The traversal is performed according to the traversal method corresponding to direction 3 shown in the figure. When the extension direction of the i-th grid line segment is downward, then it is done by... Figure 14 The traversal is performed according to the traversal method corresponding to direction 4 shown in the figure.

[0150] refer to Figure 15 , is a schematic diagram of the endpoint of the i-th grid line segment. Figure 15 The position of the circle shown at the middle edge is... Figure 15 The first position point corresponding to the circle in the middle is located at the endpoint of the i-th grid line segment.

[0151] In one embodiment, S202, determining the second location point of the i-th grid line segment includes:

[0152] Extract the feature points of the i-th grid line segment, and determine the endpoints of the i-th grid line segment based on the feature points.

[0153] The endpoints of each i-th grid line segment can be determined by image recognition and feature point extraction.

[0154] In one embodiment, reference Figure 16 This diagram illustrates a method for determining distortion information; TV distortion is one way to determine image distortion. Distortion information can be determined based on Δh and h, such as the ratio of Δh to h. TV distortion represents the deformation of the image itself.

[0155] Figure 17 This is a schematic diagram showing the target distance between a first location point and the j-th grid line segment. Figure 17 The starting point shown can be a different first position point, and the ending point can be a second position point. The starting point and the ending point are points on the same i-th grid line segment. The j-th grid line segment can include... Figure 17 The horizontal central axis is shown. The distance between the starting point and the target of the horizontal central axis is H1, and the distance between the ending point and the target of the horizontal central axis is H2. The distortion information can be determined based on H1 and H2.

[0156] For example, if H1 and H2 are equal, it indicates that the mesh image has no distortion; if H1 and H2 are different, it indicates that the mesh image has distortion. When the mesh image has distortion, based on... Figure 16 As shown in the diagram, the ratio of the absolute value of the difference between H1 and H2 to the maximum value of H1 and H2 is denoted as the distortion value. The larger the distortion value, the greater the degree of distortion; the smaller the distortion value, the less the degree of distortion.

[0157] In one embodiment, reference Figure 18 This is a schematic diagram of an image processing apparatus, which includes:

[0158] Acquisition module 1 is used to acquire a grid image; wherein the grid image includes m grid line segments, and the grid line segments are line segments formed by imaging multiple parallel line segments included in the grid object;

[0159] The first determining module 2 is used to determine, among the m grid segments, the target distances between multiple position points on the i-th grid segment and the j-th grid segment respectively; wherein the i-th grid segment and the j-th grid segment are grid segments determined by sorting along the same direction, i≠j, i≤m, j≤m;

[0160] The second determining module 3 is used to determine the distortion information of the grid image based on the target distance.

[0161] In one embodiment, the first determining module 2 includes:

[0162] The first determining submodule is used to determine a first position point on the i-th grid line segment; wherein the first position point is a point outside the endpoint of the i-th grid line segment;

[0163] The second determining submodule is used to determine the second position point of the i-th grid line segment; wherein the second position point includes at least one endpoint;

[0164] The fifth determining submodule is used to determine the target distance from the first location point to the j-th grid line segment and the target distance from the second location point to the j-th grid line segment.

[0165] In one embodiment, the first determining submodule includes:

[0166] The first determining unit is used to determine the geometric center of the grid image;

[0167] The second determining unit is used to determine the central intersection point based on the geometric center; wherein the central intersection point is the intersection point of each grid line in the grid image that is closest to the geometric center;

[0168] The third determining unit is used to determine the intersection point of the i-th grid line segment that is located on the same grid line segment as the center intersection point as the first position point.

[0169] In one embodiment, the second determining submodule includes:

[0170] The fourth determining unit is used to determine the target pixel on the i-th grid line segment; wherein, on the side pointed to by the extension direction of the i-th grid line segment, the gray level of each pixel adjacent to the target pixel is different from the gray level of the pixel where the first position point is located.

[0171] The fifth determining unit is used to determine the position of the target pixel as the second position point;

[0172] The grayscale of the pixels containing each grid line segment in the grid image is different from the grayscale of the pixels in the regions outside each grid line segment in the grid image.

[0173] In one embodiment, the fourth determining unit includes:

[0174] The traversal sub-unit is used to move to the side pointed to by the extension direction of the i-th grid line segment, starting from the pixel where the first position point is located, and traverse pixels with the same gray level as the starting pixel.

[0175] A subunit is defined as a pixel whose gray level is different from that of the pixel at the first location point during the traversal process, and that is defined as the target pixel.

[0176] The adjacent pixel is the pixel located on the side to which the extension direction of the i-th grid line segment points.

[0177] In one embodiment, the fourth determining submodule includes:

[0178] The first extraction unit is used to extract the feature points of the i-th grid line segment;

[0179] The sixth determining unit is used to determine the endpoint of the i-th grid line segment based on the feature points.

[0180] In one embodiment, the apparatus further includes:

[0181] The third determining module is used to determine the geometric center of the grid image before determining the distances between multiple position points on the i-th grid line segment and the j-th grid line segment;

[0182] The fourth determining module is used to determine the central intersection point based on the geometric center; wherein the central intersection point is the intersection point of each grid line segment in the grid image that is closest to the geometric center;

[0183] The fifth determining module is used to identify the grid line segment in the grid image that passes through the central intersection point as the j-th grid line segment.

[0184] In one embodiment, module 1 includes:

[0185] The acquisition unit is used to acquire images of a planar chessboard grid; wherein, the grid object includes the chessboard grid.

[0186] The second extraction unit is used to extract the contour information of each grid in the chessboard image to obtain the grid image.

[0187] In one embodiment, the second determining module 3 is further configured to:

[0188] If any two targets are at different distances, the grid image is determined to be distorted.

[0189] If all the target distances are the same, it is determined that the grid image has not been distorted.

[0190] In one embodiment, the second determining module 3 is further configured to:

[0191] When any two targets are at different distances, the degree of distortion is determined based on the maximum distance difference between the targets; wherein the magnitude of the maximum distance difference is positively correlated with the degree of distortion.

[0192] In one embodiment, another example of determining distortion is also provided.

[0193] Typically, testing for distortion in ultra-wide field-of-view lenses requires specialized testing equipment, necessitating additional equipment purchases and incurring significant costs and space requirements. Furthermore, when distortion is excessively severe, effective analysis and calculation of the checkerboard pattern becomes impossible.

[0194] The chart used in this method has edges that are not on the same plane as the center and have an angle between them, creating a three-dimensional chart. This prevents excessive edge distortion in the captured images, which would make analysis and calculation impossible. However, this method requires the purchase of a dedicated chart, which is only suitable for measuring ultra-large FOV lenses and has limited functionality.

[0195] like Figure 3 Images captured by ultra-wide field-of-view lenses exhibit severe edge distortion. Typically, due to the excessive distortion and the lack of a matching distortion analysis algorithm to effectively analyze it, the test calculation scheme fails.

[0196] This invention proposes a method for measuring and calculating distortion of ultra-wide field-of-view lenses based on a planar checkerboard chart. This method still possesses the capability for distortion measurement and analysis of ultra-wide field-of-view lenses using a planar chart. The process includes:

[0197] 1. Identify all intersection points in the grid image, including: detecting corner points on the checkerboard pattern captured by the ultra-wide field-of-view lens. Various detection methods can be used, such as the Harris feature point detection algorithm. (Reference) Figure 7 , is a schematic diagram of the obtained feature points.

[0198] 2. Based on each corner point, determine the corner point closest to the geometric center of the grid image, and designate this corner point as the center corner point of the grid image. By finding the four points closest to the center corner point, obtain the horizontal and vertical axes of the checkerboard center, as follows: Figure 8 and Figure 9 .

[0199] 3. Determine the grid line segments in the grid image, including: using a high-frequency filter to obtain the contour information of the grid image. Many high-frequency filters are available; Sobel and Canny high-frequency filtering operators can both extract contour information. Grid images containing grid line segments can be found in [reference needed]. Figure 4 .

[0200] For non-fisheye lenses, the outline of a checkerboard pattern is usually a straight line, making it easy to determine the coordinate relationship between a point on the central axis and its corresponding edge corner. However, for lenses with extremely wide field of view (such as fisheye lenses), the distortion itself causes the lines to twist, making it difficult to locate the positional relationship between the points on the central axis corresponding to the edges, thus making it difficult to measure the distortion.

[0201] 4. By traversing the coordinates of a corner point on the known central axis, the coordinates of the corresponding points along the horizontal or vertical lines can be obtained.

[0202] First, the grid line segments in the acquired grid image are dilated. For example, the contour information obtained in step 3 is dilated once to obtain a binarized high-frequency contour information map, so that there are no breaks between the black and white grid contour lines of the chessboard.

[0203] Determining the endpoints of the i-th grid segment involves: traversing all points on the horizontal and vertical central axes, starting from the first point on each axis. Points on the horizontal axis are traversed along the contour line in the vertical direction, and points on the vertical axis are traversed along the contour line in the horizontal direction, until the corresponding edge endpoint is found. Figure 5 Example. The i-th grid segment includes the outline here.

[0204] 5. During the traversal of the contour line, for each point, we define four traversal methods: traversing left, right, up, and down, as follows: Figure 14 Starting with the initial pixel coordinates, a 3x3 pixel grid is created centered on the current pixel. The next pixel's position is determined in each of the four directions. Contour line traversal calculations are performed on the binarized high-frequency contour information map obtained in step 5. If the first selection after starting from the initial pixel is 255 (white in the contour map), the current pixel moves to the pixel corresponding to the first selection; otherwise, the second and third selections are selected sequentially. The traversal ends when the values ​​of the pixels corresponding to the first, second, and third selections are all 0 (black in the contour map). Points on the horizontal central axis are traversed upwards and downwards, while points on the vertical central axis are traversed to the left and right. The final result is as follows: Figure 15 The result of the point correspondence.

[0205] 6. Using the positional relationship between the edge points and the central axis point, Figure 16 The corresponding algorithm is used to obtain the distortion values ​​of each point on the central axis of the captured image, and the maximum value among all the distortion values ​​on the central axis is taken as the distortion result of the captured image.

[0206] Taking a point on the vertical central axis as an example, starting from that point, we find the point corresponding to the edge position along the black and white grid outline as the endpoint of the i-th grid line segment, including the endpoint. Figure 16 The corresponding algorithm calculates the distortion of the field of view at the starting point by measuring the distances between the starting and ending points relative to the horizontal central axis. Figure 17 .

[0207] This embodiment eliminates the need to purchase specialized testing equipment and charts that are only compatible with ultra-wide field-of-view lenses, saving costs and laboratory space. It can automatically analyze and calculate the distortion values ​​of a checkerboard image taken with an ultra-wide field-of-view lens.

[0208] It should be noted that the terms "first" and "second" in the embodiments of this disclosure are for ease of description and distinction only, and have no other specific meaning.

[0209] Figure 19 This is a block diagram illustrating a terminal device according to an exemplary embodiment. For example, the terminal device may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0210] Reference Figure 19 The terminal device may include one or more of the following components: processing component 902, memory 904, power component 906, multimedia component 908, audio component 910, input / output (I / O) interface 912, sensor component 914, and communication component 916.

[0211] Processing component 902 typically controls the overall operation of the terminal device, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 902 may include one or more modules to facilitate interaction between processing component 902 and other components. For example, processing component 902 may include a multimedia module to facilitate interaction between multimedia component 908 and processing component 902.

[0212] Memory 904 is configured to store various types of data to support operation on the terminal device. Examples of this data include instructions for any application or method operating on the terminal device, contact data, phonebook data, messages, pictures, videos, etc. Memory 904 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0213] Power component 906 provides power to various components of the terminal device. Power component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the terminal device.

[0214] Multimedia component 908 includes a screen that provides an output interface between a terminal device and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen can be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 908 includes a front-facing camera and / or a rear-facing camera. When the terminal device is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera can receive external multimedia data. Each front-facing camera and rear-facing camera can be a fixed optical lens system or have focal length and optical zoom capabilities.

[0215] Audio component 910 is configured to output and / or input audio signals. For example, audio component 910 includes a microphone (MIC) configured to receive external audio signals when the terminal device is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 904 or transmitted via communication component 916. In some embodiments, audio component 910 also includes a speaker for outputting audio signals.

[0216] I / O interface 912 provides an interface between processing component 902 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0217] Sensor assembly 914 includes one or more sensors for providing status assessments of various aspects of the terminal device. For example, sensor assembly 914 can detect the on / off state of the terminal device, the relative positioning of components such as the display and keypad of the terminal device, changes in the position of the terminal device or a component of the terminal device, the presence or absence of user contact with the terminal device, the orientation or acceleration / deceleration of the terminal device, and temperature changes of the terminal device. Sensor assembly 914 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 914 may also include an optical sensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, sensor assembly 914 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.

[0218] Communication component 916 is configured to facilitate wired or wireless communication between the terminal device and other devices. The terminal device can access wireless networks based on communication standards, such as Wi-Fi, 4G, or 5G, or combinations thereof. In one exemplary embodiment, communication component 916 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 916 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.

[0219] In an exemplary embodiment, the terminal device may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0220] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including executable instructions or a computer program, which can be executed by the processor 920 of the device 900 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.

[0221] A non-transitory computer-readable storage medium, wherein when instructions in the storage medium are executed by a processor of a terminal device, the terminal device is able to perform any of the image processing methods described above in the embodiments of this disclosure.

[0222] This disclosure provides a computer program product comprising a computer program or executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or executable instructions from the computer-readable storage medium and executes the computer program or executable instructions, causing the computer device to perform any of the image processing methods described above in this disclosure.

[0223] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0224] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. An image processing method, characterized in that, include: Acquire a grid image; wherein the grid image includes m grid line segments, and the grid line segments are line segments formed by imaging multiple parallel line segments included in the grid object; In the m grid segments, determine the target distances between multiple locations on the i-th grid segment and the j-th grid segment; wherein the i-th and j-th grid segments are grid segments ordered along the same direction, i≠j, i≤m, j≤m; The distortion information of the grid image is determined based on the target distance.

2. The method according to claim 1, characterized in that, Determining the target distances between multiple points on the i-th grid line segment and the j-th grid line segment includes: Determine a first position point on the i-th grid line segment; wherein the first position point is a point outside the endpoint of the i-th grid line segment; Determine the second location point of the i-th grid line segment; wherein the second location point includes at least one of the endpoints; Determine the target distance from the first location point to the j-th grid line segment and the target distance from the second location point to the j-th grid line segment.

3. The method according to claim 2, characterized in that, Determining the first position point on the i-th grid line segment includes: Determine the geometric center of the grid image; The central intersection point is determined based on the geometric center; wherein, the central intersection point is the intersection point of each grid line segment within the grid image that is closest to the geometric center; The intersection point of the i-th grid line segment that intersects with the center point on the same grid line segment is determined as the first position point.

4. The method according to claim 2, characterized in that, Determining the second position point of the i-th grid line segment includes: Determine the target pixel on the i-th grid line segment; wherein, on the side to which the extension direction of the i-th grid line segment points, the grayscale of each pixel adjacent to the target pixel is different from the grayscale of the pixel where the first position point is located; The location of the target pixel is determined as the second location point; The grayscale of the pixels containing each grid line segment in the grid image is different from the grayscale of the pixels in the area outside each grid line segment in the grid image.

5. The method according to claim 4, characterized in that, Determining the target pixel on the i-th grid line segment includes: Starting with the pixel where the first position point is located, move to the side pointed to by the extension direction of the i-th grid line segment, and traverse pixels with the same gray level as the starting pixel; During the traversal, pixels whose gray levels are different from those of the pixel at the first location are identified as the target pixels. The adjacent pixel is the pixel located on the side to which the extension direction of the i-th grid line segment points.

6. The method according to claim 2, characterized in that, Determining the second position point of the i-th grid line segment includes: Extract the feature points of the i-th grid line segment; Based on the feature points, determine the endpoints of the i-th grid line segment.

7. The method according to any one of claims 1 to 6, characterized in that, Before determining the target distances between multiple locations on the i-th grid segment and the j-th grid segment, the method further includes: Determine the geometric center of the grid image; The central intersection point is determined based on the geometric center; wherein, the central intersection point is the intersection point of each grid line segment within the grid image that is closest to the geometric center; The grid line segment that passes through the central intersection point in the grid image is taken as the j-th grid line segment.

8. The method according to claim 1, characterized in that, The acquisition of the grid image includes: Acquire images of a planar chessboard grid; The outline information of each cell in the chessboard image is extracted to obtain the grid image.

9. The method according to claim 1, characterized in that, Determining the distortion information of the grid image based on the target distance includes: If any two targets are at different distances, the grid image is determined to be distorted. If all the target distances are the same, it is determined that the grid image has not been distorted.

10. The method according to claim 1, characterized in that, Determining the distortion information of the grid image based on the target distance includes: When any two targets are at different distances, the degree of distortion is determined based on the maximum distance difference between the targets; wherein the magnitude of the maximum distance difference is positively correlated with the degree of distortion.

11. An image processing apparatus, characterized in that, include: An acquisition module is used to acquire a grid image; wherein the grid image includes m grid line segments, and the grid line segments are line segments formed by imaging multiple parallel line segments included in the grid object; The first determining module is used to determine, among the m grid segments, the target distances between multiple position points on the i-th grid segment and the j-th grid segment respectively; wherein the i-th grid segment and the j-th grid segment are grid segments determined by sorting along the same direction, i≠j, i≤m, j≤m; The second determining module is used to determine the distortion information of the grid image based on the target distance.

12. A terminal device, characterized in that, include: A processor and a memory for storing computer programs or executable instructions capable of running on the processor, wherein: When the processor is used to run the computer program or the executable instructions, the executable instructions perform the method described in any one of claims 1 to 10.

13. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores a computer program or computer-executable instructions, which, when executed by a processor, implement the method described in any one of claims 1 to 10.

14. A computer program product, comprising a computer program or executable instructions, characterized in that, When the computer program or executable instructions are executed by a processor, they implement the method of any one of claims 1 to 10.