Graph rendering method and device, electronic equipment and storage medium

By using image correction modules in multi-core heterogeneous chips to process image information, the problem of CPU and GPU resource consumption in graphics rendering is solved and rendering efficiency is improved.

CN118761897APending Publication Date: 2024-10-11BEIJING SEMIDRIVE TECHNOLOGY LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410686329.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

During the graphics rendering process, the computing resources of the CPU and/or GPU are limited, and how to save the consumption of these resources is a problem that needs to be solved.

Method used

By sending image information to the image correction module for processing in a multi-core heterogeneous chip, the preset distortion correction rules are used to process the image, thereby reducing the rendering overhead of the GPU or CPU in graphics rendering.

Benefits of technology

Graphics rendering through the image correction module expands the use area of ​​the distortion correction module, improves the efficiency of graphics rendering, and reduces GPU or CPU resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118761897A_ABST
    Figure CN118761897A_ABST
Patent Text Reader

Abstract

The invention provides a graph rendering method and device, electronic equipment and a storage medium, and the method comprises the steps: a first processor determines the image information of at least one first image, and transmits the image information of the at least one first image to an image correction module; the first processor and the image correction module belong to the same multi-core heterogeneous chip; the image correction module is a hardware module of the multi-core heterogeneous chip; the image information comprises coordinate information and pixel information of a first graph; the image correction module performs image processing on coordinate information and pixel information of a first graph corresponding to each first image by using a preset distortion correction rule to obtain a second image corresponding to each first image; sending a second image corresponding to each first image to the first processor; and the first processor determines a target image according to the second image corresponding to each first image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image display technology, and in particular to a graphics rendering method, device, electronic device, and computer-readable storage medium. Background Art

[0002] Graphics rendering is the process of converting graphic data into visual images. At present, when rendering graphics, objects are generally divided into many sub-graphics (such as Figure 1 As shown, it is divided into multiple triangles), and each sub-graphic is rendered separately, and the corresponding visualization image is obtained by integration.

[0003] Generally speaking, graphics rendering is implemented by a central processing unit (CPU) and / or a graphics processing unit (GPU), but the computing resources of the CPU and / or GPU are limited. How to save the resource consumption of the CPU and / or GPU is a problem that needs to be solved at present. Summary of the invention

[0004] The present disclosure provides a graphics rendering method, device, electronic device and storage medium to at least solve the above technical problems existing in the prior art.

[0005] In a first aspect, an embodiment of the present disclosure provides a graphics rendering method, the method comprising:

[0006] The first processor determines image information of at least one first image, and sends the image information of the at least one first image to the image correction module; the first processor and the image correction module belong to the same multi-core heterogeneous chip; the image correction module is a hardware module of the multi-core heterogeneous chip; the image information includes: coordinate information and pixel information of the first graphic;

[0007] The image correction module uses a preset distortion correction rule to perform image processing on the coordinate information and pixel information of the first graphic corresponding to each of the first images to obtain a second image corresponding to each of the first images; and sends the second image corresponding to each of the first images to the first processor;

[0008] The first processor determines a target image according to a second image corresponding to each of the first images.

[0009] In a second aspect, an embodiment of the present disclosure provides a graphics rendering device, the device comprising:

[0010] a first processing module, configured to determine image information of at least one first image, and send the image information of the at least one first image to an image correction module; the first processing module and the image correction module belong to the same multi-core heterogeneous chip; the image correction module is a hardware module of the multi-core heterogeneous chip; the image information includes: coordinate information and pixel information of the first graphic;

[0011] an image correction module, configured to perform image processing on the coordinate information and pixel information of each first graphic corresponding to the first image using a preset distortion correction rule to obtain a second image corresponding to each first image; and send the second image corresponding to each first image to the first processing module;

[0012] The first processing module is used to determine a target image according to the second image corresponding to each of the first images.

[0013] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor so that the at least one processor can perform the above-mentioned method.

[0017] In a fourth aspect, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described above.

[0018] The graphics rendering method, device, electronic device and storage medium provided by the embodiments of the present disclosure include: a first processor determines the image information of at least one first image, and sends the image information of the at least one first image to an image correction module; the first processor and the image correction module belong to the same multi-core heterogeneous chip; the image correction module is a hardware module of the multi-core heterogeneous chip; the image information includes: coordinate information and pixel information of the first graphic; the image correction module uses a preset distortion correction rule to perform image processing on the coordinate information and pixel information of the first graphic corresponding to each first image, and obtains a second image corresponding to each first image; the second image corresponding to each first image is sent to the first processor; the first processor determines the target image according to the second image corresponding to each first image. In this way, the image correction module is used to perform image processing to obtain an image for rendering, which expands the application field of the distortion correction module, improves the efficiency of graphics rendering, and reduces the drawing overhead of the GPU or CPU.

[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A schematic diagram of object division during graphics rendering provided by an embodiment of the present disclosure;

[0021] Figure 2 A flowchart of a graphics rendering method provided by an embodiment of the present disclosure;

[0022] Figure 3 A schematic diagram of a correction effect provided by an embodiment of the present disclosure;

[0023] Figure 4 A schematic diagram of an image correction related graph provided by an embodiment of the present disclosure;

[0024] Figure 5 A flowchart of a graphics rendering method provided by an application embodiment of the present disclosure;

[0025] Figure 6 A schematic diagram of the structure of a graphics rendering device provided by an embodiment of the present disclosure;

[0026] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] In order to make the purpose, features, and advantages of the present disclosure more obvious and easy to understand, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0028] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0029] In the following description, the terms "first\second" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present disclosure described herein can be implemented in an order other than that illustrated or described herein.

[0030] Unless otherwise defined, all technical and scientific terms used in this disclosure have the same meaning as those commonly understood by those skilled in the art to which this disclosure belongs. The terms used in this disclosure are only for the purpose of describing the embodiments of this disclosure and are not intended to limit this disclosure.

[0031] It should be understood that in the various embodiments of the present disclosure, the size of the serial number of each implementation process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.

[0032] Figure 2 A flowchart of a graphics rendering method provided by an embodiment of the present disclosure; Figure 2 As shown, the graphics rendering method includes:

[0033] Step 201: a first processor determines image information of at least one first image, and sends the image information of the at least one first image to an image correction module; the first processor and the image correction module belong to the same multi-core heterogeneous chip; the image correction module is a hardware module of the multi-core heterogeneous chip; the image information includes: coordinate information and pixel information of the first graphic;

[0034] Step 202: the image correction module uses a preset distortion correction rule to perform image processing on the coordinate information and pixel information of each first graphic corresponding to the first image to obtain a second image corresponding to each first image; and sends each second image corresponding to the first image to the first processor;

[0035] Step 203: The first processor determines a target image according to the second image corresponding to each of the first images.

[0036] In some embodiments, the method is applied to a system on chip (SOC), which refers to integrating multiple hardware components on a single chip, such as a processor (CPU, Central Processing Unit), a graphics processor (GPU, Graphics Processing Unit), an image correction module, etc., to realize a complete computing system.

[0037] Hardware resources such as CPU, GPU, image correction module are configured into multiple sets of different hardware components, called hardware domains, and each operating system runs independently in each hardware domain. Each hardware domain works independently to prevent mutual interference or influence, improving the reliability, stability and anti-interference ability of SOC.

[0038] Inter-core communication is the communication method between different hardware domains within the SOC, including asynchronous message passing through the mailbox mechanism and data sharing across hardware domains through the shared memory mechanism.

[0039] Mailbox is a mechanism or data structure used for communication between different processing cores. It can be used to pass messages and trigger events between different processors, cores or hardware modules. Mailbox can be regarded as a shared, bidirectional communication interface, which contains one or more registers for storing messages or control information. The sender can write messages to the registers of Mailbox, and the receiver can read these messages and process them accordingly. That is, the sender can control the receiver or instruct the receiver to perform corresponding operations by writing messages or control information in the registers of Mailbox.

[0040] In semiconductor chips, Mailbox is often used for communication between processors, such as between multi-core processors, SOCs, or multiple independent functional modules. Through the Mailbox mechanism, different processing units can work together, share data, synchronize operations, and trigger events, thereby achieving more efficient system collaboration and resource sharing.

[0041] It should be noted that the implementation of Mailbox may vary depending on the chip architecture, communication protocol or design requirements, but in general, it exists to achieve reliable and efficient communication and data exchange between processing units.

[0042] In some embodiments, the SOC may be a multi-core heterogeneous chip.

[0043] Multi-core heterogeneity refers to a chip architecture design that integrates multiple processing cores (cores) and at least two of these cores are different in structure, function or performance. Some tasks may be more suitable for high-performance general-purpose processor cores, while other tasks may require more specialized processor cores to improve efficiency. Multi-core heterogeneity can better balance factors such as performance, power consumption and cost, and provide more flexible and efficient solutions.

[0044] A multi-core heterogeneous chip refers to a chip that integrates two or more processor cores in a single chip. Each processor core can act as an independent processor and independently run the instructions stored in the memory corresponding to the processor core.

[0045] In some embodiments, the first processor and the image correction module may belong to a multi-purpose domain (MP) in the SOC, or may belong to different multi-purpose domains.

[0046] The first processor and the image correction module may belong to the same application domain or to different application domains.

[0047] The first processor and the image correction module may belong to a safety domain in the SOC, or may belong to different safety domains.

[0048] A hardware domain is a set of hardware that may include hardware resources such as processor cores, interrupt controllers, clock controllers, and memory. The number of processor cores in a hardware set may be one or more. One hardware domain runs one operating system, and different hardware domains may run different operating systems.

[0049] Application domain: refers to one or more hardware domains, which means that the hardware domain has strong computing performance and can support application programs with high computing performance requirements.

[0050] Security domain: is one or more hardware domains, including at least one of the following characteristics: having a high functional safety architecture, running an operating system that meets high functional safety requirements, and processing tasks that require high functional safety.

[0051] The multifunctional domain is one or more hardware domains, which are configured with processor components with certain processing capabilities and specific hardware components that respond to a variety of different needs, such as a first processor and an image correction module, for processing various types of tasks.

[0052] The multi-core heterogeneous chip in the disclosed embodiment can be applied to transportation equipment, including but not limited to balancing vehicles, cars, buses, subways, trains, airplanes, etc.

[0053] In some embodiments, the image correction module is a hardware module of the multi-core heterogeneous chip; the image correction module and the first processor may be IP / IP cores in the SOC respectively.

[0054] IP, also known as IP core (Intellectual Property Core), refers to the mature design of a circuit module with independent functions in a chip. This circuit module design can be applied to other chip design projects that contain this circuit module, thereby reducing the design workload, shortening the design cycle, and improving the success rate of chip design. IP core can also be understood as an intermediate component of chip design.

[0055] The image correction module is used to achieve distortion correction of the image by mapping four corner points to four corner points.

[0056] Image distortion correction technology generally refers to a module that transforms an image to remove distortion caused by the camera or lens system so that straight lines in the image remain straight after correction. In four-point to four-point mapping, it usually refers to mapping the four corner points in the original image to the four corner points in the corresponding image to achieve perspective correction. Figure 3 As shown, a schematic diagram of the correction effect is provided.

[0057] In the disclosed embodiment, a hardware unit, namely, an image correction module, is used inside the SOC to realize the drawing of triangles required for graphics rendering, thereby expanding the application scope of the distortion correction technology and reducing the work overhead of the CPU and / or GPU in the SOC.

[0058] In some embodiments, the image includes graphics and pixels;

[0059] Graphics refer to two-dimensional or three-dimensional objects described and drawn through geometry. They can be composed of a series of geometric shapes, lines, curves, polygons, etc., and can represent people, objects, scenes, etc.

[0060] Pixel is the smallest unit of an image and the basic unit of image processing and display. It is represented by a number and represents a point or a small area in the image. Each pixel can contain information such as color, brightness and transparency. The entire image can be formed through the arrangement and combination of pixels.

[0061] Here, the image information of the first image includes: coordinate information and pixel information of the first graphic.

[0062] In an example, the coordinate information may include: coordinates of each vertex in the first figure, two adjacent vertices are connected by a straight line, and the area of ​​the first figure can be determined by the coordinates of each vertex.

[0063] The pixel information may include: the color value and pixel coordinates of each pixel; for example, the pixel information may include:

[0064] The color block corresponding to the graphics to be generated (such as the color block of a triangle) can be understood as a small segment of memory, which stores the single color values ​​of MxN pixels (where M>=2, N>=2);

[0065] The conversion table is used to indicate the mapping relationship between the vertex positions of the to-be-generated graphic (ie, the second graphic, such as a triangle) and the color blocks, ie, the mapping relationship between pixel coordinates; that is, the conversion table is used to indicate how to fill the color blocks into the second graphic.

[0066] In another example, the coordinate information may include: information related to graphic coordinates; for example, the coordinate information may include: a conversion table, wherein the conversion table is used to indicate the coordinates of each vertex in the first graphic, and to indicate the mapping relationship between the vertex positions of the graphic to be generated (that is, the second graphic, such as a triangle) and the color blocks, that is, the mapping relationship between pixel coordinates.

[0067] The pixel information may include: the color value of each pixel; for example, the pixel information may include: the color block corresponding to the graphic to be generated (such as the color block of a triangle), which can be understood as a small segment of memory that stores the single color values ​​of MxN pixels (where M>=2, N>=2).

[0068] Here, there is no limitation on the design of coordinate information and pixel information.

[0069] In some embodiments, determining image information of at least one first image includes:

[0070] Determine a graphic to be generated and pixel information corresponding to the graphic;

[0071] Determining, according to a preset conversion rule, a first graphic that matches the graphic to be generated;

[0072] Determine the image information according to the first graphic and pixel information corresponding to the graphic;

[0073] The conversion rule is used to indicate a first graphic corresponding to at least one graphic to be generated.

[0074] Here, determining the graphics to be generated and the pixel information corresponding to the graphics includes:

[0075] Receiving a first image instruction input by a user, where the first image instruction is used to indicate a graphic to be generated and pixel information corresponding to the graphic;

[0076] According to the first image instruction, a graphic to be generated and pixel information corresponding to the graphic are determined.

[0077] In one example, the first processor may provide graphic options and pixel information options corresponding to the graphics through the human-computer interaction interface of the electronic device, and the user makes selections based on the human-computer interaction interface to determine the graphics to be generated and the pixel information corresponding to the graphics.

[0078] In another example, the first processor can provide an image receiving function through the human-computer interaction interface of the electronic device, and the user directly receives the image through the image receiving function, performs image analysis on the received image, and determines one or more graphics to be generated and pixel information corresponding to the graphics. The image analysis can be implemented by a preset image analysis model, and after receiving the image, the image analysis model outputs the graphics and pixel information corresponding to the image.

[0079] Of course, the first processor may also determine the graphics to be generated and the pixel information corresponding to the graphics in other ways. The above is only an example and is not limiting.

[0080] Here, the conversion rule may be preset and stored in the first processor, wherein the conversion rule is used to indicate a first graphic corresponding to at least one graphic to be generated, and no limitation is imposed on the graphic to be generated and the first graphic.

[0081] In one example, the graphic to be generated is a first triangle, the conversion rule indicates a first graphic corresponding to the first triangle, and a first graphic is determined according to the conversion rule and the first triangle, which is recorded as a first graphic A;

[0082] In another example, the figure to be generated is a second triangle, and the conversion rule also indicates a first figure corresponding to the second triangle. According to the conversion rule and the second triangle, a first figure is determined, which is recorded as the first figure B; wherein the first triangle is different from the second triangle, and accordingly, the first figure A and the first figure B are also different.

[0083] For ease of understanding, combined Figure 4 Give a specific example, Figure 4 A graphic example is provided to illustrate how to determine a first graphic that matches the graphic to be generated according to a preset conversion rule, and to determine the image information according to the first graphic and pixel information corresponding to the graphic.

[0084] In one example, if Figure 4In (a), the figure to be generated is △A'B'D'. According to the preset conversion rules, determine Figure 4 The parallelogram ABCD on the left in (a);

[0085] In another example, if Figure 4 In (b), the figure to be generated is △A'D'C'. According to the preset conversion rules, determine Figure 4 The parallelogram ABCD on the left in (b);

[0086] In yet another example, Figure 4 In (c), the figure to be generated is △A'B'C'. According to the preset conversion rules, determine Figure 4 The parallelogram ABCD on the left in (c);

[0087] In another example, if Figure 4 In (d), the figure to be generated is △B'C'D'. According to the preset conversion rules, determine Figure 4 The parallelogram ABCD on the left in (d);

[0088] The pixel information may be pixel information of a graphic to be generated, such as pixel information of △A'B'D';

[0089] The pixel information may also be pixel information of the first figure, such as pixel information of parallelogram ABCD. Specifically, the pixel information of parallelogram ABCD may be determined based on the pixel information corresponding to the figure to be generated (such as △A'B'D') and the first figure (i.e., parallelogram ABCD), and finally the image information of the first image may be obtained.

[0090] After the image correction module obtains the image information, the image correction module uses a preset distortion correction rule to perform image processing on the image information corresponding to each of the first images (ie, the coordinate information and pixel information of the first graphics) to obtain a second image corresponding to each of the first images.

[0091] In some embodiments, the at least one graphic to be generated indicated by the preset conversion rule may include 4 general graphics; accordingly, the first graphics corresponding to the graphic to be generated may also include: 4 general graphics. For example, if the graphics to be generated are all 2x2 in size, the coordinate information corresponding to the 4 general first graphics are:

[0092] A(0,0), B(2,0), C(4,2), D(2,2), for example, Figure 4 (a) Example;

[0093] A(2,0), B(4,0), C(2,2), D(0,2), for example, Figure 4(b) Example;

[0094] A(0,0), B(2,0), C(0,2), D(-2,2), for example, Figure 4 (c) Example;

[0095] A(-2,0), B(0,0), C(2,2), D(0,2), for example, Figure 4 Example of (d).

[0096] Accordingly, there are four types of graphics to be generated, including: a triangle with a right angle on the upper left (e.g. Figure 4 (a) example), the lower left right triangle (e.g. Figure 4 (b) example), a triangle with a right upper angle (e.g. Figure 4 (c) example), a triangle with a right lower angle (e.g. Figure 4 (d) Example).

[0097] The above triangles may also be universal, and therefore, each of the above triangles may correspond to a coordinate, and it is not necessary for each triangle to correspond to a different coordinate.

[0098] In some embodiments, determining image information of at least one first image includes:

[0099] Obtaining description information of each first image in at least one first image;

[0100] Perform semantic analysis on the description information of each of the first images to obtain image information of each of the first images.

[0101] Here, the first processor can provide a text receiving function through the human-computer interaction interface of the electronic device to which it belongs, and the user directly receives the description information through the text receiving function, performs semantic analysis on the received description information, and determines the graphics to be generated and the pixel information corresponding to the graphics. The semantic analysis can be implemented by a preset text analysis model, and the text analysis model outputs the corresponding graphics and pixel information after receiving the description information.

[0102] For example, the description information of a first image is: a parallelogram ABCD, angles B and D are obtuse and the same, and the color of the triangle formed by ABD is color A. The text analysis model can be used to identify the following: Figure 4 The parallelogram on the left in (a), with ABD filled with color A, serves as image information of a first image.

[0103] Similarly, the description information of a first image is: a parallelogram ABCD, angles A and C are obtuse and the same, and the color of the triangle formed by ADC is color B. The text analysis model is used to identify the following: Figure 4 The parallelogram on the left in (b), with ABD filled with color B, serves as image information of a first image.

[0104] Figure 4 (c) and Figure 4 (d) is similar and will not be described in detail here.

[0105] In some embodiments, the using of a preset distortion correction rule to perform image processing on the coordinate information and pixel information of the first graphic corresponding to each of the first images to obtain the second image corresponding to each of the first images includes:

[0106] Using a preset distortion correction rule, performing distortion correction processing on the first graphics corresponding to each of the first images to obtain a processed first graphics;

[0107] extracting a second graphic from the processed first graphic;

[0108] A second image is determined according to the second graphic and the pixel information.

[0109] Here, the image correction module can be a hardware unit set inside the SOC. The image correction module uses a preset distortion correction rule to perform image processing on the coordinate information and pixel information of the first graphic corresponding to each of the first images to obtain a processed first graphic; extract a second graphic from the processed first graphic; and determine a second image based on the second graphic and the pixel information.

[0110] In this way, graphics rendering is performed through the image correction module, which expands the application field of the image correction module and reduces the drawing overhead of the GPU or CPU for graphics rendering.

[0111] In some embodiments, the using of a preset distortion correction rule to perform image processing on the coordinate information and pixel information of the first graphic corresponding to each of the first images to obtain the second image corresponding to each of the first images includes:

[0112] Using a preset distortion correction rule, performing distortion correction processing on the first graphics corresponding to each of the first images to obtain a processed first graphics;

[0113] extracting a second graphic from the processed first graphic;

[0114] A second image is determined according to the second graphic and the pixel information.

[0115] Correspondingly, determining the second image according to the second graphic and the pixel information includes:

[0116] According to the pixel values ​​and pixel coordinates in the pixel information, the pixel values ​​are filled into the second graphic to obtain the second image.

[0117] In an example, the coordinate information may include: coordinates of each vertex in the first figure.

[0118] The pixel information may include: the color value and pixel coordinates of each pixel; for example, the pixel information may include:

[0119] The color block corresponding to the graphic to be generated (such as the color block of a triangle);

[0120] The conversion table is used to indicate the mapping relationship between the vertex positions of the to-be-generated graphic (ie, the second graphic, such as a triangle) and the color blocks, ie, the mapping relationship between pixel coordinates.

[0121] In another example, the coordinate information may include: information related to graphic coordinates; for example, the coordinate information may include: a conversion table, wherein the conversion table is used to indicate the coordinates of each vertex in the first graphic, and to indicate the mapping relationship between the vertex positions of the graphic to be generated (that is, the second graphic, such as a triangle) and the color blocks, that is, the mapping relationship between pixel coordinates.

[0122] The pixel information may include: the color value of each pixel; for example, the pixel information may include: a color block corresponding to the graphic to be generated (such as a color block of a triangle).

[0123] Combination Figure 4 (a) Provide an example. Assuming that the desired image is a triangle △A'B'D', first generate the coordinates of the four points of the parallelogram ABCD on the left, where the coordinates of the four points ABCD can be stored in the coordinate information (or can also be determined in a conversion table), and the color of the triangle BCD is set to empty data to adapt to the four-point mapping rule of the distortion correction module; the image correction module automatically performs distortion correction on the parallelogram ABCD according to the distortion correction rule (such as the four-point mapping rule) to obtain a rectangle A'B'C'D'. △A'B'D' in the rectangle A'B'C'D' is the desired triangle, and △A'B'D' is extracted from the rectangle A'B'C'D'.

[0124] That is, the parallelogram ABCD on the left (an example of a first figure) is the input of the image correction module, and the triangle △A'B'D' on the right (an example of a second figure) is the output of the image correction module.

[0125] The color of the triangle △A'B'D' needs to be filled with each pixel therein, and each pixel can be the same or different pixel value. After filling the pixel value, a triangle with color is obtained, that is, the second image is obtained. For example, according to the conversion table, the color block is filled into the second figure (such as the triangle △A'B'D'), and the second image is obtained.

[0126] In some embodiments, the using of a preset distortion correction rule to perform image processing on the coordinate information and pixel information of the first graphic corresponding to each of the first images to obtain the second image corresponding to each of the first images includes:

[0127] The image correction module fills the pixel value into the first graphic according to the pixel value and the pixel coordinate in the pixel information to obtain a third image to be processed;

[0128] Using a preset distortion correction rule, the third image is subjected to distortion correction processing to obtain the processed third image as the second image.

[0129] In this way, graphics rendering is performed through the image correction module, which expands the application field of the image correction module and reduces the drawing overhead of the GPU or CPU for graphics rendering.

[0130] In some embodiments, the using of a preset distortion correction rule to perform image processing on the coordinate information and pixel information of the first graphic corresponding to each of the first images to obtain the second image corresponding to each of the first images includes:

[0131] According to the pixel values ​​and pixel coordinates in the pixel information, the pixel values ​​are filled into the first graphic to obtain a third image to be processed;

[0132] Using a preset distortion correction rule, the third image is subjected to distortion correction processing to obtain the processed third image as the second image.

[0133] Correspondingly, the step of filling the first graphic with the pixel value according to the pixel value and the pixel coordinate in the pixel information to obtain the third image to be processed includes:

[0134] Using a preset pixel mapping rule, according to the pixel values ​​and pixel coordinates in the pixel information, the pixel values ​​are filled into the first graphic to obtain a third image to be processed;

[0135] The pixel mapping rule is used to indicate the correspondence between the pixel coordinates before the distortion correction process and the pixel coordinates after the distortion correction process.

[0136] In an example, the coordinate information may include: coordinates of each vertex in the first figure.

[0137] The pixel information may include: the color value and pixel coordinates of each pixel; for example, the pixel information may include:

[0138] The color block corresponding to the graphic to be generated (such as the color block of a triangle);

[0139] The conversion table is used to indicate the mapping relationship between the vertex positions of the to-be-generated graphic (ie, the second graphic, such as a triangle) and the color blocks, ie, the mapping relationship between pixel coordinates.

[0140] In another example, the coordinate information may include: information related to graphic coordinates; for example, the coordinate information may include: a conversion table, wherein the conversion table is used to indicate the coordinates of each vertex in the first graphic, and to indicate the mapping relationship between the vertex positions of the graphic to be generated (that is, the second graphic, such as a triangle) and the color blocks, that is, the mapping relationship between pixel coordinates.

[0141] The pixel information may include: the color value and pixel coordinates of each pixel; for example, the pixel information may include: a color block corresponding to the graphic to be generated (such as a color block of a triangle).

[0142] Here, the pixel mapping rule is used to indicate the correspondence between the pixel coordinates before the distortion correction process and the pixel coordinates after the distortion correction process, that is, the pixel mapping relationship is used to indicate the mapping relationship between the pixels of the graphic to be generated and the pixels in the first graphic;

[0143] It can be understood as reversing the purpose and input, determining the pixel values ​​and pixel coordinates mapped to the first image based on the pixel values ​​and pixel coordinates corresponding to the image to be generated, and performing pixel value filling based on the determined pixel values ​​and pixel coordinates in the first image to obtain the third image to be processed. In this way, the second image can be directly obtained after the third image is directly subjected to distortion correction processing.

[0144] Among them, the graphic to be generated and the first graphic can be universal, and the corresponding relationship is preset. Therefore, the preset pixel mapping relationship can also be predetermined and saved. For example, it can be implemented based on wrapping (mapping) function software. Of course, the corresponding relationship between pixels can also be predetermined by other methods. There is no limitation on the method for determining the pixel mapping relationship and the determined pixel mapping relationship. It is designed according to application requirements in actual application.

[0145] In one example, Figure 4Taking (a) as an example, the rectangle A'B'C'D' and the triangle △A'B'D' contain multiple pixel values. According to the pixel mapping rule, the color value of each pixel coordinate of the rectangle ABCD can be reversely calculated in advance, that is, the parallelogram ABCD is filled with the required color (filled by pixel, each pixel can have the same or different value); the area of ​​the parallelogram ABCD outside the rectangle (that is, the triangle BDC) can be filled with the default value of the image correction module by hardware (any single color can be configured, such as black or white);

[0146] The image correction module performs mapping, A' comes from A, B' comes from B, C' comes from C, and D' comes from D. After filling, it is stretched and deformed according to the above mapping relationship (i.e., distortion correction is performed), and the corresponding colors are also stretched evenly, that is, the color value of a pixel coordinate is filled to the position of the transformed coordinate point according to the change rule;

[0147] In this way, after distortion correction, a triangle △A'B'D' with pixels, ie, the second image, can be directly obtained.

[0148] In some embodiments, the first processor determines a target image according to a second image corresponding to each of the first images, including:

[0149] The first processor integrates the second images corresponding to each of the first images to obtain a target image.

[0150] For example, each second image is a triangular image, and the images of each triangle are integrated to obtain a corresponding visualized image, that is, a target image.

[0151] The method provided by the embodiment of the present disclosure performs graphics rendering through a hardware unit in the SOC, namely, an image correction module, thereby expanding the application field of the image correction module. Applying the image correction module to graphics rendering can reduce the drawing overhead of the GPU and / or CPU for graphics rendering.

[0152] Figure 5 A flowchart of a graphics rendering method provided by an application embodiment of the present disclosure; Figure 5 As shown, the figure to be generated is a triangle, and the first figure is a parallelogram (for example Figure 4 The method includes:

[0153] Step 501: The first processor determines the color information and coordinate information of the triangle;

[0154] Step 502: The first processor generates image information of the first image according to the color information and coordinate information of the triangle, and sends the image information to the image correction module;

[0155] The coordinate information of the triangle includes: the coordinates of each vertex of the triangle;

[0156] The color information of the triangle includes:

[0157] The color block of a triangle can be a small piece of memory, which stores the single color value of MxN pixels (M>=2, N>=2);

[0158] The conversion table records the mapping relationship between the coordinate positions of the triangle vertices and the color blocks, that is, it indicates how to fill the color blocks into the triangle.

[0159] The first processor generates image information of a parallelogram according to the color information and coordinate information of the triangle, including:

[0160] According to a preset conversion rule, determining a parallelogram matching the triangle;

[0161] Image information of the parallelogram is determined according to pixel information corresponding to the parallelogram and the triangle.

[0162] For details, please refer to Figure 2 The related operations in the method shown will not be repeated here.

[0163] Step 503: The image correction module generates the required triangle image according to the image information of the parallelogram.

[0164] Here, the image correction module uses the distortion correction rule to generate the required triangular image based on the image information of the parallelogram. Figure 2 The related operations in the method shown will not be repeated here.

[0165] The method provided by the embodiment of the present disclosure performs graphics rendering through an image correction module, thereby expanding the application field of the image correction module and reducing the drawing overhead of a GPU or a CPU for graphics rendering.

[0166] Figure 6 A schematic diagram of the structure of a graphics rendering device provided by an embodiment of the present disclosure; Figure 6 As shown, the device is applied to a system-level chip, and the device includes:

[0167] a first processing module, configured to determine image information of at least one first image, and send the image information of the at least one first image to an image correction module; the first processing module and the image correction module belong to the same multi-core heterogeneous chip; the image correction module is a hardware module of the multi-core heterogeneous chip; the image information includes: coordinate information and pixel information of the first graphic;

[0168] an image correction module, configured to perform image processing on the coordinate information and pixel information of each first graphic corresponding to the first image using a preset distortion correction rule to obtain a second image corresponding to each first image; and send the second image corresponding to each first image to the first processing module;

[0169] The first processing module is used to determine a target image according to the second image corresponding to each of the first images.

[0170] In some embodiments, the first processing module is used to determine a graphic to be generated and pixel information corresponding to the graphic;

[0171] Determining, according to a preset conversion rule, a first graphic that matches the graphic to be generated;

[0172] Determine the image information according to the first graphic and pixel information corresponding to the graphic;

[0173] The conversion rule is used to indicate a first graphic corresponding to at least one graphic to be generated.

[0174] In some embodiments, the first processing module is used to obtain description information of each first image in at least one first image;

[0175] Perform semantic analysis on the description information of each of the first images to obtain image information of each of the first images.

[0176] In some embodiments, the image correction module is used to apply a preset distortion correction rule to perform distortion correction processing on the first graphics corresponding to each of the first images to obtain a processed first graphic;

[0177] extracting a second graphic from the processed first graphic;

[0178] A second image is determined according to the second graphic and the pixel information.

[0179] In some embodiments, the image correction module is used to fill the pixel values ​​into the second graphic according to the pixel values ​​and pixel coordinates in the pixel information to obtain the second image.

[0180] In some embodiments, the image correction module is used to fill the pixel value into the first graphic according to the pixel value and pixel coordinate in the pixel information to obtain a third image to be processed;

[0181] Using a preset distortion correction rule, the third image is subjected to distortion correction processing to obtain the processed third image as the second image.

[0182] In some embodiments, the image correction module is used to apply a preset pixel mapping rule to fill the pixel value into the first graphic according to the pixel value and pixel coordinate in the pixel information to obtain a third image to be processed;

[0183] The pixel mapping rule is used to indicate the correspondence between the pixel coordinates before the distortion correction process and the pixel coordinates after the distortion correction process.

[0184] The specific working process of the device can refer to the relevant description in the aforementioned method embodiment, which will not be repeated here.

[0185] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0186] Figure 7 A schematic diagram of the structure of an electronic device provided for an embodiment of the present disclosure. Device 700 is intended to represent various forms of digital computers, such as controllers, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, transportation equipment, wearable devices, and other similar computing devices, and transportation equipment includes but is not limited to balance cars, cars, buses, subways, trains, and airplanes. 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 disclosure described and / or required herein.

[0187] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0188] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0189] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as a graphics rendering method. For example, in some embodiments, the graphics rendering method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via ROM 702 and / or a communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the graphics rendering method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the graphics rendering method in any other appropriate manner (e.g., by means of firmware).

[0190] 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.

[0191] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code 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.

[0192] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. 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.

[0193] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer 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 pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the 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 input, voice input, or tactile input).

[0194] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may 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), and the Internet.

[0195] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0196] In the above description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0197] Unless otherwise defined, all technical and scientific terms used in this disclosure have the same meaning as those commonly understood by those skilled in the art to which this disclosure belongs. The terms used in this disclosure are only for the purpose of describing the embodiments of this disclosure and are not intended to limit this disclosure.

[0198] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0199] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0200] The above is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A graphics rendering method, It is characterized in that The method comprises: The first processor determines image information of at least one first image, and sends the image information of the at least one first image to the image correction module; the first processor and the image correction module belong to the same multi-core heterogeneous chip; the image correction module is a hardware module of the multi-core heterogeneous chip; the image information includes: coordinate information and pixel information of the first graphic; The image correction module uses a preset distortion correction rule to perform image processing on the coordinate information and pixel information of the first graphic corresponding to each of the first images to obtain a second image corresponding to each of the first images; and sends the second image corresponding to each of the first images to the first processor; The first processor determines a target image according to a second image corresponding to each of the first images.

2. The method according to claim 1, It is characterized in that The determining of image information of at least one first image comprises: Determine a graphic to be generated and pixel information corresponding to the graphic; Determining, according to a preset conversion rule, a first graphic that matches the graphic to be generated; Determine the image information according to the first graphic and pixel information corresponding to the graphic; The conversion rule is used to indicate a first graphic corresponding to at least one graphic to be generated.

3. The method according to claim 1, It is characterized in that The determining of image information of at least one first image comprises: Obtaining description information of each first image in at least one first image; Perform semantic analysis on the description information of each of the first images to obtain image information of each of the first images.

4. The method according to claim 1, It is characterized in that The using a preset distortion correction rule to perform image processing on the coordinate information and pixel information of the first graphic corresponding to each of the first images to obtain a second image corresponding to each of the first images includes: Using a preset distortion correction rule, performing distortion correction processing on the first graphics corresponding to each of the first images to obtain a processed first graphics; extracting a second graphic from the processed first graphic; A second image is determined according to the second graphic and the pixel information.

5. The method according to claim 4, It is characterized in that The determining the second image according to the second graphic and the pixel information comprises: According to the pixel values ​​and pixel coordinates in the pixel information, the pixel values ​​are filled into the second graphic to obtain the second image.

6. The method according to claim 1, It is characterized in that The using a preset distortion correction rule to perform image processing on the coordinate information and pixel information of the first graphic corresponding to each of the first images to obtain a second image corresponding to each of the first images includes: According to the pixel values ​​and pixel coordinates in the pixel information, the pixel values ​​are filled into the first graphic to obtain a third image to be processed; Using a preset distortion correction rule, the third image is subjected to distortion correction processing to obtain the processed third image as the second image.

7. The method according to claim 6, It is characterized in that The step of filling the first graphic with the pixel value according to the pixel value and the pixel coordinate in the pixel information to obtain a third image to be processed includes: Using a preset pixel mapping rule, according to the pixel values ​​and pixel coordinates in the pixel information, the pixel values ​​are filled into the first graphic to obtain a third image to be processed; The pixel mapping rule is used to indicate the correspondence between the pixel coordinates before the distortion correction process and the pixel coordinates after the distortion correction process.

8. A graphics rendering device, It is characterized in that The device comprises: a first processing module, configured to determine image information of at least one first image, and send the image information of the at least one first image to an image correction module; the first processing module and the image correction module belong to the same multi-core heterogeneous chip; the image correction module is a hardware module of the multi-core heterogeneous chip; the image information includes: coordinate information and pixel information of the first graphic; an image correction module, configured to perform image processing on the coordinate information and pixel information of each first graphic corresponding to the first image using a preset distortion correction rule to obtain a second image corresponding to each first image; and send the second image corresponding to each first image to the first processing module; The first processing module is used to determine a target image according to a second image corresponding to each of the first images.

9. An electronic device, It is characterized in that include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, It is characterized in that The computer instructions are used to make a computer execute the method according to any one of claims 1 to 7.