(19)
(11)EP 2 570 070 B1

(12)EUROPEAN PATENT SPECIFICATION

(45)Mention of the grant of the patent:
05.10.2016 Bulletin 2016/40

(21)Application number: 11821375.0

(22)Date of filing:  13.05.2011
(51)International Patent Classification (IPC): 
H04N 5/232(2006.01)
(86)International application number:
PCT/JP2011/061096
(87)International publication number:
WO 2012/029357 (08.03.2012 Gazette  2012/10)

(54)

ENDOSCOPE

ENDOSKOP

ENDOSCOPE


(84)Designated Contracting States:
AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR

(30)Priority: 30.08.2010 JP 2010192734

(43)Date of publication of application:
20.03.2013 Bulletin 2013/12

(73)Proprietor: Olympus Corporation
Tokyo 192-8507 (JP)

(72)Inventor:
  • IWASAKI, Tomoki
    Tokyo 192-8507 (JP)

(74)Representative: Gunzelmann, Rainer 
Wuesthoff & Wuesthoff Patentanwälte PartG mbB Schweigerstraße 2
81541 München
81541 München (DE)


(56)References cited: : 
JP-A- 1 270 842
JP-A- 6 245 899
JP-A- 8 068 721
JP-A- 9 253 041
JP-A- H06 342 122
JP-A- 2001 154 085
JP-A- 2002 253 488
JP-A- 2004 258 360
JP-A- 2006 122 195
JP-A- 6 245 899
JP-A- 6 342 122
JP-A- 8 111 812
JP-A- 9 253 041
JP-A- 2001 008 097
JP-A- 2001 154 085
JP-A- 2003 061 909
JP-A- 2004 294 788
US-A1- 2006 062 484
  
      
    Note: Within nine months from the publication of the mention of the grant of the European patent, any person may give notice to the European Patent Office of opposition to the European patent granted. Notice of opposition shall be filed in a written reasoned statement. It shall not be deemed to have been filed until the opposition fee has been paid. (Art. 99(1) European Patent Convention).


    Description

    Technical Field



    [0001] The present invention relates to an endoscope apparatus and specifically relates to an endoscope apparatus capable of determining a focusing state for an image.

    Background Art



    [0002] Conventionally, endoscope apparatuses have widely been used in medical and industrial fields. For example, in the medical field, a surgeon inserts an insertion portion of an endoscope into a body cavity to display an object image picked up by an image pickup device provided at a distal end of the insertion portion on a monitor, whereby the surgeon can observe a site of an object to make a diagnosis. In recent years, endoscope apparatuses having what is called an autofocusing function have been put into practical use. For example, there are endoscope apparatuses in which a focal position can be set to either a near point position or a far point position and the setting can be switched between the positions.
    Document JP 06342122 A describes an endoscope that is provided with a focusing function. A moveable aperture diaphragm having a variable diameter is disposed inside an objective lens, and an image pickup unit provided with a CCD, a crystal filter, and a color temperature correcting filter are disposed behind the lens. A piezoelectric element movable in parallel to an optical axis in a direction shown by an arrow is provided on the unit, and focusing is performed by a driving device. In an embodiment, a region which is beyond constant value with the voltage level of a high-frequency component of a video signal is extracted, and focusing is performed such that the area of the region concerned may become the widest. Edge detection of a luminance-signal waveform is further performed by a differentiation circuit for every horizontal scanning line.
    Document US 2006/0062484 A1 discloses a method comprising detecting edges in at least a region of a captured focus image using adjacent pixels of the region to obtain first edge detection results and filtering the first edge detection results. Subsequent to edge detection, spatial noise filtering is employed to programmatically remove small differences or deltas in an image, which might erroneously indicate an edge. At a step 105, small pixel differences are filtered out of figure of merit (FOM) calculations resulting from a step 104 by comparing the results of FOM difference operation 104 to a programmable threshold, thereby carrying out spatial noise filtering of the image.

    [0003] In general, the autofocusing function of an endoscopic image is performed based on a focusing evaluation obtained by comparison of levels of contour enhancement signals. For example, as disclosed in Japanese Patent Application Laid-Open Publication No. 2004-258360, endoscope apparatuses that perform a focusing evaluation for an image using contour enhancement processing have been proposed.

    [0004] However, the method simply by comparison of levels of contour enhancement signals obtained by the contour enhancement processing has a problem that the focusing evaluation has a low precision. This problem is caused because contour enhancement signals are compared with a predetermined threshold value, different focusing evaluation is caused between an image having a large luminance value in its entirety and an image having a small luminance value in its entirety.
    The present invention was thus made in view of such a problem, and an objective of the present invention is to provide an endoscope apparatus capable of performing focusing evaluation with a high precision using contour component signals.

    Disclosure of Invention


    Means for Solving the Problem



    [0005] An endoscope apparatus according to the present invention includes the features of claim 1.

    Brief Description of the Drawings



    [0006] 

    Fig. 1 is a configuration diagram illustrating a configuration of an endoscope apparatus;

    Fig. 2 is a diagram for describing an image region;

    Fig. 3 is a diagram for describing a content of pixel correction processing where, e.g., a white defect exists;

    Fig. 4 is a diagram for describing the content of pixel correction processing where, e.g., the white defect exists;

    Fig. 5 is a diagram for describing the content of pixel correction processing where, e.g., the white defect exists;

    Fig. 6 is a diagram for describing the content of pixel correction processing where, e.g., the white defect exists;

    Fig. 7 is a diagram for describing the content of pixel correction processing where, e.g., the white defect exists;

    Fig. 8 is a diagram for describing the content of pixel correction processing where, e.g., the white defect exists;

    Fig. 9 is a block diagram illustrating a configuration of an enlargement/reduction circuit 35;

    Fig. 10 is a diagram for describing change of images processed in the enlargement/reduction circuit 35;

    Fig. 11 illustrates an example indicating a case where a lumen LM is detected in an area IV from among four quadrants of an effective pixel region VA, according to the embodiment of the present invention;

    Fig. 12 illustrates an example indicating a case where the lumen LM is detected in an area III and an area IV from among four quadrants of the effective pixel region VA, according to the embodiment of the present invention;

    Fig. 13 illustrates an example when no lumen LM is detected in the image region VA, according to the embodiment of the present invention;

    Fig. 14 is a diagram for describing a state in which a halation part exists in the effective pixel region VA and the halation part extends to a focal point detection pixel group FDA or FDA1;

    Fig. 15 is a schematic diagram for describing contour component signals CES at edge parts of an image;

    Fig. 16 is a diagram for describing contour component signals CES generated where no clear edge parts exist in the effective pixel region VA;

    Fig. 17 is a block diagram illustrating a configuration of a focusing evaluation section 40;

    Fig. 18 is a flowchart illustrating an example of a flow of processing in a lumen detection section 51 and a focusing evaluation area selection section 52;

    Fig. 19 is a flowchart illustrating an example of the flow of processing in the lumen detection section 51 and the focusing evaluation area selection section 52;

    Fig. 20 is a diagram for describing a shift of a focusing evaluation area enable signal H region corresponding to positions of pixels in a focal point detection pixel group FDA;

    Fig. 21 is a flowchart illustrating an example of a flow of processing in a halation detection section 53, a shape detection section 54, a threshold value comparison section 55, a focal point switching instruction section 56 and a CPU I/F section 58; and

    Fig. 22 is a flowchart illustrating an example of the flow of processing in the halation detection section 53, the shape detection section 54, the threshold value comparison section 55, the focal point switching instruction section 56 and the CPU I/F section 58.


    Best Mode for Carrying Out the Invention



    [0007] An embodiment will be described below with reference to the drawings.

    (Overall Configuration)



    [0008] First, a configuration of an endoscope apparatus will be described with reference to Fig. 1.

    [0009] As illustrated in Fig. 1, an endoscope apparatus 1 includes an endoscope 2 including an insertion portion, a processor 3, a light source apparatus 4 and a monitor 5. The endoscope apparatus 1 has various types of observation modes for, e.g., normal observation images and narrow-band observation images, and allows setting in which mode a user observes an object.

    [0010] The endoscope 2 includes an objective optical system 11 provided in a distal end portion of the insertion portion, a CCD 12 arranged so that an image pickup surface is placed at a focal position of the objective optical system 11, an actuator 13 for driving a part of lenses in the objective optical system 11 for focal point adjustment, a light guide 14 for irradiating illuminating light from the distal end portion of the insertion portion, the light guide 14 including an optical fiber bundle, a correlated double sampling circuit (hereinafter referred to as CDS circuit) 15, an analog/digital conversion circuit (hereinafter referred to as A/D conversion circuit) 16 and a ROM 17.

    [0011] A distal end portion of the light guide 14 is fixed to an opening portion for illumination at the distal end portion of the insertion portion. Illuminating light from the light source apparatus 4 enters from a proximal end portion of the light guide 14, passes through the light guide 14, exits from the distal end portion of the light guide 14 and illuminates an object.

    [0012] A reflected light from the object passes through the objective optical system 11 including a moving lens and forms an image on the image pickup surface of the CCD 12, which is an image pickup section. The CCD 12 photoelectrically converts the object image formed on the image pickup surface and outputs image pickup signals to the CDS circuit 15. The CDS circuit 15 performs correlated double sampling processing on the image pickup signals and outputs the resulting image pickup signals to the A/D conversion circuit 16. The A/D conversion circuit 16 converts the image pickup signals from analog signals to digital signals and outputs the resulting image pickup signals to the processor 3.

    [0013] The ROM 17, which is a non-volatile memory, stores forceps position information and horizontal flip information, which will be described later. When the endoscope 2 is connected to the processor 3, e.g., the forceps position information in the ROM 17 can be read by the processor 3.

    [0014] A forceps can be inserted into a channel (not illustrated) provided in the insertion portion of the endoscope 2. The forceps can be made to project from a distal end opening portion provided at the distal end portion of the insertion portion. Although a distal end portion of the projecting forceps appears in an endoscopic image picked up by the CCD 12, a position of the forceps appearing in an endoscopic image is determined in advance according to a structure of the distal end portion of the insertion portion and a positional relationship between an opening of the channel and the CCD 12. In other words, the position of the forceps appearing in the endoscopic image is determined in advance for a respective endoscope, and thus, forceps position information is stored in the ROM 17.

    [0015] Furthermore, the ROM 17 also stores horizontal flip information indicating a horizontal flip of an image. Among the endoscopes, there are side-viewing endoscopes in which a prism is disposed at a distal end portion of an insertion portion of the endoscope to obtain an image of an area on a side of the insertion portion. In such case, a horizontally-flipped object image is projected on the image pickup surface of the CCD 12. Accordingly, horizontal flip information such as, for example, a horizontal flip flag is stored in the ROM 17, and a CPU 39 reads the horizontal flip information, and if the horizontal flip flag indicates "1", horizontal flip processing is performed during image processing. The horizontal flip processing is performed in a later-described enlargement/reduction circuit 35 or a non-illustrated other circuit based on an instruction from the CPU 39.

    [0016] The light source apparatus 4 includes a lamp 21, a diaphragm 22, a lens 23 and a diaphragm control circuit 24. Light from the lamp 21 enters the lens 23 via the diaphragm 22 controlled by the diaphragm control circuit 24. The lens 23 collects the light to the proximal end portion of the light guide 14. The collected light passes through the inside of the light guide 14 as illuminating light and exits from the distal end portion of the light guide 14. The diaphragm control circuit 24 controls the diaphragm 22 based on a diaphragm control signal ACS from the processor 3, and supplies a current diaphragm value to the processor 3 as a diaphragm value signal AS. Accordingly, the diaphragm control circuit 24 provides a diaphragm value detection section that detects a diaphragm value for adjusting a light amount of illuminating light from the light source apparatus 4.

    [0017] The processor 3 includes an automatic gain control circuit (hereinafter referred to as AGC circuit) 31, a white balance circuit (hereinafter referred to as WB circuit) 32, a matrix circuit (MAT) 33, a gamma correction circuit (hereinafter referred to as γ correction circuit) 34, an enlargement/reduction circuit 35, a contour enhancement circuit 36, a matrix (MAT) circuit 37, a digital/analog conversion circuit (hereinafter referred to as D/A conversion circuit) 38, a central processing unit (hereinafter referred to as CPU) 39, a focusing evaluation section 40, a frame comparison circuit 41, an actuator drive section 42, a light adjustment detection circuit 43, a line memory 44 and a memory 45.

    [0018] Image pickup signals from the A/D conversion circuit 16 in the endoscope 2 are supplied to the AGC circuit 31, subjected to gain adjustment and supplied to the white balance circuit 32. The white balance circuit 32 performs white balance adjustment of the image pickup signals. The AGC circuit 31 can be turned on/off according to a setting by a user.

    [0019] The image pickup signals with its white balance corrected are supplied to the matrix circuit 33 for generating various types of images, to generate an image according to various types of observation modes such as an image according to normal observation image and an image according to narrow band observation image.

    [0020] The generated image is subjected to gamma correction in the gamma correction circuit 34, further subjected to processing for enlarging and reducing the image in the enlargement/reduction circuit 35 and supplied to the contour enhancement circuit 36.

    [0021] The contour enhancement circuit 36, which is a contour enhancement section, subjects the image subjected to the enlargement and reduction processing to contour enhancement processing, and supplies the image subjected to the contour enhancement processing to the matrix circuit 37. Also, the contour enhancement circuit 36 outputs later-described contour component signals CES and luminance signals BS to the focusing evaluation section 40. The contour component signals CES are signals generated for respective pixels. Accordingly, the contour enhancement circuit 36 provides a contour component signal generation section. Furthermore, the contour enhancement circuit 36 provides a luminance value detection section that detects a luminance value of each pixel in an image.

    [0022] Note that in the present embodiment, the contour enhancement circuit 36 supplies a vertical drive signal VD, a horizontal drive signal HD and image position information IPS defining an effective pixel region VA to the focusing evaluation section 40 in addition to the contour component signals CES and the luminance signals BS. The contour component signals CES will be described later.

    [0023] The matrix circuit 37 generates an image to be outputted to the monitor 5 and outputs the image to the D/A conversion circuit 38. The monitor 5 displays the image based on the image signal, which is an analog signal resulting from conversion in the D/A conversion circuit 38.

    [0024] The CPU 39 performs overall control of the endoscope apparatus 1 and supplies various types of information to the focusing evaluation section 40 based on operation instruction signals from a non-illustrated operation panel of the processor 3 and a non-illustrated operation portion of the endoscope 2.

    [0025] Furthermore, information on variation of an image between two consecutive frames is inputted from the frame comparison circuit 41 to the CPU 39. For example, when the insertion portion of the endoscope is being inserted into a body cavity, a video image obtained by the CCD 12 has fast movement, and thus, the image largely varies between frames. The frame comparison circuit 41 generates information on such variation of an image, for example, information on an amount of variation, between frames and outputs the information to the CPU 39.

    [0026] The focusing evaluation section 40 performs focusing evaluation based on various types of signals from the CPU 39, the diaphragm value signal AS from the diaphragm control circuit 24, electronic shutter information ESS from the later-described light adjustment detection circuit 43, and the contour component signals CES, the luminance signals BS, the vertical drive signal VD, the horizontal drive signal HD and the image position information IPS from the contour enhancement circuit 36. As described later, the focusing evaluation section 40 provides a focusing determination section that determines a focusing state for an image by determining a signal distribution of the contour component signals CES. In the present embodiment, the focusing evaluation section 40 is a software program executed by the CPU 39. The focusing evaluation section 40 performs processing while storing necessary information in the line memory 44 and the memory 45.

    [0027] The focusing evaluation section 40, which is a focusing determination section, supplies a drive control signal DRC to the actuator drive section 42, and the actuator drive section 42 outputs a drive signal DR to the actuator 13 in the endoscope 2. The actuator 13 drives the moving lens in the objective optical system 11. The actuator drive section 42 feeds a state of the actuator 13 back to the focusing evaluation section 40. The actuator drive section 42 provides a drive control section that moves the moving lens in the objective optical system 11 to a focus position based on the focusing state.

    [0028] Also, the CPU 39 reads the forceps position information stored in the ROM 17 in the endoscope 2 and supplies the forceps position information to the focusing evaluation section 40.

    [0029] Furthermore, the CPU 39 supplies various types of information to the focusing evaluation section 40. Example of various types of information include, e.g., observation mode information, prohibition mode information and information on various types of set values.

    [0030] The frame comparison circuit 41 sequentially inputs frame information on images outputted from the matrix circuit 37, and compares two consecutive frames to detect a degree of variation of an image between the two consecutive frames. Examples of a situation when variation of an image between two consecutive frames is large include a situation when an operation to insert an insertion portion of an endoscope into a body cavity is being performed.

    [0031] The frame comparison circuit 41 supplies information on variation of an image between two consecutive frames to the CPU 39.

    [0032] The light adjustment detection circuit 43, to which image pickup signals from the A/D conversion circuit 16 are inputted, determines brightness of an obtained endoscopic image in its entirety. The light adjustment detection circuit 43 generates a diaphragm control signal ACS based on the brightness and supplies the diaphragm control signal ACS to the diaphragm control circuit 24, and supplies a control signal SCS for electronic shutter control for the CCD 12 to the CCD 12. Also, the light adjustment detection circuit 43 provides an electronic shutter state detection section that detects a state of an electronic shutter in the CCD 12.

    [0033] Furthermore, the light adjustment detection circuit 43 generates a control signal for automatic gain control and supplies the control signal to the AGC circuit 31. The AGC circuit 31 determines a set value of a gain based on information on brightness of an entire screen from the light adjustment detection circuit 43. Note that the light adjustment detection circuit 43 receives a feedback signal of the gain value from the AGC circuit 31.

    [0034] Note that if the AGC circuit 31 has a high AGC level, the endoscopic image itself becomes bright, but in contrast, noise appearing on the screen increases, resulting in a decrease in precision of focal point switching control in the later-described focusing evaluation section 40. Thus, where the AGC level is high, a low-pass filter may be provided inside the contour enhancement circuit 36 for S/N improvement by shifting a frequency band of the low-pass filter to be lower.

    (Image Generation)



    [0035] Here, images and processing on the images will be described.

    [0036] Fig. 2 is a diagram for describing an image region. As illustrated in Fig. 2, the CCD 12 includes an effective pixel region VA in a pixel region OA defined by the vertical drive signal VD and the horizontal drive signal HD. The effective pixel region VA used for display of an endoscopic image is partially enlarged or reduced by the enlargement/reduction circuit 35, and the enlarged or reduced image is displayed on the monitor 5.

    [0037] The effective pixel region VA is designated by parameters in X-Y coordinates of the pixel region OA, which are obtained from the CCD 12, and unnecessary information electrically generated in the CCD 12 (that is, an image in a non-effective pixel region) is masked.

    [0038] Furthermore, in order to display an image on the monitor 5, in the case of an HDTV, it is necessary to change an enlargement factor and/or change the timing for outputting an image subjected to enlargement processing in view of an aspect ratio such as 16:9 or 4:3, and thus, the timing for outputting a mask signal for that change is also changed.

    [0039] Note that if there is no unnecessary information that is electrically generated because an image outputted from the CCD 12 optically meets desired specifications, there is no need to add a mask. Furthermore, even though unnecessary information is electrically generated, there is no need to add a mask outside the display region according to the aspect ratio.

    [0040] As described above, parameters for a region subject to enlargement processing are properly set according to the aspect ratio and the enlargement factor so that an endoscopic image displayed as large as possible in a display region according to the aspect ratio, whereby high-quality monitor display can be provided. In other words, the aforementioned parameters are properly set, whereby the region subject to enlargement processing can be maximized, and thus, the enlargement factor in the enlargement processing can be suppressed to be small to the possible extent, and as a result, an endoscopic image with favorable image quality can be displayed on the monitor 5.

    [0041] Furthermore, white defects and vertical defects may exist in the image pickup surface of the CCD 12. Therefore, if white defects and/or vertical defects exist, pixel correction is performed by a non-illustrated correction circuit before the pixels are inputted to the matrix circuit 33 in the processor 3.

    [0042] Each of Figs. 3 to 8 is a diagram for describing the content of pixel correction processing where, e.g., a white defect exists.

    [0043] Fig. 3 is a diagram for describing a case where a certain pixel is a white defect pixel, and eight pixels in the periphery of that pixel are normal pixels. In Fig. 3, a pixel value of a white defect pixel E is determined according to expression (1) below. In other words, the pixel value of the pixel E, which is a pixel to be corrected, is an average value of pixel values of the peripheral pixels A, B, C, D, F, G, H and I. Note that in the description below, A, B, C, D, E, F, G, H and I denote pixel values of the respective pixels A, B, C, D, E, F, G, H and I.



    [0044] Fig. 4 is a diagram for describing a case where a white defect pixel exists at one of four corners of an image. In Fig. 4, a pixel value of a white defect pixel E at an upper left corner is determined by expression (2) below.



    [0045] Fig. 5 is a diagram for describing a case where a white defect pixel exists at a peripheral end of an image except four corners of the image. In Fig. 5, a pixel value of a white defect pixel E at an upper end is determined by expression (3) below.



    [0046] Fig. 6 is a diagram for describing a case where white defects exist also in pixels adjacent to a white defect pixel. In Fig. 6, where a pixel B that is above a pixel E, which is a white defect pixel, and a pixel A, which is one of pixels diagonally above the pixel E are white defect pixels, a pixel value of the white defect pixel E is determined according to expression (4) below.



    [0047] Fig. 7 is a diagram for describing another case where white defects exist also in pixels adjacent to a white defect pixel. In Fig. 7, where pixels G and I, which are both of pixels diagonally below a pixel E, which is a white defect pixel, are also white defect pixels, a pixel value of the white defect pixel E is determined according to expression (5) below.



    [0048] Fig. 8 is a diagram for describing a case where a vertical defect exists also in pixels adjacent to a white defect pixel. In Fig. 8, where a vertical defect exists across pixels A, D and G on the left side of a pixel E, which is a white defect pixel, a pixel value of the white defect pixel E is determined according to expression (6) below.



    [0049] Note that in the case of Fig. 3, for the pixel value of the pixel E, which is a pixel to be corrected, an average value of pixel values of a set of two pixels that sandwich the pixel E therebetween and have a smallest difference in pixel value may be determined as the pixel value of the white defect pixel E. For example, in the case of Fig. 3, in a set of A and I, a set of B and H, a set of C and G and a set of D and F, if a set with a smallest absolute value from among absolute values of respective differences, |A-I|, |B-H|, |C-G| and |D-F|, is the set of A and I, an average value of pixel values of pixels A and I may be determined as the pixel value of the white defect pixel E.

    [0050] Fig. 9 is a block diagram illustrating a configuration of the enlargement/reduction circuit 35. Fig. 10 is a diagram for describing change of images processed in the enlargement/reduction circuit 35.

    [0051] As illustrated in Fig. 9, the enlargement/reduction circuit 35 includes an image enlargement/reduction memory 35A and an image enlargement/reduction block 35B. Enlargement and reduction of images are performed using the image enlargement/reduction block 35B including a processing module used in common in both enlargement processing and reduction processing and the image enlargement/reduction memory 35A used in common. Image data is written from the image enlargement/reduction block 35B to the image enlargement/reduction memory 35A and the image data in the image enlargement/reduction memory 35A is read by the image enlargement/reduction block 35B.

    [0052] An input image in an interlace method is inputted from the gamma correction circuit 34 to the image enlargement/reduction block 35B. As illustrated in Fig. 10, images in odd-numbered fields and images in even-numbered fields are alternately written to the image enlargement/reduction memory 35A as memory write images. The image data written in the image enlargement/reduction memory 35A are read by the image enlargement/reduction block 35B, subjected to enlargement processing or reduction processing and outputted as output images. Whether enlargement processing or reduction processing to be performed is determined according to whether the internal mode is an enlargement mode or a reduction mode.

    [0053] Thus, upon occurrence of transition from the enlargement mode to the reduction mode, since enlargement processing and reduction processing cannot be performed simultaneously, an image such as one that cannot be recognized by a user is outputted to the monitor 5 at a changing point in the transition.

    [0054] Therefore, in the enlargement/reduction circuit 35 according to the present embodiment, in order to avoid such problem, during transition from the enlargement mode to the reduction mode, an image equal to an original thereof, which provides no effect on the enlargement processing and the reduction processing, is outputted. In other words, an image displayed on the monitor 5 changes from an enlarged image to an image equal to the original and from the image equal to the original to a reduced image. As a result, the image displayed on the monitor 5 transitions while images that can be recognized by a user are displayed.

    [0055] Note that although the above description has been provided in terms of an example of transition from the enlargement mode to the reduction mode, processing similar to the above may be performed for transition from the reduction mode to the enlargement mode.

    (Selection of focusing determination area)



    [0056] Next, an area for determining, that is, evaluating a focusing state (hereinafter also referred to as focusing evaluation area) FEA in an effective pixel region VA will be described.

    [0057] Each of Figs. 11 to Fig. 13 is a diagram for describing a focusing evaluation area FEA in an effective pixel region VA.

    [0058] The effective pixel region VA includes four areas resulting from the effective pixel region VA being divided into four. Each area includes a focal point detection pixel group FDA for focal point detection. In an alternative to the present invention, the effective pixel region VA includes a focal point detection pixel group FDA1 for the entirety. Positions of pixels in the focal point detection pixel group FDA or FDA1 are set in advance in the effective pixel region VA. As illustrated in Figs. 11 to 13, each of the focal point detection pixel groups FDA and FDA1 includes a plurality of, here, three linear focal point detection pixel groups.

    [0059] A reason for the above is to avoid an increase in circuit size for focal point detection, which is caused when all of pixels in the respective area are used as pixels for focal point detection, and thus, pixels used for focal point detection in the respective area are determined in advance.

    [0060] Fig. 11 illustrates an example indicating a case where a lumen LM is detected in a fourth quadrant IV (hereinafter also referred to as area IV) from among four quadrants in an effective pixel region VA. In the case of Fig. 11, a focal point detection pixel group FDA in a second quadrant II (hereinafter also referred to as area II) is used for focal point detection. A method for detecting a lumen LM in an effective pixel region VA will be described later.

    [0061] Fig. 12 illustrates a case where a lumen LM is detected in a third quadrant III (hereinafter also referred to as area III) and the area IV from among the four quadrants in the effective pixel region VA. In the case of Fig. 12, focal point detection pixel groups FDA in a first quadrant I (hereinafter also referred to as area I) and the area II are used for focal point detection.

    [0062] In other words, the above examples are examples in which the effective pixel region VA is divided into four, and when a lumen LM is detected in an endoscopic image, an area of a quadrant opposite to the quadrant where the lumen LM exists is determined as a focusing evaluation area FEA.

    [0063] As described above, when a lumen LM is detected in an endoscopic image, an area where no lumen LM exists is selected as a focusing evaluation area FEA. Note that where there is a plurality of areas where no lumen LM exists, an area with a highest average luminance from among the plurality of areas may be selected as a focusing evaluation area FEA.

    [0064] Fig. 13 illustrates an example in which no lumen LM is detected in the effective pixel region VA. In the case of Fig. 13, a focal point detection pixel group FDA1 in a center part CA of the image region VA is used for focal point detection.

    [0065] As described above, which area is to be used as a focusing evaluation area FEA is determined in advance according to the position of the detected lumen LM and the case where no lumen LM is detected.

    (Halation pixel cancellation)



    [0066] Also, if a halation part exists in an effective pixel region VA, use of pixel values of pixels in the halation part for focal point detection results in a decrease in precision of focal point detection. This is because a halation part includes a clear edge part, which may make the focusing evaluation section 40 erroneously determine that the relevant image is in focus. Therefore, pixels in the halation part are not used for focal point detection.

    [0067] Fig. 14 is a diagram for describing a state in which a halation part exists in an effective pixel region VA and the halation part extends to a focal point detection pixel group FDA or FDA1. As illustrated in Fig. 14, where the halation part HA indicated by the dotted lines extends to a focal point detection pixel group FDA or FDA1, the pixels in the halation part HA (pixels in the shading) in the later-described focal point detection pixel group are not used for focal point detection. In other words, only pixels other than the pixels in the halation part in the focal point detection pixel group FDA or FDA1 are used for focal point detection.

    [0068] Note that not only the pixels in the halation part HA but also several pixels, for example, three pixels, at the sides of the halation part HA, may be prevented from being used for focal point detection.

    [0069] As described above, for focal point detection, pixels in a dark part such as a lumen and pixels in a halation part are not used for focal point detection.

    (Contour enhancement circuit)



    [0070] The contour enhancement circuit 36 generates contour component signals CES from pixel signals in the effective pixel region VA and outputs the contour component signals CES to the focusing evaluation section 40. The contour component signals CES in the present embodiment are signals containing edge component signals for respective signals, the edge component signals being obtained by making calculation from a pixel value of a pixel of interest and pixel values of a plurality of pixels (here, eight pixels) in the periphery of the pixel of interest and the pixel of interest being shifted from one to another by one pixel in a predetermined direction (here an X direction) in a two-dimensional image on an X-Y plane. In other words, the contour component signals CES are signals resulting from extracting only edge components, which are contour signals, from video signals the signals being obtained by calculating edge components for the respective pixels in the effective pixel region VA.

    [0071] Fig. 15 is a schematic diagram for describing contour component signals CES in edge parts in an image. The contour enhancement circuit 36 calculates edge components for respective pixels of interest while shifting the pixel of interest from one to another by one pixel in the X direction for each line in an effective pixel region VA, and outputs the edge components as contour component signals CES. In other words, the contour component signals CES contain edge component values having positive values calculated for the respective pixels in the effective pixel region VA. The edge component values are values resulting from structure enhancement, and thus are large in edge parts in an image, which have clear differences in luminance value.

    [0072] As illustrated in Fig. 15, in the case of an image that has large differences between values of luminance signals BS and thus is in focus, the edge component value has the characteristic of becoming the largest at an inflection point IP in the vicinity of a center ec of each edge part having a clear difference in luminance value and gradually becoming smaller away from the inflection point IP in the vicinity of the center ec. In other words, the edge component value is a value that monotonically increases and monotonically decreases before and after the inflection point IP in the vicinity of the center ec of the edge part having a clear difference in luminance value. When values of edge components are plotted by arranging the values in the X direction, the contour component signals CES are indicated by a bar chart including triangular shapes. If a plurality of edge parts having a clear difference in luminance value exist in a certain line in the effective pixel region VA, a plurality of the triangles exist in the line. In a region with no edge part, no contour component signals CES are outputted.

    [0073] On the other hand, in the case of an image having no clear difference in luminance value, data of such contour component signals CES as illustrated in Fig. 15 are not obtained.

    [0074] Fig. 16 is a diagram for describing contour component signals CES generated where no clear edge parts exist in the effective pixel region VA.

    [0075] As illustrated in Fig. 16, where there are no large differences in value of luminance signal BS and thus no clear edge parts exist, a plurality of data in the contour component signals CES in each edge part is not data in a monotonic increase and a monotonic decrease such as data having values gradually increasing toward a center part of the edge and after one inflation point at an intermediate point, gradually decreasing like that illustrated in Fig. 15. Where there are no clear edge parts in the effective pixel region VA, that is, in the case of a blurred image, the contour component signals CES for the respective pixels in the edge parts do not exhibit triangular shapes such as illustrated in Fig. 15.

    [0076] As described later, if a plurality of contour component signals CES generated by making calculation from pixels while the pixels are shifted from one to another by one pixel in a predetermined direction in an image has a predetermined distribution, it is determined that the image is in focus. Then, the predetermined distribution includes a plurality of signal parts in a monotonic increase and a plurality of signal parts in a monotonic decrease following the plurality of signal parts in a monotonic increase when a plurality of contour component signals CES are generated for respective pixels in the predetermined direction and outputted, and one plurality of signal parts in a monotonic increase and one plurality of signal parts in a monotonic decrease are included in the predetermined distribution.

    [0077] Note that although at an inflection point between a monotonic increase and a monotonic decrease, the contour component signal CES has a maximum value, there may be not only one contour component signal CES but two or more contour component signals CES having a maximum value, for example, there may be two or three consecutive contour component signals CES having a maximum value. Note that the below description will be provided in terms of a case where there is only one contour component signal CES having a maximum value.

    (Configuration of focusing evaluation section)



    [0078] Fig. 17 is a block diagram illustrating a configuration of the focusing evaluation section 40. In the present embodiment, as described above, the focusing evaluation section 40 is a processing section provided by a software program executed by the CPU 39.

    [0079] The focusing evaluation section 40 includes a lumen detection section 51, a focusing evaluation area selection section 52, a halation detection section 53, a shape detection section 54, a threshold value comparison section 55, a focal point switching instruction section 56, a distance estimation section 57, and a CPU interface section (hereinafter referred to as CPU I/F) 58.

    [0080] The lumen detection section 51 is a processing section that detects existence or non-existence of a lumen in an image. The luminance signals BS from the contour enhancement circuit 36, the vertical drive signal VD and the horizontal drive signal HD from the CCD 12 and the image position information IPS defining the effective pixel region VA are inputted to the lumen detection section 51.

    [0081] The lumen detection section 51 detects a pixel whose luminance value is no more than a predetermined threshold value, that is, a pixel of a dark part, and detects a position of a region of the detected dark part pixel as a position of a lumen LM. For example, if there are pixels having no more than a predetermined threshold value of brightness corresponding to an area of no less than a predetermined size, the lumen detection section 51 determines a position of the part having that area as a lumen position. Accordingly, the lumen detection section 51 detects the lumen LM from the detected luminance values.

    [0082] Then, as illustrated in Fig. 11 or 12, the lumen detection section 51 outputs information on a position, that is, information on a quadrant where the lumen LM is detected.

    [0083] The focusing evaluation area selection section 52 is a processing section that selects an area used for focusing evaluation in the effective pixel region VA and outputs a focusing evaluation area instruction signal FEIS. The vertical drive signal VD and the horizontal drive signal HD from the CCD 12 and the image position information IPS defining the effective pixel region VA and forceps position information FPS are inputted to the focusing evaluation area selection section 52.

    [0084] In the case of Fig. 11, since the lumen LM is detected in the quadrant IV, for example, the focusing evaluation area selection section 52 outputs a focusing evaluation area instruction signal FEIS for selecting the area II as a focusing evaluation area FEA. Likewise, in the case of Fig. 12, since the lumen LM is detected in the area III and the area IV, for example, the focusing evaluation area selection section 52 selects two areas, the area I and the area II, as focusing evaluation areas FEA and outputs a focusing evaluation area instruction signal FEIS of the focusing evaluation areas FEA.

    [0085] Furthermore, in the case of Fig. 13, since no lumen LM is detected in the effective pixel region VA, the focusing evaluation area selection section 52 selects the area CA in the center part as a focusing evaluation area FEA and outputs a focusing evaluation area instruction signal FEIS.

    [0086] The forceps position information FPS is information on a position where a forceps appears in an image.

    [0087] The halation detection section 53 is a processing section for detecting a halation part in the effective pixel region VA. The luminance signals BS, and the focusing evaluation area instruction signal FEIS from the focusing evaluation area selection section 52 are inputted to the halation detection section 53. The halation detection section 53 detects existence or non-existence of a halation in the selected focusing evaluation area FEA, and outputs information on existence or non-existence of a halation and information on positions of pixels of the halation. Note that existence or non-existence of a halation can be determined according to whether or not a pixel value of the pixel is a pixel value that is no less than a predetermined threshold value.

    [0088] The shape detection section 54 is a processing section that performs shape detection processing based on the contour component signals CES from the contour enhancement circuit 36, the focusing evaluation area instruction signal FEIS, and the information from the halation detection section 53. The content of processing in the shape detection section 54 will be described later.

    [0089] The threshold value comparison section 55 is a processing section that compares the contour component signals CES exhibiting a triangular shape, outputted from the shape detection section 54, and a predetermined threshold value and outputs a focusing evaluation result signal FRS.

    [0090] For example, the threshold value comparison section 55 determines whether or not a value of an inflection point IP (that is, a maximum value) of the contour component signals CES exhibiting a triangular shape, outputted from the shape detection section 54, is that of a signal having no less than a predetermined signal level threshold value, and remove contour component signals CES having a value of less than the predetermined signal level threshold value as noise signals and use only contour component signals CES other than noise signals for focusing evaluation.

    [0091] Furthermore, the threshold value comparison section 55 outputs a focusing evaluation result signal FRS indicating that the relevant image is in focus according to whether or not no less than a predetermined threshold number of groups of contour component signals CES having triangular shapes are detected in each linear focal point detection pixel group and whether or not no less than a predetermined threshold number of lines having no less than the predetermined threshold number of triangular shapes are included in the plurality of lines.

    [0092] For example, if a focusing evaluation area FEA includes two or more lines each including a linear focal point detection pixel group from which no less than three groups of contour component signals CES having triangular shapes are detected, the threshold value comparison section 55 outputs a focusing evaluation result signal FRS indicating that the entire screen is in focus, and if the focusing evaluation area FEA includes no more than one such line, the threshold value comparison section 55 outputs a focusing evaluation result signal FRS indicating that the entire screen is out of focus.

    [0093] Note that the respective threshold values, that is, the signal level threshold value, the threshold number of groups and the threshold number of lines can be changed, and as described later, can be changed by a user via the CPU I/F 58.

    [0094] The focal point switching instruction section 56 outputs a focal point switching signal FSWS for switching a focal position, based on the inputted focusing evaluation result signal FRS. For example, if the focusing evaluation result signal FRS indicates that the screen is in focus, the focal point switching instruction section 56 does not output the focal point switching signal FSWS, while if the focusing evaluation result signal FRS indicates that the screen is out of focus, the focal point switching instruction section 56 outputs the focal point switching signal FSWS. Where an endoscope has two phases of focal points, for example, where there are only two focal positions, a near point position and a far point position, if the screen is out of focus, the focal point switching instruction section 56 outputs a switching signal FSWS for switching the objective optical system 11 so that the focal point is switched to the other focal position.

    [0095] The distance estimation section 57 is a processing section that performs processing for estimating a distance between a distal end portion of the endoscope and an object. The distance estimation section 57 is used to prevent the switched focal position from being a position where the screen is out of focus. That is, the distance estimation section 57 performs processing for estimating the distance to the object for prevention of malfunction of focal point switching control.

    [0096] For example, where the endoscope has two focal positions, a near point focal position and a far point focal position, switching of the focal position from the far point position to the near point position is performed when the distance to the object is extremely short. Accordingly, where switching of the focal position from the far point position to the near point position is determined to be necessary for any reason when the distance to the object is long, if the distance to the object is no less than a predetermined distance, in order to prevent switching of the focal position from the far point position to the near point position, the distance estimation section 57 estimates whether or not the distance to the object is no less than the predetermined distance, and outputs a predetermined signal to the threshold value comparison section 55.

    [0097] The distance estimation section 57 does not directly measure the distance from the distal end portion of the endoscope to the object but estimates whether or not the distance to the object is no less than the predetermined distance based on an amount of light emitted from the light source apparatus 4 (that is, the diaphragm value signal AS) or the electronic shutter information (ESS). In other words, the distance estimation section 57 estimates the distance to the object based on at least one of the state of the electronic shutter and the diaphragm value.

    [0098] The amount of light emitted from the light source apparatus 4 is correlated with the diaphragm value of the diaphragm 22. If the distance to the object is short, the necessary amount of light is small and thus, an aperture of the diaphragm 22 is narrowed. Accordingly, if the aperture of the diaphragm indicated by the diaphragm value signal AS from the diaphragm control circuit 24 is no more than a predetermined value, the distance estimation section 57 determines that the distance to the object is no less than the predetermined distance and outputs the predetermined signal.

    [0099] Also, the electronic shutter information ESS is correlated with the distance to the object. If the distance to the object is short, the amount of light projected on the object is large and thus a shutter speed of the electronic shutter becomes high. Accordingly, the shutter speed is no more than a predetermined speed value, the distance estimation section 57 determines that the distance to the object is no less than the predetermined distance, and outputs the predetermined signal.

    [0100] Accordingly, when the focal position is the far point position, if the distance estimation section 57 estimates that the distance to the object is no less than the predetermined distance, the threshold value comparison section 55 prohibits an output of a focusing evaluation result signal FRS indicating whether or not the screen is in focus.

    [0101] Note that, conversely, when the focal position is the far point position, only if the distance estimation section 57 estimates that the distance to the object is no more than the predetermined distance, the threshold value comparison section 55 may permit an output of a focusing evaluation result signal FRS indicating whether or not the screen is in focus.

    [0102] Furthermore, even when the focal position is the near point position, if the distance to the object is such a short distance exceeding a limit of the field of depth of the objective optical system 11, the threshold value comparison section 55 also prohibits an output of a focusing evaluation result signal FRS indicating whether or not the screen is in focus. This is because where the distance to the object is too short, the screen cannot be in focus.

    [0103] Accordingly, the threshold value comparison section 55 controls driving and stoppage of the moving lens based on the estimated distance. The CPU I/F 58 is a processing section that supplies control signals or control information supplied from the CPU 39 to predetermined processing sections.

    [0104] Upon an input of a sensitivity value, observation mode information, an AGC level from the CPU 39, the CPU I/F 58 supplies these pieces of information to the threshold value comparison section 55. The threshold value comparison section 55 changes the respective threshold values described above according to these pieces of information. The set sensitivity value is, for example, a set value for the signal level threshold value, and as described later, change of the set sensitivity value results in change in number of contour component signals CES detected.

    [0105] Also, the observation mode information is, for example, information indicating whether or not the observation mode is any of a normal-light observation mode, a narrow band observation mode and a fluorescence observation mode, and in the threshold value comparison section 55, a signal level threshold value according to the observation mode is selected and set.

    [0106] Furthermore, the AGC level is a level set according to the state of noise of the image, and change of the AGC level results in change of the signal level threshold value.

    [0107] Also, upon an input of prohibition mode information from the CPU 39, the CPU I/F 58 supplies the prohibition mode information to the focal point switching instruction section 56. Here, prohibition mode information is information indicating a prohibition mode for prohibiting an output from the focal point switching instruction section 56 during an operation for inserting the insertion portion of the endoscope into the subject.

    [0108] During an operation for inserting the insertion portion of the endoscope into the subject, the distance between the distal end portion of the insertion portion of the endoscope and the subject becomes short and long, i.e., frequently changes. A user does not observe the subject while changing the focal length during the operation for inserting the insertion portion of the endoscope into the subject. Accordingly, in order to prevent a switching signal FSWS from being outputted from the focusing evaluation section 40 during an operation for inserting the insertion portion of the endoscope into the subject, when the CPU 39 determines that there is a change equal to or exceeding a predetermined threshold value between images of two consecutive frames, based on a comparison result signal from the frame comparison circuit 41, the CPU 39 outputs information indicating the prohibition mode to the focusing evaluation section 40.

    (Operation)



    [0109] Next, the flow of processing in the focusing evaluation section 40 will be described. As described above, the respective functions of the focusing evaluation section 40 are performed by the program executed by the CPU 39.

    [0110] First, processing in the lumen detection section 51 and the focusing evaluation area selection section 52 in the focusing evaluation section 40 will be described.

    [0111] Figs. 18 and 19 are flowcharts illustrating an example of the flow of processing in the lumen detection section 51 and the focusing evaluation area selection section 52.

    [0112] First, the CPU 39 divides an effective pixel region VA into four areas I, II, III and IV based on the vertical drive signal VD, the horizontal drive signal HD and information in the image position information IPS (step (hereinafter abbreviated as S1).

    [0113] Next, the CPU 39 calculates an average value of the luminance signals BS for each of the areas I to IV (S2), and compares each of the average values for the areas I to IV and a predetermined threshold value THd (S3).

    [0114] The CPU 39 determines whether or not the average values of the areas I, II, II and IV are all no less than the threshold value THd or whether or not no more than the threshold value THd (S4), and if the average values are all no less than the threshold value THd or no more than the threshold value THd (S4: YES), the CPU 39 determines that no lumen exists, and selects the area CA in the center part as a focusing evaluation area FEA (S5).

    [0115] In the case of NO in S4, the CPU 39 determines whether or not the average values of the areas I, III and IV are all no more than the threshold value THd or whether or not only the average value of the area IV is no more than the threshold value THd (S6).

    [0116] If the average values of the areas I, III and IV are all no more than the threshold value THd or if only the average value of the area IV is no more than the threshold value THd (S6: YES), the CPU 39 determines that a lumen exists in the area IV and selects the area II as a focusing evaluation area FEA (S7).

    [0117] In the case of NO in S6, the CPU 39 determines whether or not the average values of the areas II, III and IV are all no more than the threshold value THd or whether or not only the average value of the area III is no more than the threshold value THd (S8).

    [0118] If the average values of the areas II, III and IV are all no more than the threshold value THd or if only the average value of the area III is no more than the threshold value THd (S8: YES), the CPU 39 determines that a lumen exists in the area III and selects the area I as a focusing evaluation area FEA (S9).

    [0119] In the case of NO in S8, the CPU 39 determines whether or not the average values of the areas I, II and III are all no more than the threshold value THd or whether or not only the average value of the area II is no more than the threshold value THd (S10).

    [0120] If the average values of the areas I, II and III are all no more than the threshold value THd or if only the average value of the area II is no more than the threshold value THd (S10: YES), the CPU 39 determines that a lumen exists in the area II, and selects the area IV as a focusing evaluation area FEA (S11).

    [0121] In the case of NO in S10, the CPU 39 determines whether or not the average values of the areas I, II and IV are all no more than the threshold value THd or whether or not only the average value of the area I is no more than the threshold value THd (S 12).

    [0122] If the average values of the areas I, II and IV are all no more than the threshold value THd or if only the average value of the area I is no more than the threshold value THd (S12: YES), the CPU 39 determines that a lumen exists in the area I and selects the area III as a focusing evaluation area FEA (S 13).

    [0123] In the case of NO in S12, the CPU 39 determines whether or not only the average values of two areas, the areas I and II, are no more than the threshold value THd (S 14).

    [0124] If only the average values of two areas, the areas I and II, are no more than the threshold value THd (S 14: YES), the CPU 39 determines that a lumen exists in the areas I and II, and selects the areas III and IV as focusing evaluation areas FEA (S 15).

    [0125] In the case of NO in S14, the CPU 39 determines whether or not only the average values of two areas, the areas I and IV, are no more than the threshold value THd (S16).

    [0126] If only the average values of two areas, the areas I and IV, are no more than the threshold value THd (S16: YES), the CPU 39 determines that a lumen exists in the areas I and IV, and selects the areas II and III as focusing evaluation areas FEA (S 17).

    [0127] In the case of NO in S16, the CPU 39 determines whether or not only the average values of two areas, the areas II and III, are no more than the threshold value THd (S 18).

    [0128] If only the average values of two areas, the areas II and III, are no more than the threshold value THd (S18: YES), the CPU 39 determines that a lumen exists in the areas II and III, and selects the areas I and IV as focusing evaluation areas FEA (S19).

    [0129] In the case of NO in S18, the CPU 39 determines whether or not only the average values of two areas, the areas III and IV, are no more than the threshold value THd (S20).

    [0130] If only the average values of two areas, the areas III and IV, are no more than the threshold value THd. (S20:YES), the CPU 39 determines that a lumen exists in the areas III and IV, and selects the areas I and II as focusing evaluation areas FEA (S21).

    [0131] In the case of NO in S20, the CPU 39 determines whether or not only the average values of two areas, the areas I and III, are no more than the threshold value THd (S22).

    [0132] If only the average values of two areas, the areas I and III, are no more than the threshold value THd (S22: YES), the CPU 39 determines whether or not an average luminance value of the area II is higher than that of the area IV (S23).

    [0133] If the average luminance value of the area II is higher than that of the area IV (S23: YES), the CPU 39 determines that a lumen exists in the areas I, III and IV, and selects the area II as a focusing evaluation area FEA (S24).

    [0134] In the case of NO in S23, the CPU 39 determines that a lumen exists in the areas I, II and III, and determines the area IV as a focusing evaluation area FEA (S25).

    [0135] If only the average values of the areas II and IV are no more than the threshold value THd (S22: NO), the CPU 39 determines whether or not an average luminance value of the area I is higher than that of the area III (S26).

    [0136] If the average luminance value of the area I is higher than that of the area III (S26: YES), the CPU 39 determines that a lumen exists in the areas II, III and IV, and selects the area I as a focusing evaluation area FEA (S27).

    [0137] In the case of NO in S26, the CPU 39 determines that a lumen exists in the areas I, II and IV, and selects the area III as a focusing evaluation area FEA (S28).

    [0138] As described above, an image is divided into a plurality of areas and from among the plurality of areas, an area other than an area determined as including a lumen based on information on the position of the lumen is set as a focusing evaluation area (that is, focusing determination area) in the image for determining a focusing state.

    [0139] As a result of the processing in S5, S7, S9, S11, S 13, S 15, S 17, S 19, S21, S24, S25, S27 and S28, the focusing evaluation area FEA is determined. Accordingly, after the processing, the CPU 39 turns focusing evaluation area enable signals to HIGH (hereinafter referred to as H), the focusing evaluation area enable signals corresponding to all of pixel positions in a focal point detection pixel group FDA or FDA1 including three lines in the effective pixel region VA (S29). In other words, while focusing evaluation area enable signals are set corresponding to positions of respective pixels in the effective pixel region VA, the focusing evaluation area enable signals for positions of pixels in the focal point detection pixel group FDA or FDA1 are set to H. Note that since two areas are selected as focusing evaluation areas FEA in S 15, S 17, S19 and S21, in such cases, the focusing evaluation area enable signals corresponding to positions of pixels in the focal point detection pixel groups FDA including six lines are turned to H.

    [0140] Next, the CPU 39 determines whether or not an area including a forceps position and the focusing evaluation area FEA correspond to each other based on the forceps position information FPS (S30). The ROM 17 and S30 provide a forceps position detection section that detects a position of a forceps in an image picked up by the CCD 12.

    [0141] If an area including a forceps position and the focusing evaluation area FEA correspond to each other (S30: YES), the CPU 39 determines whether or not no less than a predetermined number of high-luminance pixels exist in the focusing evaluation area FEA (S31). In the case of YES in S31, that is, if no less than the predetermined number of high-luminance pixels exist, an image of the forceps projecting from the distal end portion of the endoscope is included in the image.

    [0142] Accordingly, in the case of YES in S31, since the position of the forceps appearing in the image is determined in advance, the CPU 39 shifts a position of a focusing evaluation area enable signal H region to a predetermined position (S32).

    [0143] Fig. 20 is a diagram for describing a shift of a position of a focusing evaluation area enable signal H region corresponding to positions of pixels in a focal point detection pixel group FDA. As illustrated in Fig. 20, when the focusing evaluation area FEA is set to the area IV, a forceps FCP may appear in the area IV on the image. Thus, a position of a focusing evaluation area enable signal H region is shifted within the focusing evaluation area FEA so that position of the focal point detection pixel group FDA including three lines are moved from the position indicated by dotted lines to the position indicated by solid lines. S31 and S32 provide a processing section that shifts and sets positions of pixels in an image, for which contour component signals CES are outputted for determining a focusing state, based on the forceps position information.

    [0144] In the case of NO in S31 and after S32, the CPU 39 supplies the focusing evaluation area enable signals to the shape detection section 54 as focusing evaluation area instruction signals FEIS (S33).

    [0145] Next, processing in the halation detection section 53, the shape detection section 54, the threshold value comparison section 55, the focal point switching instruction section 56 and the CPU I/F section 58 will be described.

    [0146] Figs. 21 and 22 are flowcharts of the flow of processing in the halation detection section 53, the shape detection section 54, the threshold value comparison section 55, the focal point switching instruction section 56 and the CPU I/F section 58.

    [0147] First, the CPU 39 start reading of a contour component signal CES in the image effective region VA from the contour enhancement circuit 36 (S51). The CPU 39 determines whether or not a focusing evaluation area instruction signal FEIS corresponding to a position of a pixel for the read contour component signal CES is H (S52).

    [0148] If the focusing evaluation area instruction signal FEIS for the read contour component signal CES is not H (S52: NO), the CPU 39 reads a next contour component signal CES (S53) and proceeds the above-described processing in S52.

    [0149] If the focusing evaluation area instruction signal FEIS for the read contour component signal CES is H (S52: YES), the CPU 39 determines whether or not a halation has occurred in the position of the pixel for the read contour component signal CES (S54). This determination can be made based on a luminance signal BS from the contour enhancement circuit 36. Occurrence of a halation is determined based on whether or not the luminance signal BS is no less than a predetermined threshold value THh for determining occurrence or non-occurrence of a halation.

    [0150] If a halation has occurred (S54: YES), the CPU 39 converts the contour component signal CES for the pixel to 0 (zero) (S55). In the case of NO in S54 and after S55, the CPU 39 stores the contour component signal CES in the line memory 44 (S56).

    [0151] As described above, a distribution of signals included in signal contour component signals is determined except contour component signals CES for pixels whose detected luminance values are no less than the predetermined threshold value THh.

    [0152] Then, the CPU 39 reads a next contour component signal CES (S57), and determines whether or not a focusing evaluation area instruction signal FEIS for the read signal is L (S58).

    [0153] In the case of NO in S58, the focusing evaluation area instruction signal FEIS for the read signal is H, and thus, the processing returns to S54.

    [0154] In the case of YES in S58, contour component signals CES for one line in the focal point detection pixel group FDA or FDA1 have been read. Accordingly, the CPU 39 reads the contour component signals CES stored in the line memory 44 from the head of the line memory 44 (S59).

    [0155] The CPU 39 determines whether or not the contour component signal CES for the last pixel in the line memory 44 has been read (S60), and if the contour component signal CES for the last pixel has not been read (S60: NO), the CPU 39 determines whether or not a group of data with both ends zero, data therebetween all positive values and no less than a predetermined number (here, for example, five) of data included has been read (S61).

    [0156] In the line memory 44, contour component signals CES for one line in a focal point detection pixel group FDA or FDA1 in a focusing evaluation area are stored. In the line, contour component signals CES for edge parts are stored. If the image is in focus, groups of contour component signals CES exhibiting the shape illustrated in Fig. 15 exist successively. If the image is out of focus, groups of contour component signals exhibiting the shape illustrated in Fig. 16 exist. In a region with no edge parts, no contour component signals CES appear. Accordingly, in S61, it is determined whether or not a group of data with both ends zero, data therebetween all positive values and no less than a predetermined number of data included has been read.

    [0157] In the case of NO in S61, the processing returns to S60. In the case of YES in S61, the data group is stored in the memory 45 as edge data (S62), and the processing moves to S60.

    [0158] The case of YES in S60 means that the contour component signal CES for one line in the focal point detection pixel group FDA or FDA1 in the focusing evaluation area has been read.

    [0159] Next, the CPU 39 determines whether or not edge data for which shape determination has not been made exists in the memory 45 (S63). In the case of YES in S63, the CPU 39 reads edge data for which shape determination has not been made from the memory 45 (S64), and determines whether or not the edge data has only one inflection point, and the value of the contour component signal CES changes from an increase to a decrease along the X direction (S65).

    [0160] In the case of YES in S65, that is, if the edge data exhibits a change as illustrated in Fig. 15, the CPU 39 determines that the edge data is an in-focus edge group (S66), and stores a maximum (MAX) value of the in-focus edge group in the memory 45 (S67). As described above, in S65, whether or not a plurality of contour component signals CES for edge data exhibit a predetermined signal distribution as illustrated in Fig. 15, and if the contour component signals CES exhibits the predetermined signal distribution, the edge data is determined as an in-focus edge group.

    [0161] In the case of NO in S65, that is, if the edge data does not have a change as illustrated in Fig. 15, the CPU 39 determines the edge data as an out-of-focus edge group (S68).

    [0162] After S67 and S68, the processing returns to S63.

    [0163] In the case of NO in S63, that is, if all of the edge data has been read and the above-described determination has been made therefor, whether or not the observation mode is a narrow-band imaging (NBI) mode is determined (S69). In the case of YES in S69, the CPU 39 deletes all of in-focus edge groups each having a maximum value of no more than a predetermined threshold value α, which has been stored in S67, from the memory 45 (S70).

    [0164] In the case of NO in S69 and after S70, the CPU 39 determines whether or not automatic gain control (AGC) is on (S71). In the case of YES in S71, the CPU 39 deletes all of in-focus edge groups each having a maximum value of no more than a predetermined threshold value β, which has been stored in S67, from the memory 45 (S72).

    [0165] In the case of NO in S71 and after S72, the CPU 39 deletes all of in-focus edges having a maximum value of no more than γ, from the memory 45 (S73), and determines whether or not the set sensitivity is high (S74). Note that, here, a relationship among α, β and γ is α > β > γ. Each of S70, S72 and S73 provides a signal value comparison section that compares a maximum value of contour component signals CES and a predetermined threshold value. Accordingly, the predetermined threshold value varies depending on the observation mode, and also varies depending on whether the automatic gain control (AGC) is in an on state or an off state.

    [0166] In the case of YES in S74, the CPU 39 determines whether or not the number of in-focus edge groups is no less than a predetermined number, here, no less than K (S75). In the case of YES in S75, the CPU 39 determines whether or not a movement of the object is no more than a predetermined value (S76). Whether or not a movement of the object is a movement of no less than the predetermined threshold value related to movement is determined based on the variation information from the frame comparison circuit 41.

    [0167] In the case of YES in S76, that is, if a movement of the object is no more than the predetermined value, the CPU 39 determines that the line is in focus (S77).

    [0168] In the case of NO in S75 and in the case of NO in S76, the CPU 39 determines that the line is out of focus (S78).

    [0169] In the case of NO in S74, that is, if the sensitivity is low, the CPU determines whether or not the number of in-focus edge groups is no less than a predetermined number, here, no less than L (S79). Here, L > K. Where a high sensitivity has been set, if the number of in-focus edge groups is no less than K (for example, three), the line is determined as being in focus; however, where a high sensitivity has not been set, the line is not determined as being in focus unless the number of in-focus edge groups is no less than L (for example, five) (S79: NO). As described above, a focusing state of each line is determined based on the number of predetermined distributions of a plurality of contour component signals CES exhibiting the predetermined distribution in each line.

    [0170] After the determinations in S77 and S78, the CPU 39 determines whether or not the above-described processing has ended for each of a predetermined number of lines (S80). In S80, in the present embodiment, the focusing evaluation area FEA includes the focal point detection pixel group FDA or FDA1 including three lines, and thus, whether or not the above-described processing has ended for all of the three lines.

    [0171] In the case of NO in S80, the processing moves to S51. In other words, in the present embodiment, a focal point detection pixel group FDA or FDA1 includes three lines, and the above-described processing has not been performed for all of the three lines, and thus, the above-described processing is performed for the remaining two lines.

    [0172] Also, in the case of YES in S80, the above-described processing has ended for the predetermined number of lines, and thus, the CPU 39 determines whether or not the entire screen is in focus (S81).

    [0173] If the entire screen is in focus, the processing ends, and if the entire screen is not in focus, the CPU 39 outputs a focal point switching instruction signal to the actuator drive section 42 (S82).

    [0174] Whether or not the entire screen is in focus is determined from results of determinations for the respective lines: for example, if no less than two lines from among the three lines are determined as being in focus, the entire screen is determined as being in focus and if no more than one line from among the three lines is determined as being in focus, the entire screen is determined as being out of focus.

    [0175] As described above, in the present embodiment described above, a focusing state is evaluated and determined according to whether or not a signal distribution of contour component signals CES is a predetermined distribution, and movement of the moving lens is controlled based on a result of comparison between a maximum value of the contour component signals CES and a predetermined threshold value.

    [0176] Accordingly, while conventionally, focusing evaluation is performed by mere level comparison of contour enhancement signals obtained by contour enhancement processing, resulting in a decrease in precision of focusing evaluation, in the present embodiment described above, determination of a signal distribution of contour component signals CES is made, a focusing state is evaluated based on results of comparison between signal levels of the contour component signals CES and a predetermined threshold value, to perform focusing control, enabling enhancement of precision of focusing evaluation in the endoscope apparatus.

    [0177] As described above, the above-described embodiment enables provision of an endoscope apparatus capable of performing high-precision focusing evaluation using contour component signals.

    [0178] The present application is filed claiming the priority of Japanese Patent Application No. 2010-192734 filed in Japan on August 30, 2010.


    Claims

    1. An endoscope apparatus (1), comprising:

    - an objective optical system (11) including a moving lens;

    - an image pickup section (12) that picks up an image of an object via the objective optical system (11);

    - a contour enhancement section (36) comprising a luminance value detection section that detects a luminance value of each pixel in the image, the contour enhancement section (36)

    - supplying information defining an effective pixel region (VA) which designates an image area excluding any unnecessary information electrically generated in the image pickup section (12), said effective pixel region (VA) being divided in four quadrants, each quadrant including focal point detection pixel groups (FDA) with a plurality of lines; and

    - performing contour enhancement by calculating edge component signals based on a pixel value of a pixel of interest in the effective pixel region (VA) by shifting the pixel of interest from one pixel to another by one pixel in a predetermined direction in the effective pixel region (VA), and outputs the edge component signals as contour component signals (CES);

    - a focusing state determination section (40) that determines a focusing state of the image based on the contour component signals and that the image is in focus if the plurality of contour component signals (CES) has a predetermined distribution and a maximum value of the plurality of contour component signals (CES) exceeds a predetermined threshold value, wherein the predetermined distribution includes a plurality of contour component signal parts in a monotonic increase followed by a plurality of contour component signal parts in a monotonic decrease; and

    - a drive control section (42) that controls movement of the moving lens based on the focusing state determined by the focusing state determination section (40), wherein

    - the focusing state determination section (40) further comprises a lumen detection section (51) that detects from the luminance values detected by the luminance value detection section as a pixel of a dark part a pixel whose luminance value is no more than a predetermined threshold value, detects a position of a region of the detected pixel of a dark part as a position of a lumen (LM), and outputs information on the quadrant where the lumen (LM) is detected;

    - the focusing state determination section (40) sets a focusing determination area in the effective pixel region (VA) for determining the focusing state, based on the information output by the lumen detection section (51), wherein the focusing state determination section (40) sets the focusing determination area in a quadrant opposite to the quadrant where the lumen (LM) has been detected;

    - the endoscope apparatus (1) has at least two of a normal light observation mode, a narrow-band light observation mode and a fluorescence observation mode;

    - the calculation, by which the contour component signal is obtained, is further based on pixel values of a plurality of pixels in a periphery of the pixel of interest; and

    - the focusing state determination section (40) determines that the image is in focus if the following further conditions are fulfilled:

    - at least a predetermined threshold number of triangularly shaped groups of contour component signals (CES) is detected in each focal point detection pixel group (FDA, FDA1), and

    - at least a predetermined threshold number of lines having at least the predetermined threshold number of triangularly shaped groups of contour component signals (CES) is included in the plurality of lines.


     
    2. The endoscope apparatus (1) according to claim 1, further comprising a signal value comparison section that compares a maximum value of the contour component signals with a predetermined threshold value, and an automatic gain control circuit (31) that controls a gain of an image signal outputted from the image pickup section (12),
    wherein the signal value comparison section determines the predetermined threshold value in accordance with whether the automatic gain control circuit (31) is in an on state or is in an off state, and performs the comparison based on the determined threshold value.
     
    3. The endoscope apparatus (1) according to claim 1, comprising a forceps position detection section that detects a position of a forceps in the image picked up by the image pickup section (12),
    wherein the focusing state determination section (40) sets positions of pixels in the image for which the contour component signals (CES) for determining the focusing state are outputted, based on forceps position information from the forceps position detection section.
     
    4. The endoscope apparatus (1) according to claim 1, wherein the focusing state determination section (40) determines the signal distribution included in the contour component signals (CES) except a contour component signal (CES) for a pixel having a luminance value of no less than a predetermined threshold value, the luminance value being detected by the luminance value detection section.
     
    5. The endoscope apparatus (1) according to claim 4, comprising:

    a distance estimation section that estimates a distance to the object;

    an electronic shutter state detection section that detects a state of an electronic shutter in the image pickup section (12); and

    a diaphragm value detection section that detects a diaphragm value for adjusting a light amount of illuminating light from a light source apparatus (4),

    wherein the distance estimation section estimates the distance to the object based on at least one of the state of the electronic shutter and the diaphragm value.


     
    6. The endoscope apparatus (1) according to claim 1, comprising a movement detection section that detects a movement of the object in the image,
    wherein the focusing state determination section (40) determines the signal distribution of the contour component signals (CES), based on the detected movement of the object.
     


    Ansprüche

    1. Endoskopgerät (1), das umfasst:

    - ein optisches Objektivsystem (10) mit einer beweglichen Linse;

    - einen Bildaufnahmeabschnitt (12), der ein Bild eines Objekts über das optische Objektivsystem (11) aufnimmt;

    - einen Konturverbesserungsabschnitt (36) mit einem Helligkeitswertserfassungsabschnitt, der einen Helligkeitswert eines jeden Pixels in dem Bild erfasst, wobei der Konturverbesserungsabschnitt (36)

    - eine Information bereitstellt, die einen effektiven Pixelbereich (VA) definiert, der einen Bildbereich bestimmt, der keine in dem Bildaufnahmeabschnitt (12) elektrisch erzeugte unnötige Information umfasst, wobei der effektive Pixelbereich (VA) in vier Quadranten unterteilt ist, wobei jeder Quadrant Fokuspunkterfassungspixelgruppen (FDA) mit einer Mehrzahl von Linien umfasst; und

    - eine Konturverbesserung durchführt, indem Randkomponentensignale auf der Basis eines Pixelwert eines interessierenden Pixels in dem effektiven Pixelbereich (VA) berechnet werden, indem der interessierende Pixel um einen Pixel von einem Pixel zu einem anderen in einer vorbestimmten Richtung in dem effektiven Pixelbereich (VA) verschoben wird, und die Randkomponentensignale als Konturkomponentensignale (CES) ausgibt;

    - einen Fokussierungszustandsbestimmungsabschnitt (40), der einen Fokussierungszustand des Bilds auf der Basis der Konturkomponentensignale bestimmt und bestimmt, dass das Bild fokussiert ist, wenn die Mehrzahl von Konturkomponentensignalen (CES) eine vorbestimmte Verteilung hat und ein Maximalwert der Mehrzahl von Konturkomponentensignalen (CES) einen vorbestimmten Schwellwert überschreitet, wobei die vorbestimmte Verteilung eine Mehrzahl von Konturkomponentensignalteilen in einem monotonen Anstieg gefolgt von einer Mehrzahl von Konturkomponentensignalteilen in einer monotonen Abnahme umfasst; und

    - einen Antriebssteuerungsabschnitt (42), der eine Bewegung der beweglichen Linse auf der Basis des durch den Fokussierungszustandsbestimmungsabschnitt (40) bestimmten Fokussierungszustands steuert, wobei

    - der Fokussierungszustandsbestimmungsabschnitt (40) ferner einen Lumenerfassungsabschnitt (51) umfasst, der aus den von dem Helligkeitswertserfassungsabschnitt erfassten Helligkeitswerten einen Pixel, dessen Helligkeitswert einen vorbestimmten Schwellwert nicht überschreitet, als einen Pixel eines dunklen Teils erfasst, eine Position eines Bereichs des erfassten Pixels eines dunklen Teils als eine Position eines Lumens (LM) erfasst und eine Information über den Quadranten, in dem das Lumen (LM) erfasst worden ist, ausgibt;

    - der Fokussierungszustandsbestimmungsabschnitt (40) einen Fokussierungsbestimmungsbereich in dem effektiven Pixelbereich (VA) festlegt, um den Fokussierungszustand auf der Basis der von dem Lumenerfassungsabschnitt (51) ausgegebenen Information zu bestimmen, wobei der Fokussierungszustandsbestimmungsabschnitt (40) den Fokussierungbestimmungsbereich in einem Quadranten festlegt, der einem Quadranten gegenüberliegt, in dem das Lumen (LM) erfasst worden ist;

    - das Endoskopgerät (1) mindestens zwei eines Normallichtbeobachtungsmodus, eines Schmalbandlichtbeobachtungsmodus und eines Fluoreszenzbeobachtungsmodus hat;

    - die Berechnung, durch die das Konturkomponentensignal erhalten wird, ferner auf Pixelwerten einer Mehrzahl von Pixeln in einer Umgebung des interessierenden Pixels basiert; und

    - der Fokussierungszustandsbestimmungsabschnitt (40) bestimmt, dass das Bild fokussiert ist, wenn die folgenden weiteren Bedingungen erfüllt sind:

    - mindestens eine vorbestimmte Schwellwertanzahl von dreieckig geformten Gruppen von Konturkomponentensignalen (CES) wird in jeder Fokuspunkterfassungspixelgruppe (FDA, FDA1) erfasst und

    - mindestens eine vorbestimmte Schwellwertanzahl von Linien, die mindestens die vorbestimmte Schwellwertanzahl von dreieckig geformten Gruppen von Konturkomponentensignalen (CES) hat, ist in der Mehrzahl von Linien enthalten.


     
    2. Endoskopgerät (1) nach Anspruch 1, das ferner einen Signalwertvergleichsabschnitt, der einen Maximalwert der Konturkomponentensignale einem vorbestimmten Schwellwert vergleicht, und einen automatischen Verstärkungssteuerungsschaltkreis umfasst, der eine Verstärkung eines von dem Bildaufnahmeabschnitt (12) ausgegebenen Bildsignals steuert,
    wobei der Signalwertvergleichsabschnitt den vorbestimmten Schwellwert demgemäß bestimmt, ob sich der automatische Verstärkungssteuerungsschaltkreis in einem An-Zustand befindet oder in einem Aus-Zustand befindet, und den Vergleich auf der Basis des bestimmten Schwellwerts durchführt.
     
    3. Endoskopgerät (1) nach Anspruch 1, das einen Zangenpositionserfassungsabschnitt umfasst, der eine Position einer Zange in dem von dem Bildaufnahmeabschnitt (12) aufgenommenen Bild erfasst,
    wobei der Fokussierungszustandsbestimmungsabschnitt (40) Positionen von Pixeln in dem Bild, für die die Konturkomponentensignale (CES) zur Bestimmung des Fokussierungszustands ausgegeben werden, auf der Basis einer Zangenpositionsinformation von dem Zangenpositionserfassungsabschnitt festlegt.
     
    4. Endoskopgerät (1) nach Anspruch 1, wobei der Fokussierungszustandsbestimmungsabschnitt (40) die Signalverteilung, die in den Konturkomponentensignalen (CES) enthalten ist, bestimmt, mit der Ausnahme eines Kontokomponentensignals (CES) für einen Pixel mit einem Helligkeitswert, der einen vorbestimmten Schwellwert nicht unterschreitet, wobei der Helligkeitswert durch den Helligkeitswertserfassungsabschnitt bestimmt wird.
     
    5. Endoskopgerät (1) nach Anspruch 4, das umfasst:

    einen Distanzabschätzungsabschnitt, der eine Distanz zu dem Objekt abschätzt;

    einen elektronischen Verschlusszustandserfassungsabschnitt, der einen Zustand eines elektronischen Verschlusses in dem Bildaufnahmeabschnitt (12) erfasst; und

    einen Blendenwerterfassungsabschnitt, der einen Blendenwert zum Einstellen einer Lichtmenge von Beleuchtungslicht von einem Lichtquellengerät (4) erfasst,

    wobei der Distanzabschätzungsabschnitt die Distanz zu dem Objekt auf der Basis eines Zustands des elektronischen Verschlusses und/oder des Blendenwerts abschätzt.


     
    6. Endoskopgerät (1) nach Anspruch 1, das einen Bewegungserfassungsabschnitt umfasst, der eine Bewegung des Objekts in dem Bild erfasst,
    wobei der Fokussierungszustandserfassungsabschnitt (40) die Signalverteilung der Konturkomponentensignale (CES) auf der Basis der erfassten Bewegung des Objekts bestimmt.
     


    Revendications

    1. Appareil d'endoscope (1), comprenant :

    - un système optique d'objectif (11) incluant une lentille mobile ;

    - une section (12) de capture d'image qui capture une image d'un objet via le système optique d'objectif (11) ;

    - une section (36) d'amélioration de contour comprenant une section de détection de valeur de luminance qui détecte une valeur de luminance de chaque pixel dans l'image, la section (36) d'amélioration de contour

    - délivrant des informations définissant une région de pixels effective (VA) qui désigne une zone d'image excluant toute information non nécessaire générée électriquement dans la section (12) de capture d'image, ladite région de pixels effective (VA) étant divisée en quatre quadrants, chaque quadrant incluant des groupes de pixels de détection de point focal (FDA) avec une pluralité de lignes ; et

    - réalisant une amélioration de contour en calculant des signaux de composante de bord sur la base d'une valeur de pixel d'un pixel d'intérêt dans la région de pixels effective (VA) en décalant le pixel d'intérêt d'un pixel vers un autre pixel d'un pixel dans une direction prédéterminée dans la région de pixels effective (VA), et délivre en sortie les signaux de composante de bord en tant que signaux de composante de contour (CES) ;

    - une section (40) de détermination d'état de focalisation qui détermine un état de focalisation de l'image sur la base des signaux de composante de contour et détermine que l'image est focalisée si la pluralité de signaux de composante de contour (CES) présente une répartition prédéterminée et une valeur maximale de la pluralité de signaux de composante de contour (CES) dépasse une valeur de seuil prédéterminée, dans lequel la répartition prédéterminée comprend une pluralité de parties de signaux de composante de contour en augmentation monotone suivie d'une pluralité de parties de signaux de composante de contour en diminution monotone ; et

    - une section (42) de commande d'entraînement qui commande le déplacement de la lentille mobile sur la base de l'état de focalisation déterminé par la section (40) de détermination d'état de focalisation, dans lequel

    - la section (40) de détermination d'état de focalisation comprend en outre une section (51) de détection de lumière qui détecte à partir des valeurs de luminance détectées par la section de détection de valeur de luminance comme un pixel d'une partie sombre un pixel dont la valeur de luminance n'est pas supérieure à une valeur de seuil prédéterminée, détecte une position d'une région du pixel détecté d'une partie sombre comme une position d'une lumière (LM), et délivre en sortie des informations sur le quadrant dans lequel la lumière (LM) est détectée ;

    - la section (40) de détermination d'état de focalisation établit une zone de détermination de focalisation dans la région de pixels effective (VA) pour déterminer l'état de focalisation, sur la base des informations délivrées en sortie par la section (51) de détection de lumière, dans laquelle la section (40) de détermination d'état de focalisation établit la zone de détermination de focalisation dans un quadrant opposé au quadrant dans lequel la lumière (LM) a été détectée ;

    - l'appareil d'endoscope (1) comporte au moins deux modes d'observation à la lumière normale, un mode d'observation à la lumière à bande étroite et un mode d'observation par fluorescence ;

    - le calcul, par lequel le signal de composante de contour est obtenu, est en outre basé sur les valeurs de pixel d'une pluralité de pixels dans une périphérie du pixel d'intérêt ; et

    - la section (40) de détermination d'état de focalisation détermine que l'image est focalisée si les conditions supplémentaires suivantes sont satisfaites :

    - au moins un nombre de seuil prédéterminé de groupes de forme triangulaire de signaux de composante de contour (CES) est détecté dans chaque groupe de pixels de détection de point focal (FDA, FDA1), et

    - au moins un nombre de seuil prédéterminé de lignes comportant au moins le nombre de seuil prédéterminé de groupes de forme triangulaire de signaux de composante de contour (CES) est contenu dans la pluralité de lignes.


     
    2. Appareil d'endoscope (1) selon la revendication 1, comprenant en outre une section de comparaison de valeur de signal qui compare une valeur maximale des signaux de composante de contour avec une valeur de seuil prédéterminée, et un circuit (31) de commande de gain automatique qui commande un gain d'un signal d'image délivré en sortie depuis la section (12) de capture d'image,
    dans lequel la section de comparaison de valeur de signal détermine la valeur de seuil prédéterminée selon si le circuit (31) de commande de gain automatique se trouve dans un état actif ou dans un état inactif, et réalise la comparaison sur la base de la valeur de seuil déterminée.
     
    3. Appareil d'endoscope (1) selon la revendication 1, comprenant une section de détection de position de pince qui détecte une position d'une pince dans l'image capturée par la section (12) de capture d'image,
    dans lequel la section (40) de détermination d'état de focalisation établit les positions des pixels dans l'image pour lesquels les signaux de composante de contour (CES) destinés à déterminer l'état de focalisation sont délivrés en sortie, sur la base des informations de position de pince provenant de la section de détection de position de pince.
     
    4. Appareil d'endoscope (1) selon la revendication 1, dans lequel la section (40) de détermination d'état de focalisation détermine la répartition de signaux contenus dans les signaux de composante de contour (CES) excepté un signal de composante de contour (CES) pour un pixel présentant une valeur de luminance n'étant pas inférieure à une valeur de seuil prédéterminée, la valeur de luminance étant détectée par la section de détection de valeur de luminance.
     
    5. Appareil d'endoscope (1) selon la revendication 4, comprenant :

    une section d'estimation de distance qui estime une distance par rapport à l'objet ;

    une section de détection d'état d'obturateur électronique qui détecte un état d'un obturateur électronique dans la section (12) de capture d'image ; et

    une section de détection de valeur de diaphragme qui détecte une valeur de diaphragme pour ajuster une quantité de lumière de la lumière d'éclairage provenant d'un appareil (4) de source de lumière,

    dans lequel la section d'estimation de distance estime la distance par rapport à l'objet sur la base d'au moins l'un parmi l'état de l'obturateur électronique et la valeur de diaphragme.


     
    6. Appareil d'endoscope (1) selon la revendication 1, comprenant une section de détection de mouvement qui détecte un mouvement de l'objet dans l'image, dans lequel la section (40) de détermination d'état de focalisation détermine la répartition de signaux des signaux de composante de contour (CES), sur la base du mouvement détecté de l'objet.
     




    Drawing









































    Cited references

    REFERENCES CITED IN THE DESCRIPTION



    This list of references cited by the applicant is for the reader's convenience only. It does not form part of the European patent document. Even though great care has been taken in compiling the references, errors or omissions cannot be excluded and the EPO disclaims all liability in this regard.

    Patent documents cited in the description