A method and system for rendering and displaying products

Through camera continuous shooting and pose reconstruction technology, the rendering target point is calculated, 3D image rendering and correction are performed, which solves the image distortion and high cost problems in the existing 3D display technology, and realizes high-quality, low-threshold 3D display of goods. .

CN118552705BActive Publication Date: 2024-10-01HANGZHOU YILAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411023362.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-10-01
Estimated Expiration
2044-07-29

AI Technical Summary

Technical Problem

Existing 3D product display technology has image distortion problems, high cost and high technical threshold, and cannot achieve lightweight and convenient adaptive promotion.

Method used

The camera continuously shoots the product, reconstructs the camera pose parameters, calculates the rendering target point position, determines the camera external parameter matrix, performs 3D image rendering and rigid correction, and achieves distortion-free 3D product display.

Benefits of technology

It reduces the cost and threshold of 3D display, improves the quality and effect of rendered images, and realizes lightweight and convenient 3D display of goods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552705B_ABST
    Figure CN118552705B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image display technology, and discloses a method and system for rendering and displaying goods, the method comprising: using a camera to continuously shoot goods to obtain photographed pictures; reconstructing the camera posture of the camera to obtain camera posture parameters; determining the camera shooting point position according to the camera posture parameters; calculating the rendering target point position based on the camera shooting point position to obtain the camera rendering target point position; performing 3D image rendering on the camera rendering target point position to obtain a rendered picture; determining the camera extrinsic parameter matrix according to the camera shooting point position and the camera rendering target point position, and based on the camera extrinsic parameter matrix, rigidly correcting the shot picture with the rendering picture as the center to obtain a 3D goods display picture. The present invention can directly obtain the goods image based on the camera, and perform point correction movement based on the camera posture to obtain a continuous and distortion-free image for 3D display of the goods, thereby realizing a lightweight and convenient 3D display of the goods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image display technology, and in particular to a commodity rendering and display method and system. Background Art

[0002] With the development of mobile devices, consumers will have the need to browse the products they want to buy through mobile devices. However, e-commerce platforms such as Taobao and Tmall mostly display products in the form of 2D pictures. This form of display cannot show more product details and cannot provide users with a three-dimensional visual effect. In order to solve this problem, various e-commerce platforms or merchants have begun to use 3D images to display products. However, the existing 3D image display is generally based on artificially modeled 3D models, such as the product display method, device and mobile device disclosed in Chinese patent CN201710641661.6.

[0003] Although the 3D model images obtained by 3D modeling can be displayed in three dimensions, 3D model images generally have image distortion, which affects the quality and effect of the product image and will have a great impact on consumers' click or purchase behavior. In addition, the cost and technical threshold are too high, requiring professional 3D modeling personnel to implement and cannot be adaptively promoted. Summary of the invention

[0004] The embodiments of the present invention provide a commodity rendering and display method and system to solve the above-mentioned technical problems in the prior art.

[0005] In order to have a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not a general review, nor is it intended to identify key / important components or to describe the scope of protection of these embodiments. Its only purpose is to present some concepts in a simple form as a prelude to the detailed description that follows.

[0006] According to a first aspect of an embodiment of the present invention, a commodity rendering and display method is provided.

[0007] In one embodiment, the commodity rendering and display method includes:

[0008] Use the camera to continuously shoot the product to get 360-degree pictures;

[0009] Reconstructing the camera posture of the camera to obtain camera posture parameters; and determining the camera shooting point position according to the camera posture parameters;

[0010] Calculate the rendering target point based on the camera shooting point position to obtain the camera rendering target point position; and render the camera rendering target point position in 3D to obtain a rendered image;

[0011] According to the camera shooting point position and the camera rendering target point position, a camera extrinsic parameter matrix is ​​determined, and based on the camera extrinsic parameter matrix, the shot picture is rigidly corrected with the rendered picture as the center to obtain a 3D product display picture.

[0012] In one embodiment, reconstructing the camera pose to obtain the camera pose parameters includes:

[0013] Reconstructing the initial camera pose of the camera using the arkit tool to obtain initial camera pose parameters;

[0014] Based on the initial camera pose parameters, colmap is used to estimate the camera pose to obtain final camera pose parameters.

[0015] In one embodiment, the calculation of the rendering target point position is performed based on the camera shooting point position to obtain the camera rendering target point position, which includes:

[0016] Connect each camera shooting point with the center point of the product object to obtain the corresponding point connection line;

[0017] Calculate the angle between each point connection line and the Y axis of the coordinate, and find the average of the angles. Use the average angle as the angle between the camera rendering target point and the Y axis of the coordinate to obtain the Y axis angle of the target point.

[0018] Calculate the distance between each camera shooting point and the center point of the commodity object, and calculate the average distance. Use the average distance as the distance between the camera rendering target point and the center point of the commodity object to obtain the target point distance.

[0019] Project each point connection line onto the coordinate XZ plane, and calculate the angle between the projection and the X-axis to obtain the X-axis angle of the target point;

[0020] Based on the Y-axis angle of the target point, the distance of the target point and the X-axis angle of the target point, the pixel coordinates of the camera-rendered target point are calculated to obtain the position of the camera-rendered target point.

[0021] In one embodiment, based on the camera extrinsic matrix and centered on the rendered image, performing rigid correction on the captured image includes:

[0022] Based on the camera extrinsic matrix, project the Y axis of the camera rendering target point onto the captured image, calculate the angle between the projection and the Y axis of the captured image, and rotate the captured image by the angle;

[0023] Based on the camera extrinsic parameter matrix, the center point position of the center point of the commodity object on the captured image is calculated, and based on the center point position, the captured image is translated so that the center point of the captured image coincides with the center point position.

[0024] In one embodiment, the commodity rendering and display method further includes:

[0025] After performing rigid correction on the photographed image, obtaining contour points of the rendered image and contour points of the photographed image;

[0026] The contour points of the captured image are matched with the contour points of the rendered image, and after the corresponding relationship is matched, the contour points of the captured image are moved based on the corresponding relationship to align the contour points of the captured image with the contour points of the rendered image.

[0027] According to a second aspect of an embodiment of the present invention, a commodity rendering and display system is provided.

[0028] In one embodiment, the product rendering and display system includes:

[0029] The picture acquisition module is used to continuously shoot the product with a camera to obtain 360-degree pictures;

[0030] A posture processing module is used to reconstruct the camera posture of the camera to obtain camera posture parameters; and determine the camera shooting point position according to the camera posture parameters;

[0031] A target rendering module is used to calculate the rendering target point based on the camera shooting point position to obtain the camera rendering target point position; and perform 3D image rendering on the camera rendering target point position to obtain a rendered image;

[0032] The correction acquisition module is used to determine the camera extrinsic parameter matrix according to the camera shooting point position and the camera rendering target point position, and based on the camera extrinsic parameter matrix, perform rigid correction on the shot picture with the rendered picture as the center to obtain a 3D product display picture.

[0033] In one embodiment, when the posture processing module reconstructs the camera posture and obtains the camera posture parameters, it uses the arkit tool to reconstruct the initial camera posture of the camera to obtain the initial camera posture parameters; based on the initial camera posture parameters, it uses colmap to estimate the posture of the camera to obtain the final camera posture parameters.

[0034] In one embodiment, the target rendering module includes: a point connection submodule, a Y-axis angle calculation submodule, a distance calculation submodule, an X-axis angle calculation submodule and a target coordinate determination submodule, wherein:

[0035] The point connection submodule is used to connect each camera shooting point with the center point of the commodity object to obtain the corresponding point connection line;

[0036] The Y-axis angle calculation submodule is used to calculate the angle between each point connection line and the coordinate Y-axis, and obtain the average of the angles, and use the average of the angles as the angle between the camera rendering target point and the coordinate Y-axis to obtain the target point Y-axis angle;

[0037] The point distance calculation submodule is used to calculate the distance between each camera shooting point and the center point of the commodity object, and to obtain the average distance, and use the average distance as the distance between the camera rendering target point and the center point of the commodity object to obtain the target point distance;

[0038] The X-axis angle calculation submodule is used to project the connecting line of each point onto the coordinate XZ plane, and calculate the angle between the projection and the X-axis to obtain the X-axis angle of the target point;

[0039] The target coordinate determination submodule is used to calculate the pixel coordinates of the camera-rendered target point based on the Y-axis angle of the target point, the target point distance and the X-axis angle of the target point, so as to obtain the position of the camera-rendered target point.

[0040] In one embodiment, the correction acquisition module includes: a picture rigid correction submodule, which is used to perform rigid correction on the captured picture based on the camera extrinsic parameter matrix and with the rendered picture as the center, and when performing rigid correction on the captured picture based on the camera extrinsic parameter matrix and with the rendered picture as the center, based on the camera extrinsic parameter matrix, the Y axis of the camera rendering target point is projected onto the captured picture, the angle between the projection and the Y axis of the captured picture is calculated, and the captured picture is rotated at the angle; based on the camera extrinsic parameter matrix, the center point position of the center point of the commodity object on the captured picture is calculated, and the captured picture is translated based on the center point position to cause the center point of the captured picture to coincide with the center point position.

[0041] In one embodiment, the correction acquisition module also includes: a contour point trimming submodule, which is used to obtain the contour points of the rendered image and the contour points of the captured image after rigid correction of the captured image; the contour points of the captured image and the contour points of the rendered image are matched accordingly, and after the corresponding relationship is matched, the contour points of the captured image are moved based on the corresponding relationship to align the contour points of the captured image with the contour points of the rendered image.

[0042] According to a third aspect of an embodiment of the present invention, a computer device is provided.

[0043] In some embodiments, the computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0044] According to a fourth aspect of embodiments of the present invention, a computer-readable storage medium is provided.

[0045] In one embodiment, the computer-readable storage medium stores a computer program, and the computer program implements the steps of the above method when executed by a processor.

[0046] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:

[0047] The present invention can directly acquire product images based on the camera, and perform point correction movement based on the camera posture to obtain continuous and distortion-free images for 3D display of products, thereby realizing lightweight and convenient 3D display of products, avoiding the trouble of traditional technologies that require professional 3D modeling personnel to achieve 3D display, and reducing the threshold and cost of 3D display of products.

[0048] In addition, the present invention calculates the rendering target point through the shooting point of the camera, so that the rendering target point is as close as possible to the shooting point, and through the matching processing of the contour points, the rendering viewpoint has continuity, which effectively improves the image quality and effect of the later rendered 3D display pictures.

[0049] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0051] Figure 1 is a flowchart of a method for rendering and displaying a product according to an exemplary embodiment;

[0052] Figure 2 is a structural block diagram of a commodity rendering and display system according to an exemplary embodiment;

[0053] Figure 3 The figure is a schematic diagram showing the structure of a computer device according to an exemplary embodiment. DETAILED DESCRIPTION

[0054] The following description and accompanying drawings fully illustrate the specific embodiments of this article so that those skilled in the art can practice them. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. The scope of the embodiments of this article includes the entire scope of the claims, as well as all available equivalents of the claims. Herein, the terms "first", "second", etc. are only used to distinguish one element from another, without requiring or implying any actual relationship or order between these elements. In fact, the first element can also be called the second element, and vice versa. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the structure, device or equipment including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also include elements inherent to such structure, device or equipment. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the structure, device or equipment including the elements. Each embodiment is described in a progressive manner herein, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can be referred to each other.

[0055] The terms "longitudinal", "lateral", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc. in this document indicate the orientation or position relationship based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing this document and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In the description of this document, unless otherwise specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a mechanical connection or an electrical connection, it can also be the internal communication of two elements, it can be a direct connection, or it can be an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0056] As used herein, the term "plurality" means two or more than two, unless otherwise specified.

[0057] In this document, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B means: A or B.

[0058] In this article, the term "and / or" is a description of the association relationship between objects, indicating that three relationships may exist. For example, A and / or B means: A or B, or, A and B.

[0059] It should be understood that, although the various steps in the flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0060] Each module in the device or system of the present application can be implemented in whole or in part by software, hardware, or a combination thereof. The above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to the above modules.

[0061] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0062] Figure 1 An embodiment of a commodity rendering and display method of the present invention is shown.

[0063] In this optional embodiment, the commodity rendering and display method includes:

[0064] Step S101, using a camera to continuously photograph the product to obtain 360-degree photographs;

[0065] Step S103, reconstructing the camera posture of the camera to obtain camera posture parameters; and determining the camera shooting point position according to the camera posture parameters;

[0066] Step S105, performing rendering target point calculation based on the camera shooting point position to obtain the camera rendering target point position; and performing 3D image rendering on the camera rendering target point position to obtain a rendered image;

[0067] Step S107, determining a camera extrinsic parameter matrix according to the camera shooting point position and the camera rendering target point position, and based on the camera extrinsic parameter matrix, performing rigid correction on the shot image with the rendered image as the center to obtain a 3D product display image.

[0068] Figure 2 An embodiment of a commodity rendering and display system of the present invention is shown.

[0069] In this optional embodiment, the commodity rendering and display system includes:

[0070] The picture acquisition module 201 is used to continuously shoot the product using a camera to obtain 360-degree pictures;

[0071] A posture processing module 203 is used to reconstruct the camera posture of the camera to obtain camera posture parameters; and determine the camera shooting point position according to the camera posture parameters;

[0072] The target rendering module 205 is used to calculate the rendering target point based on the camera shooting point position to obtain the camera rendering target point position; and perform 3D image rendering on the camera rendering target point position to obtain a rendered image;

[0073] The correction acquisition module 207 is used to determine the camera extrinsic parameter matrix according to the camera shooting point position and the camera rendering target point position, and based on the camera extrinsic parameter matrix, perform rigid correction on the shot picture with the rendering picture as the center to obtain a 3D product display picture.

[0074] In specific applications, when reconstructing the camera pose and obtaining the camera pose parameters, the arkit tool can be used to first reconstruct the initial camera pose of the camera to obtain the initial camera pose parameters; then based on the initial camera pose parameters, colmap is used to estimate the pose of the camera to obtain the final camera pose parameters.

[0075] When the rendering target point is calculated based on the camera shooting point position to obtain the camera rendering target point position, each camera shooting point can be connected to the center point of the commodity object to obtain the corresponding point connection line; and the angle between each point connection line and the coordinate Y axis is calculated, and the average of the angles is obtained, and the average of the angles is used as the angle between the camera rendering target point and the coordinate Y axis to obtain the target point Y axis angle phi; secondly, the distance between each camera shooting point and the center point of the commodity object is calculated, and the average of the distances is obtained, and the average of the distances is used as the distance between the camera rendering target point and the center point of the commodity object to obtain the target point distance r; then, each point connection line is projected to the coordinate XZ plane, and the angle between the projection and the X axis is calculated to obtain the target point X axis angle theta; finally. Based on the target point Y axis angle phi, the target point distance r and the target point X axis angle theta, the pixel coordinates of the camera rendering target point are calculated to obtain the position of the camera rendering target point.

[0076] Correspondingly, in the system, the target rendering module 205 includes: a point connection submodule (not shown in the figure), a Y-axis angle calculation submodule (not shown in the figure), a distance calculation submodule (not shown in the figure), an X-axis angle calculation submodule (not shown in the figure) and a target coordinate determination submodule (not shown in the figure).

[0077] Among them, the point connection submodule is used to connect each camera shooting point with the center point of the commodity object respectively to obtain the corresponding point connection line; the Y-axis angle calculation submodule is used to calculate the angle between each point connection line and the coordinate Y-axis, and obtain the average value of the angle, and use the average value of the angle as the angle between the camera rendering target point and the coordinate Y-axis to obtain the Y-axis angle of the target point; the point distance calculation submodule is used to calculate the distance between each camera shooting point and the center point of the commodity object, and obtain the average value of the distance, and use the average value of the distance as the distance between the camera rendering target point and the center point of the commodity object to obtain the target point distance; the X-axis angle calculation submodule is used to project each point connection line to the coordinate XZ plane, and calculate the angle between the projection and the X-axis to obtain the X-axis angle of the target point; the target coordinate determination submodule is used to calculate the pixel coordinates of the camera rendering target point based on the target point Y-axis angle, the target point distance and the target point X-axis angle to obtain the position of the camera rendering target point.

[0078] When actually calculating the pixel coordinates of the target point rendered by the camera, the Y-axis angle phi of the target point is written as , the target point X-axis angle theta is written as , the corresponding calculation formula is:

[0079]

[0080] In the formula, Indicates the camera rendering target point Axis pixel coordinates, Indicates the camera rendering target point Axis pixel coordinates, Indicates the camera rendering target point Axis pixel coordinates; Indicates the camera rendering target point position.

[0081] In addition, when the camera extrinsic matrix is ​​determined according to the camera shooting point position and the camera rendering target point position, the rotation matrix can be determined according to the center of the object toward which the camera is facing, and then the camera extrinsic matrix is ​​determined according to the rotation matrix.

[0082] The rotation matrix formula is:

[0083]

[0084] In the formula, norm represents vector normalization, cross represents vector cross product, center represents the center point of the object, and pos represents the camera rendering target point. is a vector of length 3, which can be obtained by equations (3), (4), and (5) respectively.

[0085] Among them, the camera extrinsic matrix is:

[0086]

[0087] In the formula, refers to the camera extrinsic matrix, is a vector of length 3, indicates the 0th, 1st, and 2nd values ​​of the ^x vector. represents the 0th, 1st, and 2nd values ​​of the ^y vector, Represents the 0th, 1st, and 2nd values ​​of the ^z vector, and pos is the coordinate of the camera rendering target point.

[0088] In addition, in actual application, when the captured image is rigidly corrected based on the camera extrinsic parameter matrix and with the rendered image as the center, the Y axis of the camera rendering target point can be projected onto the captured image based on the camera extrinsic parameter matrix, the angle between the projection and the Y axis of the captured image is calculated, and the captured image is rotated at the angle; and based on the camera extrinsic parameter matrix, the center point position of the center point of the commodity object on the captured image is calculated, and the captured image is translated based on the center point position to ensure that the center point of the captured image coincides with the center point position.

[0089] Correspondingly, in the system, the correction acquisition module 207 includes: a picture rigid correction submodule (not shown in the figure), the picture rigid correction submodule is used to perform rigid correction on the captured picture based on the camera extrinsic parameter matrix and with the rendered picture as the center, and when the captured picture is rigidly corrected based on the camera extrinsic parameter matrix and with the rendered picture as the center, based on the camera extrinsic parameter matrix, the Y axis of the camera rendering target point is projected onto the captured picture, the angle between the projection and the Y axis of the captured picture is calculated, and the captured picture is rotated at the angle; based on the camera extrinsic parameter matrix, the center point position of the center point of the commodity object on the captured picture is calculated, and the captured picture is translated based on the center point position, so that the center point of the captured picture coincides with the center point position,

[0090] Among them, when performing projection, the projection formula can be:

[0091]

[0092] Where K is the camera's intrinsic matrix, which is known. M is the camera's extrinsic matrix, which is obtained by (6). ^y is the Y-axis orientation of the rendering target point, which is obtained by (5). It is a vector of length 4 obtained, indicating the projection position of the Y axis.

[0093] Among them, when calculating the projection position, the calculation formula is:

[0094]

[0095] In the formula, posY represents a vector of length 2. The value obtained in formula (7) is The normalized value represents the actual pixel position; Represents the projection position of the center point of the object, which is a vector of length 4. The projection method is the same as Consistent; pos is the coordinate of the camera rendering target point.

[0096] Among them, the calculation formula of the pixel coordinates of the final projection position is:

[0097]

[0098] In the formula, posC represents a vector of length 2. The value obtained in formula (9) is The normalized value represents the actual pixel position; Refers to a vector of length 2; norm stands for vector normalization.

[0099] The angle calculation formula is:

[0100]

[0101] In the formula, refers to the angle between the projection and the Y axis of the captured image; arccos represents the inverse cosine function; dot represents the vector dot product; [0,1] is a vector of length 2; the first value is 0, and the second value is 1; vector is the vector of length 2 required in formula (11).

[0102] When the picture is shifted, the calculation formula of the shift distance can be:

[0103]

[0104] In the formula, Indicates that the picture was taken at x The translation distance on the axis; Indicates that the picture was taken at y The translation distance on the axis; w Indicates the width of the captured picture; h Indicates the height at which the picture was taken.

[0105] In addition, after the above process is completed, the rendered image at the target point is roughly aligned with the photographed image, but there is still jitter. Therefore, the rendered image can be further aligned with the photographed image. Then the product rendering and display method also includes: after rigid correction of the photographed image, obtaining the contour points of the rendered image and the contour points of the photographed image; correspondingly matching the contour points of the photographed image and the contour points of the rendered image, and after matching the corresponding relationship, moving the contour points of the photographed image based on the corresponding relationship to align the contour points of the photographed image with the contour points of the rendered image.

[0106] Correspondingly, in the system, the correction acquisition module 207 also includes: a contour point trimming submodule (not shown in the figure), which is used to obtain the contour points of the rendered image and the contour points of the captured image after rigid correction of the captured image; the contour points of the captured image and the contour points of the rendered image are matched accordingly, and after the corresponding relationship is matched, the contour points of the captured image are moved based on the corresponding relationship to align the contour points of the captured image with the contour points of the rendered image.

[0107] When a specific contour point moves, a loss function can be used to iteratively optimize the projection matrix. Specifically, the loss function can be:

[0108]

[0109] In the formula, and Represent the contour points of the rendered image and the contour points of the captured image respectively; It means finding a projection matrix p such that (indicates the distance between the contour points of the rendered image and the contour points of the captured image) is the smallest.

[0110] Figure 3 An embodiment of a computer device of the present invention is shown. The computer device may be a server, and the computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store static information and dynamic information data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the steps in the above method embodiment are implemented.

[0111] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0112] In addition, the present invention also provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiment when executing the computer program.

[0113] In addition, the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiment are implemented.

[0114] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0115] The present invention is not limited to the structures which have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A method for rendering and displaying a product, characterized in that: include: Use the camera to continuously shoot the product to get 360-degree pictures; Reconstructing the camera pose of the camera to obtain camera pose parameters; And according to the camera posture parameters, determine the camera shooting point position; Calculate the rendering target point based on the camera shooting point position to obtain the camera rendering target point position; and render the camera rendering target point position in 3D to obtain a rendered image; Determine a camera extrinsic parameter matrix according to the camera shooting point position and the camera rendering target point position, and based on the camera extrinsic parameter matrix, perform rigid correction on the shot picture with the rendered picture as the center to obtain a 3D product display picture; The calculation of the rendering target point position is performed based on the camera shooting point position to obtain the camera rendering target point position, which includes: Connect each camera shooting point with the center point of the product object to obtain the corresponding point connection line; Calculate the angle between each point connection line and the Y axis of the coordinate, and find the average of the angles. Use the average angle as the angle between the camera rendering target point and the Y axis of the coordinate to obtain the Y axis angle of the target point. Calculate the distance between each camera shooting point and the center point of the commodity object, and calculate the average distance. Use the average distance as the distance between the camera rendering target point and the center point of the commodity object to obtain the target point distance. Project each point connection line onto the coordinate XZ plane, and calculate the angle between the projection and the X-axis to obtain the X-axis angle of the target point; Based on the Y-axis angle of the target point, the distance of the target point and the X-axis angle of the target point, the pixel coordinates of the target point rendered by the camera are calculated to obtain the position of the target point rendered by the camera; When determining the camera extrinsic matrix according to the camera shooting point position and the camera rendering target point position, determining the rotation matrix according to the camera facing the center of the object, and then determining the camera extrinsic matrix according to the rotation matrix; The rotation matrix formula is: ; In the formula, norm represents vector normalization, cross represents vector cross product, center represents the center point of the object, and pos represents the camera rendering target point. is a vector of length 3, which can be obtained by equations (3), (4), and (5) respectively. Among them, the camera extrinsic matrix is: ; In the formula, refers to the camera extrinsic matrix, is a vector of length 3, represents the 0th, 1st, and 2nd values ​​of the ^x vector, represents the 0th, 1st, and 2nd values ​​of the ^y vector, Represents the 0th, 1st, and 2nd values ​​of the ^z vector, and pos is the coordinate of the camera rendering target point; Wherein, based on the camera extrinsic matrix and with the rendered image as the center, performing rigid correction on the captured image includes: Based on the camera extrinsic matrix, project the Y axis of the camera rendering target point onto the captured image, calculate the angle between the projection and the Y axis of the captured image, and rotate the captured image by the angle; Based on the camera extrinsic parameter matrix, the center point position of the center point of the commodity object on the captured image is calculated, and based on the center point position, the captured image is translated so that the center point of the captured image coincides with the center point position.

2. The commodity rendering and display method according to claim 1, characterized in that: The camera posture is reconstructed for the camera, and the obtained camera posture parameters include: Reconstructing the initial camera pose of the camera using the arkit tool to obtain initial camera pose parameters; Based on the initial camera pose parameters, colmap is used to estimate the camera pose to obtain final camera pose parameters.

3. The commodity rendering and display method according to claim 1, characterized in that: Also includes: After performing rigid correction on the photographed image, obtaining contour points of the rendered image and contour points of the photographed image; The contour points of the captured image are matched with the contour points of the rendered image, and after the corresponding relationship is matched, the contour points of the captured image are moved based on the corresponding relationship to align the contour points of the captured image with the contour points of the rendered image.

4. A product rendering and display system, characterized in that: include: The picture acquisition module is used to continuously shoot the product with a camera to obtain 360-degree pictures; A posture processing module is used to reconstruct the camera posture of the camera to obtain camera posture parameters; and determine the camera shooting point position according to the camera posture parameters; A target rendering module is used to calculate the rendering target point based on the camera shooting point position to obtain the camera rendering target point position; and perform 3D image rendering on the camera rendering target point position to obtain a rendered image; A correction acquisition module is used to determine a camera extrinsic parameter matrix according to the camera shooting point position and the camera rendering target point position, and based on the camera extrinsic parameter matrix, rigidly correct the shot picture with the rendered picture as the center to obtain a 3D product display picture; The target rendering module includes: a point connection submodule, a Y-axis angle calculation submodule, a distance calculation submodule, an X-axis angle calculation submodule and a target coordinate determination submodule, wherein: The point connection submodule is used to connect each camera shooting point with the center point of the commodity object to obtain the corresponding point connection line; The Y-axis angle calculation submodule is used to calculate the angle between each point connection line and the coordinate Y-axis, and obtain the average of the angles, and use the average of the angles as the angle between the camera rendering target point and the coordinate Y-axis to obtain the target point Y-axis angle; The point distance calculation submodule is used to calculate the distance between each camera shooting point and the center point of the commodity object, and to obtain the average distance, and use the average distance as the distance between the camera rendering target point and the center point of the commodity object to obtain the target point distance; The X-axis angle calculation submodule is used to project the connecting line of each point onto the coordinate XZ plane, and calculate the angle between the projection and the X-axis to obtain the X-axis angle of the target point; A target coordinate determination submodule is used to calculate the pixel coordinates of the target point rendered by the camera based on the Y-axis angle of the target point, the distance of the target point and the X-axis angle of the target point, so as to obtain the position of the target point rendered by the camera; When determining the camera extrinsic matrix according to the camera shooting point position and the camera rendering target point position, the correction acquisition module determines the rotation matrix according to the camera facing the center of the object, and then determines the camera extrinsic matrix according to the rotation matrix; The rotation matrix formula is: ; In the formula, norm represents vector normalization, cross represents vector cross product, center represents the center point of the object, and pos represents the camera rendering target point. is a vector of length 3, which can be obtained by equations (3), (4), and (5) respectively. Among them, the camera extrinsic matrix is: ; In the formula, refers to the camera extrinsic matrix, is a vector of length 3, represents the 0th, 1st, and 2nd values ​​of the ^x vector, represents the 0th, 1st, and 2nd values ​​of the ^y vector, Represents the 0th, 1st, and 2nd values ​​of the ^z vector, and pos is the coordinate of the camera rendering target point; Among them, the correction acquisition module includes: a picture rigid correction submodule, which is used to perform rigid correction on the captured picture based on the camera extrinsic parameter matrix and with the rendered picture as the center, and when the captured picture is rigidly corrected based on the camera extrinsic parameter matrix and with the rendered picture as the center, based on the camera extrinsic parameter matrix, the Y axis of the camera rendering target point is projected onto the captured picture, the angle between the projection and the Y axis of the captured picture is calculated, and the captured picture is rotated at the angle; based on the camera extrinsic parameter matrix, the center point position of the center point of the commodity object on the captured picture is calculated, and the captured picture is translated based on the center point position to make the center point of the captured picture coincide with the center point position.

5. The commodity rendering and display system according to claim 4, characterized in that: When the posture processing module reconstructs the camera posture and obtains the camera posture parameters, it uses the arkit tool to reconstruct the initial camera posture of the camera to obtain the initial camera posture parameters; based on the initial camera posture parameters, it uses colmap to estimate the posture of the camera to obtain the final camera posture parameters.

6. The commodity rendering and display system according to claim 4, characterized in that: The correction acquisition module also includes: a contour point trimming submodule, which is used to obtain the contour points of the rendered image and the contour points of the captured image after rigid correction of the captured image; the contour points of the captured image and the contour points of the rendered image are matched, and after the corresponding relationship is matched, the contour points of the captured image are moved based on the corresponding relationship to align the contour points of the captured image with the contour points of the rendered image.