An image distortion calibration method, product, medium, and device
By calculating the distortion radius using optical parameters and screen pixel size coordinate transformation in VR devices, the problem of imaging distortion in VR headsets has been solved, achieving distortion-free image display and improving user experience and R&D efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI LEXIANG TECHNOLOGY CO LTD
- Filing Date
- 2023-01-31
- Publication Date
- 2026-06-30
AI Technical Summary
Existing VR headsets suffer from image distortion due to lens aberrations, which affects the user experience. Distortion calibration is required in the software to provide distortion-free images.
By converting the coordinates of the pixels and calculating the distortion radius based on the first and second optical parameters of the optical device and the pixel size of the display screen, the coordinates of the distorted pixels are determined, and image distortion calibration is performed.
It achieves accurate calibration of image distortion, improves user experience, simplifies operation process, does not rely on software tools, and improves R&D testing speed.
Smart Images

Figure CN116091354B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an image distortion calibration method, product, medium, and device. Background Technology
[0002] Near-eye display (NED) headsets are the most typical and promising entry point into the metaverse. Taking VR headsets as an example, VR technology aims to provide immersive 360° scenes, allowing users to interact within a virtual world.
[0003] Due to the limitations of head-mounted displays (HUDs) in terms of weight and size, large-size spherical displays cannot be used to render virtual environments with a wide field of view. Therefore, VR employs the imaging principle of convex lenses, allowing the human eye to see a magnified virtual image. However, the addition of lenses inevitably introduces image aberrations, especially since VR lenses have a larger aperture, making it difficult to optimize the image distortion at the edges of the field of view to a minimum. The presence of distortion will affect the user experience, as the human eye will try to correct the distortion, leading to eye fatigue. In essence, the presence of distortion can render a VR headset unusable. Therefore, distortion calibration is necessary in the software to ensure that users see a distortion-free image.
[0004] Therefore, there is an urgent need for an image distortion calibration method, product, medium, and device to improve the effect of image distortion calibration. Summary of the Invention
[0005] This application provides a method, apparatus, product, medium, and device for improving the effect of image distortion calibration.
[0006] In a first aspect, embodiments of this application provide an image distortion calibration method, which is applied in a virtual reality (VR) device that performs image magnification processing on an image displayed on a screen using optical devices. The method includes:
[0007] For any pixel in the image to be displayed, based on the first optical parameters of the optical device and the pixel size of the display screen, the first coordinate of the pixel in pixel units is converted into a second coordinate in length units; the first optical parameters are used for image imaging.
[0008] Based on the second optical parameters of the optical device and the second coordinates, the distortion radius of the pixel point from the origin of the display screen is determined; the second optical parameters are used to characterize the degree of image distortion.
[0009] The third coordinate of the pixel after distortion processing is determined by the distortion radius and the second coordinate.
[0010] A calibration image is determined for each pixel in the image to be displayed after distortion processing, and the calibration image is used for display on the display screen.
[0011] By employing the above method, the first and second optical parameters of the optical components and the pixel size of the display screen are considered during the image processing, resulting in more accurate distortion calibration. After obtaining the distortion radius, the third coordinate after distortion is obtained. Furthermore, the above process is simple and easy to operate, requiring no software tools, enabling rapid calibration of image display and thus improving the speed of research and development testing.
[0012] In one possible implementation, based on the first optical parameters of the optical device and the pixel size of the display screen, the first coordinate point of the pixel in pixel units is converted into a second coordinate point in length units, including:
[0013] Based on the lens focal length of the optical device and the pixel size of any pixel in the display screen, the first coordinate point of the pixel in pixel units is converted into a second coordinate point in length units.
[0014] By converting the length unit into the pixel unit according to the parameters of the optical system, the above method can pave the way for calibration using pixels on the screen, making the calibration more intuitive and consistent with the image seen by the human eye, thus ensuring the effectiveness of the calibration.
[0015] In one possible implementation, the second coordinates of the pixel are determined according to the following formula:
[0016]
[0017]
[0018] Where x is the X coordinate of the pixel in length units, y is the Y coordinate of the pixel in length units; f is the lens focal length, dx is the pixel size of the pixel in the X direction of the display screen, u-u0 is the pixel distance of the pixel in the X direction of the display screen from the origin pixel of the display screen; dy is the pixel size of the pixel in the Y direction of the display screen, and v-v0 is the pixel distance of the pixel in the Y direction of the display screen from the origin pixel of the display screen.
[0019] In one possible implementation, determining the distortion radius of the pixel point from the origin of the display screen based on the second optical parameters of the optical device and the second coordinates includes:
[0020] The initial radius of the pixel from the origin of the display screen is determined based on the second coordinate.
[0021] The distortion radius corresponding to the initial radius is determined by a distortion model; the distortion model includes distortion coefficients determined by the distortion parameters of the optical device.
[0022] In one possible implementation, determining the third coordinates of the pixel after distortion processing using the distortion radius and the second coordinates includes:
[0023] The third coordinate is determined using the following formula:
[0024] x d =xF(r)
[0025] y d =yF(r)
[0026] F(r) = 1 + k1r + k2r 2 +k3r 3
[0027] Where, x d Let X be the x-coordinate of the pixel after distortion, and Y be the y-coordinate of the pixel. d Let Y be the Y coordinate of the pixel after distortion, and F be the distortion model.
[0028] In one possible implementation, determining the calibrated image of each pixel in the image to be displayed after distortion processing in pixel units includes:
[0029] The fourth coordinate of each pixel in the calibration image is determined by the following formula:
[0030] u d =x d f x +u0
[0031] v d =y d f y +v0
[0032] Among them, u d v is the x-coordinate of a pixel in pixel units. d The vertical coordinate of a pixel is given in pixel units.
[0033] In one possible implementation, the grayscale value of each pixel in the calibration image is determined based on the grayscale value of the pixel in the image to be displayed and the grayscale values of its neighboring pixels in the calibration image.
[0034] This is due to the distortion of u d and v d The value of u may not be an integer, but in pixel units on a display screen, u and v only have integer values, therefore, when calculating u... d and v dNext, it needs to be rounded. Using the original grayscale value of pixel (u, v) at this point would be incomplete. Therefore, the grayscale value obtained by interpolation using the grayscale values of its neighboring pixels is used as the grayscale value of (u). d v d The grayscale value at () is relatively accurate.
[0035] Secondly, embodiments of this application provide an image distortion calibration device, which includes:
[0036] The conversion module is used to convert the first coordinates of any pixel in the image to be displayed into second coordinates in length units, based on the first optical parameters of the optical device and the pixel size of the display screen; the first optical parameters are used for image imaging.
[0037] The determining module is used to determine the distortion radius of the pixel point from the origin of the display screen based on the second optical parameters of the optical device and the second coordinates; the second optical parameters are used to characterize the degree of image distortion.
[0038] The determining module is further configured to determine the third coordinates of the pixel after distortion processing using the distortion radius and the second coordinates; and to determine the calibration image of each pixel in the image to be displayed after distortion processing in pixel units, the calibration image being used for display on the display screen.
[0039] In one possible implementation, the conversion module is specifically used to: convert the first coordinate point of the pixel in pixel units into a second coordinate point in length units based on the lens focal length of the optical device and the pixel size of any pixel in the display screen.
[0040] In one possible implementation, the determining module is specifically used to: determine the second coordinates of the pixel point according to the following formula:
[0041]
[0042]
[0043] Where x is the X coordinate of the pixel in length units, y is the Y coordinate of the pixel in length units; f is the lens focal length, dx is the pixel size of the pixel in the X direction of the display screen, u-u0 is the pixel distance of the pixel in the X direction of the display screen from the origin pixel of the display screen; dy is the pixel size of the pixel in the Y direction of the display screen, and v-v0 is the pixel distance of the pixel in the Y direction of the display screen from the origin pixel of the display screen.
[0044] In one possible implementation, the determining module is specifically used to determine the initial radius of the distance between the pixel and the origin of the display screen based on the second coordinate; and to determine the distortion radius corresponding to the initial radius through a distortion model; the distortion model includes distortion coefficients determined by the distortion parameters of the optical device.
[0045] In one possible implementation, the determining module is specifically used to determine the third coordinate according to the following formula:
[0046] x d =xF(r)
[0047] y d =yF(r)
[0048] F(r) = 1 + k1r + k2r 2 +k3r 3
[0049] Where, x d Let X be the x-coordinate of the pixel after distortion, and Y be the y-coordinate of the pixel. d Let Y be the Y coordinate of the pixel after distortion, and F be the distortion model.
[0050] In one possible implementation, the determining module is specifically used to determine the fourth coordinate of each pixel in the calibration image using the following formula:
[0051] u d =x d f x +u0
[0052] v d =y d f y +v0
[0053] Among them, u d v is the x-coordinate of a pixel in pixel units. d The vertical coordinate of a pixel is given in pixel units.
[0054] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run, executes any of the methods described in the first aspect above.
[0055] Fourthly, embodiments of this application provide a computing device, including: a memory for storing program instructions; and a processor for calling the program instructions stored in the memory and executing the method in any of the designs in the first aspect above according to the obtained program.
[0056] Fifthly, embodiments of this application provide a computer program product that, when run on a processor, implements the method as described in any of the designs in the first aspect above.
[0057] The beneficial effects of the second to fifth aspects mentioned above can be specifically referred to as the beneficial effects that can be achieved by any of the designs in the first aspect mentioned above, and will not be elaborated here. Attached Figure Description
[0058] Figure 1 An exemplary illustration shows an application scenario provided by an embodiment of this application;
[0059] Figure 2 An exemplary illustration is shown in an embodiment of this application.
[0060] Figure 3 An exemplary schematic diagram of another imaging method provided in an embodiment of this application is shown;
[0061] Figure 4 An exemplary schematic diagram of a coordinate system provided in an embodiment of this application is shown;
[0062] Figure 5 An exemplary schematic diagram of a display screen coordinate system provided in an embodiment of this application is shown;
[0063] Figure 6 This paper exemplarily illustrates another display screen coordinate system provided in an embodiment of this application;
[0064] Figure 7 An exemplary flowchart of a distortion processing method provided in an embodiment of this application is shown.
[0065] Figure 8 This illustration shows a schematic diagram of an image before distortion provided in an embodiment of this application;
[0066] Figure 9 An exemplary schematic diagram of a distorted image provided in an embodiment of this application is shown;
[0067] Figure 10 An exemplary schematic diagram of an image distortion calibration device provided in an embodiment of this application is shown. Detailed Implementation
[0068] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0069] Figure 1 An exemplary diagram illustrating an application scenario provided by an embodiment of this application is shown. Figure 1 As shown, in a Virtual Reality (VR) system, the imaging principle of a convex lens is used. A display of a certain size is placed within one focal length of the convex lens, and the human eye can see a magnified virtual image of the display device at the exit pupil distance on the other side of the convex lens. Figure 1 As shown, in a VR system, two lenses with focal points F and F' are located on the optical axis, with a focal length of f. A display AB is placed within the left focal length, at a distance P from the convex lens. According to the imaging principle of a convex lens, light rays from point A on the display pass through the convex lens and reach the focal length on the other side. Light rays from point B, the center point of the display, pass through the center point of the convex lens and converge with the light rays from point A at the right focal length. Based on the imaging principle of a convex lens, extending the backward extensions of the light rays from point A and the focal ray converges at point A', which is the virtual image formed by point A. A perpendicular line is drawn from point A' to the optical axis; the focal point of this line is point B', which is the virtual image formed by point B. Thus, the virtual image formed by the display after magnification by the convex lens is obtained.
[0070] The above optical path scenario only demonstrates the imaging principle of two points on the display screen that are on the same plane as the optical axis. However, since an actual display screen is not a straight line but a plane with length and width, points on the edge of the display screen will also be imaged by a lens. However, because the thickness of the center and edge of the convex lens is different, the entire display screen will be distorted after being imaged by the convex lens, that is, a distorted virtual image will be displayed. Figure 2 As shown, the image on the left becomes the image on the right after being imaged through the lens. It is evident that the grid at the edges undergoes significant deformation, changing from a square to a rhombus, and each side of the rhombus becomes an arc. Based on these known deformations, to ensure proper image display, the image can be preprocessed before passing through the lens.
[0071] For details, please refer to Figure 3 The principle behind this is that before the image passes through the lens, it is preprocessed to resemble the shape on the left; after passing through the lens, it is displayed in its normal shape. Figure 1 In the scenario, all images on the display screen are processed into Figure 3 The shape on the left side of the image, after passing through a convex lens, will appear as a virtual image of a normal shape to the human eye.
[0072] Existing technologies utilize Software Development Kits (SDKs) for distortion correction, which involves processing a normally displayed image into an distorted version before displaying it on a screen. After passing through a convex lens, the human eye perceives a normal image, achieving a better virtual display experience. However, the image processing using an SDK primarily relies on the following distortion model:
[0073] F(r) = 1 + k1r + k2r 2 +…+k n r n ......(1)
[0074] kn is the distortion coefficient, which can be obtained from the distortion parameters of the lens optical design. r is the distance from the pixel (u, v) on the display screen to the origin with the center (u0, v0) of the display screen as the origin before distortion. F(r) is the distance from the pixel at position r to the origin after distortion processing.
[0075]
[0076] In practical applications, this distortion model typically uses the first three distortion coefficients:
[0077] F(r) = 1 + k1r + k2r 2 +k3r 3 ......(3)
[0078] Using the above model, the image is subjected to anti-distortion processing, and the value of r is obtained according to the geometric definition. However, the imaging parameters of the convex lens are not included in formula (2), which means that F(r) after anti-distortion processing lacks consideration of the lens imaging process.
[0079] To clearly describe the considerations for the imaging process during distortion, Figure 4 An exemplary schematic diagram of a coordinate system provided in an embodiment of this application is shown, such as... Figure 4 As shown, the vertical direction of the convex lens is taken as the Y-axis, the center of the convex lens is taken as the origin, and the line perpendicular to the optical axis is taken as the X-axis. Figure 4 The example in the upper right corner illustrates the positive directions of the Y-axis and X-axis. Figure 5 An exemplary schematic diagram of a display screen coordinate system provided in an embodiment of this application is shown, such as... Figure 5 As shown, Figure 4 The coordinate axes in the image are translated along the optical axis to obtain the coordinate axes on the display screen.
[0080] according to Figure 4 In the equation, the relationship between y1 and y2 can be obtained by analogy between ΔCOF' and ΔABF':
[0081]
[0082] For the x-direction:
[0083]
[0084] Thus, a mathematical relationship is established between a point (x1, y1) on the display screen and the corresponding virtual image point coordinates (x2, y2). Since the content displayed on the display screen needs to be adjusted eventually, the virtual image is treated as a virtual object, and the display screen is treated as the image. The relationship between the two can be written in matrix form:
[0085]
[0086] Let z = f + q, and write it in homogeneous form to obtain:
[0087]
[0088] (7) is the object-image correspondence under the length unit. The final distortion calibration is the display adjustment for the display pixels. Finally, it needs to be converted to the display pixel unit. Figure 6 This application provides an exemplary schematic diagram of another display screen coordinate system; for example... Figure 6 As shown, (u, v) are the pixel coordinates of the display screen, (u0, v0) are the pixel coordinates of the center of the display screen, dx is the pixel size of the display screen in the x-direction, and dy is the pixel size of the display screen in the y-direction. The transformation matrix is then obtained as follows:
[0089]
[0090] Equation (8) represents the correspondence between pixel positions on the display screen and object points on the display screen.
[0091] Substituting the right side of equation (7) into equation (8), we get:
[0092]
[0093] Therefore, the parameter T of the optical system can be extracted:
[0094]
[0095] Where f x =f / dx, f y = f / dy, then the relationship between the virtual image point and its corresponding pixel point is:
[0096]
[0097]
[0098] The radius r corresponding to the virtual image point i for:
[0099]
[0100] In equation (13) above, if f x =f y Then equation (13) becomes:
[0101]
[0102] From this, we can see that r i The relationship between f and r is a constant proportionality. In this case, substituting equation (2) into the distortion model and substituting equation (13) into the distortion model yields the same result. However, the premise in this case is that f x =f y That is, the size dx of a pixel in the X direction and the size dy of a pixel in the Y direction on the display screen are equal. However, in general, the size dx of a pixel in the X direction and the size dy of a pixel in the Y direction on the display screen are not equal. Therefore, it is necessary to... x ≠f y Distortion calibration is performed under these conditions.
[0103] In f x ≠f y If we then use the r obtained from equation (2) for distortion correction, we will lack consideration of the imaging process, and the resulting accuracy will be insufficient. Therefore, in order to take into account the general case, equation (2) is redefined based on the T matrix as follows:
[0104]
[0105] Based on this, a new distortion processing method is provided, which is applied to virtual reality (VR) devices that magnify images displayed on a screen using optical devices. Figure 7 An exemplary flowchart of a distortion processing method provided in an embodiment of this application is shown, such as... Figure 7 As shown, the method includes:
[0106] Step 701: For any pixel in the image to be displayed, based on the first optical parameters of the optical device and the pixel size of the display screen, convert the first coordinate of the pixel in pixel units into a second coordinate in length units; the first optical parameters are used for image imaging.
[0107] Step 702: Determine the distortion radius of the pixel point from the origin of the display screen based on the second optical parameters and second coordinates of the optical device; the second optical parameters are used to characterize the degree of image distortion.
[0108] The first optical parameter and the second optical parameter are the parameters in the T matrix mentioned above.
[0109] Step 703: Determine the third coordinate of the pixel after distortion processing using the distortion radius and the second coordinate;
[0110] Step 704: Determine the calibration image of each pixel in the image to be displayed after distortion processing in pixel units. The calibration image is used for display on the display screen.
[0111] By employing the above method, the first and second optical parameters of the optical components and the pixel size of the display screen are considered during the image processing, resulting in more accurate distortion calibration. After obtaining the distortion radius, the third coordinate after distortion is obtained and calibrated to make the displayed colors more precise. Furthermore, the above process is simple and easy to operate, requiring no software tools, enabling rapid image display calibration and thus improving the speed of research and development testing.
[0112] In step 701 above, based on the lens focal length of the optical device and the pixel size of any pixel in the display screen, the first coordinate point of the pixel in pixel units is converted into a second coordinate point in length units. Specifically, the following formula can be used:
[0113]
[0114]
[0115] Where x is the X coordinate of the pixel in length units, y is the Y coordinate of the pixel in length units; f is the lens focal length, dx is the pixel size of the pixel in the X direction of the display screen, u-u0 is the pixel distance of the pixel in the X direction of the display screen from the origin pixel of the display screen; dy is the pixel size of the pixel in the Y direction of the display screen, and v-v0 is the pixel distance of the pixel in the Y direction of the display screen from the origin pixel of the display screen.
[0116] In step 702 above, the initial radius of the pixel point from the origin of the display screen is determined according to the second coordinate; specifically, refer to the above formula (15); through the distortion model, the distortion radius corresponding to the initial radius is determined; the distortion model includes the distortion coefficient determined by the distortion parameters of the optical device, specifically refer to the above formulas (1) and (3).
[0117] In step 703 above, the third coordinate can be determined using the following formula:
[0118] x d =xF(r)......(18)
[0119] y d =yF(r)......(19)
[0120] F(r) = 1 + k1r + k2r 2 +k3r 3 ......(3)
[0121] Where, x d Let X be the x-coordinate of the pixel after distortion, and Y be the y-coordinate of the pixel. d Let Y be the Y coordinate of the pixel after distortion, and F be the distortion model.
[0122] In step 703 above, the fourth coordinate of each pixel in the calibration image is determined using the following formula:
[0123] u d =x d f x +u0......(20)
[0124] v d =y d f y +v0......(21)
[0125] Among them, u d v is the x-coordinate of a pixel in pixel units. d The vertical coordinate of a pixel is given in pixel units.
[0126] In step 704 above, the gray value of each pixel in the calibration image is determined based on the gray value of the pixel in the image to be displayed and the gray values of its neighboring pixels in the calibration image.
[0127] Optionally, after pixel (u, v) distortion (u) d v d The gray value at a certain point is obtained by interpolating the gray values of its neighboring pixels, and bilinear interpolation is commonly used.
[0128] This is due to the distortion of u d and v d The value of u may not be an integer, but in pixel units on a display screen, u and v only have integer values, therefore, when calculating u... d and v d Next, it needs to be rounded. Using the original grayscale value of pixel (u, v) at this point would be incomplete. Therefore, the grayscale value obtained by interpolation using the grayscale values of its neighboring pixels is used as the grayscale value of (u). d v d The grayscale value at () is relatively accurate.
[0129] Figure 8 This illustration shows a schematic diagram of a pre-distortion image provided in an embodiment of this application. Figure 9This illustration shows a schematic diagram of a distorted image provided in an embodiment of this application. Figure 8 and Figure 9 As shown, the white block in the upper left corner has been deformed in both shape and position after distortion.
[0130] Based on the same technical concept, this application also provides an image distortion calibration device. Figure 10 An exemplary schematic diagram of an image distortion calibration device provided in an embodiment of this application is shown. This device can perform the aforementioned image distortion calibration method, such as... Figure 10 As shown, the device includes:
[0131] The conversion module is used to convert the first coordinates of any pixel in the image to be displayed into second coordinates in length units, based on the first optical parameters of the optical device and the pixel size of the display screen; the first optical parameters are used for image imaging.
[0132] The determining module is used to determine the distortion radius of the pixel point from the origin of the display screen based on the second optical parameters of the optical device and the second coordinates; the second optical parameters are used to characterize the degree of image distortion.
[0133] The determining module is further configured to determine the third coordinates of the pixel after distortion processing using the distortion radius and the second coordinates; and to determine the calibration image of each pixel in the image to be displayed after distortion processing in pixel units, the calibration image being used for display on the display screen.
[0134] In one possible implementation, the conversion module is specifically used to: convert the first coordinate point of the pixel in pixel units into a second coordinate point in length units based on the lens focal length of the optical device and the pixel size of any pixel in the display screen.
[0135] In one possible implementation, the determining module is specifically used to: determine the second coordinates of the pixel point according to the following formula:
[0136]
[0137]
[0138] Where x is the X coordinate of the pixel in length units, y is the Y coordinate of the pixel in length units; f is the lens focal length, dx is the pixel size of the pixel in the X direction of the display screen, u-u0 is the pixel distance of the pixel in the X direction of the display screen from the origin pixel of the display screen; dy is the pixel size of the pixel in the Y direction of the display screen, and v-v0 is the pixel distance of the pixel in the Y direction of the display screen from the origin pixel of the display screen.
[0139] In one possible implementation, the determining module is specifically used to determine the initial radius of the distance between the pixel and the origin of the display screen based on the second coordinate; and to determine the distortion radius corresponding to the initial radius through a distortion model; the distortion model includes distortion coefficients determined by the distortion parameters of the optical device.
[0140] In one possible implementation, the determining module is specifically used to determine the third coordinate according to the following formula:
[0141] x d =xF(r)......(18)
[0142] y d =yF(r)......(19)
[0143] F(r) = 1 + k1r + k2r 2 +k3r 3 ......(3)
[0144] Where, x d Let X be the x-coordinate of the pixel after distortion, and Y be the y-coordinate of the pixel. d Let Y be the Y coordinate of the pixel after distortion, and F be the distortion model.
[0145] In one possible implementation, the determining module is specifically used to determine the fourth coordinate of each pixel in the calibration image using the following formula:
[0146] u d =x d f x +u0......(20)
[0147] v d =y d f y +v0......(21)
[0148] Among them, u d v is the x-coordinate of a pixel in pixel units. d The vertical coordinate of a pixel is given in pixel units.
[0149] Based on the same technical concept, embodiments of the present invention also provide a computing device, including: a memory for storing program instructions;
[0150] The processor is used to call program instructions stored in the memory and execute them according to the obtained program. Figure 7 The method shown.
[0151] Based on the same technical concept, embodiments of the present invention also provide a computer-readable storage medium, which, when the computer program product is run on a processor, implements the following: Figure 7 The method shown.
[0152] Based on the same technical concept, embodiments of the present invention also provide a computer program product, which, when run on a processor, implements the following: Figure 7 The method shown.
[0153] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0154] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0155] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0156] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0157] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. An image distortion calibration method, characterized in that, The method is applied to a virtual reality (VR) device that performs image magnification processing on an image displayed on a screen using optical devices. The method includes: For any pixel in the image to be displayed, based on the first optical parameters of the optical device and the pixel size of the display screen, the first coordinates of the pixel in pixel units are converted into second coordinates in length units; the first optical parameters are used for image imaging; the pixel size of the display screen includes the pixel size in the X direction of the display screen. and the pixel size in the Y direction of the display screen ,and ≠ The step of converting the first coordinates of a pixel in pixel units to second coordinates in length units based on the first optical parameters of the optical device and the pixel size of the display screen includes: converting the first coordinates of the pixel in pixel units to second coordinates in length units based on the lens focal length of the optical device and the pixel size of any pixel in the display screen; wherein the second coordinates of the pixel are determined according to the following formula: , , The x-coordinate of the pixel in units of length. The Y-coordinate of the pixel in units of length; The focal length of the lens. This is the pixel distance of a pixel from the origin pixel of the display screen in the X direction. This is the pixel distance of a pixel from the origin pixel of the display screen in the Y direction. Based on the second optical parameters of the optical device and the second coordinates, the distortion radius of the pixel point from the origin of the display screen is determined; the second optical parameters are used to characterize the degree of image distortion. The third coordinate of the pixel after distortion processing is determined using the distortion radius and the second coordinate; the third coordinate is determined according to the following formula: , The X coordinate of the pixel after distortion. Let Y be the Y coordinate of the pixel after distortion, and F be the distortion model. A calibration image is determined for each pixel in the image to be displayed after distortion processing, and the calibration image is used for display on the display screen.
2. The method as described in claim 1, characterized in that, Determining the distortion radius of the pixel point from the origin of the display screen based on the second optical parameters of the optical device and the second coordinates includes: The initial radius of the pixel from the origin of the display screen is determined based on the second coordinate. The distortion radius corresponding to the initial radius is determined by a distortion model; the distortion model includes distortion coefficients determined by the distortion parameters of the optical device.
3. The method as described in claim 1 or 2, characterized in that, Determining the calibrated image of each pixel in the image to be displayed after distortion processing in pixel units includes: The fourth coordinate of each pixel in the calibration image is determined by the following formula: Among them, u d v is the x-coordinate of a pixel in pixel units. d The vertical coordinate of a pixel is given in pixel units.
4. The method as described in claim 3, characterized in that, The grayscale value of each pixel in the calibration image is determined based on the grayscale value of the pixel in the image to be displayed and the grayscale values of its neighboring pixels in the calibration image.
5. A computer program product, characterized in that, When a computer program product is run on a processor, it implements the method as described in any one of claims 1 to 4.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, performs the method as described in any one of claims 1 to 4.
7. A computing device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the method as described in any one of claims 1 to 4 according to the obtained program.