Endoscope processor, storage medium, and control method of focusing lens
By combining the autofocus mode in the endoscopic processor and close to the judgment mode, the location information and image changes of the focusing lens are used to determine whether it has changed from the screening state to a close state, solving the unnecessary unnecessary caused by the misjudgment caused by the misjudgment in the existing technology. Automatic focusing has improved diagnostic efficiency.
Patent Information
- Application Number
- CN202211093270.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-09-16
- Filing Date
- 2022-09-08
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2042-09-08
AI Technical Summary
The existing endoscopic technology is easily misjudged as close in the screening state, resulting in unnecessary autofocus, increasing user pressure and affecting diagnostic efficiency.
By the combination of automatic focus mode and close to the judgment mode in the endoscopic processor, using the location information and image changes of the focusing lens, determine whether to determine whether to screen from the image range of the valid image range below 1 % below 1 %. The state transitions to the state to avoid unnecessary autofocus.
Effectively suppress misjudgment, prevent unnecessary automatic focusing in the screening state, reduce user pressure, and improve diagnostic efficiency.
Smart Images

Figure CN115834999B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an endoscope processor for acquiring an image by moving a focus lens of an endoscope by a moving mechanism, a storage medium storing a program for controlling the endoscope, and a control method for the focus lens. Background Art
[0002] When the image sensor is made high-pixel and the size of one pixel is reduced, the depth of field becomes shallower. In endoscopes, the image sensor is also becoming high-pixel, and sometimes the position of the subject in the image is outside the depth of field. In order to cope with this situation, an endoscope with an autofocus function has been proposed.
[0003] When observing a subject using an endoscope, there are roughly two observation scenes.
[0004] One observation scene is a screening observation scene for observing subjects in a large range of distances from far view to near view to find lesions. In the screening state, it is preferred to fix the position of the focusing lens at the far point end so that the focus is in the largest possible distance range from far view to near view.
[0005] Another observation scene is an observation scene in an approach state in which the distal end of the insertion portion of the endoscope is brought close to the lesion in order to diagnose the lesion found in the screening state in more detail. In the approach state, it is preferred that the auto focus is operated so that the lesion is continuously focused.
[0006] When the autofocus is operated in the screening state, the distance range to the focused subject portion changes, so it is sometimes difficult to find the lesion, which sometimes causes stress to the user. Therefore, a technology for preventing unnecessary autofocus has been proposed in the past.
[0007] For example, Japanese Patent No. 6177387 discloses the following technology: based on the change in contrast value with respect to time, it is determined whether the observation state is a screening observation state or a proximity magnification observation state, and when it is determined to be in the proximity magnification observation state, it is automatically switched to autofocus control and the autofocus control is started.
[0008] However, in Japanese Patent No. 6177387, the observation state is determined based on the change in contrast value caused by the movement of the endoscope when the user manually moves the endoscope. Therefore, there is a risk that the image may be mistakenly determined to have changed to the approach state when the contrast value accidentally changes during translation relative to the object or when the user moves the endoscope violently, resulting in a blurred image. Summary of the invention
[0009] The present invention has been made in view of the above circumstances, and an object of the present invention is to provide an endoscope processor, a storage medium, and a control method for a focus lens that can suppress erroneous determination and prevent unnecessary autofocusing in a screening state.
[0010] An endoscope processor according to one embodiment of the present invention is connectable to an endoscope and comprises a processor, wherein the endoscope comprises: an objective optical system including a focusing lens for forming an optical image of a subject; a moving mechanism for moving the focusing lens; and a camera for capturing the optical image to acquire an image, wherein the processor is configured to control the moving mechanism in one of an autofocus mode and a proximity determination mode, wherein the autofocus mode is a mode for automatically focusing on the subject, and the proximity determination mode is a mode for determining whether a state has changed from a screening state to a proximity state, wherein the proximity determination mode is executed while the autofocus mode is off, wherein in the proximity determination mode, when a change in image height of an effective image range caused by control of the moving mechanism is less than 1%, it is determined whether a state has changed from the screening state to the proximity state based on position information of the focusing lens and a change in the image, and when it is determined that a state has changed to the proximity state, the proximity determination mode is terminated and the moving mechanism is controlled in the autofocus mode.
[0011] A storage medium according to one embodiment of the present invention is a computer-readable storage medium storing a program, wherein the program causes a computer controlling an endoscope to perform the following actions: controlling a moving mechanism for moving a focusing lens included in an objective optical system of the endoscope in a mode selected from either an autofocus mode and a proximity determination mode, wherein the autofocus mode is a mode for automatically focusing on a subject, and the proximity determination mode is a mode for determining whether a state has changed from a screening state to a proximity state; the proximity determination mode is executed while the autofocus mode is off; in the proximity determination mode, when a change in image height within an effective image range is less than 1%, determining whether a state has changed from the screening state to the proximity state based on position information of the focusing lens and changes in an image acquired by an imaging device provided in the endoscope is determined; and when it is determined that a state has changed to the proximity state, the proximity determination mode is terminated and the moving mechanism is controlled in the autofocus mode.
[0012] A method for controlling a focusing lens according to one embodiment of the present invention is as follows: acquiring an image from an endoscope, acquiring position information of the focusing lens of the endoscope, and in the process of controlling a moving mechanism of the focusing lens of the endoscope in a proximity determination mode, when a variation in image height within an effective image range is less than 1%, determining whether a transition from a screening state to a proximity state has occurred based on the position information of the focusing lens and the change in the image, and when it is determined that a transition has occurred to the proximity state, terminating the proximity determination mode and controlling the moving mechanism in an autofocus mode. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 It is a block diagram showing the structural configuration and functional configuration of the endoscope system according to the first embodiment of the present invention.
[0014] Figure 2 This is a block diagram showing an example of the hardware configuration of the endoscope processor according to the first embodiment.
[0015] Figure 3 This is a timing chart showing an example of a process in which the focus lens controller causes the moving mechanism to move the focus lens based on the control of the system controller in the first embodiment.
[0016] Figure 4 This is a graph for explaining the image height of the effective image range in the first embodiment.
[0017] Figure 5 This is a timing chart showing an example in which the focus lens is reciprocated once from the far-point end to the quasi-far-point end in the first embodiment.
[0018] Figure 6 This is a graph showing an example of the contrast difference between the far-point end image and the quasi-far-point end image according to the distance to the subject in the first embodiment.
[0019] Figure 7 It is a block diagram showing the structural configuration and functional configuration of an endoscope system according to a modified example of the first embodiment.
[0020] Figure 8 It is a block diagram showing the structural configuration and functional configuration of an endoscope system according to a second embodiment of the present invention.
[0021] Fig. 9 This is a graph showing an example of the magnitude relationship between the contrast difference of the first image and the contrast difference of the second image due to the reciprocating motion of the focus lens in the endoscope system according to the second embodiment.
[0022] Fig.10This is a graph showing an example of using the difference between the contrast differences for determination when the contrast difference between the first image and the contrast difference between the second image changes due to the reciprocating motion of the focus lens in the endoscope system of the second embodiment.
[0023] Fig.11 It is a block diagram showing the structural configuration and functional configuration of an endoscope system according to a third embodiment of the present invention.
[0024] Fig.12 This is a flowchart showing the operation of the endoscope system according to the third embodiment. DETAILED DESCRIPTION
[0025] Hereinafter, embodiments of the present invention will be described with reference to the drawings. However, the present invention is not limited to the embodiments described below.
[0026] [First embodiment]
[0027] Figures 1 to 6 A first embodiment of the present invention is shown. Figure 1 1 is a block diagram showing the structural structure and functional structure of the endoscope system of the first embodiment. Figure 1 (and the following Figure 8 and Fig.11 Similarly, in FIG. 1 , the solid arrows mainly represent the flow of image signals, and the dotted arrows mainly represent the flow of control signals.
[0028] The endoscope system includes an endoscope 10 , a light source device 20 , an endoscope processor 30 , an external interface (external I / F) 40 , and a monitor 50 .
[0029] The endoscope 10 includes an insertion portion 10a to be inserted into a subject. Here, the subject to be inserted into the insertion portion 10a may be a living being such as a human or an animal, or may be a non-living being such as a machine or a building.
[0030] The endoscope 10 is configured as an electronic endoscope, and an objective optical system 11 , an imaging element 12 , a moving mechanism 13 , and an illumination lens 14 are provided at a distal end portion of an insertion portion 10 a .
[0031] The objective optical system 11 forms an optical image of a subject in the subject on the imaging element 12. The objective optical system 11 includes a focusing lens 11a, and a position P of the focusing lens 11a can be moved along the optical axis of the objective optical system 11. When the position P of the focusing lens 11a is moved, the in-focus portion of the subject (the portion of the subject that is in focus) in the optical image formed on the imaging element 12 changes.
[0032] The subject in the present invention refers to the part that the user wants to observe. For example, in the screening mode, the entire organ becomes the subject. In the close observation mode, the part suspected of lesions such as polyps, inflammation, tumors, angiogenesis, mucosal deformation, and parts with different local colors become the subject.
[0033] The imaging element 12 constitutes an imaging device, and has pixels for converting incident light into electrical signals arranged in a two-dimensional manner. The imaging element 12 captures an optical image formed by the focusing lens 11a to obtain an image, and outputs it as an analog imaging signal, for example. The imaging element 12 captures images in units of frames, for example, and sequentially outputs imaging signals related to images of multiple frames in a time series.
[0034] As examples of the imaging element 12, solid-state imaging elements such as CMOS (Complementary Metal-Oxide Semiconductor) image sensors and CCD (Charge Coupled Device) image sensors can be listed, but they are not limited to specific structures. In addition, the imaging element 12 can be any one of a color imaging element and a monochrome imaging element. In the case where the imaging element 12 is a color imaging element, it can have any one of a primary color filter, a complementary color filter, etc., and the color filter array can be either a Bayer array or other color filter arrays. In addition, the imaging element 12 can also be an imaging element of an image plane phase difference AF (Automatic Focus) method, which has phase difference pixels that receive light from the objective optical system 11 after pupil division. An example of an imaging element 12 being an image plane phase difference AF method will be described later.
[0035] The moving mechanism 13 is a mechanism for moving the focus lens 11a along the optical axis of the objective optical system 11. The moving mechanism 13 includes, for example, an actuator as a driving source.
[0036] The illumination lens 14 irradiates the subject with illumination light transmitted through a light guide 15 to be described later.
[0037] A light guide 15 is disposed in the endoscope 10 including the insertion portion 10 a. The emission end of the light guide 15 faces the illumination lens 14 , and the incident end of the light guide 15 is connected to the light source device 20 .
[0038] The light source device 20 includes a light source controller 21 and a light source 22 .
[0039] The light source controller 21 controls the light amount of the light source 22 according to the control of the system controller 36 described later in the endoscope processor 30. The light source controller 21 may control the light amount of the light source 22 by using a control method such as, for example, control of the emission brightness or control of the duty ratio in PWM (Pulse Width Modulation).
[0040] The light source 22 emits illumination light through a light emitting device. The light source 22 may include, for example, one or more light emitting devices such as an LED (Light Emitting Diode) light source, a laser light source, and a xenon light source. However, the light emitting device is not limited to the examples listed here, and known technologies may be used as appropriate.
[0041] The illumination light emitted from the light source 22 enters the incident end of the light guide 15. The light guide 15 transmits the illumination light incident from the incident end to the emission end. The transmitted illumination light is emitted from the emission end of the light guide 15 and is irradiated toward the subject by the illumination lens 14.
[0042] The endoscope processor 30 performs image processing on an imaging signal acquired by the imaging element 12 of the endoscope 10. In addition, the endoscope processor 30 may control the entire endoscope system including a monitor and the like instead of controlling only the endoscope.
[0043] The endoscope processor 30 includes a pre-processing device 31 including an AD (analog-digital) converter 32 and an image processing device 33 , an approach state determiner 34 , a focus lens controller 35 , and a system controller 36 as hardware.
[0044] exist Figure 1 The functional structure of each hardware of the endoscope processor 30 is shown in the block diagram of Figure 2 This is a block diagram showing an example of the configuration when the endoscope processor 30 according to the first embodiment is viewed in units of structure.
[0045] like Figure 2 As shown, the endoscope processor 30 includes a processor 30a and a memory 30b. The processor 30a includes, for example, an ASIC (Application Specific Integrated Circuit) including a CPU (Central Processing Unit), an FPGA (Field Programmable Gate Array), or the like.
[0046] The memory 30b includes, for example, a volatile storage medium such as a RAM (Random Access Memory), and a nonvolatile storage medium such as a ROM (Read Only Memory) (or an EEPROM (Electrically Erasable Programmable Read-Only Memory)). The RAM temporarily stores various information such as an image to be processed, processing parameters during execution, and user setting values input from the external I / F 40. The ROM nonvolatilely stores various information such as a processing program (computer program), specified values of processing parameters, and user setting values that should be stored even when the power of the endoscope system is turned off.
[0047] By Figure 2 The processor 30a shown reads and executes the processing program stored in the memory 30b to implement the following Figure 1 The various functions of the endoscope processor 30 are shown. However, all or part of the various functions of the endoscope processor 30 may be realized by a dedicated electronic circuit.
[0048] In addition, here, an example in which the processing program is stored in the memory 30b is described, but the processing program (or at least a part of the processing program) may also be stored in a portable storage medium such as a floppy disk or a CD (Compact Disc)-ROM, a storage medium such as a hard disk or an SSD (Solid State Drive), a storage medium on the cloud, etc. In this case, the processing program can be read from the external storage medium via the external I / F 40 and stored in the memory 30b, and the processing program can be executed by the processor 30a.
[0049] The AD converter 32 converts the analog imaging signal output from the imaging element 12 into a digital image and outputs the digital image to the image processing device 33. If the imaging element 12 is a digital imaging element that outputs a digital imaging signal, the AD converter 32 may be omitted.
[0050] The image processing device 33 performs various image processing such as white balance processing, demosaicing (synchronization) processing, noise reduction processing, color conversion processing, grayscale conversion processing, or edge enhancement processing on the images sequentially outputted in units of frames from the AD converter 32. The image processed by the image processing device 33 is outputted to the approach state determiner 34 and the monitor 50. The image is also outputted to the focus lens controller 35 via the approach state determiner 34, for example (however, the focus lens controller 35 may also directly obtain the image from the pre-processing device 31).
[0051] In addition, an example in which the image processing device 33 outputs an image that has undergone a series of image processing to the proximity state determiner 34 is described here, but the present invention is not limited to this. That is, the proximity state determiner 34 performs determinations related to auto focus (AF) control, and thus requires real-time performance. Therefore, the image output from the image processing device 33 to the proximity state determiner 34 may be any of an image that has undergone only AD conversion (RAW image), an image that has undergone demosaicing in addition to AD conversion, and an image in which some of the multiple image processing processes are omitted.
[0052] In addition, the image output from the image processing device 33 to the approach state determiner 34 and the focus lens controller 35 may not be the entire image. For example, the system controller 36 as a control device functions as an area setting unit to set an AF area (also serving as a determination area used by the approach state determiner 34 to determine whether the image has entered the approach state) for at least a part of the image acquired by the imaging element 12.
[0053] The system controller 36 may set the AF area to the center of the image, to the peripheral part of the image, or to set a plurality of AF areas. The system controller 36 may also arbitrarily set the AF area based on input from the external I / F 40 in accordance with, for example, a user operation.
[0054] Alternatively, the system controller 36 may detect a specific subject or a portion of the subject (e.g., a lesion) in the image, and move the AF area by tracking the movement of the specific subject or the portion of the subject. Alternatively, the system controller 36 may detect an area in the image that is likely to be focused on by the user (e.g., an appropriately exposed area), and set the area as the AF area.
[0055] The approach state determiner 34 determines whether the state in which the front end of the insertion portion 10a of the endoscope 10 is not close to the subject (screening state) has changed to the state in which the front end is close to the subject (approach state) based on the information of the position P of the focusing lens 11a and the image output from the image processing device 33. The front end mentioned here refers to a specified area including the objective optical system 11. When it is determined that the state has changed to the approach state, the approach state determiner 34 outputs an AF start signal to the focusing lens controller 35.
[0056] The focus lens controller 35 sends a control command to the moving mechanism 13 to cause the moving mechanism 13 to move the focus lens 11a. The focus lens controller 35 controls the moving mechanism 13 in one of the control modes of an AF (auto focus) mode (AF control mode) for automatically focusing on a subject and a proximity determination mode (proximity determination control mode) for determining whether a transition to a proximity state has occurred, thereby moving the focus lens 11a.
[0057] Here, in the observation of a subject with an endoscope, there are roughly two observation scenes.
[0058] One observation scene is the observation scene in the screening state. The observation scene in the screening state is a scene for observing a subject in a large distance range from a distant view to a near view to find a lesion. Figure 3 and Figure 5 ) or near the telephoto end, the focus is focused in a large distance range from the distant view to the near view (that is, the depth of field is as deep as possible), so it is ideal as a screening state. When the position P of the focusing lens 11a is fixed at the telephoto end Pf, the depth of field is the deepest.
[0059] Furthermore, when the auto focus is operated in the screening state, the distance range to the portion of the subject that has been in focus changes, so that sometimes a portion where a lesion is difficult to find occurs. In addition, since the portion of the subject that has been in focus changes, sometimes it causes stress to the user. Therefore, the focus lens controller 35 performs control based on the proximity determination mode in a manner that the auto focus is basically not operated in the screening state.
[0060] Another observation scene is an observation scene in a close state. When a lesion is found in the screening state, the front end of the insertion portion 10a is brought close to the lesion in order to diagnose the found lesion in more detail. The state in which the front end of the insertion portion 10a is closer to the subject than in the screening state is the close state. If the position P of the focusing lens 11a is still fixed at the far end Pf to approach the lesion in the screening state, the lesion to be observed will be out of the depth of field range. Therefore, the focusing lens controller 35 performs control based on the AF mode in the close state by automatically focusing on the lesion.
[0061] The AF mode (AF control mode) is a mode in which AF control is performed to automatically move the focus lens 11a so that the focus on the subject is continuously maintained even if the distance from the front end of the insertion portion 10a to the subject changes. The AF control performed by the focus lens controller 35 can be performed by any AF control method among contrast AF, phase difference AF, and other AF control methods, and is not limited to a specific method.
[0062] Contrast AF is performed by the focus lens controller 35 acquiring a plurality of frames of images while changing the position of the focus lens 11 a , extracting contrast components from the images as is well known, and moving the focus lens 11 a to a position where the contrast components have a maximum value.
[0063] In addition, when the imaging element 12 is, for example, an imaging element of an image plane phase difference AF method, phase difference AF is performed based on phase difference information acquired from phase difference pixels of the imaging element 12. If an imaging element 12 of an image plane phase difference AF method is used, a phase difference AF sensor or the like provided separately from the imaging element 12 is not required, so there is an advantage that the endoscope 10 does not become larger.
[0064] As described above, in the screening state, the autofocus is basically not operated, but it is necessary to determine whether the observation scene has changed from the screening state to the approach state. Therefore, in the approach determination mode (approach state determination control mode), the focus lens controller 35 controls to slightly change the position P of the focus lens 11a to a degree that does not hinder the observation of the user who is performing the screening (that is, to a degree that the distance range to the focused subject portion does not change almost), and determines whether the state has changed to the approach state based on the image obtained after the position P is changed. The processing in the approach determination mode will be described in more detail later.
[0065] When receiving the AF start signal from the proximity state determiner 34 during control in the proximity determination mode, the focus lens controller 35 ends the proximity determination mode and performs control in the AF mode. When performing control in the AF mode, the moving mechanism 13 performs AF control on the focus lens 11a.
[0066] In addition, when the focusing lens controller 35 receives an AF end signal during control in the AF mode, it ends the AF mode and controls in the proximity determination mode. Here, in the present embodiment, it is set to output the AF end signal when the proximity state determiner 34 determines that it is no longer in the proximity state (has changed to the screening state) (therefore, in the present embodiment, it can be said that the proximity state determiner 34 also serves as the screening state determiner 37 as described in the third embodiment described later). However, as described in the third embodiment, a screening state determiner 37 that outputs the AF end signal when it is determined that the proximity state has changed to the screening state can be provided separately from the proximity state determiner 34.
[0067] The system controller 36 is a control device that receives an input signal from the external I / F 40 and controls the entire endoscope system including the imaging element 12, the image processing device 33, the focus lens controller 35, and the light source controller 21. The system controller 36 outputs a control signal to the imaging element 12 so that the imaging element 12 acquires an image. The system controller 36 outputs a control signal based on various processing parameters required for image processing to the image processing device 33 so that the image processing device 33 processes the image acquired from the imaging element 12. The system controller 36 receives an image from the image processing device 33 and sends a control signal to the light source controller 21 so that the brightness of the subject becomes appropriate.
[0068] The external I / F 40 is an interface for inputting to the endoscope system by user operation. The external I / F 40 may include operation devices such as a keyboard, a mouse, and a trackball connected to the endoscope processor 30. In addition, the external I / F 40 may also include a connection interface for connecting to an in-hospital system or the cloud.
[0069] The external I / F 40 includes, for example, a setting button for setting an AF mode / approach determination mode, a setting button for setting processing parameters used when image processing is performed by the image processing device 33, etc. In addition, at least a part of the setting buttons described as being included in the external I / F 40 may be provided in the endoscope processor 30 itself, or may be provided in an operation portion connected to the base end side of the insertion portion 10a of the endoscope 10.
[0070] The monitor 50 displays images sequentially output from the endoscope processor 30. The images are displayed in time series, for example, in units of frames, and are thus observed as moving images. In addition, the images output from the endoscope processor 30 may be images processed by the image processing device 33 and various information such as character information and guidance information for guiding the operation of the endoscope 10 may be superimposed on the images.
[0071] The system controller 36 also sends a control signal corresponding to the proximity determination mode or the AF mode to the focus lens controller 35 , so that the focus lens controller 35 controls the moving mechanism 13 .
[0072] In the AF mode, the system controller 36 causes the focus lens controller 35 to control the moving mechanism 13 so that the subject portion within the AF area is continuously focused.
[0073] Furthermore, in the approach determination mode, the system controller 36 causes the focus lens controller 35 to control the moving mechanism 13 so that the position P of the focus lens 11 a is substantially at the far-point end Pf.
[0074] As described above, in the approach determination mode, in order to determine whether the state has changed from the screening state to the approach state, the system controller 36 causes the focus lens controller 35 to control the moving mechanism 13 in such a way that the position P of the focus lens 11a slightly changes relative to the far point end Pf.
[0075] Figure 3 This is a timing chart showing an example of a process in which the focus lens controller 35 causes the moving mechanism 13 to move the focus lens 11 a based on the control of the system controller 36 in the first embodiment.
[0076] like Figure 3 As shown in FIG. 1 , in the proximity determination mode executed in the screening state, the position P of the focus lens 11a is basically fixed at the far-point end Pf. However, in the proximity determination mode, the focus lens controller 35 periodically or non-periodically performs a reciprocating action of moving the focus lens 11a from the far-point end Pf to the near-point side by a small amplitude A and then returning to the far-point end Pf. Hereinafter, the position P (different from the far-point end) where the focus lens 11a moves from the far-point end Pf to the near-point side by the amplitude A is referred to as the quasi-far-point end Pqf.
[0077] Here, the amplitude A is an amplitude that slightly changes the position P of the focus lens 11a to such an extent that the distance range to the focused subject portion hardly changes as described above. Since the focused subject portion hardly changes even when the amplitude A is reciprocated, it does not hinder the observation of the user who is performing screening.
[0078] When the focus lens 11a moves to the quasi-telephoto end Pqf, the image sensor 12 acquires at least one frame of image. Here, in order to shorten the time that the focus lens 11a is at the quasi-telephoto end Pqf and further reduce the user's discomfort, it is preferred that the image acquired by the image sensor 12 at the quasi-telephoto end Pqf during each reciprocating motion is, for example, one frame.
[0079] Figure 3 2 shows an example in which a reciprocating motion with an amplitude A is performed N times (N=2 in the example shown in the figure) per period T.
[0080] exist Figure 3 In the example, at the beginning of the cycle T along the time t, the focusing lens 11a is moved to the quasi-far end Pqf to acquire an image of one frame. After acquiring the image, the focusing lens 11a is immediately returned to the far end Pf to acquire the image of the next frame. Next, the focusing lens 11a is moved to the quasi-far end Pqf to acquire an image of one frame, and the focusing lens 11a is immediately returned to the far end Pf. Thereafter, for example, multiple images are continuously acquired in units of frames at the far end Pf until the cycle T ends.
[0081] In the approach determination mode, the focus lens controller 35 moves the focus lens 11a to a degree that does not hinder the viewing of the screen, preferably to a degree that the user cannot perceive. The movement amount of the focus lens 11a is preferably such that the image height h (refer to Figure 4 The effective image range EIA in the present invention refers to the range of the image displayed by the monitor 50.
[0082] Figure 4 : is a graph for explaining the image height h of the effective image area EIA in the first embodiment. Figure 4 Column A of the diagram represents the stereogram, and column B represents the plane that includes the image height h and is perpendicular to the effective image area EIA. Figure 4 As shown, the image height h can be calculated using Formula 1 from half the field angle θ and the focal length f.
[0083] [Formula 1]
[0084] h=f×tanθ
[0085] The direction of moving the focusing lens 11a is at least one direction, preferably moving in the approaching direction, more preferably moving in the approaching direction and then moving towards the far point, and further preferably reciprocating movement. Figure 3 The focusing lens 11a shown performs a periodic reciprocating motion.
[0086] By setting the number of reciprocating actions N=2 in this way and acquiring a plurality of images at the quasi-far end Pqf, the measurement error can be reduced compared to the case where N=1, and the user's sense of discomfort can be reduced compared to the case where N≥3. However, the user's sense of discomfort can be further reduced by setting N=1. In addition, the transition to the approaching state can be detected with higher accuracy by setting N≥3.
[0087] Furthermore, when the focusing lens 11a is reciprocated periodically, the period T may be made short so that the transition to the approaching state can be detected at a time interval of as few frames as possible (that is, in a state as close to real time as possible). Alternatively, the amplitude A may be made as large as possible within a range that does not cause a sense of discomfort to the user so that the transition to the approaching state can be detected with higher accuracy.
[0088] On the other hand, when the reciprocating operation of the focus lens 11 a is performed aperiodically, for example, the focus lens 11 a may be reciprocated at random timings in units of frame periods.
[0089] In addition, the reciprocating motion of the focusing lens 11a may be performed when it is detected that the acquired image is an image of a specific scene, and the reciprocating motion of the focusing lens 11a may not be performed when the image of the specific scene is not detected, thereby realizing non-periodic reciprocating motion. Here, an example of a specific scene is a scene with a high probability of being in a proximity state. For example, the detection of a specific scene may be performed by AI (Artificial Intelligence) that performs deep learning on images in a proximity state. In addition, the detection of a specific scene may be performed based on changes in brightness of multiple images acquired in a time series and / or motion vectors detected from the images (refer to the description of the third embodiment described later).
[0090] The starting point when the focus lens 11a is moved toward the approach direction or the end point when the focus lens 11a is moved toward the far point is preferably within a predetermined range from the far point end, and more preferably at the far point end.
[0091] Next, refer to Figure 5 and Figure 6 A method of determining whether or not the state has changed from the screening state to the approach state by reciprocating the focusing lens 11a will be described. Figure 5 This is a timing chart showing an example in which the focus lens 11 a is reciprocated once between the far-point end Pf and the quasi-far-point end Pqf in the first embodiment. Figure 6 3 is a graph showing an example of the contrast difference C between the far-point end image and the quasi-far-point end image according to the distance d to the subject in the first embodiment.
[0092] exist Figure 5 In the example, it is assumed that there is a time difference of one frame period between time t1 and time t2, and there is also a time difference of one frame period between time t2 and time t3.
[0093] When the focusing lens 11a is at the far end Pf at time t1, a far end image (Pf: t1) is acquired, when the focusing lens 11a is at the quasi-far end Pqf at time t2, a quasi-far end image (Pqf: t2) is acquired, and when the focusing lens 11a is at the far end Pf at time t3, a far end image (Pf: t3) is acquired. That is, the far end image (Pf: t1), the quasi-far end image (Pqf: t2), and the far end image (Pf: t3) are a plurality of images that are continuous in time and have different focus positions when the focusing lens 11a is reciprocated.
[0094] The proximity state determiner 34 determines whether the state has been changed to the proximity state based on the change of the image when the focus position is changed. More specifically, the proximity state determiner 34 calculates the image information of multiple images with different focus positions. For example, the proximity state determiner 34 calculates the contrast of the far point end image (Pf: t1) and the quasi-far point end image (Pqf: t2) as image information. More specifically, the proximity state determiner 34 calculates the contrast value of each pixel in the AF area which is the area for calculating the image information, and then calculates the contrast value in the AF area, for example, as the average (or sum, etc.). The contrast value of each image is described below as if the contrast value of the image refers to the average (or sum) of the contrast values in the AF area in the image.
[0095] In addition, using the average or the sum has the following advantages: the amount of calculation is reduced, and the increase in cost due to the large buffer size is suppressed. On the other hand, when the contrast values of each pixel in the AF area are compared for a plurality of images with different focus positions that are continuous in time, there is an advantage that precise calculation can be performed, and the latter can also be adopted in the present invention.
[0096] Here, the image portion within the depth of field is in focus, and the image portion outside the depth of field is blurred, and the contrast value of the image is high at the focused portion and low at the blurred portion.
[0097] For example, the image portion in the center of the depth of field in the telephoto end image (Pf: t1) is also in the depth of field in the quasi-telephoto end image (Pqf: t2) in which the position P of the focusing lens 11a is slightly changed, and is in focus in any image. Therefore, the difference in contrast value (abbreviated as "contrast difference") between the telephoto end image (Pf: t1) and the quasi-telephoto end image (Pqf: t2) is almost non-existent.
[0098] In addition, the image portion that is significantly out of the depth of field in the far-point end image (Pf: t1) is also significantly out of the depth of field in the quasi-telephoto end image (Pqf: t2), and is severely blurred in both images. Therefore, the contrast difference between the far-point end image (Pf: t1) and the quasi-telephoto end image (Pqf: t2) is small.
[0099] On the other hand, the depth of field indicating the distance range to the focused subject portion includes the depth end on the far point side and the depth end on the near point side. For example, near the outside of the depth end on the near point side of the depth of field, it is in a "blurred state" in the far point image (Pf: t1) and changes to a "focused state" in the quasi-far point image (Pqf: t2). In addition, near the outside of the depth end on the far point side of the depth of field, it is in a "focused state" in the far point image (Pf: t1) and changes to a "blurred state" in the quasi-far point image (Pqf: t2). Therefore, compared with the central portion of the depth of field and the portion greatly deviated from the depth of field, the contrast difference between the far point image (Pf: t1) and the quasi-far point image (Pqf: t2) is larger at the depth end of the depth of field.
[0100] Figure 6 The case where the contrast difference C changes corresponding to the distance d to the subject is shown.
[0101] The contrast difference C is calculated, for example, as the absolute value of the value obtained by subtracting the contrast value of the far point image (Pf: t1) from the contrast value of the quasi-far point image (Pqf: t2).
[0102] Furthermore, the reason for calculating the absolute value here is to avoid the complication caused by the following situation: the sign changes depending on whether the depth end is the depth end on the far point side or the near point side, and which of the quasi-far point image (Pqf: t2) and the far point image (Pf: t1) is subtracted from which. However, if the cases are divided according to the sign, the absolute value may not be taken. If the cases are divided, sometimes not only the maximum value described later (refer to Figure 6 ) is considered, but also the minimum value is considered.
[0103] In Figure 6 the example shown, when the distance d to the subject is within the range of d1 or more and d3 or less, the contrast difference C is equal to or greater than the threshold value Th, and the contrast difference C takes the maximum value when the distance d is d2 (d1 < d2 < d3).
[0104] When the contrast difference C is, for example, equal to or greater than the threshold value Th, it can be determined that the AF area has changed from within the depth of field (the contrast of the AF area is relatively high) to outside the depth of field (the contrast of the AF area is relatively low) (or has changed from outside the depth of field to within the depth of field) (that is, the value of the threshold Th is set in such a way that this determination can be made).
[0105] When the contrast difference C is, for example, equal to or greater than the threshold value Th, the proximity state determiner 34 determines that the state has changed from the screening state in which the focusing lens 11a is fixed at the far point Pf to search for and observe a lesion or the like to the proximity state of approaching a specific lesion or the like for observation.
[0106] In addition, in the above content, the contrast value of the far point end image (Pf: t1) is compared with the contrast value of the quasi-far point end image (Pqf: t2) to calculate the contrast difference C, but instead, the contrast value of the quasi-far point end image (Pqf: t2) may be compared with the contrast value of the far point end image (Pf: t3) to calculate the contrast difference C.
[0107] Alternatively, if the contrast value of the far point end image (Pf: t1) is compared with the contrast value of the far point end image (Pf: t3) and the average of the contrast values of the far point end image (Pqf: t2) to calculate the contrast difference C, the temporal correlation is higher and the accuracy of the judgment is improved.
[0108] Furthermore, in the above description, the change in contrast value is obtained as a contrast difference, but the change in contrast value may be obtained as a contrast value ratio (abbreviated as "contrast ratio") instead. The contrast ratio may be any of the ratio of the contrast value of the far-point end image (Pf: t1) to the contrast value of the quasi-far-point end image (Pqf: t2), the ratio of the contrast value of the far-point end image (Pf: t3) to the contrast value of the quasi-far-point end image (Pqf: t2), and the ratio of the average of the contrast value of the far-point end image (Pf: t1) and the contrast value of the far-point end image (Pf: t3) to the contrast value of the quasi-far-point end image (Pqf: t2).
[0109] In addition, in the above content, the example of fixing the position P of the focus lens 11a at the far end Pf in the screening state to make the depth of field the deepest is described as a preferred example, but it is not limited to this. For example, in the screening state, the focus lens controller 35 may perform the following processing: based on fixing the position P of the focus lens 11a at a specific position (which may also be a position other than the far end Pf), the position P of the focus lens 11a is slightly offset from the specific position. Then, the approach state determiner 34 determines whether the state has changed from the screening state to the approach state based on multiple images with different focus positions acquired at each position.
[0110] Furthermore, instead of using contrast as the image information used in determination by the proximity state determiner 34 , the image information used in determination by the proximity state determiner 34 may be phase difference information acquired from phase difference pixels.
[0111] When the phase difference information obtained from the phase difference pixels is used, the distance to the subject can be obtained. When the subject is not in focus, the phase difference is large, and the distance measurement accuracy is improved when the phase difference is large.
[0112] When the focusing lens 11a is reciprocated to acquire images at different focus positions (for example, a far point end image and a quasi-far point end image), the quasi-far point end image at the depth end of the far point side of the depth of field deviates from the focus to a greater extent, resulting in a larger phase difference, thereby improving the ranging accuracy. Therefore, the proximity state determiner 34 may compare the distance calculated based on the phase difference information acquired from the phase difference pixels of the quasi-far point end image with a threshold value, and when the distance changes from a state greater than the threshold value to a state less than the threshold value, it is determined that the screening state has changed to the proximity state. In addition, as shown in the modified example described later, the reliability determiner 38 (see Figure 7 ) is considered in determining whether it has turned into a close state in the Mainland.
[0113] Thus, compared to when the focusing lens 11a is not reciprocating, it is possible to determine that the state has changed from the screening state to the approach state and thus change from the approach determination mode to the AF mode at the stage when the image portion at the depth end on the far point side in the far point end image is about to leave the depth of field (that is, the stage when it is about to become out of focus).
[0114] In addition, the difference or ratio of the phase difference between the images before and after the reciprocating movement of the focusing lens 11a (for example, the far point end image and the quasi-far point end image) is made larger at the depth end of the depth of field. Therefore, the approach state determiner 34 may determine that the screening state has been changed to the approach state when, for example, the difference or ratio of the phase difference between the far point end image and the quasi-far point end image changes from a state less than a threshold value to a state greater than a threshold value.
[0115] According to the first embodiment, the focusing lens 11a is slightly reciprocated in the optical axis direction in the screening state, and based on the characteristic that the image acquired at the depth end of the depth of field changes greatly, it is determined whether the positional relationship between the subject and the endoscope has changed from the screening state to the approaching state. Then, the auto focus is turned off in the screening state where the subject is within the depth, and the auto focus is turned on when the screening state is changed to the approaching state where the subject is approached, thereby preventing unnecessary auto focus in the screening state.
[0116] Furthermore, since determination is made based on a plurality of images acquired by slightly reciprocating the focus lens 11 a in the optical axis direction, a dedicated subject distance detection device or the like is not required, and an increase in size of the endoscope can be prevented.
[0117] [Modification of the first embodiment]
[0118] In the first embodiment, it is determined whether the endoscope has been in the approach state based on changes in the image such as contrast changes. However, in addition to the technology of the first embodiment, it is also possible to take into account the image, the state of the endoscope, or the state of the subject, and determine whether the change in the image when the focus position is different is due to the change of the endoscope being in the approach state, or whether the change in the image when the focus position is different is due to changes in other factors and the endoscope has not actually been in the approach state.
[0119] Specifically, if Figure 7 As shown, the approach state determiner 34 may also include a reliability determiner 38 . Figure 7 It is a block diagram showing the structural configuration and functional configuration of an endoscope system according to a modified example of the first embodiment.
[0120] The reliability determiner 38 calculates the reliability based on, for example, image information. Examples of the image information include motion information, brightness information, contrast information, or color information.
[0121] By incorporating the motion amount information into the reliability determination, it is possible to prevent the following situation: although the image blur occurs due to the rapid movement of the tip of the endoscope 10 and / or the subject, it is erroneously determined that the state has been changed to the proximity determination state based on the state of the image. In this case, for example, it is set so that when the motion amount is greater than a specified value, the state is not changed to the autofocus mode. The motion amount is obtained by calculating the similarity between the image of the previous frame and the current frame and calculating to which image position the image position in the previous frame moves in the current frame.
[0122] By incorporating brightness information into the reliability determination, it is possible to prevent, for example, the following situation: the brightness becomes high due to reflection of body fluids, etc., resulting in an erroneous determination that the state has changed to the proximity determination state. In this case, for example, it is set to not change to the autofocus mode when the brightness is above a specified value.
[0123] By incorporating contrast information into the reliability determination, it is possible to prevent, for example, the following situation: when the front end of the endoscope 10 or the treatment instrument with a strong edge is captured in the image, the contrast value changes and it is erroneously determined that the state has been changed to the proximity determination state. In this case, for example, it is set so that when the contrast value of the position where the front end of the endoscope 10 or the treatment instrument is captured is greater than a predetermined value, the state is not changed to the autofocus mode.
[0124] By incorporating color information into the reliability determination, it is possible to prevent, for example, the following situation: a treatment instrument, mist, bubble, or effusion is captured in the image, or the tip of the endoscope 10 is immersed in the liquid, resulting in a change in the contrast value and an erroneous determination that the state has been changed to the proximity determination state. In this case, for example, it is set so that when the distance of the color of the image of the current frame relative to the color distribution of each of the treatment instrument, mist, bubble, or effusion in the color space is less than a specified value, the state is not changed to the autofocus mode.
[0125] The reliability determiner 38 calculates the reliability based on, for example, the light emission information. Examples of the light emission information include the light quantity, light emission period, or wavelength of the illumination light. Examples of the light emission period include the charge readout period.
[0126] When close observation is being performed, the amount of illumination light irradiated to the subject is usually reduced. Therefore, it can be set that: when the close state determiner 34 determines that it is a close state even though the light amount is greater than a specified value, it is regarded as an erroneous determination and does not switch to the autofocus state. The reliability determiner 38 obtains the light amount of illumination light emitted by the light source 22 from the light source controller 21 through the system controller 36, for example.
[0127] If the endoscope system is designed to emit light during the charge readout period, the image may be blurred and the camera may be mistakenly judged to have switched to the proximity judgment state. Therefore, if the image is judged to be in the proximity state within a specified time from the start of the charge readout (during the charge readout period), it may be regarded as a mistaken judgment and not switched to the autofocus state.
[0128] In many cases, the subject is red, so the contrast of the image obtained when the wavelength of the illumination light during field sequence emission is red tends to be low. Therefore, it can also be set that: when it is determined that the proximity state is based on the image of the illumination light wavelength during field sequence emission is red, it is regarded as a false determination and does not switch to the autofocus state.
[0129] The reliability determiner 38 calculates the reliability based on, for example, the position information of the focus lens 11a. The position information of the focus lens 11a is the difference between the specified position of the focus lens 11a sent to the moving mechanism 13 by the proximity state determiner 34 or the focus lens controller 35 and the actual position. The actual position of the focus lens 11a can be obtained from the moving mechanism 13 or the focus lens controller 35.
[0130] The reliability determiner 38 may include AI, or may be configured to be capable of calculating the reliability based on the above-mentioned image information through machine learning.
[0131] [Second embodiment]
[0132] Figures 8 to 10 A second embodiment of the present invention is shown. Figure 8 This is a block diagram showing the structural and functional configurations of an endoscope system according to a second embodiment. In this second embodiment, the same reference numerals are used for the same parts as those of the first embodiment and its modified example, and descriptions thereof are omitted as appropriate, with only differences being mainly described.
[0133] The endoscope system of this embodiment adopts EDOF (Extended Depth Of Field) technology. In EDOF, a split optical system 16 is used to split the light beam from the objective optical system 11 into multiple (for example, 2) light beams, so that the optical path lengths of the multiple light beams are different to form multiple optical images. The multiple optical images formed are simultaneously photographed by the imaging element 12, thereby obtaining multiple images with different focus positions, and by synthesizing the focused parts of the multiple images, a composite image with an enlarged depth of field is generated.
[0134] Specifically, the endoscope 10 of the present embodiment further includes a split optical system 16. The split optical system 16 is disposed between the objective optical system 11 and the imaging element 12, for example.
[0135] As an example, the split optical system 16 includes a half mirror 16a and a reflective mirror 16b. A portion of the light beam emitted from the objective optical system 11 passes through the half mirror 16a, and the other portion is reflected by the half mirror 16a. The light beam reflected by the half mirror 16a is further reflected by the reflective mirror 16b toward the imaging element 12.
[0136] The light beam passing through the half mirror 16a forms an image on a part of the imaging element 12, and the light beam reflected by the reflective mirror 16b forms an image on another part of the imaging element 12. With the above-mentioned structure, the optical path length of the optical image formed on a part of the imaging element 12 is different from the optical path length of the optical image formed on another part of the imaging element 12.
[0137] The imaging element 12 simultaneously captures an optical image formed in one part and an optical image formed in another part to obtain a plurality of images. The focus positions of the plurality of images obtained here are different.
[0138] also, Figure 8 The structure of the split optical system 16 shown in FIG. 1 is simply a model, and the actual structure of the split optical system 16 may be different from that of the split optical system 16 shown in FIG. Figure 8Different. For example, the semi-transparent and semi-reflective mirror 16a and the reflective mirror 16b can also be configured as the mirror surface of a prism. In addition, the semi-transparent and semi-reflective mirror 16a can also be configured as a polarization beam splitter surface, and can also be provided with a depolarizing plate for eliminating the deviation of the polarization direction, a wave plate for converting between linear polarized light and circular polarized light, etc. In addition, the light beam is not limited to being divided into 2, and can also be divided into 3 or more. Moreover, the divided multiple light beams can also be imaged not at different parts on the same imaging element 12, but instead be imaged separately on different multiple imaging elements.
[0139] The image processing device 33 also performs image synthesis processing to synthesize the focused portions of a plurality of images having different focus positions simultaneously acquired by the imaging element 12 , thereby generating a synthesized image having an enlarged depth of field.
[0140] In addition, in order to simplify the description, the case where the number of images acquired simultaneously is two will be described below.
[0141] The approach state determiner 34 uses, for example, two images (for example, a first image and a second image) acquired simultaneously with different focus positions to determine whether the state has changed from the screening state to the approach state. In this case, in addition to acquiring two images simultaneously without the need for the reciprocating motion of the focusing lens 11a, the processing described in the first embodiment described above is performed based on the two images, thereby making it possible to determine whether the state has changed from the screening state to the approach state.
[0142] In addition, similar to the first embodiment, the approach state determiner 34 may reciprocate the focus lens 11a to acquire two more images and determine whether the state has changed from the screening state to the approach state based on a total of four images.
[0143] In this case, the proximity state determiner 34 uses a total of four images in the determination, including two images (for example, set as image 1a and image 2a) acquired before the focusing lens 11a is shifted (or when it returns to its original position after being shifted) and two images (for example, set as image 1b and image 2b) acquired when the focusing lens 11a is shifted.
[0144] Here, of the two images simultaneously acquired by the imaging element 12, the image acquired based on the optical image with a longer optical path length from the objective optical system 11 to the imaging element 12 (near point image) is labeled "1", and the image acquired based on the optical image with a shorter optical path length (far point image) is labeled "2". In addition, the image acquired at the focus position of the far point end Pf before the focus lens 11a is shifted is labeled "a", and the image acquired at the focus position of the quasi-far point end Pqf in the shifted state is labeled "b".
[0145] When the proximity state determiner 34 uses, for example, contrast information of a total of four images obtained continuously in time and two images each, in the determination, the following characteristic is utilized: the distance at which the contrast difference between the image obtained before shifting the focusing lens 11a and the image obtained in the shifted state is equal in the near-point image and the far-point image is near the depth end of the depth of field, and it is in the proximity state.
[0146] Let the averages of the contrast values in the AF regions of the first images 1a, 1b, 2a, and 2b be represented by C1a, C1b, C2a, and C2b, respectively. At this time, the proximity state determiner 34 calculates, for example, the contrast difference C1 = (C1b - C1a) between the first image 1a and the first image 1b and the contrast difference C2 = (C2b - C2a) between the second image 2a and the second image 2b. Further, as described in the first embodiment, when calculating the contrast differences C1 and C2, the absolute values may also be calculated.
[0147] Fig. 9 It is a graph showing an example in which, in the endoscope system of the second embodiment, due to the reciprocating movement of the focusing lens 11a, the magnitude relationship between the contrast difference C1 of the first image and the contrast difference C2 of the second image is generated.
[0148] In Fig. 9 In the example shown, the contrast difference C1 takes a maximum value when the distance d to the subject is d4, the contrast difference C2 takes a maximum value when the distance d to the subject is d6 (d4 < d6), and when the distance d to the subject is d5 (d4 < d5 < d6), the magnitude relationship between the contrast difference C1 and the contrast difference C2 is reversed.
[0149] When the distance d to the subject is d5, it is near the depth end of the depth of field, and the proximity state determiner 34 determines that the state has changed from the screening state to the proximity state.
[0150] In the determination method described in the first embodiment, it is necessary to set a threshold value for the contrast difference and determine the magnitude relationship between the contrast difference and the threshold value. In contrast, in the determination method based on the magnitude relationship of the contrast differences described here, the determination result does not depend on the magnitude of the contrast at the texture of the subject or the like, so the determination accuracy can be made high.
[0151] Further, according to this determination method, as Fig. 9 shown, it is possible to determine that the state has changed to the proximity state before leaving the depth end of the depth of field, so it is possible to change from the proximity determination mode to the AF mode when the subject being observed is about to become out of focus.
[0152] Fig.10This is a graph showing an example of using the difference between the contrast differences for determination when the contrast difference C1 of the first image and the contrast difference C2 of the second image change due to the reciprocating motion of the focus lens 11 a in the endoscope system of the second embodiment.
[0153] In this case, the proximity state determiner 34 calculates the contrast difference C1=(C1b-C1a) and the contrast difference C2=(C2b-C2a), and then calculates the difference ΔC between the contrast differences=C1-C2 (in Fig.10 In the example of FIG. 1 , a difference ΔC is shown when the distance d=d7. The approach state determiner 34 sets a threshold value for ΔC, and determines that the state has shifted to the approach state when ΔC is equal to or greater than the threshold value.
[0154] Furthermore, the difference ΔC=C1-C2 between the contrast differences is calculated here, but instead, for example, the ratio C1 / C2 between the contrast differences may be calculated and compared with an appropriate threshold value.
[0155] In the present embodiment, instead of using contrast as the image information used in determination by the proximity state determiner 34 , the image information used in determination by the proximity state determiner 34 may be phase difference information acquired from phase difference pixels.
[0156] Alternatively, in the case where a plurality of images with different focus positions are simultaneously acquired after the position of the focusing lens 11a is shifted as described above, or where, for example, four images are acquired as described above, the reliability of the phase difference calculation result is calculated based on the position of the focusing lens 11a, the comparison result of the phase difference between the two images acquired after the focusing lens 11a is moved, etc., and the proximity state determiner 34 determines the situation in which the state has been transitioned to the proximity state using only the phase difference with high reliability.
[0157] Furthermore, the approach state determiner 34 may determine that the state has changed to the approach state based on the synthesized image in which the depth of field is magnified and output from the image processing device 33. In this case, for example, the approach state determiner 34 may make a determination based on the first synthesized image acquired at the far point end Pf and the second synthesized image acquired at the quasi-far point end Pqf using the method described in the first embodiment.
[0158] According to this second embodiment, substantially the same effect as the above-mentioned first embodiment is achieved, and in a structure capable of simultaneously acquiring multiple images (for example, 2 images) with different focus positions using the split optical system 16, for example, a total of 4 images are acquired by changing the position of the focusing lens 11a, and the transition to the approach state is determined based on the size relationship between the contrast differences or the difference or ratio between the contrast differences, thereby achieving high determination accuracy without depending on the size of the contrast of the subject itself.
[0159] [Third Embodiment]
[0160] Fig.11 and Fig.12 A third embodiment of the present invention is shown. Fig.11 This is a block diagram showing the structural and functional structures of an endoscope system according to a third embodiment. In this third embodiment, the same reference numerals are used for the same parts as those of the first and second embodiments (including variations of the first embodiment) and the description thereof is appropriately omitted, and only the differences are mainly described.
[0161] The endoscope processor 30 of the endoscope system according to the present embodiment further includes a screening state determiner 37 .
[0162] The screening state determiner 37 determines whether the state has shifted from the approach state to the screening state, and outputs an AF end signal to the focus lens controller 35 if it is determined that the state has shifted to the screening state.
[0163] As described above, when the focus lens controller 35 receives the AF end signal during control in the AF mode, it ends the AF mode and controls in the proximity determination mode.
[0164] The determination by the screening state determiner 37 is performed, for example, by the following method.
[0165] The screening state determiner 37 acquires information on the position P of the focus lens 11a being controlled in the AF mode at appropriate time intervals, for example, from the moving mechanism 13 or the focus lens controller 35. Then, when the acquired position of the focus lens 11a becomes, for example, the far-point end Pf (however, it is not limited to the far-point end Pf, and may be an appropriate position near the far-point end Pf), the screening state determiner 37 determines that the state has been changed to the screening state.
[0166] In addition, the endoscope 10 is basically configured as follows: in a state where no ambient light (sunlight, indoor light, etc.) is expected, illumination light from the light source device 20 is irradiated onto the subject, and reflected light from the subject is received for observation. Therefore, when the subject is away from the front end of the insertion portion 10a of the endoscope 10, the subject becomes darker, and when it is close to the front end of the insertion portion 10a, the subject becomes brighter. Therefore, the screening state determiner 37 obtains the brightness value of the image from, for example, the image processing device 33 in units of frames. Moreover, it may be that when the average of the brightness values in, for example, the AF area in the acquired image becomes less than a specified threshold value, it is determined that the state has been changed to the screening state.
[0167] Furthermore, in the endoscope system, dimming is performed to control the light amount of the light source 22 so that the subject is illuminated with appropriate brightness. Therefore, the screening state determiner 37 obtains the light amount of the light source 22 from the light source controller 21, for example, with the aid of the system controller 36. Furthermore, when the light amount of the light source 22 becomes greater than a predetermined threshold value, the screening state determiner 37 determines that the distance to the subject has been increased, that is, the state has been changed to the screening state.
[0168] In addition to this, the screening state determiner 37 may adopt the following determination method.
[0169] When the endoscope 10 is brought close to the subject, the motion vector of the image is directed outward in the radiation direction (this is because when the front end of the insertion portion 10a is brought close to the subject located in the center of the image, the subject portion originally located near the center of the image moves toward the periphery of the image).
[0170] Conversely, when the endoscope 10 is moved away from the subject, the motion vector of the image is directed inward in the radiation direction (this is because, when the front end of the insertion portion 10a is moved away from the subject located in the center of the image, the portion of the subject originally located outside the field of view enters the field of view).
[0171] Therefore, the screening state determiner 37 obtains multiple frames of images that are continuous in time from the preprocessing device 31, performs image recognition, and detects the motion vector. Furthermore, the screening state determiner 37 determines whether the front end of the insertion portion 10a is approaching or moving away from a specific part of the subject (which one of the motion vectors is outward / inward relative to the center of the image) and the moving speed (the size of the motion vector) based on the detected motion vector. Then, when the moving away state continues for more than a specified time, the screening state determiner 37 determines that the user wants to observe the subject from a farther distance, that is, the state has been changed to the screening state.
[0172] Fig.12 : is a flowchart showing the operation of the endoscope system of the third embodiment. Fig.12 The processing content of one frame is recorded in the main processing not shown in the figure, each time an image of one frame is obtained, Fig.12 Processing shown.
[0173] When entering the main process (not shown) Fig.12 In the process shown, the system controller 36 determines whether it is a frame image (initial frame) acquired for the first time after the endoscope system is activated (step S1).
[0174] Here, when determining that it is the initial frame, the system controller 36 sets the approach determination mode to the focus lens controller 35 (step S2 ).
[0175] When the process of step S2 is performed or it is determined in step S1 that it is not the initial frame, the system controller 36 determines whether the current control mode is the proximity determination mode or the AF mode (step S3 ).
[0176] Here, when it is determined to be the proximity determination mode (that is, when the previous frame is in the screening state), the proximity state determiner 34 determines whether it is in the proximity state (that is, whether the current frame has changed from the screening state of the previous frame to the proximity state) (step S4).
[0177] Here, when determining that the state has shifted to the close state, the close state determiner 34 outputs an AF start signal to the focus lens controller 35 (step S5 ).
[0178] When receiving the AF start signal, the focus lens controller 35 sets the control mode to the AF mode, controls the focus lens 11 a via the moving mechanism 13 , and performs automatic focusing so that the subject within the AF area is continuously focused (step S6 ).
[0179] In addition, when it is determined in step S3 that the current control mode is the AF mode (that is, when the previous frame is in the approach state), the screening state determiner 37 determines whether it is in the screening state (that is, whether the current frame has changed from the approach state of the previous frame to the screening state) (step S7).
[0180] Here, when determining that the state has shifted to the screening state, the screening state determiner 37 outputs an AF end signal to the focus lens controller 35 (step S8 ).
[0181] When receiving the AF end signal, the focusing lens controller 35 sets the control mode to the proximity determination mode, and controls the focusing lens 11a with the help of the moving mechanism 13. As mentioned above, the position of the focusing lens 11a is basically fixed at the far point end Pf, and a small amplitude A is periodically or non-periodically performed reciprocating motion (step S9).
[0182] If it is determined that it is not in the approach state in step S4, if the process of step S6 is performed, if it is determined that it is not in the screening state in step S7, or if the process of step S9 is performed, Fig.12 The shown process returns to the main process (not shown).
[0183] In addition, you can also Fig.11 It goes without saying that the structure shown in which the screening state determiner 37 is provided separately from the approach state determiner 34 is applied to the structure of the second embodiment.
[0184] According to such a third embodiment, substantially the same effect as the above-mentioned first and second embodiments is achieved, and a screening state determiner 37 is provided separately from the approach state determiner 34 to determine whether the state has been changed to the screening state, so that various determination methods can be applied and determination can be performed with high precision.
[0185] In addition, the above content mainly describes the case where the present invention is an endoscope processor, but is not limited to this. The present invention can also be a method for controlling a focusing lens that performs the same processing as an endoscope processor, or a program for enabling a computer to control an endoscope, a computer-readable non-transitory storage medium that stores the program, etc.
Claims
1. An endoscope processor, characterized in that: Can be connected to an endoscope and equipped with a processor, Wherein, the endoscope has: An objective optical system, comprising a focusing lens, the objective optical system being used to form an optical image of a subject; a moving mechanism that moves the focusing lens; and a camera device that captures the optical image to obtain an image, The processor is composed of: The moving mechanism is controlled in one of an automatic focus mode and a proximity determination mode, wherein the automatic focus mode is a mode for automatically focusing on the subject, and the proximity determination mode is a mode for determining whether a transition from a screening state to a proximity state has occurred. The proximity determination mode is executed while the auto focus mode is turned off. In the approach determination mode, When the change in image height of the effective image range caused by the control of the moving mechanism is less than 1%, it is determined whether the state has changed from the screening state to the approaching state based on the position information of the focusing lens and the change in the image, When it is determined that the state has shifted to the proximity state, the proximity determination mode is terminated and the moving mechanism is controlled in the autofocus mode.
2. The endoscope processor according to claim 1, characterized in that: The processor also determines whether the state has changed from the proximity state to the screening state during the process of controlling the moving mechanism in the autofocus mode. If it is determined that the state has changed to the screening state, the processor ends the autofocus mode and controls the moving mechanism in the proximity determination mode.
3. The endoscope processor according to claim 1, characterized in that: The processor moves the focus lens at least in an approaching direction when determining whether the state has shifted from the screening state to the approaching state by moving the focus lens so that the variation of the image height of the effective image range is 1% or less.
4. The endoscope processor according to claim 3, characterized in that: The starting point when the focusing lens is moved toward the approaching direction is the far-point end.
5. The endoscope processor according to claim 1, characterized in that: The processor reciprocates the focus lens so that a change in image height of the effective image range caused by the control of the moving mechanism is 1% or less.
6. The endoscope processor according to claim 1, characterized in that: The processor determines whether the transition to the close state has occurred based on a difference or ratio between a contrast value of an image acquired by the imaging device at a far point side and a contrast value of an image acquired by the imaging device at a position different from a far point end.
7. The endoscope processor according to claim 1, characterized in that: The imaging device includes an imaging element of an image plane phase difference automatic focusing method. The processor determines whether a transition to the close state has occurred based on a difference or a ratio between a phase difference acquired by the imaging element at a far point side and a phase difference acquired by the imaging element at a position different from the far point end.
8. The endoscope processor according to claim 1, characterized in that: The endoscope further includes a splitting optical system that splits the light beam from the objective optical system into a plurality of light beams having different optical path lengths. The imaging device captures a plurality of optical images formed by the plurality of light beams split by the splitting optical system, and simultaneously acquires a plurality of images having different focus positions.
9. The endoscope processor according to claim 1, characterized in that: The processor sets a determination area for determining whether the image acquired by the imaging device has transitioned to the proximity state.
10. The endoscope processor according to claim 1, characterized in that: The processor calculates the reliability of moving the focusing lens. When the processor moves the focus lens, the processor determines whether the state has shifted from the screening state to the approaching state based on the reliability in addition to the change in the image and the position information of the focus lens.
11. The endoscope processor according to claim 10, characterized in that: The processor calculates the reliability based on at least one of the amount of movement, brightness, whether the endoscope tip is captured, whether the treatment instrument is captured, the amount of light, the light emission period, the charge readout period, and the wavelength of the illumination light.
12. A computer-readable storage medium storing a program, wherein the storage medium is characterized in that: The program causes the computer controlling the endoscope to perform the following actions: controlling a moving mechanism for moving a focus lens included in an objective optical system of the endoscope in one of an automatic focus mode for automatically focusing on a subject and a proximity determination mode for determining whether a transition from a screening state to a proximity state has occurred, The proximity determination mode is executed while the auto focus mode is turned off. In the approach determination mode, When the change in image height within the effective image range is less than 1%, it is determined whether the state has changed from the screening state to the approach state based on the position information of the focusing lens and the change in the image acquired by the imaging device of the endoscope. When it is determined that the state has shifted to the proximity state, the proximity determination mode is terminated and the moving mechanism is controlled in the autofocus mode.
13. A method for controlling a focusing lens, characterized in that: Acquire images from the endoscope, obtaining position information of a focusing lens of the endoscope, In the process of controlling the moving mechanism of the focusing lens of the endoscope in the approach determination mode, when the variation of the image height in the effective image range is less than 1%, it is determined whether the state has changed from the screening state to the approach state based on the position information of the focusing lens and the variation of the image. The approach determination mode is a mode for determining whether the state has changed from the screening state to the approach state. When it is determined that the state has transitioned to the proximity state, the proximity determination mode is terminated, and the moving mechanism is controlled in an automatic focus mode, which is a mode for automatically focusing on a subject.
14. A computer program product comprising a program for causing a computer to execute the control method of the focus lens according to claim 13.
Citation Information
Patent Citations
Laser diode and manufacture thereof
JP1986077387A
Focus control device of endoscope device, endoscope device, and focus control method of endoscope device
JP2016195772A
Medical observation device and control method
WO2018100885A1
Imaging device, endoscope device, and method for operating imaging device
WO2020095366A1