Automatic defogging endoscope control device and method

By integrating a transparent conductive film layer and a defogging control circuit on the endoscope, it automatically analyzes the fog index and heats the transparent conductive film layer, solving the problem of endoscope fogging, achieving automatic defogging, and improving convenience of use and temperature control. Accuracy.

CN117958720BActive Publication Date: 2024-09-13NANJING NUOYUAN MEDICAL DEVICES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410136684.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-31
Publication Date
2024-09-13
Estimated Expiration
2044-01-31

AI Technical Summary

Technical Problem

Endoscopes are prone to fog formation due to temperature differences during use. Existing defogging methods require additional equipment and are inconvenient to operate, and lack automated solutions.

Method used

An endoscope control device with automatic defogging is designed, including a transparent conductive film layer and a defogging control circuit. The computing module analyzes the digital image to generate control instructions, and uses the PWM control module to heat the transparent conductive film layer to achieve endoscopic vision. Automatic defogging of the mirror.

Benefits of technology

There is no need for additional external heating means. The transparent conductive film layer is self-heating and has precise temperature control, which reduces user operations, improves convenience of use, and maintains high light transmittance and biocompatibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117958720B
    Figure CN117958720B
Patent Text Reader

Abstract

The present invention provides an automatic defogging endoscope control device and method, comprising: an objective lens protection lens, fixedly connected to the outer side of an objective lens of an endoscope, and a transparent conductive film layer evaporated on one side of the inner side of the objective lens protection lens; a defogging control circuit, respectively connected to electrodes of the transparent conductive film layer, and used for responding to control instructions to heat the transparent conductive film layer; a computing module, connected to the defogging control circuit, and used for analyzing a digital image of the endoscope to obtain a corresponding fog index, and generating a control instruction based on the fog index and sending it to the defogging control circuit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to endoscope technology, and in particular to an automatic defogging endoscope control device and method. Background Art

[0002] Endoscopes are usually inserted into the human body through the human cavity to achieve intuitive observation of the state of tissues and organs inside the human body and medical examination. Its application in the medical field has a history of decades. With the development of optoelectronic technology, the application scope of endoscopes has gradually expanded. It has been widely used in general surgery, thoracic surgery, urology, obstetrics and gynecology, otolaryngology and other medical clinical fields. The outstanding features of using endoscopes for surgical operations are small surgical incisions, clear intraoperative vision, precise and accurate operation, small iatrogenic damage, and fast recovery, which are very consistent with the requirements of minimally invasive surgery.

[0003] As endoscopes are made of glass and metal, the endoscope lens is prone to fogging when the human body is observed closely, especially when used for the first time. Due to the temperature difference between the endoscope and the human body, water vapor will inevitably condense on the surface of the endoscope lens. In addition, the high humidity in the surgical area and the gasification of human tissue caused by ultrasonic scalpels increase the frequency of endoscope fogging.

[0004] A common defogging method is to heat the endoscope by using an endoscope heater or a thermos cup to reduce the condensation of water vapor in the endoscope. However, this method requires the preparation of an additional endoscope heater, which makes defogging during surgery very inconvenient.

[0005] Therefore, how to automatically defog the endoscope to effectively reduce the user's extra operations and make it more convenient to use has become an urgent problem that needs to be solved. Summary of the invention

[0006] The embodiments of the present invention provide an endoscope control device and method for automatic defogging, which can automatically defog the endoscope, effectively reduce the user's extra operations, and make it more convenient to use.

[0007] An embodiment of the present invention provides an automatic defogging endoscope control device, comprising:

[0008] An objective lens protection lens is fixedly connected to the outer side of the objective lens of the endoscope, and a transparent conductive film layer is evaporated on one side of the inner side of the objective lens protection lens;

[0009] The defogging control circuit is connected to the electrodes of the transparent conductive film layer respectively, and is used for controlling the heating of the transparent conductive film layer in response to the control instruction;

[0010] The computing module is connected to the defogging control circuit and is used to analyze the digital image of the endoscope to obtain a corresponding fog index, and to generate a control instruction based on the fog index and send it to the defogging control circuit.

[0011] The embodiment of the present invention also provides an automatic defogging endoscope control method, comprising:

[0012] The calculation module receives the digital image of the digital imaging module of the endoscope, analyzes the digital image based on a preset fog detection algorithm to obtain the fog index of the objective lens, and generates corresponding control instructions according to the fog index;

[0013] After receiving the control instruction, the single chip microcomputer of the defogging control circuit generates duty cycle control information for the PWM control module according to the control instruction, and the PWM control module heats the transparent conductive film layer in response to the duty cycle control information;

[0014] The value corresponding to the duty cycle control information is adjusted to 1, the AD sampling module of the defogging control circuit detects the power of the transparent conductive film layer to obtain corresponding power information, and the single chip microcomputer generates temperature information corresponding to the transparent conductive film layer based on the power information;

[0015] Display information corresponding to the endoscope is obtained according to the temperature information and the heating information of the transparent conductive film layer.

[0016] Optionally, the calculation module receives a digital image of a digital imaging module of an endoscope, analyzes the digital image based on a preset fog detection algorithm to obtain a fog index of the objective lens, and generates a corresponding control instruction according to the fog index, including:

[0017] Calculating a dark channel image of the digital image and a corresponding configuration grayscale value, sorting the configuration grayscale values ​​in descending order to obtain a dark channel image sequence, and selecting a front preset number of dark channel images to obtain an image set;

[0018] Determine the pixel points corresponding to the pixel points with corresponding grayscale values ​​in the image set in the original digital image, and obtain the RGB pixel values ​​corresponding to the corresponding pixel points;

[0019] A fog index of the objective lens is obtained by comprehensive calculation based on the RGB pixel values, and a corresponding control instruction is generated according to the fog index, and each fog index has a corresponding control instruction.

[0020] Optionally, calculating the dark channel image of the digital image and the corresponding configuration grayscale value, sorting the configuration grayscale values ​​in descending order to obtain a dark channel image sequence, and selecting a front preset number of dark channel images to obtain an image set includes:

[0021] Taking each pixel point in the digital image as a target pixel point in turn, determining a corresponding acquisition window according to the position of each target pixel point in the digital image, and setting the acquisition window corresponding to the target pixel point;

[0022] All pixels other than the target pixel collected by the collection window are taken as pixels to be processed, the pixel with the smallest gray value among all the pixels to be processed and the target pixel is determined as the selected pixel, and the gray value corresponding to the selected pixel is taken as the configured gray value of the target pixel;

[0023] After determining and obtaining the configuration grayscale values ​​corresponding to all target pixels, the target pixels corresponding to each target pixel are sorted in descending order according to the configuration grayscale values ​​to obtain a dark channel image sequence.

[0024] Optionally, sequentially taking each pixel point in the digital image as a target pixel point, determining a corresponding acquisition window according to a position of each target pixel point in the digital image, and setting the acquisition window corresponding to the target pixel point includes:

[0025] Determine an initial acquisition window corresponding to each target pixel point, wherein the acquisition window includes a target slot located in the center and slots to be processed located around the target slot, and there are 5 slots in the acquisition window;

[0026] The target slot in the initial acquisition window is set correspondingly to the target pixel point. If it is determined that other slots to be processed in the acquisition window have corresponding pixel points, the corresponding target pixel point is set correspondingly to the initial acquisition window;

[0027] If it is determined that there is a slot to be processed that does not correspond to a pixel point in the acquisition window, the corresponding slot to be processed is deleted from the acquisition window, and the acquired acquisition window is obtained to be set corresponding to the target pixel point;

[0028] If it is determined that the deleted slots to be processed are greater than 1, the acquisition window is subjected to shape adjustment processing to obtain a processed acquisition window that is set corresponding to the target pixel point.

[0029] Optionally, if it is determined that the deleted slots to be processed are greater than 1, the acquisition window is subjected to shape adjustment processing to obtain a processed acquisition window corresponding to the target pixel point, including:

[0030] If it is determined that the number of the deleted slots to be processed is greater than 1, the remaining slots to be processed are determined, and the adjacent pixel points corresponding to the pixel points of each slot to be processed are obtained, and the coordinates of the adjacent pixel points are compared;

[0031] If it is determined that the pixels of the remaining slots to be processed have the same adjacent pixels, the same adjacent pixels are selected as supplementary pixels;

[0032] A corresponding supplementary slot is generated at the supplementary pixel point, and a collection window with an adjusted shape is obtained according to the supplementary slot, the remaining slots to be processed and the target slot.

[0033] Optionally, sequentially taking each pixel point in the digital image as a target pixel point, determining a corresponding acquisition window according to a position of each target pixel point in the digital image, and setting the acquisition window corresponding to the target pixel point includes:

[0034] Obtaining the two-dimensional coordinates corresponding to each pixel point in the digital image, and determining the coordinate extreme values ​​in the two-dimensional coordinates, wherein the coordinate extreme values ​​at least include the maximum value of the horizontal coordinate, the maximum value of the vertical coordinate, the minimum value of the horizontal coordinate, and the minimum value of the vertical coordinate;

[0035] Classifying the two-dimensional coordinates without coordinate extreme values ​​into a first set, and adding a collection window of a standard shape to the first set;

[0036] Classify the two-dimensional coordinates having only any one of the maximum value of the horizontal coordinate, the maximum value of the vertical coordinate, the minimum value of the horizontal coordinate, and the minimum value of the vertical coordinate into corresponding second-category sets, each of which has any one of the corresponding maximum value of the horizontal coordinate, the maximum value of the vertical coordinate, the minimum value of the horizontal coordinate, or the minimum value of the vertical coordinate, and each of which has a preset acquisition window of a non-standard shape;

[0037] The two-dimensional coordinates that have both the maximum and minimum values ​​of the horizontal coordinate or the maximum and minimum values ​​of the vertical coordinate are classified into corresponding third-category sets, each third-category set has corresponding two of the maximum and minimum values ​​of the horizontal coordinate, the maximum and minimum values ​​of the vertical coordinate, the minimum value of the horizontal coordinate or the minimum value of the vertical coordinate, and each third-category set has a preset non-standard shape acquisition window.

[0038] Optionally, the fog index of the objective lens is obtained by comprehensive calculation based on the RGB pixel value, and a corresponding control instruction is generated according to the fog index, and each fog index has a corresponding control instruction, including:

[0039] The RGB pixel values ​​corresponding to all the pixels are summed and then the average is calculated to obtain an average RGB pixel value, and the average red value, average green value and average blue value in the average RGB pixel value are extracted;

[0040] The fog index of the objective lens is calculated by the following formula:

[0041] V=(0.3R+0.59G+0.11B) / 255.0

[0042] Among them, V is the fog index of the objective lens, R is the average red value, G is the average green value, and B is the average blue value;

[0043] When it is determined that the fog index is greater than a first specific value, generating a defogging control instruction;

[0044] When it is determined that the fog index is less than a second specific value, generating a control instruction to stop defogging;

[0045] After it is determined that the defogging control instruction is generated for a first preset time and the fog index is greater than a second specific value, a corresponding manual processing control instruction is output.

[0046] Optionally, after receiving the control instruction, the single chip microcomputer of the defogging control circuit generates duty cycle control information for the PWM control module according to the control instruction, and the PWM control module heats the transparent conductive film layer in response to the duty cycle control information, including:

[0047] The single chip microcomputer determines the corresponding duty cycle control information according to the control instruction, and different control instructions have corresponding duty cycle control information;

[0048] The PWM control module outputs corresponding electric energy information to the transparent conductive film layer based on the duty cycle control information, and the value of the duty cycle control information is proportional to the value of the heating electric energy of the transparent conductive film layer.

[0049] Optionally, the AD sampling module of the defogging control circuit detects the electric energy of the transparent conductive film layer to obtain corresponding electric energy information, and the single chip microcomputer generates temperature information corresponding to the transparent conductive film layer based on the electric energy information, including:

[0050] Obtaining a resistance value corresponding to the transparent conductive film layer according to the voltage value and the current value in the electric energy information, wherein the transparent conductive film layer is an ITO film with anti-reflection in the wavelength range of 400nm to 850nm;

[0051] The temperature information corresponding to the current ITO film is obtained by calculating the resistance value and the temperature-resistance function relationship of the ITO film. The temperature-resistance function relationship is obtained by actual measurement and linear regression before assembling the endoscope.

[0052] Beneficial effects:

[0053] 1. The endoscope is self-heated through the sapphire-coated transparent conductive film layer, without the need for additional external heating means. The transparent conductive film has a uniform surface and high light transmittance without affecting the imaging effect. The transparent conductive film layer protects the inner side of the glass from evaporation, making it less susceptible to environmental influences, wear and aging, and does not affect biocompatibility.

[0054] 2. The temperature of the endoscope surface can be precisely controlled through the control circuit using only two electrode wires, and the temperature estimation can be achieved by making full use of the characteristics of the transparent conductive film layer. No additional temperature measurement circuit is required, which effectively reduces the number of endoscope cables.

[0055] 3. The calculation module is used to automatically analyze the fog level in the endoscope surgical field, and the defogging function can be automatically started, which effectively reduces the user's additional operations and makes it more convenient to use. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 This is a schematic diagram of the structure of an endoscope control device with automatic defogging provided by the present invention;

[0057] Figure 2 This is a schematic diagram provided by this solution to show the slots to be processed. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein.

[0060] It should be understood that in various embodiments of the present invention, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0061] It should be understood that in the present invention, "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products or apparatuses.

[0062] It should be understood that in the present invention, "plurality" refers to two or more than two. "And / or" is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "Contains A, B and C", "Contains A, B, C" means that A, B, and C are all included, "Contains A, B or C" means that one of A, B, and C is included, and "Contains A, B and / or C" means that any one, any two, or any three of A, B, and C are included.

[0063] It should be understood that in the present invention, "B corresponding to A", "B corresponding to A", "A corresponds to B" or "B corresponds to A" means that B is associated with A and B can be determined based on A. Determining B based on A does not mean determining B based only on A, but B can also be determined based on A and / or other information. A and B match when the similarity between A and B is greater than or equal to a preset threshold.

[0064] Depending on the context, "if" as used herein may be interpreted as "when" or "when" or "in response to determining" or "in response to detecting."

[0065] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0066] See also Figure 1 The present invention provides an automatic defogging endoscope control device, comprising:

[0067] The objective lens protection lens is fixedly connected to the outer side of the objective lens of the endoscope, and a transparent conductive film layer is evaporated on one side of the inner side of the objective lens protection lens.

[0068] The objective lens protection lens is fixedly connected to the outer side of the objective lens of the endoscope to protect the endoscope body. A transparent conductive film layer is evaporated on one side of the inner side of the objective lens protection lens, and the transparent conductive film layer is controlled by instructions to perform a defogging operation. In practical applications, the preferred material of the objective lens protection lens is a sapphire lens, and the transparent conductive film layer can be an ITO film with a 400-850nm band anti-reflection.

[0069] The defogging control circuit is connected to the electrodes of the transparent conductive film layer respectively, and is used for responding to the control instruction to control the heating of the transparent conductive film layer.

[0070] The transparent conductive film layer has two electrodes, and the two electrodes are connected to the defogging control circuit.

[0071] The computing module is connected to the defogging control circuit and is used to analyze the digital image of the endoscope to obtain a corresponding fog index, and to generate a control instruction based on the fog index and send it to the defogging control circuit.

[0072] The calculation module is used to control the defogging control circuit to operate. It will first analyze the digital image of the endoscope to obtain the corresponding fog index, and then generate a control instruction based on the fog index and send it to the defogging control circuit.

[0073] It is worth mentioning that this solution will also provide a digital imaging module, which is clamped on the endoscope body to realize digital imaging of the endoscope and transmit it to the computing module for analysis.

[0074] In practical applications, the structure of the defogging control circuit can be Figure 1 , which may include a voltage and current AD sampling module and a PWM control module, wherein the voltage and current AD sampling module realizes current and voltage detection of the electrode wire, and the electrode wire is connected to the circuit PWM control module. After receiving the control instruction, the single-chip microcomputer of the defogging control circuit generates duty cycle control information for the PWM control module according to the control instruction, and the PWM control module heats the transparent conductive film layer in response to the duty cycle control information.

[0075] This solution provides an automatic defogging endoscope control method, including S1-S4:

[0076] S1, the computing module receives the digital image of the digital imaging module of the endoscope, analyzes the digital image based on a preset fog detection algorithm to obtain the fog index of the objective lens, and generates corresponding control instructions according to the fog index.

[0077] First, this solution will combine the digital imaging module to collect digital images of the endoscope, and then the computing module can analyze the collected digital images, and combine the preset fog detection algorithm to analyze the digital images to obtain the fog index of the objective lens, and finally use the fog index to generate corresponding control instructions to perform defogging operations.

[0078] In some embodiments, the computing module receives a digital image of a digital imaging module of an endoscope, analyzes the digital image based on a preset fog detection algorithm to obtain a fog index of the objective lens, and generates a corresponding control instruction according to the fog index, including S11-S13:

[0079] S11, calculating the dark channel image of the digital image and the corresponding configuration grayscale value, sorting the configuration grayscale values ​​in descending order to obtain a dark channel image sequence, and selecting a front preset number of dark channel images to obtain an image set.

[0080] First, this scheme calculates the dark channel image of the digital image and the corresponding configuration grayscale value, then sorts the configuration grayscale value in descending order to obtain a dark channel image sequence, and finally selects a preset number of dark channel images at the front to obtain an image set.

[0081] It can be understood that this scheme will select part of the data to obtain an image set. When selecting, the configuration grayscale value of the dark channel image is combined to perform descending sorting and selection, and the image set with a large configuration grayscale value is selected first. The method for determining the dark channel image is described below.

[0082] The step of calculating the dark channel image of the digital image and the corresponding configuration grayscale value, sorting the configuration grayscale values ​​in descending order to obtain a dark channel image sequence, and selecting a front preset number of dark channel images to obtain an image set includes S111-S113:

[0083] S111, taking each pixel point in the digital image as a target pixel point in turn, determining a corresponding acquisition window according to the position of each target pixel point in the digital image, and setting the acquisition window corresponding to the target pixel point.

[0084] First, this solution will take each pixel in the digital image as the target pixel in turn, and then determine the corresponding acquisition window according to the position of each target pixel in the digital image, and set the acquisition window corresponding to the target pixel. The description of the acquisition window is shown below.

[0085] The method of sequentially taking each pixel point in the digital image as a target pixel point, determining a corresponding acquisition window according to the position of each target pixel point in the digital image, and setting the acquisition window corresponding to the target pixel point includes S1111-S1114:

[0086] S1111, determine the initial acquisition window corresponding to each target pixel point, the acquisition window includes a target slot located in the center and slots to be processed located around the target slot, and there are 5 slots in the acquisition window.

[0087] It can be understood that the acquisition window of this solution includes a target slot located in the center and slots to be processed located around the target slot, and the number of slots in the acquisition window is 5. It can be understood that the acquisition window is a cross-shaped window.

[0088] S1112, setting the target slots in the initial acquisition window in correspondence with the target pixel points. If it is determined that other slots to be processed in the acquisition window have corresponding pixel points, the corresponding target pixel points are set in correspondence with the initial acquisition window.

[0089] This solution can set the target slot in the initial acquisition window to correspond to the target pixel point. If it is determined that other slots to be processed in the acquisition window have corresponding pixel points, it means that there are corresponding pixel points around the target pixel point. In this case, this solution will set the corresponding target pixel point to correspond to the initial acquisition window.

[0090] S1113, if it is determined that there is a slot to be processed that does not correspond to a pixel point in the acquisition window, the corresponding slot to be processed is deleted from the acquisition window, and the processed acquisition window is obtained and is set corresponding to the target pixel point.

[0091] It is worth mentioning that in some cases, there will be unprocessed slots in the acquisition window that do not correspond to pixels. For example, when the target pixel is located on the left side of the image, there will be no corresponding pixel on the left side of the acquisition window. At this time, this solution will delete the corresponding unprocessed slots from the acquisition window, and obtain the processed acquisition window corresponding to the target pixel. For example, the left side of the cross-shaped window is removed.

[0092] S1114, if it is determined that the deleted slots to be processed are greater than 1, the acquisition window is subjected to shape adjustment processing to obtain a processed acquisition window that is set corresponding to the target pixel point.

[0093] This solution will determine the number of slots to be deleted and processed. If the number of slots to be deleted is greater than 1, it means that the number of slots deleted is large. In this case, this solution needs to adjust the shape of the acquisition window to obtain the corresponding setting of the processed acquisition window and the target pixel point.

[0094] For example, when the target pixel is located in the upper left corner of the image, there will be no corresponding pixel above and to the left of the target pixel, so the number of slots to be processed that need to be deleted is 2. In this case, this solution needs to adjust the shape of the acquisition window to obtain a processed acquisition window that corresponds to the target pixel.

[0095] If it is determined that the deleted slots to be processed are greater than 1, the acquisition window is subjected to shape adjustment processing to obtain a processed acquisition window corresponding to the target pixel point, including S11141-S11143:

[0096] S11141, if it is determined that the deleted slots to be processed are greater than 1, the remaining slots to be processed are determined and the adjacent pixel points corresponding to the pixel points of each slot to be processed are obtained, and the coordinates of the adjacent pixel points are compared.

[0097] If it is determined that the number of slots to be deleted is greater than 1, this solution will first determine the remaining slots to be processed, obtain the adjacent pixel points corresponding to the pixel points of each slot to be processed, and then compare the coordinates of the adjacent pixel points.

[0098] S11142: If it is determined that the pixels of the remaining slots to be processed have the same adjacent pixels, the same adjacent pixels are selected as supplementary pixels.

[0099] If it is determined that the pixels of the remaining slots to be processed have the same adjacent pixels, the same adjacent pixels are selected as supplementary pixels.

[0100] See also Figure 2 , the same adjacent pixels of the two remaining slots to be processed are supplementary pixels.

[0101] S11143, generating a corresponding supplementary slot at the supplementary pixel point, and obtaining a collection window after shape adjustment according to the supplementary slot, the remaining slots to be processed and the target slot.

[0102] After determining the supplementary pixel points, this scheme will generate corresponding supplementary slots at the supplementary pixel points, and then obtain the shape-adjusted acquisition window according to the supplementary slots, the remaining slots to be processed, and the target slots, that is, Figure 2 The square collection window has 4 collection slots.

[0103] The method of sequentially taking each pixel point in the digital image as a target pixel point, determining a corresponding acquisition window according to the position of each target pixel point in the digital image, and setting the acquisition window corresponding to the target pixel point includes:

[0104] The two-dimensional coordinates corresponding to each pixel point in the digital image are obtained, and the coordinate extreme values ​​in the two-dimensional coordinates are determined, and the coordinate extreme values ​​at least include the maximum value of the horizontal coordinate, the maximum value of the vertical coordinate, the minimum value of the horizontal coordinate, and the minimum value of the vertical coordinate.

[0105] First, this scheme obtains the two-dimensional coordinates corresponding to each pixel point in the digital image and determines the coordinate extreme values ​​in the two-dimensional coordinates, where the coordinate extreme values ​​at least include the maximum value of the horizontal coordinate, the maximum value of the vertical coordinate, the minimum value of the horizontal coordinate, and the minimum value of the vertical coordinate.

[0106] The two-dimensional coordinates without extreme values ​​of coordinates are classified into a first set, and a collection window of a standard shape is added to the first set.

[0107] This solution will classify the two-dimensional coordinates without extreme coordinate values ​​into the first set, and add a standard-shaped acquisition window to the first set. The standard-shaped acquisition window is a cross-shaped acquisition window. It can be understood that, see Figure 2 , the two-dimensional coordinates without extreme values ​​are classified into the first set. Then the pixels in the first set are not edge pixels, but middle pixels. The complete data can be collected using the cross-shaped collection window.

[0108] The two-dimensional coordinates having only any one of the maximum value of the horizontal coordinate, the maximum value of the vertical coordinate, the minimum value of the horizontal coordinate, and the minimum value of the vertical coordinate are classified into the corresponding second category sets, each second category set has any one of the corresponding maximum value of the horizontal coordinate, the maximum value of the vertical coordinate, the minimum value of the horizontal coordinate, or the minimum value of the vertical coordinate, and each second category set has a preset non-standard shape acquisition window.

[0109] It can be understood that the pixel point corresponding to the two-dimensional coordinates having only the maximum value of the horizontal coordinate, the maximum value of the vertical coordinate, the minimum value of the horizontal coordinate, and the minimum value of the vertical coordinate is Figure 1 The edge pixels of the corner pixels are removed, that is, all the side pixels, minus the four corner pixels. This solution will match it with a preset non-standard shape acquisition window. The preset non-standard shape acquisition window is, for example, an acquisition window with one side slot of the cross-shaped acquisition window removed. For example, for Figure 2 If the pixel is the edge pixel on the left, the preset non-standard shape acquisition window is the acquisition window with the leftmost slot of the cross-shaped acquisition window removed.

[0110] The two-dimensional coordinates that have both the maximum and minimum values ​​of the horizontal coordinate or the maximum and minimum values ​​of the vertical coordinate are classified into corresponding third-category sets, each third-category set has corresponding two of the maximum and minimum values ​​of the horizontal coordinate, the maximum and minimum values ​​of the vertical coordinate, the minimum value of the horizontal coordinate or the minimum value of the vertical coordinate, and each third-category set has a preset non-standard shape acquisition window.

[0111] This solution will classify two-dimensional coordinates that have both the maximum and minimum values ​​of the horizontal coordinate or the maximum and minimum values ​​of the vertical coordinate into corresponding third-category sets, each third-category set has corresponding two maximum and maximum values ​​of the horizontal coordinate, maximum and minimum values ​​of the vertical coordinate, or minimum values ​​of the horizontal coordinate, and each third-category set has a preset non-standard shape acquisition window.

[0112] It can be understood that, from the above description, the two-dimensional coordinates corresponding to the third set are the four pixel points at the four corners, and the preset non-standard shape acquisition window matched by this solution is the square shape in the above embodiment. It is worth mentioning that the image corresponding to the acquisition window is the dark channel image.

[0113] S112, taking all the pixels except the target pixel collected by the collection window as the pixels to be processed, determining the pixel with the smallest grayscale value among all the pixels to be processed and the target pixel as the selected pixel, and taking the grayscale value corresponding to the selected pixel as the configured grayscale value of the target pixel.

[0114] This solution will take all pixels other than the target pixel collected by the acquisition window as the pixels to be processed, then find the pixel with the smallest grayscale value among all the pixels to be processed and the target pixel as the selected pixel, and finally take the grayscale value corresponding to the selected pixel as the configured grayscale value of the target pixel.

[0115] S113, after determining and obtaining the configuration grayscale values ​​corresponding to all target pixels, sort the target pixels corresponding to each target pixel in descending order according to the configuration grayscale values ​​to obtain a dark channel image sequence.

[0116] After determining the configuration grayscale values ​​corresponding to all target pixels, this solution will sort the target pixels corresponding to each target pixel in descending order according to the configuration grayscale value to obtain a dark channel image sequence.

[0117] S12, determining the pixel points corresponding to the pixel points with corresponding grayscale values ​​in the image set in the original digital image, and obtaining the RGB pixel values ​​corresponding to the corresponding pixel points.

[0118] This solution will determine the pixel points corresponding to the pixel points with corresponding grayscale values ​​in the image set in the original digital image, and obtain the RGB pixel values ​​corresponding to the corresponding pixel points.

[0119] S13, obtaining a fog index of the objective lens by comprehensive calculation based on the RGB pixel values, and generating a corresponding control instruction according to the fog index, wherein each fog index has a corresponding control instruction.

[0120] After obtaining the RGB pixel values, this solution will perform a comprehensive calculation based on the RGB pixel values ​​to obtain the fog index of the objective lens, and then generate corresponding control instructions based on the fog index. Each fog index has a corresponding control instruction, which can be preset.

[0121] In some embodiments, a fog index of the objective lens is obtained by comprehensive calculation based on the RGB pixel values, and a corresponding control instruction is generated according to the fog index, and each fog index has a corresponding control instruction, including S131-S134:

[0122] S131, summing up the RGB pixel values ​​corresponding to all the pixels and calculating the average value to obtain an average RGB pixel value, and extracting the average red value, average green value, and average blue value from the average RGB pixel value. This solution will sum up the RGB pixel values ​​corresponding to all the pixels and calculate the average value to obtain an average RGB pixel value, and extract the average red value, average green value, and average blue value from the average RGB pixel value.

[0123] The fog index of the objective lens is calculated by the following formula:

[0124] V=(0.3R+0.59G+0.11B) / 255.0

[0125] Among them, V is the fog index of the objective lens, R is the average red value, G is the average green value, and B is the average blue value.

[0126] S132, when it is determined that the fog index is greater than a first specific value, a defogging control instruction is generated.

[0127] In some embodiments, the first specific value is, for example, 0.2. When the fog index is greater than 0.2, a defogging control instruction is generated.

[0128] S133: When it is determined that the fog index is less than a second specific value, a control instruction to stop defog is generated.

[0129] In some embodiments, the second specific value is, for example, 0.05, and when the fog index is less than the second specific value, a control instruction to stop defog is generated.

[0130] S134, after determining that the defogging control instruction is generated for a first preset time and the fog index is greater than a second specific value, outputting a corresponding manual processing control instruction.

[0131] It is understandable that when the continuous heating time exceeds a certain time (preferably 60 seconds), when the fog value is still high (preferably higher than 0.05), this indicates that the dirt on the surface of the endoscope objective lens is not caused by water vapor, prompting the user to actively wipe the lens.

[0132] S2, after receiving the control instruction, the single chip microcomputer of the defogging control circuit generates duty cycle control information for the PWM control module according to the control instruction, and the PWM control module heats the transparent conductive film layer in response to the duty cycle control information.

[0133] After receiving the control instruction, the single chip microcomputer of the defogging control circuit of the present solution will generate duty cycle control information for the PWM control module according to the control instruction, and the PWM control module heats the transparent conductive film layer in response to the duty cycle control information.

[0134] In some embodiments, after receiving the control instruction, the single chip microcomputer of the defogging control circuit generates duty cycle control information for the PWM control module according to the control instruction, and the PWM control module heats the transparent conductive film layer in response to the duty cycle control information, including S21-S22:

[0135] S21, the single chip microcomputer determines corresponding duty cycle control information according to the control instruction, and different control instructions have corresponding duty cycle control information.

[0136] The single chip will determine the corresponding duty cycle control information in combination with the control instruction. Different control instructions have corresponding duty cycle control information. The above corresponding relationship is preset.

[0137] S22, the PWM control module outputs corresponding electric energy information to the transparent conductive film layer based on the duty cycle control information, and the value of the duty cycle control information is proportional to the value of the heating electric energy of the transparent conductive film layer.

[0138] After obtaining the duty cycle control information, the PWM control module will output corresponding electrical energy information to the transparent conductive film layer in combination with the duty cycle control information, wherein the value of the duty cycle control information is proportional to the value of the heating electrical energy of the transparent conductive film layer, that is, the higher the PWM duty cycle, the greater the heat generated by the transparent conductive film layer.

[0139] S3, after judging that the temperature detection state is reached after the preset time period, the value corresponding to the duty cycle control information is adjusted to 1, and the AD sampling module of the defogging control circuit detects the electric energy of the transparent conductive film layer to obtain the corresponding electric energy information, and the single chip generates the temperature information corresponding to the transparent conductive film layer based on the electric energy information.

[0140] It is understandable that this solution will adjust the value corresponding to the duty cycle control information to 1 after determining that the temperature detection state has been reached after the preset time period has been reached.

[0141] Afterwards, the AD sampling module of the defogging control circuit will detect the electric energy of the transparent conductive film layer to obtain the corresponding electric energy information, and the single chip microcomputer will use the electric energy information to generate the temperature information corresponding to the transparent conductive film layer. Through the above method, the surface temperature of the transparent conductive film layer can be detected at regular intervals (preferably 100ms to 1000ms). The temperature detection method is to set the duty cycle of PWM to 1, and the single chip microcomputer AD module detects the current of the electrode wire of the transparent conductive film layer. The resistance of the transparent conductive film layer can be calculated based on the voltage value and current.

[0142] In some embodiments, the AD sampling module of the defogging control circuit detects the power of the transparent conductive film layer to obtain corresponding power information, and the single chip microcomputer generates temperature information corresponding to the transparent conductive film layer based on the power information, including S31-S32:

[0143] S31, obtaining a resistance value corresponding to the transparent conductive film layer according to the voltage value and the current value in the electric energy information, wherein the transparent conductive film layer is an ITO film with anti-reflection in the wavelength range of 400nm to 850nm.

[0144] This solution combines the voltage value and the current value in the electric energy information to obtain the resistance value corresponding to the transparent conductive film layer, wherein the transparent conductive film layer can be an ITO film with enhanced transmittance in the 400nm to 850nm band.

[0145] S32, obtaining the temperature information corresponding to the current ITO film according to the resistance value and the temperature-resistance function relationship of the ITO film, wherein the temperature-resistance function relationship is obtained by actual measurement and based on linear regression before assembling the endoscope.

[0146] After obtaining the resistance value, this solution can combine the resistance value and the temperature-resistance function relationship of the ITO film to obtain the temperature information corresponding to the current ITO film, wherein the temperature-resistance function relationship is obtained through actual measurement and based on linear regression before the endoscope is assembled. This technology is existing technology and will not be repeated here.

[0147] S4, obtaining display information corresponding to the endoscope according to the temperature information and the heating information of the transparent conductive film layer.

[0148] After obtaining the temperature information, the present solution can use the temperature information and the heating information of the transparent conductive film layer to obtain the display information corresponding to the endoscope. After obtaining the display information, the display information can be displayed by a display device to assist the user in making judgments. The display device is, for example, a display screen, a display terminal, etc.

[0149] In actual applications, after the endoscope is turned on, the endoscope automatically starts the defogging control circuit's defogging temperature control program to heat the endoscope surface to the target temperature. The preferred target temperature is 55 degrees or below, so that when the endoscope enters the surgical area for the first time, it can maintain a higher temperature so that steam condensation will not occur on the lens surface while ensuring safety.

[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. An automatic defogging endoscope control device, characterized in that: include: An objective lens protection lens is fixedly connected to the outer side of the objective lens of the endoscope, and a transparent conductive film layer is evaporated on one side of the inner side of the objective lens protection lens; The defogging control circuit is connected to the electrodes of the transparent conductive film layer respectively, and is used for controlling the heating of the transparent conductive film layer in response to the control instruction; A computing module connected to the defogging control circuit; The calculation module receives the digital image of the digital imaging module of the endoscope, analyzes the digital image based on a preset fog detection algorithm to obtain the fog index of the objective lens, and generates corresponding control instructions according to the fog index; After receiving the control instruction, the single chip microcomputer of the defogging control circuit generates duty cycle control information for the PWM control module according to the control instruction, and the PWM control module heats the transparent conductive film layer in response to the duty cycle control information; The value corresponding to the duty cycle control information is adjusted to 1, the AD sampling module of the defogging control circuit detects the power of the transparent conductive film layer to obtain corresponding power information, and the single chip microcomputer generates temperature information corresponding to the transparent conductive film layer based on the power information; Obtaining display information corresponding to the endoscope according to the temperature information and heating information of the transparent conductive film layer; The calculation module receives a digital image of a digital imaging module of an endoscope, analyzes the digital image based on a preset fog detection algorithm to obtain a fog index of the objective lens, and generates a corresponding control instruction according to the fog index, including: Calculating a dark channel image of the digital image and a corresponding configuration grayscale value, sorting the configuration grayscale values ​​in descending order to obtain a dark channel image sequence, and selecting a front preset number of dark channel images to obtain an image set; Determine the pixel points corresponding to the pixel points with corresponding grayscale values ​​in the image set in the original digital image, and obtain the RGB pixel values ​​corresponding to the corresponding pixel points; A fog index corresponding to the objective lens is obtained by comprehensive calculation based on the RGB pixel values, and a corresponding control instruction is generated according to the fog index, wherein each fog index has a corresponding control instruction; The step of calculating the dark channel image of the digital image and the corresponding configuration grayscale value, sorting the configuration grayscale values ​​in descending order to obtain a dark channel image sequence, and selecting a front preset number of dark channel images to obtain an image set includes: Taking each pixel point in the digital image as a target pixel point in turn, determining a corresponding acquisition window according to the position of each target pixel point in the digital image, and setting the acquisition window corresponding to the target pixel point; All pixels other than the target pixel collected by the collection window are taken as pixels to be processed, the pixel with the smallest gray value among all the pixels to be processed and the target pixel is determined as the selected pixel, and the gray value corresponding to the selected pixel is taken as the configured gray value of the target pixel; After determining the configuration grayscale values ​​corresponding to all target pixels, sorting the target pixels corresponding to each target pixel in descending order according to the configuration grayscale values ​​to obtain a dark channel image sequence; The method of sequentially taking each pixel point in the digital image as a target pixel point, determining a corresponding acquisition window according to the position of each target pixel point in the digital image, and setting the acquisition window corresponding to the target pixel point includes: Determine an initial acquisition window corresponding to each target pixel point, wherein the acquisition window includes a target slot located in the center and slots to be processed located around the target slot, and there are 5 slots in the acquisition window; The target slot in the initial acquisition window is set correspondingly to the target pixel point. If it is determined that other slots to be processed in the acquisition window have corresponding pixel points, the corresponding target pixel point is set correspondingly to the initial acquisition window; If it is determined that there is a slot to be processed that does not correspond to a pixel point in the acquisition window, the corresponding slot to be processed is deleted from the acquisition window, and the acquired acquisition window is obtained to be set corresponding to the target pixel point; If it is determined that the deleted slots to be processed are greater than 1, the acquisition window is subjected to shape adjustment processing to obtain a processed acquisition window that is set corresponding to the target pixel point.

2. The automatic defogging endoscope control device according to claim 1, characterized in that: If it is determined that the deleted slots to be processed are greater than 1, the acquisition window is subjected to shape adjustment processing to obtain a processed acquisition window corresponding to the target pixel point, including: If it is determined that the number of the deleted slots to be processed is greater than 1, the remaining slots to be processed are determined, and the adjacent pixel points corresponding to the pixel points of each slot to be processed are obtained, and the coordinates of the adjacent pixel points are compared; If it is determined that the pixels of the remaining slots to be processed have the same adjacent pixels, the same adjacent pixels are selected as supplementary pixels; A corresponding supplementary slot is generated at the supplementary pixel point, and a collection window with an adjusted shape is obtained according to the supplementary slot, the remaining slots to be processed and the target slot.

3. The automatic defogging endoscope control device according to claim 1, characterized in that: The method of sequentially taking each pixel point in the digital image as a target pixel point, determining a corresponding acquisition window according to the position of each target pixel point in the digital image, and setting the acquisition window corresponding to the target pixel point includes: Obtaining the two-dimensional coordinates corresponding to each pixel point in the digital image, and determining the coordinate extreme values ​​in the two-dimensional coordinates, wherein the coordinate extreme values ​​at least include the maximum value of the horizontal coordinate, the maximum value of the vertical coordinate, the minimum value of the horizontal coordinate, and the minimum value of the vertical coordinate; Classifying the two-dimensional coordinates without coordinate extreme values ​​into a first set, and adding a collection window of a standard shape to the first set; Classify the two-dimensional coordinates having only any one of the maximum value of the horizontal coordinate, the maximum value of the vertical coordinate, the minimum value of the horizontal coordinate, and the minimum value of the vertical coordinate into corresponding second-category sets, each of which has any one of the corresponding maximum value of the horizontal coordinate, the maximum value of the vertical coordinate, the minimum value of the horizontal coordinate, or the minimum value of the vertical coordinate, and each of which has a preset acquisition window of a non-standard shape; The two-dimensional coordinates that have both the maximum and minimum values ​​of the horizontal coordinate or the maximum and minimum values ​​of the vertical coordinate are classified into corresponding third-category sets, each third-category set has corresponding two of the maximum and minimum values ​​of the horizontal coordinate, the maximum and minimum values ​​of the vertical coordinate, the minimum value of the horizontal coordinate or the minimum value of the vertical coordinate, and each third-category set has a preset non-standard shape acquisition window.

4. The automatic defogging endoscope control device according to claim 1, characterized in that: The fog index of the objective lens is obtained by comprehensive calculation based on the RGB pixel value, and a corresponding control instruction is generated according to the fog index, and each fog index has a corresponding control instruction, including: The RGB pixel values ​​corresponding to all the pixels are summed and then the average is calculated to obtain an average RGB pixel value, and the average red value, average green value and average blue value in the average RGB pixel value are extracted; The fog index of the objective lens is calculated by the following formula: V=(0.3R+0.59G+0.11B) / 255.0 Among them, V is the fog index of the objective lens, R is the average red value, G is the average green value, B is the average blue value; When it is determined that the fog index is greater than a first specific value, generating a defogging control instruction; When it is determined that the fog index is less than a second specific value, generating a control instruction to stop defogging; After it is determined that the generation of the defogging control instruction reaches a first preset time and the fog index is greater than a second specific value, a corresponding manual processing control instruction is output.

5. The automatic defogging endoscope control device according to claim 4, characterized in that: After receiving the control instruction, the single chip microcomputer of the defogging control circuit generates duty cycle control information for the PWM control module according to the control instruction, and the PWM control module heats the transparent conductive film layer in response to the duty cycle control information, including: The single chip microcomputer determines the corresponding duty cycle control information according to the control instruction, and different control instructions have corresponding duty cycle control information; The PWM control module outputs corresponding electric energy information to the transparent conductive film layer based on the duty cycle control information, and the value of the duty cycle control information is proportional to the value of the heating electric energy of the transparent conductive film layer.

6. The automatic defogging endoscope control device according to claim 5, characterized in that: The AD sampling module of the defogging control circuit detects the electric energy of the transparent conductive film layer to obtain corresponding electric energy information, and the single chip microcomputer generates temperature information corresponding to the transparent conductive film layer based on the electric energy information, including: Obtaining a resistance value corresponding to the transparent conductive film layer according to the voltage value and the current value in the electric energy information, wherein the transparent conductive film layer is an ITO film with anti-reflection in the wavelength range of 400nm to 850nm; The temperature information corresponding to the current ITO film is obtained by calculating the resistance value and the temperature-resistance function relationship of the ITO film. The temperature-resistance function relationship is obtained by actual measurement and linear regression before assembling the endoscope.