Three-dimensional model creation apparatus

The three-dimensional model generation device improves 3D model accuracy by estimating depth information from 2D images using markers and converting relative distances to absolute distances, addressing the low accuracy issue in existing technologies.

JP2024143162APending Publication Date: 2024-10-11NTT DOCOMO INC +1

Patent Information

Application Number
JP2023055692
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Existing methods for generating 3D models from 2D images without LiDAR scanners result in low accuracy due to less precise estimated depth information.

Method used

A three-dimensional model generation device that estimates depth information from a 2D image using markers, calculates absolute distances based on marker shapes, and converts relative distances to absolute distances to improve model accuracy.

Benefits of technology

Enhances the accuracy of 3D models generated from 2D images by utilizing marker-based absolute distance calculations, reducing the need for direct measurement of all absolute distances and minimizing processing load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024143162000001_ABST
    Figure 2024143162000001_ABST
Patent Text Reader

Abstract

To provide a three-dimensional model creation apparatus which improves the precision of a three-dimensional model upon creating the three-dimensional model from a two-dimensional image using estimated depth information.SOLUTION: A three-dimensional model creation apparatus 10 comprises: a depth information estimation unit 112, based on a two-dimensional image DP obtained by imaging a real space RS disposed with a first marker M1 and a second marker M2 by an imaging device 30, for estimating depth information showing each relative distance from plural points on the real space RS to the imaging device 30; a first calculation unit 114 for calculating a first absolute distance from the first marker M1 to the imaging device 30 based on the shape of a first marker image MP1; a second calculation unit 115 for calculating a second absolute distance from the second marker M2 to the imaging device 30 based on the shape of a second marker image MP2; and a conversion unit 116 for converting the plural relative distances into the plural absolute distances based on the first absolute distance and the second absolute distance.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a three-dimensional model generating device. [Background technology]

[0002] Conventionally, techniques have been used to generate 3D models based on 2D images generated by 3D scanners or depth cameras such as LiDAR scanners.

[0003] For example, Patent Document 1 discloses a technique for generating a three-dimensional model based on a two-dimensional image generated by a three-dimensional scanner or a depth camera. In the technique disclosed in Patent Document 1, a change operation on a virtual object is mapped onto the two-dimensional image, and the three-dimensional model is changed based on the two-dimensional image changed by the mapping. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] Patent Publication No. 2022-092742 Summary of the Invention [Problem to be solved by the invention]

[0005] When generating a 3D model without using a measuring device such as a LiDAR scanner, it is possible to adopt a method of estimating depth from a 2D image and generating a 3D model of the space using the estimated depth information. However, the estimated depth information has a lower accuracy than when using a measuring device such as a LiDAR scanner, which results in a problem of low accuracy of the 3D model.

[0006] Therefore, an object of the present invention is to improve the accuracy of a 3D model when the 3D model is generated from a 2D image using estimated depth information. [Means for solving the problem]

[0007] A three-dimensional model generating device according to a first preferred aspect of the present invention includes a depth information estimation unit that estimates depth information indicating each relative distance from a plurality of points in the real space that correspond one-to-one to a plurality of pixels of the two-dimensional image to the imaging device based on a two-dimensional image obtained by imaging a real space with an imaging device; a reception unit that receives a first position indicating a position of a first point on the two-dimensional image specified by a user and a second position indicating a position of a second point on the two-dimensional image; an acquisition unit that acquires a first absolute distance from a first feature point in the real space corresponding to the first point to the imaging device and a second absolute distance from a second feature point in the real space corresponding to the second point to the imaging device; a conversion unit that converts a plurality of relative distances that correspond one-to-one to the plurality of pixels into a plurality of absolute distances based on the first position and the first absolute distance, as well as the second position and the second absolute distance; and a generation unit that generates a three-dimensional model indicating the real space based on the plurality of absolute distances converted by the conversion unit and the two-dimensional image.

[0008] A three-dimensional model generating device according to a second preferred aspect of the present invention includes: a depth information estimation unit that estimates depth information indicating each relative distance from a plurality of points in the real space that correspond one-to-one to a plurality of pixels of the two-dimensional image to the imaging device, based on a two-dimensional image obtained by an imaging device capturing a real space in which a first marker and a second marker are arranged; a recognition unit that recognizes a first marker image indicating the first marker and a second marker image indicating the second marker included in the two-dimensional image; a first calculation unit that calculates a first absolute distance from the first marker to the imaging device, based on a shape of the first marker image; a second calculation unit that calculates a second absolute distance from the second marker to the imaging device, based on the shape of the second marker image; a conversion unit that converts a plurality of relative distances that correspond one-to-one to the plurality of pixels into a plurality of absolute distances, based on the first absolute distance and the second absolute distance; and a generation unit that generates a three-dimensional model indicating the real space, based on the plurality of absolute distances converted by the conversion unit and the two-dimensional image.

[0009] A three-dimensional model generating device according to a third preferred embodiment of the present invention includes a depth information estimation unit that estimates depth information indicating relative distances from a plurality of points in the real space that correspond one-to-one to a plurality of pixels in the two-dimensional image to the imaging device, based on a two-dimensional image obtained by an imaging device capturing a real space including a plane on which a first marker is arranged; a recognition unit that recognizes a first marker image that is included in the two-dimensional image and indicates the first marker; a detection unit that detects a partial image that corresponds to the plane from within the two-dimensional image; and a first marker image that indicates an absolute distance from the first marker to the imaging device, based on a shape of the first marker image. the first calculation unit calculating an absolute distance, three-dimensional coordinates of the first marker, and orientation information indicating the orientation of the first marker; a second calculation unit calculating a second absolute distance indicating an absolute distance from a point on the plane corresponding to one pixel of the partial image to the imaging device based on the three-dimensional coordinates and the orientation information of the first marker; a conversion unit converting a plurality of relative distances that correspond one-to-one to the plurality of pixels into a plurality of absolute distances based on the first absolute distance and the second absolute distance; and a generation unit generating a three-dimensional model indicating the real space based on the plurality of absolute distances converted by the conversion unit and the two-dimensional image.

[0010] A three-dimensional model generating device according to a fourth preferred embodiment of the present invention includes a depth information estimation unit that estimates depth information indicating relative distances from a plurality of points in the real space that correspond one-to-one to a plurality of pixels in the two-dimensional image to the imaging device, based on a two-dimensional image obtained by an imaging device capturing a real space including a plane on which a first marker is arranged; a recognition unit that recognizes a first marker image that indicates the first marker and is included in the two-dimensional image; a detection unit that detects a partial image that corresponds to the plane from within the two-dimensional image; and a first absolute distance that indicates an absolute distance from the first marker to the imaging device, the three-dimensional coordinates of the first marker, and the three-dimensional coordinates of the first marker, based on a shape of the first marker image. the first marker and the imaging device based on the 3D coordinates of the first marker and the orientation information; a conversion unit that converts a plurality of relative distances that correspond one-to-one to the plurality of pixels into a plurality of absolute distances based on at least one of the one or more absolute distances and the first absolute distance; and a generation unit that generates a three-dimensional model that indicates the real space based on the absolute distance calculated by the second calculation unit, the absolute distances from the plurality of absolute distances excluding the absolute distance calculated by the second calculation unit, and the two-dimensional image. Effect of the Invention

[0011] According to the present invention, when a three-dimensional model is generated from a two-dimensional image using estimated depth information, the accuracy of the three-dimensional model can be improved. [Brief description of the drawings]

[0012] [Figure 1] FIG. 1 shows the overall configuration of a generation system 1. [Diagram 2] FIG. 1 is a block diagram showing an example of the configuration of a three-dimensional model generating device 10. [Figure 3A] 3 is a diagram showing an example of a two-dimensional image DP received from the imaging device 30. FIG. [Figure 3B]13 is a diagram showing another example of a two-dimensional image DP received from the imaging device 30. FIG. [Figure 4] A figure showing an example of a depth map DM output from the first learned model LM1. [Diagram 5] FIG. 2 is a diagram showing the XYZ coordinate system which is a camera coordinate system. [Figure 6] 4 is a diagram showing an example of absolute distances from markers M1 and M2 to an imaging device 30. FIG. [Figure 7] 13 is a diagram showing an example of the inverse of the relative distance from the markers M1 and M2 to the imaging device 30. FIG. [Figure 8] 4 is a flowchart showing an example of the operation of the three-dimensional model generating device 10. [Figure 9] FIG. 1 is a block diagram showing an example of the configuration of a three-dimensional model generating device 10A. [Figure 10] FIG. 4 is a diagram showing an example of a partial image SG1. [Figure 11] 11 is a diagram showing a method for calculating the absolute distance between one or more points on a plane on which a marker M1 is placed. [Figure 12] 11 is a diagram showing a method for calculating the absolute distance between one or more points on a plane on which a marker M1 is placed. [Figure 13] 11 is a diagram showing a method for calculating the absolute distance between one or more points on a plane on which a marker M1 is placed. [Figure 14] 11 is a diagram showing a method for calculating the absolute distance between one or more points on a plane on which a marker M1 is placed. [Figure 15] 11 is a diagram showing a method for calculating the absolute distance between one or more points on a plane on which a marker M1 is placed. [Figure 16] 11 is a diagram showing a method for calculating the absolute distance between one or more points on a plane on which a marker M1 is placed. [Figure 17] 11 is a diagram showing a method for calculating the absolute distance between one or more points on a plane on which a marker M1 is placed. [Figure 18] 11 is a diagram showing a method for calculating the absolute distance between one or more points on a plane on which a marker M1 is placed. [Figure 19] 11 is a diagram showing a method for calculating the absolute distance between one or more points on a plane on which a marker M1 is placed. [Figure 20]4 is a flowchart showing an example of the operation of the three-dimensional model generating device 10A. [Figure 21] FIG. 2 is a block diagram showing an example of the configuration of a three-dimensional model generating device 10B. [Figure 22] 4 is a flowchart showing an example of the operation of the three-dimensional model generating device 10B. [Diagram 23] FIG. 2 is a block diagram showing an example of the configuration of a three-dimensional model generating device 10C. [Figure 24] 4 is a flowchart showing an example of the operation of the three-dimensional model generating device 10C. [Diagram 25] FIG. 2 is a block diagram showing an example of the configuration of a three-dimensional model generating device 10D. [Figure 26] 13A and 13B are diagrams showing examples of angles formed between a plane on which a marker M1 is placed and another plane. [Figure 27] 4 is a flowchart showing an example of the operation of the three-dimensional model generating device 10D. [Figure 28] 13 is a diagram showing a method of calculating the three-dimensional coordinates of point B according to Modification 1. FIG. [Figure 29] FIG. 2 is a block diagram showing an example of the configuration of a three-dimensional model generating device 10E. [Diagram 30] 3 is a diagram showing an example of a two-dimensional image DP received from the imaging device 30. FIG. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] 1: First embodiment Hereinafter, the configuration of a generation system 1 including a three-dimensional model generation device 10 according to a first embodiment of the present invention will be described with reference to FIGS.

[0014] 1-1: Configuration of the first embodiment 1-1-1: Overall composition FIG. 1 shows the overall configuration of the generation system 1. As shown in FIG. 1, the generation system 1 includes a three-dimensional model generation device 10 and an imaging device 30. The three-dimensional model generation device 10 and the imaging device 30 are connected to each other so as to be able to communicate with each other via a communication network NET. The imaging device 30 is a device that generates a two-dimensional image DP by imaging a real space. The imaging device 30 corresponds to a surveillance camera installed in, for example, a convenience store, a commercial facility, or a public facility. The imaging device 30 includes a lens, an imaging element, a processing circuit, and a communication circuit. Light incident through the lens forms an image on the imaging element. The imaging element converts the light into an electrical signal. The processing circuit amplifies the signal output from the imaging element and performs DA conversion on the amplified signal to output image data representing the two-dimensional image DP. The communication circuit transmits the image data to the three-dimensional model generation device 10 via the communication network NET. Instead of acquiring image data via the communication network NET, the three-dimensional model generation device 10 may acquire image data by reading image data recorded on a recording medium.

[0015] The three-dimensional model generating device 10 generates a three-dimensional model showing a real space based on a two-dimensional image DP obtained by capturing an image by an imaging device 30. The three-dimensional model expresses structures and objects arranged in the real space with three-dimensional data. The structures include, for example, doors, walls, and floors. The objects include, for example, fixtures and products.

[0016] In this embodiment, the three-dimensional model generating device 10 estimates the relative distances from multiple points in real space corresponding to the two-dimensional image DP generated by the imaging device 30 to the imaging device 30 based on the two-dimensional image DP. The three-dimensional model generating device 10 also converts the relative distances of the multiple points into absolute distances of the multiple points by using AR markers arranged in the real space. Furthermore, the three-dimensional model generating device 10 generates a three-dimensional model based on the absolute distances of the multiple points and the two-dimensional image DP.

[0017] 1-1-2: Configuration of the 3D model generation device 2 is a block diagram showing an example of the configuration of the three-dimensional model generating device 10. The three-dimensional model generating device 10 includes a processing device 11, a storage device 12, an input device 13, a communication device 14, and a display 15. The elements of the three-dimensional model generating device 10 are connected to each other by one or more buses for communicating information.

[0018] The processing device 11 is a processor that controls the entire 3D model generating device 10. The processing device 11 is configured, for example, using one or more chips. The processing device 11 is also configured, for example, using a central processing unit (CPU) including an interface with peripheral devices, an arithmetic unit, and a register. Some or all of the functions of the processing device 11 may be realized by hardware such as a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), a PLD (Programmable Logic Device), and an FPGA (Field Programmable Gate Array). The processing device 11 executes various processes in parallel or sequentially.

[0019] The storage device 12 is a recording medium that can be read and written by the processing device 11. The storage device 12 also stores a plurality of programs including a control program PR1 executed by the processing device 11. The storage device 12 functions as a work area for the processing device 11. The storage device 12 also stores a first trained model LM1. The first trained model LM1 is used by a depth information estimation unit 112 described later to estimate depth information indicating each relative distance to the imaging device 30 from a plurality of points in real space that correspond one-to-one to a plurality of pixels in a two-dimensional image.

[0020] The first trained model LM1 is generated in a training phase by training a plurality of pieces of training data, each of which is a pair of a two-dimensional image captured in real space and a depth map indicating a plurality of relative distances that correspond one-to-one to a plurality of pixels included in the two-dimensional image.

[0021] Moreover, the first trained model LM1 is generated outside the three-dimensional model generating device 10. The first trained model LM1 is generated, for example, in a server (not shown). In this case, the three-dimensional model generating device 10 acquires the first trained model LM1 from the server (not shown) via the communication network NET.

[0022] The input device 13 accepts operations from an administrator of the 3D model generating device 10. For example, the input device 13 includes a keyboard, a touch pad, a touch panel, or a pointing device such as a mouse. Here, when the input device 13 includes a touch panel, it may also serve as the display 15.

[0023] The communication device 14 is hardware as a transmitting / receiving device for communicating with other devices. The communication device 14 is also called, for example, a network device, a network controller, a network card, and a communication module. The communication device 14 may include a connector for wired connection. The communication device 14 may also include a wireless communication interface. Examples of the connector and interface circuit for wired connection include products that comply with wired LAN, IEEE1394, and USB. Examples of the wireless communication interface include products that comply with wireless LAN, Bluetooth (registered trademark), and the like.

[0024] The display 15 is a device for displaying images. The display 15 displays various images under the control of the processing unit 11.

[0025] In the above configuration, the processing device 11 reads out the control program PR1 from the storage device 12. The processing device 11 executes the read out control program PR1 to function as a communication control unit 111, a depth information estimation unit 112, a recognition unit 113, a first calculation unit 114, a second calculation unit 115, a conversion unit 116, and a generation unit 117.

[0026] The communication control unit 111 causes the communication device 14 to receive, from the imaging device 30, a two-dimensional image of the real space.

[0027] FIG. 3A is a diagram showing an example of a two-dimensional image DP received from the imaging device 30. The two-dimensional image DP is an image generated by the imaging device 30 capturing an image of the real space RS. In the example shown in FIG. 3A, the real space RS includes a side wall SW, an opposing wall FW, and a floor surface FL. Also, markers M1 and M2 are placed in the real space RS. The markers M1 and M2 are AR markers. Marker M1 is placed on the side wall SW. Marker M2 is placed on the opposing wall FW facing the imaging device 30. Marker M1 is an example of a "first marker." Marker M2 is an example of a "second marker."

[0028] 2 estimates, based on the two-dimensional image DP, depth information indicating each relative distance to the imaging device 30 from a plurality of points in the real space RS that correspond one-to-one to a plurality of pixels in the two-dimensional image DP. Specifically, the depth information estimation unit 112 inputs the two-dimensional image DP to the first trained model LM1, thereby acquiring a depth map output from the first trained model LM1.

[0029] Fig. 4 is a diagram showing an example of a depth map DM. The depth map DM is output from the first trained model LM1 as a result of the depth information estimation unit 112 inputting the two-dimensional image DP shown in Fig. 3 to the first trained model LM1. The depth map DM shown in Fig. 4 is expressed using grayscale. In the depth map DM, pixels corresponding to areas located in the back as viewed from the imaging device 30 are expressed darker than pixels corresponding to areas located in the front.

[0030] The recognition unit 113 recognizes the marker images MP1 and MP2 included in the two-dimensional image DP. The marker image MP1 showing the marker M1 is an example of a "first marker image." The marker image MP2 showing the marker M2 is an example of a "second marker image." The markers M1 and M2 include black and white patterns. The pattern of the marker M1 and the pattern of the marker M2 may be the same or different from each other. The recognition unit 113 can recognize each of the marker images MP1 and MP2 by using a general image recognition method. For example, the recognition unit 113 may binarize the two-dimensional image DP and detect the pattern of the marker M1 and the pattern of the marker M2 from the binarized two-dimensional image DP by pattern matching.

[0031] The first calculation unit 114 calculates the absolute distance from the marker M1 to the imaging device 30 based on the shape of the marker image MP1. The absolute distance means the distance from the center point of the marker to the focal point of the imaging device 30. The absolute distance from the marker M1 to the imaging device 30 is an example of a "first absolute distance." Here, the "shape of the marker image MP1" includes the coordinates of the four corners of the marker image MP1 on the two-dimensional image DP.

[0032] FIG. 5 is a diagram showing a camera coordinate system in the real space RS. As shown in FIG. 5, the first calculation unit 114 sets a camera coordinate system whose origin is the position of the imaging device 30. The origin of the camera coordinate system is, for example, the focal point of the optical system of the imaging device 30. Specifically, the first calculation unit 114 sets an axis along the optical axis of the imaging device 30 as the Z axis, an X axis perpendicular to the Z axis, and a Y axis perpendicular to the Z axis. The X axis and the Y axis are mutually perpendicular. In addition, the X axis is parallel to the horizontal axis of the two-dimensional image DP. The Y axis is parallel to the vertical axis of the two-dimensional image DP.

[0033] 2, the first calculation unit 114 acquires the (X, Y) coordinate values ​​of the four corner points (four vertices) of the marker image MP1 in the two-dimensional image DP. The (X, Y) coordinate values ​​are expressed in an image coordinate system on the two-dimensional image DP. The first calculation unit 114 calculates the absolute distance from the marker M1 to the imaging device 30 in the real space RS based on the (X, Y) coordinate values ​​of the four corner points. More specifically, the absolute distance is calculated using the internal parameters of the imaging device 30 and the (X, Y) coordinate values ​​of the four corner points. The absolute distance indicates, for example, the distance from the center of the marker M1 to the focal point of the lens of the imaging device 30. The internal parameters reflect the optical characteristics of the imaging device 30, such as the angle of view and lens distortion.

[0034] The size of the first marker M1 is known, which is the vertical length and horizontal length of the first marker M1. Furthermore, the lengths of the four sides of the marker image MP1 are calculated from the (X, Y) coordinate values ​​of the four corner points of the marker image MP1. The first calculation unit 114 may calculate the absolute distance based on the size of the first marker M1, the lengths of the four sides of the marker image MP1, and internal parameters.

[0035] The second calculation unit 115 calculates the absolute distance from the marker M2 to the imaging device 30 based on the shape of the marker image MP2 by using a method similar to that used by the first calculation unit 114. The absolute distance from the marker M2 to the imaging device 30 is an example of a "second absolute distance."

[0036] The conversion unit 116 converts a plurality of relative distances that correspond one-to-one to a plurality of pixels of the two-dimensional image DP into a plurality of absolute distances based on the absolute distance from the marker M1 to the imaging device 30 and the absolute distance from the marker M2 to the imaging device 30.

[0037] Specifically, the conversion unit 116 first calculates parameters for converting into the absolute distance from the marker M1 to the image capture device 30 and the absolute distance from the marker M2 to the image capture device 30.

[0038] Fig. 6 is a diagram showing an example of the absolute distance from the markers M1 and M2 to the imaging device 30. As shown in Fig. 6, for example, it is assumed that the absolute distance from the marker M1 to the imaging device 30 is 497 cm. Also, it is assumed that the absolute distance from the marker M2 to the imaging device 30 is 763 cm. Fig. 7 is a diagram showing an example of the reciprocal of the relative distance from the markers M1 and M2 to the imaging device 30. As shown in Fig. 7, it is assumed that the reciprocal of the relative distance from the marker M1 to the imaging device 30 is 14.22. Also, it is assumed that the reciprocal of the relative distance from the marker M2 to the imaging device 30 is 4.88.

[0039] If the absolute distance is Dabs and the relative distance is Drel, the following formula (1) holds between Dabs and Drel. 1 / Dabs=a / Drel+b Formula (1) Here, a is a parameter related to the scale, and b is a parameter related to the shift.

[0040] When the absolute distance and the relative distance of each of the markers M1 and M2 are substituted into the formula (1), the following formulas (2) and (3) are established. 1 / 4.97[m]=a×14.22+b Formula (2) 1 / 7.63[m]=a×4.88+b Formula (3)

[0041] The conversion unit 116 calculates parameters a=0.008, b=0.094 by solving the simultaneous equations consisting of the formula (2) and the formula (3). The conversion unit 116 obtains the following formula (4) by substituting the parameters a=0.008, b=0.094 into the formula (1). 1 / Dabs=0.008 / Drel+0.094 Formula (4)

[0042] Equation (4) is valid for all points in the real space RS that correspond one-to-one to the pixels included in the two-dimensional image DP. Therefore, the conversion unit 116 can convert the relative distances that correspond one-to-one to the pixels included in the two-dimensional image DP into absolute distances by using Equation (4). In addition, if the relative distance is proportional to the absolute distance, the relative distance can be converted into another relative distance by using Equation (1).

[0043] The conversion unit 116 may calculate parameters based on the absolute distances and relative distances of the markers M1 and M2, as well as the absolute distances and relative distances of other markers. For example, as shown in FIG. 3B, in addition to the markers M1 and M2, a marker M3 may be placed on the opposing wall FW, and a marker M4 may be placed on the floor surface FL. In this case, the processing device 11 calculates the absolute distance from the marker M3 to the imaging device 30 and the absolute distance from the marker M4 to the imaging device 30, similar to the first calculation unit 114. The conversion unit 116 sets four equations similar to the equations (2) and (3) based on the absolute distances and relative distances of the markers M1 to M4. The conversion unit 116 may calculate a and b as approximate values ​​of the solutions of the four equations. The more equations the conversion unit 116 uses, the more accurately it can set the equation (1) that converts a plurality of relative distances that correspond one-to-one to a plurality of pixels included in the two-dimensional image DP into a plurality of absolute distances. That is, the conversion unit 116 converts a plurality of relative distances into a plurality of absolute distances based on the first absolute distance and the second absolute distance, and "based on the first absolute distance and the second absolute distance" means "based at least on the first absolute distance and the second absolute distance."

[0044] 2, the generation unit 117 generates a three-dimensional model representing the real space RS based on the two-dimensional image DP and the multiple absolute distances converted by the conversion unit 116. The generation unit 117 may generate the three-dimensional model using, for example, a learning model that has been trained by machine learning on the relationship between the multiple absolute distances, the two-dimensional image, and the three-dimensional model.

[0045] When the generation unit 117 generates a three-dimensional model representing the real space RS based on the two-dimensional image DP, if a general method is used, fluctuations, i.e., unevenness, may occur in the three-dimensional model at locations corresponding to straight lines and planes in the real space RS. Therefore, it is preferable for the generation unit 117 to represent the generated three-dimensional model using voxels, which are unit spaces in the shape of a cube or a rectangular parallelepiped.

[0046] 1-2: Operation of the First Embodiment FIG. 8 is a flowchart showing an example of the operation of the three-dimensional model generating device 10.

[0047] In step S1, the processing device 11 functions as a communication control unit 111. The processing device 11 causes the communication device 14 to receive, from the imaging device 30, a two-dimensional image DP obtained by capturing an image of the real space RS.

[0048] In step S2, the processing device 11 functions as a depth information estimation unit 112. The processing device 11 estimates depth information indicating each relative distance to the imaging device 30 from a plurality of points in the real space RS that correspond one-to-one to a plurality of pixels in the two-dimensional image DP, based on the two-dimensional image DP.

[0049] In step S3, the processing device 11 functions as a recognition unit 113. The processing device 11 recognizes the marker images MP1 to MP2, which are included in the two-dimensional image DP and indicate the markers M1 to M2.

[0050] In step S4, the processing device 11 functions as the first calculation unit 114. The processing device 11 calculates the absolute distance from the marker M1 to the imaging device 30 based on the shape of the marker image MP1.

[0051] In step S5, the processing device 11 functions as the second calculation unit 115. The processing device 11 calculates the absolute distance from the marker M2 to the imaging device 30 based on the shape of the marker image MP2.

[0052] In step S6, the processing device 11 functions as the conversion unit 116. The processing device 11 converts a plurality of relative distances, which correspond one-to-one to a plurality of pixels of the two-dimensional image DP, into a plurality of absolute distances, based on the absolute distance from the marker M1 to the imaging device 30 and the absolute distance from the marker M2 to the imaging device 30.

[0053] In step S7, the processing device 11 functions as the generation unit 117. The processing device 11 generates a three-dimensional model representing the real space RS, based on the multiple absolute distances converted in step S6 and image information representing the two-dimensional image DP.

[0054] 1-3: Advantages of the First Embodiment According to the above description, the three-dimensional model generating device 10 as a three-dimensional model generating device includes a depth information estimation unit 112, a recognition unit 113, a first calculation unit 114, a second calculation unit 115, a conversion unit 116, and a generation unit 117. The depth information estimation unit 112 estimates depth information indicating each relative distance to the imaging device 30 from a plurality of points in the real space RS that correspond one-to-one to a plurality of pixels of the two-dimensional image DP based on a two-dimensional image DP obtained by the imaging device 30 capturing a real space RS in which a marker M1 as a first marker and a marker M2 as a second marker are arranged. The recognition unit 113 recognizes a marker image MP1 as a first marker image indicating the marker M1 included in the two-dimensional image DP, and a marker image MP2 as a second marker image indicating the marker M2. The first calculation unit 114 calculates a first absolute distance from the marker M1 to the imaging device 30 based on the shape of the marker image MP1. The second calculation unit 115 calculates a second absolute distance from the marker M2 to the imaging device 30 based on the shape of the marker image MP2. The conversion unit 116 converts a plurality of relative distances having one-to-one correspondence with a plurality of pixels into a plurality of absolute distances based on the first absolute distance and the second absolute distance. The generation unit 117 generates a three-dimensional model indicating the real space RS based on the plurality of absolute distances converted by the conversion unit 116 and image information indicating the two-dimensional image DP.

[0055] Since the three-dimensional model generating device 10 has the above configuration, it generates a three-dimensional model based on each absolute distance from a plurality of points in the real space RS that correspond one-to-one to a plurality of pixels that constitute the two-dimensional image DP to the imaging device 30 and the two-dimensional image DP. By generating a three-dimensional model based on the absolute distance, it is possible to generate a three-dimensional model that imitates the real space at an absolute scale. In addition, each relative distance estimated by the depth information estimation unit 112 has lower accuracy than the absolute distance calculated based on the shape of the marker image. Therefore, the three-dimensional model generating device 10 can increase the accuracy of the three-dimensional model compared to the case where a three-dimensional model is generated based on each relative distance from a plurality of points in the real space RS that correspond one-to-one to a plurality of pixels that constitute the two-dimensional image DP to the imaging device 30 and the two-dimensional image DP. In addition, the conversion unit 116 converts the plurality of relative distances that correspond one-to-one to a plurality of pixels into a plurality of absolute distances based on the first absolute distance and the second absolute distance, so there is no need to calculate all absolute distances from a plurality of points in the real space RS to the imaging device 30 using a marker. Therefore, the three-dimensional model generating device 10 can reduce the effort required to calculate the absolute distance.

[0056] Moreover, in the three-dimensional model generating device 10, the conversion unit 116 calculates parameters for converting the relative distance into an absolute distance based on the first absolute distance and the second absolute distance, and converts a plurality of relative distances that correspond one-to-one to a plurality of pixels into a plurality of absolute distances using the calculated parameters.

[0057] Since the 3D model generating device 10 has the above-mentioned configuration, it is possible to reduce the processing load by collectively converting multiple relative distances that correspond one-to-one to multiple pixels into multiple absolute distances, rather than directly measuring all of the multiple absolute distances that correspond one-to-one to multiple pixels.

[0058] 2: Second embodiment The configuration of a generation system 1 including a 3D model generation device 10A according to a second embodiment of the present invention will be described. The generation system 1 according to the second embodiment is configured similarly to the generation system 1 according to the first embodiment, except that it includes a 3D model generation device 10A instead of the 3D model generation device 10. In the following, for the sake of simplicity of explanation, among the components included in the 3D model generation device 10A, the same components as those included in the 3D model generation device 10 are designated by the same reference numerals, and explanations of their functions may be omitted.

[0059] The three-dimensional model generating device 10 according to the first embodiment places a marker M1 and a marker M2 in the real space RS, and calculates the absolute distance from the marker M1 to the image capturing device 30 and the absolute distance from the marker M2 to the image capturing device 30. The parameters a and b in the formula (1) are calculated based on two absolute distances corresponding to the markers M1 and M2 and two relative distances corresponding to the markers M1 and M2, and the conversion unit 116 converts a plurality of relative distances into a plurality of absolute distances using the formula (1). In contrast, the three-dimensional model generating device 10A according to the second embodiment is different from the three-dimensional model generating device 10 according to the first embodiment in that it detects a plane on which the marker M1 placed in the real space RS is placed, and directly calculates absolute distances for one or more points belonging to the detected plane without changing the relative distances into absolute distances.

[0060] 2-1: Configuration of the second embodiment 9 is a block diagram showing an example of the configuration of a three-dimensional model generation device 10 A. Compared to the three-dimensional model generation device 10, the three-dimensional model generation device 10 A includes a processing device 11 A instead of the processing device 11 and a storage device 12 A instead of the storage device 12.

[0061] The storage device 12A stores a control program PR1A instead of the control program PR1, as compared with the storage device 12. The storage device 12A also stores a second trained model LM2 in addition to the first trained model LM1. The second trained model LM2 is used by a detection unit 118, which will be described later, to detect, in the two-dimensional image DP, a plurality of partial images that correspond one-to-one to a plurality of planes included in the real space RS.

[0062] The second trained model LM2 is generated by training training data in a training phase. The training data used to generate the second trained model LM2 includes a plurality of pairs of a two-dimensional image DP captured in a real space RS and a partial image map showing a plurality of partial images in one-to-one correspondence with a plurality of planes included in the real space RS in the two-dimensional image DP.

[0063] The second trained model LM2 is generated outside the three-dimensional model generating device 10A. The second trained model LM2 is preferably generated in a server (not shown). In this case, the three-dimensional model generating device 10A acquires the second trained model LM2 from the server (not shown) via the communication network NET.

[0064] The processing device 11A reads out the control program PR1A from the storage device 12A. The processing device 11A executes the read out control program PR1A to function as a communication control unit 111, a depth information estimation unit 112, a recognition unit 113, a detection unit 118, a first calculation unit 114A, a second calculation unit 115, a conversion unit 116A, and a generation unit 117A. That is, the processing device 11A has the same communication control unit 111, the depth information estimation unit 112, the recognition unit 113, the second calculation unit 115, and the conversion unit 116 as the processing device 11. The processing device 11A also has the first calculation unit 114A instead of the first calculation unit 114 provided in the processing device 11, the conversion unit 116A instead of the conversion unit 116, and the generation unit 117A instead of the generation unit 117. Furthermore, the processing device 11A has a detection unit 118 in addition to these functional blocks.

[0065] The detection unit 118 detects one or more partial images from the two-dimensional image DP that correspond one-to-one to one or more planes existing in the real space RS. Although the method of detecting the partial images is arbitrary, in this embodiment, the second trained model LM2 is used. Specifically, the detection unit 118 inputs the two-dimensional image DP to the second trained model LM2 and acquires a partial image map output from the second trained model LM2. The partial image map indicates one or more planes included in the two-dimensional image DP. For example, based on the two-dimensional image DP shown in FIG. 3A, the detection unit 118 detects a partial image corresponding to the side wall SW, which is a plane on which the marker M1 is arranged, a partial image corresponding to the opposing wall FW, and a partial image corresponding to the floor surface FL. Furthermore, the detection unit 118 detects a partial image corresponding to the plane on which the marker M1 is arranged from one or more partial images included in the partial image map.

[0066] Fig. 10 is a diagram showing an example of a partial image SG1 corresponding to a plane on which the marker M1 is arranged, detected by the detection unit 118. In the two-dimensional image DP shown in Fig. 10, the hatched area is the partial image SG1.

[0067] Similar to the first calculation unit 114, the first calculation unit 114A calculates the absolute distance from the marker M1 to the imaging device 30 based on the shape of the marker image MP1. Furthermore, the first calculation unit 114A calculates orientation information indicating the orientation of the marker M1 and the three-dimensional coordinates of the center point M of the marker M1 expressed in the camera coordinate system based on the shape of the marker image MP1. The orientation information is information indicating the inclination of a main plane included in the marker M1 in the camera coordinate system. Specifically, the orientation information is represented by a rotation matrix that rotates a unit vector in the Z-axis direction in the camera coordinate system.

[0068] Furthermore, the first calculation unit 114A calculates absolute distances of one or more points on the plane on which the marker M1 is placed, using posture information indicating the posture of the marker M1 and the three-dimensional coordinates of the center point M of the marker M1 expressed in the camera coordinate system. The number of absolute distances calculated by the first calculation unit 114A is arbitrary. When the partial image SG1 is composed of N pixels, the number of absolute distances is 1 or more and N or less. That is, the first calculation unit 114A may calculate absolute distances for all pixels that constitute the partial image SG1.

[0069] 11 to 19 are diagrams showing a method for calculating, by the first calculation unit 114A, the absolute distance between one or more points on the plane on which the marker M1 is placed.

[0070] The calculation method is outlined as follows. A plane including the center point M of the marker M1 shown in FIG. 11 and parallel to the XZ plane of the camera coordinate system is defined as the first plane. The first calculation unit 114A calculates the three-dimensional coordinates of a point A1 that is moved by a distance d from the marker M1 on a straight line where the first plane intersects with the side wall SW, which is the plane on which the marker M1 is arranged. Next, a plane including the point A1 and parallel to the XY plane of the camera coordinate system is defined as the second plane. The first calculation unit 114A calculates the three-dimensional coordinates of a point B1 that is moved by a distance e from the point A1 on a straight line where the side wall SW, on which the marker M1 is arranged, intersects with the second plane. By appropriately setting the distances d and e, the point B1 can be any point on the side wall SW. The first calculation unit 114A calculates the absolute distance of the point B1 based on the three-dimensional coordinates of the point B1.

[0071] The coordinates of the center point M of the marker M1 are (a, b, c). The coordinates (a, b, c) are expressed in the camera coordinate system. First, the first calculation unit 114A calculates a unit vector (v, u, w) in the normal direction of the main plane of the marker M1 shown in FIG. 13 by multiplying the unit vector in the Z-axis direction shown in FIG. 12 by a rotation matrix indicated by the posture information of the marker M1. As shown in FIG. 14, the first calculation unit 114A calculates the coordinates (a+v, b+u, c+w) of a point P1 moved by the unit vector in the normal direction from the center point M of the marker M1 by adding the unit vector in the normal direction of the main plane of the marker M1 to the coordinates (a, b, c) of the center point M of the marker M1.

[0072] Next, the first calculation unit 114A calculates the angle of the side wall SW in the XZ plane using the (x, z) components of a three-dimensional vector from the coordinates (a, b, c) of the center point M of the marker M1 to the coordinates (a+v, b+u, c+w) of the point P1. That is, the first calculation unit 114A calculates the angle of the side wall SW in the XZ plane using a two-dimensional vector from the center point M(x, z) = (a, c) of the marker M1 to the point P1(x, z) = (a+v, c+w) in the XZ plane of the camera coordinate system. Similarly, the first calculation unit 114A calculates the angle of the side wall SW in the XY plane using the (x, y) components of a three-dimensional vector from the center point (x, y, z) = (a, b, c) of the marker M1 to the point P1(x, y, z) = (a+v, b+u, c+w). That is, the first calculation unit 114A calculates the angle of the side wall SW in the XY plane using a two-dimensional vector from the center point M(x, y) = (a, b) of the marker M1 to the point P1(x, y) = (a + v, b + u) in the XY plane of the camera coordinate system.

[0073] Specifically, as shown in FIG. 15, the first calculator 114A sets a point Q1 in the XZ plane, which is moved from the center point (x, z)=(a, c) of the marker M1 by a unit vector in the X-axis direction. The coordinate value of the point Q1 in the XZ plane is (x, z)=(a+1, c). The vector from the marker M1 to the point Q1 is α1, and the vector from the marker M1 to the point Q1 is β1. The angle between the side wall SW and the vector α1 is θ1, and the angle between the vector α1 and the vector β1 is θ1'. The vector β1 is a normal vector to the main plane of the marker M1, and since the marker M1 is disposed on the side wall SW, the vector β1 is a normal vector to the side wall SW. Therefore, the sum of θ1 and θ1' is π / 2. For convenience of explanation, the angle between the side wall SW and the vector β1 in FIG. 15 is not π / 2.

[0074] The first calculation unit 114A calculates the value of θ1′ by using the following formula (5) based on the inner product formula.

number

[0075] The first calculation unit 114A calculates the angle θ1 of the side wall SW in the XZ plane by subtracting θ1′ calculated using the formula (5) from π / 2.

[0076] Similarly, as shown in FIG. 16, the first calculator 114A sets a point R1 in the XY plane, which is moved from the center point M(x, y)=(a, b) of the marker M1 by a unit vector in the X-axis direction. The coordinate value of the point R1 in the XY plane is (x, y)=(a+1, b). The vector from the marker M1 to the point R1 is α2, and the vector from the marker M1 to the point R1 is β2. The angle between the side wall SW and the vector α2 is θ2, and the angle between the vector α2 and the vector β2 is θ2'. The vector β2 is a normal vector to the main plane of the marker M1, and since the marker M1 is disposed on the side wall SW, the vector β2 is a normal vector to the side wall SW. Therefore, the sum of θ2 and θ2' is π / 2. For convenience of explanation, the angle between the side wall SW and the vector β2 in FIG. 16 is not π / 2.

[0077] The first calculation unit 114A calculates the value of θ2′ by using the following formula (6) based on the inner product formula.

number

[0078] The first calculator 114A calculates the angle θ2 of the side wall SW in the XY plane by subtracting θ2′ calculated using the formula (6) from π / 2.

[0079] As shown in FIG. 17, the first calculation unit 114A calculates the coordinate values ​​of point A1 in FIG. 11 expressed in the camera coordinate system using θ1 as (x, y, z)=(a+d·cos θ1, b, c+d·sin θ1).

[0080] 18, the first calculation unit 114A calculates the coordinate values ​​of point B1 in FIG. 11 expressed in the camera coordinate system using θ2 as (x, y, z)=(a+d·cosθ1+e·cosθ2, b+e·sinθ2, c+d·sinθ1). For ease of explanation, the coordinate values ​​of point B1 (x, y, z)=(a+d·cosθ1+e·cosθ2, b+e·sinθ2, c+d·sinθ1) will be written as (x, y, z)=(a', b', c').

[0081] Finally, the first calculation unit 114A determines whether or not the point B1 is located within the plane of the side wall SW. As shown in Fig. 19, the first calculation unit 114 converts the coordinate values ​​(x, y, z) = (a', b', c') of the point B1 expressed in the camera coordinate system into coordinate values ​​(x, y) = (ax, by) on the two-dimensional image DP by the following formula (7) using two matrices G and H that are internal parameters of the imaging device 30.

number

[0082] When the coordinate values ​​(x, y)=(ax, by) on the two-dimensional image DP are included in the partial image SG1 detected by the detection unit 118, the first calculation unit 114A determines that the point B1 is located within the plane of the side wall SW. Furthermore, when the first calculation unit 114A determines that the point B1 is located within the plane of the side wall SW, it calculates the absolute distance from the point B1 to the imaging device 30 as the absolute distance from one point on the side wall SW to the imaging device 30, using the three-dimensional coordinate values ​​of B1 expressed in the camera coordinate system.

[0083] 9 converts a plurality of relative distances into a plurality of absolute distances based on the absolute distance corresponding to the marker M1 and the absolute distance corresponding to the marker M2, similarly to the first embodiment. As described above, the first calculation unit 114A calculates absolute coordinates for one or more points on the plane to which the marker M1 belongs, based on the three-dimensional coordinates of the marker M1. The absolute coordinates calculated by the first calculation unit 114A are coordinates geometrically calculated from the three-dimensional coordinates of the marker M1, and therefore have higher accuracy than the absolute coordinates converted by the conversion unit 116.

[0084] The generating unit 117A generates a three-dimensional model by using one or more absolute distances calculated by the first calculating unit 114A instead of the absolute distances converted by the converting unit 116A for one or more points on the plane as the sidewall SW. As an example, the generating unit 117A may generate a three-dimensional model for the sidewall SW in the real space RS by using absolute distances corresponding to all pixels of the partial image SG1 in the two-dimensional image DP.

[0085] 2-2: Operation of the second embodiment FIG. 20 is a flowchart showing an example of the operation of the three-dimensional model generating device 10A.

[0086] Steps S11 to S13 are the same operations as steps S1 to S3 in FIG. 8, and therefore the description thereof will be omitted.

[0087] In step S14, the processing device 11A functions as the detection unit 118. The processing device 11A detects, from the two-dimensional image DP, a partial image SG1 that corresponds to the plane on which the marker M1 is arranged in the real space RS.

[0088] In step S15, the processing device 11A functions as a first calculation unit 114A. The processing device 11A calculates, based on the shape of the marker image MP1, posture information indicating the posture of the marker M1 and the three-dimensional coordinates of the center point M of the marker M1 expressed in the camera coordinate system.

[0089] Step S16 is the same operation as step S4 in FIG. 8, and therefore the description thereof will be omitted.

[0090] In step S17, the processing device 11A functions as a first calculation unit 114A. The processing device 11A calculates absolute distances to one or more points on the plane on which the marker M1 is placed, using posture information indicating the posture of the marker M1 and the three-dimensional coordinates of the center point M of the marker M1 expressed in the camera coordinate system.

[0091] Steps S18 and S19 are the same operations as steps S5 and S6 in FIG. 8, and therefore the description thereof will be omitted.

[0092] In step S20, the processing device 11A functions as a generating unit 117A. The processing device 11A generates a three-dimensional model for the plane on which the marker M1 is placed by using one or more absolute distances calculated by the first calculating unit 114A. In addition, the generating unit 117A generates a three-dimensional model for elements in the real space RS other than the plane on which the marker M1 is placed, using a method similar to that of the first calculating unit 114 according to the first embodiment.

[0093] 2-3: Advantages of the Second Embodiment According to the above description, the three-dimensional model generating device 10A as a three-dimensional model generating device includes the detection unit 118. The detection unit 118 detects the partial image SG1 corresponding to the plane of the real space RS from the two-dimensional image DP. The first calculation unit 114A calculates posture information indicating the posture of the marker M1 as the first marker and the three-dimensional coordinates of the marker M1 based on the shape of the marker image MP1 as the first marker image. Furthermore, when the marker M1 is placed on the above-mentioned plane, the first calculation unit 114A calculates one or more absolute distances from one or more points on the above-mentioned plane corresponding to one or more pixels of the partial image SG1 to the imaging device 30 based on the three-dimensional coordinates and posture information of the marker M1. The generation unit 117A generates a three-dimensional model by using one or more absolute distances calculated by the first calculation unit 114A instead of the absolute distances converted by the conversion unit 116A for one or more points on the above-mentioned plane.

[0094] The three-dimensional model generating device 10A generates a three-dimensional model for the plane on which the marker M1 is placed, based on the absolute coordinates calculated by the first calculation unit 114A. The absolute coordinates calculated by the first calculation unit 114A have higher accuracy than the absolute coordinates converted by the conversion unit 116, and therefore the accuracy of the three-dimensional model is improved compared to the case where the three-dimensional model is generated based on the absolute coordinates converted from the relative coordinates.

[0095] 3: Third embodiment A generating system 1 including a 3D model generating device 10B according to a third embodiment of the present invention will be described. The generating system 1 according to the third embodiment is configured similarly to the generating system 1 according to the first embodiment, except that it includes a 3D model generating device 10B instead of the 3D model generating device 10. In the following, for the sake of simplicity of explanation, among the components included in the 3D model generating device 10B, the same components as those included in the 3D model generating device 10 and the 3D model generating device 10A are designated by the same reference numerals, and explanations of their functions may be omitted.

[0096] The 3D model generation device 10 according to the first embodiment and the 3D model generation device 10A according to the second embodiment calculate the absolute distance from the marker M1 to the image capture device 30 and the absolute distance from the marker M2 to the image capture device 30 in the real space RS in which the markers M1 and M2 are arranged. In contrast, the 3D model generation device 10B according to the third embodiment differs from the 3D model generation device 10 and the 3D model generation device 10A, which require two markers, in that the 3D model generation device 10B generates a 3D model using only the marker M1 arranged in the real space RS.

[0097] 3-1: Configuration of the third embodiment 21 is a block diagram showing an example of the configuration of a three-dimensional model generation device 10 B. Compared to the three-dimensional model generation device 10, the three-dimensional model generation device 10 B includes a processing device 11 B instead of the processing device 11 and a storage device 12 B instead of the storage device 12.

[0098] Compared to the storage device 12, the storage device 12B stores a control program PR1B instead of the control program PR1. Similarly to the storage device 12A, the storage device 12B stores a second trained model LM2 in addition to the first trained model LM1.

[0099] The processing device 11B reads out the control program PR1B from the storage device 12B. The processing device 11B executes the read out control program PR1B to function as a communication control unit 111, a depth information estimation unit 112, a recognition unit 113, a detection unit 118, a first calculation unit 114B, a second calculation unit 115B, a conversion unit 116B, and a generation unit 117. That is, the processing device 11B has the same communication control unit 111, the depth information estimation unit 112, the recognition unit 113, and the generation unit 117 as the processing device 11. The processing device 11B also has a first calculation unit 114B instead of the first calculation unit 114 provided in the processing device 11, a second calculation unit 115B instead of the second calculation unit 115, and a conversion unit 116B instead of the conversion unit 116. In addition to these functional blocks, the processing device 11B also has a detection unit 118, similar to the second embodiment.

[0100] Similar to the first calculation unit 114A according to the second embodiment, the first calculation unit 114B calculates posture information indicating the posture of the marker M1 and the three-dimensional coordinates of the center point M of the marker M1 expressed in the camera coordinate system based on the shape of the marker image MP1. Furthermore, the first calculation unit 114B calculates the absolute distance from the marker M1 to the imaging device 30. However, unlike the first calculation unit 114A, the first calculation unit 114B does not require the calculation of the absolute distance between one or more points on the plane on which the marker M1 is placed as a function.

[0101] The second calculation unit 115B calculates the absolute distance from a point on the plane as the side wall SW corresponding to one pixel of the partial image SG1 to the imaging device 30 based on the three-dimensional coordinates and attitude information of the marker M1, similarly to the first calculation unit 114A according to the first embodiment. That is, the second calculation unit 115B calculates the absolute distance from point B1 in FIG. 11 to the imaging device 30, regarding the point B1 as a virtual second marker. The absolute distance from point B1 to the imaging device 30 is an example of the "second absolute distance" in the third embodiment. The absolute distance from point B1 to the imaging device 30 calculated by the second calculation unit 115B is a coordinate geometrically calculated from the three-dimensional coordinates of the marker M1, and therefore has the same accuracy as the absolute distance from the marker M1 to the imaging device 30 calculated by the first calculation unit 114B.

[0102] The conversion unit 116B converts a plurality of relative distances, which correspond one-to-one to a plurality of pixels of the two-dimensional image DP, into a plurality of absolute distances based on the absolute distance from the marker M1 to the imaging device 30 and the absolute distance from the point B1 to the imaging device 30, similarly to the conversion unit 116. The second calculation unit 115B may calculate the absolute distance for two or more points on the plane to which the marker M1 belongs. In this case, two or more points on the plane to which the marker M1 belongs, which correspond to the absolute distances, function as virtual markers substituting physical markers. By using this virtual marker, the parameters a and b are calculated more accurately. Therefore, the effort of arranging a plurality of markers in the real space RS is reduced. Here, when arranging a plurality of virtual markers on the plane to which the marker M1 belongs, it is preferable that the plurality of virtual markers are distributed and arranged on the plane. Furthermore, it is preferable that the plurality of virtual markers are arranged at equal intervals.

[0103] 3-2: Operation of the third embodiment FIG. 22 is a flowchart showing an example of the operation of the three-dimensional model generating device 10B.

[0104] Steps S21 to S26 are the same operations as steps S11 to S16 in FIG. 20, and therefore the description thereof will be omitted.

[0105] In step S27, the processing device 11B functions as a second calculation unit 115B. The processing device 11B calculates the absolute distance from a point on a plane corresponding to one pixel of the partial image SG1 to the imaging device 30, based on the three-dimensional coordinates and orientation information of the marker M1.

[0106] In step S28, the processing device 11B functions as a conversion unit 116B. The processing device 11B converts a plurality of relative distances, which correspond one-to-one to a plurality of pixels of the two-dimensional image DP, into a plurality of absolute distances, based on the absolute distance from the marker M1 to the imaging device 30 and the absolute distance from the point B1 to the imaging device 30.

[0107] Step S29 is the same operation as step S7 in FIG. 8, and therefore the description thereof will be omitted.

[0108] 3-3: Advantages of the Third Embodiment According to the above description, the three-dimensional model generating device 10B as a three-dimensional model generating device includes the depth information estimation unit 112, the recognition unit 113, the detection unit 118, the first calculation unit 114B, the second calculation unit 115B, the conversion unit 116B, and the generation unit 117. The depth information estimation unit 112 estimates depth information indicating each relative distance from a plurality of points in the real space RS that correspond one-to-one to a plurality of pixels in the two-dimensional image DP to the imaging device 30 based on a two-dimensional image DP obtained by imaging the real space RS including a plane on which the marker M1 as the first marker is arranged by the imaging device 30. The recognition unit 113 recognizes a marker image MP1 as a first marker image that indicates the marker M1 as the first marker included in the two-dimensional image DP. The detection unit 118 detects a partial image SG1 corresponding to the above-mentioned plane from the two-dimensional image DP. The first calculation unit 114B calculates a first absolute distance indicating an absolute distance from the marker M1 to the imaging device 30, the three-dimensional coordinates of the marker M1, and orientation information indicating the orientation of the marker M1, based on the shape of the marker image MP1. The second calculation unit 115B calculates a second absolute distance indicating an absolute distance from a point on a plane corresponding to one pixel of the partial image SG1 to the imaging device 30, based on the three-dimensional coordinates of the marker M1 and the orientation information. The conversion unit 116B converts a plurality of relative distances corresponding one-to-one to the plurality of pixels into a plurality of absolute distances, based on the first absolute distance and the second absolute distance. The generation unit 117 generates a three-dimensional model indicating the real space RS, based on the plurality of absolute distances converted by the conversion unit 116B and image information indicating the two-dimensional image DP.

[0109] The second absolute distance calculated by the second calculation unit 115B is a coordinate geometrically calculated from the three-dimensional coordinate of the marker M1, and therefore has the same accuracy as the first absolute distance calculated by the first calculation unit 114B. Therefore, the conversion unit 116B can convert a plurality of relative distances into a plurality of absolute distances with the same accuracy as when two markers are used. Therefore, the three-dimensional model generating device 10B can generate a three-dimensional model by simply placing one marker M1 in the real space RS.

[0110] 4: Fourth embodiment A generating system 1 including a 3D model generating device 10C according to a fourth embodiment of the present invention will be described. The generating system 1 according to the fourth embodiment is configured similarly to the generating system 1 according to the third embodiment, except that it includes a 3D model generating device 10C instead of the 3D model generating device 10B. In the following, for the sake of simplicity of explanation, among the components included in the 3D model generating device 10C, the same components as those included in the 3D model generating device 10, the 3D model generating device 10A, and the 3D model generating device 10B are designated by the same reference numerals, and explanations of their functions may be omitted.

[0111] The three-dimensional model generating device 10B according to the third embodiment converts a plurality of relative distances into a plurality of absolute distances based on the first absolute distance calculated by the first calculation unit 114B and the second absolute distance calculated by the second calculation unit 115B, and generates a three-dimensional model using the converted plurality of absolute distances. In contrast, the three-dimensional model generating device 10C according to the fourth embodiment detects a plane on which the marker M1 arranged in the real space RS is arranged, and calculates absolute distances for one or more points belonging to the detected plane. The three-dimensional model generating device 10C differs from the three-dimensional model generating device 10B according to the third embodiment in that, in the generation of a three-dimensional model, when the absolute distance converted from the calculated absolute distance and the relative distance is the distance from the same point in the real space RS to the imaging device 30, the three-dimensional model is generated by using the calculated absolute distance.

[0112] 4-1: Configuration of the fourth embodiment 24 is a block diagram showing an example of the configuration of a three-dimensional model generation device 10C. Compared to the three-dimensional model generation device 10, the three-dimensional model generation device 10C includes a processing device 11C instead of the processing device 11 and a storage device 12C instead of the storage device 12.

[0113] Compared to the storage device 12, the storage device 12C stores a control program PR1C instead of the control program PR1. Similarly to the storage device 12A, the storage device 12C stores a second trained model LM2 in addition to the first trained model LM1.

[0114] The processing device 11C reads out the control program PR1C from the storage device 12C and executes the read out control program PR1B, thereby functioning as a communication control unit 111, a depth information estimation unit 112, a recognition unit 113, a detection unit 118, a first calculation unit 114B, a second calculation unit 115C, a conversion unit 116C, and a generation unit 117C. That is, the processing device 11C has, as its functional blocks, the same communication control unit 111, the depth information estimation unit 112, the recognition unit 113, and the generation unit 117 as those of the processing device 11. The processing device 11C also has, instead of the first calculation unit 114 provided in the processing device 11, a first calculation unit 114B similar to that of the third embodiment, instead of the second calculation unit 115, a second calculation unit 115C instead of the second calculation unit 115, a conversion unit 116C instead of the conversion unit 116, and a generation unit 117C instead of the generation unit 117. In addition to these components, the processing device 11C further includes a detection unit 118, similar to the second embodiment.

[0115] Similar to the first calculation unit 114A of the second embodiment, the second calculation unit 115C calculates, based on the three-dimensional coordinates and orientation information of the marker M1, one or more absolute distances from one or more points on the plane on which the marker M1 is placed to the imaging device 30. The second calculation unit 115C may calculate the absolute distances for all pixels constituting the partial image SG1 (see FIG. 10) including the marker image MP1.

[0116] The conversion unit 116C converts a plurality of relative distances, which correspond one-to-one to a plurality of pixels in the two-dimensional image DP, into a plurality of absolute distances based on at least one absolute distance among one or more absolute distances from one or more points on the plane as the sidewall SW to the imaging device 30 and the absolute distance from the marker M1 to the imaging device 30. At least one absolute distance among the one or more absolute distances from one or more points on the plane as the sidewall SW to the imaging device 30 may be the absolute distance from point B1 to the imaging device 30.

[0117] The generating unit 117C generates a three-dimensional model representing the real space RS based on the absolute distance calculated by the second calculating unit 115C, the absolute distances obtained by excluding the absolute distance calculated by the second calculating unit 115C from among the multiple absolute distances converted by the converting unit 116C, and image information representing the two-dimensional image DP. As an example, the generating unit 117C may generate a three-dimensional model for the sidewall SW in the real space RS by using absolute distances corresponding to all pixels of the partial image SG1 in the two-dimensional image DP.

[0118] 4-2: Operation of the fourth embodiment FIG. 24 is a flowchart showing an example of the operation of the three-dimensional model generating device 10C.

[0119] Steps S31 to S36 are the same operations as steps S21 to S26 in FIG. 22, and therefore the description thereof will be omitted.

[0120] In step S37, the processing device 11C functions as a second calculation unit 115C. The processing device 11C calculates one or more absolute distances from one or more points on a plane corresponding to one or more pixels of the partial image SG1 to the imaging device 30, based on the three-dimensional coordinates and posture information of the marker M1.

[0121] In step S38, the processing device 11B functions as a conversion unit 116C. The processing device 11C converts a plurality of relative distances that correspond one-to-one to a plurality of pixels into a plurality of absolute distances based on at least one absolute distance among the one or more absolute distances calculated in step S37 and the first absolute distance.

[0122] In step S39, the processing device 11B functions as a generating unit 117C. The processing device 11C generates a three-dimensional model representing the real space RS based on the absolute distance calculated in step S37, the absolute distances obtained by excluding the absolute distance calculated in step S37 from among the multiple absolute distances converted in step S38, and image information representing the two-dimensional image DP.

[0123] 4-3: Advantages of the Fourth Embodiment According to the above description, the three-dimensional model generating device 10C as a three-dimensional model generating device includes the depth information estimation unit 112, the recognition unit 113, the detection unit 118, the first calculation unit 114B, the second calculation unit 115C, the conversion unit 116C, and the generation unit 117C. The depth information estimation unit 112 estimates depth information indicating each relative distance from a plurality of points in the real space RS that correspond one-to-one to a plurality of pixels in the two-dimensional image DP to the imaging device 30 based on a two-dimensional image DP obtained by imaging the real space RS including a plane on which the marker M1 as the first marker is arranged by the imaging device 30. The recognition unit 113 recognizes a marker image MP1 as a first marker image that indicates the marker M1 as the first marker included in the two-dimensional image DP. The detection unit 118 detects a partial image SG1 corresponding to the above-mentioned plane from the two-dimensional image DP. The first calculation unit 114B calculates a first absolute distance indicating an absolute distance from the marker M1 to the imaging device 30, the three-dimensional coordinates of the marker M1, and orientation information indicating the orientation of the marker M1, based on the shape of the marker image MP1. The second calculation unit 115C calculates one or more absolute distances from one or more points on a plane corresponding to one or more pixels of the partial image SG1 to the imaging device 30, based on the three-dimensional coordinates of the marker M1 and the orientation information. The conversion unit 116C converts a plurality of relative distances corresponding one-to-one to the plurality of pixels into a plurality of absolute distances, based on at least one absolute distance of the one or more absolute distances and the first absolute distance. The generation unit 117C generates a three-dimensional model indicating the real space RS, based on the absolute distance calculated by the second calculation unit 115C, the absolute distances excluding the absolute distance calculated by the second calculation unit 115C from among the plurality of absolute distances, and image information indicating the two-dimensional image DP.

[0124] The one or more absolute distances calculated by the second calculation unit 115C are coordinates geometrically calculated from the three-dimensional coordinates of the marker M1, and therefore have the same accuracy as the first absolute distance calculated by the first calculation unit 114B. Therefore, the conversion unit 116C can convert a plurality of relative distances into a plurality of absolute distances with the same accuracy as when two markers are used. Therefore, the three-dimensional model generating device 10B can generate a three-dimensional model by simply placing one marker M1 in the real space RS.

[0125] The three-dimensional model generating device 10C generates a three-dimensional model for the plane on which the marker M1 is placed, based on the absolute coordinates calculated by the second calculation unit 115C. The absolute coordinates calculated by the second calculation unit 115C have higher accuracy than the absolute coordinates converted by the conversion unit 116C, and therefore the accuracy of the three-dimensional model is improved compared to the case where the three-dimensional model is generated based on the absolute coordinates converted from the relative coordinates.

[0126] 5: Fifth embodiment A generating system 1 including a 3D model generating device 10D according to a fifth embodiment of the present invention will be described. The generating system 1 according to the fifth embodiment is configured similarly to the generating system 1 according to the fourth embodiment, except that the generating system 1 includes a 3D model generating device 10D instead of the 3D model generating device 10C. In the following, for the sake of simplicity of explanation, among the components included in the 3D model generating device 10D, the same components as those included in the 3D model generating device 10, the 3D model generating device 10A, the 3D model generating device 10B, and the 3D model generating device 10C are designated by the same reference numerals, and the explanation of their functions may be omitted.

[0127] The three-dimensional model generating devices 10A, 10B, and 10C according to the second, third, and fourth embodiments calculate the absolute distance for one or more points belonging to the plane on which the marker M1 placed in the real space RS is placed, using the three-dimensional coordinates of the marker M1. However, the absolute distance can be indirectly calculated only for the plane on which the marker M1 is placed. In contrast, the three-dimensional model generating device 10D of the fifth embodiment calculates the absolute distance from a point belonging to a plane other than the plane on which the marker M1 is placed to the imaging device 30, using the three-dimensional coordinates of the marker M1. It is different from the three-dimensional model generating devices 10A, 10B, and 10C.

[0128] 5-1: Configuration of the fifth embodiment 25 is a block diagram showing an example of the configuration of a three-dimensional model generation device 10D. Compared to the three-dimensional model generation device 10, the three-dimensional model generation device 10D includes a processing device 11D instead of the processing device 11 and a storage device 12D instead of the storage device 12.

[0129] Compared to the storage device 12, the storage device 12D stores a control program PR1D instead of the control program PR1. Similarly to the storage device 12A, the storage device 12D stores a second trained model LM2 in addition to the first trained model LM1.

[0130] The processing device 11D reads out the control program PR1D from the storage device 12D. The processing device 11D executes the read out control program PR1D to function as a communication control unit 111, a depth information estimation unit 112, a recognition unit 113, a detection unit 118, a first calculation unit 114B, a second calculation unit 115C, a conversion unit 116C, and a generation unit 117C. That is, the processing device 11C has the same communication control unit 111, the depth information estimation unit 112, and the recognition unit 113 as the processing device 11. The processing device 11D also has a first calculation unit 114B similar to that of the third embodiment instead of the first calculation unit 114 provided in the processing device 11, a second calculation unit 115D instead of the second calculation unit 115, a conversion unit 116D instead of the conversion unit 116, and a generation unit 117C similar to that of the fourth embodiment instead of the generation unit 117. Moreover, the processing device 11D has a detection unit 118D instead of the detection unit 118 included in the processing device 11A.

[0131] The acquisition unit 119 acquires an angle between the plane on which the marker M1 is placed and another plane. The acquisition unit 119 acquires the angle based on information input by the user of the three-dimensional model generating device 10D using the input device 13, for example. In the real space RS, two adjacent walls and adjacent floors and walls are generally perpendicular to each other. Also, two opposing walls and opposing floors and ceilings are generally parallel to each other. For this reason, 90 degrees may be set as a default value for the angle between adjacent planes. Alternatively, in the case of a structure whose shape is known in advance, the storage device 12D may store the default value, and the acquisition unit 119 may read out the default value from the storage device 12D.

[0132] Fig. 26 is a diagram showing an example of an angle between a plane on which the marker M1 is placed and another plane, acquired by the acquisition unit 119. In the example shown in Fig. 26, the acquisition unit 119 acquires an angle θ3 between a side wall SW, which is the plane on which the marker M1 is placed, and an opposing wall FW, which is the other plane.

[0133] 25 calculates one or more absolute distances from one or more points on the other plane corresponding to one or more pixels of the other partial image to the imaging device 30, based on the angle between the plane on which the marker M1 is placed and the other plane, the three-dimensional coordinates of the marker M1, and the posture information. The other partial image is an image corresponding to the opposing wall FW in the two-dimensional image DP.

[0134] Specifically, the second calculation unit 115D can calculate the three-dimensional coordinates of an arbitrary point on the side wall SW where the marker M1 is placed, by using a method similar to the method according to the second embodiment shown in Fig. 11 to Fig. 19. Here, the second calculation unit 115D calculates the three-dimensional coordinates of a point B1 on a line where the side wall SW and the opposing wall FW intersect as the arbitrary point. The second calculation unit 115D identifies the plane of the opposing wall FW in the camera coordinate system by using the attitude information of the marker M1 and the angle θ3 acquired by the acquisition unit 119.

[0135] Here, the plane including the point B1 and parallel to the XZ plane of the camera coordinate system is set as the third plane. The second calculation unit 115D calculates the three-dimensional coordinates of the point C1, which is moved by a distance f from the point B1 on the line where the opposing wall FW and the third plane intersect, by using a method similar to that used to calculate the three-dimensional coordinates of the point B1 from the three-dimensional coordinates of the marker M1 in the second embodiment. Next, the plane including the point C1 and parallel to the YZ plane of the camera coordinate system is set as the fourth plane. The second calculation unit 115D calculates the three-dimensional coordinates of the point D1, which is moved by a distance g from the point C1 on the line where the opposing wall FW and the fourth plane intersect. The three-dimensional coordinates of the point D1 are expressed in the camera coordinate system. Finally, the second calculation unit 115D calculates the absolute distance from the point D1 to the imaging device 30 by using the three-dimensional coordinates of the point D1. Here, the second calculation unit 115D can set the point D1 to any point on the opposing wall FW.

[0136] The conversion unit 116D shown in Fig. 25 converts a plurality of relative distances, which correspond one-to-one to a plurality of pixels in the two-dimensional image DP, into a plurality of absolute distances based on at least one absolute distance among one or more absolute distances regarding the plane on which the marker M1 is placed and one or more absolute distances regarding other planes, and the first absolute distance of the marker M1 calculated by the first calculation unit 114B. In the example shown in Fig. 26, the conversion unit 116D converts the plurality of relative distances into a plurality of absolute distances based on at least one absolute distance among the absolute distances of one or more points in the side wall SW and the absolute distances of one or more points in the opposing wall FW, and the first absolute distance of the marker M1.

[0137] Here, as shown in FIG. 26, the real space RS includes an object OB1. The distance d0 between the object OB1 and the opposing wall FW is equal to or less than a threshold value. The threshold value is preferably set to a value that can be regarded as d0=0 in the generated three-dimensional model. This is true not only when the distance d0 between the object OB1 and the opposing wall FW is equal to or less than the threshold value, but also when the distance between the object OB1 and the side wall SW is equal to or less than the threshold value. Furthermore, the reference point Q1, which is the closest point to the object OB1 on the opposing wall FW, is included in one or more points whose absolute distances are calculated by the second calculation unit 115D. In other words, the second calculation unit 115D sets one or more points on the other plane so that the reference point Q1 is included in the calculation target of the absolute distance. As described above, when the second calculation unit 115D calculates the absolute distance for one or more points on the other plane, it calculates the three-dimensional coordinates of one or more points on the other plane. Therefore, the second calculation unit 115D calculates the three-dimensional coordinates of the reference point Q1.

[0138] The detector 118D detects an object image OP1 corresponding to the object OB1 based on the two-dimensional image DP.

[0139] Similar to the second calculation unit 115C in the fourth embodiment, the second calculation unit 115D calculates one or more absolute distances from one or more points on a plane corresponding to one or more pixels of the partial image SG1 to the imaging device 30 based on the three-dimensional coordinates and posture information of the marker M1.

[0140] 5-2: Operation of the fifth embodiment FIG. 27 is a flowchart showing an example of the operation of the three-dimensional model generating device 10D.

[0141] Steps S41 to S46 are the same operations as steps S31 to S36 in FIG. 24, and therefore the description thereof will be omitted.

[0142] In step S47, the processing device 11D functions as the acquisition unit 119. The processing device 11D acquires the angle between the plane on which the marker M1 is placed and another plane.

[0143] In step S48, the processing device 11D functions as a second calculation unit 115D. The processing device 11D calculates one or more absolute distances from one or more points on a plane corresponding to one or more pixels of the partial image SG1 to the imaging device 30 based on the three-dimensional coordinates and orientation information of the marker M1. The processing device 11D also calculates one or more absolute distances from one or more points on another plane corresponding to one or more pixels of the other partial image to the imaging device 30 based on the angle between the plane on which the marker M1 is placed and the other plane, the three-dimensional coordinates of the marker M1, and the above-mentioned orientation information.

[0144] In step S49, the processing device 11D functions as a conversion unit 116D. The processing device 11D converts a plurality of relative distances that correspond one-to-one to a plurality of pixels of the two-dimensional image DP into a plurality of absolute distances based on at least one absolute distance among one or more absolute distances regarding the plane on which the marker M1 is arranged and one or more absolute distances regarding other planes, and the first absolute distance of the marker M1 calculated in step S46.

[0145] Step S50 is the same operation as step S39 in FIG. 24, and therefore the description thereof will be omitted.

[0146] 5-3: Advantages of the Fifth Embodiment In the generation system 1, the real space RS includes a plane on which the marker M1 is placed and another plane on which the marker M1 is not placed. The detection unit 118D detects another partial image corresponding to the other plane from the two-dimensional image DP. The second calculation unit 115D further calculates one or more absolute distances from one or more points on the other plane corresponding to one or more pixels of the other partial image to the imaging device 30 based on an angle between the plane on which the marker M1 is placed and the other plane, and the three-dimensional coordinates and attitude information of the marker M1. The conversion unit 116D converts a plurality of relative distances corresponding one-to-one to a plurality of pixels into a plurality of absolute distances based on at least one absolute distance among the one or more absolute distances related to the plane on which the marker M1 is placed and the one or more absolute distances related to the other plane, and the first absolute distance.

[0147] The three-dimensional model generating device 10D calculates the absolute distance from any point belonging to another plane on which the marker M1 is not placed to the imaging device 30. The conversion unit 116D converts a plurality of relative distances into a plurality of absolute distances in consideration of one or more absolute distances related to the other plane, thereby improving the accuracy of the three-dimensional model.

[0148] Moreover, in the generating system 1D, the real space RS includes an object OB1. The distance between the object OB1 and the plane, or the distance between the object OB1 and the other plane, is equal to or less than a threshold value. A reference point Q1, which is a point closest to the object OB1 among points on the plane and points on the other plane, is included in one or more points on the plane or one or more points on the other plane. The detection unit 118D detects an object image OP1 corresponding to the object OB1 based on the two-dimensional image DP. The second calculation unit 115D calculates the three-dimensional coordinates of the reference point Q1.

[0149] The three-dimensional model generating device 10D calculates the three-dimensional coordinates of the reference point Q1, and therefore, can know the three-dimensional coordinates where the object OB1 is located. For example, when the object OB1 is a person whose feet are in contact with the floor surface FL, the three-dimensional coordinates of the reference point Q1 located on the floor surface FL can be known.

[0150] 6: Variations The present disclosure is not limited to the above-described embodiments. Specific modified embodiments are exemplified below. Two or more embodiments selected from the following examples may be combined.

[0151] 6-1: Variation 1 As described above, in the three-dimensional model generating device 10A according to the second embodiment, the detection unit 118 detects, from the two-dimensional image DP, a partial image SG1 corresponding to a plane on which the marker M1 is arranged in the real space RS. In the above example, the detection unit 118 detects, from the two-dimensional image DP, a partial image SG1 corresponding to a side wall SW in the real space RS.

[0152] However, if it is difficult for the detection unit 118 to detect the partial image SG1, the user of the three-dimensional model generating device 10 may click on any point within the side wall SW on the two-dimensional image DP displayed on the display 15, and the first calculation unit 114A may calculate the three-dimensional coordinates expressed in the camera coordinate system of point B1 based on the two-dimensional coordinates of the arbitrary point.

[0153] 28 is a diagram showing a method of calculating the three-dimensional coordinates of point B according to Modification 1. The first calculation unit 114A acquires the two-dimensional coordinates (x, y)=(cx, xy) of point B1′ clicked by the user in the two-dimensional image DP.

[0154] However, even if the first calculation unit 114A applies the two matrices G and H, which are internal parameters of the imaging device 30, to the two-dimensional coordinates of the point B1', the three-dimensional coordinates of the point B1 cannot be uniquely determined because the depth is unknown.

[0155] Therefore, by using the posture information of the marker M1, the first calculation unit 114A calculates the three-dimensional coordinates (x, y, z) = (ca, cb, cc) of point B1 as the intersection of the vector γ calculated by applying the matrices G and H to the two-dimensional coordinates of point B1' and the side wall SW.

[0156] 6-2: Variation 2 In each of the above-described embodiments, the marker is exemplified as an AR marker, but the present disclosure is not limited thereto. The marker may be a specific object that can be distinguished from other objects placed in real space. The specific object may be, for example, a poster or a clock placed on a wall, or an emergency light indicating an evacuation route. These specific objects are recognized by the recognition unit 113.

[0157] 6-3: Variation 3 In the above-described embodiments and modifications, some kind of marker is required, but the present disclosure is not limited thereto. The 3D model generating device 10E according to the second embodiment and modification 3 shown in Fig. 29 can generate a 3D model without arranging a marker in real space.

[0158] There are cases where the three-dimensional coordinates of the imaging device 30 arranged in the real space and the direction of the optical axis of the imaging device 30 are known, and the position of an object captured in the two-dimensional image DP captured by the imaging device 30 is known. In facilities such as convenience stores, public facilities, and offices, three-dimensional layout data at the time of design may exist. For example, assume that the position of a first feature point P1 of a sofa located at the boundary between the opposing wall FW and the side wall SW in FIG. 30, and the position of a second feature point P2 located at the boundary between the opposing wall FW and the floor surface FL are known. The positions of the first feature point P1 and the second feature point P2 are expressed by three-dimensional coordinates in the real space.

[0159] A first point P11 on the two-dimensional image DP corresponds to the first feature point P1. A second point P22 on the two-dimensional image DP corresponds to the second feature point P2. Here, a first absolute distance L1 from the feature point P1 to the imaging device 30 and a second absolute distance L2 from the feature point P2 to the imaging device 30 are known.

[0160] The 3D model generation device 10E is premised on the fact that the first absolute distance and the second absolute distance are known. The 3D model generation device 10E shown in Fig. 29 includes a processing device 11E instead of the processing device 11 and a storage device 12E instead of the storage device 12, as compared with the 3D model generation device 10 of the first embodiment shown in Fig. 2.

[0161] Compared to the storage device 12, the storage device 12E stores a control program PR1E instead of the control program PR1. The processing device 11E reads out the control program PR1E from the storage device 12E. The processing device 11E executes the read out control program PR1E to function as a communication control unit 111, a depth information estimation unit 112, a reception unit 113E, an acquisition unit 114E, a conversion unit 116, and a generation unit 117. That is, the processing device 11E has the same communication control unit 111, depth information estimation unit 112, conversion unit 116, and generation unit 117 as the processing device 11.

[0162] Assume that a two-dimensional image DP shown in FIG. 30 is displayed on the display 15. When the user touches a first point P11 with a finger or a touch pen in the two-dimensional image DP displayed on the display 15, the reception unit 113E receives a first position indicating the position of the first point P11 based on an output signal output from the input device 13. Similarly, when the user touches a second point P22 with a finger or a touch pen in the two-dimensional image DP displayed on the display 15, the reception unit 113E receives a second position indicating the position of the second point P22 based on an output signal output from the input device 13. The positions of the first point P11 and the second point P22 are given by two-dimensional coordinates in the two-dimensional image DP. Furthermore, when the user inputs a first absolute distance and a second absolute distance using the input device 13, the acquisition unit 114E acquires the first absolute distance and the second absolute distance. The conversion unit 116 converts a plurality of relative distances that correspond one-to-one to a plurality of pixels of the two-dimensional image DP into a plurality of absolute distances based on the first position and the first absolute distance, and the second position and the second absolute distance. Specifically, the conversion unit 116 calculates parameters a and b of the formula (1) based on a pair of the relative distance corresponding to the first position and the first absolute distance, and a pair of the relative distance corresponding to the second position and the first absolute distance. The conversion unit 116 converts the plurality of relative distances into a plurality of absolute distances using parameters a and b.

[0163] 6-4: Variation 4 In the three-dimensional model generating device 10A according to the second embodiment, the detection unit 118 detects, in the two-dimensional image DP, a plurality of partial images that correspond one-to-one to a plurality of planes included in the real space RS, using the second trained model LM2. However, the detection unit 118 may detect a plurality of partial images using another method.

[0164] For example, the detection unit 118 may detect a partial image corresponding to the plane on which one marker M1 is arranged, based on the absolute distance and orientation information of the marker M1.

[0165] Alternatively, when a third marker M3 is arranged on one plane in addition to the markers M1 and M2, the detection unit 118 may detect a partial image corresponding to the plane on which the markers M1 to M3 are arranged, based on the absolute distance of the marker M1, the absolute distance of the marker M2, and the absolute distance of the marker M3. More specifically, in this case, the recognition unit 113 recognizes the marker image MP3 included in the two-dimensional image DP. Furthermore, the third calculation unit 120, not shown in FIG. 9, calculates the absolute distance from the marker M3 to the imaging device 30 based on the shape of the marker image MP3. The detection unit 118 may detect a partial image corresponding to the plane on which the markers M1 to M3 are arranged, based on the absolute distance of the marker M3 calculated by the third calculation unit 120, in addition to the absolute distance of the marker M1 and the absolute distance of the marker M2.

[0166] 7:Other (1) In the above-described embodiment, the storage devices 12 to 12D are exemplified by ROM and RAM, but may be flexible disks, magneto-optical disks (e.g., compact disks, digital versatile disks, Blu-ray (registered trademark) disks), smart cards, flash memory devices (e.g., cards, sticks, key drives), CD-ROMs (Compact Disc-ROMs), registers, removable disks, hard disks, floppy (registered trademark) disks, magnetic strips, databases, servers, or other suitable storage media. The program may also be transmitted from a network via a telecommunications line. The program may also be transmitted from a communications network NET via a telecommunications line.

[0167] (2) In the above-described embodiments, the described information, signals, etc. may be represented using any of a variety of different technologies. For example, data, instructions, commands, information, signals, bits, symbols, chips, etc. that may be referred to throughout the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or magnetic particles, optical fields or photons, or any combination thereof.

[0168] (3) In the above-described embodiment, the input / output information, etc. may be stored in a specific location (e.g., memory) or may be managed using a management table. The input / output information, etc. may be overwritten, updated, or added. The output information, etc. may be deleted. The input information, etc. may be transmitted to another device.

[0169] (4) In the above-described embodiments, the determination may be made based on a value represented using one bit (0 or 1), a Boolean value (true or false), or a numerical comparison (e.g., comparison with a predetermined value).

[0170] (5) The order of the process steps, sequences, flow charts, etc. illustrated in the above-described embodiments may be changed without causing any inconsistency. For example, the methods described in this disclosure present elements of various steps using an example order, and are not limited to the particular order presented.

[0171] (6) Each function illustrated in Figures 2, 9, 21, 23, 25, and 29 is realized by any combination of at least one of hardware and software. In addition, the method of realizing each functional block is not particularly limited. That is, each functional block may be realized by using one device that is physically or logically combined, or may be realized by using two or more devices that are physically or logically separated and directly or indirectly connected (for example, by using wires, wirelessly, etc.). The functional block may be realized by combining the one device or the multiple devices with software.

[0172] (7) The programs exemplified in the above-described embodiments should be broadly interpreted to mean instructions, instruction sets, code, code segments, program code, programs, subprograms, software modules, applications, software applications, software packages, routines, subroutines, objects, executable files, execution threads, procedures, functions, etc., regardless of whether they are called software, firmware, middleware, microcode, hardware description language, or by other names.

[0173] Additionally, software, instructions, information, etc. may be transmitted or received over a transmission medium. For example, if the software is transmitted from a website, server, or other remote source using wired and / or wireless technologies (such as coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL)), and / or wireless technologies (such as infrared, microwave, etc.), then these wired and / or wireless technologies are included within the definition of transmission media.

[0174] (8) In each of the above embodiments, the terms “system” and “network” are used interchangeably.

[0175] (9) The information, parameters, etc. described in this disclosure may be expressed using absolute values, may be expressed using relative values ​​from a predetermined value, or may be expressed using other corresponding information.

[0176] (10) In the above-mentioned embodiments, the terms "connected" and "coupled" or any variation thereof refer to any direct or indirect connection or coupling between two or more elements, and may include the presence of one or more intermediate elements between two elements that are "connected" or "coupled" to each other. The coupling or connection between elements may be a physical coupling or connection, a logical coupling or connection, or a combination thereof. For example, "connected" may be read with "access". As used in this disclosure, two elements may be considered to be "connected" or "coupled" to each other using at least one of one or more wires, cables, and printed electrical connections, as well as electromagnetic energy having wavelengths in the radio frequency range, microwave range, and light (both visible and invisible) range, as some non-limiting and non-exhaustive examples.

[0177] (11) In the above embodiments, the phrase "based on" does not mean "based only on," unless otherwise specified. In other words, the phrase "based on" means both "based only on" and "based at least on."

[0178] (12) The terms "determining" and "determining" as used in this disclosure may encompass a wide variety of actions. "Determining" and "determining" may include, for example, judging, calculating, computing, processing, deriving, investigating, looking up, search, inquiry (e.g., searching in a table, database, or other data structure), ascertaining, and the like. "Determining" and "determining" may also include receiving (e.g., receiving information), transmitting (e.g., sending information), input, output, accessing (e.g., accessing data in a memory), and the like. In addition, "judgment" and "decision" can include considering resolving, selecting, choosing, establishing, comparing, etc., to be a "judgment" or "decision." In other words, "judgment" and "decision" can include considering some action to be a "judgment" or "decision." In addition, "judgment" can be interpreted as "assuming," "expecting," "considering," etc.

[0179] (13) In the above embodiments, when "include," "including," and variations thereof are used, these terms are intended to be inclusive, similar to the term "comprising." Furthermore, the term "or" used in this disclosure is not intended to be an exclusive or.

[0180] (14) In this disclosure, where articles have been added by translation, such as a, an, and the in English, the disclosure may include that the nouns following these articles are in the plural.

[0181] (15) In this disclosure, the term "A and B are different" may mean "A and B are different from each other." The term may also mean "A and B are each different from C." Terms such as "separate" and "combined" may also be interpreted in the same way as "different."

[0182] (16) Each aspect / embodiment described in this disclosure may be used alone, in combination, or switched according to execution. In addition, notification of specific information (e.g., notification that "X is true") is not limited to explicit notification, but may be implicit (e.g., not notifying the specific information).

[0183] Although the present disclosure has been described in detail above, it is clear to those skilled in the art that the present disclosure is not limited to the embodiments described in the present disclosure. The present disclosure can be implemented as modified and altered forms without departing from the spirit and scope of the present disclosure as defined by the claims. Therefore, the description of the present disclosure is for illustrative purposes only and does not have any limiting meaning on the present disclosure. [Explanation of symbols]

[0184] 1...generation system, 10-10D...3D model generation device, 11-11E...processing device, 12-12E...storage device, 13...input device, 14...communication device, 15...display, 30...imaging device, 111...communication control unit, 112...depth information estimation unit, 113...recognition unit, 114-114B...first calculation unit, 113E...reception unit, 114E...acquisition unit, 115,115B,115C,115D...second calculation unit, 116-116D...conversion unit, 117,117A,117C...generation unit, 118,118D...detection unit, 119...acquisition unit, LM1,LM2...trained model, M1-M4...marker, MP1,MP2...marker image, OB1...object, OP1...object image, PR1-PR1E...control program, SG1...partial image

Claims

1. a depth information estimation unit that estimates depth information indicating each relative distance from a plurality of points in the real space that correspond one-to-one to a plurality of pixels in the two-dimensional image obtained by capturing an image of a real space with an image capturing device, to the image capturing device; a receiving unit that receives a first position indicating a position of a first point on the two-dimensional image specified by a user and a second position indicating a position of a second point on the two-dimensional image; an acquisition unit that acquires a first absolute distance from a first feature point in real space corresponding to the first point to the imaging device and a second absolute distance from a second feature point in real space corresponding to the second point to the imaging device; a conversion unit that converts a plurality of relative distances that correspond one-to-one to the plurality of pixels into a plurality of absolute distances based on the first position and the first absolute distance, and the second position and the second absolute distance; a generation unit that generates a three-dimensional model representing the real space based on the plurality of absolute distances converted by the conversion unit and the two-dimensional image; A three-dimensional model generating device comprising:

2. a depth information estimation unit that estimates depth information indicating each relative distance from a plurality of points in the real space that correspond one-to-one to a plurality of pixels in the two-dimensional image to the imaging device, based on a two-dimensional image obtained by the imaging device capturing an image of a real space in which the first marker and the second marker are arranged; a recognition unit that recognizes a first marker image indicating the first marker and a second marker image indicating the second marker included in the two-dimensional image; a first calculation unit that calculates a first absolute distance from the first marker to the imaging device based on a shape of the first marker image; a second calculation unit that calculates a second absolute distance from the second marker to the imaging device based on a shape of the second marker image; a conversion unit that converts a plurality of relative distances that correspond one-to-one to the plurality of pixels into a plurality of absolute distances based on the first absolute distance and the second absolute distance; a generation unit that generates a three-dimensional model representing the real space based on the plurality of absolute distances converted by the conversion unit and the two-dimensional image; A three-dimensional model generating device comprising:

3. the conversion unit calculates a parameter for converting a relative distance into an absolute distance based on the first absolute distance and the second absolute distance, and converts a plurality of relative distances that correspond one-to-one to the plurality of pixels into a plurality of absolute distances using the calculated parameter. The three-dimensional model generating device according to claim 2.

4. a detection unit that detects a partial image corresponding to a plane of the real space from within the two-dimensional image; The first calculation unit is Calculating the first absolute distance, attitude information indicating an attitude of the first marker, and three-dimensional coordinates of the first marker based on a shape of the first marker image; when the first marker is placed on the plane, one or more absolute distances are calculated from one or more points on the plane corresponding to one or more pixels of the partial image to the imaging device based on the three-dimensional coordinates of the first marker and the orientation information; the generation unit generates the three-dimensional model by using, for one or more points on the plane, the one or more absolute distances calculated by the first calculation unit instead of the absolute distances converted by the conversion unit. The three-dimensional model generating device according to claim 2.

5. a depth information estimation unit that estimates depth information indicating each relative distance from a plurality of points in the real space that correspond one-to-one to a plurality of pixels in the two-dimensional image to the imaging device, based on a two-dimensional image obtained by the imaging device capturing a real space including a plane on which a first marker is arranged; a recognition unit that recognizes a first marker image that is included in the two-dimensional image and indicates the first marker; a detection unit that detects a partial image corresponding to the plane from within the two-dimensional image; a first calculation unit that calculates a first absolute distance indicating an absolute distance from the first marker to the imaging device, a three-dimensional coordinate of the first marker, and orientation information indicating an orientation of the first marker, based on a shape of the first marker image; a second calculation unit that calculates a second absolute distance indicating an absolute distance from a point on the plane corresponding to one pixel of the partial image to the imaging device based on the three-dimensional coordinates of the first marker and the orientation information; a conversion unit that converts a plurality of relative distances that correspond one-to-one to the plurality of pixels into a plurality of absolute distances based on the first absolute distance and the second absolute distance; a generation unit that generates a three-dimensional model representing the real space based on the plurality of absolute distances converted by the conversion unit and the two-dimensional image; A three-dimensional model generating device comprising:

6. The three-dimensional model generating device according to claim 4 , wherein the detection unit detects the partial image based on the first absolute distance and the orientation information.

7. the second marker and the third marker are located on the plane; The recognition unit recognizes a third marker image indicating the third marker included in the two-dimensional image, a third calculation unit that calculates a third absolute distance from the third marker to the imaging device based on a shape of the third marker image, The three-dimensional model generating device according to claim 4 , wherein the detection unit detects the partial image based on the first absolute distance, the second absolute distance, and the third absolute distance.

8. a depth information estimation unit that estimates depth information indicating each relative distance from a plurality of points in the real space that correspond one-to-one to a plurality of pixels in the two-dimensional image to the imaging device, based on a two-dimensional image obtained by the imaging device capturing a real space including a plane on which a first marker is arranged; a recognition unit that recognizes a first marker image that is included in the two-dimensional image and indicates the first marker; a detection unit that detects a partial image corresponding to the plane from within the two-dimensional image; a first calculation unit that calculates a first absolute distance indicating an absolute distance from the first marker to the imaging device, three-dimensional coordinates of the first marker, and orientation information indicating an orientation of the first marker, based on a shape of the first marker image; a second calculation unit that calculates one or more absolute distances from one or more points on the plane corresponding to one or more pixels of the partial image to the imaging device based on the three-dimensional coordinates of the first marker and the orientation information; a conversion unit that converts a plurality of relative distances that correspond one-to-one to the plurality of pixels into a plurality of absolute distances based on at least one absolute distance among the one or more absolute distances and the first absolute distance; a generation unit that generates a three-dimensional model representing the real space based on the absolute distance calculated by the second calculation unit, absolute distances excluding the absolute distance calculated by the second calculation unit from among the plurality of absolute distances, and the two-dimensional image; A three-dimensional model generating device comprising:

9. the real space includes the plane and another plane on which the first marker is not placed, The detection unit detects another partial image corresponding to the other plane from within the two-dimensional image, the second calculation unit further calculates one or more absolute distances from one or more points on the other plane corresponding to one or more pixels of the other partial image to the imaging device based on an angle between the plane and the other plane, the three-dimensional coordinates of the first marker, and the posture information; the conversion unit converts a plurality of relative distances, each of which corresponds one-to-one to the plurality of pixels, into a plurality of absolute distances based on at least one absolute distance among the one or more absolute distances related to the plane and the one or more absolute distances related to the other plane, and the first absolute distance. The three-dimensional model generating device according to claim 8.

10. the real space includes an object; a distance between the object and the plane or a distance between the object and the other plane is equal to or smaller than a threshold; a reference point, which is a point among the points on the plane and the points on the other plane that is closest to the object, is included in one or more points on the plane or one or more points on the other plane; The detection unit detects an object image corresponding to the object based on the two-dimensional image, The second calculation unit calculates three-dimensional coordinates of the reference point. The three-dimensional model generating device according to claim 9.

Citation Information

Patent Citations

  • Position conversion method, program, and moving device

    JP2022059480A

  • Method for modifying three-dimensional model and electronic device

    JP2022092742A

Cited By

  • Game machine

    JP2024166283A

  • Game machine

    JP2024166284A

  • Game machine

    JP2024166285A

  • Game machine

    JP2024169547A

  • Game machine

    JP2024169551A