Video image rendering method, rendering device, electronic device and medium

By obtaining the three-dimensional model data of the target object in the video image and rendering according to the mapping relationship, the problem of poor rendering effect of video images in the prior art is solved, and high-quality three-dimensional image rendering is achieved.

CN117615115BActive Publication Date: 2025-02-14GUANGZHOU KINDLINK INTELLIGENT TECHNOLOGY CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311653585.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-04
Publication Date
2025-02-14
Estimated Expiration
2043-12-04

AI Technical Summary

Technical Problem

Existing video image rendering schemes cannot fully render objects in video images in three-dimensional ways, resulting in poor rendering.

Method used

By acquiring the video image to be rendered collected by the image acquisition unit, the three-dimensional model data corresponding to the target object is obtained, the mapping relationship between the first key point in the three-dimensional model and the second key point of the target object is described, and the mapping relationship is based on the mapping relationship. Render the target object and display a three-dimensional image of the target object.

Benefits of technology

It realizes rendering of two-dimensional video images into three-dimensional three-dimensional images, with better presentation effect and can truly and comprehensively restore the shape or shape of the target object in the three-dimensional space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117615115B_ABST
    Figure CN117615115B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of image rendering technology, and provides a method for rendering a video image, a rendering device, an electronic device, and a medium. Among them, a method for rendering a video image uses the three-dimensional model data corresponding to the target object in the image to be rendered to describe the mapping relationship between the first key point in the three-dimensional model and the second key point of the target object. When the video image to be rendered containing the target object is obtained, the target object is rendered according to the above mapping relationship, and then the three-dimensional image corresponding to the target object is displayed. Since the three-dimensional model corresponding to the target object can restore the shape or form of the target object in the real world in proportion, the mapping relationship between the key points in the three-dimensional model and the key points in the target object is described using the three-dimensional model data, which can truly and comprehensively restore the shape or form of the target object in three-dimensional space or stereoscopic space, so that the rendered three-dimensional image has a better presentation effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] At present, many roads or public places can use image acquisition units such as cameras, which are set at different positions to acquire video images of a certain monitoring area and obtain multiple two-dimensional video images.

[0003] However, in order to enrich the presentation method and presentation effect of video images, the current optimization solution is to process two-dimensional video images into three-dimensional video images. Specifically, some elements in the video image are simply mapped to a spatial plane, and a certain object in the video image cannot be fully rendered in three dimensions, resulting in poor presentation effect. Summary of the invention

[0004] In view of this, embodiments of the present application provide a method for rendering a video image, a device for rendering a video image, an electronic device, and a computer-readable storage medium to solve the problem that existing video image rendering schemes have poor effects.

[0005] A first aspect of an embodiment of the present application provides a method for rendering a video image, comprising:

[0006] Acquire a video image to be rendered acquired by an image acquisition unit, where the video image to be rendered includes a target object;

[0007] Acquire three-dimensional model data corresponding to the target object, where the three-dimensional model data is used to describe a mapping relationship between a first key point in the three-dimensional model and a second key point of the target object;

[0008] The target object is rendered according to the mapping relationship, and a three-dimensional image corresponding to the target object is displayed.

[0009] In the above solution, the target object is rendered according to the mapping relationship, and a three-dimensional image corresponding to the target object is displayed, including:

[0010] The target object is rendered according to the mapping relationship through the rendering engine to display the three-dimensional image corresponding to the target object.

[0011] In the above solution, the three-dimensional model data includes index information of each surface in the three-dimensional model corresponding to the target object, and the index information includes an index field uniquely corresponding to the first key point.

[0012] In the above solution, after the step of acquiring the three-dimensional model data corresponding to the target object, the method further includes:

[0013] determining a surface of the three-dimensional model according to index information in the three-dimensional model data;

[0014] Determine the first key point of each surface according to the index information of the surface;

[0015] Render the target object according to the mapping relationship and display the three-dimensional image corresponding to the target object, including:

[0016] According to the mapping relationship between the first key point of each surface and the second key point of the target object, the target object is rendered to display a three-dimensional image corresponding to the target object.

[0017] In the above solution, the video image rendering method further includes:

[0018] Acquire a sample image acquired by an image acquisition unit;

[0019] In response to a selection operation triggered by a user on a sample image, determining a target object;

[0020] Generate three-dimensional model data based on the target object.

[0021] In the above solution, in response to a selection operation triggered by a user on a sample image, determining a target object includes:

[0022] In response to a selection operation triggered by the user on the sample image, a second key point corresponding to the selection operation is displayed, and a target range calibrated by the second key point is generated in the sample image; the target range is used to indicate a target object.

[0023] In the above scheme, generating three-dimensional model data based on the target object includes:

[0024] Perform triangulation processing based on the second key point corresponding to the selection operation to obtain an initial three-dimensional model;

[0025] In response to the user's surface optimization operation on the initial three-dimensional model, a three-dimensional model corresponding to the target object is generated.

[0026] A second aspect of an embodiment of the present application provides a video image rendering device, including:

[0027] A first acquisition unit is used to acquire the video image to be rendered acquired by the image acquisition unit, where the video image to be rendered includes a target object;

[0028] A second acquisition unit, used to acquire three-dimensional model data corresponding to the target object, where the three-dimensional model data is used to describe a mapping relationship between a first key point in the three-dimensional model and a second key point of the target object;

[0029] The rendering unit is used to render the target object according to the mapping relationship and display the three-dimensional image corresponding to the target object.

[0030] A third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the electronic device, wherein the processor implements the steps of the video image rendering method provided in the first aspect when executing the computer program.

[0031] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the video image rendering method provided in the first aspect are implemented.

[0032] The implementation of a video image rendering method, a video image rendering device, an electronic device, and a computer-readable storage medium provided in the embodiments of the present application has the following beneficial effects:

[0033] A method for rendering a video image provided by an embodiment of the present application, when rendering a video image, obtains a video image to be rendered including a target object as the content to be rendered of a three-dimensional image. Since the video image to be rendered is a video image acquired by an image acquisition unit, and the video image to be rendered includes a target object, by acquiring the three-dimensional model data corresponding to the target object, and using the three-dimensional model data to describe the mapping relationship between the first key point in the three-dimensional model and the second key point of the target object, the target object can be rendered according to the mapping relationship, and then the three-dimensional image corresponding to the target object is displayed. That is, according to the mapping relationship described by the three-dimensional model data, the target object in the video image to be rendered is fused into the three-dimensional model. The above scheme provides a scheme for rendering a three-dimensional stereoscopic image using a two-dimensional video image, using the three-dimensional model data corresponding to the target object in the image to be rendered to describe the mapping relationship between the first key point in the three-dimensional model and the second key point of the target object, when the video image to be rendered containing the target object is acquired, the target object is rendered according to the above mapping relationship, and then the three-dimensional image corresponding to the target object is displayed. Since the three-dimensional model corresponding to the target object can proportionally restore the shape or form of the target object in the real world, using the three-dimensional model data to describe the mapping relationship between the key points in the three-dimensional model and the key points in the target object can truly and comprehensively restore the shape or form of the target object in three-dimensional space or stereoscopic space, so that the rendered three-dimensional image has a better presentation effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0035] Figure 1 is a flow chart of an implementation method of a video image rendering method provided in an embodiment of the present application;

[0036] Figure 2 is a flowchart of an implementation method of a video image rendering method provided by another embodiment of the present application;

[0037] Figure 3 is a schematic diagram of determining a target object from a sample image in an embodiment of the present application;

[0038] Figure 4 is a schematic diagram of an initial three-dimensional model in an embodiment of the present application;

[0039] Figure 5 It is a structural block diagram of a video image rendering device provided in an embodiment of the present application;

[0040] Figure 6 It is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0042] The present embodiment provides a method for rendering a video image, the execution subject is an electronic device, specifically an electronic device that can obtain the video image to be rendered acquired by the image acquisition unit, and render and display the video image to be rendered. The electronic device can obtain the video image to be rendered acquired by the image acquisition unit by wired or wireless means.

[0043] In practical applications, in order to meet the requirement of rendering the video image to be rendered into a three-dimensional image, some elements in the video image are usually extracted and image mapping is performed in a simple spatial plane. An object in the video image cannot be completely rendered in three dimensions, resulting in poor presentation effect.

[0044] Based on the above problems, the present embodiment provides a method for rendering a video image. When rendering a video image, a video image to be rendered including a target object is obtained as the content to be rendered of the three-dimensional image. Since the video image to be rendered is a video image acquired by the image acquisition unit, and the video image to be rendered includes the target object, the three-dimensional model data corresponding to the target object is obtained, and the mapping relationship between the first key point in the three-dimensional model and the second key point of the target object is described by the three-dimensional model data. The target object can be rendered according to the mapping relationship, and then the three-dimensional image corresponding to the target object is displayed. That is, according to the mapping relationship described by the three-dimensional model data, the target object in the video image to be rendered is fused into the three-dimensional model. The above scheme provides a scheme for rendering a three-dimensional stereo image using a two-dimensional video image, using the three-dimensional model data corresponding to the target object in the image to be rendered to describe the mapping relationship between the first key point in the three-dimensional model and the second key point of the target object. When the video image to be rendered containing the target object is obtained, the target object is rendered according to the above mapping relationship, and then the three-dimensional image corresponding to the target object is displayed. Since the three-dimensional model corresponding to the target object can proportionally restore the shape or form of the target object in the real world, using the three-dimensional model data to describe the mapping relationship between the key points in the three-dimensional model and the key points in the target object can truly and comprehensively restore the shape or form of the target object in three-dimensional space or stereoscopic space, so that the rendered three-dimensional image has a better presentation effect.

[0045] A video image rendering method provided by this embodiment is described in detail below through a specific implementation.

[0046] Figure 1 A flowchart of an implementation method of a video image rendering method provided in an embodiment of the present application is shown.

[0047] like Figure 1 As shown, the video image rendering method includes the following steps:

[0048] 110: Acquire a video image to be rendered that is acquired by an image acquisition unit, where the video image to be rendered includes a target object.

[0049] In 110, the electronic device can communicate with the image acquisition unit, and then can obtain the real-time video image acquired by the image acquisition unit, or can obtain the existing video image stored in the image acquisition unit. That is, the video image to be rendered can be the video image acquired by the image acquisition unit in real time, or can be a historical video image, etc., which is not limited here.

[0050] In all embodiments of the present application, the rendered video image is a two-dimensional image, that is, the target object in the image to be rendered is also the image content or image element in the two-dimensional image. Here, the target object generally refers to the inherent image content or image element in the video image, which is also the image content or image element to be rendered into a three-dimensional image.

[0051] In a specific implementation, the image acquisition unit can perform video image acquisition on a certain monitored area. Based on the acquired video images, corresponding image content or image elements can be selected or marked as target objects, and then a three-dimensional image rendering operation is performed on the target object each time the rendered image is rendered.

[0052] Exemplarily, in a specific implementation, based on the captured video image, corresponding image content or image elements can be selected or marked as target objects. Specifically, the user can set marking points in the captured video image, and the marking points form a marking area or a marking range, and then the image content or image elements within the range are used as target objects.

[0053] As another example, it is also possible to identify corresponding image content or image elements as target objects based on the collected video images by using methods such as feature extraction and feature recognition. That is, by using tools such as feature extraction and feature recognition, target objects are identified on the collected video images, for example, a certain inherent building or scenery is identified as the target object from the video images.

[0054] It is easy to understand that since the target object generally refers to the inherent image content or image elements in the video image, and is also the image content or image element that will be rendered as a three-dimensional image, after determining which content or elements in the video image are the target object, the target object can be included in the video image to be rendered that is subsequently acquired by the image acquisition unit of the electronic device.

[0055] 120: Acquire three-dimensional model data corresponding to the target object, where the three-dimensional model data is used to describe a mapping relationship between a first key point in the three-dimensional model and a second key point of the target object.

[0056] In step 120, the 3D model data is the data content of the 3D model of the target object, and the 3D model data describes the mapping relationship between the first key point in the 3D model and the second key point of the target object. Here, the target object comes from the video image to be rendered, and using the 3D model data to describe the key mapping relationship between the target object and the 3D model is equivalent to mapping the feature points in the 2D image of the target object to the feature points in the 3D image.

[0057] It should be noted that the video image to be rendered may include multiple target objects, and corresponding three-dimensional model data are configured for different target objects.

[0058] In the specific implementation, a corresponding three-dimensional model can be constructed in advance according to the target object to characterize the shape or form of the target object in three-dimensional space. Here, the three-dimensional model can also be understood as the visual three-dimensional space structure of the target object, that is, the visual stereoscopic structure of the target object. Since the three-dimensional model corresponding to the target object can restore the shape or form of the target object in the real world in proportion, there can be a one-to-one correspondence between the first key point in the three-dimensional model and the second key point in the target object, that is, the three-dimensional model data can be used to describe the mapping relationship between the first key single and the second key point.

[0059] In a specific implementation, a three-dimensional model of the target object can be constructed in advance, and the corresponding three-dimensional model data can be stored in a database of the electronic device. After each video image to be rendered is obtained, the target object in the video image to be rendered is identified, and the three-dimensional model data corresponding to the target object is obtained from the local database of the electronic device. Here, when the video image to be rendered contains multiple target objects, different types of target objects can be numbered, and the number is used as an index to obtain the three-dimensional model data corresponding to the index from the local database of the electronic device.

[0060] It is easy to understand that in an application scenario with multiple image acquisition units, when the position or angle monitored by each image acquisition unit remains unchanged, the content of the target object in the captured video image may also remain unchanged. On this basis, corresponding identifiers can also be configured for image acquisition units at different positions to distinguish three-dimensional model data by the identifier. For example, when the video image to be rendered captured by image acquisition unit A is obtained, the three-dimensional model data corresponding to the target object can be obtained according to the identifier A of the image acquisition unit. Here, the identifier A of the image acquisition unit can specifically be a unique identifier such as the IP address, MAC address, serial number, etc. of the image acquisition unit.

[0061] 130: Rendering the target object according to the mapping relationship, and displaying a three-dimensional image corresponding to the target object.

[0062] In 130, the three-dimensional image corresponding to the target object refers to the imaging of the target object in the three-dimensional space. The mapping relationship refers to the correspondence relationship between the key points of the target object in the video image to be rendered and the three-dimensional image.

[0063] In this embodiment, the target object is rendered according to the mapping relationship, specifically, the target object in the video image to be rendered is rendered into a three-dimensional image. In specific implementation, an existing renderer or rendering plug-in can be used to perform three-dimensional image rendering on the target object according to the mapping relationship, using the video image to be rendered acquired by the image acquisition unit as input, and then displaying the three-dimensional image corresponding to the target object.

[0064] As an embodiment, the above step 130 may specifically include:

[0065] The target object is rendered according to the mapping relationship through the rendering engine to display the three-dimensional image corresponding to the target object.

[0066] It should be noted that the rendering engine refers to the module responsible for rendering 3D images to the display module of the electronic device. In practical applications, different engines can be selected according to different needs. For example, Unity, Unreal engine, Cryengine, Ogre, Godot, V-Ray, Redshift, Octane Render, FStrorm and Corona Renderer.

[0067] In this embodiment, because the three-dimensional scene has many complex details and effects, such as accurate shadows, reflection and refraction effects, particle effects, etc., it is a difficult and complex task to correctly render it on the display module of the electronic device. Therefore, it is necessary to use the rendering engine to render the three-dimensional image in the three-dimensional scene as realistically as possible and display it on the two-dimensional display module.

[0068] It is easy to understand that, usually when rendering is performed through a rendering engine, the rendering engine needs to calculate the information on the three-dimensional object to determine how to project the three-dimensional imaging content onto the screen. However, in this embodiment, since the three-dimensional model data can be used to describe the mapping relationship between the first key point in the three-dimensional model and the second key point of the target object, after obtaining the video image to be rendered captured by the image acquisition unit, the target object in the video image to be rendered can be rendered into the three-dimensional model according to the above mapping relationship. Compared with the existing rendering method, the rendering engine does not need to calculate the projection information or projection parameters of the target object separately, which can further improve the rendering efficiency of the target object in the video image to be rendered.

[0069] In addition, if the video image to be rendered captured by the image acquisition unit is a real-time image, the target object in the real-time video image can be rendered in three dimensions, thereby more intuitively displaying real-world information, making it easier to deal with emergencies or emergencies, and facilitating quick response by monitoring personnel.

[0070] See also Figure 2 , Figure 2 is a flowchart of a method for rendering a video image provided by another embodiment of the present application. Figure 1 Compared with the corresponding embodiment, Figure 2 The video image rendering method shown in FIG. 1 further includes steps 210 to 230 before step 110. Figure 2 As shown, specifically:

[0071] 210: Acquire a sample image acquired by an image acquisition unit.

[0072] 220: In response to a selection operation triggered by the user on the sample image, determine a target object.

[0073] 230: Generate three-dimensional model data based on the target object.

[0074] In this embodiment, the sample image refers to a sample of the video image to be rendered, for the user to select or determine the target object. Here, the electronic device can obtain the sample image collected from the image acquisition unit and display it, and the user can select the object in the sample image in the interface of the electronic device displaying the sample image, and then determine the target object.

[0075] As a possible implementation method, in the interface of the electronic device displaying the sample object, an object recognition tool, such as an object feature recognition model, can be used to extract features of the image content or image elements in the sample image, and the elements in the sample image can be identified as corresponding candidate objects based on the extracted features. The user can select the candidate objects in the sample image to determine the target object.

[0076] For example, assuming that the sample image includes several buildings and streets, after extracting and identifying the image content or image elements in the sample image using the feature recognition model, buildings A, B, C and street D at different locations in the sample image can be identified as candidate objects. The user can determine the target object by triggering a selection operation on the candidate object in the sample image.

[0077] As an embodiment, step 220 may specifically include:

[0078] In response to a selection operation triggered by the user on the sample image, a second key point corresponding to the selection operation is displayed, and a target range calibrated by the second key point is generated in the sample image; the target range is used to indicate a target object.

[0079] In this embodiment, the second key point generally refers to the key point selected by the user in the sample image. Here, after the electronic device acquires the sample image, the sample image can be displayed for the user to perform the second key point selection operation. It can be understood that the second key point can include multiple, and the target range calibrated by the second key point refers to the maximum area range determined by the connecting line of the second key point in the sample image. That is, in the sample image, the image content surrounded by the second key point is the target object.

[0080] In a specific implementation, a plane coordinate axis may be established based on the sample image, and when the user selects a second key point from the sample image, the target range calibrated by the second key point may be determined based on the coordinate information of the second key point.

[0081] Figure 3 FIG. 2 shows a schematic diagram of determining a target object from a sample image in this embodiment. Figure 3 As shown, a plane coordinate axis corresponding to the sample image can be constructed. When the user selects multiple second key points (0, 1, 2, ... 7) in the sample image, the target range calibrated by the second key points can be generated in the sample image according to the coordinates of each second key point in the plane coordinate axis. That is, the target object can be calibrated from the sample image by connecting the second key points.

[0082] After the target object is determined, a three-dimensional model corresponding to the target object can be generated by performing a gridding process on the target range where the target object is located, or a three-dimensional model corresponding to the target object can be constructed by performing a triangulation process based on the second key point.

[0083] As an embodiment, step 230 may specifically include:

[0084] A triangulation process is performed based on the second key point corresponding to the selection operation to obtain an initial three-dimensional model; in response to the user's surface optimization operation on the initial three-dimensional model, a three-dimensional model corresponding to the target object is generated.

[0085] In this embodiment, triangulation processing refers to determining a plane based on the second key point corresponding to the selection operation with every three adjacent or similar second key points, that is, constructing a three-dimensional space shape based on the selected second key points.

[0086] It should be noted that, since the sample image is acquired by the image acquisition unit, and after the user selects the second key point from the sample image, the depth information of each second key point in the depth field can be determined based on the depth data of each pixel point in the sample image. Based on this, when performing triangulation processing based on the second key point corresponding to the selection operation, the depth information of each second key point can be taken into account. Here, since each second key point carries not only coordinate information but also depth information, that is, the coordinates of each second key point are three-dimensional coordinates, the shape structure of the three-dimensional space can be obtained by triangulating the second key point corresponding to the selection operation, that is, the initial three-dimensional model. Because surface structures that do not correspond to the shape of the target object may appear in the initial three-dimensional model, the user needs to optimize the surface of the initial three-dimensional model.

[0087] Figure 4 FIG. 2 shows a schematic diagram of the initial three-dimensional model in this embodiment. Figure 4 The solid line is Figure 3 In order to understand the initial 3D model obtained after triangulation, Figure 4 In the figure, a dotted line is added as the supplementary line after triangulation. That is, every three second key points can form a plane. The number combination of the second key points can be used as the index of the plane. For example, the second key point 0, the second key point 1 and the second key point 2 can be triangulated to obtain plane 012, the second key point 0, the second key point 2 and the second key point 7 can be triangulated to obtain plane 027, and so on. Figure 4 Eight planes can be constructed, each of which serves as the surface structure of the initial three-dimensional model.

[0088] In a specific implementation, in response to the user's surface optimization operation on the initial three-dimensional model, the surface selected by the user may be removed from the initial three-dimensional model. Figure 4 In the figure, since the plane 123 obtained by triangulating the second key point 1, the second key point 2, and the second key point 3 is not within the target range of the target object, the user can manually remove the surface 123. Similarly, the plane 456 obtained by triangulating the second key point 4, the second key point 5, and the second key point 6 is also not within the target range of the target object, so the user can manually remove the surface 456.

[0089] It is easy to understand that in other embodiments, other methods can be used to optimize the initial three-dimensional model. Figure 4Taking the eight planes constructed in as an example, the infill lines added to the constructed planes can be sampled to determine whether the infill lines are within the target range calibrated by the second key point. For example, the infill lines between the second key point 1 and the second key point 3, and the infill lines between the second key point 4 and the second key point 6, can be determined through point sampling that point P1 and point P2 are not within the target range, that is, both infill lines are not within the target range. Therefore, it can be determined that plane 123 and plane 456, respectively determined by the two infill lines, belong to the optimized planes. Therefore, plane 123 and plane 456 can be eliminated to obtain the final three-dimensional model.

[0090] It is easy to understand that since the three-dimensional coordinate information of each second key point in the three-dimensional model is obtained based on the target object in the sample image, each second key point also corresponds to the key point of the target object in the sample image. Therefore, the coordinate data of each second key point in the three-dimensional model can represent both the second key point in the three-dimensional model and the first key point of the target object.

[0091] In this embodiment, by acquiring the sample image acquired by the image acquisition unit, the user can select the sample image, thereby determining the target object of interest to the user, and finally generating the 3D model data based on the target object. When it is necessary to render the video image to be rendered acquired by the image acquisition unit, step 110 can be executed to acquire the video image to be rendered, and step 120 can be executed to acquire the 3D model data corresponding to the target object.

[0092] As an embodiment, the three-dimensional model data includes index information of each surface in the three-dimensional model corresponding to the target object, and the index information includes an index field uniquely corresponding to the first key point. After step 120, the following steps are also included.

[0093] Step 1: Determine the surface of the 3D model according to the index information in the 3D model data.

[0094] Step 2: Determine the first key point of each surface based on the surface index information.

[0095] In this embodiment, the index information in the three-dimensional model data is used to determine the corresponding surface from the three-dimensional model corresponding to the target object. The index information of the surface is a combination of index information constituting the first key point of the surface, so the first key point can be determined according to the index information of the surface.

[0096] It is easy to understand that because the coordinate information of the first key point is three-dimensional coordinate information, the index information can be the number of the first key point, so compared with the coordinate information of the first key point, the index information is more concise in content when indicating the surface.

[0097] Based on the above embodiment, as an embodiment, the above step 130 may specifically include:

[0098] According to the mapping relationship between the first key point of each surface and the second key point of the target object, the target object is rendered to display a three-dimensional image corresponding to the target object.

[0099] In this embodiment, according to the mapping relationship between the first key point of each surface and the second key point of the target object, the content that needs to be rendered for each surface can be determined from the video image to be rendered. Based on this, the target object is rendered, and the rendered three-dimensional image shape can be more consistent with the actual shape of the target object, resulting in a better presentation effect.

[0100] See also Figure 5 , Figure 5 1 is a structural block diagram of a video image rendering device provided in an embodiment of the present application. In this embodiment, the video image rendering device includes various units for executing Figure 1 to Figure 2 For details, please refer to the steps in the corresponding embodiment. Figure 1 to Figure 2 ,as well as Figure 1 to Figure 2 For the convenience of explanation, only the parts related to this embodiment are shown. Figure 6 , a video image rendering device includes: a first acquisition unit 301, a second acquisition unit 302 and a rendering unit 303.

[0101] The first acquisition unit 301 is used to acquire the video image to be rendered acquired by the image acquisition unit, where the video image to be rendered includes a target object.

[0102] The second acquisition unit 302 is used to acquire three-dimensional model data corresponding to the target object, where the three-dimensional model data is used to describe a mapping relationship between a first key point in the three-dimensional model and a second key point of the target object.

[0103] The rendering unit 303 is used to render the target object according to the mapping relationship and display a three-dimensional image corresponding to the target object.

[0104] As an embodiment, the video image rendering device further includes:

[0105] The third acquisition unit is used to acquire the sample image acquired by the image acquisition unit.

[0106] The determination unit is used to determine the target object in response to a selection operation triggered by the user on the sample image.

[0107] The model generating unit is used to generate three-dimensional model data based on the target object.

[0108] It should be understood that the video image rendering device provided in this embodiment has each unit configured to execute Figure 1 to Figure 2 The steps in the corresponding embodiments, and for Figure 1 to Figure 2 Each step in the corresponding embodiment has been explained in detail in the above embodiment. Figure 1 to Figure 2 ,as well as Figure 1 to Figure 2 The relevant descriptions in the corresponding embodiments are not repeated here.

[0109] Figure 6 is a structural block diagram of an electronic device provided in an embodiment of the present application. Figure 6 As shown, the electronic device 5 of this embodiment includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50, such as a program of a video image rendering method. When the processor 50 executes the computer program 52, the steps of each embodiment of the above-mentioned video image rendering method are implemented, such as Figure 1 to Figure 2 Alternatively, the processor 50 implements the above steps when executing the computer program 52 Figure 5 The functions of each unit in the corresponding embodiment. Please refer to Figure 5 The relevant descriptions in the corresponding embodiments are not repeated here.

[0110] Exemplarily, the computer program 52 may be divided into one or more units, which are stored in the memory 51 and executed by the processor 50 to complete the present application. The one or more units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 52 in the electronic device 5. For example, the computer program 52 may be divided into a first acquisition unit, a second acquisition unit, and a rendering unit, and the specific functions of each unit are as described above.

[0111] The electronic device may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will appreciate that Figure 6 It is only an example of the electronic device 5 and does not constitute a limitation of the electronic device 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0112] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0113] The memory 51 may be an internal storage unit of the electronic device 5, such as a hard disk or memory of the electronic device 5. The memory 51 may also be an external storage device of the electronic device 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 5. Further, the memory 51 may also include both an internal storage unit of the electronic device 5 and an external storage device. The memory 51 is used to store the computer program and other programs and data required by the electronic device. The memory 51 may also be used to temporarily store data that has been output or is to be output.

[0114] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for rendering a video image, characterized in that: include: Acquire a video image to be rendered acquired by an image acquisition unit, wherein the video image to be rendered includes a target object; the video image to be rendered is acquired by the image acquisition unit; According to the identification of the image acquisition unit, three-dimensional model data corresponding to the target object is acquired, wherein the three-dimensional model data is used to describe a mapping relationship between a first key point in the three-dimensional model and a second key point of the target object; wherein the three-dimensional model is used to characterize the form or shape of the target object in three-dimensional space; and the target range calibrated by the second key point is the target object; According to the mapping relationship, the target object is rendered to display a three-dimensional image corresponding to the target object; wherein the three-dimensional image refers to the imaging of the target object in a three-dimensional space.

2. The method according to claim 1, characterized in that Rendering the target object according to the mapping relationship to display a three-dimensional image corresponding to the target object includes: The target object is rendered according to the mapping relationship through a rendering engine to display a three-dimensional image corresponding to the target object.

3. The method according to claim 1, characterized in that The three-dimensional model data includes index information of each surface in the three-dimensional model corresponding to the target object, and the index information includes an index field uniquely corresponding to the first key point.

4. The method according to claim 3, characterized in that After the step of acquiring the three-dimensional model data corresponding to the target object, the method further includes: Determine the surface of the three-dimensional model according to the index information in the three-dimensional model data; Determine a first key point of each of the surfaces according to the index information of the surfaces; The rendering of the target object according to the mapping relationship to display a three-dimensional image corresponding to the target object includes: According to the mapping relationship between the first key point of each surface and the second key point of the target object, the target object is rendered to display a three-dimensional image corresponding to the target object.

5. The method according to claim 1, characterized in that The method further comprises: Acquiring a sample image acquired by the image acquisition unit; In response to a selection operation triggered by a user on the sample image, determining a target object; Three-dimensional model data is generated based on the target object.

6. The method according to claim 5, characterized in that The step of determining the target object in response to a selection operation triggered by the user on the sample image includes: In response to a selection operation triggered by the user on the sample image, a second key point corresponding to the selection operation is displayed, and a target range calibrated by the second key point is generated in the sample image; the target range is used to indicate the target object.

7. The method according to claim 6, characterized in that The generating three-dimensional model data based on the target object comprises: Performing triangulation processing based on the second key point corresponding to the selection operation to obtain an initial three-dimensional model; In response to the user's surface optimization operation on the initial three-dimensional model, a three-dimensional model corresponding to the target object is generated.

8. A video image rendering device, characterized in that: include: A first acquisition unit is used to acquire the video image to be rendered acquired by the image acquisition unit, wherein the video image to be rendered includes a target object; the video image to be rendered is acquired by the image acquisition unit; a second acquisition unit, configured to acquire three-dimensional model data corresponding to the target object according to the identification of the image acquisition unit, wherein the three-dimensional model data is used to describe a mapping relationship between a first key point in the three-dimensional model and a second key point of the target object; wherein the three-dimensional model is used to characterize the form or shape of the target object in three-dimensional space; and the target range calibrated by the second key point is the target object; A rendering unit is used to render the target object according to the mapping relationship to display a three-dimensional image corresponding to the target object; wherein the three-dimensional image refers to the imaging of the target object in a three-dimensional space.

9. An electronic device, characterized in that: The electronic device comprises: a memory, a processor, and a computer program stored in the memory and executable on the electronic device, wherein the processor implements the steps of the method for rendering a video image as claimed in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for rendering a video image according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Representation and diawing method of three-D target and method for imaging movable three-D target

    CN1395222A