Object display method and device, storage medium and electronic device
By acquiring image information of the target object, establishing a k-dimensional binary tree model, and performing coordinate stitching and filtering, the problem of low precision when storing objects in 3D models is solved, and high-precision point cloud data display is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2023-03-27
- Publication Date
- 2026-07-03
AI Technical Summary
In existing technologies, when storing and displaying objects using 3D models, the large data volume and low precision result in poor accuracy in data storage and object display.
By acquiring image information of the target object from different orientations, obtaining a set of target point coordinates, establishing a k-dimensional binary tree model, calculating neighbor coordinates and rotation matrices, performing rigid body transformation, stitching together point cloud data, and combining filtering and hash operations, the data is stored in the blockchain for display.
It improves the accuracy of target object display and achieves high-precision 3D point cloud data storage and display.
Smart Images

Figure CN116304435B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data, and more specifically, to an object display method, apparatus, storage medium, and electronic device. Background Technology
[0002] With the booming development of the internet industry, "Internet + cultural relic protection" and "Internet + art collection" have emerged as new methods of storage and preservation. Digital collections have become a new form of digital publications, guaranteeing digital copyright while possessing high artistic appreciation and collection value.
[0003] As a authentic and credible digital asset, existing digital collectibles are diverse, including images of cultural relics, cards, paintings, photographs, GIFs, and emojis. However, most of these digital collectibles are presented in a two-dimensional format. This traditional and singular form of presentation somewhat affects the user's viewing experience and hinders the sale of digital collectibles. When using three-dimensional models to store digital collectibles, it is necessary to store the complex topological structure information of the object's surface. This information suffers from low precision, complex data structure, large data volume, and difficulties in storage and transmission, resulting in poor display accuracy when digital collectibles are presented using existing methods.
[0004] There is currently no effective solution to the problem of poor data storage and object display accuracy caused by the large data volume and low precision when storing and displaying stored objects using 3D models in related technologies. Summary of the Invention
[0005] This application provides an object display method, apparatus, storage medium, and electronic device to solve the problem in related technologies where the large data volume and low precision of stored objects lead to poor data storage and object display accuracy.
[0006] According to one aspect of this application, an object display method is provided. The method includes: acquiring image information of a target object from different orientations to obtain M image information sets, and acquiring N target point coordinates in each image information set to obtain M target point coordinate sets; selecting any target point coordinate set from the M target point coordinate sets to obtain a target target point coordinate set, and selecting any target point coordinate set from the non-target target point coordinate set in the M target point coordinate sets to obtain a candidate target point coordinate set; concatenating the candidate target point coordinate set with the target target point coordinate set to obtain a point cloud data set; converting the point cloud data set into an updated target target point coordinate set, and re-executing the step of selecting any target point coordinate set from the non-target target coordinate set in the M target point coordinate sets to obtain a candidate target coordinate set, until all M target point coordinate sets are concatenated to obtain point cloud data of the target object, and displaying the target object through the point cloud data.
[0007] Optionally, concatenating the candidate target coordinate set with the target target coordinate set includes: establishing a k-dimensional binary tree model of the target target coordinate set, and determining the neighboring coordinates of each candidate target coordinate in the candidate target coordinate set within the k-dimensional binary tree model, resulting in N sets of neighboring coordinates; calculating the coordinate point closest to the candidate target coordinate from each set of neighboring coordinates, resulting in P target coordinates, and combining the P target coordinates to obtain the first neighboring coordinate set of the candidate target coordinate set; calculating the rotation and translation matrices of the candidate target coordinate set based on the candidate target coordinate set and the neighboring coordinate set; performing a rigid body transformation on the candidate target coordinate set based on the rotation and translation matrices to obtain the second neighboring coordinate set; and concatenating the second neighboring coordinate set with the target target coordinate set to obtain a set of point cloud data.
[0008] Optionally, before concatenating the second neighboring coordinate set with the target point coordinate set, the method further includes: calculating the average distance error between the first neighboring coordinate set and the second neighboring coordinate set, and determining whether the average distance error is greater than a preset value; if the average distance error is greater than the preset value, determining the second neighboring coordinate set as the updated candidate target point coordinate set, and recalculating the second neighboring coordinate set of the updated candidate target point coordinate set until the average distance error is less than or equal to the preset value; if the average distance error is less than or equal to the preset value, performing the step of concatenating the second neighboring coordinate set with the target point coordinate set.
[0009] Optionally, establishing a k-dimensional binary tree model of the target point coordinate set includes: determining the dimension value of the target point coordinates to obtain the k value; obtaining the coordinate value of each dimension of each target point coordinate in the target point coordinate set to obtain k sets of coordinate values; calculating the variance of each set of coordinate values to obtain k variances, and sequentially dividing the space of each dimension corresponding to the variance in descending order of variance, and generating a k-dimensional binary tree model of the target point coordinate set based on the spatial division.
[0010] Optionally, the space corresponding to each variance is divided sequentially in descending order of variance. Based on the spatial division, the k-dimensional binary tree model for generating the target point coordinate set includes: after the current spatial division, the target point coordinates on both sides of the division plane are determined as two branches of the binary tree, and the target point coordinates closest to the division plane in each space are determined as nodes of the binary tree branches corresponding to each space; when performing the next dimensional space division, the planes where the nodes of the two branches are located are used as division planes for spatial division, and the steps of determining the target point coordinates on both sides of the division plane as two branches of the binary tree and determining the target point coordinates closest to the division plane as nodes of the two branches are repeated until the number of target point coordinates in each space is less than or equal to the preset number.
[0011] Optionally, after all M target point coordinate sets have been stitched together, the method further includes: deduplicating the point cloud data of the target object to obtain the first point cloud data; filtering the first point cloud data using a preset filtering model to obtain the second point cloud data, wherein the preset filtering model includes at least one of the following: pass-through filtering, Gaussian filtering, and conditional filtering; and determining the second point cloud data as the updated point cloud data of the target object.
[0012] Optionally, displaying a target object using point cloud data includes: performing a hash operation on the point cloud data of the target object to obtain a hash value; determining the hash value as the name of the point cloud data of the target object, and adding the point cloud data and name of the target object to the blockchain; upon receiving a display instruction, retrieving the point cloud data of the target object from the blockchain according to the name, and generating an image of the target object using the point cloud data of the target object.
[0013] According to another aspect of this application, an object display device is provided. The device includes: an acquisition unit, configured to acquire image information of a target object in different orientations, obtaining M image information sets, and acquiring N target point coordinates in each image information set to obtain M target point coordinate sets; a first determination unit, configured to select any target point coordinate set from the M target point coordinate sets to obtain a target target point coordinate set, and select any target point coordinate set from the non-target target point coordinate set in the M target point coordinate sets to obtain a candidate target point coordinate set; a stitching unit, configured to stitch the candidate target point coordinate set with the target target point coordinate set to obtain a point cloud data set; and a combination unit, configured to combine the point cloud data set into an updated target target point coordinate set, and re-execute the step of selecting any target point coordinate set from the non-target target coordinate set in the M target point coordinate sets to obtain a candidate target coordinate set, until all M target point coordinate sets are stitched together to obtain point cloud data of the target object, and display the target object through the point cloud data.
[0014] According to another aspect of the present invention, a computer storage medium is also provided for storing a program, wherein the program, when running, controls the device where the computer storage medium is located to execute an object display method.
[0015] According to another aspect of the present invention, an electronic device is also provided, comprising one or more processors and a memory; the memory stores computer-readable instructions, and the processor is configured to execute the computer-readable instructions, wherein the computer-readable instructions execute an object display method when they are run.
[0016] This application employs the following steps: acquiring image information of the target object from different orientations, obtaining M image information sets, and acquiring N target point coordinates from each image information set, resulting in M target point coordinate sets; selecting any target point coordinate set from the M target point coordinate sets to obtain the target target point coordinate set, and selecting any target point coordinate set from the non-target target point coordinate set from the M target point coordinate sets to obtain the candidate target point coordinate set; concatenating the candidate target point coordinate set with the target target point coordinate set to obtain a point cloud data set; converting the point cloud data set into an updated target target point coordinate set, and re-executing the step of selecting any target point coordinate set from the non-target target coordinate set from the M target point coordinate sets to obtain the candidate target coordinate set, until all M target point coordinate sets are concatenated to obtain the point cloud data of the target object, and displaying the target object through the point cloud data. This solves the problem in related technologies where storing and displaying stored objects using 3D models results in poor data storage and object display accuracy due to large data volume and low precision. By acquiring image information from different locations, obtaining multiple coordinates based on the image information, and selecting a reference image, the coordinates in the remaining images are transformed to be in the same coordinate system as the coordinates in the reference image. The two sets of coordinates are then stitched together. This allows the combination of image information from multiple locations based on the reference image to obtain the 3D point cloud data of the target object. The target object is then stored and displayed using the 3D point cloud data, thereby improving the accuracy of the target object's display. Attached Figure Description
[0017] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0018] Figure 1 This is a flowchart of an object display method provided according to an embodiment of this application;
[0019] Figure 2 This is a schematic diagram of generating a kd-tree in optional two-dimensional coordinates according to an embodiment of this application;
[0020] Figure 3 This is a schematic diagram of an optional kd-tree provided according to an embodiment of this application;
[0021] Figure 4 This is a flowchart of another optional object display method provided according to an embodiment of this application;
[0022] Figure 5 This is a schematic diagram of an object display device provided according to an embodiment of this application;
[0023] Figure 6This is a schematic diagram of an electronic device provided according to an embodiment of this application. Detailed Implementation
[0024] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are information and data authorized by the user or fully authorized by all parties. For example, this system has an interface with relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain the relevant information after receiving consent information from the aforementioned user or organization.
[0028] It should be noted that the object display method, apparatus, storage medium and electronic device defined in this disclosure can be used in the field of big data, or in any field other than big data. The application fields of the object display method, apparatus, storage medium and electronic device defined in this disclosure are not limited.
[0029] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:
[0030] 3D point cloud: 3D point cloud is an emerging method of representing 3D models, belonging to the field of computer vision 3D imaging. Point cloud data is mainly acquired through LiDAR scanners and is a discrete set of points describing the surface features of an object. It consists of geometric position information (x, y, z) and attribute information (such as RGB (red, green, blue optical primary colors), reflectivity, normal vector, etc.).
[0031] Digital collectibles refer to the use of blockchain technology to generate unique digital certificates for specific works of art, enabling authentic and trustworthy digital issuance, purchase, collection, and use while protecting their digital copyright. Digital collectibles are immutable, indivisible, and non-substitutable, possessing uniqueness, authenticity, and permanence, and achieving the ability to establish ownership and trace their origin.
[0032] ICP (Iterative Closest Point) algorithm: Iterative Closest Point algorithm is a classic point cloud matching algorithm.
[0033] kd-tree: A special binary tree data structure. kd-tree point cloud partitioning is equivalent to continuously dividing k-dimensional space with a hyperplane perpendicular to the coordinate axes. It is suitable for massive 3D point cloud data.
[0034] According to an embodiment of this application, an object display method is provided.
[0035] Figure 1 This is a flowchart of an object display method provided according to an embodiment of this application. For example... Figure 1 As shown, the method includes the following steps:
[0036] Step S101: Obtain image information of the target object in different orientations to obtain M image information, and obtain N target point coordinates in each image information to obtain a set of M target point coordinates.
[0037] Specifically, the target object can be the physical object corresponding to the digital collection, such as cultural relics, artworks, etc. Multiple target points can be selected around the physical object, and at each target point, a LiDAR scanner can be used to obtain a set of original point cloud data for different target points, i.e., a set of M target point coordinates {P1, P2, ..., P...}. N}, where N is the number of target points, P N This refers to the set of coordinates collected for the Nth target point. Each target point's coordinate set includes multiple coordinates, for example, P. N ∈{p N1 ,p N2 ,...,p Nj}, that is, P NIt includes j coordinates, each corresponding to the coordinate values of the x, y, and z axes, as well as the color values of the RGB three colors. Thus, after determining the coordinates of each point, the color displayed at that point can be determined based on the corresponding RGB values.
[0038] Step S102: Select any target point coordinate set from the M target point coordinate sets to obtain the target target coordinate set, and select any target point coordinate set from the non-target target coordinate set from the M target point coordinate sets to obtain the candidate target coordinate set.
[0039] Specifically, after obtaining N target point coordinate sets, any one of the target point coordinate sets can be selected as a reference set, and the target point coordinate sets adjacent to it can be determined as candidate target point coordinate sets.
[0040] Step S103: The candidate target coordinate set and the target target coordinate set are concatenated to obtain a point cloud data set.
[0041] Specifically, after selecting the target point coordinate set and the candidate target point coordinate set, the candidate target point coordinate set can be combined with the target target point coordinate set to obtain partial point cloud data. This partial point cloud data is the sum of the target point coordinates in the two acquisition surfaces.
[0042] For example, if the target point coordinate set includes three coordinate points: p1, p2, and p3, and the point cloud data in group B includes three coordinate points: p2, p3, and p4, then the point cloud data obtained by combining group A and group B is: p1, p2, p3, and p4.
[0043] Step S104: Combine the point cloud dataset into an updated target point coordinate set, and re-execute the step of selecting any target point coordinate set from the non-target point coordinate set in the M target point coordinate sets to obtain a candidate target point coordinate set, until all M target point coordinate sets are stitched together to obtain the point cloud data of the target object, and display the target object through the point cloud data.
[0044] Specifically, after obtaining the aforementioned partial point cloud data, this partial point cloud data can be used as the updated target point coordinate set. Then, from the remaining target point coordinate set, the target point coordinate set of the adjacent face to this partial point cloud data can be determined again to obtain a new candidate target point coordinate set. The aforementioned partial point cloud data and the new candidate target point coordinate set are then concatenated. Based on the adjacency relationship between the acquisition faces, the target point coordinate set of each acquisition face is combined sequentially to obtain the point cloud data of the target object.
[0045] The object display method provided in this application involves acquiring image information of a target object from different orientations to obtain M image information sets, and acquiring N target point coordinates from each image information set to obtain M target point coordinate sets. An arbitrary target point coordinate set is selected from the M target point coordinate sets to obtain a target target point coordinate set, and an arbitrary target point coordinate set is selected from the non-target target point coordinate sets within the M target point coordinate sets to obtain a candidate target point coordinate set. The candidate target point coordinate set is then concatenated with the target target point coordinate set to obtain a point cloud data set. This point cloud data set is then converted into an updated target target point coordinate set, and the step of selecting an arbitrary target point coordinate set from the non-target target coordinate sets within the M target point coordinate sets to obtain a candidate target point coordinate set is repeated until all M target point coordinate sets are concatenated to obtain the point cloud data of the target object. The target object is then displayed using this point cloud data. This method solves the problem in related technologies where storing and displaying stored objects using 3D models results in poor data storage and object display accuracy due to the large data volume and low precision. By acquiring image information from different locations, obtaining multiple coordinates based on the image information, and selecting a reference image, the coordinates in the remaining images are transformed to be in the same coordinate system as the coordinates in the reference image. The two sets of coordinates are then stitched together. This allows the combination of image information from multiple locations based on the reference image to obtain the 3D point cloud data of the target object. The target object is then stored and displayed using the 3D point cloud data, thereby improving the accuracy of the target object's display.
[0046] Optionally, in the object display method provided in this application embodiment, concatenating the candidate target coordinate set with the target target coordinate set includes: establishing a k-dimensional binary tree model of the target target coordinate set, and determining the neighboring coordinates of each candidate target coordinate in the candidate target coordinate set in the k-dimensional binary tree model to obtain N sets of neighboring coordinates; calculating the coordinate point closest to the candidate target coordinate from a set of neighboring coordinates of each candidate target coordinate to obtain P target coordinates, and combining the P target coordinates to obtain a first set of neighboring coordinates of the candidate target coordinate set; calculating the rotation matrix and translation matrix of the candidate target coordinate set according to the candidate target coordinate set and the neighboring coordinate set; performing a rigid body transformation on the candidate target coordinate set according to the rotation matrix and the translation matrix to obtain a second set of neighboring coordinates; and concatenating the second set of neighboring coordinates with the target target coordinate set to obtain a set of point cloud data.
[0047] It's important to note that the k-dimensional binary tree model, also known as a kd-tree, is a binary tree where each node is a k-dimensional point. All non-leaf nodes can be viewed as acting on a hyperplane that divides the space into two half-spaces. The subtree to the left of a node represents points to the left of the hyperplane, and the subtree to the right represents points to the right of the hyperplane. The hyperplane is chosen as follows: each node is associated with the k-dimensional dimension perpendicular to the hyperplane. Therefore, if the partition is based on the x-axis, all nodes with x-values less than a specified value will appear in the left subtree, and all nodes with x-values greater than a specified value will appear in the right subtree. Thus, the hyperplane can be determined using this x-value, and its normal is the unit vector along the x-axis.
[0048] Specifically, firstly, for any set of candidate target coordinates, when concatenating it with the set of target coordinates, a k-dimensional binary tree model of the target target coordinate set can be determined first. Optionally, in the object display method provided in this application embodiment, establishing a k-dimensional binary tree model of the target target coordinate set includes: determining the dimension value of the target target coordinates to obtain the k value; obtaining the coordinate value of each dimension of each target target coordinate in the target target coordinate set to obtain k sets of coordinate values; calculating the variance of each set of coordinate values to obtain k variances, and sequentially dividing the space of the dimension corresponding to each variance in descending order of variance, and generating a k-dimensional binary tree model of the target target coordinate set based on the space division.
[0049] Among them, the k-dimensional binary tree model is a kd-tree. When generating the kd-tree of the target point coordinate set, the k-dimensional space can be divided by a hyperplane perpendicular to the coordinate axes. The dimension with the largest geometric variance is selected from the three directions of x, y, and z as the initial sub-direction. The coordinate values of the point cloud in this dimension are sorted and the median point is taken as the dividing point. The hyperplane perpendicular to the dividing direction is used to divide the point cloud space into left and right subspaces. The dividing dimension is selected in turn according to the variance. The left and right subspaces are recursively divided in the same way until the number of points in the subspace is no greater than m. m is specified by the user and is usually taken as m=1.
[0050] Optionally, in the object display method provided in this application embodiment, the space corresponding to each variance is sequentially divided in descending order of variance. Based on the spatial division, the k-dimensional binary tree model for generating the target point coordinate set includes: after the current spatial division, the target point coordinates on both sides of the division plane are determined as two branches of the binary tree, and the target point coordinates closest to the division plane in each space are determined as nodes of the binary tree branches corresponding to each space; when performing the next dimensional space division, the planes where the nodes of the two branches are located are used as division planes for spatial division, and the steps of determining the target point coordinates on both sides of the division plane as two branches of the binary tree and determining the target point coordinates closest to the division plane as nodes of the two branches are re-executed until the number of target point coordinates in each space is less than or equal to a preset number.
[0051] Figure 2 This is a schematic diagram of generating a kd-tree in optional two-dimensional coordinates according to the embodiments of this application, such as... Figure 2 As shown, point 1 can be used as the first dividing point, and the coordinate system can be divided into two regions using a straight line passing through point 1 and the X-axis. Points 2 and 3 are then determined within these two regions. The two regions are further divided using straight lines passing through point 2 and the Y-axis, and point 3 and the Y-axis, respectively, resulting in four regions. Similarly, the next step is to further divide the region using line segments passing through points 4, 5, and 6 and perpendicular to the X-axis, until each region has no points remaining. Therefore, based on... Figure 2 The partitioning process generates a kd-tree for the 6 points in the graph, that is... Figure 3 As shown, Figure 3 This is a schematic diagram of an optional kd-tree provided according to an embodiment of this application. It can be obtained according to the above region partitioning process. Figure 3 The binary tree in the data can then be used to... Figure 3 The proximity relationship between each point is determined based on distance. The method used in this application to generate the kd-tree is the same as that in the two-dimensional plane, the only difference being that the region is cyclically divided in the x, y, and z dimensions.
[0052] Furthermore, after obtaining the k-dimensional binary tree model of the target point coordinate set, the neighboring coordinates of each candidate target point coordinate in the candidate target point coordinate set can be determined, thus obtaining N sets of neighboring coordinates. When determining the neighboring coordinates, the region where the candidate target point coordinate is located in the coordinate system can be determined first, and the coordinates used to divide the region can be determined. Then, in the k-dimensional binary tree, the parent node and child node of the coordinate are determined as a set of neighboring coordinates corresponding to the candidate target point coordinate set.
[0053] After determining a set of neighboring coordinates, the distance between each neighboring coordinate and the candidate target coordinate can be determined by Formula 1. Based on the distance, the point closest to the candidate target coordinate is determined to obtain a target coordinate. The target coordinate corresponding to each candidate target coordinate is calculated through the above process to obtain P target coordinates.
[0054]
[0055] Among them, the coordinates of the candidate target point are obtained through p i (x i ,y i ,z i ) indicates that the nearest coordinates are through p j (x j ,y j ,z j ) identifier, d k (p i ,p j ) represents point P i and point P j The distance between them.
[0056] Furthermore, given P target coordinates, it is necessary to combine the P target coordinates according to the arrangement relationship of multiple candidate target coordinates in the candidate target coordinate set, and the correspondence between the P target coordinates and the candidate target coordinates, to obtain the first nearest neighbor coordinate set. For example, the candidate target coordinate set A includes: p A1 p A2 p A3 The corresponding target coordinates are p. M1 p M2 p M3 , where p M1 It is p A1 The corresponding point, p M2 It is p A2 The corresponding point, p M3 It is p A3 The corresponding point.
[0057] Furthermore, after determining the set of candidate target coordinates and the first neighboring set of coordinates, the rotation and translation matrices of the candidate target coordinate set need to be calculated using Equation 2:
[0058] P1'=RP2+t (2)
[0059] Where P1' is the first neighboring coordinate set, P2 is the candidate target coordinate set, R is the rotation matrix, and t is the translation matrix.
[0060] After determining the rotation and translation matrices, a rigid body transformation can be performed on the candidate target point coordinate set based on the rotation and translation matrices to obtain the second neighbor coordinate set. The calculation formula is shown in Formula 3.
[0061] P2'=RP2+t (3)
[0062] Where P2' is the second nearest neighbor coordinate set, P2 is the candidate target coordinate set, R is the rotation matrix, and t is the translation matrix.
[0063] After obtaining the second neighbor coordinate set, it indicates that multiple coordinates in the second neighbor coordinate set have been converted to the same coordinate system as the target coordinates. At this time, the second neighbor coordinate set can be concatenated with the target point coordinate set to obtain a set of point cloud data.
[0064] For example, if the second nearest neighbor coordinate set includes p1, p2, and p3, and the target point coordinate set includes p2, p3, and p4, then the coordinate set obtained by concatenating the second nearest neighbor coordinate set and the target point coordinate set is p1, p2, p3, and p4.
[0065] Optionally, in the object display method provided in this application embodiment, before concatenating the second neighboring coordinate set with the target target coordinate set, the method further includes: calculating the average distance error between the first neighboring coordinate set and the second neighboring coordinate set, and determining whether the average distance error is greater than a preset value; if the average distance error is greater than the preset value, determining the second neighboring coordinate set as the updated candidate target coordinate set, and recalculating the second neighboring coordinate set of the updated candidate target coordinate set until the average distance error is less than or equal to the preset value; if the average distance error is less than or equal to the preset value, performing the step of concatenating the second neighboring coordinate set with the target target coordinate set.
[0066] Specifically, after obtaining the second nearest coordinate set, it is necessary to determine the average distance error between the second nearest coordinate set and the first nearest coordinate set. This error can be calculated using Formula 4:
[0067]
[0068] Where, p 1i ' is the coordinate point in the second nearest neighbor set, p 2i ' represents the coordinate point in the first nearest neighbor coordinate set, n is the number of coordinates in the two sets, that is, the number of corresponding coordinate pairs, and dist is the average distance error value.
[0069] If the average distance error is greater than the preset value, the second nearest coordinate set is determined as the updated candidate target coordinate set, and the second nearest coordinate set of the updated candidate target coordinate set is recalculated until the average distance error is less than or equal to the preset value. That is, the above steps for determining the second nearest coordinate set need to be repeated until the average distance error is less than or equal to the preset value, thereby completing the determination of the second nearest coordinate set.
[0070] Optionally, in the object display method provided in this application embodiment, after the M target point coordinate sets are all stitched together, the method further includes: deduplicating the point cloud data of the target object to obtain first point cloud data; filtering the first point cloud data using a preset filtering model to obtain second point cloud data, wherein the preset filtering model includes at least one of the following: pass-through filtering, Gaussian filtering, and conditional filtering; and determining the second point cloud data as the updated point cloud data of the target object.
[0071] Specifically, after obtaining the point cloud data of the target object, since there may be duplicate coordinates, it is necessary to deduplicate the point cloud data to obtain the first point cloud data. Then, the first point cloud data is denoised and smoothed by combining random sampling consistency filtering, pass-through filtering, Gaussian filtering and conditional filtering to obtain the updated point cloud data of the target object, thereby making the data more accurate and concise.
[0072] Optionally, in the object display method provided in this application embodiment, displaying the target object through point cloud data includes: performing a hash operation on the point cloud data of the target object to obtain a hash value; determining the hash value as the name of the point cloud data of the target object, and adding the point cloud data and name of the target object to the blockchain; upon receiving a display instruction, retrieving the point cloud data of the target object from the blockchain according to the name, and generating an image of the target object through the point cloud data of the target object.
[0073] Specifically, after obtaining point cloud data, a portion of the data can be extracted, or the complete data can be hashed to obtain a unique name. This unique name, along with the point cloud data, is then uploaded to the blockchain using blockchain technology, thus storing the name and point cloud data in the blockchain. Upon receiving a display instruction, the point cloud data is retrieved from the blockchain based on the name, and a digital collectible is generated and displayed based on the point cloud data.
[0074] Figure 4 This is a flowchart of another optional object display method provided according to an embodiment of this application, such as... Figure 4 As shown,
[0075] Step S401: Based on the 3D solid object, select multiple suitable target points and use a LiDAR scanner to obtain the original point cloud data {P1, P2, ..., P...} of different target points. J}, where J is the number of target points, P J Point cloud data collected for the J-th target point;
[0076] Step S402: The point cloud data obtained from different target points are sequentially stitched together according to the improved ICP point cloud stitching method based on kd tree to obtain the stitched point cloud data of the three-dimensional entity object.
[0077] Step S403: Combine random sampling consistency filtering, pass-through filtering, Gaussian filtering and conditional filtering to denoise and smooth the stitched point cloud data P to obtain a complete 3D point cloud data;
[0078] Step S404: Upload the complete 3D point cloud data to the blockchain using blockchain technology;
[0079] Step S405: Obtain a 3D point cloud digital collection with a unique digital certificate.
[0080] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0081] This application also provides an object display device. It should be noted that the object display device of this application can be used to execute the object display method provided in this application. The object display device provided in this application is described below.
[0082] Figure 5 This is a schematic diagram of an object display device provided according to an embodiment of this application. For example... Figure 5 As shown, the device includes: an acquisition unit 51, a first determination unit 52, a splicing unit 53, and a combination unit 54.
[0083] The acquisition unit 51 is used to acquire image information of the target object in different orientations, obtain M image information, and acquire N target point coordinates in each image information to obtain a set of M target point coordinates.
[0084] The first determining unit 52 is used to select any set of target coordinates from the set of M target coordinates to obtain the target target coordinate set, and to select any set of target coordinates from the set of non-target coordinates from the set of M target coordinates to obtain the candidate target coordinate set.
[0085] The splicing unit 53 is used to splice the candidate target point coordinate set with the target target point coordinate set to obtain a point cloud data set.
[0086] The combining unit 54 is used to combine the point cloud dataset into an updated target point coordinate set, and re-execute the step of selecting any target point coordinate set from the non-target point coordinate set in the M target point coordinate sets to obtain a candidate target point coordinate set, until all M target point coordinate sets are stitched together to obtain the point cloud data of the target object, and display the target object through the point cloud data.
[0087] The object display device provided in this application embodiment includes an acquisition unit 51, which acquires image information of the target object from different orientations, obtaining M image information sets, and acquiring N target point coordinates from each image information set, resulting in M target point coordinate sets. A first determination unit 52 is used to select any target point coordinate set from the M target point coordinate sets to obtain a target target point coordinate set, and to select any target point coordinate set from the non-target target point coordinate sets in the M target point coordinate sets to obtain a candidate target point coordinate set. A stitching unit 53 is used to stitch the candidate target point coordinate sets with the target target point coordinate sets to obtain a point cloud data set. A combination unit 54 is used to combine the point cloud data set into an updated target target point coordinate set, and to re-execute the step of selecting any target point coordinate set from the non-target target coordinate sets in the M target point coordinate sets to obtain a candidate target coordinate set, until all M target point coordinate sets are stitched together to obtain the point cloud data of the target object, and to display the target object through the point cloud data. This invention addresses the problem of poor data storage and display accuracy caused by the large data volume and low precision when storing and displaying objects using 3D models in related technologies. By acquiring image information from different locations, obtaining multiple coordinates from the images, and selecting a reference image, the coordinates from the remaining images are transformed to fit the coordinates in the reference image into the same coordinate system. The two sets of coordinates are then concatenated. This allows for the combination of image information from multiple locations based on the reference image to obtain 3D point cloud data of the target object. Storing and displaying the target object using this 3D point cloud data improves the accuracy of the target object's display.
[0088] Optionally, in the object display device provided in this application embodiment, the stitching unit 53 includes: a building module, used to build a k-dimensional binary tree model of the target point coordinate set, and determine the neighboring coordinates of each candidate target point coordinate in the candidate target point coordinate set in the k-dimensional binary tree model to obtain N sets of neighboring coordinates; a first calculation module, used to calculate the coordinate point closest to the candidate target point coordinate from a set of neighboring coordinates of each candidate target point coordinate to obtain P target coordinates, and combine the P target coordinates to obtain a first set of neighboring coordinates of the candidate target point coordinate set; a second calculation module, used to calculate the rotation matrix and translation matrix of the candidate target point coordinate set according to the candidate target point coordinate set and the neighboring coordinate set; a transformation module, used to perform a rigid body transformation on the candidate target point coordinate set according to the rotation matrix and the translation matrix to obtain a second set of neighboring coordinates; and a stitching module, used to stitch the second set of neighboring coordinates with the target target point coordinate set to obtain a set of point cloud data.
[0089] Optionally, in the object display device provided in the embodiments of this application, the device further includes: a first calculation unit, configured to calculate the average distance error between the first neighboring coordinate set and the second neighboring coordinate set, and determine whether the average distance error is greater than a preset value; a second calculation unit, configured to determine the second neighboring coordinate set as the updated candidate target coordinate set when the average distance error is greater than the preset value, and recalculate the second neighboring coordinate set of the updated candidate target coordinate set until the average distance error is less than or equal to the preset value; and an execution unit, configured to perform the step of splicing the second neighboring coordinate set with the target target coordinate set when the average distance error is less than or equal to the preset value.
[0090] Optionally, in the object display device provided in this application embodiment, the establishment module includes: a first determining submodule, used to determine the dimension value of the target point coordinates to obtain a k value; an acquisition submodule, used to acquire the coordinate value of each dimension of each target point coordinate in the target point coordinate set to obtain k sets of coordinate values; and a calculation submodule, used to calculate the variance of each set of coordinate values to obtain k variances, and sequentially divide the space of the dimension corresponding to each variance in descending order of variance, and generate a k-dimensional binary tree model of the target point coordinate set based on the space division.
[0091] Optionally, in the object display device provided in this application embodiment, the first segmentation submodule includes: a second determination submodule, used to determine the target point coordinates on both sides of the segmentation plane as two branches of a binary tree after the current space is segmented, and to determine the target point coordinates closest to the segmentation plane in each space as the node of the binary tree branch corresponding to each space; the second segmentation submodule is used to, when performing the next segmentation of the dimensional space, use the plane where the nodes of the two branches are located as the segmentation plane for space segmentation, and re-execute the steps of determining the target point coordinates on both sides of the segmentation plane as two branches of a binary tree, and determining the target point coordinates closest to the segmentation plane as the node of the two branches, until the number of target point coordinates in each space is less than or equal to a preset number.
[0092] Optionally, in the object display device provided in the embodiments of this application, the device further includes: a deduplication unit, used to deduplicate the point cloud data of the target object to obtain first point cloud data; a filtering unit, used to filter the first point cloud data using a preset filtering model to obtain second point cloud data, wherein the preset filtering model includes at least one of the following: pass-through filtering, Gaussian filtering, and conditional filtering; and a second determination unit, used to determine the second point cloud data as the updated point cloud data of the target object.
[0093] Optionally, in the object display device provided in this application embodiment, the combination unit 54 includes: a third calculation module, used to perform a hash operation on the point cloud data of the target object to obtain a hash value; an adding module, used to determine the hash value as the name of the point cloud data of the target object, and add the point cloud data and name of the target object to the blockchain; and a generating module, used to obtain the point cloud data of the target object from the blockchain according to the name when a display instruction is received, and generate an image of the target object through the point cloud data of the target object.
[0094] The aforementioned object display device includes a processor and a memory. The aforementioned acquisition unit 51, first determination unit 52, splicing unit 53, combination unit 54, etc., are all stored in the memory as program units. The processor executes the aforementioned program units stored in the memory to realize the corresponding functions.
[0095] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured. By adjusting kernel parameters, the problem of poor data storage and object display accuracy caused by the large data volume and low precision when storing and displaying objects using 3D models in related technologies can be solved.
[0096] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0097] This invention provides a computer-readable storage medium storing a program that, when executed by a processor, implements the object display method.
[0098] This invention provides a processor for running a program, wherein the program executes the object display method during runtime.
[0099] like Figure 6 As shown, this embodiment of the invention provides an electronic device 60, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: acquiring image information of a target object from different orientations to obtain M image information sets, and acquiring N target point coordinates from each image information set to obtain M target point coordinate sets; selecting any target point coordinate set from the M target point coordinate sets to obtain a target target point coordinate set, and selecting any target point coordinate set from the non-target target point coordinate sets in the M target point coordinate sets to obtain a candidate target point coordinate set; concatenating the candidate target point coordinate set with the target target point coordinate set to obtain a point cloud data set; converting the point cloud data set into an updated target target point coordinate set, and re-executing the step of selecting any target point coordinate set from the non-target target coordinate sets in the M target point coordinate sets to obtain a candidate target coordinate set, until all M target point coordinate sets are concatenated to obtain point cloud data of the target object, and displaying the target object through the point cloud data. The device in this document can be a server, PC, PAD, mobile phone, etc.
[0100] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program with the following method steps: acquiring image information of a target object in different orientations to obtain M image information, and acquiring N target point coordinates in each image information to obtain M target point coordinate sets; selecting any target point coordinate set from the M target point coordinate sets to obtain a target target point coordinate set, and selecting any target point coordinate set from the non-target target point coordinate set in the M target point coordinate sets to obtain a candidate target point coordinate set; concatenating the candidate target point coordinate set with the target target point coordinate set to obtain a point cloud data set; converting the point cloud data set into an updated target target point coordinate set, and re-executing the step of selecting any target point coordinate set from the non-target target coordinate set in the M target point coordinate sets to obtain a candidate target coordinate set, until all M target point coordinate sets are concatenated to obtain point cloud data of the target object, and displaying the target object through the point cloud data.
[0101] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0102] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0103] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0104] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0105] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0106] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0107] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0108] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0109] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for displaying objects, characterized in that, include: Image information of the target object in different orientations is obtained to obtain M image information, and N target point coordinates in each image information are obtained to obtain a set of M target point coordinates, wherein the target point coordinates include RGB color value information; From the M target point coordinate sets, select any target point coordinate set to obtain the target target coordinate set; and from the M target point coordinate sets, select any target point coordinate set from the non-target target coordinate sets to obtain the candidate target coordinate set. The process of concatenating the candidate target coordinate set with the target target coordinate set to obtain a point cloud data set includes: establishing a k-dimensional binary tree model of the target target coordinate set, and determining the neighboring coordinates of each candidate target coordinate in the candidate target coordinate set within the k-dimensional binary tree model to obtain N sets of neighboring coordinates; calculating the coordinate point closest to the candidate target coordinate from each set of neighboring coordinates to obtain P target coordinates, and combining the P target coordinates to obtain a first set of neighboring coordinates of the candidate target coordinate set, where P is less than N; calculating the rotation and translation matrices of the candidate target coordinate set based on the candidate target coordinate set and the neighboring coordinate sets; performing a rigid body transformation on the candidate target coordinate set based on the rotation and translation matrices to obtain a second set of neighboring coordinates; and concatenating the second set of neighboring coordinates with the target target coordinate set to obtain a point cloud data set. The point cloud dataset is combined into an updated target point coordinate set, and the step of selecting any target point coordinate set from the non-target point coordinate set in the M target point coordinate sets to obtain a candidate target point coordinate set is re-executed until all M target point coordinate sets are stitched together to obtain the point cloud data of the target object, and the target object is displayed through the point cloud data.
2. The method according to claim 1, characterized in that, Before concatenating the second set of neighboring coordinates with the set of target point coordinates, the method further includes: Calculate the average distance error between the first neighboring coordinate set and the second neighboring coordinate set, and determine whether the average distance error is greater than a preset value; If the average distance error is greater than the preset value, the second neighboring coordinate set is determined as the updated candidate target coordinate set, and the second neighboring coordinate set of the updated candidate target coordinate set is recalculated until the average distance error is less than or equal to the preset value. If the average distance error is less than or equal to the preset value, the step of concatenating the second set of neighboring coordinates with the set of target point coordinates is performed.
3. The method according to claim 1, characterized in that, Establishing a k-dimensional binary tree model for the target point coordinate set includes: Determine the dimension value of the target point coordinates to obtain the k value; Obtain the coordinate values of each dimension of each target point coordinate in the target point coordinate set to obtain k sets of coordinate values; Calculate the variance of each set of coordinate values to obtain k variances, and divide the space corresponding to each variance in descending order of variance. Based on the spatial division, generate a k-dimensional binary tree model of the target point coordinate set.
4. The method according to claim 3, characterized in that, The space corresponding to each variance is divided sequentially in descending order of variance. Based on the spatial division, a k-dimensional binary tree model for generating the target point coordinate set is generated, including: After the space is divided, the target coordinates on both sides of the dividing plane are determined as two branches of a binary tree, and the target coordinates that are closest to the dividing plane in each space are determined as the nodes of the binary tree branches corresponding to each space. When performing the next segmentation of the dimensional space, the planes where the nodes of the two branches are located are used as the segmentation planes for spatial segmentation. The steps of determining the target coordinates on both sides of the segmentation plane as the two branches of the binary tree and determining the target coordinates closest to the segmentation plane as the nodes of the two branches are repeated until the number of target coordinates in each space is less than or equal to the preset number.
5. The method according to claim 1, characterized in that, After the M target point coordinate sets are all stitched together, the method further includes: The point cloud data of the target object is deduplicated to obtain the first point cloud data; The first point cloud data will be filtered using a preset filtering model to obtain the second point cloud data. The preset filtering model includes at least one of the following: pass-through filtering, Gaussian filtering, and conditional filtering. The second point cloud data is determined as the updated point cloud data of the target object.
6. The method according to claim 1, characterized in that, The target object is displayed using the point cloud data, including: Perform a hash operation on the point cloud data of the target object to obtain a hash value; The hash value is used to determine the name of the point cloud data of the target object, and the point cloud data of the target object and the name are added to the blockchain; Upon receiving a display instruction, the point cloud data of the target object is retrieved from the blockchain according to the name, and an image of the target object is generated using the point cloud data of the target object.
7. An object display device, characterized in that, include: The acquisition unit is used to acquire image information of the target object in different orientations, obtain M image information, and acquire N target point coordinates in each image information to obtain a set of M target point coordinates, wherein the target point coordinates include RGB color value information; The first determining unit is used to select any set of target point coordinates from the M sets of target point coordinates to obtain a set of target target point coordinates, and to select any set of target point coordinates from the set of non-target target point coordinates from the M sets of target point coordinates to obtain a set of candidate target point coordinates. The stitching unit is used to stitch the candidate target point coordinate set with the target target point coordinate set to obtain a point cloud data set; The stitching unit includes: a building module, used to build a k-dimensional binary tree model of the target point coordinate set, and determine the neighboring coordinates of each candidate target point coordinate in the candidate target point coordinate set in the k-dimensional binary tree model, to obtain N sets of neighboring coordinates; a first calculation module, used to calculate the coordinate point closest to the candidate target point coordinate from a set of neighboring coordinates of each candidate target point coordinate, to obtain P target coordinates, and combine the P target coordinates to obtain a first neighboring coordinate set of the candidate target point coordinate set, where P is less than N; a second calculation module, used to calculate the rotation matrix and translation matrix of the candidate target point coordinate set according to the candidate target point coordinate set and the neighboring coordinate set; a transformation module, used to perform a rigid body transformation on the candidate target point coordinate set according to the rotation matrix and the translation matrix, to obtain a second neighboring coordinate set; and a stitching module, used to stitch the second neighboring coordinate set with the target target point coordinate set to obtain a set of point cloud data. The combining unit is used to combine the point cloud dataset into an updated target point coordinate set, and re-execute the step of selecting any target point coordinate set from the non-target point coordinate set in the M target point coordinate sets to obtain a candidate target point coordinate set, until all M target point coordinate sets are stitched together to obtain the point cloud data of the target object, and display the target object through the point cloud data.
8. A computer storage medium, characterized in that, The computer storage medium is used to store a program, wherein the program, when running, controls the device where the computer storage medium is located to execute the object display method according to any one of claims 1 to 6.
9. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the object display method according to any one of claims 1 to 6.