Surface estimation method, surface estimation device, and recording medium

The surface estimation method improves the accuracy of reference plane estimation on curved surfaces by generating three-dimensional coordinates and setting reference areas, enabling precise measurements in endoscope devices.

JP7551730B2Active Publication Date: 2024-09-17EVIDENT CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2022506992
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2020-03-09
Publication Date
2024-09-17
Estimated Expiration
2040-03-09

AI Technical Summary

Technical Problem

Existing endoscope devices struggle to accurately estimate a reference plane when the surface of the inspected object is curved, leading to incorrect measurements.

Method used

A surface estimation method that involves generating three-dimensional coordinates from a two-dimensional image, setting a reference area in three-dimensional or two-dimensional space, and estimating a reference plane based on these coordinates to improve accuracy.

Benefits of technology

The method enhances the accuracy of reference surface estimation, allowing for precise measurement of distances and defects on curved surfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007551730000057
    Figure 0007551730000057
  • Figure 0007551730000010
    Figure 0007551730000010
  • Figure 0007551730000062
    Figure 0007551730000062
Patent Text Reader

Abstract

This plane estimation method has a generation step, a region setting step, and an estimation step. In the generation step, three-dimensional image data is generated which includes three or more three-dimensional coordinates on a subject. In the region setting step, a reference region is set which is either a three-dimensional region or a two-dimensional region. In the estimation step, a reference plane is estimated which approximates a surface of the subject on the basis of three or more points in the three-dimensional image data corresponding to the three or more points included in the reference region.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a surface estimation method, a surface estimation device, and a recording medium. [Background technology]

[0002] Industrial endoscope devices are used to observe and inspect the internal defects and corrosion of boilers, pipes, aircraft engines, and the like. For these endoscope devices, multiple types of optical adapters are available for observing and inspecting a variety of objects. The optical adapters are attached to the tip of the endoscope and are replaceable. In inspections using such endoscope devices, there is a demand for quantitatively measuring the size of defects and defects in the subject. To meet this demand, there are endoscope devices equipped with a three-dimensional measurement function.

[0003] For example, an endoscope device is equipped with a function for measuring the geometric size of an object based on information of a point specified on an image by a user. For example, in a surface-based measurement, a reference plane is estimated based on three or more points specified by the user, and the three-dimensional distance between the measurement point specified by the user and the reference plane is measured. The reference plane approximates the surface of the object.

[0004] The device disclosed in Patent Document 1 uses a flat or curved surface as a reference surface and performs surface-based measurement. Figures 67 and 68 show an example in which three or more points for estimating the reference surface in Patent Document 1 are set in an image G301 of a subject.

[0005] In Fig. 67, points P301, P302, P303, and P304 are set in image G301. Each of the four points is located at a vertex of a square. In Fig. 68, two or more points P311 on line L311 and two or more points P312 on line L312 are set in image G301. [Prior art documents] [Patent documents]

[0006] [Patent Document 1] Japanese Patent Application Publication No. 2017-162452 Summary of the Invention [Problem to be solved by the invention]

[0007] If the surface of the subject is curved, there is a possibility that the device disclosed in Patent Document 1 will not be able to correctly estimate the reference plane. Figures 69 and 70 show examples in which an incorrect reference plane is estimated.

[0008] In FIG. 69, points P321, P322, and P323 are set on the surface of a sphere SP301. When the sphere SP301 is viewed in a direction parallel to the Z axis, each of the three points is located at the vertices of a triangle. If the three points have the same height in the Z direction, the three points are on a plane. Therefore, the plane is erroneously estimated as the reference plane.

[0009] 70, a line L331 and a line L332 are set on the surface of a cylinder CY301, and two or more points P331 on the line L331 and two or more points P332 on the line L332 are set. If the line L331 and the line L332 are parallel to the central axis of the cylinder CY301, the two or more points P331 and the two or more points P332 are on a plane. Therefore, the plane is erroneously estimated as the reference plane.

[0010] An object of the present invention is to provide a surface estimation method, a surface estimation device, and a recording medium that can improve the accuracy of a reference surface. [Means for solving the problem]

[0011] According to a first aspect of the present invention, a surface estimation method includes a generating step, a region setting step, , recommendation Fixed Step , and measurement stepsIn the generating step, three-dimensional coordinates of three or more points on the subject are calculated based on a two-dimensional image of the subject, and three-dimensional image data including the three-dimensional coordinates of the three or more points is generated. In the region setting step, a reference region that is one of a three-dimensional region and a two-dimensional region is set. The three-dimensional region includes three or more points, and is set in a three-dimensional space. The three-dimensional space includes the three-dimensional coordinates included in the three-dimensional image data. The two-dimensional region is on the two-dimensional image associated with the three-dimensional coordinates calculated in the generating step. The reference area includes three or more points and is set in the two-dimensional image. The three or more points of the reference area include one or more sets of three points forming a triangle. In the estimation step, the surface of the subject is approximated based on three or more points of the three-dimensional image data corresponding to the three or more points included in the reference area. and different from the reference region A reference plane is estimated. In the measuring step, a three-dimensional distance between a measurement point on the two-dimensional image or the three-dimensional image data of the subject and the reference plane is measured.

[0012] According to a second aspect of the present invention, in the first aspect, in the area setting step, the reference area which is a three-dimensional area may be set in the three-dimensional space.

[0013] According to a third aspect of the present invention, in the first aspect, in the area setting step, the reference area which is a two-dimensional area may be set in the two-dimensional image.

[0014] According to a fourth aspect of the present invention, in the second aspect, in the region setting step, continuity of the three or more points corresponding to the three-dimensional coordinates included in the three-dimensional image data may be determined. The reference region may include only the three or more points determined to have the continuity.

[0015] According to a fifth aspect of the present invention, in the first aspect, the reference region may include a region that is not a convex set.

[0016] According to a sixth aspect of the present invention, The surface estimation method includes a generating step, a region setting step, and an estimating step. In the generating step, three-dimensional coordinates of three or more points on the object are calculated based on a two-dimensional image of the object, and three-dimensional image data including the three-dimensional coordinates of the three or more points is generated. In the region setting step, a reference region that is one of a three-dimensional region and a two-dimensional region is set. The three-dimensional region includes three or more points, and is set in a three-dimensional space. The three-dimensional space includes the three-dimensional coordinates included in the three-dimensional image data. The two-dimensional region includes three or more points, and is set in the two-dimensional image. The three or more points of the reference region include one or more sets of three points that form a triangle. In the estimating step, a reference surface that approximates a surface of the object is estimated based on three or more points of the three-dimensional image data that correspond to the three or more points included in the reference region. The reference region may include two or more regions.

[0017] According to a seventh aspect of the present invention, in the first aspect, the surface estimation method may further include an image display step, a position input step, and a state determination step. In the image display step, one of the image of the three-dimensional image data and the two-dimensional image may be displayed on a display. In the position input step, position information input through an input device may be accepted. The position information may indicate a position on the image of the three-dimensional image data or the two-dimensional image displayed on the display. In the state determination step, a state of the subject may be determined. In the area setting step, a boundary of the reference area may be determined based on the position indicated by the position information and the state.

[0018] According to an eighth aspect of the present invention, The surface estimation method includes a generating step, a region setting step, and an estimating step. In the generating step, three-dimensional coordinates of three or more points on an object are calculated based on a two-dimensional image of the object, and three-dimensional image data including the three-dimensional coordinates of the three or more points is generated. In the region setting step, a reference region that is one of a three-dimensional region and a two-dimensional region is set. The three-dimensional region includes three or more points, and is set in a three-dimensional space. The three-dimensional space includes the three-dimensional coordinates included in the three-dimensional image data. The two-dimensional region includes three or more points, and is set in the two-dimensional image. The three or more points of the reference region include one or more sets of three points that form a triangle. In the estimating step, a reference surface that approximates the surface of the object is estimated based on three or more points of the three-dimensional image data that correspond to the three or more points included in the reference region. The reference region includes a region that is not a convex set. The boundary of the reference area may include a first boundary and a second boundary located more inward than the first boundary.

[0019] According to a ninth aspect of the present invention, in the sixth aspect, in the region setting step, the three or more points corresponding to the three-dimensional coordinates included in the three-dimensional image data may be divided into two or more regions, and a boundary of the reference region may include a boundary of one or more regions included in the two or more regions.

[0020] According to a tenth aspect of the present invention, in the sixth aspect, area information indicating at least one of a size of the reference area and a position of the reference area may be recorded in advance on a recording medium. In the area setting step, at least one of the size of the reference area and the position of the reference area may be set based on the area information.

[0021] According to an eleventh aspect of the present invention, in the sixth aspect, the surface estimation method may further include an image display step of displaying one of the image of the three-dimensional image data and the two-dimensional image on a display. In the region setting step, three or more points on the image of the three-dimensional image data or the two-dimensional image may be input through an input device. In the region setting step, the reference region including the three or more input points may be set.

[0022] According to a twelfth aspect of the present invention, in the eleventh aspect, in the area setting step, the reference area may be set based on a line segment connecting the three or more input points.

[0023] According to a thirteenth aspect of the present invention, in the sixth aspect, the surface estimation method may further include an image display step of displaying one of the image of the three-dimensional image data and the two-dimensional image on a display. In the region setting step, three or more points on a line specified by a user in the image of the three-dimensional image data or the two-dimensional image may be input through an input device. In the region setting step, the reference region including the three or more points on the line may be set.

[0024] According to a 14th aspect of the present invention, in the 6th aspect, in the estimating step, the three or more points may be selected from four or more points included in the reference region. In the estimating step, the reference surface may be estimated based on three or more points of the three-dimensional image data corresponding to the three or more selected points.

[0025] According to the 15th aspect of the present invention, in the 6th aspect, the surface estimation method may further include an image display step of displaying one of the image of the 3D image data and the 2D image on a display, and displaying the reference area on the image of the 3D image data or the 2D image.

[0026] According to the 16th aspect of the present invention, in the 6th aspect, the surface estimation method may further include an image display step of displaying an image of the three-dimensional image data on a display, and displaying the three or more points of the three-dimensional image data used in estimating the reference surface on the image of the three-dimensional image data.

[0027] According to the 17th aspect of the present invention, in the 6th aspect, the surface estimation method may further include an image display step of displaying the two-dimensional image on a display and displaying three or more points on the two-dimensional image corresponding to the three or more points of the 3D image data used to estimate the reference surface.

[0028] According to an 18th aspect of the present invention, in the 6th aspect, the surface estimation method may further include a division step and an image display step. In the division step, three or more points corresponding to the three-dimensional coordinates included in the three-dimensional image data may be divided into two or more regions. In the image display step, one of an image of the three-dimensional image data and the two-dimensional image may be displayed on a display, and images of the two or more regions may be displayed on the display.

[0029] According to a 19th aspect of the present invention, in the 6th aspect, the surface estimation method may further include a map generating step and an image displaying step. In the map generating step, a curvature map indicating a distribution of curvature in a 3D shape of the subject represented by the 3D image data may be generated. In the image displaying step, one of an image of the 3D image data and the 2D image may be displayed on a display, and an image of the curvature map may be displayed on the display.

[0030] According to the twentieth aspect of the present invention, in the sixth aspect, the surface estimation method may further include an image display step of displaying one of the image of the three-dimensional image data and the two-dimensional image on a display, and displaying an area corresponding to the reference surface on the image of the three-dimensional image data or the two-dimensional image.

[0031] According to a 21st aspect of the present invention, in the 6th aspect, the surface estimation method may further include an abnormality detection step of detecting an abnormal area on the surface of the subject based on one of the image of the 3D image data and the 2D image, and in the area setting step, the reference area excluding an area corresponding to the abnormal area may be set.

[0032] According to the 22nd aspect of the present invention, in the 6th aspect, said plane estimating method may further comprise a measuring step of measuring a size of said subject based on said reference plane.

[0033] According to a 23rd aspect of the present invention, in the 22nd aspect, in the measuring step, a three-dimensional distance between the reference surface and a point on the surface of the subject may be measured.

[0034] According to a 24th aspect of the present invention, in the 6th aspect, in the estimating step, geometric characteristics of the reference surface may further be estimated.

[0035] According to a 25th aspect of the present invention, a surface estimation method includes a reading step, a region setting step, , recommendation Fixed Step , and measurement steps In the reading step, three-dimensional image data including three-dimensional coordinates of three or more points on the object calculated based on a two-dimensional image of the object is read from a recording medium. In the region setting step, a reference region that is one of a three-dimensional region and a two-dimensional region is set. The three-dimensional region includes three or more points and is set in a three-dimensional space. The three-dimensional space includes the three-dimensional coordinates included in the three-dimensional image data. The two-dimensional region is on the two-dimensional image associated with the three-dimensional coordinates included in the three-dimensional image data. The reference area includes three or more points and is set in the two-dimensional image. The three or more points of the reference area include one or more sets of three points forming a triangle. In the estimation step, the surface of the subject is approximated based on three or more points of the three-dimensional image data corresponding to the three or more points included in the reference area. and different from the reference regionA reference plane is estimated. In the measuring step, a three-dimensional distance between a measurement point on the two-dimensional image or the three-dimensional image data of the subject and the reference plane is measured.

[0036] According to a 26th aspect of the present invention, a surface estimation device includes a generation unit, a region setting unit, , recommendation Fixed department , and the measurement section The generation unit calculates three-dimensional coordinates of three or more points on the subject based on a two-dimensional image of the subject, and generates three-dimensional image data including the three-dimensional coordinates of the three or more points. The region setting unit sets a reference region which is one of a three-dimensional region and a two-dimensional region. The three-dimensional region includes three or more points, and is set in a three-dimensional space. The three-dimensional space includes the three-dimensional coordinates included in the three-dimensional image data. The two-dimensional region is on the two-dimensional image associated with the three-dimensional coordinates calculated by the generation unit. The reference area includes three or more points and is set in the two-dimensional image. The three or more points of the reference area include one or more sets of three points forming a triangle. The estimation unit approximates the surface of the subject based on three or more points of the three-dimensional image data corresponding to the three or more points included in the reference area. and different from the reference region Estimate the reference plane. The measurement unit measures a three-dimensional distance between a measurement point on the two-dimensional image or the three-dimensional image data of the subject and the reference plane.

[0037] According to a 27th aspect of the present invention, a generating step, a region setting step , recommendation Fixed Step , and measurement steps There is provided a computer-readable recording medium having a program recorded thereon for causing a computer to execute the above. In the generating step, three-dimensional coordinates of three or more points on a subject are calculated based on a two-dimensional image of the subject, and three-dimensional image data including the three-dimensional coordinates of the three or more points is generated. In the region setting step, a reference region which is one of a three-dimensional region and a two-dimensional region is set. The three-dimensional region includes three or more points, and is set in a three-dimensional space. The three-dimensional space includes the three-dimensional coordinates included in the three-dimensional image data. The two-dimensional region is on the two-dimensional image associated with the three-dimensional coordinates calculated in the generating step.The reference area includes three or more points and is set in the two-dimensional image. The three or more points of the reference area include one or more sets of three points forming a triangle. In the estimation step, the surface of the subject is approximated based on three or more points of the three-dimensional image data corresponding to the three or more points included in the reference area. and different from the reference region A reference plane is estimated. In the measuring step, a three-dimensional distance between a measurement point on the two-dimensional image or the three-dimensional image data of the subject and the reference plane is measured. Effect of the Invention

[0038] According to the above aspects, the surface estimation method, the surface estimation device, and the recording medium can improve the accuracy of the reference surface. [Brief description of the drawings]

[0039] [Figure 1] 1 is a block diagram showing a configuration of a surface estimating device according to a first embodiment of the present invention. [Diagram 2] 5 is a flowchart showing a procedure of a surface estimation process in the first embodiment of the present invention. [Diagram 3] FIG. 2 is a diagram showing an example of a three-dimensional image of point cloud data in the first embodiment of the present invention. [Figure 4] FIG. 2 is a diagram illustrating a schematic diagram of point cloud data according to the first embodiment of the present invention. [Diagram 5] FIG. 2 is a diagram showing an example of a 2D image in the first embodiment of the present invention. [Figure 6] FIG. 11 is a perspective view showing the overall configuration of an endoscope apparatus according to a second embodiment of the present invention. [Figure 7] FIG. 11 is a block diagram showing the internal configuration of an endoscope apparatus according to a second embodiment of the present invention. [Figure 8] 13 is a block diagram showing the functional configuration of a CPU included in an endoscope apparatus according to a second embodiment of the present invention. FIG. [Figure 9] 10 is a flowchart showing the procedure of a surface estimation process in the second embodiment of the present invention. [Figure 10] 13A and 13B are diagrams illustrating examples of images displayed on a display unit in the second embodiment of the present invention. [Figure 11]13A and 13B are diagrams illustrating examples of images displayed on a display unit in the second embodiment of the present invention. [Figure 12] 13A and 13B are diagrams illustrating examples of images displayed on a display unit in the second embodiment of the present invention. [Figure 13] 13A and 13B are diagrams illustrating examples of images displayed on a display unit in the second embodiment of the present invention. [Figure 14] FIG. 13 is a diagram showing an example of an image displayed on a display unit in a first modified example of the second embodiment of the present invention. [Figure 15] FIG. 13 is a diagram showing an example of an image displayed on a display unit in a first modified example of the second embodiment of the present invention. [Figure 16] FIG. 13 is a diagram showing an example of an image displayed on a display unit in a first modified example of the second embodiment of the present invention. [Figure 17] FIG. 13 is a diagram showing an example of a reference region in a second modified example of the second embodiment of the present invention. [Figure 18] FIG. 13 is a diagram showing an example of a reference region in a second modified example of the second embodiment of the present invention. [Figure 19] FIG. 13 is a diagram showing an example of an image displayed on a display unit in a third modified example of the second embodiment of the present invention. [Figure 20] 13 is a block diagram showing the functional configuration of a CPU included in an endoscope apparatus according to a third embodiment of the present invention. FIG. [Figure 21] 13 is a flowchart showing a procedure of three-dimensional measurement in the third embodiment of the present invention. [Figure 22] FIG. 13 is a diagram for explaining a reference region in a fourth embodiment of the present invention. [Figure 23] FIG. 13 is a diagram for explaining a reference region in a fourth embodiment of the present invention. [Figure 24] FIG. 13 is a diagram showing an example of a reference region in the fourth embodiment of the present invention. [Diagram 25] FIG. 13 is a diagram showing an example of a reference region in the fourth embodiment of the present invention. [Figure 26] FIG. 13 is a diagram showing an example of a reference region in the fourth embodiment of the present invention. [Figure 27]FIG. 13 is a diagram showing an example of a reference region in the fourth embodiment of the present invention. [Figure 28] FIG. 13 is a diagram showing an example of points used to estimate a reference plane in the fourth embodiment of the present invention. [Figure 29] FIG. 13 is a diagram showing an example of points used to estimate a reference plane in the fourth embodiment of the present invention. [Diagram 30] FIG. 13 is a diagram showing an example of a reference region in the fifth embodiment of the present invention. [Diagram 31] FIG. 13 is a diagram showing an example of a reference region in the fifth embodiment of the present invention. [Diagram 32] 13 is a block diagram showing the functional configuration of a CPU included in an endoscope apparatus according to a sixth embodiment of the present invention. FIG. [Diagram 33] 23 is a flowchart showing the procedure of a surface estimation process in the sixth embodiment of the present invention. [Diagram 34] FIG. 23 is a diagram showing an example of an image displayed on a display unit in the sixth embodiment of the present invention. [Diagram 35] FIG. 23 is a diagram showing two or more regions on a three-dimensional image of point cloud data in the sixth embodiment of the present invention. [Diagram 36] FIG. 23 is a diagram showing an example of an image displayed on a display unit in the sixth embodiment of the present invention. [Figure 37] 23 is a flowchart showing the procedure of a surface estimation process in a first modified example of the sixth embodiment of the present invention. [Figure 38] FIG. 23 is a diagram showing an example of an image displayed on a display unit in a first modified example of the sixth embodiment of the present invention. [Figure 39] 23 is a flowchart showing the procedure of a surface estimation process in a third modified example of the sixth embodiment of the present invention. [Diagram 40] FIG. 23 is a diagram showing an example of an image displayed on a display unit in a third modified example of the sixth embodiment of the present invention. [Diagram 41] FIG. 13 is a diagram showing an example of an image displayed on a display unit in the seventh embodiment of the present invention. [Diagram 42] FIG. 13 is a diagram showing an example of an image displayed on a display unit in the seventh embodiment of the present invention. [Diagram 43] FIG. 23 is a diagram showing an example of an image displayed on a display unit in the eighth embodiment of the present invention. [Diagram 44] FIG. 13 is a block diagram showing the functional configuration of a CPU included in an endoscope apparatus according to a ninth embodiment of the present invention. [Diagram 45] 13 is a flowchart showing the procedure of a surface estimation process in a ninth embodiment of the present invention. [Diagram 46] FIG. 13 is a diagram showing an example of an image displayed on a display unit in the ninth embodiment of the present invention. [Figure 47] FIG. 23 is a block diagram showing the functional configuration of a CPU included in an endoscope apparatus according to a modified example of the ninth embodiment of the present invention. [Figure 48] 23 is a flowchart showing the procedure of a surface estimation process in a modified example of the ninth embodiment of the present invention. [Figure 49] FIG. 23 is a diagram showing an example of an image displayed on a display unit in a modified example of the ninth embodiment of the present invention. [Figure 50] 23 is a block diagram showing the functional configuration of a CPU included in an endoscope apparatus according to a tenth embodiment of the present invention. FIG. [Figure 51] 23 is a flowchart showing the procedure of a surface estimation process in a tenth embodiment of the present invention. [Figure 52] FIG. 23 is a diagram showing an example of an image displayed on a display unit in the tenth embodiment of the present invention. [Diagram 53] FIG. 23 is a diagram showing an example of an image displayed on a display unit in the tenth embodiment of the present invention. [Figure 54] 23 is a block diagram showing the functional configuration of a CPU included in an endoscope apparatus according to an eleventh embodiment of the present invention. FIG. [Figure 55] 23 is a flowchart showing the procedure of a surface estimation process in the eleventh embodiment of the present invention. [Figure 56] FIG. 23 is a diagram showing an example of an image displayed on a display unit in the eleventh embodiment of the present invention. [Figure 57] FIG. 26 is a block diagram showing the configuration of a personal computer according to a twelfth embodiment of the present invention. [Figure 58] FIG. 26 is a block diagram showing the functional configuration of a CPU included in a personal computer according to a twelfth embodiment of the present invention. [Figure 59] FIG. 2 is a block diagram showing the functional configuration of a CPU included in an endoscope apparatus according to an embodiment of the related invention. [Figure 60] 10 is a flowchart showing a processing procedure for detecting an area in which a factor of interest occurs in an embodiment of the related invention. [Figure 61] 1A and 1B are diagrams illustrating examples of stereo images in an embodiment of the related invention. [Figure 62] FIG. 13 is a diagram showing an example of an image on which triangles are set in an embodiment of the related invention. [Figure 63] FIG. 13 is a diagram showing triangles set in each of two images included in a stereo image in an embodiment of the related invention. [Figure 64] FIG. 11 is a diagram showing an example of images included in a stereo image in an embodiment of the related invention. [Figure 65] FIG. 11 is a diagram showing an example of images included in a stereo image in an embodiment of the related invention. [Figure 66] FIG. 11 is a diagram showing an example of an area in which an attention factor occurs in an embodiment of the related invention. [Figure 67] FIG. 13 is a diagram showing an example of setting points for estimating a reference plane in the prior art; [Figure 68] FIG. 13 is a diagram showing an example of setting points for estimating a reference plane in the prior art; [Figure 69] FIG. 13 is a diagram showing an example of setting points for estimating a reference plane in the prior art; [Figure 70] FIG. 13 is a diagram showing an example of setting points for estimating a reference plane in the prior art; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0040] An embodiment of the present invention will be described with reference to the drawings.

[0041] (First embodiment) 1 shows the configuration of a surface estimating device 7 according to a first embodiment of the present invention. The surface estimating device 7 shown in FIG.

[0042] The generating unit 70 calculates three-dimensional coordinates of three or more points on the subject based on the two-dimensional image of the subject, and generates point cloud data (three-dimensional image data) including the three-dimensional coordinates of the three or more points (generating step). The region setting unit 71 sets a reference region which is one of a three-dimensional region and a two-dimensional region (region setting step). The three-dimensional region includes three or more points, and is set in a three-dimensional space. The three-dimensional space includes three-dimensional coordinates included in the point cloud data. The two-dimensional region includes three or more points, and is set in the two-dimensional image of the subject. The three or more points of the reference region include one or more sets of three points forming a triangle. The surface estimating unit 72 estimates a reference surface that approximates the surface of the subject based on three or more points of the point cloud data corresponding to the three or more points included in the reference region (estimating step).

[0043] Each unit shown in FIG. 1 may be composed of at least one of a processor and a logic circuit. For example, the processor is at least one of a CPU (Central Processing Unit), a DSP (Digital Signal Processor), and a GPU (Graphics Processing Unit). For example, the logic circuit is at least one of an ASIC (Application Specific Integrated Circuit) and an FPGA (Field-Programmable Gate Array). Each unit shown in FIG. 1 may include one or more processors. Each unit shown in FIG. 1 may include one or more logic circuits.

[0044] The computer of the surface estimation device 7 may load a program and execute the loaded program. The program includes instructions that define the operations of the generation unit 70, the region setting unit 71, and the surface estimation unit 72. In other words, the functions of the generation unit 70, the region setting unit 71, and the surface estimation unit 72 may be realized by software.

[0045] The above program may be recorded in a computer-readable recording medium. The program may be transmitted from a computer that holds the program to the surface estimation device 7 via a transmission medium or by a transmission wave in the transmission medium. A "transmission medium" that transmits the program is a medium that has a function of transmitting information. Media that have a function of transmitting information include networks (communication networks) such as the Internet and communication lines (communication lines) such as telephone lines. The above program may realize some of the functions described above. Furthermore, the above program may be a difference file (difference program). A combination of a program already recorded in a computer and a difference program may realize the functions described above.

[0046] The surface estimation process in the first embodiment will be described with reference to Fig. 2. Fig. 2 shows the procedure of the surface estimation process.

[0047] The generating unit 70 calculates three-dimensional coordinates (3D coordinates) of three or more points on the subject based on a two-dimensional image (2D image) of the subject, and generates point cloud data including the 3D coordinates of the three or more points (step S1). Step S1 corresponds to a generating step.

[0048] When the 2D image of the object is a stereo image, one 2D image includes an image of the object seen from a first viewpoint and an image of the object seen from a second viewpoint different from the first viewpoint. The generating unit 70 calculates 3D coordinates corresponding to each pixel of the 2D image. The generating unit 70 generates point cloud data including 3D coordinates of three or more points on the object. In the point cloud data, the 3D coordinates of each of the three or more points are associated with a point on the 2D image. Specifically, the 3D coordinates in the point cloud data are associated with a pixel on the 2D image. For example, the point cloud data includes 3D coordinates and position information of the pixel on the 2D image.

[0049] The generating unit 70 may calculate the 3D coordinates of three or more points on the object by using two or more images and applying SfM (Structure from Motion). The generating unit 70 may calculate the 3D coordinates of three or more points on the object by using two or more 2D images of the object onto which two or more stripe patterns having different spatial phases are projected and applying a phase shifting method. The generating unit 70 may calculate the 3D coordinates of three or more points on the object by using one 2D image of the object onto which a pattern light in which light and dark areas are randomly arranged is irradiated. The method of generating point cloud data is not limited to the above method.

[0050] The generating unit 70 may generate a three-dimensional image (3D image) for displaying the point cloud data on a display. The 3D image is an image of a three-dimensional shape (3D shape) represented by the point cloud data. The 3D image includes color data for each pixel. Each pixel of the 3D image is associated with 3D coordinates. The generating unit 70 may generate 3D images corresponding to each of two or more different viewpoints.

[0051] After step S1, the region setting unit 71 sets a reference region which is either a three-dimensional region or a two-dimensional region (step S2). Step S2 corresponds to a region setting step.

[0052] 3 shows an example of a 3D image of point cloud data. The generating unit 70 converts the point cloud data into mesh data and adds texture to the mesh data. The generating unit 70 generates a 3D image G1 by performing this process. The generating unit 70 may generate a 3D image without converting the point cloud data into mesh data.

[0053] In the 3D image G1, point cloud data PD1 to which texture has been added is shown. In the example shown in Fig. 3, the region setting unit 71 sets a three-dimensional reference region R1. The reference region R1 is a cube and has a volume. The reference region R1 may be a rectangular parallelepiped, a sphere, a cylinder, or the like. The shape of the reference region R1 is not limited to these examples.

[0054] The generating unit 70 sets at least one of the position of the reference region R1 and the size of the reference region R1 based on information input through an input device. Alternatively, the generating unit 70 automatically sets at least one of the position of the reference region R1 and the size of the reference region R1. In the example shown in FIG. 3, a 3D image G1 is used to explain the reference region R1. It is not necessary for the generating unit 70 to generate the 3D image G1.

[0055] FIG. 4 illustrates a schematic diagram of point cloud data in a three-dimensional space (3D space). The 3D coordinates of the point cloud data are defined in a 3D space SP1, and include an X coordinate, a Y coordinate, and a Z coordinate. Two or more points CP1 in the point cloud data are illustrated in FIG. 4. In the example illustrated in FIG. 4, the region setting unit 71 sets a three-dimensional reference region R2 in the 3D space SP1. The reference region R2 includes three or more points CP1 in the point cloud data. The three or more points CP1 in the reference region R2 spread out three-dimensionally.

[0056] The three or more points CP1 in the reference region R2 include one or more sets of three points that form a triangle. For example, the points CP1a, CP1b, and CP1c in the reference region R2 form a triangle T1. There are many sets of three points that form a triangle in the reference region R2.

[0057] Even if any virtual line in the 3D space SP1 passes through one or more points CP1 in the reference region R2, there are always one or more points CP1 in the reference region R2 through which the virtual line does not pass. In FIG. 4, a virtual line L1 and a virtual line L2 are shown. Each of the virtual line L1 and the virtual line L2 passes through only a part of the three or more points CP1 in the reference region R2. Any virtual line passing through the reference region R2 passes through only a part of the three or more points CP1 in the reference region R2.

[0058] FIG. 5 shows an example of a 2D image of a subject. In the example shown in FIG. 5, the region setting unit 71 sets a two-dimensional reference region R3 in the 2D image G2 of the subject. The reference region R3 is a square and has an area. The reference region R3 may be a polygon having three or more vertices. The reference region R3 may be a circle, an ellipse, or the like. The shape of the reference region R3 is not limited to these examples.

[0059] The generating unit 70 sets at least one of the position and the size of the reference region R3 based on information input through an input device. Alternatively, the generating unit 70 automatically sets at least one of the position and the size of the reference region R3.

[0060] The reference region R3 includes three or more points on the surface of the subject. The points on the 2D image of the subject are associated with the 3D coordinates of a point in the point cloud data. Thus, each of the three or more points in the reference region R3 is associated with the 3D coordinates of a point in the point cloud data. The three or more points in the reference region R3 extend in two dimensions. Thus, the three or more points in the point cloud data corresponding to the three or more points in the reference region R3 extend in three dimensions.

[0061] After step S2, the plane estimation unit 72 estimates a reference plane that approximates the surface of the subject based on three or more points of the point cloud data corresponding to three or more points included in the reference area (step S3). Step S3 corresponds to an estimation step. When step S3 is executed, the plane estimation process ends.

[0062] When the reference region is a three-dimensional region, the reference region includes three or more points in the point cloud data. The plane estimation unit 72 acquires the 3D coordinates of each of the three or more points from the point cloud data. The plane estimation unit 72 estimates a reference plane based on the 3D coordinates of the three or more points in the reference region.

[0063] When the reference region is a two-dimensional region, the reference region includes three or more points on the 2D image of the subject. The points on the 2D image of the subject are associated with 3D coordinates of points in the point cloud data. The plane estimation unit 72 obtains 3D coordinates associated with each of the three or more points in the reference region from the point cloud data. The plane estimation unit 72 estimates a reference plane based on the 3D coordinates of three or more points of the point cloud data corresponding to the three or more points in the reference region.

[0064] For example, the surface estimation unit 72 estimates the reference surface, which is a plane, by using a least squares method. The surface estimation unit 72 may estimate the reference surface by using a robust estimation algorithm such as RANSAC (Random Sample Consensus). The surface estimation unit 72 may estimate the reference surface by using machine learning such as Deep Learning. The reference surface may be a spherical surface, a cylindrical surface, a quadratic curved surface, or the like. When the surface estimation unit 72 estimates a plane, the reference region includes three or more points. When the surface estimation unit 72 estimates a spherical surface, the reference region includes four or more points. When the surface estimation unit 72 estimates a cylindrical surface, the reference region includes five or more points. The shape of the reference surface is not limited to the above examples.

[0065] Instead of the generating unit 70, the surface estimation device 7 may have a reading unit that reads out point cloud data including three-dimensional coordinates of three or more points on a subject calculated based on a two-dimensional image of the subject from a recording medium. The reading unit may read out the point cloud data from the recording medium without executing step S1 shown in FIG. 2 (reading step). A processing unit having a function similar to that of the generating unit 70 generates the point cloud data and records the point cloud data on the recording medium. A device different from the surface estimation device 7 may have the processing unit.

[0066] In the first embodiment, the plane estimation device 7 sets a three-dimensional or two-dimensional reference area. The reference area includes three or more points that spread in a three-dimensional or two-dimensional manner. This reduces the possibility that three or more points of the point cloud data used to estimate the reference plane are unevenly positioned on a plane or a straight line. Therefore, the plane estimation device 7 can improve the accuracy of the reference plane.

[0067] Second embodiment A second embodiment of the present invention will be described. In the following, an example will be described in which the surface estimation device is an endoscope device. The surface estimation device is not limited to an endoscope device as long as it is a device having a surface estimation function. The surface estimation device may be an embedded device implemented in a specific device or system. The surface estimation device may be an environment on a cloud. The subject is an industrial product.

[0068] Fig. 6 shows the external appearance of the endoscope device 1 of the second embodiment. Fig. 7 shows the internal configuration of the endoscope device 1. The endoscope device 1 captures an image of a subject and generates an image. In order to observe various subjects, an examiner can replace the optical adapter attached to the tip of the insertion portion 2, select a built-in image processing program, and add an image processing program.

[0069] The endoscope device 1 shown in FIG. 6 includes an insertion section 2, a main body section 3, an operation section 4, and a display section 5.

[0070] The insertion section 2 is inserted into the inside of the subject. The insertion section 2 is a long, thin tube that is bendable from the tip 20 to the base end. The insertion section 2 captures an image of the subject and outputs an image signal to the main body section 3. An optical adapter is attached to the tip 20 of the insertion section 2. For example, a monocular optical adapter is attached to the tip 20 of the insertion section 2. The main body section 3 is a control device that includes a storage section that stores the insertion section 2. The operation section 4 accepts user operations on the endoscope device 1. The display section 5 has a display screen, and displays an image of the subject acquired by the insertion section 2, an operation menu, etc. on the display screen.

[0071] The operation unit 4 is a user interface (input device). For example, the operation unit 4 is at least one of a button, a switch, a key, a mouse, a joystick, a touch pad, a trackball, and a touch panel. The display unit 5 is a monitor (display) such as an LCD (Liquid Crystal Display). The display unit 5 may be a touch panel. In that case, the operation unit 4 and the display unit 5 are integrated. The user touches the screen of the display unit 5 by using a part of the body (e.g., a finger) or a tool.

[0072] The main body 3 shown in FIG. 7 has an endoscope unit 8, a CCU (Camera Control Unit) 9, and a control device 10. The endoscope unit 8 has a light source device and a bending device, which are not shown. The light source device supplies illumination light necessary for observation. The bending device bends a bending mechanism built into the insertion section 2. An imaging element 28 is built into the tip 20 of the insertion section 2. The imaging element 28 is an image sensor. The imaging element 28 photoelectrically converts an optical image of a subject formed by an optical adapter and generates an imaging signal. The CCU 9 drives the imaging element 28. The imaging signal output from the imaging element 28 is input to the CCU 9. The CCU 9 performs preprocessing, including amplification and noise removal, on the imaging signal acquired by the imaging element 28. The CCU 9 converts the preprocessed imaging signal into a video signal such as an NTSC signal.

[0073] The control device 10 includes a video signal processing circuit 12, a ROM (Read Only Memory) 13, a RAM (Random Access Memory) 14, a card interface 15, an external device interface 16, a control interface 17, and a CPU (Central Processing Unit) 18.

[0074] The video signal processing circuit 12 performs a predetermined video processing on the video signal output from the CCU 9. For example, the video signal processing circuit 12 executes video processing related to improving visibility. For example, the video processing includes color reproduction, gradation correction, noise suppression, and edge enhancement. The video signal processing circuit 12 synthesizes the video signal output from the CCU 9 with a graphic image signal generated by the CPU 18. The graphic image signal includes an image of an operation screen and measurement information, etc. The measurement information includes a 3D image or measurement results of point cloud data, etc. The video signal processing circuit 12 outputs the synthesized video signal to the display unit 5. In addition, the video signal processing circuit 12 outputs image data based on the video signal output from the CCU 9 to the CPU 18.

[0075] The ROM 13 is a non-volatile recording medium in which a program is recorded for the CPU 18 to control the operation of the endoscope apparatus 1. The RAM 14 is a volatile recording medium in which information used by the CPU 18 to control the endoscope apparatus 1 is temporarily stored. The CPU 18 controls the operation of the endoscope apparatus 1 based on the program recorded in the ROM 13.

[0076] A memory card 42, which is a removable recording medium, is connected to the card interface 15. The card interface 15 imports the control processing information, image information, etc. stored in the memory card 42 into the control device 10. The card interface 15 also records the control processing information, image information, etc. generated by the endoscope device 1 into the memory card 42.

[0077] An external device such as a USB device is connected to the external device interface 16. For example, a personal computer (PC) 41 is connected to the external device interface 16. The external device interface 16 transmits information to the PC 41 and receives information from the PC 41. This allows the monitor of the PC 41 to display information. Also, a user can perform operations related to the control of the endoscope device 1 by inputting instructions to the PC 41.

[0078] The control interface 17 executes communication for operational control with the operation section 4, the endoscope unit 8, and the CCU 9. The control interface 17 notifies the CPU 18 of an instruction input by a user to the operation section 4. The control interface 17 outputs a control signal for controlling the light source device and the bending device to the endoscope unit 8. The control interface 17 outputs a control signal for controlling the image sensor 28 to the CCU 9.

[0079] The program executed by the CPU 18 may be recorded in a computer-readable recording medium. The program recorded in this recording medium may be read and executed by a computer other than the endoscope device 1. For example, the PC 41 may read and execute the program. The PC 41 may control the endoscope device 1 by transmitting control information for controlling the endoscope device 1 to the endoscope device 1 according to the program. Alternatively, the PC 41 may obtain a video signal from the endoscope device 1 and process the obtained video signal.

[0080] As described above, the endoscope device 1 has the imaging element 28 and the CPU 18. The imaging element 28 captures an image of a subject and generates an imaging signal. The imaging signal includes an image of the subject. Thus, the imaging element 28 captures an image of the subject and obtains the image of the subject. The image obtained by the imaging element 28 is input to the CPU 18 via the video signal processing circuit 12.

[0081] The imaging element 28 has a function of an image acquisition unit that acquires an image of a subject. The image acquisition unit may be an image input device. For example, when the PC 41 operates as a surface estimation device, the image acquisition unit is a communication interface (communication device) that communicates with the endoscope device 1. The image acquisition unit may be a wireless communication device. The image acquisition unit may be a read circuit that reads out an image from a recording medium on which the image is recorded.

[0082] Fig. 8 shows a functional configuration of CPU 18. The functions of CPU 18 are configured by control unit 180, generation unit 181, area setting unit 182, display control unit 183, position calculation unit 184, point setting unit 185, and surface estimation unit 186. At least one of the blocks shown in Fig. 8 may be configured by a circuit separate from CPU 18.

[0083] Each unit shown in Fig. 8 may be composed of at least one of a processor and a logic circuit. Each unit shown in Fig. 8 may include one or more processors. Each unit shown in Fig. 8 may include one or more logic circuits.

[0084] The control unit 180 acquires a 2D image (image data) of the subject from the video signal processing circuit 12, and controls the processing executed by each unit shown in FIG.

[0085] The generating unit 181 has the same function as the generating unit 70 shown in Fig. 1. The generating unit 181 calculates 3D coordinates of three or more points on a subject based on a 2D image of the subject, and generates point cloud data including the 3D coordinates of the three or more points (generating step). The generating unit 181 can generate point cloud data in the same manner as the method described in the first embodiment. In addition, the generating unit 181 generates a 3D image for displaying the point cloud data on the display unit 5.

[0086] The region setting unit 182 has the same function as the region setting unit 71 shown in Fig. 1. The region setting unit 182 sets a reference region which is either a three-dimensional region or a two-dimensional region (region setting step). The region setting unit 182 can set the reference region in the same manner as the method described in the first embodiment.

[0087] The display control unit 183 displays the 2D image of the subject acquired by the imaging element 28 and the 3D image of the point cloud data generated by the generation unit 181 on the display unit 5. For example, the display control unit 183 controls the processing executed by the video signal processing circuit 12. The display control unit 183 causes the video signal processed by the video signal processing circuit 12 to be output from the video signal processing circuit 12 to the display unit 5. The video signal includes color data of each pixel of the 2D image of the subject. The display unit 5 displays the 2D image of the subject based on the video signal output from the video signal processing circuit 12.

[0088] Alternatively, the display control unit 183 outputs the 3D video signal to the display unit 5 via the video signal processing circuit 12. The 3D video signal includes color data of each pixel of the 3D image of the point cloud data. The display unit 5 displays the 3D image of the point cloud data based on the 3D video signal output from the video signal processing circuit 12. Specifically, the display control unit 183 generates a graphic image signal for displaying the 3D image of the point cloud data. The display control unit 183 outputs the generated graphic image signal to the video signal processing circuit 12. The video signal processing circuit 12 combines the video signal output from the CCU 9 and the graphic image signal output from the CPU 18. The video signal processing circuit 12 outputs the combined video signal to the display unit 5. The display unit 5 displays the 2D image of the subject and the 3D image of the point cloud data.

[0089] The display control unit 183 displays various information on the display unit 5. That is, the display control unit 183 displays various information on an image. The various information includes measurement results and the like. The various information may include a cursor. The cursor is a mark that allows the user to specify a specific point on an image.

[0090] For example, the display control unit 183 generates a graphic image signal of various information. The display control unit 183 outputs the generated graphic image signal to the video signal processing circuit 12. The video signal processing circuit 12 combines the video signal output from the CCU 9 and the graphic image signal output from the CPU 18. This causes the various information to be superimposed on the image. The video signal processing circuit 12 outputs the combined video signal to the display unit 5. The display unit 5 displays the image on which the various information is superimposed.

[0091] A user operates the operation unit 4 to input position information indicating a position on the image to the operation unit 4. The operation unit 4 outputs the position information input by the user to the operation unit 4. The position information input to the operation unit 4 is input to a control interface 17 which is an input unit. The position information is output from the control interface 17 to the CPU 18. A position calculation unit 184 calculates a position on the image based on the position information input to the operation unit 4.

[0092] For example, when a cursor is displayed on an image, the position information indicates the position at which the cursor is to be displayed. The display control unit 183 displays the cursor at the position calculated by the position calculation unit 184.

[0093] If the display unit 5 and the operation unit 4 are touch panels, the user may input a position on the image to the operation unit 4 by touching the screen of the display unit 5. In this case, the operation unit 4 outputs position information indicating that position.

[0094] Point setting unit 185 accepts a point on the subject through operation unit 4. For example, the user moves a cursor to a desired position on the image and executes a predetermined operation. At this time, point setting unit 185 accepts a point corresponding to that position. If display unit 5 and operation unit 4 are touch panels, the user inputs a point on the image to operation unit 4 by touching the screen of display unit 5. Point setting unit 185 accepts the point. Point setting unit 185 generates point information indicating the accepted point.

[0095] When the point setting unit 185 receives a point on the 2D image of the subject, the point information includes the coordinates of the pixel corresponding to the point. The coordinates of the pixel are associated with the 3D coordinates in the point cloud data. When the point setting unit 185 receives a point on the 3D image of the point cloud data, the point information includes the 3D coordinates of the point.

[0096] The point setting unit 185 receives a reference point. The reference point indicates a reference position for setting a reference area.

[0097] When the point setting unit 185 receives a point on a 2D image of a subject, the point setting unit 185 sets the received point in the 2D image. When the point setting unit 185 receives a point on a 3D image of the point cloud data, the point setting unit 185 sets the received point in the 3D image. Position information of the point set by the point setting unit 185 is held in the RAM 14. The point is set by associating the point with a specific image.

[0098] The plane estimation unit 186 estimates a reference plane that approximates the surface of the subject based on three or more points of the point cloud data corresponding to three or more points included in the reference region (estimation step). The plane estimation unit 186 can estimate the reference plane by the same method as the method described in the first embodiment.

[0099] The surface estimation process in the second embodiment will be described with reference to Fig. 9. Fig. 9 shows the procedure of the surface estimation process.

[0100] The generating unit 181 calculates the 3D coordinates of three or more points on the object based on the 2D image of the object, and generates point cloud data including the 3D coordinates of the three or more points. The generating unit 181 also generates a 3D image of the point cloud data (step S101). Step S101 corresponds to a generating step.

[0101] After step S101, the display control unit 183 displays the 2D image of the subject and the 3D image of the point cloud data on the display unit 5 (step S102). The display control unit 183 may display only the 2D image of the subject on the display unit 5.

[0102] 10 shows an example of an image displayed on the display unit 5 in step S102. A 2D image G11 of the subject and a 3D image G12 of the point cloud data are displayed on the display unit 5. When an instruction to change the viewpoint of the 3D image G12 is input through the operation unit 4, the generation unit 181 may generate a new 3D image of the point cloud data corresponding to the subject viewed from the changed viewpoint. The display control unit 183 may display the new 3D image on the display unit 5 instead of the 3D image G12.

[0103] In the example shown in FIG. 10, the 2D image G11 and the 3D image G12 are arranged in the horizontal direction of the screen of the display unit 5. The arrangement of the 2D image G11 and the 3D image G12 is not limited to this example. For example, the 2D image G11 and the 3D image G12 may be arranged in the vertical direction of the screen of the display unit 5. In this case, the 2D image G11 and the 3D image G12 may be rotated by 90 degrees. A part of the 2D image G11 and a part of the 3D image G12 may overlap each other.

[0104] When the 2D image of the subject is a stereo image, the 2D image includes a first image of the subject seen from a first viewpoint and a second image of the subject seen from a second viewpoint different from the first viewpoint. The display control unit 183 may display the first image and the second image on the display unit 5. Alternatively, the display control unit 183 may display only one of the first image and the second image on the display unit 5.

[0105] After step S102, point setting unit 185 accepts two reference points on the 2D image of the subject through operation unit 4, and generates point information indicating each of the two accepted reference points (step S103).

[0106] 11 shows an example of an image displayed on the display unit 5 in step S103. A 2D image G11 that is the same as the 2D image G11 shown in FIG.

[0107] In an example in which a cursor is displayed on the 2D image G11, the user moves the cursor to a desired position on the 2D image G11 and executes a predetermined operation. At this time, the point setting unit 185 accepts a point corresponding to that position. In an example in which the display unit 5 and the operation unit 4 are a touch panel, the user touches the screen of the display unit 5. At this time, the point setting unit 185 accepts a point corresponding to the touched position.

[0108] 11, the point setting unit 185 receives a reference point P11 and a reference point P12. A mark indicating the reference point P11 and a mark indicating the reference point P12 may be displayed on the 2D image G11.

[0109] After step S103, the region setting unit 182 sets a reference region based on the two reference points indicated by the point information (step S104). Step S104 corresponds to a region setting step.

[0110] The region setting unit 182 sets a two-dimensional reference region in the 2D image of the subject. For example, the region setting unit 182 sets a reference region R11 in the 2D image G11 based on the reference points P11 and P12 shown in Fig. 11. In the example shown in Fig. 11, the shape of the reference region R11 is a rectangle. The reference points P11 and P12 are vertices on the diagonal line of the reference region R11.

[0111] Information on the reference area set by the area setting unit 182 is held in the RAM 14. The information includes the position and size of the reference area. The reference area is set by associating the reference area with a 2D image of the subject.

[0112] After step S104, the display control unit 183 displays the reference region on the 2D image of the subject (step S105).

[0113] Specifically, the display control unit 183 generates a graphic image signal for displaying the reference area. The display control unit 183 outputs the generated graphic image signal to the video signal processing circuit 12. The video signal processing circuit 12 combines the video signal output from the CCU 9 and the graphic image signal output from the CPU 18. The video signal processing circuit 12 outputs the combined video signal to the display unit 5. The display unit 5 displays a 2D image of the subject on which the reference area is superimposed.

[0114] Fig. 12 shows an example of an image displayed on the display unit 5 in step S105. A 2D image G11 that is the same as the 2D image G11 shown in Fig. 10 and a 3D image G12 that is the same as the 3D image G12 shown in Fig. 10 are displayed on the display unit 5. A reference region R11 is displayed on the 2D image G11.

[0115] In the example shown in FIG. 12, a line (frame) showing the outline of the reference region R11 is displayed on the 2D image G11. In the example shown in FIG. 12, the surface of the subject within the reference region R11 can be seen. The inside of the reference region R11 may be displayed in a predetermined color or pattern. In this case, the surface of the subject within the reference region R11 does not have to be seen. As long as the user can confirm the position and size of the reference region R11, the method of displaying the reference region R11 is not limited to the above method.

[0116] The display control unit 183 displays a 2D image of the subject on the display unit 5 in step S102, and displays the reference area on the 2D image in step S105 (image display step). The user can check whether the reference area has been set at a position desired by the user.

[0117] After step S105, the surface estimation unit 186 estimates a reference surface that approximates the surface of the subject based on three or more points of the point cloud data corresponding to three or more points included in the reference region (step S106). Step S106 corresponds to an estimation step.

[0118] The plane estimation unit 186 extracts all pixels in a reference region of the 2D image of the object. The pixels in the 2D image of the object are associated with 3D coordinates in the point cloud data. The plane estimation unit 186 obtains the 3D coordinates of each of the extracted pixels from the point cloud data. The plane estimation unit 186 estimates the reference plane by using the obtained 3D coordinates.

[0119] In the estimation step, the surface estimation unit 186 may select three or more points from the four or more points included in the reference region. In the estimation step, the surface estimation unit 186 may estimate a reference surface that approximates the surface of the subject based on three or more points of the point cloud data corresponding to the selected three or more points.

[0120] That is, the plane estimation unit 186 may extract a portion of all pixels in the reference region of the 2D image of the subject. For example, the plane estimation unit 186 may extract a predetermined percentage (e.g., 50%) or more of all pixels in the reference region of the 2D image. The extracted pixels include one or more sets of three pixels that form a triangle. There is no straight line that passes through all of the extracted pixels.

[0121] After step S106, the display control unit 183 displays the reference plane on the 2D image of the subject (step S107). When step S107 is executed, the plane estimation process ends.

[0122] Specifically, the display control unit 183 generates a graphic image signal for displaying the reference plane. The display control unit 183 outputs the generated graphic image signal to the video signal processing circuit 12. The video signal processing circuit 12 combines the video signal output from the CCU 9 and the graphic image signal output from the CPU 18. The video signal processing circuit 12 outputs the combined video signal to the display unit 5. The display unit 5 displays a 2D image of the subject on which the reference plane is superimposed.

[0123] Figure 13 shows an example of an image displayed on the display unit 5 in step S107. A 2D image G11 that is the same as the 2D image G11 shown in Figure 10 and a 3D image G12 that is the same as the 3D image G12 shown in Figure 10 are displayed on the display unit 5. A reference plane F11 is displayed on the 2D image G11.

[0124] For example, the display control unit 183 obtains 3D coordinates associated with each pixel in the 2D image G11 from the point cloud data. The display control unit 183 calculates a three-dimensional distance (3D distance) between the point having the 3D coordinates and the reference plane. If the 3D distance is smaller than a predetermined distance, the display control unit 183 extracts a pixel on the 2D image G11 corresponding to the point. The display control unit 183 repeats the above process by using all or some of the pixels of the 2D image G11. The display control unit 183 generates a graphic image signal for displaying an area including the extracted pixels as the reference plane.

[0125] In the example shown in FIG. 13, a line (frame) indicating the outline of an area including the extracted pixels is displayed as a reference plane F11 on the 2D image G11. In the example shown in FIG. 13, the surface of the subject within the line indicating the reference plane F11 can be seen. The inside of the line may be displayed in a predetermined color or pattern. In this case, the surface of the subject within the line does not have to be seen. As long as the user can confirm the position of the reference plane F11, the method of displaying the reference plane F11 is not limited to the above method. The user can confirm whether the reference plane F11 accurately approximates the surface of the subject.

[0126] In the example shown in Fig. 13, the reference region R11 shown in Fig. 12 is not displayed. The reference region R11 and the reference plane F11 may be displayed on the 2D image G11.

[0127] The display control unit 183 displays a 2D image of the subject on the display unit 5 in step S102, and displays an area corresponding to the reference surface on the 2D image in step S107 (image display step). The user can check whether the reference surface accurately approximates the surface of the subject.

[0128] After point setting unit 185 accepts the reference point in step S103, the user may change the reference point. For example, the user inputs position information indicating a new position of the reference point to operation unit 4. The position information is output to CPU 18 via control interface 17. Area setting unit 182 changes the reference point based on the position information.

[0129] Region information indicating at least one of the size and the position of the reference region may be recorded in advance on the recording medium. In step S104, the region setting unit 182 may set at least one of the size and the position of the reference region based on the region information.

[0130] For example, the memory card 42 stores the area information. The area information is transferred from the memory card 42 to the RAM 14 via the card interface 15. The area setting unit 182 reads the area information from the RAM 14.

[0131] An example in which the region setting unit 182 sets the size of the reference region will be described. The user specifies a reference point on the 2D image of the subject, and the point setting unit 185 accepts the reference point. The region setting unit 182 sets a rectangle in the 2D image with the reference point accepted by the point setting unit 185 at its center. The region information indicates the number of pixels in the horizontal direction of the reference region and the number of pixels in the vertical direction of the reference region. The region setting unit 182 sets the number of pixels in the horizontal direction of the rectangle and the number of pixels in the vertical direction of the rectangle based on the region information. Every time the user specifies the size of the reference region, the region information indicating the size of the reference region may be recorded on the recording medium.

[0132] An example in which the region setting unit 182 sets the position of the reference region will be described. The region information indicates a predetermined position on the 2D image of the subject. For example, the predetermined position is the center of the 2D image. The region setting unit 182 sets the reference region at the position indicated by the region information. At this time, the region setting unit 182 sets the size of the reference region to a size designated by the user. Each time the user designates the position of the reference region (reference point), the region information indicating the position may be recorded on the recording medium. The region setting unit 182 may set the size of the reference region and the position of the reference region based on the region information.

[0133] Two or more pieces of region information may be recorded in advance on the recording medium. In step S104, the region setting unit 182 may select one of the two or more pieces of region information based on information input through the operation unit 4. In step S104, the region setting unit 182 may set one of the size of the reference region and the position of the reference region based on the selected region information.

[0134] The two or more pieces of region information indicate sizes different from each other. For example, the first region information indicates a first size, and the second region information indicates a second size different from the first size. Alternatively, the two or more pieces of region information indicate positions different from each other. For example, the first region information indicates a first position, and the second region information indicates a second position different from the first position. The user selects one of the first region information and the second region information, and inputs the selection result to the operation unit 4. The selection result is output to the CPU 18 via the control interface 17. The region setting unit 182 sets the size or position of the reference region based on the region information selected by the user.

[0135] After the region setting unit 182 sets the reference region in step S104, the user may change at least one of the size and the position of the reference region at any timing. The timing may be after the reference region is displayed in step S105 or after the reference plane is displayed in step S107. For example, the user inputs information indicating at least one of the size and the position to the operation unit 4. The information is output to the CPU 18 via the control interface 17. The region setting unit 182 changes at least one of the size and the position of the reference region based on the information.

[0136] In the surface estimation process shown in Fig. 9, the region setting unit 182 sets a reference region based on two reference points. The number of reference points is not limited to two. As described above, the region setting unit 182 may set a reference region having one reference point at its center.

[0137] The area setting unit 182 may set the reference area without using the reference point. Therefore, step S103 does not need to be executed. The CPU 18 does not need to have the functions of the position calculation unit 184 and the point setting unit 185. A method for setting the reference area without using the reference point will be described in the tenth embodiment.

[0138] The display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and may display three or more points of the point cloud data used to estimate the reference plane on the 3D image (image display step). Three or more points included in a three-dimensional reference area are used to estimate the reference plane. The display control unit 183 extracts the three or more points from the point cloud data, and displays the three or more points on the 3D image. For example, pixels corresponding to the points are displayed in a predetermined color.

[0139] The display control unit 183 may display a 2D image of the subject on the display unit 5, and may display three or more points on the 2D image corresponding to three or more points of the point cloud data used to estimate the reference plane (image display step). Three or more points of the point cloud data corresponding to three or more points included in the two-dimensional reference area are used to estimate the reference plane. The display control unit 183 extracts the three or more points from the point cloud data. The display control unit 183 extracts points from the reference area corresponding to each of the three or more points extracted from the point cloud data, and displays the points on the 2D image. For example, the pixels corresponding to the points are displayed in a predetermined color.

[0140] Display of the reference region is not essential, therefore, step S105 does not need to be executed. Display of the reference surface is not essential, therefore, step S107 does not need to be executed.

[0141] If it is not necessary to set the reference point, display the reference area, or display the reference plane, it is not necessary to display the image. Therefore, it is not necessary to execute step S102. The CPU 18 does not need to have the function of the display control unit 183.

[0142] In step S106, the surface estimation unit 186 may estimate a geometric characteristic of the reference surface. For example, if the reference surface is a cylindrical surface, the surface estimation unit 186 may estimate a diameter of the cylinder. If the reference surface is a spherical surface, the surface estimation unit 186 may estimate a diameter of the sphere.

[0143] The plane estimator 186 may estimate the inclination of the reference plane. The inclination is expressed as an angle between a predetermined plane and the reference plane. For example, the predetermined plane is perpendicular to the line of sight of the endoscope.

[0144] The surface estimation unit 186 may estimate the type of the reference surface. The type is one of a plane, a cylindrical surface, a spherical surface, and the like. The surface estimation unit 186 estimates the reference surface assuming that the reference surface is a plane. At this time, the surface estimation unit 186 calculates an estimation error based on the distance between the reference surface and the surface of the subject, and the like. Similarly, the surface estimation unit 186 estimates the reference surface assuming that the reference surface is a cylindrical surface, a spherical surface, or the like, and calculates an estimation error. The surface estimation unit 186 obtains the reference surface having the smallest estimation error as the final reference surface. At the same time, the surface estimation unit 186 obtains the type of the reference surface.

[0145] The reference plane estimate may include parameters of the reference plane equation.

[0146] The display control unit 183 may display the estimation result of the geometric characteristics of the reference plane on the display unit 5. The estimation result is included in a graphic image signal generated by the display control unit 183.

[0147] The order of the processes in the surface estimation process is not limited to the order shown in Fig. 9. For example, a 2D image of the subject may be displayed on the display unit 5 before step S101 is executed.

[0148] In the second embodiment, the endoscope device 1 sets a two-dimensional reference area in the 2D image of the subject. The reference area includes three or more points that spread two-dimensionally. This reduces the possibility that three or more points of the point cloud data used to estimate the reference plane are unevenly located on a plane or a straight line. Therefore, the endoscope device 1 can improve the accuracy of the reference plane.

[0149] (First modified example of the second embodiment) A first modified example of the second embodiment of the present invention will be described. In the example shown in Fig. 10 to Fig. 13, a 2D image of a subject and a 3D image of point cloud data are displayed on the display unit 5, and the 2D image is used to set a two-dimensional reference area. The combination of the image displayed on the display unit 5 and the image used to set the reference area is not limited to this example. In the first modified example of the second embodiment, a 3D image of point cloud data is displayed on the display unit 5, and the 3D image is used to set a three-dimensional reference area.

[0150] A surface estimation process in a first modified example of the second embodiment will be described. The surface estimation process in the first modified example of the second embodiment is executed according to FIG. In the following, a description of the same process as the surface estimation process in the second embodiment will be omitted.

[0151] In step S102, the display control unit 183 displays a 3D image of the point cloud data on the display unit 5 (image display step). In step S102, a 2D image of the subject is not displayed. In step S103, the point setting unit 185 accepts three reference points on the 3D image of the point cloud data through the operation unit 4, and generates point information indicating each of the accepted three reference points.

[0152] 14 shows an example of an image displayed on the display unit 5 in step S103. The same 3D image G12 as the 3D image G12 shown in FIG.

[0153] In an example where a cursor is displayed on the 3D image G12, the user moves the cursor to a desired position on the 3D image G12 and executes a predetermined operation. At this time, the point setting unit 185 accepts a point corresponding to that position. In an example where the display unit 5 and the operation unit 4 are a touch panel, the user touches the screen of the display unit 5. At this time, the point setting unit 185 accepts a point corresponding to the touched position.

[0154] 14, the point setting unit 185 receives a reference point P21 and a reference point P22. A mark indicating the reference point P21 and a mark indicating the reference point P22 may be displayed on the 3D image G12.

[0155] In step S104, the region setting unit 182 sets a three-dimensional reference region in a 3D space that defines the 3D coordinates of the point cloud data. In the example shown in Fig. 14, the region setting unit 182 calculates a rectangle RC21 based on a reference point P21 and a reference point P22. The reference point P21 and the reference point P22 are vertices on the diagonal line of the rectangle RC21.

[0156] After the two reference points are set, the user specifies the third reference point. FIG. 15 shows an example of an image displayed on the display unit 5 when the third reference point is specified. A 3D image G13 of the point cloud data is displayed on the display unit 5. In an example in which the display unit 5 and the operation unit 4 are touch panels, the user performs a swipe operation on the 3D image G12 shown in FIG. 14 to change the viewpoint of the 3D image G12. The 3D image G13 shows a cross section of the subject shown in the 3D image G12 shown in FIG. 14.

[0157] The user specifies the reference point P23 by using a cursor displayed on the 3D image G13 or by touching the screen of the display unit 5. The point setting unit 185 accepts the reference point P23. A mark indicating the reference point P23 may be displayed on the 3D image G13. In an example in which the display unit 5 and the operation unit 4 are touch panels, the user may enlarge or reduce the 3D image G13 by performing a pinch operation.

[0158] In the example shown in Fig. 14 and Fig. 15, the region setting unit 182 calculates a reference region R21 based on the reference points P21, P22, and P23. The region setting unit 182 sets the reference region R21 in a 3D space that defines the 3D coordinates of the point cloud data. In the example shown in Fig. 15, the shape of the reference region R21 is a rectangular parallelepiped. One face of the rectangular parallelepiped is defined by the rectangle RC21 shown in Fig. 14. The height of the rectangular parallelepiped is the same as the 3D distance between the rectangle RC21 and the reference point P23.

[0159] Information on the reference area set by the area setting unit 182 is held in the RAM 14. The information includes the position and size of the reference area. The reference area is set by associating the reference area with the point cloud data.

[0160] In step S105, the display control unit 183 displays the reference area on the 3D image of the point cloud data (image display step). The display unit 5 displays the 3D image on which the reference area is superimposed. The user can check whether the reference area has been set at a position desired by the user.

[0161] In step S106, the surface estimation unit 186 estimates a reference surface based on three or more points of the point cloud data corresponding to three or more points included in the reference region. For example, the surface estimation unit 186 extracts all points in the reference region. The surface estimation unit 186 estimates the reference surface by using the 3D coordinates of each of the extracted points. The surface estimation unit 186 may extract a portion of the points in the reference region. For example, the surface estimation unit 186 may extract a predetermined percentage (e.g., 50%) or more of all points in the reference region. The extracted points include one or more sets of three points that form a triangle. There is no straight line passing through all of the extracted points.

[0162] In step S107, the display control unit 183 displays the reference plane on the 3D image of the point cloud data. The display unit 5 displays the 3D image on which the reference plane is superimposed. The user can check whether the reference plane accurately approximates the surface of the subject.

[0163] 16 shows an example of an image displayed on the display unit 5 in step S107. A 3D image G14 of the point cloud data is displayed on the display unit 5.

[0164] For example, the display control unit 183 calculates the 3D distance between each point in the point cloud data and the reference plane. If the 3D distance between the point and the reference plane is smaller than a predetermined distance, the display control unit 183 extracts the point. The display control unit 183 repeats the above process by using points in the whole or part of the point cloud data. The display control unit 183 generates a graphic image signal for displaying an area including the extracted points as the reference plane.

[0165] In the example shown in Fig. 16, an area including the extracted points is displayed on the 3D image G14 as a reference plane F21. For example, the reference plane F21 is displayed in a color different from the color of the surface of the subject. As long as the user can confirm the position of the reference plane F21, the method of displaying the reference plane F21 is not limited to the above method. The user can confirm whether the reference plane F21 accurately approximates the surface of the subject.

[0166] 14 to 16, a 3D image of the point cloud data is displayed on the display unit 5, and the 3D image is used to set the reference area. A 2D image of the subject and a 3D image of the point cloud data may be displayed on the display unit 5, and the 3D image may be used to set the reference area.

[0167] There are cases where a concave or convex portion is formed on the surface of a subject, and a reference plane that approximates the portion excluding the concave or convex portion is required. When a reference region is set to a 2D image of the subject, the reference region may include pixels of the concave or convex portion. This may result in a deterioration in the accuracy of the reference plane. When a step is formed on the surface of the subject, and the reference region includes pixels of the step, the accuracy of the reference plane may also be deteriorated.

[0168] In a first modified example of the second embodiment, the region setting unit 182 sets a three-dimensional reference region. In the example shown in Fig. 15, the region setting unit 182 sets a reference region R21 that does not include many points corresponding to recesses of the subject. Therefore, the endoscope device 1 can improve the accuracy of the reference surface.

[0169] (Second Modification of the Second Embodiment) A second modified example of the second embodiment of the present invention will be described. In the second modified example of the second embodiment, a three-dimensional reference region is set. The reference region is a set of three or more points having continuity.

[0170] A surface estimation process in the second modified example of the second embodiment will be described. The surface estimation process in the second modified example of the second embodiment is executed according to Fig. 9. In the following, a description of the same process as the surface estimation process in the first modified example of the second embodiment will be omitted.

[0171] In step S104, the region setting unit 182 determines the continuity of three or more points corresponding to three-dimensional coordinates included in the point cloud data. The region setting unit 182 sets a reference region including only the three or more points determined to have continuity.

[0172] Specifically, the region setting unit 182 sets a three-dimensional judgment region. The method of setting the judgment region is the same as the method of setting the reference region described in the first modified example of the second embodiment. The region setting unit 182 judges the continuity of points in the judgment region. For example, the region setting unit 182 uses the 3D distance between two adjacent points. The region setting unit 182 classifies each point in the judgment region based on the 3D distance.

[0173] Segmentation is a simple method for classifying points corresponding to point cloud data. For example, the region setting unit 182 can use Euclidean Cluster Extraction for segmentation. This is a function included in the open source Point Cloud Library (PCL).

[0174] By using this function, the region setting unit 182 determines that a point within a predetermined distance from each point is a neighboring point. One point and its neighboring points are on the same object. For example, when the subject has a first object and a second object that are separated from each other, each point corresponding to the point cloud data is classified as either a point on the first object or a point on the second object. The region setting unit 182 assigns each of three or more points corresponding to three-dimensional coordinates included in the point cloud data to one of the two or more objects. In this way, the region setting unit 182 divides three or more points in the point cloud data into two or more regions. In the above example, the three or more points in the point cloud data are divided into a first region consisting of points on the first object and a second region consisting of points on the second object. When the subject is only one object, the region setting unit 182 assigns all points in the point cloud data to one object.

[0175] The region setting unit 182 executes the above-mentioned segmentation in the judgment region. As a result, the region setting unit 182 assigns each point in the judgment region to one of one or more objects. The region setting unit 182 judges whether or not the points in the judgment region form a continuous surface based on the result of the segmentation. Two or more points assigned to one object form a continuous surface of the subject. That is, the two or more points have continuity. The surface of the subject is discontinuous between the two objects. That is, the points lose continuity between the two objects. The region setting unit 182 selects one object and extracts three or more points included in the selected object from the judgment region. The region setting unit 182 sets a reference region including the extracted three or more points. The reference region includes all or a part of the points in the judgment region.

[0176] 17 and 18 show examples of the reference region. In the following, the reference region will be described with reference to a 3D image of point cloud data.

[0177] A 3D image G12, which is the same as the 3D image G12 shown in Fig. 10, is shown in Fig. 17. A 3D image G15 is shown in Fig. 17. The 3D image G15 shows a cross section of the object shown in the 3D image G12. The region setting unit 182 assigns all points in the concave portion of the object and its surroundings to the object OB31. The region setting unit 182 sets a reference region R31 including points in the object OB31.

[0178] 3D image G12a and 3D image G16 are shown in FIG. 18. 3D image G16 shows a cross section of the object shown in 3D image G12a. Region setting unit 182 assigns points of the recess of the object and its periphery to object OB32 or object OB33. Object OB32 and object OB33 are not connected to each other. Region setting unit 182 sets a reference region R32 including points in object OB32. Reference region R32 does not include points in object OB33. Points in object OB33 are not used to estimate the reference plane.

[0179] In a method of generating point cloud data by using two or more 2D images, an area that appears in one 2D image may not appear in the other 2D images. As a result, it may not be possible to calculate the 3D coordinates of points in that area. In that case, the surface of the subject shown in the point cloud data will be discontinuous, as shown in Figure 18.

[0180] In the second modification of the second embodiment, the reference plane is estimated based only on points corresponding to continuous surfaces of the object, so that the endoscope device 1 can improve the accuracy of the reference plane.

[0181] (Third Modification of the Second Embodiment) A third modified example of the second embodiment of the present invention will be described. In the third modified example of the second embodiment, a 3D image of point cloud data viewed from each of two or more viewpoints is displayed on the display unit 5, and a reference plane is displayed on the 3D image.

[0182] A surface estimation process in the third modified example of the second embodiment will be described. The surface estimation process in the third modified example of the second embodiment is executed according to Fig. 9. In the following, a description of the same process as the surface estimation process in the first modified example of the second embodiment will be omitted.

[0183] In step S101, the generating unit 181 generates 3D images of the point cloud data viewed from each of two or more viewpoints. In the following, an example in which the generating unit 181 generates three 3D images will be described. The three directions of the line of sight for generating the three 3D images may be perpendicular to each other. For example, the generating unit 181 may generate a 3D image of the point cloud data viewed parallel to the X axis, a 3D image of the point cloud data viewed parallel to the Y axis, and a 3D image of the point cloud data viewed parallel to the Z axis.

[0184] In step S102, the display control unit 183 displays three 3D images on the display unit 5. In step S107, the display control unit 183 displays a reference plane on each 3D image. The display unit 5 displays the 3D images on which the reference planes are superimposed.

[0185] 19 shows an example of an image displayed on the display unit 5 in step S107. A 3D image G17, a 3D image G18, and a 3D image G19 are displayed on the display unit 5. The 3D image G17 is a 3D image of the point cloud data viewed from a first viewpoint. The 3D image G18 is a 3D image of the point cloud data viewed from a second viewpoint different from the first viewpoint. The 3D image G19 is a 3D image of the point cloud data viewed from a third viewpoint different from the first viewpoint and the second viewpoint.

[0186] The display control unit 183 executes a process similar to the process for displaying the reference plane F21 shown in Fig. 16. The display control unit 183 displays the reference plane F41 on the 3D image G17, the 3D image G18, and the 3D image G19.

[0187] The display control unit 183 may display a 3D image of the point cloud data viewed in a direction parallel to the surface of the subject or the reference plane on the display unit 5. This makes it easier for the user to confirm the reference plane.

[0188] The generation unit 181 may extract some of the points in the point cloud data, and generate a 3D image including the extracted points. The display control unit 183 may display the 3D image on the display unit 5.

[0189] For example, the generating unit 181 generates a first 3D image of all points in the point cloud data. The first 3D image is a 3D image of the point cloud data viewed from a first viewpoint. The generating unit 181 generates a second 3D image including points extracted from the point cloud data. The second 3D image is a 3D image of the point cloud data viewed from a second viewpoint different from the first viewpoint. The display control unit 183 displays the first 3D image and the second 3D image on the display unit 5. At this time, the display control unit 183 may display the enlarged second 3D image on the display unit 5. The display control unit 183 displays a reference plane on the first 3D image and the second 3D image.

[0190] In a third modification of the second embodiment, the reference plane is displayed on a 3D image of the point cloud data viewed from each of two or more viewpoints, allowing the user to check whether the reference plane accurately approximates the surface of the subject.

[0191] (Third embodiment) A third embodiment of the present invention will now be described. An endoscope device 1 of the third embodiment has a three-dimensional measurement function.

[0192] In the third embodiment, the CPU 18 shown in Fig. 8 is changed to a CPU 18a shown in Fig. 20. Fig. 20 shows a functional configuration of the CPU 18a. The functions of the CPU 18a are configured by a control unit 180, a generation unit 181, a region setting unit 182, a display control unit 183, a position calculation unit 184, a point setting unit 185, a plane estimation unit 186, and a measurement unit 187. At least one of the blocks shown in Fig. 20 may be configured by a circuit different from the CPU 18a. A description of the same configuration as that shown in Fig. 8 will be omitted.

[0193] Each unit shown in Fig. 20 may be composed of at least one of a processor and a logic circuit. Each unit shown in Fig. 20 may include one or more processors. Each unit shown in Fig. 20 may include one or more logic circuits.

[0194] The measurement unit 187 measures the size of the subject based on the reference plane (measurement step). For example, the measurement unit 187 executes a plane-based measurement. That is, in the measurement step, the measurement unit 187 measures the 3D distance between the reference plane and a point on the surface of the subject.

[0195] The point setting unit 185 accepts a reference point in the same manner as in the second embodiment. The reference point indicates a reference position for setting a reference area. Furthermore, the point setting unit 185 accepts a measurement point and generates point information indicating the accepted measurement point. The measurement point indicates a position at which the size of the subject is measured. The user designates the measurement point by using a cursor displayed on the image or by touching the screen of the display unit 5.

[0196] The measuring unit 187 calculates the 3D distance between the reference plane and the measurement point indicated by the point information, thereby enabling the measuring unit 187 to measure the depth of a recess on the surface of the subject or the height of a protrusion on the surface of the subject.

[0197] Three-dimensional measurement (3D measurement) in the third embodiment will be described with reference to Fig. 21. Fig. 21 shows the procedure of 3D measurement. Description of the same processes as those shown in Fig. 9 will be omitted.

[0198] After step S107, point setting unit 185 accepts one measurement point on the 2D image of the subject through operation unit 4, and generates point information indicating the accepted measurement point (step S108).

[0199] After step S108, the measurement unit 187 measures the size of the subject based on the reference plane estimated in step S106 and the measurement point indicated by the point information (step S109). Step S109 corresponds to a measurement step.

[0200] After step S109, the display control unit 183 displays the measurement result on the 2D image of the subject (step S110). The measurement result indicates the size measured in step S109. When step S110 is executed, the 3D measurement ends.

[0201] Specifically, the display control unit 183 generates a graphic image signal for displaying the measurement result. The display control unit 183 outputs the generated graphic image signal to the video signal processing circuit 12. The video signal processing circuit 12 combines the video signal output from the CCU 9 and the graphic image signal output from the CPU 18a. The video signal processing circuit 12 outputs the combined video signal to the display unit 5. The display unit 5 displays a 2D image of the subject on which the measurement result is superimposed. For example, characters indicating the size of the subject are displayed on the 2D image of the subject. The display control unit 183 may display the measurement result on a 3D image of the point cloud data.

[0202] In step S109, the measurement unit 187 may measure the 3D distance between the reference plane and each of two or more points on the surface of the subject. In step S110 (measurement result display step), the display control unit 183 may display the maximum value of the measured 3D distances on the display unit 5.

[0203] Specifically, the measurement unit 187 extracts all or part of the points within a circle circumscribing the two-dimensional reference region from the 2D image of the subject. A square or a rectangle may be used instead of a circle. The points on the 2D image of the subject are associated with the 3D coordinates of the points in the point cloud data. The measurement unit 187 obtains the 3D coordinates associated with each extracted point from the point cloud data.

[0204] Alternatively, the measurement unit 187 extracts all or part of the points within a sphere circumscribing the three-dimensional reference region from the point cloud data. A cube, a cylinder, or the like may be used instead of a sphere. The measurement unit 187 obtains the 3D coordinates of each extracted point from the point cloud data.

[0205] The measuring unit 187 calculates the 3D distance between the reference plane and each of the extracted points. The measuring unit 187 obtains the maximum value of the calculated 3D distances as the measurement result. This enables the measuring unit 187 to accurately measure the depth of a recess on the surface of the subject or the height of a protrusion on the surface of the subject.

[0206] The user may specify a measurement mode. For example, before step S103 is executed, the user operates the operation unit 4 to input mode information indicating the measurement mode to the operation unit 4. The mode information is output to the CPU 18a via the control interface 17. The control unit 180 sets the measurement mode based on the mode information. In the example shown in the third embodiment, the mode information indicates surface-based measurement. The mode information may also indicate a mode that does not include measurement. In that case, the surface estimation process shown in FIG. 9 is executed.

[0207] After point setting unit 185 accepts the reference point in step S103, the user may change the reference point.

[0208] Region information indicating at least one of the size and the position of the reference region may be recorded in advance on the recording medium. In step S104, the region setting unit 182 may set at least one of the size and the position of the reference region based on the region information.

[0209] Two or more pieces of region information may be recorded in advance on the recording medium. In step S104, the region setting unit 182 may select one of the two or more pieces of region information based on information input through the operation unit 4. In step S104, the region setting unit 182 may set one of the size of the reference region and the position of the reference region based on the selected region information.

[0210] After the region setting unit 182 sets the reference region in step S104, the user may change at least one of the size and the position of the reference region at any timing, which may be after the reference region is displayed in step S105 or after the reference plane is displayed in step S107.

[0211] The region setting unit 182 may set the reference region without using the reference point. Therefore, step S103 does not need to be executed. When the points used by the measurement unit 187 for measurement are extracted from the 2D image or point cloud data of the subject, step S108 does not need to be executed. The CPU 18a does not need to have the functions of the position calculation unit 184 and the point setting unit 185.

[0212] The display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and may display three or more points of the point cloud data used to estimate the reference plane on the 3D image. The display control unit 183 may display a 2D image of the subject on the display unit 5, and may display three or more points on the 2D image corresponding to the three or more points of the point cloud data used to estimate the reference plane.

[0213] Display of the reference area is not essential, therefore, step S105 does not need to be executed. Display of the reference surface is not essential, therefore, step S107 does not need to be executed. Display of the measurement result is not essential, therefore, step S110 does not need to be executed.

[0214] When it is not necessary to set the reference point, display the reference area, display the reference surface, and display the measurement result, it is not necessary to display the image. Therefore, it is not necessary to execute step S102. The CPU 18a does not need to have the function of the display control unit 183.

[0215] The order of processing in 3D measurement is not limited to the order shown in Fig. 21. For example, a 2D image of the subject may be displayed on the display unit 5 before step S101 is executed.

[0216] In the third embodiment, the endoscope device 1 measures the size of a subject. Since the reference plane is accurately estimated, the endoscope device 1 can obtain accurate measurement results.

[0217] (Fourth embodiment) A fourth embodiment of the present invention will now be described. An endoscope device 1 of the fourth embodiment has a CPU 18 shown in FIG.

[0218] There are cases where the height or depth of a given region and its periphery differs on the surface of a subject. The given region is a recess, a protrusion, a step, or the like. When the calculated reference plane approximates a surface including the given region and its periphery, the accuracy of the reference plane deteriorates. In the fourth embodiment, the plane estimation unit 186 estimates a reference plane that approximates a surface excluding the given region.

[0219] The region setting unit 182 sets a reference region including a region that is not a convex set. An object that is convex in Euclidean space is defined as follows: If a line segment is defined that connects any two points included in the object, and any point on the line segment is included in the object, the object is convex.

[0220] The reference area in the fourth embodiment will be described by using FIG. 22 and FIG. 23. The reference area R51 shown in FIG. 22 includes points P51, P52, and P53. A line segment L51 connects points P51 and P52. Point P53 is on line segment L51. Point P53 is included in the reference area R51. Points on line segment L51 other than point P53 are not shown in FIG. 22. All points on line segment L51 are included in the reference area R51. Points other than points P51, P52, and P53 are not shown in FIG. 22. Points on a line segment connecting any two points in the reference area R51 are always included in the reference area R51. In other words, a line segment connecting any two points in the reference area R51 does not pass through an area outside the reference area R51. Therefore, the reference area R51 is a convex set.

[0221] The reference region R52 shown in FIG. 23 includes points P54, P55, and P56. A line segment L52 connects points P54 and P55. Point P56 is on line segment L52. Point P56 is not included in the reference region R52. Some of the points on line segment L52 are not included in the reference region R52. In other words, line segment L52 passes through an area outside the reference region R52. Therefore, the reference region R52 is not a convex set. The region setting unit 182 sets a reference region such as the reference region R52. The region that is a convex set is not limited to a two-dimensional region, and may be a three-dimensional region.

[0222] The reference area will be described below with reference to a 3D image of point cloud data. Figure 24 shows a first example of the reference area. The reference area in the first example is a region between two spheres (spherical shell). The centers of the two spheres are the same, and the diameters of the two spheres are different from each other.

[0223] A 3D image G61 is shown in Fig. 24. The user specifies reference points P61 and P62 by using a cursor displayed on the 3D image G61 or by touching the screen of the display unit 5. The point setting unit 185 accepts the reference points P61 and P62.

[0224] The region setting unit 182 calculates a first sphere having a diameter equal to a line segment connecting the reference point P61 and the reference point P62. The region setting unit 182 calculates a second sphere. The center of the first sphere and the center of the second sphere are the same. The diameter of the second sphere is smaller than the diameter of the first sphere. The region setting unit 182 sets the region between the first sphere and the second sphere as a reference region R61. The surface estimation unit 186 estimates a reference surface based on three or more points included in the reference region R61.

[0225] The boundary of the reference region R61 includes a first boundary R61a and a second boundary R61b located inside the first boundary R61a. The first boundary R61a is relatively outside, and the second boundary R61b is relatively inside. The first boundary R61a surrounds the second boundary R61b. The first boundary R61a is the same as the first sphere. The second boundary R61b is the same as the second sphere.

[0226] A region R62 is shown in FIG. 24. The height or depth of the region R62 is different from that of the regions surrounding the region R62. A first boundary R61a and a second boundary R61b are on the periphery of the region R62. A reference region R61 surrounds the region R62. Points in the region R62 are not included in the reference region R61. Therefore, the surface estimation unit 186 can accurately estimate the reference surface.

[0227] The user may modify the size of the first sphere or the second sphere. In an example in which the display unit 5 and the operation unit 4 are touch panels, the user may modify the size of the first sphere or the second sphere by performing a drag operation.

[0228] In the example shown in Figure 24, the user specifies two reference points. Figure 25 shows an example where the user specifies one reference point.

[0229] A 3D image G61 that is the same as the 3D image G61 shown in Fig. 24 is shown in Fig. 25. The user specifies a reference point P63 by using a cursor displayed on the 3D image G61 or by touching the screen of the display unit 5. The point setting unit 185 accepts the reference point P63.

[0230] The region setting unit 182 calculates a first sphere and a second sphere having a reference point P63 at their center. The diameter of the second sphere is smaller than the diameter of the first sphere. The region setting unit 182 sets the region between the first sphere and the second sphere as a reference region R63.

[0231] After the region setting unit 182 sets the reference region by using the method shown in Fig. 24 or 25, the region setting unit 182 may remove some regions from the reference region. Fig. 26 shows a method of removing some regions from the reference region.

[0232] A 3D image G12 identical to the 3D image G12 shown in Fig. 10 is displayed on the display unit 5. After the reference region R64 is set, the user specifies a region to be excluded from the reference region R64. In an example in which the display unit 5 and the operation unit 4 are touch panels, the user may exclude a portion of the region from the reference region R64 by performing a pinch operation. The boundary of the reference region R64 includes a first boundary R64a and a second boundary R64b located inside the first boundary R64a.

[0233] FIG. 27 shows a second example of the reference area. The reference area in the second example includes only the area around the sides of the rectangular parallelepiped. A 3D image G63 is shown in FIG. 27. The user specifies reference points P64 and P65 by using a cursor displayed on the 3D image G63 or by touching the screen of the display unit 5. The point setting unit 185 accepts the reference points P64 and P65.

[0234] The region setting unit 182 calculates a rectangle based on the reference points P64 and P65. The reference points P64 and P65 are vertices on the diagonal line of the rectangle. After the reference points P64 and P65 are set, the user specifies the reference point P66 by using a cursor displayed on the 3D image G63 or by touching the screen of the display unit 5. The point setting unit 185 accepts the reference point P66.

[0235] The area setting unit 182 calculates a rectangular parallelepiped based on the reference points P64, P65, and P66. One side of the rectangular parallelepiped is defined by a rectangle calculated based on the reference points P64 and P65. The height of the rectangular parallelepiped is the same as the 3D distance between the rectangle and the reference point P66.

[0236] The region setting unit 182 calculates a cylinder having each side of the rectangular parallelepiped as a central axis. Since the rectangular parallelepiped has six sides, the region setting unit 182 calculates six cylinders. The region setting unit 182 sets a reference region R65 which is a collection of regions within the six cylinders. The shape of the region included in the reference region R65 is not limited to a cylinder. The surface estimation unit 186 estimates a reference surface based on three or more points included in the reference region R65.

[0237] The region setting unit 182 may set a two-dimensional reference region that is not a convex set. For example, the region setting unit 182 may calculate a first circle and a second circle on a 2D image of a subject. The center of the first circle and the center of the second circle are the same. The diameter of the second circle is smaller than the diameter of the first circle. The region setting unit 182 may set a region between the first circle and the second circle as the reference region. A square or a rectangle may be used instead of a circle.

[0238] The plane estimation unit 186 estimates the reference plane based on three or more points in the point cloud data corresponding to three or more points included in the reference region. For example, the plane estimation unit 186 extracts all points in the reference region. The plane estimation unit 186 estimates the reference plane by using the 3D coordinates of each of the extracted points. The plane estimation unit 186 may extract a portion of the points in the reference region.

[0239] Specifically, in step S106 shown in Fig. 9 or 21, the plane estimation unit 186 selects three or more points from the four or more points included in the reference region. In step S106, the plane estimation unit 186 estimates a reference plane based on three or more points of the point cloud data corresponding to the three or more selected points. Since the number of points used to estimate the reference plane is reduced, the plane estimation unit 186 can reduce the processing load for estimating the reference plane.

[0240] In order for the surface estimation unit 186 to select three or more points, the reference region needs to include four or more points. The four or more points in the reference region include one or more sets of three points that form a triangle. There is no straight line that passes through all of the four or more points in the reference region.

[0241] 28 and 29 show examples of points used to estimate the reference plane. To simplify the illustration, an example in which a two-dimensional reference region is used is described. The following description may be applied when a three-dimensional reference region is used.

[0242] The reference region R71 is shown in Fig. 28. The surface estimation unit 186 regularly extracts some points (pixels of the 2D image) of all points (pixels of the 2D image) in the reference region R71. In Fig. 28, only the extracted points are shown, and the points that are not extracted are omitted. In the example shown in Fig. 28, the surface estimation unit 186 can extract points uniformly and over a wide range by performing simple processing.

[0243] The reference region R72 is shown in FIG. 29. The surface estimation unit 186 randomly extracts some points (pixels of the 2D image) from among all points (pixels of the 2D image) in the reference region R72. In FIG. 29, only the extracted points are shown, and the points that are not extracted are omitted. If a periodic uneven pattern is present on the surface of the subject, the period of the pattern may match the period of the extracted points in the example shown in FIG. 28. Therefore, only points in an area that matches a specific pattern are extracted, and the accuracy of the reference surface may deteriorate. In the example shown in FIG. 29, points in an area that does not match a specific pattern are also extracted, improving the accuracy of the reference surface.

[0244] The surface estimation unit 186 may mainly extract points close to the boundary of the reference area. The first density is higher than the second density. The first density indicates a density at which points are extracted close to the boundary of the reference area. The second density indicates a density at which points are extracted far from the boundary of the reference area. This allows the surface estimation unit 186 to use many points close to the boundary of the reference area. Furthermore, the surface estimation unit 186 can reduce the overall number of points used to estimate the reference surface and can extract points over a wide range.

[0245] The surface estimator 186 may extract points inside the boundary of the reference region by using the above method, and may also extract all or part of the points on the boundary of the reference region.

[0246] In the fourth embodiment, a reference area including an area that is not a convex set is set. The endoscope device 1 can exclude points in an area having a different shape from the surrounding areas from the reference area. Therefore, the endoscope device 1 can improve the accuracy of the reference surface.

[0247] Fifth embodiment A fifth embodiment of the present invention will now be described. An endoscope apparatus 1 of the fifth embodiment has a CPU 18 shown in FIG.

[0248] In a fifth embodiment, the reference region includes two or more regions. The two or more regions are separated from each other. Each of the two or more regions included in the reference region includes three or more points. The reference region may include a region including three or more points and a region including one or two points. The three or more points included in one region include one or more sets of three points forming a triangle. Alternatively, the three or more points in the entire reference region include one or more sets of three points forming a triangle.

[0249] In each region included in the reference region, there is no straight line that passes through all three or more points. Alternatively, there is no straight line that passes through all points in the entire reference region that includes two or more regions. In other words, even if all points in one region included in the reference region are on a straight line, the straight line does not pass through one or more points in other regions included in the reference region.

[0250] FIG. 30 shows an example of a reference region. To simplify the illustration, an example in which a two-dimensional reference region is used will be described. The following description may be applied to the case in which a three-dimensional reference region is used.

[0251] A 2D image G81 of a subject is shown in Fig. 30. The user specifies reference points P81, P82, P83, and P84 by using a cursor displayed on the 2D image G81 or by touching the screen of the display unit 5. Point setting unit 185 accepts reference points P81, P82, P83, and P84.

[0252] The region setting unit 182 sets a region R81 having a reference point P81 at its center. The region setting unit 182 sets a circle having a predetermined value as a diameter as the region 81. A square or a rectangle may be used instead of a circle. Similarly, the region setting unit 182 sets a region R82 having a reference point P82 at its center, a region R83 having a reference point P83 at its center, and a region R84 having a reference point P84 at its center. The reference region includes a region R81, a region R82, a region R83, and a region R84. The regions R81, R82, R83, and R84 are separated from each other.

[0253] Region R85 ​​is shown in FIG. 30. The height or depth of region R85 ​​is different from that of the surrounding regions of region R85. Regions R81, R82, R83, and R84 are arranged at positions surrounding region R85. Points within region R85 ​​are not included in the reference region. Therefore, the surface estimation unit 186 can accurately estimate the reference surface.

[0254] In the example shown in Figure 30, the user specifies four reference points. Figure 31 shows an example where the user specifies one reference point.

[0255] A 2D image G81 that is the same as the 2D image G81 shown in Figure 30 is shown in Figure 31. A region R85 ​​that is the same as the region R85 ​​shown in Figure 30 is shown in Figure 31. The user specifies a reference point P85 by using a cursor displayed on the 2D image G81 or by touching the screen of the display unit 5. Point setting unit 185 accepts the reference point P85.

[0256] The region setting unit 182 sets regions R86, R87, R88, and R89 having points around the reference point P85 as their centers. For example, the region setting unit 182 extracts four points a predetermined distance away from the reference point P85. The region setting unit 182 sets regions having each of the extracted points as their centers.

[0257] In the fifth embodiment, a reference area including two or more areas is set. The endoscope device 1 can set a reference area that does not include an area having a different shape from the surrounding areas. Therefore, the endoscope device 1 can improve the accuracy of the reference surface.

[0258] Sixth embodiment A sixth embodiment of the present invention will now be described. In the sixth embodiment, the boundary of the reference area is set based on the surface condition of the subject.

[0259] In the sixth embodiment, the CPU 18 shown in Fig. 8 is changed to a CPU 18b shown in Fig. 32. Fig. 32 shows a functional configuration of the CPU 18b. The functions of the CPU 18b are configured by a control unit 180, a generation unit 181, a region setting unit 182, a display control unit 183, a position calculation unit 184, a point setting unit 185, a surface estimation unit 186, and a state determination unit 188. At least one of the blocks shown in Fig. 32 may be configured by a circuit different from the CPU 18b. A description of the same configuration as that shown in Fig. 8 will be omitted.

[0260] Each unit shown in Fig. 32 may be composed of at least one of a processor and a logic circuit. Each unit shown in Fig. 32 may include one or more processors. Each unit shown in Fig. 32 may include one or more logic circuits.

[0261] The display control unit 183 displays one of the 3D image of the point cloud data and the 2D image of the subject on the display unit 5 (image display step). The point setting unit 185 accepts position information input through the operation unit 4 (position input step). The position information indicates a position on the 3D image of the point cloud data or the 2D image of the subject displayed on the display unit 5. The state determination unit 188 determines the state of the subject (state determination step). In the region setting step, the region setting unit 182 determines the boundary of the reference region based on the position indicated by the position information and the state of the subject.

[0262] The surface estimation process in the sixth embodiment will be described with reference to Fig. 33. Fig. 33 shows the procedure of the surface estimation process. Description of the same process as that shown in Fig. 9 will be omitted.

[0263] In step S102, the display control unit 183 displays a 3D image of the point cloud data on the display unit 5. Step S102 corresponds to an image display step.

[0264] In step S103, the point setting unit 185 receives two reference points on the 3D image of the point cloud data through the operation unit 4, and generates point information indicating each of the two received reference points. Step S103 corresponds to a position input step.

[0265] The two reference points input in step S103 indicate pixel positions on the 3D image of the point cloud data. Therefore, position information is input in step S103, and the point setting unit 185 accepts the position information. The point setting unit 185 generates point information including the 3D coordinates of the two reference points indicated by the position information.

[0266] After step S103, the state determination unit 188 determines the state of the subject (step S111). Step S111 corresponds to a state determination step.

[0267] The state determination unit 188 determines the state of the subject by using at least one of the point cloud data, the 3D image of the point cloud data, and the 2D image of the subject. The state determination unit 188 divides the area on the 3D image into two or more areas (segments) based on the state.

[0268] For example, the state determination unit 188 determines the characteristics of the 3D shape of the subject by using point cloud data. The state determination unit 188 divides three or more points corresponding to three-dimensional coordinates included in the point cloud data into two or more regions based on the characteristics. For example, the state determination unit 188 assigns each of the three or more points to one of the two or more regions by using Euclidean Cluster Extraction. The state determination unit 188 associates each region with a region on the 3D image of the point cloud data. As a result, the state determination unit 188 divides the region on the 3D image into two or more regions.

[0269] The state determination unit 188 may calculate a normal perpendicular to the surface of the object based on the point cloud data, and detect an edge or a step of the object based on a change in the normal direction. The state determination unit 188 may divide three or more points in the point cloud data into a first region and a second region. For example, the first region is made up of points on an edge or a step. The second region is made up of points on a portion other than the edge or the step. The state determination unit 188 may divide a region on the 3D image of the point cloud data into two regions by associating each region with a region on the 3D image of the point cloud data.

[0270] The state determination unit 188 may determine the state of the subject by using a 2D image of the subject or a 3D image of the point cloud data. For example, the state determination unit 188 may detect the edge of the subject by performing image processing on the 2D image of the subject or the 3D image of the point cloud data. The state determination unit 188 may divide three or more points in the 2D image of the subject into a first region and a second region. For example, the first region is made up of points on the edge. The second region is made up of points on a portion other than the edge. The state determination unit 188 may associate each region on the 2D image of the subject with a region on the 3D image of the point cloud data, thereby dividing the region on the 3D image into two regions. Similarly, the state determination unit 188 may divide three or more points in the 3D image of the point cloud data into a first region and a second region.

[0271] The state determination unit 188 may determine the characteristics of the subject based on the brightness or color of the 2D image of the subject or the 3D image of the point cloud data. The state determination unit 188 may perform a matching process on the stereo image of the subject and detect the characteristics of the subject based on the correlation value obtained in the matching process. The state determination unit 188 may determine the characteristics of the subject by using a watershed algorithm, deep learning, or the like.

[0272] After step S111, the region setting unit 182 sets a reference region based on the positions of the two reference points and the state of the subject (step S104a). Step S104a corresponds to a region setting step.

[0273] The region setting unit 182 sets a three-dimensional reference region in a 3D space that defines the 3D coordinates of the point cloud data. For example, the region setting unit 182 sets an outer boundary of the reference region based on the positions of two reference points. The region setting unit 182 sets an inner boundary of the reference region based on the state of the subject. For example, an abnormal region may exist on the surface of the subject. The height or depth of the region is different from that of the surrounding region of the part. The region setting unit 182 excludes the part from the reference region by setting an inner boundary of the reference region. This allows the region setting unit 182 to set a reference region that does not include the part. After step S104a, step S105 is executed.

[0274] 34 shows an example of an image displayed on the display unit 5. A 3D image G91 is displayed on the display unit 5. The user specifies a reference point P91 and a reference point P92 by using a cursor displayed on the 3D image G91 or by touching the screen of the display unit 5. The point setting unit 185 accepts the reference point P91 and the reference point P92.

[0275] The area setting unit 182 calculates a sphere SP91 having, as its diameter, the line segment connecting the reference point P91 and the reference point P92. The area setting unit 182 sets the sphere SP91 as the outer boundary of the reference area.

[0276] Fig. 35 shows two or more regions on a 3D image of point cloud data. The state determination unit 188 divides the region on the 3D image into two or more regions based on the state of the subject. Fig. 35 shows the two or more regions. In the example shown in Fig. 35, the region of the subject on the 3D image is divided into region R91, region R92, and region R93.

[0277] The region setting unit 182 sets the region with the largest volume among two or more regions within the sphere SP91 as the reference region. Regions other than the region set as the reference region are not included in the reference region. A part of region R91 and region R92 are within the sphere SP91. Region R91 within the sphere SP91 is included in the reference region. Region R92 is not included in the reference region. The region setting unit 182 sets the boundary of region R92 as the inner boundary of the reference region.

[0278] In the above example, the state determination unit 188 divides three or more points corresponding to three-dimensional coordinates included in the point cloud data into two or more regions. The boundary of the reference region includes the boundary of one or more regions included in the two or more regions.

[0279] Each of the two or more regions includes three or more points. The two or more regions may include a region including three or more points and a region including one or two points. The reference region includes a region including three or more points.

[0280] 35, the state determination unit 188 divides three or more points included in the point cloud data into three regions. The boundary of the reference region includes the boundary of region R92. The state determination unit 188 may set a reference region that surrounds region R92 and region R93, and the boundary of the reference region may include the boundary of region R92 and the boundary of region R93.

[0281] The outer boundary of the reference region may be a rectangular parallelepiped, a cube, a cylinder, etc. The shape of the reference region is not limited to these examples.

[0282] In the example shown in Figure 34, the user specifies two reference points. Figure 36 shows an example where the user specifies one reference point.

[0283] A 3D image G91 that is the same as the 3D image G91 shown in Fig. 34 is shown in Fig. 36. The user specifies a reference point P93 by using a cursor displayed on the 3D image G91 or by touching the screen of the display unit 5. The point setting unit 185 accepts the reference point P93.

[0284] The region setting unit 182 calculates a sphere SP92 having a reference point P93 at its center. The diameter of the sphere SP92 is a predetermined length. The region setting unit 182 sets the sphere SP92 as the outer boundary of the reference region. The state determination unit 188 sets the boundary of the region R92 shown in FIG. 35 as the inner boundary of the reference region.

[0285] After the region setting unit 182 sets the outer boundary of the reference region, the state determination unit 188 may divide only the region within the boundary into two or more regions. In the example shown in Fig. 34, after the region setting unit 182 sets a sphere SP91 as the outer boundary of the reference region, the state determination unit 188 may divide the region within the boundary into two or more regions. This reduces the processing load compared to processing the entire point cloud data.

[0286] A 2D image of the object may be used instead of the 3D image of the point cloud data. In the following, an example in which a 2D image of the object is used will be described.

[0287] In step S102, the display control unit 183 displays a 2D image of the subject on the display unit 5. In step S103, the point setting unit 185 accepts one or more reference points on the 2D image of the subject through the operation unit 4, and generates point information indicating each of the accepted one or more reference points.

[0288] In step S111, state determination unit 188 determines the state of the subject by using the 2D image of the subject. State determination unit 188 divides an area on the 2D image into two or more areas based on the result of the determination.

[0289] In step S104a, the region setting unit 182 sets a two-dimensional reference region in the 2D image of the subject. For example, the region setting unit 182 sets an outer boundary of the reference region based on the position of the reference point. The region setting unit 182 sets an inner boundary of the reference region based on the state of the subject.

[0290] The CPU 18b may include a measurement unit 187 shown in Fig. 20. After step S107 is executed, steps S108, S109, and S110 shown in Fig. 21 may be executed.

[0291] The user may change the reference point after point setting unit 185 accepts the reference point in step S103. The number of reference points set in step S103 is not limited to two.

[0292] Region information indicating at least one of the size of the reference region and the position of the reference region may be recorded in advance on the recording medium. In step S104a, the region setting unit 182 may set at least one of the size of the reference region and the position of the reference region based on the region information. For example, the region setting unit 182 may set at least one of the size of the outer boundary of the reference region and the position of the outer boundary of the reference region based on the region information.

[0293] Two or more pieces of region information may be recorded in advance on the recording medium. In step S104a, the region setting unit 182 may select one of the two or more pieces of region information based on information input through the operation unit 4. In step S104a, the region setting unit 182 may set one of the size of the reference region and the position of the reference region based on the selected region information.

[0294] After the region setting unit 182 sets the reference region in step S104a, the user may change at least one of the size and the position of the reference region at any timing, which may be after the reference region is displayed in step S105 or after the reference plane is displayed in step S107.

[0295] The display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and may display three or more points of the point cloud data used to estimate the reference plane on the 3D image. The display control unit 183 may display a 2D image of the subject on the display unit 5, and may display three or more points on the 2D image corresponding to the three or more points of the point cloud data used to estimate the reference plane.

[0296] Display of the reference region is not essential, therefore, step S105 does not need to be executed. Display of the reference surface is not essential, therefore, step S107 does not need to be executed.

[0297] The order of the processes in the surface estimation process is not limited to the order shown in Fig. 33. For example, step S111 may be performed before step S102 or step S103 is performed. Before step S101 is performed, step S111 may be performed by using a 2D image of the subject.

[0298] In the sixth embodiment, the reference area is set based on the surface condition of the subject. The endoscope device 1 can easily set a reference area that does not include an abnormal area. Therefore, the endoscope device 1 can improve the accuracy of the reference surface.

[0299] (First modified example of the sixth embodiment) A first modified example of the sixth embodiment of the present invention will be described. In the first modified example of the sixth embodiment, the state determination unit 188 divides three or more points corresponding to three-dimensional coordinates included in the point cloud data into two or more regions. The display control unit 183 displays images of the two or more regions on the display unit 5, and the point setting unit 185 accepts a reference point on the image.

[0300] The surface estimation process in the first modified example of the sixth embodiment will be described with reference to Fig. 37. Fig. 37 shows the procedure of the surface estimation process. The description of the same process as that shown in Fig. 33 will be omitted.

[0301] After step S101, in step S111, state determination unit 188 determines the state of the subject, thereby dividing three or more points corresponding to three-dimensional coordinates included in the point cloud data into two or more regions.

[0302] After step S111, the display control unit 183 displays the 3D image of the point cloud data and the images of the two or more regions on the display unit 5 (step S102a). Specifically, the display control unit 183 generates a graphic image signal for displaying the 3D image of the point cloud data and the images of the two or more regions. The images of the two or more regions include color data for each pixel. The display control unit 183 outputs the generated graphic image signal to the display unit 5 through the video signal processing circuit 12. The display unit 5 displays the 3D image of the point cloud data and the images of the two or more regions.

[0303] After step S102a, point setting unit 185 accepts two reference points on the image of two or more regions through operation unit 4, and generates point information indicating the accepted reference points (step S103a). After step S103a, step S104a is executed.

[0304] Fig. 38 shows an example of an image displayed on the display unit 5. A 3D image G91 that is the same as the 3D image G91 shown in Fig. 34 and an image G92 of two or more regions are displayed on the display unit 5. In the example shown in Fig. 38, the region of the image G92 is divided into a region R94, a region R95, and a region R96.

[0305] The user refers to image G92 and determines the position of the reference point. By comparing the 3D image G91 and image G92, the user can determine the characteristics of the subject. For example, the user can determine that region R95 and region R96 are concave or convex. The user determines the position of the reference point for setting a reference region that does not include regions corresponding to region R95 and region R96. For example, the user specifies the reference point on the widest region R94.

[0306] The user designates reference points P94 and P95 by using a cursor displayed on image G92 or by touching the screen of display unit 5. Point setting unit 185 accepts reference points P94 and P95.

[0307] The area setting unit 182 calculates a sphere SP93 having, as its diameter, the line segment connecting the reference point P94 and the reference point P95. The area setting unit 182 sets the sphere SP93 as the outer boundary of the reference area.

[0308] The region setting unit 182 sets the region with the largest volume among two or more regions within the sphere SP93 as the reference region. Regions other than the region set as the reference region are not included in the reference region. A part of region R94 and region R95 are within the sphere SP93. Region R94 within the sphere SP93 is included in the reference region. Region R95 is not included in the reference region. The region setting unit 182 sets the boundary of region R95 as the inner boundary of the reference region.

[0309] The outer boundary of the reference region may be a rectangular parallelepiped, a cube, a cylinder, etc. The shape of the reference region is not limited to these examples.

[0310] In step S102a, the display control unit 183 may display a 2D image of the subject on the display unit 5 instead of the 3D image of the point cloud data.

[0311] The CPU 18b may include a measurement unit 187 shown in Fig. 20. After step S107 is executed, steps S108, S109, and S110 shown in Fig. 21 may be executed.

[0312] The user may change the reference point after point setting unit 185 accepts the reference point in step S103a. The number of reference points set in step S103a is not limited to two.

[0313] After the region setting unit 182 sets the reference region in step S104a, the user may change at least one of the size and the position of the reference region at any timing, which may be after the reference region is displayed in step S105 or after the reference plane is displayed in step S107.

[0314] The display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and may display three or more points of the point cloud data used to estimate the reference plane on the 3D image. The display control unit 183 may display a 2D image of the subject on the display unit 5, and may display three or more points on the 2D image corresponding to the three or more points of the point cloud data used to estimate the reference plane.

[0315] The display control unit 183 may display images of two or more regions generated by dividing three or more points in the point cloud data on the display unit 5. The display control unit 183 may display three or more points on the image corresponding to the three or more points of the point cloud data used to estimate the reference plane.

[0316] Display of the reference region is not essential, therefore, step S105 does not need to be executed. Display of the reference surface is not essential, therefore, step S107 does not need to be executed.

[0317] In the first modified example of the sixth embodiment, the reference area is set based on the surface condition of the subject. The endoscope device 1 can easily set the reference area that does not include an abnormal area. Therefore, the endoscope device 1 can improve the accuracy of the reference surface.

[0318] (Second modified example of the sixth embodiment) A second modified example of the sixth embodiment of the present invention will be described. In the second modified example of the sixth embodiment, a curvature map is used to set a reference region. The curvature map indicates the distribution of curvature in the 3D shape of the subject represented by the point cloud data. For example, the curvature map includes 3D coordinates of points and the curvatures at the points. The reference region includes a region in which the curvature falls within a predetermined range.

[0319] A surface estimation process in the second modified example of the sixth embodiment will be described. The surface estimation process in the second modified example of the sixth embodiment is executed according to Fig. 33. In the following, a description of the same process as the surface estimation process in the sixth embodiment will be omitted.

[0320] In step S111, the state determination unit 188 calculates the curvature at each point of the point cloud data and generates a curvature map. The state determination unit 188 determines the state of the subject based on the curvature map. Specifically, the state determination unit 188 determines the curvature of the surface of the subject by using the following method.

[0321] The state determination unit 188 sets a three-dimensional determination region in the 3D space with a reference point on the 3D image of the point cloud data at its center. The state determination unit 188 acquires the curvature associated with each point in the determination region from the curvature map. The state determination unit 188 calculates the difference between the curvature at the reference point and the curvature of each point in the determination region.

[0322] In step S104a, the region setting unit 182 extracts points whose difference falls within a predetermined range from the judgment region. The region setting unit 182 extracts three or more points from the judgment region. The region setting unit 182 sets a reference region that includes the three or more extracted points. The reference region includes all or some of the points in the judgment region.

[0323] A 2D image of the object may be used instead of the 3D image of the point cloud data. In the following, an example in which a 2D image of the object is used will be described.

[0324] In step S111, the state determination unit 188 calculates the curvature at each point of the point cloud data and generates a curvature map. The state determination unit 188 sets a two-dimensional determination area having the reference point accepted by the point setting unit 185 as its center in the 2D image of the subject. Thereafter, the same process as in the example in which the 3D image of the point cloud data is used is executed, and the reference area is set in the 2D image of the subject.

[0325] The display control unit 183 may display an image of the curvature map on the display unit 5, and may display three or more points on that image corresponding to the three or more points of the point cloud data used to estimate the reference surface.

[0326] In a second modification of the sixth embodiment, the reference area includes three or more points on a surface having a stable curvature. The endoscope device 1 can set a reference area that does not include an abnormal area. Therefore, the endoscope device 1 can improve the accuracy of the reference surface.

[0327] (Third modified example of the sixth embodiment) A third modified example of the sixth embodiment of the present invention will be described. In the third modified example of the sixth embodiment, the display control unit 183 displays an image of the curvature map on the display unit 5, and the point setting unit 185 receives a reference point on the image.

[0328] The surface estimation process in the third modified example of the sixth embodiment will be described with reference to Fig. 39. Fig. 39 shows the procedure of the surface estimation process. The description of the same process as that shown in Fig. 33 will be omitted.

[0329] After step S101, the state determination unit 188 calculates the curvature at each point of the point cloud data, and generates a curvature map (step S112).

[0330] After step S112, the display control unit 183 displays the 3D image of the point cloud data and the image of the curvature map on the display unit 5 (step S102b). Specifically, the display control unit 183 generates a graphic image signal for displaying the 3D image of the point cloud data and the image of the curvature map. The image of the curvature map includes color data of each pixel. The display control unit 183 outputs the generated graphic image signal to the display unit 5 through the video signal processing circuit 12. The display unit 5 displays the 3D image of the point cloud data and the image of the curvature map.

[0331] After step S102b, the point setting unit 185 accepts one reference point on the image of the curvature map through the operation unit 4, and generates point information indicating the accepted reference point (step S103b).

[0332] 40 shows an example of an image displayed on the display unit 5 in step S103b. A 3D image G93 of the point cloud data and an image G94 of the curvature map are displayed on the display unit 5. The pixels of the image G94 are displayed in a color corresponding to the curvature at that pixel. For example, pixels with a large curvature are displayed in a dark color, and pixels with a small curvature are displayed in a light color.

[0333] The user refers to image G94 and determines the position of the reference point. By comparing the 3D image G93 and image G94, the user can determine the characteristics of the subject. For example, the curvature of regions R97 and R98 on image G94 of the curvature map is higher than the curvature of the regions around them. Therefore, the user can determine that regions R97 and R98 are concave or convex. The user determines the position of the reference point for setting a reference region that does not include regions corresponding to regions R97 and R98.

[0334] The user designates the reference point P96 by using a cursor displayed on the image G94 or by touching the screen of the display unit 5. The point setting unit 185 accepts the reference point P96.

[0335] After step S103b, the state determination unit 188 calculates a point of the point cloud data corresponding to the reference point accepted by the point setting unit 185. The state determination unit 188 sets a three-dimensional determination region having the calculated point as its center in the 3D space. The state determination unit 188 acquires the curvature associated with each point in the determination region from the curvature map. The state determination unit 188 calculates the difference between the curvature at the reference point and the curvature of each point in the determination region (step S111b). After step S111b, step S104a is executed.

[0336] A 2D image of the object may be used instead of the 3D image of the point cloud data. In the following, an example in which a 2D image of the object is used will be described.

[0337] After the point setting unit 185 accepts the reference point on the image of the curvature map, the state determination unit 188 calculates a point on the 2D image of the subject that corresponds to the reference point. The state determination unit 188 sets a two-dimensional determination area having the calculated point as the center in the 2D image of the subject. Thereafter, the same process as in the example in which the 3D image of the point cloud data is used is performed, and the reference area is set in the 2D image of the subject.

[0338] In a third modification of the sixth embodiment, the reference area includes three or more points on a surface having a stable curvature. The endoscope device 1 can set a reference area that does not include an abnormal area. Therefore, the endoscope device 1 can improve the accuracy of the reference surface.

[0339] Seventh embodiment A seventh embodiment of the present invention will now be described. An endoscope device 1 of the seventh embodiment has a CPU 18 shown in FIG.

[0340] In the seventh embodiment, a user designates three or more points on a 3D image of the point cloud data or a 2D image of a subject, and a reference region is set based on a line segment connecting the three or more points.

[0341] The display control unit 183 displays one of the 3D image of the point cloud data and the 2D image of the subject on the display unit 5 (image display step). Three or more points on the 3D image of the point cloud data or the 2D image of the subject are input through the operation unit 4 (area setting step). The area setting unit 182 sets a reference area including the three or more input points (area setting step).

[0342] In the region setting step, the region setting unit 182 sets a reference region based on a line segment connecting the three or more input points.

[0343] A surface estimation process in the seventh embodiment will be described. The surface estimation process in the seventh embodiment is executed according to Fig. 9 or Fig. 21. In the following, a description of the same process as the surface estimation process in the second or third embodiment will be omitted.

[0344] In step S102, the display control unit 183 displays a 3D image of the point cloud data on the display unit 5. Step S102 corresponds to an image display step.

[0345] In step S103, the point setting unit 185 receives three or more reference points on the 3D image of the point cloud data through the operation unit 4, and generates point information indicating each of the received three or more reference points. Step S103 corresponds to a region setting step.

[0346] In step S104, the region setting unit 182 sets a reference region based on the three or more reference points indicated by the point information. Step S104 corresponds to a region setting step.

[0347] 41 shows an example of an image displayed on the display unit 5. A 3D image G101 is displayed on the display unit 5. The user specifies reference points P101, P102, and P103 by using a cursor displayed on the 3D image G101 or by touching the screen of the display unit 5. Point setting unit 185 accepts reference points P101, P102, and P103.

[0348] The region setting unit 182 calculates a line segment connecting two reference points. In the example shown in Fig. 41, the region setting unit 182 calculates a line segment L101, a line segment L102, and a line segment L103. The line segment L101 connects the reference point P101 and the reference point P102. The line segment L102 connects the reference point P102 and the reference point P103. The line segment L103 connects the reference point P103 and the reference point P101. Each of the line segment L101, the line segment L102, and the line segment L103 may be displayed on the 3D image G101.

[0349] The region setting unit 182 calculates three cylinders having line segments L101, L102, and L103 as their central axes. The region setting unit 182 sets a reference region R101 which is a collection of regions within the three cylinders. The shape of the region included in the reference region R101 is not limited to a cylinder. The surface estimation unit 186 estimates a reference surface based on three or more points included in the reference region R101.

[0350] Fig. 42 shows another example of an image displayed on the display unit 5. A 3D image G101 that is the same as the 3D image G101 shown in Fig. 41 is displayed on the display unit 5. The user specifies reference points P104, P105, P106, and P107 by using a cursor displayed on the 3D image G101 or by touching the screen of the display unit 5. The point setting unit 185 accepts the reference points P104, P105, P106, and P107.

[0351] The region setting unit 182 calculates a line segment connecting two reference points. In the example shown in FIG. 42, the region setting unit 182 calculates a line segment L104, a line segment L105, a line segment L106, and a line segment L107. The line segment L104 connects the reference point P104 and the reference point P105. The line segment L105 connects the reference point P105 and the reference point P106. The line segment L106 connects the reference point P106 and the reference point P107. The line segment L107 connects the reference point P107 and the reference point P104. Each of the line segment L104, the line segment L105, the line segment L106, and the line segment L107 may be displayed on the 3D image G101.

[0352] The region setting unit 182 calculates four cylinders having line segments L104, L105, L106, and L107 as their central axes. The region setting unit 182 sets a reference region R102 which is a collection of regions within the four cylinders. The shape of the region included in the reference region R102 is not limited to a cylinder. The surface estimation unit 186 estimates a reference surface based on three or more points included in the reference region R102.

[0353] A 2D image of the object may be used instead of the 3D image of the point cloud data. In the following, an example in which a 2D image of the object is used will be described.

[0354] In step S102, the display control unit 183 displays a 2D image of the subject on the display unit 5. In step S103, the point setting unit 185 accepts three or more reference points on the 2D image of the subject through the operation unit 4, and generates point information indicating each of the accepted three or more reference points. In step S104, the region setting unit 182 sets a reference region based on the three or more reference points indicated by the point information.

[0355] The user may change the reference points after point setting unit 185 accepts the reference points in step S103. The number of reference points set in step S103 is not limited to three or four.

[0356] The display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and may display three or more points of the point cloud data used to estimate the reference plane on the 3D image. The display control unit 183 may display a 2D image of the subject on the display unit 5, and may display three or more points on the 2D image corresponding to the three or more points of the point cloud data used to estimate the reference plane.

[0357] Display of the reference region is not essential, therefore, step S105 does not need to be executed. Display of the reference surface is not essential, therefore, step S107 does not need to be executed.

[0358] In the seventh embodiment, a reference area including three or more points specified by a user is set. Therefore, the degree of freedom of the reference area is increased according to the shape of the subject or the composition of the image. The endoscope device 1 can easily set the reference area.

[0359] Eighth embodiment An eighth embodiment of the present invention will now be described. An endoscope apparatus 1 of the eighth embodiment has a CPU 18 shown in FIG.

[0360] In an eighth embodiment, a user specifies a line on the image by tracing a 3D image of the point cloud data or a 2D image of a subject. A reference region is set based on three or more points on the specified line.

[0361] The display control unit 183 displays one of the 3D image of the point cloud data and the 2D image of the subject on the display unit 5 (image display step). Three or more points on a line specified by the user in the 3D image of the point cloud data or the 2D image of the subject are input through the operation unit 4 (area setting step). The area setting unit 182 sets a reference area including the three or more points on the line (area setting step).

[0362] A surface estimation process in the eighth embodiment will be described. The surface estimation process in the eighth embodiment is executed according to Fig. 9 or Fig. 21. In the following, a description of the same process as the surface estimation process in the second or third embodiment will be omitted.

[0363] In step S102, the display control unit 183 displays a 3D image of the point cloud data on the display unit 5. Step S102 corresponds to an image display step.

[0364] The user draws a line by tracing the 3D image of the point cloud data. In step S103, the point setting unit 185 accepts three or more reference points on the line through the operation unit 4, and generates point information indicating each of the accepted three or more reference points. Step S103 corresponds to a region setting step.

[0365] In step S104, the region setting unit 182 sets a reference region based on the three or more reference points indicated by the point information. Step S104 corresponds to a region setting step.

[0366] FIG. 43 shows an example of an image displayed on the display unit 5. The same 3D image G101 as the 3D image G101 shown in FIG. 41 is displayed on the display unit 5. In an example in which the display unit 5 and the operation unit 4 are touch panels, the user draws the line L111 by linearly tracing the screen of the display unit 5. In an example in which a cursor on the 3D image G101 is displayed, the user may draw the line L111 by linearly moving the cursor on the 3D image G101. The point setting unit 185 accepts all reference points on the line L111. The point setting unit 185 may accept some reference points on the line L111. The line L111 does not have to be a closed line.

[0367] The region setting unit 182 sets a reference region R111 having a line L111 as a central axis and a circular cross section. The shape of the cross section of the reference region R111 is not limited to a circle. The plane estimation unit 186 estimates a reference plane based on three or more points included in the reference region R111.

[0368] A 2D image of the object may be used instead of the 3D image of the point cloud data. In the following, an example in which a 2D image of the object is used will be described.

[0369] In step S102, the display control unit 183 displays a 2D image of the subject on the display unit 5. The user draws a line by tracing the 2D image of the subject. In step S103, the point setting unit 185 accepts three or more reference points on the line through the operation unit 4, and generates point information indicating each of the accepted three or more reference points. In step S104, the region setting unit 182 sets a reference region based on the three or more reference points indicated by the point information.

[0370] The display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and may display three or more points of the point cloud data used to estimate the reference plane on the 3D image. The display control unit 183 may display a 2D image of the subject on the display unit 5, and may display three or more points on the 2D image corresponding to the three or more points of the point cloud data used to estimate the reference plane.

[0371] Display of the reference region is not essential, therefore, step S105 does not need to be executed. Display of the reference surface is not essential, therefore, step S107 does not need to be executed.

[0372] In the eighth embodiment, a reference area including three or more points on a line specified by a user tracing an image is set. This increases the degree of freedom of the reference area according to the shape of the subject or the composition of the image. The endoscope device 1 can easily set the reference area.

[0373] Ninth embodiment A ninth embodiment of the present invention will be described. In the ninth embodiment, a 3D image of point cloud data or a 2D image of a subject is displayed on the display unit 5, and images of two or more regions in the point cloud data are displayed on the display unit 5. A user refers to the images of the two or more regions and specifies a reference point on the 3D image of the point cloud data.

[0374] In the ninth embodiment, the CPU 18 shown in Fig. 8 is changed to a CPU 18c shown in Fig. 44. Fig. 44 shows a functional configuration of the CPU 18c. The functions of the CPU 18c are configured by a control unit 180, a generation unit 181, a region setting unit 182, a display control unit 183, a position calculation unit 184, a point setting unit 185, a plane estimation unit 186, and a division unit 189. At least one of the blocks shown in Fig. 44 may be configured by a circuit different from the CPU 18c. A description of the same configuration as that shown in Fig. 8 will be omitted.

[0375] Each unit shown in Fig. 44 may be composed of at least one of a processor and a logic circuit. Each unit shown in Fig. 44 may include one or more processors. Each unit shown in Fig. 44 may include one or more logic circuits.

[0376] The dividing unit 189 has some of the functions of the state determination unit 188 shown in Fig. 32. The dividing unit 189 divides three or more points corresponding to three-dimensional coordinates included in the point cloud data into two or more regions (dividing step). The display control unit 183 displays one of the image of the point cloud data and the 2D image of the subject on the display unit 5, and also displays images of the two or more regions on the display unit 5 (image display step).

[0377] The surface estimation process in the ninth embodiment will be described with reference to Fig. 45. Fig. 45 shows the procedure of the surface estimation process. Description of the same process as that shown in Fig. 9 will be omitted.

[0378] After step S101, the division unit 189 divides three or more points corresponding to three-dimensional coordinates included in the point cloud data into two or more regions (step S121). Step S121 corresponds to a division step. The division unit 189 divides three or more points in the point cloud data into two or more regions by using the same method as the method in the sixth embodiment.

[0379] After step S121, the display control unit 183 displays a 3D image of the point cloud data and images of two or more regions on the display unit 5 (step S102c). Step S102c corresponds to an image display step. Step S102c is the same as step S102a shown in FIG. 37. After step S102c, step S103 is executed.

[0380] Fig. 46 shows an example of an image displayed on the display unit 5. A 3D image G91 that is the same as the 3D image G91 shown in Fig. 34 and an image G92 that is the same as the image G92 shown in Fig. 38 are displayed on the display unit 5. In the example shown in Fig. 46, the area of ​​the image G92 is divided into an area R94, an area R95, and an area R96.

[0381] The user refers to image G92 and determines the location of the reference point. By comparing 3D image G91 and image G92, the user can determine the characteristics of the subject. For example, the user can determine that region R95 and region R96 are concave or convex. The user determines the location of the reference point for setting a reference region that does not include the regions corresponding to region R95 and region R96. For example, the user specifies a reference point on the region of 3D image G91 that corresponds to the widest region R94.

[0382] The user specifies the reference points P121 and P122 by using a cursor displayed on the 3D image G91 or by touching the screen of the display unit 5. The point setting unit 185 accepts the reference points P121 and P122.

[0383] The region setting unit 182 calculates a sphere SP121 having a diameter equal to the line segment connecting the reference point P121 and the reference point P122. The region setting unit 182 sets the sphere SP121 as the boundary of the reference region. The region setting unit 182 may exclude the region of the 3D image G91 corresponding to the region R95 from the reference region.

[0384] The reference region may be a rectangular parallelepiped, a cube, a cylinder, etc. The shape of the reference region is not limited to these examples.

[0385] In step S102c, the display control unit 183 may display a 2D image of the subject on the display unit 5 instead of the 3D image of the point cloud data.

[0386] The CPU 18c may include a measurement unit 187 shown in Fig. 20. After step S107 is executed, steps S108, S109, and S110 shown in Fig. 21 may be executed.

[0387] The user may change the reference point after point setting unit 185 accepts the reference point in step S103. The number of reference points set in step S103 is not limited to two.

[0388] After the region setting unit 182 sets the reference region in step S104, the user may change at least one of the size and the position of the reference region at any timing, which may be after the reference region is displayed in step S105 or after the reference plane is displayed in step S107.

[0389] The display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and may display three or more points of the point cloud data used to estimate the reference plane on the 3D image. The display control unit 183 may display a 2D image of the subject on the display unit 5, and may display three or more points on the 2D image corresponding to the three or more points of the point cloud data used to estimate the reference plane.

[0390] Display of the reference region is not essential, therefore, step S105 does not need to be executed. Display of the reference surface is not essential, therefore, step S107 does not need to be executed.

[0391] In the ninth embodiment, images of two or more areas in the point cloud data are displayed on the display unit 5. By referring to the images, the user can determine an area suitable for specifying a reference point.

[0392] (Modification of the ninth embodiment) A modification of the ninth embodiment of the present invention will be described. In the modification of the ninth embodiment, a 3D image of point cloud data or a 2D image of a subject is displayed on the display unit 5, and an image of a curvature map is displayed on the display unit 5. The curvature map indicates the distribution of curvature in the 3D shape of the subject represented by the point cloud data. For example, the curvature map includes the 3D coordinates of points and the curvatures at the points. The user refers to the image of the curvature map and specifies a reference point on the 3D image of the point cloud data.

[0393] In a modification of the ninth embodiment, the CPU 18 shown in FIG. 8 is changed to a CPU 18d shown in FIG. 47. FIG. 47 shows a functional configuration of the CPU 18d. The functions of the CPU 18d are configured by a control unit 180, a generation unit 181, a region setting unit 182, a display control unit 183, a position calculation unit 184, a point setting unit 185, a surface estimation unit 186, and a curvature calculation unit 190. At least one of the blocks shown in FIG. 47 may be configured by a circuit different from the CPU 18d. A description of the same configuration as that shown in FIG. 8 will be omitted.

[0394] Each unit shown in Fig. 47 may be composed of at least one of a processor and a logic circuit. Each unit shown in Fig. 47 may include one or more processors. Each unit shown in Fig. 47 may include one or more logic circuits.

[0395] The curvature calculation unit 190 has some of the functions of the state determination unit 188 shown in Fig. 32. The curvature calculation unit 190 calculates the curvature at each point of the point cloud data, and generates a curvature map (map generation step). The display control unit 183 displays one of the 3D image of the point cloud data and the 2D image of the subject on the display unit 5, and also displays an image of the curvature map on the display unit 5 (image display step).

[0396] The surface estimation process in the modified example of the ninth embodiment will be described with reference to Fig. 48. Fig. 48 shows the procedure of the surface estimation process. The description of the same process as that shown in Fig. 9 will be omitted.

[0397] After step S101, the curvature calculation unit 190 calculates the curvature at each point of the point cloud data and generates a curvature map (step S122). Step S122 corresponds to a map generation step. The curvature calculation unit 190 generates the curvature map by using the same method as the method in the second modified example of the sixth embodiment.

[0398] After step S122, the display control unit 183 displays the 3D image of the point cloud data and the image of the curvature map on the display unit 5 (step S102d). Step S102d corresponds to an image display step. Step S102d is the same as step S102b shown in Fig. 39. After step S102d, step S103 is executed.

[0399] Fig. 49 shows an example of an image displayed on the display unit 5. A 3D image G93 that is the same as the 3D image G93 shown in Fig. 40 and an image G94 that is the same as the image G94 shown in Fig. 40 are displayed on the display unit 5.

[0400] The user refers to image G94 and determines the position of the reference point. By comparing the 3D image G93 and image G94, the user can determine the characteristics of the subject. For example, the curvature of regions R97 and R98 on image G94 of the curvature map is higher than the curvature of the regions around them. Therefore, the user can determine that regions R97 and R98 are concave or convex. The user determines the position of the reference point for setting a reference region that does not include regions corresponding to regions R97 and R98.

[0401] The user specifies reference point P123 and reference point P124 by using a cursor displayed on 3D image G93 or by touching the screen of display unit 5. Point setting unit 185 accepts reference point P123 and reference point P124.

[0402] The area setting unit 182 calculates a sphere SP122 having, as its diameter, the line segment connecting the reference point P123 and the reference point P124. The area setting unit 182 sets the sphere SP122 as the boundary of the reference area.

[0403] The reference region may be a rectangular parallelepiped, a cube, a cylinder, etc. The shape of the reference region is not limited to these examples.

[0404] In step S102d, the display control unit 183 may display a 2D image of the subject on the display unit 5 instead of the 3D image of the point cloud data.

[0405] The CPU 18d may include a measurement unit 187 shown in Fig. 20. After step S107 is executed, steps S108, S109, and S110 shown in Fig. 21 may be executed.

[0406] The user may change the reference point after point setting unit 185 accepts the reference point in step S103. The number of reference points set in step S103 is not limited to two.

[0407] After the region setting unit 182 sets the reference region in step S104, the user may change at least one of the size and the position of the reference region at any timing, which may be after the reference region is displayed in step S105 or after the reference plane is displayed in step S107.

[0408] The display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and may display three or more points of the point cloud data used to estimate the reference plane on the 3D image. The display control unit 183 may display a 2D image of the subject on the display unit 5, and may display three or more points on the 2D image corresponding to the three or more points of the point cloud data used to estimate the reference plane.

[0409] Display of the reference region is not essential, therefore, step S105 does not need to be executed. Display of the reference surface is not essential, therefore, step S107 does not need to be executed.

[0410] In a modification of the ninth embodiment, an image of the curvature map is displayed on the display unit 5. By referring to the image, the user can determine an area suitable for designating a reference point.

[0411] (Tenth embodiment) A tenth embodiment of the present invention will be described. In the tenth embodiment, an abnormal area on the surface of a subject is automatically detected, and a reference area excluding an area corresponding to the abnormal area is set. The user does not need to specify a reference point.

[0412] In the tenth embodiment, the CPU 18 shown in Fig. 8 is changed to a CPU 18e shown in Fig. 50. Fig. 50 shows a functional configuration of the CPU 18e. The functions of the CPU 18e are configured by a control unit 180, a generation unit 181, a region setting unit 182, a display control unit 183, a surface estimation unit 186, and an abnormality detection unit 191. At least one of the blocks shown in Fig. 50 may be configured by a circuit different from the CPU 18e. A description of the same configuration as that shown in Fig. 8 will be omitted.

[0413] Each unit shown in Fig. 50 may be composed of at least one of a processor and a logic circuit. Each unit shown in Fig. 50 may include one or more processors. Each unit shown in Fig. 50 may include one or more logic circuits.

[0414] The abnormality detection unit 191 detects an abnormal area on the surface of the subject based on one of the 3D image of the point cloud data and the 2D image of the subject (abnormality detection step). The region setting unit 182 sets a reference region excluding a region corresponding to the abnormal area (region setting step).

[0415] The surface estimation process in the tenth embodiment will be described with reference to Fig. 51. Fig. 51 shows the procedure of the surface estimation process. Description of the same process as that shown in Fig. 9 will be omitted.

[0416] After step S101, the display control unit 183 displays a 2D image of the subject on the display unit 5 (step S102e).

[0417] After step S102e, the abnormality detection unit 191 detects an abnormal area on the surface of the subject based on the 2D image of the subject (step S131). Step S131 corresponds to an abnormality detection step.

[0418] The anomaly detection unit 191 detects an abnormal area from a 2D image of a subject by using an anomaly recognition model. For example, the anomaly recognition model is acquired through machine learning such as Deep Learning. The anomaly is a defect or a scratch. The anomaly detection unit 191 obtains the type of anomaly and the position of the abnormal area.

[0419] After step S131, the region setting unit 182 sets a reference region excluding a region corresponding to an abnormal region in the 2D image of the subject (step S104e). Step S104e corresponds to a region setting step. After step S104e, step S105 is executed.

[0420] 52 and 53 show examples of images displayed on display unit 5. A 2D image G131 of the subject is displayed on display unit 5. Anomaly detection unit 191 processes 2D image G131 to detect a convex abnormal object AO131.

[0421] The region setting unit 182 calculates a rectangle RC131 around the abnormal object AO131. The region setting unit 182 sets a first boundary that is a predetermined distance away from the rectangle RC131 outside the rectangle RC131. The region setting unit 182 also sets a second boundary that is a predetermined distance away from the rectangle RC131 inside the rectangle RC131. In this way, the region setting unit 182 sets a reference region R131 including the first boundary and the second boundary in the 2D image G131.

[0422] The boundary of the reference region R131 may be a polygon having three or more vertices. The boundary of the reference region R131 may be a circle, an ellipse, etc. The shape of the reference region R131 is not limited to these examples.

[0423] A 3D image of point cloud data may be used instead of the 2D image of the object. In the following, an example in which a 3D image of point cloud data is used will be described.

[0424] In step S102e, the display control unit 183 displays a 3D image of the point cloud data on the display unit 5. In step S131, the abnormality detection unit 191 detects an abnormal area on the surface of the subject based on the 3D image of the point cloud data. In step S104e, the region setting unit 182 sets a reference region in the 3D space excluding a region corresponding to the abnormal region.

[0425] The CPU 18e may have a measurement unit 187 shown in Fig. 20. After step S107 is executed, steps S108, S109, and S110 shown in Fig. 21 may be executed.

[0426] The control unit 180 may set the measurement mode based on the type of abnormality detected by the abnormality detection unit 191. For example, when a convex or concave abnormality is detected, the control unit 180 may set the measurement mode to the surface-based measurement in order to measure the height or depth.

[0427] Region information indicating the size of the reference region may be recorded in advance on the recording medium. In step S104e, the region setting unit 182 may set the size of the reference region based on the region information.

[0428] Two or more pieces of region information may be recorded in advance on the recording medium. In step S104e, the region setting unit 182 may select one of the two or more pieces of region information based on information input through the operation unit 4. In step S104e, the region setting unit 182 may set the size of the reference region based on the selected region information.

[0429] After the region setting unit 182 sets the reference region in step S104e, the user may change at least one of the size and the position of the reference region at any timing, which may be after the reference region is displayed in step S105 or after the reference plane is displayed in step S107.

[0430] The display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and may display three or more points of the point cloud data used to estimate the reference plane on the 3D image. The display control unit 183 may display a 2D image of the subject on the display unit 5, and may display three or more points on the 2D image corresponding to the three or more points of the point cloud data used to estimate the reference plane.

[0431] Display of the reference region is not essential, therefore, step S105 does not need to be executed. Display of the reference surface is not essential, therefore, step S107 does not need to be executed.

[0432] When the display of the reference area and the reference surface is not necessary, the display of the image is not essential. Therefore, step S102e does not need to be executed. The CPU 18e does not need to have the function of the display control unit 183.

[0433] In the tenth embodiment, the endoscope device 1 can set a reference area that does not include an abnormal area, and therefore the endoscope device 1 can improve the accuracy of the reference surface.

[0434] (Eleventh embodiment) An eleventh embodiment of the present invention will be described. In the eleventh embodiment, a deviation map is displayed on the display unit 5. The deviation map shows the distribution of 3D distances between points corresponding to 3D coordinates included in the point cloud data and the reference surface.

[0435] In the eleventh embodiment, the CPU 18 shown in Fig. 8 is changed to a CPU 18f shown in Fig. 54. Fig. 54 shows a functional configuration of the CPU 18f. The functions of the CPU 18f are configured by a control unit 180, a generation unit 181, a region setting unit 182, a display control unit 183, a position calculation unit 184, a point setting unit 185, a plane estimation unit 186, and a deviation calculation unit 192. At least one of the blocks shown in Fig. 54 may be configured by a circuit different from the CPU 18f. A description of the same configuration as that shown in Fig. 8 will be omitted.

[0436] Each unit shown in Figure 54 may be composed of at least one of a processor and a logic circuit. Each unit shown in Figure 54 may include one or more processors. Each unit shown in Figure 54 may include one or more logic circuits.

[0437] The deviation calculation unit 192 calculates the deviation by calculating the 3D distance between each point in the point cloud data and the reference plane. The deviation calculation unit 192 generates a deviation map indicating the distribution of the deviation (map generation step). The display control unit 183 displays one of the 3D image of the point cloud data and the 2D image of the subject on the display unit 5, and displays the deviation map on the 3D image of the point cloud data or the 2D image of the subject (image display step).

[0438] The surface estimation process in the eleventh embodiment will be described with reference to Fig. 55. Fig. 55 shows the procedure of the surface estimation process. Description of the same process as that shown in Fig. 9 will be omitted.

[0439] After step S101, the display control unit 183 displays a 3D image of the point cloud data on the display unit 5 (step S102f). After step S102f, step S103 is executed.

[0440] After step S106, the deviation calculation unit 192 calculates the deviation at each point of the point cloud data, and generates a deviation map (step S141). Step S141 corresponds to a map generation step.

[0441] After step S141, the display control unit 183 displays the image of the deviation map on the display unit 5 (step S142). Specifically, the display control unit 183 generates a graphic image signal for displaying a 3D image of the point cloud data on which the image of the deviation map is superimposed. The image of the deviation map includes color data of each pixel. The display control unit 183 outputs the generated graphic image signal to the display unit 5 through the video signal processing circuit 12. The display unit 5 displays the 3D image of the point cloud data on which the image of the deviation map is superimposed.

[0442] Step S142 corresponds to an image display step. When step S142 is executed, the surface estimation process ends.

[0443] FIG. 56 shows an example of an image displayed on the display unit 5. A 3D image G141 of the point cloud data is displayed on the display unit 5, and an image G142 of the deviation map is displayed on the 3D image G141. The pixels of the image G142 are displayed in a color corresponding to the deviation at that pixel. For example, a pixel with a large deviation is displayed in a dark color, and a pixel with a small deviation is displayed in a light color. In FIG. 56, the reference region and the reference surface are omitted.

[0444] By referring to the image G142, the user can check whether the reference surface coincides with the surface of the object. If the reference area includes an area with a large deviation, the accuracy of the reference surface may deteriorate. If the reference area and the image G142 are displayed on the 3D image G141, the user can check whether the reference area includes an area with a large deviation.

[0445] In step S102f, the display control unit 183 may display a 2D image of the subject on the display unit 5 instead of the 3D image of the point cloud data.

[0446] The CPU 18f may have a measurement unit 187 shown in Fig. 20. After step S107, step S141, or step S142 is executed, step S108, step S109, and step S110 shown in Fig. 21 may be executed.

[0447] After point setting unit 185 accepts the reference point in step S103, the user may change the reference point.

[0448] Region information indicating at least one of the size of the reference region and the position of the reference region may be recorded in advance on the recording medium. In step S104, the region setting unit 182 may set at least one of the size of the reference region and the position of the reference region based on the region information. For example, the region setting unit 182 may set at least one of the size of the outer boundary of the reference region and the position of the outer boundary of the reference region based on the region information.

[0449] Two or more pieces of region information may be recorded in advance on the recording medium. In step S104, the region setting unit 182 may select one of the two or more pieces of region information based on information input through the operation unit 4. In step S104, the region setting unit 182 may set one of the size of the reference region and the position of the reference region based on the selected region information.

[0450] After the region setting unit 182 sets the reference region in step S104, the user may change at least one of the size and the position of the reference region at any timing, which may be after the reference region is displayed in step S105 or after the deviation map is displayed in step S142.

[0451] The area setting unit 182 may set the reference area without using the reference point. Therefore, step S103 does not need to be executed. The CPU 18f does not need to have the functions of the position calculation unit 184 and the point setting unit 185.

[0452] The display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and may display three or more points of the point cloud data used to estimate the reference plane on the 3D image. The display control unit 183 may display a 2D image of the subject on the display unit 5, and may display three or more points on the 2D image corresponding to the three or more points of the point cloud data used to estimate the reference plane.

[0453] Displaying the reference region is not essential, so step S105 does not need to be performed.

[0454] In the eleventh embodiment, an image of the deviation map is displayed on the display unit 5. By referring to the image, the user can check whether the reference surface accurately approximates the surface of the subject.

[0455] (Twelfth embodiment) A twelfth embodiment of the present invention will be described. In the following, an example in which the PC 41 shown in Fig. 7 is a surface estimation device will be described. The PC 41 acquires a 2D image of a subject from the endoscope device 1, and executes a surface estimation process.

[0456] The external device interface 16 of the endoscope device 1 executes communication with the PC 41. Specifically, the external device interface 16 transmits one or more 2D images of a subject to the PC 41. The PC 41 receives the 2D images from the endoscope device 1.

[0457] For example, the external device interface 16 is connected to the PC 41 by a cable or wirelessly. The communication between the external device interface 16 and the PC 41 may be performed via a LAN (Local Area Network) or the Internet.

[0458] Fig. 57 shows the configuration of the PC 41. The PC 41 shown in Fig. 57 has a communication unit 43, a CPU 44, and a display unit 45.

[0459] The communication unit 43 communicates with the external device interface 16 of the endoscope device 1. Specifically, the communication unit 43 receives one or more 2D images of a subject from the external device interface 16. The CPU 44 executes a surface estimation process. The display unit 45 is a monitor (display) such as an LCD. The display unit 45 has a display screen, and displays images, operation menus, and the like on the display screen.

[0460] Fig. 58 shows a functional configuration of the CPU 44. The functions of the CPU 44 are configured by a control unit 440, a generation unit 441, a region setting unit 442, a display control unit 443, a position calculation unit 444, a point setting unit 445, a surface estimation unit 446, and a communication control unit 447. At least one of the blocks shown in Fig. 58 may be configured by a circuit separate from the CPU 44.

[0461] Each unit shown in Fig. 58 may be composed of at least one of a processor and a logic circuit. Each unit shown in Fig. 58 may include one or more processors. Each unit shown in Fig. 58 may include one or more logic circuits.

[0462] The control unit 440 controls the processing executed by each unit. The generation unit 441 has the same function as the generation unit 181 shown in Fig. 8. The region setting unit 442 has the same function as the region setting unit 182 shown in Fig. 8. The display control unit 443 has the same function as the display control unit 183 shown in Fig. 8. The position calculation unit 444 has the same function as the position calculation unit 184 shown in Fig. 8. The point setting unit 445 has the same function as the point setting unit 185 shown in Fig. 8. The plane estimation unit 446 has the same function as the plane estimation unit 186 shown in Fig. 8. The communication control unit 447 controls the communication unit 43 to communicate with the external device interface 16 of the endoscope device 1.

[0463] The CPU 44 executes the surface estimation process shown in Fig. 9. The CPU 44 may have the function of the measurement unit 187 shown in Fig. 20. If the CPU 44 has the function of the measurement unit 187, the CPU 44 may execute the 3D measurement shown in Fig. 21. The CPU 44 may have the function of the state determination unit 188 shown in Fig. 32. If the CPU 44 has the function of the state determination unit 188, the CPU 44 may execute the surface estimation process shown in Fig. 33, Fig. 37, or Fig. 39.

[0464] The CPU 44 may have the function of a division unit 189 shown in Fig. 44. When the CPU 44 has the function of the division unit 189, the CPU 44 may execute a surface estimation process shown in Fig. 45. The CPU 44 may have the function of a curvature calculation unit 190 shown in Fig. 47. When the CPU 44 has the function of the curvature calculation unit 190, the CPU 44 may execute a surface estimation process shown in Fig. 48.

[0465] The CPU 44 may have the function of an abnormality detection unit 191 shown in Fig. 50. When the CPU 44 has the function of the abnormality detection unit 191, the CPU 44 may execute the surface estimation process shown in Fig. 51. The CPU 44 may have the function of a deviation calculation unit 192 shown in Fig. 54. When the CPU 44 has the function of the deviation calculation unit 192, the CPU 44 may execute the surface estimation process shown in Fig. 55.

[0466] The CPU 44 may load a program including instructions that define the operation of the CPU 44, and execute the loaded program. In other words, the functions of the CPU 44 may be realized by software.

[0467] The endoscope device 1 may generate point cloud data based on a 2D image of a subject, and the external device interface 16 of the endoscope device 1 may transmit the 2D image and the point cloud data to the PC 41. The communication unit 43 of the PC 41 may receive the 2D image and the point cloud data from the external device interface 16. Therefore, the CPU 44 does not need to have the generation unit 181.

[0468] In the twelfth embodiment, the PC 41 can improve the accuracy of the reference surface.

[0469] (Related Technology) Inspections using industrial endoscopes involve 3D measurements. In 3D measurements, the user adjusts the composition between the measurement target captured in the field of view of the endoscope and the tip of the endoscope, and acquires an image. The user then inputs multiple desired points (coordinates) on the acquired image, and obtains the measurement results.

[0470] One method of 3D measurement is stereo measurement. In stereo measurement, stereo images are used that include a first image of an object seen from a first viewpoint and a second image of the object seen from a second viewpoint different from the first viewpoint. In stereo measurement, a matching process is performed and points in the second image that correspond to points in the first image are found.

[0471] The image where the user inputs points may contain various factors that hinder accurate measurement. These factors are collectively called matching-inhibiting factors. The area on the image that contains the matching-inhibiting factors is called a matching-inhibiting area.

[0472] If the user mistakenly inputs a point in a matching-inhibiting region, the device cannot calculate the accurate 3D coordinates of the point and cannot obtain accurate measurement results. Therefore, when the user inputs a point, it is important to inform the user of the regions where measurement can be performed and the matching-inhibiting regions where measurement cannot be performed. In that case, the device can use a method such as a method of visualizing those regions.

[0473] Specific examples of matching impediments include a phenomenon called occlusion, or an unwanted object attached to the optical system. In addition, specular reflection of illumination light irradiated on the surface of a subject may occur, causing an optical image of the reflected light to appear in the image. This phenomenon caused by specular reflection of illumination light is also an example of a matching impediment. In the following, this phenomenon is called an attention factor.

[0474] The occurrence frequency of attention factors is higher than the occurrence frequency of other matching impediment factors. Also, when only one of the two images in the stereo image is displayed and an attention factor occurs in the other image in the stereo image, it is difficult for the user to notice the attention factor in the image that is not displayed. Therefore, it is important to detect the area where the attention factor occurs and notify the user of that area.

[0475] There are two main ways that a user can input points accurately even when an attention factor occurs.

[0476] The first method is a method of applying a matching process to the entire measurable area in the stereo images. The measurable area is an area having a common field of view between the first image and the second image. For example, the first method includes a method of visualizing the reliability of a point input by a user. The reliability is obtained through a matching process applied to the entire measurable area in the stereo images. Alternatively, the first method includes a method of displaying the 3D shape of the object obtained through the matching process.

[0477] However, these methods generally require a long processing time because matching processing is required for all points in the measurable area, which results in a long waiting time from when an image is acquired until the area where the attention factor occurs is notified to the user.

[0478] The second method is to devise an algorithm so that accurate matching processing can be performed even when an attention factor occurs. In the second method, it is ideal to calculate accurate 3D coordinates corresponding to the input point. In the matching processing, the calculation is often performed by using the brightness or color information of the first image and the second image in the stereo image. When the pattern of the bright part caused by the attention factor is stronger than the pattern of the subject, it is generally difficult to avoid matching errors. Even if an algorithm exists that can perform accurate matching processing based on points on the area where the attention factor occurs, it is difficult to achieve both accuracy and processing time.

[0479] Therefore, it is necessary to detect the area where the attention factor occurs in a short processing time by using a method different from the first method and the second method. In particular, in an embedded device such as an industrial endoscope, the calculation resources are limited. Therefore, there is a high need to improve the processing time. In addition, it is desirable to be able to detect the matching inhibition area at regular time intervals in the image displayed live. This allows the device to notify the user whether the image is suitable for measurement or not at the stage of adjusting the composition.

[0480] In order to meet the above-mentioned processing time requirement, there is a method for detecting the area where the attention factor occurs in a short processing time by using a 2D image of the subject without using the calculation result of the 3D coordinates. For example, this method is disclosed in Japanese Patent No. 6253380 (reference document).

[0481] The above reference discloses a method for detecting unnecessary components contained in each image by using a first image and a second image in a stereo image. The unnecessary components do not necessarily coincide with the matching inhibition region. Specifically, the following method is disclosed as a method for detecting unnecessary components.

[0482] A plurality of images having different parallaxes are acquired. Each image in the plurality of images is set as a reference image, and a relative difference between the reference image and one or more other images is calculated. Unwanted components in each image are detected using the relative difference information.

[0483] In addition to the above method, it is also disclosed that a process of aligning two images included in a stereo image may be performed before the relative difference is calculated.

[0484] (Issues in related technologies) In the technology disclosed in the reference document, each image included in a plurality of images having different parallaxes is set as a reference image, and the difference between the reference image and one or more other images is calculated. When this method is applied to an industrial endoscope, the detection performance of the matching inhibition area may be degraded in terms of processing time and detection accuracy. These aspects will be described below.

[0485] (1) Processing time Industrial endoscopes are embedded devices and have limited computational resources. It is also desirable to be able to detect matching inhibition areas at regular time intervals in live images. Therefore, a short processing time is required.

[0486] In the method disclosed in the reference document, each of the two images included in the stereo image is set as a reference image, and the same process is repeated twice, which is redundant and requires a long processing time.

[0487] (2) Detection accuracy The technology disclosed in the reference document does not anticipate detecting an area where an attention factor caused by specular reflection of illumination light occurs. In an industrial endoscope, imaging is performed with various distances between the endoscope and the subject, so the registration process of two images disclosed in the reference document is suitable.

[0488] In industrial endoscopes, the illumination optical system and the stereo observation optical system are physically close to each other. Therefore, especially when the subject is close to the endoscope, a difference in brightness is likely to occur between the two images included in the stereo image. If a high-precision registration process that takes a long processing time is applied to the two images, the difference in brightness between the two images remains. Therefore, there is a possibility that the area with the difference in brightness between the two images will be erroneously detected as a matching inhibition area.

[0489] The attention factor does not necessarily occur in the entire region having the luminance difference. In order to detect the region in which the attention factor occurs, it is not necessary to detect the entire region having the luminance difference.

[0490] Under certain photographing conditions, there is a possibility that misalignment may occur between the two images after the registration process. In the area where this misalignment occurs, there is a difference in brightness between the two images. Therefore, there is a possibility that the area with the difference in brightness may be erroneously detected as a matching inhibition area.

[0491] The related invention has an object to provide a method capable of detecting an area where a notable factor caused by specular reflection of illumination light occurs in a short processing time with high accuracy.

[0492] (Embodiments of the Related Invention) An embodiment of the related invention will be described. An endoscope device 1 of the embodiment of the related invention has a CPU 18g shown in Fig. 59 instead of the CPU 18 shown in Fig. 8. Fig. 59 shows the functional configuration of the CPU 18g. The functions of the CPU 18g are configured by a control unit 200, a feature point processing unit 201, a division unit 202, a difference calculation unit 203, a determination unit 204, an area detection unit 205, and a display control unit 206. At least one of the blocks shown in Fig. 59 may be configured by a circuit separate from the CPU 18g.

[0493] Each unit shown in FIG. 59 may be composed of at least one of a processor and a logic circuit. Each unit shown in FIG. 59 may include one or more processors. Each unit shown in FIG. 59 may include one or more logic circuits.

[0494] The control unit 200 acquires stereo images (image data) of the subject from the video signal processing circuit 12, and controls the processing executed by each unit shown in Fig. 59. The stereo images include a first image of the subject seen from a first viewpoint, and a second image of the subject seen from a second viewpoint different from the first viewpoint.

[0495] The feature point processor 201 detects three or more feature points on the first image, and detects points on the second image corresponding to each of the feature points. The feature point processor 201 associates the feature points on the first image with points on the second image.

[0496] The division unit 202 performs Delaunay triangulation on the second image based on points on the second image associated with feature points on the first image. As a result, the division unit 202 sets one or more triangular regions on the second image. The division unit 202 sets one or more triangular regions on the first image based on the relationship between the points associated between the two images. In addition, the division unit 202 deforms a triangle in the second image to match the shape of the triangle in the first image with the shape of the triangle in the second image.

[0497] The difference calculation unit 203 calculates the difference between the pixel values ​​of the first image and the pixel values ​​of the second image for each pixel. In this way, the difference calculation unit 203 calculates the difference in luminance between the two images. The difference calculation unit 203 extracts an area including pixels whose difference exceeds a predetermined threshold from the first image. The extracted area is a candidate area where an attention factor caused by specular reflection of illumination light occurs.

[0498] The determination unit 204 determines whether or not a pair of two regions having similar characteristics exists among the extracted regions. Hereinafter, this determination is called pairing determination. If an attention factor occurs in a stereo image, the pair is characterized as existing. If the pair exists, the determination unit 204 detects the region included in the pair as the region in which the attention factor occurs.

[0499] Furthermore, the determination unit 204 detects an area in the first image that has a luminance exceeding a preset reference value of luminance. If at least a part of the area overlaps with the two areas detected in the pairing determination, the determination unit 204 detects the two areas detected in the pairing determination and the area with high luminance as areas in which an attention factor has occurred.

[0500] The display control unit 206 displays the stereo image on the display unit 5, and also displays the area in which the attention factor occurs on the stereo image.

[0501] The process of detecting an area where a factor of interest occurs will be described with reference to Fig. 60. Fig. 60 shows the procedure of this process.

[0502] The feature point processing unit 201 detects feature points on a first image, and detects points on a second image that correspond to each feature point (step S201).

[0503] Details of step S201 will be described. FIG. 61 shows an example of a stereo image. The stereo image shown in FIG. 61 includes a first image G201 and a second image G202. The feature point processing unit 201 detects feature points P201, P202, and P203 on the first image G201. The feature point processing unit 201 detects point P211 on the second image G202, and associates the point P211 with the feature point P201. The feature point processing unit 201 detects point P212 on the second image G202, and associates the point P212 with the feature point P202. The feature point processing unit 201 detects point P213 on the second image G202, and associates the point P213 with the feature point P203. In the example shown in FIG. 61, three feature points are detected. The number of feature points is not limited to three.

[0504] The feature point processor 201 detects points that are expected to have small errors in a matching process using the first image and the second image as feature points. For this purpose, the feature point processor 201 determines the appropriateness of feature points by checking the following indicators. For example, the feature point processor 201 uses uniqueness ratio, disparity continuity, image consistency, reprojection error, and the like as indicators.

[0505] The uniqueness ratio indicates the similarity between two points on the second image. Specifically, the uniqueness ratio indicates the similarity between a first point and a second point. The first point is the point that is most similar to the feature point on the first image. The second point is the point that is second most similar to the feature point. The disparity continuity indicates the relationship of disparity that is allowed in a local range. If the disparity at a feature point is almost the same as the disparity at points surrounding the feature point, there is disparity continuity. If the disparity at a feature point is significantly different from the disparity at points surrounding the feature point, there is no disparity continuity.

[0506] Image consistency indicates the relationship between two points that are related through a matching process. Specifically, two matching processes are performed. A point on the second image that corresponds to a point on the first image is detected through the first matching process. Also, a point on the first image that corresponds to the point on the second image is detected through the second matching process. Image consistency indicates the degree to which two points match. One of the two points is a point on the first image that was used in the first matching process. The other of the two points is a point on the first image that was detected through the second matching process. In the two matching processes, it is not necessary to use the entirety of one image.

[0507] The reprojection error indicates the amount of deviation between the points detected through the matching process and the epipolar line.

[0508] The feature point processing unit 201 does not need to use all of the above-mentioned indices, but determines the appropriateness of a feature point based on one or more indices.

[0509] The feature point processing unit 201 may detect feature points by detecting points having certain characteristics from the first image. Alternatively, the first image may be divided into a grid in advance, and the feature point processing unit 201 may detect intersections of two boundary lines as feature point candidates.

[0510] After step S201, the division unit 202 sets one or more triangular areas in the second image, and sets one or more triangular areas in the first image based on the point relationships between the two images (step S202).

[0511] Details of step S202 will be described. The division unit 202 sets one or more triangular regions in the second image by performing Delaunay triangulation on the second image. The vertices of each triangle are associated with the feature points on the first image detected in step S201. Fig. 62 shows an example of an image in which triangles are set. The region of the second image G203 includes two or more triangular regions.

[0512] The division unit 202 identifies three feature points on the first image that correspond to three vertices of one triangle on the second image. The division unit 202 sets a triangle having the three feature points as vertices in the first image. The division unit 202 associates the triangle on the second image with the triangle on the first image. The division unit 202 performs the above process on all triangles on the second image.

[0513] FIG. 63 shows triangles set in each of the first image and the second image. An image G204 that is a part of the first image and an image G205 that is a part of the second image are shown in FIG. 63. A triangle T201 on the image G204 and a triangle T202 on the image G205 are associated with each other. The division unit 202 deforms the shape of the triangle T202 to match the shape of the triangle T201 with the shape of the triangle T202. The division unit 202 performs this process on all triangles on the second image to generate a deformed image of the second image.

[0514] After step S202, the difference calculation unit 203 calculates the difference in luminance between the first image and the second image (step S203).

[0515] Details of step S203 will be described. The difference calculation unit 203 calculates the brightness difference by using the first image and the transformed image of the second image generated in step S202. The difference calculation unit 203 extracts an area including pixels whose difference exceeds a predetermined threshold from the first image. For example, the difference calculation unit 203 calculates the difference by subtracting the pixel value of the transformed image of the second image from the pixel value of the first image. The difference calculation unit 203 extracts an area including pixels whose positive difference is larger than a predetermined threshold from the first image. Also, the difference calculation unit 203 extracts an area including pixels whose negative difference is smaller than a predetermined threshold from the first image.

[0516] Fig. 64 and Fig. 65 show examples of the first image. The region of the first image G206 shown in Fig. 64 includes a region R201 and a region R202. The region R201 includes pixels whose positive difference is greater than a predetermined threshold. The region R202 includes pixels whose negative difference is smaller than a predetermined threshold. The region of the first image G207 shown in Fig. 65 includes a region R203 and a region R204. The region R203 includes pixels whose positive difference is greater than a predetermined threshold. The region R204 includes pixels whose negative difference is smaller than a predetermined threshold.

[0517] After step S203, the determination unit 204 executes pairing determination, thereby determining whether or not there is a pair of two regions having similar characteristics among the regions extracted in step S203 (step S204).

[0518] Details of step S204 will be described. In the example shown in Fig. 64, the determination unit 204 determines whether the features of the region R201 and the region R202 are similar to each other. In the example shown in Fig. 65, the determination unit 204 determines whether the features of the region R203 and the region R204 are similar to each other. The determination unit 204 performs pairing determination by using the following indexes.

[0519] The determination unit 204 determines whether the signs of the luminance difference between the two regions are different from each other. If the luminance difference of one region is positive and the luminance difference of the other region is negative, the determination unit 204 determines that the characteristics of the two regions are similar to each other.

[0520] The determining unit 204 determines the distance between the two regions. If the two regions are close to each other, the determining unit 204 determines that the characteristics of the two regions are similar to each other.

[0521] The determining unit 204 compares the shapes of the two regions. If the shapes of the two regions are similar to each other, the determining unit 204 determines that the characteristics of the two regions are similar to each other.

[0522] The determination unit 204 compares the orientations (angles) of the two regions. For example, the determination unit 204 approximates each region to a rectangle circumscribing each region, and compares the angles of the major and minor axes of the rectangle. If the orientations of the two regions are close to each other, the determination unit 204 determines that the features of the two regions are similar to each other.

[0523] The determination unit 204 compares the areas of the two regions. If the areas of the two regions are close to each other, the determination unit 204 determines that the characteristics of the two regions are similar to each other.

[0524] The determination unit 204 does not need to use all of the above indices. The determination unit 204 determines whether the features of the two regions are similar to each other based on one or more indices. The determination unit 204 detects the region included in the pair as the region in which the attention factor occurs.

[0525] After step S204, the determination unit 204 detects an area having a luminance exceeding a preset reference value of luminance in the first image (step S205).

[0526] Details of step S205 will be described. For example, the determination unit 204 determines for each pixel whether or not the pixel value exceeds a reference value. An example of the reference value is 250. The determination unit 204 detects an area including a pixel having a pixel value exceeding the reference value. The detected area has high luminance. The determination unit 204 determines whether or not at least a part of the area having high luminance overlaps with the two areas detected in the pairing determination. If the area having high luminance overlaps, the determination unit 204 detects the union of the area having high luminance and the two areas detected in the pairing determination as an area where the attention factor occurs. If the area having high luminance does not overlap, the determination unit 204 detects only the two areas detected in the pairing determination as an area where the attention factor occurs.

[0527] FIG. 66 shows an example of an area where a factor of interest occurs. Area R205 includes pixels having a luminance exceeding a reference value. Area R206 and area R207 are a pair detected in pairing determination. A part of area R205 overlaps with area R206, and another part of area R205 overlaps with area R207. Therefore, the determination unit 204 detects the union of area R205, area R206, and area R207 as an area where a factor of interest occurs.

[0528] After step S205, the determination unit 204 surrounds the region in which the attention factor occurs with a convex curve (a convex closed curve). The determination unit 204 finally detects the region surrounded by the convex curve as the region in which the attention factor occurs (step S206).

[0529] In the example shown in Fig. 66, the region R205, the region R206, and the region R207 are surrounded by a convex curve L201. The judgment unit 204 detects all of the regions surrounded by the convex curve L201 as regions in which a factor of interest occurs. The region surrounded by the convex curve L201 includes the region R205, the region R206, and the region R207. In addition, the region surrounded by the convex curve L201 includes regions other than the region R205, the region R206, and the region R207.

[0530] Step S206 may be executed without executing step S205. When a region having high luminance exists, the region surrounded by the convex curve includes at least a part of the region having high luminance.

[0531] After step S206, the display control unit 206 displays the stereo image on the display unit 5, and displays the area in which the attention factor occurs on the stereo image (step S207). When step S207 is executed, the process shown in FIG. 60 ends.

[0532] Specifically, the display control unit 206 generates a graphic image signal for displaying the area where the attention factor occurred. The display control unit 206 outputs the generated graphic image signal to the video signal processing circuit 12. The video signal processing circuit 12 combines the video signal output from the CCU 9 and the graphic image signal output from the CPU 18g. The video signal processing circuit 12 outputs the combined video signal to the display unit 5. The display unit 5 displays a stereo image on which the area where the attention factor occurred is superimposed. For example, a first image included in the stereo image is displayed on the display unit 5, and the area where the attention factor occurred is displayed on the first image.

[0533] The area where the attention factor occurs is displayed on the stereo image. Therefore, the user can avoid inputting points in the area where the attention factor occurs. Since the input of points in the matching-inhibiting area is avoided, the accuracy of the stereo measurement is improved.

[0534] Areas with high luminance are often not suitable for matching processing. Even if the area with high luminance does not overlap with the two areas detected in the pairing judgment, the display control unit 206 may display the area with high luminance on the stereo image to alert the user. The user can avoid inputting points in the area with high luminance.

[0535] In an embodiment of the related invention, each of the two images included in the stereo image is set as a reference image, and there is no need to execute the matching process twice. Therefore, the endoscope device 1 can detect the area where the attention factor occurs in a short processing time. In an embodiment of the related invention, a pairing determination is executed. Therefore, the endoscope device 1 can detect the area where the attention factor occurs with high accuracy.

[0536] Although the preferred embodiments of the present invention have been described above, the present invention is not limited to these embodiments and their modifications. Addition, omission, substitution, and other modifications of the configuration are possible without departing from the spirit of the present invention. Furthermore, the present invention is not limited by the above description, but is limited only by the scope of the attached claims. [Industrial Applicability]

[0537] According to each embodiment of the present invention, the surface estimation method, the surface estimation device, and the recording medium can improve the accuracy of the reference surface. [Explanation of symbols]

[0538] 1 Endoscopic device 2 Insertion section 3 Main body 4 Control section 5,45 Display section 7 plane estimation device 8 Endoscope Unit 9 CCU 10 Control device 12 Video signal processing circuit 13 ROM 14 RAM 15 Card Interface 16 External device interface 17 Control Interface 18,18a,18b,18c,18d,18e,18f,18g,44 CPU 20 Tip 28 Image sensor 41 PC 42 Memory Card 43 Communications Department 70,181,441 generation part 71,182,442 Area setting section 72,186,446 surface estimation part 180,200,440 Control section 183,206,443 Display control unit 184,444 Position calculation part 185,445 point setting section 187 Measurement Division 188 Status Judgment Unit 189,202 Division 190 Curvature calculation section 191 Abnormality detection unit 192 Deviation Calculation Unit 201 Feature point processing section 203 Difference calculation part 204 Judgment Department 205 Area detection unit 447 Communication Control Unit

Claims

1. a generating step of calculating three-dimensional coordinates of three or more points on an object based on a two-dimensional image of the object, and generating three-dimensional image data including the three-dimensional coordinates of the three or more points; a region setting step of setting a reference region which is one of a three-dimensional region and a two-dimensional region, the three-dimensional region including three or more points and being set in a three-dimensional space, the three-dimensional space including the three-dimensional coordinates included in the three-dimensional image data, the two-dimensional region including three or more points on the two-dimensional image associated with the three-dimensional coordinates calculated in the generation step and being set in the two-dimensional image, the three or more points of the reference region including one or more sets of three points forming a triangle; an estimation step of approximating a surface of the subject and estimating a reference plane different from the reference area based on three or more points of the three-dimensional image data corresponding to the three or more points included in the reference area; a measuring step of measuring a three-dimensional distance between a measurement point on the two-dimensional image or the three-dimensional image data of the subject and the reference plane; A surface estimation method having the following structure.

2. In the region setting step, the reference region, which is the three-dimensional region, is set in the three-dimensional space. The surface estimation method according to claim 1 .

3. In the region setting step, the reference region, which is the two-dimensional region, is set in the two-dimensional image. The surface estimation method according to claim 1 .

4. In the region setting step, continuity of the three or more points corresponding to the three-dimensional coordinates included in the three-dimensional image data is determined, The reference region includes only the three or more points that are determined to have the continuity. The surface estimation method according to claim 2 .

5. The reference region includes a region that is not a convex set. The surface estimation method according to claim 1 .

6. a generating step of calculating three-dimensional coordinates of three or more points on an object based on a two-dimensional image of the object, and generating three-dimensional image data including the three-dimensional coordinates of the three or more points; a region setting step of setting a reference region which is one of a three-dimensional region and a two-dimensional region, the three-dimensional region including three or more points and being set in a three-dimensional space, the three-dimensional space including the three-dimensional coordinates included in the three-dimensional image data, the two-dimensional region including three or more points and being set in the two-dimensional image, the three or more points of the reference region including one or more sets of three points forming a triangle; an estimation step of estimating a reference surface that approximates a surface of the subject based on three or more points of the three-dimensional image data corresponding to the three or more points included in the reference area; having The reference region includes two or more regions. Surface estimation method.

7. an image display step of displaying one of the image of the three-dimensional image data and the two-dimensional image on a display; a position input step of receiving position information inputted through an input device, the position information indicating a position on the image or the two-dimensional image of the three-dimensional image data displayed on the display; a state determination step of determining a state of the subject; and In the region setting step, a boundary of the reference region is determined based on the position indicated by the position information and the state. The surface estimation method according to claim 1 .

8. a generating step of calculating three-dimensional coordinates of three or more points on an object based on a two-dimensional image of the object, and generating three-dimensional image data including the three-dimensional coordinates of the three or more points; a region setting step of setting a reference region which is one of a three-dimensional region and a two-dimensional region, the three-dimensional region including three or more points and being set in a three-dimensional space, the three-dimensional space including the three-dimensional coordinates included in the three-dimensional image data, the two-dimensional region including three or more points and being set in the two-dimensional image, the three or more points of the reference region including one or more sets of three points forming a triangle; an estimation step of estimating a reference surface that approximates a surface of the subject based on three or more points of the three-dimensional image data corresponding to the three or more points included in the reference area; having the reference region includes a region that is not a convex set; The boundary of the reference area includes a first boundary and a second boundary located inside the first boundary. Surface estimation method.

9. In the region setting step, the three or more points corresponding to the three-dimensional coordinates included in the three-dimensional image data are divided into two or more regions; The boundary of the reference region includes the boundary of one or more regions included in the two or more regions. The surface estimation method according to claim 6.

10. Area information indicating at least one of a size of the reference area and a position of the reference area is recorded in advance on a recording medium; In the region setting step, at least one of the size of the reference region and the position of the reference region is set based on the region information. The surface estimation method according to claim 6.

11. The method further includes an image display step of displaying one of the image of the three-dimensional image data and the two-dimensional image on a display; In the region setting step, three or more points on the image of the three-dimensional image data or the two-dimensional image are inputted through an input device, In the region setting step, the reference region including the three or more input points is set. The surface estimation method according to claim 6.

12. In the area setting step, the reference area is set based on a line segment connecting the three or more input points. The surface estimation method according to claim 11.

13. The method further includes an image display step of displaying one of the image of the three-dimensional image data and the two-dimensional image on a display; In the region setting step, three or more points on a line designated by a user in the image of the three-dimensional image data or the two-dimensional image are inputted through an input device, In the region setting step, the reference region including the three or more points on the line is set. The surface estimation method according to claim 6.

14. In the estimation step, the three or more points are selected from four or more points included in the reference region, In the estimation step, the reference plane is estimated based on three or more points of the three-dimensional image data corresponding to the three or more selected points. The surface estimation method according to claim 6.

15. The method further includes an image display step of displaying one of the image of the three-dimensional image data and the two-dimensional image on a display, and displaying the reference region on the image of the three-dimensional image data or the two-dimensional image. The surface estimation method according to claim 6.

16. The method further includes an image display step of displaying an image of the three-dimensional image data on a display, and displaying the three or more points of the three-dimensional image data used for estimating the reference plane on the image of the three-dimensional image data. The surface estimation method according to claim 6.

17. The method further includes an image display step of displaying the two-dimensional image on a display and displaying three or more points on the two-dimensional image corresponding to the three or more points of the three-dimensional image data used for estimating the reference plane. The surface estimation method according to claim 6.

18. A dividing step of dividing three or more points corresponding to the three-dimensional coordinates included in the three-dimensional image data into two or more regions; an image display step of displaying one of the image of the three-dimensional image data and the two-dimensional image on a display, and displaying images of the two or more regions on the display; Further having The surface estimation method according to claim 6.

19. a map generating step of generating a curvature map indicating a distribution of curvature in the three-dimensional shape of the object represented by the three-dimensional image data; an image display step of displaying one of the image of the three-dimensional image data and the two-dimensional image on a display, and displaying an image of the curvature map on the display; Further having The surface estimation method according to claim 6.

20. The method further includes an image display step of displaying one of the image of the three-dimensional image data and the two-dimensional image on a display, and displaying an area corresponding to the reference plane on the image of the three-dimensional image data or the two-dimensional image. The surface estimation method according to claim 6.

21. an anomaly detection step of detecting an abnormal area on the surface of the subject based on one of the three-dimensional image data and the two-dimensional image; In the region setting step, the reference region is set excluding a region corresponding to the abnormal region. The surface estimation method according to claim 6.

22. The method further includes a measurement step of measuring a size of the subject based on the reference plane. The surface estimation method according to claim 6.

23. In the measuring step, a three-dimensional distance between the reference plane and a point on the surface of the object is measured.

23. The surface estimation method of claim 22.

24. In the estimation step, geometric characteristics of the reference surface are further estimated. The surface estimation method according to claim 6.

25. a reading step of reading, from a recording medium, three-dimensional image data including three-dimensional coordinates of three or more points on an object calculated based on a two-dimensional image of the object; a region setting step of setting a reference region which is one of a three-dimensional region and a two-dimensional region, the three-dimensional region including three or more points and being set in a three-dimensional space, the three-dimensional space including the three-dimensional coordinates included in the three-dimensional image data, the two-dimensional region including three or more points on the two-dimensional image associated with the three-dimensional coordinates included in the three-dimensional image data and being set on the two-dimensional image, the three or more points of the reference region including one or more sets of three points forming a triangle; an estimation step of approximating a surface of the subject and estimating a reference plane different from the reference area based on three or more points of the three-dimensional image data corresponding to the three or more points included in the reference area; a measuring step of measuring a three-dimensional distance between a measurement point on the two-dimensional image or the three-dimensional image data of the subject and the reference plane; A surface estimation method having the following structure.

26. a generating unit that calculates three-dimensional coordinates of three or more points on an object based on a two-dimensional image of the object, and generates three-dimensional image data including the three-dimensional coordinates of the three or more points; a region setting unit that sets a reference region which is one of a three-dimensional region and a two-dimensional region, the three-dimensional region including three or more points and being set in a three-dimensional space, the three-dimensional space including the three-dimensional coordinates included in the three-dimensional image data, the two-dimensional region including three or more points on the two-dimensional image associated with the three-dimensional coordinates calculated by the generation unit and being set on the two-dimensional image, the three or more points of the reference region including one or more sets of three points forming a triangle; an estimation unit that approximates a surface of the subject and estimates a reference plane different from the reference area based on three or more points of the three-dimensional image data corresponding to the three or more points included in the reference area; a measurement unit that measures a three-dimensional distance between a measurement point on the two-dimensional image or the three-dimensional image data of the subject and the reference plane; A surface estimation device having the following structure.

27. a generating step of calculating three-dimensional coordinates of three or more points on an object based on a two-dimensional image of the object, and generating three-dimensional image data including the three-dimensional coordinates of the three or more points; a region setting step of setting a reference region which is one of a three-dimensional region and a two-dimensional region, the three-dimensional region including three or more points and being set in a three-dimensional space, the three-dimensional space including the three-dimensional coordinates included in the three-dimensional image data, the two-dimensional region including three or more points on the two-dimensional image associated with the three-dimensional coordinates calculated in the generation step and being set in the two-dimensional image, the three or more points of the reference region including one or more sets of three points forming a triangle; an estimation step of approximating a surface of the subject and estimating a reference plane different from the reference area based on three or more points of the three-dimensional image data corresponding to the three or more points included in the reference area; a measuring step of measuring a three-dimensional distance between a measurement point on the two-dimensional image or the three-dimensional image data of the subject and the reference plane; A computer-readable recording medium having a program recorded thereon for causing a computer to execute the above.

Citation Information

Patent Citations

  • Apparatus and method for processing image and program

    JP2011039918A

  • Method and device for automatically identifying point of interest on viewed object

    JP2017162452A

  • Methods and apparatus for measuring features on or near objects

    JP2018533722A

  • Information processing apparatus, information processing system and information processing method

    JP2019121136A

  • Image measurement device

    WO2014084181A1