Model coloring device, model coloring method, and model coloring program
The model coloring device and method enhance the efficiency of coloring 3D models by aligning and coloring vertices based on point cloud data, eliminating the need for direct object reference during rendering, thus streamlining the coloring process and enabling faster creation of detailed 3D models.
Patent Information
- Application Number
- PCT/JP2023/014841
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-04-12
- Publication Date
- 2024-10-17
AI Technical Summary
The efficiency of coloring 3D models using conventional 3D computer graphics software is poor as users need to refer to existing objects during the rendering process, making the process time-consuming and inefficient.
A model coloring device and method that generates polygons and colored point cloud data from multiple positions, aligns vertices with point cloud data in a common coordinate system, calculates nearest neighbor points, and colors vertices based on the nearest neighbor point's color data, eliminating the need for direct object reference during rendering.
This approach significantly increases the efficiency of the coloring process for 3D models by automating the color application, allowing for faster creation of colored 3D models without the need for continuous object reference, and can handle objects that cannot be scanned by commercial 3D scanners.
Smart Images

Figure JP2023014841_17102024_PF_FP_ABST
Abstract
Description
Model coloring device, model coloring method, and model coloring program
[0001] The present disclosure relates to a model coloring device, a model coloring method, and a model coloring program.
[0002] Generally, to color a three-dimensional model created on a computer to imitate a real object (i.e., a 3D model created by a user), modeling software for three-dimensional computer graphics (3DCG), such as Blender or Maya, is used (see, for example, Patent Document 1). The 3DCG modeling software first performs UV mapping on the 3D model, generates a texture corresponding to the UV-mapped model, sets UV coordinates that associate the positions of the model and the texture, and then renders the texture. For example, when using Blender's Texture Paint mode to render a texture to be applied to a cube as a 3D model, the user performs the rendering work while referring to the real object.
[0003] Special table 2022-548608 publication
[0004] In the above-described conventional technology, when coloring a 3D model, the user must refer to an existing object while working, which results in a problem of inefficient coloring processing.
[0005] The present disclosure has been made to solve the above-mentioned conventional problems, and aims to provide a model coloring device, a model coloring method, and a model coloring program that can improve the efficiency of coloring processing for 3D models.
[0006] The model coloring device disclosed herein is characterized by having a polygon generation unit that generates a plurality of polygons that constitute a three-dimensional model that imitates an object; a data receiving unit that receives a plurality of image data and a plurality of colored point cloud data generated by photographing the object from a plurality of positions; a coordinate conversion unit that uses the plurality of image data and the three-dimensional model to coordinate convert the plurality of point cloud data into data of a common coordinate system; an alignment processing unit that aligns the vertices of the plurality of polygons with the point cloud of the point cloud data of the common coordinate system; a nearest point calculation unit that calculates nearest points that are points closest to each of the vertices of the point cloud aligned with each of the vertices of the plurality of polygons; and a color acquisition unit that color the vertices corresponding to the nearest points according to the color data of the nearest points.
[0007] The model coloring method disclosed herein is a method executed by a model coloring device, and is characterized by comprising the steps of: generating a plurality of polygons that constitute a three-dimensional model that imitates an object; receiving a plurality of colored point cloud data and a plurality of image data generated by photographing the object from a plurality of positions; using the plurality of image data and the three-dimensional model, coordinate converting the plurality of point cloud data into data in a common coordinate system; aligning the vertices of the plurality of polygons with the point cloud of the point cloud data in the common coordinate system; calculating nearest points that are points closest to each of the vertices of the point cloud aligned with each of the vertices of the plurality of polygons; and coloring the vertices corresponding to the nearest points according to the color data of the nearest points.
[0008] According to the present disclosure, the efficiency of coloring processing for 3D models can be improved.
[0009] 1 is a functional block diagram illustrating a configuration of a model coloring device according to an embodiment; FIG. 2 is a diagram illustrating an example of a hardware configuration of a model coloring device according to an embodiment; FIG. 3 is an explanatory diagram illustrating point cloud data and image data captured by a depth camera, and a 3D model to be colored based on the point cloud data; FIG. 4 is an explanatory diagram illustrating alignment of point cloud data with polygon vertex data, and coloring of the vertex data; (A) and (B) are explanatory diagrams illustrating successful and unsuccessful examples of global alignment; (A) and (B) are explanatory diagrams illustrating successful and unsuccessful examples of local alignment; and (A) and (B) are explanatory diagrams illustrating cases where local alignment between multiple depth cameras is possible and impossible.; (A) and (B) are explanatory diagrams illustrating an example of coordinate system transformation for global alignment; (A) and (B) are explanatory diagrams illustrating an example of coordinate system transformation for local alignment; (A) is a diagram illustrating polygons without polygon division and polygons with polygon division, and (B) is a diagram illustrating examples of vertex data and point cloud data without polygon division and with polygon division. 10 is a flowchart illustrating the operation of the model coloring device according to the embodiment of the present invention;
[0010] The following describes a model coloring device, a model coloring method, and a model coloring program according to embodiments, with reference to the drawings. The following embodiments are merely examples, and the embodiments can be combined as appropriate and each embodiment can be modified as appropriate.
[0011] FIG. 1 is a functional block diagram showing the configuration of a model coloring device 1 according to an embodiment. The model coloring device 1 is a device that colors a three-dimensional model that resembles an object. The model coloring device 1 is a device that can execute the model coloring method according to embodiment 1. The model coloring device 1 is, for example, a computer that can execute the model coloring program according to embodiment 1.
[0012] The model coloring device 1 prepares a three-dimensional model (i.e., a 3D model created by a user) created on a computer to imitate an existing object, and assigns color data to the vertex data of multiple polygons that make up the 3D model using colored point cloud data acquired using a depth camera 2, which is an imaging device with a distance sensor. The color data is, for example, color values such as RGB values. Generally, the 3D model may be one that animates specific parts.
[0013] As shown in FIG. 1, the model coloring device 1 has a data receiving unit 11, a polygon generating unit 12, a coordinate conversion unit 13, an alignment processing unit 14, a nearest point calculation unit 15, a color acquisition unit 16, a parameter input unit 17, and a display processing unit 18.
[0014] The data receiving unit 11 receives a plurality of colored point cloud data Pc and a plurality of image data Im generated by photographing an object from a plurality of positions. "Photographing from a plurality of positions" means acquiring a plurality of point cloud data Pc and a plurality of image data Im using a plurality of depth cameras 2, or acquiring a plurality of point cloud data Pc and a plurality of image data Im using one or a plurality of mobile depth cameras 2. A mobile depth camera is, for example, a depth camera provided on a mobile device such as an autonomous robot. The data receiving unit 11 may receive the plurality of point cloud data Pc and the plurality of image data Im via wireless communication or via a network such as the Internet.
[0015] The polygon generation unit 12 generates a plurality of polygons that constitute a 3D model to be colored. The polygons are typically triangles. The polygon generation unit 12 includes a polygon division processing unit 12a that divides a plurality of first polygons that constitute the 3D model to generate a plurality of polygons, and a polygon division determination unit 12b that determines whether to continue or stop the division performed by the polygon division processing unit 12a based on the total number of polygons generated by the polygon division processing unit 12a. For example, the polygon division determination unit 12b stops the division process when the total number of polygons in the 3D model exceeds a predetermined number (a first threshold value).
[0016] Furthermore, while the division process is ongoing, the polygon generation unit 12 performs the division process on first polygons, among the multiple first polygons that make up the 3D model, whose area is larger than a predetermined area (second threshold value).
[0017] The coordinate transformation unit 13 transforms the plurality of point cloud data Pc into data in a common coordinate system using the plurality of image data Im and a three-dimensional model. The coordinate transformation unit 13 calculates a rotation matrix R and a translation vector t that indicate the relationship between the plurality of positions of the depth camera (or between the plurality of depth cameras) by, for example, feature point matching using the plurality of image data Im, and transforms the plurality of point cloud data Pc into data in the common coordinate system using the rotation matrix R and the translation vector t.
[0018] The alignment processing unit 14 performs alignment to associate vertices of the plurality of polygons with the point cloud of the point cloud data in the common coordinate system. For example, the alignment processing unit 14 performs a first alignment (i.e., global alignment) to associate vertices of the plurality of polygons with the point cloud of the point cloud data in the common coordinate system, and after the first alignment, performs a second alignment (i.e., local alignment) to associate vertices of the plurality of polygons with the point cloud of the point cloud data in the common coordinate system.
[0019] The nearest neighbor calculation unit 15 calculates the nearest neighbor points, which are points that are closest to each of the vertices of the plurality of polygons among the point group aligned by the alignment processing unit 14 with each of the vertices of the plurality of polygons.
[0020] The parameter input unit 17 acquires the camera parameters of each of the multiple depth cameras 2. The camera parameters are input in advance to the parameter input unit 17. When the depth camera 2 moves or when it has adjustment functions such as pan, tilt, zoom, and roll, the parameter input unit 17 receives the camera parameters via wireless communication or the like.
[0021] The color acquisition unit 16 applies color (i.e., paints) to the vertex corresponding to the nearest point in accordance with the color data (i.e., color value) of the nearest point.
[0022] FIG. 2 is a diagram showing an example of the hardware configuration of the model coloring device 1. The model coloring device 1 according to the first embodiment has a processor 51 such as a CPU (Central Processing Unit) that executes a program, a memory 52 as a storage device, a non-volatile storage device 53, and an interface 54. The program includes the model coloring program according to the first embodiment. The program may be provided via a network, or may be provided by being recorded on a recording medium such as an optical disk or a magnetic disk. The model coloring device 1 may also be configured with a processing circuit such as a single circuit, a composite circuit, or an FPGA (Field Programmable Gate Array).
[0023] The non-volatile storage device 53 is a storage such as a hard disk drive (HDD) or a solid state drive (SSD). The non-volatile storage device 53 stores programs, 3D models, colored 3D models, etc. The non-volatile storage device 53 may be a part of the model coloring device 1. Alternatively, the non-volatile storage device 53 may be configured as a storage area of a cloud server, for example.
[0024] The display device 3 displays the 3D model, the point cloud data Pc, the image data Im, etc. The input device 4 includes a depth camera 2. The display device 3 may be part of the model coloring device 1. Furthermore, the depth camera 2 may be part of the model coloring device 1.
[0025] FIG. 3 is an explanatory diagram showing point cloud data Pc and image data Im captured by a depth camera 2, and a 3D model colored based on the point cloud data Pc. FIG. 3 shows an overview of the operation of a model coloring device 1 according to an embodiment. A real-world object is captured by the depth camera 2, colored point cloud data Pc corresponding to the object is generated, and image data Im is used to align the vertex data of the polygons that make up the object. RGB values are then assigned from the colored point cloud data to the vertex data. Because a 3D model created by a user is composed of nodes for each part with the purpose of animating specific locations, the model restored by the depth camera cannot be used as is.
[0026] 4 is an explanatory diagram showing the alignment of the point cloud data Pc with the vertex data of a polygon and the coloring of the vertex data. The alignment processing unit 14 aligns the vertex data of the polygon constituting the 3D model created on a computer with the point cloud data of the object acquired from the depth camera 2. Thereafter, the nearest point calculation unit 15 calculates point cloud data corresponding to the nearest point in the vertex data of the polygon, and the color acquisition unit 16 acquires the RGB values of the vertex data of the polygon.
[0027] 5A and 5B are explanatory diagrams showing successful and unsuccessful examples of global registration. Global registration between a 3D model created on a computer and a restored object has the following problem. The problem is that there are cases where global registration cannot be performed. Specifically, FIG. 5A shows an example (successful example) in which the correspondence between point cloud data and polygon vertex data can be detected, and in this case, global registration is possible. FIG. 5B shows an example (failed example) in which the correspondence between point cloud data and polygon vertex data cannot be detected, and in this case, global registration is impossible.
[0028] 6A and 6B are explanatory diagrams showing successful and unsuccessful examples of local alignment. There are cases where local alignment cannot be performed. The following problem exists in local alignment between a 3D model created on a computer and a restored object. The problem is that global alignment must be possible in order to perform local alignment. Specifically, FIG. 6A shows an example (successful example) in which the correspondence between point cloud data and polygon vertex data can be detected, and in this case, local alignment is possible. FIG. 6B shows an example (failed example) in which the correspondence between point cloud data and polygon vertex data cannot be detected, and in this case, local alignment is impossible.
[0029] 7 is an explanatory diagram showing when local alignment between multiple depth cameras is possible and when it is not possible. A method for performing global alignment will be described. In the depth camera #1 of FIG. 7, the shooting direction of the point cloud data of the depth camera #1 is the same as the line of sight direction toward the 3D model, so local alignment can be performed without performing global alignment. In the depth camera #2 of FIG. 7, the shooting direction of the point cloud data of the depth camera #2 is different from the line of sight direction toward the 3D model, so local alignment cannot be performed without performing global alignment.
[0030] 8A and 8B are explanatory diagrams showing an example of coordinate system transformation for global alignment. Fig. 8A shows how a rotation matrix R and a translation vector t, which are parameters related to the camera orientation between depth cameras, are obtained using feature point matching based on image data in order to perform global alignment. In Fig. 8A, the rotation matrix between depth cameras #1 and #3 is R 1 and the translation vector t 1 In addition, in FIG. 8A, the rotation matrix between depth cameras #1 and #2 is R 2 and the translation vector t 2It is shown that. FIG. 8(B) shows an example of estimating parameters related to the posture between depth cameras #1, #2, ... from image data using SfM (Structure from Motion) or a five-point algorithm. Feature point matching using image data is more accurate than determining a transformation matrix using point cloud data. In addition, since local alignment is ultimately performed, it is sufficient here to determine the global positional relationship between the depth cameras.
[0031] 9A and 9B are explanatory diagrams showing an example of coordinate system transformation for local alignment. FIG. 9A shows the alignment of the vertices of a polygon (black dots in the figure), the point cloud data acquired by depth camera #1 (thick circle in the figure), and the point cloud data acquired by depth camera #2 (thin circle in the figure). FIG. 9A shows the alignment of the point cloud data acquired by depth camera #1 (thick circle in the figure), the point cloud data acquired by depth camera #2 (thin circle in the figure), and the vertices of a polygon after global alignment of the point cloud data acquired by depth camera #2 (thin circle in the figure). FIG. 9B shows how local alignment becomes possible by global alignment of the point cloud data.
[0032] FIG. 10A shows polygons without polygon division and polygons with polygon division. FIG. 10B shows examples of vertex data and point cloud data without and with polygon division. To ensure proper local alignment, the polygon generation unit 12 performs a division process on first polygons of a 3D model whose polygon area is greater than a predetermined area (second threshold). That is, if the polygon area exceeds the threshold (second threshold), the polygon is divided and a new polygon is generated on the same plane. While a smaller polygon area threshold is desirable, considering display on HoloLens 2 for digitization purposes, polygons with more than 100,000 polygons cannot be displayed. Therefore, division stops when the number of polygons reaches 100,000. In this case, the polygon division determination unit 12b also determines whether to divide recursively generated polygons using a similar method.
[0033] 11 is an explanatory diagram showing the process of matching the orientation of polygon faces before division with the orientation of polygon faces generated by division. Because 3D models are basically culled before display, the following calculation must be performed to match the orientation of polygon faces before division with that of polygons generated after division. Calculating the cross product: Using vertices B, D, and E as an example, the calculation results in the following (1), (2), and (3). In the xyz Cartesian coordinate system, which is the coordinate system in the space in which polygons are arranged, the x-axis component is given a subscript x, the y-axis component is given a subscript y, and the z-axis component is given a subscript z.
[0034]
[0035] Of the cross products (2) and (3), the cross product having a value closest to the value of the cross product (1) is adopted. When the cross product (2) is adopted, the polygon generation unit 12 generates a polygon with vertices B → D → E.
[0036] 12 is a flowchart showing the operation of the model coloring device 1 according to the embodiment. First, the data receiving unit 11 receives a plurality of point cloud data Pc and a plurality of image data Im obtained by photographing an object from a plurality of positions (step S11).
[0037] The polygon generating unit 12 also generates a plurality of polygons that constitute a three-dimensional model that resembles the object, using a predetermined threshold value (steps S12 and S13).
[0038] Next, the coordinate transformation unit 13 uses the plurality of image data (Im) and the 3D model to transform the plurality of point cloud data Pc into data in a common coordinate system (steps S14 and S15).
[0039] Next, the registration processing unit 14 performs registration to associate the vertices of the plurality of polygons with the point cloud of the point cloud data in the common coordinate system (step S16).
[0040] Next, the nearest point calculation unit 15 calculates the nearest points that are points that are closest to each of the vertices of the plurality of polygons among the point group that have been aligned with each of the vertices (step S17).
[0041] Next, the color acquisition unit 16 applies a color to the vertex corresponding to the nearest point according to the color data of the nearest point (step S18).
[0042] As described above, with the model coloring device 1 according to the embodiment, when creating a 3D model that imitates an existing object, there is no need to perform rendering on the texture while referring to the object, and the coloring of the 3D model is performed automatically, thereby improving the efficiency of creation.
[0043] Furthermore, the model coloring device 1 according to the embodiment can automatically color 3D models even for objects that have sizes and shapes that cannot be captured by commercially available 3D scanners.
[0044] In particular, the model coloring device 1 according to the embodiment is suitable for creating work training data for helping beginners become proficient in a task by placing a colored 3D model in a virtual space and animating the 3D model, with the aim of supporting the mastery of a task using a 3D model on a computer.
[0045] 1 Model coloring device, 2 Depth camera, 3 Display device, 11 Data receiving unit, 12 Polygon generation unit, 12a Polygon division processing unit, 12b Polygon division determination unit, 13 Coordinate conversion unit, 14 Alignment processing unit, 15 Nearest neighbor calculation unit, 16 Color acquisition unit, 17 Parameter input unit, 18 Display processing unit, Pc Point cloud data, Im Image data.
Claims
1. A model coloring device comprising: a polygon generation unit that generates a plurality of polygons that constitute a three-dimensional model that imitates an object; a data receiving unit that receives a plurality of image data and a plurality of colored point cloud data generated by photographing the object from a plurality of positions; a coordinate conversion unit that uses the plurality of image data and the three-dimensional model to convert the plurality of point cloud data into data in a common coordinate system; an alignment processing unit that aligns the vertices of the plurality of polygons with the point cloud of the point cloud data in the common coordinate system; a nearest point calculation unit that calculates a nearest point that is the point closest to each of the vertices of the point cloud aligned with each of the vertices of the plurality of polygons; and a color acquisition unit that colors the vertex corresponding to the nearest point in accordance with the color data of the nearest point.
2. The model coloring device according to claim 1, characterized in that the polygon generation unit has: a polygon division processing unit that divides a plurality of first polygons that constitute the three-dimensional model to generate the plurality of polygons; and a polygon division judgment unit that judges whether to continue or stop the division performed by the polygon division processing unit based on the total number of the plurality of polygons generated by the polygon division processing unit.
3. The model coloring device according to claim 1, characterized in that the polygon generation unit performs a division process on first polygons, among the multiple first polygons that make up the three-dimensional model, whose area is larger than a predetermined threshold value.
4. A model coloring device as described in any one of claims 1 to 3, characterized in that the coordinate transformation unit calculates a rotation matrix and a translation vector indicating the relationship between the multiple positions by feature point matching using the multiple image data, and uses the rotation matrix and the translation vector to coordinate transform the multiple point cloud data into data in the common coordinate system.
5. A model coloring device as described in any one of claims 1 to 4, characterized in that the alignment processing unit performs a first alignment to match vertices of the multiple polygons with the point cloud of point cloud data of the common coordinate system, and after the first alignment, performs a second alignment to match vertices of the multiple polygons with the point cloud of point cloud data of the common coordinate system.
6. The model coloring device according to any one of claims 1 to 5, further comprising a plurality of depth cameras that generate the plurality of point cloud data and the plurality of image data.
7. A model coloring device according to any one of claims 1 to 5, further comprising a movable depth camera which generates the plurality of point cloud data and the plurality of image data.
8. The model coloring device according to claim 6 or 7, characterized in that the depth camera simultaneously captures the point cloud data and the image data.
9. A model coloring method executed by a model coloring device, comprising the steps of: generating a plurality of polygons constituting a three-dimensional model imitating an object; receiving a plurality of colored point cloud data generated by photographing the object from a plurality of positions and a plurality of image data; using the plurality of image data and the three-dimensional model, converting the plurality of point cloud data into data of a common coordinate system; aligning the vertices of the plurality of polygons with a point cloud of the point cloud data of the common coordinate system; calculating a nearest point that is a point closest to each of the vertices of the point cloud aligned with each of the vertices of the plurality of polygons; and coloring the vertex corresponding to the nearest point according to the color data of the nearest point.
10. A model coloring program that causes a computer to execute the following steps: generating a plurality of polygons that constitute a three-dimensional model that imitates an object; receiving a plurality of colored point cloud data and a plurality of image data generated by photographing the object from a plurality of positions; using the plurality of image data and the three-dimensional model, transforming the plurality of point cloud data into data in a common coordinate system; aligning the vertices of the plurality of polygons with the point cloud of the point cloud data in the common coordinate system; calculating a nearest point that is the point closest to each of the vertices of the point cloud aligned with each of the vertices of the plurality of polygons; and coloring the vertex corresponding to the nearest point according to the color data of the nearest point.
Citation Information
Patent Citations
System for creating mixed reality environment
JP2017227975A
Vehicle inspection system and method
JP2021520008A
Image generation device, image generation method, and program
WO2018179254A1
