Endoscope system, control method, and program

By repeatedly determining the size of the vignetting area and the observation area in the surgical endoscope, and performing parameter change processing based on the comparison results, the problem of incorrect determination caused by reflected light and high brightness is solved, and the accuracy of the identification of the scope type is improved. and reliability of surgical procedures.

CN118574559APending Publication Date: 2024-08-30SONY GROUP CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380018063.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-01-27
Filing Date
2023-01-12
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

During the use of surgical endoscopes, the mechanical vignetting area caused by reflected light and high-brightness subjects temporarily becomes brighter, which may lead to incorrect determination of the observation area and affect the accurate identification of the type of scope.

Method used

Determination is performed at least twice by determining the size of the vignetting area and the observation area generated on the image sensor, and parameter changing processing is performed based on comparison of multiple determination results to suppress erroneous determination.

Benefits of technology

It effectively prevents incorrect determination of the observation area due to reflected light and high-brightness subjects, and improves the accuracy of the scope type identification and the reliability of the surgical operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118574559A
    Figure CN118574559A
Patent Text Reader

Abstract

The present disclosure relates to an endoscope system, a control method, and a program capable of reducing erroneous evaluation when evaluating an observation area. There is provided an endoscope system including: an imaging device connected to an insertion portion and performing imaging by using an image sensor to receive light guided through the insertion portion; the control device controls the imaging device. The control device is provided with one or more processors and one or more storage devices storing programs. And the processor executes the program so as to evaluate a size of an observation region, which is a region different from a vignetting region occurring on the image sensor due to the insertion portion, twice or more times, and determines a size of the observation region based on a comparison result obtained by comparing evaluation results from the twice or more times. Parameter change processing based on the evaluation result is performed. The present disclosure may be applied, for example, in an endoscope system using a surgical endoscope.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to an endoscope system, a control method, and a program, and more particularly, to an endoscope system, a control method, and a program capable of suppressing erroneous determination when determining an observation area. Background Art

[0002] Typically, a surgical endoscope uses a camera connected to a scope to observe the surgical field by inserting the scope into the patient's body.

[0003] The scope can be attached and detached, and the surgeon can select the scope to be used from a variety of scopes. At this time, since mechanical vignetting and performance vary depending on the type of scope, it is necessary to adjust the image processing in the subsequent stage according to the type of scope. Therefore, a method for distinguishing the type of scope is required.

[0004] As such a discrimination method, for example, there is known a technique disclosed in Patent Document 1. In Patent Document 1, a plurality of evaluation frames arranged at predetermined intervals are set for an endoscopic image captured using a scope, evaluation values ​​are calculated for each of the plurality of evaluation frames, and the type of the scope is estimated based on the relationship between the calculated evaluation values.

[0005] Reference List

[0006] Patent Literature

[0007] Patent Document 1: Japanese Patent Publication No. 2020-162803 Summary of the invention

[0008] Problems to be solved by the present invention

[0009] In medical areas where a surgical endoscope is used, when there are high-brightness objects such as forceps and gauze in the imaging area, or when the scope is inserted into the patient's body, the vignetting area becomes temporarily brighter due to the large amount of reflected light, which may result in an erroneous determination of the observation area corresponding to the type of scope.

[0010] The present disclosure has been made in view of such circumstances, and an object thereof is to suppress erroneous determination when determining an observation area.

[0011] Solution to the problem

[0012] An endoscope system according to one aspect of the present disclosure is an endoscope system including: an imaging device to which an insertion unit is connected, the imaging device receiving light guided by the insertion unit by an image sensor to capture an image; and a control device to control the imaging device, wherein the control device includes one or more processors and one or more storage devices storing programs, and the processor executes the program to: determine the size of an observation area different from a vignetting area generated on the image sensor by the insertion unit at least twice or more; and perform parameter change processing based on a comparison result of comparison of two or more determination results.

[0013] A control method according to one aspect of the present disclosure is a control method, comprising: determining, by a control device, a size of an observation area different from a vignetting area generated on the image sensor by the insertion unit at least twice or more; and performing a parameter change process based on a comparison result of comparison of two or more determination results, by a control device, controlling an imaging device connected to an insertion unit and receiving light guided by the insertion unit by an image sensor and capturing an image.

[0014] A program according to one aspect of the present disclosure is a program for causing a computer to function as a control device that determines the size of an observation area different from a vignetting area generated on an image sensor through an insertion unit connected to an imaging device, and performs parameter change processing based on a determination result based on a comparison result of comparison of two or more determination results, the imaging device receiving light guided by the image sensor through the insertion unit and capturing an image.

[0015] In an endoscope system, a control system, and a program according to one aspect of the present disclosure, a size of an observation area different from a vignetting area generated on an image sensor by an insertion unit connected to an imaging device is determined at least twice or more, the imaging device receives light guided by the insertion unit by the image sensor and captures an image; and a parameter change process based on the determination result is performed based on a comparison result of comparison of two or more determination results.

[0016] It should be noted that the imaging device and the control device included in the endoscope system according to one aspect of the present disclosure may be independent devices or may be internal blocks configuring one device. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 is a diagram showing a schematic configuration example of an endoscope system according to the technology of the present disclosure.

[0018] Figure 2 is a diagram showing a detailed configuration example of an endoscope.

[0019] Figure 3is a block diagram showing a detailed configuration example of a camera and a control device.

[0020] Figure 4 is a diagram showing a configuration example of a control program.

[0021] Figure 5 is a diagram showing a first embodiment of an endoscopic image.

[0022] Figure 6 is a diagram showing a second embodiment of an endoscopic image.

[0023] Figure 7 : is a flowchart showing the flow of the first process.

[0024] Figure 8 is a diagram showing an example of a plurality of evaluation frames set in the first process.

[0025] Fig. 9 : is a flowchart showing the flow of the second process.

[0026] Fig.10 is a diagram showing an example of a plurality of evaluation frames set in the second process.

[0027] Fig.11 : is a flowchart showing the flow of the third process.

[0028] Fig.12 is a diagram showing an example of a plurality of evaluation frames set in the third process.

[0029] Fig.13 is a diagram showing an example of a plurality of evaluation blocks set in a high-precision calculation process.

[0030] Fig.14 is a diagram showing an example of a plurality of evaluation blocks set in a high-precision calculation process.

[0031] Fig.15 : is a flowchart showing the flow of the determination process.

[0032] Fig.16 : is a diagram showing an embodiment of recognition results and mask diameter information notified to an external module.

[0033] Fig.17 : is a diagram showing an example of display of mask diameter information.

[0034] Fig.18 is a diagram showing a display example of a virtual frame. DETAILED DESCRIPTION

[0035] <System Configuration>

[0036] An outline of a system according to the technology of the present disclosure will be described. Figure 1 is a diagram showing a schematic configuration example of an endoscope system according to the technology of the present disclosure.

[0037] Figure 1 The figure shows a state where an operator (doctor) 3 is performing surgery on a patient 4 on a patient bed 2 using the endoscopic surgery system 1. Figure 1 In the figure, the endoscopic surgery system 1 includes an endoscope 10, other surgical instruments 20 (such as a pneumoperitoneum tube 21, an energy treatment instrument 22 and forceps 23), a support arm device 30 for supporting the endoscope 10, and a cart 50 on which various endoscopic surgery devices are installed.

[0038] The endoscope 10 includes: a scope 101, a region of which a predetermined length from the tip is inserted into the body of the patient 4; and a camera 102, which is connected to the base end of the scope 101. Figure 1 In the embodiment of FIG. 1 , the endoscope 10 configured as a rigid scope including the scope 101 as a rigid lens barrel is shown, but the endoscope 10 may be configured as a flexible scope including a flexible lens barrel.

[0039] An opening for inserting an objective lens is provided at the front end of the scope 101. The light source device 53 is connected to the endoscope 10, and the light (irradiation light) generated by the light source device 53 is guided to the front end of the lens barrel by a light guide extending in the scope 101, and is emitted to the observation target in the body of the patient 4 through the objective lens. The endoscope 10 can be a direct-view endoscope, an oblique-view endoscope, or a side-view endoscope.

[0040] The optical system and the imaging element are arranged inside the camera head 102, and the light reflected from the observation target (observation light) is focused on the imaging element through the optical system. The imaging element performs photoelectric conversion on the observation light to generate an image signal corresponding to the subject image. The image signal is sent to the control device 51 as RAW data (RAW image).

[0041] The control device 51 is a camera control unit (CCU) that includes a processor such as a central processing unit (CPU), a field programmable gate array (FPGA), a storage device, etc. The control device 51 integrally controls the operation of each device including the endoscope 10 and the display device 52. In addition, the control device 51 receives an image signal from the camera head 102, and performs various types of image processing such as development processing (demosaic processing) on ​​the image signal for displaying an observation image (display image) based on the image signal.

[0042] The display device 52 displays a display image based on an image signal subjected to image processing by the control device 51 under the control of the control device 51. The light source device 53 has a light source such as a light emitting diode (LED). The light source device 53 supplies irradiation light for imaging a surgical site, etc., to the endoscope 10. The irradiation light includes, for example, normal light such as white light (first wavelength light) as light within a first wavelength band and special light such as infrared (IR) light (second wavelength light) as light within a second wavelength band. The IR light may include near infrared (NIR) light.

[0043] The input device 54 is an input interface of the endoscopic surgery system 1. The user can input various information and instructions to the endoscopic surgery system 1 through the input device 54. For example, the user inputs an instruction to change the imaging conditions of the endoscope 10 (type of irradiation light, magnification, focal length, etc.).

[0044] The treatment instrument control device 55 controls the driving of the energy treatment instrument 22 to perform cauterization and incision of tissues, sealing of blood vessels, etc. The pneumoperitoneum device 56 feeds gas into the body through the pneumoperitoneum tube 21 to inflate the body cavity of the patient 4, the purpose of which is to ensure the field of view through the endoscope 10 and to ensure the operator's working space. The recorder 57 is a device capable of recording various types of information related to the operation. The printer 58 is a device capable of printing various types of information about the operation in various formats (such as text, images, or graphics).

[0045] Figure 2 Show Figure 1 A detailed configuration example of the endoscope 10 is shown in FIG.

[0046] exist Figure 2 In the embodiment, the endoscope 10 includes a scope 101 and a camera 102. In the endoscope 10, the scope 101 is connected to the light source device 53 via a light guide 121, and the camera 102 is connected to the control device 51 via a transmission cable 122. The control device 51 is connected to the display device 52 via a transmission cable 123, and is connected to the light source device 53 via a transmission cable 124.

[0047] The scope 101 is configured as a rigid scope. That is, the scope 101 is a rigid or at least partially flexible elongated insertion unit (lens barrel) that is inserted into the body of the patient 4. An optical system that uses one or more lenses to focus a subject image is provided in the scope 101.

[0048] The light source device 53 is connected to one end of the light guide 121, and supplies irradiation light for illuminating the body to one end of the light guide 121 under the control of the control device 51. The transmission cable 124 transmits the control signal from the control device 51 to the light source device 53. The light guide 121 transmits the irradiation light supplied from the light source device 53 from one end to the other end, and supplies it to the scope 101. The irradiation light supplied to the scope 101 is emitted from the front end of the scope 101 and emitted into the body. The observation light (subject image) incident on and reflected in the body is condensed by the optical system in the scope 101.

[0049] The camera 102 is connected to the base end (eyepiece portion 111) of the scope 101 in a detachable manner. Under the control of the control device 51, the camera 102 captures an image of the observation light (subject image) focused by the scope 101, and outputs an image signal (RAW data) obtained as a result. The image signal is, for example, an image signal corresponding to 4K resolution (for example, 3840×2160 pixels). Figure 3 The detailed configuration of the camera 102 is described.

[0050] The transmission cable 122 transmits the image signal and the like output from the camera head 102 to the control device 51. In addition, the transmission cable 122 transmits the control signal, synchronization signal, power, and the like output from the control device 51 to the camera head 102. Note that in order to transmit the image signal and the like through the transmission cable 122, the image signal and the like may be transmitted as an electric signal or an optical signal. The same applies to the transmission of the control signal, synchronization signal, and the like through the transmission cable 122. In addition, the communication between the camera head 102 and the control device 51 is not limited to the wired communication using the transmission cable 122, and wireless communication conforming to a predetermined communication method may be performed.

[0051] The transmission cable 123 transmits the image signal processed by the control device 51 and the control signal output from the control device 51 to the display device 52. The display device 52 displays a display image based on the image signal from the control device 51 under the control of the control device 51. The display device 52 can output sound (voice) based on the control signal from the control device 51.

[0052] The control device 51 includes a processor, a storage device, etc., and outputs a control signal, etc. to each device including the light source device 53, the camera 102, and the display device 52 to control the operation of each device as a whole. In addition, the control device 51 processes the image signal, etc. output from the camera 102, and controls the operation of each device based on the processing result. Figure 3 The detailed configuration of the control device 51 is described.

[0053] Figure 3 It is shown Figure 1 and Figure 2 1 is a block diagram of a detailed configuration embodiment of the camera 102 and the control device 51 shown in . The camera 102 is an embodiment of an imaging device according to the technology disclosed herein, and receives light guided through the scope 101 by an image sensor and captures an image. The control device 51 is an embodiment of a control device according to the technology disclosed herein, and controls the camera 102.

[0054] The camera 102 includes a lens unit 151, an image sensor 152, a drive circuit 153, a communication circuit 154, and a camera control circuit 155. The camera 102 and the control device 51 are communicatively connected to each other through a transmission cable 122.

[0055] The lens unit 151 is an optical system provided at a connection portion with the scope 101. Observation light acquired from the distal end of the scope 101 is guided to the camera 102 and enters the lens unit 151. The lens unit 151 is configured by combining a plurality of lenses including a zoom lens and a focus lens.

[0056] The image sensor 152 includes, for example, an imaging element (such as a complementary metal oxide semiconductor (CMOS) image sensor or a charge coupled device (CCD) image sensor) and a signal processing circuit (AD conversion circuit, etc.). The image sensor 152 may include one imaging element (so-called single-board type) or a plurality of imaging elements (so-called multi-board type). The image sensor 152 is not necessarily provided in the camera head 102. For example, the image sensor 152 may also be provided in the lens body 101 directly behind the objective lens.

[0057] The driving circuit 153 includes an actuator and the like, and moves the zoom lens and the focus lens included in the lens unit 151 by a predetermined distance along the optical axis under the control of the camera control circuit 155. As a result, the magnification and focus of the image captured by the image sensor 152 are appropriately adjusted.

[0058] The communication circuit 154 includes a communication device for sending and receiving various information to and from the control device 51. The communication circuit 154 transmits the image signal obtained from the image sensor 152 as RAW data to the control device 51 through the transmission cable 122. In addition, the communication circuit 154 receives a control signal for controlling the driving of the camera 102 from the control device 51, and supplies the control signal to the camera control circuit 155. For example, the control signal includes information on imaging conditions, such as a frame rate of an image, an exposure value at the time of imaging, and information specifying a magnification and a focus of an image.

[0059] The imaging conditions such as the frame rate, exposure value, magnification, and focus as described above may be appropriately specified by the user's operation, or may be automatically set by the control device 51 (the processor 161 thereof) based on the acquired image signal. In the latter case, an automatic exposure (AE) function, an automatic focus (AF) function, and an automatic white balance (AWB) function are incorporated in the endoscope 10.

[0060] The camera control circuit 155 controls the driving of the camera 102 based on the control signal received from the control device 51 through the communication circuit 154 .

[0061] The control device 51 includes processors 161-1 to 161-i, storage devices 162-1 to 162-j, and a communication circuit 163. Here, i and j are integers of 1 or more, and the control device 51 includes one or more processors 161 and one or more storage devices 162. In the following description, the processors 161-1 to 161-i will be referred to as the processor 161 in the case where there is no particular need to distinguish them. Similarly, in the case where there is no need to particularly distinguish the storage devices 162-1 to 162-j, they are described as the storage device 162.

[0062] The processor 161 is a processor such as a CPU. The processor 161 can realize various functions by reading and executing the control program stored in the storage device 162. The processor 161 performs various types of control related to the imaging of the surgical site, etc. performed by the endoscope 10 and the display of the endoscopic image (medical image) obtained by the imaging of the surgical site, etc. For example, the processor 161 generates a control signal for controlling the driving of the camera 102.

[0063] In addition, the processor 161 performs various types of image processing on the image signal transmitted from the camera 102. The processor 161 causes the display device 52 to display a display image (endoscopic image) of the surgical site, etc. based on the image signal subjected to the image processing. At this time, the processor 161 can use various image recognition technologies to recognize various objects in the image.

[0064] For example, the processor 161 can recognize surgical instruments such as forceps, a specific living body part, bleeding, fog when the energy treatment instrument 22 is used, etc. by detecting the shape, color, etc. of the edge of the object contained in the image. When causing the display device 52 to display the image, the processor 161 can use the recognition result to superimpose and display various types of surgical support information on the image of the surgical site.

[0065] The storage device 162 is a storage device such as a semiconductor storage device or a hard disk drive (HDD). The storage device 162 stores programs such as a control program executed by the processor 161, information (data, parameters, etc.) required for processing by the processor 161, and the like.

[0066] The communication circuit 163 includes a communication device for sending and receiving various types of information to and from the camera 102. The communication circuit 163 receives an image signal transmitted from the camera 102 through the transmission cable 122. In addition, the communication circuit 163 transmits a control signal for controlling the driving of the camera 102 to the camera 102. The image signal and the control signal may be transmitted through electrical communication, optical communication, or the like.

[0067] <Control Program Configuration>

[0068] Figure 4 171 is a diagram showing a configuration example of a control program. The control program 171 is stored in the storage device 162 and is read and executed by the processor 161 .

[0069] The control program 171 includes an evaluation frame setting unit 181 , an evaluation value calculation unit 182 , an evaluation value determination unit 183 , a determination result setting unit 184 , a determination result determination unit 185 , and a notification target setting unit 186 .

[0070] The evaluation frame setting unit 181 sets a plurality of evaluation frames arranged at predetermined intervals for an endoscopic image (RAW image) corresponding to an image signal (RAW data). Here, the evaluation frame is an area arbitrarily set with respect to an area (area of ​​the RAW image) corresponding to an imaging surface of an imaging element having a predetermined array pattern such as a Bayer array, and is a frame for acquiring an evaluation value such as information on brightness (brightness information).

[0071] The evaluation value calculation unit 182 calculates an evaluation value regarding each of the plurality of evaluation frames set by the evaluation frame setting unit 181. As the evaluation value, for example, brightness information (brightness value) in each evaluation frame is calculated.

[0072] The evaluation value determination unit 183 determines the relationship (correlation) between the evaluation values ​​of each of the plurality of evaluation frames calculated by the evaluation value calculation unit 182. Here, for example, the relationship between the evaluation values ​​corresponding to the evaluation frames arranged adjacently or at equal intervals is determined. The determination result setting unit 184 performs settings regarding the determination result according to the relationship between the evaluation values ​​determined by the evaluation value determination unit 183.

[0073] The determination result determination unit 185 determines whether the determination result set by the determination result setting unit 184 is the same for a predetermined number of times in succession. The notification target setting unit 186 sets a notification target to be notified to an external module based on the determination result of the determination result determination unit 185 .

[0074] <Overview of the Invention According to the Present Disclosure>

[0075] In the endoscope 10 , the scope 101 connected to the camera head 102 is inserted into the body of the patient 4 , and the operator 3 observes the surgical field as described above.

[0076] For example, Figure 5 An embodiment of an endoscopic image 200 based on an image signal obtained by imaging a subject image gathered by the scope 101 by the camera 102 is shown. In the endoscopic image 200, the left and right black areas represent a vignetting area 200A where mechanical vignetting occurs, and the area of ​​the subject image represents an observation area 200B. The vignetting area 200A may also be referred to as a mask area (black area). The observation area 200B is an effective area different from the vignetting area 200A. The boundary between the vignetting area 200A and the observation area 200B is a mask edge 220.

[0077] That is, in the endoscope 10, the scope 101 having an elongated shape is attached, but since the shape of the subject image converged by the scope 101 does not match the shape of the imaging surface of the image sensor 152 of the camera 102, mechanical vignetting occurs due to the scope 101. That is, mechanical vignetting is vignetting that occurs on the image sensor 152 of the camera 102.

[0078] The endoscopic image 200 is subjected to various types of image processing by the control device 51 so as to be displayed as a display image by the display device 52. For example, Figure 6 As shown, the surgeon 3 can perform treatment such as excision of the affected part using a surgical instrument 20 such as an energy treatment instrument 22 while observing the displayed image in real time.

[0079] Here, in the endoscope 10, the scope 101 can be attached and detached, and the surgeon selects the scope 101 to be used from a plurality of types of scopes. At this time, since mechanical vignetting and performance differ depending on the type of the scope 101 to be used, it is necessary to adjust the image processing in the subsequent stage according to the type of the scope 101. Therefore, a method of determining the observation area 200B corresponding to the type of the scope 101 is required.

[0080] Here, if Figure 5 and Figure 6As shown, the type of the scope 101 can be determined by determining (the size of) the observation area 200B, and the (size of) the vignetting area 200A can also be determined. Therefore, it can be said that the type of the scope 101 is determined, and the vignetting area 200A is determined by determining the observation area 200B. That is, it can be conceptually considered that determining the type of the scope 101, determining the observation area 200B, and determining the vignetting area 200A are the same.

[0081] For example, signal processing related to AE, AF, etc. is performed on the observation area 200B, and various problems occur when performing exposure or focusing (including the halo area 200A), and then, it is necessary to determine (the size of) the observation area 200B. For example, in the technology disclosed in the above-mentioned patent document 1, when determining the type of the scope 101 to be used, a method of determining the type of the scope 101 to be used with a small amount of calculation is proposed.

[0082] On the other hand, in a medical treatment area using the endoscopic surgery system 1, when a high-brightness object such as the forceps 23 or gauze is present in the imaging area, or when the scope 101 is inserted into the body of a patient, the vignetting area 200A becomes temporarily bright due to a large amount of reflected light, and an erroneous determination may be made in determining (the size of) the observation area 200B corresponding to the type of the scope 101. Therefore, it is necessary to prevent erroneous determination of the observation area 200B.

[0083] Therefore, the technology according to the present disclosure proposes a method of suppressing erroneous determination by continuously performing determination processing of the observation area 200B corresponding to the type of the scope 101 and determining whether the determination result is continuous for a predetermined number of times.

[0084] Hereinafter, the details of the technology according to the present disclosure will be described. In the endoscopic surgery system 1 (the processor 161 of the control device 51 thereof), as a process of determining the type of the scope 101 to be used, for example, the first process to the third process and the determination process are performed, and the processes are described in sequence. In addition, in the following description, the image corresponding to the imaging surface of the image sensor 152 of the camera 102 will be referred to as an endoscopic image.

[0085] <Flow of the First Process>

[0086] First, refer to Figure 7 The flowchart describes the flow of the first process executed by the processor 161 of the control device 51.

[0087] In step S10, the evaluation frame setting unit 181 sets a plurality of evaluation frames for an image (RAW image) based on the image signal from the camera 102. In the setting of the evaluation frames, for example, Figure 8As shown, the evaluation frames 210 are provided at the central portion of the endoscopic image 200 and the four corners of the peripheral portion thereof.

[0088] Specifically, in the endoscopic image 200, a rectangular evaluation frame 210-0 (hereinafter also referred to as frame 0) is provided in the center, and rectangular evaluation frames 210-1, 210-2, 210-3, and 210-4 (hereinafter also referred to as frame 1, frame 2, frame 3, and frame 4) are provided at the four corners, namely, the upper left, lower left, upper right, and lower right. The size of the rectangles of the evaluation frames 210-1 to 210-4 is smaller than the size of the rectangle of the evaluation frame 210-0.

[0089] In addition, Figure 8 In FIG. 2 , four circles having different diameters centered about the center of gravity are superimposed on the endoscopic image 200 , and these circles correspond to the mask edge 220 which is the boundary between the vignetting region 200A and the observation region 200B.

[0090] That is, the diameter of the scope 101 used in the endoscope 10 corresponds to the mask edge 220 in the endoscopic image 200, and the position of the mask edge 220 assumed to be detected in the endoscopic image 200 is known in advance in the design. Therefore, here, in order to determine whether the vignetting area 200A is included, evaluation frames 210-0 to 210-4 are set.

[0091] In addition, in the following description, four types of mirror bodies 101 to be used are assumed, and as the mask types of each mask edge 220, "Type 1" is assigned to mask edge 220-1, "Type 2" is assigned to mask edge 220-2, "Type 3" is assigned to mask edge 220-3, and "Type 4" is assigned to mask edge 220-4.

[0092] return Figure 7 In step S11, the evaluation value calculation unit 182 calculates the value corresponding to Figure 8 , and the evaluation values ​​of the center frame 0 and the four peripheral corner frames 1 to 4 shown in . As the evaluation values, for example, a feature amount obtained from the endoscopic image 200 such as a brightness value can be used.

[0093] Note that in the process of step S11, for ease of description, the evaluation values ​​for each of the plurality of evaluation frames 210 are collectively calculated, but the evaluation value for the target evaluation frame 210 may be sequentially calculated for each determination process (S12, S14, S15, S16) described later. The calculation method of the evaluation value is similar in the second process and the third process described later.

[0094] In step S12 , the evaluation value determination unit 183 determines whether the evaluation value of at least one of the outer four corner frames 1 to 4 is greater than the evaluation value of the center frame 0 based on the calculation result of the evaluation value of each frame.

[0095] If it is determined in the determination process of step S12 that the evaluation values ​​of the four outer corner frames 1-4 are greater than the evaluation value of the center frame 0, that is, if it is determined that the center portion of the endoscopic image 200 is dark and the peripheral portion is bright, the process proceeds to step S13. Then, in step S13, the determination result setting unit 184 sets the mask type to "no rigid mirror".

[0096] Furthermore, in the event that the evaluation values ​​of the four outer corner frames 1 to 4 are determined to be smaller than the evaluation value of the center frame 0 in the determination process of step S12, the process proceeds to step S14. In step S14, the evaluation value determination unit 183 determines whether the evaluation value of at least one of the four outer corner frames 1 to 4 exceeds a predetermined threshold value based on the calculation result of the evaluation value of the target frame.

[0097] In the case where it is determined in the determination process of step S14 that the evaluation values ​​of the outer four corner frames 1 to 4 exceed the predetermined threshold value (ie, the entire image is bright), the process proceeds to step S13 and “no rigid mirror” is set as the mask type.

[0098] Furthermore, in the case where it is determined in the determination process of step S14 that the evaluation values ​​of the four outer corner frames 1 to 4 are equal to or less than the predetermined threshold, the process proceeds to step S15. In step S15, the evaluation value determination unit 183 determines whether the evaluation value of the center frame 0 is equal to or less than the predetermined threshold based on the calculation result of the evaluation value of the target frame.

[0099] If it is determined in the determination process of step S15 that the evaluation value of the center frame 0 is below the threshold, that is, if it is determined that the entire endoscopic image 200 includes a black image, the process proceeds to step S13 and "non-rigid mirror" is set as the mask type.

[0100] Furthermore, in the event that the evaluation value of the center frame 0 is determined to exceed the predetermined threshold value in the determination processing of step S15, the processing proceeds to step S16. In step S16, the evaluation value determination unit 183 determines whether the brightness difference between the peripheral four corner frames 1 to 4 and the center frame 0 is a predetermined threshold value or less based on the calculation result of the evaluation value of the target frame.

[0101] In the case where it is determined in the determination process of step S16 that the brightness difference is the predetermined threshold value or less, the process proceeds to step S13 , and “non-rigid mirror” is set as the mask type.

[0102] In the case of affirmative determination ("Yes") in the determination processing of steps S12, S14, S15, and S16, "No rigid mirror" is set as the mask type (S13), and the process proceeds to step S17. In step S17, the determination result setting unit 184 sets the recognition result to "stop". Thereafter, the process returns to step S10, and the above-mentioned first process is repeated.

[0103] In addition, in the case where it is determined in the determination process of step S16 that the brightness difference exceeds the predetermined threshold value, the process proceeds to step S18. In step S18, the determination result setting unit 184 sets the recognition result to "recognition success". Thereafter, the processor 161 of the control device 51 performs the second process after the first process. Note that, referring to Fig. 9 Etc., details of the second process will be described later.

[0104] <Flow of the Second Process>

[0105] Next, we will refer to Fig. 9 The flowchart describes the flow of the second process executed by the processor 161 of the control device 51.

[0106] In step S30, the evaluation frame setting unit 181 sets a plurality of evaluation frames for the image according to the image signal from the camera 102. In the setting of the evaluation frames, for example, Fig.10 As shown, the evaluation frame 210 is provided at the central portion of the endoscopic image 200 and in the horizontal direction (X direction) of the endoscopic image.

[0107] Specifically, in the endoscopic image 200, a rectangular evaluation frame 210-4 (hereinafter referred to as evaluation frame 4) is provided in the center portion including the approximate center of gravity. In addition, rectangular evaluation frames 210-0 to 210-3 (hereinafter referred to as evaluation frames 0, 1, 2, 3) are provided at predetermined intervals on the left side in the horizontal direction, and rectangular evaluation frames 210-5 to 210-8 (hereinafter referred to as evaluation frames 5, 6, 7, 8) are provided at predetermined intervals on the right side in the horizontal direction, and the evaluation frames 210-5 to 210-8 are provided in a substantially symmetrical manner with the center portion of the endoscopic image 200 as the center (the approximate center of gravity included).

[0108] The size of the rectangles of the evaluation frames 210-0 to 210-3 and 210-5 to 210-8 discretely arranged at predetermined intervals on the left and right sides of the center is smaller than the size of the rectangle of the evaluation frame 210-4 arranged in the center. Note that in the present disclosure, discrete means that the plurality of evaluation frames 210 are not arranged continuously.

[0109] exist Fig.10In the endoscope image 200, in order to determine which (mask type) mask edge 220 among the mask edges 220-1 to 220-4 the diameter of the scope 101 used corresponds to, evaluation frames 0 to 8 are discretely set at predetermined intervals in the horizontal direction.

[0110] Specifically, for example, since the detection position of the mask edge 220-1 is known in the design, the evaluation frames 0 and 1 and the evaluation frames 7 and 8 are set so that the detection position of the mask edge 220-1 is located between the evaluation frames 210. Similarly, the detection position of the mask edge 220-2 is set between the evaluation frames 1 and 2 and between the evaluation frames 6 and 7, the detection position of the mask edge 220-3 is set between the evaluation frames 2 and 3 and between the evaluation frames 5 and 6, and the detection position of the mask edge 220-4 is set between the evaluation frames 3 and 4 and between the evaluation frames 4 and 5.

[0111] Back to Fig. 9 In step S31, the evaluation value calculation unit 182 calculates Fig.10 Evaluation values ​​corresponding to evaluation frames 0 to 8 are shown. As the evaluation value, for example, a feature value obtained from the endoscopic image 200 such as a brightness value can be used.

[0112] In step S32 , the evaluation value determination unit 183 determines whether there is an edge between the evaluation frames 0 and 1 and whether there is an edge between the evaluation frames 7 and 8 based on the calculation results of the evaluation values ​​of the evaluation frames 0 and 1 and the evaluation frames 7 and 8 .

[0113] Here, for example, the difference between the brightness value obtained from evaluation frame 0 and the brightness value obtained from evaluation frame 1 and the difference between the brightness value obtained from evaluation frame 7 and the brightness value obtained from evaluation frame 8 are compared with a predetermined threshold to determine whether the brightness difference exceeds the predetermined threshold, thereby determining whether there is an edge (mask edge 220-1) between the evaluation frames 210.

[0114] That is, it is determined whether the ratio between the average value of the brightness values ​​in evaluation frame 0 and the average value of the brightness values ​​in evaluation frame 1 exceeds a predetermined threshold, so that it can be determined whether there is an edge between evaluation frame 0 and evaluation frame 1. Similarly, it can be determined whether there is an edge between evaluation frame 7 and evaluation frame 8 by determining whether the ratio between the average value of the brightness values ​​in evaluation frame 7 and the average value of the brightness values ​​in evaluation frame 8 exceeds a predetermined threshold.

[0115] Alternatively, threshold determination may be performed for each integrated value of the brightness value in each evaluation frame. The integrated value can be obtained by dividing the total value of the brightness values ​​of all pixels in each evaluation frame by the number of pixels. That is, it is determined whether the integrated value of the brightness value of evaluation frame 0 exceeds the threshold value (X), and it is determined whether the integrated value of the brightness value of evaluation frame 1 exceeds the threshold value (X), and it can be determined whether there is an edge between evaluation frame 0 and evaluation frame 1 based on the determination results. The same applies to evaluation frames 7 and 8. The threshold value (X) is managed in a table, and, for example, different values ​​are set for the vignetting area 200A and the observation area 200B.

[0116] Here, for the sake of convenience, an example is described in which threshold determination is performed on the integrated values ​​of the brightness values ​​of the evaluation frames 0 and 1, and the presence or absence of an edge is determined based on whether the determination result satisfies a predetermined condition. However, for example, the presence or absence of an edge may be determined based on whether threshold determination is performed on the integrated values ​​of the respective brightness values ​​of the evaluation frames 0 to 3, and whether the determination result satisfies a predetermined condition. Note that as the brightness value in each evaluation frame, statistics such as a maximum value, a median value, and a variance value may also be used in addition to the average value and the integrated value.

[0117] In the case of affirmative determination ("Yes") in the determination processing of step S32, the process proceeds to step S33. In step S33, the determination result setting unit 184 sets the mask type to "Type 1".

[0118] Furthermore, in the case of negative determination ("No") in the determination processing of step S32, the process proceeds to step S34. In step S34, the evaluation value determination unit 183 determines whether there is an edge between the evaluation frames 1 and 2 and whether there is an edge between the evaluation frames 6 and 7 based on the calculation results of the evaluation values ​​of the evaluation frames 1 and 2 and the evaluation frames 6 and 7. In the case of positive determination in the determination processing of step S34, the process proceeds to step S35. In step S35, the determination result setting unit 184 sets the mask type to "Type 2".

[0119] Furthermore, in the case of a negative determination in the determination process of step S34, the process proceeds to step S36. In step S36, the evaluation value determination unit 183 determines whether there is an edge between the evaluation frames 2 and 3 and whether there is an edge between the evaluation frames 5 and 6 based on the calculation results of the evaluation values ​​of the evaluation frames 2 and 3 and the evaluation frames 5 and 6. In the case of an affirmative determination in the determination process of step S36, the process proceeds to step S37. In step S37, the determination result setting unit 184 sets the mask type to "type 3".

[0120] Furthermore, in the case of a negative determination in the determination process of step S36, the process proceeds to step S38. In step S38, the evaluation value determination unit 183 determines whether there is an edge between the evaluation frames 3 and 4 and whether there is an edge between the evaluation frames 4 and 5 based on the calculation results of the evaluation values ​​of the evaluation frames 3 and 4 and the evaluation frames 4 and 5. In the case of an affirmative determination in the determination process of step S38, the process proceeds to step S39. In step S39, the determination result setting unit 184 sets the mask type to "type 4".

[0121] In the case of being determined as positive in the determination processing of steps S32, S34, S36, and S38, "Type 1", "Type 2", "Type 3", and "Type 4" are set as mask types (S33, S35, S37, S39), and the processing proceeds to step S40. In step S40, the determination result setting unit 184 sets the recognition result to "recognition success". Thereafter, the processor 161 of the control device 51 executes the third processing after the second processing. Note that, referring to Fig.11 etc., describe the details of the third process.

[0122] In addition, in the case of a negative determination in the determination process of step S38, the process proceeds to step S41. Then, the determination result setting unit 184 sets the mask type to "no rigid mirror" (S41) and sets the recognition result to "stop" (S42). Thereafter, the process returns to Figure 7 , and execute the above-mentioned first processing.

[0123] <Flow of the Third Process>

[0124] Next, we will refer to Fig.11 The flowchart describes the flow of the third process executed by the processor 161 of the control device 51.

[0125] In step S50, the determination result setting unit 184 determines whether the mask type is set to "Type 3" or "Type 4" in the second process. That is, in this embodiment, since the detection positions of the mask edges 220-1 and 220-2 as "Type 1" and "Type 2" in the vertical direction are located outside the endoscopic image 200, the processes related to the mask edges 220-1 and 220-2 are excluded.

[0126] In the case where the determination in step S50 is affirmative, the process proceeds to step S51. In step S51, the evaluation frame setting unit 181 sets a plurality of evaluation frames for the image based on the image signal from the camera 102. In the setting of the evaluation frames, for example, Fig.12As shown, the evaluation frame 210 is provided at the central portion of the endoscopic image 200 and in the vertical direction (Y direction) of the endoscopic image.

[0127] Specifically, in the endoscopic image 200, a rectangular evaluation frame 210-4 (hereinafter referred to as evaluation frame 4) is provided in the center portion including the approximate center of gravity. In addition, rectangular evaluation frames 210-0 and 210-1 (hereinafter referred to as evaluation frames 0 and 1) are provided at predetermined intervals on the upper side in the up-down direction, and rectangular evaluation frames 210-2 and 210-3 (hereinafter referred to as evaluation frames 2 and 3) are provided at predetermined intervals on the lower side in the up-down direction, and the evaluation frames 210-2 and 210-3 are provided in a substantially symmetrical manner with the center portion of the endoscopic image 200 as the center (the approximate center of gravity included).

[0128] The sizes of the rectangles of the evaluation frames 210 - 0 and 210 - 1 and the evaluation frames 210 - 2 and 210 - 3 discretely arranged at predetermined intervals above and below the center portion are smaller than the size of the rectangle of the evaluation frame 210 - 4 arranged at the center portion.

[0129] exist Fig.12 In order to determine which (mask type) mask edge 220 of mask edges 220-3 and 220-4 corresponds to the diameter of the scope 101 used, evaluation frames 210-0 to 210-3 are discretely set at predetermined intervals in the up-down direction of the endoscopic image 200. Specifically, the detection position of the mask edge 220-3 is set between the evaluation frame 0 and the evaluation frame 1 and between the evaluation frame 2 and the evaluation frame 3, and the detection position of the mask edge 220-4 is set between the evaluation frame 1 and the evaluation frame 4 and between the evaluation frame 2 and the evaluation frame 4.

[0130] return Fig.11 In step S52, the evaluation value calculation unit 182 calculates Fig.12 Evaluation values ​​corresponding to evaluation frames 0 to 4 are shown. As the evaluation value, for example, a feature value obtained from the endoscopic image 200 such as a brightness value can be used.

[0131] In step S53 , the evaluation value determination unit 183 determines whether there is an edge between evaluation frames 0 and 1 and whether there is an edge between evaluation frames 2 and 3 based on the calculation results of the evaluation values ​​of evaluation frames 0 and 1 and evaluation frames 2 and 3 .

[0132] Here, for example, the difference between the brightness value obtained from evaluation frame 0 and the brightness value obtained from evaluation frame 1 and the difference between the brightness value obtained from evaluation frame 2 and the brightness value obtained from evaluation frame 3 are compared with a predetermined threshold to determine whether the brightness difference exceeds the predetermined threshold, thereby determining whether there is an edge between the evaluation frames 210 (mask edge 220-3).

[0133] That is, it is determined whether the ratio between the average value of the brightness value in evaluation frame 0 and the average value of the brightness value in evaluation frame 1 exceeds a predetermined threshold, so that it can be determined whether there is an edge between evaluation frame 0 and evaluation frame 1. Similarly, it can be determined whether there is an edge between evaluation frame 2 and evaluation frame 3 by determining whether the ratio between the average value of the brightness value in evaluation frame 2 and the average value of the brightness value in evaluation frame 3 exceeds a predetermined threshold.

[0134] Alternatively, threshold determination may be performed for each integrated value of the brightness value in each evaluation frame. That is, it is determined whether the integrated value of the brightness value of evaluation frame 0 exceeds the threshold value (X), and it is determined whether the integrated value of the brightness value of evaluation frame 1 exceeds the threshold value (X), and it can be determined whether there is an edge between evaluation frame 0 and evaluation frame 1 based on the determination result. The same applies to evaluation frames 2 and 3. The threshold value (X) is managed in a table.

[0135] In the case of affirmative determination in the determination process of step S53, the process proceeds to step S54. In step S54, the determination result setting unit 184 sets the mask type determined in the second process to "type 3".

[0136] Furthermore, in the case of a negative determination in the determination processing of step S53, the process proceeds to step S55. In step S55, the evaluation value determination unit 183 determines whether there is an edge between the evaluation frames 1 and 4 and whether there is an edge between the evaluation frames 2 and 4 based on the calculation results of the evaluation values ​​of the evaluation frames 1 and 4 and the evaluation frames 2 and 4. In the case of an affirmative determination in the determination processing of step S55, the process proceeds to step S56. In step S56, the determination result setting unit 184 sets the mask type determined in the second process to "type 4".

[0137] The process of step S54 or S56 ends, and the process proceeds to step S57. Then, in step S57, the determination result setting unit 184 sets the recognition result to "recognition success". In step S58, the determination result setting unit 184 determines whether the mask type determined in the second process is set to "type 4" and whether the mask type determined in the third process is set to "type 3".

[0138] In the case where it is determined in the determination process of step S58 that the image is cut out, the process proceeds to step S59. In step S59, the determination result setting unit 184 sets the mask type to "Type 4". That is, in this case, for example, assuming that the mask diameter detected in the vertical direction is large due to light leakage, the mask diameter detected in the horizontal direction by the second process is adopted. In this way, a narrower mask diameter is selected and determined, so that, for example, when subsequent processing is performed, the vignetting area 200A can be more reliably prevented from being included.

[0139] In the case of negative determination in step S58, the process proceeds to step S60. In step S60, the evaluation value determination unit 183 determines whether the mask type determined in the second process is set to "type 3" and whether the mask type determined in the third process is set to "type 4".

[0140] In the case of affirmative determination in the determination process of step S60, the process proceeds to step S61. In step S61, the determination result setting unit 184 sets the mask type to "type 4". That is, in this case, for example, assuming that the mask diameter in the horizontal direction is detected as large due to light leakage, the mask diameter detected in the vertical direction by the third process is adopted to more reliably prevent the vignetting area 200A from entering.

[0141] When the processing of step S59 or S61 ends, or when the determination in step S60 is negative, the processing proceeds to step S62. In addition, when the determination in step S50 is negative, the processing proceeds to step S62.

[0142] In step S62, it is determined whether the high-precision calculation mode is set as the operation mode. Here, in the case where the mode in which the first to third processes are performed is referred to as the normal mode, the mode in which the size of the mask diameter is calculated with high precision compared with the normal mode is referred to as the high-precision calculation mode. In the processing in the normal mode, the first to third processes are performed. In the processing in the high-precision calculation mode, in addition to the first to third processes, the high-precision calculation processing (S63) is also performed.

[0143] In the case where it is determined in step S62 that the high-precision calculation mode is set, the process proceeds to step S63. In step S63, the processor 161 of the control device 51 performs high-precision calculation processing. Fig.13 and Fig.14 Describes the details of high-precision calculation processing.

[0144] In the case where it is determined in step S62 that the high-precision calculation mode is not set (i.e., the normal mode is set), the processing of step S63 is skipped. Then, when the processing of step S63 is performed in the high-precision calculation mode or the processing of step S63 is skipped in the normal mode, the processor 161 of the control device 51 executes the processing described below. Fig.15 Determine the processing described in the above.

[0145] The flow from the first process to the third process has been described above. In the first process, Figure 8As shown, the center frame 0 and the four peripheral corner frames 1 to 4 are set as the evaluation frames 210 of the endoscopic image 200, and whether the vignetting region 200A (mask region) is included in the endoscopic image 200 is determined based on the relationship between the evaluation values ​​about the respective evaluation frames 210. Then, in the case where the vignetting region 200A is not included, the first process is repeated, and in the case where the vignetting region 200A is included, the second process is performed.

[0146] And, in the second process, as Fig.10 As shown, the evaluation frames 210-0 to 210-8 are discretely arranged at predetermined intervals in the horizontal direction with respect to the endoscopic image 200, and the mask type corresponding to the position of the edge is set according to the relationship of the evaluation value with respect to each evaluation frame 210. Then, in the case where the edge corresponding to the evaluation frame 210 is not detected, the first process is repeated, and in the case where the edge corresponding to the evaluation frame 210 is detected, the third process is performed.

[0147] Furthermore, in the third process, if Fig.12 As shown, each evaluation frame 210-0 to 210-4 is discretely set at predetermined intervals in the up-down direction with respect to the endoscopic image 200, and the mask type corresponding to the position of the edge is set (reset) according to the relationship between the evaluation values ​​associated with each evaluation frame 210. Then, in the case where the normal mode is set as the operation mode, the determination processing described later is performed after the processing of the normal mode is completed. In addition, in the case where the high-precision calculation mode is set, the determination processing described later is performed after the processing of the high-precision calculation mode is completed.

[0148] In addition, in the above description, the following case is described: by executing the second process and the third process, the evaluation frames 210 are set in both the horizontal direction and the vertical direction so that the plurality of evaluation frames 210 are symmetrical with respect to the approximate center of gravity of the endoscopic image 200. However, the evaluation may be performed by setting the evaluation frames 210 in only one of the horizontal direction and the vertical direction by executing the second process or the third process. However, as described above, when the evaluation frames 210 are set from both the horizontal direction and the vertical direction by executing the second process and the third process, the mask type can be set assuming, for example, light leakage, so that the mask type can be set more accurately.

[0149] Furthermore, in the second and third processes, the case where the plurality of evaluation frames 210 are discretely arranged at predetermined intervals is described, but a part of the evaluation frames 210 may be continuously arranged. In addition, the number of the plurality of evaluation frames 210 that are discretely arranged is arbitrary, and for example, more evaluation frames 210 may be set for the detection position of the mask edge 220. The positions where the plurality of evaluation frames 210 are arranged are also arbitrary. Furthermore, the shape of the discretely arranged evaluation frames 210 is not limited to a rectangle, and may be other shapes, and it is not necessary that all evaluation frames 210 have the same shape. The intervals at which the plurality of evaluation frames 210 are arranged may not be constant intervals.

[0150] Furthermore, in the second process and the third process, an embodiment has been described in which an edge (mask edge 220) is detected by using a luminance value as an evaluation value and comparing a luminance difference with a predetermined threshold value. However, for example, an edge may be detected by using a quantitative value (e.g., a feature amount such as an edge amount or a black area amount) representing an edge, a black area, or the like included in the evaluation frame 210 as an evaluation value.

[0151] <Details of high-precision calculation processing>

[0152] Next, refer to Fig.13 and Fig.14 , description and Fig.11 Here, the case where "Type 3" is set as the mask type in the above-mentioned second process and third process will be exemplified.

[0153] First, in the high-precision calculation process, based on the determination results in the second and third processes described above, a process for calculating a detailed mask edge in the horizontal direction (X direction) is performed. In this embodiment, since "Type 3" is set as the mask type, as shown in FIG. Fig.13 As shown, a plurality of evaluation frames 210 are set according to the detection position of the mask edge 220 - 3 .

[0154] Specifically, evaluation frames 210-0 to 210-4 corresponding to the detection position of the mask edge 220-3 are continuously arranged on the left side in the horizontal direction, and evaluation frames 210-5 to 200-9 corresponding to the detection position of the mask edge 220-3 are continuously arranged on the right side in the horizontal direction, so that the image is roughly symmetrical with the approximate center of gravity of the endoscopic image 210 as the center (left-right symmetry with the Y-axis as the axis of symmetry).

[0155] The sizes of the rectangles of the evaluation frames 210-0 to 210-4 and the rectangles of the evaluation frames 210-5 to 210-9, which are arranged symmetrically in succession, have substantially the same shape and substantially the same size. Each evaluation frame 210 has a start position and an end position in the horizontal direction (X direction). The start position indicates the position of the left end in the X direction in each evaluation frame 210, and the end position indicates the position of the right end in the X direction in each evaluation frame 210.

[0156] In this way, the evaluation frames 210 - 0 to 210 - 4 and the evaluation frames 210 - 5 to 210 - 9 are arranged symmetrically and continuously in the horizontal direction relative to the endoscopic image 200 , and the edge left end position and edge right end position of the mask diameter can be set according to the relationship between the evaluation values ​​of each evaluation frame 210 .

[0157] Next, in the high-precision calculation process, based on the determination results in the above-mentioned second process and third process, a process for calculating the detailed mask edge in the vertical direction (Y direction) is performed. In this embodiment, since "Type 3" is set as the mask type, as shown in FIG. Fig.14 As shown, a plurality of evaluation frames 210 are set according to the detection position of the mask edge 220 - 3 .

[0158] Specifically, the evaluation frames 210-0 to 210-4 corresponding to the detection position of the mask edge 220-3 are continuously arranged on the upper side in the vertical direction, and the evaluation frames 210-5 to 200-9 corresponding to the detection position of the mask edge 220-3 are continuously arranged on the lower side in the vertical direction, and are roughly symmetrical with the approximate center of gravity of the endoscopic image 210 as the center (symmetrical up and down with the X-axis as the axis of symmetry).

[0159] The rectangles of the evaluation frames 210-0 to 210-4 and the rectangles of the evaluation frames 210-5 to 210-9, which are arranged vertically symmetrically in a continuous manner, have substantially the same shape and substantially the same size. Each evaluation frame 210 is provided with a start position and an end position in the vertical direction (Y direction). The start position indicates the position of the upper end in the Y direction of each evaluation frame 210, and the end position indicates the position of the lower end in the Y direction of each evaluation frame 210.

[0160] In this way, the evaluation frames 210-0 to 210-4 and the evaluation frames 210-5 to 210-9 are arranged symmetrically and continuously in the vertical direction relative to the endoscopic image 200, and the edge upper end position and edge lower end position of the mask diameter can be set according to the relationship between the evaluation values ​​of each evaluation frame 210.

[0161] As described above, in the case of high-precision calculation processing, the mask type of the vignetting area 200A included in the endoscopic image 200 is set based on the correlation of the evaluation values ​​corresponding to the plurality of evaluation frames 210, and the edge left end position, edge right end position, edge upper end position and edge lower end position in the mask diameter corresponding to the mask type are set.

[0162] <Determine the processing flow>

[0163] Next, we will refer to Fig.15 The flowchart of FIG. 1 describes the flow of the determination process executed by the processor 161 of the control device 51. The determination process is executed after the process in the normal mode or the process in the high-precision calculation mode is executed.

[0164] In step S111 , the determination result determination unit 185 determines whether the recognition result is “recognition success” for N consecutive times and whether the mask type is the same mask type for N consecutive times.

[0165] The number of consecutive times N is 10 times or the like, and is compared with a preset threshold value to determine whether the result (recognition result and mask diameter information) is the same for a predetermined number of consecutive times. For example, the scope 101 is inserted into the body of the patient 4 via a trocar, but sometimes an erroneous determination such as light leakage is generated due to the use of the trocar. Here, the threshold is set by estimating the number of consecutive times N, for example, 10 times, for resisting interference in real time when the scope 101 is inserted into the trocar.

[0166] For example, if the time interval between the processing in the normal mode repeated N times (the interval between one and one) is represented by an image frame output in a time series, the time interval corresponds to about 5 frames. However, as the time interval increases to 10 frames, etc., the number of consecutive times N can be reduced, and if the time interval is set to 60 frames, interference can be avoided even if it is repeated twice. Here, the time interval between the processing is randomly set to 5 frames, and it is determined ten times in a row whether the determination result is the same based on the results of the detailed simulation of the inventor of the present disclosure. In addition, the actual time of inserting the scope 101 into the trocar is set to about 1 second, so it is necessary to set a threshold value according to the time interval and the number of consecutive times so that the parameter change processing based on the determination result determined incorrectly is not performed before and after the actual time.

[0167] The threshold value for determining the number of consecutive times N is not limited to the interference caused by the use of the trocar, and can be determined based on the interference caused by the presence of a high-brightness object such as forceps 23 or gauze in the imaging area of ​​the image sensor 152. In addition, the threshold value for determining the number of consecutive times N can be changed according to the surgical mode or the observation mode. The operation mode includes a mode corresponding to the operation, such as a laparoscopic mode, a cystoscopic mode, and an ear, nose, and throat mode. For example, because the ear hole is narrow, it is easy to make an erroneous determination, and therefore in the case of determining to set the ear, nose, and throat mode, the threshold value can be changed from 10 times to 60 times.

[0168] The observation mode includes a normal light observation mode and a special light observation mode. The normal light observation mode is a mode in which a white image captured when white light is emitted from the light source device 53 is displayed on the display device 52. The special light observation mode is a mode in which a special light image captured when special light such as IR light or narrow-band light is emitted from the light source device 53 is displayed on the display device 52.

[0169] In the case of affirmative determination ("Yes") in the determination process of step S111, the process proceeds to step S112. In step S112, the notification target setting unit 186 sets the recognition result and mask diameter information determined in the current process as notification targets to be notified to the external module.

[0170] On the other hand, in the case of negative determination (No) in the determination processing of step S111, the process proceeds to step S113. In step S113, the notification target setting unit 186 sets the recognition result and mask diameter information determined in the previous process as notification targets to be notified to the external module.

[0171] Fig.16 : is a diagram showing an embodiment of recognition results and mask diameter information notified to an external module.

[0172] like Fig.16 As shown, a value indicating "stop" or "recognition success" is set in the recognition result. In the mask diameter information, values ​​indicating "type 0", "type 1", "type 2", "type 3", and "type 4" are set as mask types. "Type 0" means no (no rigid mirror). "Type 1", "type 2", "type 3", and "type 4" represent the sizes of the mask plate diameter, and the sizes of the mask plate diameter decrease in sequence. That is, the maximum size is "type 1" (large), the second maximum size is "type 2" (medium), the third maximum size is "type 3" (small), and the minimum size is "type 4" (smallest).

[0173] For example, in the case where ten times is set as the threshold used in the determination of the continuous number of times N, the process in the normal mode is repeated ten times at a predetermined time interval, and in the case where the recognition result obtained in the process in the normal mode is "recognition success" ten times in a row and the mask type obtained in the process in the normal mode is "type 4" ten times in a row, it is determined to be positive ("yes") in the determination process of step S111. In this case (S111: "yes"), the recognition result of "recognition success" and the mask type of "type 4" are set as the notification target (S112).

[0174] In addition, when the processing in the normal mode is repeated ten times at a predetermined time interval, and the recognition result obtained by the processing in the normal mode is not "recognition successful" for ten consecutive times (for example, when at least one time is "stop"), or when the mask type obtained by the processing in the normal mode is not "type 4" for ten consecutive times (for example, when at least one time is another mask type (such as "type 3")), it is determined to be negative ("No") in the determination processing of step S111.

[0175] In this case (S111: "No"), instead of the recognition result and mask type obtained in the current processing (the processing in the normal mode to be determined this time), the recognition result and mask type determined in the previous processing are set as the notification target. That is, in the processing of the normal mode as the previously determined target, in the case where the recognition result is "recognition success" ten times in a row and the mask type is "type 4" ten times in a row, the recognition result of "recognition success" and the mask type of "type 4" are set as the notification target (S113). Note that the default notification target at the start of the processing can be set, and for example, the minimum size "type 4" (minimum value) can be set as the default mask type.

[0176] The processing in step S112 or step S113 ends, and the processing proceeds to step S114. In step S114, the set recognition result and mask diameter information are notified to the external module.

[0177] For example, the external module includes a module related to AE or AF. That is, in the case of performing AE or AF, it is necessary to set an area of ​​an evaluation frame in the observation area 200B which is a valid area in the endoscopic image 200. However, the module related to AE or AF is notified of the recognition result and the mask diameter information so that the evaluation frame can be set in the observation area 200B. As a result, the module related to AE or AF can control AE or AF based on the pixel signal in the evaluation frame set in the observation area 200B.

[0178] As described above, in the processing in the normal mode, the mask diameter information and the like are repeatedly determined at predetermined time intervals, and in the case where the determination result (mask diameter information and the like) is the same for a predetermined number of times (for example, ten times) in succession, a parameter change process (for example, a process of changing the area of ​​the AE or AF evaluation frame) based on the determination result (mask diameter information and the like) is performed. That is, only in the case where the determination result is the same for a predetermined number of times in succession, the parameter is switched to a parameter corresponding to the determination result. Note that in the case where the same notification target is repeatedly set to the same external module, the second and subsequent determination results may not be notified.

[0179] In the case of executing the processing in the high-precision calculation mode, in addition to the first to third processes, the high-precision calculation processing (S63) is also executed, and therefore, the edge left end position, edge right end position, edge upper end position, and edge lower end position of the mask diameter are set together with the recognition result and the mask diameter information. Therefore, the diameter of the mask diameter and the center position of the mask can be obtained using these edge positions.

[0180] For example, in the case where the allowable error range is narrow, etc., it is necessary to obtain the mask diameter and the center position more accurately, and in this case, the high-precision calculation mode is set as the operation mode. In this case, the processing in the high-precision calculation mode is repeatedly performed, for example, in the case where at least one of the diameter of the mask diameter and the center position of the mask is continuously the same for a predetermined number of times (for example, ten times), the parameter change processing based on the determination result (at least one of the diameter of the mask diameter and the center position of the mask) can be performed. As a result, in the case of operating in the high-precision calculation mode, the diameter of the mask diameter and the center position of the mask are always obtained with high accuracy, and the evaluation frame can be set more accurately, so that appropriate AE and AF control can be performed.

[0181] When the process of step S114 is completed, the series of processes are completed, and the process returns to Figure 7 Step S10 is performed, and the above process is repeated.

[0182] The flow of the determination process has been described above. In this determination process, in a case where the determination result (mask diameter information, etc.) obtained by repeatedly determining the size of the observation area as an area different from the vignetting area generated by the scope 101 on the image sensor 152 at predetermined time intervals is continuous the same predetermined number of times, the parameter change process based on the determination result is performed. In other words, it can also be said that the size of the observation area is determined at least two or more times, and the parameter change process is performed based on the comparison result obtained by comparing the two or more determination results. In addition, it can also be said that the type of the scope 101 (mask type) is determined in order to determine the size of the observation area.

[0183] In this way, by repeating the observation area determination process (processing in the normal mode) corresponding to the type of the scope 101 (mask type) at predetermined time intervals, and determining whether the determination result is continuous for a predetermined number of times, for example, even in the case of the influence of noise, it is possible to suppress erroneous determination when determining the observation area. For example, even in the case where a high-brightness object such as forceps 23 or gauze is present in the imaging area, or the scope 101 is inserted into the patient's body through a trocar, it is possible to suppress erroneous determination when determining the observation area.

[0184] <Modification>

[0185] In addition, the mask determination processing is performed when the operation is performed in the normal light observation mode, but the mask determination processing can also be performed when the operation is performed in the special light observation mode. Here, the processing that includes at least the processing in the normal mode that is repeatedly performed at a predetermined time interval is referred to as the mask determination processing. The mask determination processing may include the determination processing. Alternatively, in the case of switching the normal light observation mode to the special light observation mode, it is possible to use parameters based on the determination results (mask diameter information, etc.) obtained during operation in the normal light observation mode. That is, it is preferred that, in the case of switching to the special light observation mode, when operating in the special light observation mode, the mask determination processing is stopped immediately before switching to the special light observation mode, and the parameters corresponding to the determination results are used.

[0186] Since the image captured in the special light observation mode is different from the image captured in the normal light observation mode, special processing needs to be added, which increases the complexity of the system. On the other hand, in the observation in the special light observation mode, the mirror body 101 is rarely replaced. In the case of changing the insertion position or changing the observation target, the mirror body 101 is often replaced, and in the case of switching to the special light observation mode, it is often desired to observe the area observed in the normal light observation mode by further performing certain processing. Therefore, in the case of switching to the special light observation mode, by using the settings of the normal light observation mode, it is possible to cope with the change without increasing the complexity of the system.

[0187] In addition, when switching the special light observation mode to the normal light observation mode and returning to the normal light observation mode, the mask determination process can be started again. The switching between the normal light observation mode and the special light observation mode can be performed according to the operation of the user on the input device 54, or can be performed according to the operation on the operation unit provided by the operating room integrated system (not shown) connected to the endoscopic surgery system 1 through the network.

[0188] Note that during operation in the special light observation mode, it is reasonable to stop the mask determination processing as described above, but, in the case of performing the mask determination processing, the value of the number of times N can be set to, for example, 60 times so that it is larger than the number in the normal light observation mode, or the area of ​​the evaluation frame of AE or AF can be fixedly set in the center part.

[0189] In addition, in the case where white light and IR light are alternately emitted from the light source device 53, it is also preferable to stop the mask determination processing. AE can be controlled only by a white image captured when white light is emitted, or the mask determination processing can be performed by extracting the white image by image processing. However, since it is rare to replace the scope 101 like the special light observation mode, it is reasonable to stop the mask determination processing. It should be noted that when the mask determination processing is performed, each RGB signal included in the image signal output from the camera 102 can be weighted.

[0190] like Fig.17 As shown in FIG. 2 , an icon 251 corresponding to the scope 101 estimated to be currently connected may be displayed together with the endoscopic image 200. Fig.17 In the embodiment of FIG. 1 , because the mask type “Type 4” is set as the mask diameter information by the mask determination process, the icon 251 indicating “Type 4” is displayed. For example, the icon 251 can be displayed at a predetermined timing such as when the mask determination process is executed or when the mask diameter information to be notified is changed (when the scope 101 is replaced). Fig.18 As shown, a virtual frame 252 representing a valid area to be subjected to AE or AF may be displayed in an observation area 200B included in the endoscopic image 200 .

[0191] In the case where it is detected that a high-brightness object such as forceps 23 or gauze has entered the imaging area of ​​the image sensor 152, the mask determination process can be stopped. It is also possible to specify an area of ​​forceps 23, gauze, etc. in the endoscopic image 200 and exclude the area from the target area. In the detection of forceps 23, gauze, etc., it is also possible to determine that forceps 23, gauze, etc. exist when the determination result of the mask determination process changes significantly or changes multiple times in a short period of time. Alternatively, it is also possible to determine that forceps 23, gauze, etc. exist when it is determined that the mask diameter information changes without the disassembly state of the scope 101.

[0192] Furthermore, in the case of the gauze, it is assumed that so-called overexposed bright spots continue to occur when the image is captured closely. As a method of coping with such an event, for example, monitoring is performed in time series so that the evaluation value of the area determined as the vignetting area 200A can be measured in advance, and when a change is detected in the outer area during the mask determination process, the threshold used in the mask determination process (for example, the threshold of the time interval or the threshold of the number of consecutive times) can be changed.

[0193] It should be noted that the embodiments of the present disclosure are not limited to the above-described embodiments, and various modifications may be made without departing from the scope of the present disclosure. In addition, the effects described in this specification are merely examples and are not restrictive, and other effects may be achieved.

[0194] In addition, each step described in the above flowchart can be performed by one device, or can be performed by multiple devices in a shared manner. In addition, when multiple processes are included in one step, the multiple processes included in one step can be performed by one device or shared and performed by multiple devices.

[0195] In this specification, a system is intended to mean a group of multiple components (devices, modules (components), etc.), and it does not matter whether all the components are arranged in the same housing. Therefore, multiple devices housed in separate housings and connected via a network and a single device with multiple modules arranged in one housing are both systems.

[0196] Furthermore, the present disclosure may have the following configurations. (1)

[0198] An endoscope system, comprising:

[0199] an imaging device connected to the insertion unit, receiving the light guided by the image sensor through the insertion unit to perform imaging; and

[0200] A control device controls the imaging device, wherein

[0201] The control device includes one or more processors and one or more storage devices storing programs, and

[0202] The processor executes the program to:

[0203] determining at least twice or more a size of an observation area different from a vignetting area generated on the image sensor by the interpolation unit; and

[0204] Parameter changing processing based on the determination result is performed based on a comparison result of the comparison of the two or more determination results. (2)

[0206] The endoscope system according to (1) above, wherein:

[0207] processor

[0208] repeatedly determining the size of the observation area at predetermined time intervals, and

[0209] In the case where the determination results are the same for a predetermined number of times in succession, the parameter changing process is performed. (3)

[0211] The endoscope system according to (2) above, wherein:

[0212] processor

[0213] In a case where the determination results are the same for a predetermined number of consecutive times, using a parameter based on the determination result obtained in the current determination, and

[0214] In a case where the determination results are not the same for a predetermined number of consecutive times, a parameter based on the determination result obtained in the last determination is used. (4)

[0216] An endoscope system according to any one of (1) to (3) above, wherein:

[0217] The parameter changing process includes a process of changing the area of ​​the evaluation frame of automatic exposure (AE) or automatic focus (AF). (5)

[0219] An endoscope system according to (2) or (3) above, wherein:

[0220] The processor compares the number of consecutive determination results with a threshold value predetermined according to interference to determine whether the determination results are the same for a consecutive predetermined number of times. (6)

[0222] The endoscope system according to (5) above, wherein:

[0223] The processor changes the threshold value depending on the surgical mode or the observation mode. (7)

[0225] An endoscope system according to (2) or (3) above, wherein:

[0226] The processor repeatedly determines the size of the observation area at predetermined time intervals in the case of the normal light observation mode or the special light observation mode. (8)

[0228] The endoscope system according to (7) above, wherein:

[0229] When switching from the normal light observation mode to the special light observation mode, the processor uses parameters based on the determination result when operating in the normal light observation mode. (9)

[0231] An endoscope system according to any one of (1) to (8) above, wherein:

[0232] The processor controls information on the size of the insertion unit corresponding to the size of the observation area to be displayed together with the endoscopic image based on the image signal output from the imaging device. (10)

[0234] The endoscope system according to (9) above, wherein:

[0235] The processor controls display of a virtual frame indicating a valid area to be subjected to AE or AF with respect to an observation area included in the endoscopic image. (11)

[0237] A control method, comprising:

[0238] The imaging device is controlled by the control device, the insertion unit is connected to the imaging device and the image sensor receives the light guided through the insertion unit and captures an image,

[0239] determining at least twice or more a size of an observation area different from a vignetting area generated on the image sensor by the interpolation unit; and

[0240] Parameter changing processing based on the determination result is performed based on a comparison result of the comparison of the two or more determination results. (12)

[0242] A program that enables a computer to function as a control device.

[0243] The control device determines a size of an observation area different from a vignetting area generated on an image sensor by an insertion unit connected to an imaging device, the imaging device receives light guided by the image sensor through the insertion unit and captures an image, and

[0244] Parameter changing processing based on the determination result is performed based on a comparison result of the comparison of the two or more determination results.

[0245] Reference numerals list

[0246] 1 Endoscopic surgery system

[0247] 10. Endoscope

[0248] 20 Surgical instruments

[0249] 30 Support arm device

[0250] 51 Control device

[0251] 52 Display device

[0252] 53 Light source device

[0253] 54 Input Device

[0254] 55 Treatment equipment control device

[0255] 56 Pneumoperitoneum device

[0256] 57 Recorder

[0257] 58 Printer

[0258] 101 Mirror

[0259] 102 Camera

[0260] 151 lens unit

[0261] 152 Image Sensor

[0262] 153 Driving Circuit

[0263] 154 Communication Circuit

[0264] 155 Camera control circuit

[0265] 161, 161-1 to 161-i processors

[0266] 162, 162-1 to 162-j storage device

[0267] 163 Communication Circuit

[0268] 171 Control Program

[0269] 181 Evaluation frame setting unit

[0270] 182 Evaluation value calculation unit

[0271] 183 Evaluation value determination unit

[0272] 184 Determine result setting unit

[0273] 185 Determine the result determination unit

[0274] 186 Notification target setting unit

Claims

1. An endoscope system, comprising: an imaging device to which the insertion unit is connected, the imaging device receiving the light guided through the insertion unit by an image sensor to capture an image; as well as A control device controls the imaging device, wherein: The control device includes one or more processors and one or more storage devices storing programs, and The processor executes the program to: determining at least twice or more a size of an observation area different from a vignetted area generated on the image sensor by the interpolation unit; as well as Based on a comparison result of the comparison of the two or more determination results, a parameter changing process based on the determination result is performed.

2. The endoscope system according to claim 1, wherein: The processor repeatedly determining the size of the observation area at predetermined time intervals, and In a case where the determination result is the same for a predetermined number of times in succession, the parameter changing process is performed.

3. The endoscope system according to claim 2, wherein: The processor In a case where the determination result is the same for a predetermined number of consecutive times, using a parameter based on the determination result obtained in the current determination, and In a case where the determination result is different for a predetermined number of consecutive times, a parameter based on the determination result obtained in the last determination is used.

4. The endoscope system according to claim 1, wherein: The parameter changing process includes a process of changing an area of ​​an evaluation frame of automatic exposure AE or automatic focus AF.

5. The endoscope system according to claim 2, wherein: The processor compares the number of times the determination result is continuous with a threshold value predetermined according to interference to determine whether the determination result is the same for a predetermined number of times.

6. The endoscope system according to claim 5, wherein: The processor changes the threshold value according to a surgical mode or an observation mode.

7. The endoscope system according to claim 2, wherein: The processor repeatedly determines the size of the observation area at predetermined time intervals during operation in a normal light observation mode or a special light observation mode.

8. The endoscope system according to claim 7, wherein: When switching from the normal light observation mode to the special light observation mode, the processor uses a parameter based on a determination result obtained during operation in the normal light observation mode.

9. The endoscope system according to claim 1, wherein: The processor controls information on a size of the insertion unit corresponding to a size of the observation area and display of an endoscopic image based on an image signal output from the imaging device.

10. The endoscope system according to claim 9, wherein: The processor controls display of a virtual frame indicating a valid area to be subjected to AE or AF with respect to the observation area included in the endoscopic image.

11. A control method, comprising: an imaging device to which the insertion unit is connected and to which an image sensor receives light guided through the insertion unit and captures an image, controlled by the control device, determining at least twice or more a size of an observation area different from a vignetted area generated on the image sensor by the interpolation unit; as well as Based on a comparison result of the comparison of the two or more determination results, a parameter changing process based on the determination result is performed.

12. A program for causing a computer to function as a control device, The control device determines at least twice or more the size of the observation area different from the vignetting area generated on the image sensor by the insertion unit connected to the imaging device, the image sensor receiving the light guided by the insertion unit and capturing the image, and Based on a comparison result of the comparison of the two or more determination results, a parameter changing process based on the determination result is performed.