An intelligent timing method and device for electronic endoscope
Through image judgment technology, the problem of inaccurate time recording of electronic endoscopes is solved, accurate recording of target site inspection time is achieved, and the efficiency and accuracy of gastrointestinal examination are improved.
Patent Information
- Application Number
- CN202111088686.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-16
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2041-09-16
AI Technical Summary
In the existing technology, the time recording of electronic endoscopes starts from the start-up time of the endoscope, and the inspection time of the actual target part cannot be accurately recorded, resulting in inaccurate inspection duration.
By acquiring the image collected by the electronic endoscope, it is judged whether it is the image of the target part. If so, the acquisition time is recorded. Methods such as pixel component value, color space judgment and pre-trained neural network are used to determine whether the image is the target part, and then the inspection time is accurately recorded. .
It achieves accurate recording of the electronic endoscope target site inspection time, meets the standard requirements for gastrointestinal inspection time, and improves inspection efficiency and accuracy.
Smart Images

Figure CN113768452B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing applications, and in particular to an intelligent timing method and device for an electronic endoscope. Background Art
[0002] Electronic endoscopy is the main method for examining gastrointestinal diseases. Studies have shown that the examination time is positively correlated with the detection rate of lesions, and the relevant examination guidelines also have relevant time specifications for gastrointestinal examinations using electronic endoscopy. In addition, medical consultations require that the examination time of cases undergoing gastrointestinal examinations be recorded and preserved.
[0003] In the prior art, time recording is performed based on the time when the endoscope is turned on as the starting time. However, in actual operation, the target part is not inspected immediately after the endoscope is turned on. Therefore, this method cannot accurately record the actual inspection time of the target part, and the recorded inspection time is longer than the actual inspection time of the target part. Summary of the invention
[0004] The purpose of the present invention is to provide an electronic endoscope intelligent timing method and device, which can accurately record the inspection time of the electronic endoscope on the target part.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] An electronic endoscope intelligent timing method, comprising:
[0007] Acquire images collected by electronic endoscope;
[0008] If the image is an image of a target part, recording the acquisition time of the image;
[0009] The acquisition time of the image of the target part acquired by the electronic endoscope is output.
[0010] Preferably, determining whether the image is an image of the target part includes:
[0011] Selecting pixels belonging to the target part from the image;
[0012] According to the area of the target part in the image, it is determined whether the image is an image of the target part.
[0013] Preferably, judging whether a pixel of the image belongs to the target part comprises: for a pixel of the image, obtaining component values of each channel of the pixel, and determining whether the pixel belongs to the target part according to the component values of each channel of the pixel.
[0014] Preferably, determining whether the pixel belongs to the target part according to the component values of each channel of the pixel includes: if the component values of each channel of the pixel are respectively within their corresponding preset value ranges, then the pixel is considered to belong to the target part.
[0015] Preferably, determining whether a pixel of the image belongs to the target part includes:
[0016] Determining whether a pixel of the image belongs to the target part in a plurality of color spaces of the image respectively;
[0017] The judgment results obtained in each color space of the image are combined to vote to determine whether the pixel of the image belongs to the target part.
[0018] Preferably, determining whether the image is an image of the target part includes:
[0019] The image is processed using a pre-trained neural network to obtain a judgment result of whether the image is an image of the target part. The neural network is used to process the input image to obtain a classification result that the image is an image of the target part or a classification result that the image is not an image of the target part. Alternatively, the neural network is used to process the input image to obtain a classification result that the image is an image of any one of a plurality of preset parts.
[0020] Preferably, it also includes: if the current frame image collected by the electronic endoscope is the image of the target part, and a preset number of consecutive frame images before the current frame image are all images of the target part, then start timing; if the current frame image collected by the electronic endoscope is not the image of the target part, and a preset number of consecutive frame images before the current frame image are not images of the target part, then stop timing.
[0021] Preferably, the method further includes: determining the part to which the image belongs, and recording the name of the part to which the image belongs and the acquisition time.
[0022] Preferably, the method further includes: storing the recorded time data in correspondence with the image data collected for the current object and the personal information of the current object.
[0023] An electronic endoscope intelligent timing device is used to execute the electronic endoscope intelligent timing method described above.
[0024] It can be seen from the above technical solution that the electronic endoscope intelligent timing method and device provided by the present invention obtains the image collected by the electronic endoscope, and if the image is an image of the target part, the image collection time is recorded, and then the collection time of the electronic endoscope for the target part is output. The present invention determines whether the image collected by the electronic endoscope is an image collected for the target part based on the image collected by the electronic endoscope, and then records the image collection time accordingly, which can more accurately record the inspection time of the electronic endoscope for the target part. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, 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 invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0026] Figure 1 A flowchart of an electronic endoscope intelligent timing method provided by an embodiment of the present invention;
[0027] Figure 2 A flow chart of a method for determining whether an image is an image of a target part adopted in this embodiment;
[0028] Figure 3 A flow chart of a method for determining whether a pixel of an image belongs to a target part, adopted by an embodiment of the present invention;
[0029] Figure 4 A schematic diagram of an intelligent timing device for an electronic endoscope provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions 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 should fall within the scope of protection of the present invention.
[0031] Please refer to Figure 1 , Figure 1 A flowchart of an electronic endoscope intelligent timing method provided in this embodiment is shown in the figure, and the method includes the following steps:
[0032] S10: Acquire the image collected by the electronic endoscope. After the electronic endoscope is turned on and in operation, the image collected by the electronic endoscope is acquired in real time.
[0033] S11: If the image is an image of a target part, the acquisition time of the image is recorded.
[0034] The acquisition time of the image refers to the moment when the electronic endoscope acquires the image. It is determined whether the image acquired by the electronic endoscope is an image of the target part, that is, whether it is an image acquired of the target part. If so, the acquisition time of the image is recorded.
[0035] S12: Outputting the acquisition time of the image of the target part acquired by the electronic endoscope.
[0036] The corresponding acquisition time of the electronic endoscope for acquiring the image of the target part is output, so that the operator can know the time situation of acquiring the image of the target part.
[0037] The electronic endoscope intelligent timing method of this embodiment determines whether the image captured by the electronic endoscope is an image captured of a target part, and then records the image capture time accordingly, which can more accurately record the inspection time of the electronic endoscope on the target part.
[0038] The electronic endoscope intelligent timing method is described in detail below in conjunction with specific implementation methods.
[0039] In this embodiment, the specific method for determining whether an image is an image of the target part is not limited, and it is sufficient to be able to determine whether an image is an image of the target part. Optionally, the following method can be used to determine whether the acquired image is an image of the target part, please refer to Figure 2 , Figure 2 A flow chart of a method for determining whether an image is an image of a target part adopted in this embodiment includes the following steps as shown in the figure:
[0040] S20: Select pixels belonging to the target part from the image.
[0041] For each pixel of the image, it is determined whether the pixel belongs to the target part, so as to obtain the pixel belonging to the target part from the image.
[0042] S21: Determine whether the image is an image of the target part according to the area of the target part in the image.
[0043] The area of the target part in the image is obtained according to the pixels belonging to the target part in the image, so as to determine whether the image is an image of the target part according to the area of the target part in the image.
[0044] Optionally, whether the image is a target part image can be determined based on the area ratio of the target part in the image. The area ratio of the target part in the image can be obtained based on the ratio of the number of pixels belonging to the target part in the image to the total number of pixels in the image. Optionally, a ratio range can be set, and whether the image is a target part image can be determined based on whether the area ratio of the target part in the image is within the ratio range.
[0045] Optionally, whether to determine the image as a target part image can be determined based on the size of the area of the target part in the image. The area of the target part in the image can be obtained based on the number of pixels belonging to the target part in the image. Optionally, an area value range can be set, and whether the image is a target part image can be determined based on whether the area of the target part in the image is within the area value range.
[0046] However, it is not limited to this, and other methods may be used to determine whether an image is an image of the target part based on the pixels belonging to the target part in the image, such as based on the distribution of pixels belonging to the target part in the image, etc., which are also within the protection scope of the present invention.
[0047] Whether the image pixel belongs to the target part can be determined based on the characteristics of the image pixel. Optionally, whether the image pixel belongs to the target part can be determined by the following method, including: for the pixel of the image, obtaining the component value of each channel of the pixel, and determining whether the pixel belongs to the target part based on the component value of each channel of the pixel.
[0048] Optionally, if the image is described in HSV color space, correspondingly, each channel of the pixel includes a hue channel, a saturation channel and a brightness channel, and each component value includes a hue value, a saturation value and a brightness value. If the image is described in HSI color space, correspondingly, each channel of the pixel includes a hue channel, a saturation channel and a brightness channel, and each component value includes a hue value, a saturation value and a brightness value. Or if the image is described in RGB color space, then each channel of the pixel includes a red channel, a green channel and a blue channel, and each component value includes a red value, a green value and a blue value. Not limited to this, the image can also be described in other color spaces, and the image pixels are judged according to the corresponding component values of each channel.
[0049] Optionally, the following method may be used to determine whether the pixel belongs to the target part based on the component values of each channel of the pixel: if the component values of each channel of the pixel are respectively within their corresponding preset value ranges, the pixel is considered to belong to the target part.
[0050] For setting the preset value range corresponding to each channel component value, an electronic endoscope can be used to collect images of the target part, and based on the collected target part images, statistics are made on the distribution of each channel component value of the target part image in the corresponding color space, so as to set the preset value range corresponding to each channel component value based on the statistical results. Preferably, in practical applications, electronic endoscopes of various models can be used to collect images of the target part, and statistics are made based on the collected images.
[0051] In addition, the electronic endoscope can have a variety of staining modes, and a preset value range of each corresponding channel component value can be set for any staining mode of the electronic endoscope. For a staining mode of the electronic endoscope, the electronic endoscope is used to collect images of the target part in this staining mode, and the distribution of each channel component value of the target part image in the corresponding color space is statistically analyzed based on the obtained image, and then the preset value range corresponding to each channel component value in this staining mode is set according to the statistical results. Then when using the electronic endoscope for actual inspection, the electronic endoscope adopts a staining mode, and the preset value range of each channel component value corresponding to the staining mode can be used to determine whether it is the target part image. The staining modes of the electronic endoscope include but are not limited to the Olympus NBI mode or the Fuji BLI mode.
[0052] If a white light image is collected when an electronic endoscope is used to inspect the object under test, the preset value range of each channel component value is set for the white light image. When setting the preset value range of each channel component value, the white light image of the target part is also collected accordingly.
[0053] In an exemplary embodiment, the size of the effective image area of the electronic endoscope to collect images is I w *I h Specifically, the difference operation can be performed on two adjacent frames of images to obtain the changed area between the two adjacent frames of images, and the effective image area of the image captured by the electronic endoscope can be obtained according to the changed area.
[0054] The effective image part is converted from RGB color space to HSV color space, and the image is described in HSV color space. The target part is the gastrointestinal tract. The H value, S value, and V value corresponding to the gastrointestinal mucosa color in the gastrointestinal mucosa image collected under white light have a value range of [0,20]&[156,180], [40,255], and [80,255], respectively. For the white light image collected in real time by the electronic endoscope, for each pixel in the effective area of the image, if the H value, S value, and V value of the pixel meet the corresponding value ranges, the pixel is judged to be the gastrointestinal mucosa. Compared with RGB images, it is more accurate to judge whether the image pixel is the target part based on the H value, S value, and V value of the image pixel.
[0055] The number of pixels belonging to the gastrointestinal mucosa in the statistical image is N, and the proportion t of the mucosal color area is calculated as t = N / (I w *I h ). When t > 0.8, the current image is determined to be a gastrointestinal mucosal image; when 0 ≤ t ≤ 0.2, the current image is determined to be a non-gastrointestinal mucosal image; when 0.2 < t ≤ 0.8, the current image is determined to be unknown.
[0056] Preferably, the following method can also be used to determine whether the pixels of the image belong to the target part. Please refer to Figure 3 , Figure 3 which is a flowchart of a method for determining whether the pixels of an image belong to the target part adopted in this embodiment, and mainly includes the following steps:
[0057] S30: Determine whether the pixels of the image belong to the target part in multiple color spaces of the image respectively.
[0058] The color space of an image refers to the way of describing the color of the image. The color space of an image includes but is not limited to the HSV color space, the HSI color space or the RGB color space.
[0059] Describe the image in multiple color spaces respectively. Under each color space of the image, determine whether the pixels of the image belong to the target part. Optionally, the method described above can be used to determine whether the pixels of the image belong to the target part in any color space of the image.
[0060] S31: Combine the judgment results obtained in each color space of the image to conduct a vote to obtain whether the pixels of the image belong to the target part.
[0061] For any pixel of the image, based on the judgment results of whether this pixel belongs to the target part obtained in each color space of the image, combine the judgment results in each color space to conduct a vote, so as to obtain whether this pixel belongs to the target part.
[0062] The method for determining whether the pixels of the image belong to the target part in this embodiment judges separately in multiple color spaces of the image and combines the judgment results in each color space to conduct a vote, which can further improve the accuracy.
[0063] Optionally, the following method can also be used to determine whether the acquired image is an image of the target part, specifically including: processing the image with a pre-trained neural network to obtain a judgment result on whether the image is an image of the target part, and the neural network is used to process the input image to obtain a classification result that the image is an image of the target part or a classification result that the image is not an image of the target part.
[0064] A training sample image set can be established to classify and annotate the images collected by the electronic endoscope into target part images and non-target part images as sample images. The sample images are then used to train the convolutional neural network to obtain a trained convolutional neural network. The convolutional neural network can use, but is not limited to, classification networks such as GoogLeNet and ResNet.
[0065] Optionally, the neural network may be used to process an input image to obtain a classification result that the image is an image of any one of a plurality of preset parts.
[0066] When training the neural network, an electronic endoscope is used to collect images of different parts, such as the mouth, face, esophagus, gastrointestinal tract, anus, etc., and the collected images are labeled with the part of the image, and a training sample image set is established as a sample image. Then, the sample images are used to train the convolutional neural network to obtain a trained convolutional neural network. The trained convolutional neural network can output the classification result of the input image, and then obtain the result of whether the image is the image of the target part. The convolutional neural network used can use but is not limited to target detection networks such as YOLO and Faster R-CNN.
[0067] Furthermore, the electronic endoscope intelligent timing method of this embodiment also includes the following process: if the current frame image captured by the electronic endoscope is the image of the target part, and a preset number of consecutive frame images before the current frame image are all images of the target part, then start timing; if the current frame image captured by the electronic endoscope is not the image of the target part, and a preset number of consecutive frame images before the current frame image are not images of the target part, then stop timing.
[0068] During the operation of the electronic endoscope, the images collected by the electronic endoscope are obtained in real time. If the first frame is determined to be an image of the target part, the detection result of the next image is continued to be waited. When n consecutive images are all determined to be images of the target part, the timing is started. During the inspection of the target part, when the first frame is received and is determined not to be an image of the target part, the detection result of the next image is continued to be waited. When n consecutive images are detected and are all determined not to be images of the target part, the timing is stopped. In this way, the time length of the electronic endoscope collecting images of the target part is realized.
[0069] The method of this embodiment not only accurately records the time when the electronic endoscope acquires images of the target part, but also can count the time for the electronic endoscope to acquire images of the target part, thus meeting the application requirements of the electronic endoscope.
[0070] Further preferably, the electronic endoscope intelligent timing method of this embodiment further includes: determining the part to which the image belongs, and recording the name of the part to which the image belongs and the acquisition time.
[0071] During the operation of the electronic endoscope, the image captured by the electronic endoscope is obtained, and the part to which the image belongs is determined, that is, which part the image belongs to. If the image is identified as an image of a specific part, the name of the part to which the image belongs and the acquisition time can be recorded. This realizes the intelligent identification of the inspection part of the electronic endoscope. Preferably, when the part to which the image belongs is identified, the time for the electronic endoscope to collect images of the part can be counted.
[0072] Further preferably, the method of this embodiment further includes: storing the recorded time data in correspondence with the image data collected from the current object and the personal information of the current object, so as to facilitate the doctor to diagnose the condition of the object by combining the image obtained from the examination of the object and the data related to the examination time.
[0073] Correspondingly, this embodiment also provides an electronic endoscope intelligent timing device for executing the above-mentioned electronic endoscope intelligent timing method.
[0074] The intelligent timing device for an electronic endoscope in this embodiment obtains an image captured by the electronic endoscope. If the image is an image of the target part, the image capture time is recorded, and then the image capture time of the target part is output. Therefore, it is determined whether the image captured by the electronic endoscope is the image captured of the target part, and then the image capture time is recorded accordingly. This makes it possible to more accurately record the inspection time of the target part by the electronic endoscope.
[0075] Optional, please refer to Figure 4 , Figure 4 A schematic diagram of an electronic endoscope intelligent timing device provided in this embodiment, as shown in the figure, the device includes: an identification module 30, used to determine whether the image is an image of the target part; a display module 31, used to display the image and acquisition time of the target part acquired by the electronic endoscope.
[0076] Optionally, the images acquired by the electronic endoscope and the corresponding acquisition time can be displayed in real time on the system interface of the electronic endoscope, so that the operator can know the inspection time at any time.
[0077] Further, a timing module 32 may be included, which is used to start timing if the current frame image collected by the electronic endoscope is the image of the target part, and the continuous preset number of frame images before the current frame image are all images of the target part, and stop timing if the current frame image collected by the electronic endoscope is not the image of the target part, and the continuous preset number of frame images before the current frame image are not the image of the target part. Thus, the device can time the length of time the electronic endoscope collects images of the target part.
[0078] The above is a detailed introduction to an electronic endoscope intelligent timing method and device provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. An intelligent timing method for electronic endoscope, characterized in that: include: Acquire images collected by electronic endoscope; If the image is an image of a target part, recording the acquisition time of the image; Outputting the acquisition time of the image acquired by the electronic endoscope on the target part; Determining whether the image is an image of the target part includes: Selecting pixels belonging to the target part from the image; determining, according to the area of the target part in the image, whether the image is an image of the target part; Determining whether the pixel of the image belongs to the target part includes: for the pixel of the image, obtaining the component values of each channel of the pixel, and determining whether the pixel belongs to the target part according to the component values of each channel of the pixel; Determining whether the pixel belongs to the target part according to the component values of each channel of the pixel includes: if the component values of each channel of the pixel are respectively within the corresponding preset value ranges, then the pixel is considered to belong to the target part; Determining whether a pixel of the image belongs to the target part includes: Determining whether a pixel of the image belongs to the target part in a plurality of color spaces of the image respectively; Combining the judgment results obtained in each color space of the image to vote, to determine whether the pixel of the image belongs to the target part; It also includes: if the current frame image collected by the electronic endoscope is the image of the target part, and a preset number of consecutive frame images before the current frame image are all images of the target part, then start timing; if the current frame image collected by the electronic endoscope is not the image of the target part, and a preset number of consecutive frame images before the current frame image are not images of the target part, then stop timing.
2. The electronic endoscope intelligent timing method according to claim 1, characterized in that: Determining whether the image is an image of the target part includes: The image is processed using a pre-trained neural network to obtain a judgment result of whether the image is an image of the target part. The neural network is used to process the input image to obtain a classification result that the image is an image of the target part or a classification result that the image is not an image of the target part. Alternatively, the neural network is used to process the input image to obtain a classification result that the image is an image of any one of a plurality of preset parts.
3. The electronic endoscope intelligent timing method according to claim 1, characterized in that: Also includes: Determine the part to which the image belongs, and record the name of the part to which the image belongs and the acquisition time.
4. The electronic endoscope intelligent timing method according to claim 1, characterized in that: Also includes: The recorded time data is stored correspondingly with the image data collected from the current object and the personal information of the current object.
5. An intelligent timing device for electronic endoscope, characterized in that: Used to execute the electronic endoscope intelligent timing method described in any one of claims 1-4.
