Image processing apparatus for a plurality of timeseries images acquired by an endoscope, image processing method, and recording medium

Provided is an image processing apparatus including a processor. The processor is configured to: reconstruct, by employing a plurality of time-series images acquired by an endoscope, three-dimensional information of an imaging subject containing relative dimensions; calculate, on the basis of focus information of each of the plurality of images, scale information for converting the relative dimensions of the three-dimensional information to absolute dimensions; convert, by employing the scale information, the relative dimensions to the absolute dimensions; and output three-dimensional information containing the absolute dimensions.

TECHNICAL FIELD

The present invention relates to an image processing apparatus, an image processing method, and a recording medium.

BACKGROUND ART

In the related art, there is a known endoscope having a function for measuring the dimensions of an imaging subject (for example, see Patent Literature 1). In endoscopic examination or endoscopic treatment, it is recommended to change the procedures of polypectomy, Endoscopic Mucosal Resection (EMR)/Endoscopic Submucosal Dissection (ESD), etc. in accordance with the dimensions of a polyp, and dimensional measurement is effective in making decisions about the procedures. As a means for measuring the dimensions, for example, a stereo optical system or laser light is used. In Patent Literature 1, laser light is radiated onto an imaging subject, and markers for measuring the dimensions of the imaging subject are generated and displayed on the basis of an imaging-subject image in which spots of the laser light are formed.

Meanwhile, in recent years, there have been advances in the development of technologies for generating three-dimensional information of an imaging subject from an image acquired by using a monocular optical system (for example, see Non-Patent Literature 1).

CITATION LIST

Patent Literature

{NPL 1} ZHOU, Tinghui et. al, “Unsupervised Learning of Depth and Ego-Motion from Video”, 2017 IEEE Conference on Computer Vision and Pattern Recognition

SUMMARY OF INVENTION

Technical Problem

In the case of Patent Literature 1, it is necessary to provide the endoscope with a laser module that radiates the laser light for taking measurements. Accordingly, in order to measure the dimensions of the imaging subject, special equipment, such as a stereo optical system or a laser module, is required, and thus, it is not possible to measure the dimensions of an imaging subject by using a general monocular endoscope used in normal examination or treatment.

Three-dimensional reconstruction performed by using a monocular endoscope, as disclosed in Non-Patent Literature 1, is merely the reconstruction of a relative three-dimensional shape, and thus, it is not possible to acquire the absolute dimensions of an imaging subject.

In three-dimensional reconstruction, it is possible to estimate the dimensions of an imaging subject by capturing an object having known dimensions, such as a scale, together with the imaging subject and by comparing the size of the object and the imaging subject. However, in this case, special work for causing the object to be captured in the image is required. In addition, in the case of an endoscope with which the interior of a living body is observed, it is difficult to dispose an object having known dimensions at an imaging subject.

The present invention has been conceived in light of the above-described circumstances, and an object thereof is to provide an image processing apparatus, an image processing method, and a non-transitory recording medium with which it is possible to measure absolute dimensions of an imaging subject from an image acquired by a general monocular endoscope.

Solution to Problem

An aspect of the present invention is an image processing apparatus to which a plurality of time-series images acquired by an endoscope are input together with focus information of each of the plurality of images, the image processing apparatus comprising a processor, wherein the processor is configured to: reconstruct, by employing the plurality of images, three-dimensional information of an imaging subject containing relative dimensions, calculate, on the basis of the focus information, scale information for converting the relative dimensions of the three-dimensional information to absolute dimensions, convert, by employing the scale information, the relative dimensions to the absolute dimensions, and output three-dimensional information containing the absolute dimensions.

Another aspect of the present invention is an image processing method including: reconstructing, by employing a plurality of time-series images acquired by an endoscope, three-dimensional information of an imaging subject containing relative dimensions; calculating, on the basis of focus information of each of the plurality of images, scale information for converting the relative dimensions of the three-dimensional information to absolute dimensions; converting, by employing the scale information, the relative dimensions to the absolute dimensions; and outputting three-dimensional information containing the absolute dimensions.

Another aspect of the present invention is a computer-readable non-transitory recording medium that stores an image processing program, wherein the image processing program causes a computer to execute: reconstructing, by employing a plurality of time-series images acquired by an endoscope, three-dimensional information of an imaging subject containing relative dimensions; calculating, on the basis of focus information of each of the plurality of images, scale information for converting the relative dimensions of the three-dimensional information to absolute dimensions; converting, by employing the scale information, the relative dimensions to the absolute dimensions; and outputting three-dimensional information containing the absolute dimensions.

DESCRIPTION OF EMBODIMENT

An image processing apparatus, an image processing method, and a recording medium according to an embodiment of the present invention will be described below with reference to the drawings.

FIG.1shows an endoscope system100including an image processing apparatus1according to this embodiment. The endoscope system100includes an endoscope2, an endoscope processor3, the image processing apparatus1, and a display device4.

The endoscope2is a monocular endoscope that has an objective lens5a. The endoscope2includes an imaging optical system5and an imaging portion6.

The imaging optical system5has the objective lens5aand an actuator (not shown), and the objective lens5ahas an autofocus (AF) lens5bthat can be moved along an optical axis thereof. The actuator moves the AF lens5bin accordance with focus control information from the endoscope processor3, and thereby the focal position of the objective lens5ais automatically controlled.

The imaging portion6has an image sensor6a. The image sensor6acaptures an optical image of an imaging subject formed by the objective lens5aand generates image signals of the imaging subject.

The image sensor6amay have a plurality of image-plane phase difference pixels that detect a phase difference. The phase difference corresponds to the amount of positional displacement that occurs between two imaging-subject images in an out-of-focus state in which the imaging subject is not in focus by the objective lens5a. The image-plane phase difference pixels are at least some of the pixels arrayed on an imaging surface.

FIG.3Ashows an example configuration of the image-plane phase difference pixel. Each of the image-plane phase difference pixels has one microlens6cand a pair of photoelectric converters6dand6ethat convert light that has passed through the microlens6cto electrical signals, and the pair of photoelectric converters6dand6ereceive different luminous fluxes.FIG.3Bshows the relationship between the degree of focus and outputs, out1and out2, of an image-plane phase difference pixel. In an in-focus state in which the imaging subject is in focus by the objective lens5a, the two outputs, out1and out2, of the photoelectric converters6dand6ecoincide with each other. In the case of foreground blur or background blur, which is an out-of-focus state, the two outputs, out1and out2, of the photoelectric converters6dand6eare different from each other. More specifically, in the case of foreground blur or background blur, the two outputs, out1and out2, of the photoelectric converters6dand6eexhibit different aspects from each other. The phase difference is the amount of positional displacement between an image based on image signals obtained from the plurality of first photoelectric converters6dand an image based on image signals obtained from the plurality of second photoelectric converters6e.

As shown inFIG.4A, the imaging portion6has a plurality of measurement regions P(1), P(2), P(3) . . . . The imaging portion6calculates the degree of focus of each of the plurality of measurement regions P(1), P(2), P(3) . . . and outputs the degrees of focus to the endoscope processor3together with the image signals. Note that the plurality of measurement regions P(1), P(2), P(3) . . . are set in each of images A1, A2, A3. . . and represented by small regions or points.

In the case in which the image sensor6adoes not have the image-plane phase difference pixels, the focal point of the objective lens5ais automatically controlled by means of a contrast method. In this case, the degree of focus is the contrast of the image signals. The contrast is highest in the in-focus state and decreases with an increase in the displacement of the focal point from the imaging subject.

In the case in which the image sensor6ahas the image-plane phase difference pixels, the focal point of the objective lens5ais automatically controlled by means of an image-plane phase difference method. In this case, the degree of focus is the phase difference detected by the image-plane phase difference pixels. The phase difference is zero in the in-focus state and increases with an increase in the displacement of the focal point from the imaging subject.

The endoscope processor3includes a light source portion7, an image generating portion8, a control portion9, and a recording medium10.

The light source portion7has a light source that emits illumination light for illuminating the imaging subject and provides the endoscope2with the illumination light.

The image generating portion8generates two-dimensional images from the image signals input to the endoscope processor3from the imaging portion6. The image generating portion8may apply, as needed, processing, such as color correction processing and gamma correction processing, to the images.

The control portion9has a processor and the recording medium10stores a control program for the control portion9to control the light source portion7and the imaging optical system5.

The control portion9automatically controls the focal point of the objective lens5aby means of the contrast method or the image-plane phase difference method. Specifically, in the case of the contrast method, the control portion9generates focus control information on the basis of the contrast and transmits the focus control information to the imaging optical system5. In the case of the image-plane phase difference method, the control portion9generates focus control information on the basis of the phase difference and transmits the focus control information to the imaging optical system5. For example, the focus control information contains pulse signals, and the actuator moves the AF lens5bin a stepwise manner in response to the pulse signals. Accordingly, the AF lens5bis automatically moved to a position at which the imaging subject is in focus.

The control portion9causes the images generated by the image generating portion8to be output to the image processing apparatus1from the endoscope processor3together with the focus information. Therefore, the plurality of time-series images A1, A2, A3. . . are input to the image processing apparatus1together with the focus information for each of the plurality of images A1, A2, A3. . . The focus information is that related to the distance between the objective lens5aand the imaging subject and, specifically, contains the focus control information containing the position of the AF lens5band the degree of focus (in other words, the contrast or the phase difference).

The image processing apparatus1includes a processor1A, such as a central processing unit, and a recording medium1B.

The recording medium1B is a computer-readable non-transitory recording medium and is, for example, a publicly known magnetic disk, optical disk, flash memory, or the like. The recording medium1B stores an image processing program1C for causing the processor1A to execute the image processing method, described later.

By executing the image processing program1C, the processor1A generates, from the images A1, A2, A3. . . , three-dimensional (3D) information of the imaging subject containing absolute dimensions and measures the imaging-subject dimensions.

The display device4displays two-dimensional images A1, A2, A3. . . input thereto from the image processing apparatus1. The display device4may additionally display other information such as the settings of the endoscope2or the like. The display device4may display the 3D information and may display information about dimensions of the imaging subject measured from the 3D information.

Next, the image processing apparatus1will be described in detail.

As shown inFIGS.1and2, the image processing apparatus1has a three-dimensional (3D) reconstructing portion11, a scale estimating portion12, a scale converting portion13, a measuring portion14, and an image-set saving portion15. The 3D reconstructing portion11, the scale estimating portion12, the scale converting portion13, and the measuring portion14are realized as functions of the processor1A.

The image-set saving portion15consists of an arbitrary memory. As described above, the plurality of time-series images A1, A2, A3. . . are input to the image processing apparatus1from the endoscope processor3. The image-set saving portion15at least temporarily saves an image set consisting of the images A1, A2, A3. . . in association with the focus information of each of the images A1, A2, A3. . . .

The 3D reconstructing portion11reads out the image set from the image-set saving portion15and generates 3D information M of the imaging subject from the image set. As shown inFIG.4B, the 3D information M is a 3D model of the imaging subject and contains relative dimensions of the imaging subject. In the following, the 3D information containing the relative dimensions will also be referred to as the relative 3D information.

For example, the 3D reconstructing portion11estimates, by means of a Depth CNN (depth prediction convolutional neural network) and a Pose CNN (pose estimation convolutional neural network), depth information (depth map) in accordance with the image size, an extrinsic matrix and intrinsic parameters of a camera, and so forth, employs said information to compute 3D points corresponding to the respective pixels of the depth map, and thereby generates the relative 3D information M. In the case in which feature points of the imaging subject are utilized in the 3D reconstruction, the 3D reconstructing portion11may use learning information that is acquired by means of machine learning and that is saved in a learning-information saving portion20in advance.

The scale estimating portion12reads out the image set and the focus information from the image-set saving portion15and calculates scale information on the basis of the image set and the focus information. The scale information is that for converting the relative dimensions in the relative 3D information M to absolute dimensions.

Specifically, as shown inFIG.2, the scale estimating portion12has a lens-position calculating portion16, an imaging-subject-distance calculating portion17, an absolute-dimension calculating portion18, and a scale-information calculating portion19.

As shown inFIG.4A, the plurality of measurement regions P(1), P(2), P(3) . . . are set in all of the images A1, A2, A3. . . used in the 3D information reconstruction. The respective measurement regions P(i) (i=1, 2 . . . , n) have the contrast or phase difference information, which is the degree of focus. The lens-position calculating portion16calculates, for the respective measurement regions P(i), the positions of the AF lens5bat which the measurement regions P(i) are in focus on the basis of the focus control information and the degree of focus.

When a measurement region P(i) is in focus, the position of the AF lens5bat which the measurement region P(i) is in focus is the same as the position of the AF lens5bat the time of the image acquisition, the position being calculated from the focus control information. When a measurement region P(i) is not in focus, the position of the AF lens5bat which the measurement region P(i) is in focus is displaced from the position of the AF lens5bat the time of the image acquisition. The displacement amount of the AF lens5bis calculated from the contrast or the phase difference.

The imaging-subject-distance calculating portion17calculates an imaging-subject distance dt(i) for each of the plurality of measurement regions P(i) in each image Aj(j=1, 2, 3 . . . ) from the position of the AF lens5bcalculated by the lens-position calculating portion16. The imaging-subject distance dt(i) is the actual distance (absolute distance) from the objective lens5ato the imaging subject in the direction along the optical axis. As shown inFIG.5, there is a prescribed correlation between the position of the AF lens5band the imaging-subject focus distance dt(i). The imaging-subject-distance calculating portion17calculates the imaging-subject distance dt(i) of each of the measurement regions P(i) on the basis of such a prescribed correlation.

The relative 3D information M contains the relative depth information (so-called depth map) for the respective positions in the imaging subject. Therefore, for each measurement region P(i), the imaging-subject distance dt(i), which is the absolute distance, and the relative distance corresponding to the imaging-subject distance dt(i) in the relative 3D information M are known. The absolute-dimension calculating portion18calculates, on the basis of the relative distances and the imaging-subject distances dt(i), absolute dimensions of regions corresponding to the respective measurement regions P(i) in the relative 3D information M.

FIGS.6A to6Cexplain a method for calculating the absolute dimensions of the imaging subject.

FIG.6Ashows the relationship between an object O, which is the imaging subject, and an image I of the object O, formed through the objective lens5a. The object distance (imaging-subject distance) between the objective lens5aand the object O is denoted by a, and the image distance between the objective lens5aand an imaging surface6fis denoted by b.

In order to form an image of the object O on the imaging surface6fof the image sensor6a, the AF lens5bis moved in accordance with the object distance. Specifically, the AF lens5bis moved toward the object O when the object distance a is short (seeFIG.6B) and is moved toward the image I when the object distance a is long (seeFIG.6C). In the in-focus state, the lens equation (a) holds. The focal distance of the objective lens5ais denoted by f.
1/f=1/a+1/b(a)
From equation (a) and equation (b) which represents an image-capturing magnification M, equation (c) is derived. L1 is the size of the object O and L2 is the size of the image I on the imaging surface6f.
M=b/a=L2/L1  (b)
M=f/(a−f)  (c)
Because the focal distance f is a design value of the objective lens5a, the image-capturing magnification M is calculated from equation (c) as a result of acquiring the object distance a. The image-capturing magnification M may also be calculated from equation (b) as a result of acquiring the object distance a.

As shown inFIG.5, in the in-focus state, there is a prescribed correlation between the object distance a and the position of the AF lens5b. Therefore, the object distance a is calculated from the position of the AF lens5bon the basis of this correlation. The correlation is stored, for example, in the recording medium1B in the form of table data.

Next, the size L2 of the image I in an image is calculated from the number of pixels and the pixel size. The pixel size is the size of one pixel. Specifically, the size L2 is calculated by multiplying the number of pixels in the image I by the pixel size.

Next, the size L1 of the object O is calculated from equation (b) by employing the image-capturing magnification M and the size L2.

As shown inFIG.4C, the scale-information calculating portion19calculates relative distances ds(1), ds(2), ds(3) . . . of a plurality of corresponding regions Q(1), Q(2), Q(3) . . . that respectively correspond to the plurality of measurement regions P(1), P(2), P(3) . . . in the relative 3D information M. Specifically, a corresponding region Q(i) is a region in an image Bi corresponding to an image Aj viewed from the same point of view as the image Aj in the relative 3D information M. A relative distance ds(i) is a distance from a camera position Pc, which is the point of view, to a corresponding region Q(i) in the direction along the optical axis in the coordinate system of the relative 3D information M.

Next, the scale-information calculating portion19calculates scale information that minimizes the sum of differences between the imaging-subject distances dt(i) and the absolute distances converted from the relative distances ds(i) by employing the scale information. Specifically, the scale-information calculating portion19calculates, as the scale information, a coefficient α from equation (1) below.

Here, n is the number of the measurement regions P(i) set in one image Aj and argβmin(f(β)) is a function that returns a value of β that minimizes f(β).

The scale converting portion13employs the scale information to convert the relative dimensions of regions other than the measurement regions P(i) to the absolute dimensions. Specifically, as shown in equation (2) below, the scale converting portion13calculates the absolute dimensions dt of the other regions by multiplying the relative dimensions ds of the other regions by the coefficient α.
dt=α×ds(2)
As a result of the absolute dimensions of the measurement regions P(i) and the other regions being calculated in this way, 3D information containing the absolute dimensions of the imaging subject is generated. In the following, the 3D information containing the absolute dimensions will also be referred to as the absolute 3D information.

The measuring portion14executes, during the time when the measurement function of the image processing apparatus1is being executed, the measurement of the dimensions of the imaging subject in the absolute 3D information. The dimensions measured by the measuring portion14are the actual dimensions (absolute dimensions) of the imaging subject.

The measurement function may be executed on the basis of an instruction input to the image processing apparatus1or the endoscope processor3by a user. In this case, the measuring portion14may measure the length between a plurality of points. For example, the user can specify, by using an arbitrary input device, a plurality of points in the two-dimensional image or the 3D information displayed on the display device4.

The measurement function may automatically be executed when a prescribed imaging subject is detected in the images A1, A2, A3. . . . In this case, the measuring portion14may measure the dimensions of the prescribed imaging subject.

The measured dimension information of the imaging subject is superimposed on the two-dimensional images A1, A2, A3. . . or the absolute 3D information to generate superimposed images, and the superimposed images are output to the display device4from an output portion21. The absolute 3D information provided with scales representing the absolute dimensions may be output to the display device4from the output portion21.

Next, the operation of the endoscope system100will be described.

As shown inFIG.7A, after turning on the endoscope system100, optical information containing the focus control information is acquired (step S1), the imaging portion6captures images of an imaging subject (step S2), the image generating portion8generates images of the imaging subject (step S3), and the images are input to the image processing apparatus1together with the focus information.

Next, whether the measurement function is being executed is checked (step S4).

In the case in which the measurement function is not being executed (“NO” in step S4), the two-dimensional images generated in step S3are transmitted to the display device4from the endoscope processor3via the image processing apparatus1, and the two-dimensional images are displayed on the display device4(step S5).

In the case in which the measurement function is being executed (“YES” in step S4), the processing for measuring the absolute dimensions of the imaging subject is executed (steps S11to S15). Steps S11to S15correspond to the image processing method executed by the image processing apparatus1.

The image processing apparatus1temporarily saves the input images and the focus information in the image-set saving portion15. After the image set required to generate the 3D information is accumulated in the image-set saving portion15, the 3D reconstructing portion11reconstructs the relative 3D information M of the imaging subject by employing the image set (step S11).

Next, the scale estimating portion12calculates the scale information on the basis of the focus information and the image set (step S12).

Specifically, as shown inFIG.7B, the lens-position calculating portion16calculates, on the basis of the focus control information and the degree of focus, the position of the AF lens5bfor each of the plurality of measurement regions P(1), P(2), P(3) . . . in all of the images A1, A2, A3. . . used to generate the relative 3D information M (step S121).

Next, the imaging-subject distances dt(i) of the respective measurement regions P(i) are calculated on the basis of the positions of the AF lens5b(step S122), and the absolute dimensions of the respective measurement regions P(i) are calculated on the basis of the imaging-subject distances. Next, the relative distances ds(i) of the corresponding regions Q(i) corresponding to the measurement regions P(i) in the relative 3D information M are calculated (step S123), and the scale information is calculated on the basis of the imaging-subject distances dt(i) and the relative distances ds(i) (step S124). Specifically, the scale coefficient α is calculated from equation (1).

Next, the scale converting portion13converts the relative dimensions of the relative 3D information M to the absolute dimensions by employing the scale information (step S13). Specifically, the 3D information is enlarged or shrunk as a result of multiplying the relative dimensions of the respective positions in other regions in the relative 3D information M by the coefficient α, as indicated in equation (2), and thus, the absolute 3D information is generated.

Next, the measuring portion14measures the actual dimensions of the imaging subject in the absolute 3D information (step S14). Next, the measured dimension information is superimposed on the two-dimensional images or the 3D information to generate the superimposed images (step S15). The superimposed images are transmitted to the display device4from the output portion21and displayed on the display device4(step S5).

Steps S1to S5and S11to S15are repeated until an ending instruction is input to the endoscope system100(step S6).

As has been described, with this embodiment, the scale information for converting the relative dimensions of the relative 3D information M to the absolute dimensions is calculated by employing the focus information of the two-dimensional images. The focus information is that obtained from the general monocular endoscope2and the endoscope processor3. Therefore, it is possible to measure the absolute dimensions of the imaging subject from the two-dimensional images acquired by means of the general monocular endoscope2without requiring special equipment or work.

In this embodiment, the endoscope2may have an EDOF (Extended Depth of Field) function for extending the depth of field and the image processing apparatus1may generate the 3D information from wide-focus images. The EDOF is a technology for obtaining a wide-focus image having an extended depth of field as compared with the depth of field of the objective lens5a.

FIG.8is a block diagram of the endoscope system100in which the endoscope2has an EDOF imaging portion61instead of the imaging portion6. The EDOF imaging portion61simultaneously acquires, through an EDOF optical system, a plurality of image signals in which the focal positions are different in the optical axis direction.

FIG.9shows a configuration of the EDOF imaging portion61. Reference sign2ais an illumination optical system that emits illumination light provided from the light source portion7toward the imaging subject. The EDOF imaging portion61has an image sensor62and an EDOF optical system63. The EDOF optical system63has a ¼λ phase plate63aand a beam splitter63band the image sensor62has two light reception regions62aand62b.

Light coming from an imaging subject S passes through the objective lens5aand the ¼λ phase plate63aand enters the beam splitter63b. The beam splitter63bsplits the light coming from the imaging subject S into two light beams by polarization and creates an optical path difference between the two light beams. One of the light beams forms an image in the light reception region62aand the other light beam forms an image in the light reception region62b. The image sensor62simultaneously captures images of the two light reception regions62aand62b, and thereby generates near-point image signals in which a near point is in focus and far-point image signals in which a far point is in focus. Reference sign63cis a mirror that reflects one of the light beams reflected by the beam splitter63btoward the light reception region62a.

The specific configuration of the EDOF imaging portion61is not limited to the above-described configuration and another configuration may be employed.

An image set consisting of a plurality of time-series pairs of the near-point images and the far-point images is input to the image processing apparatus1from the endoscope processor3. The image-set saving portion15saves the near-point images and the far-point images respectively in association with the focus information.

The processor1A additionally includes an image combining portion22. The image combining portion22combines the near-point images and the far-point images to generate wide-focus images.

The 3D reconstructing portion11reconstructs the relative 3D information by employing the plurality of time-series wide-focus images.

As shown inFIG.10, the plurality of measurement regions P1(1), P1(2) . . . are set in each of the near-point images and the plurality of measurement regions P2(1), P2(2) . . . are set in each of the far-point images.FIG.10shows the measurement regions P1(i) and P2(i) in the wide-focus images.

The lens-position calculating portion16calculates the positions of the AF lens5bfor the respective measurement regions P1(i) and the imaging-subject-distance calculating portion17calculates the imaging-subject distances dt1(i) of the respective measurement regions P1(i). The scale-information calculating portion19calculates the relative distances ds1(i) of the corresponding regions corresponding to the measurement regions P1(i) and calculates the coefficient α1 from equation (1) by employing the distances dt1(i) and ds1(i).

Similarly, the lens-position calculating portion16calculates the positions of the AF lens5bfor the respective measurement regions P2(i) and the imaging-subject-distance calculating portion17calculates the imaging-subject distances dt2(i) of the respective measurement regions P2(i). The scale-information calculating portion19calculates the relative distances ds2(i) of the corresponding regions corresponding to the measurement regions P2(i) and calculates the coefficient α2from equation (1) by employing the distances dt2(i) and ds2(i).

Therefore, two coefficients, α1and α2for the near point and the far point are obtained, and the near-point coefficient α1and the far-point coefficient α2could be different from each other.

The scale-information calculating portion19complements the coefficients at other focal points on the basis of the two coefficients, α1and α2for the near point and the far point. Therefore, the coefficients, α1and α2are calculated for each imaging-subject distance.

The scale converting portion13converts the relative dimensions of the other regions by employing the coefficients for the corresponding imaging-subject distances.

As above, as a result of using the EDOF endoscope2, the scale information α1and α2are obtained for each imaging-subject distance, and it is possible to more accurately calculate the scale coefficients for regions other than the measurement regions P1(i) and P2(i). Accordingly, it is possible to more accurately calculate the absolute dimensions of the imaging subject for the other regions.

In this embodiment, the objective lens5ahas the AF lens5b; however, alternatively, it is permissible that the objective lens5adoes not have the AF lens5b, and the focal distance of the objective lens5amay be fixed.

In this case, the focus information contains the phase difference, and it is not necessary to calculate the position of the AF lens5bon the basis of the focus control information. The imaging-subject-distance calculating portion17calculates the imaging-subject distances of the measurement regions P(i) from the focal distance of the objective lens5aand the phase difference.

As above, the embodiment of the present invention has been described in detail with reference to the drawings; however, specific configurations are not limited to the above-described embodiment and design alterations or the like within a range that does not depart from the scope of the present invention are also encompassed. In addition, the constituent elements indicated in the above-described embodiment and modifications can be configured, as appropriate, in combination.

REFERENCE SIGNS LIST