The disclosure belongs to the field of information technology, and more particularly relates to a method and device for monitoring a colonoscope withdrawal speed.
Colonoscopy is a common method of screening for lower gastrointestinal lesions such as colorectal polyps and tumors. Colonoscopy withdrawal time refers to the actual time from the insertion of the colonoscope to the cecum to the withdrawal of the colonoscope out of the anal canal, excluding the time taken for maneuvers such as staining or biopsy. Studies have shown that, as the withdrawal time increases, the detection rates of polyps and adenomas, and the average number of polyps found in patients increase significantly. Therefore, the withdrawal time is considered as an important indicator of the quality of colonoscopy, and the guidelines for colonoscopy all over the world recommend a colonoscopy withdrawal time of 6-10 minutes. However, in actual clinical practice, the colonoscope withdrawal speed and time lack of supervision and monitoring.
The disclosure provides a method for monitoring a colonoscope withdrawal speed, the method comprising:
In 1), the cropped images are zoomed-out by bicubic (cubic convolution) interpolation.
In 2), the images are converted to grayscale images by the following equation: Gray=0.30×R+0.59×G+0.11×B, where R, G and B represent brightness values of red color, green color and blue color respectively.
In 3), the Hash fingerprints of the images are obtained by difference Hashing (dHash).
In 5), the overlapping rate of the current colonoscopy image with any one of the n previous colonoscopy images is calculated by the following equation:
where d(x, y) represents the Hamming distance between different images, d(x, y)=Σx⊕y, x and y represent character strings corresponding to different images, respectively, referring to the Hash fingerprints of the images, and ⊕ represents exclusive OR.
In 7), the weighted overlapping rate at the point in time t is converted into a stability coefficient by the following equation: ESim=100−
The disclosure further provides a device for monitoring a colonoscope withdrawal speed. The device comprises an acquisition module, a calculation module and a display module. The acquisition module comprises video signal acquisition equipment, which is responsible for real-time acquisition of video signal from a digestive endoscopy equipment. The calculation module comprises a computer. The video signal is transmitted to the computer for real-time calculation and monitoring of the colonoscopy withdrawal speed. The display module is responsible for real-time display of endoscopic video image, current colonoscopy withdrawal speed and prompt information to doctors.
Specifically, the device comprises:
Further, in the similarity calculation module, the overlapping rate of the current colonoscopy image with any one of the n previous colonoscopy images is calculated by the following equation:
where d(x, y) represents the Hamming distance between different images, d(x, y)=Σx⊕y, x and y represent character strings corresponding to different images, respectively, referring to the Hash fingerprints of the images, and ⊕ represents exclusive OR
Further, in the stability coefficient conversion module, the weighted overlapping rate at the point in time t is converted into a stability coefficient by the following equation: ESim=100−
The following advantages are associated with the method and device for monitoring a colonoscope withdrawal speed: by analyzing the stability of colonoscopy images at an instantaneous moment or within a period of time, the colonoscope withdrawal speed is reflected in real time to remind doctors to control the withdrawal speed within the safe range during colonoscopy, thus improving the effectiveness of colonoscopy.
To further illustrate the invention, embodiments detailing a method and device for monitoring a colonoscope withdrawal speed are described below. It should be noted that the following embodiments are intended to describe and not to limit the disclosure.
Referring to
S1: A real-time video of colonoscopy is acquired by endoscopic equipment, the video is decoded into images (two frames per second), the images are cropped into a size having 360×360 pixels, and the cropped images are further zoomed-out wherein texture information of the images is retained.
A 360×360 image has more than 100,000 pixels and contains a huge amount of information and lots of details. Therefore, it is necessary to zoom out the image to remove the unnecessary details of the images, leave only basic information such as structure, brightness and darkness, and discard the differences in images caused by different sizes and proportions.
The images are zoomed-out by bicubic (cubic convolution) interpolation. The zoomed-out images are high in quality and less distorted, in spite of heavy calculation burden. As shown in
F(i′,j′)=Σrow=−12Σcol=−12f(i+row,j+col)S(row−v)S(col−u) (1),
where v represents the deviation of the number of rows and u represents the deviation of the number of columns; row represents a certain row and col represents a certain column; S(x) represents the interpolation expression which may be selected according to actual requirements, commonly including triangle interpolation, Bell interpolation and B spline interpolation. In this embodiment of the disclosure, Bell interpolation is used.
To calculate the dHash value of the images better, in this embodiment of the disclosure, the images are zoomed-out to a size having 9×8 pixels, i.e., total 72 pixels.
S2: The images are converted to grayscale images. Usually, if the similarity of the contrast images is less related to color, the images are converted to grayscale images to decrease the complexity in the subsequent calculations. Weighted averaging is used: since people have different sensitivities to red light, green light and blue light, a different weight is provided for each pixel in the images to obtain the gray value of this pixel:
Gray=0.30×R+0.59×G+0.11×B (2).
S3: The Hash fingerprints of the images are obtained. That is, the Hash strings corresponding to the images are obtained. The common perceptual hash algorithms include aHash, pHash and dHash. aHash (average hashing) is fast, but often low in accuracy; pHash (perception hashing) is high in accuracy, but relatively slow; and dHash (difference hashing) is high in accuracy and also fast. Therefore, in this embodiment of the disclosure, the Hash fingerprints of the images are obtained by dHash.
S4: The Hamming distance between different images is calculated. In the information theory, the Hamming distance represents the number of different characters in the corresponding position of two equal-length strings. The Hamming distance between the strings x and y is denoted by d(x, y):
d(x,y)=Σx⊕y (3)
where ⊕ represents exclusive OR. From another prospective, the Hamming distance measures the minimum number of replacements needed to change the string x to the character string y by means of character replacement. The Hamming distance indicates how many steps are needed to change A to B. For example, for strings “abc” and “ab3”, the Hamming distance is 1, since it is just needed to change “c” to “3”.
The Hamming distance in dHash is the number of differences to be changed. The differences are denoted by 0 and 1, which can be considered as binary. For binary 0110 and 1111, the Hamming distance is 2. The dHash values of the two images are converted to binary differences which are then subject to exclusive OR. The number of “1” in the result of the exclusive OR operation, i.e., the number of different digits, is counted. It is the Hamming distance.
S5: The Hash fingerprints of a current colonoscopy image with the Hash fingerprints of 9 previous colonoscopy images are compared, to obtain an overlapping rate of the current image with any one of the 9 images, i.e., the similarity between the current colonoscopy image and any one of the 9 images:
S6: The weighted similarity of the images at a point in time t is calculated:
where Simi represents the similarity between the current image and the ith image (i ranges from 1 to 9) before the current image at the point in time t.
S7: The weighted overlapping rate at the point in time t is converted into a stability coefficient: ESim=100−
S8: A mean stability coefficient of the colonoscopy images within a period of time 0-t is calculated, wherein the mean stability coefficient is the mean of stability coefficients at all points in time.
S9: 50 standard colonoscopy videos with a withdrawal time of more than 6 minutes, 50 sub-standard colonoscopy videos with a withdrawal time of 4-6 minutes, and 50 low-quality colonoscopy videos with a withdrawal time of less than 4 minutes are analyzed to obtain the following result:
S10: According to the operations S1 to S8, the stability coefficient of the withdrawal by a physician performing the colonoscopy is monitored in real time and fed back to the physician, a warning signal is given when the withdrawal speed exceeds 30, and an emergency alarm is given when the withdrawal speed exceeds 45.
The disclosure further provides a device for monitoring a colonoscope withdrawal speed, the device comprising:
It will be obvious to those skilled in the art that changes and modifications may be made, and therefore, the aim in the appended claims is to cover all such changes and modifications.
Number | Date | Country | Kind |
---|---|---|---|
201811481234.7 | Dec 2018 | CN | national |
This application is a continuation-in-part of International Patent Application No. PCT/CN2019/106102 with an international filing date of Sep. 17, 2019, designating the United States, now pending, and further claims foreign priority benefits to Chinese Patent Application No. 201811481234.7 filed Dec. 5, 2018. The contents of all of the aforementioned applications, including any intervening amendments thereto, are incorporated herein by reference. Inquiries from the public to applicants or assignees concerning this document or the related applications should be directed to: Matthias Scholl P. C., Attn.: Dr. Matthias Scholl Esq., 245 First Street, 18th Floor, Cambridge, MA 02142.
Number | Name | Date | Kind |
---|---|---|---|
20070271226 | Zhang | Nov 2007 | A1 |
20080058593 | Gu | Mar 2008 | A1 |
20190080454 | Hameed | Mar 2019 | A1 |
Number | Date | Country |
---|---|---|
109166615 | Jan 2019 | CN |
109598716 | Apr 2019 | CN |
114529742 | May 2022 | CN |
Number | Date | Country | |
---|---|---|---|
20200364880 A1 | Nov 2020 | US |
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2019/106102 | Sep 2019 | US |
Child | 16986232 | US |