Image distortion correction method and device, equipment and storage medium
By receiving the distortion correction coordinates and dynamic algorithm library of the target system in the Android system, a three-dimensional grid model was built, which solved the problem of poor distortion correction effect of the Android system on the head-up display, and achieved improvements in user experience and driving safety. And reduce maintenance costs.
Patent Information
- Application Number
- CN202410820905.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-11-01
AI Technical Summary
The Android system has poor results in head-up display image distortion correction, making it difficult to achieve high-quality distortion correction, affecting user experience and driving safety.
By receiving the distortion correction coordinates and dynamic algorithm library of the target system, a three-dimensional grid distortion model is built, and the image to be displayed is drawn to achieve consistency between the distortion correction effect between the Android system and the target system.
Improves user experience and driving safety, ensures clear and distorted projected images, and reduces post-maintenance and upgrade costs.
Smart Images

Figure CN118887142A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an image distortion correction method, device, equipment and storage medium. Background Art
[0002] As a modern automobile driving assistance technology, HUD (Head-Up Display) technology can project important driving information directly into the driver's field of vision, significantly improving driving safety and comfort. However, in actual applications, HUD projection images often have distortion problems in display content, affecting the accurate transmission of information and driving experience.
[0003] In the existing technology, the software distortion correction function of HUD software is mainly implemented on the QNX operating system side. With the continuous development of in-vehicle entertainment systems, more and more car manufacturers want to project the navigation or ADAS APP content on the in-vehicle entertainment system side to the HUD for display, which requires the distortion correction function of the image projected by the Android system APP.
[0004] However, image distortion correction in Android systems faces many challenges. The image processing capabilities of Android systems are relatively limited, making it difficult to directly achieve high-quality distortion correction. Summary of the invention
[0005] The present invention provides an image distortion correction method, device, equipment and storage medium to solve the problem that the distortion correction effect of the Android system on the head-up display image is poor.
[0006] In a first aspect, the present invention provides an image distortion correction method, which is applied to an Android system, and the method comprises:
[0007] Receiving first distortion-corrected coordinates sent by a target system, wherein the target system is different from the Android system;
[0008] Constructing a three-dimensional mesh distortion model using the first distortion correction coordinates and a dynamic algorithm library, wherein the dynamic algorithm library in the Android system is transplanted to the target system, and the dynamic algorithm library in the target system is used to construct the three-dimensional mesh distortion model according to the first distortion correction coordinates;
[0009] The image to be displayed is drawn using the three-dimensional grid distortion model.
[0010] In a second aspect, the present invention provides an image distortion correction device, which is applied to an Android system, and the device includes:
[0011] A correction coordinate receiving module, used for receiving a first distortion correction coordinate sent by a target system, wherein the target system is different from the Android system;
[0012] A distortion model construction module, used to construct a three-dimensional mesh distortion model using the first distortion correction coordinates and a dynamic algorithm library, wherein the dynamic algorithm library in the Android system is transplanted to the target system, and the dynamic algorithm library in the target system is used to construct a three-dimensional mesh distortion model according to the first distortion correction coordinates;
[0013] An image drawing module is used to draw an image to be displayed using the three-dimensional grid distortion model.
[0014] In a third aspect, the present invention provides an electronic device, the electronic device comprising:
[0015] at least one processor;
[0016] and a memory communicatively coupled to the at least one processor;
[0017] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the image distortion correction method of the first aspect mentioned above.
[0018] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer instructions, which are used to enable a processor to implement the image distortion correction method of the first aspect when executed.
[0019] The image distortion correction scheme provided by the present invention receives the first distortion correction coordinates sent by the target system, wherein the target system is different from the Android system, and uses the first distortion correction coordinates and the dynamic algorithm library to construct a three-dimensional grid distortion model, wherein the dynamic algorithm library in the Android system is transplanted to the target system, and the dynamic algorithm library in the target system is used to construct a three-dimensional grid distortion model according to the first distortion correction coordinates, and use the three-dimensional grid distortion model to draw the image to be displayed. By adopting the above technical solution, the Android system achieves consistency in the distortion correction effect of the two systems by synchronizing the distortion correction coordinates and the dynamic algorithm library of the target system, ensuring the continuity and consistency of the user experience, so that the driver can quickly obtain a clear and distortion-free projection image when starting the HUD function, thereby improving the user experience, solving the problem of poor distortion correction effect of the Android system on the head-up display image, and helping to reduce the cost of later maintenance and upgrades.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 is a flow chart of an image distortion correction method provided according to Embodiment 1 of the present invention;
[0023] Figure 2 is a schematic diagram of a dot matrix provided according to the first embodiment of the present invention;
[0024] Figure 3 This is a software architecture diagram provided according to Embodiment 1 of the present invention;
[0025] Figure 4 is a flow chart of an image distortion correction method provided according to Embodiment 2 of the present invention;
[0026] Figure 5 is a schematic diagram of a triangular mesh in a three-dimensional mesh distortion model provided according to the second embodiment of the present invention;
[0027] Figure 6 is a structural schematic diagram of an image distortion correction device provided according to Embodiment 3 of the present invention;
[0028] Figure 7 It is a schematic diagram of the structure of an electronic device provided according to Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In the description of the present invention, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are an "or" relationship. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] Embodiment 1
[0032] Figure 1 A flowchart of an image distortion correction method is provided for Embodiment 1 of the present invention. This embodiment is applicable to the case where an Android system corrects the distortion of a head-up display image. The method can be executed by an image distortion correction device. The image distortion correction device can be implemented in the form of hardware and / or software. The image distortion correction device can be configured in an electronic device. The electronic device can be composed of two or more physical entities or one physical entity.
[0033] like Figure 1 As shown, the image distortion correction method provided by the first embodiment of the present invention specifically includes the following steps:
[0034] S101. Receive first distortion-corrected coordinates sent by a target system, wherein the target system is different from the Android system.
[0035] In this embodiment, the target system may be a QNX system, etc., and the first distortion correction coordinates are pre-stored in the HUD application software of the target system. The Android system may use the SOME / IP communication protocol to receive the first distortion correction coordinates sent by the target system.
[0036] The process of determining the first distortion-corrected coordinates of the target system may include:
[0037] 1) Get the original dot map coordinate data file. First, you can preset a dot map and record the pixel position of each dot in the image tool. Figure 2 is a dot matrix diagram, such as Figure 2 As shown, the pixel coordinates of the first point can be recorded as 64.5x146.5. By recording the pixel coordinates of all points in sequence, the original point map coordinate data file can be obtained, which contains the pixel coordinates of each point in the dot matrix, such as (64.5,146.5) and (64.5,192.5).
[0038] 2) The dot matrix in 1) is projected onto the front windshield of the vehicle through the HUD application, and a camera is installed at the driving position of the vehicle. Then, the virtual image on the windshield is photographed by the eye position camera to simulate the human eye to obtain a virtual image dot matrix. Then, the coordinates are converted through the optical parameters to obtain an offset dot matrix in the same coordinate system as the dot matrix in step 1).
[0039] 3) Using the image tool, determine the new dot coordinates of each point in the offset dot map obtained in 2), such as (62.5, 146.5) and (62.5, 192.5).
[0040] 4) Subtract the pixel coordinates corresponding to 1) from the new dot coordinates obtained in 3) to obtain the offset value of each point, such as (-2,0) and (-2,0).
[0041] 5) The sum of the original point pixel coordinates in step 1) and the inverse value of the offset value in step 4) is determined as the coordinates of the corrected point, i.e., the first distortion correction coordinates. This is because the coordinate data of the original point needs to compensate for the offset value. For example, if the coordinates of a point in the dot matrix captured by the eye position camera are offset by 2 pixels downward, then the original point coordinates of this point must be offset by 2 pixels upward, so that the content displayed by the HUD application through the front windshield projection will correspond to the original dot matrix, achieving the effect of distortion correction.
[0042] S102. Constructing a three-dimensional mesh distortion model using the first distortion correction coordinates and a dynamic algorithm library, wherein the dynamic algorithm library in the Android system is transplanted to the target system, and the dynamic algorithm library in the target system is used to construct a three-dimensional mesh distortion model according to the first distortion correction coordinates.
[0043] In this embodiment, the algorithm used in the target system to construct a three-dimensional mesh according to the first distortion correction coordinates can be pre-compiled into a dynamic algorithm library, and then the algorithm library can be transplanted into the Android system. The Android system uses the dynamic algorithm library to generate a three-dimensional mesh distortion model according to the first distortion correction coordinates. The three-dimensional mesh distortion model includes a plurality of meshes connected to each other, and the vertices of the meshes are points corresponding to each first distortion correction coordinate.
[0044] Optionally, the process of displaying an image on the target system includes:
[0045] 1) Read the first distortion correction coordinates, and then use a preset algorithm to determine the vertices of the mesh from the first distortion correction coordinates. Connect the vertices of the mesh to obtain a three-dimensional mesh distortion model.
[0046] 2) The content to be displayed is converted into an image texture, and then rendered on the 3D mesh distortion model to obtain a distortion-corrected image. Figure 3 is a software architecture diagram. If the rendering engine used by the HUD application of the target system is Kanzi, then the software framework of the application is as follows: Figure 3 As shown, Figure 3 The configuration file in stores the configuration information of the vehicle, such as whether the driving position of the vehicle is left-hand drive or right-hand drive, etc. The coordinate file stores the first distortion correction coordinates, the algorithm library is a dynamic algorithm library, and the vertex data is the vertex data of the mesh.
[0047] S103: Draw an image to be displayed using the three-dimensional grid distortion model.
[0048] In this embodiment, the three-dimensional grid distortion model can be used to draw the image to be displayed, and the drawn image is the image after distortion correction, and the correction effect of the image can be consistent with the correction effect of the HUD application in the target system.
[0049] The image distortion correction method provided in the embodiment of the present invention receives the first distortion correction coordinates sent by the target system, wherein the target system is different from the Android system, and uses the first distortion correction coordinates and the dynamic algorithm library to construct a three-dimensional mesh distortion model, wherein the dynamic algorithm library in the Android system is transplanted to the target system, and the dynamic algorithm library in the target system is used to construct a three-dimensional mesh distortion model according to the first distortion correction coordinates, and use the three-dimensional mesh distortion model to draw the image to be displayed. In the technical solution of the embodiment of the present invention, the Android system achieves consistency in the distortion correction effect of the two systems by synchronizing the distortion correction coordinates and the dynamic algorithm library of the target system, thereby ensuring the continuity and consistency of the user experience, so that the driver can quickly obtain a clear and distortion-free projection image when starting the HUD function, thereby improving the user experience, solving the problem of poor distortion correction effect of the Android system on the head-up display image, and helping to reduce the cost of subsequent maintenance and upgrades.
[0050] Optionally, the Android system and the target system are built into an in-vehicle entertainment system, and the target system includes a QNX system.
[0051] The image distortion correction method described in this article can be applied to the Android system in the in-vehicle entertainment system. The in-vehicle entertainment system is a dual system, and the target system can be a QNX system.
[0052] Embodiment 2
[0053] Figure 4 A flowchart of an image distortion correction method provided in Embodiment 2 of the present invention. The technical solution of the embodiment of the present invention is further optimized on the basis of the above-mentioned optional technical solutions, and a specific method for the Android system to correct the distortion of the head-up display image is given.
[0054] Optionally, before using the first distortion correction coordinates and the dynamic algorithm library to construct the three-dimensional mesh distortion model, it also includes: receiving the dynamic algorithm library transplanted in the target system and building a GLSurfaceView environment; wherein, using the first distortion correction coordinates and the dynamic algorithm library to construct the three-dimensional mesh distortion model includes: in the GLSurfaceView environment, using the algorithm in the dynamic algorithm library to determine the vertices of the triangle from the first distortion correction coordinates; obtaining the three-dimensional mesh distortion model by connecting the vertices, wherein each distorted mesh in the three-dimensional mesh distortion model is a triangle. The advantage of such a setting is that by constructing the GLSurfaceView environment, the initialization process of the Android system application is optimized, ensuring that the Android system application can provide an effective distortion correction effect in the initialization stage, reducing the delay and jamming phenomenon in the rendering process, significantly improving the efficiency and stability of image rendering, improving image quality, further enhancing the driver's visual experience, and improving user experience and driving safety.
[0055] Optionally, the drawing of the image to be displayed using the three-dimensional grid distortion model includes: determining a display window View object, and determining a bitmap according to a window size of the window View object; and drawing the image to be displayed using the three-dimensional grid distortion model and the bitmap. The advantage of such a setting is that the image to be displayed can be drawn accurately and quickly.
[0056] like Figure 4 As shown, a method for image distortion correction provided by Embodiment 2 of the present invention specifically includes the following steps:
[0057] S201, receiving a dynamic algorithm library transplanted into the target system, and receiving a first distortion correction coordinate sent by the target system.
[0058] S202 , building a GLSurfaceView environment, and in the GLSurfaceView environment, using an algorithm in the dynamic algorithm library to determine the vertices of a triangle from the first distortion-corrected coordinates.
[0059] Specifically, in the GLSurfaceView environment, the first distortion correction coordinates can be transmitted to the dynamic algorithm library through JNI (Java Native Interface). After calculation by the algorithm library, the vertex data of the triangle can be generated.
[0060] S203 . Obtain a three-dimensional mesh distortion model by connecting the vertices, wherein each distorted mesh in the three-dimensional mesh distortion model is a triangle.
[0061] Specifically, the three-dimensional mesh distortion model is a three-dimensional distorted mesh network, and each distorted mesh may be a triangle.
[0062] Optionally, obtaining the three-dimensional mesh distortion model by connecting the vertices includes: using a preset GLSurfaceView class interface and an OpenGL ES interface to connect the vertices into a three-dimensional mesh distortion model, wherein the three-dimensional mesh distortion model includes adjacent triangular distortion meshes that share two vertices.
[0063] Specifically, the vertex data may be called back to an interface within the GLSurfaceView class, and then the vertex data may be set by calling an OpenGLES interface to obtain a three-dimensional mesh distortion model. Figure 5 A schematic diagram of a triangular mesh in a 3D mesh distortion model. Figure 5 The white points in are vertices, such as Figure 5 As shown, nine vertices can generate eight triangular distortion meshes, and the eight triangular distortion meshes include adjacent triangular distortion meshes that share two vertices.
[0064] S204: Determine a display window View object, and determine a bitmap according to the window size of the window View object.
[0065] Specifically, the display window View object can be obtained, and a bitmap Bitmap can be generated according to the window size of the window View object. The size of the bitmap (recorded as mWidth x mHeight) is consistent with the size of the display window View object, and the bitmap is configured using ARGB_8888.
[0066] S205: Draw an image to be displayed using the three-dimensional grid distortion model and the bitmap.
[0067] Specifically, by rendering the content in the bitmap into the three-dimensional mesh distortion model, the image to be displayed can be drawn.
[0068] Optionally, the using the three-dimensional mesh distortion model and the bitmap to draw the image to be displayed includes: loading the bitmap into a two-dimensional texture of OpenGL ES2.0, and using a fragment shader of the three-dimensional mesh distortion model to draw the image to be displayed. The advantage of such a setting is that the accuracy and clarity of the displayed content are guaranteed by using the OpenGL ES shader, thereby effectively improving driving safety.
[0069] Specifically, a canvas Canvas is generated, and the contents of the display window View object are drawn on the Canvas, whereby the bitmap contains a visual representation of the display window View object. The bitmap is loaded into a two-dimensional texture of OpenGL ES2.0, and the texture data is rendered in a fragment shader of a three-dimensional mesh distortion model to realize the drawing of the image to be displayed.
[0070] The image distortion correction method provided by the embodiment of the present invention optimizes the initialization process of the Android system application by constructing the GLSurfaceView environment, ensuring that the Android system application can provide an effective distortion correction effect during the initialization phase, and realizes accurate and fast drawing of the displayed image, reducing the delay and jamming in the rendering process, significantly improving the efficiency and stability of image rendering, improving image quality, further enhancing the driver's visual experience, and improving user experience and driving safety.
[0071] Based on the above embodiment, the method may further include: receiving a second distortion correction coordinate sent by a head-up display HUD application of the target system through the SOME / IP protocol, wherein the second distortion correction coordinate is the updated first distortion correction coordinate. The advantage of such a setting is that when the distortion correction coordinate data of the target system changes, the Android system can synchronously update the distortion correction.
[0072] Specifically, after the target system updates the first distortion correction coordinates, it will send the updated first distortion correction coordinates, i.e., the second distortion correction coordinates, to the Android system. After receiving the second distortion correction coordinates, the Android system will redraw the image to be displayed. Among them, when it is necessary to redraw the image to be displayed, the onDrawFrame function in the OpenGL ES API can redraw the GLSurfaceView. The onDrawFrame function can be used to dynamically obtain the content of the display window View object and convert it into bitmap data. Then, the new vertex data is determined by calling the OpenGL ES2.0 API interface, and GLUtils.texImage2D is called to load the bitmap data, thereby updating the display content.
[0073] Embodiment 3
[0074] Figure 6 This is a schematic diagram of the structure of an image distortion correction device provided by Embodiment 3 of the present invention. Figure 6 As shown, the device is applied to the Android system, and the device includes: a correction coordinate receiving module 301, a distortion model building module 302 and an image drawing module 303, wherein:
[0075] A correction coordinate receiving module, used for receiving a first distortion correction coordinate sent by a target system, wherein the target system is different from the Android system;
[0076] A distortion model construction module, used to construct a three-dimensional mesh distortion model using the first distortion correction coordinates and a dynamic algorithm library, wherein the dynamic algorithm library in the Android system is transplanted to the target system, and the dynamic algorithm library in the target system is used to construct a three-dimensional mesh distortion model according to the first distortion correction coordinates;
[0077] An image drawing module is used to draw an image to be displayed using the three-dimensional grid distortion model.
[0078] The image distortion correction device provided in the embodiment of the present invention achieves consistency in the distortion correction effects of the two systems in the Android system by synchronizing the distortion correction coordinates and dynamic algorithm library of the target system, thereby ensuring the continuity and consistency of the user experience, allowing the driver to quickly obtain a clear and distortion-free projection image when starting the HUD function, thereby improving the user experience and solving the problem of poor distortion correction effect of the Android system on the head-up display image, while helping to reduce the cost of subsequent maintenance and upgrades.
[0079] Optionally, the device further comprises:
[0080] The environment building module is used to receive the dynamic algorithm library transplanted in the target system and build a GLSurfaceView environment before building a three-dimensional mesh distortion model using the first distortion correction coordinates and the dynamic algorithm library.
[0081] Optionally, the distortion model building module includes:
[0082] A vertex determination unit, configured to determine the vertices of a triangle from the first distortion-corrected coordinates in the GLSurfaceView environment by using an algorithm in the dynamic algorithm library;
[0083] The three-dimensional mesh generation unit is used to obtain a three-dimensional mesh distortion model by connecting the vertices, wherein each distortion mesh in the three-dimensional mesh distortion model is a triangle.
[0084] Optionally, obtaining the three-dimensional mesh distortion model by connecting the vertices includes: using a preset GLSurfaceView class interface and an OpenGL ES interface to connect the vertices into a three-dimensional mesh distortion model, wherein the three-dimensional mesh distortion model includes adjacent triangular distortion meshes that share two vertices.
[0085] Optionally, the image drawing module includes:
[0086] A bitmap determination unit, used to determine a display window View object, and determine a bitmap according to a window size of the window View object;
[0087] An image drawing unit is used to draw an image to be displayed using the three-dimensional grid distortion model and the bitmap.
[0088] Optionally, drawing the image to be displayed using the three-dimensional mesh distortion model and the bitmap includes: loading the bitmap into a two-dimensional texture of OpenGL ES2.0, and drawing the image to be displayed using a fragment shader of the three-dimensional mesh distortion model.
[0089] Optionally, the Android system and the target system are built into an in-vehicle entertainment system, and the target system includes a QNX system.
[0090] The image distortion correction device provided in the embodiment of the present invention can execute the image distortion correction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0091] Embodiment 4
[0092] Figure 7 A schematic diagram of the structure of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is configured with an Android system, and the electronic device is intended to represent various forms of digital computers, such as car computers, laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0093] like Figure 7As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0094] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0095] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special 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 41 performs the various methods and processes described above, such as an image distortion correction method.
[0096] In some embodiments, the image distortion correction method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the image distortion correction method described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to perform the image distortion correction method in any other appropriate manner (e.g., by means of firmware).
[0097] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0098] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0099] The computer device provided above can be used to execute the image distortion correction method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0100] Embodiment 5
[0101] In the context of the present invention, a computer-readable storage medium may be a tangible medium, wherein the computer-executable instructions, when executed by a computer processor, are used to perform an image distortion correction method, the method comprising:
[0102] Receiving first distortion-corrected coordinates sent by a target system, wherein the target system is different from the Android system;
[0103] Constructing a three-dimensional mesh distortion model using the first distortion correction coordinates and a dynamic algorithm library, wherein the dynamic algorithm library in the Android system is transplanted to the target system, and the dynamic algorithm library in the target system is used to construct the three-dimensional mesh distortion model according to the first distortion correction coordinates;
[0104] The image to be displayed is drawn using the three-dimensional grid distortion model.
[0105] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by an instruction execution system, device or equipment or used with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0106] The computer device provided above can be used to execute the image distortion correction method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0107] It is worth noting that in the embodiment of the above-mentioned image distortion correction device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0108] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for correcting image distortion, characterized in that: Applied to the Android system, the method includes: Receiving first distortion-corrected coordinates sent by a target system, wherein the target system is different from the Android system; Constructing a three-dimensional mesh distortion model using the first distortion correction coordinates and a dynamic algorithm library, wherein the dynamic algorithm library in the Android system is transplanted to the target system, and the dynamic algorithm library in the target system is used to construct the three-dimensional mesh distortion model according to the first distortion correction coordinates; The image to be displayed is drawn using the three-dimensional grid distortion model.
2. The method according to claim 1, characterized in that Before constructing the three-dimensional mesh distortion model by using the first distortion correction coordinates and the dynamic algorithm library, the method further includes: Receive the dynamic algorithm library transplanted into the target system and build the GLSurfaceView environment; The step of constructing a three-dimensional mesh distortion model by using the first distortion correction coordinates and a dynamic algorithm library includes: In the GLSurfaceView environment, using an algorithm in the dynamic algorithm library to determine the vertices of a triangle from the first distortion-corrected coordinates; A three-dimensional mesh distortion model is obtained by connecting the vertices, wherein each distorted mesh in the three-dimensional mesh distortion model is a triangle.
3. The method according to claim 2, characterized in that The step of obtaining a three-dimensional mesh distortion model by connecting the vertices comprises: The vertices are connected into a three-dimensional mesh distortion model by using a preset GLSurfaceView class interface and an OpenGL ES interface, wherein the three-dimensional mesh distortion model includes adjacent triangular distortion meshes that share two vertices.
4. The method according to any one of claims 1 to 3, characterized in that The method of drawing the image to be displayed by using the three-dimensional grid distortion model includes: Determine a display window View object, and determine a bitmap according to the window size of the window View object; The image to be displayed is drawn using the three-dimensional grid distortion model and the bitmap.
5. The method according to claim 4, characterized in that The step of drawing the image to be displayed by using the three-dimensional grid distortion model and the bitmap includes: The bitmap is loaded into a two-dimensional texture of OpenGL ES2.0, and the image to be displayed is drawn using a fragment shader of the three-dimensional mesh distortion model.
6. The method according to claim 1, characterized in that Also includes: The second distortion-corrected coordinates are received and sent by a head-up display (HUD) application of the target system through a SOME / IP protocol, wherein the second distortion-corrected coordinates are the updated first distortion-corrected coordinates.
7. The method according to claim 1, characterized in that The Android system and the target system are built into an in-vehicle entertainment system, and the target system includes a QNX system.
8. An image distortion correction device, characterized in that: Applied to the Android system, the device comprises: A correction coordinate receiving module, used for receiving a first distortion correction coordinate sent by a target system, wherein the target system is different from the Android system; A distortion model construction module, used to construct a three-dimensional mesh distortion model using the first distortion correction coordinates and a dynamic algorithm library, wherein the dynamic algorithm library in the Android system is transplanted to the target system, and the dynamic algorithm library in the target system is used to construct a three-dimensional mesh distortion model according to the first distortion correction coordinates; An image drawing module is used to draw an image to be displayed using the three-dimensional grid distortion model.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, 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 so that the at least one processor can perform the image distortion correction method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the image distortion correction method described in any one of claims 1 to 7 when executed.
