Endoscope stability detection method, electronic equipment and endoscope system

By acquiring and mapping the binary stability results of endoscopic images, combining stability change trends and interval adjustments, the problem of stability level division in endoscopy is solved, multi-level output is achieved, and model design and data annotation are reduced. Difficulty, improves detection accuracy.

CN119168950APending Publication Date: 2024-12-20CHANGZHOU UNITED IMAGING HEALTHCARE SURGICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411178982.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The prior art is difficult to achieve more refined stability level division in endoscopy, resulting in increased difficulty in model design and data labeling.

Method used

By acquiring the binary stability results of the endoscopic images, map them to multiple stability levels, using stability change trends and interval adjustments, the stability level of the endoscopic images is determined, and the difficulty of model design and data labeling is reduced.

Benefits of technology

It realizes mapping the binary stability results to multiple stability levels, meeting the multi-level output requirements, reducing the difficulty of model design and data labeling, and improving the stability detection accuracy of endoscopic images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168950A_ABST
    Figure CN119168950A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of endoscopes, and provides an endoscope stability detection method, electronic equipment and an endoscope system. The stability detection method for the endoscope comprises the steps that L dichotomy stability results in one-to-one correspondence with continuous L frames of endoscope images are obtained, the last frame of image in the continuous L frames of endoscope images is the Nth frame of endoscope image, and both L and N are positive integers; determining a first target level to which the Nth frame of endoscope image belongs according to the L dichotomy stability results; wherein the first target level is one of preset K stability levels, different stability levels correspond to different stability conditions of the image, K is a positive integer greater than 2, and L is greater than or equal to K-1. According to the embodiment of the invention, the dichotomy stability result of the endoscope can be mapped to more stability levels, so that the model design difficulty and the data annotation difficulty can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of endoscopes, and in particular relates to a stability detection method of an endoscope, an electronic device and an endoscope system. Background Art

[0002] The stability of an endoscope refers to the stability of the doctor's operation of the endoscope and acquisition of images during endoscopic examinations. The higher the stability, the clearer the endoscopic image and the more reliable the endoscopic examination results. Related technologies often use a binary classification model to judge the stability of an endoscope. However, in practical applications, a more refined stability level division is often required. If it is necessary to meet the output requirements of more stability levels, a multi-classification model is required to output multiple stability levels. When training a multi-classification model, samples need to be labeled in multiple categories, such as stable, relatively stable, medium, relatively unstable, and unstable. In this way, the difficulty of model design and data labeling are significantly increased. Summary of the invention

[0003] The embodiments of the present application provide an endoscope stability detection method, an electronic device and an endoscope system, which can map the binary stability results of the endoscope stability to more stability levels, helping to reduce the difficulty of model design and data annotation.

[0004] A first aspect of an embodiment of the present application provides a stability detection method for an endoscope, comprising: obtaining L binary classification stability results corresponding one-to-one to L consecutive frames of endoscopic images, the last frame of the consecutive L frames of endoscopic images being the Nth frame of endoscopic image, and L and N being positive integers; determining a first target level to which the Nth frame of endoscopic image belongs based on the L binary classification stability results; wherein the first target level is one of K preset stability levels, different stability levels correspond to different stability conditions of the image, K is a positive integer greater than 2, and L is greater than or equal to K-1.

[0005] In some embodiments of the first aspect, determining the first target level to which the Nth frame of endoscopic image belongs based on the L binary classification stability results includes: evaluating a first target interval of overall stability of the L frames of endoscopic images based on the L binary classification stability results; determining a stability level to which the first target interval belongs, and using the determined stability level as the first target level to which the Nth frame of endoscopic image belongs.

[0006] In some embodiments of the first aspect, the first target interval of the overall stability of the L frames of endoscopic images is evaluated based on the L binary stability results, the stability level to which the first target interval belongs is determined, and the determined stability level is used as the first target level to which the Nth frame of endoscopic image belongs, including: obtaining and determining a second target interval for the overall stability of endoscopic images from the NL-1th frame to the N-1th frame; determining a stability change trend of the Nth endoscopic image compared to the N-1th frame of endoscopic image based on the L binary stability results; adjusting the second target interval based on the stability change trend, and using the adjusted second target interval as the updated first target interval; determining the stability level to which the updated first target interval belongs, and using the determined stability level as the first target level to which the Nth frame of endoscopic image belongs.

[0007] In some embodiments of the first aspect, the second target interval is adjusted according to the stability change trend, and the adjusted second target interval is used as the updated first target interval, including: when the stability of the Nth endoscopic image decreases compared to the N-1th endoscopic image frame, the second target interval is lowered, and the lowered second target interval is used as the updated first target interval.

[0008] In some embodiments of the first aspect, the second target interval is adjusted according to the stability change trend, and the adjusted second target interval is used as the updated first target interval, including: when the stability of the Nth endoscopic image is improved compared with the N-1th frame endoscopic image, the second target interval is increased, and the increased second target interval is used as the updated first target interval; or, when the stability of the Nth endoscopic image is improved compared with the N-1th frame endoscopic image, the second target interval is used as the updated first target interval.

[0009] In some embodiments of the first aspect, the second target interval is adjusted according to the stability change trend, and the adjusted second target interval is used as the updated first target interval, including: according to the stability change trend and the degree of difference in stability between the Nth endoscopic image and the N-1th endoscopic image, the second target interval is adjusted, and the adjusted second target interval is used as the updated first target interval, wherein the interval change between the adjusted second target interval and the second target interval before adjustment is positively correlated with the degree of stability difference.

[0010] In some embodiments of the first aspect, the binary classification stability results include stable and unstable; and evaluating the first target interval of the overall stability of the L frames of endoscopic images based on the L binary classification stability results includes: performing a weighted operation based on the degree of proximity between the endoscopic images classified as stable and the N frames of endoscopic images to obtain a weighted voting value, wherein the weight of each endoscopic image classified as stable during the weighted operation is positively correlated with the degree of proximity to the N frames of endoscopic images; and taking the interval to which the weighted voting value belongs as the first target interval.

[0011] In some embodiments of the first aspect, the K stability levels correspond one-to-one to K intervals, and the interval lengths of the K intervals are quasi-normally distributed.

[0012] In some embodiments of the first aspect, the endoscope stability detection method further includes: acquiring a real-time endoscopic image; if there is a corner image of the intestine in the real-time endoscopic image and the previous L-1 frames of the endoscopic image, returning to the step of acquiring the real-time endoscopic image until L consecutive frames of non-corner images are acquired, and determining the stability level of the Lth frame of the endoscopic image in the consecutive L frames of non-corner images.

[0013] A second aspect of an embodiment of the present application provides a stability detection device for an endoscope, comprising: an acquisition unit, used to acquire L binary classification stability results corresponding one-to-one to L consecutive frames of endoscopic images, wherein the last frame of the consecutive L frames of endoscopic images is the Nth frame of the endoscopic image, and L and N are both positive integers; a stability detection unit, used to determine a first target level to which the Nth frame of the endoscopic image belongs based on the L binary classification stability results; wherein the first target level is one of K preset stability levels, different stability levels correspond to different stability conditions of the image, K is a positive integer greater than 2, and L is greater than or equal to K-1.

[0014] A third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the endoscope stability detection method as described in any one of the first aspects are implemented.

[0015] A fourth aspect of an embodiment of the present application provides an endoscope system, comprising a light source, an endoscope, an image processing device and a display; the image processing device is used to implement the steps of the endoscope stability detection method as described in any one of the first aspects.

[0016] A fifth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned endoscope stability detection method are implemented.

[0017] A sixth aspect of an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the steps of the above-mentioned endoscope stability detection method.

[0018] In the implementation of the present application, by obtaining L binary classification stability results corresponding to L consecutive (L is a positive integer, and greater than or equal to K-1, K is a positive integer greater than 2) frames of endoscopic images, the first target level to which the last frame of the L consecutive endoscopic images (the Nth frame of the endoscopic image) belongs is determined according to the L binary classification stability results, wherein the first target level is one of the preset K stability levels, and different stability levels correspond to different stability conditions of the image, and the binary classification stability results can be mapped to K stability levels to meet the multi-level output requirements. In addition, the implementation of the present application does not need to adopt a multi-classification model, which can reduce the difficulty of model design and data annotation. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0020] Figure 1 is a schematic structural diagram of an endoscope system provided in an embodiment of the present application;

[0021] Figure 2 It is a schematic diagram of the implementation process of the endoscope stability detection method provided in the embodiment of the present application;

[0022] Figure 3 It is a schematic diagram of a first specific implementation process of determining a first target level provided in an embodiment of the present application;

[0023] Figure 4 is a schematic diagram of a second specific implementation flow of determining a first target level provided in an embodiment of the present application;

[0024] Figure 5 It is a schematic diagram of a specific process of the endoscope stability detection method provided in an embodiment of the present application;

[0025] Figure 6 is a schematic diagram of the intestine provided in the embodiments of the present application;

[0026] Figure 7 It is a structural schematic diagram of a stability detection device for an endoscope provided in an embodiment of the present application;

[0027] Figure 8 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are protected by the present application.

[0029] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0030] In the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0031] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0032] The stability of an endoscope refers to the stability of the doctor's operation of the endoscope and acquisition of images during endoscopic examination. The higher the stability, the clearer the endoscopic image and the more reliable the endoscopic examination results. Related technologies often use a binary classification model to judge the stability of an endoscope. However, in practical applications, a more refined stability level division is often required. If it is necessary to meet the output requirements of more stability levels, a multi-classification model is required to output multiple stability levels. When training a multi-classification model, samples need to be labeled in multiple categories, such as stable, relatively stable, medium, relatively unstable, and unstable. In this way, the difficulty of model design and data labeling are significantly increased.

[0033] In view of this, the present application proposes a stability detection method for an endoscope, which can map the binary stability results of the endoscope to more stability levels, meet multi-level output requirements, and reduce the difficulty of model design and data labeling.

[0034] In order to illustrate the technical solution of the present application, a specific embodiment is provided below for illustration.

[0035] Please refer to Figure 1 , Figure 1 1 is a schematic diagram of an endoscope system provided in an embodiment of the present application. The endoscope system may include: a light source device 101, an endoscope 102 (or referred to as a mirror body), an image processing device 103, and a display 104. Among them, the image processing device 103 is used as the execution body of the endoscope stability detection method in each of the following embodiments to complete the stability detection required by the embodiment of the present application. The following describes each device in turn:

[0036] For Light Source Equipment 101:

[0037] The light source device 101 may include a light source device and an optical element. The light source device is used to generate a light beam of a specific wavelength. The number of light source devices may be one or more, such as 1, 2, 3, 4, 5 or 6. The type of the light source device may be an LED light source or a laser light source, etc., which are not limited here. The optical element may include one or more lenses, such as including but not limited to a collimating lens, a focusing lens, etc.; the optical element may be used to collimate, filter and combine the light beam emitted by the light source device to achieve the combined output of the required specific wavelength band light beam.

[0038] After the light source device 101 and the endoscope 102 are successfully connected through their respective connection parts, the light source device 101 can be used to inject the combined light beam (light) into the end face of the light guide of the endoscope 102, so that the light beam is emitted from the head end of the endoscope 102 to provide illumination light for the endoscope 102. For example, when using the endoscope 102 to perform a digestive tract examination, the light source device 101 injects light into the endoscope 102, and after being transmitted through the light guide in the endoscope 102, the light is irradiated to the digestive tract part being observed through the illumination window at the head end of the endoscope 102, thereby achieving effective illumination of the digestive tract part.

[0039] In some optional embodiments of the present application, the light source device 101 has a variety of light source modes and / or a variety of brightness gears to meet different clinical use requirements. Among them, in different light source modes, the band content covered in the light emitted by the light source device 101 is not exactly the same, that is, the color of the light emitted by the light source device 101 in different light source modes is not exactly the same. For example, in some embodiments, the light source device 101 can support a normal light mode that emits white light or pseudo-white light, and a special light mode that supports emitting special light (non-white other color monochromatic light or composite light). Different brightness gears correspond to the difference in light output brightness of the light source device 101, which can be achieved by adjusting the luminous power of the light source device, or by other means, such as adjusting the physical blocking degree of the emitted light to achieve the final light output brightness change, etc. The specific method is not too limited here. The embodiment of the present application does not make too many restrictions on the number of light source modes and brightness gears supported by the light source device 101, which can be determined according to actual conditions. For example, the light source modes supported by the light source device 101 can be 3, 4, 5, 6 or 7. The number of brightness levels of the light source device 101 can be more flexible. For example, in some embodiments, several to dozens of brightness levels can be set for the user to choose from. In other embodiments, in order to support a more accurate automatic exposure function, hundreds to thousands of brightness levels can be set for use in automatic adjustment. On this basis, only some of the brightness levels can be provided to the user for manual selection, thereby meeting differentiated brightness level adjustment requirements.

[0040] It should be understood that since the endoscope 102 transmits the light emitted by the light source device 101 and then emits it, on the basis that the light source device 101 has multiple light source modes and / or multiple brightness levels, the endoscope 102 can be adapted to multiple light source modes and / or multiple brightness levels accordingly. That is, when the light source device 101 changes the light source mode and / or the brightness level, the color and / or brightness of the light emitted by the endoscope 102 will also be adjusted.

[0041] For Endoscopy 102:

[0042] The endoscope 102 may include: a connecting portion, a hose, an operating portion, and an insertion portion in an elongated shape. The connecting portion is used to connect to the connecting portion of the light source device 101, and the hose contains a light-conducting medium (such as an optical fiber) to transmit light. At the same time, the light-conducting medium runs through the hose, the operating portion, and the insertion portion. The operating portion contains a plurality of control knobs or buttons to control the relevant movements of the insertion portion. The insertion portion includes an insertion tube, a bending portion, and a head end portion, wherein the head end portion is provided with a lighting window for installing a lighting module, an imaging window for installing an imaging module, and an instrument channel window for the use of instruments. More specifically, the lighting module includes a light-conducting medium and a lighting lens group, and the lighting lens group is used to emit the light transmitted by the light-conducting medium at a preset appropriate divergence angle to form a better lighting environment. The imaging module includes an imaging lens group and an image sensor (camera element), and the imaging lens group includes a plurality of lenses. A cable is provided behind the image sensor, and the cable is passed through the entire endoscope 102 to transmit uplink image data and downlink command data.

[0043] Endoscopes can be divided into fixed-focus endoscopes and variable-focus endoscopes (such as bifocal endoscopes and magnifying endoscopes) according to whether the endoscope includes a zoom function. When the endoscope 102 is a fixed-focus endoscope, the spatial positions of the multiple lenses included in the imaging lens group are relatively fixed, so that the focal length of the entire imaging lens group is a fixed value. When the endoscope 102 is a variable-focus endoscope, at least one of the multiple lenses included in the imaging lens group is a movable lens, and the movable lens can move relative to the other lenses, so that the focal length of the entire imaging lens group is variable.

[0044] For the image processing device 103:

[0045] The image processing device 103 is a dedicated processing device specifically used for the endoscope system. The image processing device 103 can perform image processing based on the image collected by the endoscope 102, and send the image processing results to the display 104. At the same time, the image processing device 103 can also perform image analysis processing on the image to achieve some preset functions. For example, in some optional embodiments, the image processing device 103 can perform enhancement processing, physiological part recognition and other processing on the image. The specific image analysis functions supported by the image processing device 103 are not limited here, and can be determined according to the actual application situation.

[0046] In some embodiments, the image processing device 103 and the light source device 101 may be an integrated device (all-in-one machine), that is, a single device has the functions of both the image processing device 103 and the light source device 101 .

[0047] For display 104:

[0048] The display 104 may be a liquid crystal display (LCD), a light-emitting diode (LED), a VR helmet, or other display devices with display capabilities. The display 104 may display the image processing results provided by the image processing device 103. In some examples, the display 104 may display in real time the images captured by the imaging module of the endoscope 102, and the recognition results of the image recognition (such as lesion recognition) performed by the image processing device 103. In other examples, the display 104 may also display the three-dimensional model obtained by the image processing device 103 based on the image through three-dimensional reconstruction.

[0049] The following describes the workflow of the endoscope system in common clinical scenarios:

[0050] When examining a patient, the medical staff (i.e., the user) can first connect and start the various devices of the endoscope system, and then insert the insertion part into the patient's body. At this time, the light source device 101 emits light into the endoscope 102, and the light is emitted from the lighting window at the head end of the endoscope 102 to the physiological part of the patient's body containing the object to be measured. After being irradiated by the light, the physiological part reflects the irradiated light to the imaging module at the head end, and the imaging module generates an image of the physiological part based on the received reflected light, and transmits the image to the light source device 101 via a cable. The light source device 101 then transmits the image to the image processing device 103. Finally, the image processing device 103 processes the image and sends it to the display 104 for output display.

[0051] It should also be noted that Figure 1 It does not constitute a limitation on the endoscope system. In actual applications, the endoscope system may also include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the endoscope system may also include a trolley, accessory equipment (such as a carbon dioxide air pump), an AI processing device (such as an AI host or a remote server, etc.) specifically used to execute an artificial intelligence (AI) algorithm, etc., which can be determined according to the actual application situation, and this application does not limit this. In addition, there may be certain differences in the connection relationship between the various devices. For example, in some optional embodiments, the endoscope 102 can be connected to the image processing device 103 for communication. For example, in other optional embodiments, when the endoscope system includes an AI processing device, the AI ​​processing device can be set between the image processing device 103 and the display 104, so as to realize the secondary processing and re-display of the image output by the image processing device 103. Correspondingly, depending on the different connection relationships, the data transmission path of the endoscope 102 will also have differences in adaptability, which will not be repeated here.

[0052] Please refer to Figure 2 , Figure 2 A schematic diagram of the implementation process of a method for detecting the stability of an endoscope provided in an embodiment of the present application is shown. The method can be applied to an electronic device, which can be the image processing device 103 in the aforementioned endoscope system, or a smart device such as a computer or a mobile phone.

[0053] Specifically, the above-mentioned endoscope stability detection method may include the following steps S201 to S202.

[0054] Step S201, obtaining L binary classification stability results corresponding to L consecutive frames of endoscopic images.

[0055] In the embodiment of the present application, the continuous L frames of endoscopic images may refer to L frames of images continuously captured by the endoscope 102 during the endoscopic detection process. The last frame of the continuous L frames of endoscopic images is the Nth frame of endoscopic image. L and N are both positive integers.

[0056] The binary stability result may include stable and unstable. Each binary stability result may characterize the corresponding endoscopic image as an endoscopic image collected in a stable state or an endoscopic image collected in an unstable state.

[0057] In some embodiments of the present application, a binary classification detection model may be pre-trained. Subsequently, L frames of endoscopic images are input into the binary classification detection model to obtain L binary classification stability results output by the binary classification detection model. In other embodiments, the clarity of each endoscopic image may also be determined by an image clarity evaluation algorithm to obtain L binary classification stability results. This application does not limit the method for obtaining the binary classification stability results.

[0058] Step S202: Determine the first target level to which the Nth frame of the endoscopic image belongs according to the L binary classification stability results.

[0059] Among them, the first target level is one of the preset K stability levels, and different stability levels correspond to different stability conditions of the image. Among them, K is a positive integer greater than 2, and L is greater than or equal to K-1. The specific values ​​of K and L can be adjusted according to the requirements of the precision, accuracy, and computational efficiency of stability judgment. Taking K=5 as an example, the stability levels from high to low can include stable, relatively stable, medium, relatively unstable, and unstable. At this time, L can be 5, 6, or more.

[0060] It is understandable that the user obtains L consecutive frames of endoscopic images through camera movement, and the continuity of camera movement changes usually leads to continuous stability changes, that is, there is a certain correlation between the stability of the consecutive L frames of endoscopic images. The binary stability results of the L frames of endoscopic images can reflect the stability during the continuous camera movement. Based on the aforementioned correlation, the first target level to which the Nth frame of endoscopic image belongs can be determined among the preset K stability levels.

[0061] In the implementation of the present application, by obtaining L binary classification stability results corresponding to L consecutive (L is a positive integer, and greater than or equal to K-1, K is a positive integer greater than 2) frames of endoscopic images, the first target level to which the last frame of the L consecutive endoscopic images (the Nth frame of the endoscopic image) belongs is determined according to the L binary classification stability results, wherein the first target level is one of the preset K stability levels, and different stability levels correspond to different stability conditions of the image, and the binary classification stability results can be mapped to K stability levels to meet the multi-level output requirements. In addition, the implementation of the present application does not need to adopt a multi-classification model, which can reduce the difficulty of model design and data annotation.

[0062] Specifically, Figure 3 As shown, in some embodiments of the present application, determining the first target level to which the Nth frame of endoscopic image belongs according to N binary classification stability results may include steps S301 to S302.

[0063] Step S301 : evaluating the first target interval of the overall stability of L frames of endoscopic images according to L binary classification stability results.

[0064] Specifically, the aforementioned K stability levels may correspond one-to-one to K different intervals.

[0065] The interval lengths of the K intervals may be the same or different. The interval length is the difference between the upper limit and the lower limit of the interval, indicating the range of the interval.

[0066] In some implementations of the present application, the K intervals may be obtained by equally dividing [0, L]. For example, by equally dividing [0, L] with an interval length of 1, K intervals are obtained.

[0067] In some other embodiments of the present application, 0 can be used as a single interval, and by setting K-2 thresholds, (0, L] can be divided into (0, threshold0], (threshold0, threshold1], ..., (threshold K-3,L], get 0, (0,threshold0], (threshold0,threshold1], ..., (threshold K-3 ,L] has a total of K intervals.

[0068] Taking into account that under normal circumstances the stability level of endoscopic images is quasi-normally distributed, that is, the most stable and the most unstable situations are in the minority, in other embodiments of the present application, K stability levels correspond one-to-one to K intervals, and the interval lengths of the K intervals are quasi-normally distributed, so that the stability of more endoscopic images can fall into the middle interval, which is consistent with the actual stability level.

[0069] In some embodiments of the present application, the above binary classification stability results may include stable and unstable. Based on the L binary classification stability results, the number of endoscopic images classified as stable in the L frames of endoscopic images and / or the number of endoscopic images classified as unstable can be determined. Based on at least one of the quantity conditions, the first target interval of the overall stability of the L frames of endoscopic images can be evaluated.

[0070] If the stability level is higher, the corresponding value in the interval is higher. For example, [0, L] is divided into 0, (0, threshold0], (threshold0, threshold1], ..., (threshold K-3 ,L] has a total of K intervals, then the stability level corresponding to interval 0 is the most unstable, and the interval (threshold K-3 ,L] corresponds to the most stable stability level. At this time, the first target interval can be determined in the K intervals according to the number of endoscopic images classified as stable in the L frames of endoscopic images. The more endoscopic images classified as stable, the higher the stability level corresponding to the determined target interval.

[0071] If the stability level is higher, the corresponding value in the interval is lower. For example, [0, L] is divided into 0, (0, threshold0], (threshold0, threshold1], ..., (threshold K-3 ,L] has a total of K intervals, then the stability level corresponding to interval 0 is the most stable, and the interval (threshold K-3 ,L] corresponds to the most unstable stability level. At this time, the first target interval can be determined in the K intervals according to the number of endoscopic images classified as unstable in the L frames of endoscopic images. The more endoscopic images are classified as unstable, the lower the stability level corresponding to the determined target interval.

[0072] This application does not limit the method of determining the quantity situation and evaluating the first target interval.

[0073] In some embodiments of the present application, the total number cnt of endoscopic images whose binary classification stability results are stable can be counted in L consecutive endoscopic image frames. If the total number cnt is within the i-th interval among K intervals (i is any positive integer from 1 to K), the i-th interval can be confirmed as the first target interval.

[0074] It is understandable that this method is simple to operate, helps to improve the efficiency of stability detection, and meets the demand for real-time display of stability.

[0075] In other embodiments of the present application, based on the L binary classification stability results, evaluating the first target interval of the overall stability of L frames of endoscopic images can include: performing a weighted operation based on the degree of proximity between the endoscopic images classified as stable and the N frames of endoscopic images to obtain a weighted voting value, and taking the interval to which the weighted voting value belongs as the first target interval.

[0076] The weight of each endoscopic image classified as stable during the weighted operation is positively correlated with its proximity to the N frames of endoscopic images. The higher the degree of proximity to the N frames of endoscopic images, the closer the shooting time of the endoscopic image is, and the greater the weight during the weighted voting operation.

[0077] For example, suppose that among 10 consecutive endoscopic images (i.e., L=10), there are 5 stable endoscopic images, with the frame numbers being 2, 4, 6, 8, and 10, and the corresponding weights being 0.4, 0.8, 1.2, 1.6, and 2. Then the weighted voting value may be 0.4+0.8+1.2+1.6+2=6.

[0078] Considering that the stability change caused by the continuity of the action change is usually continuous, this weighted voting method can increase the weight of the endoscopic images that are close in time, thereby increasing their influence on the final stability detection result. In this way, the stability level of the Nth frame of the endoscopic image can be closer to the actual situation when the Nth frame of the endoscopic image is collected.

[0079] Step S302: determining the stability level to which the first target interval belongs, and using the determined stability level as the first target level to which the Nth frame of the endoscopic image belongs.

[0080] In an embodiment of the present application, the stability level to which the first target interval belongs can be determined based on the correspondence between K intervals and K stability levels, and the determined stability level can be used as the first target level to which the Nth frame of endoscopic image belongs.

[0081] In order to adapt to the scenario requirements of continuously outputting stability results, in some embodiments of the present application, such as Figure 4 As shown, based on L binary classification stability results, the first target interval of the overall stability of L frames of endoscopic images is evaluated, the stability level to which the first target interval belongs is determined, and the determined stability level is used as the first target level to which the Nth frame of endoscopic image belongs, which can include: steps S401 to S404.

[0082] Step S401, obtaining and determining a second target interval for the overall stability of the endoscopic image from the NL-1th frame to the N-1th frame.

[0083] Specifically, the binary classification stability result from the NL-1th frame endoscopic image to the N-1th frame endoscopic image can be counted as the second total number of stable endoscopic images, and the interval of the K intervals where the second total number is located is taken as the second target interval.

[0084] Step S402: Determine the stability change trend of the Nth endoscopic image compared to the N-1th endoscopic image frame according to the L binary classification stability results.

[0085] Among them, the stability change trend can be divided into unchanged stability, increasing stability and decreasing stability.

[0086] In some embodiments of the present application, a first total number of endoscopic images classified as stable in L frames of endoscopic images can be determined based on the L binary classification stability results, and the interval in which the first total number is located in the K intervals is used as the first target interval. If the first target interval is higher than the second target interval, it is confirmed that the stability has increased. If the first target interval is lower than the second target interval, it is confirmed that the stability has decreased. If the first target interval is the same as the second target interval, it is confirmed that the stability has not changed.

[0087] In other embodiments of the present application, the first total number of endoscopic images classified as stable in L frames of endoscopic images can also be determined based on the L binary classification stability results. If the first total number is greater than the second total number (that is, the total number of endoscopic images with stable binary classification stability results from the NL-1th frame of endoscopic image to the N-1th frame of endoscopic image), it is confirmed that the stability has increased. If the first total number is less than the second total number, it is confirmed that the stability has decreased. If the first total number is equal to the second total number, it is confirmed that the stability has not changed.

[0088] Step S403: adjusting the second target interval according to the stability change trend, and using the adjusted second target interval as the updated first target interval.

[0089] Specifically, if the stability change trend is an increase in stability or a decrease in stability, the second target interval needs to be adjusted, and the adjusted second target interval is used as the updated first target interval. If the stability change trend is that the stability does not change, the first target interval or the second target interval can be directly used as the updated first target interval.

[0090] Step S404: determine the stability level to which the updated first target interval belongs, and use the determined stability level as the first target level to which the Nth frame of the endoscopic image belongs.

[0091] Compared with directly using the first target interval of the overall stability of the L-frame endoscopic image, in the embodiment of the present application, the second target interval can be adjusted according to the stability change trend, and the adjusted second target interval is used as the updated first target interval, and the stability level of the updated first target interval is used as the first target level of the N-th frame endoscopic image. This method can adjust the interval corresponding to the current frame based on the interval of the previous frame endoscopic image, which helps to prevent the first target level from having a significant jump compared to the stability level of the previous frame.

[0092] Specifically, according to the stability change trend, the second target interval is adjusted, and the adjusted second target interval is used as the updated first target interval, which may include: when the stability of the Nth endoscopic image decreases compared to the N-1th endoscopic image, the second target interval is lowered, and the lowered second target interval is used as the updated first target interval.

[0093] Correspondingly, when the stability of the Nth endoscopic image is improved compared to the N-1th endoscopic image frame, the second target interval is increased and the increased second target interval is used as the updated first target interval; or, when the stability of the Nth endoscopic image is improved compared to the N-1th endoscopic image frame, the second target interval is used as the updated first target interval.

[0094] In this way, when stability decreases, the second target interval can be lowered, so that doctors can more easily perceive when the stability of the endoscope decreases. When stability increases, the second target interval can be increased or maintained, so that doctors need to continue to maintain stable movement of the mirror to achieve a higher stability level. Thus, it has better guidance for the endoscopic examination process.

[0095] In some implementations, the second target interval can be adjusted by setting a variation parameter. Specifically, adjusting the second target interval according to the stability variation trend and using the adjusted second target interval as the updated first target interval may include: when the stability changes, adjusting the interval data of the second target interval according to the variation parameter, and determining the interval to which the adjusted interval data belongs as the updated first target interval.

[0096] The interval data may be a fixed value corresponding to the second target interval, and the fixed value may be the median, upper limit, lower limit, etc. of the second target interval. The interval data may also be calculated in proportion to the second total number. For example, the total number of endoscopic images classified as stable corresponding to the interval (1,2] is 4 to 8. In this case, the lower limit 1, the median 1.5, and the upper limit 2 may be used as the interval data. Alternatively, the second total number 5 may be calculated in proportion to 1+(5-4) / (8-4)*(2-1) to obtain 1.25 as the interval data.

[0097] The interval data may also be the interval data recorded in the previous frame. Specifically, for a continuous multi-frame image, after obtaining L frames of endoscopic images for the first time, the aforementioned fixed value may be recorded as the interval data, and when obtaining a new frame of endoscopic images, the interval data recorded in the previous frame may be adjusted to obtain the interval data of the current frame. Accordingly, the interval data of the Nth frame may be recorded as the basis for the next interval update.

[0098] In some implementations of the present application, the method for adjusting the interval data can be selected according to actual conditions, for example, the adjustment can be performed by addition, subtraction, multiplication, etc.

[0099] For example, the change parameter may be greater than 0. If the stability increases, the change parameter may be added to the interval data of the second target interval to obtain the adjusted interval data. If the stability decreases, the interval data of the second target interval may be subtracted from the change parameter to obtain the adjusted interval data.

[0100] It should be noted that in the implementation of the present application, the variation parameter is less than or equal to the interval difference between adjacent intervals. The interval difference can be calculated based on the difference between the upper limit values ​​or the lower limit values ​​between the two intervals. For example, when L=5, [0,L] is divided into 5 intervals, namely [0,1], (1,2], …, (4,5], then the interval difference is 1, and the variation parameter can be greater than 0 and less than or equal to 1. In this way, the speed of change of the stability level can be controlled to prevent the updated first target interval from jumping compared to the second target interval, thereby achieving a smooth change effect. When the first target level is used for display, it is possible to avoid obvious jumps in the displayed stability level, which helps to improve the user's viewing experience and is more friendly to the display solution.

[0101] In some embodiments of the present application, the above-mentioned change parameter may include an increase change parameter change up and the decrease parameter change down , which are applicable to the cases of increasing stability and decreasing stability, respectively.

[0102] If the stability increases, the change parameter can be used to change the value of the increase. up The interval data of the second target interval is increased to obtain adjusted interval data.

[0103] If the stability decreases, the interval data of the second target interval can be reduced using the decrease variation parameter to obtain adjusted interval data.

[0104] In some embodiments of the present application, the rising change parameter change up and the decrease parameter change down It can be a fixed value. And the rising change parameter change up and the decrease parameter change down Can be the same or different.

[0105] In other embodiments of the present application, the rising change parameter change up and the decrease parameter change down There can be multiple sets of values.

[0106] Specifically, the rising variation parameter may be negatively correlated with the second target interval, and the falling variation parameter may be positively correlated with the second target interval. That is to say, the higher the second target interval is, the more stable the N-1 frame endoscopic image is, and the smaller the rising variation parameter is. At this time, the interval data increases less, which can also make the stability increase more slowly and reduce the possibility of extreme results. Similarly, the higher the second target interval is, the more stable the N-1 frame endoscopic image is, and the larger the falling variation parameter is. At this time, the more the interval data decreases, and the number of stable images of the N-1 frame endoscopic image decreases faster than that of the N-1 frame, which can amplify the perception of the decrease in stability and reduce the possibility of extreme stability results.

[0107] In some embodiments of the present application, when the second target interval is adjusted according to the stability change trend, the adjustment speed when the stability decreases may be greater than the adjustment speed when the stability increases.

[0108] Specifically, taking the use of addition and subtraction to adjust the interval data as an example, in this case, the rising change parameter can be smaller than the falling change parameter. upto 0.4, change down is 0.6. In this way, the adjustment speed of stability decrease can be greater than the adjustment speed of stability increase, and the stability judgment result increases more slowly. Doctors need to maintain the stability of the mirror to achieve a higher stability level. The stability judgment result decreases faster, making it easier for doctors to perceive when the stability of the endoscope decreases. Therefore, it has better guidance for the endoscopic examination process.

[0109] In some other embodiments of the present application, the rising change amount parameter and the falling change amount parameter are the same, but the method of determining the adjusted second target interval is different when the stability decreases and increases. For example, when the stability decreases, it is preferred (easier) to map to a lower level, and when the stability increases, it is preferred to map to the original level, and only when the added interval data is greater than a certain threshold, it is mapped to a higher level.

[0110] In addition, the second target interval is adjusted according to the stability change trend, and the adjusted second target interval is used as the updated first target interval. It can also include: according to the stability change trend and the degree of difference in stability between the Nth endoscopic image and the N-1th endoscopic image, the second target interval is adjusted, and the adjusted second target interval is used as the updated first target interval, wherein the interval change between the adjusted second target interval and the second target interval before adjustment is positively correlated with the degree of stability difference.

[0111] The degree of stability difference can be expressed as the interval difference between the first target interval and the second target interval, or as the quantity difference between the first total number and the second total number. The greater the degree of stability difference, the greater the interval change between the adjusted second target interval and the second target interval before adjustment, so that the result of the final first target interval can be closer to the situation of the Nth frame of the endoscopic image.

[0112] For example, if the second target interval is (4,5], if the first target interval is (1,2], then the interval difference is 3; if the first target interval is (3,4], then the interval difference is 1. Then, if the interval difference is 3, change down When the interval difference is 1, the change down is 0.4. Thus, the larger the interval difference is, the faster the interval decreases, and the stability level also decreases faster accordingly.

[0113] In some embodiments of this application, please refer to Figure 5 The endoscope stability detection method may further include: acquiring a real-time endoscope image. The real-time endoscope image may refer to a frame of endoscope image that needs to be processed currently.

[0114] If there are intestinal corner images in the real-time endoscopic image and the L-1 frames of endoscopic images before it, return to the step of acquiring the real-time endoscopic image until L consecutive frames of non-corner images are acquired, and then determine the stability level of the Lth frame of endoscopic image in the L consecutive frames of non-corner images.

[0115] If the real-time endoscopic image and the L-1 frames of endoscopic images before it constitute a continuous L-frame endoscopic image, all of them are non-corner images, then Figure 2 The method described above determines the stability level of the real-time endoscopic image and returns to the step of acquiring the real-time endoscopic image.

[0116] The image at the corner of the intestine may refer to an endoscopic image detected at the left flexure of the colon, the right flexure of the colon, the sigmoid colon, etc. The present application does not limit the method for determining the corner. For example, the image at the corner may be determined by locating the intestinal position where the endoscope is located while acquiring the endoscopic image.

[0117] Due to the corners of the left colon, right colon, sigmoid colon, etc., it is inevitable that the doctor may slip the scope during operation. The endoscopic image collected during the sliding process is an unstable image. However, this sliding scope situation should not be used as a basis for determining the stability of the endoscope. Therefore, if the real-time endoscopic image is an image of a corner of the intestine, the detection of the endoscope stability is suspended and the image acquisition is continued until L consecutive frames of non-corner images are obtained. The stability level of the L consecutive frames of non-corner images can be re-determined according to the method provided in this application.

[0118] For example, Figure 6 As shown, if the real-time endoscopic image is an endoscopic image collected at the corner starting point 61, and the endoscopic image belongs to the corner image, it is necessary to continue to acquire the real-time endoscopic image until the first non-corner image is acquired at the corner end point 62. Since the present application needs to consider L consecutive frames of images with stability judgment value, it is necessary to continue to acquire the real-time endoscopic image until L consecutive frames of non-corner images are acquired at position 63, and the current stability level is output.

[0119] It should be noted that Figure 5 The cycle process shown may be subject to set specific cycle conditions. For example, the step of acquiring real-time endoscopic images may be stopped when the endoscopic detection is finished, or in response to a control signal triggered by a doctor through an operating unit.

[0120] In this way, real-time stability detection can be performed throughout the entire process of endoscopic examination, while preventing corner images from affecting the accuracy of stability detection results.

[0121] It should be noted that the present application does not limit the application scenarios of stability detection. For example, as described in the above-mentioned endoscope system, the display 104 can display the stability level of the current frame in real time. For another example, the L-frame endoscopic image can be an image captured from a past endoscopic detection video, and the stability level obtained by the implementation of the present application can be used to determine the inspection quality of the endoscopic detection.

[0122] It should be noted that, for the sake of simplicity of description, the aforementioned method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited to the described order of actions, because according to the present application, certain steps can be performed in other orders.

[0123] like Figure 7 Shown is a schematic structural diagram of an endoscope stability detection device 700 provided in an embodiment of the present application, wherein the endoscope stability detection device 700 is configured on an electronic device.

[0124] Specifically, the endoscope stability detection device 700 may include:

[0125] An acquisition unit 701 is used to acquire L binary classification stability results corresponding to L consecutive endoscopic image frames, where the last frame of the L consecutive endoscopic image frames is the Nth endoscopic image frame, and L and N are both positive integers;

[0126] The stability detection unit 702 is used to determine the first target level to which the Nth frame of endoscopic image belongs based on the L binary classification stability results; wherein the first target level is one of the preset K stability levels, different stability levels correspond to different stability conditions of the image, K is a positive integer greater than 2, and L is greater than or equal to K-1.

[0127] In some embodiments of the present application, the stability detection unit 702 can be specifically used to: evaluate the first target interval of the overall stability of the L frames of endoscopic images based on the L binary classification stability results; determine the stability level to which the first target interval belongs, and use the determined stability level as the first target level to which the Nth frame of endoscopic image belongs.

[0128] In some embodiments of the present application, the stability detection unit 702 can be specifically used to: obtain and determine the second target interval for the overall stability of the NL-1th frame endoscopic image to the N-1th frame endoscopic image; determine the stability change trend of the Nth endoscopic image compared to the N-1th frame endoscopic image based on the L binary stability results; adjust the second target interval based on the stability change trend, and use the adjusted second target interval as the updated first target interval; determine the stability level to which the updated first target interval belongs, and use the determined stability level as the first target level to which the Nth frame endoscopic image belongs.

[0129] In some embodiments of the present application, the stability detection unit 702 may be specifically used to: when the stability of the Nth endoscopic image decreases compared to the N-1th frame endoscopic image, reduce the second target interval, and use the reduced second target interval as the updated first target interval.

[0130] In some embodiments of the present application, the stability detection unit 702 may be specifically used to: when the stability of the Nth endoscopic image is improved compared to the N-1th frame endoscopic image, increase the second target interval and use the increased second target interval as the updated first target interval; or, when the stability of the Nth endoscopic image is improved compared to the N-1th frame endoscopic image, use the second target interval as the updated first target interval.

[0131] In some embodiments of the present application, the stability detection unit 702 may be specifically used to: adjust the second target interval according to the stability change trend and the degree of difference in stability between the Nth endoscopic image and the N-1th endoscopic image, and use the adjusted second target interval as the updated first target interval, wherein the interval change between the adjusted second target interval and the second target interval before adjustment is positively correlated with the degree of stability difference.

[0132] In some embodiments of the present application, the stability detection unit 702 may be specifically used to: perform a weighted operation based on the degree of proximity between the endoscopic image classified as stable and the N frames of endoscopic images to obtain a weighted voting value, wherein the weight of each endoscopic image classified as stable during the weighted operation is positively correlated with the degree of proximity between the endoscopic image and the N frames of endoscopic images; and use the interval to which the weighted voting value belongs as the first target interval.

[0133] In some embodiments of the present application, the stability detection unit 702 may be specifically configured to: correspond one-to-one between K stability levels and K intervals, and the interval lengths of the K intervals are in a quasi-normal distribution.

[0134] In some embodiments of the present application, the stability detection unit 702 can be specifically used to: acquire a real-time endoscopic image; if there is a corner image of the intestine in the real-time endoscopic image and the previous L-1 frames of the endoscopic image, return to the step of acquiring the real-time endoscopic image until L consecutive frames of non-corner images are acquired, and determine the stability level of the Lth frame of the endoscopic image in the consecutive L frames of non-corner images.

[0135] It should be noted that, for the convenience and simplicity of description, the specific working process of the endoscope stability detection device 700 can be referred to Figures 2 to 6 The corresponding process of the method will not be repeated here.

[0136] like Figure 8 FIG. 8 is a schematic diagram of an electronic device 8 provided in an embodiment of the present application. Specifically, the electronic device 8 may include: a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and executable on the processor 80, such as an endoscope stability detection program. When the processor 80 executes the computer program 82, the steps in the above-mentioned embodiments of the endoscope stability detection method are implemented, such as Figure 2 Alternatively, when the processor 80 executes the computer program 82, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 7 The functions of the acquisition unit 701 and the stability detection unit 702 are shown.

[0137] The computer program may be divided into one or more modules / units, which are stored in the memory 81 and executed by the processor 80 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the electronic device 8.

[0138] For example, the computer program can be divided into: an acquisition unit and a stability detection unit. The specific functions of each unit are as follows: an acquisition unit, used to obtain L binary classification stability results corresponding to L consecutive frames of endoscopic images, the last frame of the consecutive L frames of endoscopic images is the Nth frame of endoscopic image, L and N are both positive integers; a stability detection unit, used to determine the first target level to which the Nth frame of endoscopic image belongs based on the L binary classification stability results; wherein the first target level is one of the preset K stability levels, different stability levels correspond to different stability conditions of the image, K is a positive integer greater than 2, and L is greater than or equal to K-1.

[0139] The electronic device 8 may include, but is not limited to, a processor 80 and a memory 81. Those skilled in the art will appreciate that Figure 8 It is only an example of the electronic device 8 and does not constitute a limitation of the electronic device 8. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 8 may also include input and output devices, network access devices, buses, etc.

[0140] The processor 80 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0141] The memory 81 may be an internal storage unit of the electronic device 8, such as a hard disk or memory of the electronic device 8. The memory 81 may also be an external storage device of the electronic device 8, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 8. Further, the memory 81 may also include both an internal storage unit of the electronic device 8 and an external storage device. The memory 81 is used to store the computer program and other programs and data required by the electronic device 8. The memory 81 may also be used to temporarily store data that has been output or is to be output.

[0142] It should be noted that, for the convenience and brevity of description, the structure of the electronic device 8 can also refer to the specific description of the structure in the method embodiment, which will not be repeated here.

[0143] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0144] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0145] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0146] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0147] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0148] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0149] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0150] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for detecting the stability of an endoscope, characterized in that: include: Obtain L binary classification stability results corresponding to L consecutive endoscopic image frames, where the last frame of the L consecutive endoscopic image frames is the Nth frame of the endoscopic image, and L and N are both positive integers; Based on the L binary classification stability results, determine the first target level to which the Nth frame of endoscopic image belongs; wherein the first target level is one of the preset K stability levels, different stability levels correspond to different stability conditions of the image, K is a positive integer greater than 2, and L is greater than or equal to K-1.

2. The method for detecting stability of an endoscope according to claim 1, wherein: Determining the first target level to which the Nth frame of endoscopic image belongs according to the L binary classification stability results includes: According to the L binary classification stability results, evaluating a first target interval in which the overall stability of the L frames of endoscopic images lies; A stability level to which the first target interval belongs is determined, and the determined stability level is used as the first target level to which the Nth frame of endoscopic image belongs.

3. The method for detecting stability of an endoscope according to claim 2, wherein: The step of evaluating the first target interval of the overall stability of the L frames of endoscopic images according to the L binary classification stability results, determining the stability level to which the first target interval belongs, and using the determined stability level as the first target level to which the Nth frame of endoscopic image belongs, comprises: Obtaining and determining a second target interval where the overall stability of the endoscopic image from the NL-1th frame to the N-1th frame is located; Determine, according to the L binary classification stability results, a stability change trend of the Nth endoscopic image compared to the N-1th endoscopic image frame; adjusting the second target interval according to the stability change trend, and using the adjusted second target interval as the updated first target interval; The stability level to which the updated first target interval belongs is determined, and the determined stability level is used as the first target level to which the Nth frame of endoscopic image belongs.

4. The method for detecting stability of an endoscope according to claim 3, wherein: The step of adjusting the second target interval according to the stability change trend and using the adjusted second target interval as the updated first target interval includes: When the stability of the Nth endoscopic image decreases compared to the N-1th endoscopic image, the second target interval is reduced, and the reduced second target interval is used as the updated first target interval.

5. The method for detecting stability of an endoscope according to claim 3, wherein: The step of adjusting the second target interval according to the stability change trend and using the adjusted second target interval as the updated first target interval includes: When the stability of the Nth endoscopic image is improved compared to the N-1th endoscopic image frame, the second target interval is increased and the increased second target interval is used as the updated first target interval; or, when the stability of the Nth endoscopic image is improved compared to the N-1th endoscopic image frame, the second target interval is used as the updated first target interval.

6. The method for detecting stability of an endoscope according to claim 3, wherein: The step of adjusting the second target interval according to the stability change trend and using the adjusted second target interval as the updated first target interval includes: According to the stability change trend and the degree of difference in stability between the Nth endoscopic image and the N-1th endoscopic image, the second target interval is adjusted, and the adjusted second target interval is used as the updated first target interval, wherein the interval change between the adjusted second target interval and the second target interval before adjustment is positively correlated with the degree of stability difference.

7. The method for detecting stability of an endoscope according to claim 2, wherein: The binary classification stability results include stable and unstable; and evaluating the first target interval of the overall stability of the L frames of endoscopic images according to the L binary classification stability results includes: Performing a weighted operation according to the degree of proximity between the endoscopic images classified as stable and the N frames of endoscopic images to obtain a weighted voting value, wherein the weight of each endoscopic image classified as stable during the weighted operation is positively correlated with the degree of proximity between the endoscopic images and the N frames of endoscopic images; The interval to which the weighted voting value belongs is taken as the first target interval.

8. The method for detecting stability of an endoscope according to claim 2, wherein: The K stability levels correspond one-to-one to the K intervals, and the interval lengths of the K intervals are in a quasi-normal distribution.

9. The method for detecting the stability of an endoscope according to any one of claims 1 to 8, characterized in that: The endoscope stability detection method further includes: Acquire real-time endoscopic images; If there are intestinal corner images in the real-time endoscopic image and the L-1 frames of endoscopic images before it, return to the step of acquiring the real-time endoscopic image until L consecutive frames of non-corner images are acquired, and then determine the stability level of the Lth frame of endoscopic image in the L consecutive frames of non-corner images.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the endoscope stability detection method according to any one of claims 1 to 9 are implemented.

11. An endoscope system, characterized in that: Including light source, endoscope, image processing equipment; The image processing device is used to implement the steps of the endoscope stability detection method according to any one of claims 1 to 9.