A coordinate mapping method and an image display method
By generating the radial distribution function and mapping transformation relationship of the field of view tangent, and solving the parameters in combination with the preset conditions of the application scenario, the problem of the singleness of image distortion correction in the existing technology is solved, and flexible adaptation and user experience improvement are achieved in different scenarios.
Patent Information
- Application Number
- CN202511211507.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-08-27
AI Technical Summary
Existing distortion correction methods can only correct a single image, which cannot flexibly adapt to the needs of different scenarios and affects the user's visual experience.
By acquiring the grid distortion data of the optical imaging system, a radial distribution function of the field angle tangent corresponding to each pixel is generated. Based on the relationship between the field angle tangent and the radial distribution function, the mapping transformation relationship between the original image and the display screen is determined. Furthermore, the parameters are solved by setting preset conditions according to different application scenarios to determine the coordinate mapping transformation relationship.
It achieves flexible distortion correction in different application scenarios, improves user experience, and allows end users to see a distortion-free virtual image.
Smart Images

Figure CN120725935B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to a coordinate mapping method and an image display method. BACKGROUND
[0002] After an image is processed by an optical imaging system, distortion will be generated. Therefore, directly displaying the image processed by the optical imaging system on a screen will affect the visual experience of a user due to the distortion. In order to eliminate the distortion, the image is usually corrected for distortion before being displayed. However, the existing distortion correction method can only correct the image for distortion in a single manner, and cannot flexibly adapt to the requirements in different scenarios. SUMMARY
[0003] The present application provides a coordinate mapping method and an image display method to solve the problem that the image can only be corrected for distortion in a single manner and to flexibly adapt to different application scenarios.
[0004] According to an aspect of the present application, a coordinate mapping method is provided, comprising:
[0005] obtaining mesh distortion data of an optical imaging system, generating a radial distribution function corresponding to a tangent value of a field of view angle of a pixel point based on the mesh distortion data;
[0006] determining a mapping transformation relationship between the pixel point on an original image and a pixel point on a display screen based on a relationship between the tangent value of the field of view angle of the pixel point and the radial distribution function;
[0007] solving parameters of the mapping transformation relationship based on at least one preset condition, and determining at least one coordinate mapping transformation relationship, wherein the preset condition is set according to an application scenario.
[0008] According to another aspect of the present application, an image display method is provided, comprising:
[0009] obtaining application scenario requirement information;
[0010] selecting a target coordinate mapping transformation relationship matching the application scenario requirement information from a plurality of coordinate mapping transformation relationships, wherein the coordinate mapping transformation relationship is determined according to the coordinate mapping method of any one of the embodiments of the present application;
[0011] correcting pixel coordinates in a display screen based on the target coordinate mapping transformation relationship, and displaying an image based on pixel values corresponding to the pixel coordinates corrected for distortion.
[0012] According to another aspect of the present application, a coordinate mapping device is provided, comprising:
[0013] The distortion data acquisition module is configured to acquire grid distortion data of the optical imaging system, and generate a radial distribution function corresponding to a tangent value of a field of view angle of a pixel based on the grid distortion data;
[0014] The mapping transformation relationship determination module is configured to determine a mapping transformation relationship between a pixel on the original image and a pixel on the display screen based on a relationship between the tangent value of the field of view angle of the pixel and the radial distribution function.
[0015] The coordinate mapping relationship determination module is configured to determine a coordinate mapping transformation relationship by performing parameter solving on the mapping transformation relationship based on a preset condition.
[0016] According to another aspect of the present application, an image display device is provided, comprising:
[0017] The application scenario acquisition module is configured to acquire application scenario requirement information.
[0018] The target mapping relationship determination module is configured to select a matching target coordinate mapping transformation relationship from the pre-determined coordinate mapping transformation relationships according to the application scenario requirement information, wherein the coordinate mapping transformation relationship is determined according to the coordinate mapping method of any of the embodiments of the present application.
[0019] The distortion correction module is configured to perform distortion correction on pixel coordinates in the display screen based on the target coordinate mapping transformation relationship, and perform image display based on pixel values corresponding to the distortion-corrected pixel coordinates.
[0020] According to another aspect of the present application, an electronic device is provided, comprising:
[0021] At least one processor, and a memory connected to the at least one processor in communication;
[0022] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the coordinate mapping method or the image display method according to any of the embodiments of the present application.
[0023] According to another aspect of the present application, a computer readable storage medium is provided, which stores computer instructions for enabling a processor to implement the coordinate mapping method or the image display method according to any of the embodiments of the present application when executed by the processor.
[0024] According to another aspect of the present application, a computer program product is provided, which comprises a computer program for implementing the coordinate mapping method or the image display method according to any of the embodiments of the present application when executed by a processor.
[0025] The technical scheme of the embodiment of the application obtains grid distortion data of an optical imaging system, generates a radial distribution function corresponding to a tangent value of a field of view angle of a pixel point based on the grid distortion data, determines a mapping transformation relationship between the pixel point on the original image and the pixel point on the display screen based on a relationship between the tangent value of the field of view angle of the pixel point and the radial distribution function, and solves parameters of the mapping transformation relationship based on at least one preset condition to determine at least one coordinate mapping transformation relationship. The preset condition is set according to an application scenario, and the problem that only single distortion correction can be performed on an image is solved. The mapping transformation relationship between the pixel point on the original image and the pixel point on the display screen is constructed based on the relationship between the tangent value of the field of view angle of the pixel point and the radial distribution function, and the mapping transformation relationship obtained can be solved under different conditions. Different preset conditions are set according to different application scenarios, parameters of the mapping transformation relationship are solved based on at least one preset condition, parameter values of the mapping transformation relationship are obtained, and at least one coordinate mapping transformation relationship is finally determined. Each coordinate mapping transformation relationship can be used for distortion correction of an image. Different preset conditions are generated based on different business scenarios according to the embodiment of the application, and different coordinate mapping transformation relationships are determined according to different preset conditions. Different application scenarios can be flexibly adapted, and images in different application scenarios can be reasonably corrected, so that a user finally sees a virtual image without distortion, and user experience is improved.
[0026] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the application, nor is it used to limit the scope of the application. Other features of the application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0028] Figure 1 is a flow chart of a coordinate mapping method provided by the first embodiment of the application;
[0029] Figure 2 is an example diagram of distortion provided by the first embodiment of the application;
[0030] Figure 3 is an example diagram of data fitting provided by the first embodiment of the application;
[0031] Figure 4is a flow chart of a coordinate mapping method according to Embodiment Two of the present application;
[0032] Figure 5 is an example diagram of an image after inverse transformation of a rectified model according to Embodiment Two of the present application;
[0033] Figure 6 is an example diagram of a virtual image forming process according to Embodiment Two of the present application;
[0034] Figure 7 is an example diagram of another virtual image forming process according to Embodiment Two of the present application;
[0035] Figure 8 is an example diagram of another virtual image forming process according to Embodiment Two of the present application;
[0036] Figure 9 is an example diagram of another virtual image forming process according to Embodiment Two of the present application;
[0037] Figure 10 is a flow chart of an image display method according to Embodiment Three of the present application;
[0038] Figure 11 is a structural schematic diagram of a coordinate mapping device according to Embodiment Four of the present application;
[0039] Figure 12 is a structural schematic diagram of an image display device according to Embodiment Five of the present application;
[0040] Figure 13 is a structural schematic diagram of an electronic device according to Embodiment Six of the present application. DETAILED DESCRIPTION
[0041] In order to enable persons skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative labor should fall within the scope of protection of the present application.
[0042] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0043] Embodiment one
[0044] Figure 1 A flowchart of a coordinate mapping method provided for the first embodiment of the present application, the present embodiment can be applicable to the case of mapping coordinates in an image, which can be performed by a coordinate mapping device, which can be realized in the form of hardware and / or software, and can be configured in an electronic device. As shown in the figure, the method comprises: Figure 1
[0045] S101, obtaining grid distortion data of an optical imaging system, and generating a radial distribution function corresponding to a tangent value of a field of view angle of a pixel point based on the grid distortion data.
[0046] In the present embodiment, the display screen can be a display screen of a near-eye display device, and the near-eye display device can be a display device that will produce significant distortion after optical imaging, such as a desktop computer, a mobile phone, a tablet computer, VR glasses, AR glasses, etc. The grid distortion data can be understood as related data describing the change of the shape of the grid, and the grid distortion data in the present embodiment at least includes the correspondence between the angle and the physical coordinates, the physical coordinates can be converted into the coordinates of the pixel points on the display screen, and the angle can be used as the field of view angle of the pixel points relative to the human eye, wherein the coordinates of the pixel points on the display screen take the center of the display screen as the coordinate origin, which can be represented by (x, y), and the field of view angle is the field of view angle of the point corresponding to the pixel points in the virtual image in the projection of the point on the x-axis and y-axis relative to the human eye, which can be represented by The radial distribution function is a functional relationship between the distortion data and the distance of the pixel points on the distortion image to the center of the distortion image.
[0047] The virtual image formed by the display screen after passing through the optical imaging system usually produces pincushion distortion. The grid distortion data of the optical imaging system is obtained. The grid distortion data usually includes multiple sets of physical coordinates and their field of view angles. The physical coordinates are divided by the pixel interval to obtain the coordinates of the pixels on the display screen. Based on the coordinates of the pixels on the display screen, the functional relationship between the distortion data and the distance from the pixel to the center of the distorted image is fitted to obtain the radial distribution function corresponding to the tangent of the field of view angle of the pixel.
[0048] For example, Figure 2 An example image of distortion is provided, showing the virtual image formed on the screen after passing through an optical imaging system, which generally produces pincushion distortion, such as... Figure 2 As shown. This distortion can be quantitatively described by Equation 1:
[0049] Formula 1;
[0050] Where (x, y) are the coordinates of the pixels on the display screen, with the center of the display screen as the origin. It is the field of view angle of the human eye relative to the point on the x-axis and y-axis that corresponds to the point in the virtual image.
[0051] For ease of calculation, the tangent of the field of view can be used to replace the angle value, resulting in Formula 2, which is equivalent to Formula 1.
[0052] Formula 2;
[0053] For symmetrical optical imaging systems, Equation 2 can be simplified to Equation 3:
[0054] Formula 3;
[0055] For a specific optical imaging system, its The relationship with r is also deterministic. It can be obtained by tracking the points corresponding to discrete sampling points on the display screen after imaging using the design software of the optical imaging system, thus obtaining a set of (x, y) and r. The corresponding data points are the grid distortion data.
[0056] By selecting an appropriate fitting method, we can obtain... The functional relationship between r and r, for example, for symmetrical optical imaging systems, can be determined relatively accurately using polynomial fitting. The functional relationship. For example, this application provides an expression for the radial distribution function F(r) obtained by fitting a 9th-order polynomial:
[0057] Formula 4.
[0058] An example of data fitting is provided, in which the horizontal axis represents r, the coordinates can be pixels, and the vertical axis represents Figure 3 An example of a function relationship with r is provided. , Figure 3 For An example of a function relationship with r is provided.
[0059] S102, based on the relationship between the tangent value of the field of view angle corresponding to the pixel point and the radial distribution function, the mapping transformation relationship between the pixel points on the original image and the pixel points on the display screen is determined.
[0060] In this embodiment, the mapping transformation relationship is a coordinate mapping relationship, which can map the pixel points in the original image to the display screen according to the coordinates, or map the pixel points on the display screen to the original image according to the coordinates. The mapping transformation relationship in the embodiment of the application includes unknown quantities. The original image refers to an image that has not been processed by an optical imaging system. In the optical imaging process, the original image is first determined, and the original image is processed by the optical imaging system to form a virtual image and display it on the display screen.
[0061] The relationship between the tangent value of the field of view angle corresponding to the pixel point and the radial distribution function is determined by analysis and processing. For example, the tangent value of the field of view angle corresponding to the pixel point is equal to the radial distribution function. By analyzing the relationship between the tangent value of the field of view angle and the radial distribution function, the expression of the tangent value of the field of view angle can be further determined based on the determined radial distribution function. The coordinate conversion expression is determined by transforming this expression or combining it with other expressions of the tangent value of the field of view angle. The coordinate conversion expression is denoted as the mapping transformation relationship. The mapping transformation relationship is the relationship expression between the pixel points on the original image and the pixel points on the display screen, and can represent the coordinate transformation relationship between the pixel points on the original image and the pixel points on the display screen. The mapping transformation relationship obtained in this step includes unknown quantities, which need to be further solved.
[0062] For example, the radial distribution function is a function relationship between the distortion data and the distance from the pixel point on the distortion image to the center of the distortion image. Based on the relationship between the tangent value of the field of view angle corresponding to the pixel point and the radial distribution function, the tangent value of the field of view angle and the distance from the pixel point on the distortion image to the center of the distortion image can be determined. Based on the mathematical expression of the tangent value of the field of view angle, the distance from the pixel point on the original image to the center of the original image is determined. Based on the above expression, the relationship expression between the pixel points on the original image and the pixel points on the display screen is obtained.
[0063] S103, based on at least one preset condition, the mapping transformation relationship is parameter solved, at least one coordinate mapping transformation relationship is determined, and the preset condition is set according to the application scenario.
[0064] In the embodiment, the preset condition can be set in advance according to different application scenarios, for example, the application scenarios can be one or more of an office scenario, a movie watching scenario, a game scenario, a social interaction scenario, a learning and education scenario, a financial planning scenario, a health care scenario, a creative design scenario, a multimedia entertainment scenario, a travel navigation scenario, a smart home scenario, an industrial control scenario, a shopping application scenario, a weather forecast scenario, a schedule management scenario, and the like. The coordinate mapping transformation relationship can be understood as an expression representing the coordinate transformation relationship between the pixel points on the original image and the pixel points on the display screen, wherein the parameters involved in the formula are known parameters. The coordinate mapping transformation relationship can be used for coordinate mapping of the pixel points on the original image and the display screen. The pixel points in the original image can be mapped to the display screen according to the coordinates, or the pixel points on the display screen can be mapped to the original image according to the coordinates. The mapping transformation relationship includes unknown parameters that need to be further solved. The parameters in the coordinate mapping transformation relationship are all known quantities. The coordinates of the pixel points on the original image can be obtained by bringing the coordinates of the pixel points on the display screen into the coordinate mapping transformation relationship, or the coordinates of the pixel points on the display screen can be obtained by bringing the coordinates of the pixel points on the original image into the coordinate mapping transformation relationship.
[0065] The application scenarios are analyzed in advance to determine the requirements for screen display in different application scenarios, and different preset conditions are generated. The mapping transformation relationship is solved based on at least one preset condition, at least one coordinate mapping transformation relationship is determined, and the preset condition is set according to the application scenario. For each preset condition, the mapping transformation relationship is deformed and valued based on the preset condition, and the parameters are solved to obtain the values of the parameters. The corresponding coordinate mapping transformation relationship is obtained by substituting the values of the parameters obtained by solving into the mapping transformation relationship. The corresponding at least one coordinate mapping transformation relationship can be solved for each preset condition.
[0066] The embodiment of the application provides a coordinate mapping method, solves the problem of single distortion correction of an image, constructs a mapping transformation relationship between a pixel point on an original image and a pixel point on a display screen based on a relationship between a tangent value of a field of view corresponding to the pixel point and a radial distribution function, the mapping transformation relationship obtained can be solved under different conditions; different preset conditions are set according to different application scenarios, parameters of the mapping transformation relationship are solved based on at least one preset condition, parameter values of the mapping transformation relationship are obtained, and finally at least one coordinate mapping transformation relationship is determined, and each coordinate mapping transformation relationship can be used for distortion correction of an image; the embodiment of the application generates different preset conditions based on different service scenarios, and then determines different coordinate mapping transformation relationships according to different preset conditions, so that different application scenarios can be flexibly adapted, and images in different application scenarios can be reasonably corrected, so that a virtual image without distortion is seen by an end user, and user experience is improved.
[0067] Embodiment two
[0068] Figure 4 A flowchart of a coordinate mapping method provided by the second embodiment of the application is shown in the following figure. The embodiment is refined on the basis of the above-mentioned embodiment. As shown in the figure, the method comprises the following steps. Figure 4
[0069] S201, grid distortion data of an optical imaging system is acquired, and a radial distribution function corresponding to a tangent value of a field of view corresponding to a pixel point is generated based on the grid distortion data.
[0070] S202, a first expression corresponding to the tangent value of the field of view is determined based on a relationship between the tangent value of the field of view corresponding to the pixel point and the radial distribution function, and the first expression is related to the radial distribution function.
[0071] In the embodiment, the first expression can be understood as a calculation expression of the tangent value of the field of view, and the first expression is determined according to the radial distribution function and is related to the radial distribution function.
[0072] Based on the relationship between the tangent value of the field of view corresponding to the pixel point and the radial distribution function, the relationship between the tangent value of the field of view and the radial distribution function is determined, the relationship is transformed, the expression of the tangent value of the field of view is obtained, the expression is denoted as the first expression, and the first expression is related to the radial distribution function. In the case that the radial distribution function has been generated according to the grid distortion data, the first expression corresponding to the tangent value of the field of view can be further determined based on the generated radial distribution function.
[0073] For example, the tangent value of the field of view = the radial distribution function, and the first expression can be , and the first expression can also be .
[0074] S203, determine a second expression corresponding to the tangent value of the field of view angle based on the distance from the pixel point on the original image to the center of the original image, the second expression including a proportional relationship, the proportional relationship being the proportional relationship between the distance from the pixel point on the original image to the center of the original image and the tangent value of the field of view angle.
[0075] In the embodiment, the second expression can be understood as a calculation expression of the tangent value of the field of view angle, and the parameter of the second expression includes the proportional relationship, which is the proportional relationship between the distance from the pixel point on the original image to the center of the original image and the tangent value of the field of view angle.
[0076] The second expression is determined based on the distance from the pixel point on the original image to the center of the original image and the mathematical meaning of the tangent value of the field of view angle. For example, the second expression is: , r' is the distance from the pixel point on the original image to the center of the original image, L is the proportional relationship, which can also be understood as the distance from the observation point to the center of the virtual image multiplied by the ratio of r' to the distance from the pixel point in the corresponding virtual image to the center of the virtual image, and L changes with the change of the preset condition.
[0077] S204, transform based on the first expression and the second expression to determine the mapping transformation relationship between the pixel point on the original image and the pixel point on the display screen.
[0078] Since the first expression and the second expression are both expressions of the tangent value of the field of view angle, the first expression and the second expression can be transformed to obtain the mapping transformation relationship between the pixel point on the original image and the pixel point on the display screen.
[0079] For example, the first expression and the second expression are transformed to obtain the mapping transformation relationship: r' = LF(r), formula 5.
[0080] S205, for each preset condition, parameter solving of the mapping transformation relationship based on the preset condition is performed to determine the value of the proportional relationship corresponding to the preset condition.
[0081] In the embodiment, one of the parameters in the mapping transformation relationship is the proportional relationship, and the proportional relationship is an unknown parameter. For each preset condition, the mapping transformation relationship is deformed and valued based on the preset condition, and parameter solving is performed to obtain the value of the proportional relationship.
[0082] S206, the value of the proportional relationship is substituted into the mapping transformation relationship to obtain the coordinate mapping transformation relationship corresponding to the preset condition.
[0083] The value of the proportional relationship is substituted into the mapping transformation relationship, and the parameter in the mapping transformation relationship obtained at this time is a known value. In this case, the mapping transformation relationship obtained is the coordinate mapping transformation relationship corresponding to the preset condition. That is, the value of L can be obtained by parameter solving, and then the coordinate mapping transformation relationship r'=LF(r) can be obtained.
[0084] Or r'=LF(r) can also be transformed as: Equation 6.
[0085] On the basis of the pixel point coordinates (x, y) or r on the display screen, the coordinates (x', y') or r' in the original image can be further determined. The coordinate mapping transformation relationship can also be referred to as the mapping transformation of the correction model. For example, Figure 5 An example diagram of an image that has been inversely transformed by the correction model is provided. The original image without distortion presented in the virtual image is inversely transformed by the correction model to obtain the image displayed in the display screen.
[0086] Optionally, the mapping transformation relationship is parameter-solved based on the preset condition, and the value of the proportional relationship corresponding to the preset condition is determined, including steps A1-A2:
[0087] A1, when the preset condition is the first preset condition, the mapping transformation relationship is differentiated, and the formula is transformed based on the result of the differentiation to determine the expression of the proportional relationship and the derivative.
[0088] Wherein, the first preset condition is that the change rate of the center of the original image in the mapping transformation process is 1.
[0089] The first preset condition is set according to the application scenario, and the first preset condition is that the change rate of the center of the original image in the mapping transformation process is 1. When the preset condition is the first preset condition, the mapping transformation relationship is differentiated on both sides of the equation, and the result of the differentiation is dr'=L1F'(0)dr. The formula of the result of the differentiation is transformed, and the proportional relationship and the derivative expression obtained by dividing dr on both sides of the equation are dr' / dr=L1F'(0), wherein L1 is the proportional relationship corresponding to the first preset condition.
[0090] A2, let the derivative be equal to the change rate of the center of the original image in the mapping transformation process, and solve the proportional relationship and the derivative expression to determine the value of the proportional relationship corresponding to the first preset condition.
[0091] Since the first preset condition is that the change rate of the center of the original image in the mapping transformation process is 1, it is known that the change rate of the center of the original image in the mapping transformation process is 1, and the derivative is equal to the change rate of the center of the original image in the mapping transformation process, that is, dr' / dr = 1. Solving the above proportional relationship and the expression of the derivative, the left side of the equation is equal to 1, and F'(0) on the right side of the equation can be calculated according to the expression of F(r), L1 = 1 / F'(0). Through solving and calculation, the value of L1 can be obtained, that is, the value of the proportional relationship corresponding to the first preset condition can be obtained.
[0092] The coordinate mapping transformation relationship is obtained by using L1, and the coordinate mapping transformation relationship is: r' = F(r) / F'(0). The original image is corrected through the above coordinate mapping transformation relationship and then displayed on the display screen, and finally the virtual image of the image without distortion is obtained. Exemplarily, Figure 6 An example diagram of a virtual image forming process is provided, and the original image is mapped and transformed by a correction model to form an intermediate image, and the intermediate image is formed into a virtual image by an optical imaging system. The advantage of the first preset condition is to retain the delicate degree of the image center as much as possible, which is beneficial to the clear presentation of small size characters or symbols and is suitable for office scenes. The disadvantage is that the original image has a black border around after the mapping transformation, and the utilization rate of the display screen is limited.
[0093] Optionally, the mapping transformation relationship is solved based on at least one preset condition, and the value of the proportional relationship corresponding to each preset condition is determined, including steps B1-B2:
[0094] B1, when the preset condition is the second preset condition, based on the width of the display screen, the first pixel point coordinate of the edge of the original image and the second pixel point coordinate of the edge of the display screen are determined.
[0095] Wherein, the second preset condition is that the edge of the image after the mapping transformation is attached to the edge of the display screen.
[0096] A second preset condition is set according to the application scenario. The second preset condition is that the edge of the mapped image fits the edge of the display screen. When the preset condition is the second preset condition, the width of the display screen and the origin of the coordinates are determined. In this embodiment, the center of the display screen is taken as the origin of the coordinates. Based on the origin of the coordinates and the width W of the display screen, the coordinates of the pixels at the edge of the original image are determined and denoted as the first pixel coordinates. The coordinates of the pixels at the edge of the display screen are also determined and denoted as the second pixel coordinates. For example, the first pixel coordinate and the second pixel coordinate are both (0, (W-1) / 2), or the first pixel coordinate and the second pixel coordinate are both ((W-1) / 2, 0), or one of the first pixel coordinate and the second pixel coordinate is ((W-1) / 2, 0) and the other is (0, (W-1) / 2), etc. Here, W is the width of the display screen, and the unit of W is the number of pixels, that is, the width of the display screen is W pixels.
[0097] In this embodiment, due to image distortion, pixels located at edges on the coordinate axes in the original image remain on the edges after distortion correction, while pixels on other edges are no longer on the edges after distortion correction. Therefore, in this embodiment, the first pixel coordinates of the original image's edges and the second pixel coordinates of the display screen's edges are selected as pixels located at edges on the coordinate axes.
[0098] B2. Based on the coordinates of the first pixel and the second pixel, solve the mapping transformation formula to determine the value of the proportional relationship corresponding to the second preset condition.
[0099] The distance r between the pixel at the edge of the original image and the center of the original image is determined based on the coordinates of the first pixel. e The distance r from the center of the display screen to the pixel at the edge of the displayed image is determined based on the coordinates of the second pixel. e ', will r e and r e Substituting this into r'=LF(r), we get r e =L2F(r e ), combined with r e =r e Solving for the parameters using '=(W-1) / 2 yields L2:
[0100] ;
[0101] Where L2 represents the proportional relationship corresponding to the second preset condition.
[0102] Alternatively, in this embodiment of the application, L2 can be calculated by directly substituting the coordinates of the first pixel and the second pixel into the modified formula r'=LF(r), i.e. Formula 6.
[0103] The coordinate mapping transformation relationship is obtained by using L2, and the coordinate mapping transformation relationship is: .
[0104] The original image is corrected by the above coordinate mapping transformation relationship and then displayed on the display screen, and finally a virtual image of the image without distortion is obtained. Exemplarily, Figure 7 Another example of a virtual image forming process is provided, in which the original image is mapped and transformed by a correction model to form an intermediate image, and the intermediate image is formed into a virtual image by an optical imaging system. The advantage of the second preset condition is that the image covers the display area as much as possible, which is suitable for entertainment scenes such as watching movies or playing games. The disadvantage is that the original image is stretched after the mapping and transformation, which may cause small size text or symbols to become blurred.
[0105] Optionally, the mapping transformation relationship is solved based on at least one preset condition to determine the value of the proportional relationship corresponding to each preset condition, including: when the preset condition is the third preset condition, the value of the proportional relationship corresponding to the first preset condition and the value of the proportional relationship corresponding to the second preset condition are linearly interpolated along the radial direction to obtain the value of the proportional relationship corresponding to the third preset condition; wherein the third preset condition is that the change rate of the center of the original image in the mapping transformation process is 1 and the edge of the image after the transition to the mapping transformation is fitted with the edge of the display screen.
[0106] The third preset condition is set according to the application scenario, the third preset condition is that the change rate of the center of the original image in the mapping transformation process is 1 and the edge of the image after the transition to the mapping transformation is fitted with the edge of the display screen, i.e. the third preset condition combines the first preset condition and the second preset condition, which can take into account the advantages of the first preset condition and the second preset condition. When the preset condition is the third preset condition, the value L1 of the proportional relationship corresponding to the first preset condition and the value L2 of the proportional relationship corresponding to the second preset condition are linearly interpolated along the radial direction to obtain the value L3 of the proportional relationship corresponding to the third preset condition.
[0107] Optionally, the value of the proportional relationship corresponding to the third preset condition is:
[0108] ;
[0109] wherein L3 is the value of the proportional relationship corresponding to the third preset condition, L2 is the value of the proportional relationship corresponding to the second preset condition, L1 is the value of the proportional relationship corresponding to the first preset condition, W is the width of the display screen, and r is the distance from the pixel point in the display screen to the center of the display screen.
[0110] In the coordinate mapping, the value of L3 can be calculated according to the relationship between the size of the coordinate to be mapped and (W-1) / 2, and then the coordinate is converted. The value of the proportional relationship corresponding to the third preset condition obtained by the embodiment of the application can be a constant value, or an expression of a value, which can be calculated by the coordinate to obtain a specific value.
[0111] The third preset condition can keep the change rate of the center of the original image in the transformation process as 1, and gradually transition to the edge of the image to fit the edge of the display screen. L3 is combined with formula 5 or formula 6 to obtain a mapping transformation relationship, which can be used to correct the original image and display on the display screen, and finally obtain the virtual image of the corrected image. Exemplarily, Figure 8 An example diagram of another virtual image forming process is provided. The advantage of the third preset condition is that the image center is preserved as much as possible while covering the display area as much as possible, which is suitable for more complex scenarios. The disadvantage is that the transition area will produce slight distortion.
[0112] Optionally, the parameter of the mapping transformation relationship is solved based on at least one preset condition, and the value of the proportional relationship corresponding to each preset condition is determined, including: when the preset condition is the fourth preset condition, the value of the proportional relationship corresponding to the second preset condition is linearly interpolated along the radial direction to obtain the value of the proportional relationship corresponding to the fourth preset condition; wherein the fourth preset condition is that the edge of the image after mapping transformation is fitted with the edge of the display screen and the correction degree of the four corners is reduced.
[0113] The fourth preset condition is set according to the application scenario, and the fourth preset condition is that the edge of the image after mapping transformation is fitted with the edge of the display screen and the correction degree of the four corners is reduced. When the preset condition is the fourth preset condition, the value L2 of the proportional relationship corresponding to the second preset condition is determined, and L2 is linearly interpolated along the radial direction to obtain the value L4 of the proportional relationship corresponding to the fourth preset condition.
[0114] Optionally, the value of the proportional relationship corresponding to the fourth preset condition is:
[0115] ;
[0116] Wherein, L4 is the value of the proportional relationship corresponding to the fourth preset condition, L2 is the value of the proportional relationship corresponding to the second preset condition, W is the width of the display screen, r is the distance of the pixel point in the display screen to the center of the display screen, and D is a pre-set coefficient.
[0117] D is usually a value between 0 and 1. When performing coordinate mapping, the value of L4 can be calculated according to the relationship between the size of the coordinate to be mapped and (W-1) / 2, and then the coordinate is converted. The value of the proportional relationship corresponding to the fourth preset condition obtained by the embodiment of the application can be a fixed value, or an expression of a value, which can be calculated by coordinates to obtain a specific value.
[0118] The fourth preset condition is based on the second preset condition, assuming that the L value decreases to DL2 at the corner of the display screen, and a new L value, i.e., L4, is obtained by linear interpolation along the radial direction when r>(W-1) / 2. L4 is combined with formula 5 or formula 6 to obtain a mapping transformation relationship, which can be used to correct the original image and display it on the display screen, and finally obtain the virtual image of the corrected image. An exemplary, Figure 9 Another example diagram of a virtual image forming process is provided, which is generated under the condition of D=0.8. The fourth preset condition has the advantage of covering a larger display area, which is suitable for high-immersion scenarios.
[0119] The embodiment of the application provides a coordinate mapping method, which solves the problem of only single distortion correction of an image, sets different preset conditions according to different application scenarios, solves parameters of a mapping transformation relationship based on different preset conditions, obtains parameter values of the mapping transformation relationship, and can flexibly adapt to different application scenarios; the embodiment of the application further refines the preset conditions into four preset conditions, the coordinate mapping transformation relationship obtained based on the first preset condition can retain the fine degree of the center of the image, the coordinate mapping transformation relationship obtained based on the second preset condition can cover more display areas, the coordinate mapping transformation relationship obtained based on the third preset condition can retain the fine degree of the center of the image while covering more display areas, and the coordinate mapping transformation relationship obtained based on the fourth preset condition can cover a larger display area; the above different preset conditions are used to reasonably correct the distortion of the image in different application scenarios, so that the final user can see a virtual image without distortion, and the user experience is improved.
[0120] Embodiment three
[0121] Figure 10 A flowchart of an image display method provided for the embodiment three of the application, the embodiment can be applicable to the case of displaying an image into a screen, the method can be executed by an image display device, the image display device can be realized in the form of hardware and / or software, and the image display device can be configured in an electronic device. As shown in the figure, Figure 10 The method comprises the following steps.
[0122] S301, acquiring application scenario requirement information.
[0123] In the embodiment, the application scenario requirement information can be understood as information required when image display is performed in a certain application scenario. For example, the application scenario requirement information can be clear small-size character display, large display area coverage, etc., or the application scenario requirement information can be an office scenario, an entertainment scenario, etc. The application scenario requirement information corresponding to different application scenarios can be different.
[0124] The application scenario requirement information can be obtained automatically, for example, by analyzing the currently displayed image or the current application scenario to determine the application scenario requirement information. Alternatively, the application scenario requirement information can be obtained by receiving a control command of a user, for example, by the user inputting the control command through manual operation, voice control, etc. The control command can be directly used as the application scenario requirement information, or the control command can be analyzed semantically by the execution device to determine the application scenario requirement information, etc.
[0125] In S302, a target coordinate mapping transformation relationship is selected from the pre-determined coordinate mapping transformation relationships according to the application scenario requirement information. The coordinate mapping transformation relationship is determined according to the coordinate mapping method described in any embodiment of the present application.
[0126] In the embodiment, the target coordinate mapping transformation relationship can be understood as a coordinate mapping transformation relationship matched with the application scenario requirement information. The coordinate mapping transformation relationships under different preset conditions are determined in advance to obtain at least one coordinate mapping transformation relationship. For example, four preset conditions can be set in advance, and four coordinate mapping transformation relationships are generated and stored correspondingly. The four preset conditions are a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition.
[0127] The different coordinate mapping transformation relationships are stored in correspondence with the preset conditions in advance, or the coordinate mapping transformation relationships are stored in correspondence with the application scenarios to which the coordinate mapping transformation relationships are adapted according to the preset conditions. After the application scenario requirement information is determined, the coordinate mapping transformation relationship matched with the application scenario requirement information is selected as the target coordinate mapping transformation relationship according to the matching relationship between the pre-stored coordinate mapping transformation relationship and the preset condition or the application scenario. For example, the matching relationship between the pre-stored coordinate mapping transformation relationship and the application scenario is matched with the application scenario requirement information after the application scenario requirement information is determined, the application scenario matched with the application scenario requirement information is determined, and the coordinate mapping transformation relationship corresponding to the matched application scenario is used as the target coordinate mapping transformation relationship. Alternatively, the matching relationship between the pre-stored coordinate mapping transformation relationship and the preset condition is analyzed after the application scenario requirement information is determined, the matched preset condition is determined, and the coordinate mapping transformation relationship corresponding to the matched preset condition is used as the target coordinate mapping transformation relationship.
[0128] S303, based on the target coordinate mapping transformation relationship, the pixel coordinates in the display screen are corrected for distortion, and the pixel values corresponding to the pixel coordinates after distortion correction are used for image display.
[0129] Based on the target coordinate mapping transformation relationship, the pixel coordinates in the display screen are corrected for distortion, and the pixel coordinates in the image to be displayed are determined to obtain the pixel coordinates after distortion correction. The pixel values corresponding to the pixel coordinates in the display screen are determined according to the pixel values corresponding to the pixel coordinates after distortion correction, and the pixel values corresponding to the pixel coordinates in the display screen are used for image display.
[0130] The embodiment of the present application provides an image display method, which solves the problem of single distortion correction of the image, generates different preset conditions according to different service scenarios in advance, and then determines different coordinate mapping transformation relationships according to the different preset conditions, so that different application scenarios can be flexibly adapted. When displaying the image, the application scenario requirement information is obtained, the matching target coordinate mapping transformation relationship is selected from the pre-determined coordinate mapping transformation relationship according to the application scenario requirement information, the pixel coordinates in the display screen are corrected for distortion based on the matching target coordinate mapping transformation relationship, and then the image is displayed. The target coordinate mapping transformation relationship can be selected according to different application scenarios to reasonably correct the distortion of the image, so that the final user can see the virtual image without distortion, and the user experience is improved. The coordinate mapping transformation relationship is selected according to the specific application scenario requirement information, and the correction of the image is flexible and changeable.
[0131] Optionally, the application scenario requirement information is obtained, including: determining the application scenario requirement information according to the type of the currently running application program.
[0132] The name or identifier of the currently running application program is obtained, the application program is analyzed according to the name or identifier of the application program, and the type of the application program is determined. The type of the application program is analyzed, and the application scenario requirement information is determined; for example, the application scenario requirement information corresponding to different types of application programs is stored in a data table in advance, and after the type of the application program is determined, the pre-stored data table is searched according to the type of the application program to determine the corresponding application scenario requirement information; or, the type of the application program is analyzed by means of a model with analysis capability to determine the corresponding application scenario requirement information. The application scenario requirement information is determined based on the type of the currently running application program, without the need for user participation, so that the appropriate coordinate mapping transformation relationship can be automatically matched for distortion correction in a user-unaware manner, improving the user experience; and the application scenario requirement information can be accurately and quickly determined according to the type of the currently running application program.
[0133] Optionally, the pixel coordinates in the display screen are corrected based on the target coordinate mapping transformation relationship, including: performing coordinate transformation on a first to-be-displayed pixel coordinate in the display screen based on the target coordinate mapping transformation relationship, to determine a second to-be-displayed pixel coordinate corresponding to the first to-be-displayed pixel coordinate in the to-be-displayed image; and determining a pixel value corresponding to the first to-be-displayed pixel coordinate based on the second to-be-displayed pixel coordinate and pixel values of each pixel coordinate in the to-be-displayed image.
[0134] In the embodiment, the first to-be-displayed pixel coordinate is a pixel coordinate in the display screen, and each pixel coordinate in the display screen is subjected to coordinate transformation as the first to-be-displayed pixel coordinate. The second to-be-displayed pixel coordinate is a corresponding coordinate in the to-be-displayed image to which the first to-be-displayed pixel coordinate is mapped. The to-be-displayed image can be understood as an original image to be displayed in the display screen.
[0135] In the image display, the to-be-displayed image is first acquired, which has the same size as the original image in any of the above embodiments. Each pixel coordinate in the display screen is sequentially subjected to coordinate transformation as the first to-be-displayed pixel coordinate. For each first to-be-displayed pixel coordinate, a pixel value corresponding thereto can be determined by: substituting the first to-be-displayed pixel coordinate into the target coordinate mapping transformation relationship to perform coordinate transformation, to obtain a second to-be-displayed pixel coordinate. The second to-be-displayed pixel coordinate in the to-be-displayed image can be exactly one pixel coordinate, or can fall between different pixel coordinates, and is not an accurate pixel coordinate. Therefore, a pixel value Q corresponding to the second to-be-displayed coordinate is determined based on the second to-be-displayed coordinate and pixel values of each pixel coordinate in the to-be-displayed image, and a pixel value corresponding to the first to-be-displayed pixel coordinate is determined based on the pixel value Q corresponding to the second to-be-displayed coordinate. For example, when the second to-be-displayed coordinate is exactly one pixel coordinate in the to-be-displayed image, a pixel value corresponding to the pixel coordinate is taken as the pixel value Q corresponding to the second to-be-displayed coordinate, and the pixel value Q corresponding to the second to-be-displayed coordinate is taken as the pixel value corresponding to the first to-be-displayed pixel coordinate. Or, when the second to-be-displayed coordinate is not one pixel coordinate in the to-be-displayed image, a pixel value corresponding to a pixel coordinate closest to the second to-be-displayed coordinate in the to-be-displayed image is taken as the pixel value Q corresponding to the second to-be-displayed coordinate, or pixel values corresponding to four pixel coordinates closest to the second to-be-displayed coordinate in the to-be-displayed image are taken as the pixel value Q corresponding to the second to-be-displayed coordinate, a weighted average of the four Qs is calculated as the pixel value corresponding to the first to-be-displayed pixel coordinate, and so on.
[0136] The first to-be-displayed pixel coordinate in the display screen is transformed through the target coordinate mapping transformation relationship, the distortion correction can be accurately implemented, the corresponding second to-be-displayed pixel coordinate in the to-be-displayed image is determined, and then the pixel value corresponding to the first to-be-displayed pixel coordinate is determined according to the second to-be-displayed pixel coordinate and the pixel value of each pixel coordinate in the to-be-displayed image, so that the image without distortion can be displayed on the display screen, and the visual experience effect is improved.
[0137] Embodiment Four
[0138] Figure 11 A structural schematic diagram of a coordinate mapping device provided in Embodiment Four of the present application is shown in FIG. 4. As shown in FIG. 4, the device includes a distortion data acquisition module 410, a mapping transformation relationship determination module 420, and a coordinate mapping relationship determination module 430. Figure 11
[0139] The distortion data acquisition module 410 is configured to acquire grid distortion data of an optical imaging system, and generate a radial distribution function corresponding to a tangent value of a field of view angle of a pixel point based on the grid distortion data.
[0140] The mapping transformation relationship determination module 420 is configured to determine a mapping transformation relationship formula between a pixel point on an original image and a pixel point on a display screen based on a relationship formula between the tangent value of the field of view angle of the pixel point and the radial distribution function.
[0141] The coordinate mapping relationship determination module 430 is configured to perform parameter solving on the mapping transformation relationship formula based on at least one preset condition, and determine at least one coordinate mapping transformation relationship, wherein the preset condition is set according to an application scenario.
[0142] The coordinate mapping device provided in the embodiments of the present application solves the problem of only being able to perform single distortion correction on an image, constructs a mapping transformation relationship formula between a pixel point on an original image and a pixel point on a display screen based on a relationship formula between a tangent value of a field of view angle of the pixel point and a radial distribution function, and the mapping transformation relationship formula obtained can be solved under different conditions. Different preset conditions are set according to different application scenarios, parameter solving is performed on the mapping transformation relationship formula based on at least one preset condition, parameter values of the mapping transformation relationship formula are obtained, and finally at least one coordinate mapping transformation relationship is determined. Each coordinate mapping transformation relationship can be used for distortion correction of an image. The embodiments of the present application generate different preset conditions based on different business scenarios, and then determine different coordinate mapping transformation relationships according to different preset conditions, which can flexibly adapt to different application scenarios, reasonably correct the images under different application scenarios, and enable the end user to see a virtual image without distortion, thereby improving the user experience.
[0143] Optionally, the mapping transformation relationship determination module 420 includes:
[0144] a first expression determination unit, configured to determine a first expression corresponding to the tangent value of the field of view based on a relationship between the tangent value of the field of view and the radial distribution function after distortion, the first expression being related to the radial distribution function;
[0145] a second expression determination unit, configured to determine a second expression corresponding to the tangent value of the field of view based on a distance between a pixel point on the original image and a center of the original image, the second expression including a proportional relationship between the distance between the pixel point on the original image and the center of the original image and the tangent value of the field of view;
[0146] a transformation unit, configured to perform transformation based on the first expression and the second expression to determine a mapping transformation relationship between the pixel point on the original image and a pixel point on the display screen.
[0147] Optionally, the coordinate mapping relationship determination module 430 includes:
[0148] a parameter solving unit, configured to, for each preset condition, perform parameter solving on the mapping transformation relationship based on the preset condition to determine a value of the proportional relationship corresponding to the preset condition;
[0149] a coordinate mapping relationship determination unit, configured to substitute the value of the proportional relationship into the mapping transformation relationship to obtain a coordinate mapping transformation relationship corresponding to the preset condition.
[0150] Optionally, the parameter solving unit is specifically configured to: when the preset condition is a first preset condition, derive the mapping transformation relationship, perform transformation on the formula based on a result of the derivation to determine an expression of the proportional relationship and a derivative; let the derivative be equal to a change rate of the center of the original image in the mapping transformation process, and solve the expression of the proportional relationship and the derivative to determine the value of the proportional relationship corresponding to the first preset condition; wherein the first preset condition is that the change rate of the center of the original image in the mapping transformation process is 1.
[0151] Optionally, the parameter solving unit is specifically configured to: when the preset condition is a second preset condition, determine a first pixel point coordinate of an edge of the original image and a second pixel point coordinate of an edge of the display screen based on a width of the display screen; and solve the mapping transformation relationship based on the first pixel point coordinate and the second pixel point coordinate to determine the value of the proportional relationship corresponding to the second preset condition; wherein the second preset condition is that an edge of the image after mapping transformation is attached to an edge of the display screen.
[0152] Optionally, the parameter solving unit is specifically configured to: when the preset condition is a third preset condition, linearly interpolating the value of the proportional relationship corresponding to the first preset condition and the value of the proportional relationship corresponding to the second preset condition along a radial direction to obtain the value of the proportional relationship corresponding to the third preset condition, wherein the third preset condition is that a change rate of the center of the original image in the mapping transformation process is 1 and the edge of the image after the mapping transformation is attached to the edge of the display screen.
[0153] Optionally, the value of the proportional relationship corresponding to the third preset condition is:
[0154] ;
[0155] L3 = L2 - (L2 - L1) * r / W, wherein L3 is the value of the proportional relationship corresponding to the third preset condition, L2 is the value of the proportional relationship corresponding to the second preset condition, L1 is the value of the proportional relationship corresponding to the first preset condition, W is the width of the display screen, and r is the distance from a pixel point in the display screen to the center of the display screen.
[0156] Optionally, the parameter solving unit is specifically configured to: when the preset condition is a fourth preset condition, linearly interpolating the value of the proportional relationship corresponding to the second preset condition along a radial direction to obtain the value of the proportional relationship corresponding to the fourth preset condition, wherein the fourth preset condition is that the edge of the image after the mapping transformation is attached to the edge of the display screen and the correction degree of the four corners is reduced.
[0157] Optionally, the value of the proportional relationship corresponding to the fourth preset condition is:
[0158] ;
[0159] L4 = L2 - (L2 - L1) * r / W, wherein L4 is the value of the proportional relationship corresponding to the fourth preset condition, L2 is the value of the proportional relationship corresponding to the second preset condition, W is the width of the display screen, r is the distance from a pixel point in the display screen to the center of the display screen, and D is a pre-set coefficient.
[0160] The coordinate mapping device provided in the embodiments of the present application can perform the coordinate mapping method provided in any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.
[0161] Embodiment five
[0162] Figure 12 FIG. 1 is a structural schematic diagram of an image display device provided in the fifth embodiment of the present application. As shown in the figure, the device comprises an application scene acquisition module 510, a target mapping relationship determination module 520, and a distortion correction module 530. Figure 12
[0163] The application scenario acquisition module 510 is configured to acquire application scenario requirement information.
[0164] The target mapping relationship determination module 520 is configured to select a matched target coordinate mapping transformation relationship from pre-determined coordinate mapping transformation relationships according to the application scenario requirement information, wherein the coordinate mapping transformation relationship is determined according to the coordinate mapping method of any of the embodiments of the present application.
[0165] The distortion correction module 530 is configured to perform distortion correction on pixel coordinates in a display screen based on the target coordinate mapping transformation relationship, and perform image display based on pixel values corresponding to the distortion-corrected pixel coordinates.
[0166] The embodiments of the present application provide an image display device, which solves the problem of single distortion correction of images, and pre-generates different preset conditions according to different service scenarios, and then determines different coordinate mapping transformation relationships according to the different preset conditions, so that different application scenarios can be flexibly adapted. When performing image display, application scenario requirement information is acquired, a matched target coordinate mapping transformation relationship is selected from pre-determined coordinate mapping transformation relationships according to the application scenario requirement information, distortion correction is performed on pixel coordinates in a display screen based on the matched target coordinate mapping transformation relationship, and then image display is performed. The target coordinate mapping transformation relationship can be selected according to different application scenarios to reasonably correct the distortion of images, so that the final user can see a virtual image without distortion, and user experience is improved. The coordinate mapping transformation relationship is selected according to specific application scenario requirement information, and the correction of images is flexible and changeable.
[0167] Optionally, the application scenario acquisition module 510 is specifically configured to determine the application scenario requirement information according to a type of a currently running application program.
[0168] Optionally, the distortion correction module 530 includes:
[0169] The coordinate mapping unit is configured to perform coordinate transformation on first to-be-displayed pixel coordinates in a display screen based on the target coordinate mapping transformation relationship, and determine second to-be-displayed pixel coordinates corresponding to the first to-be-displayed pixel coordinates in the display screen in a to-be-displayed image.
[0170] The pixel value determination unit is configured to determine pixel values corresponding to the first to-be-displayed pixel coordinates based on the second to-be-displayed pixel coordinates and pixel values of each pixel coordinate in the to-be-displayed image.
[0171] The image display device provided in the embodiments of the present application can execute the image display method provided in any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.
[0172] Embodiment six
[0173] Figure 13 A structural diagram of an electronic device 60 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices (e.g., headsets, glasses, watches, etc.), and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application described and / or claimed in this document.
[0174] As shown in FIG. 1, the electronic device 60 includes at least one processor 61, and a memory, such as a read-only memory (ROM) 62, a random access memory (RAM) 63, etc., connected in communication with the at least one processor 61, where the memory stores computer programs executable by the at least one processor. The processor 61 can perform various appropriate actions and processes according to the computer programs stored in the read-only memory (ROM) 62 or loaded into the random access memory (RAM) 63 from the storage unit 68. In the RAM 63, various programs and data required for the operation of the electronic device 60 can also be stored. The processor 61, the ROM 62, and the RAM 63 are connected to each other through a bus 64. An input / output (I / O) interface 65 is also connected to the bus 64. Figure 13
[0175] Various components in the electronic device 60 are connected to the I / O interface 65, including an input unit 66, such as a keyboard, a mouse, etc., an output unit 67, such as various types of displays, a speaker, etc., a storage unit 68, such as a magnetic disk, an optical disk, etc., and a communication unit 69, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 69 allows the electronic device 60 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0176] The processor 61 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the processor 61 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 61 performs various methods and processes described above, such as a coordinate mapping method or an image display method.
[0177] In some embodiments, the coordinate mapping method or the image display method can be implemented as a computer program tangibly embodied in a computer readable storage medium, e.g., storage unit 68. In some embodiments, parts or all of the computer program can be loaded and / or installed onto electronic device 60 via, e.g., ROM 62 and / or communication unit 69. When the computer program is loaded onto RAM 63 and executed by processor 61, one or more steps of the coordinate mapping method or the image display method described above can be performed. Alternatively, in other embodiments, processor 61 can be configured to perform the coordinate mapping method or the image display method by way of other any suitable means, e.g., by way of firmware.
[0178] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, specially designed application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0179] Computer programs implementing methods of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program running on the processor implements the functions / operations specified in the flowcharts and / or the block diagrams. The computer program can be executed entirely on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0180] Embodiments of the present application provide a computer program product, the computer program product comprising a computer program which, when executed by a processor, implements the coordinate mapping method or the image display method according to any of the embodiments of the present application.
[0181] In the context of this application, a computer readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium can be a machine readable signal medium. More specific examples of a machine readable storage medium will include one or more lines of a program of instructions in a transitory signal form, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0182] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0183] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), blockchain networks, and the Internet.
[0184] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.
[0185] It should be understood that the various forms of flow shown above can be reordered, added to, or have steps deleted. For example, the steps described in this application can be performed in parallel, in series, or in a different order, as long as the desired results of the technical solutions of this application can be achieved, and this application does not limit herein.
[0186] The above detailed description does not constitute a limitation on the scope of protection of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A coordinate mapping method, characterized by, The method comprises: acquiring grid distortion data of an optical imaging system, and generating a radial distribution function corresponding to a tangent value of a field of view angle of a pixel based on the grid distortion data; determining a mapping transformation relationship between a pixel on an original image and a pixel on a display screen based on a relationship between the tangent value of the field of view angle of the pixel and the radial distribution function; solving parameters of the mapping transformation relationship based on at least one preset condition, and determining at least one coordinate mapping transformation relationship, wherein the preset condition is set according to an application scenario; wherein the preset condition comprises at least one of the following: a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition; the first preset condition is that a change rate of a center of the original image in a mapping transformation process is 1, the second preset condition is that an image edge after mapping transformation is fitted to an edge of the display screen, the third preset condition is that the change rate of the center of the original image in the mapping transformation process is 1 and the image edge after mapping transformation is fitted to the edge of the display screen, and the fourth preset condition is that the image edge after mapping transformation is fitted to the edge of the display screen and a correction degree of four corners is reduced.
2. The method of claim 1, wherein, The method of determining the mapping transformation relationship between the pixel on the original image and the pixel on the display screen based on the relationship between the tangent value of the field of view angle of the pixel and the radial distribution function comprises: determining a first expression corresponding to the tangent value of the field of view angle based on the relationship between the tangent value of the field of view angle of the pixel and the radial distribution function, wherein the first expression is related to the radial distribution function; determining a second expression corresponding to the tangent value of the field of view angle based on a distance of a pixel on the original image to a center of the original image, wherein the second expression comprises a proportional relationship between the distance of the pixel on the original image to the center of the original image and the tangent value of the field of view angle; transforming the first expression and the second expression to determine the mapping transformation relationship between the pixel on the original image and the pixel on the display screen.
3. The method of claim 1, wherein, The method of solving parameters of the mapping transformation relationship based on the at least one preset condition and determining the at least one coordinate mapping transformation relationship comprises: for each preset condition, solving parameters of the mapping transformation relationship based on the preset condition to determine a value of the proportional relationship corresponding to the preset condition; and substituting the value of the proportional relationship into the mapping transformation relationship to obtain a coordinate mapping transformation relationship corresponding to the preset condition.
4. The method of claim 3, wherein, The method of solving parameters of the mapping transformation relationship based on the at least one preset condition and determining the at least one coordinate mapping transformation relationship comprises: when the preset condition is the first preset condition, deriving the mapping transformation relationship, transforming the formula based on a result of derivation to determine an expression of the proportional relationship and a derivative; and setting the derivative to be equal to a change rate of a center of the original image in a mapping transformation process, and solving the expression of the proportional relationship and the derivative to determine the value of the proportional relationship corresponding to the first preset condition.
5. The method of claim 3, wherein, The parameter solving of the mapping transformation relationship based on at least one preset condition comprises: When the preset condition is the second preset condition, the first pixel point coordinate of the edge of the original image and the second pixel point coordinate of the edge of the display screen are determined based on the width of the display screen; The mapping transformation relationship is solved based on the first pixel point coordinate and the second pixel point coordinate, and the value of the proportional relationship corresponding to the second preset condition is determined.
6. The method of claim 3, wherein, The parameter solving of the mapping transformation relationship based on at least one preset condition comprises: When the preset condition is the third preset condition, the value of the proportional relationship corresponding to the first preset condition and the value of the proportional relationship corresponding to the second preset condition are linearly interpolated along the radial direction to obtain the value of the proportional relationship corresponding to the third preset condition.
7. The method of claim 6, wherein, The value of the proportional relationship corresponding to the third preset condition is: ; Wherein, L3 is the value of the proportional relationship corresponding to the third preset condition, L2 is the value of the proportional relationship corresponding to the second preset condition, L1 is the value of the proportional relationship corresponding to the first preset condition, W is the width of the display screen, and r is the distance from the pixel point in the display screen to the center of the display screen.
8. The method of claim 3, wherein, The parameter solving of the mapping transformation relationship based on at least one preset condition comprises: When the preset condition is the fourth preset condition, the value of the proportional relationship corresponding to the second preset condition is linearly interpolated along the radial direction to obtain the value of the proportional relationship corresponding to the fourth preset condition.
9. The method of claim 8, wherein, The value of the proportional relationship corresponding to the fourth preset condition is: ; Wherein, L4 is the value of the proportional relationship corresponding to the fourth preset condition, L2 is the value of the proportional relationship corresponding to the second preset condition, W is the width of the display screen, r is the distance from the pixel point in the display screen to the center of the display screen, and D is a pre-set coefficient.
10. An image display method characterized by It comprises: Obtaining application scenario requirement information; According to the application scenario requirement information, a matching target coordinate mapping transformation relationship is selected from the pre-determined coordinate mapping transformation relationship, and the coordinate mapping transformation relationship is determined according to any one of claims 1-9; Based on the target coordinate mapping transformation relationship, the pixel coordinates in the display screen are distorted and corrected, and the pixel values corresponding to the distorted and corrected pixel coordinates are displayed.
11. The method of claim 10, wherein, The application scenario requirement information is obtained, comprising: According to the type of the currently running application program, the application scenario requirement information is determined.
12. The method of claim 10, wherein, Based on the target coordinate mapping transformation relationship, the pixel coordinates in the display screen are distorted and corrected, comprising: Based on the target coordinate mapping transformation relationship, the first to-be-displayed pixel coordinates in the display screen are coordinate transformed to determine the corresponding second to-be-displayed pixel coordinates in the to-be-displayed image. Determine a pixel value corresponding to the first to-be-displayed pixel coordinate based on the second to-be-displayed pixel coordinate and a pixel value of each pixel coordinate in the to-be-displayed image.
13. A coordinate mapping apparatus characterized by comprising: Comprise: The distortion data acquisition module is used for acquiring grid distortion data of an optical imaging system, generating a radial distribution function corresponding to a tangent value of a field of view angle of a pixel point based on the grid distortion data; The mapping transformation relationship determination module is used for determining a mapping transformation relationship between a pixel point on an original image and a pixel point on a display screen based on a relationship between a tangent value of a field of view angle of a pixel point and the radial distribution function; The coordinate mapping relationship determination module is used for performing parameter solving on the mapping transformation relationship based on a preset condition, and determining a coordinate mapping transformation relationship; The preset condition comprises at least one of the following: a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition; the first preset condition is that a change rate of a center of the original image in a mapping transformation process is 1, the second preset condition is that an image edge after mapping transformation is attached to an edge of the display screen, the third preset condition is that the change rate of the center of the original image in the mapping transformation process is 1 and the image edge after mapping transformation is attached to the edge of the display screen, and the fourth preset condition is that the image edge after mapping transformation is attached to the edge of the display screen and a correction degree of four corners is reduced.
14. An image display device, characterized by comprising: Comprise: The application scenario acquisition module is used for acquiring application scenario requirement information; The target mapping relationship determination module is used for selecting a matching target coordinate mapping transformation relationship from pre-determined coordinate mapping transformation relationships according to the application scenario requirement information, and the coordinate mapping transformation relationship is determined according to the coordinate mapping method in any one of claims 1-9; The distortion correction module is used for performing distortion correction on pixel coordinates in the display screen based on the target coordinate mapping transformation relationship, and performing image display based on pixel values corresponding to the distortion-corrected pixel coordinates.
15. An electronic device, comprising: The electronic device comprises: At least one processor, and a memory connected to the at least one processor in communication; The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the coordinate mapping method in any one of claims 1-9 or the image display method in any one of claims 10-12.
16. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and the computer instructions are used to enable the processor to execute the coordinate mapping method in any one of claims 1-9 or the image display method in any one of claims 10-12 when executed.
17. A computer program product, characterised in that, The computer program product comprises a computer program, and the computer program is executed by the processor to implement the coordinate mapping method in any one of claims 1-9 or the image display method in any one of claims 10-12.
Citation Information
Patent Citations
Binocular AR head-mounted display device and information display method therefor
CN105812778A
Correcting method of image distortion using the directlinear transform algorithm
KR1020080034720A