WO2021181448A1 - 面推定方法、面推定装置、および記録媒体 - Google Patents

面推定方法、面推定装置、および記録媒体 Download PDF

Info

Publication number
WO2021181448A1
WO2021181448A1 PCT/JP2020/009973 JP2020009973W WO2021181448A1 WO 2021181448 A1 WO2021181448 A1 WO 2021181448A1 JP 2020009973 W JP2020009973 W JP 2020009973W WO 2021181448 A1 WO2021181448 A1 WO 2021181448A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
points
dimensional
region
area
Prior art date
Application number
PCT/JP2020/009973
Other languages
English (en)
French (fr)
Inventor
山本 直樹
Original Assignee
オリンパス株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by オリンパス株式会社 filed Critical オリンパス株式会社
Priority to JP2022506992A priority Critical patent/JPWO2021181448A1/ja
Priority to PCT/JP2020/009973 priority patent/WO2021181448A1/ja
Publication of WO2021181448A1 publication Critical patent/WO2021181448A1/ja
Priority to US17/939,041 priority patent/US20230003991A1/en

Links

Images

Classifications

    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B23/00Telescopes, e.g. binoculars; Periscopes; Instruments for viewing the inside of hollow bodies; Viewfinders; Optical aiming or sighting devices
    • G02B23/24Instruments or systems for viewing the inside of hollow bodies, e.g. fibrescopes
    • G02B23/2407Optical details
    • G02B23/2415Stereoscopic endoscopes
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • G01B11/026Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness by measuring distance between sensor and object
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • G01B11/03Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness by measuring coordinates of points
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/593Depth or shape recovery from multiple images from stereo images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10068Endoscopic image

Definitions

  • the present invention relates to a surface estimation method, a surface estimation device, and a recording medium.
  • Industrial endoscope equipment is used for observing and inspecting internal scratches and corrosion of boilers, pipes, aircraft engines, etc.
  • the endoscope device provides a plurality of types of optical adapters for observing and inspecting various observation objects.
  • the optical adapter is attached to the tip of the endoscope and is replaceable.
  • the endoscope device is equipped with a function of measuring the geometrical size of the subject based on the information of points specified on the image by the user.
  • a reference plane is estimated based on three or more points designated by the user, and a three-dimensional distance between the measurement point designated by the user and the reference plane is measured.
  • the reference plane approximates the surface of the subject.
  • Patent Document 1 uses a flat surface or a curved surface as a reference surface, and performs surface reference measurement.
  • 67 and 68 show an example in which three or more points for estimating the reference plane in Patent Document 1 are set in the image G301 of the subject.
  • the points P301, P302, P303, and P304 are set in the image G301. Each of the four points is located at the apex of the square.
  • two or more points P311 on line L311 and two or more points P312 on line L312 are set in image G301.
  • Patent Document 1 If the surface of the subject is a curved surface, the device disclosed in Patent Document 1 may not be able to correctly estimate the reference plane. 69 and 70 show an example where an erroneous reference plane is estimated.
  • points P321, P322, and P323 are set on the surface of the sphere SP301.
  • each of the three points is arranged at the apex of the triangle. If the heights of the three points in the Z direction are the same, the three points are on a plane. Therefore, the plane is erroneously estimated as the reference plane.
  • line L331 and line L332 are set on the surface of the cylinder CY301, and two or more points P331 on line L331 and two or more points P332 on line L332 are set.
  • 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.
  • An object of the present invention is to provide a surface estimation method, a surface estimation device, and a recording medium capable of improving the accuracy of a reference surface.
  • the surface estimation method includes a generation step, a region setting step, and an estimation step.
  • the generation step the three-dimensional coordinates of three or more points on the subject are calculated based on the two-dimensional image of the subject, and the three-dimensional image data including the three-dimensional coordinates of the three or more points is generated. Will be done.
  • the area setting step a reference area that is one of a three-dimensional area and a two-dimensional area 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 in the reference region include one or more sets composed of three points forming a triangle.
  • a reference plane that approximates the surface of the subject is estimated based on the three or more points of the three-dimensional image data corresponding to the three or more points included in the reference region.
  • the reference region which is the three-dimensional region, may be set in the three-dimensional space in the region setting step.
  • the reference region which is the two-dimensional region, may be set in the two-dimensional image in the region setting step.
  • the continuity of the three or more points corresponding to the three-dimensional coordinates included in the three-dimensional image data is determined. You may.
  • the reference region may include only the three or more points determined to have the continuity.
  • the reference region may include a region that is not a convex set.
  • the reference region may include two or more regions.
  • the surface estimation method may further include an image display step, a position input step, and a state determination step.
  • the image display step one of the image of the three-dimensional image data and the two-dimensional image may be displayed on the display.
  • the position input step the position information input through the input device may be received.
  • the position information may indicate the position of the three-dimensional image data displayed on the display on the image or the two-dimensional image.
  • the state determination step the state of the subject may be determined.
  • the boundary of the reference area may be determined based on the position indicated by the position information and the state.
  • the boundary of the reference region may include a first boundary and a second boundary inside the first boundary.
  • the area in which the three or more points corresponding to the three-dimensional coordinates included in the three-dimensional image data are two or more areas. It may be divided into.
  • the boundary of the reference region may include the boundary of one or more regions included in the two or more regions.
  • area information indicating at least one of the size of the reference area and the position of the reference area may be pre-recorded on the recording medium.
  • 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.
  • the surface estimation 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 the display. May be good.
  • the image of the three-dimensional image data or three or more points on the two-dimensional image may be input through an input device.
  • the reference area including the three or more input points may be set.
  • the reference area may be set based on the input line segment connecting the three or more points in the area setting step.
  • the surface estimation 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 the display. May be good.
  • the area setting step three or more points on the image of the three-dimensional image data or a line specified in the two-dimensional image may be input through the input device.
  • the reference area including the three or more points on the line may be set.
  • the three or more points may be selected from the four or more points included in the reference region in the estimation step.
  • the reference plane may be 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 displays an image of the three-dimensional image data and one of the two-dimensional images on a display, and displays the reference region as the reference region. It may further have an image display step of displaying the image of the three-dimensional image data or the two-dimensional image.
  • the surface estimation method displays the image of the three-dimensional image data on the display and the three-dimensional image used for estimating the reference surface. It may further have an image display step of displaying the three or more points of the data on the image of the three-dimensional image data.
  • the surface estimation method displays the two-dimensional image on a display and said the three-dimensional image data used for estimating the reference surface. It may further have an image display step of displaying three or more points corresponding to the three or more points on the two-dimensional image.
  • the surface estimation method may further include a division step and an image display step.
  • 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.
  • the image display step one of the image of the three-dimensional image data and the two-dimensional image may be displayed on the display, and the images of the two or more regions may be displayed on the display.
  • the surface estimation method may further include a map generation step and an image display step.
  • a curvature map showing the distribution of curvature in the three-dimensional shape of the subject indicated by the three-dimensional image data may be generated.
  • the image display step one of the three-dimensional image data image and the two-dimensional image may be displayed on the display, and the image of the curvature map may be displayed on the display.
  • the surface estimation method displays an image of the three-dimensional image data and one of the two-dimensional images on a display and corresponds to the reference surface. It may further have an image display step of displaying the region on the image of the 3D image data or the 2D image.
  • the surface estimation method obtains an abnormal region on the surface of the subject based on one of the image of the three-dimensional image data and the two-dimensional image. It may further have an anomaly detection step to detect.
  • the area setting step the reference area excluding the area corresponding to the abnormal area may be set.
  • the surface estimation method may further include a measurement step of measuring the size of the subject based on the reference surface.
  • the three-dimensional distance between the reference plane and the point on the surface of the subject may be measured in the measurement step.
  • the geometric feature of the reference plane may be further estimated in the estimation step.
  • the surface estimation method includes a read-out step, an area setting step, and an estimation step.
  • the reading step three-dimensional image data including the three-dimensional coordinates of three or more points on the subject calculated based on the two-dimensional image of the subject is read from the recording medium.
  • the area setting step a reference area that is one of a three-dimensional area and a two-dimensional area 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 in the reference region include one or more sets composed of three points forming a triangle.
  • a reference plane that approximates the surface of the subject is estimated based on the three or more points of the three-dimensional image data corresponding to the three or more points included in the reference region.
  • the surface estimation device has a generation unit, a region setting unit, and an estimation unit.
  • the generation unit calculates the three-dimensional coordinates of three or more points on the subject based on the two-dimensional image of the subject, and generates three-dimensional image data including the three-dimensional coordinates of the three or more points. do.
  • the area setting unit sets a reference area which is one of a three-dimensional area and a two-dimensional area.
  • 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 in the reference region include one or more sets composed of three points forming a triangle.
  • the estimation unit estimates a reference plane that 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 region.
  • a computer-readable recording medium in which a program for causing a computer to execute a generation step, an area setting step, and an estimation step is recorded is provided.
  • the generation step the three-dimensional coordinates of three or more points on the subject are calculated based on the two-dimensional image of the subject, and the three-dimensional image data including the three-dimensional coordinates of the three or more points is generated. Will be done.
  • the area setting step a reference area that is one of a three-dimensional area and a two-dimensional area 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 in the reference region include one or more sets composed of three points forming a triangle.
  • a reference plane that approximates the surface of the subject is estimated based on the three or more points of the three-dimensional image data corresponding to the three or more points included in the reference region.
  • the surface estimation method, the surface estimation device, and the recording medium can improve the accuracy of the reference surface.
  • FIG. 1 It is a figure which shows the example of the reference region in 5th Embodiment of this invention. It is a block diagram which shows the functional structure of the CPU which the endoscope apparatus has by 6th Embodiment of this invention. It is a flowchart which shows the procedure of the surface estimation processing in 6th Embodiment of this invention. It is a figure which shows the example of the image which is displayed on the display part in 6th Embodiment of this invention. It is a figure which shows two or more regions on the 3D image of the point cloud data in the 6th Embodiment of this invention. It is a figure which shows the example of the image which is displayed on the display part in 6th Embodiment of this invention.
  • FIG. 1 shows the configuration of the surface estimation device 7 according to the first embodiment of the present invention.
  • the surface estimation device 7 shown in FIG. 1 has a generation unit 70, an area setting unit 71, and a surface estimation unit 72.
  • the generation unit 70 calculates the three-dimensional coordinates of three or more points on the subject based on the two-dimensional image of the subject, and the point group data (three-dimensional image data) including the three-dimensional coordinates of the three or more points. ) Is generated (generation step).
  • the area setting unit 71 sets a reference area which is one of a three-dimensional area and a two-dimensional area (area setting step).
  • the three-dimensional area contains three or more points and is set in a three-dimensional space.
  • the three-dimensional space includes the three-dimensional coordinates included in the point cloud data.
  • the two-dimensional area includes three or more points and is set in a two-dimensional image of the subject.
  • the three or more points in the reference region include one or more pairs of three points forming a triangle.
  • the surface estimation unit 72 estimates a reference surface that approximates the surface of the subject based on three or more points in the point cloud data corresponding to the three or more points included in the reference region (estimation step).
  • Each part shown in FIG. 1 may be composed of at least one of a processor and a logic circuit.
  • the processor is at least one of a CPU (Central Processing Unit), a DSP (Digital Signal Processor), and a GPU (Graphics Processing Unit).
  • the logic circuit is at least one of an ASIC (Application Specific Integrated Circuit) and an FPGA (Field-Programmable Gate Array).
  • Each part shown in FIG. 1 can include one or more processors.
  • Each part shown in FIG. 1 may include one or more logic circuits.
  • the computer of the surface estimation device 7 may read the program and execute the read program.
  • the program includes instructions that define the operations of the generation unit 70, the area setting unit 71, and the surface estimation unit 72. That is, the functions of the generation unit 70, the area setting unit 71, and the surface estimation unit 72 may be realized by software.
  • the above program may be recorded on a computer-readable recording medium.
  • the program may be transmitted from the computer holding the program to the surface estimation device 7 via the transmission medium or by the transmission wave in the transmission medium.
  • a "transmission medium" for transmitting a program is a medium having a function of transmitting information.
  • the medium having a function of transmitting information includes a network (communication network) such as the Internet and a communication line (communication line) such as a telephone line.
  • the above-mentioned program may realize a part of the above-mentioned function.
  • the above-mentioned program may be a difference file (difference program). The combination of the program already recorded in the computer and the difference program may realize the above-mentioned function.
  • FIG. 2 shows the procedure of the surface estimation process.
  • the generation unit 70 calculates the three-dimensional coordinates (3D coordinates) of three or more points on the subject based on the two-dimensional image (2D image) of the subject, and points including the 3D coordinates of the three or more points.
  • Group data is generated (step S1). Step S1 corresponds to the generation step.
  • one 2D image includes an image of the subject viewed from the first viewpoint and an image of the subject viewed from a second viewpoint different from the first viewpoint.
  • the generation unit 70 calculates the 3D coordinates corresponding to each pixel of the 2D image.
  • the generation unit 70 generates point cloud data including 3D coordinates of three or more points on the subject.
  • the 3D coordinates of each of the three or more points are associated with the points on the 2D image.
  • the 3D coordinates in the point cloud data are associated with the pixels on the 2D image.
  • the point cloud data includes 3D coordinates and pixel position information on a 2D image.
  • the generation unit 70 may calculate the 3D coordinates of three or more points on the subject by using two or more images and by applying SfM (Structure from Motion).
  • the generation unit 70 uses two or more 2D images of a subject on which two or more fringe patterns having different spatial phases are projected, and by applying the phase shift method, 3 on the subject. You may calculate the 3D coordinates of one or more points. Even if the generation unit 70 calculates the 3D coordinates of three or more points on the subject by using one 2D image of the subject irradiated with the pattern light in which the bright part and the dark part are randomly arranged. good.
  • the method for generating point cloud data is not limited to the above method.
  • the generation unit 70 may generate a three-dimensional image (3D image) for displaying the point cloud data on the display.
  • the 3D image is an image of a three-dimensional shape (3D shape) indicated by the point cloud data.
  • the 3D image includes color data of each pixel.
  • Each pixel of the 3D image is associated with 3D coordinates.
  • the generation unit 70 may generate a 3D image corresponding to each of two or more viewpoints different from each other.
  • step S2 the area setting unit 71 sets a reference area that is one of a three-dimensional area and a two-dimensional area (step S2).
  • step S2 corresponds to the area setting step.
  • FIG. 3 shows an example of a 3D image of point cloud data.
  • the generation unit 70 converts the point cloud data into mesh data and adds a texture to the mesh data.
  • the generation unit 70 generates the 3D image G1 by executing this process.
  • the generation unit 70 may generate a 3D image without converting the point cloud data into mesh data.
  • the point cloud data PD1 to which the texture is added is shown.
  • the area setting unit 71 sets the three-dimensional reference area 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.
  • the generation unit 70 sets at least one of the position of the reference region R1 and the size of the reference region R1 based on the information input through the input device. Alternatively, the generation unit 70 automatically sets at least one of the position of the reference region R1 and the size of the reference region R1.
  • the 3D image G1 is used to illustrate the reference region R1. It is not necessary for the generation unit 70 to generate the 3D image G1.
  • FIG. 4 schematically shows point cloud data in a three-dimensional space (3D space).
  • the 3D coordinates of the point cloud data are defined in the 3D space SP1 and include the X, Y, and Z coordinates.
  • Two or more point CP1s in the point cloud data are shown in FIG.
  • the area setting unit 71 sets the three-dimensional reference area R2 in the 3D space SP1.
  • the reference region R2 includes three or more points CP1 in the point cloud data. Three or more points CP1 in the reference region R2 spread three-dimensionally.
  • the three or more points CP1 in the reference region R2 include one or more sets composed of three points forming a triangle.
  • the points CP1a, CP1b, and points CP1c in the reference region R2 form a triangle T1.
  • FIG. 4 a virtual straight line L1 and a virtual straight line L2 are shown. Each of the virtual straight line L1 and the virtual straight line L2 passes through only a part of three or more points CP1 in the reference region R2. Any virtual straight line passing through the reference region R2 passes only a part of three or more points CP1 in the reference region R2.
  • FIG. 5 shows an example of a 2D image of the subject.
  • the area setting unit 71 sets the two-dimensional reference area R3 in the 2D image G2 of the subject.
  • the reference region R3 is 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.
  • the generation unit 70 sets at least one of the position of the reference region R3 and the size of the reference region R3 based on the information input through the input device. Alternatively, the generation unit 70 automatically sets at least one of the position of the reference region R3 and the size of the reference region R3.
  • 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 the points in the point cloud data. Therefore, each of the three or more points in the reference region R3 is associated with the 3D coordinates of the points in the point cloud data.
  • Three or more points in the reference region R3 extend two-dimensionally. Therefore, the three or more points of the point cloud data corresponding to the three or more points in the reference region R3 spread three-dimensionally.
  • Step S2 the surface estimation unit 72 estimates a reference surface that approximates the surface of the subject based on the three or more points of the point cloud data corresponding to the three or more points included in the reference region (step). S3).
  • Step S3 corresponds to the estimation step.
  • step S3 is executed, the surface estimation process ends.
  • the reference area When the reference area is a three-dimensional area, the reference area includes three or more points in the point cloud data.
  • the surface estimation unit 72 acquires the 3D coordinates of each of the three or more points from the point cloud data.
  • the surface estimation unit 72 estimates the reference surface based on the 3D coordinates of three or more points in the reference region.
  • the reference area When the reference area is a two-dimensional area, the reference area includes three or more points on the 2D image of the subject. The points on the 2D image of the subject are associated with the 3D coordinates of the points in the point cloud data.
  • the surface estimation unit 72 acquires 3D coordinates associated with each of the three or more points in the reference region from the point cloud data. The surface estimation unit 72 estimates the reference surface based on the 3D coordinates of the three or more points in the point cloud data corresponding to the three or more points in the reference region.
  • the surface estimation unit 72 estimates a reference surface that is a plane by using the 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 plane may be a spherical surface, a cylindrical surface, a quadric surface, or the like.
  • the reference region includes three or more points.
  • the surface estimation unit 72 estimates a sphere the reference region includes four or more points.
  • 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 example.
  • the surface estimation device 7 has a reading unit that reads out point group data including the three-dimensional coordinates of three or more points on the subject calculated based on the two-dimensional image of the subject from the recording medium. You may.
  • the reading unit may read the point cloud data from the recording medium without executing step S1 shown in FIG. 2 (reading step).
  • the processing unit having the same function as the generation unit 70 generates the point cloud data and records the point cloud data on the recording medium.
  • An apparatus different from the surface estimation apparatus 7 may have a processing unit.
  • the surface estimation device 7 sets a three-dimensional or two-dimensional reference region.
  • the reference region includes three or more points extending in a three-dimensional or two-dimensional manner. Therefore, the possibility that three or more points of the point cloud data used for estimating the reference plane are biased on a plane or a straight line is reduced. Therefore, the surface estimation device 7 can improve the accuracy of the reference surface.
  • the surface estimation device is an endoscope device.
  • the surface estimation device need only be a device having a surface estimation function, and is not limited to the endoscopic device.
  • the surface estimation device may be an embedded device mounted on a specific device or system.
  • the surface estimation device may be an environment on the cloud.
  • the subject is an industrial product.
  • FIG. 6 shows the 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 takes an image of a subject and generates an image.
  • the inspector shall replace the optical adapter attached to the tip of the insertion unit 2, select the built-in video processing program, and add the video processing program in order to observe various subjects. Is possible.
  • the endoscope device 1 shown in FIG. 6 has an insertion unit 2, a main body unit 3, an operation unit 4, and a display unit 5.
  • the insertion unit 2 is inserted inside the subject.
  • the insertion portion 2 is an elongated tubular shape that can be bent from the tip end 20 to the base end portion.
  • the insertion unit 2 images the subject and outputs the image pickup signal to the main body unit 3.
  • An optical adapter is attached to the tip 20 of the insertion portion 2.
  • a monocular optical adapter is attached to the tip 20 of the insertion portion 2.
  • the main body 3 is a control device including a storage portion for accommodating the insertion portion 2.
  • the operation unit 4 receives the user's operation on the endoscope device 1.
  • the display unit 5 has a display screen, and displays the image of the subject, the operation menu, and the like acquired by the insertion unit 2 on the display screen.
  • the operation unit 4 is a user interface (input device).
  • 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 (for example, a finger) or a tool.
  • the main body 3 shown in FIG. 7 includes 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 (not shown).
  • the light source device supplies the illumination light necessary for observation.
  • the bending device bends the bending mechanism built in the insertion portion 2.
  • An image sensor 28 is built in the tip 20 of the insertion portion 2.
  • the image sensor 28 is an image sensor.
  • the image pickup element 28 photoelectrically converts the optical image of the subject formed by the optical adapter and generates an image pickup signal.
  • the CCU 9 drives the image sensor 28.
  • the image pickup signal output from the image sensor 28 is input to the CCU 9.
  • the CCU 9 performs preprocessing including amplification and noise removal on the image pickup signal acquired by the image pickup device 28.
  • the CCU 9 converts the preprocessed imaging signal into a video signal such as an NTSC signal.
  • 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. ..
  • ROM Read Only Memory
  • RAM Random Access Memory
  • CPU Central Processing Unit
  • the video signal processing circuit 12 performs predetermined video processing on the video signal output from the CCU 9.
  • the video signal processing circuit 12 executes video processing related to improving visibility.
  • the image processing includes color reproduction, gradation correction, noise suppression, and contour enhancement.
  • the video signal processing circuit 12 synthesizes the video signal output from the CCU 9 and the graphic image signal generated by the CPU 18.
  • the graphic image signal includes an image of the operation screen, measurement information, and the like.
  • the measurement information includes a 3D image of point cloud data, a measurement result, and the like.
  • the video signal processing circuit 12 outputs the synthesized video signal to the display unit 5. Further, the video signal processing circuit 12 outputs image data based on the video signal output from the CCU 9 to the CPU 18.
  • the ROM 13 is a non-volatile recording medium in which a program for the CPU 18 to control the operation of the endoscope device 1 is recorded.
  • the RAM 14 is a volatile recording medium that temporarily stores information used by the CPU 18 for controlling the endoscope device 1.
  • the CPU 18 controls the operation of the endoscope device 1 based on the program recorded in the ROM 13.
  • a memory card 42 which is a removable recording medium, is connected to the card interface 15.
  • the card interface 15 takes in the control processing information, the image information, and the like stored in the memory card 42 into the control device 10. Further, the card interface 15 records the control processing information, the image information, and the like generated by the endoscope device 1 on the memory card 42.
  • An external device such as a USB device is connected to the external device interface 16.
  • 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 the information from the PC 41.
  • the monitor of the PC 41 can display the information.
  • the user can perform an operation related to the control of the endoscope device 1 by inputting an instruction to the PC 41.
  • the control interface 17 executes communication for operation control with the operation unit 4, the endoscope unit 8, and the CCU 9.
  • the control interface 17 notifies the CPU 18 of an instruction input to the operation unit 4 by the user.
  • 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 pickup element 28 to the CCU 9.
  • the program executed by the CPU 18 may be recorded on a computer-readable recording medium.
  • a computer other than the endoscope device 1 may read and execute the program recorded on the recording medium.
  • 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 a program.
  • the PC 41 may acquire a video signal from the endoscope device 1 and process the acquired video signal.
  • the endoscope device 1 has an image sensor 28 and a CPU 18.
  • the image sensor 28 images the subject and generates an image pickup signal.
  • the image pickup signal includes an image of the subject. Therefore, the image sensor 28 acquires an image of the subject generated by imaging the subject.
  • the image acquired by the image pickup element 28 is input to the CPU 18 via the video signal processing circuit 12.
  • the image pickup 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.
  • the image acquisition unit is a communication interface (communication device) that executes communication with the endoscope device 1.
  • the image acquisition unit may be a wireless communication device.
  • the image acquisition unit may be a readout circuit that reads an image from a recording medium on which the image is recorded.
  • FIG. 8 shows the functional configuration of the CPU 18.
  • the functions of the CPU 18 are configured by the control unit 180, the generation unit 181, the area setting unit 182, the display control unit 183, the position calculation unit 184, the point setting unit 185, and the surface estimation unit 186.
  • At least one of the blocks shown in FIG. 8 may be configured by a circuit different from that of the CPU 18.
  • Each part shown in FIG. 8 may be composed of at least one of a processor and a logic circuit. Each part shown in FIG. 8 may include one or more processors. Each part shown in FIG. 8 may include one or more logic circuits.
  • 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.
  • the generation unit 181 has the same function as the function of the generation unit 70 shown in FIG.
  • the generation unit 181 calculates the 3D coordinates of three or more points on the subject based on the 2D image of the subject, and generates point group data including the 3D coordinates of the three or more points (generation step).
  • the generation unit 181 can generate the point cloud data by the same method as that described in the first embodiment.
  • the generation unit 181 generates a 3D image for displaying the point cloud data on the display unit 5.
  • the area setting unit 182 has the same function as the area setting unit 71 shown in FIG.
  • the area setting unit 182 sets a reference area which is one of a three-dimensional area and a two-dimensional area (area setting step).
  • the area setting unit 182 can set the reference area by the same method as that described in the first embodiment.
  • the display control unit 183 displays the 2D image of the subject acquired by the image sensor 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 outputs the video signal processed by the video signal processing circuit 12 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 a 2D image of the subject based on the video signal output from the video signal processing circuit 12.
  • 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 a 3D image of the point cloud data based on the 3D video signal output from the video signal processing circuit 12.
  • the display control unit 183 generates a graphic image signal for displaying a 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 synthesizes 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 synthesized video signal to the display unit 5.
  • the display unit 5 displays a 2D image of the subject and a 3D image of the point cloud data.
  • the display control unit 183 displays various information on the display unit 5. That is, the display control unit 183 displays various information on the image. 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 the image.
  • the display control unit 183 generates graphic image signals 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 synthesizes the video signal output from the CCU 9 and the graphic image signal output from the CPU 18. As a result, various information is superimposed on the image.
  • the video signal processing circuit 12 outputs the synthesized video signal to the display unit 5.
  • the display unit 5 displays an image on which various information is superimposed.
  • the user By operating the operation unit 4, the user inputs position information indicating a position on the image to the operation unit 4.
  • the operation unit 4 outputs the position information input to the operation unit 4 by the user.
  • the position information input to the operation unit 4 is input to the control interface 17 which is an input unit.
  • the position information is output from the control interface 17 to the CPU 18.
  • the position calculation unit 184 calculates the position on the image based on the position information input to the operation unit 4.
  • the position information indicates the position where the cursor is displayed.
  • the display control unit 183 displays the cursor at the position calculated by the position calculation unit 184.
  • the operation unit 4 When the display unit 5 and the operation unit 4 are touch panels, the user may input the position on the image into the operation unit 4 by touching the screen of the display unit 5. In that case, the operation unit 4 outputs position information indicating the position.
  • the point setting unit 185 receives points on the subject through the operation unit 4. For example, the user moves the cursor to a desired position on the image and performs a predetermined operation. At this time, the point setting unit 185 receives the points corresponding to the positions.
  • the display unit 5 and the operation unit 4 are touch panels, the user inputs a point on the image to the operation unit 4 by touching the screen of the display unit 5.
  • the point setting unit 185 accepts the point.
  • the point setting unit 185 generates point information indicating the accepted point.
  • 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.
  • the point information includes the 3D coordinates of the point.
  • the point setting unit 185 accepts a reference point.
  • the reference point indicates a reference position for setting the reference area.
  • the point setting unit 185 When the point setting unit 185 accepts a point on the 2D image of the subject, the point setting unit 185 sets the accepted point in the 2D image. When the point setting unit 185 accepts a point on the 3D image of the point cloud data, the point setting unit 185 sets the accepted point in the 3D image.
  • the position information of the points set by the point setting unit 185 is held in the RAM 14. A point is set by associating it with a particular image.
  • the surface estimation unit 186 estimates a reference surface that approximates the surface of the subject based on three or more points in the point cloud data corresponding to the three or more points included in the reference area (estimation step).
  • the surface estimation unit 186 can estimate the reference surface by the same method as that described in the first embodiment.
  • FIG. 9 shows the procedure of the surface estimation process.
  • the generation unit 181 calculates the 3D coordinates of three or more points on the subject based on the 2D image of the subject, and generates point group data including the 3D coordinates of the three or more points. In addition, the generation unit 181 generates a 3D image of the point cloud data (step S101). Step S101 corresponds to the generation step.
  • 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.
  • FIG. 10 shows an example of an image displayed on the display unit 5 in step S102.
  • the 2D image G11 of the subject and the 3D image G12 of the point group data are displayed on the display unit 5.
  • 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.
  • 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.
  • the 2D image G11 and the 3D image G12 may be arranged in the vertical direction of the screen of the display unit 5.
  • 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.
  • the 2D image of the subject is a stereo image
  • the 2D image is a first image of the subject viewed from the first viewpoint and a second image of the subject viewed 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.
  • the display control unit 183 may display only one of the first image and the second image on the display unit 5.
  • the point setting unit 185 accepts two reference points on the 2D image of the subject through the operation unit 4 and generates point information indicating each of the two accepted reference points (step S103). ..
  • FIG. 11 shows an example of an image displayed on the display unit 5 in step S103.
  • the same 2D image G11 as the 2D image G11 shown in FIG. 10 and the same 3D image G12 as the 3D image G12 shown in FIG. 10 are displayed on the display unit 5.
  • the user moves the cursor to a desired position on the 2D image G11 and executes a predetermined operation.
  • the point setting unit 185 receives the points corresponding to the positions.
  • the display unit 5 and the operation unit 4 are touch panels, the user touches the screen of the display unit 5.
  • the point setting unit 185 receives the point corresponding to the touched position.
  • the point setting unit 185 receives the reference point P11 and the 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.
  • Step S104 corresponds to the area setting step.
  • the area setting unit 182 sets a two-dimensional reference area in the 2D image of the subject. For example, the area setting unit 182 sets the reference area R11 in the 2D image G11 based on the reference point P11 and the reference point P12 shown in FIG. In the example shown in FIG. 11, the shape of the reference region R11 is rectangular. The reference point P11 and the reference point P12 are the diagonal vertices of the reference region R11.
  • the information of the reference area set by the area setting unit 182 is held in the RAM 14.
  • the information includes the location of the reference area and the size of the reference area.
  • the reference area is set by associating the reference area with the 2D image of the subject.
  • step S104 the display control unit 183 displays the reference area on the 2D image of the subject (step S105).
  • 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 synthesizes 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 synthesized video signal to the display unit 5.
  • the display unit 5 displays a 2D image of the subject on which the reference region is superimposed.
  • FIG. 12 shows an example of an image displayed on the display unit 5 in step S105.
  • the same 2D image G11 as the 2D image G11 shown in FIG. 10 and the same 3D image G12 as the 3D image G12 shown in FIG. 10 are displayed on the display unit 5.
  • the reference region R11 is displayed on the 2D image G11.
  • a line (frame) showing the outline of the reference region R11 is displayed on the 2D image G11.
  • the surface of the subject in the reference region R11 can be visually recognized.
  • the inside of the reference region R11 may be displayed in a predetermined color or pattern. At this time, the surface of the subject in the reference region R11 may not be visible.
  • the method of displaying the reference area R11 is not limited to the above method.
  • the display control unit 183 displays the 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 or not the reference area is set at the position desired by the user.
  • 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 group data corresponding to the three or more points included in the reference region (step). S106). Step S106 corresponds to the estimation step.
  • the surface estimation unit 186 extracts all the pixels in the reference region of the 2D image of the subject.
  • the pixels in the 2D image of the subject are associated with the 3D coordinates in the point group data.
  • the surface estimation unit 186 acquires the 3D coordinates of each of the extracted pixels from the point cloud data.
  • the surface estimation unit 186 estimates the reference surface by using the acquired 3D coordinates.
  • the surface estimation unit 186 may select three or more points from four or more points included in the reference region in the estimation step. 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 three or more selected points.
  • the surface estimation unit 186 may extract a part of all the pixels in the reference region of the 2D image of the subject. For example, the surface estimation unit 186 may extract a predetermined ratio (for example, 50%) or more of all the pixels in the reference region of the 2D image.
  • the extracted pixels include one or more pairs composed of three pixels forming a triangle. There is no straight line that passes through all of the extracted pixels.
  • step S106 the display control unit 183 displays the reference plane on the 2D image of the subject (step S107).
  • step S107 the surface estimation process ends.
  • 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 synthesizes 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 synthesized 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.
  • FIG. 13 shows an example of an image displayed on the display unit 5 in step S107.
  • the same 2D image G11 as the 2D image G11 shown in FIG. 10 and the same 3D image G12 as the 3D image G12 shown in FIG. 10 are displayed on the display unit 5.
  • the reference plane F11 is displayed on the 2D image G11.
  • the display control unit 183 acquires the 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.
  • 3D distance is smaller than the predetermined distance
  • the display control unit 183 extracts the pixels on the 2D image G11 corresponding to the point.
  • the display control unit 183 repeats the above process by using all or a part of the pixels of the 2D image G11.
  • the display control unit 183 generates a graphic image signal for displaying the area including the extracted pixels as a reference plane.
  • a line (frame) showing the outline of the region including the extracted pixels is displayed on the 2D image G11 as the reference plane F11.
  • the surface of the subject in the line showing the reference plane F11 can be visually recognized.
  • the inside of the line may be displayed in a predetermined color or pattern.
  • the surface of the subject in the line does not have to be visible.
  • the method of displaying the reference surface F11 is not limited to the above method. The user can confirm whether or not the reference surface F11 can accurately approximate the surface of the subject.
  • 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.
  • the display control unit 183 displays the 2D image of the subject on the display unit 5 in step S102, and displays the area corresponding to the reference plane on the 2D image in step S107 (image display step). The user can confirm whether or not the reference plane can accurately approximate the surface of the subject.
  • the user may change the reference point. For example, the user inputs position information indicating a new position of the reference point to the operation unit 4. The position information is output to the CPU 18 via the control interface 17. The area setting unit 182 changes the reference point based on the position information.
  • Area information indicating at least one of the size of the reference area and the position of the reference area may be pre-recorded on the recording medium.
  • the area setting unit 182 may set at least one of the size of the reference area and the position of the reference area based on the area information.
  • the memory card 42 stores 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.
  • the area setting unit 182 sets the size of the reference area.
  • the user specifies a reference point on the 2D image of the subject, and the point setting unit 185 accepts the reference point.
  • the area setting unit 182 sets a rectangle centered on the reference point received by the point setting unit 185 in the 2D image.
  • the area information indicates the number of pixels in the horizontal direction of the reference area and the number of pixels in the vertical direction of the reference area.
  • the area 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 area information. Every time the user specifies the size of the reference area, the area information indicating the size may be recorded on the recording medium.
  • the area setting unit 182 sets the position of the reference area.
  • the area information indicates a predetermined position on the 2D image of the subject. For example, its predetermined position is the center of the 2D image.
  • the area setting unit 182 sets the reference area at the position indicated by the area information. At this time, the area setting unit 182 sets the size of the reference area to the size specified by the user. Every time the user specifies the position (reference point) of the reference area, the area information indicating the position may be recorded on the recording medium.
  • the area setting unit 182 may set the size of the reference area and the position of the reference area based on the area information.
  • the area setting unit 182 may select one of two or more area information based on the information input through the operation unit 4 in step S104. In step S104, the area setting unit 182 may set one of the size of the reference area and the position of the reference area based on the selected area information.
  • Two or more area information shows different sizes.
  • the first area information indicates a first size
  • the second area information indicates a second size different from the first size.
  • the two or more region information indicates different positions from each other.
  • the first area information indicates a first position
  • the second area information indicates a second position different from the first position.
  • the user selects one of the first area information and the second area 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 area setting unit 182 sets the size of the reference area or the position of the reference area based on the area information selected by the user.
  • the user may change at least one of the size of the reference area and the position of the reference area at an arbitrary timing.
  • the timing may be after the reference region is displayed in step S105 or after the reference plane is displayed in step S107.
  • the user inputs information indicating at least one of the size and the position into the operation unit 4.
  • the information is output to the CPU 18 via the control interface 17.
  • the area setting unit 182 changes at least one of the size of the reference area and the position of the reference area based on the information.
  • the area setting unit 182 sets the reference area based on the two reference points.
  • the number of reference points is not limited to two.
  • the area setting unit 182 may set a reference area centered on one reference point.
  • 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 of setting the reference region without using the reference point will be described in the tenth embodiment.
  • the display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and displays three or more points of the point cloud data used for estimating the reference plane on the 3D image. It is also good (image display step). Three or more points contained in the three-dimensional reference region 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, the pixels corresponding to that point are displayed in a predetermined color.
  • the display control unit 183 may display a 2D image of the subject on the display unit 5, and 2D the 3 or more points corresponding to the 3 or more points of the point cloud data used for estimating the reference plane. It may be displayed on the image (image display step). Three or more points in the point cloud data corresponding to three or more points included in the two-dimensional reference region 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 corresponding to each of the three or more points extracted from the point cloud data from the reference region, and displays the points on the 2D image. For example, the pixels corresponding to that point are displayed in a predetermined color.
  • step S105 does not need to be executed.
  • the display of the reference plane is not mandatory. Therefore, step S107 does not need to be executed.
  • step S102 does not need to be executed.
  • the CPU 18 does not need to have the function of the display control unit 183.
  • the surface estimation unit 186 may estimate the geometrical features of the reference surface in step S106. For example, when the reference plane is a cylindrical plane, the plane estimation unit 186 may estimate the diameter of the cylinder. When the reference plane is a sphere, the plane estimation unit 186 may estimate the diameter of the sphere.
  • the surface estimation unit 186 may estimate the inclination of the reference surface.
  • the slope is represented by an angle between a predetermined plane and a reference plane.
  • its predetermined plane is perpendicular to the line of sight of the endoscope.
  • the surface estimation unit 186 may estimate the type of the reference surface.
  • the type is one of a flat surface, a cylindrical surface, a spherical surface, and the like.
  • the surface estimation unit 186 estimates the reference plane on the assumption that the reference plane is a flat surface. At this time, the surface estimation unit 186 calculates the estimation error based on the distance between the reference surface and the surface of the subject.
  • the surface estimation unit 186 estimates the reference surface on the assumption 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 plane having the smallest estimation error as the final reference plane. At the same time, the surface estimation unit 186 obtains the type of the reference surface.
  • the estimation result of the reference plane may include the parameters of the formula of the reference plane.
  • the display control unit 183 may display the estimation result of the geometric feature of the reference plane on the display unit 5.
  • the estimation result is included in the graphic image signal generated by the display control unit 183.
  • the order of processing in the surface estimation process is not limited to the order shown in FIG.
  • a 2D image of the subject may be displayed on the display unit 5 before step S101 is executed.
  • the endoscope device 1 sets a two-dimensional reference region in a 2D image of the subject.
  • the reference region includes three or more points extending in two dimensions. Therefore, the possibility that three or more points of the point cloud data used for estimating the reference plane are biased on a plane or a straight line is reduced. Therefore, the endoscope device 1 can improve the accuracy of the reference plane.
  • the surface estimation process in the first modification of the second embodiment will be described.
  • the surface estimation process in the first modification of the second embodiment is executed according to FIG.
  • the description of the same process as the surface estimation process in the second embodiment will be omitted.
  • the display control unit 183 displays the 3D image of the point cloud data on the display unit 5 in step S102 (image display step).
  • step S102 the 2D image of the subject is not displayed.
  • step S103 the point setting unit 185 accepts the 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 three accepted reference points.
  • FIG. 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. 10 is displayed on the display unit 5.
  • the user moves the cursor to a desired position on the 3D image G12 and executes a predetermined operation.
  • the point setting unit 185 receives the points corresponding to the positions.
  • the display unit 5 and the operation unit 4 are touch panels, the user touches the screen of the display unit 5.
  • the point setting unit 185 receives the point corresponding to the touched position.
  • the point setting unit 185 receives the reference point P21 and the 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.
  • step S104 the area setting unit 182 sets a three-dimensional reference area in the 3D space that defines the 3D coordinates of the point cloud data.
  • the area setting unit 182 calculates the rectangular RC21 based on the reference point P21 and the reference point P22.
  • the reference point P21 and the reference point P22 are the diagonal vertices of the rectangle RC21.
  • FIG. 15 shows an example of an image displayed on the display unit 5 when the third reference point is designated.
  • the 3D image G13 of the point cloud data is displayed on the display unit 5.
  • 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.
  • the user specifies the reference point P23 by using the cursor displayed on the 3D image G13 or by touching the screen of the display unit 5.
  • the point setting unit 185 receives the reference point P23.
  • a mark indicating the reference point P23 may be displayed on the 3D image G13.
  • the user may enlarge or reduce the 3D image G13 by performing a pinch operation.
  • the area setting unit 182 calculates the reference area R21 based on the reference point P21, the reference point P22, and the reference point P23.
  • the area setting unit 182 sets the reference area R21 in the 3D space that defines the 3D coordinates of the point cloud data.
  • 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. The height of the rectangular body is the same as the 3D distance between the rectangular RC21 and the reference point P23.
  • the information of the reference area set by the area setting unit 182 is held in the RAM 14.
  • the information includes the location of the reference area and the size of the reference area.
  • the reference area is set by associating the reference area with the point cloud data.
  • 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 a 3D image on which the reference area is superimposed. The user can check whether or not the reference area is set at the position desired by the user.
  • the surface estimation unit 186 estimates the reference surface based on three or more points of the point cloud data corresponding to the 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 part of the points in the reference region. For example, the surface estimation unit 186 may extract a predetermined ratio (for example, 50%) or more of all the points in the reference region. The extracted points include one or more sets composed of three points forming a triangle. There is no straight line that goes through all the extracted points.
  • 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 a 3D image on which the reference plane is superimposed. The user can confirm whether or not the reference plane can accurately approximate the surface of the subject.
  • FIG. 16 shows an example of an image displayed on the display unit 5 in step S107.
  • the 3D image G14 of the point cloud data is displayed on the display unit 5.
  • the display control unit 183 calculates the 3D distance between each point in the point cloud data and the reference plane. When the 3D distance between the point and the reference plane is smaller than the predetermined distance, the display control unit 183 extracts the point. The display control unit 183 repeats the above process by using points in all or a part of the point cloud data. The display control unit 183 generates a graphic image signal for displaying the area including the extracted points as a reference plane.
  • the region including the extracted points is displayed on the 3D image G14 as the reference plane F21.
  • the reference surface F21 is displayed in a color different from the color of the surface of the subject.
  • the method of displaying the reference surface F21 is not limited to the above method. The user can confirm whether or not the reference surface F21 can accurately approximate the surface of the subject.
  • a 3D image of the point group data is displayed on the display unit 5, and the 3D image is used for setting 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 for setting the reference region.
  • a concave or convex portion is formed on the surface of the subject, and a reference plane that approximates the portion excluding the concave or convex portion is required.
  • the reference area When the reference area is set for a 2D image of the subject, the reference area may include recessed or convex pixels. Therefore, the accuracy of the reference plane may deteriorate. If a step is formed on the surface of the subject and the reference region includes pixels of the step, the accuracy of the reference surface may deteriorate.
  • the area setting unit 182 sets a three-dimensional reference area.
  • the area setting unit 182 sets the reference area R21 that does not include many points corresponding to the recesses of the subject. Therefore, the endoscope device 1 can improve the accuracy of the reference plane.
  • a three-dimensional reference region is set.
  • the reference region is a set of three or more points having continuity.
  • the surface estimation process in the second modification of the second embodiment will be described.
  • the surface estimation process in the second modification of the second embodiment is executed according to FIG.
  • the description of the same processing as the surface estimation processing in the first modification of the second embodiment will be omitted.
  • step S104 the area setting unit 182 determines the continuity of three or more points corresponding to the three-dimensional coordinates included in the point group data.
  • the area setting unit 182 sets a reference area including only three or more points determined to have continuity.
  • the area setting unit 182 sets a three-dimensional judgment area.
  • the method of setting the determination area is the same as the method of setting the reference area described in the first modification of the second embodiment.
  • the area setting unit 182 determines the continuity of points in the determination area. For example, the area setting unit 182 uses a 3D distance between two points adjacent to each other. The area setting unit 182 classifies each point in the determination area based on the 3D distance.
  • segmentation is a simple method to classify each point corresponding to the point cloud data.
  • the area setting unit 182 can use the European Cruster Extension for segmentation. This is a function installed in the open source PCL (Point Cloud Library).
  • the area setting unit 182 determines that a point within a predetermined distance from each point is a neighborhood point.
  • One point and its neighbors 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 group data is either a point on the first object or a point on the second object. It is classified into one.
  • the area setting unit 182 assigns each of the three or more points corresponding to the three-dimensional coordinates included in the point cloud data to one of the two or more objects. As a result, the area setting unit 182 divides the three or more points in the point cloud data into two or more areas.
  • 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.
  • the area setting unit 182 assigns all the points in the point cloud data to one object.
  • the area setting unit 182 executes the above segmentation in the judgment area. As a result, the area setting unit 182 assigns each point in the determination area to any one of one or more objects.
  • the area setting unit 182 determines whether or not the points in the determination area form a continuous surface based on the result of the segmentation. Two or more points assigned to an object constitute 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 point loses continuity between the two objects.
  • the area setting unit 182 selects one object and extracts three or more points included in the selected object from the determination area.
  • the area setting unit 182 sets a reference area including three or more extracted points. The reference area includes all or part of the points in the judgment area.
  • 17 and 18 show examples of reference regions.
  • the reference region will be described with reference to the 3D image of the point group data.
  • the same 3D image G12 as the 3D image G12 shown in FIG. 10 is shown in FIG.
  • the 3D image G15 is shown in FIG.
  • the 3D image G15 shows a cross section of the subject shown in the 3D image G12.
  • the area setting unit 182 allocates all the points between the recess of the subject and its periphery to the object OB31.
  • the area setting unit 182 sets a reference area R31 including a point in the object OB31.
  • the 3D image G12a and the 3D image G16 are shown in FIG.
  • the 3D image G16 shows a cross section of the subject shown in the 3D image G12a.
  • the area setting unit 182 assigns points between the recess of the subject and its periphery to the object OB32 or the object OB33.
  • the object OB32 and the object OB33 are not connected to each other.
  • the area setting unit 182 sets a reference area R32 including a point in the object OB32.
  • the reference region R32 does not include a point in the object OB33.
  • the points in the object OB33 are not used to estimate the reference plane.
  • the area shown in one 2D image may not be shown in another 2D image. Therefore, it may not be possible to calculate the 3D coordinates of the points in that area. In that case, as shown in FIG. 18, the surface of the subject indicated by the point cloud data becomes discontinuous.
  • the reference plane is estimated based only on the points corresponding to the continuous surface of the subject. Therefore, the endoscope device 1 can improve the accuracy of the reference plane.
  • the surface estimation process in the third modification of the second embodiment will be described.
  • the surface estimation process in the third modification of the second embodiment is executed according to FIG.
  • the description of the same processing as the surface estimation processing in the first modification of the second embodiment will be omitted.
  • step S101 the generation unit 181 generates a 3D image of the point cloud data viewed from each of the two or more viewpoints.
  • the generation unit 181 generates three 3D images.
  • the three directions of the line of sight for generating the three 3D images may be perpendicular to each other.
  • the generation unit 181 generates 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. It may be generated.
  • the display control unit 183 displays three 3D images on the display unit 5 in step S102. In step S107, the display control unit 183 displays the reference plane on each 3D image.
  • the display unit 5 displays a 3D image on which the reference plane is superimposed.
  • FIG. 19 shows an example of an image displayed on the display unit 5 in step S107.
  • the 3D image G17, the 3D image G18, and the 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 the first viewpoint.
  • the 3D image G18 is a 3D image of point cloud data viewed from a second viewpoint different from the first viewpoint.
  • the 3D image G19 is a 3D image of point cloud data viewed from a third viewpoint different from the first viewpoint and the second viewpoint.
  • the display control unit 183 executes the same process as the process for displaying the reference plane F21 shown in FIG.
  • the display control unit 183 displays the reference surface F41 on the 3D image G17, the 3D image G18, and the 3D image G19.
  • the display control unit 183 may display a 3D image of the point cloud data viewed in a direction parallel to the surface or the reference surface of the subject on the display unit 5. This makes it easier for the user to check the reference plane.
  • the generation unit 181 may extract a part 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.
  • the generation unit 181 generates a first 3D image of all the points in the point cloud data.
  • the first 3D image is a 3D image of the point cloud data viewed from the first viewpoint.
  • the generation unit 181 generates a second 3D image including the points extracted from the point cloud data.
  • the second 3D image is a 3D image of 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 the reference plane on the first 3D image and the second 3D image.
  • the reference plane is displayed on the 3D image of the point cloud data viewed from each of the two or more viewpoints. The user can confirm whether or not the reference plane can accurately approximate the surface of the subject.
  • the endoscope device 1 of the third embodiment has a three-dimensional measurement function.
  • FIG. 20 shows the functional configuration of the CPU 18a.
  • the functions of the CPU 18a are configured by the control unit 180, the generation unit 181, the area setting unit 182, the display control unit 183, the position calculation unit 184, the point setting unit 185, the surface estimation unit 186, and the measurement unit 187.
  • At least one of the blocks shown in FIG. 20 may be configured by a circuit different from the CPU 18a. The description of the same configuration as that shown in FIG. 8 will be omitted.
  • Each part shown in FIG. 20 may be composed of at least one of a processor and a logic circuit. Each part shown in FIG. 20 can include one or more processors. Each part shown in FIG. 20 may include one or more logic circuits.
  • the measurement unit 187 measures the size of the subject based on the reference plane (measurement step). For example, the measurement unit 187 executes surface reference measurement. That is, the measuring unit 187 measures the 3D distance between the reference plane and the point on the surface of the subject in the measuring step.
  • the point setting unit 185 accepts a reference point as in the second embodiment.
  • the reference point indicates a reference position for setting the reference area.
  • the point setting unit 185 accepts the measurement points and generates point information indicating the accepted measurement points.
  • the measurement point indicates a position for measuring the size of the subject. The user specifies the measurement point by using the cursor displayed on the image or by touching the screen of the display unit 5.
  • the measurement unit 187 calculates the 3D distance between the reference plane and the measurement point indicated by the point information. As a result, the measuring unit 187 can measure the depth of the concave portion on the surface of the subject or the height of the convex portion on the surface of the subject.
  • FIG. 21 shows a procedure for 3D measurement. The description of the same process as that shown in FIG. 9 will be omitted.
  • the point setting unit 185 accepts one measurement point on the 2D image of the subject through the operation unit 4, and generates point information indicating the accepted measurement point (step S108).
  • 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 the measurement step.
  • step S109 the display control unit 183 displays the measurement result on the 2D image of the subject (step S110).
  • the measurement result shows the size measured in step S109.
  • 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 synthesizes 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 synthesized video signal to the display unit 5.
  • the display unit 5 displays a 2D image of the subject on which the measurement results are 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 the 3D image of the point cloud data.
  • the measuring unit 187 may measure the 3D distance between the reference plane and each of the two or more points on the surface of the subject in step S109.
  • the display control unit 183 may display the maximum value of the measured 3D distance on the display unit 5 in step S110 (measurement result display step).
  • the measuring unit 187 extracts all or a part of the points in the circle circumscribing the two-dimensional reference region from the 2D image of the subject. Squares or rectangles may be used instead of circles.
  • 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 acquires the 3D coordinates associated with each extracted point from the point cloud data.
  • the measurement unit 187 extracts all or a part of the points in the sphere circumscribing the three-dimensional reference region from the point cloud data.
  • a sphere a cube, a cylinder, or the like may be used.
  • the measurement unit 187 acquires the 3D coordinates of each extracted point from the point cloud data.
  • the measurement 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 distance as the measurement result.
  • the measuring unit 187 can accurately measure the depth of the concave portion on the surface of the subject or the height of the convex portion on the surface of the subject.
  • the user may specify the 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.
  • the mode information indicates surface reference measurement.
  • the mode information may indicate a mode that does not include measurement. In that case, the surface estimation process shown in FIG. 9 is executed.
  • the point setting unit 185 After the point setting unit 185 receives the reference point in step S103, the user may change the reference point.
  • Area information indicating at least one of the size of the reference area and the position of the reference area may be pre-recorded on the recording medium.
  • the area setting unit 182 may set at least one of the size of the reference area and the position of the reference area based on the area information.
  • the area setting unit 182 may select one of two or more area information based on the information input through the operation unit 4 in step S104. In step S104, the area setting unit 182 may set one of the size of the reference area and the position of the reference area based on the selected area information.
  • the user may change at least one of the size of the reference area and the position of the reference area at an arbitrary timing.
  • the timing may be after the reference region is displayed in step S105 or after the reference plane is displayed in step S107.
  • 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 measurement unit 187 extracts the points used for measurement from the 2D image of the subject or the point cloud data, it is not necessary to execute step S108.
  • the CPU 18a does not need to have the functions of the position calculation unit 184 and the point setting unit 185.
  • the display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and displays three or more points of the point cloud data used for estimating the reference plane on the 3D image. May be good.
  • the display control unit 183 may display a 2D image of the subject on the display unit 5, and 2D the 3 or more points corresponding to the 3 or more points of the point cloud data used for estimating the reference plane. It may be displayed on the image.
  • step S105 does not need to be executed.
  • the display of the reference plane is not mandatory. Therefore, step S107 does not need to be executed. Display of measurement results is not essential. Therefore, step S110 does not need to be executed.
  • step S102 does not need to be executed.
  • the CPU 18a does not need to have the function of the display control unit 183.
  • the order of processing in 3D measurement is not limited to the order shown in FIG.
  • a 2D image of the subject may be displayed on the display unit 5 before step S101 is executed.
  • the endoscope device 1 measures the size of the subject. Since the reference plane is estimated accurately, the endoscope device 1 can obtain an accurate measurement result.
  • the endoscope device 1 of the fourth embodiment has the CPU 18 shown in FIG. 8 or the CPU 18a shown in FIG. 20.
  • the height or depth may differ between a predetermined area and its surroundings.
  • the predetermined area is a concave portion, a convex portion, a step, or the like.
  • the surface estimation unit 186 estimates a reference surface that approximates the surface excluding the predetermined region.
  • the area setting unit 182 sets a reference area including a area that is not a convex set.
  • An object that is convex in Euclidean space is defined as follows. If a line segment connecting any two points included in the object is defined and any point on the line segment is included in the object, the object is convex.
  • the reference region in the fourth embodiment will be described by using FIGS. 22 and 23.
  • the reference region R51 shown in FIG. 22 includes a point P51, a point P52, and a point P53.
  • the line segment L51 connects the points P51 and P52.
  • the point P53 is on the line segment L51.
  • the point P53 is included in the reference region R51.
  • Points on the line segment L51 other than the point P53 are not shown in FIG. All points on the line segment L51 are included in the reference region R51.
  • points other than points P51, P52, and P53 are not shown.
  • a point on a line segment connecting any two points in the reference region R51 is always included in the reference region R51. In other words, the line segment connecting any two points in the reference region R51 does not pass through the region outside the reference region R51. Therefore, the reference region R51 is a convex set.
  • the reference region R52 shown in FIG. 23 includes a point P54, a point P55, and a point P56.
  • the line segment L52 connects the points P54 and P55.
  • the point P56 is on the line segment L52.
  • Point P56 is not included in the reference region R52.
  • Some of the points on the line segment L52 are not included in the reference region R52.
  • the line segment L52 passes through a region outside the reference region R52. Therefore, the reference region R52 is not a convex set.
  • the area setting unit 182 sets a reference area such as the reference area R52.
  • the region that is a convex set is not limited to a two-dimensional region, and may be a three-dimensional region.
  • FIG. 24 shows a first example of the reference region.
  • the reference region in the first example is the region between the 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.
  • the 3D image G61 is shown in FIG.
  • the user designates the reference point P61 and the reference point P62 by using the cursor displayed on the 3D image G61 or by touching the screen of the display unit 5.
  • the point setting unit 185 receives the reference point P61 and the reference point P62.
  • the area setting unit 182 calculates a first sphere having a line segment connecting the reference point P61 and the reference point P62 as the diameter.
  • the area setting unit 182 calculates the 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 area setting unit 182 sets the area between the first sphere and the second sphere as the reference area R61.
  • the surface estimation unit 186 estimates the reference surface based on three or more points included in the reference region R61.
  • the boundary of the reference region R61 includes a first boundary R61a and a second boundary R61b 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.
  • Region R62 is shown in FIG.
  • the height or depth of region R62 differs from that of the region surrounding region R62.
  • the first boundary R61a and the second boundary R61b are around the region R62.
  • the reference region R61 surrounds the region R62. Points within region R62 are not included in reference region R61. Therefore, the surface estimation unit 186 can accurately estimate the reference surface.
  • the user may modify the size of the first sphere or the second sphere.
  • the user may modify the size of the first sphere or the second sphere by performing a drag operation.
  • FIG. 25 shows an example in which the user specifies one reference point.
  • the same 3D image G61 as the 3D image G61 shown in FIG. 24 is shown in FIG. 25.
  • the user specifies the reference point P63 by using the cursor displayed on the 3D image G61 or by touching the screen of the display unit 5.
  • the point setting unit 185 receives the reference point P63.
  • the area setting unit 182 calculates the first sphere and the second sphere centered on the reference point P63.
  • the diameter of the second sphere is smaller than the diameter of the first sphere.
  • the area setting unit 182 sets the area between the first sphere and the second sphere as the reference area R63.
  • the area setting unit 182 may remove a part of the area from the reference area.
  • FIG. 26 shows a method of removing a part of the region from the reference region.
  • the same 3D image G12 as the 3D image G12 shown in FIG. 10 is displayed on the display unit 5.
  • the user specifies an area to be excluded from the reference area R64.
  • the user may remove a part of the area from the reference area R64 by performing a pinch operation.
  • the boundary of the reference region R64 includes a first boundary R64a and a second boundary R64b inside the first boundary R64a.
  • FIG. 27 shows a second example of the reference region.
  • the reference region in the second example includes only the region around the side of the rectangular parallelepiped.
  • the 3D image G63 is shown in FIG.
  • the user specifies the reference point P64 and the reference point P65 by using the cursor displayed on the 3D image G63 or by touching the screen of the display unit 5.
  • the point setting unit 185 receives the reference point P64 and the reference point P65.
  • the area setting unit 182 calculates a rectangle based on the reference point P64 and the reference point P65.
  • the reference point P64 and the reference point P65 are the diagonal vertices of the rectangle.
  • the user specifies the reference point P66 by using the cursor displayed on the 3D image G63 or by touching the screen of the display unit 5.
  • the point setting unit 185 receives the reference point P66.
  • the area setting unit 182 calculates a rectangular parallelepiped based on the reference point P64, the reference point P65, and the reference point P66.
  • One face of the rectangular parallelepiped is defined by a rectangle calculated based on the reference point P64 and the reference point P65.
  • the height of the rectangular parallelepiped is the same as the 3D distance between the rectangle and the reference point P66.
  • the area 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 area setting unit 182 calculates six cylinders.
  • the area setting unit 182 sets a reference area R65, which is a set of areas in 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 the reference surface based on three or more points included in the reference region R65.
  • the area setting unit 182 may set a two-dimensional reference area that is not a convex set. For example, the area setting unit 182 may calculate the first circle and the second circle on the 2D image of the 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 area setting unit 182 may set the area between the first circle and the second circle as a reference area. Squares or rectangles may be used instead of circles.
  • the surface estimation unit 186 estimates the reference surface based on three or more points in the point cloud data corresponding to the three or more points included in the reference area. 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 part of the points in the reference region.
  • the surface estimation unit 186 selects three or more points from four or more points included in the reference region. In step S106, the surface estimation unit 186 estimates the reference surface based on three or more points in the point cloud data corresponding to the three or more selected points. Since the number of points used for estimating the reference plane is reduced, the surface estimation unit 186 can reduce the processing load for estimating the reference plane.
  • the reference region needs to include four or more points.
  • the four or more points in the reference region include one or more pairs of three points forming a triangle. There is no straight line that passes through all four or more points in the reference region.
  • the reference region R71 is shown in FIG.
  • the surface estimation unit 186 regularly extracts some points (pixels of the 2D image) out of all the points (pixels of the 2D image) in the reference region R71.
  • FIG. 28 only the points to be extracted are shown, and the points not to be extracted are omitted.
  • the surface estimation unit 186 can extract points uniformly and over a wide range by executing a simple process.
  • the reference region R72 is shown in FIG.
  • the surface estimation unit 186 randomly extracts some points (pixels of the 2D image) out of all the points (pixels of the 2D image) in the reference region R72.
  • FIG. 29 only the points to be extracted are shown, and the points not to be extracted are omitted.
  • the period of the pattern and the period of the extracted points may match. Therefore, only the points in the region that matches the specific pattern are extracted, and the accuracy of the reference plane may deteriorate.
  • points in a region that does not match a specific pattern are also extracted, so that the accuracy of the reference plane is improved.
  • the surface estimation unit 186 may mainly extract points in a portion close to the boundary of the reference region.
  • the first density is higher than the second density.
  • the first density indicates the density at which points are extracted near the boundary of the reference region.
  • the second density indicates the density at which points are extracted at a portion far from the boundary of the reference region.
  • the surface estimation unit 186 can use many points near the boundary of the reference region.
  • the surface estimation unit 186 can suppress the number of points used for estimating the reference surface as a whole, and can extract points in a wide range.
  • the surface estimation unit 186 may extract points inside the boundary of the reference region by using the above method, and may extract all or a part of the points on the boundary of the reference region.
  • a reference region including a region that is not a convex set is set.
  • the endoscope device 1 can remove a point in a region having a shape different from that of the peripheral region from the reference region. Therefore, the endoscope device 1 can improve the accuracy of the reference plane.
  • the endoscope device 1 of the fifth embodiment has the CPU 18 shown in FIG. 8 or the CPU 18a shown in FIG. 20.
  • the reference region includes two or more regions. The two or more areas are separated from each other. Each of the two or more regions included in the reference region contains three or more points.
  • the reference region may include a region containing three or more points and a region containing one or two points.
  • the three or more points contained in one region include one or more sets composed of three points forming a triangle. Alternatively, the three or more points in the entire reference region include one or more sets composed of the three points forming a triangle.
  • each area included in the reference area there is no straight line passing through all three or more points.
  • FIG. 30 shows an example of a reference region. An example will be described in which a two-dimensional reference region is used to simplify the figure. The following description may be applied when a three-dimensional reference region is used.
  • the 2D image G81 of the subject is shown in FIG.
  • the user designates the reference point P81, the reference point P82, the reference point P83, and the reference point P84 by using the cursor displayed on the 2D image G81 or by touching the screen of the display unit 5.
  • the point setting unit 185 receives a reference point P81, a reference point P82, a reference point P83, and a reference point P84.
  • the area setting unit 182 sets the area R81 centered on the reference point P81.
  • the area setting unit 182 sets a circle having a predetermined value as the diameter as the area 81. Squares or rectangles may be used instead of circles.
  • the area setting unit 182 sets the area R82 centered on the reference point P82, the area R83 centered on the reference point P83, and the area R84 centered on the reference point P84.
  • the reference region includes region R81, region R82, region R83, and region R84. Regions R81, R82, R83, and R84 are separated from each other.
  • Region R85 is shown in FIG.
  • the height or depth of region R85 differs from that of the region surrounding region R85.
  • the region R81, the region R82, the region R83, and the region R84 are arranged at positions surrounding the 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.
  • FIG. 31 shows an example in which the user specifies one reference point.
  • the same 2D image G81 as the 2D image G81 shown in FIG. 30 is shown in FIG.
  • the same region R85 as the region R85 shown in FIG. 30 is shown in FIG.
  • the user specifies the reference point P85 by using the cursor displayed on the 2D image G81 or by touching the screen of the display unit 5.
  • the point setting unit 185 receives the reference point P85.
  • the area setting unit 182 sets the area R86, the area R87, the area R88, and the area R89 having the points around the reference point P85 as the center. For example, the area setting unit 182 extracts four points separated from the reference point P85 by a predetermined distance. The area setting unit 182 sets an area centered on each extracted point.
  • a reference region including two or more regions is set.
  • the endoscope device 1 can set a reference region that does not include a region having a shape different from that of the peripheral region. Therefore, the endoscope device 1 can improve the accuracy of the reference plane.
  • FIG. 32 shows the functional configuration of the CPU 18b.
  • the functions of the CPU 18b are configured by the control unit 180, the generation unit 181, the area setting unit 182, the display control unit 183, the position calculation unit 184, the point setting unit 185, the surface estimation unit 186, and the 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. The description of the same configuration as that shown in FIG. 8 will be omitted.
  • Each part shown in FIG. 32 may be composed of at least one of a processor and a logic circuit. Each part shown in FIG. 32 can include one or more processors. Each part shown in FIG. 32 can include one or more logic circuits.
  • 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 receives the position information input through the operation unit 4 (position input step).
  • the position information indicates the position of the point cloud data displayed on the display unit 5 on the 3D image or the 2D image of the subject.
  • the state determination unit 188 determines the state of the subject (state determination step). In the area setting step, the area setting unit 182 determines the boundary of the reference area based on the position indicated by the position information and the state of the subject.
  • FIG. 33 shows the procedure of the surface estimation process. The description of the same process as that shown in FIG. 9 will be omitted.
  • the display control unit 183 displays the 3D image of the point cloud data on the display unit 5 in step S102.
  • Step S102 corresponds to the image display step.
  • the point setting unit 185 accepts two reference points on the 3D image of the point cloud data in step S103 through the operation unit 4, and generates point information indicating each of the two accepted reference points.
  • Step S103 corresponds to the position input step.
  • the two reference points input in step S103 indicate the pixel positions on the 3D image of the point cloud data. Therefore, the position information is input in step S103, and the point setting unit 185 receives 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.
  • Step S111 corresponds to the state determination step.
  • 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.
  • the state determination unit 188 determines the characteristics of the 3D shape of the subject by using the point cloud data.
  • the state determination unit 188 divides three or more points corresponding to the 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 allocates each of the three or more points to one of the two or more regions by using the Euclidean Cruster Extension.
  • the state determination unit 188 associates each area with the area on the 3D image of the point cloud data. As a result, the state determination unit 188 divides the area on the 3D image into two or more areas.
  • the state determination unit 188 may calculate a normal line perpendicular to the surface of the subject based on the point cloud data, and may detect an edge or a step of the subject based on a change in the direction of the normal line.
  • the state determination unit 188 may divide three or more points in the point cloud data into a first region and a second region.
  • the first region consists of points on edges or steps.
  • the second region consists of points on a portion other than its edges or steps.
  • the state determination unit 188 may divide the area on the 3D image into two areas by associating each area with the area on the 3D image of the point cloud data.
  • 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 consists of points on the edge. The second region consists of points on parts other than its edges. The state determination unit 188 may divide the area on the 3D image into two areas by associating each area on the 2D image of the subject with the area on the 3D image of the point cloud data. 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.
  • 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 matching processing on the stereo image of the subject, and may detect the characteristics of the subject based on the correlation value obtained in the matching processing.
  • the state determination unit 188 may determine the characteristics of the subject by using the Watershed algorithm, Deep Learning, or the like.
  • Step S111 the area setting unit 182 sets the reference area based on the positions of the two reference points and the state of the subject (step S104a).
  • Step S104a corresponds to the area setting step.
  • the area setting unit 182 sets a three-dimensional reference area in the 3D space that defines the 3D coordinates of the point cloud data. For example, the area setting unit 182 sets the outer boundary of the reference area based on the positions of the two reference points. The area setting unit 182 sets the inner boundary of the reference area based on the state of the subject. For example, there may be an abnormal region on the surface of the subject. The height or depth of the area is different from that of the area surrounding the area. The area setting unit 182 removes the part from the reference area by setting the inner boundary of the reference area. As a result, the area setting unit 182 can set a reference area that does not include that part. After step S104a, step S105 is executed.
  • FIG. 34 shows an example of an image displayed on the display unit 5.
  • the 3D image G91 is displayed on the display unit 5.
  • the user specifies the reference point P91 and the reference point P92 by using the cursor displayed on the 3D image G91 or by touching the screen of the display unit 5.
  • the point setting unit 185 receives the reference point P91 and the reference point P92.
  • the area setting unit 182 calculates a sphere SP91 having a line segment connecting the reference point P91 and the reference point P92 as a diameter.
  • the area setting unit 182 sets the sphere SP91 as the outer boundary of the reference area.
  • FIG. 35 shows two or more regions on the 3D image of the point cloud data.
  • the state determination unit 188 divides the area on the 3D image into two or more areas based on the state of the subject.
  • FIG. 35 shows the two or more regions.
  • the area of the subject on the 3D image is divided into an area R91, an area R92, and an area R93.
  • the area setting unit 182 sets the area having the largest volume among the two or more areas in the sphere SP91 as the reference area. Areas other than the area set as the reference area are not included in the reference area. A part of the region R91 and the region R92 are in the sphere SP91. The region R91 in the sphere SP91 is included in the reference region. Region R92 is not included in the reference region. The area setting unit 182 sets the boundary of the area R92 as the inner boundary of the reference area.
  • the state determination unit 188 divides three or more points corresponding to the 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.
  • Each of the above two or more regions contains three or more points.
  • the two or more regions described above may include a region containing three or more points and a region containing one or two points.
  • the reference region includes an region containing three or more points.
  • 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 surrounding the region R92 and the region R93, and the boundary of the reference region may include the boundary of the region R92 and the boundary of the region R93.
  • the outer boundary of the reference region may be a rectangular parallelepiped, a cube, a cylinder, or the like.
  • the shape of the reference region is not limited to these examples.
  • FIG. 34 the user specifies two reference points.
  • FIG. 36 shows an example in which the user specifies one reference point.
  • the same 3D image G91 as the 3D image G91 shown in FIG. 34 is shown in FIG.
  • the user specifies the reference point P93 by using the cursor displayed on the 3D image G91 or by touching the screen of the display unit 5.
  • the point setting unit 185 receives the reference point P93.
  • the area setting unit 182 calculates the sphere SP92 centered on the reference point P93.
  • the diameter of the sphere SP92 is a predetermined length.
  • the area setting unit 182 sets the sphere SP92 as the outer boundary of the reference area.
  • the state determination unit 188 sets the boundary of the region R92 shown in FIG. 35 as the inner boundary of the reference region.
  • the state determination unit 188 may divide the area only within the boundary into two or more areas. In the example shown in FIG. 34, after the region setting unit 182 sets the 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. The processing load is reduced as compared with the case of processing the entire point cloud data.
  • a 2D image of the subject may be used instead of the 3D image of the point cloud data.
  • a 2D image of the subject is used will be described.
  • the display control unit 183 displays the 2D image of the subject on the display unit 5 in step S102.
  • the point setting unit 185 accepts one or more reference points on the 2D image of the subject in step S103 through the operation unit 4, and generates point information indicating each of the accepted one or more reference points.
  • the state determination unit 188 determines the state of the subject by using the 2D image of the subject in step S111.
  • the state determination unit 188 divides the region on the 2D image into two or more regions based on the result of the determination.
  • the area setting unit 182 sets the two-dimensional reference area in the 2D image of the subject in step S104a. For example, the area setting unit 182 sets the outer boundary of the reference area based on the position of the reference point. The area setting unit 182 sets the inner boundary of the reference area based on the state of the subject.
  • the CPU 18b may have the measurement unit 187 shown in FIG. After step S107 is executed, steps S108, S109, and S110 shown in FIG. 21 may be executed.
  • the point setting unit 185 After the point setting unit 185 receives the reference point in step S103, the user may change the reference point.
  • the number of reference points set in step S103 is not limited to two.
  • Area information indicating at least one of the size of the reference area and the position of the reference area may be pre-recorded on the recording medium.
  • the area setting unit 182 may set at least one of the size of the reference area and the position of the reference area based on the area information. For example, the area setting unit 182 may set at least one of the size of the boundary outside the reference area and the position of the boundary outside the reference area based on the area information.
  • Two or more area information may be pre-recorded on the recording medium.
  • the area setting unit 182 may select one of two or more area information based on the information input through the operation unit 4.
  • the area setting unit 182 may set either the size of the reference area or the position of the reference area based on the selected area information.
  • the user may change at least one of the size of the reference area and the position of the reference area at an arbitrary timing.
  • the timing may be after the reference region is displayed in step S105 or after the reference plane is displayed in step S107.
  • the display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and displays three or more points of the point cloud data used for estimating the reference plane on the 3D image. May be good.
  • the display control unit 183 may display a 2D image of the subject on the display unit 5, and 2D the 3 or more points corresponding to the 3 or more points of the point cloud data used for estimating the reference plane. It may be displayed on the image.
  • step S105 does not need to be executed.
  • the display of the reference plane is not mandatory. Therefore, step S107 does not need to be executed.
  • step S111 may be executed before step S102 or step S103 is executed. Before step S101 is executed, step S111 may be executed by using a 2D image of the subject.
  • the reference region is set based on the state of the surface of the subject.
  • the endoscope device 1 can easily set a reference region that does not include an abnormal region. Therefore, the endoscope device 1 can improve the accuracy of the reference plane.
  • the state determination unit 188 divides three or more points corresponding to the three-dimensional coordinates included in the point cloud data into two or more regions.
  • the display control unit 183 displays an image of the two or more areas on the display unit 5, and the point setting unit 185 receives a reference point on the image.
  • 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.
  • step S111 the state determination unit 188 determines the state of the subject. As a result, the state determination unit 188 divides the three or more points corresponding to the three-dimensional coordinates included in the point cloud data into two or more regions.
  • the display control unit 183 displays a 3D image of the point cloud data and an image of two or more regions on the display unit 5 (step S102a). Specifically, the display control unit 183 generates a graphic image signal for displaying a 3D image of point cloud data and an image of two or more regions. Images in 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 a 3D image of the point cloud data and an image of two or more regions.
  • step S102a the point setting unit 185 accepts two reference points on the image of two or more areas through the operation unit 4, and generates point information indicating the accepted reference points (step S103a).
  • step S104a is executed.
  • FIG. 38 shows an example of an image displayed on the display unit 5.
  • the same 3D image G91 as the 3D image G91 shown in FIG. 34 and the image G92 of two or more regions are displayed on the display unit 5.
  • the region of the image G92 is divided into a region R94, a region R95, and a region R96.
  • the user refers to the image G92 and determines the position of the reference point.
  • the user can determine the characteristics of the subject. For example, the user can determine that the area R95 and the area R96 are recessed or convex.
  • the user determines the position of the reference point for setting the reference area that does not include the area corresponding to the area R95 and the area R96. For example, the user specifies a reference point on the widest area R94.
  • the user specifies the reference point P94 and the reference point P95 by using the cursor displayed on the image G92 or by touching the screen of the display unit 5.
  • the point setting unit 185 receives the reference point P94 and the reference point P95.
  • the area setting unit 182 calculates a sphere SP93 having a line segment connecting the reference point P94 and the reference point P95 as a diameter.
  • the area setting unit 182 sets the sphere SP93 as the outer boundary of the reference area.
  • the area setting unit 182 sets the area having the largest volume among the two or more areas in the sphere SP93 as the reference area. Areas other than the area set as the reference area are not included in the reference area. A part of region R94 and region R95 are in the sphere SP93. The region R94 in the sphere SP93 is included in the reference region. Region R95 is not included in the reference region. The area setting unit 182 sets the boundary of the area R95 as the inner boundary of the reference area.
  • the outer boundary of the reference region may be a rectangular parallelepiped, a cube, a cylinder, or the like.
  • the shape of the reference region is not limited to these examples.
  • 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.
  • the CPU 18b may have the measurement unit 187 shown in FIG. After step S107 is executed, steps S108, S109, and S110 shown in FIG. 21 may be executed.
  • the point setting unit 185 After the point setting unit 185 receives the reference point in step S103a, the user may change the reference point.
  • the number of reference points set in step S103a is not limited to two.
  • the user may change at least one of the size of the reference area and the position of the reference area at an arbitrary timing.
  • the timing may be after the reference region is displayed in step S105 or after the reference plane is displayed in step S107.
  • the display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and displays three or more points of the point cloud data used for estimating the reference plane on the 3D image. May be good.
  • the display control unit 183 may display a 2D image of the subject on the display unit 5, and 2D the 3 or more points corresponding to the 3 or more points of the point cloud data used for estimating the reference plane. It may be displayed on the image.
  • the display control unit 183 may display an image 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 corresponding to the three or more points of the point cloud data used for estimating the reference plane on the image.
  • step S105 does not need to be executed.
  • the display of the reference plane is not mandatory. Therefore, step S107 does not need to be executed.
  • the reference region is set based on the state of the surface of the subject.
  • the endoscope device 1 can easily set a reference region that does not include an abnormal region. Therefore, the endoscope device 1 can improve the accuracy of the reference plane.
  • the curvature map is used to set the reference region.
  • the curvature map shows the distribution of curvature in the 3D shape of the subject indicated by the point cloud data.
  • a curvature map contains the 3D coordinates of a point and the curvature at that point.
  • the reference region includes a region where the curvature falls within a predetermined range.
  • the surface estimation process in the second modification of the sixth embodiment will be described.
  • the surface estimation process in the second modification of the sixth embodiment is executed according to FIG. 33.
  • the description of the same process as the surface estimation process in the sixth embodiment will be omitted.
  • 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.
  • the state determination unit 188 sets a three-dimensional determination area centered on a reference point on the 3D image of the point cloud data in the 3D space.
  • the state determination unit 188 acquires the curvature associated with each point in the determination area from the curvature map.
  • the state determination unit 188 calculates the difference between the curvature at the reference point and the curvature at each point in the determination area.
  • step S104a the area setting unit 182 extracts a point where the difference falls within a predetermined range from the determination area.
  • the area setting unit 182 extracts three or more points from the determination area.
  • the area setting unit 182 sets a reference area including three or more extracted points.
  • the reference area includes all or part of the points in the judgment area.
  • a 2D image of the subject may be used instead of the 3D image of the point cloud data.
  • a 2D image of the subject is used will be described.
  • 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 centered on the reference point received by the point setting unit 185 in the 2D image of the subject. After that, the same processing as in the example in which the 3D image of the point cloud data is used is executed, and the reference area is set to the 2D image of the subject.
  • the display control unit 183 may display an image of the curvature map on the display unit 5, and displays three or more points corresponding to the three or more points of the point cloud data used for estimating the reference plane. It may be displayed above.
  • the reference region includes three or more points on the surface having a stable curvature.
  • the endoscope device 1 can set a reference region that does not include an abnormal region. Therefore, the endoscope device 1 can improve the accuracy of the reference plane.
  • a third modification of the sixth embodiment of the present invention will be described.
  • the display control unit 183 displays the image of the curvature map on the display unit 5, and the point setting unit 185 receives the reference point on the image.
  • 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.
  • 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).
  • 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 a 3D image of the point cloud data and an image of the curvature map. The image of the curvature map contains the 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 a 3D image of the point cloud data and an image of the curvature map.
  • 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).
  • FIG. 40 shows an example of an image displayed on the display unit 5 in step S103b.
  • the 3D image G93 of the point cloud data and the 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 of the pixels. For example, a pixel with a large curvature is displayed in a dark color, and a pixel with a small curvature is displayed in a light color.
  • the user refers to the image G94 and determines the position of the reference point.
  • the user can determine the characteristics of the subject. For example, the curvatures of regions R97 and R98 on the image G94 of the curvature map are higher than the curvatures of their surrounding regions. Therefore, the user can determine that the area R97 and the area R98 are concave or convex.
  • the user determines the position of the reference point for setting the reference area that does not include the area corresponding to the area R97 and the area R98.
  • the user specifies the reference point P96 by using the cursor displayed on the image G94 or by touching the screen of the display unit 5.
  • the point setting unit 185 receives the reference point P96.
  • the state determination unit 188 calculates the points of the point cloud data corresponding to the reference points received by the point setting unit 185.
  • the state determination unit 188 sets a three-dimensional determination area centered on the calculated point in the 3D space.
  • the state determination unit 188 acquires the curvature associated with each point in the determination area from the curvature map.
  • the state determination unit 188 calculates the difference between the curvature at the reference point and the curvature at each point in the determination region (step S111b). After step S111b, step S104a is executed.
  • a 2D image of the subject may be used instead of the 3D image of the point cloud data.
  • a 2D image of the subject is used will be described.
  • the state determination unit 188 calculates the point on the 2D image of the subject corresponding to the reference point.
  • the state determination unit 188 sets a two-dimensional determination area centered on the calculated point in the 2D image of the subject. After that, the same processing as in the example in which the 3D image of the point cloud data is used is executed, and the reference area is set to the 2D image of the subject.
  • the reference region includes three or more points on the surface having a stable curvature.
  • the endoscope device 1 can set a reference region that does not include an abnormal region. Therefore, the endoscope device 1 can improve the accuracy of the reference plane.
  • the endoscope device 1 of the seventh embodiment has the CPU 18 shown in FIG. 8 or the CPU 18a shown in FIG. 20.
  • the user specifies three or more points on the 3D image of the point cloud data or the 2D image of the subject.
  • a reference region is set based on a line segment connecting the three or more points.
  • 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 three or more input points (area setting step).
  • the area setting unit 182 sets the reference area based on the line segment connecting the three or more input points in the area setting step.
  • the surface estimation process in the seventh embodiment will be described.
  • the surface estimation process in the seventh embodiment is performed according to FIG. 9 or FIG.
  • the description of the same processing as the surface estimation processing in the second embodiment or the third embodiment will be omitted.
  • the display control unit 183 displays the 3D image of the point cloud data on the display unit 5 in step S102.
  • Step S102 corresponds to the image display step.
  • step S103 the point setting unit 185 accepts 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 three or more accepted reference points. do.
  • Step S103 corresponds to the area setting step.
  • step S104 the area setting unit 182 sets the reference area based on three or more reference points indicated by the point information. Step S104 corresponds to the area setting step.
  • FIG. 41 shows an example of an image displayed on the display unit 5.
  • the 3D image G101 is displayed on the display unit 5.
  • the user designates the reference point P101, the reference point P102, and the reference point P103 by using the cursor displayed on the 3D image G101 or by touching the screen of the display unit 5.
  • the point setting unit 185 receives the reference point P101, the reference point P102, and the reference point P103.
  • the area setting unit 182 calculates a line segment connecting the two reference points.
  • the area setting unit 182 calculates the line segment L101, the line segment L102, and the 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.
  • the area setting unit 182 calculates three cylinders having each of the line segment L101, the line segment L102, and the line segment L103 as the central axis.
  • the area setting unit 182 sets a reference area R101 which is a set of areas in 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 the reference surface based on three or more points included in the reference region R101.
  • FIG. 42 shows another example of the 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.
  • the user designates the reference point P104, the reference point P105, the reference point P106, and the reference point P107 by using the cursor displayed on the 3D image G101 or by touching the screen of the display unit 5.
  • the point setting unit 185 receives the reference point P104, the reference point P105, the reference point P106, and the reference point P107.
  • the area setting unit 182 calculates a line segment connecting the two reference points.
  • the area setting unit 182 calculates the line segment L104, the line segment L105, the line segment L106, and the 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.
  • the area setting unit 182 calculates four cylinders having each of the line segment L104, the line segment L105, the line segment L106, and the line segment L107 as the central axes.
  • the area setting unit 182 sets a reference area R102, which is a set of areas in 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 the reference surface based on three or more points included in the reference region R102.
  • a 2D image of the subject may be used instead of the 3D image of the point cloud data.
  • a 2D image of the subject is used will be described.
  • the display control unit 183 displays the 2D image of the subject on the display unit 5 in step S102.
  • 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 three or more accepted reference points.
  • the area setting unit 182 sets the reference area based on three or more reference points indicated by the point information.
  • the point setting unit 185 After the point setting unit 185 receives the reference point in step S103, the user may change the reference point.
  • the number of reference points set in step S103 is not limited to three or four.
  • the display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and displays three or more points of the point cloud data used for estimating the reference plane on the 3D image. May be good.
  • the display control unit 183 may display a 2D image of the subject on the display unit 5, and 2D the 3 or more points corresponding to the 3 or more points of the point cloud data used for estimating the reference plane. It may be displayed on the image.
  • step S105 does not need to be executed.
  • the display of the reference plane is not mandatory. Therefore, step S107 does not need to be executed.
  • a reference area including three or more points specified by the user is set. Therefore, the degree of freedom of the reference region is increased according to the shape of the subject or the composition of the image.
  • the endoscope device 1 can easily set a reference region.
  • the endoscope device 1 of the eighth embodiment has the CPU 18 shown in FIG. 8 or the CPU 18a shown in FIG. 20.
  • the user specifies a line on the image by tracing the 3D image of the point cloud data or the 2D image of the subject.
  • the reference area is set based on three or more points on the specified line.
  • 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 line specified by the user in the 3D image of the point group 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 three or more points on the line (area setting step).
  • the surface estimation process in the eighth embodiment will be described.
  • the surface estimation process in the eighth embodiment is performed according to FIG. 9 or FIG.
  • the description of the same processing as the surface estimation processing in the second embodiment or the third embodiment will be omitted.
  • the display control unit 183 displays the 3D image of the point cloud data on the display unit 5 in step S102.
  • Step S102 corresponds to the image display step.
  • step S103 The user draws a line by tracing the 3D image of the point cloud data.
  • 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 three or more accepted reference points.
  • Step S103 corresponds to the area setting step.
  • step S104 the area setting unit 182 sets the reference area based on three or more reference points indicated by the point information. Step S104 corresponds to the area setting step.
  • 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.
  • the user draws a line L111 by tracing the screen of the display unit 5 in a line.
  • the cursor on the 3D image G101 is displayed, the user may draw the line L111 by moving the cursor linearly on the 3D image G101.
  • the point setting unit 185 receives all reference points on the line L111.
  • the point setting unit 185 may accept a part of the reference points on the line L111.
  • Line L111 does not have to be a closed line.
  • the area setting unit 182 sets a reference area R111 having the line L111 as the central axis and the circle as the cross section.
  • the shape of the cross section of the reference region R111 is not limited to a circle.
  • the surface estimation unit 186 estimates the reference surface based on three or more points included in the reference region R111.
  • a 2D image of the subject may be used instead of the 3D image of the point cloud data.
  • a 2D image of the subject is used will be described.
  • the display control unit 183 displays the 2D image of the subject on the display unit 5 in step S102.
  • the user draws a line by tracing the 2D image of the subject.
  • 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 three or more accepted reference points.
  • the area setting unit 182 sets the reference area based on three or more reference points indicated by the point information.
  • the display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and displays three or more points of the point cloud data used for estimating the reference plane on the 3D image. May be good.
  • the display control unit 183 may display a 2D image of the subject on the display unit 5, and 2D the 3 or more points corresponding to the 3 or more points of the point cloud data used for estimating the reference plane. It may be displayed on the image.
  • step S105 does not need to be executed.
  • the display of the reference plane is not mandatory. Therefore, step S107 does not need to be executed.
  • a reference area including three or more points on a line designated by the user by tracing the image is set. Therefore, the degree of freedom of the reference region is increased according to the shape of the subject or the composition of the image.
  • the endoscope device 1 can easily set a reference region.
  • a ninth embodiment of the present invention will be described.
  • the 3D image of the point cloud data or the 2D image of the subject is displayed on the display unit 5, and the image of two or more regions in the point cloud data is displayed on the display unit 5.
  • the user refers to an image of two or more areas and specifies a reference point on the 3D image of the point cloud data.
  • FIG. 44 shows the functional configuration of the CPU 18c.
  • the functions of the CPU 18c are configured by the control unit 180, the generation unit 181, the area setting unit 182, the display control unit 183, the position calculation unit 184, the point setting unit 185, the surface estimation unit 186, and the division unit 189.
  • At least one of the blocks shown in FIG. 44 may be configured by a circuit different from the CPU 18c. The description of the same configuration as that shown in FIG. 8 will be omitted.
  • Each part shown in FIG. 44 may be composed of at least one of a processor and a logic circuit. Each part shown in FIG. 44 can include one or more processors. Each part shown in FIG. 44 can include one or more logic circuits.
  • the division unit 189 has a part of the function of the state determination unit 188 shown in FIG. 32.
  • the division unit 189 divides three or more points corresponding to the three-dimensional coordinates included in the point cloud data into two or more regions (division step).
  • the display control unit 183 displays one of the point cloud data image and the 2D image of the subject on the display unit 5, and displays images in two or more areas on the display unit 5 (image display step).
  • FIG. 45 shows the procedure of the surface estimation process. The description of the same process as that shown in FIG. 9 will be omitted.
  • step S101 the division unit 189 divides three or more points corresponding to the three-dimensional coordinates included in the point cloud data into two or more regions (step S121).
  • Step S121 corresponds to the 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.
  • step S121 the display control unit 183 displays a 3D image of the point cloud data and an image of two or more regions on the display unit 5 (step S102c).
  • Step S102c corresponds to the image display step.
  • Step S102c is the same as step S102a shown in FIG. 37.
  • step S103 is executed.
  • FIG. 46 shows an example of an image displayed on the display unit 5.
  • the same 3D image G91 as the 3D image G91 shown in FIG. 34 and the same image G92 as the image G92 shown in FIG. 38 are displayed on the display unit 5.
  • the region of the image G92 is divided into a region R94, a region R95, and a region R96.
  • the user refers to the image G92 and determines the position of the reference point.
  • the user can determine the characteristics of the subject. For example, the user can determine that the area R95 and the area R96 are recessed or convex.
  • the user determines the position of the reference point for setting the reference area that does not include the area corresponding to the area R95 and the area R96.
  • the user specifies a reference point on the area of the 3D image G91 corresponding to the widest area R94.
  • the user specifies the reference point P121 and the reference point P122 by using the cursor displayed on the 3D image G91 or by touching the screen of the display unit 5.
  • the point setting unit 185 receives the reference point P121 and the reference point P122.
  • the area setting unit 182 calculates a sphere SP121 having a line segment connecting the reference point P121 and the reference point P122 as a diameter.
  • the area setting unit 182 sets the sphere SP121 as the boundary of the reference area.
  • the area setting unit 182 may exclude the area of the 3D image G91 corresponding to the area R95 from the reference area.
  • the reference area may be a rectangular parallelepiped, a cube, a cylinder, or the like.
  • the shape of the reference region is not limited to these examples.
  • 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.
  • the CPU 18c may have the measurement unit 187 shown in FIG. After step S107 is executed, steps S108, S109, and S110 shown in FIG. 21 may be executed.
  • the point setting unit 185 After the point setting unit 185 receives the reference point in step S103, the user may change the reference point.
  • the number of reference points set in step S103 is not limited to two.
  • the user may change at least one of the size of the reference area and the position of the reference area at an arbitrary timing.
  • the timing may be after the reference region is displayed in step S105 or after the reference plane is displayed in step S107.
  • the display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and displays three or more points of the point cloud data used for estimating the reference plane on the 3D image. May be good.
  • the display control unit 183 may display a 2D image of the subject on the display unit 5, and 2D the 3 or more points corresponding to the 3 or more points of the point cloud data used for estimating the reference plane. It may be displayed on the image.
  • step S105 does not need to be executed.
  • the display of the reference plane is not mandatory. Therefore, step S107 does not need to be executed.
  • images of two or more regions in the point cloud data are displayed on the display unit 5.
  • the user can determine an area suitable for designating the reference point.
  • the 3D image of the point cloud data or the 2D image of the subject is displayed on the display unit 5, and the image of the curvature map is displayed on the display unit 5.
  • the curvature map shows the distribution of curvature in the 3D shape of the subject indicated by the point cloud data.
  • a curvature map contains the 3D coordinates of a point and the curvature at that point. The user refers to the image of the curvature map and specifies the reference point on the 3D image of the point cloud data.
  • FIG. 47 shows the functional configuration of the CPU 18d.
  • the functions of the CPU 18d are configured by the control unit 180, the generation unit 181, the area setting unit 182, the display control unit 183, the position calculation unit 184, the point setting unit 185, the surface estimation unit 186, and the 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. The description of the same configuration as that shown in FIG. 8 will be omitted.
  • Each part shown in FIG. 47 may be composed of at least one of a processor and a logic circuit. Each part shown in FIG. 47 can include one or more processors. Each part shown in FIG. 47 may include one or more logic circuits.
  • the curvature calculation unit 190 has a part of the function 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 displays the image of the curvature map on the display unit 5 (image display step).
  • 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.
  • 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 the map generation step.
  • the curvature calculation unit 190 generates a curvature map by using the same method as in the second modification of the sixth embodiment.
  • step S102d 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 the image display step.
  • Step S102d is the same as step S102b shown in FIG. 39.
  • step S103 is executed.
  • FIG. 49 shows an example of an image displayed on the display unit 5.
  • the same 3D image G93 as the 3D image G93 shown in FIG. 40 and the same image G94 as the image G94 shown in FIG. 40 are displayed on the display unit 5.
  • the user refers to the image G94 and determines the position of the reference point.
  • the user can determine the characteristics of the subject. For example, the curvatures of regions R97 and R98 on the image G94 of the curvature map are higher than the curvatures of their surrounding regions. Therefore, the user can determine that the area R97 and the area R98 are concave or convex.
  • the user determines the position of the reference point for setting the reference area that does not include the area corresponding to the area R97 and the area R98.
  • the user specifies the reference point P123 and the reference point P124 by using the cursor displayed on the 3D image G93 or by touching the screen of the display unit 5.
  • the point setting unit 185 receives the reference point P123 and the reference point P124.
  • the area setting unit 182 calculates a sphere SP122 having a line segment connecting the reference point P123 and the reference point P124 as a diameter.
  • the area setting unit 182 sets the sphere SP122 as the boundary of the reference area.
  • the reference area may be a rectangular parallelepiped, a cube, a cylinder, or the like.
  • the shape of the reference region is not limited to these examples.
  • 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.
  • the CPU 18d may have the measurement unit 187 shown in FIG. After step S107 is executed, steps S108, S109, and S110 shown in FIG. 21 may be executed.
  • the point setting unit 185 After the point setting unit 185 receives the reference point in step S103, the user may change the reference point.
  • the number of reference points set in step S103 is not limited to two.
  • the user may change at least one of the size of the reference area and the position of the reference area at an arbitrary timing.
  • the timing may be after the reference region is displayed in step S105 or after the reference plane is displayed in step S107.
  • the display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and displays three or more points of the point cloud data used for estimating the reference plane on the 3D image. May be good.
  • the display control unit 183 may display a 2D image of the subject on the display unit 5, and 2D the 3 or more points corresponding to the 3 or more points of the point cloud data used for estimating the reference plane. It may be displayed on the image.
  • step S105 does not need to be executed.
  • the display of the reference plane is not mandatory. Therefore, step S107 does not need to be executed.
  • the image of the curvature map is displayed on the display unit 5.
  • the user can determine an area suitable for designating the reference point.
  • a tenth embodiment of the present invention will be described.
  • an abnormal region on the surface of the subject is automatically detected, and a reference region excluding the region corresponding to the region is set. The user does not have to specify a reference point.
  • FIG. 50 shows the functional configuration of the CPU 18e.
  • the functions of the CPU 18e are configured by the control unit 180, the generation unit 181, the area setting unit 182, the display control unit 183, the surface estimation unit 186, and the abnormality detection unit 191.
  • At least one of the blocks shown in FIG. 50 may be configured by a circuit different from that of the CPU 18e. The description of the same configuration as that shown in FIG. 8 will be omitted.
  • Each part shown in FIG. 50 may be composed of at least one of a processor and a logic circuit. Each part shown in FIG. 50 can include one or more processors. Each part shown in FIG. 50 may include one or more logic circuits.
  • the abnormality detection unit 191 detects an abnormal region on the surface of the subject based on either the 3D image of the point cloud data or the 2D image of the subject (abnormality detection step).
  • the area setting unit 182 sets a reference area excluding the area corresponding to the abnormal area (area setting step).
  • FIG. 51 shows the procedure of the surface estimation process. The description of the same process as that shown in FIG. 9 will be omitted.
  • step S101 the display control unit 183 displays the 2D image of the subject on the display unit 5 (step S102e).
  • Step S131 corresponds to the abnormality detection step.
  • the abnormality detection unit 191 detects an abnormal area from the 2D image of the subject by using the abnormality recognition model.
  • the anomaly recognition model is acquired through machine learning such as Deep Learning. Abnormalities include defects or scratches.
  • the abnormality detection unit 191 obtains the type of abnormality and the position of the abnormal region.
  • step S131 the area setting unit 182 sets a reference area excluding the area corresponding to the abnormal area in the 2D image of the subject (step S104e).
  • step S104e corresponds to the area setting step.
  • step S105 is executed.
  • the abnormality detection unit 191 detects the convex abnormal object AO131 by processing the 2D image G131.
  • the area setting unit 182 calculates the rectangle RC131 around the abnormal object AO131.
  • the area setting unit 182 sets a first boundary separated from the rectangle RC131 by a predetermined distance on the outside of the rectangle RC131. Further, the area setting unit 182 sets a second boundary separated from the rectangular RC131 inside the rectangular RC131 by a predetermined distance. As a result, the area setting unit 182 sets the reference area R131 including the first boundary and the second boundary in the 2D image G131.
  • 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, or the like.
  • the shape of the reference region R131 is not limited to these examples.
  • a 3D image of point cloud data may be used instead of the 2D image of the subject.
  • a 3D image of point cloud data is used will be described.
  • the display control unit 183 displays the 3D image of the point cloud data on the display unit 5 in step S102e.
  • the abnormality detection unit 191 detects an abnormal region on the surface of the subject based on the 3D image of the point cloud data.
  • the area setting unit 182 sets the reference area excluding the area corresponding to the abnormal area in the 3D space.
  • the CPU 18e may have the measurement unit 187 shown in FIG. After step S107 is executed, steps S108, S109, and S110 shown in FIG. 21 may be executed.
  • 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 abnormal object is detected, the control unit 180 may set the measurement mode to surface reference measurement in order to measure the height or depth.
  • Area information indicating the size of the reference area may be pre-recorded on the recording medium.
  • the area setting unit 182 may set the size of the reference area based on the area information.
  • step S104e the area setting unit 182 may select one of two or more area information based on the information input through the operation unit 4.
  • the area setting unit 182 may set the size of the reference area based on the selected area information in step S104e.
  • the user may change at least one of the size of the reference area and the position of the reference area at an arbitrary timing.
  • the timing may be after the reference region is displayed in step S105 or after the reference plane is displayed in step S107.
  • the display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and displays three or more points of the point cloud data used for estimating the reference plane on the 3D image. May be good.
  • the display control unit 183 may display a 2D image of the subject on the display unit 5, and 2D the 3 or more points corresponding to the 3 or more points of the point cloud data used for estimating the reference plane. It may be displayed on the image.
  • step S105 does not need to be executed.
  • the display of the reference plane is not mandatory. Therefore, step S107 does not need to be executed.
  • step S102e If it is not necessary to display the reference area and the reference plane, it is not essential to display the image. Therefore, it is not necessary to execute step S102e.
  • the CPU 18e does not need to have the function of the display control unit 183.
  • the endoscope device 1 can set a reference region that does not include an abnormal region. Therefore, the endoscope device 1 can improve the accuracy of the reference plane.
  • the eleventh embodiment of the present invention will be described.
  • the deviation map is displayed on the display unit 5.
  • the deviation map shows the distribution of the 3D distance between the point corresponding to the 3D coordinates included in the point cloud data and the reference plane.
  • FIG. 54 shows the functional configuration of the CPU 18f.
  • the functions of the CPU 18f are configured by the control unit 180, the generation unit 181, the area setting unit 182, the display control unit 183, the position calculation unit 184, the point setting unit 185, the surface estimation unit 186, and the 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. The description of the same configuration as that shown in FIG. 8 will be omitted.
  • Each part shown in FIG. 54 may be composed of at least one of a processor and a logic circuit. Each part shown in FIG. 54 may include one or more processors. Each part shown in FIG. 54 may include one or more logic circuits.
  • 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 showing the distribution of deviations (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). ).
  • FIG. 55 shows the procedure of the surface estimation process. The description of the same process as that shown in FIG. 9 will be omitted.
  • step S101 the display control unit 183 displays the 3D image of the point cloud data on the display unit 5 (step S102f). After step S102f, step S103 is executed.
  • Step S141 corresponds to the map generation step.
  • 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 the 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 a 3D image of the point cloud data on which the image of the deviation map is superimposed.
  • Step S142 corresponds to the image display step.
  • step S142 is executed, the surface estimation process ends.
  • FIG. 56 shows an example of an image displayed on the display unit 5.
  • the 3D image G141 of the point cloud data is displayed on the display unit 5, and the image G142 of the deviation map is displayed on the 3D image G141.
  • the pixels of the image G142 are displayed in colors corresponding to the deviations in the pixels. 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.
  • the reference region and the reference plane are omitted.
  • the user can confirm whether or not the reference plane coincides with the surface of the subject by referring to the image G142. If a region with a large deviation is included in the reference region, the accuracy of the reference plane may deteriorate.
  • the reference area and the image G142 are displayed on the 3D image G141, the user can confirm whether or not the area having a large deviation is included in the reference area.
  • 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.
  • the CPU 18f may have the measurement unit 187 shown in FIG. After step S107, step S141, or step S142 is executed, step S108, step S109, and step S110 shown in FIG. 21 may be executed.
  • the point setting unit 185 After the point setting unit 185 receives the reference point in step S103, the user may change the reference point.
  • Area information indicating at least one of the size of the reference area and the position of the reference area may be pre-recorded on the recording medium.
  • the area setting unit 182 may set at least one of the size of the reference area and the position of the reference area based on the area information. For example, the area setting unit 182 may set at least one of the size of the boundary outside the reference area and the position of the boundary outside the reference area based on the area information.
  • the area setting unit 182 may select one of two or more area information based on the information input through the operation unit 4 in step S104. In step S104, the area setting unit 182 may set one of the size of the reference area and the position of the reference area based on the selected area information.
  • the user may change at least one of the size of the reference area and the position of the reference area at an arbitrary timing.
  • the timing may be after the reference region is displayed in step S105 or after the deviation map is displayed in step S142.
  • 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.
  • the display control unit 183 may display a 3D image of the point cloud data on the display unit 5, and displays three or more points of the point cloud data used for estimating the reference plane on the 3D image. May be good.
  • the display control unit 183 may display a 2D image of the subject on the display unit 5, and 2D the 3 or more points corresponding to the 3 or more points of the point cloud data used for estimating the reference plane. It may be displayed on the image.
  • step S105 does not need to be executed.
  • the image of the deviation map is displayed on the display unit 5.
  • the user can confirm whether or not the reference plane can accurately approximate the surface of the subject.
  • the external device interface 16 of the endoscope device 1 executes communication with the PC 41. Specifically, the external device interface 16 transmits a 2D image of one or more subjects to the PC 41. The PC 41 receives the 2D image from the endoscope device 1.
  • the external device interface 16 is connected to the PC 41 by a cable or wirelessly. Communication between the external device interface 16 and the PC 41 may be executed via a LAN (Local Area Network) or the Internet.
  • LAN Local Area Network
  • the Internet the Internet
  • 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.
  • the communication unit 43 executes communication with the external device interface 16 of the endoscope device 1. Specifically, the communication unit 43 receives a 2D image of one or more subjects from the external device interface 16.
  • the CPU 44 executes the 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 an image, an operation menu, and the like on the display screen.
  • FIG. 58 shows the functional configuration of the CPU 44.
  • the functions of the CPU 44 are configured by the control unit 440, the generation unit 441, the area setting unit 442, the display control unit 443, the position calculation unit 444, the point setting unit 445, the surface estimation unit 446, and the communication control unit 447.
  • At least one of the blocks shown in FIG. 58 may be configured by a circuit different from that of the CPU 44.
  • Each part shown in FIG. 58 may be composed of at least one of a processor and a logic circuit. Each part shown in FIG. 58 may include one or more processors. Each part shown in FIG. 58 may include one or more logic circuits.
  • the control unit 440 controls the processing executed by each unit.
  • the generation unit 441 has the same function as the function of the generation unit 181 shown in FIG.
  • the area setting unit 442 has the same function as the function of the area setting unit 182 shown in FIG.
  • the display control unit 443 has the same function as the function of the display control unit 183 shown in FIG.
  • the position calculation unit 444 has the same function as the function of the position calculation unit 184 shown in FIG.
  • the point setting unit 445 has the same function as the function of the point setting unit 185 shown in FIG.
  • the surface estimation unit 446 has the same function as the surface estimation unit 186 shown in FIG.
  • the communication control unit 447 executes communication with the external device interface 16 of the endoscope device 1 by controlling the communication unit 43.
  • the CPU 44 executes the surface estimation process shown in FIG.
  • the CPU 44 may have the function of the measurement unit 187 shown in FIG.
  • the CPU 44 may execute the 3D measurement shown in FIG.
  • the CPU 44 may have the function of the state determination unit 188 shown in FIG. 32.
  • the CPU 44 may execute the surface estimation process shown in FIG. 33, FIG. 37, or FIG. 39.
  • the CPU 44 may have the function of the division unit 189 shown in FIG. 44. When the CPU 44 has the function of the division unit 189, the CPU 44 may execute the surface estimation process shown in FIG. 45.
  • the CPU 44 may have the function of the 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 the surface estimation process shown in FIG. 48.
  • the CPU 44 may have the function of the 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 the 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.
  • the CPU 44 may read a program including an instruction that defines the operation of the CPU 44 and execute the read program. That is, the function of the CPU 44 may be realized by software.
  • the endoscope device 1 may generate point cloud data based on the 2D image of the 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 thereof from the external device interface 16. Therefore, it is not necessary for the CPU 44 to have the generation unit 181.
  • the PC 41 can improve the accuracy of the reference plane.
  • 3D measurements are performed in examinations using an industrial endoscope.
  • the user adjusts the composition between the measurement object captured in the field of view of the endoscope and the tip of the endoscope, and acquires an image.
  • the user inputs a plurality of desired points (coordinates) on the acquired image and obtains a measurement result.
  • Stereo measurement is one of the 3D measurement methods.
  • a stereo image including a first image of the subject viewed from the first viewpoint and a second image of the subject viewed from a second viewpoint different from the first viewpoint is used.
  • the matching process is executed and the points on the second image corresponding to the points on the first image are detected.
  • the image in which the user inputs points may contain various factors that hinder accurate measurement. These factors are collectively called matching inhibitory factors. Further, the region on the image containing the matching inhibitory factor is called a matching inhibitory region.
  • the device cannot calculate the accurate 3D coordinates of the point and cannot obtain an accurate measurement result. Therefore, when the user inputs a point, it is important to notify the user of the area where the measurement can be performed and the matching inhibition area where the measurement cannot be performed. The device can then use methods such as visualization of those areas.
  • matching hindrance factors include a phenomenon called occlusion or an unnecessary object attached to the optical system.
  • mirror reflection of the illumination light applied to the surface of the subject may occur, and an optical image of the reflected light may appear in the image.
  • This phenomenon caused by specular reflection of illumination light is also an example of a matching inhibitory factor. In the following, the phenomenon is referred to as a factor of interest.
  • the frequency of occurrence of the factor of interest is higher than the frequency of occurrence of other matching inhibitory factors. Further, when only one of the two images included in the stereo image is displayed and the attention factor occurs in the other of the two images included in the stereo image, the user pays attention to the non-displayed image. Is hard to notice. Therefore, it is important to detect the area where the factor of interest has occurred and notify the user of that area.
  • the first method is to apply the matching process to the entire measurable area in the stereo image.
  • the measurable region is a region having a common field of view between the first image and the second image.
  • the first method includes a method of visualizing the reliability of a point input by the user. Its reliability is obtained through a matching process applied to the entire measurable area of the stereo image.
  • the first method includes a method of displaying the 3D shape of the subject obtained through the matching process and the like.
  • the second method is to devise an algorithm so that accurate matching processing is executed even when a factor of interest occurs.
  • it is ideal to calculate the exact 3D coordinates corresponding to the input points.
  • calculations are often performed by using the brightness or color information of the first and second images in the stereo image.
  • the pattern of the bright part caused by the factor of interest is stronger than the pattern of the subject, it is generally difficult to avoid the matching error.
  • the matching inhibition region can be detected at regular time intervals in the live image. This allows the device to notify the user whether the image is suitable for measurement at the stage of adjusting the composition.
  • the above-mentioned reference discloses a method of detecting an unnecessary component contained in each image by using the first image and the second image in the stereo image.
  • the unnecessary component does not always coincide with the matching inhibition region.
  • the following method is disclosed as a method for detecting an unnecessary component.
  • Each image included in the plurality of images is set as a reference image, and a relative difference which is a difference between the reference image and one or more other images is calculated. Unnecessary components contained in each image are detected by using the relative difference information.
  • the alignment process of two images included in the stereo image may be executed before the relative difference is calculated.
  • each image included in a plurality of images having different parallax is set as a reference image, and the difference between the reference image and one or more other images is calculated.
  • this method is applied to an industrial endoscope, the detection performance of the matching inhibition region may be deteriorated in terms of processing time and detection accuracy.
  • each of the two images included in the stereo image is set as a reference image, and the same process is repeated twice. Therefore, the processing is redundant and a long processing time is required.
  • 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. Assuming that the high-precision alignment process executed in a long processing time is applied to the two images, the difference in brightness remains between the two images. Therefore, a region having a difference in brightness between the two images may be erroneously detected as a matching inhibition region.
  • the factor of interest does not always occur in the entire area with the difference in brightness. In order to detect the region where the factor of interest has occurred, it is not necessary to detect the entire region having the difference in brightness.
  • An object of the related invention is to provide a method capable of detecting a region in which a factor of interest caused by specular reflection of illumination light is generated in a short processing time and with high accuracy.
  • the endoscope device 1 has the CPU 18g shown in FIG. 59 instead of the CPU 18 shown in FIG.
  • FIG. 59 shows the functional configuration of the CPU 18g.
  • the function of the CPU 18g is configured by the control unit 200, the feature point processing unit 201, the division unit 202, the difference calculation unit 203, the determination unit 204, the area detection unit 205, and the display control unit 206.
  • At least one of the blocks shown in FIG. 59 may be configured by a circuit different from the CPU 18g.
  • Each part shown in FIG. 59 may be composed of at least one of a processor and a logic circuit. Each part shown in FIG. 59 can include one or more processors. Each part shown in FIG. 59 may include one or more logic circuits.
  • the control unit 200 acquires a stereo image (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 image includes a first image of the subject viewed from the first viewpoint and a second image of the subject viewed from a second viewpoint different from the first viewpoint.
  • the feature point processing unit 201 detects three or more feature points on the first image and detects points on the second image corresponding to each feature point.
  • the feature point processing unit 201 associates the feature points on the first image with the points on the second image.
  • the division unit 202 executes Delaunay triangulation on the second image based on the points on the second image associated with the feature points on the first image. As a result, the division unit 202 sets one or more triangular regions in the second image. The split unit 202 sets one or more triangular regions in the first image based on the relationship of the points associated between the two images. Further, the dividing portion 202 deforms the triangle in the second image in order to match the shape of the triangle in the first image with the shape of the triangle in the second image.
  • the difference calculation unit 203 calculates the difference between the pixel value of the first image and the pixel value of the second image for each pixel. As a result, the difference calculation unit 203 calculates the difference in brightness between the two images.
  • the difference calculation unit 203 extracts a region including pixels whose difference exceeds a predetermined threshold value from the first image. The extracted region is a candidate for the region in which the factor of interest caused by the specular reflection of the illumination light is generated.
  • the determination unit 204 determines whether or not there is a pair of two regions having similar characteristics in the extracted regions. In the following, this judgment is called a pairing judgment. When the factor of interest occurs in a stereo image, it is characterized by the presence of this pair. When the pair exists, the determination unit 204 detects the region included in the pair as the region in which the factor of interest has occurred.
  • the determination unit 204 detects a region having a brightness exceeding a preset reference value of the brightness in the first image. When at least a part of the region overlaps with the two regions detected in the pairing determination, the determination unit 204 focuses on the two regions detected in the pairing determination and the region having high brightness. Detect as the generated area.
  • the display control unit 206 displays the stereo image on the display unit 5, and displays the area where the factor of interest has occurred on the stereo image.
  • FIG. 60 shows the procedure of the processing.
  • the feature point processing unit 201 detects the feature points on the first image and detects the points on the second image corresponding to each feature point (step S201).
  • 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 the feature point P201, the feature point P202, and the feature point P203 on the first image G201.
  • the feature point processing unit 201 detects the point P211 on the second image G202 and associates the point P211 with the feature point P201.
  • the feature point processing unit 201 detects the point P212 on the second image G202 and associates the point P212 with the feature point P202.
  • the feature point processing unit 201 detects the point P213 on the second image G202 and associates the point P213 with the feature point P203.
  • three feature points are detected. The number of feature points is not limited to three.
  • the feature point processing unit 201 detects points that are expected to have a small error in the matching process using the first image and the second image as feature points.
  • the feature point processing unit 201 determines the appropriateness of the feature point by checking the following indexes for the purpose. For example, the feature point processing unit 201 uses the uniqueness ratio, the continuity of parallax, the consistency of the image, the reprojection error, and the like as indexes.
  • the uniqueness ratio shows the similarity of the two points on the second image. Specifically, the uniqueness ratio shows the similarity between the first point and the second point.
  • the first point is the point most similar to the feature point on the first image.
  • the second point is the second similar point to the feature point.
  • Parallax continuity indicates an acceptable parallax relationship in a local range. When the parallax at the feature point and the parallax at the points around the feature point are substantially the same, there is continuity of the parallax. When the parallax at the feature point and the parallax at the points around the feature point are significantly different, there is no continuity of the parallax.
  • Image consistency indicates the relationship between two points associated through matching processing. Specifically, the matching process is executed twice. The points on the second image corresponding to the points on the first image are detected through the first matching process. Further, a point on the first image corresponding to the point on the second image is detected through the second matching process. Image consistency indicates the degree to which the two points match. One of the two points is a point on the first image used in the first matching process. The other of the two points is a point on the first image detected through the second matching process. It is not necessary to use the entire image in the two matching processes.
  • the reprojection error indicates the amount of deviation between the point detected through the matching process and the epipolar line.
  • the feature point processing unit 201 does not need to use all of the above indicators.
  • the feature point processing unit 201 determines the appropriateness of the feature points based on one or more indexes.
  • the feature point processing unit 201 may detect a feature point by detecting a point having some feature from the first image.
  • the first image may be divided in advance in a grid pattern, and the feature point processing unit 201 may detect the intersection of the two boundary lines as a candidate for the feature point.
  • the divider 202 sets one or more triangular regions in the second image and one or more triangles in the first image based on the relationship of points between the two images.
  • the area of (step S202) is set.
  • step S202 sets a region of one or more triangles in the second image by performing Delaunay triangulation on the second image.
  • the vertices of each triangle are associated with feature points on the first image detected in step S201.
  • FIG. 62 shows an example of an image in which a triangle is set.
  • the region of the second image G203 includes two or more triangular regions.
  • the dividing unit 202 identifies three feature points on the first image corresponding to the three vertices of one triangle on the second image.
  • the dividing unit 202 sets a triangle having the three feature points as vertices in the first image.
  • the dividing unit 202 associates the triangle on the second image with the triangle on the first image.
  • the division unit 202 executes the above processing for all the triangles on the second image.
  • FIG. 63 shows the triangles set in each of the first image and the second image.
  • Image G204 which is part of the first image
  • image G205 which is part of the second image
  • the triangle T201 on image G204 and the triangle T202 on image G205 are associated with each other.
  • the dividing portion 202 deforms the shape of the triangle T202 to match the shape of the triangle T201 with the shape of the triangle T202.
  • the dividing unit 202 generates a modified image of the second image by applying this process to all the triangles on the second image.
  • the difference calculation unit 203 calculates the difference in brightness between the first image and the second image (step S203).
  • the difference calculation unit 203 calculates the difference in brightness by using the first image and the modified image of the second image generated in step S202.
  • the difference calculation unit 203 extracts a region including pixels whose difference exceeds a predetermined threshold value from the first image. For example, the difference calculation unit 203 calculates the difference by subtracting the pixel value of the deformed image of the second image from the pixel value of the first image.
  • the difference calculation unit 203 extracts a region including pixels whose positive difference is larger than a predetermined threshold value from the first image. Further, the difference calculation unit 203 extracts a region including pixels whose negative difference is smaller than a predetermined threshold value from the first image.
  • the region of the first image G206 shown in FIG. 64 includes a region R201 and a region R202.
  • Region R201 includes pixels whose positive difference is greater than a predetermined threshold.
  • Region R202 includes pixels whose negative difference is less than a predetermined threshold.
  • the region of the first image G207 shown in FIG. 65 includes a region R203 and a region R204.
  • Region R203 includes pixels whose positive difference is greater than a predetermined threshold.
  • Region R204 includes pixels whose negative difference is less than a predetermined threshold.
  • the determination unit 204 executes the pairing determination. As a result, the determination unit 204 determines whether or not there is a pair of two regions having similar characteristics among the regions extracted in step S203 (step S204).
  • step S204 determines whether or not the characteristics of the region R201 and the region R202 are similar to each other.
  • the determination unit 204 determines whether or not the characteristics of the region R203 and the region R204 are similar to each other.
  • the determination unit 204 executes the pairing determination by using the following indexes.
  • the determination unit 204 determines whether or not the signs of the difference in brightness between the two regions are different from each other. When the difference in the brightness of one region is positive and the difference in the brightness of the other region is negative, the determination unit 204 determines that the characteristics of the two regions are similar to each other.
  • Judgment unit 204 determines the distance between the two areas. When 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.
  • Judgment unit 204 compares the shapes of the two regions. When the shapes of the two regions are similar to each other, the determination unit 204 determines that the characteristics of the two regions are similar to each other.
  • Judgment unit 204 compares the directions (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 axis and the minor axis of the rectangle. When the directions 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.
  • Judgment unit 204 compares the areas of the two areas. When 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.
  • Judgment unit 204 does not have to use all of the above indicators.
  • the determination unit 204 determines whether or not the characteristics of the two regions are similar to each other based on one or more indexes.
  • the determination unit 204 detects the region included in the pair as the region in which the factor of interest has occurred.
  • step S204 the determination unit 204 detects a region having a brightness exceeding a preset reference value of brightness in the first image (step S205).
  • the determination unit 204 determines for each pixel whether or not the pixel value exceeds the reference value.
  • An example of the reference value is 250.
  • the determination unit 204 detects a region including a pixel having a pixel value exceeding the reference value.
  • the detected area has high brightness.
  • the determination unit 204 determines whether or not at least a part of the region having high brightness overlaps with the two regions detected in the pairing determination. When the regions having high brightness have overlaps, the determination unit 204 detects the union of the region having high brightness and the two regions detected in the pairing determination as the region where the factor of interest has occurred. When the regions having high brightness do not overlap, the determination unit 204 detects only the two regions detected in the pairing determination as the regions in which the factor of interest has occurred.
  • FIG. 66 shows an example of a region in which a factor of interest has occurred.
  • Region R205 includes pixels having a brightness exceeding the reference value.
  • Region R206 and region R207 are pairs detected in the pairing determination. A part of the region R205 overlaps the region R206, and another part of the region R205 overlaps the region R207. Therefore, the determination unit 204 detects the union of the regions R205, the region R206, and the region R207 as the region where the factor of interest has occurred.
  • step S205 the determination unit 204 surrounds the region where the factor of interest has occurred with a convex curve (convex closed curve).
  • the determination unit 204 finally detects the region surrounded by the convex curve as the region where the factor of interest has occurred (step S206).
  • the region R205, the region R206, and the region R207 are surrounded by the convex curve L201.
  • the determination unit 204 detects all the regions surrounded by the convex curve L201 as regions in which the factor of interest has occurred.
  • the region surrounded by the convex curve L201 includes a region R205, a region R206, and a region R207.
  • the region surrounded by the convex curve L201 includes regions other than the region R205, the region R206, and the region R207.
  • Step S206 may be executed without executing step S205.
  • the region surrounded by the convex curve includes at least a part of the region with high brightness.
  • step S206 the display control unit 206 displays the stereo image on the display unit 5 and displays the area where the factor of interest has occurred on the stereo image (step S207).
  • step S207 the process shown in FIG. 60 ends.
  • the display control unit 206 generates a graphic image signal for displaying the area where the factor of interest has 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 synthesizes 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 synthesized video signal to the display unit 5.
  • the display unit 5 displays a stereo image on which the region in which the factor of interest is generated is superimposed. For example, the first image included in the stereo image is displayed on the display unit 5, and the region where the factor of interest is generated is displayed on the first image.
  • the area where the factor of interest occurred is displayed on the stereo image. Therefore, the user can avoid inputting a point in the area where the attention factor occurs. Since the input of points in the matching obstruction region is avoided, the accuracy of stereo measurement is improved.
  • the display control unit 206 sets the high-brightness area on the stereo image to alert the user. It may be displayed. The user can avoid entering points in areas with high brightness.
  • the endoscope device 1 can detect the region where the factor of interest has occurred in a short processing time. In embodiments of the related invention, the pairing determination is performed. Therefore, the endoscope device 1 can detect the region where the factor of interest has occurred with high accuracy.
  • the surface estimation method, the surface estimation device, and the recording medium can improve the accuracy of the reference surface.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Radiology & Medical Imaging (AREA)
  • Surgery (AREA)
  • Optics & Photonics (AREA)
  • Astronomy & Astrophysics (AREA)
  • Quality & Reliability (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Medical Informatics (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

面推定方法は、生成ステップ、領域設定ステップ、および推定ステップを有する。前記生成ステップにおいて被写体上の3つ以上の点の3次元座標を含む3次元画像データが生成される。前記領域設定ステップにおいて、3次元の領域および2次元の領域の一方である基準領域が設定される。前記推定ステップにおいて、前記基準領域に含まれる前記3つ以上の点に対応する前記3次元画像データの3つ以上の点に基づいて、前記被写体の表面を近似する基準面が推定される。

Description

面推定方法、面推定装置、および記録媒体
 本発明は、面推定方法、面推定装置、および記録媒体に関する。
 ボイラー、パイプ、および航空機エンジン等の内部の傷および腐食等の観察および検査に工業用の内視鏡装置が使用されている。この内視鏡装置では、多様な観察物を観察および検査するための複数種類の光学アダプターが用意されている。光学アダプターは、内視鏡の先端部分に装着され、かつ交換可能である。このような内視鏡装置を使用した検査において、被写体の欠陥および傷の大きさを定量的に計測したいという要望がある。この要望に応えるために、3次元計測機能が搭載された内視鏡装置が存在する。
 例えば、ユーザーによって画像上で指定された点の情報に基づいて被写体の幾何学的な大きさを計測する機能が内視鏡装置に搭載されている。例えば、面基準計測では、ユーザーによって指定された3つ以上の点に基づいて基準面が推定され、かつユーザーによって指定された計測点と基準面との間の3次元距離が計測される。基準面は、被写体の表面を近似する。
 特許文献1に開示された装置は、平面または曲面を基準面として使用し、かつ面基準計測を実行する。図67および図68は、特許文献1における基準面を推定するための3つ以上の点を被写体の画像G301に設定する例を示す。
 図67において、点P301、点P302、点P303、および点P304が画像G301に設定される。4つの点の各々は正方形の頂点に配置されている。図68において、線L311上の2つ以上の点P311および線L312上の2つ以上の点P312が画像G301に設定される。
日本国特開2017-162452号公報
 被写体の表面が曲面である場合、特許文献1に開示された装置は基準面を正しく推定できない可能性がある。図69および図70は、誤った基準面が推定される例を示す。
 図69において、点P321、点P322、および点P323が球SP301の表面上に設定される。球SP301をZ軸に平行な方向に見た場合、3つの点の各々は三角形の頂点に配置されている。3つの点のZ方向における高さが同じである場合、3つの点は平面上にある。そのため、その平面が基準面として誤って推定される。
 図70において、線L331および線L332が円筒CY301の表面上に設定され、かつ線L331上の2つ以上の点P331および線L332上の2つ以上の点P332が設定される。線L331および線L332が円筒CY301の中心軸に平行である場合、2つ以上の点P331および2つ以上の点P332は平面上にある。そのため、その平面が基準面として誤って推定される。
 本発明は、基準面の精度を向上させることができる面推定方法、面推定装置、および記録媒体を提供することを目的とする。
 本発明の第1の態様によれば、面推定方法は、生成ステップ、領域設定ステップ、および推定ステップを有する。前記生成ステップにおいて、被写体の2次元画像に基づいて前記被写体上の3つ以上の点の3次元座標が算出され、かつ前記3つ以上の点の前記3次元座標を含む3次元画像データが生成される。前記領域設定ステップにおいて、3次元の領域および2次元の領域の一方である基準領域が設定される。前記3次元の領域は、3つ以上の点を含み、かつ3次元空間に設定される。前記3次元空間は、前記3次元画像データに含まれる前記3次元座標を含む。前記2次元の領域は、3つ以上の点を含み、かつ前記2次元画像に設定される。前記基準領域の前記3つ以上の点は、三角形を形成する3つの点で構成される1つ以上の組を含む。前記推定ステップにおいて、前記基準領域に含まれる前記3つ以上の点に対応する前記3次元画像データの3つ以上の点に基づいて、前記被写体の表面を近似する基準面が推定される。
 本発明の第2の態様によれば、第1の態様において、前記領域設定ステップにおいて、前記3次元の領域である前記基準領域が前記3次元空間に設定されてもよい。
 本発明の第3の態様によれば、第1の態様において、前記領域設定ステップにおいて、前記2次元の領域である前記基準領域が前記2次元画像に設定されてもよい。
 本発明の第4の態様によれば、第2の態様において、前記領域設定ステップにおいて、前記3次元画像データに含まれる前記3次元座標に対応する前記3つ以上の点の連続性が判断されてもよい。前記基準領域は、前記連続性を持つと判断された前記3つ以上の点のみを含んでもよい。
 本発明の第5の態様によれば、第1の態様において、前記基準領域は、凸集合ではない領域を含んでもよい。
 本発明の第6の態様によれば、第1の態様において、前記基準領域は、2つ以上の領域を含んでもよい。
 本発明の第7の態様によれば、第1の態様において、前記面推定方法は、画像表示ステップ、位置入力ステップ、および状態判断ステップをさらに有してもよい。前記画像表示ステップにおいて、前記3次元画像データの画像および前記2次元画像の一方がディスプレイに表示されてもよい。前記位置入力ステップにおいて、入力装置を通して入力された位置情報が受け付けられてもよい。前記位置情報は、前記ディスプレイに表示された前記3次元画像データの前記画像または前記2次元画像上の位置を示してもよい。前記状態判断ステップにおいて、前記被写体の状態が判断されてもよい。前記領域設定ステップにおいて、前記位置情報が示す前記位置と、前記状態とに基づいて前記基準領域の境界が判断されてもよい。
 本発明の第8の態様によれば、第5の態様において、前記基準領域の境界は、第1の境界と、前記第1の境界よりも内側にある第2の境界とを含んでもよい。
 本発明の第9の態様によれば、第6の態様において、前記領域設定ステップにおいて、前記3次元画像データに含まれる前記3次元座標に対応する前記3つ以上の点が2つ以上の領域に分割されてもよい。前記基準領域の境界は、前記2つ以上の領域に含まれる1つ以上の領域の境界を含んでもよい。
 本発明の第10の態様によれば、第6の態様において、前記基準領域の大きさおよび前記基準領域の位置の少なくとも一方を示す領域情報が記録媒体に予め記録されてもよい。前記領域設定ステップにおいて、前記領域情報に基づいて前記基準領域の前記大きさおよび前記基準領域の前記位置の少なくとも一方が設定されてもよい。
 本発明の第11の態様によれば、第6の態様において、前記面推定方法は、前記3次元画像データの画像および前記2次元画像の一方をディスプレイに表示する画像表示ステップをさらに有してもよい。前記領域設定ステップにおいて、前記3次元画像データの前記画像または前記2次元画像上の3つ以上の点が入力装置を通して入力されてもよい。前記領域設定ステップにおいて、入力された前記3つ以上の点を含む前記基準領域が設定されてもよい。
 本発明の第12の態様によれば、第11の態様において、前記領域設定ステップにおいて、入力された前記3つ以上の点を結ぶ線分に基づいて前記基準領域が設定されてもよい。
 本発明の第13の態様によれば、第6の態様において、前記面推定方法は、前記3次元画像データの画像および前記2次元画像の一方をディスプレイに表示する画像表示ステップをさらに有してもよい。前記領域設定ステップにおいて、ユーザーが前記3次元画像データの前記画像または前記2次元画像において指定した線上の3つ以上の点が入力装置を通して入力されてもよい。前記領域設定ステップにおいて、前記線上の前記3つ以上の点を含む前記基準領域が設定されてもよい。
 本発明の第14の態様によれば、第6の態様において、前記推定ステップにおいて、前記基準領域に含まれる4つ以上の点から前記3つ以上の点が選択されてもよい。前記推定ステップにおいて、選択された前記3つ以上の点に対応する前記3次元画像データの3つ以上の点に基づいて、前記基準面が推定されてもよい。
 本発明の第15の態様によれば、第6の態様において、前記面推定方法は、前記3次元画像データの画像および前記2次元画像の一方をディスプレイに表示し、かつ前記基準領域を前記3次元画像データの前記画像または前記2次元画像上に表示する画像表示ステップをさらに有してもよい。
 本発明の第16の態様によれば、第6の態様において、前記面推定方法は、前記3次元画像データの画像をディスプレイに表示し、かつ前記基準面の推定に使用された前記3次元画像データの前記3つ以上の点を前記3次元画像データの前記画像上に表示する画像表示ステップをさらに有してもよい。
 本発明の第17の態様によれば、第6の態様において、前記面推定方法は、前記2次元画像をディスプレイに表示し、かつ前記基準面の推定に使用された前記3次元画像データの前記3つ以上の点に対応する3つ以上の点を前記2次元画像上に表示する画像表示ステップをさらに有してもよい。
 本発明の第18の態様によれば、第6の態様において、前記面推定方法は、分割ステップおよび画像表示ステップをさらに有してもよい。前記分割ステップにおいて、前記3次元画像データに含まれる前記3次元座標に対応する3つ以上の点が2つ以上の領域に分割されてもよい。前記画像表示ステップにおいて、前記3次元画像データの画像および前記2次元画像の一方がディスプレイに表示され、かつ前記2つ以上の領域の画像が前記ディスプレイに表示されてもよい
 本発明の第19の態様によれば、第6の態様において、前記面推定方法は、マップ生成ステップおよび画像表示ステップをさらに有してもよい。前記マップ生成ステップにおいて、前記3次元画像データが示す前記被写体の3次元形状における曲率の分布を示す曲率マップが生成されてもよい。前記画像表示ステップにおいて、前記3次元画像データの画像および前記2次元画像の一方がディスプレイに表示され、かつ前記曲率マップの画像が前記ディスプレイに表示されてもよい。
 本発明の第20の態様によれば、第6の態様において、前記面推定方法は、前記3次元画像データの画像および前記2次元画像の一方をディスプレイに表示し、かつ前記基準面に対応する領域を前記3次元画像データの前記画像または前記2次元画像上に表示する画像表示ステップをさらに有してもよい。
 本発明の第21の態様によれば、第6の態様において、前記面推定方法は、前記3次元画像データの画像および前記2次元画像の一方に基づいて前記被写体の前記表面における異常な領域を検出する異常検出ステップをさらに有してもよい。前記領域設定ステップにおいて、前記異常な領域に対応する領域を除く前記基準領域が設定されてもよい。
 本発明の第22の態様によれば、第6の態様において、前記面推定方法は、前記基準面に基づいて前記被写体の大きさを計測する計測ステップをさらに有してもよい。
 本発明の第23の態様によれば、第22の態様において、前記計測ステップにおいて、前記基準面と前記被写体の前記表面上の点との間の3次元距離が計測されてもよい。
 本発明の第24の態様によれば、第6の態様において、前記推定ステップにおいて、前記基準面の幾何学的な特徴がさらに推定されてもよい。
 本発明の第25の態様によれば、面推定方法は、読み出しステップ、領域設定ステップ、および推定ステップを有する。前記読み出しステップにおいて、被写体の2次元画像に基づいて算出された前記被写体上の3つ以上の点の3次元座標を含む3次元画像データが記録媒体から読み出される。前記領域設定ステップにおいて、3次元の領域および2次元の領域の一方である基準領域が設定される。前記3次元の領域は、3つ以上の点を含み、かつ3次元空間に設定される。前記3次元空間は、前記3次元画像データに含まれる前記3次元座標を含む。前記2次元の領域は、3つ以上の点を含み、かつ前記2次元画像に設定される。前記基準領域の前記3つ以上の点は、三角形を形成する3つの点で構成される1つ以上の組を含む。前記推定ステップにおいて、前記基準領域に含まれる前記3つ以上の点に対応する前記3次元画像データの3つ以上の点に基づいて、前記被写体の表面を近似する基準面が推定される。
 本発明の第26の態様によれば、面推定装置は、生成部、領域設定部、および推定部を有する。前記生成部は、被写体の2次元画像に基づいて前記被写体上の3つ以上の点の3次元座標を算出し、かつ前記3つ以上の点の前記3次元座標を含む3次元画像データを生成する。前記領域設定部は、3次元の領域および2次元の領域の一方である基準領域を設定する。前記3次元の領域は、3つ以上の点を含み、かつ3次元空間に設定される。前記3次元空間は、前記3次元画像データに含まれる前記3次元座標を含む。前記2次元の領域は、3つ以上の点を含み、かつ前記2次元画像に設定される。前記基準領域の前記3つ以上の点は、三角形を形成する3つの点で構成される1つ以上の組を含む。前記推定部は、前記基準領域に含まれる前記3つ以上の点に対応する前記3次元画像データの3つ以上の点に基づいて、前記被写体の表面を近似する基準面を推定する。
 本発明の第27の態様によれば、生成ステップ、領域設定ステップ、および推定ステップをコンピュータに実行させるためのプログラムが記録されたコンピュータ読み取り可能な記録媒体が提供される。前記生成ステップにおいて、被写体の2次元画像に基づいて前記被写体上の3つ以上の点の3次元座標が算出され、かつ前記3つ以上の点の前記3次元座標を含む3次元画像データが生成される。前記領域設定ステップにおいて、3次元の領域および2次元の領域の一方である基準領域が設定される。前記3次元の領域は、3つ以上の点を含み、かつ3次元空間に設定される。前記3次元空間は、前記3次元画像データに含まれる前記3次元座標を含む。前記2次元の領域は、3つ以上の点を含み、かつ前記2次元画像に設定される。前記基準領域の前記3つ以上の点は、三角形を形成する3つの点で構成される1つ以上の組を含む。前記推定ステップにおいて、前記基準領域に含まれる前記3つ以上の点に対応する前記3次元画像データの3つ以上の点に基づいて、前記被写体の表面を近似する基準面が推定される。
 上記の各態様によれば、面推定方法、面推定装置、および記録媒体は、基準面の精度を向上させることができる。
本発明の第1の実施形態の面推定装置の構成を示すブロック図である。 本発明の第1の実施形態における面推定処理の手順を示すフローチャートである。 本発明の第1の実施形態における点群データの3次元画像の例を示す図である。 本発明の第1の実施形態における点群データを模式的に示す図である。 本発明の第1の実施形態における2D画像の例を示す図である。 本発明の第2の実施形態による内視鏡装置の全体構成を示す斜視図である。 本発明の第2の実施形態による内視鏡装置の内部構成を示すブロック図である。 本発明の第2の実施形態による内視鏡装置が有するCPUの機能構成を示すブロック図である。 本発明の第2の実施形態における面推定処理の手順を示すフローチャートである。 本発明の第2の実施形態において表示部に表示される画像の例を示す図である。 本発明の第2の実施形態において表示部に表示される画像の例を示す図である。 本発明の第2の実施形態において表示部に表示される画像の例を示す図である。 本発明の第2の実施形態において表示部に表示される画像の例を示す図である。 本発明の第2の実施形態の第1の変形例において表示部に表示される画像の例を示す図である。 本発明の第2の実施形態の第1の変形例において表示部に表示される画像の例を示す図である。 本発明の第2の実施形態の第1の変形例において表示部に表示される画像の例を示す図である。 本発明の第2の実施形態の第2の変形例における基準領域の例を示す図である。 本発明の第2の実施形態の第2の変形例における基準領域の例を示す図である。 本発明の第2の実施形態の第3の変形例において表示部に表示される画像の例を示す図である。 本発明の第3の実施形態による内視鏡装置が有するCPUの機能構成を示すブロック図である。 本発明の第3の実施形態における3次元計測の手順を示すフローチャートである。 本発明の第4の実施形態における基準領域を説明するための図である。 本発明の第4の実施形態における基準領域を説明するための図である。 本発明の第4の実施形態における基準領域の例を示す図である。 本発明の第4の実施形態における基準領域の例を示す図である。 本発明の第4の実施形態における基準領域の例を示す図である。 本発明の第4の実施形態における基準領域の例を示す図である。 本発明の第4の実施形態において基準面の推定に使用される点の例を示す図である。 本発明の第4の実施形態において基準面の推定に使用される点の例を示す図である。 本発明の第5の実施形態における基準領域の例を示す図である。 本発明の第5の実施形態における基準領域の例を示す図である。 本発明の第6の実施形態による内視鏡装置が有するCPUの機能構成を示すブロック図である。 本発明の第6の実施形態における面推定処理の手順を示すフローチャートである。 本発明の第6の実施形態において表示部に表示される画像の例を示す図である。 本発明の第6の実施形態における点群データの3次元画像上の2つ以上の領域を示す図である。 本発明の第6の実施形態において表示部に表示される画像の例を示す図である。 本発明の第6の実施形態の第1の変形例における面推定処理の手順を示すフローチャートである。 本発明の第6の実施形態の第1の変形例において表示部に表示される画像の例を示す図である。 本発明の第6の実施形態の第3の変形例における面推定処理の手順を示すフローチャートである。 本発明の第6の実施形態の第3の変形例において表示部に表示される画像の例を示す図である。 本発明の第7の実施形態において表示部に表示される画像の例を示す図である。 本発明の第7の実施形態において表示部に表示される画像の例を示す図である。 本発明の第8の実施形態において表示部に表示される画像の例を示す図である。 本発明の第9の実施形態による内視鏡装置が有するCPUの機能構成を示すブロック図である。 本発明の第9の実施形態における面推定処理の手順を示すフローチャートである。 本発明の第9の実施形態において表示部に表示される画像の例を示す図である。 本発明の第9の実施形態の変形例による内視鏡装置が有するCPUの機能構成を示すブロック図である。 本発明の第9の実施形態の変形例における面推定処理の手順を示すフローチャートである。 本発明の第9の実施形態の変形例において表示部に表示される画像の例を示す図である。 本発明の第10の実施形態による内視鏡装置が有するCPUの機能構成を示すブロック図である。 本発明の第10の実施形態における面推定処理の手順を示すフローチャートである。 本発明の第10の実施形態において表示部に表示される画像の例を示す図である。 本発明の第10の実施形態において表示部に表示される画像の例を示す図である。 本発明の第11の実施形態による内視鏡装置が有するCPUの機能構成を示すブロック図である。 本発明の第11の実施形態における面推定処理の手順を示すフローチャートである。 本発明の第11の実施形態において表示部に表示される画像の例を示す図である。 本発明の第12の実施形態によるパーソナルコンピュータの構成を示すブロック図である。 本発明の第12の実施形態によるパーソナルコンピュータが有するCPUの機能構成を示すブロック図である。 関連発明の実施形態による内視鏡装置が有するCPUの機能構成を示すブロック図である。 関連発明の実施形態において、注目要因が発生した領域を検出する処理の手順を示すフローチャートである。 関連発明の実施形態におけるステレオ画像の例を示す図である。 関連発明の実施形態において、三角形が設定された画像の例を示す図である。 関連発明の実施形態において、ステレオ画像に含まれる2枚の画像の各々に設定された三角形を示す図である。 関連発明の実施形態において、ステレオ画像に含まれる画像の例を示す図である。 関連発明の実施形態において、ステレオ画像に含まれる画像の例を示す図である。 関連発明の実施形態において、注目要因が発生した領域の例を示す図である。 従来技術における基準面を推定するための点を設定する例を示す図である。 従来技術における基準面を推定するための点を設定する例を示す図である。 従来技術における基準面を推定するための点を設定する例を示す図である。 従来技術における基準面を推定するための点を設定する例を示す図である。
 図面を参照し、本発明の実施形態を説明する。
 (第1の実施形態)
 図1は、本発明の第1の実施形態の面推定装置7の構成を示す。図1に示す面推定装置7は、生成部70、領域設定部71、および面推定部72を有する。
 生成部70は、被写体の2次元画像に基づいて被写体上の3つ以上の点の3次元座標を算出し、かつその3つ以上の点の3次元座標を含む点群データ(3次元画像データ)を生成する(生成ステップ)。領域設定部71は、3次元の領域および2次元の領域の一方である基準領域を設定する(領域設定ステップ)。その3次元の領域は、3つ以上の点を含み、かつ3次元空間に設定される。その3次元空間は、点群データに含まれる3次元座標を含む。その2次元の領域は、3つ以上の点を含み、かつ被写体の2次元画像に設定される。基準領域の3つ以上の点は、三角形を形成する3つの点で構成される1つ以上の組を含む。面推定部72は、基準領域に含まれる3つ以上の点に対応する点群データの3つ以上の点に基づいて、被写体の表面を近似する基準面を推定する(推定ステップ)。
 図1に示す各部は、プロセッサおよび論理回路の少なくとも1つで構成されてもよい。例えば、プロセッサは、CPU(Central Processing Unit)、DSP(Digital Signal Processor)、およびGPU(Graphics Processing Unit)の少なくとも1つである。例えば、論理回路は、ASIC(Application Specific Integrated Circuit)およびFPGA(Field-Programmable Gate Array)の少なくとも1つである。図1に示す各部は、1つまたは複数のプロセッサを含むことができる。図1に示す各部は、1つまたは複数の論理回路を含むことができる。
 面推定装置7のコンピュータがプログラムを読み込み、かつ読み込まれたプログラムを実行してもよい。そのプログラムは、生成部70、領域設定部71、および面推定部72の動作を規定する命令を含む。つまり、生成部70、領域設定部71、および面推定部72の機能はソフトウェアにより実現されてもよい。
 上記のプログラムは、コンピュータ読み取り可能な記録媒体に記録されてもよい。そのプログラムは、そのプログラムを保持するコンピュータから、伝送媒体を経由して、あるいは伝送媒体中の伝送波により面推定装置7に伝送されてもよい。プログラムを伝送する「伝送媒体」は、情報を伝送する機能を有する媒体である。情報を伝送する機能を有する媒体は、インターネット等のネットワーク(通信網)および電話回線等の通信回線(通信線)を含む。上述したプログラムは、前述した機能の一部を実現してもよい。さらに、上述したプログラムは、差分ファイル(差分プログラム)であってもよい。コンピュータに既に記録されているプログラムと差分プログラムとの組合せが、前述した機能を実現してもよい。
 図2を使用して、第1の実施形態における面推定処理について説明する。図2は、面推定処理の手順を示す。
 生成部70は、被写体の2次元画像(2D画像)に基づいて被写体上の3つ以上の点の3次元座標(3D座標)を算出し、かつその3つ以上の点の3D座標を含む点群データを生成する(ステップS1)。ステップS1は、生成ステップに対応する。
 被写体の2D画像がステレオ画像である場合、1枚の2D画像は、第1の視点から見た被写体の画像と、第1の視点と異なる第2の視点から見た被写体の画像とを含む。生成部70は、その2D画像の各画素に対応する3D座標を算出する。生成部70は、被写体上の3つ以上の点の3D座標を含む点群データを生成する。点群データにおいて3つ以上の点の各々の3D座標は2D画像上の点と関連付けられている。具体的には、点群データにおける3D座標は、2D画像上の画素と関連付けられている。例えば、点群データは、3D座標と、2D画像上の画素の位置情報とを含む。
 生成部70は、2枚以上の画像を使用することにより、かつSfM(Structure from Motion)を適用することにより、被写体上の3つ以上の点の3D座標を算出してもよい。生成部70は、空間的な位相が互いに異なる2つ以上の縞パターンが投影された被写体の2枚以上の2D画像を使用することにより、かつ位相シフト法を適用することにより、被写体上の3つ以上の点の3D座標を算出してもよい。生成部70は、明部および暗部がランダムに配置されたパターン光が照射された被写体の1枚の2D画像を使用することにより、被写体上の3つ以上の点の3D座標を算出してもよい。点群データを生成する方法は上記の方法に限らない。
 生成部70は、点群データをディスプレイに表示するための3次元画像(3D画像)を生成してもよい。3D画像は、点群データが示す3次元形状(3D形状)の画像である。3D画像は、各画素のカラーデータを含む。3D画像の各画素は、3D座標と関連付けられている。生成部70は、互いに異なる2つ以上の視点の各々に対応する3D画像を生成してもよい。
 ステップS1の後、領域設定部71は、3次元の領域および2次元の領域の一方である基準領域を設定する(ステップS2)。ステップS2は、領域設定ステップに対応する。
 図3は、点群データの3D画像の例を示す。生成部70は、点群データをメッシュデータに変換し、かつそのメッシュデータにテクスチャを付加する。生成部70は、この処理を実行することにより3D画像G1を生成する。生成部70は、点群データをメッシュデータに変換せずに3D画像を生成してもよい。
 3D画像G1において、テクスチャが付加された点群データPD1が示されている。図3に示す例では、領域設定部71は3次元の基準領域R1を設定する。基準領域R1は立方体であり、体積を持つ。基準領域R1は、直方体、球、または円筒などであってもよい。基準領域R1の形状はこれらの例に限らない。
 生成部70は、入力装置を通して入力された情報に基づいて、基準領域R1の位置および基準領域R1の大きさの少なくとも一方を設定する。あるいは、生成部70は、基準領域R1の位置および基準領域R1の大きさの少なくとも一方を自動で設定する。図3に示す例では、基準領域R1を説明するために3D画像G1が使用される。生成部70が3D画像G1を生成する必要はない。
 図4は、3次元空間(3D空間)における点群データを模式的に示す。点群データの3D座標は、3D空間SP1において定義され、かつX座標、Y座標、およびZ座標を含む。点群データにおける2つ以上の点CP1が図4に示されている。図4に示す例では、領域設定部71は3次元の基準領域R2を3D空間SP1に設定する。基準領域R2は、点群データにおける3つ以上の点CP1を含む。基準領域R2における3つ以上の点CP1は3次元状に広がる。
 基準領域R2における3つ以上の点CP1は、三角形を形成する3つの点で構成される1つ以上の組を含む。例えば、基準領域R2における点CP1a、点CP1b、および点CP1cは三角形T1を形成する。基準領域R2において、三角形を形成する3つの点で構成される多くの組が存在する。
 3D空間SP1における任意の仮想直線が基準領域R2における1つ以上の点CP1を通る場合であっても、その仮想直線が通らない1つ以上の点CP1が基準領域R2内に必ず存在する。図4において、仮想直線L1および仮想直線L2が示されている。仮想直線L1および仮想直線L2の各々は、基準領域R2における3つ以上の点CP1のうちの一部のみを通る。基準領域R2を通る任意の仮想直線は、基準領域R2における3つ以上の点CP1のうちの一部のみを通る。
 図5は、被写体の2D画像の例を示す。図5に示す例では、領域設定部71は2次元の基準領域R3を被写体の2D画像G2に設定する。基準領域R3は正方形であり、面積を持つ。基準領域R3は、3つ以上の頂点を持つ多角形であってもよい。基準領域R3は、円または楕円などであってもよい。基準領域R3の形状はこれらの例に限らない。
 生成部70は、入力装置を通して入力された情報に基づいて、基準領域R3の位置および基準領域R3の大きさの少なくとも一方を設定する。あるいは、生成部70は、基準領域R3の位置および基準領域R3の大きさの少なくとも一方を自動で設定する。
 基準領域R3は、被写体の表面上の3つ以上の点を含む。被写体の2D画像上の点は、点群データにおける点の3D座標と関連付けられている。そのため、基準領域R3における3つ以上の点の各々は、点群データにおける点の3D座標と関連付けられている。基準領域R3における3つ以上の点は2次元状に広がる。そのため、基準領域R3の3つ以上の点に対応する点群データの3つ以上の点は3次元状に広がる。
 ステップS2の後、面推定部72は、基準領域に含まれる3つ以上の点に対応する点群データの3つ以上の点に基づいて、被写体の表面を近似する基準面を推定する(ステップS3)。ステップS3は、推定ステップに対応する。ステップS3が実行されたとき、面推定処理が終了する。
 基準領域が3次元の領域である場合、基準領域は点群データにおける3つ以上の点を含む。面推定部72は、その3つ以上の点の各々の3D座標を点群データから取得する。面推定部72は、基準領域における3つ以上の点の3D座標に基づいて基準面を推定する。
 基準領域が2次元の領域である場合、基準領域は被写体の2D画像上の3つ以上の点を含む。被写体の2D画像上の点は、点群データにおける点の3D座標と関連付けられている。面推定部72は、基準領域における3つ以上の点の各々と関連付けられた3D座標を点群データから取得する。面推定部72は、基準領域における3つ以上の点に対応する点群データの3つ以上の点の3D座標に基づいて基準面を推定する。
 例えば、面推定部72は、最小二乗法を使用することにより、平面である基準面を推定する。面推定部72は、RANSAC(Random Sample Consensus)のようなロバスト推定のアルゴリズムを使用することにより基準面を推定してもよい。面推定部72は、Deep Learningのような機械学習を使用することにより基準面を推定してもよい。基準面は、球面、円筒面、または2次曲面などであってもよい。面推定部72が平面を推定する場合、基準領域は3つ以上の点を含む。面推定部72が球面を推定する場合、基準領域は4つ以上の点を含む。面推定部72が円筒面を推定する場合、基準領域は5つ以上の点を含む。基準面の形状は上記の例に限らない。
 面推定装置7は、生成部70の代わりに、被写体の2次元画像に基づいて算出された被写体上の3つ以上の点の3次元座標を含む点群データを記録媒体から読み出す読み出し部を有してもよい。読み出し部は、図2に示すステップS1を実行せずに、点群データを記録媒体から読み出してもよい(読み出しステップ)。生成部70と同様の機能を有する処理部は、点群データを生成し、記録媒体に点群データを記録する。面推定装置7と異なる装置が処理部を有してもよい。
 第1の実施形態において、面推定装置7は、3次元または2次元の基準領域を設定する。基準領域は、3次元状または2次元状に広がる3つ以上の点を含む。そのため、基準面の推定に使用される点群データの3つ以上の点が平面上または直線上で偏って位置する可能性が減る。したがって、面推定装置7は、基準面の精度を向上させることができる。
 (第2の実施形態)
 本発明の第2の実施形態を説明する。以下では、面推定装置が内視鏡装置である例を説明する。面推定装置は、面推定機能を有する装置でありさえすればよく、内視鏡装置に限らない。面推定装置は、特定の装置またはシステムに実装された組み込み機器であってもよい。面推定装置は、クラウド上の環境であってもよい。被写体は、工業製品である。
 図6は、第2の実施形態の内視鏡装置1の外観を示す。図7は、内視鏡装置1の内部構成を示す。内視鏡装置1は、被写体を撮像し、画像を生成する。検査者は、種々の被写体の観察を実施するために、挿入部2の先端に装着される光学アダプターの交換と、内蔵された映像処理プログラムの選択と、映像処理プログラムの追加とを実施することが可能である。
 図6に示す内視鏡装置1は、挿入部2、本体部3、操作部4、および表示部5を有する。
 挿入部2は、被写体の内部に挿入される。挿入部2は、先端20から基端部にわたって屈曲可能な細長い管状である。挿入部2は、被写体を撮像し、かつ撮像信号を本体部3に出力する。挿入部2の先端20には、光学アダプターが装着される。例えば、単眼の光学アダプターが挿入部2の先端20に装着される。本体部3は、挿入部2を収納する収納部を備えた制御装置である。操作部4は、内視鏡装置1に対するユーザーの操作を受け付ける。表示部5は、表示画面を有し、かつ挿入部2で取得された被写体の画像および操作メニュー等を表示画面に表示する。
 操作部4は、ユーザーインタフェース(入力装置)である。例えば、操作部4は、ボタン、スイッチ、キー、マウス、ジョイスティック、タッチパッド、トラックボール、およびタッチパネルの少なくとも1つである。表示部5は、LCD(Liquid Crystal Display)等のモニタ(ディスプレイ)である。表示部5は、タッチパネルであってもよい。その場合、操作部4および表示部5は一体化される。ユーザーは、体の一部(例えば、指)または道具を使用することにより表示部5の画面をタッチする。
 図7に示す本体部3は、内視鏡ユニット8、CCU(Camera Control Unit)9、および制御装置10を有する。内視鏡ユニット8は、図示していない光源装置および湾曲装置を有する。光源装置は、観察に必要な照明光を供給する。湾曲装置は、挿入部2に内蔵された湾曲機構を湾曲させる。挿入部2の先端20には撮像素子28が内蔵されている。撮像素子28は、イメージセンサである。撮像素子28は、光学アダプターによって形成された被写体の光学像を光電変換し、かつ撮像信号を生成する。CCU9は、撮像素子28を駆動する。撮像素子28から出力された撮像信号がCCU9に入力される。CCU9は、撮像素子28により取得された撮像信号に対して、増幅およびノイズ除去等を含む前処理を施す。CCU9は、前処理が施された撮像信号をNTSC信号等の映像信号に変換する。
 制御装置10は、映像信号処理回路12、ROM(Read Only Memory)13、RAM(Random Access Memory)14、カードインタフェース15、外部機器インタフェース16、制御インタフェース17、およびCPU(Central Processing Unit)18を有する。
 映像信号処理回路12は、CCU9から出力された映像信号に対して、所定の映像処理を施す。例えば、映像信号処理回路12は、視認性向上に関わる映像処理を実行する。例えば、その映像処理は、色再現、階調補正、ノイズ抑制、および輪郭強調などである。映像信号処理回路12は、CCU9から出力された映像信号と、CPU18によって生成されたグラフィック画像信号とを合成する。グラフィック画像信号は、操作画面の画像および計測情報等を含む。計測情報は、点群データの3D画像または計測結果等を含む。映像信号処理回路12は、合成された映像信号を表示部5に出力する。また、映像信号処理回路12は、CCU9から出力された映像信号に基づく画像データをCPU18に出力する。
 ROM13は、CPU18が内視鏡装置1の動作を制御するためのプログラムが記録された不揮発性の記録媒体である。RAM14は、CPU18が内視鏡装置1の制御のために使用する情報を一時的に記憶する揮発性の記録媒体である。CPU18は、ROM13に記録されたプログラムに基づいて内視鏡装置1の動作を制御する。
 着脱可能な記録媒体であるメモリカード42がカードインタフェース15に接続される。カードインタフェース15は、メモリカード42に記憶されている制御処理情報および画像情報等を制御装置10に取り込む。また、カードインタフェース15は、内視鏡装置1によって生成された制御処理情報および画像情報等をメモリカード42に記録する。
 USB機器等の外部機器が外部機器インタフェース16に接続される。例えば、パーソナルコンピュータ(PC)41が外部機器インタフェース16に接続される。外部機器インタフェース16は、PC41へ情報を送信し、かつPC41から情報を受信する。これによって、PC41のモニタが情報を表示することができる。また、ユーザーは、PC41に指示を入力することにより、内視鏡装置1の制御に関する操作を実施することができる。
 制御インタフェース17は、操作部4、内視鏡ユニット8、およびCCU9と動作制御のための通信を実行する。制御インタフェース17は、ユーザーによって操作部4に入力された指示をCPU18に通知する。制御インタフェース17は、光源装置および湾曲装置を制御するための制御信号を内視鏡ユニット8に出力する。制御インタフェース17は、撮像素子28を制御するための制御信号をCCU9に出力する。
 CPU18が実行するプログラムは、コンピュータ読み取り可能な記録媒体に記録されてもよい。この記録媒体に記録されたプログラムを内視鏡装置1以外のコンピュータが読み込み、かつ実行してもよい。例えば、PC41がプログラムを読み込んで実行してもよい。PC41は、プログラムに従って、内視鏡装置1を制御するための制御情報を内視鏡装置1に送信することにより内視鏡装置1を制御してもよい。あるいは、PC41は、内視鏡装置1から映像信号を取得し、かつ取得された映像信号を処理してもよい。
 上記のように、内視鏡装置1は、撮像素子28およびCPU18を有する。撮像素子28は、被写体を撮像し、かつ撮像信号を生成する。撮像信号は、被写体の画像を含む。したがって、撮像素子28は、被写体を撮像することにより生成された、その被写体の画像を取得する。撮像素子28によって取得された画像は映像信号処理回路12を経由してCPU18に入力される。
 撮像素子28は、被写体の画像を取得する画像取得部の機能を有する。画像取得部は、画像入力装置であってもよい。例えば、PC41が面推定装置として動作する場合、画像取得部は、内視鏡装置1と通信を実行する通信インタフェース(通信機)である。画像取得部は無線通信機であってもよい。画像取得部は、画像が記録された記録媒体から画像を読み出す読み出し回路であってもよい。
 図8は、CPU18の機能構成を示す。制御部180、生成部181、領域設定部182、表示制御部183、位置算出部184、点設定部185、および面推定部186によってCPU18の機能が構成されている。図8に示すブロックの少なくとも1つがCPU18とは別の回路で構成されてもよい。
 図8に示す各部は、プロセッサおよび論理回路の少なくとも1つで構成されてもよい。図8に示す各部は、1つまたは複数のプロセッサを含むことができる。図8に示す各部は、1つまたは複数の論理回路を含むことができる。
 制御部180は、被写体の2D画像(画像データ)を映像信号処理回路12から取得し、かつ図8に示す各部が実行する処理を制御する。
 生成部181は、図1に示す生成部70の機能と同じ機能を持つ。生成部181は、被写体の2D画像に基づいて被写体上の3つ以上の点の3D座標を算出し、かつその3つ以上の点の3D座標を含む点群データを生成する(生成ステップ)。生成部181は、第1の実施形態で説明した方法と同じ方法で点群データを生成することができる。また、生成部181は、点群データを表示部5に表示するための3D画像を生成する。
 領域設定部182は、図1に示す領域設定部71と同じ機能を持つ。領域設定部182は、3次元の領域および2次元の領域の一方である基準領域を設定する(領域設定ステップ)。領域設定部182は、第1の実施形態で説明した方法と同じ方法で基準領域を設定することができる。
 表示制御部183は、撮像素子28によって取得された被写体の2D画像と、生成部181によって生成された点群データの3D画像とを表示部5に表示する。例えば、表示制御部183は、映像信号処理回路12によって実行される処理を制御する。表示制御部183は、映像信号処理回路12によって処理された映像信号を映像信号処理回路12から表示部5へ出力させる。その映像信号は、被写体の2D画像の各画素のカラーデータを含む。表示部5は、映像信号処理回路12から出力された映像信号に基づいて被写体の2D画像を表示する。
 あるいは、表示制御部183は、3D映像信号を、映像信号処理回路12を経由して表示部5へ出力する。3D映像信号は、点群データの3D画像の各画素のカラーデータを含む。表示部5は、映像信号処理回路12から出力された3D映像信号に基づいて点群データの3D画像を表示する。具体的には、表示制御部183は、点群データの3D画像を表示するためのグラフィック画像信号を生成する。表示制御部183は、生成されたグラフィック画像信号を映像信号処理回路12に出力する。映像信号処理回路12は、CCU9から出力された映像信号と、CPU18から出力されたグラフィック画像信号とを合成する。映像信号処理回路12は、合成された映像信号を表示部5に出力する。表示部5は、被写体の2D画像および点群データの3D画像を表示する。
 表示制御部183は、各種情報を表示部5に表示する。つまり、表示制御部183は、画像上に各種情報を表示する。各種情報は、計測結果等を含む。各種情報は、カーソルを含んでもよい。カーソルは、ユーザーが画像上の特定の点を指定するためのマークである。
 例えば、表示制御部183は、各種情報のグラフィック画像信号を生成する。表示制御部183は、生成されたグラフィック画像信号を映像信号処理回路12に出力する。映像信号処理回路12は、CCU9から出力された映像信号と、CPU18から出力されたグラフィック画像信号とを合成する。これにより、各種情報が画像に重畳される。映像信号処理回路12は、合成された映像信号を表示部5に出力する。表示部5は、各種情報が重畳された画像を表示する。
 ユーザーは、操作部4を操作することにより、画像上の位置を示す位置情報を操作部4に入力する。操作部4は、ユーザーが操作部4に入力した位置情報を出力する。操作部4に入力された位置情報は、入力部である制御インタフェース17に入力される。その位置情報は、制御インタフェース17からCPU18に出力される。位置算出部184は、操作部4に入力された位置情報に基づいて画像上の位置を算出する。
 例えば、カーソルが画像上に表示される場合、位置情報は、カーソルが表示される位置を示す。表示制御部183は、位置算出部184によって算出された位置にカーソルを表示する。
 表示部5および操作部4がタッチパネルである場合、ユーザーは表示部5の画面をタッチすることにより画像上の位置を操作部4に入力してもよい。その場合、操作部4は、その位置を示す位置情報を出力する。
 点設定部185は、被写体上の点を、操作部4を通して受け付ける。例えば、ユーザーは、カーソルを画像上の所望の位置に移動させ、かつ所定の操作を実行する。このとき、点設定部185は、その位置に対応する点を受け付ける。表示部5および操作部4がタッチパネルである場合、ユーザーは表示部5の画面をタッチすることにより画像上の点を操作部4に入力する。点設定部185は、その点を受け付ける。点設定部185は、受け付けられた点を示す点情報を生成する。
 点設定部185が被写体の2D画像上の点を受け付けた場合、点情報はその点に対応する画素の座標を含む。その画素の座標は、点群データにおける3D座標と関連付けられている。点設定部185が点群データの3D画像上の点を受け付けた場合、点情報はその点の3D座標を含む。
 点設定部185は、基準点を受け付ける。基準点は、基準領域を設定するための基準位置を示す。
 点設定部185が被写体の2D画像上の点を受け付けた場合、点設定部185は、受け付けられた点をその2D画像に設定する。点設定部185が点群データの3D画像上の点を受け付けた場合、点設定部185は、受け付けられた点をその3D画像に設定する。点設定部185によって設定された点の位置情報は、RAM14に保持される。点が特定の画像に関連付けられることにより、その点が設定される。
 面推定部186は、基準領域に含まれる3つ以上の点に対応する点群データの3つ以上の点に基づいて、被写体の表面を近似する基準面を推定する(推定ステップ)。面推定部186は、第1の実施形態で説明した方法と同じ方法で基準面を推定することができる。
 図9を使用することにより、第2の実施形態における面推定処理について説明する。図9は、面推定処理の手順を示す。
 生成部181は、被写体の2D画像に基づいて被写体上の3つ以上の点の3D座標を算出し、かつその3つ以上の点の3D座標を含む点群データを生成する。また、生成部181は、点群データの3D画像を生成する(ステップS101)。ステップS101は、生成ステップに対応する。
 ステップS101の後、表示制御部183は、被写体の2D画像および点群データの3D画像を表示部5に表示する(ステップS102)。表示制御部183は、被写体の2D画像のみを表示部5に表示してもよい。
 図10は、ステップS102において表示部5に表示される画像の例を示す。被写体の2D画像G11および点群データの3D画像G12が表示部5に表示される。3D画像G12の視点を変更する指示が操作部4を通して入力された場合、生成部181は、変更された視点から見た被写体に対応する点群データの新たな3D画像を生成してもよい。表示制御部183は、3D画像G12の代わりにその新たな3D画像を表示部5に表示してもよい。
 図10に示す例では、2D画像G11および3D画像G12が表示部5の画面の水平方向に並べられている。2D画像G11および3D画像G12の配置は、この例に限らない。例えば、2D画像G11および3D画像G12が表示部5の画面の垂直方向に並べられてもよい。このとき、2D画像G11および3D画像G12は90度回転してもよい。2D画像G11の一部および3D画像G12の一部が互いに重なってもよい。
 被写体の2D画像がステレオ画像である場合、その2D画像は、第1の視点から見た被写体の第1の画像と、第1の視点と異なる第2の視点から見た被写体の第2の画像とを含む。表示制御部183は、第1の画像および第2の画像を表示部5に表示してもよい。あるいは、表示制御部183は、第1の画像および第2の画像の一方のみを表示部5に表示してもよい。
 ステップS102の後、点設定部185は、被写体の2D画像上の2つの基準点を、操作部4を通して受け付け、かつ受け付けられた2つの基準点の各々を示す点情報を生成する(ステップS103)。
 図11は、ステップS103において表示部5に表示される画像の例を示す。図10に示す2D画像G11と同じ2D画像G11および図10に示す3D画像G12と同じ3D画像G12が表示部5に表示される。
 カーソルが2D画像G11上に表示される例では、ユーザーは、カーソルを2D画像G11上の所望の位置に移動させ、かつ所定の操作を実行する。このとき、点設定部185は、その位置に対応する点を受け付ける。表示部5および操作部4がタッチパネルである例では、ユーザーは表示部5の画面をタッチする。このとき、点設定部185は、タッチされた位置に対応する点を受け付ける。
 図11に示す例では、点設定部185は基準点P11および基準点P12を受け付ける。基準点P11を示すマークおよび基準点P12を示すマークが2D画像G11上に表示されてもよい。
 ステップS103の後、領域設定部182は、点情報が示す2つの基準点に基づいて基準領域を設定する(ステップS104)。ステップS104は、領域設定ステップに対応する。
 領域設定部182は、2次元の基準領域を被写体の2D画像に設定する。例えば、領域設定部182は、図11に示す基準点P11および基準点P12に基づいて基準領域R11を2D画像G11に設定する。図11に示す例では、基準領域R11の形状は長方形である。基準点P11および基準点P12は、基準領域R11の対角線上の頂点である。
 領域設定部182によって設定された基準領域の情報は、RAM14に保持される。その情報は、基準領域の位置および基準領域の大きさを含む。基準領域が被写体の2D画像に関連付けられることにより、その基準領域が設定される。
 ステップS104の後、表示制御部183は、基準領域を被写体の2D画像上に表示する(ステップS105)。
 具体的には、表示制御部183は、基準領域を表示するためのグラフィック画像信号を生成する。表示制御部183は、生成されたグラフィック画像信号を映像信号処理回路12に出力する。映像信号処理回路12は、CCU9から出力された映像信号と、CPU18から出力されたグラフィック画像信号とを合成する。映像信号処理回路12は、合成された映像信号を表示部5に出力する。表示部5は、基準領域が重畳された被写体の2D画像を表示する。
 図12は、ステップS105において表示部5に表示される画像の例を示す。図10に示す2D画像G11と同じ2D画像G11および図10に示す3D画像G12と同じ3D画像G12が表示部5に表示される。基準領域R11が2D画像G11上に表示される。
 図12に示す例では、基準領域R11の輪郭を示す線(枠)が2D画像G11上に表示される。図12に示す例では、基準領域R11内の被写体の表面が視認できる。基準領域R11の内側が所定の色または模様で表示されてもよい。このとき、基準領域R11内の被写体の表面が視認できなくてもよい。ユーザーが基準領域R11の位置および大きさを確認できる限り、基準領域R11を表示する方法は上記の方法に限らない。
 表示制御部183は、ステップS102において被写体の2D画像を表示部5に表示し、かつステップS105において基準領域をその2D画像上に表示する(画像表示ステップ)。ユーザーは、自身が望む位置に基準領域が設定されたか否かを確認することができる。
 ステップS105の後、面推定部186は、基準領域に含まれる3つ以上の点に対応する点群データの3つ以上の点に基づいて、被写体の表面を近似する基準面を推定する(ステップS106)。ステップS106は、推定ステップに対応する。
 面推定部186は、被写体の2D画像の基準領域における全ての画素を抽出する。被写体の2D画像における画素は、点群データにおける3D座標と関連付けられている。面推定部186は、抽出された画素の各々の3D座標を点群データから取得する。面推定部186は、取得された3D座標を使用することにより基準面を推定する。
 面推定部186は、推定ステップにおいて、基準領域に含まれる4つ以上の点から3つ以上の点を選択してもよい。面推定部186は、推定ステップにおいて、選択された3つ以上の点に対応する点群データの3つ以上の点に基づいて、被写体の表面を近似する基準面を推定してもよい。
 つまり、面推定部186は、被写体の2D画像の基準領域における全ての画素のうちの一部を抽出してもよい。例えば、面推定部186は、その2D画像の基準領域における全ての画素のうち所定の割合(例えば50%)以上を抽出してもよい。抽出された画素は、三角形を形成する3つの画素で構成される1つ以上の組を含む。抽出された画素の全てを通る直線は存在しない。
 ステップS106の後、表示制御部183は、基準面を被写体の2D画像上に表示する(ステップS107)。ステップS107が実行されたとき、面推定処理が終了する。
 具体的には、表示制御部183は、基準面を表示するためのグラフィック画像信号を生成する。表示制御部183は、生成されたグラフィック画像信号を映像信号処理回路12に出力する。映像信号処理回路12は、CCU9から出力された映像信号と、CPU18から出力されたグラフィック画像信号とを合成する。映像信号処理回路12は、合成された映像信号を表示部5に出力する。表示部5は、基準面が重畳された被写体の2D画像を表示する。
 図13は、ステップS107において表示部5に表示される画像の例を示す。図10に示す2D画像G11と同じ2D画像G11および図10に示す3D画像G12と同じ3D画像G12が表示部5に表示される。基準面F11が2D画像G11上に表示される。
 例えば、表示制御部183は、2D画像G11における各画素と関連付けられた3D座標を点群データから取得する。表示制御部183は、その3D座標を持つ点と基準面との間の3次元距離(3D距離)を算出する。その3D距離が所定距離よりも小さい場合、表示制御部183はその点に対応する2D画像G11上の画素を抽出する。表示制御部183は、2D画像G11の全体または一部の画素を使用することにより上記の処理を繰り返す。表示制御部183は、抽出された画素を含む領域を基準面として表示するためのグラフィック画像信号を生成する。
 図13に示す例では、抽出された画素を含む領域の輪郭を示す線(枠)が基準面F11として2D画像G11上に表示される。図13に示す例では、基準面F11を示す線内の被写体の表面が視認できる。その線の内側が所定の色または模様で表示されてもよい。このとき、その線内の被写体の表面が視認できなくてもよい。ユーザーが基準面F11の位置を確認できる限り、基準面F11を表示する方法は上記の方法に限らない。ユーザーは、基準面F11が被写体の表面を正確に近似できているか否かを確認することができる。
 図13に示す例では、図12に示す基準領域R11は表示されていない。基準領域R11および基準面F11が2D画像G11上に表示されてもよい。
 表示制御部183は、ステップS102において被写体の2D画像を表示部5に表示し、かつステップS107において基準面に対応する領域をその2D画像上に表示する(画像表示ステップ)。ユーザーは、基準面が被写体の表面を正確に近似できているか否かを確認することができる。
 点設定部185がステップS103において基準点を受け付けた後、ユーザーはその基準点を変更してもよい。例えば、ユーザーは基準点の新たな位置を示す位置情報を操作部4に入力する。その位置情報は、制御インタフェース17を経由してCPU18に出力される。領域設定部182は、その位置情報に基づいて基準点を変更する。
 基準領域の大きさおよび基準領域の位置の少なくとも一方を示す領域情報が記録媒体に予め記録されてもよい。領域設定部182は、ステップS104において、領域情報に基づいて基準領域の大きさおよび基準領域の位置の少なくとも一方を設定してもよい。
 例えば、メモリカード42は領域情報を記憶する。領域情報は、カードインタフェース15を経由してメモリカード42からRAM14に転送される。領域設定部182は、領域情報をRAM14から読み出す。
 領域設定部182が基準領域の大きさを設定する例を説明する。ユーザーは被写体の2D画像上の基準点を指定し、かつ点設定部185はその基準点を受け付ける。領域設定部182は、点設定部185によって受け付けられた基準点を中心に持つ長方形を2D画像に設定する。領域情報は、基準領域の水平方向の画素数および基準領域の垂直方向の画素数を示す。領域設定部182は、領域情報に基づいてその長方形の水平方向の画素数およびその長方形の垂直方向の画素数を設定する。ユーザーが基準領域の大きさを指定する度にその大きさを示す領域情報が記録媒体に記録されてもよい。
 領域設定部182が基準領域の位置を設定する例を説明する。領域情報は、被写体の2D画像上の所定の位置を示す。例えば、その所定の位置はその2D画像の中心である。領域設定部182は、領域情報が示す位置に基準領域を設定する。このとき、領域設定部182は、基準領域の大きさをユーザーによって指定された大きさに設定する。ユーザーが基準領域の位置(基準点)を指定する度にその位置を示す領域情報が記録媒体に記録されてもよい。領域設定部182は、領域情報に基づいて基準領域の大きさおよび基準領域の位置を設定してもよい。
 2つ以上の領域情報が記録媒体に予め記録されてもよい。領域設定部182は、ステップS104において、操作部4を通して入力された情報に基づいて2つ以上の領域情報のうちの1つを選択してもよい。領域設定部182は、ステップS104において、選択された領域情報に基づいて基準領域の大きさおよび基準領域の位置の一方を設定してもよい。
 2つ以上の領域情報は、互いに異なる大きさを示す。例えば、第1の領域情報は第1の大きさを示し、かつ第2の領域情報は第1の大きさと異なる第2の大きさを示す。あるいは、2つ以上の領域情報は、互いに異なる位置を示す。例えば、第1の領域情報は第1の位置を示し、かつ第2の領域情報は第1の位置と異なる第2の位置を示す。ユーザーは第1の領域情報および第2の領域情報の一方を選択し、かつ選択結果を操作部4に入力する。その選択結果は、制御インタフェース17を経由してCPU18に出力される。領域設定部182は、ユーザーによって選択された領域情報に基づいて基準領域の大きさまたは基準領域の位置を設定する。
 領域設定部182がステップS104において基準領域を設定した後、ユーザーは任意のタイミングで基準領域の大きさおよび基準領域の位置の少なくとも一方を変更してもよい。そのタイミングは、基準領域がステップS105において表示された後、または基準面がステップS107において表示された後であってもよい。例えば、ユーザーは大きさおよび位置の少なくとも一方を示す情報を操作部4に入力する。その情報は、制御インタフェース17を経由してCPU18に出力される。領域設定部182は、その情報に基づいて基準領域の大きさおよび基準領域の位置の少なくとも一方を変更する。
 図9に示す面推定処理において、領域設定部182は、2つの基準点に基づいて基準領域を設定する。基準点の数は2つに限らない。上述したように、領域設定部182は、1つの基準点を中心に持つ基準領域を設定してもよい。
 領域設定部182は、基準点を使用せずに基準領域を設定してもよい。したがって、ステップS103が実行される必要はない。CPU18は、位置算出部184および点設定部185の機能を有する必要はない。基準点を使用せずに基準領域を設定する方法については、第10の実施形態において説明する。
 表示制御部183は、点群データの3D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点をその3D画像上に表示してもよい(画像表示ステップ)。3次元の基準領域に含まれる3つ以上の点が基準面の推定に使用される。表示制御部183は、その3つ以上の点を点群データから抽出し、かつその3つ以上の点をその3D画像上に表示する。例えば、その点に対応する画素が所定の色で表示される。
 表示制御部183は、被写体の2D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点に対応する3つ以上の点をその2D画像上に表示してもよい(画像表示ステップ)。2次元の基準領域に含まれる3つ以上の点に対応する点群データの3つ以上の点が基準面の推定に使用される。表示制御部183は、その3つ以上の点を点群データから抽出する。表示制御部183は、点群データから抽出された3つ以上の点の各々に対応する点を基準領域から抽出し、かつその点をその2D画像上に表示する。例えば、その点に対応する画素が所定の色で表示される。
 基準領域の表示は必須ではない。したがって、ステップS105が実行される必要はない。基準面の表示は必須ではない。したがって、ステップS107が実行される必要はない。
 基準点の設定、基準領域の表示、および基準面の表示が不要である場合、画像の表示は必須ではない。したがって、ステップS102が実行される必要はない。CPU18は、表示制御部183の機能を有する必要はない。
 面推定部186は、ステップS106において、基準面の幾何学的な特徴を推定してもよい。例えば、基準面が円筒面である場合、面推定部186は、円筒の直径を推定してもよい。基準面が球面である場合、面推定部186は、球の直径を推定してもよい。
 面推定部186は、基準面の傾きを推定してもよい。その傾きは、所定の平面と基準面との間の角度で表現される。例えば、その所定の平面は、内視鏡の視線に垂直である。
 面推定部186は、基準面の種類を推定してもよい。その種類は、平面、円筒面、および球面などのうちの1つである。面推定部186は、基準面が平面であると仮定して基準面を推定する。このとき、面推定部186は、基準面と被写体の表面との間の距離などに基づいて推定誤差を算出する。同様に、面推定部186は、基準面が円筒面または球面などであると仮定して基準面を推定し、かつ推定誤差を算出する。面推定部186は、最も小さな推定誤差を持つ基準面を最終的な基準面として得る。これと同時に、面推定部186は、その基準面の種類を得る。
 基準面の推定結果はその基準面の式のパラメータを含んでもよい。
 表示制御部183は、基準面の幾何学的な特徴の推定結果を表示部5に表示してもよい。その推定結果は、表示制御部183によって生成されるグラフィック画像信号に含まれる。
 面推定処理における処理の順番は、図9に示す順番に限らない。例えば、ステップS101が実行される前に被写体の2D画像が表示部5に表示されてもよい。
 第2の実施形態において、内視鏡装置1は、2次元の基準領域を被写体の2D画像に設定する。基準領域は、2次元状に広がる3つ以上の点を含む。そのため、基準面の推定に使用される点群データの3つ以上の点が平面上または直線上に偏って位置する可能性が減る。したがって、内視鏡装置1は、基準面の精度を向上させることができる。
 (第2の実施形態の第1の変形例)
 本発明の第2の実施形態の第1の変形例を説明する。図10から図13に示す例では、被写体の2D画像および点群データの3D画像が表示部5に表示され、かつその2D画像が2次元の基準領域の設定に使用される。表示部5に表示される画像と、基準領域の設定に使用される画像との組み合わせはこの例に限らない。第2の実施形態の第1の変形例において、点群データの3D画像が表示部5に表示され、かつその3D画像が3次元の基準領域の設定に使用される。
 第2の実施形態の第1の変形例における面推定処理を説明する。第2の実施形態の第1の変形例における面推定処理は、図9に従って実行される。以下では、第2の実施形態における面推定処理と同じ処理の説明を省略する。
 表示制御部183は、ステップS102において、点群データの3D画像を表示部5に表示する(画像表示ステップ)。ステップS102において被写体の2D画像は表示されない。点設定部185は、ステップS103において、点群データの3D画像上の3つの基準点を、操作部4を通して受け付け、かつ受け付けられた3つの基準点の各々を示す点情報を生成する。
 図14は、ステップS103において表示部5に表示される画像の例を示す。図10に示す3D画像G12と同じ3D画像G12が表示部5に表示される。
 カーソルが3D画像G12上に表示される例では、ユーザーは、カーソルを3D画像G12上の所望の位置に移動させ、かつ所定の操作を実行する。このとき、点設定部185は、その位置に対応する点を受け付ける。表示部5および操作部4がタッチパネルである例では、ユーザーは表示部5の画面をタッチする。このとき、点設定部185は、タッチされた位置に対応する点を受け付ける。
 図14に示す例では、点設定部185は基準点P21および基準点P22を受け付ける。基準点P21を示すマークおよび基準点P22を示すマークが3D画像G12上に表示されてもよい。
 領域設定部182は、ステップS104において、点群データの3D座標を定義する3D空間に3次元の基準領域を設定する。図14に示す例では、領域設定部182は、基準点P21および基準点P22に基づいて長方形RC21を算出する。基準点P21および基準点P22は、長方形RC21の対角線上の頂点である。
 2つの基準点が設定された後、ユーザーは3番目の基準点を指定する。図15は、3番目の基準点が指定されるときに表示部5に表示される画像の例を示す。点群データの3D画像G13が表示部5に表示される。表示部5および操作部4がタッチパネルである例では、ユーザーは図14に示す3D画像G12上でスワイプ操作を実施し、3D画像G12の視点を変更する。3D画像G13は、図14に示す3D画像G12に写っている被写体の断面を示す。
 ユーザーは、3D画像G13上に表示されたカーソルを使用することにより、あるいは表示部5の画面をタッチすることにより、基準点P23を指定する。点設定部185は基準点P23を受け付ける。基準点P23を示すマークが3D画像G13上に表示されてもよい。表示部5および操作部4がタッチパネルである例では、ユーザーは、ピンチ操作を実施することにより3D画像G13を拡大または縮小してもよい。
 図14および図15に示す例では、領域設定部182は、基準点P21、基準点P22、および基準点P23に基づいて基準領域R21を算出する。領域設定部182は、点群データの3D座標を定義する3D空間に基準領域R21を設定する。図15に示す例では、基準領域R21の形状は直方体である。その直方体の1つの面は、図14に示す長方形RC21によって定義される。その直方体の高さは、長方形RC21と基準点P23との間の3D距離と同じである。
 領域設定部182によって設定された基準領域の情報は、RAM14に保持される。その情報は、基準領域の位置および基準領域の大きさを含む。基準領域が点群データに関連付けられることにより、その基準領域が設定される。
 表示制御部183は、ステップS105において、基準領域を点群データの3D画像上に表示する(画像表示ステップ)。表示部5は、基準領域が重畳された3D画像を表示する。ユーザーは、自身が望む位置に基準領域が設定されたか否かを確認することができる。
 面推定部186は、ステップS106において、基準領域に含まれる3つ以上の点に対応する点群データの3つ以上の点に基づいて基準面を推定する。例えば、面推定部186は、基準領域における全ての点を抽出する。面推定部186は、抽出された点の各々の3D座標を使用することにより基準面を推定する。面推定部186は、基準領域における点のうちの一部を抽出してもよい。例えば、面推定部186は、基準領域における全ての点のうち所定の割合(例えば50%)以上を抽出してもよい。抽出された点は、三角形を形成する3つの点で構成される1つ以上の組を含む。抽出された点の全てを通る直線は存在しない。
 表示制御部183は、ステップS107において、基準面を点群データの3D画像上に表示する。表示部5は、基準面が重畳された3D画像を表示する。ユーザーは、基準面が被写体の表面を正確に近似できているか否かを確認することができる。
 図16は、ステップS107において表示部5に表示される画像の例を示す。点群データの3D画像G14が表示部5に表示される。
 例えば、表示制御部183は、点群データにおける各点と基準面との間の3D距離を算出する。点と基準面との間の3D距離が所定距離よりも小さい場合、表示制御部183はその点を抽出する。表示制御部183は、点群データの全体または一部における点を使用することにより上記の処理を繰り返す。表示制御部183は、抽出された点を含む領域を基準面として表示するためのグラフィック画像信号を生成する。
 図16に示す例では、抽出された点を含む領域が基準面F21として3D画像G14上に表示される。例えば、基準面F21は、被写体の表面の色と異なる色で表示される。ユーザーが基準面F21の位置を確認できる限り、基準面F21を表示する方法は上記の方法に限らない。ユーザーは、基準面F21が被写体の表面を正確に近似できているか否かを確認することができる。
 図14から図16に示す例では、点群データの3D画像が表示部5に表示され、かつその3D画像が基準領域の設定に使用される。被写体の2D画像および点群データの3D画像が表示部5に表示され、かつその3D画像が基準領域の設定に使用されてもよい。
 被写体の表面に凹部または凸部が形成されており、かつその凹部または凸部を除く部分を近似する基準面が要求される場合がある。基準領域が被写体の2D画像に設定される場合、その基準領域が凹部または凸部の画素を含む可能性がある。そのため、基準面の精度が悪化する可能性がある。被写体の表面に段差が形成されており、かつ基準領域がその段差の画素を含む場合も、基準面の精度が悪化する可能性がある。
 第2の実施形態の第1の変形例において、領域設定部182は3次元の基準領域を設定する。図15に示す例では、領域設定部182は、被写体の凹部に対応する点を多く含まない基準領域R21を設定する。そのため、内視鏡装置1は、基準面の精度を向上させることができる。
 (第2の実施形態の第2の変形例)
 本発明の第2の実施形態の第2の変形例を説明する。第2の実施形態の第2の変形例において、3次元の基準領域が設定される。その基準領域は、連続性を持つ3つ以上の点の集合である。
 第2の実施形態の第2の変形例における面推定処理を説明する。第2の実施形態の第2の変形例における面推定処理は、図9に従って実行される。以下では、第2の実施形態の第1の変形例における面推定処理と同じ処理の説明を省略する。
 領域設定部182は、ステップS104において、点群データに含まれる3次元座標に対応する3つ以上の点の連続性を判断する。領域設定部182は、連続性を持つと判断された3つ以上の点のみを含む基準領域を設定する。
 具体的には、領域設定部182は、3次元の判断領域を設定する。判断領域の設定方法は、第2の実施形態の第1の変形例で説明した基準領域の設定方法と同じである。領域設定部182は、判断領域における点の連続性を判断する。例えば、領域設定部182は、互いに隣接する2点間の3D距離を使用する。領域設定部182は、その3D距離に基づいて、判断領域における各点を分類する。
 点群データに対応する各点を分類する簡易的な方法としてセグメンテーションがある。例えば、領域設定部182は、Euclidean Cluster Extractionをセグメンテーションに使用することができる。これは、オープンソースであるPCL(Point Cloud Library)に搭載されている機能である。
 領域設定部182は、この機能を使用することにより、各点から所定距離以内にある点を近傍点と判断する。1つの点およびその近傍点は、同じ物体上にある。例えば、被写体が、互いに離れた第1の物体および第2の物体を有する場合、点群データに対応する各点は、第1の物体上の点および第2の物体上の点のいずれか1つに分類される。領域設定部182は、点群データに含まれる3次元座標に対応する3つ以上の点の各々を2つ以上の物体のうちの1つに割り当てる。これにより、領域設定部182は、点群データにおける3つ以上の点を2つ以上の領域に分割する。上記の例では、点群データにおける3つ以上の点は、第1の物体上の点からなる第1の領域と、第2の物体上の点からなる第2の領域とに分割される。被写体が1つの物体のみである場合、領域設定部182は、点群データにおける全ての点を1つの物体に割り当てる。
 領域設定部182は、判断領域において上記のセグメンテーションを実行する。これにより、領域設定部182は、判断領域における各点を1つ以上の物体のいずれか1つに割り当てる。領域設定部182は、セグメンテーションの結果に基づいて、判断領域における点が連続的な表面を構成するか否かを判断する。1つの物体に割り当てられた2つ以上の点は被写体の連続的な表面を構成する。つまり、その2つ以上の点は連続性を持つ。2つの物体の間では被写体の表面は不連続である。つまり、その2つの物体の間では点は連続性を失う。領域設定部182は、1つの物体を選択し、かつ選択された物体に含まれる3つ以上の点を判断領域から抽出する。領域設定部182は、抽出された3つ以上の点を含む基準領域を設定する。基準領域は、判断領域における点の全てまたは一部を含む。
 図17および図18は、基準領域の例を示す。以下では、点群データの3D画像を参照し、基準領域を説明する。
 図10に示す3D画像G12と同じ3D画像G12が図17に示されている。3D画像G15が図17に示されている。3D画像G15は、3D画像G12に写っている被写体の断面を示す。領域設定部182は、被写体の凹部とその周辺との点の全てを物体OB31に割り当てる。領域設定部182は、物体OB31内の点を含む基準領域R31を設定する。
 3D画像G12aおよび3D画像G16が図18に示されている。3D画像G16は、3D画像G12aに写っている被写体の断面を示す。領域設定部182は、被写体の凹部とその周辺との点を物体OB32または物体OB33に割り当てる。物体OB32および物体OB33は互いにつながっていない。領域設定部182は、物体OB32内の点を含む基準領域R32を設定する。基準領域R32は、物体OB33内の点を含まない。物体OB33内の点は基準面の推定に使用されない。
 2枚以上の2D画像を使用することにより点群データを生成する方法では、1枚の2D画像に写っている領域が他の2D画像に写っていない場合がある。そのため、その領域における点の3D座標を算出できない場合がある。その場合、図18に示すように点群データが示す被写体の表面が不連続になる。
 第2の実施形態の第2の変形例において、被写体の連続的な表面に対応する点のみに基づいて基準面が推定される。そのため、内視鏡装置1は、基準面の精度を向上させることができる。
 (第2の実施形態の第3の変形例)
 本発明の第2の実施形態の第3の変形例を説明する。第2の実施形態の第3の変形例において、2つ以上の視点の各々から見た点群データの3D画像が表示部5に表示され、かつ基準面がその3D画像上に表示される。
 第2の実施形態の第3の変形例における面推定処理を説明する。第2の実施形態の第3の変形例における面推定処理は、図9に従って実行される。以下では、第2の実施形態の第1の変形例における面推定処理と同じ処理の説明を省略する。
 生成部181は、ステップS101において、2つ以上の視点の各々から見た点群データの3D画像を生成する。以下では、生成部181が3枚の3D画像を生成する例を説明する。3枚の3D画像を生成するための視線の3つの方向は互いに垂直であってもよい。例えば、生成部181は、X軸に平行に見た点群データの3D画像、Y軸に平行に見た点群データの3D画像、およびZ軸に平行に見た点群データの3D画像を生成してもよい。
 表示制御部183は、ステップS102において、3枚の3D画像を表示部5に表示する。表示制御部183は、ステップS107において、基準面を各3D画像上に表示する。表示部5は、基準面が重畳された3D画像を表示する。
 図19は、ステップS107において表示部5に表示される画像の例を示す。3D画像G17、3D画像G18、および3D画像G19が表示部5に表示される。3D画像G17は、第1の視点から見た点群データの3D画像である。3D画像G18は、第1の視点と異なる第2の視点から見た点群データの3D画像である。3D画像G19は、第1の視点および第2の視点と異なる第3の視点から見た点群データの3D画像である。
 表示制御部183は、図16に示す基準面F21を表示するための処理と同様の処理を実行する。表示制御部183は、基準面F41を3D画像G17、3D画像G18、および3D画像G19上に表示する。
 表示制御部183は、被写体の表面または基準面に平行な方向に見た点群データの3D画像を表示部5に表示してもよい。これにより、ユーザーが基準面を確認することが容易になる。
 生成部181は、点群データにおける点の一部を抽出し、かつ抽出された点を含む3D画像を生成してもよい。表示制御部183は、その3D画像を表示部5に表示してもよい。
 例えば、生成部181は、点群データにおける全ての点の第1の3D画像を生成する。第1の3D画像は、第1の視点から見た点群データの3D画像である。生成部181は、点群データから抽出された点を含む第2の3D画像を生成する。第2の3D画像は、第1の視点と異なる第2の視点から見た点群データの3D画像である。表示制御部183は、第1の3D画像および第2の3D画像を表示部5に表示する。このとき、表示制御部183は、拡大された第2の3D画像を表示部5に表示してもよい。表示制御部183は、基準面を第1の3D画像および第2の3D画像上に表示する。
 第2の実施形態の第3の変形例において、基準面が、2つ以上の視点の各々から見た点群データの3D画像上に表示される。ユーザーは、基準面が被写体の表面を正確に近似できているか否かを確認することができる。
 (第3の実施形態)
 本発明の第3の実施形態を説明する。第3の実施形態の内視鏡装置1は3次元計測機能を持つ。
 第3の実施形態において、図8に示すCPU18は、図20に示すCPU18aに変更される。図20は、CPU18aの機能構成を示す。制御部180、生成部181、領域設定部182、表示制御部183、位置算出部184、点設定部185、面推定部186、および計測部187によってCPU18aの機能が構成されている。図20に示すブロックの少なくとも1つがCPU18aとは別の回路で構成されてもよい。図8に示す構成と同じ構成の説明を省略する。
 図20に示す各部は、プロセッサおよび論理回路の少なくとも1つで構成されてもよい。図20に示す各部は、1つまたは複数のプロセッサを含むことができる。図20に示す各部は、1つまたは複数の論理回路を含むことができる。
 計測部187は、基準面に基づいて被写体の大きさを計測する(計測ステップ)。例えば、計測部187は、面基準計測を実行する。つまり、計測部187は、計測ステップにおいて、基準面と被写体の表面上の点との間の3D距離を計測する。
 点設定部185は、第2の実施形態と同様に基準点を受け付ける。基準点は、基準領域を設定するための基準位置を示す。さらに、点設定部185は、計測点を受け付け、かつ受け付けられた計測点を示す点情報を生成する。計測点は、被写体の大きさを計測する位置を示す。ユーザーは、画像上に表示されたカーソルを使用することにより、あるいは表示部5の画面をタッチすることにより、計測点を指定する。
 計測部187は、基準面と、点情報が示す計測点との間の3D距離を算出する。これにより、計測部187は、被写体の表面における凹部の深さまたは被写体の表面における凸部の高さを計測することができる。
 図21を使用することにより、第3の実施形態における3次元計測(3D計測)について説明する。図21は、3D計測の手順を示す。図9に示す処理と同じ処理の説明を省略する。
 ステップS107の後、点設定部185は、被写体の2D画像上の1つの計測点を、操作部4を通して受け付け、かつ受け付けられた計測点を示す点情報を生成する(ステップS108)。
 ステップS108の後、計測部187は、ステップS106において推定された基準面と、点情報が示す計測点とに基づいて被写体の大きさを計測する(ステップS109)。ステップS109は、計測ステップに対応する。
 ステップS109の後、表示制御部183は、計測結果を被写体の2D画像上に表示する(ステップS110)。計測結果は、ステップS109において計測された大きさを示す。ステップS110が実行されたとき、3D計測が終了する。
 具体的には、表示制御部183は、計測結果を表示するためのグラフィック画像信号を生成する。表示制御部183は、生成されたグラフィック画像信号を映像信号処理回路12に出力する。映像信号処理回路12は、CCU9から出力された映像信号と、CPU18aから出力されたグラフィック画像信号とを合成する。映像信号処理回路12は、合成された映像信号を表示部5に出力する。表示部5は、計測結果が重畳された被写体の2D画像を表示する。例えば、被写体の大きさを示す文字が被写体の2D画像上に表示される。表示制御部183は、計測結果を点群データの3D画像上に表示してもよい。
 計測部187は、ステップS109において、基準面と被写体の表面上の2つ以上の点の各々との間の3D距離を計測してもよい。表示制御部183は、ステップS110(計測結果表示ステップ)において、計測された3D距離の最大値を表示部5に表示してもよい。
 具体的には、計測部187は、2次元の基準領域に外接する円内の点の全てまたは一部を被写体の2D画像から抽出する。円の代わりに正方形または長方形などが使用されてもよい。被写体の2D画像上の点は、点群データにおける点の3D座標と関連付けられている。計測部187は、抽出された各点と関連付けられた3D座標を点群データから取得する。
 あるいは、計測部187は、3次元の基準領域に外接する球内の点の全てまたは一部を点群データから抽出する。球の代わりに立方体または円筒などが使用されてもよい。計測部187は、抽出された各点の3D座標を点群データから取得する。
 計測部187は、基準面と、抽出された各点との間の3D距離を算出する。計測部187は、算出された3D距離の最大値を計測結果として得る。これにより、計測部187は、被写体の表面における凹部の深さまたは被写体の表面における凸部の高さを正確に計測することができる。
 ユーザーは、計測モードを指定してもよい。例えば、ステップS103が実行される前、ユーザーは、操作部4を操作することにより、計測モードを示すモード情報を操作部4に入力する。そのモード情報は、制御インタフェース17を経由してCPU18aに出力される。制御部180は、そのモード情報に基づいて計測モードを設定する。第3の実施形態に示す例では、モード情報は面基準計測を示す。モード情報は、計測を含まないモードを示してもよい。その場合、図9に示す面推定処理が実行される。
 点設定部185がステップS103において基準点を受け付けた後、ユーザーはその基準点を変更してもよい。
 基準領域の大きさおよび基準領域の位置の少なくとも一方を示す領域情報が記録媒体に予め記録されてもよい。領域設定部182は、ステップS104において、領域情報に基づいて基準領域の大きさおよび基準領域の位置の少なくとも一方を設定してもよい。
 2つ以上の領域情報が記録媒体に予め記録されてもよい。領域設定部182は、ステップS104において、操作部4を通して入力された情報に基づいて2つ以上の領域情報のうちの1つを選択してもよい。領域設定部182は、ステップS104において、選択された領域情報に基づいて基準領域の大きさおよび基準領域の位置の一方を設定してもよい。
 領域設定部182がステップS104において基準領域を設定した後、ユーザーは任意のタイミングで基準領域の大きさおよび基準領域の位置の少なくとも一方を変更してもよい。そのタイミングは、基準領域がステップS105において表示された後、または基準面がステップS107において表示された後であってもよい。
 領域設定部182は、基準点を使用せずに基準領域を設定してもよい。したがって、ステップS103が実行される必要はない。計測部187が計測に使用する点を被写体の2D画像または点群データから抽出する場合、ステップS108が実行される必要はない。CPU18aは、位置算出部184および点設定部185の機能を有する必要はない。
 表示制御部183は、点群データの3D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点をその3D画像上に表示してもよい。表示制御部183は、被写体の2D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点に対応する3つ以上の点をその2D画像上に表示してもよい。
 基準領域の表示は必須ではない。したがって、ステップS105が実行される必要はない。基準面の表示は必須ではない。したがって、ステップS107が実行される必要はない。計測結果の表示は必須ではない。したがって、ステップS110が実行される必要はない。
 基準点の設定、基準領域の表示、基準面の表示、および計測結果の表示が不要である場合、画像の表示は必須ではない。したがって、ステップS102が実行される必要はない。CPU18aは、表示制御部183の機能を有する必要はない。
 3D計測における処理の順番は、図21に示す順番に限らない。例えば、ステップS101が実行される前に被写体の2D画像が表示部5に表示されてもよい。
 第3の実施形態において、内視鏡装置1は、被写体の大きさを計測する。基準面が正確に推定されるため、内視鏡装置1は、正確な計測結果を得ることができる。
 (第4の実施形態)
 本発明の第4の実施形態を説明する。第4の実施形態の内視鏡装置1は、図8に示すCPU18または図20に示すCPU18aを有する。
 被写体の表面において、所定の領域とそれの周辺との間で高さまたは深さが異なる場合がある。所定の領域は、凹部、凸部、または段差などである。算出された基準面が、その所定の領域とそれの周辺とを含む表面を近似する場合、その基準面の精度が悪化する。第4の実施形態において、面推定部186は、その所定の領域を除く表面を近似する基準面を推定する。
 領域設定部182は、凸集合ではない領域を含む基準領域を設定する。ユークリッド空間において凸(convex)である物体は、次のように定義される。その物体に含まれる任意の2点を結ぶ線分が定義され、その線分上の任意の点がその物体に含まれる場合、その物体は凸である。
 図22および図23を使用することにより、第4の実施形態における基準領域を説明する。図22に示す基準領域R51は、点P51、点P52、および点P53を含む。線分L51は点P51および点P52を結ぶ。点P53は線分L51上にある。点P53は基準領域R51に含まれる。点P53以外の線分L51上の点は図22に示されていない。線分L51上の全ての点は基準領域R51に含まれる。図22において、点P51、点P52、および点P53以外の点は示されていない。基準領域R51内の任意の2点を結ぶ線分上の点は必ず基準領域R51に含まれる。言い換えると、基準領域R51内の任意の2点を結ぶ線分は基準領域R51外の領域を通らない。したがって、基準領域R51は凸集合である。
 図23に示す基準領域R52は、点P54、点P55、および点P56を含む。線分L52は点P54および点P55を結ぶ。点P56は線分L52上にある。点P56は基準領域R52に含まれない。線分L52上の点の一部は基準領域R52に含まれない。言い換えると、線分L52は基準領域R52外の領域を通る。したがって、基準領域R52は凸集合ではない。領域設定部182は、基準領域R52のような基準領域を設定する。凸集合である領域は2次元の領域に限らず、3次元の領域であってもよい。
 以下では、点群データの3D画像を参照し、基準領域を説明する。図24は、基準領域の第1の例を示す。第1の例における基準領域は、2つの球の間の領域(球殻)である。2つの球の中心は同じであり、かつ2つの球の直径は互いに異なる。
 3D画像G61が図24に示されている。ユーザーは、3D画像G61上に表示されたカーソルを使用することにより、あるいは表示部5の画面をタッチすることにより、基準点P61および基準点P62を指定する。点設定部185は基準点P61および基準点P62を受け付ける。
 領域設定部182は、基準点P61および基準点P62を結ぶ線分を直径として持つ第1の球を算出する。領域設定部182は、第2の球を算出する。第1の球の中心と第2の球の中心とは、同じである。第2の球の直径は、第1の球の直径よりも小さい。領域設定部182は、第1の球と第2の球との間の領域を基準領域R61として設定する。面推定部186は、基準領域R61に含まれる3つ以上の点に基づいて基準面を推定する。
 基準領域R61の境界は、第1の境界R61aと、第1の境界R61aよりも内側にある第2の境界R61bとを含む。第1の境界R61aは相対的に外側にあり、かつ第2の境界R61bは相対的に内側にある。第1の境界R61aは、第2の境界R61bを囲む。第1の境界R61aは、第1の球と同じである。第2の境界R61bは、第2の球と同じである。
 領域R62が図24に示されている。領域R62の高さまたは深さは領域R62の周辺の領域のそれと異なる。第1の境界R61aおよび第2の境界R61bは領域R62の周辺にある。基準領域R61は領域R62を囲む。領域R62内の点は基準領域R61に含まれない。そのため、面推定部186は、基準面を正確に推定することができる。
 ユーザーは第1の球または第2の球の大きさを修正してもよい。表示部5および操作部4がタッチパネルである例では、ユーザーは、ドラッグ操作を実施することにより第1の球または第2の球の大きさを修正してもよい。
 図24に示す例では、ユーザーは2つの基準点を指定する。図25は、ユーザーが1つの基準点を指定する例を示す。
 図24に示す3D画像G61と同じ3D画像G61が図25に示されている。ユーザーは、3D画像G61上に表示されたカーソルを使用することにより、あるいは表示部5の画面をタッチすることにより、基準点P63を指定する。点設定部185は基準点P63を受け付ける。
 領域設定部182は、基準点P63を中心に持つ第1の球および第2の球を算出する。第2の球の直径は、第1の球の直径よりも小さい。領域設定部182は、第1の球と第2の球との間の領域を基準領域R63として設定する。
 領域設定部182が図24または図25に示す方法を使用することにより基準領域を設定した後、領域設定部182は一部の領域を基準領域から除いてもよい。図26は、一部の領域を基準領域から除く方法を示す。
 図10に示す3D画像G12と同じ3D画像G12が表示部5に表示される。基準領域R64が設定された後、ユーザーは基準領域R64から除く領域を指定する。表示部5および操作部4がタッチパネルである例では、ユーザーは、ピンチ操作を実施することにより一部の領域を基準領域R64から除いてもよい。基準領域R64の境界は、第1の境界R64aと、第1の境界R64aよりも内側にある第2の境界R64bとを含む。
 図27は、基準領域の第2の例を示す。第2の例における基準領域は、直方体の辺の周辺の領域のみを含む。3D画像G63が図27に示されている。ユーザーは、3D画像G63上に表示されたカーソルを使用することにより、あるいは表示部5の画面をタッチすることにより、基準点P64および基準点P65を指定する。点設定部185は基準点P64および基準点P65を受け付ける。
 領域設定部182は、基準点P64および基準点P65に基づいて長方形を算出する。基準点P64および基準点P65は、その長方形の対角線上の頂点である。基準点P64および基準点P65が設定された後、ユーザーは、3D画像G63上に表示されたカーソルを使用することにより、あるいは表示部5の画面をタッチすることにより、基準点P66を指定する。点設定部185は基準点P66を受け付ける。
 領域設定部182は、基準点P64、基準点P65、および基準点P66に基づいて直方体を算出する。その直方体の1つの面は、基準点P64および基準点P65に基づいて算出された長方形によって定義される。その直方体の高さは、その長方形と基準点P66との間の3D距離と同じである。
 領域設定部182は、その直方体の各辺を中心軸として持つ円筒を算出する。その直方体は6つの辺を持つため、領域設定部182は6つの円筒を算出する。領域設定部182は、6つの円筒内の領域の集合である基準領域R65を設定する。基準領域R65に含まれる領域の形状は円筒に限らない。面推定部186は、基準領域R65に含まれる3つ以上の点に基づいて基準面を推定する。
 領域設定部182は、凸集合ではない2次元の基準領域を設定してもよい。例えば、領域設定部182は、被写体の2D画像上の第1の円および第2の円を算出してもよい。第1の円の中心と第2の円の中心とは、同じである。第2の円の直径は、第1の円の直径よりも小さい。領域設定部182は、第1の円と第2の円との間の領域を基準領域として設定してもよい。円の代わりに正方形または長方形などが使用されてもよい。
 面推定部186は、基準領域に含まれる3つ以上の点に対応する点群データにおける3つ以上の点に基づいて基準面を推定する。例えば、面推定部186は、基準領域における全ての点を抽出する。面推定部186は、抽出された点の各々の3D座標を使用することにより基準面を推定する。面推定部186は、基準領域における点のうちの一部を抽出してもよい。
 具体的には、面推定部186は、図9または図21に示すステップS106において、基準領域に含まれる4つ以上の点から3つ以上の点を選択する。面推定部186は、ステップS106において、選択された3つ以上の点に対応する点群データの3つ以上の点に基づいて基準面を推定する。基準面の推定に使用される点の数が減るため、面推定部186は、基準面を推定するための処理負荷を減らすことができる。
 面推定部186が3つ以上の点を選択するためには基準領域は4つ以上の点を含む必要がある。基準領域の4つ以上の点は、三角形を形成する3つの点で構成される1つ以上の組を含む。基準領域の4つ以上の点の全てを通る直線は存在しない。
 図28および図29は、基準面の推定に使用される点の例を示す。図を簡単にするために2次元の基準領域が使用される例を説明する。以下の説明は、3次元の基準領域が使用される場合に適用されてもよい。
 基準領域R71が図28に示されている。面推定部186は、基準領域R71における全ての点(2D画像の画素)のうち一部の点(2D画像の画素)を規則正しく抽出する。図28において、抽出される点のみが示されており、抽出されない点は省略されている。図28に示す例では、面推定部186は、簡単な処理を実行することにより、点を一様にかつ広範囲に抽出することができる。
 基準領域R72が図29に示されている。面推定部186は、基準領域R72における全ての点(2D画像の画素)のうち一部の点(2D画像の画素)をランダムに抽出する。図29において、抽出される点のみが示されており、抽出されない点は省略されている。周期的な凹凸パターンが被写体の表面上にある場合、図28に示す例ではそのパターンの周期と抽出される点の周期とが一致する可能性がある。そのため、特定のパターンと一致する領域の点のみが抽出され、基準面の精度が悪化する可能性がある。図29に示す例では、特定のパターンと一致しない領域の点も抽出されるため、基準面の精度が向上する。
 面推定部186は、基準領域の境界に近い部分の点を主に抽出してもよい。第1の密度は第2の密度よりも高い。第1の密度は、基準領域の境界に近い部分において点が抽出される密度を示す。第2の密度は、基準領域の境界から遠い部分において点が抽出される密度を示す。これにより、面推定部186は、基準領域の境界に近い部分の点を多く使用することができる。また、面推定部186は、基準面の推定に使用される点の数を全体的に抑えることができ、かつ点を広範囲に抽出することができる。
 面推定部186は、上記の方法を使用することにより基準領域の境界の内部の点を抽出してもよく、かつ基準領域の境界上の点の全てまたは一部を抽出してもよい。
 第4の実施形態において、凸集合ではない領域を含む基準領域が設定される。内視鏡装置1は、周辺の領域と異なる形状を持つ領域における点を基準領域から除くことができる。そのため、内視鏡装置1は、基準面の精度を向上させることができる。
 (第5の実施形態)
 本発明の第5の実施形態を説明する。第5の実施形態の内視鏡装置1は、図8に示すCPU18または図20に示すCPU18aを有する。
 第5の実施形態において、基準領域は2つ以上の領域を含む。その2つ以上の領域は互いに離れている。基準領域に含まれる2つ以上の領域の各々は、3つ以上の点を含む。基準領域は、3つ以上の点を含む領域と、1つまたは2つの点を含む領域とを含んでもよい。1つの領域に含まれる3つ以上の点は、三角形を形成する3つの点で構成される1つ以上の組を含む。あるいは、基準領域の全体における3つ以上の点は、三角形を形成する3つの点で構成される1つ以上の組を含む。
 基準領域に含まれる各領域において、3つ以上の点の全てを通る直線は存在しない。あるいは、2つ以上の領域を含む基準領域の全体において、全ての点を通る直線は存在しない。言い換えると、基準領域に含まれる1つの領域において全ての点が直線上にある場合であっても、その直線は基準領域に含まれる他の領域における1つ以上の点を通らない。
 図30は、基準領域の例を示す。図を簡単にするために2次元の基準領域が使用される例を説明する。以下の説明は、3次元の基準領域が使用される場合に適用されてもよい。
 被写体の2D画像G81が図30に示されている。ユーザーは、2D画像G81上に表示されたカーソルを使用することにより、あるいは表示部5の画面をタッチすることにより、基準点P81、基準点P82、基準点P83、および基準点P84を指定する。点設定部185は、基準点P81、基準点P82、基準点P83、および基準点P84を受け付ける。
 領域設定部182は、基準点P81を中心に持つ領域R81を設定する。領域設定部182は、所定の値を直径として持つ円を領域81として設定する。円の代わりに正方形または長方形などが使用されてもよい。同様に、領域設定部182は、基準点P82を中心に持つ領域R82、基準点P83を中心に持つ領域R83、および基準点P84を中心に持つ領域R84を設定する。基準領域は、領域R81、領域R82、領域R83、および領域R84を含む。領域R81、領域R82、領域R83、および領域R84は互いに離れている。
 領域R85が図30に示されている。領域R85の高さまたは深さは領域R85の周辺の領域のそれと異なる。領域R81、領域R82、領域R83、および領域R84は、領域R85を囲む位置に配置されている。領域R85内の点は基準領域に含まれない。そのため、面推定部186は、基準面を正確に推定することができる。
 図30に示す例では、ユーザーは4つの基準点を指定する。図31は、ユーザーが1つの基準点を指定する例を示す。
 図30に示す2D画像G81と同じ2D画像G81が図31に示されている。図30に示す領域R85と同じ領域R85が図31に示されている。ユーザーは、2D画像G81上に表示されたカーソルを使用することにより、あるいは表示部5の画面をタッチすることにより、基準点P85を指定する。点設定部185は、基準点P85を受け付ける。
 領域設定部182は、基準点P85の周辺の点を中心に持つ領域R86、領域R87、領域R88、および領域R89を設定する。例えば、領域設定部182は、基準点P85から所定の距離だけ離れた4つの点を抽出する。領域設定部182は、抽出された各点を中心に持つ領域を設定する。
 第5の実施形態において、2つ以上の領域を含む基準領域が設定される。内視鏡装置1は、周辺の領域と異なる形状を持つ領域を含まない基準領域を設定することができる。そのため、内視鏡装置1は、基準面の精度を向上させることができる。
 (第6の実施形態)
 本発明の第6の実施形態を説明する。第6の実施形態において、基準領域の境界は被写体の表面の状態に基づいて設定される。
 第6の実施形態において、図8に示すCPU18は、図32に示すCPU18bに変更される。図32は、CPU18bの機能構成を示す。制御部180、生成部181、領域設定部182、表示制御部183、位置算出部184、点設定部185、面推定部186、および状態判断部188によってCPU18bの機能が構成されている。図32に示すブロックの少なくとも1つがCPU18bとは別の回路で構成されてもよい。図8に示す構成と同じ構成の説明を省略する。
 図32に示す各部は、プロセッサおよび論理回路の少なくとも1つで構成されてもよい。図32に示す各部は、1つまたは複数のプロセッサを含むことができる。図32に示す各部は、1つまたは複数の論理回路を含むことができる。
 表示制御部183は、点群データの3D画像および被写体の2D画像の一方を表示部5に表示する(画像表示ステップ)。点設定部185は、操作部4を通して入力された位置情報を受け付ける(位置入力ステップ)。位置情報は、表示部5に表示された点群データの3D画像または被写体の2D画像上の位置を示す。状態判断部188は、被写体の状態を判断する(状態判断ステップ)。領域設定部182は、領域設定ステップにおいて、位置情報が示す位置と、被写体の状態とに基づいて基準領域の境界を判断する。
 図33を使用することにより、第6の実施形態における面推定処理について説明する。図33は、面推定処理の手順を示す。図9に示す処理と同じ処理の説明を省略する。
 表示制御部183は、ステップS102において点群データの3D画像を表示部5に表示する。ステップS102は、画像表示ステップに対応する。
 点設定部185は、ステップS103において点群データの3D画像上の2つの基準点を、操作部4を通して受け付け、かつ受け付けられた2つの基準点の各々を示す点情報を生成する。ステップS103は、位置入力ステップに対応する。
 ステップS103において入力される2つの基準点は、点群データの3D画像上の画素位置を示す。したがって、ステップS103において位置情報が入力され、かつ点設定部185はその位置情報を受け付ける。点設定部185は、位置情報が示す2つの基準点の3D座標を含む点情報を生成する。
 ステップS103の後、状態判断部188は、被写体の状態を判断する(ステップS111)。ステップS111は、状態判断ステップに対応する。
 状態判断部188は、点群データ、点群データの3D画像、および被写体の2D画像のうちの少なくとも1つを使用することにより、被写体の状態を判断する。状態判断部188は、その状態に基づいて3D画像上の領域を2つ以上の領域(セグメント)に分割する。
 例えば、状態判断部188は、点群データを使用することにより、被写体の3D形状の特徴を判断する。状態判断部188は、その特徴に基づいて、点群データに含まれる3次元座標に対応する3つ以上の点を2つ以上の領域に分割する。例えば、状態判断部188は、Euclidean Cluster Extractionを使用することにより、3つ以上の点の各々を2つ以上の領域のうちの1つに割り当てる。状態判断部188は、各領域を点群データの3D画像上の領域と関連付ける。これにより、状態判断部188は、その3D画像上の領域を2つ以上の領域に分割する。
 状態判断部188は、点群データに基づいて被写体の表面に垂直な法線を算出し、かつ法線方向の変化に基づいて被写体のエッジまたは段差を検出してもよい。状態判断部188は、点群データにおける3つ以上の点を第1の領域および第2の領域に分割してもよい。例えば、第1の領域は、エッジまたは段差上の点からなる。第2の領域は、そのエッジまたは段差以外の部分上の点からなる。状態判断部188は、各領域を点群データの3D画像上の領域と関連付けることにより、その3D画像上の領域を2つの領域に分割してもよい。
 状態判断部188は、被写体の2D画像または点群データの3D画像を使用することにより、被写体の状態を判断してもよい。例えば、状態判断部188は、被写体の2D画像または点群データの3D画像に画像処理を施すことにより、被写体のエッジを検出してもよい。状態判断部188は、被写体の2D画像における3つ以上の点を第1の領域および第2の領域に分割してもよい。例えば、第1の領域は、エッジ上の点からなる。第2の領域は、そのエッジ以外の部分上の点からなる。状態判断部188は、被写体の2D画像上の各領域を点群データの3D画像上の領域と関連付けることにより、その3D画像上の領域を2つの領域に分割してもよい。同様に、状態判断部188は、点群データの3D画像における3つ以上の点を第1の領域および第2の領域に分割してもよい。
 状態判断部188は、被写体の2D画像または点群データの3D画像の明るさまたは色に基づいて被写体の特徴を判断してもよい。状態判断部188は、被写体のステレオ画像にマッチング処理を施してもよく、かつそのマッチング処理において得られた相関値に基づいて被写体の特徴を検出してもよい。状態判断部188は、WatershedアルゴリズムまたはDeep Learning等を使用することにより、被写体の特徴を判断してもよい。
 ステップS111の後、領域設定部182は、2つの基準点の位置および被写体の状態に基づいて基準領域を設定する(ステップS104a)。ステップS104aは、領域設定ステップに対応する。
 領域設定部182は、点群データの3D座標を定義する3D空間に3次元の基準領域を設定する。例えば、領域設定部182は、2つの基準点の位置に基づいて基準領域の外側の境界を設定する。領域設定部182は、被写体の状態に基づいて基準領域の内側の境界を設定する。例えば、被写体の表面に異常な領域が存在する場合がある。その領域の高さまたは深さはその部分の周辺の領域のそれと異なる。領域設定部182は、基準領域の内側の境界を設定することにより、その部分を基準領域から除く。これにより、領域設定部182は、その部分を含まない基準領域を設定することができる。ステップS104aの後、ステップS105が実行される。
 図34は、表示部5に表示される画像の例を示す。3D画像G91が表示部5に表示される。ユーザーは、3D画像G91上に表示されたカーソルを使用することにより、あるいは表示部5の画面をタッチすることにより、基準点P91および基準点P92を指定する。点設定部185は、基準点P91および基準点P92を受け付ける。
 領域設定部182は、基準点P91および基準点P92を結ぶ線分を直径として持つ球SP91を算出する。領域設定部182は、球SP91を基準領域の外側の境界として設定する。
 図35は、点群データの3D画像上の2つ以上の領域を示す。状態判断部188は、被写体の状態に基づいて3D画像上の領域を2つ以上の領域に分割する。図35は、その2つ以上の領域を示す。図35に示す例では、3D画像上の被写体の領域は、領域R91、領域R92、および領域R93に分割されている。
 領域設定部182は、球SP91内の2つ以上の領域のうち最も大きな体積を持つ領域を基準領域として設定する。基準領域として設定された領域以外の領域は基準領域に含まれない。領域R91の一部および領域R92が球SP91内にある。球SP91内の領域R91は基準領域に含まれる。領域R92は基準領域に含まれない。領域設定部182は、領域R92の境界を基準領域の内側の境界として設定する。
 上記の例では、状態判断部188は、点群データに含まれる3次元座標に対応する3つ以上の点を2つ以上の領域に分割する。基準領域の境界は、2つ以上の領域に含まれる1つ以上の領域の境界を含む。
 上記の2つ以上の領域の各々は、3つ以上の点を含む。上記の2つ以上の領域は、3つ以上の点を含む領域と、1つまたは2つの点を含む領域とを含んでもよい。基準領域は、3つ以上の点を含む領域を含む。
 図35に示す例では、状態判断部188は、点群データに含まれる3つ以上の点を3つの領域に分割する。基準領域の境界は、領域R92の境界を含む。状態判断部188が、領域R92および領域R93を囲む基準領域を設定してもよく、かつその基準領域の境界が領域R92の境界および領域R93の境界を含んでもよい。
 基準領域の外側の境界は、直方体、立方体、または円筒などであってもよい。基準領域の形状はこれらの例に限らない。
 図34に示す例では、ユーザーは2つの基準点を指定する。図36は、ユーザーが1つの基準点を指定する例を示す。
 図34に示す3D画像G91と同じ3D画像G91が図36に示されている。ユーザーは、3D画像G91上に表示されたカーソルを使用することにより、あるいは表示部5の画面をタッチすることにより、基準点P93を指定する。点設定部185は基準点P93を受け付ける。
 領域設定部182は、基準点P93を中心に持つ球SP92を算出する。球SP92の直径は所定の長さである。領域設定部182は、球SP92を基準領域の外側の境界として設定する。状態判断部188は、図35に示す領域R92の境界を基準領域の内側の境界として設定する。
 領域設定部182が基準領域の外側の境界を設定した後、状態判断部188は、その境界内のみの領域を2つ以上の領域に分割してもよい。図34に示す例では、領域設定部182が球SP91を基準領域の外側の境界として設定した後、状態判断部188はその境界内の領域を2つ以上の領域に分割してもよい。点群データの全体を処理する場合と比較して、処理負荷が減る。
 点群データの3D画像の代わりに被写体の2D画像が使用されてもよい。以下では、被写体の2D画像が使用される例を説明する。
 表示制御部183は、ステップS102において被写体の2D画像を表示部5に表示する。点設定部185は、ステップS103において被写体の2D画像上の1つ以上の基準点を、操作部4を通して受け付け、かつ受け付けられた1つ以上の基準点の各々を示す点情報を生成する。
 状態判断部188は、ステップS111において、被写体の2D画像を使用することにより被写体の状態を判断する。状態判断部188は、その判断の結果に基づいて2D画像上の領域を2つ以上の領域に分割する。
 領域設定部182は、ステップS104aにおいて、2次元の基準領域を被写体の2D画像に設定する。例えば、領域設定部182は、基準点の位置に基づいて基準領域の外側の境界を設定する。領域設定部182は、被写体の状態に基づいて基準領域の内側の境界を設定する。
 CPU18bは、図20に示す計測部187を有してもよい。ステップS107が実行された後、図21に示すステップS108、ステップS109、およびステップS110が実行されてもよい。
 点設定部185がステップS103において基準点を受け付けた後、ユーザーはその基準点を変更してもよい。ステップS103において設定される基準点の数は2つに限らない。
 基準領域の大きさおよび基準領域の位置の少なくとも一方を示す領域情報が記録媒体に予め記録されてもよい。領域設定部182は、ステップS104aにおいて、領域情報に基づいて基準領域の大きさおよび基準領域の位置の少なくとも一方を設定してもよい。例えば、領域設定部182は、領域情報に基づいて基準領域の外側の境界の大きさおよび基準領域の外側の境界の位置の少なくとも一方を設定してもよい。
 2つ以上の領域情報が記録媒体に予め記録されてもよい。領域設定部182は、ステップS104aにおいて、操作部4を通して入力された情報に基づいて2つ以上の領域情報のうちの1つを選択してもよい。領域設定部182は、ステップS104aにおいて、選択された領域情報に基づいて基準領域の大きさおよび基準領域の位置の一方を設定してもよい。
 領域設定部182がステップS104aにおいて基準領域を設定した後、ユーザーは任意のタイミングで基準領域の大きさおよび基準領域の位置の少なくとも一方を変更してもよい。そのタイミングは、基準領域がステップS105において表示された後、または基準面がステップS107において表示された後であってもよい。
 表示制御部183は、点群データの3D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点をその3D画像上に表示してもよい。表示制御部183は、被写体の2D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点に対応する3つ以上の点をその2D画像上に表示してもよい。
 基準領域の表示は必須ではない。したがって、ステップS105が実行される必要はない。基準面の表示は必須ではない。したがって、ステップS107が実行される必要はない。
 面推定処理における処理の順番は、図33に示す順番に限らない。例えば、ステップS102またはステップS103が実行される前にステップS111が実行されてもよい。ステップS101が実行される前に、被写体の2D画像を使用することによりステップS111が実行されてもよい。
 第6の実施形態において、被写体の表面の状態に基づいて基準領域が設定される。内視鏡装置1は、異常な領域を含まない基準領域を容易に設定することができる。そのため、内視鏡装置1は、基準面の精度を向上させることができる。
 (第6の実施形態の第1の変形例)
 本発明の第6の実施形態の第1の変形例を説明する。第6の実施形態の第1の変形例において、状態判断部188は、点群データに含まれる3次元座標に対応する3つ以上の点を2つ以上の領域に分割する。表示制御部183はその2つ以上の領域の画像を表示部5に表示し、かつ点設定部185はその画像上の基準点を受け付ける。
 図37を使用することにより、第6の実施形態の第1の変形例における面推定処理について説明する。図37は、面推定処理の手順を示す。図33に示す処理と同じ処理の説明を省略する。
 ステップS101の後、ステップS111において、状態判断部188は、被写体の状態を判断する。これにより、状態判断部188は、点群データに含まれる3次元座標に対応する3つ以上の点を2つ以上の領域に分割する。
 ステップS111の後、表示制御部183は、点群データの3D画像および2つ以上の領域の画像を表示部5に表示する(ステップS102a)。具体的には、表示制御部183は、点群データの3D画像および2つ以上の領域の画像を表示するためのグラフィック画像信号を生成する。2つ以上の領域の画像は、各画素のカラーデータを含む。表示制御部183は、生成されたグラフィック画像信号を、映像信号処理回路12を通して表示部5に出力する。表示部5は、点群データの3D画像および2つ以上の領域の画像を表示する。
 ステップS102aの後、点設定部185は、2つ以上の領域の画像上の2つの基準点を、操作部4を通して受け付け、かつ受け付けられた基準点を示す点情報を生成する(ステップS103a)。ステップS103aの後、ステップS104aが実行される。
 図38は、表示部5に表示される画像の例を示す。図34に示す3D画像G91と同じ3D画像G91および2つ以上の領域の画像G92が表示部5に表示される。図38に示す例では、画像G92の領域は、領域R94、領域R95、および領域R96に分割されている。
 ユーザーは、画像G92を参照し、基準点の位置を判断する。3D画像G91および画像G92を比較することにより、ユーザーは、被写体の特徴を判断することができる。例えば、ユーザーは、領域R95および領域R96が凹部または凸部であると判断することができる。ユーザーは、領域R95および領域R96に対応する領域を含まない基準領域を設定するための基準点の位置を判断する。例えば、ユーザーは、最も広い領域R94上の基準点を指定する。
 ユーザーは、画像G92上に表示されたカーソルを使用することにより、あるいは表示部5の画面をタッチすることにより、基準点P94および基準点P95を指定する。点設定部185は基準点P94および基準点P95を受け付ける。
 領域設定部182は、基準点P94および基準点P95を結ぶ線分を直径として持つ球SP93を算出する。領域設定部182は、球SP93を基準領域の外側の境界として設定する。
 領域設定部182は、球SP93内の2つ以上の領域のうち最も大きな体積を持つ領域を基準領域として設定する。基準領域として設定された領域以外の領域は基準領域に含まれない。領域R94の一部および領域R95が球SP93内にある。球SP93内の領域R94は基準領域に含まれる。領域R95は基準領域に含まれない。領域設定部182は、領域R95の境界を基準領域の内側の境界として設定する。
 基準領域の外側の境界は、直方体、立方体、または円筒などであってもよい。基準領域の形状はこれらの例に限らない。
 表示制御部183は、ステップS102aにおいて、点群データの3D画像の代わりに被写体の2D画像を表示部5に表示してもよい。
 CPU18bは、図20に示す計測部187を有してもよい。ステップS107が実行された後、図21に示すステップS108、ステップS109、およびステップS110が実行されてもよい。
 点設定部185がステップS103aにおいて基準点を受け付けた後、ユーザーはその基準点を変更してもよい。ステップS103aにおいて設定される基準点の数は2つに限らない。
 領域設定部182がステップS104aにおいて基準領域を設定した後、ユーザーは任意のタイミングで基準領域の大きさおよび基準領域の位置の少なくとも一方を変更してもよい。そのタイミングは、基準領域がステップS105において表示された後、または基準面がステップS107において表示された後であってもよい。
 表示制御部183は、点群データの3D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点をその3D画像上に表示してもよい。表示制御部183は、被写体の2D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点に対応する3つ以上の点をその2D画像上に表示してもよい。
 表示制御部183は、点群データにおける3つ以上の点を分割することにより生成された2つ以上の領域の画像を表示部5に表示してもよい。表示制御部183は、基準面の推定に使用された点群データの3つ以上の点に対応する3つ以上の点をその画像上に表示してもよい。
 基準領域の表示は必須ではない。したがって、ステップS105が実行される必要はない。基準面の表示は必須ではない。したがって、ステップS107が実行される必要はない。
 第6の実施形態の第1の変形例において、被写体の表面の状態に基づいて基準領域が設定される。内視鏡装置1は、異常な領域を含まない基準領域を容易に設定することができる。そのため、内視鏡装置1は、基準面の精度を向上させることができる。
 (第6の実施形態の第2の変形例)
 本発明の第6の実施形態の第2の変形例を説明する。第6の実施形態の第2の変形例において、曲率マップが基準領域の設定に使用される。曲率マップは、点群データが示す被写体の3D形状における曲率の分布を示す。例えば、曲率マップは、点の3D座標と、その点における曲率とを含む。基準領域は、曲率が所定の範囲に収まる領域を含む。
 第6の実施形態の第2の変形例における面推定処理を説明する。第6の実施形態の第2の変形例における面推定処理は、図33に従って実行される。以下では、第6の実施形態における面推定処理と同じ処理の説明を省略する。
 状態判断部188は、ステップS111において、点群データの各点における曲率を算出し、かつ曲率マップを生成する。状態判断部188は、曲率マップに基づいて被写体の状態を判断する。具体的には、状態判断部188は、以下の方法を使用することにより被写体の表面の曲率を判断する。
 状態判断部188は、点群データの3D画像上の基準点を中心に持つ3次元の判断領域を3D空間に設定する。状態判断部188は、判断領域における各点と関連付けられた曲率を曲率マップから取得する。状態判断部188は、基準点における曲率と、判断領域における各点の曲率との差を算出する。
 領域設定部182は、ステップS104aにおいて、その差が所定の範囲に収まる点を判断領域から抽出する。領域設定部182は、3つ以上の点を判断領域から抽出する。領域設定部182は、抽出された3つ以上の点を含む基準領域を設定する。基準領域は、判断領域における点の全てまたは一部を含む。
 点群データの3D画像の代わりに被写体の2D画像が使用されてもよい。以下では、被写体の2D画像が使用される例を説明する。
 状態判断部188は、ステップS111において、点群データの各点における曲率を算出し、かつ曲率マップを生成する。状態判断部188は、点設定部185によって受け付けられた基準点を中心に持つ2次元の判断領域を被写体の2D画像に設定する。その後、点群データの3D画像が使用される例における処理と同様の処理が実行され、基準領域が被写体の2D画像に設定される。
 表示制御部183は、曲率マップの画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点に対応する3つ以上の点をその画像上に表示してもよい。
 第6の実施形態の第2の変形例において、基準領域は、安定した曲率を持つ表面の3つ以上の点を含む。内視鏡装置1は、異常な領域を含まない基準領域を設定することができる。そのため、内視鏡装置1は、基準面の精度を向上させることができる。
 (第6の実施形態の第3の変形例)
 本発明の第6の実施形態の第3の変形例を説明する。第6の実施形態の第3の変形例において、表示制御部183は曲率マップの画像を表示部5に表示し、かつ点設定部185はその画像上の基準点を受け付ける。
 図39を使用することにより、第6の実施形態の第3の変形例における面推定処理について説明する。図39は、面推定処理の手順を示す。図33に示す処理と同じ処理の説明を省略する。
 ステップS101の後、状態判断部188は、点群データの各点における曲率を算出し、かつ曲率マップを生成する(ステップS112)。
 ステップS112の後、表示制御部183は、点群データの3D画像および曲率マップの画像を表示部5に表示する(ステップS102b)。具体的には、表示制御部183は、点群データの3D画像および曲率マップの画像を表示するためのグラフィック画像信号を生成する。曲率マップの画像は、各画素のカラーデータを含む。表示制御部183は、生成されたグラフィック画像信号を、映像信号処理回路12を通して表示部5に出力する。表示部5は、点群データの3D画像および曲率マップの画像を表示する。
 ステップS102bの後、点設定部185は、曲率マップの画像上の1つの基準点を、操作部4を通して受け付け、かつ受け付けられた基準点を示す点情報を生成する(ステップS103b)。
 図40は、ステップS103bにおいて表示部5に表示される画像の例を示す。点群データの3D画像G93および曲率マップの画像G94が表示部5に表示される。画像G94の画素は、その画素における曲率に対応する色で表示される。例えば、大きな曲率を持つ画素は濃い色で表示され、かつ小さな曲率を持つ画素は薄い色で表示される。
 ユーザーは、画像G94を参照し、基準点の位置を判断する。3D画像G93および画像G94を比較することにより、ユーザーは、被写体の特徴を判断することができる。例えば、曲率マップの画像G94上の領域R97および領域R98の曲率は、それらの周辺の領域の曲率よりも高い。そのため、ユーザーは、領域R97および領域R98が凹部または凸部であると判断することができる。ユーザーは、領域R97および領域R98に対応する領域を含まない基準領域を設定するための基準点の位置を判断する。
 ユーザーは、画像G94上に表示されたカーソルを使用することにより、あるいは表示部5の画面をタッチすることにより、基準点P96を指定する。点設定部185は基準点P96を受け付ける。
 ステップS103bの後、状態判断部188は、点設定部185によって受け付けられた基準点に対応する点群データの点を算出する。状態判断部188は、算出された点を中心に持つ3次元の判断領域を3D空間に設定する。状態判断部188は、判断領域における各点と関連付けられた曲率を曲率マップから取得する。状態判断部188は、基準点における曲率と、判断領域における各点の曲率との差を算出する(ステップS111b)。ステップS111bの後、ステップS104aが実行される。
 点群データの3D画像の代わりに被写体の2D画像が使用されてもよい。以下では、被写体の2D画像が使用される例を説明する。
 点設定部185が曲率マップの画像上の基準点を受け付けた後、状態判断部188は、その基準点に対応する被写体の2D画像上の点を算出する。状態判断部188は、算出された点を中心に持つ2次元の判断領域を被写体の2D画像に設定する。その後、点群データの3D画像が使用される例における処理と同様の処理が実行され、基準領域が被写体の2D画像に設定される。
 第6の実施形態の第3の変形例において、基準領域は、安定した曲率を持つ表面の3つ以上の点を含む。内視鏡装置1は、異常な領域を含まない基準領域を設定することができる。そのため、内視鏡装置1は、基準面の精度を向上させることができる。
 (第7の実施形態)
 本発明の第7の実施形態を説明する。第7の実施形態の内視鏡装置1は、図8に示すCPU18または図20に示すCPU18aを有する。
 第7の実施形態において、ユーザーは、点群データの3D画像または被写体の2D画像上の3つ以上の点を指定する。その3つ以上の点を結ぶ線分に基づいて基準領域が設定される。
 表示制御部183は、点群データの3D画像および被写体の2D画像の一方を表示部5に表示する(画像表示ステップ)。点群データの3D画像または被写体の2D画像上の3つ以上の点が操作部4を通して入力される(領域設定ステップ)。領域設定部182は、入力された3つ以上の点を含む基準領域を設定する(領域設定ステップ)。
 領域設定部182は、領域設定ステップにおいて、入力された3つ以上の点を結ぶ線分に基づいて基準領域を設定する。
 第7の実施形態における面推定処理を説明する。第7の実施形態における面推定処理は、図9または図21に従って実行される。以下では、第2の実施形態または第3の実施形態における面推定処理と同じ処理の説明を省略する。
 表示制御部183は、ステップS102において、点群データの3D画像を表示部5に表示する。ステップS102は、画像表示ステップに対応する。
 点設定部185は、ステップS103において、点群データの3D画像上の3つ以上の基準点を、操作部4を通して受け付け、かつ受け付けられた3つ以上の基準点の各々を示す点情報を生成する。ステップS103は、領域設定ステップに対応する。
 領域設定部182は、ステップS104において、点情報が示す3つ以上の基準点に基づいて基準領域を設定する。ステップS104は、領域設定ステップに対応する。
 図41は、表示部5に表示される画像の例を示す。3D画像G101が表示部5に表示される。ユーザーは、3D画像G101上に表示されたカーソルを使用することにより、あるいは表示部5の画面をタッチすることにより、基準点P101、基準点P102、および基準点P103を指定する。点設定部185は、基準点P101、基準点P102、および基準点P103を受け付ける。
 領域設定部182は、2つの基準点を結ぶ線分を算出する。図41に示す例では、領域設定部182は、線分L101、線分L102、および線分L103を算出する。線分L101は、基準点P101および基準点P102を結ぶ。線分L102は、基準点P102および基準点P103を結ぶ。線分L103は、基準点P103および基準点P101を結ぶ。線分L101、線分L102、および線分L103の各々が3D画像G101上に表示されてもよい。
 領域設定部182は、線分L101、線分L102、および線分L103の各々を中心軸として持つ3つの円筒を算出する。領域設定部182は、3つの円筒内の領域の集合である基準領域R101を設定する。基準領域R101に含まれる領域の形状は円筒に限らない。面推定部186は、基準領域R101に含まれる3つ以上の点に基づいて基準面を推定する。
 図42は、表示部5に表示される画像の他の例を示す。図41に示す3D画像G101と同じ3D画像G101が表示部5に表示される。ユーザーは、3D画像G101上に表示されたカーソルを使用することにより、あるいは表示部5の画面をタッチすることにより、基準点P104、基準点P105、基準点P106、および基準点P107を指定する。点設定部185は、基準点P104、基準点P105、基準点P106、および基準点P107を受け付ける。
 領域設定部182は、2つの基準点を結ぶ線分を算出する。図42に示す例では、領域設定部182は、線分L104、線分L105、線分L106、および線分L107を算出する。線分L104は、基準点P104および基準点P105を結ぶ。線分L105は、基準点P105および基準点P106を結ぶ。線分L106は、基準点P106および基準点P107を結ぶ。線分L107は、基準点P107および基準点P104を結ぶ。線分L104、線分L105、線分L106、および線分L107の各々が3D画像G101上に表示されてもよい。
 領域設定部182は、線分L104、線分L105、線分L106、および線分L107の各々を中心軸として持つ4つの円筒を算出する。領域設定部182は、4つの円筒内の領域の集合である基準領域R102を設定する。基準領域R102に含まれる領域の形状は円筒に限らない。面推定部186は、基準領域R102に含まれる3つ以上の点に基づいて基準面を推定する。
 点群データの3D画像の代わりに被写体の2D画像が使用されてもよい。以下では、被写体の2D画像が使用される例を説明する。
 表示制御部183は、ステップS102において、被写体の2D画像を表示部5に表示する。点設定部185は、ステップS103において、被写体の2D画像上の3つ以上の基準点を、操作部4を通して受け付け、かつ受け付けられた3つ以上の基準点の各々を示す点情報を生成する。領域設定部182は、ステップS104において、点情報が示す3つ以上の基準点に基づいて基準領域を設定する。
 点設定部185がステップS103において基準点を受け付けた後、ユーザーはその基準点を変更してもよい。ステップS103において設定される基準点の数は3つまたは4つに限らない。
 表示制御部183は、点群データの3D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点をその3D画像上に表示してもよい。表示制御部183は、被写体の2D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点に対応する3つ以上の点をその2D画像上に表示してもよい。
 基準領域の表示は必須ではない。したがって、ステップS105が実行される必要はない。基準面の表示は必須ではない。したがって、ステップS107が実行される必要はない。
 第7の実施形態において、ユーザーによって指定された3つ以上の点を含む基準領域が設定される。そのため、被写体の形状または画像の構図に応じて、基準領域の自由度が高まる。内視鏡装置1は、基準領域を容易に設定することができる。
 (第8の実施形態)
 本発明の第8の実施形態を説明する。第8の実施形態の内視鏡装置1は、図8に示すCPU18または図20に示すCPU18aを有する。
 第8の実施形態において、ユーザーは、点群データの3D画像または被写体の2D画像をなぞることにより、画像上の線を指定する。指定された線上の3つ以上の点に基づいて基準領域が設定される。
 表示制御部183は、点群データの3D画像および被写体の2D画像の一方を表示部5に表示する(画像表示ステップ)。ユーザーが点群データの3D画像または被写体の2D画像において指定した線上の3つ以上の点が操作部4を通して入力される(領域設定ステップ)。領域設定部182は、その線上の3つ以上の点を含む基準領域を設定する(領域設定ステップ)。
 第8の実施形態における面推定処理を説明する。第8の実施形態における面推定処理は、図9または図21に従って実行される。以下では、第2の実施形態または第3の実施形態における面推定処理と同じ処理の説明を省略する。
 表示制御部183は、ステップS102において、点群データの3D画像を表示部5に表示する。ステップS102は、画像表示ステップに対応する。
 ユーザーは、点群データの3D画像をなぞることにより、線を描く。点設定部185は、ステップS103において、その線上の3つ以上の基準点を、操作部4を通して受け付け、かつ受け付けられた3つ以上の基準点の各々を示す点情報を生成する。ステップS103は、領域設定ステップに対応する。
 領域設定部182は、ステップS104において、点情報が示す3つ以上の基準点に基づいて基準領域を設定する。ステップS104は、領域設定ステップに対応する。
 図43は、表示部5に表示される画像の例を示す。図41に示す3D画像G101と同じ3D画像G101が表示部5に表示される。表示部5および操作部4がタッチパネルである例では、ユーザーは表示部5の画面を線状になぞることにより線L111を描く。3D画像G101上のカーソルが表示される例では、ユーザーは、カーソルを3D画像G101上で線状に移動させることにより線L111を描いてもよい。点設定部185は、線L111上の全ての基準点を受け付ける。点設定部185は、線L111上の一部の基準点を受け付けてもよい。線L111は、閉じた線である必要はない。
 領域設定部182は、線L111を中心軸として持ち、かつ円を断面として持つ基準領域R111を設定する。基準領域R111の断面の形状は円に限らない。面推定部186は、基準領域R111に含まれる3つ以上の点に基づいて基準面を推定する。
 点群データの3D画像の代わりに被写体の2D画像が使用されてもよい。以下では、被写体の2D画像が使用される例を説明する。
 表示制御部183は、ステップS102において、被写体の2D画像を表示部5に表示する。ユーザーは、被写体の2D画像をなぞることにより、線を描く。点設定部185は、ステップS103において、その線上の3つ以上の基準点を、操作部4を通して受け付け、かつ受け付けられた3つ以上の基準点の各々を示す点情報を生成する。領域設定部182は、ステップS104において、点情報が示す3つ以上の基準点に基づいて基準領域を設定する。
 表示制御部183は、点群データの3D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点をその3D画像上に表示してもよい。表示制御部183は、被写体の2D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点に対応する3つ以上の点をその2D画像上に表示してもよい。
 基準領域の表示は必須ではない。したがって、ステップS105が実行される必要はない。基準面の表示は必須ではない。したがって、ステップS107が実行される必要はない。
 第8の実施形態において、ユーザーが画像をなぞることにより指定された線上の3つ以上の点を含む基準領域が設定される。そのため、被写体の形状または画像の構図に応じて、基準領域の自由度が高まる。内視鏡装置1は、基準領域を容易に設定することができる。
 (第9の実施形態)
 本発明の第9の実施形態を説明する。第9の実施形態において、点群データの3D画像または被写体の2D画像が表示部5に表示され、かつ点群データにおける2つ以上の領域の画像が表示部5に表示される。ユーザーは、2つ以上の領域の画像を参照し、かつ点群データの3D画像上の基準点を指定する。
 第9の実施形態において、図8に示すCPU18は、図44に示すCPU18cに変更される。図44は、CPU18cの機能構成を示す。制御部180、生成部181、領域設定部182、表示制御部183、位置算出部184、点設定部185、面推定部186、および分割部189によってCPU18cの機能が構成されている。図44に示すブロックの少なくとも1つがCPU18cとは別の回路で構成されてもよい。図8に示す構成と同じ構成の説明を省略する。
 図44に示す各部は、プロセッサおよび論理回路の少なくとも1つで構成されてもよい。図44に示す各部は、1つまたは複数のプロセッサを含むことができる。図44に示す各部は、1つまたは複数の論理回路を含むことができる。
 分割部189は、図32に示す状態判断部188の機能の一部を有する。分割部189は、点群データに含まれる3次元座標に対応する3つ以上の点を2つ以上の領域に分割する(分割ステップ)。表示制御部183は、点群データの画像および被写体の2D画像の一方を表示部5に表示し、かつ2つ以上の領域の画像を表示部5に表示する(画像表示ステップ)。
 図45を使用することにより、第9の実施形態における面推定処理について説明する。図45は、面推定処理の手順を示す。図9に示す処理と同じ処理の説明を省略する。
 ステップS101の後、分割部189は、点群データに含まれる3次元座標に対応する3つ以上の点を2つ以上の領域に分割する(ステップS121)。ステップS121は、分割ステップに対応する。分割部189は、第6の実施形態における方法と同じ方法を使用することにより、点群データにおける3つ以上の点を2つ以上の領域に分割する。
 ステップS121の後、表示制御部183は、点群データの3D画像および2つ以上の領域の画像を表示部5に表示する(ステップS102c)。ステップS102cは、画像表示ステップに対応する。ステップS102cは、図37に示すステップS102aと同じである。ステップS102cの後、ステップS103が実行される。
 図46は、表示部5に表示される画像の例を示す。図34に示す3D画像G91と同じ3D画像G91および図38に示す画像G92と同じ画像G92が表示部5に表示される。図46に示す例では、画像G92の領域は、領域R94、領域R95、および領域R96に分割されている。
 ユーザーは、画像G92を参照し、基準点の位置を判断する。3D画像G91および画像G92を比較することにより、ユーザーは、被写体の特徴を判断することができる。例えば、ユーザーは、領域R95および領域R96が凹部または凸部であると判断することができる。ユーザーは、領域R95および領域R96に対応する領域を含まない基準領域を設定するための基準点の位置を判断する。例えば、ユーザーは、最も広い領域R94に対応する3D画像G91の領域上の基準点を指定する。
 ユーザーは、3D画像G91上に表示されたカーソルを使用することにより、あるいは表示部5の画面をタッチすることにより、基準点P121および基準点P122を指定する。点設定部185は基準点P121および基準点P122を受け付ける。
 領域設定部182は、基準点P121および基準点P122を結ぶ線分を直径として持つ球SP121を算出する。領域設定部182は、球SP121を基準領域の境界として設定する。領域設定部182は、領域R95に対応する3D画像G91の領域を基準領域から除いてもよい。
 基準領域は、直方体、立方体、または円筒などであってもよい。基準領域の形状はこれらの例に限らない。
 表示制御部183は、ステップS102cにおいて、点群データの3D画像の代わりに被写体の2D画像を表示部5に表示してもよい。
 CPU18cは、図20に示す計測部187を有してもよい。ステップS107が実行された後、図21に示すステップS108、ステップS109、およびステップS110が実行されてもよい。
 点設定部185がステップS103において基準点を受け付けた後、ユーザーはその基準点を変更してもよい。ステップS103において設定される基準点の数は2つに限らない。
 領域設定部182がステップS104において基準領域を設定した後、ユーザーは任意のタイミングで基準領域の大きさおよび基準領域の位置の少なくとも一方を変更してもよい。そのタイミングは、基準領域がステップS105において表示された後、または基準面がステップS107において表示された後であってもよい。
 表示制御部183は、点群データの3D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点をその3D画像上に表示してもよい。表示制御部183は、被写体の2D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点に対応する3つ以上の点をその2D画像上に表示してもよい。
 基準領域の表示は必須ではない。したがって、ステップS105が実行される必要はない。基準面の表示は必須ではない。したがって、ステップS107が実行される必要はない。
 第9の実施形態において、点群データにおける2つ以上の領域の画像が表示部5に表示される。ユーザーは、その画像を参照することにより、基準点の指定に適した領域を判断することができる。
 (第9の実施形態の変形例)
 本発明の第9の実施形態の変形例を説明する。第9の実施形態の変形例において、点群データの3D画像または被写体の2D画像が表示部5に表示され、かつ曲率マップの画像が表示部5に表示される。曲率マップは、点群データが示す被写体の3D形状における曲率の分布を示す。例えば、曲率マップは、点の3D座標と、その点における曲率とを含む。ユーザーは、曲率マップの画像を参照し、かつ点群データの3D画像上の基準点を指定する。
 第9の実施形態の変形例において、図8に示すCPU18は、図47に示すCPU18dに変更される。図47は、CPU18dの機能構成を示す。制御部180、生成部181、領域設定部182、表示制御部183、位置算出部184、点設定部185、面推定部186、および曲率算出部190によってCPU18dの機能が構成されている。図47に示すブロックの少なくとも1つがCPU18dとは別の回路で構成されてもよい。図8に示す構成と同じ構成の説明を省略する。
 図47に示す各部は、プロセッサおよび論理回路の少なくとも1つで構成されてもよい。図47に示す各部は、1つまたは複数のプロセッサを含むことができる。図47に示す各部は、1つまたは複数の論理回路を含むことができる。
 曲率算出部190は、図32に示す状態判断部188の機能の一部を有する。曲率算出部190は、点群データの各点における曲率を算出し、かつ曲率マップを生成する(マップ生成ステップ)。表示制御部183は、点群データの3D画像および被写体の2D画像の一方を表示部5に表示し、かつ曲率マップの画像を表示部5に表示する(画像表示ステップ)。
 図48を使用することにより、第9の実施形態の変形例における面推定処理について説明する。図48は、面推定処理の手順を示す。図9に示す処理と同じ処理の説明を省略する。
 ステップS101の後、曲率算出部190は、点群データの各点における曲率を算出し、かつ曲率マップを生成する(ステップS122)。ステップS122は、マップ生成ステップに対応する。曲率算出部190は、第6の実施形態の第2の変形例における方法と同じ方法を使用することにより、曲率マップを生成する。
 ステップS122の後、表示制御部183は、点群データの3D画像および曲率マップの画像を表示部5に表示する(ステップS102d)。ステップS102dは、画像表示ステップに対応する。ステップS102dは、図39に示すステップS102bと同じである。ステップS102dの後、ステップS103が実行される。
 図49は、表示部5に表示される画像の例を示す。図40に示す3D画像G93と同じ3D画像G93および図40に示す画像G94と同じ画像G94が表示部5に表示される。
 ユーザーは、画像G94を参照し、基準点の位置を判断する。3D画像G93および画像G94を比較することにより、ユーザーは、被写体の特徴を判断することができる。例えば、曲率マップの画像G94上の領域R97および領域R98の曲率は、それらの周辺の領域の曲率よりも高い。そのため、ユーザーは、領域R97および領域R98が凹部または凸部であると判断することができる。ユーザーは、領域R97および領域R98に対応する領域を含まない基準領域を設定するための基準点の位置を判断する。
 ユーザーは、3D画像G93上に表示されたカーソルを使用することにより、あるいは表示部5の画面をタッチすることにより、基準点P123および基準点P124を指定する。点設定部185は基準点P123および基準点P124を受け付ける。
 領域設定部182は、基準点P123および基準点P124を結ぶ線分を直径として持つ球SP122を算出する。領域設定部182は、球SP122を基準領域の境界として設定する。
 基準領域は、直方体、立方体、または円筒などであってもよい。基準領域の形状はこれらの例に限らない。
 表示制御部183は、ステップS102dにおいて、点群データの3D画像の代わりに被写体の2D画像を表示部5に表示してもよい。
 CPU18dは、図20に示す計測部187を有してもよい。ステップS107が実行された後、図21に示すステップS108、ステップS109、およびステップS110が実行されてもよい。
 点設定部185がステップS103において基準点を受け付けた後、ユーザーはその基準点を変更してもよい。ステップS103において設定される基準点の数は2つに限らない。
 領域設定部182がステップS104において基準領域を設定した後、ユーザーは任意のタイミングで基準領域の大きさおよび基準領域の位置の少なくとも一方を変更してもよい。そのタイミングは、基準領域がステップS105において表示された後、または基準面がステップS107において表示された後であってもよい。
 表示制御部183は、点群データの3D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点をその3D画像上に表示してもよい。表示制御部183は、被写体の2D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点に対応する3つ以上の点をその2D画像上に表示してもよい。
 基準領域の表示は必須ではない。したがって、ステップS105が実行される必要はない。基準面の表示は必須ではない。したがって、ステップS107が実行される必要はない。
 第9の実施形態の変形例において、曲率マップの画像が表示部5に表示される。ユーザーは、その画像を参照することにより、基準点の指定に適した領域を判断することができる。
 (第10の実施形態)
 本発明の第10の実施形態を説明する。第10の実施形態において、被写体の表面における異常な領域が自動的に検出され、その領域に対応する領域を除く基準領域が設定される。ユーザーが基準点を指定する必要はない。
 第10の実施形態において、図8に示すCPU18は、図50に示すCPU18eに変更される。図50は、CPU18eの機能構成を示す。制御部180、生成部181、領域設定部182、表示制御部183、面推定部186、および異常検出部191によってCPU18eの機能が構成されている。図50に示すブロックの少なくとも1つがCPU18eとは別の回路で構成されてもよい。図8に示す構成と同じ構成の説明を省略する。
 図50に示す各部は、プロセッサおよび論理回路の少なくとも1つで構成されてもよい。図50に示す各部は、1つまたは複数のプロセッサを含むことができる。図50に示す各部は、1つまたは複数の論理回路を含むことができる。
 異常検出部191は、点群データの3D画像および被写体の2D画像の一方に基づいて被写体の表面における異常な領域を検出する(異常検出ステップ)。領域設定部182は、異常な領域に対応する領域を除く基準領域を設定する(領域設定ステップ)。
 図51を使用することにより、第10の実施形態における面推定処理について説明する。図51は、面推定処理の手順を示す。図9に示す処理と同じ処理の説明を省略する。
 ステップS101の後、表示制御部183は、被写体の2D画像を表示部5に表示する(ステップS102e)。
 ステップS102eの後、異常検出部191は、被写体の2D画像に基づいて被写体の表面における異常な領域を検出する(ステップS131)。ステップS131は、異常検出ステップに対応する。
 異常検出部191は、異常の認識モデルを使用することにより、異常な領域を被写体の2D画像から検出する。例えば、異常の認識モデルは、Deep Learningのような機械学習を通して取得される。異常は、欠陥または傷などである。異常検出部191は、異常の種類および異常な領域の位置を得る。
 ステップS131の後、領域設定部182は、異常な領域に対応する領域を除く基準領域を被写体の2D画像に設定する(ステップS104e)。ステップS104eは、領域設定ステップに対応する。ステップS104eの後、ステップS105が実行される。
 図52および図53は、表示部5に表示される画像の例を示す。被写体の2D画像G131が表示部5に表示される。異常検出部191は、2D画像G131を処理することにより、凸状の異常物AO131を検出する。
 領域設定部182は、異常物AO131の周辺の長方形RC131を算出する。領域設定部182は、長方形RC131から長方形RC131の外側に所定の距離だけ離れた第1の境界を設定する。また、領域設定部182は、長方形RC131から長方形RC131の内側に所定の距離だけ離れた第2の境界を設定する。これにより、領域設定部182は、第1の境界および第2の境界を含む基準領域R131を2D画像G131に設定する。
 基準領域R131の境界は、3つ以上の頂点を持つ多角形であってもよい。基準領域R131の境界は、円または楕円などであってもよい。基準領域R131の形状はこれらの例に限らない。
 被写体の2D画像の代わりに点群データの3D画像が使用されてもよい。以下では、点群データの3D画像が使用される例を説明する。
 表示制御部183は、ステップS102eにおいて、点群データの3D画像を表示部5に表示する。異常検出部191は、ステップS131において、点群データの3D画像に基づいて被写体の表面における異常な領域を検出する。領域設定部182は、ステップS104eにおいて、異常な領域に対応する領域を除く基準領域を3D空間に設定する。
 CPU18eは、図20に示す計測部187を有してもよい。ステップS107が実行された後、図21に示すステップS108、ステップS109、およびステップS110が実行されてもよい。
 制御部180は、異常検出部191によって検出された異常の種類に基づいて計測モードを設定してもよい。例えば、凸状または凹状の異常物が検出された場合、制御部180は、高さまたは深さを計測するために計測モードを面基準計測に設定してもよい。
 基準領域の大きさを示す領域情報が記録媒体に予め記録されてもよい。領域設定部182は、ステップS104eにおいて、領域情報に基づいて基準領域の大きさを設定してもよい。
 2つ以上の領域情報が記録媒体に予め記録されてもよい。領域設定部182は、ステップS104eにおいて、操作部4を通して入力された情報に基づいて2つ以上の領域情報のうちの1つを選択してもよい。領域設定部182は、ステップS104eにおいて、選択された領域情報に基づいて基準領域の大きさを設定してもよい。
 領域設定部182がステップS104eにおいて基準領域を設定した後、ユーザーは任意のタイミングで基準領域の大きさおよび基準領域の位置の少なくとも一方を変更してもよい。そのタイミングは、基準領域がステップS105において表示された後、または基準面がステップS107において表示された後であってもよい。
 表示制御部183は、点群データの3D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点をその3D画像上に表示してもよい。表示制御部183は、被写体の2D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点に対応する3つ以上の点をその2D画像上に表示してもよい。
 基準領域の表示は必須ではない。したがって、ステップS105が実行される必要はない。基準面の表示は必須ではない。したがって、ステップS107が実行される必要はない。
 基準領域の表示および基準面の表示が不要である場合、画像の表示は必須ではない。したがって、ステップS102eが実行される必要はない。CPU18eは、表示制御部183の機能を有する必要はない。
 第10の実施形態において、内視鏡装置1は、異常な領域を含まない基準領域を設定することができる。そのため、内視鏡装置1は、基準面の精度を向上させることができる。
 (第11の実施形態)
 本発明の第11の実施形態を説明する。第11の実施形態において、偏差マップが表示部5に表示される。偏差マップは、点群データに含まれる3D座標に対応する点と基準面との間の3D距離の分布を示す。
 第11の実施形態において、図8に示すCPU18は、図54に示すCPU18fに変更される。図54は、CPU18fの機能構成を示す。制御部180、生成部181、領域設定部182、表示制御部183、位置算出部184、点設定部185、面推定部186、および偏差算出部192によってCPU18fの機能が構成されている。図54に示すブロックの少なくとも1つがCPU18fとは別の回路で構成されてもよい。図8に示す構成と同じ構成の説明を省略する。
 図54に示す各部は、プロセッサおよび論理回路の少なくとも1つで構成されてもよい。図54に示す各部は、1つまたは複数のプロセッサを含むことができる。図54に示す各部は、1つまたは複数の論理回路を含むことができる。
 偏差算出部192は、点群データにおける各点と基準面との間の3D距離を算出することにより偏差を算出する。偏差算出部192は、偏差の分布を示す偏差マップを生成する(マップ生成ステップ)。表示制御部183は、点群データの3D画像および被写体の2D画像の一方を表示部5に表示し、かつ偏差マップを点群データの3D画像または被写体の2D画像上に表示する(画像表示ステップ)。
 図55を使用することにより、第11の実施形態における面推定処理について説明する。図55は、面推定処理の手順を示す。図9に示す処理と同じ処理の説明を省略する。
 ステップS101の後、表示制御部183は、点群データの3D画像を表示部5に表示する(ステップS102f)。ステップS102fの後、ステップS103が実行される。
 ステップS106の後、偏差算出部192は、点群データの各点における偏差を算出し、かつ偏差マップを生成する(ステップS141)。ステップS141は、マップ生成ステップに対応する。
 ステップS141の後、表示制御部183は、偏差マップの画像を表示部5に表示する(ステップS142)。具体的には、表示制御部183は、偏差マップの画像が重畳された点群データの3D画像を表示するためのグラフィック画像信号を生成する。偏差マップの画像は、各画素のカラーデータを含む。表示制御部183は、生成されたグラフィック画像信号を、映像信号処理回路12を通して表示部5に出力する。表示部5は、偏差マップの画像が重畳された点群データの3D画像を表示する。
 ステップS142は、画像表示ステップに対応する。ステップS142が実行されたとき、面推定処理が終了する。
 図56は、表示部5に表示される画像の例を示す。点群データの3D画像G141が表示部5に表示され、かつ偏差マップの画像G142が3D画像G141上に表示される。画像G142の画素は、その画素における偏差に対応する色で表示される。例えば、大きな偏差を持つ画素は濃い色で表示され、かつ小さな偏差を持つ画素は薄い色で表示される。図56において、基準領域および基準面は省略されている。
 ユーザーは、画像G142を参照することにより、基準面が被写体の表面と一致しているか否かを確認することができる。大きな偏差を持つ領域が基準領域に含まれる場合、基準面の精度が悪化する可能性がある。基準領域および画像G142が3D画像G141上に表示された場合、ユーザーは大きな偏差を持つ領域が基準領域に含まれるか否かを確認することができる。
 表示制御部183は、ステップS102fにおいて、点群データの3D画像の代わりに被写体の2D画像を表示部5に表示してもよい。
 CPU18fは、図20に示す計測部187を有してもよい。ステップS107、ステップS141、またはステップS142が実行された後、図21に示すステップS108、ステップS109、およびステップS110が実行されてもよい。
 点設定部185がステップS103において基準点を受け付けた後、ユーザーはその基準点を変更してもよい。
 基準領域の大きさおよび基準領域の位置の少なくとも一方を示す領域情報が記録媒体に予め記録されてもよい。領域設定部182は、ステップS104において、領域情報に基づいて基準領域の大きさおよび基準領域の位置の少なくとも一方を設定してもよい。例えば、領域設定部182は、領域情報に基づいて基準領域の外側の境界の大きさおよび基準領域の外側の境界の位置の少なくとも一方を設定してもよい。
 2つ以上の領域情報が記録媒体に予め記録されてもよい。領域設定部182は、ステップS104において、操作部4を通して入力された情報に基づいて2つ以上の領域情報のうちの1つを選択してもよい。領域設定部182は、ステップS104において、選択された領域情報に基づいて基準領域の大きさおよび基準領域の位置の一方を設定してもよい。
 領域設定部182がステップS104において基準領域を設定した後、ユーザーは任意のタイミングで基準領域の大きさおよび基準領域の位置の少なくとも一方を変更してもよい。そのタイミングは、基準領域がステップS105において表示された後、または偏差マップがステップS142において表示された後であってもよい。
 領域設定部182は、基準点を使用せずに基準領域を設定してもよい。したがって、ステップS103が実行される必要はない。CPU18fは、位置算出部184および点設定部185の機能を有する必要はない。
 表示制御部183は、点群データの3D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点をその3D画像上に表示してもよい。表示制御部183は、被写体の2D画像を表示部5に表示してもよく、かつ基準面の推定に使用された点群データの3つ以上の点に対応する3つ以上の点をその2D画像上に表示してもよい。
 基準領域の表示は必須ではない。したがって、ステップS105が実行される必要はない。
 第11の実施形態において、偏差マップの画像が表示部5に表示される。ユーザーは、その画像を参照することにより、基準面が被写体の表面を正確に近似できているか否かを確認することができる。
 (第12の実施形態)
 本発明の第12の実施形態を説明する。以下では、図7に示すPC41が面推定装置である例を説明する。PC41は、被写体の2D画像を内視鏡装置1から取得し、かつ面推定処理を実行する。
 内視鏡装置1の外部機器インタフェース16は、PC41と通信を実行する。具体的には、外部機器インタフェース16は、1枚以上の被写体の2D画像をPC41に送信する。PC41は、その2D画像を内視鏡装置1から受信する。
 例えば、外部機器インタフェース16はケーブルあるいは無線でPC41と接続される。外部機器インタフェース16とPC41との間の通信は、LAN(Local Area Network)またはインターネットを経由して実行されてもよい。
 図57は、PC41の構成を示す。図57に示すPC41は、通信部43、CPU44、および表示部45を有する。
 通信部43は、内視鏡装置1の外部機器インタフェース16と通信を実行する。具体的には、通信部43は、1枚以上の被写体の2D画像を外部機器インタフェース16から受信する。CPU44は、面推定処理を実行する。表示部45は、LCD等のモニタ(ディスプレイ)である。表示部45は、表示画面を有し、かつ画像および操作メニュー等を表示画面に表示する。
 図58は、CPU44の機能構成を示す。制御部440、生成部441、領域設定部442、表示制御部443、位置算出部444、点設定部445、面推定部446、および通信制御部447によってCPU44の機能が構成されている。図58に示すブロックの少なくとも1つがCPU44とは別の回路で構成されてもよい。
 図58に示す各部は、プロセッサおよび論理回路の少なくとも1つで構成されてもよい。図58に示す各部は、1つまたは複数のプロセッサを含むことができる。図58に示す各部は、1つまたは複数の論理回路を含むことができる。
 制御部440は、各部が実行する処理を制御する。生成部441は、図8に示す生成部181の機能と同じ機能を持つ。領域設定部442は、図8に示す領域設定部182の機能と同じ機能を持つ。表示制御部443は、図8に示す表示制御部183の機能と同じ機能を持つ。位置算出部444は、図8に示す位置算出部184の機能と同じ機能を持つ。点設定部445は、図8に示す点設定部185の機能と同じ機能を持つ。面推定部446は、図8に示す面推定部186の機能と同じ機能を持つ。通信制御部447は、通信部43を制御することにより、内視鏡装置1の外部機器インタフェース16と通信を実行する。
 CPU44は、図9に示す面推定処理を実行する。CPU44は、図20に示す計測部187の機能を持ってもよい。CPU44が計測部187の機能を持つ場合、CPU44は、図21に示す3D計測を実行してもよい。CPU44は、図32に示す状態判断部188の機能を持ってもよい。CPU44が状態判断部188の機能を持つ場合、CPU44は、図33、図37、または図39に示す面推定処理を実行してもよい。
 CPU44は、図44に示す分割部189の機能を持ってもよい。CPU44が分割部189の機能を持つ場合、CPU44は、図45に示す面推定処理を実行してもよい。CPU44は、図47に示す曲率算出部190の機能を持ってもよい。CPU44が曲率算出部190の機能を持つ場合、CPU44は、図48に示す面推定処理を実行してもよい。
 CPU44は、図50に示す異常検出部191の機能を持ってもよい。CPU44が異常検出部191の機能を持つ場合、CPU44は、図51に示す面推定処理を実行してもよい。CPU44は、図54に示す偏差算出部192の機能を持ってもよい。CPU44が偏差算出部192の機能を持つ場合、CPU44は、図55に示す面推定処理を実行してもよい。
 CPU44は、CPU44の動作を規定する命令を含むプログラムを読み込み、かつ読み込まれたプログラムを実行してもよい。つまり、CPU44の機能はソフトウェアにより実現されてもよい。
 内視鏡装置1が被写体の2D画像に基づいて点群データを生成し、かつ内視鏡装置1の外部機器インタフェース16がその2D画像およびその点群データをPC41に送信してもよい。PC41の通信部43は、その2D画像およびその点群データを外部機器インタフェース16から受信してもよい。したがって、CPU44が生成部181を有する必要はない。
 第12の実施形態において、PC41は、基準面の精度を向上させることができる。
 (関連技術)
 工業用内視鏡を使用する検査では3D計測が実行される。3D計測において、ユーザーは、内視鏡の視野に捉えられた計測対象物と内視鏡先端の間の構図を調整し、かつ画像を取得する。ユーザーは、取得された画像上で所望の複数の点(座標)を入力し、かつ計測結果を得る。
 3D計測の方法の1つとしてステレオ計測がある。ステレオ計測において、第1の視点から見た被写体の第1の画像と、第1の視点と異なる第2の視点から見た被写体の第2の画像とを含むステレオ画像が使用される。ステレオ計測において、マッチング処理が実行され、かつ第1の画像上の点に対応する第2の画像上の点が検出される。
 ユーザーが点を入力する画像には、正確な計測を阻害する様々な要因が含まれている場合がある。これらの要因は、総称してマッチング阻害要因と呼ばれる。また、マッチング阻害要因が含まれる画像上の領域はマッチング阻害領域と呼ばれる。
 ユーザーが誤ってマッチング阻害領域における点を入力した場合、装置はその点の正確な3D座標を計算できず、かつ正確な計測結果を得ることができない。そのため、ユーザーが点を入力するときには、計測を実行できる領域と計測を実行できないマッチング阻害領域とをユーザーに通知することが重要である。そのとき、装置はそれらの領域を可視化する方法などの方法を使用することができる。
 マッチング阻害要因の具体例として、オクルージョンと呼ばれる現象、または光学系に付着した不要な物体などがある。また、被写体の表面に照射された照明光の鏡面反射が発生し、反射光の光学像が画像に写る場合がある。照明光の鏡面反射を原因とするこの現象もマッチング阻害要因の例である。以下では、その現象は注目要因と呼ばれる。
 注目要因の発生頻度は他のマッチング阻害要因の発生頻度よりも高い。また、ステレオ画像に含まれる2枚の画像の一方のみが表示され、ステレオ画像に含まれる2枚の画像の他方に注目要因が発生している場合、ユーザーは、表示されていない画像における注目要因に気付きにくい。そのため、注目要因が発生した領域を検出し、その領域をユーザーに通知することが重要である。
 注目要因が発生した場合であってもユーザーが正確に点を入力するためには、主に以下の2つの方法が考えられる。
 第1の方法は、ステレオ画像において計測可能領域の全体にマッチング処理を適用する方法である。計測可能領域は、第1の画像および第2の画像間で共通の視野を持つ領域である。例えば、第1の方法は、ユーザーが入力した点の信頼度を可視化する方法を含む。その信頼度は、ステレオ画像の計測可能領域の全体に適用されたマッチング処理を通して得られる。あるいは、第1の方法は、そのマッチング処理を通して得られた被写体の3D形状を表示する方法などを含む。
 しかしながら、これらの方法では、計測可能領域の全ての点におけるマッチング処理が必要であるため、一般的に処理時間が長い。そのため、画像が取得されてから、注目要因が発生した領域がユーザーに通知されるまでの待ち時間が長くなるという欠点がある。
 第2の方法は、注目要因が発生した場合でも正確なマッチング処理が実行されるようにアルゴリズムを工夫する方法である。第2の方法では、入力された点に対応する正確な3D座標を計算することが理想である。マッチング処理において、ステレオ画像における第1の画像および第2の画像の輝度または色の情報を使用することにより計算が実行されることが多い。注目要因によって生じた明るい部分の模様が被写体の模様よりも強い場合、一般的にはマッチングミスを回避することは難しい。仮に、注目要因が発生した領域上の点に基づいて正確なマッチング処理を実行できるアルゴリズムが存在したとしても、正確性と処理時間とを両立させることは難しい。
 したがって、第1の方法および第2の方法と異なる方法を使用することにより、注目要因が発生した領域を短い処理時間で検出することが必要である。特に、工業用内視鏡のような組み込み機器では、計算リソースに制限がある。そのため、処理時間の改善の必要性が高い。また、ライブで表示される画像において一定の時間間隔でマッチング阻害領域を検出できることが望ましい。これにより装置は、構図を調整する段階で、画像が計測に適しているか否かをユーザーに通知することができる。
 上記の処理時間への要求に応えるために、3D座標の計算結果を使用せずに被写体の2D画像を使用することにより、注目要因が発生した領域を短い処理時間で検出する方法がある。例えば、その方法は、日本国特許第6253380号公報(参考文献)に開示されている。
 上記の参考文献では、ステレオ画像における第1の画像および第2の画像を使用することにより、各画像に含まれる不要な成分を検出する方法が開示されている。その不要な成分は、マッチング阻害領域と必ずしも一致しない。具体的には、不要な成分を検出する方法として以下の方法が開示されている。
 互いに異なる視差を有する複数の画像が取得される。複数の画像に含まれる各画像が基準画像に設定され、その基準画像と他の1枚以上の画像との差分である相対差分が算出される。相対差分の情報を使用することにより各画像に含まれる不要な成分が検出される。
 また、上記の方法に加えて、相対差分が算出される前にステレオ画像に含まれる2枚の画像の位置合わせ処理を実行してもよいことが開示されている。
 (関連技術の課題)
 参考文献に開示された技術では、互いに異なる視差を持つ複数の画像に含まれる各画像が基準画像に設定され、その基準画像と他の1つ以上の画像との差分が算出される。この方法が工業用内視鏡に適用される場合、処理時間と検出精度との観点でマッチング阻害領域の検出性能が低下する可能性がある。以下では、これらの観点について説明する。
 (1)処理時間の観点
 組み込み機器である工業用内視鏡における計算リソースに制限がある。また、ライブで表示される画像において一定の時間間隔でマッチング阻害領域を検出できることが望ましい。そのため、短い処理時間が望まれている。
 参考文献で開示されている方法では、ステレオ画像に含まれる2枚の画像の各々が基準画像として設定され、同じ処理が2回繰り返される。そのため、処理が冗長であり、かつ長い処理時間が必要である。
 (2)検出精度の観点
 参考文献に開示された技術では、照明光の鏡面反射を原因とする注目要因が発生した領域を検出することは想定されていない。工業用内視鏡では、内視鏡と被写体との間の距離が様々である状態で撮影が実行されるため、参考文献に開示されている2枚の画像の位置合わせ処理が適している。
 工業用内視鏡では、照明光学系とステレオ観察光学系とが互いに物理的に近い。そのため、特に被写体が内視鏡に近い場合、ステレオ画像に含まれる2枚の画像の間で輝度の差が生じやすい。仮に、長い処理時間で実行される高精度な位置合わせ処理がその2枚の画像に適用された後、その2枚の画像の間で輝度の差は残る。そのため、その2枚の画像の間で輝度の差を持つ領域がマッチング阻害領域として誤って検出される可能性がある。
 その輝度の差を持つ領域の全体において注目要因が発生しているとは限らない。注目要因が発生した領域を検出するためには、その輝度の差を持つ領域の全体を検出する必要はない。
 被写体の特定の撮影条件において、位置合わせ処理が実行された2枚の画像の間で位置のズレが生じる可能性がある。このズレが生じた領域では、その2枚の画像の間で輝度の差が生じる。そのため、その輝度の差を持つ領域がマッチング阻害領域として誤って検出される可能性がある。
 関連発明は、照明光の鏡面反射を原因とする注目要因が発生した領域を短い処理時間でかつ高い精度で検出することができる方法を提供することを目的とする。
 (関連発明の実施形態)
 関連発明の実施形態を説明する。関連発明の実施形態の内視鏡装置1は、図8に示すCPU18の代わりに図59に示すCPU18gを有する。図59は、CPU18gの機能構成を示す。制御部200、特徴点処理部201、分割部202、差分算出部203、判断部204、領域検出部205、および表示制御部206によってCPU18gの機能が構成されている。図59に示すブロックの少なくとも1つがCPU18gとは別の回路で構成されてもよい。
 図59に示す各部は、プロセッサおよび論理回路の少なくとも1つで構成されてもよい。図59に示す各部は、1つまたは複数のプロセッサを含むことができる。図59に示す各部は、1つまたは複数の論理回路を含むことができる。
 制御部200は、被写体のステレオ画像(画像データ)を映像信号処理回路12から取得し、かつ図59に示す各部が実行する処理を制御する。ステレオ画像は、第1の視点から見た被写体の第1の画像と、第1の視点と異なる第2の視点から見た被写体の第2の画像とを含む。
 特徴点処理部201は、第1の画像上の3つ以上の特徴点を検出し、かつ各特徴点に対応する第2の画像上の点を検出する。特徴点処理部201は、第1の画像上の特徴点と第2の画像上の点とを関連付ける。
 分割部202は、第1の画像上の特徴点と関連付けられた第2の画像上の点に基づいて第2の画像にドロネー三角形分割を実行する。これにより、分割部202は、第2の画像に1つ以上の三角形の領域を設定する。分割部202は、2枚の画像の間で関連付けられた点の関係に基づいて第1の画像に1つ以上の三角形の領域を設定する。また、分割部202は、第1の画像における三角形の形状と第2の画像における三角形の形状とを一致させるために、第2の画像における三角形を変形させる。
 差分算出部203は、第1の画像の画素値と第2の画像の画素値との間の差分を画素毎に算出する。これにより、差分算出部203は、2枚の画像の間の輝度の差分を算出する。差分算出部203は、差分が所定の閾値を超えている画素を含む領域を第1の画像から抽出する。抽出された領域は、照明光の鏡面反射を原因とする注目要因が発生した領域の候補である。
 判断部204は、抽出された領域のうち似た特徴を持つ2つの領域のペアが存在するか否かを判断する。以下では、この判断はペアリング判断と呼ばれる。注目要因がステレオ画像において発生した場合、このペアが存在するという特徴がある。そのペアが存在する場合、判断部204は、そのペアに含まれる領域を、注目要因が発生した領域として検出する。
 また、判断部204は、第1の画像において、予め設定された輝度の基準値を超える輝度を持つ領域を検出する。その領域の少なくとも一部が、ペアリング判断において検出された2つの領域と重なる場合、判断部204は、ペアリング判断において検出された2つの領域と、高輝度を持つ領域とを、注目要因が発生した領域として検出する。
 表示制御部206は、ステレオ画像を表示部5に表示し、かつ注目要因が発生した領域をステレオ画像上に表示する。
 図60を使用することにより、注目要因が発生した領域を検出する処理について説明する。図60は、その処理の手順を示す。
 特徴点処理部201は、第1の画像上の特徴点を検出し、かつ各特徴点に対応する第2の画像上の点を検出する(ステップS201)。
 ステップS201の詳細を説明する。図61は、ステレオ画像の例を示す。図61に示すステレオ画像は、第1の画像G201および第2の画像G202を含む。特徴点処理部201は、第1の画像G201上の特徴点P201、特徴点P202、および特徴点P203を検出する。特徴点処理部201は、第2の画像G202上の点P211を検出し、かつ点P211を特徴点P201と関連付ける。特徴点処理部201は、第2の画像G202上の点P212を検出し、かつ点P212を特徴点P202と関連付ける。特徴点処理部201は、第2の画像G202上の点P213を検出し、かつ点P213を特徴点P203と関連付ける。図61に示す例では、3つの特徴点が検出される。特徴点の数は3つに限らない。
 特徴点処理部201は、第1の画像および第2の画像を使用するマッチング処理における誤差が小さいことが期待される点を特徴点として検出する。特徴点処理部201は、その目的のために、以下の指標をチェックすることにより特徴点の適切性を判断する。例えば、特徴点処理部201は、ユニークネスレシオ、視差の連続性、画像の一貫性、および再投影誤差などを指標として使用する。
 ユニークネスレシオは、第2の画像上の2つの点の類似性を示す。具体的には、ユニークネスレシオは、第1の点と第2の点との類似性を示す。第1の点は、第1の画像上の特徴点と最も似ている点である。第2の点は、その特徴点と2番目に似ている点である。視差の連続性は、局所的な範囲において許容される視差の関係を示す。特徴点における視差と、その特徴点の周辺の点における視差とがほぼ同じである場合、視差の連続性がある。特徴点における視差と、その特徴点の周辺の点における視差とが大きく異なる場合、視差の連続性がない。
 画像の一貫性は、マッチング処理を通して関連付けられる2つの点の関係を示す。具体的には、2回のマッチング処理が実行される。第1の画像上の点に対応する第2の画像上の点が第1のマッチング処理を通して検出される。また、第2の画像上のその点に対応する第1の画像上の点が第2のマッチング処理を通して検出される。画像の一貫性は、2つの点が一致する程度を示す。2つの点の一方は、第1のマッチング処理に使用された第1の画像上の点である。2つの点の他方は、第2のマッチング処理を通して検出された第1の画像上の点である。2回のマッチング処理において、1枚の画像の全体を使用する必要はない。
 再投影誤差は、マッチング処理を通して検出された点とエピポーララインとの間のズレ量を示す。
 特徴点処理部201は、上記の指標の全てを使用する必要はない。特徴点処理部201は、1つ以上の指標に基づいて特徴点の適切性を判断する。
 特徴点処理部201は、何らかの特徴を持つ点を第1の画像から検出することにより特徴点を検出してもよい。あるいは、第1の画像が予め格子状に分割され、特徴点処理部201は、2つの境界線の交点を特徴点の候補として検出してもよい。
 ステップS201の後、分割部202は、第2の画像に1つ以上の三角形の領域を設定し、かつ2枚の画像の間における点の関係に基づいて第1の画像に1つ以上の三角形の領域を設定する(ステップS202)。
 ステップS202の詳細を説明する。分割部202は、第2の画像にドロネー三角形分割を実行することにより、第2の画像に1つ以上の三角形の領域を設定する。各三角形の頂点は、ステップS201において検出された第1の画像上の特徴点と関連付けられている。図62は、三角形が設定された画像の例を示す。第2の画像G203の領域は、2つ以上の三角形の領域を含む。
 分割部202は、第2の画像上の1つの三角形の3つの頂点に対応する第1の画像上の3つの特徴点を特定する。分割部202は、その3つの特徴点を頂点として持つ三角形を第1の画像に設定する。分割部202は、第2の画像上の三角形と第1の画像上の三角形とを関連付ける。分割部202は、第2の画像上の全ての三角形を対象に上記の処理を実行する。
 図63は、第1の画像および第2の画像の各々に設定された三角形を示す。第1の画像の一部である画像G204および第2の画像の一部である画像G205が図63に示されている。画像G204上の三角形T201および画像G205上の三角形T202は互いに関連付けられている。分割部202は、三角形T202の形状を変形させ、三角形T201の形状と三角形T202の形状とを一致させる。分割部202は、この処理を第2の画像上の全ての三角形に施すことにより、第2の画像の変形画像を生成する。
 ステップS202の後、差分算出部203は、第1の画像および第2の画像の間の輝度の差分を算出する(ステップS203)。
 ステップS203の詳細を説明する。差分算出部203は、第1の画像と、ステップS202において生成された第2の画像の変形画像とを使用することにより輝度の差分を算出する。差分算出部203は、差分が所定の閾値を超えている画素を含む領域を第1の画像から抽出する。例えば、差分算出部203は、第1の画像の画素値から第2の画像の変形画像の画素値を減算することにより差分を算出する。差分算出部203は、正の差分が所定の閾値よりも大きな画素を含む領域を第1の画像から抽出する。また、差分算出部203は、負の差分が所定の閾値よりも小さな画素を含む領域を第1の画像から抽出する。
 図64および図65は、第1の画像の例を示す。図64に示す第1の画像G206の領域は、領域R201および領域R202を含む。領域R201は、正の差分が所定の閾値よりも大きな画素を含む。領域R202は、負の差分が所定の閾値よりも小さな画素を含む。図65に示す第1の画像G207の領域は、領域R203および領域R204を含む。領域R203は、正の差分が所定の閾値よりも大きな画素を含む。領域R204は、負の差分が所定の閾値よりも小さな画素を含む。
 ステップS203の後、判断部204は、ペアリング判断を実行する。これにより、判断部204は、ステップS203において抽出された領域のうち似た特徴を持つ2つの領域のペアが存在するか否かを判断する(ステップS204)。
 ステップS204の詳細を説明する。図64に示す例では、判断部204は、領域R201および領域R202の特徴が互いに似ているか否かを判断する。図65に示す例では、判断部204は、領域R203および領域R204の特徴が互いに似ているか否かを判断する。判断部204は、以下の指標を使用することによりペアリング判断を実行する。
 判断部204は、2つの領域の輝度の差分の符号が互いに異なるか否かを判断する。1つの領域の輝度の差分が正であり、かつ他の1つの領域の輝度の差分が負である場合、判断部204は、2つの領域の特徴が互いに似ていると判断する。
 判断部204は、2つの領域の間の距離を判断する。2つの領域が互いに近い場合、判断部204は、2つの領域の特徴が互いに似ていると判断する。
 判断部204は、2つの領域の形状を比較する。2つの領域の形状が互いに似ている場合、判断部204は、2つの領域の特徴が互いに似ていると判断する。
 判断部204は、2つの領域の方向(角度)を比較する。例えば、判断部204は、各領域を、各領域に外接する矩形に近似し、その矩形の長軸および短軸の角度を比較する。2つの領域の方向が互いに近い場合、判断部204は、2つの領域の特徴が互いに似ていると判断する。
 判断部204は、2つの領域の面積を比較する。2つの領域の面積が互いに近い場合、判断部204は、2つの領域の特徴が互いに似ていると判断する。
 判断部204は、上記の指標の全てを使用する必要はない。判断部204は、1つ以上の指標に基づいて2つの領域の特徴が互いに似ているか否かを判断する。判断部204は、そのペアに含まれる領域を、注目要因が発生した領域として検出する。
 ステップS204の後、判断部204は、第1の画像において、予め設定された輝度の基準値を超える輝度を持つ領域を検出する(ステップS205)。
 ステップS205の詳細を説明する。例えば、判断部204は、画素値が基準値を超えるか否かを画素毎に判断する。基準値の例は、250である。判断部204は、基準値を超える画素値を持つ画素が含まれる領域を検出する。検出された領域は、高輝度を持つ。判断部204は、高輝度を持つ領域の少なくとも一部が、ペアリング判断において検出された2つの領域と重なるか否かを判断する。高輝度を持つ領域が重なりを持つ場合、判断部204は、高輝度を持つ領域と、ペアリング判断において検出された2つの領域との和集合を、注目要因が発生した領域として検出する。高輝度を持つ領域が重なりを持たない場合、判断部204は、ペアリング判断において検出された2つの領域のみを、注目要因が発生した領域として検出する。
 図66は、注目要因が発生した領域の例を示す。領域R205は、基準値を超える輝度を持つ画素を含む。領域R206および領域R207は、ペアリング判断において検出されたペアである。領域R205の一部は領域R206と重なり、かつ領域R205の他の一部は領域R207と重なる。そのため、判断部204は、領域R205、領域R206、および領域R207の和集合を、注目要因が発生した領域として検出する。
 ステップS205の後、判断部204は、注目要因が発生した領域を凸曲線(凸な閉曲線)で囲む。判断部204は、凸曲線で囲まれた領域を、注目要因が発生した領域として最終的に検出する(ステップS206)。
 図66に示す例では、領域R205、領域R206、および領域R207は、凸曲線L201で囲まれる。判断部204は、凸曲線L201で囲まれた領域の全てを、注目要因が発生した領域として検出する。凸曲線L201で囲まれた領域は、領域R205、領域R206、および領域R207を含む。また、凸曲線L201で囲まれた領域は、領域R205、領域R206、および領域R207以外の領域を含む。
 ステップS205が実行されずにステップS206が実行されてもよい。高輝度を持つ領域が存在する場合、凸曲線で囲まれた領域は、高輝度を持つ領域の少なくとも一部を含む。
 ステップS206の後、表示制御部206は、ステレオ画像を表示部5に表示し、かつ注目要因が発生した領域をステレオ画像上に表示する(ステップS207)。ステップS207が実行されたとき、図60に示す処理が終了する。
 具体的には、表示制御部206は、注目要因が発生した領域を表示するためのグラフィック画像信号を生成する。表示制御部206は、生成されたグラフィック画像信号を映像信号処理回路12に出力する。映像信号処理回路12は、CCU9から出力された映像信号と、CPU18gから出力されたグラフィック画像信号とを合成する。映像信号処理回路12は、合成された映像信号を表示部5に出力する。表示部5は、注目要因が発生した領域が重畳されたステレオ画像を表示する。例えば、ステレオ画像に含まれる第1の画像が表示部5に表示され、かつ注目要因が発生した領域が第1の画像上に表示される。
 注目要因が発生した領域がステレオ画像上に表示される。そのため、ユーザーは、注目要因が発生した領域における点を入力することを避けることができる。マッチング阻害領域における点の入力が回避されるため、ステレオ計測の精度が向上する。
 高輝度を持つ領域はマッチング処理に適していない場合が多い。高輝度を持つ領域が、ペアリング判断において検出された2つの領域と重ならない場合であっても、表示制御部206は、ユーザーへの注意喚起のために高輝度を持つ領域をステレオ画像上に表示してもよい。ユーザーは、高輝度を持つ領域における点を入力することを避けることができる。
 関連発明の実施形態において、ステレオ画像に含まれる2枚の画像の各々が基準画像として設定され、かつマッチング処理が2回実行される必要はない。そのため、内視鏡装置1は、注目要因が発生した領域を短い処理時間で検出することができる。関連発明の実施形態において、ペアリング判断が実行される。そのため、内視鏡装置1は、注目要因が発生した領域を高精度に検出することができる。
 以上、本発明の好ましい実施形態を説明したが、本発明はこれら実施形態およびその変形例に限定されることはない。本発明の趣旨を逸脱しない範囲で、構成の付加、省略、置換、およびその他の変更が可能である。また、本発明は前述した説明によって限定されることはなく、添付のクレームの範囲によってのみ限定される。
 本発明の各実施形態によれば、面推定方法、面推定装置、および記録媒体は、基準面の精度を向上させることができる。
 1 内視鏡装置
 2 挿入部
 3 本体部
 4 操作部
 5,45 表示部
 7 面推定装置
 8 内視鏡ユニット
 9 CCU
 10 制御装置
 12 映像信号処理回路
 13 ROM
 14 RAM
 15 カードインタフェース
 16 外部機器インタフェース
 17 制御インタフェース
 18,18a,18b,18c,18d,18e,18f,18g,44 CPU
 20 先端
 28 撮像素子
 41 PC
 42 メモリカード
 43 通信部
 70,181,441 生成部
 71,182,442 領域設定部
 72,186,446 面推定部
 180,200,440 制御部
 183,206,443 表示制御部
 184,444 位置算出部
 185,445 点設定部
 187 計測部
 188 状態判断部
 189,202 分割部
 190 曲率算出部
 191 異常検出部
 192 偏差算出部
 201 特徴点処理部
 203 差分算出部
 204 判断部
 205 領域検出部
 447 通信制御部

Claims (27)

  1.  被写体の2次元画像に基づいて前記被写体上の3つ以上の点の3次元座標を算出し、かつ前記3つ以上の点の前記3次元座標を含む3次元画像データを生成する生成ステップと、
     3次元の領域および2次元の領域の一方である基準領域を設定し、前記3次元の領域は、3つ以上の点を含み、かつ3次元空間に設定され、前記3次元空間は、前記3次元画像データに含まれる前記3次元座標を含み、前記2次元の領域は、3つ以上の点を含み、かつ前記2次元画像に設定され、前記基準領域の前記3つ以上の点は、三角形を形成する3つの点で構成される1つ以上の組を含む領域設定ステップと、
     前記基準領域に含まれる前記3つ以上の点に対応する前記3次元画像データの3つ以上の点に基づいて、前記被写体の表面を近似する基準面を推定する推定ステップと、
     を有する面推定方法。
  2.  前記領域設定ステップにおいて、前記3次元の領域である前記基準領域が前記3次元空間に設定される
     請求項1に記載の面推定方法。
  3.  前記領域設定ステップにおいて、前記2次元の領域である前記基準領域が前記2次元画像に設定される
     請求項1に記載の面推定方法。
  4.  前記領域設定ステップにおいて、前記3次元画像データに含まれる前記3次元座標に対応する前記3つ以上の点の連続性が判断され、
     前記基準領域は、前記連続性を持つと判断された前記3つ以上の点のみを含む
     請求項2に記載の面推定方法。
  5.  前記基準領域は、凸集合ではない領域を含む
     請求項1に記載の面推定方法。
  6.  前記基準領域は、2つ以上の領域を含む
     請求項1に記載の面推定方法。
  7.  前記3次元画像データの画像および前記2次元画像の一方をディスプレイに表示する画像表示ステップと、
     入力装置を通して入力された位置情報を受け付け、前記位置情報は、前記ディスプレイに表示された前記3次元画像データの前記画像または前記2次元画像上の位置を示す位置入力ステップと、
     前記被写体の状態を判断する状態判断ステップと、
     をさらに有し、
     前記領域設定ステップにおいて、前記位置情報が示す前記位置と、前記状態とに基づいて前記基準領域の境界が判断される
     請求項1に記載の面推定方法。
  8.  前記基準領域の境界は、第1の境界と、前記第1の境界よりも内側にある第2の境界とを含む
     請求項5に記載の面推定方法。
  9.  前記領域設定ステップにおいて、前記3次元画像データに含まれる前記3次元座標に対応する前記3つ以上の点が2つ以上の領域に分割され、
     前記基準領域の境界は、前記2つ以上の領域に含まれる1つ以上の領域の境界を含む
     請求項6に記載の面推定方法。
  10.  前記基準領域の大きさおよび前記基準領域の位置の少なくとも一方を示す領域情報が記録媒体に予め記録されており、
     前記領域設定ステップにおいて、前記領域情報に基づいて前記基準領域の前記大きさおよび前記基準領域の前記位置の少なくとも一方が設定される
     請求項6に記載の面推定方法。
  11.  前記3次元画像データの画像および前記2次元画像の一方をディスプレイに表示する画像表示ステップをさらに有し、
     前記領域設定ステップにおいて、前記3次元画像データの前記画像または前記2次元画像上の3つ以上の点が入力装置を通して入力され、
     前記領域設定ステップにおいて、入力された前記3つ以上の点を含む前記基準領域が設定される
     請求項6に記載の面推定方法。
  12.  前記領域設定ステップにおいて、入力された前記3つ以上の点を結ぶ線分に基づいて前記基準領域が設定される
     請求項11に記載の面推定方法。
  13.  前記3次元画像データの画像および前記2次元画像の一方をディスプレイに表示する画像表示ステップをさらに有し、
     前記領域設定ステップにおいて、ユーザーが前記3次元画像データの前記画像または前記2次元画像において指定した線上の3つ以上の点が入力装置を通して入力され、
     前記領域設定ステップにおいて、前記線上の前記3つ以上の点を含む前記基準領域が設定される
     請求項6に記載の面推定方法。
  14.  前記推定ステップにおいて、前記基準領域に含まれる4つ以上の点から前記3つ以上の点が選択され、
     前記推定ステップにおいて、選択された前記3つ以上の点に対応する前記3次元画像データの3つ以上の点に基づいて、前記基準面が推定される
     請求項6に記載の面推定方法。
  15.  前記3次元画像データの画像および前記2次元画像の一方をディスプレイに表示し、かつ前記基準領域を前記3次元画像データの前記画像または前記2次元画像上に表示する画像表示ステップをさらに有する
     請求項6に記載の面推定方法。
  16.  前記3次元画像データの画像をディスプレイに表示し、かつ前記基準面の推定に使用された前記3次元画像データの前記3つ以上の点を前記3次元画像データの前記画像上に表示する画像表示ステップをさらに有する
     請求項6に記載の面推定方法。
  17.  前記2次元画像をディスプレイに表示し、かつ前記基準面の推定に使用された前記3次元画像データの前記3つ以上の点に対応する3つ以上の点を前記2次元画像上に表示する画像表示ステップをさらに有する
     請求項6に記載の面推定方法。
  18.  前記3次元画像データに含まれる前記3次元座標に対応する3つ以上の点を2つ以上の領域に分割する分割ステップと、
     前記3次元画像データの画像および前記2次元画像の一方をディスプレイに表示し、かつ前記2つ以上の領域の画像を前記ディスプレイに表示する画像表示ステップと、
     をさらに有する
     請求項6に記載の面推定方法。
  19.  前記3次元画像データが示す前記被写体の3次元形状における曲率の分布を示す曲率マップを生成するマップ生成ステップと、
     前記3次元画像データの画像および前記2次元画像の一方をディスプレイに表示し、かつ前記曲率マップの画像を前記ディスプレイに表示する画像表示ステップと、
     をさらに有する
     請求項6に記載の面推定方法。
  20.  前記3次元画像データの画像および前記2次元画像の一方をディスプレイに表示し、かつ前記基準面に対応する領域を前記3次元画像データの前記画像または前記2次元画像上に表示する画像表示ステップをさらに有する
     請求項6に記載の面推定方法。
  21.  前記3次元画像データの画像および前記2次元画像の一方に基づいて前記被写体の前記表面における異常な領域を検出する異常検出ステップをさらに有し、
     前記領域設定ステップにおいて、前記異常な領域に対応する領域を除く前記基準領域が設定される
     請求項6に記載の面推定方法。
  22.  前記基準面に基づいて前記被写体の大きさを計測する計測ステップをさらに有する
     請求項6に記載の面推定方法。
  23.  前記計測ステップにおいて、前記基準面と前記被写体の前記表面上の点との間の3次元距離が計測される
     請求項22に記載の面推定方法。
  24.  前記推定ステップにおいて、前記基準面の幾何学的な特徴がさらに推定される
     請求項6に記載の面推定方法。
  25.  被写体の2次元画像に基づいて算出された前記被写体上の3つ以上の点の3次元座標を含む3次元画像データを記録媒体から読み出す読み出しステップと、
     3次元の領域および2次元の領域の一方である基準領域を設定し、前記3次元の領域は、3つ以上の点を含み、かつ3次元空間に設定され、前記3次元空間は、前記3次元画像データに含まれる前記3次元座標を含み、前記2次元の領域は、3つ以上の点を含み、かつ前記2次元画像に設定され、前記基準領域の前記3つ以上の点は、三角形を形成する3つの点で構成される1つ以上の組を含む領域設定ステップと、
     前記基準領域に含まれる前記3つ以上の点に対応する前記3次元画像データの3つ以上の点に基づいて、前記被写体の表面を近似する基準面を推定する推定ステップと、
     を有する面推定方法。
  26.  被写体の2次元画像に基づいて前記被写体上の3つ以上の点の3次元座標を算出し、かつ前記3つ以上の点の前記3次元座標を含む3次元画像データを生成する生成部と、
     3次元の領域および2次元の領域の一方である基準領域を設定し、前記3次元の領域は、3つ以上の点を含み、かつ3次元空間に設定され、前記3次元空間は、前記3次元画像データに含まれる前記3次元座標を含み、前記2次元の領域は、3つ以上の点を含み、かつ前記2次元画像に設定され、前記基準領域の前記3つ以上の点は、三角形を形成する3つの点で構成される1つ以上の組を含む領域設定部と、
     前記基準領域に含まれる前記3つ以上の点に対応する前記3次元画像データの3つ以上の点に基づいて、前記被写体の表面を近似する基準面を推定する推定部と、
     を有する面推定装置。
  27.  被写体の2次元画像に基づいて前記被写体上の3つ以上の点の3次元座標を算出し、かつ前記3つ以上の点の前記3次元座標を含む3次元画像データを生成する生成ステップと、
     3次元の領域および2次元の領域の一方である基準領域を設定し、前記3次元の領域は、3つ以上の点を含み、かつ3次元空間に設定され、前記3次元空間は、前記3次元画像データに含まれる前記3次元座標を含み、前記2次元の領域は、3つ以上の点を含み、かつ前記2次元画像に設定され、前記基準領域の前記3つ以上の点は、三角形を形成する3つの点で構成される1つ以上の組を含む領域設定ステップと、
     前記基準領域に含まれる前記3つ以上の点に対応する前記3次元画像データの3つ以上の点に基づいて、前記被写体の表面を近似する基準面を推定する推定ステップと、
     をコンピュータに実行させるためのプログラムが記録されたコンピュータ読み取り可能な記録媒体。
PCT/JP2020/009973 2020-03-09 2020-03-09 面推定方法、面推定装置、および記録媒体 WO2021181448A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2022506992A JPWO2021181448A1 (ja) 2020-03-09 2020-03-09
PCT/JP2020/009973 WO2021181448A1 (ja) 2020-03-09 2020-03-09 面推定方法、面推定装置、および記録媒体
US17/939,041 US20230003991A1 (en) 2020-03-09 2022-09-07 Surface estimation method, surface estimation device, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2020/009973 WO2021181448A1 (ja) 2020-03-09 2020-03-09 面推定方法、面推定装置、および記録媒体

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/939,041 Continuation US20230003991A1 (en) 2020-03-09 2022-09-07 Surface estimation method, surface estimation device, and recording medium

Publications (1)

Publication Number Publication Date
WO2021181448A1 true WO2021181448A1 (ja) 2021-09-16

Family

ID=77671253

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/009973 WO2021181448A1 (ja) 2020-03-09 2020-03-09 面推定方法、面推定装置、および記録媒体

Country Status (3)

Country Link
US (1) US20230003991A1 (ja)
JP (1) JPWO2021181448A1 (ja)
WO (1) WO2021181448A1 (ja)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011039918A (ja) * 2009-08-17 2011-02-24 Sony Corp 画像処理装置、および画像処理方法、並びにプログラム
WO2014084181A1 (ja) * 2012-11-30 2014-06-05 シャープ株式会社 画像計測装置
JP2018533722A (ja) * 2015-09-25 2018-11-15 ゼネラル・エレクトリック・カンパニイ 対象上または対象の近くの特徴を測定するための方法および機器
JP2019121136A (ja) * 2017-12-29 2019-07-22 富士通株式会社 情報処理装置、情報処理システムおよび情報処理方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011039918A (ja) * 2009-08-17 2011-02-24 Sony Corp 画像処理装置、および画像処理方法、並びにプログラム
WO2014084181A1 (ja) * 2012-11-30 2014-06-05 シャープ株式会社 画像計測装置
JP2018533722A (ja) * 2015-09-25 2018-11-15 ゼネラル・エレクトリック・カンパニイ 対象上または対象の近くの特徴を測定するための方法および機器
JP2019121136A (ja) * 2017-12-29 2019-07-22 富士通株式会社 情報処理装置、情報処理システムおよび情報処理方法

Also Published As

Publication number Publication date
US20230003991A1 (en) 2023-01-05
JPWO2021181448A1 (ja) 2021-09-16

Similar Documents

Publication Publication Date Title
EP2495524B1 (en) Method and device for displaying a three-dimensional view of the surface of a viewed object
US10964044B2 (en) Method of operating measurement device, measurement device, and recording medium
WO2010004466A1 (en) Three dimensional mesh modeling
US20210312647A1 (en) Detecting device, information processing device, detecting method, and information processing program
WO2016149189A1 (en) Method and device for displaying a two-dimensional image of a viewed object simultaneously with an image depicting the three-dimensional geometry of the viewed object
WO2017053505A2 (en) Method and device for measuring features on or near an object
US11650407B2 (en) Method of operating observation device, observation device, and recording medium
US11120543B2 (en) Measurement processing device
US11941749B2 (en) Image display method, display control device, and recording medium for displaying shape image of subject and coordinates estimated from two-dimensional coordinates in reference image projected thereon
JPWO2005096129A1 (ja) 撮像装置の指示位置検出方法および装置、撮像装置の指示位置検出用プログラム
WO2021181448A1 (ja) 面推定方法、面推定装置、および記録媒体
US11055865B2 (en) Image acquisition device and method of operating image acquisition device
US20220357157A1 (en) Image-processing method, image-processing device, and recording medium
US10432916B2 (en) Measurement apparatus and operation method of measurement apparatus
JP6081209B2 (ja) 内視鏡装置およびプログラム
US20220020208A1 (en) Measurement method, measurement device, and recording medium
JP2011059009A (ja) 位置計測対象物、位置計測システム、位置計測用演算装置およびプログラム
JP2018041169A (ja) 情報処理装置およびその制御方法、プログラム
US20220136820A1 (en) Image display method, display control device, and recording medium
JP2023009838A (ja) 画像処理方法、画像処理装置、およびプログラム
WO2017199657A1 (ja) 内視鏡装置、計測方法、およびプログラム
US20240193852A1 (en) Image display method, display control device, and recording medium
CN115115700B (zh) 物体的姿态估计方法、装置、电子设备及存储介质
JP6426215B2 (ja) 内視鏡装置およびプログラム
WO2018021047A1 (ja) 計測内視鏡装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20923923

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022506992

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20923923

Country of ref document: EP

Kind code of ref document: A1