WO2022095839A1 - 图像处理方法、电子设备及可读存储介质 - Google Patents

图像处理方法、电子设备及可读存储介质 Download PDF

Info

Publication number
WO2022095839A1
WO2022095839A1 PCT/CN2021/128057 CN2021128057W WO2022095839A1 WO 2022095839 A1 WO2022095839 A1 WO 2022095839A1 CN 2021128057 W CN2021128057 W CN 2021128057W WO 2022095839 A1 WO2022095839 A1 WO 2022095839A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
original image
frame rate
grayscale
value
Prior art date
Application number
PCT/CN2021/128057
Other languages
English (en)
French (fr)
Inventor
杨戴天杙
李益
胡慧
刘浩
明繁华
Original Assignee
安翰科技(武汉)股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 安翰科技(武汉)股份有限公司 filed Critical 安翰科技(武汉)股份有限公司
Priority to KR1020237015372A priority Critical patent/KR20230083326A/ko
Priority to EP21888536.6A priority patent/EP4241650A1/en
Priority to JP2023527384A priority patent/JP2023548226A/ja
Priority to US18/252,037 priority patent/US20230419482A1/en
Publication of WO2022095839A1 publication Critical patent/WO2022095839A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B1/00Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor
    • A61B1/00002Operational features of endoscopes
    • A61B1/00004Operational features of endoscopes characterised by electronic signal processing
    • A61B1/00009Operational features of endoscopes characterised by electronic signal processing of image signals during a use of endoscope
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B1/00Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor
    • A61B1/00002Operational features of endoscopes
    • A61B1/00004Operational features of endoscopes characterised by electronic signal processing
    • A61B1/00009Operational features of endoscopes characterised by electronic signal processing of image signals during a use of endoscope
    • A61B1/000094Operational features of endoscopes characterised by electronic signal processing of image signals during a use of endoscope extracting biological structures
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B1/00Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor
    • A61B1/04Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor combined with photographic or television appliances
    • A61B1/041Capsule endoscopes for imaging
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B1/00Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor
    • A61B1/273Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor for the upper alimentary canal, e.g. oesophagoscopes, gastroscopes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/50Constructional details
    • H04N23/555Constructional details for picking-up images in sites, inaccessible due to their dimensions or hazardous conditions, e.g. endoscopes or borescopes
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B1/00Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor
    • A61B1/04Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor combined with photographic or television appliances
    • A61B1/045Control thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing
    • G06T2207/30028Colon; Small intestine

Definitions

  • the present invention relates to the field of medical device imaging, and in particular, to an image processing method, an electronic device and a readable storage medium.
  • Capsule endoscopes are used more and more for gastrointestinal examination; capsule endoscopes are taken orally, passed through the oral cavity, esophagus, stomach, small intestine, large intestine, and finally excreted. Usually, the capsule endoscope runs passively with the peristalsis of the digestive tract. During this process, the capsule endoscope captures images at a certain frame rate for doctors to check the health of each section of the patient's digestive tract.
  • Capsule endoscopes are powered by internal batteries, and rely on the camera module to complete the shooting of digestive tract pictures, and transmit them out of the body wirelessly; limited by battery power, usually the total inspection time of capsule endoscopes is 8 to 14 hours, and the total number of pictures taken is 8-14 hours. The number is 30,000 to 100,000; therefore, the average picture shooting frame rate is 1 to 2fps (frame per second), and it can support 4 to 8fps or even 10 to 30fps in a short time.
  • the existing capsule endoscopes have the following problems:
  • Problem 3 There are too few images of the intestinal lumen, and too many images of the intestinal wall; for the examination of the small intestine and colon, observing the structure and shape of the intestinal lumen is very helpful for the diagnosis of diseases; however, the capsule endoscope is in the intestine, and the lens is very It may be close to the intestinal wall, on the one hand, the field of vision is narrow, and on the other hand, the overall situation of the intestine cannot be grasped, which interferes with the discovery of lesions.
  • the purpose of the present invention is to provide an image processing method, an electronic device and a readable storage medium.
  • an embodiment of the present invention provides an image processing method, the method includes: acquiring an original image, judging whether the current original image contains a cavity, and if so, increasing the frame rate based on the original shooting Shooting frame rate; if not, keep shooting at the original shooting frame rate.
  • determining whether the current original image contains a cavity includes:
  • each dark pixel connected area Based on the first binarized image, obtain each dark pixel connected area, and count the total number of dark pixel connected areas whose number of dark pixels is greater than a preset first number threshold; the dark pixels are those whose gray value is smaller pixel point;
  • converting the grayscale image into the first binarized image includes: performing a binarization process on the grayscale image according to the maximum grayscale and the minimum grayscale value of the grayscale image to form the first binarized image.
  • a binarized image is
  • performing binarization processing on the grayscale image according to the maximum grayscale value and the minimum grayscale value of the grayscale image to form the first binarized image specifically includes:
  • the value of the pixel in the grayscale image is greater than the grayscale threshold, the value of the pixel is represented by the first numerical value in the first binarized image; if the grayscale value of the pixel in the grayscale image is not greater than the grayscale threshold, the value of the pixel is represented by a second numerical value in the first binarized image; the first numerical value is different from the second numerical value;
  • the grayscale threshold m1 R ⁇ maxv+(1-R) ⁇ minv, wherein R represents the scale coefficient, which is a constant; maxv represents the maximum gray value in the grayscale image, and minv represents the minimum grayscale value in the grayscale image. degree value.
  • determining whether the current original image contains a cavity includes:
  • each depth value in the depth image is the distance of the detection object corresponding to each pixel in the original image relative to the capsule endoscope
  • each bright pixel connected area Based on the second binarized image, obtain each bright pixel connected area, and count the total number of bright pixel connected areas whose number of bright pixels is greater than a preset second number threshold; the bright pixels are pixels that are far away point;
  • converting the grayscale image into the first binarized image includes: converting the depth image into the second binarized image includes:
  • the value of the pixel in the depth image is greater than the preset depth threshold, the value of the pixel is represented by the third value in the second binarized image; if the gray value of the pixel in the grayscale image is not greater than If the depth threshold is preset, the value of the pixel is represented by a fourth numerical value in the second binarized image; the third numerical value is different from the fourth numerical value.
  • the shooting frame rate is increased on the basis of the original shooting frame rate, it specifically includes:
  • the total area of the cavity is taken as the cavity index corresponding to the original image
  • the shooting frame rate is adjusted according to the cavity index; the larger the cavity index, the higher the shooting frame rate.
  • the method further includes:
  • the method further includes:
  • an embodiment of the present invention provides an electronic device, including a memory and a processor, the memory stores a computer program that can be executed on the processor, and the processor executes the program
  • the image processing method includes: acquiring an original image, judging whether the current original image contains a cavity, and if so, increasing the shooting frame rate on the basis of the original shooting frame rate; No, keep shooting at the original shooting frame rate.
  • an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements steps in an image processing method, wherein,
  • the image processing method includes: acquiring an original image, judging whether the current original image contains a cavity, if so, increasing the shooting frame rate on the basis of the original shooting frame rate; if not, maintaining the original shooting frame rate and continuing to shoot.
  • the beneficial effects of the present invention are: the image processing method, electronic device and readable storage medium of the present invention can automatically adjust the shooting frame rate according to the image actually captured by the capsule endoscope, and improve the intestinal cavity.
  • the capture of images reduces the probability of missed shots, and at the same time achieves the purpose of saving power; improving the efficiency of the capsule endoscope.
  • FIG. 1 is a schematic flowchart of an image processing method provided by an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of identifying a cavity based on an original image provided by the first embodiment of the present invention
  • FIG. 6 is a schematic flowchart of identifying a cavity based on an original image provided by the second embodiment of the present invention.
  • FIG. 9 is a schematic flowchart of the image processing method of the preferred embodiment formed based on FIG. 1;
  • FIG. 10 is a schematic diagram of an image-based thread operation flow according to an embodiment of the present invention.
  • a first embodiment of the present invention provides an image processing method, the method includes:
  • whether the original image contains a cavity is identified in the following two ways.
  • judging whether the current original image contains a cavity includes: S11, converting the current original image into a grayscale image; S12, converting the grayscale image Converting into a first binarized image; S13. Based on the first binarized image, obtain each dark pixel connected area, and count the total number of dark pixel connected areas whose number of dark pixels is greater than a preset first number threshold ; the dark pixel is a pixel with a smaller gray value; S14 , confirming whether the current original image contains a cavity according to the total number of connected areas of dark pixels obtained by statistics.
  • the original image is a color image in RGB format, and converting the color image into a grayscale image is a prior art technique, which will not be described further herein.
  • each pixel in the grayscale image has a unique grayscale value.
  • the grayscale image Perform binarization processing to form a first binarized image.
  • the grayscale threshold is calculated according to the maximum grayscale value and the minimum grayscale value; if the grayscale value of a pixel in the grayscale image is greater than the grayscale threshold, the value of the pixel is binarized in the first binarization
  • the image is represented by the first numerical value; if the grayscale value of the pixel in the grayscale image is not greater than the grayscale threshold, the pixel value is represented by the second numerical value in the first binarized image.
  • the first numerical value and the second numerical value are different.
  • the grayscale threshold m1 R ⁇ maxv+(1-R) ⁇ minv, where R represents the proportional coefficient, which is a constant; maxv represents the maximum gray value in the grayscale image, minv Represents the smallest grayscale value in a grayscale image.
  • R represents the proportional coefficient, which is a constant; maxv represents the maximum gray value in the grayscale image, minv Represents the smallest grayscale value in a grayscale image.
  • step S12 when the intestinal cavity is photographed, the scene is rich in layers, and there are objects with darker and brighter brightness, so the scene with darker brightness is usually identified as the intestinal cavity, and the binarization process can segment the intestinal cavity area.
  • the brightness is lower than the grayscale threshold, it is set to 0, and if the brightness is higher than the grayscale threshold, it is set to 255.
  • step S13 for each dark pixel connected region, count the number of its dark pixels, and exclude discrete dark pixel connected regions by comparing with the first number threshold.
  • the first quantity threshold is a quantity constant value, the size of which can be specifically set as required.
  • FIG. 5 is a first binarized image obtained by another specific example of the present invention.
  • the first number threshold is set to 4.
  • the number of pixels in the three connected regions of dark pixels is all less than the first number threshold.
  • the remaining dark pixel connected regions used for calculation in the specific example shown in FIG. 5 are 0 indivual.
  • step S14 if the total number of connected areas of dark pixels is 0, it is confirmed that the current original image does not contain cavities; if the total number of connected areas of dark pixels is between 0 and the first index threshold, then Confirm that the current original image contains cavities; if the total number of connected areas of dark pixels is not less than the first index threshold, it is confirmed that the current original image is incorrectly identified.
  • the first index threshold is a constant value, the size of which can be specifically set as required.
  • the number of cavities is usually 1, 2 or 3.
  • the first index threshold is set to 4, for example.
  • judging whether the current original image contains a cavity includes: S21 , converting the current original image into a depth image, each of which is in the depth image The depth value is the distance of the detection object corresponding to each pixel in the original image relative to the capsule endoscope; S22, convert the depth image into a second binarized image; S23, based on the second binarized image , obtain each bright pixel connected area, and count the total number of bright pixel connected areas whose number of bright pixels is greater than the preset second number threshold; the bright pixels are pixels that are far away from each other; S24, according to the statistics obtained bright pixels connected The total number of regions confirms whether the current raw image contains cavities.
  • step S21 there are many ways to convert the original image into a depth image, which are in the prior art.
  • the Chinese patent application with publication number CN110335318A whose invention name is: a camera system-based object measurement in the digestive tract method.
  • step S22 specifically includes: if the depth value of the pixel in the depth image is greater than the preset depth threshold, then The value of the pixel point is represented by the third value in the second binarized image; if the gray value of the pixel point in the grayscale image is not greater than the preset depth threshold, the value of the pixel point is represented in the second binary image.
  • the valued image is represented by a fourth numerical value; the third numerical value and the fourth numerical value are different.
  • the preset depth threshold is a depth numerical constant value, and its size can be specifically set as required.
  • the preset depth threshold is configured to be 19, and its unit is mm. Further, after each depth value in the depth image is sequentially compared with a preset depth threshold, a second binarized image as shown in FIG. 8 is formed.
  • the depth value of each pixel in the image is replaced by only two numerical values.
  • the two numerical values can be specifically selected as required.
  • the two values are "0" and “1” respectively, and “0” represents that the depth value of the pixel point is small, and “1” represents that the depth value of the pixel point is large, that is, the pixel point that is farther away.
  • "0" and “1” can also be interchanged; and the two values can also be transformed accordingly, for example, transformed into “0” and "255", or transformed into other values, which are not described here. Do further elaboration.
  • binarization processing can segment the intestinal lumen area, in this specific example, set to 1 if the distance is greater than the preset depth threshold, and set to 0 if the distance is lower than the preset depth threshold.
  • step S23 for each bright pixel connected region, count the number of its bright pixels, and exclude discrete bright pixel connected regions by comparing with the second number threshold. Continuing with the specific example shown in FIG. 8 , after comparison, the remaining connected region of bright pixels used for calculation is one.
  • step S24 if the total number of connected areas of bright pixels is 0, it is confirmed that the current original image does not contain cavities; if the total number of connected areas of bright pixels is between 0 and the second index threshold, then Confirm that the current original image contains cavities; if the total number of connected areas of bright pixels is not less than the second index threshold, it is confirmed that the current original image is incorrectly identified.
  • the second index threshold is a constant value, the size of which can be specifically set as required.
  • the number of cavities is usually 1, 2, or 3.
  • the second index threshold is set to 4, for example.
  • method 1 and method 2 may be performed alternatively, or may be performed sequentially or simultaneously.
  • method 1 first and then execute method 2 as an example: if method 1 determines that a cavity is included, then perform verification by executing method 2, and take the result of method 2 as the final judgment result;
  • Execute method 2 and then execute method 1 as an example: if method 2 determines that a cavity is included, perform verification by executing method 1, and take the result of method 1 as the final judgment result; when two schemes are selected to be executed at the same time, if method 1 If it is judged that the cavity is contained in the method 2 and method 2, it is confirmed that the cavity is contained; otherwise, the result is that the recognition error of the current original image is confirmed.
  • the shooting frame rate is increased on the basis of the original shooting frame rate, which specifically includes: if it is confirmed that the cavity is contained in the current original image, the connected area of the cavity will be determined.
  • the total area of is used as the cavity index corresponding to the original image; the shooting frame rate is adjusted according to the cavity index; the larger the cavity index, the higher the shooting frame rate.
  • each pixel is represented by 1.
  • the number of pixels included in the connected area of dark pixels is 6,
  • its area can be represented by a value of 6; that is, the cavity index corresponding to the original image is 6.
  • the mapping relationship between the frame rate and the cavity index is configured.
  • the original base frame rate is 2fps
  • the frame rate is 4fps
  • the frame rate is 5fps
  • the frame rate is 5fps
  • the frame rate is 6fps
  • the mapping relationship between the cavity index and the frame rate can be specifically set as required, and will not be described further here.
  • the specific example shown in FIG. 4 includes a cavity, and the cavity index is 6. Therefore, the shooting frame rate needs to be improved and adjusted, and the adjusted shooting frame rate is 6fps.
  • the method further includes: P1, calculating the sampling of adjacent pictures according to the original shooting frame rate Output interval time t; P2. Starting from the first original image acquired, an original image is sampled every distance interval time t; P3. After each sampling, compare the similarity between the currently sampled original image and the pre-stored image , if they are similar, discard the currently sampled original image, if not, output the currently sampled original image and replace the pre-stored image with the currently sampled original image. In this way, although a large number of redundant images are generated during the shooting process, during the output process, the images are selectively output, that is, to avoid outputting many duplicate images, thereby improving the doctor's reading efficiency and reducing the doctor's reading burden.
  • the sampling interval is t, that is, if the original shooting frame rate is kept unchanged, each shot image will be sampled. If the shooting frame rate is increased, only the pictures taken at every interval t will be sampled since the first picture; that is, after the shooting frame rate is increased, the total number of samples in the same time remains unchanged. In this way, the sampling efficiency is improved.
  • sampling means that the processing thread samples the captured images at predetermined time intervals, and further, only the sampled images are compared for similarity. In this way, the similarity comparison is selectively performed, and the images are further selected and output, thereby improving the reading efficiency.
  • step P3 the similarity comparison is a general algorithm in the prior art; it usually needs to perform feature extraction on the original image in sequence, feature vector statistics, and finally perform similarity judgment.
  • an image similarity algorithm based on LBP Local Binary Pattern, local binary pattern
  • the main steps of the algorithm are: extracting the LBP information of the image, dividing the statistical histograms into multiple regions, and then forming a feature vector describing the image information, and then It is judged whether the two images are similar according to the size of the feature vector, which will not be further described here.
  • the image In the process of capturing images by the capsule endoscope, rotation will occur. In order to avoid the influence of the multi-angle images on the similarity judgment and the user's subjective feeling, before the similarity comparison, the image can be rotated according to the posture of the capsule endoscope. Make it the same shooting angle and pose as the contrasting image. In this way, the similarity judgment result is more accurate.
  • independent threads are used to perform the above steps.
  • three independent threads are configured, which are a picture-taking thread, a processing thread, and a transmission thread. interference.
  • the frame rate can be adjusted according to the cavity, and the transmission of redundant images can be effectively reduced.
  • the workload will not be increased due to the adjustment of the frame rate.
  • the image capturing thread captures images according to the configured frame rate, and when no cavity is detected, it always captures images at the original capturing frame rate, that is, an image is captured every interval time t; at the same time, the processing thread captures an image every interval time t, sample an image.
  • the image capture thread captures images according to the adjusted frame rate; in this specific example, the capture frame rate is increased based on the original frame rate, that is, an image is captured every t1, t1 ⁇ t; at the same time, The processing thread also samples an image at every interval t.
  • the bars on the image-taking thread represent images, wherein the higher bars represent the sampled images calculated at the original capture frame rate.
  • the transmission thread only compares the similarity between the sampled image and the pre-stored image; the first pre-stored image is the first sampled image, and the subsequent pre-stored images are changed according to the similarity result. It can be seen from the above: here, no matter whether the cavity is recognized or not, the processing thread always samples at the time interval of t, and performs ICD (Intestinal Cavity Detection, intestinal cavity identification) and ISJ (Image Similarity Judgment, image similarity comparison) processing.
  • ICD Intestinal Cavity Detection, intestinal cavity identification
  • ISJ Image Similarity Judgment, image similarity comparison
  • the method further includes: calculating the sampling output interval time t of adjacent pictures according to the original shooting frame rate, Starting from the acquired first original image, an original image is sampled every distance interval t; and step S1 is executed cyclically after each sampling, that is, based on the currently sampled original image, it is determined whether it contains a cavity.
  • the camera frame rate of the camera thread is increased. However, these images obtained by increasing the frame rate are not calculated and transmitted; if it is confirmed that there is no cavity, the camera frame rate will not be changed; at the same time, The transmission thread compares the similarity of the sampled images, and when it is judged that the current image is a similar image, the image is discarded and not transmitted.
  • one branch in the transmission thread compares the similarity of the sampled original images, and judges whether to output the currently sampled original image according to the comparison result; The result adjusts the shooting frame rate.
  • the sampling output interval time of adjacent pictures can be calculated based on the improved frame rate, and then the similarity of the sampled images can be compared and output, or the sampled images can be identified by cavity recognition and output.
  • the frame rate adjustment is performed, which will not be further described here.
  • an embodiment of the present invention provides an electronic device, including a memory and a processor, the memory stores a computer program that can be executed on the processor, and the processor implements the above when executing the program steps in an image processing method.
  • an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps in the image processing method as described above.
  • the image processing method, electronic device and readable storage medium of the present invention can simply and efficiently confirm whether the capsule endoscope has reached the preset detection position based on the images obtained by the existing hardware structure, without the need for additional At the same time, in the process of acquiring pictures, the image data is acquired at a very low equivalent frame rate, which greatly saves battery power and improves the efficiency of capsule endoscopy.

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Surgery (AREA)
  • Engineering & Computer Science (AREA)
  • Radiology & Medical Imaging (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Veterinary Medicine (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Optics & Photonics (AREA)
  • Biophysics (AREA)
  • Animal Behavior & Ethology (AREA)
  • Pathology (AREA)
  • Public Health (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Gastroenterology & Hepatology (AREA)
  • Endoscopes (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

一种图像处理方法、电子设备及可读存储介质,方法包括:获取原始图像(S1),判断当前的原始图像中是否包含腔体,若是,在原始拍摄帧率基础上提高拍摄帧率;若否,保持原始的拍摄帧率继续拍摄。本方法可以根据胶囊内窥镜实际拍摄到的图像自动调整其拍摄帧率,提高肠腔图像的捕获,降低漏拍概率,同时还能达到节省电量的目的;提升胶囊内窥镜的使用效率。

Description

图像处理方法、电子设备及可读存储介质
本申请要求了申请日为2020年11月6日,申请号为202011227075.5,发明名称为“图像处理方法、电子设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及医疗设备成像领域,尤其涉及一种图像处理方法、电子设备及可读存储介质。
背景技术
胶囊内窥镜用于消化道检查受到越来越多的应用;胶囊内窥镜由口服入,经过口腔、食管、胃、小肠、大肠,最后排出体外。通常胶囊内窥镜随消化道蠕动而被动运行,这个过程中胶囊内窥镜以一定的帧率拍摄图像,供医生检查患者的消化道各区段的健康状况。
胶囊内窥镜利用内部电池供电,依靠摄像模块完成消化道图片的拍摄,并通过无线传出体外;受电池电量等限制,通常胶囊内窥镜的总检查时间在8~14小时,总拍摄图片数量3~10万;因此,平均图片拍摄帧率为1~2fps(frame per second),短时间可支持4~8fps,甚至10~30fps。
综合考虑电量、拍摄质量以及传输效率,现有胶囊内窥镜存在以下问题:
问题1:考虑拍摄质量,拍摄帧率越高,视频图像越流畅,漏拍概率越低,然而,胶囊内窥镜使用电池供电,电量有限,难以支持其8~14小时始终以高帧率拍摄;
问题2:考虑电池电量,始终以低拍摄帧率拍摄,该种方式存在漏拍的风险;
问题3:肠腔图像过少,而肠壁图像过多;对于小肠、结肠检查,观察肠腔的结构、形态对疾病诊断有很大的帮助;然而,胶囊内窥镜在肠道中,镜头很可能贴着肠壁,一方面视野狭小,另一方面,无法掌握肠道的整体情况,干预了病灶的发现。
现有需求中,需要保证电量充足,还要提高拍摄帧率,同时还要拍摄到更多的肠腔信息;因此,需要一种新的图像处理方法解决上述问题。
发明内容
为解决上述技术问题,本发明的目的在于提供一种图像处理方法、电子设备及可读存储介质。
为了实现上述发明目的之一,本发明一实施方式提供一种图像处理方法,所述方法包括:获取原始图像,判断当前的原始图像中是否包含腔体,若是,在原始拍摄帧率基础上提高拍摄帧率;若否,保持原始的拍摄帧率继续拍摄。
作为本发明一实施方式的进一步改进,判断当前的原始图像中是否包含腔体,包括:
将当前的原始图像转换为灰度图像;
将灰度图像转换为第一二值化图像;
以所述第一二值化图像为基础,获取每一暗像素连通区域,统计暗像素数量大于预设第一数量阈值的暗像素连通区域的总数量;所述暗像素为灰度值较小的像素点;
根据统计获得的暗像素连通区域的总数量确认当前的原始图像是否包含腔体。
作为本发明一实施方式的进一步改进,将灰度图像转换为第一二值化图像包括:根据灰度图像的最大灰度和最小灰度值对所述灰度图像进行二值化处理形成第一二值化图像。
作为本发明一实施方式的进一步改进,根据灰度图像的最大灰度值和最小灰度值对所述灰度图像进行二值化处理形成第一二值化图像具体包括:
若灰度图像中的像素点的灰度值大于灰度阈值,则将该像素点的值在第一二值化图像中以第一数值表示;若灰度图像中的像素点的灰度值不大于灰度阈值,则将该像素点的值在第一二值化图像中以第二数值表示;所述第一数值和所述第二数值不同;
所述灰度阈值m1=R×maxv+(1-R)×minv,其中,R表示比例系数,其为常数;maxv表示灰度图像中的最大灰度值,minv表示灰度图像中的最小灰度值。
作为本发明一实施方式的进一步改进,根据统计获得的暗像素连通区域的总数量确认当前的原始图像是否包含腔体,具体包括:
若暗像素连通区域的总数量为0,则确认当前的原始图像未包含腔体;
若暗像素连通区域的总数量介于0和第一指数阈值之间,则确认当前的原始图像包含腔体;
若暗像素连通区域的总数量不小于第一指数阈值,则确认当前期原始图像识别错误。
作为本发明一实施方式的进一步改进,判断当前的原始图像中是否包含腔体,包括:
将当前的原始图像转换为深度图像,所述深度图像中每一深度值为原始图像中每一像素点对应的检测物相对于胶囊内窥镜的距离;
将深度图像转换为第二二值化图像;
以所述第二二值化图像为基础,获取每一亮像素连通区域,统计亮像素数量大于预设第二数量阈值的亮像素连通区域的总数量;所述亮像素为距离较远的像素点;
根据统计获得的亮像素连通区域的总数量确认当前的原始图像是否包含腔体。
作为本发明一实施方式的进一步改进,将灰度图像转换为第一二值化图像包括:将深度图像转换为第二二值化图像包括:
若深度图像中像素点的深度值大于预设深度阈值,则将该像素点的值在第二二值化 图像中以第三数值表示;若灰度图像中的像素点的灰度值不大于预设深度阈值,则将该像素点的值在第二二值化图像中以第四数值表示;所述第三数值和所述第四数值不同。
作为本发明一实施方式的进一步改进,根据统计获得的亮像素连通区域的总数量确认当前的原始图像是否包含腔体,具体包括:
若亮像素连通区域的总数量为0,则确认当前的原始图像未包含腔体;
若亮像素连通区域的总数量介于0和第二指数阈值之间,则确认当前的原始图像包含腔体;
若亮像素连通区域的总数量不小于第二指数阈值,则确认当前期原始图像识别错误。
作为本发明一实施方式的进一步改进,若是,在原始拍摄帧率基础上提高拍摄帧率,具体包括:
若确认当前的原始图像中包含腔体,则将腔体的总面积作为原始图像所对应的腔体指数;
根据所述腔体指数调整拍摄帧率;所述腔体指数越大,所述拍摄帧率越高。
作为本发明一实施方式的进一步改进,若是,在原始拍摄帧率基础上提高拍摄帧率后,所述方法还包括:
按照原始的拍摄帧率计算相邻图片的采样输出间隔时间t,
自获取的第一张原始图像开始,每距离间隔时间t采样一张原始图像;
并在每次采样后,基于当前采样的原始图像判断其是否包含腔体。
作为本发明一实施方式的进一步改进,在判断当前的原始图像中是否包含腔体后,所述方法还包括:
按照原始的拍摄帧率计算相邻图片的采样输出间隔时间t,
自获取的第一张原始图像开始,每距离间隔时间t采样一张原始图像;
并在每次采样后,以当前采样的原始图像与预存储图像做相似性比较;
若相似,则丢弃当前采样的原始图像;
若不相似,则输出当前采样的原始图像,并以当前采样的原始图像替换预存储图像。
为了解决上述发明目的之一,本发明一实施方式提供一种电子设备,包括存储器和处理器,所述存储器存储有可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现一种图像处理方法中的步骤,其中,所述图像处理方法包括:获取原始图像,判断当前的原始图像中是否包含腔体,若是,在原始拍摄帧率基础上提高拍摄帧率;若否,保持原始的拍摄帧率继续拍摄。
为了解决上述发明目的之一,本发明一实施方式提供一种计算机可读存储介质,其 上存储有计算机程序,所述计算机程序被处理器执行时实现一种图像处理方法中的步骤,其中,所述图像处理方法包括:获取原始图像,判断当前的原始图像中是否包含腔体,若是,在原始拍摄帧率基础上提高拍摄帧率;若否,保持原始的拍摄帧率继续拍摄。
与现有技术相比,本发明的有益效果是:本发明的图像处理方法、电子设备及可读存储介质,可以根据胶囊内窥镜实际拍摄到的图像自动调整其拍摄帧率,提高肠腔图像的捕获,降低漏拍概率,同时还能达到节省电量的目的;提升胶囊内窥镜的使用效率。
附图说明
图1是本发明一实施方式提供的图像处理方法的流程示意图;
图2是本发明第一实施方式提供的基于原始图像识别腔体的流程示意图;
图3是本发明一具体示例的灰度图像;
图4是本发明一具体示例的第一二值化图像;
图5是本发明另一具体示例的第一二值化图像;
图6是本发明第二实施方式提供的基于原始图像识别腔体的流程示意图;
图7是本发明一具体示例的深度图像;
图8是本发明一具体示例的第二二值化图像;
图9是基于图1形成的较佳实施方式的图像处理方法的流程示意图;
图10是本发明一实施方式提供的基于图像的线程操作流程示意图。
具体实施方式
以下将结合附图所示的具体实施方式对本发明进行详细描述。但这些实施方式并不限制本发明,本领域的普通技术人员根据这些实施方式所做出的结构、方法、或功能上的变换均包含在本发明的保护范围内。
如图1所示,本发明第一实施方式中提供一种图像处理方法,所述方法包括:
S1、获取原始图像,判断当前的原始图像中是否包含腔体,若是,在原始拍摄帧率基础上提高拍摄帧率;若否,保持原始的拍摄帧率继续拍摄。
本发明较佳实施方式中,通过如下两种方式识别原始图像中是否包含腔体。
本发明第一实施方式(方法1)中,结合图2所示,判断当前的原始图像中是否包含腔体,包括:S11、将当前的原始图像转换为灰度图像;S12、将灰度图像转换为第一二值化图像;S13、以所述第一二值化图像为基础,获取每一暗像素连通区域,统计暗像素数量大于预设第一数量阈值的暗像素连通区域的总数量;所述暗像素为灰度值较小的像素点;S14、根据统计获得的暗像素连通区域的总数量确认当前的原始图像是否包含腔体。
对于步骤S11,原始图像为RGB格式的彩色图像,将彩色图像转换为灰度图像为现有技术,在此不做进一步的赘述。结合图3所示,原始图像转换为灰度图像后,灰度图像中的每一像素点具有唯一的灰度值。
对于步骤S12,将灰度图像转换为第一二值化图像的方式具有多种,本发明较佳实施方式中,根据灰度图像的最大灰度值和最小灰度值对所述灰度图像进行二值化处理形成第一二值化图像。具体的,根据所述最大灰度值和最小灰度值计算灰度阈值;若灰度图像中的像素点的灰度值大于灰度阈值,则将该像素点的值在第一二值化图像中以第一数值表示;若灰度图像中的像素点的灰度值不大于灰度阈值,则将该像素点的值在第一二值化图像中以第二数值表示。所述第一数值和所述第二数值不同。本发明较佳实施方式中,所述灰度阈值m1=R×maxv+(1-R)×minv,其中,R表示比例系数,其为常数;maxv表示灰度图像中的最大灰度值,minv表示灰度图像中的最小灰度值。接续图3所示,在本发明一具体示例中,配置R=0.2,解析灰度图像获取的maxv和minv的值,maxv=255,minv=0。如此,通过上述公式计算可得出m1的值为51。进一步的,通过灰度图像中每一像素点的灰度值依次与计算得出的灰度阈值m1进行比较后,形成如图4所示的第一二值化图像。
需要说明的是,对于第一二值化图像,图像中的每一像素点仅选用两个数值进行替换,相应的,两个数值可根据需要具体选定,在本发明具体示例中,两个数值分别为“0”和“255”,且“0”表示暗像素,“255”表示亮像素。在本发明其他实施方式中,“0”和“255”也可以分别表示亮像素和暗像素;且二值也可以相应变换,例如变换为“0”和“1”,或者是变换为其它数值,在此不做进一步的赘述。
对于步骤S12,由于拍摄肠腔时,场景层次丰富,存在亮度较暗和较亮的物体,因此亮度较暗的场景通常被认定为肠腔,二值化处理可分割出肠腔区域,在该具体示例中,亮度低于灰度阈值的置0,高于灰度阈值的置255。
对于步骤S13,对于每一暗像素连通区域,统计其暗像素的数量,并通过与第一数量阈值进行比较,排除掉离散的暗像素连通区域。
所述第一数量阈值为一数量常数值,其大小可以根据需要具体设定。
结合图5所示,图5为本发明另一具体示例获得的第一二值化图像,对于图4和图5所示具体示例,所述第一数量阈值设置为4,对于图4所示具体示例,经过对比后,其剩余以用于计算的暗像素连通区域为1个。对于图5所示具体示例,3个暗像素连通区域中的像素点数量均小于第一数量阈值,如此,经过对比后,图5所示具体示例剩余以用于计算的暗像素连通区域为0个。
较佳的,对于步骤S14,若暗像素连通区域的总数量为0,则确认当前的原始图像未包含腔体;若暗像素连通区域的总数量介于0和第一指数阈值之间,则确认当前的原始图像包含腔体;若暗像素连通区域的总数量不小于第一指数阈值,则确认当前原始图像识别错误。
所述第一指数阈值为一数量常数值,其大小可以根据需要具体设定。本发明具体示例中,对于图像中腔体,若存在,其数量通常为1、2或3,相应的,所述第一指数阈值例如设置为4。
结合图6所示,本发明第二实施方式(方法2)中,判断当前的原始图像中是否包含腔体,包括:S21、将当前的原始图像转换为深度图像,所述深度图像中每一深度值为原始图像中每一像素点对应的检测物相对于胶囊内窥镜的距离;S22、将深度图像转换为第二二值化图像;S23、以所述第二二值化图像为基础,获取每一亮像素连通区域,统计亮像素数量大于预设第二数量阈值的亮像素连通区域的总数量;所述亮像素为距离较远的像素点;S24、根据统计获得的亮像素连通区域的总数量确认当前的原始图像是否包含腔体。
对于步骤S21、将原始图像转换为深度图像的方式具有多种,其为现有技术,具体可参考公开号为CN110335318A的中国专利申请,其发明名称为:一种基于摄像系统的消化道内物体测量方法。
对于步骤S22、将深度图像转换为第二二值化图像的方式具有多种,本发明一具体实施方式中,步骤S22具体包括:若深度图像中像素点的深度值大于预设深度阈值,则将该像素点的值在第二二值化图像中以第三数值表示;若灰度图像中的像素点的灰度值不大于预设深度阈值,则将该像素点的值在第二二值化图像中以第四数值表示;所述第三数值和所述第四数值不同。
所述预设深度阈值为一深度数值常数值,其大小可以根据需要具体设定。
结合图7所示,在本发明一具体示例中,配置预设深度阈值为19,其单位为mm。进一步的,将深度图像中的每一深度值依次与预设深度阈值进行比较后,形成如图8所示的第二二值化图像。
需要说明的是,对于第二二值化图像,图像中的每一像素点的深度值仅选用两个数值进行替换,相应的,两个数值可根据需要具体选定,在本发明具体示例中,两个数值分别为“0”和“1”,且“0”代表像素点的深度值较小,“1”代表像素点的深度值较大,即表征距离较远的像素点。在本发明其他实施方式中,“0”和“1”也可以进行互换;且二值也可以相应变换,例如变换为“0”和“255”,或者是变换为其它数值,在此不做进 一步的赘述。
对于步骤S22,由于拍摄肠腔时,场景层次丰富,存在距离较远和较近的物体,因此距离较远的场景通常被认定为肠腔,距离较近的场景通常被认定为贴着肠壁拍摄;二值化处理可分割出肠腔区域,在该具体示例中,距离大于预设深度阈值的置1,距离低于预设深度阈值的置0。
对于步骤S23,对于每一亮像素连通区域,统计其亮像素的数量,并通过与第二数量阈值进行比较,排除掉离散的亮像素连通区域。接续图8所示具体示例,经过对比后,其剩余以用于计算的亮像素连通区域为1个。
较佳的,对于步骤S24,若亮像素连通区域的总数量为0,则确认当前的原始图像未包含腔体;若亮像素连通区域的总数量介于0和第二指数阈值之间,则确认当前的原始图像包含腔体;若亮像素连通区域的总数量不小于第二指数阈值,则确认当前原始图像识别错误。
所述第二指数阈值为一数量常数值,其大小可以根据需要具体设定。本发明具体示例中,对于图像中腔体,若存在,其数量通常为1、2或3,相应的,所述第二指数阈值例如设置为4。
需要说明的是,上述判断当前的原始图像中是否包含腔体的两种实施方式,也即方法1和方法2可以择一执行,也可以先后执行或同时执行。当先后执行时,以先执行方法1再执行方法2为例:若方法1判断包含腔体,则通过执行方法2进行校验,并以方法2的结果为最终判断结果;同样的,以先执行方法2再执行方法1为例:若方法2判断包含腔体,则通过执行方法1进行校验,并以方法1的结果为最终判断结果;当选择两种方案同时执行时,若方法1和方法2均判断包含腔体,则确认包含腔体,否则,其结果均为确认当前原始图像识别错误。
较佳的,对于步骤S1,若确认包含腔体,在原始拍摄帧率基础上提高拍摄帧率,具体包括:若确认当前的原始图像中包含腔体,则将用于确定腔体的连通区域的总面积作为原始图像所对应的腔体指数;根据所述腔体指数调整拍摄帧率;所述腔体指数越大,所述拍摄帧率越高。
为了便于理解,接续图4所示具体示例进行说明,例如:每个像素点的面积以1进行表示,则对于图4所示具体示例,其暗像素连通区域中包含的像素点为6个,相应的,其面积可以以数值6表示;即该原始图像对应的腔体指数为6。
进一步的,在拍摄图像之前,配置帧率与腔体指数的映射关系。例如:原始的基础帧率为2fps,腔体指数为4时,帧率为4fps,腔体指数为5时,帧率为5fps,腔体指数 为6时,帧率为6fps,依次类推,当然,腔体指数与帧率的映射关系可根据需要具体设定,在此不做进一步的赘述。
对应上述映射关系,图4所示具体示例中包含腔体,且腔体指数为6,如此,需要对拍摄帧率进行提升调整,且调整之后的拍摄帧率为6fps。
进一步的,结合图9所示,本发明较佳实施方式中,在判断当前的原始图像中是否包含腔体后,所述方法还包括:P1、按照原始的拍摄帧率计算相邻图片的采样输出间隔时间t;P2、自获取的第一张原始图像开始,每距离间隔时间t采样一张原始图像;P3、在每次采样后,以当前采样的原始图像与预存储图像做相似性比较,若相似,则丢弃当前采样的原始图像,若不相似,则输出当前采样的原始图像,并以当前采样的原始图像替换预存储图像。如此,在拍摄过程中虽然产生大量的冗余图像,但在输出过程中,对图像选择性输出,即避免输出较多的重复图像,进而提升医生的阅片效率,减轻医生的阅片负担。
需要说明的是,上述步骤P1至P3仅仅是为了描述方便所增加的标号,实际应用中,其标号顺序并不代表各步骤执行的顺序。
对于步骤P1,t=1/f(s),f表示原始的拍摄帧率,s为时间单位“秒”。
对于步骤P2,采样的间隔时间为t,即若保持原始的拍摄帧率不变,则每一张拍摄的图像均会被采样。若提高拍摄帧率,则只有在自第一张图片开始,每间隔时间t拍摄的图片才会被采样;即提高拍摄帧率后,相同时间内采样的总数量保持不变。如此,提升采样效率。
需要说明的是,这里的采样是指处理线程对所拍摄图像按照预定时间间隔采样,进一步的,只对被采样的图像进行相似性比较。如此,选择性进行相似性比较,并进一步的对图像进行选择输出,进而提升阅片效率。
对于步骤P3,相似性比较为现有技术的通用算法;其通常需要依次对原始图像做特征提取,特征向量统计,最后进行相似性判断。
例如采用基于LBP(Local Binary Pattern,局部二值模式)的图像相似性算法,该算法主要步骤为:提取图像的LBP信息,分多个区域统计直方图,然后形成描述图像信息的特征向量,之后根据特征向量的大小判断两张图像是否相似,在此不做进一步的赘述。
胶囊内窥镜拍摄图像过程中,会发生转动,为了避免多角度拍摄的图像对相似性判断以及用户主观感受的影响,在相似性比较之前,可以根据胶囊内窥镜的姿态对图像进行旋转,使其与对比的图像具有同一的拍摄角度和姿态。如此,相似性判断结果更加准确。
结合图10所示,本发明一具体示例中,采用独立的线程执行上述步骤,具体的,配置三个独立的线程,分别为拍图线程、处理线程和传输线程,各个线程独立运行,互不干扰。如此,既可以按照腔体调整帧率,又可以有效降低冗余图像的传输,同时,在降低冗余图像传输时,不会因为帧率的调整而增加工作量。
具体的,所述拍图线程按照配置的帧率拍摄图像,未检测到腔体时,始终以原始拍摄帧率拍摄图像,即每间隔时间t,拍摄一张图像;同时,处理线程每间隔时间t,采样一张图像。帧率提升后,拍图线程按照调整后的帧率拍摄图像;在该具体示例中,拍摄帧率在原始帧率基础上进行提升,即每间隔t1拍摄一张图像,t1<t;同时,处理线程同样以每间隔时间t,采样一张图像。拍图线程上的立柱表示图像,其中,较高的立柱表示按照原始拍摄帧率计算后被采样的图像。
传输线程仅对被采样的图像与预存储图像做相似性比较;其中,第一张预存储图像为采样的第一张图像,之后的预存储图像根据相似性的结果进行变更。由上可知:在这里,无论是否识别到腔体,处理线程始终以t的时间间隔采样,并通过传输线程对采样的图像进行ICD(Intestinal Cavity Detection,肠腔识别)和ISJ(Image Similarity Judgment,图像相似性比较)处理。
较佳的,对于步骤S1,若确认包含腔体,在原始拍摄帧率基础上提高拍摄帧率后,所述方法还包括:按照原始的拍摄帧率计算相邻图片的采样输出间隔时间t,自获取的第一张原始图像开始,每距离间隔时间t采样一张原始图像;并在每次采样后循环执行步骤S1,即基于当前采样的原始图像判断其是否包含腔体。
在识别为腔体后,提高拍照线程的拍照帧率,然而,这些因提高帧率获得的图像不进行计算处理,且全部传输;若确认不存在腔体,则不改变拍照帧率;同时,传输线程对采样图像进行相似性比较,且判断当前图像为相似图像时,丢弃该图像,不进行传输。
相应的,传输线程中的一条支路对采样的原始图像进行相似性比较,并根据其比较结果判断是否输出当前采样的原始图像;另一条支路对原始图像进行腔体识别,并根据其识别结果调整拍摄帧率。
当然,在本发明的其他实施方式中,可以基于提升后的帧率计算相邻图片的采样输出间隔时间,进而对采样的图像进行相似性比较并输出,或对采样的图像进行腔体识别并进行帧率调整,在此不做进一步的赘述。
进一步的,本发明一实施方式提供一种电子设备,包括存储器和处理器,所述存储器存储有可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现如上所述图像处理方法中的步骤。
进一步的,本发明一实施方式提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述图像处理方法中的步骤。
综上所述,本发明的图像处理方法、电子设备及可读存储介质,基于现有的硬件结构所获取的图像,可以简单高效的确认胶囊内窥镜是否到达预设检测位置,不需要额外的硬件辅助,且对硬件的算力需求较低;同时,在获取图片过程中,以极低的等效帧率获取图像数据,极大地节约电池电量,提升胶囊内窥镜的使用效率。
应当理解,虽然本说明书按照实施方式加以描述,但并非每个实施方式仅包含一个独立的技术方案,说明书的这种叙述方式仅仅是为清楚起见,本领域技术人员应当将说明书作为一个整体,各实施方式中的技术方案也可以经适当组合,形成本领域技术人员可以理解的其他实施方式。
上文所列出的一系列的详细说明仅仅是针对本发明的可行性实施方式的具体说明,它们并非用以限制本发明的保护范围,凡未脱离本发明技艺精神所作的等效实施方式或变更均应包含在本发明的保护范围之内。

Claims (13)

  1. 一种图像处理方法,其特征在于,所述方法包括:
    获取原始图像,判断当前的原始图像中是否包含腔体,若是,在原始拍摄帧率基础上提高拍摄帧率;若否,保持原始的拍摄帧率继续拍摄。
  2. 根据权利要求1所述的图像处理方法,其特征在于,判断当前的原始图像中是否包含腔体,包括:
    将当前的原始图像转换为灰度图像;
    将灰度图像转换为第一二值化图像;
    以所述第一二值化图像为基础,获取每一暗像素连通区域,统计暗像素数量大于预设第一数量阈值的暗像素连通区域的总数量;所述暗像素为灰度图像中灰度值不大于灰度阈值的像素点;
    根据统计获得的暗像素连通区域的总数量确认当前的原始图像是否包含腔体。
  3. 根据权利要求2所述的图像处理方法,其特征在于,将灰度图像转换为第一二值化图像包括:根据灰度图像的最大灰度和最小灰度值对所述灰度图像进行二值化处理形成第一二值化图像。
  4. 根据权利要求3所述的图像处理方法,其特征在于,根据灰度图像的最大灰度值和最小灰度值对所述灰度图像进行二值化处理形成第一二值化图像具体包括:
    若灰度图像中的像素点的灰度值大于灰度阈值,则将该像素点的值在第一二值化图像中以第一数值表示;若灰度图像中的像素点的灰度值不大于灰度阈值,则将该像素点的值在第一二值化图像中以第二数值表示;所述第一数值和所述第二数值不同;
    所述灰度阈值m1=R×maxv+(1-R)×minv,其中,R表示比例系数,其为常数;maxv表示灰度图像中的最大灰度值,minv表示灰度图像中的最小灰度值。
  5. 根据权利要求2所述的图像处理方法,其特征在于,根据统计获得的暗像素连通区域的总数量确认当前的原始图像是否包含腔体,具体包括:
    若暗像素连通区域的总数量为0,则确认当前的原始图像未包含腔体;
    若暗像素连通区域的总数量介于0和第一指数阈值之间,则确认当前的原始图像包含腔体;
    若暗像素连通区域的总数量不小于第一指数阈值,则确认当前原始图像识别错误。
  6. 根据权利要求1所述的图像处理方法,其特征在于,判断当前的原始图像中是否包含腔体,包括:
    将当前的原始图像转换为深度图像,所述深度图像中每一深度值为原始图像中每一像素点对应的检测物相对于胶囊内窥镜的距离;
    将深度图像转换为第二二值化图像;
    以所述第二二值化图像为基础,获取每一亮像素连通区域,统计亮像素数量大于预设第二数量阈值的亮像素连通区域的总数量;所述亮像素为深度图像中深度值大于预设深度阈值的像素点;
    根据统计获得的亮像素连通区域的总数量确认当前的原始图像是否包含腔体。
  7. 根据权利要求6所述的图像处理方法,其特征在于,将深度图像转换为第二二值化图像包括:
    若深度图像中像素点的深度值大于预设深度阈值,则将该像素点的值在第二二值化图像中以第三数值表示;若灰度图像中的像素点的灰度值不大于预设深度阈值,则将该像素点的值在第二二值化图像中以第四数值表示;所述第三数值和所述第四数值不同。
  8. 根据权利要求6所述的图像处理方法,其特征在于,根据统计获得的亮像素连通区域的总数量确认当前的原始图像是否包含腔体,具体包括:
    若亮像素连通区域的总数量为0,则确认当前的原始图像未包含腔体;
    若亮像素连通区域的总数量介于0和第二指数阈值之间,则确认当前的原始图像包含腔体;
    若亮像素连通区域的总数量不小于第二指数阈值,则确认当前原始图像识别错误。
  9. 根据权利要求1所述的图像处理方法,其特征在于,若是,在原始拍摄帧率基础上提高拍摄帧率,具体包括:
    若确认当前的原始图像中包含腔体,则将用于确定腔体的连通区域的总面积作为原始图像所对应的腔体指数;
    根据所述腔体指数调整拍摄帧率;所述腔体指数越大,所述拍摄帧率越高。
  10. 根据权利要求1至9任一项所述的图像处理方法,其特征在于,若是,在原始拍摄帧率基础上提高拍摄帧率后,所述方法还包括:
    按照原始的拍摄帧率计算相邻图片的采样输出间隔时间t,
    自获取的第一张原始图像开始,每距离间隔时间t采样一张原始图像;
    并在每次采样后,基于当前采样的原始图像判断其是否包含腔体。
  11. 根据权利要求1至9任一项所述的图像处理方法,其特征在于,在判断当前的原始图像中是否包含腔体后,所述方法还包括:
    按照原始的拍摄帧率计算相邻图片的采样输出间隔时间t,
    自获取的第一张原始图像开始,每距离间隔时间t采样一张原始图像;
    并在每次采样后,以当前采样的原始图像与预存储图像做相似性比较;
    若相似,则丢弃当前采样的原始图像;
    若不相似,则输出当前采样的原始图像,并以当前采样的原始图像替换预存储图像。
  12. 一种电子设备,包括存储器和处理器,所述存储器存储有可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现一种图像处理方法中的步骤,其中,所述图像处理方法包括:
    获取原始图像,判断当前的原始图像中是否包含腔体,若是,在原始拍摄帧率基础上提高拍摄帧率;若否,保持原始的拍摄帧率继续拍摄。
  13. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现一种图像处理方法中的步骤,其中,所述图像处理方法包括:
    获取原始图像,判断当前的原始图像中是否包含腔体,若是,在原始拍摄帧率基础上提高拍摄帧率;若否,保持原始的拍摄帧率继续拍摄。
PCT/CN2021/128057 2020-11-06 2021-11-02 图像处理方法、电子设备及可读存储介质 WO2022095839A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
KR1020237015372A KR20230083326A (ko) 2020-11-06 2021-11-02 영상 처리 방법, 전자 장치 및 판독 가능 기억 매체
EP21888536.6A EP4241650A1 (en) 2020-11-06 2021-11-02 Image processing method, and electronic device and readable storage medium
JP2023527384A JP2023548226A (ja) 2020-11-06 2021-11-02 画像処理方法、電子機器および可読記憶媒体
US18/252,037 US20230419482A1 (en) 2020-11-06 2021-11-02 Image processing method, and electronic device and readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011227075.5A CN112022067B (zh) 2020-11-06 2020-11-06 图像处理方法、电子设备及可读存储介质
CN202011227075.5 2020-11-06

Publications (1)

Publication Number Publication Date
WO2022095839A1 true WO2022095839A1 (zh) 2022-05-12

Family

ID=73572757

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/128057 WO2022095839A1 (zh) 2020-11-06 2021-11-02 图像处理方法、电子设备及可读存储介质

Country Status (6)

Country Link
US (1) US20230419482A1 (zh)
EP (1) EP4241650A1 (zh)
JP (1) JP2023548226A (zh)
KR (1) KR20230083326A (zh)
CN (1) CN112022067B (zh)
WO (1) WO2022095839A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112022067B (zh) * 2020-11-06 2021-01-12 安翰科技(武汉)股份有限公司 图像处理方法、电子设备及可读存储介质

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101579227A (zh) * 2009-03-19 2009-11-18 清华大学 一种图像采集存储系统及方法
CN108615045A (zh) * 2018-03-06 2018-10-02 重庆金山医疗器械有限公司 筛选胶囊内镜拍摄的图像的方法、装置及设备
US20190208123A1 (en) * 2016-11-07 2019-07-04 Olympus Corporation Capsule endoscope, receiving device, operation method of capsule endoscope, and computer readable recording medium
CN110335318A (zh) 2019-04-28 2019-10-15 安翰科技(武汉)股份有限公司 一种基于摄像系统的消化道内物体测量方法
CN110897596A (zh) * 2019-12-05 2020-03-24 重庆金山医疗技术研究院有限公司 自动调节胶囊拍摄速率的方法、内窥镜、记录仪及系统
CN110897594A (zh) * 2019-12-05 2020-03-24 重庆金山医疗技术研究院有限公司 帧率调节方法、图像记录仪、胶囊式内窥镜及系统
CN111345772A (zh) * 2018-12-20 2020-06-30 重庆金山医疗器械有限公司 一种调节图像采集帧率的方法及胶囊内窥镜系统
CN112022067A (zh) * 2020-11-06 2020-12-04 安翰科技(武汉)股份有限公司 图像处理方法、电子设备及可读存储介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07175925A (ja) * 1993-12-17 1995-07-14 Mitsubishi Electric Corp 特徴量算出装置及び特徴量算出方法
GB2396406A (en) * 2002-12-17 2004-06-23 Qinetiq Ltd Image analysis
JP4547293B2 (ja) * 2005-04-04 2010-09-22 オリンパス株式会社 画像表示装置
KR100876673B1 (ko) * 2007-09-06 2009-01-07 아이쓰리시스템 주식회사 촬영 속도 조절이 가능한 캡슐형 내시경
EP3164072B1 (en) * 2014-07-02 2020-04-08 Covidien LP System and method for segmentation of lung
CN106570930A (zh) * 2016-10-08 2017-04-19 中国海洋大学 一种基于三维超体素描述的数字化生理生物体建模方法
CN109325468B (zh) * 2018-10-18 2022-06-03 广州智颜科技有限公司 一种图像处理方法、装置、计算机设备和存储介质
CN109480746A (zh) * 2019-01-14 2019-03-19 深圳市资福医疗技术有限公司 智能控制胶囊式内窥镜在消化道不同部位工作方法及装置

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101579227A (zh) * 2009-03-19 2009-11-18 清华大学 一种图像采集存储系统及方法
US20190208123A1 (en) * 2016-11-07 2019-07-04 Olympus Corporation Capsule endoscope, receiving device, operation method of capsule endoscope, and computer readable recording medium
CN108615045A (zh) * 2018-03-06 2018-10-02 重庆金山医疗器械有限公司 筛选胶囊内镜拍摄的图像的方法、装置及设备
CN111345772A (zh) * 2018-12-20 2020-06-30 重庆金山医疗器械有限公司 一种调节图像采集帧率的方法及胶囊内窥镜系统
CN110335318A (zh) 2019-04-28 2019-10-15 安翰科技(武汉)股份有限公司 一种基于摄像系统的消化道内物体测量方法
CN110897596A (zh) * 2019-12-05 2020-03-24 重庆金山医疗技术研究院有限公司 自动调节胶囊拍摄速率的方法、内窥镜、记录仪及系统
CN110897594A (zh) * 2019-12-05 2020-03-24 重庆金山医疗技术研究院有限公司 帧率调节方法、图像记录仪、胶囊式内窥镜及系统
CN112022067A (zh) * 2020-11-06 2020-12-04 安翰科技(武汉)股份有限公司 图像处理方法、电子设备及可读存储介质

Also Published As

Publication number Publication date
EP4241650A1 (en) 2023-09-13
CN112022067A (zh) 2020-12-04
US20230419482A1 (en) 2023-12-28
JP2023548226A (ja) 2023-11-15
CN112022067B (zh) 2021-01-12
KR20230083326A (ko) 2023-06-09

Similar Documents

Publication Publication Date Title
JP6657480B2 (ja) 画像診断支援装置、画像診断支援装置の作動方法および画像診断支援プログラム
US9324145B1 (en) System and method for detection of transitions in an image stream of the gastrointestinal tract
WO2023030521A1 (zh) 内窥镜图像分类模型的训练方法、图像分类方法和装置
US8055033B2 (en) Medical image processing apparatus, luminal image processing apparatus, luminal image processing method, and programs for the same
JP6150583B2 (ja) 画像処理装置、内視鏡装置、プログラム及び画像処理装置の作動方法
WO2021147429A9 (zh) 内窥镜图像展示方法、装置、计算机设备及存储介质
US8768024B1 (en) System and method for real time detection of villi texture in an image stream of the gastrointestinal tract
WO2007119297A1 (ja) 医療用画像処理装置及び医療用画像処理方法
JP5492729B2 (ja) 内視鏡画像記録装置、及び内視鏡画像記録装置の作動方法、並びにプログラム
CN109635871B (zh) 一种基于多特征融合的胶囊内窥镜图像分类方法
JP4749732B2 (ja) 医用画像処理装置
CN112243091B (zh) 三维内窥镜系统、控制方法和存储介质
KR20200070062A (ko) 인공신경망을 이용하여 캡슐형 내시경 영상에서 병변을 감지하는 시스템 및 방법
WO2022095839A1 (zh) 图像处理方法、电子设备及可读存储介质
WO2022037534A1 (zh) 基于图像的位置探测方法、电子设备及可读存储介质
JP2006166939A (ja) 画像処理方法
KR20180128215A (ko) 캡슐내시경의 촬영 제어 방법 및 시스템
US20210042914A1 (en) Filing device, filing method, and program
CN110772210B (zh) 一种诊断交互系统及方法
WO2021181440A1 (ja) 画像記録システム及び画像記録方法
KR20180128216A (ko) 지능형 캡슐내시경 및 이를 이용한 촬영 방법
WO2015068494A1 (ja) 器官画像撮影装置
Alizadeh et al. Effects of improved adaptive gamma correction method on wireless capsule endoscopy images: Illumination compensation and edge detection
EP3061395A1 (en) Organ image capture device
JP7463507B2 (ja) 内視鏡画像処理装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21888536

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2023527384

Country of ref document: JP

ENP Entry into the national phase

Ref document number: 20237015372

Country of ref document: KR

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 18252037

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2021888536

Country of ref document: EP

Effective date: 20230606