JP2006223377A - Lumen image processing device, lumen image processing method, and program for the same - Google Patents

Lumen image processing device, lumen image processing method, and program for the same Download PDF

Info

Publication number
JP2006223377A
JP2006223377A JP2005038117A JP2005038117A JP2006223377A JP 2006223377 A JP2006223377 A JP 2006223377A JP 2005038117 A JP2005038117 A JP 2005038117A JP 2005038117 A JP2005038117 A JP 2005038117A JP 2006223377 A JP2006223377 A JP 2006223377A
Authority
JP
Japan
Prior art keywords
image
cardia
pixel
esophagus
value
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
JP2005038117A
Other languages
Japanese (ja)
Other versions
JP5057651B2 (en
Inventor
Hiroichi Nishimura
博一 西村
Jun Hasegawa
潤 長谷川
Hideki Tanaka
秀樹 田中
Ryoko Inoue
涼子 井上
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Olympus Corp
Original Assignee
Olympus Corp
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 Olympus Corp filed Critical Olympus Corp
Priority to JP2005038117A priority Critical patent/JP5057651B2/en
Priority to US11/884,515 priority patent/US8055033B2/en
Priority to PCT/JP2006/302381 priority patent/WO2006087981A1/en
Priority to EP06713523.6A priority patent/EP1849402B1/en
Publication of JP2006223377A publication Critical patent/JP2006223377A/en
Priority to US13/209,792 priority patent/US20110299748A1/en
Application granted granted Critical
Publication of JP5057651B2 publication Critical patent/JP5057651B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • 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
    • 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/10068Endoscopic image
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Endoscopes (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a lumen image processing device capable of detecting the cardia based on an intraluminal image. <P>SOLUTION: A terminal device 7 as the lumen image processing device comprises a characteristic quantity computing process for computing a prescribed characteristic quantity from one or a plurality of intraluminal images of the alimentary canal, a detecting process for detecting the border of the alimentary canal based on the computed characteristic quantity, and a determining process for determining that the intraluminal image is the image related to the region from the esophagus to the cardia. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、管腔内の画像に基づいて噴門を検出する管腔画像処理装置、管腔画像処理方法及びそのためのプログラムに関する。   The present invention relates to a lumen image processing apparatus, a lumen image processing method, and a program therefor that detect cardia based on an image in the lumen.

医療分野においては、画像撮像機能を有する医療機器を用いた体腔内臓器の観察及び診断が広く行われている。
例えば、食道疾患診断においては、胃と食道の境目の部分である噴門部の上部におけるEGジャンクション(食道・胃接合部)付近におけるBarret食道の疾患診断がある。Barret食道から腺癌が発生することもあることから、食道部の診断における内視鏡検査が重要である。内視鏡を患者の口から挿入し、医者はモニタ画面に表示された内視鏡画像を見ながら食道の疾患診断を行う。
In the medical field, observation and diagnosis of an organ in a body cavity using a medical device having an image capturing function is widely performed.
For example, in the diagnosis of esophageal disease, there is a diagnosis of Barret esophageal disease near the EG junction (esophageal / gastric junction) in the upper part of the cardia, which is the boundary between the stomach and the esophagus. Since an adenocarcinoma may develop from the Barret esophagus, endoscopy is important in diagnosing the esophagus. An endoscope is inserted from the patient's mouth, and the doctor diagnoses the disease of the esophagus while viewing the endoscope image displayed on the monitor screen.

また、近年は、カプセル型内視鏡が開発され、カプセル型内視鏡によって得られた画像を見ながら医者は食道疾患の診断を行うこともできるようになってきている。カプセル型内視鏡によって得られた生体画像に基づいて、病変の検出を行うシステムが提案されている(例えば、特許文献1参照)。
WO 02/073507 A2号公報
In recent years, capsule endoscopes have been developed, and doctors can diagnose esophageal diseases while looking at images obtained by capsule endoscopes. A system for detecting a lesion based on a biological image obtained by a capsule endoscope has been proposed (see, for example, Patent Document 1).
WO 02/073507 A2

しかし、上述した提案に係るシステムによっても、食道から胃にかけての画像に基づいて噴門あるいは噴門境界部近傍部の検出をすることについては、なんら開示はされていなかった。
例えば、噴門あるいは噴門の境界部を検出することができれば、医者は、検出された噴門あるいは噴門の境界部の生体組織画像を詳細に観察することができるので、Barret食道等の病変の診断を迅速に行うことができる。
However, even the system according to the above-described proposal has not disclosed any detection of the cardia or the vicinity of the cardia boundary based on the image from the esophagus to the stomach.
For example, if the cardia or the boundary of the cardia can be detected, the doctor can observe the biological tissue image of the detected cardia or the boundary of the cardia in detail, so that the diagnosis of a lesion such as Barret's esophagus can be performed quickly. Can be done.

そこで、本発明は、管腔内画像に基づいて、噴門部の検出ができる管腔画像処理装置を提供することを目的とする。   Therefore, an object of the present invention is to provide a lumen image processing apparatus capable of detecting a cardia portion based on an intraluminal image.

本発明の管腔画像処理装置は、消化管を撮像した1枚のあるいは複数の管腔内画像から所定の特徴量を算出する特徴量算出手段と、算出された前記特徴量基づき消化管の境界部を検出する検出手段と、前記検出結果に基づいて、前記管腔内画像が食道から噴門部に係る部分の画像であると判定する判定手段とを備えた。   The luminal image processing apparatus of the present invention includes a feature amount calculating means for calculating a predetermined feature amount from one or a plurality of intraluminal images obtained by imaging the digestive tract, and a boundary of the digestive tract based on the calculated feature amount. Detection means for detecting a part, and determination means for determining that the intraluminal image is an image of a portion related to the cardia from the esophagus based on the detection result.

本発明は、管腔内画像に基づいて、噴門部の検出ができる管腔画像処理装置を提供することができる。   The present invention can provide a lumen image processing apparatus capable of detecting a cardia part based on an intraluminal image.

以下、図面を参照して本発明の実施の形態に係わる管腔画像処理装置を説明する。
(第1の実施の形態)
まず、本発明の第1の実施の形態に係るカプセル型内視鏡装置を利用した管腔画像処理装置及びその方法について、図面を用いて説明する。最初に、本発明の第1の実施の形態に係るカプセル型内視鏡装置を利用した管腔画像処理装置について、図1と図2を用いて説明する。図1は本実施の形態に係るカプセル型内視鏡装置1と、管腔画像処理装置としての端末装置7の概略構成を示すブロック図である。
Hereinafter, a lumen image processing apparatus according to an embodiment of the present invention will be described with reference to the drawings.
(First embodiment)
First, a lumen image processing apparatus and method using a capsule endoscope apparatus according to a first embodiment of the present invention will be described with reference to the drawings. First, a lumen image processing apparatus using the capsule endoscope apparatus according to the first embodiment of the present invention will be described with reference to FIGS. 1 and 2. FIG. 1 is a block diagram showing a schematic configuration of a capsule endoscope apparatus 1 according to the present embodiment and a terminal apparatus 7 as a lumen image processing apparatus.

本実施の形態の画像処理方法を用いるカプセル型内視鏡装置1は、図1(A)に示すように、カプセル型内視鏡3、アンテナユニット4、及び外部装置5からなっている。カプセル型内視鏡3は、詳細は後述するが、被検体である患者2の口から体腔内に飲み込まれて食道及び消化管内を進行する形状に形成され、かつ、内部に食道及び消化管内を撮像し、その撮像画像情報を生成する撮像機能と、その撮像画像情報を体外に送信する送信機能とを有している。アンテナユニット4は、患者2の身体表面上に設置され、前記カプセル型内視鏡3から送信される撮像画像情報を受信する複数の受信アンテナ11を有している。外部装置5は、外形が箱形形状に形成されており、前記アンテナユニット4が受信した撮像画像情報の各種処理、撮像画像情報の記録、及び撮像画像情報による撮像画像表示等の機能を有している。この外部装置5の外装の表面に前記撮像画像を表示させる液晶モニタ12と、各種機能の操作指示を行う操作部13が設けられている。また、この外部装置5は、駆動電源用の電池の残量に関する警告表示用のLED、操作部13として電源スイッチが設けられている。   A capsule endoscope apparatus 1 using the image processing method of the present embodiment includes a capsule endoscope 3, an antenna unit 4, and an external device 5, as shown in FIG. As will be described in detail later, the capsule endoscope 3 is formed into a shape that is swallowed into the body cavity from the mouth of the patient 2 as the subject and advances in the esophagus and digestive tract, and inside the esophagus and digestive tract. It has an imaging function for imaging and generating the captured image information, and a transmission function for transmitting the captured image information outside the body. The antenna unit 4 is installed on the body surface of the patient 2 and has a plurality of receiving antennas 11 that receive captured image information transmitted from the capsule endoscope 3. The external device 5 has an outer shape formed in a box shape, and has functions such as various processing of captured image information received by the antenna unit 4, recording of captured image information, and display of a captured image by captured image information. ing. A liquid crystal monitor 12 for displaying the captured image on the surface of the exterior of the external device 5 and an operation unit 13 for operating various functions are provided. In addition, the external device 5 is provided with an LED for displaying a warning regarding the remaining amount of the battery for driving power, and a power switch as the operation unit 13.

この外部装置5は、患者2の身体に装着されると共に、図1(B)に示すように、クレードル6に装着されることにより端末装置7に接続されるようになっている。管腔画像処理装置である噴門検出装置としての端末装置7は、たとえば、パーソナルコンピュータが用いられ、各種データの処理機能や記憶機能を有する端末本体9、各種操作処理入力用のキーボード8aとマウス8b、及び各種処理結果を表示するディスプレイ8cからなっている。この端末装置7の基本的機能としては、前記外部装置5に記録されている撮像画像情報をクレードル6を介して取り込み、端末本体9に内蔵されている書き換え可能なメモリ、或いは端末本体9に着脱自在な書き換え可能な半導体メモリ等の可搬型メモリに書込記録させ、かつ、その記録した撮像画像情報をディスプレイ8cに表示する画像処理を行う。さらに、端末装置7は、後述する実施の形態に係る画像処理方法によって噴門検出処理を実行する。なお、前記外部装置5に記憶されている撮像画像情報は、前記クレードル6に代えて、USBケーブル等によって端末装置7に取り込まれるようにしても良い。このようなクレードル6等が、カプセル型内視鏡3により撮像された画像を入力する画像入力手段である。   The external device 5 is attached to the body of the patient 2 and connected to the terminal device 7 by being attached to the cradle 6 as shown in FIG. As the terminal device 7 as a cardia detection device that is a lumen image processing device, for example, a personal computer is used, a terminal body 9 having various data processing functions and storage functions, a keyboard 8a and a mouse 8b for various operation processing inputs. And a display 8c for displaying various processing results. As a basic function of the terminal device 7, captured image information recorded in the external device 5 is taken in via the cradle 6, and a rewritable memory built in the terminal body 9 or attached to and detached from the terminal body 9. Image processing is performed for writing and recording in a portable memory such as a freely rewritable semiconductor memory and displaying the recorded captured image information on the display 8c. Furthermore, the terminal device 7 performs cardia detection processing by an image processing method according to an embodiment described later. The captured image information stored in the external device 5 may be taken into the terminal device 7 by a USB cable or the like instead of the cradle 6. Such a cradle 6 or the like is an image input means for inputting an image picked up by the capsule endoscope 3.

次に、前記カプセル型内視鏡3の外形と内部構造について、図2を用いて説明する。カプセル型内視鏡3は、断面がU字状の外装部材14と、この外装部材14の先端側の開放端に接着剤により水密装着された透明部材により形成された略半球形状のカバー部材14aとからなるカプセル形に形成されている。   Next, the external shape and internal structure of the capsule endoscope 3 will be described with reference to FIG. The capsule endoscope 3 has a substantially hemispherical cover member 14a formed by an exterior member 14 having a U-shaped cross section and a transparent member that is watertightly attached to the open end of the exterior member 14 with an adhesive. It is formed in a capsule shape consisting of

この外装部材14とカバー部材14aからなるカプセル形状の内部中空部には、前記カバー部材14aの半球の円弧の中央部分の内部には、カバー部材14aを介して入射された観察部位像を取り込む対物レンズ15がレンズ枠16に収納されて配置されている。この対物レンズ15の結像位置には、撮像素子である電荷結合素子(以下、CCDと称する)17が配置されている。また、前記対物レンズ15を収納するレンズ枠16の周囲には、照明光を発光放射させる4つの白色系のLED18が同一平面上に配置されている(図中には2つのLEDのみを表記している)。前記CCD17の後端側の前記外装部材14の中空部には、前記CCD17を駆動制御して光電変換された撮像信号の生成と、その撮像信号に所定の信号処理を施して撮像画像信号を生成する撮像処理と、及び前記LED18の点灯・非点灯の動作を制御するLED駆動の処理とを行う処理回路19、この処理回路19の撮像処理により生成された撮像画像信号を無線信号に変換して送信する通信処理回路20、この通信処理回路20からの無線信号を外部に送信する送信アンテナ23、前記処理回路19と通信処理回路20の駆動用電源を供給する複数のボタン型の電池21が配置されている。なお、CCD17、LED18、処理回路19、通信処理回路20、及び送信アンテナ23は、図示しない基板上に配置され、それらの基板の間は、フレキシブル基板にて接続されている。   In the capsule-shaped internal hollow portion composed of the exterior member 14 and the cover member 14a, an objective part that captures an observation site image incident through the cover member 14a into the central portion of the hemispherical arc of the cover member 14a. The lens 15 is housed and disposed in the lens frame 16. A charge coupled device (hereinafter referred to as a CCD) 17 that is an image pickup device is disposed at the image forming position of the objective lens 15. Further, around the lens frame 16 that houses the objective lens 15, four white LEDs 18 that emit and emit illumination light are arranged on the same plane (only two LEDs are shown in the figure). ing). In the hollow portion of the exterior member 14 on the rear end side of the CCD 17, the CCD 17 is driven and controlled to generate a photoelectrically converted imaging signal, and the imaging signal is subjected to predetermined signal processing to generate a captured image signal. A processing circuit 19 for performing an imaging process to perform and an LED driving process for controlling the lighting / non-lighting operation of the LED 18, and converting a captured image signal generated by the imaging process of the processing circuit 19 into a radio signal A communication processing circuit 20 for transmitting, a transmitting antenna 23 for transmitting a radio signal from the communication processing circuit 20 to the outside, and a plurality of button-type batteries 21 for supplying power for driving the processing circuit 19 and the communication processing circuit 20 are arranged. Has been. The CCD 17, the LED 18, the processing circuit 19, the communication processing circuit 20, and the transmission antenna 23 are arranged on a substrate (not shown), and the substrates are connected by a flexible substrate.

カプセル型内視鏡3は、患者2の体内を移動しながら、所定の時間間隔で撮像した体内画像を外部装置5に送信し、外部装置5は、内蔵する記憶装置に受信した内視鏡画像を記録する。外部装置5に記録された内視鏡画像は、クレードル6を介して端末装置7に転送され図示しない記憶装置に記憶され、端末装置7は、転送されて記憶された内視鏡画像に基づいて噴門部の検出処理を行う。この噴門検出処理は、内視鏡画像の画像データに対して画像処理を行う画像処理ソフトウエアすなわちプログラムによって行われる。その画像処理ソフトウエアは、端末装置7のCPU等の処理装置によって実行される。   The capsule endoscope 3 transmits an in-vivo image captured at a predetermined time interval to the external device 5 while moving inside the patient 2, and the external device 5 receives the endoscopic image received in the built-in storage device. Record. The endoscopic image recorded in the external device 5 is transferred to the terminal device 7 through the cradle 6 and stored in a storage device (not shown). The terminal device 7 is based on the transferred and stored endoscopic image. Perform cardia detection processing. This cardia detection process is performed by image processing software that performs image processing on image data of an endoscopic image, that is, a program. The image processing software is executed by a processing device such as a CPU of the terminal device 7.

以下に説明する画像処理は、ソフトウエアにより実現されるもので、前記カプセル型内視鏡3、外部装置5、または端末装置7のいずれにおいてもこの画像処理を実行することができるが、ここでは、パーソナルコンピュータを用いた端末装置7において実行される例を用いて説明する。また、画像処理内容の説明において、1フレームの画像の大きさは、ISX×ISY(1≦ISX、ISY。例えばISX=640、ISY=480)の赤(R)、緑(G)、青(B)の3プレーンからなり、各プレーンの画素の階調数は、8bit、すなわち0乃至255の値をとるものとする。   The image processing described below is realized by software, and can be executed in any of the capsule endoscope 3, the external device 5, or the terminal device 7. A description will be given by using an example executed in the terminal device 7 using a personal computer. In the description of image processing content, the size of an image of one frame is ISX × ISY (1 ≦ ISX, ISY, for example, ISX = 640, ISY = 480) red (R), green (G), blue ( B) is composed of three planes, and the number of gradations of pixels of each plane is 8 bits, that is, takes a value of 0 to 255.

また、前記カプセル型内視鏡3は、例えば、食道の検査の場合は、毎秒15〜30枚の画像(15fps〜30fps)を撮像する。なお、カプセル型内視鏡3は、食道を通過した後は、毎秒当たりの撮像枚数の少ない低速撮像となるよう撮像機能制御を行う。これは、図示しないタイマー回路を設け、このタイマー回路によるタイマーカウントが所定時間以内においては毎秒当たりの撮像枚数の多い高速撮像とし、所定時間が経過した後は毎秒当たりの撮像枚数の少ない低速撮像となるように制御する等によって実現することができる。   The capsule endoscope 3 captures 15 to 30 images (15 fps to 30 fps) per second, for example, in the case of esophageal examination. Note that, after passing through the esophagus, the capsule endoscope 3 performs imaging function control so that low-speed imaging with a small number of images per second is obtained. This is because a timer circuit (not shown) is provided, and when the timer count by the timer circuit is within a predetermined time, high-speed imaging with a large number of images per second is taken, and after a predetermined time has passed, low-speed imaging with a small number of images per second is taken. It is realizable by controlling so that it may become.

図3は、得られた一連の内視鏡画像に基づいて、端末装置7において実行される食道・胃接合部の通過により噴門部の検出を行う処理の流れの例を示すフローチャートである。被検者の口から入ってから撮像されて得られた一連の内視鏡画像は、複数のフレームからなり、各フレームについて図3の処理が実行される。なお、各内視鏡画像の画像データは、図3の処理がされる前に、逆ガンマ補正、ノイズ除去等の前処理がされているものである。   FIG. 3 is a flowchart showing an example of a flow of processing for detecting the cardia portion by passing through the esophagus / gastric junction, which is executed in the terminal device 7, based on a series of obtained endoscopic images. A series of endoscopic images obtained by imaging after entering through the mouth of the subject consists of a plurality of frames, and the processing of FIG. 3 is executed for each frame. Note that the image data of each endoscopic image is subjected to preprocessing such as inverse gamma correction and noise removal before the processing of FIG. 3 is performed.

図3の処理を施したい一連の画像の中における最初のフレームから処理するために、まず、フレーム番号iを1にする(ステップS1)。iは1からnの整数である。   In order to process from the first frame in the series of images to be processed in FIG. 3, first, the frame number i is set to 1 (step S1). i is an integer from 1 to n.

次に、フレーム番号iの画像Fiの画像データを、端末装置7の記憶装置(図示せず)から読み出す(ステップS2)。画像Fiは、RGBの3つのプレーンからなる。   Next, the image data of the image Fi of the frame number i is read from a storage device (not shown) of the terminal device 7 (step S2). The image Fi is composed of three RGB planes.

読み出した画像Fiの画像データに基づいて、内視鏡画像の所定の特徴量として色調の特徴量、ここでは平均色調特徴量μiを算出する(ステップS3)。平均色調特徴量μiは、各画像に含まれる全画素の色調特徴量の平均値である。ステップS3が、各画像Fiについての全画素の値に基づく色調の特徴量としての、平均色調特徴量を算出する特徴量算出工程あるいは特徴量算出手段を構成し、ステップS3からS5が消化管の境界部を検出する検出手段を構成する。   Based on the read image data of the image Fi, a color tone feature value, here, an average color tone feature value μi is calculated as a predetermined feature value of the endoscopic image (step S3). The average color tone feature value μi is an average value of the color tone feature values of all the pixels included in each image. Step S3 constitutes a feature quantity calculating step or feature quantity calculating means for calculating an average tone feature quantity as a tone feature quantity based on the values of all the pixels for each image Fi, and steps S3 to S5 are for the digestive tract. A detection means for detecting the boundary portion is configured.

次に、平均色調特徴量μiが、所定の閾値Thを超えているか否かを判断する(ステップS4)。色調特徴量として、後述するR/(R+G+B)の値を用いる場合であれば、閾値Thは例えば0.5である。   Next, it is determined whether or not the average tone characteristic amount μi exceeds a predetermined threshold Th (step S4). If the value of R / (R + G + B), which will be described later, is used as the color tone feature value, the threshold value Th is 0.5, for example.

なお、この閾値Thの値を調整することによって、読み出した画像Fiが、消化管の境界部である食道・胃接合部(EGジャンクション)に入った近辺を撮像している画像であるか、食道・胃接合部の中央部を撮像している画像であるか、胃に入った部分を撮像している画像であるかの判定とすることができる。この点については、後で、図4を用いて説明する。   It should be noted that by adjusting the value of the threshold Th, the read image Fi is an image in which the vicinity of the esophagus / gastric junction (EG junction) that is the boundary of the digestive tract is captured, or the esophagus -It can be judged whether it is the image which is imaging the center part of a stomach junction part, or the image which is imaging the part which entered the stomach. This point will be described later with reference to FIG.

ステップS4においてYESの場合、すなわち平均色調特徴量μiが所定の閾値Thを超えているときは、カプセル型内視鏡3が食道・胃接合部(EGジャンクション)に入ろうとしている、あるいは食道・胃接合部(EGジャンクション)を通過している時なので、読み出された画像Fiは、その時に撮像された画像であると判定する(ステップS5)。   In the case of YES in step S4, that is, when the average color feature value μi exceeds a predetermined threshold Th, the capsule endoscope 3 is about to enter the esophagus / gastric junction (EG junction), or the esophagus / stomach Since it is when passing through the junction (EG junction), it is determined that the read image Fi is an image captured at that time (step S5).

ステップS4においてNOの場合、すなわち平均色調特徴量μiが所定の閾値Thを超えていないときは、図3の処理を施したい一連の画像の全てについて図3の処理が終了したか否かを判定し(ステップS6)、全て終了しているときは、ステップS6でYESとなり、処理は終了する。ステップS6でNOの場合は、未処理の画像が残っているので、i=i+1の処理を行い(ステップS7)、以降、次の画像に対して、ステップS2からS4の処理を繰り返す。   In the case of NO in step S4, that is, when the average color feature value μi does not exceed the predetermined threshold Th, it is determined whether or not the processing in FIG. 3 has been completed for all the series of images to be processed in FIG. (Step S6) When all the processes are completed, YES is obtained in Step S6, and the process is terminated. If NO in step S6, since an unprocessed image remains, the process of i = i + 1 is performed (step S7). Thereafter, the process of steps S2 to S4 is repeated for the next image.

なお、上述したように、ステップS5では、平均色調特徴量μiが所定の閾値Thを超えた時は、カプセル型内視鏡3が食道・胃接合部(EGジャンクション)を通過している、あるいは食道・胃接合部(EGジャンクション)に入ろうとしている時と判断しているが、言い換えると、その後噴門部に到達しようとしている、あるいはその後胃内へ到達しようとしているという判定ということもできる。よって、噴門部の検出がされているということができる。   As described above, in step S5, when the average color feature μi exceeds the predetermined threshold Th, the capsule endoscope 3 passes through the esophagus / gastric junction (EG junction), or Although it is determined that it is about to enter the esophagus / stomach junction (EG junction), in other words, it can be determined that it is about to reach the cardia after that, or about to reach the stomach. Therefore, it can be said that the cardia part is detected.

ここで、食道から胃にかけての生体組織の色調について説明する。図4は、得られる一連の内視鏡画像における色調の変化を説明するための模式的グラフである。図4において、横軸は、食道扁平上皮部から食道・胃接合部を経て胃に到達するまでに得られる内視鏡画像の時系列に沿った画像番号(フレーム番号)を示し、縦軸は、各画像番号に対応する内視鏡画像の色調特徴量を示す。   Here, the color tone of the living tissue from the esophagus to the stomach will be described. FIG. 4 is a schematic graph for explaining a change in color tone in a series of obtained endoscopic images. In FIG. 4, the horizontal axis indicates the image number (frame number) along the time series of endoscopic images obtained from the esophageal squamous epithelium to the stomach via the esophagus / gastric junction, and the vertical axis indicates The color tone feature amount of the endoscope image corresponding to each image number is shown.

被検者の口から入って得られるカプセル型内視鏡3によって得られた各画像の色調は、図4に示すように変化する。すなわち、食道の扁平上皮部RAと円柱上皮の胃部RCにおける色調は異なっており、それらの間の食道・胃接合部RBでは段階的に徐々に変化している。図4では、例えば、後述するようなRGBの3つの画素値から算出される色調特徴量R/(R+G+B)においては、食道扁平上皮部RAは白色調であるため色調特徴量は小さく、胃部RCでは赤色調であるため色調特徴量は大きい。それらの間の食道・胃接合部RBでは、色調特徴量は、白色調から赤色調に徐々に変化する。   The color tone of each image obtained by the capsule endoscope 3 obtained through the mouth of the subject changes as shown in FIG. That is, the color tone of the squamous epithelium RA of the esophagus and the stomach RC of the columnar epithelium are different, and the esophagus / gastric junction RB between them changes gradually in steps. In FIG. 4, for example, in the color tone feature amount R / (R + G + B) calculated from three pixel values of RGB as described later, the color tone feature amount is small because the esophageal squamous epithelium RA is white tone, and the stomach portion In RC, since the color tone is red, the color feature amount is large. In the esophagus / gastric junction RB between them, the color tone characteristic amount gradually changes from white tone to red tone.

そこで、図3のステップS4のような色調特徴量が、その徐々に変化する途中において所定の閾値Thを超えたときに(色調が赤くなったとき)、その画像は、カプセル型内視鏡3が食道・胃接合部(EGジャンクション)に入ろうとしている時、あるいは食道・胃接合部(EGジャンクション)を通過している時に撮像した画像である等の判定、言い換えると、消化管の境界部である噴門部の検出が実行される。すなわち、食道粘膜から胃粘膜へかけての色調の違いに基づき、噴門部の検出が行われる。具体的には、その通過等の判断を確実に行うために、色調特徴量の平均値等が利用される。   Therefore, when the color tone characteristic amount as in step S4 in FIG. 3 exceeds a predetermined threshold Th in the course of its gradual change (when the color tone turns red), the image is displayed in the capsule endoscope 3. Is an image taken when entering the esophagus / gastric junction (EG junction) or passing through the esophagus / gastric junction (EG junction), in other words, at the boundary of the digestive tract A certain cardia part is detected. In other words, the cardia is detected based on the difference in color tone from the esophageal mucosa to the gastric mucosa. Specifically, an average value of the color tone feature amount or the like is used in order to reliably determine the passage or the like.

次に、図3において説明した平均色調特徴量μiの具体的な例を説明する。
図5は、各フレームの画像について実行され、平均色調特徴量μiとして、RGBの3つの画素値から算出されるR/(R+G+B)を用いた場合における図3のステップS3の処理の流れの例を示すフローチャートである。図5の処理では、1フレームの画素毎における、RGBの3つの各画素値rj、gj、bjから、色度rj/(rj+gj+bj)を算出することによって平均色調特徴量μiが算出される。jは、各フレームの画像データにおいて画素を特定するための番号を示す。
Next, a specific example of the average tone characteristic amount μi described in FIG. 3 will be described.
FIG. 5 is an example of the flow of the process of step S3 in FIG. 3 executed for each frame image and using R / (R + G + B) calculated from three RGB pixel values as the average tone characteristic amount μi. It is a flowchart which shows. In the process of FIG. 5, the average tone characteristic amount μi is calculated by calculating the chromaticity rj / (rj + gj + bj) from the three RGB pixel values rj, gj, bj for each pixel of one frame. j represents a number for specifying a pixel in the image data of each frame.

初めに、j=1,val=0,count=0とする(ステップS11)。ここで、valは色調特徴量の総和を求めるための変数であり、countは、平均色調特徴量μiの算出に用いられた画素数を求めるための変数である。   First, j = 1, val = 0, and count = 0 are set (step S11). Here, val is a variable for obtaining the sum of the color tone feature values, and count is a variable for obtaining the number of pixels used for calculating the average tone feature value μi.

次に、ステップS12において、j番目の画素が暗部に属する画素か否かを判定する。具体的には、R画像、G画像、及びB画像の各画像におけるj番目の画素の値をrj、gj、及びbjとしたときに、rj≦thd、gj≦thd、及びbj≦thdであれば、その画素は暗部に属する画素と判定する。ここで、thdは、暗部画素であるかを判定するための各色の閾値であり、本実施の形態においては、例えばthd=10に設定している。j番目の画素が暗部に属する画素であると判定された場合、ステップS16に進み、j番目の画素が暗部に属さない画素である判定された場合、ステップS13に進む。   Next, in step S12, it is determined whether or not the jth pixel is a pixel belonging to a dark part. Specifically, when the value of the jth pixel in each of the R image, the G image, and the B image is rj, gj, and bj, rj ≦ thd, gj ≦ thd, and bj ≦ thd. For example, the pixel is determined as a pixel belonging to a dark part. Here, thd is a threshold value of each color for determining whether the pixel is a dark pixel, and in the present embodiment, for example, thd = 10 is set. When it is determined that the jth pixel is a pixel belonging to the dark part, the process proceeds to step S16, and when it is determined that the jth pixel is not a pixel belonging to the dark part, the process proceeds to step S13.

次に、ステップS13において、j番目の画素が、極端に明るい画素、すなわちハレーション部に属する画素か否かを判定する。具体的には、rj≧thh、gj≧thh、及びbj≧thhであればハレーション画素と判定する。ここで、thhは、ハレーション画素であるかを判定するための各色の閾値であり、本実施の形態においては、例えばTh=200に設定している。j番目の画素がハレーション画素であると判定された場合、ステップS16に進み、j番目の画素がハレーション画素でない判定された場合、ステップS14に進む。   Next, in step S13, it is determined whether or not the jth pixel is an extremely bright pixel, that is, a pixel belonging to the halation portion. Specifically, if rj ≧ thh, gj ≧ thh, and bj ≧ thh, the pixel is determined as a halation pixel. Here, thh is a threshold value of each color for determining whether it is a halation pixel, and in this embodiment, for example, Th = 200 is set. If it is determined that the jth pixel is a halation pixel, the process proceeds to step S16. If it is determined that the jth pixel is not a halation pixel, the process proceeds to step S14.

尚、ステップS12とS13において、R画像、G画像、及びB画像についての閾値thdとthhは各画素rj、gj、及びbjについてそれぞれ同じ値としているが、生体粘膜は総じてR画像が最も明るい傾向にあるため、例えばrjに対する閾値を、gj、bjに対する閾値よりも高く設定してもよい。また、rj、gj、bjのそれぞれに対する閾値を異なる値に設定してもよい。   In steps S12 and S13, the threshold values thd and thh for the R image, G image, and B image are set to the same value for each pixel rj, gj, and bj, but the biological mucosa generally has the brightest R image. For example, the threshold value for rj may be set higher than the threshold values for gj and bj. Moreover, you may set the threshold value with respect to each of rj, gj, and bj to a different value.

ステップS14では、val=val+rj/(rj+gj+bj))と、count=count+1が演算される。色調特徴量の総和を求めるための変数valに、色調特徴量rj/(rj+gj+bj)を加算し、変数countを1だけインクリメントする。   In step S14, val = val + rj / (rj + gj + bj)) and count = count + 1 are calculated. The color feature value rj / (rj + gj + bj) is added to the variable val for calculating the sum of the color feature values, and the variable count is incremented by one.

そして、ステップS15においては、全ての画素について、ステップS12からステップS14の処理を行ったか否かを判定する。具体的には、j<ISX×ISYである場合、ステップS16において、画素を特定する番号jに1を加算(j=j+1)して、次の画素に対して前記ステップS12からステップS14を実行する。j=ISX×ISYである場合、すなわち全ての画素についてステップS12からステップS14の処理を行った場合、countが所定の閾値thcより大きいか否かを判定する(ステップS17)。閾値thcは、色調評価には不充分な画素数を示し、その閾値thc以上の数であれば、色調評価に有効な画素が充分な数だけ存在したことになる数である。ステップS17において、YESの場合、すなわち色調評価に有効な画素が充分な数だけ存在した場合、平均色調特徴量μiが、色調特徴量総和valを、平均色調特徴量μiの算出に用いられる画素数countによって割り算することによって、算出される(ステップ18)。具体的には、μi=val/countである。   In step S15, it is determined whether or not the processing from step S12 to step S14 has been performed for all the pixels. Specifically, if j <ISX × ISY, in step S16, 1 is added to the number j specifying the pixel (j = j + 1), and the above steps S12 to S14 are executed for the next pixel. To do. When j = ISX × ISY, that is, when the processing from step S12 to step S14 is performed for all the pixels, it is determined whether or not count is larger than a predetermined threshold thc (step S17). The threshold value thc indicates an insufficient number of pixels for color tone evaluation, and if the number is equal to or greater than the threshold value thc, a sufficient number of pixels effective for color tone evaluation exist. If YES in step S17, that is, if there are a sufficient number of pixels effective for color tone evaluation, the average color tone feature value μi is the color tone feature value sum val, and the number of pixels used to calculate the average color tone feature value μi. It is calculated by dividing by count (step 18). Specifically, μi = val / count.

ステップS17においてNOの場合、すなわち色調評価に有効な画素が充分な数だけ存在しなかった場合、そのフレームの画像は、エラーすなわち異常画像として(ステップS19)、平均色調特徴量μiを例えば0(ゼロ)として、図3のステップS4においては、閾値Thを超えないものとして判断されることになる。   If NO in step S17, that is, if there are not a sufficient number of effective pixels for color tone evaluation, the image of that frame is an error, that is, an abnormal image (step S19), and the average color tone feature value μi is set to 0 (for example, 0 ( In step S4 of FIG. 3, it is determined that the threshold value Th is not exceeded.

次に、本実施の形態における各種変形例を説明する。
第1の変形例として、上述した図3から図5においては、各フレームの画像に基づいて、食道・胃接合部の通過、噴門部の通過等の判断を行っているが、連続する複数の画像が、あるいは連続する複数の画像の中の所定の割合(例えば80%)以上が、ステップS4の判定結果がμi>Thであった場合に、カプセル内視鏡3が、食道・胃接合部を通過した等の、判断をするようにしてもよい。
また、第2の変形例として、以上の説明は、連続する複数の画像に対して、処理を行っているが、図3の処理は、特定の1枚の画像に対して行うようにしてもよい。
Next, various modifications of the present embodiment will be described.
As a first modification, in FIG. 3 to FIG. 5 described above, the passage of the esophagus / gastric junction, the passage of the cardia, and the like are determined based on the image of each frame. When the image or a predetermined ratio (for example, 80%) or more in a plurality of continuous images is greater than or equal to μi> Th, the capsule endoscope 3 is connected to the esophagus / gastric junction. You may make it judge, such as having passed.
Further, as a second modification, the above description has been performed on a plurality of continuous images. However, the processing in FIG. 3 may be performed on a specific single image. Good.

さらになお、第3の変形例として、連続する複数の画像における平均色調特徴量μiの移動平均を算出して、その移動平均値が所定の閾値を超えたか否かによって、カプセル型内視鏡3の食道・胃接合部の通過等の判定を行うようにしてもよい。例えば、m=2,3,4,・・、かつi>=m+1としたとき(すなわち、n枚の画像の中から、連続するm枚の画像を取り出し、そのとき、(m+1)はi以下であることの意)、連続するm枚の各画像から得られる画像F(i−m)からFiの平均色調特徴量μiに基づいて移動平均値を算出し、その移動平均値が所定の閾値を超えたか否かが判断される。このような移動平均を用いることによれば、観察距離、角度等の違いによる照明条件の変化から生じ得る赤みの強い食道内の画像等であっても、平均色調特徴量の小さな変動による影響を除去して、より精度の高い、カプセル型内視鏡3の食道・胃接合部の通過等を検出することができる。   Furthermore, as a third modification, the capsule endoscope 3 calculates the moving average of the average tone characteristic amount μi in a plurality of consecutive images and determines whether or not the moving average value exceeds a predetermined threshold value. Determination of passage through the esophagus / gastric junction may be made. For example, when m = 2, 3, 4,... And i> = m + 1 (that is, m consecutive images are extracted from n images, and then (m + 1) is equal to or less than i. The moving average value is calculated based on the average tone characteristic amount μi of Fi from the images F (im) obtained from the m consecutive images, and the moving average value is a predetermined threshold value. It is determined whether or not the value has been exceeded. By using such a moving average, even an image in a strong reddish esophagus, which can arise from changes in lighting conditions due to differences in observation distance, angle, etc., is affected by small fluctuations in the average tone feature amount. By removing, it is possible to detect passage of the capsule endoscope 3 through the esophagus / gastric junction with higher accuracy.

また、第4の変形例として、以上の例では、色調特徴量として、RGBの3つの画素値から算出される画素値の比率としてR/(R+G+B)を用いているが、他のパラメータでもよい。他の色調特徴量のパラメータとしては、例えば、G/(R+G+B)でもよいし、IHb(=32log(R/G))、色相、彩度などでもよい。 As a fourth modification, in the above example, R / (R + G + B) is used as the ratio of pixel values calculated from the three pixel values of RGB as the tone characteristic amount, but other parameters may be used. . Other parameters of the tone characteristic amount may be, for example, G / (R + G + B), IHb (= 32 log 2 (R / G)), hue, saturation, or the like.

さらにまた、第5の変形例として、複数の色調特徴量を用いてもよい。例えば、図3のステップS3において、RGBの3つの画素値から算出される画素値の比率としてR/(R+G+B)とG/(R+G+B)とを用い、それらの平均値、すなわち各画像における全画素の色調特徴量(R/(R+G+B))の平均値μ1iと、色調特徴量(G/(R+G+B))の平均値μ2iとを算出する。そして、ステップS4において、平均値μ1iと平均値μ2iが、μ1i>Th1、かつμ2i<Th2か否かの判断を行うようにしてもよい。   Furthermore, as a fifth modification, a plurality of color tone feature quantities may be used. For example, in step S3 of FIG. 3, R / (R + G + B) and G / (R + G + B) are used as the ratio of the pixel values calculated from the three pixel values of RGB, and their average value, that is, all the pixels in each image The average value μ1i of the color tone characteristic amount (R / (R + G + B)) and the average value μ2i of the color tone characteristic amount (G / (R + G + B)) are calculated. In step S4, it may be determined whether or not the average value μ1i and the average value μ2i are μ1i> Th1 and μ2i <Th2.

また、第6の変形例として、平均色調特徴量の変化量に基づいて、カプセル型内視鏡3の食道・胃接合部の通過等を検出するようにしてもよい。すなわち、連続する一連の画像の各画像から得られる平均色調特徴量が所定の閾値を超えたか否かではなく、2枚の画像の平均色調特徴量の変化量が所定の閾値を超えたか否かを判定するようにしてもよい。すなわち、各画像の平均色調特徴量について、例えば、一つ前の画像あるいは一つ後の画像の平均色調特徴量とを比較し、その2つの平均色調特徴量の差が、所定の閾値を超えていれば、例えばカプセル型内視鏡3が食道から食道・胃接合部へ入った、食道・胃接合部から胃に入った等の判定を行うようにしてもよい。画像F(i−m1)と画像Fiにおける平均色調特徴量μ(i−m1)とμiの差分値(μi−μ(i−m1))が、所定の閾値以上変化したか否かの判断が行われる。m1は、1,2,3,・・である。   As a sixth modification, the passage of the capsule endoscope 3 through the esophagus / gastric junction may be detected based on the amount of change in the average color feature amount. That is, not whether or not the average tone feature value obtained from each image in a series of consecutive images exceeds a predetermined threshold value, but whether or not the change amount of the average tone feature value of two images exceeds a predetermined threshold value May be determined. That is, for example, the average tone feature amount of each image is compared with the average tone feature amount of the previous image or the next image, and the difference between the two average tone feature amounts exceeds a predetermined threshold. If so, for example, it may be determined that the capsule endoscope 3 has entered the esophagus / gastric junction from the esophagus, or has entered the stomach from the esophagus / gastric junction. It is determined whether or not the difference value (μi−μ (i−m1)) between the average tone characteristic amount μ (i−m1) and μi in the image F (i−m1) and the image Fi has changed by a predetermined threshold value or more. Done. m1 is 1, 2, 3,.

これは、粘膜色の個人差、Barret食道等の病変部の存在、撮像系のバラツキ等により粘膜の色調は、常に一定ではないため、そのような個人差等の影響を受けないで、カプセル型内視鏡3が食道・胃接合部を通過したか等の判定ができるようにするためである。   This is because the color of the mucous membrane is not always constant due to individual differences in mucosal color, the presence of lesions such as Barret's esophagus, and variations in the imaging system. This is because it is possible to determine whether or not the endoscope 3 has passed through the esophagus / gastric junction.

さらに、その場合、平均色調特徴量の変化を、平均色調特徴量の微分値を算出することによって検出するようにしてもよい。
図6は、その平均色調特徴量の微分値を算出することによって、平均色調特徴量の変化を検出する処理の流れの例を示すフローチャートである。
Furthermore, in that case, a change in the average color tone feature value may be detected by calculating a differential value of the average color tone feature value.
FIG. 6 is a flowchart illustrating an example of a flow of processing for detecting a change in the average tone feature amount by calculating a differential value of the average tone feature amount.

なお、各画像の画像データも、図3の処理で説明したように、図6の処理がされる前に、逆ガンマ補正、ノイズ除去等の前処理がされているものである。ステップS1からステップS3の処理は、図3の処理のステップS1からステップS3の処理と同じである。すなわち、最初のフレームから処理するために、まず、フレーム番号iを1にする(ステップS1)。次に、フレーム番号iの画像Fiの画像データを、端末装置7の記憶装置(図示せず)から読み出す(ステップS2)。読み出した画像Fiの画像データから平均色調特徴量μiを算出する(ステップS3)。   Note that the image data of each image is also subjected to preprocessing such as inverse gamma correction and noise removal before the processing of FIG. 6, as described in the processing of FIG. The processing from step S1 to step S3 is the same as the processing from step S1 to step S3 of the processing of FIG. That is, in order to perform processing from the first frame, first, the frame number i is set to 1 (step S1). Next, the image data of the image Fi of the frame number i is read from a storage device (not shown) of the terminal device 7 (step S2). An average tone characteristic amount μi is calculated from the image data of the read image Fi (step S3).

全ての画像について処理をしたか、すなわち全画像終了かを判定する(ステップS21)。全画像終了でなければ、ステップS21でNOとなり、i=i+1とし(ステップS7)、処理はステップS2に移行する。   It is determined whether all images have been processed, that is, whether all images have been completed (step S21). If all the images are not finished, NO is determined in step S21, i = i + 1 is set (step S7), and the process proceeds to step S2.

全画像終了のときは、ステップS21でYESとなり、得られた複数の平均色調特徴量μiについて、平滑化のために所定の範囲すなわち連続する所定枚数の画像の範囲に亘って移動平均値f(μi)を算出する(ステップS22)。そして、移動平均値f(μi)の時間経過に基づいて微分値Δf(μi)を算出する(ステップS23)。   When all the images have been completed, “YES” is determined in the step S21, and for the obtained plurality of average tone characteristic values μi, the moving average value f (over a predetermined range for smoothing, that is, a predetermined number of continuous images. μi) is calculated (step S22). Then, a differential value Δf (μi) is calculated based on the passage of time of the moving average value f (μi) (step S23).

そして、所定の閾値thfを超える微分値Δf(μi)に対応する画像Fiを特定し検出する(ステップS24)。ステップS3からS24が消化管の境界部を検出する検出手段を構成する。
以上により、複数の画像間で色調の変化量が所定の閾値を超える画像が検出できるので、粘膜色の個人差等があっても、個人差等の影響を受けないで、カプセル型内視鏡3の食道・胃接合部の通過等の判定をすることができる。
Then, the image Fi corresponding to the differential value Δf (μi) exceeding the predetermined threshold thf is specified and detected (step S24). Steps S3 to S24 constitute detection means for detecting the boundary portion of the digestive tract.
As described above, an image in which the amount of change in color tone between a plurality of images exceeds a predetermined threshold value can be detected. Therefore, even if there are individual differences in mucosal color, the capsule endoscope is not affected by individual differences. It is possible to determine the passage of 3 esophagus / gastric junction.

さらに、第7の変形例として、色調特徴量の平均値ではなく、標準偏差あるいは分散を用いることもできる。
例えば、図7は、得られる一連の内視鏡画像における色調特徴量の標準偏差あるいは分散の変化を説明するためのグラフである。図7において、横軸は、食道扁平上皮部から食道・胃接合部を経て胃に関して得られる内視鏡画像の時系列に沿った画像番号(フレーム番号)を示し、縦軸は、各画像番号に対応する内視鏡画像の色調特徴量の標準偏差σiあるいは分散viを示す。
Furthermore, as a seventh modified example, a standard deviation or variance can be used instead of the average value of the color tone feature amount.
For example, FIG. 7 is a graph for explaining changes in the standard deviation or variance of the color tone feature amount in a series of obtained endoscopic images. In FIG. 7, the horizontal axis indicates the image number (frame number) along the time series of endoscopic images obtained from the squamous epithelium of the esophagus through the esophagus / stomach junction and the stomach, and the vertical axis indicates each image number. The standard deviation σi or variance vi of the color tone feature quantity of the endoscopic image corresponding to is shown.

被検者の口から入って得られるカプセル型内視鏡3によって得られた各画像の色調は、図4に示すように変化するが、算出して得られる色調特徴量R/(R+G+B)の標準偏差あるいは分散は、図7に示すように変化する。すなわち、食道の扁平上皮部RAと円柱上皮の胃部RCの画像における色調はそれぞれ一様であるため、色調特徴量R/(R+G+B)の標準偏差σiあるいは分散viは小さいが、それらの間の食道・胃接合部RBでは、その標準偏差σiあるいは分散viは大きくなる。   The color tone of each image obtained by the capsule endoscope 3 obtained through the mouth of the subject changes as shown in FIG. 4, but the color tone feature amount R / (R + G + B) obtained by calculation is calculated. The standard deviation or variance changes as shown in FIG. That is, since the color tone in the images of the squamous epithelium RA of the esophagus and the stomach RC of the columnar epithelium is uniform, the standard deviation σi or variance vi of the color tone feature R / (R + G + B) is small, but between them In the esophagus / stomach junction RB, the standard deviation σi or the variance vi increases.

従って、各画像の色調特徴量の標準偏差σiあるいは分散viに基づいて、カプセル型内視鏡3が食道・胃接合部を通過しようとしている等の判定をすることができる。
さらになお、色調特徴量の標準偏差σiあるいは分散viの代わりに、それらの変動係数(=標準偏差σi/平均色調特徴量μi)を用いてもよい。
Accordingly, it is possible to determine, for example, that the capsule endoscope 3 is about to pass through the esophagus / gastric junction based on the standard deviation σi or the variance vi of the color tone feature amount of each image.
Furthermore, instead of the standard deviation σi or the variance vi of the color tone feature value, their variation coefficient (= standard deviation σi / average color tone feature value μi) may be used.

さらに、第8の変形例として、以上説明した例では、各フレームの画像の全ての画素の画素データを用いているが、図8に示すように、全画素を処理対象とするのではなく、各フレームの所定の領域内の画素についてのみサンプリングして処理対象としてもよい。図8は、各フレームの画像31において、上述した本実施の形態及び変形例における画像処理を行う領域の例を示す図である。   Furthermore, as an eighth modification, in the example described above, pixel data of all pixels of the image of each frame is used. However, as illustrated in FIG. Only pixels within a predetermined area of each frame may be sampled and processed. FIG. 8 is a diagram illustrating an example of a region in which image processing is performed in the above-described embodiment and modification examples in the image 31 of each frame.

各フレームの画像31を、所定の領域に分割する。図8では、各画像31は、各分割された領域が矩形となるように16分割され、その分割された領域の中で、所定の領域(R2,R3,R5,R8,R9,R12,R14,R15)についてのみ、すなわち関心領域(ROI)についてのみ、上述した処理が行われる。特に、食道は管腔臓器であるため、より正確に粘膜表面の色調を算出するために、視野の中央部を除いて、関心領域(ROI)を設定することもできる。
従って、関心領域(ROI)のみを処理対象とすれば、演算量が少なくなるため処理の高速化が図れる。
The image 31 of each frame is divided into predetermined areas. In FIG. 8, each image 31 is divided into 16 so that each divided area is rectangular, and among the divided areas, predetermined areas (R2, R3, R5, R8, R9, R12, R14). , R15), i.e., only the region of interest (ROI). In particular, since the esophagus is a luminal organ, a region of interest (ROI) can be set except for the central part of the visual field in order to calculate the color tone of the mucosal surface more accurately.
Therefore, if only the region of interest (ROI) is set as the processing target, the amount of calculation is reduced, so that the processing speed can be increased.

さらになお、より高速処理を図るために、関心領域(ROI)のみを処理対象とするときに、全てのフレームについて処理を行うのではなく、k枚(k=1,2,3,・・)おきのフレーム毎に、関心領域(ROI)の画素のみについて処理対象とするようにしてもよい。特に、食道内では、毎秒の撮像枚数が多いので、多少の間引きを行っても、正確な判定を行うことができる場合があるからである。   Furthermore, in order to achieve higher-speed processing, when only the region of interest (ROI) is processed, not all frames are processed, but k frames (k = 1, 2, 3,...) Only every pixel of the region of interest (ROI) may be processed for every other frame. This is because, in particular, in the esophagus, since the number of images taken per second is large, there are cases where accurate determination can be made even if some thinning is performed.

以上のように、本実施の形態(変形例を含む)によれば、管腔画像の色調特徴量に基づいて、各画像が、カプセル型内視鏡が食道・胃接合部(EGジャンクション)に入ろうとしている時、あるいは食道・胃接合部(EGジャンクション)を通過している時の画像であるか否かの判定をすることができる。   As described above, according to the present embodiment (including modifications), each image is displayed on the esophagus / gastric junction (EG junction) based on the color tone feature amount of the lumen image. It is possible to determine whether or not the image is when entering or when passing through the esophagus / gastric junction (EG junction).

なお、本実施の形態においては、算出した特徴量に対する閾値処理の適用により、各画像が、カプセル型内視鏡が食道・胃接合部(EGジャンクション)に入ろうとしている時、あるいは食道・胃接合部(EGジャンクション)を通過している時の画像であるかの検出をしたが、例えば、公知の線形判別関数等の識別関数を用いて、その検出を行うようにしてもよい。また、他の実施の形態における特徴量を組み合わせて使用してもよい。   In the present embodiment, by applying threshold processing to the calculated feature amount, each image is displayed when the capsule endoscope is about to enter the esophagus / gastric junction (EG junction), or Although it is detected whether the image is passing through a part (EG junction), for example, the detection may be performed using a discriminant function such as a known linear discriminant function. Moreover, you may use combining the feature-value in other embodiment.

(第2の実施の形態)
次に、本発明の第2の実施の形態に係るカプセル型内視鏡装置を利用した噴門検出装置及びその方法について、図面を用いて説明する。本実施の形態において画像処理の対象となる内視鏡画像は、第1の実施の形態と同様に、カプセル型内視鏡装置1によって得られた連続した一連の内視鏡画像であるので、噴門検出装置の構成は、第1の実施の形態と同様であるので、説明は省略する。
(Second Embodiment)
Next, a cardia detection apparatus and method using a capsule endoscope apparatus according to a second embodiment of the present invention will be described with reference to the drawings. Since the endoscopic image to be image-processed in the present embodiment is a continuous series of endoscopic images obtained by the capsule endoscope apparatus 1 as in the first embodiment, Since the structure of the cardia detection apparatus is the same as that of the first embodiment, description thereof is omitted.

上述した第1の実施の形態では色調特徴量が用いられているが、本実施の形態に係る管腔画像処理装置である噴門検出装置は、各画像の明るさ情報を用いて、各画像が、カプセル型内視鏡が食道・胃接合部(EGジャンクション)を通過している等のときの画像であるか否かの判定を行うようにした点が、第1の実施の形態と異なる。   In the first embodiment described above, the color tone feature amount is used. However, the cardia detection device, which is a lumen image processing device according to the present embodiment, uses the brightness information of each image, The difference from the first embodiment is that it is determined whether or not the capsule endoscope is an image when passing through the esophagus / gastric junction (EG junction).

図9は、得られる一連の内視鏡画像における明るさの変化、具体的には輝度の変化を説明するための模式的グラフである。図9において、横軸は、食道扁平上皮部から食道・胃接合部を経て胃に到達するまでに得られる内視鏡画像の時系列に沿った画像番号(フレーム番号)を示し、縦軸は、各画像番号に対応する内視鏡画像の輝度を示す。   FIG. 9 is a schematic graph for explaining a change in brightness, specifically a change in luminance, in a series of endoscopic images obtained. In FIG. 9, the horizontal axis indicates the image number (frame number) along the time series of endoscopic images obtained from the esophageal squamous epithelium to the stomach via the esophagus / gastric junction, and the vertical axis The brightness of the endoscopic image corresponding to each image number is shown.

被検者の口から入って得られるカプセル型内視鏡3によって得られた各画像の輝度は、画像の明るさを示し、図9に示すように変化する。すなわち、食道の扁平上皮部RAと円柱上皮の胃部RCにおける輝度は異なっており、さらにそれらの間の食道・胃接合部RBも輝度は、食道の扁平上皮部RAと円柱上皮の胃部RCとは異なっている。図9に示すように、例えば、RGBの3つの画素値から算出される輝度においては、食道扁平上皮部RAは比較的狭い管腔臓器であり粘膜壁までの距離が近いため、暗部とハレーション部を除くと、平均輝度値は大きく、胃部RC内では相対的に輝度は小さい。それらの間の食道・胃接合部RBでは、食道という管腔内において閉じた噴門部を正面視するために、輝度値は、食道扁平上皮部RAよりも大きい。   The brightness of each image obtained by the capsule endoscope 3 obtained through the mouth of the subject indicates the brightness of the image and changes as shown in FIG. That is, the luminance of the squamous epithelium RA of the esophagus is different from that of the gastric RC of the columnar epithelium, and the luminance of the esophagus / stomach junction RB between them is also different from that of the squamous epithelium RA of the esophagus and the gastric RC of the columnar epithelium. Is different. As shown in FIG. 9, for example, in luminance calculated from three pixel values of RGB, the esophageal squamous epithelium RA is a relatively narrow luminal organ and is close to the mucosal wall. Except for the average luminance value, the luminance is relatively small in the stomach RC. In the esophagus / gastric junction RB between them, the luminance value is larger than that of the esophageal squamous epithelium RA in order to view the cardia part closed in the lumen called the esophagus in front.

よって、画像の明るさ情報が、その徐々に変化する途中において所定の閾値Th1を超えたときに、食道・胃接合部(EGジャンクション)を通過している、あるいは食道・胃接合部(EGジャンクション)に入ろうとしている、等の判定が実行される。すなわち、撮像した画像における明るさ情報の違いに基づき、カプセル型内視鏡3が食道・胃接合部(EGジャンクション)に入ろうとしている時、あるいは食道・胃接合部(EGジャンクション)を通過している時に閉じた噴門部の検出が行われる。具体的には、その通過等の判断を確実に行うために、明るさ情報として、平均輝度値等が利用される。   Therefore, when the brightness information of the image exceeds a predetermined threshold Th1 in the course of its gradual change, it passes through the esophagus / gastric junction (EG junction), or the esophagus / gastric junction (EG junction). ), And so on. That is, based on the difference in brightness information in the captured images, when the capsule endoscope 3 is about to enter the esophagus / gastric junction (EG junction) or passes through the esophagus / gastric junction (EG junction). The closed cardia is detected when the camera is on. Specifically, an average luminance value or the like is used as the brightness information in order to reliably determine the passage or the like.

図10は、図3と同様に、得られた一連の内視鏡画像に基づいて、端末装置7において実行される食道・胃接合部の通過時に噴門部の検出を行う処理の流れの例を示すフローチャートである。図10の処理は、図3の処理と略同様であり、被検者の口から入ってから撮像されて得られた一連の内視鏡画像は、複数のフレームからなり、各フレームについて図10の処理が実行される。なお、各内視鏡画像の画像データは、図10の処理がされる前に、逆ガンマ補正、ノイズ除去等の前処理がされているものである。図10において、図3と同様の処理は、同じステップ番号を付し、説明は簡略化する。また、以下では、明るさ情報として輝度値を用いた場合を説明するが、明るさ情報としてG又はBの画素データ値を用いた場合は、閾値データが異なることと、画素データが閾値を下回ったか否かの判断となることの違いだけであるので、説明は省略する。   FIG. 10 shows an example of the flow of processing for detecting the cardia portion when passing through the esophagus / gastric junction, which is executed in the terminal device 7, based on the obtained series of endoscopic images, as in FIG. 3. It is a flowchart to show. The process in FIG. 10 is substantially the same as the process in FIG. 3, and a series of endoscopic images obtained by being captured after entering from the mouth of the subject is composed of a plurality of frames. The process is executed. Note that the image data of each endoscopic image has been subjected to preprocessing such as inverse gamma correction and noise removal before the processing of FIG. 10 is performed. 10, processes similar to those in FIG. 3 are denoted by the same step numbers, and description thereof is simplified. In the following, a case where a luminance value is used as the brightness information will be described. However, when a G or B pixel data value is used as the brightness information, the threshold data is different and the pixel data falls below the threshold. The description is omitted because it is only a difference in whether or not it has been determined.

まず、図10の処理を施したい一連の画像の中における最初のフレームから処理するために、フレーム番号iを1にし(ステップS1)、次に、フレーム番号iの画像Fiの画像データを、端末装置7の記憶装置(図示せず)から読み出す(ステップS2)。   First, in order to process from the first frame in a series of images to be processed in FIG. 10, the frame number i is set to 1 (step S1), and then the image data of the image Fi of the frame number i is stored in the terminal Read from a storage device (not shown) of the device 7 (step S2).

読み出した画像Fiの画像データから平均輝度値Iiを算出する(ステップS33)。平均輝度値Iiは、各画像に含まれる全画素の輝度値の平均値である。ここでは、輝度値Iは、上述したように、画像の明るさを示す特徴量であり、例えば、輝度値I=0.6R+0.3G+0.1Bで算出される。ステップS33が、明るさ情報の特徴量として、各画像Fiについて全画素の輝度値に基づく平均輝度値を算出する特徴量算出工程あるいは特徴量算出手段を構成する。   An average luminance value Ii is calculated from the image data of the read image Fi (step S33). The average luminance value Ii is an average value of the luminance values of all the pixels included in each image. Here, as described above, the luminance value I is a feature amount indicating the brightness of the image, and is calculated by, for example, the luminance value I = 0.6R + 0.3G + 0.1B. Step S33 constitutes a feature amount calculating step or a feature amount calculating means for calculating an average luminance value based on the luminance values of all the pixels for each image Fi as the feature amount of the brightness information.

次に、平均輝度値Iiが、所定の閾値Th11を超えたか否かを判断する(ステップS34)。   Next, it is determined whether or not the average luminance value Ii exceeds a predetermined threshold value Th11 (step S34).

なお、この閾値Th11の値を調整することによって、読み出した画像Fiが、食道・胃接合部(EGジャンクション)に入った近辺において撮像した画像であるか、食道・胃接合部の中央部において撮像した画像であるかの判定とすることができる。   By adjusting the value of the threshold Th11, the read image Fi is an image captured in the vicinity of the esophagus / gastric junction (EG junction), or is captured at the center of the esophagus / gastric junction. It can be determined whether the image is an image.

ステップS34においてYESの場合、すなわち平均輝度値Iiが所定の閾値Th11を超えたときは、その画像Fiは、カプセル型内視鏡3が食道・胃接合部(EGジャンクション)に入ろうとしている時、あるいは食道・胃接合部(EGジャンクション)を通過している時に撮像された画像であると判定する(ステップS5)。   In the case of YES in step S34, that is, when the average luminance value Ii exceeds the predetermined threshold Th11, the image Fi is displayed when the capsule endoscope 3 is about to enter the esophagus / gastric junction (EG junction). Or it determines with it being an image imaged when passing the esophagus / stomach junction part (EG junction) (step S5).

ステップS34においてNOの場合、すなわち平均輝度値Iiが所定の閾値Th11を超えていないときは、図10の処理を施したい一連の画像の全てについて図10の処理が終了したか否かを判定し(ステップS6)、全て終了しているときは、ステップS6でNOとなり、処理は終了する。ステップS6でNOの場合は、未処理の画像が残っているので、i=i+1の処理を行い(ステップS7)、以降、ステップS2からS34の処理を繰り返す。ステップS33からS5が消化管の境界部を検出する検出手段を構成する。   In the case of NO in step S34, that is, when the average luminance value Ii does not exceed the predetermined threshold value Th11, it is determined whether or not the processing in FIG. 10 has been completed for all of the series of images to be processed in FIG. (Step S6) When all the processes have been completed, NO is obtained in Step S6, and the process is terminated. If NO in step S6, since an unprocessed image remains, the process of i = i + 1 is performed (step S7), and the processes of steps S2 to S34 are repeated thereafter. Steps S33 to S5 constitute detection means for detecting the boundary portion of the digestive tract.

なお、本実施の形態においても、ステップS5では、明るさ情報である平均輝度値Iiが所定の閾値Th11を超えているときは、その画像Fiは、カプセル型内視鏡3が食道・胃接合部(EGジャンクション)に入ろうとしている時、あるいは食道・胃接合部(EGジャンクション)を通過している時に撮像された画像と判定しているが、言い換えると、その後、閉じた噴門部を通過しようとしている、あるいは胃内へ到達しようとしているという判定ということもできる。よって、噴門部の検出がされているということができる。   Also in the present embodiment, in step S5, when the average luminance value Ii, which is brightness information, exceeds a predetermined threshold value Th11, the capsule endoscope 3 displays the image of the esophagus / stomach joint as the image Fi. It is determined that the image was taken when trying to enter the EG junction (EG junction) or when passing through the esophagus / stomach junction (EG junction). In other words, after that, let's pass through the closed cardia It can also be said that it is determined that it is trying to reach the stomach. Therefore, it can be said that the cardia part is detected.

次に、図10において説明した平均輝度値Iiの具体的な例を説明する。
図11は、各フレームの画像について実行され、平均輝度値Iiとして、RGBの3つの画素値から算出される(0.6R+0.3G+0.1B)を用いた場合における図10のステップS33の処理の流れの例を示すフローチャートである。図11の処理では、1フレームの画素毎における、RGBの3つの各画素値rj、gj、bjから、輝度値(0.6R+0.3G+0.1B)を算出することによって平均輝度値Iiが算出される。
なお、図11は、図5と同様の処理ステップを含むため、同様の処理は同じステップ番号を付し、説明は簡略化する。jは、各フレームの画像データにおいて画素を特定するための番号を示す。
Next, a specific example of the average luminance value Ii described in FIG. 10 will be described.
FIG. 11 is executed for the image of each frame, and the process of step S33 of FIG. 10 in the case where (0.6R + 0.3G + 0.1B) calculated from the three pixel values of RGB is used as the average luminance value Ii. It is a flowchart which shows the example of a flow. In the process of FIG. 11, the average luminance value Ii is calculated by calculating the luminance value (0.6R + 0.3G + 0.1B) from the three RGB pixel values rj, gj, bj for each pixel of one frame. The
Since FIG. 11 includes the same processing steps as those in FIG. 5, the same steps are denoted by the same step numbers, and the description will be simplified. j represents a number for specifying a pixel in the image data of each frame.

初めに、j=1,val1=0,count1=0とする(ステップS11)。ここで、val1は明るさの特徴量の総和を求めるための変数であり、count1は、平均輝度値Iiの算出に用いられた画素数を求めるための変数である。   First, j = 1, val1 = 0, and count1 = 0 are set (step S11). Here, val1 is a variable for obtaining the sum of the brightness feature values, and count1 is a variable for obtaining the number of pixels used for calculating the average luminance value Ii.

次に、ステップS12において、j番目の画素が暗部に属する画素か否かを判定する。j番目の画素が暗部に属する画素であると判定された場合、ステップS16に進み、j番目の画素が暗部に属さない画素であると判定された場合、ステップS13に進む。   Next, in step S12, it is determined whether or not the jth pixel is a pixel belonging to a dark part. When it is determined that the jth pixel is a pixel belonging to the dark part, the process proceeds to step S16, and when it is determined that the jth pixel is not a pixel belonging to the dark part, the process proceeds to step S13.

次に、ステップS13において、j番目の画素が、極端に明るい画素、すなわちハレーション部に属する画素か否かを判定する。j番目の画素がハレーション画素であると判定された場合、ステップS16に進み、j番目の画素がハレーション画素でないと判定された場合、ステップS44に進む。   Next, in step S13, it is determined whether or not the jth pixel is an extremely bright pixel, that is, a pixel belonging to the halation portion. If it is determined that the jth pixel is a halation pixel, the process proceeds to step S16. If it is determined that the jth pixel is not a halation pixel, the process proceeds to step S44.

尚、ステップS12とS13において、R画像、G画像、及びB画像についての閾値thdとthhは各画素rj、gj、及びbjについてそれぞれ同じ値としているが、生体粘膜は総じてR画像が最も明るい傾向にあるため、例えばrjに対する閾値を、gj、bjに対する閾値よりも高く設定してもよい。また、rj、gj、bjのそれぞれに対する閾値を異なる値に設定してもよい。   In steps S12 and S13, the threshold values thd and thh for the R image, G image, and B image are set to the same value for each pixel rj, gj, and bj, but the biological mucosa generally has the brightest R image. For example, the threshold value for rj may be set higher than the threshold values for gj and bj. Moreover, you may set the threshold value with respect to each of rj, gj, and bj to a different value.

ステップS44では、val1=val1+(0.6rj+0.3gj+0.1bj)と、count1=count1+1が演算される。明るさ特徴量の総和を求めるための変数val1に、明るさ特徴量である輝度値(0.6rj+0.3gj+0.1bj)を加算し、変数count1を1だけインクリメントする。   In step S44, val1 = val1 + (0.6rj + 0.3gj + 0.1bj) and count1 = count1 + 1 are calculated. The brightness value (0.6rj + 0.3gj + 0.1bj), which is the brightness feature value, is added to the variable val1 for obtaining the sum of the brightness feature values, and the variable count1 is incremented by one.

そして、ステップS15においては、全ての画素について、ステップS12からステップS14の処理を行ったか否かを判定する。全ての画素についてステップS12からステップS44の処理を行っていない場合、ステップS16において、画素を特定する番号jに1を加算(j=j+1)して、次の画素に対して前記ステップS12からステップS44を実行する。全ての画素についてステップS12からステップS44の処理を行った場合、count1が所定の閾値thcより大きいか否かを判定する(ステップS17)。明るさの評価に有効な画素が充分な数だけ存在した場合、平均輝度値Iiが、変数val1を、変数count1によって割り算することによって、算出される(ステップ18)。具体的には、Ii=val1/count1である。   In step S15, it is determined whether or not the processing from step S12 to step S14 has been performed for all the pixels. If the processing from step S12 to step S44 is not performed for all the pixels, in step S16, 1 is added to the number j for specifying the pixel (j = j + 1), and the processing from the step S12 to the next pixel is performed. S44 is executed. When the processing from step S12 to step S44 is performed for all the pixels, it is determined whether or not count1 is larger than a predetermined threshold thc (step S17). If there are a sufficient number of pixels effective for brightness evaluation, the average luminance value Ii is calculated by dividing the variable val1 by the variable count1 (step 18). Specifically, Ii = val1 / count1.

明るさの評価に有効な画素が充分な数だけ存在しなかった場合、そのフレームの画像は、エラーすなわち異常画像として(ステップS19)、平均輝度値Iiを例えば0(ゼロ)として、図10のステップS34においては、閾値Th11を超えないものとして判断されることになる。   When there are not a sufficient number of effective pixels for the brightness evaluation, the image of the frame is an error, that is, an abnormal image (step S19), and the average luminance value Ii is set to 0 (zero), for example, as shown in FIG. In step S34, it is determined that the threshold value Th11 is not exceeded.

なお、以上の説明では、噴門部が閉じている場合で説明したが、開いていても、本実施の形態の処理は適用でき、輝度量が所定の閾値を超えたか否かによって、噴門部を検出することができる。
次に、本実施の形態における各種変形例を説明する。
第1の変形例として、上述した図10から図11においては、各フレームの画像に基づいて、食道・胃接合部の通過、噴門部の通過等の判断を行っているが、連続する複数の画像が、あるいは連続する複数の画像の中の所定の割合(例えば80%)以上が、ステップS34の判定結果がIi>Th11であった場合に、カプセル内視鏡3が、食道・胃接合部を通過した等の、判断をするようにしてもよい。
また、第2の変形例として、以上の説明は、連続する複数の画像に対して、処理を行っているが、図10の処理は、特定の1枚の画像に対して行うようにしてもよい。
In the above description, the case where the cardia portion is closed is described. However, even if the cardia portion is open, the processing of the present embodiment can be applied, and the cardia portion is determined depending on whether the luminance amount exceeds a predetermined threshold. Can be detected.
Next, various modifications of the present embodiment will be described.
As a first modified example, in FIGS. 10 to 11 described above, the passage of the esophagus / gastric junction, the passage of the cardia, and the like are determined based on the image of each frame. When the image or a predetermined ratio (for example, 80%) or more in a plurality of continuous images is equal to or greater than Th11 in step S34, the capsule endoscope 3 is connected to the esophagus / gastric junction. You may make it judge, such as having passed.
Further, as a second modification, the above description has been performed on a plurality of continuous images. However, the processing in FIG. 10 may be performed on a specific image. Good.

さらになお、第3の変形例として、連続する複数の画像における平均輝度値Iiの移動平均を算出して、その移動平均値が所定の閾値を超えたか否かによって、カプセル型内視鏡3の食道・胃接合部の通過等の判定を行うようにしてもよい。例えば、m=2,3,4,・・、かつi>=m+1としたとき(すなわち、n枚の画像の中から、連続するm枚の画像を取り出し、そのとき、(m+1)はi以下であることの意)に、連続するm枚の各画像から得られる画像F(i−m)からFiの平均輝度値に基づいて移動平均値を算出し、その移動平均値が所定の閾値を超えたか否かが判断される。このような移動平均を用いることによれば、観察距離、角度等の違いによる照明条件の変化から生じ得る赤みの強い食道内の画像等であっても、平均輝度値の小さな変動による影響を除去して、より精度の高い、カプセル型内視鏡3の食道・胃接合部の通過等を検出することができる。   Furthermore, as a third modification, the moving average of the average luminance value Ii in a plurality of consecutive images is calculated, and the capsule endoscope 3 is determined depending on whether or not the moving average value exceeds a predetermined threshold. You may make it perform determination, such as passage of an esophagus and a stomach junction part. For example, when m = 2, 3, 4,... And i> = m + 1 (that is, m consecutive images are extracted from n images, and then (m + 1) is equal to or less than i. In other words, the moving average value is calculated based on the average luminance value of Fi from the image F (im) obtained from each of the m consecutive images, and the moving average value has a predetermined threshold value. It is determined whether it has been exceeded. By using such a moving average, the effect of small fluctuations in the average luminance value can be eliminated even in images of esophagus with strong redness that can arise from changes in lighting conditions due to differences in observation distance, angle, etc. Thus, the passage of the capsule endoscope 3 through the esophagus / gastric junction can be detected with higher accuracy.

また、第4の変形例として、以上の例では、明るさの特徴量として、上述したようなRGBの3つの画素値から算出される輝度の代わりに、GあるいはBの画素データを用いてもよい。   As a fourth modification, in the above example, G or B pixel data may be used as the brightness feature amount instead of the luminance calculated from the three RGB pixel values as described above. Good.

図12は、画像の明るさ情報として、上述したようなRGBの3つの画素値から算出される輝度の代わりに、GあるいはBの画素データを用いた場合における一連の内視鏡画像におけるGあるいはBの画素データの変化を説明するための模式的グラフである。図12において、横軸は、食道扁平上皮部から食道・胃接合部を経て胃に到達するまでに得られる内視鏡画像の時系列に沿った画像番号(フレーム番号)を示し、縦軸は、各画像番号に対応する内視鏡画像のG又はBの画素データ値を示す。   FIG. 12 shows G or B in a series of endoscopic images when G or B pixel data is used as image brightness information instead of the luminance calculated from the three RGB pixel values as described above. It is a typical graph for demonstrating the change of the pixel data of B. In FIG. 12, the horizontal axis indicates the image number (frame number) along the time series of endoscopic images obtained from the esophageal squamous epithelium to the stomach via the esophagus / gastric junction, and the vertical axis indicates The G or B pixel data value of the endoscopic image corresponding to each image number is shown.

すなわち、図12に示すように、食道の扁平上皮部RAと円柱上皮の胃部RCにおいて、G又はBの画素データ値は異なっており、さらにそれらの間の食道・胃接合部RBもG又はBの画素データ値は、食道の扁平上皮部RAと円柱上皮の胃部RCとは異なっている。具体的には、食道・胃接合部RBでは、G又はBの画素データ値は、画素データ値の大きい白色調の食道の扁平上皮部RAから、画素データ値の小さな円柱上皮及び胃底腺粘膜の胃部RCにかけて徐々に低下する。   That is, as shown in FIG. 12, the pixel data values of G or B are different in the squamous epithelium RA of the esophagus and the gastric RC of the columnar epithelium, and the esophagus / gastric junction RB between them is also G or The pixel data value of B is different from the squamous epithelium RA of the esophagus and the stomach RC of the columnar epithelium. Specifically, in the esophagus / gastric junction RB, the pixel data value of G or B is derived from the squamous epithelium RA of the white tone esophagus having a large pixel data value, and the columnar epithelium and gastric fundus gland mucosa having a small pixel data value. It gradually decreases over the stomach RC.

よって、画像の明るさ情報が、その徐々に変化する途中において所定の閾値Th12を下回ったときに、カプセル型内視鏡3が食道・胃接合部(EGジャンクション)を通過している、あるいは食道・胃接合部(EGジャンクション)に入ろうとしている、等の判定が実行される。すなわち、撮像した画像の明るさ情報の違いに基づき、カプセル型内視鏡3の食道・胃接合部の通過等の判定が行われる。具体的には、その通過等の判断を確実に行うために、明るさ情報として、G又はBの画素データ値の平均値等が利用される。   Therefore, when the brightness information of the image falls below the predetermined threshold Th12 in the course of its gradual change, the capsule endoscope 3 passes through the esophagus / gastric junction (EG junction), or the esophagus A determination is made that an attempt is made to enter a gastric junction (EG junction). That is, based on the difference in the brightness information of the captured images, the passage of the esophagus / gastric junction of the capsule endoscope 3 is determined. Specifically, an average value of G or B pixel data values or the like is used as the brightness information in order to reliably determine the passage or the like.

さらにまた、第5の変形例として、複数の明るさの情報を用いてもよい。例えば、図10のステップS33において、RGBの3つの画素値から算出される画素の輝度値とGの画素データとを用い、それらの平均値、すなわち各画像における全画素の平均輝度値I1iと、Gの画素データの平均値I2iとを算出する。そして、ステップS34において、平均輝度値I1iとGの画素データの平均値I2iが、I1i>Th13、かつI2i<Th14か否かの判断を行うようにしてもよい。   Furthermore, as a fifth modification, information on a plurality of brightnesses may be used. For example, in step S33 of FIG. 10, using the luminance value of the pixel calculated from the three pixel values of RGB and the G pixel data, the average value thereof, that is, the average luminance value I1i of all the pixels in each image, An average value I2i of G pixel data is calculated. In step S34, it may be determined whether the average luminance value I1i and the average value I2i of the G pixel data are I1i> Th13 and I2i <Th14.

また、第6の変形例として、明るさの情報の変化量に基づいて、カプセル型内視鏡3の食道・胃接合部の通過等を検出するようにしてもよい。すなわち、連続する一連の画像の各画像から得られる明るさの情報が所定の閾値を超えたか否かではなく、連続する2枚の画像の明るさの情報の変化量が所定の閾値を超えたか否かを判定するようにしてもよい。すなわち、各画像の明るさの情報について、例えば、一つ前の画像あるいは一つ後の画像の平均輝度値とを比較し、その2つの平均輝度値の差が、所定の閾値を超えていれば、例えばカプセル型内視鏡3が食道から食道・胃接合部へ入った、食道・胃接合部から胃に入った等の判定を行うようにしてもよい。画像F(i−m1)と画像Fiにおける平均輝度値I(i−m1)とIiの差分値(Ii−I(i−m1))が、所定の閾値以上変化したか否かの判断が行われる。m1は、1,2,3,・・である。   As a sixth modification, the passage of the capsule endoscope 3 through the esophagus / gastric junction may be detected based on the amount of change in the brightness information. That is, whether or not the amount of change in brightness information of two consecutive images exceeds a predetermined threshold, rather than whether or not the brightness information obtained from each image in a series of consecutive images exceeds a predetermined threshold It may be determined whether or not. That is, for example, the brightness information of each image is compared with the average brightness value of the previous image or the next image, and the difference between the two average brightness values exceeds a predetermined threshold value. For example, it may be determined that the capsule endoscope 3 has entered the esophagus / gastric junction from the esophagus, the stomach has entered the stomach from the esophagus / gastric junction, or the like. A determination is made as to whether or not the difference value (Ii-I (i-m1)) between the average luminance value I (i-m1) and Ii in the image F (i-m1) and the image Fi has changed by a predetermined threshold value or more. Is called. m1 is 1, 2, 3,.

これは、粘膜色の個人差、Barret食道等の病変部の存在、撮像系のバラツキ等により粘膜の色調は、常に一定ではないため、そのような個人差等の影響を受けないで、カプセル型内視鏡3が食道・胃接合部を通過したか等の判定ができるようにするためである。   This is because the color of the mucous membrane is not always constant due to individual differences in mucosal color, the presence of lesions such as Barret's esophagus, and variations in the imaging system. This is because it is possible to determine whether or not the endoscope 3 has passed through the esophagus / gastric junction.

さらに、その場合、明るさの情報の変化を、平均輝度値の微分値を算出することによって検出するようにしてもよい。
図13は、その平均輝度値の微分値を算出することによって、明るさの変化を検出する処理の流れの例を示すフローチャートである。図6と同様の処理に係るものは、同じステップ番号を付して、説明は簡略化する。
Further, in that case, a change in brightness information may be detected by calculating a differential value of the average luminance value.
FIG. 13 is a flowchart illustrating an example of a flow of processing for detecting a change in brightness by calculating a differential value of the average luminance value. Components related to the same processing as in FIG. 6 are given the same step numbers, and the description will be simplified.

なお、各画像の画像データも、図10の処理で説明したように、図13の処理がされる前に、逆ガンマ補正、ノイズ除去等の前処理がされているものである。ステップS1からステップS33の処理は、図10の処理のステップS1からステップS33の処理と同じである。   Note that the image data of each image is also subjected to preprocessing such as inverse gamma correction and noise removal before the processing of FIG. 13 as described in the processing of FIG. The processing from step S1 to step S33 is the same as the processing from step S1 to step S33 of the processing of FIG.

全ての画像について処理をしたか、すなわち全画像終了かを判定し(ステップS21)、全画像終了でなければ、ステップS21でNOとなり、i=i+1とし(ステップS7)、処理はステップS2に移行する。   It is determined whether all images have been processed, that is, whether all images have been completed (step S21). If all images have not been completed, NO is determined in step S21, i = i + 1 is set (step S7), and the process proceeds to step S2. To do.

全画像終了のときは、ステップS21でYESとなり、得られた複数の平均輝度値Iiについて、平滑化のために所定の範囲すなわち連続する所定枚数の画像の範囲に亘って移動平均値f(Ii)を算出する(ステップS52)。そして、移動平均値f(Ii)の時間経過に基づいて微分値Δf(Ii)を算出する(ステップS53)。   When all the images have been completed, “YES” is determined in the step S21, and the moving average value f (Ii) is obtained for a plurality of average luminance values Ii obtained over a predetermined range for smoothing, that is, a range of a predetermined number of continuous images. ) Is calculated (step S52). Then, a differential value Δf (Ii) is calculated based on the passage of time of the moving average value f (Ii) (step S53).

そして、所定の閾値thf1を超える微分値Δf(Ii)に対応する画像Fiを特定し検出する(ステップS54)。ステップS33からS54が消化管の境界部を検出する検出手段を構成する。
以上により、複数の画像間で明るさの変化量が所定の閾値を超える画像が検出できるので、粘膜色の個人差等があっても、個人差等の影響を受けないで、カプセル型内視鏡3の食道・胃接合部の通過等の判定をすることができる。
Then, the image Fi corresponding to the differential value Δf (Ii) exceeding the predetermined threshold thf1 is specified and detected (step S54). Steps S33 to S54 constitute detection means for detecting the boundary portion of the digestive tract.
As described above, since it is possible to detect an image in which the amount of change in brightness exceeds a predetermined threshold value among a plurality of images, even if there are individual differences in mucosal color, it is not affected by individual differences and the like. It is possible to determine whether the mirror 3 passes through the esophagus / gastric junction.

さらに、第7の変形例として、閉じた状態の噴門部を、明るさの分布に基づいて検出するようにしてもよい。例えば、明るさ情報の平均値ではなく、第1の実施の形態と同様に、標準偏差あるいは分散を用いることもできる。得られる一連の内視鏡画像における明るさの情報の標準偏差あるいは分散の値に基づいて、カプセル型内視鏡3が食道・胃接合部を通過しようとしている等の判定をすることができる。具体的には、R画像データの明るさの標準偏差を求め、その標準偏差が所定の閾値よりも小さければ、閉じた噴門部を正面視していると判定する。これは、閉じた状態の噴門部を正面視したときの画像の明るさは比較的均一であるからである。さらになお、平均輝度値の標準偏差あるいは分散の代わりに、それらの変動係数(=標準偏差/平均輝度値)を用いてもよい。   Furthermore, as a seventh modification, the cardia portion in the closed state may be detected based on the brightness distribution. For example, instead of the average value of the brightness information, standard deviation or variance can be used as in the first embodiment. Based on the standard deviation or variance value of the brightness information in the series of endoscopic images obtained, it is possible to determine whether the capsule endoscope 3 is about to pass through the esophagus / gastric junction. Specifically, the standard deviation of the brightness of the R image data is obtained, and if the standard deviation is smaller than a predetermined threshold, it is determined that the closed cardia portion is viewed from the front. This is because the brightness of the image when the cardia part in the closed state is viewed from the front is relatively uniform. Furthermore, instead of the standard deviation or variance of the average luminance value, their coefficient of variation (= standard deviation / average luminance value) may be used.

さらに、第8の変形例として、以上説明した例では、各フレームの画像の全ての画素の画素データを用いているが、第1の実施の形態の図8で説明したように、全画素を処理対象とするのではなく、各フレームの所定の領域内の画素についてのみサンプリングして処理対象としてもよい。図8は、各フレームの画像において、上述した本実施の形態及び変形例における画像処理を行う領域の例を示す図である。   Furthermore, as an eighth modification, in the example described above, pixel data of all pixels of the image of each frame is used. However, as described in FIG. 8 of the first embodiment, all pixels are Instead of the processing target, only the pixels in a predetermined area of each frame may be sampled and processed. FIG. 8 is a diagram illustrating an example of a region in which image processing is performed in the above-described embodiment and modification examples in each frame image.

各フレームの画像を、所定の領域に分割する。図8では、各画像は、各分割された領域が矩形となるように16分割され、その分割された領域の中で、予め設定された領域(R2,R3,R5,R8,R9,R12,R14,R15)についてのみ、すなわち関心領域(ROI)についてのみ、上述した処理が行われる。特に、食道は管腔臓器であるため、より正確に粘膜表面の色調を算出するために、若干視野の中央部を除いて、関心領域(ROI)を設定することもできる。
従って、関心領域(ROI)のみを処理対象とすれば、演算量が少なくなるため処理の高速化が図れる。
The image of each frame is divided into predetermined areas. In FIG. 8, each image is divided into 16 so that each divided area is rectangular, and among the divided areas, predetermined areas (R2, R3, R5, R8, R9, R12, The above-described processing is performed only for R14, R15), that is, only for the region of interest (ROI). In particular, since the esophagus is a luminal organ, in order to calculate the color tone of the mucosa surface more accurately, a region of interest (ROI) can be set except for the central part of the visual field.
Therefore, if only the region of interest (ROI) is set as the processing target, the amount of calculation is reduced, so that the processing speed can be increased.

さらになお、より高速処理を図るために、関心領域(ROI)のみを処理対象とするときに、全てのフレームについて処理を行うのではなく、k枚(k=1,2,3,・・)おきのフレーム毎に、関心領域(ROI)の画素のみについて処理対象とするようにしてもよい。特に、食道内では、毎秒の撮像枚数が多いので、多少の間引きを行っても、正確な判定を行うことができる場合があるからである。   Furthermore, in order to achieve higher-speed processing, when only the region of interest (ROI) is processed, not all frames are processed, but k frames (k = 1, 2, 3,...) Only every pixel of the region of interest (ROI) may be processed for every other frame. This is because, in particular, in the esophagus, since the number of images taken per second is large, there are cases where accurate determination can be made even if some thinning is performed.

以上のように、本実施の形態(変形例を含む)によれば、画像の明るさの情報に基づいて、各画像が、カプセル型内視鏡が食道・胃接合部(EGジャンクション)に入ろうとしている時、あるいは食道・胃接合部(EGジャンクション)を通過している時等の画像であるか否かの判定をすることができる。   As described above, according to the present embodiment (including the modified example), based on the information on the brightness of the image, the capsule endoscope will enter the esophagus / gastric junction (EG junction). It is possible to determine whether or not the image is when the image is being taken or when passing through the esophagus / gastric junction (EG junction).

なお、本実施の形態においては、算出した特徴量に対する閾値処理の適用により、各画像が、カプセル型内視鏡が食道・胃接合部(EGジャンクション)に入ろうとしている時、あるいは食道・胃接合部(EGジャンクション)を通過している時の画像であるかの検出をしたが、例えば、公知の線形判別関数等の識別関数を用いて、その検出を行うようにしてもよい。また、他の実施の形態における特徴量を組み合わせて使用してもよい。   In the present embodiment, by applying threshold processing to the calculated feature amount, each image is displayed when the capsule endoscope is about to enter the esophagus / gastric junction (EG junction), or Although it is detected whether the image is passing through a part (EG junction), for example, the detection may be performed using a discriminant function such as a known linear discriminant function. Moreover, you may use combining the feature-value in other embodiment.

(第3の実施の形態)
次に、本発明の第3の実施の形態に係るカプセル型内視鏡装置を利用した噴門検出装置及びその方法について、図面を用いて説明する。本実施の形態において画像処理の対象となる内視鏡画像は、第1の実施の形態と同様に、カプセル型内視鏡装置1によって得られた連続した一連の内視鏡画像であるので、噴門検出装置の構成は、第1の実施の形態と同様であるので、説明は省略する。
(Third embodiment)
Next, a cardia detecting apparatus using a capsule endoscope apparatus according to a third embodiment of the present invention and a method thereof will be described with reference to the drawings. Since the endoscopic image to be image-processed in the present embodiment is a continuous series of endoscopic images obtained by the capsule endoscope apparatus 1 as in the first embodiment, Since the structure of the cardia detection apparatus is the same as that of the first embodiment, description thereof is omitted.

上述した第1の実施の形態では色調特徴量が用いられているが、本実施の形態に係る管腔画像処理装置である噴門検出装置は、開いた状態の噴門部の検出を行うことによって、各画像が、カプセル型内視鏡が食道から胃に向かう噴門部の手前の近傍にある等のときの画像であるか否かの判定を行うようにした点が特徴である。   In the first embodiment described above, the color tone feature amount is used, but the cardia detection device that is a lumen image processing device according to the present embodiment performs detection of the cardia portion in an open state. It is characterized in that it is determined whether or not each image is an image when the capsule endoscope is in the vicinity of the front of the cardia part from the esophagus to the stomach.

図14は、カプセル型内視鏡3が開いている噴門部の手前にある場合の画像の例を示す図である。
カプセル型内視鏡3が管腔内において、開いた噴門部を撮像した場合、開いた噴門部には、周辺部と比較して顕著な明るさの低下がある。図14に示すように、噴門部32が開いている場合、カプセル型内視鏡3が撮像した画像31において、開いた噴門部32は暗部領域となる。従って、カプセル型内視鏡3が食道から食道・胃接合部(EGジャンクション)を通って噴門に近づくにつれて、画像31における噴門部32の面積は大きくなる。本実施の形態は、開いた噴門部領域の面積が所定の大きさを超えているときに、カプセル型内視鏡3が胃の食道側から噴門部を通過しようとしているという判定を行う。
FIG. 14 is a diagram illustrating an example of an image when the capsule endoscope 3 is in front of the cardia part where the capsule endoscope 3 is open.
When the capsule endoscope 3 captures an image of an open cardia portion in the lumen, the open cardia portion has a noticeable decrease in brightness compared to the peripheral portion. As shown in FIG. 14, when the cardia part 32 is open, in the image 31 captured by the capsule endoscope 3, the opened cardia part 32 becomes a dark part region. Therefore, as the capsule endoscope 3 approaches the cardia from the esophagus through the esophagus / stomach junction (EG junction), the area of the cardia 32 in the image 31 increases. In the present embodiment, when the area of the opened cardia region exceeds a predetermined size, it is determined that the capsule endoscope 3 is about to pass through the cardia from the esophagus side of the stomach.

図15は、得られた一連の内視鏡画像に基づいて、開いた噴門部の検出を行う処理の流れの例を示すフローチャートである。被検者の口から入ってから撮像されて得られた一連の内視鏡画像は、複数のフレームからなり、各フレームについて図15の処理が実行される。なお、各内視鏡画像の画像データは、図15の処理がされる前に、逆ガンマ補正、ノイズ除去等の前処理がされているものである。   FIG. 15 is a flowchart illustrating an example of a flow of processing for detecting an open cardia portion based on a series of obtained endoscopic images. A series of endoscopic images obtained by taking an image after entering through the mouth of the subject consists of a plurality of frames, and the processing of FIG. 15 is executed for each frame. Note that the image data of each endoscopic image has been subjected to preprocessing such as inverse gamma correction and noise removal before the processing of FIG. 15 is performed.

図15の処理を施したい一連の画像の中における最初のフレームから処理するために、まず、フレーム番号iを1にする(ステップS61)。iは1からnの整数である。   In order to process from the first frame in a series of images to be processed in FIG. 15, first, the frame number i is set to 1 (step S61). i is an integer from 1 to n.

次に、フレーム番号iの画像FiのR画像データを、端末装置7の記憶装置(図示せず)から読み出す(ステップS62)。画像Fiは、RGBの3つのプレーンからなるが、ここでは、R画像データのみが読み出される。   Next, R image data of the image Fi of the frame number i is read from a storage device (not shown) of the terminal device 7 (step S62). The image Fi is composed of three RGB planes, but only R image data is read here.

なお、ここでは、後述する噴門部の判定のために、R画像データが読み出されるが、画像FiのG画像データ、あるいはB画像データを用いてもよい。   Here, the R image data is read for determination of the cardia described later, but G image data or B image data of the image Fi may be used.

読み出した画像FiのR画像データの全画素について、暗部画素の2値化処理を施す(ステップS63)。具体的には、各画素の画素値について、所定の閾値Th2と比較して2値化処理を施し、暗部画素を1とし、それ以外の画素を0(ゼロ)とする。jを、各フレームの画像データにおいて画素を特定するための番号とすれば、各画素の値rjが、閾値Th2を下回るか否かをチェックすることにより、閾値Th2を下回った画素を1とし、それ以外の画素を0(ゼロ)とする。   The dark portion pixel binarization process is performed on all the pixels of the read R image data of the image Fi (step S63). Specifically, the pixel value of each pixel is binarized by comparison with a predetermined threshold Th2, and the dark pixel is set to 1 and the other pixels are set to 0 (zero). If j is a number for specifying a pixel in the image data of each frame, by checking whether the value rj of each pixel is lower than the threshold Th2, a pixel that is lower than the threshold Th2 is set to 1. The other pixels are set to 0 (zero).

次に、全画素に対する暗部画素の割合εを算出する(ステップS64)。割合εは、言い換えると、画像中の暗部の面積の割合である。具体的には、ステップS63の2値化処理によって暗部画素とされた画素の数をカウントし、その数をR画像データの全画素数で除算することによって、割合εが算出される。暗部画素数をp1とし、画像FiのサイズをISX×ISYとすれば、割合εは、p1/(ISX×ISY)となる。ステップS64が、各画像Fiについての暗部画素の割合を算出する暗部割合算出工程あるいは暗部割合算出手段を構成する。   Next, the ratio ε of dark part pixels to all pixels is calculated (step S64). In other words, the ratio ε is the ratio of the dark area in the image. Specifically, the ratio ε is calculated by counting the number of pixels that have been darkened by the binarization process in step S63 and dividing the number by the total number of pixels in the R image data. If the number of dark area pixels is p1 and the size of the image Fi is ISX × ISY, the ratio ε is p1 / (ISX × ISY). Step S64 constitutes a dark portion ratio calculating step or dark portion ratio calculating means for calculating the ratio of dark portion pixels for each image Fi.

そして、暗部画素の割合εが、所定の閾値Thrを超えたか否かを判断する(ステップS65)。閾値Thrは例えば0.8である。   Then, it is determined whether or not the dark pixel ratio ε exceeds a predetermined threshold value Thr (step S65). The threshold value Thr is 0.8, for example.

ステップS65でYESの場合、すなわち、画像全体の80%を超えて暗部がある場合は、開いた噴門部が検出されたと判定し(ステップS66)、処理は終了する。   If YES in step S65, that is, if there is a dark part that exceeds 80% of the entire image, it is determined that an open cardia part has been detected (step S66), and the process ends.

ステップS65でNOの場合、すなわち、暗部が画像全体の80%以下である場合は非噴門と判定し(ステップS67)、図15の処理を施したい一連の画像の全てについて図15の処理が終了したか否かを判定し(ステップS68)、全て終了しているときは、ステップS68でYESとなり、処理は終了する。ステップS68でNOの場合は、未処理の画像が残っているので、i=i+1の処理を行い(ステップS69)、以降、次の画像に対して、ステップS62からS65の処理を繰り返す。   If NO in step S65, that is, if the dark part is 80% or less of the entire image, it is determined as a non-cardia (step S67), and the processing in FIG. 15 is completed for all of the series of images to be processed in FIG. It is determined whether or not it has been completed (step S68). If all the processes have been completed, YES is determined in step S68, and the process ends. In the case of NO in step S68, since an unprocessed image remains, the process of i = i + 1 is performed (step S69), and thereafter, the process of steps S62 to S65 is repeated for the next image.

なお、ステップS66では、暗部画素の割合εが所定の閾値Thrを超えているときは、開いた噴門部を検出と判定しているが、言い換えると、その後、噴門部を通過しようとしている、あるいは胃内へ到達しようとしているという判定ということもできる。ステップS63からS66が消化管の境界部を検出する検出手段を構成する。   In step S66, when the dark pixel ratio ε exceeds a predetermined threshold Thr, it is determined that the open cardia is detected. In other words, after that, it is going through the cardia, or It can also be said that it is about to reach the stomach. Steps S63 to S66 constitute detection means for detecting the boundary portion of the digestive tract.

次に、本実施の形態における各種変形例を説明する。
上述した例では、噴門部の判定のために、R画像データだけが読み出されるが、さらに、G画像データ若しくはB画像データ、またはG画像データ及びB画像データを読み出し、2つ以上の画像データについて暗部画素の2値化処理を行い、2つの以上の画像データにおける暗部画素の割合εが全て所定の閾値Thrを超えたときに、噴門部を検出したと判定するようにしてもよい。
Next, various modifications of the present embodiment will be described.
In the above-described example, only the R image data is read for determination of the cardia, but further, G image data or B image data, or G image data and B image data are read, and two or more image data are read. The dark part pixel binarization process may be performed, and it may be determined that the cardia part has been detected when the dark part pixel ratios ε in two or more image data all exceed a predetermined threshold Thr.

また、第2の変形例として、上述した図15においては、各フレームの画像に基づいて、噴門部の検出を行っているが、連続する複数の画像が、あるいは連続する複数の画像の中の所定の割合(例えば80%)以上が、ステップS65の判定結果がε>Thrであった場合に、噴門部を検出したと判定するようにしてもよい。   Further, as a second modification, in FIG. 15 described above, the cardia portion is detected based on the image of each frame. However, a plurality of continuous images or a plurality of continuous images are included. A predetermined ratio (for example, 80%) or more may be determined to have detected the cardia part when the determination result in step S65 is ε> Thr.

第3の変形例として、以上の説明は、連続する複数の画像に対して、処理を行っているが、図15の処理は、1枚の画像に対して行うようにしてもよい。   As a third modification, the above description has been performed on a plurality of continuous images, but the processing in FIG. 15 may be performed on a single image.

さらに、第4の変形例として、全画素に対する暗部画素の割合εを算出するのではなく、非暗部の画素、上述した例では閾値Th2を下回わらなかった画素P0の総数をカウントし、その数を全画素数で除算し、非暗部の画素の割合ε1を算出したり、暗部画素数p1に対する非暗部画素数p0の割合(p0/p1。但し、p1は0(ゼロ)でない)を算出したりする等して、噴門検出の判定を行うようにしてもよい。   Furthermore, as a fourth modified example, instead of calculating the ratio ε of dark pixels to all pixels, the total number of non-dark pixels, that is, the number of pixels P0 that did not fall below the threshold Th2 in the above example, Divide the number by the total number of pixels to calculate the ratio ε1 of the non-dark pixel, or calculate the ratio of the non-dark pixel number p0 to the dark pixel number p1 (p0 / p1, where p1 is not 0 (zero)) For example, the cardus detection may be determined.

また、第5の変形例として、噴門部を検出するときのカプセル型内視鏡3と噴門との距離に応じて閾値Thrは変更することができる。言い換えると、噴門部を検出したいときの、カプセル型内視鏡3と噴門との距離に応じて、閾値Thrを変更することができる。例えば、Thrを0.5とすることにより、上述したThrが0.8のときよりも、早めの噴門検出が可能となる。
以上のように、本実施の形態によれば、画像中の暗部の面積に基づいて開いた噴門部の検出をすることができる。
As a fifth modification, the threshold value Thr can be changed according to the distance between the capsule endoscope 3 and the cardia when detecting the cardia part. In other words, the threshold value Thr can be changed according to the distance between the capsule endoscope 3 and the cardia when it is desired to detect the cardia part. For example, by setting Thr to 0.5, it is possible to detect cardia earlier than when Thr described above is 0.8.
As described above, according to the present embodiment, it is possible to detect an open cardia portion based on the area of the dark portion in the image.

なお、本実施の形態においては、算出した特徴量に対する閾値処理の適用により、開いた噴門部の検出をしたが、例えば、公知の線形判別関数等の識別関数を用いて、その検出を行うようにしてもよい。また、他の実施の形態における特徴量を組み合わせて使用してもよい。   In the present embodiment, an open cardia portion is detected by applying threshold processing to the calculated feature amount. For example, a detection function such as a known linear discriminant function is used to detect the cardia portion. It may be. Moreover, you may use combining the feature-value in other embodiment.

(第4の実施の形態)
次に、本発明の第4の実施の形態に係るカプセル型内視鏡装置を利用した噴門検出装置及びその方法について、図面を用いて説明する。本実施の形態では、形状に基づいて開いた噴門部を検出するようにしたことが特徴である。本実施の形態において画像処理の対象となる内視鏡画像は、第1の実施の形態と同様に、カプセル型内視鏡装置1によって得られた連続した一連の内視鏡画像であるので、噴門検出装置の構成は、第1の実施の形態と同様であるので、説明は省略する。
(Fourth embodiment)
Next, a cardia detecting apparatus and method using a capsule endoscope apparatus according to a fourth embodiment of the present invention will be described with reference to the drawings. The present embodiment is characterized in that the cardia part opened based on the shape is detected. Since the endoscopic image to be image-processed in the present embodiment is a continuous series of endoscopic images obtained by the capsule endoscope apparatus 1 as in the first embodiment, Since the structure of the cardia detection apparatus is the same as that of the first embodiment, description thereof is omitted.

本実施の形態に係る管腔画像処理装置である噴門検出装置は、開いた状態の噴門部の形状を検出することによって、各画像が、食道から胃に向かうカプセル型内視鏡が噴門部の手前の近傍にある等のときの画像であるか否かの判定を行うようにした点が特徴である。   The cardia detection device, which is a lumen image processing device according to the present embodiment, detects the shape of the cardia part in an open state, so that each image is a capsule endoscope heading from the esophagus to the stomach. It is characterized in that it is determined whether or not the image is in the vicinity of the near side.

図16は、カプセル型内視鏡3が開いている噴門部を通過する場合の画像の例を示す図である。画像31A内には、暗部画像である開いた噴門部32Aが含まれている。   FIG. 16 is a diagram illustrating an example of an image when the capsule endoscope 3 passes through an open cardia part. The image 31A includes an open cardia portion 32A that is a dark portion image.

図17は、得られた一連の内視鏡画像に基づいて、開いた噴門部の検出を行う処理の流れの例を示すフローチャートである。被検者の口から入ってから撮像されて得られた一連の内視鏡画像は、複数のフレームからなり、各フレームについて図17の処理が実行される。なお、各内視鏡画像の画像データは、図17の処理がされる前に、逆ガンマ補正、ノイズ除去等の前処理がされているものである。   FIG. 17 is a flowchart illustrating an example of a flow of processing for detecting an open cardia portion based on a series of obtained endoscopic images. A series of endoscopic images obtained by imaging after entering through the mouth of the subject consists of a plurality of frames, and the processing of FIG. 17 is executed for each frame. Note that the image data of each endoscopic image has been subjected to preprocessing such as inverse gamma correction and noise removal before the processing of FIG.

図17の処理を施したい一連の画像の中における最初のフレームから処理するために、まず、フレーム番号iを1にする(ステップS71)。iは1からnの整数である。   In order to process from the first frame in a series of images to be processed in FIG. 17, first, the frame number i is set to 1 (step S71). i is an integer from 1 to n.

次に、フレーム番号iの画像FiのR画像データを、端末装置7の記憶装置(図示せず)から読み出す(ステップS72)。画像Fiは、RGBの3つのプレーンからなるが、ここでは、R画像データのみが読み出される。   Next, R image data of the image Fi of the frame number i is read from a storage device (not shown) of the terminal device 7 (step S72). The image Fi is composed of three RGB planes, but only R image data is read here.

読み出した画像FiのR画像データに対してバンドパスフィルタリング処理を施す(ステップS73)。バンドパスフィルタリングは、公知のディジタルフィルタを用いた畳み込み処理により、又はフーリエ面上において適用される。   Band-pass filtering processing is performed on the read R image data of the image Fi (step S73). Bandpass filtering is applied by convolution processing using a known digital filter or on the Fourier plane.

バンドパスフィルタの特性は、例えば、図18に示すような特性を有する。図18は、バンドパスフィルタリング処理におけるフィルタ特性を示す図である。そのフィルタ特性は、図18に示すように、血管等の微細なエッジ成分の影響を受け難くするために、若干低周波数帯域において通過成分が多い特性である。フィルタ特性は、例えば、空間周波数が0(ゼロ)からπ(rad)の周波数において、π/4に通過特性のピーク値(1.0)を有する。   The characteristics of the band pass filter have, for example, characteristics as shown in FIG. FIG. 18 is a diagram illustrating filter characteristics in the band-pass filtering process. As shown in FIG. 18, the filter characteristic is a characteristic in which there are many passing components in a slightly low frequency band in order to make it less susceptible to the influence of fine edge components such as blood vessels. For example, the filter characteristic has a peak value (1.0) of the pass characteristic at π / 4 at a spatial frequency of 0 (zero) to π (rad).

次に、バンドパスフィルタリング処理の処理結果画像に対して、閾値を用いてエッジ成分の2値化処理を施す(ステップS74)。2値化処理は、例えば、所定の閾値Th3を10.0として、この閾値Th3よりも大きな変動を有するエッジ成分を抽出する。閾値Th3よりも大きな変動のエッジ成分を有する画素を1とし、それ以外の画素を0(ゼロ)とする。jを、各フレームの画像データにおいて画素を特定するための番号とすれば、各画素のエッジ成分が、閾値Th3を超えるか否かをチェックすることにより、閾値Th3を上回った画素rjを1とし、それ以外の画素を0(ゼロ)とする。上述したように画像に噴門部が含まれる場合、その画像は急峻な明暗変化を有するため、閾値Th3を高めに設定することによって、他のエッジ成分、例えば粘膜の変形による皺などが除外できる。   Next, edge component binarization processing is performed on the processing result image of the bandpass filtering processing using a threshold value (step S74). In the binarization process, for example, a predetermined threshold Th3 is set to 10.0, and an edge component having a fluctuation larger than the threshold Th3 is extracted. A pixel having an edge component whose fluctuation is larger than the threshold Th3 is set to 1, and the other pixels are set to 0 (zero). If j is a number for specifying a pixel in the image data of each frame, the pixel rj exceeding the threshold Th3 is set to 1 by checking whether the edge component of each pixel exceeds the threshold Th3. Other pixels are set to 0 (zero). As described above, when the cardia portion is included in the image, the image has a steep change in brightness. Therefore, by setting the threshold Th3 to a higher value, other edge components such as wrinkles due to deformation of the mucous membrane can be excluded.

そして、抽出されたエッジ成分の画像が噴門により生じたものであるか否かの噴門判定処理により、噴門か否かの判定が行われる(ステップS75)。本実施の形態では、抽出したエッジ成分を細線化し、近似円との一致度を評価値として、エッジ成分が略円形状であるか否かにより、噴門であるか否かが判定される。エッジ成分が略円形状であるか否かは、ハフ変換処理により判定することができる。   Then, it is determined whether or not it is a cardia by a cardia determination process that determines whether or not the extracted image of the edge component is generated by the cardia (step S75). In the present embodiment, the extracted edge component is thinned, and the degree of coincidence with the approximate circle is used as an evaluation value, and whether or not the edge component is substantially circular is determined. Whether or not the edge component is substantially circular can be determined by Hough transform processing.

図19は、図16の画像に対して、所定のバンドパスフィルタリング及び2値化の処理を施した結果の画像の例を示す図である。図19に示すように、開いた噴門部は略円形の形状32Bを有している。従って、図19のエッジ成分画像31Bに対して、ハフ変換などを施して、エッジ成分32Bが円形状であるか否かの判定が行われる。   FIG. 19 is a diagram illustrating an example of an image obtained as a result of performing predetermined bandpass filtering and binarization processing on the image of FIG. 16. As shown in FIG. 19, the opened cardia part has a substantially circular shape 32B. Accordingly, the edge component image 31B of FIG. 19 is subjected to Hough transform or the like to determine whether or not the edge component 32B is circular.

噴門判定処理の結果に基づいて、噴門である場合は、ステップS75でYESとなり、噴門部が検出されたと判定し(ステップS76)、処理は終了する。   Based on the result of the cardia determination process, if it is a cardia, YES is determined in step S75, it is determined that the cardia part is detected (step S76), and the process ends.

ステップS75でNOの場合、すなわち、噴門でない場合は非噴門と判定し(ステップS77)、図17の処理を施したい一連の画像の全てについて図17の処理が終了したか否かを判定し(ステップS78)、全て終了しているときは、ステップS78でYESとなり、処理は終了する。ステップS78でNOの場合は、未処理の画像が残っているので、i=i+1の処理を行い(ステップS79)、以降、次の画像に対して、ステップS72からS74の処理を繰り返す。ステップS73からS76が消化管の境界部を検出する検出手段を構成する。   If NO in step S75, that is, if it is not a cardia, it is determined as a non-cardia (step S77), and it is determined whether or not the processing in FIG. 17 has been completed for all of the series of images to be processed in FIG. Step S78) If all the processes are completed, YES is determined in Step S78, and the process is completed. If NO in step S78, since an unprocessed image remains, the process of i = i + 1 is performed (step S79). Thereafter, the processes of steps S72 to S74 are repeated for the next image. Steps S73 to S76 constitute detection means for detecting the boundary portion of the digestive tract.

次に、本実施の形態における各種変形例を説明する。
上述した例では、噴門部の判定のために、R画像データだけが読み出されるが、さらに、G画像データ若しくはB画像データ、またはG画像データ及びB画像データを読み出し、2つ以上の画像データについて暗部画素の2値化処理を行い、2つの以上の画像データにおける暗部画素の形状が円形状であるときに、噴門部を検出したと判定するようにしてもよい。
Next, various modifications of the present embodiment will be described.
In the above-described example, only the R image data is read for determination of the cardia, but further, G image data or B image data, or G image data and B image data are read, and two or more image data are read. You may make it determine with having detected the cardia part when the dark part pixel binarization process is performed and the shape of the dark part pixel in two or more image data is circular.

また、第2の変形例として、上述した図17においては、各フレームの画像に基づいて、噴門部の検出を行っているが、連続する複数の画像、あるいは連続する複数の画像の中の所定の割合(例えば80%)以上において、暗部画素の形状が円形状である場合に、噴門部を検出したと判定するようにしてもよい。   Further, as a second modification, in FIG. 17 described above, the cardia portion is detected based on the image of each frame, but a predetermined number of continuous images or a predetermined number of continuous images are included. It may be determined that the cardia portion is detected when the dark portion pixel has a circular shape at a ratio (for example, 80%) or more.

第3の変形例として、以上の説明は、連続する複数の画像に対して、処理を行っているが、図17の処理は、1枚の画像に対して行うようにしてもよい。   As a third modification, the above description has been performed on a plurality of continuous images, but the processing in FIG. 17 may be performed on a single image.

以上のように、本実施の形態によれば、画像中の開いた噴門部の形状に基づいて噴門部の検出をすることができる。   As described above, according to the present embodiment, the cardia part can be detected based on the shape of the cardia part that is open in the image.

なお、本実施の形態においては、算出した特徴量に対する閾値処理の適用により、開いた噴門部の検出をしたが、例えば、公知の線形判別関数等の識別関数を用いて、その検出を行うようにしてもよい。また、他の実施の形態における特徴量を組み合わせて使用してもよい。   In the present embodiment, an open cardia portion is detected by applying threshold processing to the calculated feature amount. For example, a detection function such as a known linear discriminant function is used to detect the cardia portion. It may be. Moreover, you may use combining the feature-value in other embodiment.

(第5の実施の形態)
次に、本発明の第5の実施の形態に係るカプセル型内視鏡装置を利用した噴門検出装置及びその方法について、図面を用いて説明する。本実施の形態では、形状に基づいて開いた噴門部を検出する際に、暗部領域の境界検出と、第4の実施の形態において説明したエッジ検出の両方を利用して、撮像して得られた画像に開いた噴門部が有るか否かの判定を行うようにしたことが特徴である。本実施の形態において画像処理の対象となる内視鏡画像は、第1の実施の形態と同様に、カプセル型内視鏡装置1によって得られた連続した一連の内視鏡画像であるので、管腔画像処理装置である噴門検出装置の構成は、第1の実施の形態と同様であるので、説明は省略する。
(Fifth embodiment)
Next, a cardia detection apparatus and method using a capsule endoscope apparatus according to a fifth embodiment of the present invention will be described with reference to the drawings. In the present embodiment, when detecting the cardia portion that is open based on the shape, it is obtained by imaging using both the boundary detection of the dark region and the edge detection described in the fourth embodiment. This is characterized in that it is determined whether or not there is an open cardia part in the image. Since the endoscopic image to be image-processed in the present embodiment is a continuous series of endoscopic images obtained by the capsule endoscope apparatus 1 as in the first embodiment, Since the structure of the cardia detection apparatus which is a lumen image processing apparatus is the same as that of the first embodiment, description thereof is omitted.

図20は、得られた一連の内視鏡画像に基づいて、噴門部の検出を行う処理の流れの例を示すフローチャートである。被検者の口から入ってから撮像されて得られた一連の内視鏡画像は、複数のフレームからなり、各フレームについて図20の処理が実行される。なお、各内視鏡画像の画像データは、図20の処理がされる前に、逆ガンマ補正、ノイズ除去等の前処理がされているものである。   FIG. 20 is a flowchart illustrating an example of a flow of processing for detecting a cardia portion based on a series of obtained endoscopic images. A series of endoscopic images obtained by imaging after entering through the mouth of the subject is composed of a plurality of frames, and the processing of FIG. 20 is executed for each frame. Note that the image data of each endoscopic image has been subjected to preprocessing such as inverse gamma correction and noise removal before the processing of FIG.

図20の処理を施したい一連の画像の中における最初のフレームから処理するために、まず、フレーム番号iを1にする(ステップS81)。iは1からnの整数である。   In order to process from the first frame in a series of images to be processed in FIG. 20, first, the frame number i is set to 1 (step S81). i is an integer from 1 to n.

次に、フレーム番号iの画像FiのR画像データを、端末装置7の記憶装置(図示せず)から読み出す(ステップS82)。画像Fiは、RGBの3つのプレーンからなるが、ここでは、R画像データのみが読み出される。   Next, R image data of the image Fi of the frame number i is read from a storage device (not shown) of the terminal device 7 (step S82). The image Fi is composed of three RGB planes, but only R image data is read here.

読み出した画像FiのR画像データの全画素について、暗部画素の2値化処理を施す(ステップS83)。具体的には、各画素の画素値について、所定の閾値Th2と比較して2値化処理を施し、暗部画素を1とし、それ以外の画素を0(ゼロ)とする。jを、各フレームの画像データにおいて画素を特定するための番号とすれば、各画素の値rjが、閾値Th2を下回るか否かをチェックすることにより、閾値Th2を下回った画素を1とし、それ以外の画素を0(ゼロ)とする。   The dark portion pixel binarization process is performed on all the pixels of the read R image data of the image Fi (step S83). Specifically, the pixel value of each pixel is binarized by comparison with a predetermined threshold Th2, and the dark pixel is set to 1 and the other pixels are set to 0 (zero). If j is a number for specifying a pixel in the image data of each frame, by checking whether the value rj of each pixel is lower than the threshold Th2, a pixel that is lower than the threshold Th2 is set to 1. The other pixels are set to 0 (zero).

次に、抽出した暗部領域の境界を抽出、言い換えると辺縁を抽出する境界抽出処理を行う(ステップS84)。境界抽出処理は、例えば、値が1の画素(暗部画素)を注目画素として、その注目画素を中心とするサイズ3×3のマスク領域を設定し、マスク領域内の8つの画素に1つでも値が0(ゼロ)の画素があるときには、その注目画素を境界画素として、値を1とする処理である。ステップS84が、各画像Fiについての暗部画素の境界を抽出する暗部境界抽出工程あるいは暗部境界抽出手段を構成する。この境界抽出処理を、すべての暗部画素について施す。図21は、抽出された境界の画像を示す図である。図21の画像31Cにおいて、境界抽出をすると、開いた噴門部の境界に沿った略円形の形状32Cが生成される。   Next, a boundary extraction process is performed to extract the boundary of the extracted dark area, in other words, to extract the edge (step S84). In the boundary extraction process, for example, a pixel having a value of 1 (dark pixel) is set as a target pixel, a 3 × 3 size mask area is set around the target pixel, and one of the eight pixels in the mask area is set. When there is a pixel having a value of 0 (zero), the target pixel is set as a boundary pixel and the value is set to 1. Step S84 constitutes a dark part boundary extracting step or dark part boundary extracting means for extracting a dark part pixel boundary for each image Fi. This boundary extraction process is performed for all dark pixels. FIG. 21 is a diagram illustrating an image of the extracted boundary. In the image 31C of FIG. 21, when boundary extraction is performed, a substantially circular shape 32C along the boundary of the open cardia portion is generated.

次に、読み出した画像FiのR画像データに対してバンドパスフィルタリング処理を施す(ステップS85)。バンドパスフィルタリングは、第4の実施の形態において説明したように、公知のディジタルフィルタを用いた畳み込み処理により、又はフーリエ面上において適用する。   Next, a band pass filtering process is performed on the read R image data of the image Fi (step S85). As described in the fourth embodiment, the bandpass filtering is applied by a convolution process using a known digital filter or on the Fourier plane.

ここでも、バンドパスフィルタの特性は、例えば、上述した図18に示すような特性を有し、血管等の微細なエッジ成分の影響を受け難くするために、若干低周波数帯域において通過成分が多い特性である。   Also here, the characteristics of the band pass filter have, for example, the characteristics as shown in FIG. 18 described above, and in order to make it less susceptible to fine edge components such as blood vessels, there are many pass components in a slightly low frequency band. It is a characteristic.

次に、バンドパスフィルタリング処理の処理結果画像に対して、閾値を用いてエッジ成分の2値化処理を施す(ステップS86)。この2値化処理も、第4の実施の形態で説明したように、例えば、所定の閾値Th3よりも大きな変動を有するエッジ成分を抽出する。エッジ成分として抽出された画素を1とし、それ以外の画素を0(ゼロ)とする。jを、各フレームの画像データにおいて画素を特定するための番号とすれば、各画素のエッジ成分が、閾値Th3を超えるか否かをチェックすることにより、閾値Th3を上回った画素rjを1とし、それ以外の画素を0(ゼロ)とする。上述したように画像に噴門部が含まれる場合、その画像は急峻な明暗変化を有するため、閾値Th3を高めに設定することによって、他のエッジ成分、例えば粘膜の変形による皺などが除外できる。なお、暗部境界の検出のずれの影響を受け難くするために、抽出された画素に対して膨張処理を施してもよい。   Next, edge component binarization processing is performed on the processing result image of the bandpass filtering processing using a threshold value (step S86). Also in this binarization processing, as described in the fourth embodiment, for example, an edge component having a fluctuation larger than a predetermined threshold Th3 is extracted. The pixel extracted as the edge component is set to 1, and the other pixels are set to 0 (zero). If j is a number for specifying a pixel in the image data of each frame, the pixel rj exceeding the threshold Th3 is set to 1 by checking whether the edge component of each pixel exceeds the threshold Th3. Other pixels are set to 0 (zero). As described above, when the cardia portion is included in the image, the image has a steep change in brightness. Therefore, by setting the threshold Th3 to a higher value, other edge components such as wrinkles due to deformation of the mucous membrane can be excluded. In addition, in order to make it difficult to be affected by the shift in detection of the dark part boundary, an expansion process may be performed on the extracted pixel.

そして、ステップS84で抽出された境界画素と、ステップS86でエッジ成分として抽出されたエッジ成分抽出画素との一致度を算出する(ステップS87)。具体的には、例えば、抽出された境界画素ek1(k1=1,2,3,・・,K。Kは、境界画素として検出された画素の総数。)のそれぞれについて、画像上の同じ座標の画素が、エッジ成分画素としても抽出されているか否かを判定し、境界画素ek1であってエッジ成分画素としても抽出されている画素の個数n1をカウントする。その判定は、例えば、境界画素ek1と画像上の同じ座標の画素のエッジ成分との論理積(AND)をとることによって行われる。そして、境界画素の総数Kに対する、その個数n1の割合(n1/K)を算出する。   Then, the degree of coincidence between the boundary pixel extracted in step S84 and the edge component extraction pixel extracted as the edge component in step S86 is calculated (step S87). Specifically, for example, for each of the extracted boundary pixels ek1 (k1 = 1, 2, 3,..., K, K is the total number of pixels detected as boundary pixels), the same coordinates on the image It is determined whether or not these pixels are also extracted as edge component pixels, and the number n1 of pixels that are boundary pixels ek1 and also extracted as edge component pixels is counted. The determination is performed, for example, by taking a logical product (AND) of the boundary pixel ek1 and the edge component of the pixel having the same coordinate on the image. Then, the ratio (n1 / K) of the number n1 to the total number K of boundary pixels is calculated.

次に、境界画素とエッジ成分抽出画素との一致度を示す割合(n1/K)に基づいて、画像が噴門部を含むか否かの判断を行う(ステップ88)。図22は、処理対象の画像に対して、所定のバンドパスフィルタリング及び2値化の処理を施した結果の画像の例を示す図である。開いた噴門部は略円形の形状32Bを有しているが、図22は、一部に円の途切れがある。このような場合に、図21の暗部領域の境界部分と図22のエッジ部分との比率が算出され、噴門であるか否かの判定が行われる。   Next, based on the ratio (n1 / K) indicating the degree of coincidence between the boundary pixel and the edge component extraction pixel, it is determined whether or not the image includes a cardia portion (step 88). FIG. 22 is a diagram illustrating an example of an image obtained as a result of performing predetermined bandpass filtering and binarization processing on an image to be processed. The opened cardia part has a substantially circular shape 32B, but in FIG. In such a case, the ratio between the boundary portion of the dark area in FIG. 21 and the edge portion in FIG. 22 is calculated, and it is determined whether or not it is a cardia.

噴門判定処理の結果に基づいて、噴門である場合は、ステップS88でYESとなり、噴門部が検出されたと判定し(ステップS89)、処理は終了する。具体的には、割合(n1/K)が、所定の閾値theを超えていると、ステップS88でYESとなって、噴門と判定し(ステップS89)、処理は終了する。   Based on the result of the cardia determination process, if it is a cardia, YES is determined in step S88, it is determined that a cardia part has been detected (step S89), and the process ends. Specifically, when the ratio (n1 / K) exceeds a predetermined threshold the, “YES” is determined in step S88, the cardia is determined (step S89), and the process ends.

ステップS88でNOの場合、すなわち、割合(n1/K)が、所定の閾値theを超えていない場合は非噴門と判定し(ステップS90)、図20の処理を施したい一連の画像の全てについて図20の処理が終了したか否かを判定し(ステップS91)、全て終了しているときは、ステップS91でYESとなり、処理は終了する。ステップS91でNOの場合は、未処理の画像が残っているので、i=i+1の処理を行い(ステップS92)、以降、次の画像に対して、ステップS82からS88の処理を繰り返す。ステップS83からS89が消化管の境界部を検出する検出手段を構成する。   If NO in step S88, that is, if the ratio (n1 / K) does not exceed the predetermined threshold value the, it is determined as non-cardia (step S90), and all of a series of images to be processed in FIG. It is determined whether or not the processing of FIG. 20 has been completed (step S91). If all processing has been completed, YES is determined in step S91, and the processing ends. If NO in step S91, since an unprocessed image remains, the process of i = i + 1 is performed (step S92). Thereafter, the processes of steps S82 to S88 are repeated for the next image. Steps S83 to S89 constitute detection means for detecting the boundary portion of the digestive tract.

次に、本実施の形態における各種変形例を説明する。
上述した例では、噴門部の判定のために、R画像データだけが読み出されるが、さらに、G画像データ若しくはB画像データ、またはG画像データ及びB画像データを読み出し、2つ以上の画像データについて暗部画素の2値化処理を行い、2つの以上の画像データにおける一致度が所定の閾値を超えるときに、噴門部を検出したと判定するようにしてもよい。
Next, various modifications of the present embodiment will be described.
In the above-described example, only the R image data is read for determination of the cardia, but further, G image data or B image data, or G image data and B image data are read, and two or more image data are read. You may make it determine with having detected the cardia part, when the binarization process of a dark part pixel is performed and the coincidence degree in two or more image data exceeds a predetermined threshold value.

また、第2の変形例として、上述した図20においては、各フレームの画像に基づいて、噴門部の検出を行っているが、連続する複数の画像、あるいは連続する複数の画像の中の所定の割合(例えば80%)以上において、一致度が所定の閾値を超える場合に、噴門部を検出したと判定するようにしてもよい。   Further, as a second modification, in FIG. 20 described above, the cardia portion is detected based on the image of each frame, but a predetermined number of continuous images or a predetermined number of continuous images are included. If the degree of coincidence exceeds a predetermined threshold at a ratio of 80% or more (for example, 80%), it may be determined that the cardia portion has been detected.

第3の変形例として、以上の説明は、連続する複数の画像に対して、処理を行っているが、図20の処理は、1枚の画像に対して行うようにしてもよい。   As a third modification, the above description has been performed on a plurality of continuous images, but the process of FIG. 20 may be performed on a single image.

本実施の形態によれば、暗部として抽出された領域が大きなエッジを伴っているか否かの判断を行うので、噴門判定を高精度に行うことができる。
また、噴門部が円形に開いていない状態にある場合、あるいは、カプセル型内視鏡3から噴門までの距離が遠く、噴門部が遠景像である場合においても、噴門判定を高精度に行うことができる。
なお、本実施の形態においては、算出した特徴量に対する閾値処理の適用により、開いた噴門部の検出をしたが、例えば、公知の線形判別関数等の識別関数を用いて、その検出を行うようにしてもよい。また、他の実施の形態における特徴量を組み合わせて使用してもよい。
According to the present embodiment, since it is determined whether or not the region extracted as the dark portion has a large edge, the cardia determination can be performed with high accuracy.
Also, the cardia determination can be performed with high accuracy even when the cardia is not opened in a circular shape or when the distance from the capsule endoscope 3 to the cardia is long and the cardia is a distant view image. Can do.
In the present embodiment, an open cardia portion is detected by applying threshold processing to the calculated feature amount. For example, a detection function such as a known linear discriminant function is used to detect the cardia portion. It may be. Moreover, you may use combining the feature-value in other embodiment.

(第6の実施の形態)
次に、本発明の第6の実施の形態に係るカプセル型内視鏡装置を利用した噴門検出装置及びその方法について、図面を用いて説明する。本実施の形態では、形状に基づいて噴門部を検出する際に、暗部領域の重心検出と、第4の実施の形態において説明したエッジ検出の両方を利用して、撮像して得られた画像に、開いた噴門部が有るか否かの判定を行うようにしたことが特徴である。本実施の形態において画像処理の対象となる内視鏡画像は、第1の実施の形態と同様に、カプセル型内視鏡装置1によって得られた連続した一連の内視鏡画像であるので、管腔画像処理装置である噴門検出装置の構成は、第1の実施の形態と同様であるので、説明は省略する。
(Sixth embodiment)
Next, a cardia detection apparatus and method using a capsule endoscope apparatus according to a sixth embodiment of the present invention will be described with reference to the drawings. In the present embodiment, when detecting the cardia portion based on the shape, an image obtained by imaging using both the gravity center detection of the dark region and the edge detection described in the fourth embodiment. In addition, it is characterized in that it is determined whether or not there is an open cardia part. Since the endoscopic image to be image-processed in the present embodiment is a continuous series of endoscopic images obtained by the capsule endoscope apparatus 1 as in the first embodiment, Since the structure of the cardia detection apparatus which is a lumen image processing apparatus is the same as that of the first embodiment, description thereof is omitted.

なお、第5の実施の形態と同様の処理ステップについては、同様のステップ番号を付して、説明は簡略化する。
図23は、得られた一連の内視鏡画像に基づいて、噴門部の検出を行う処理の流れの例を示すフローチャートである。なお、図23において、第5の実施の形態と同様の処理ステップについては、同様のステップ番号を付して、説明は簡略化する。
Note that the same processing steps as those in the fifth embodiment are denoted by the same step numbers, and the description will be simplified.
FIG. 23 is a flowchart illustrating an example of a flow of processing for detecting a cardia portion based on a series of obtained endoscopic images. In FIG. 23, processing steps similar to those of the fifth embodiment are denoted by the same step numbers, and the description is simplified.

被検者の口から入ってから撮像されて得られた一連の内視鏡画像は、複数のフレームからなり、各フレームについて図23の処理が実行される。なお、各内視鏡画像の画像データは、図23の処理がされる前に、逆ガンマ補正、ノイズ除去等の前処理がされているものである。   A series of endoscopic images obtained by imaging after entering through the mouth of the subject is composed of a plurality of frames, and the processing of FIG. 23 is executed for each frame. Note that the image data of each endoscopic image has been subjected to preprocessing such as inverse gamma correction and noise removal before the processing of FIG. 23 is performed.

図23の処理を施したい一連の画像の中における最初のフレームから処理するために、まず、フレーム番号iを1にする(ステップS81)。iは1からnの整数である。   In order to process from the first frame in a series of images to be processed in FIG. 23, first, the frame number i is set to 1 (step S81). i is an integer from 1 to n.

次に、フレーム番号iの画像FiのR画像データを、端末装置7の記憶装置(図示せず)から読み出す(ステップS82)。   Next, R image data of the image Fi of the frame number i is read from a storage device (not shown) of the terminal device 7 (step S82).

読み出した画像FiのR画像データの全画素について、暗部画素の2値化処理を施す(ステップS83)。具体的には、各画素の画素値について、所定の閾値Th2と比較して2値化処理を施し、暗部画素を1とし、それ以外の画素を0(ゼロ)とする。jを、各フレームの画像データにおいて画素を特定するための番号とすれば、各画素の値rjが、閾値Th2を下回るか否かをチェックすることにより、閾値Th2を下回った画素を1とし、それ以外の画素を0(ゼロ)とする。   The dark portion pixel binarization process is performed on all the pixels of the read R image data of the image Fi (step S83). Specifically, the pixel value of each pixel is binarized by comparison with a predetermined threshold Th2, and the dark pixel is set to 1 and the other pixels are set to 0 (zero). If j is a number for specifying a pixel in the image data of each frame, by checking whether the value rj of each pixel is lower than the threshold Th2, a pixel that is lower than the threshold Th2 is set to 1. The other pixels are set to 0 (zero).

次に、2値化処理によって検出された暗部領域の座標データに基づいて、暗部領域の重心座標を算出する(ステップS101)。ステップS101が、画像Fiについての暗部領域の重心座標を算出する暗部領域重心座標算出工程あるいは暗部領域重心座標算出手段を構成する。図24は、暗部領域重心座標算出処理によって算出された重心位置を示す図である。図24の画像31Eにおいて、略円形の形状である開いた噴門部の暗部領域32Eの重心32Ecが、算出された重心座標の位置に示されている。   Next, based on the coordinate data of the dark area detected by the binarization processing, the barycentric coordinates of the dark area are calculated (step S101). Step S101 constitutes a dark area centroid coordinate calculating step or dark area centroid coordinate calculating means for calculating the centroid coordinates of the dark area for the image Fi. FIG. 24 is a diagram illustrating the centroid position calculated by the dark area centroid coordinate calculation process. In the image 31E of FIG. 24, the center of gravity 32Ec of the dark part region 32E of the open cardia part having a substantially circular shape is shown at the position of the calculated center of gravity coordinates.

次に、第5の実施の形態で説明したように、読み出した画像FiのR画像データに対してバンドパスフィルタリング処理を施し(ステップS85)、さらに、バンドパスフィルタリング処理の処理結果画像に対して、閾値を用いてエッジ成分の2値化処理を施す(ステップS86)。   Next, as described in the fifth embodiment, a bandpass filtering process is performed on the read R image data of the image Fi (step S85), and the bandpass filtering process result image is further processed. The edge component is binarized using the threshold (step S86).

そして、ステップS86で抽出されたエッジ成分の画素が、暗部領域を囲むように存在しているか否かを判定する全周性の評価が行われる(ステップS107)。具体的には、図25に示すように、算出された重心座標32Ecから放射状の所定の方向において、抽出されたエッジ成分画素を透過するか否かのチェックが行われる。図25は、全周性の評価を説明するための図である。図25に示す例では、重心座標32Ecから延びる放射状の複数の線32Edにおいて、エッジ成分画素と交差する線分の数(以下、交差数という)m2をカウントすると、8方向中において32Ed線は7つのエッジ成分と交差あるいは透過しているので、交差数m2は7である。   Then, an evaluation of the entire circumference is performed to determine whether or not the edge component pixels extracted in step S86 exist so as to surround the dark area (step S107). Specifically, as shown in FIG. 25, it is checked whether or not the extracted edge component pixel is transmitted in a predetermined radial direction from the calculated barycentric coordinates 32Ec. FIG. 25 is a diagram for explaining the evaluation of the entire circumference. In the example shown in FIG. 25, when the number m2 of line segments intersecting the edge component pixels (hereinafter referred to as the number of intersections) m2 is counted in a plurality of radial lines 32Ed extending from the barycentric coordinates 32Ec, the 32Ed lines are 7 in 8 directions. The intersection number m2 is 7 because it intersects or is transmitted through two edge components.

次に、交差数m2に基づいて、画像が噴門部を含むか否かの判断を行う(ステップ88)。図25に示すように、エッジ成分画素の描く円の一部に途切れがあっても、複数の線32Edの数m3に対する交差数m2の割合(m2/m3)が、所定の閾値Thmを超えるときには、画像は噴門部を含むと判定する。言い換えると、図24の暗部領域の重心位置から放射状に延びた複数の線分が、図25のエッジ成分画素との交差する割合(m2/m3)に基づいて、噴門であるか否かの判定が行われる。   Next, based on the intersection number m2, it is determined whether or not the image includes a cardia part (step 88). As shown in FIG. 25, when the ratio of the number of intersections m2 to the number m3 of the plurality of lines 32Ed (m2 / m3) exceeds a predetermined threshold Thm even if there is a break in a part of the circle drawn by the edge component pixels. The image is determined to include the cardia. In other words, whether or not a plurality of line segments extending radially from the center of gravity of the dark area in FIG. 24 intersect with the edge component pixels in FIG. 25 (m2 / m3) is a cardia. Is done.

複数の線分32Edの数m3に対する交差数m2の割合が所定の閾値Thmを超える場合は、ステップS88でYESとなり、噴門部が検出されたと判定し(ステップS89)、処理は終了する。具体的には、全周性の評価値を示す割合(m2/m3)が、所定の閾値thm、例えば0.7を超えていると、ステップS88でYESとなって、噴門と判定し(ステップS89)、処理は終了する。   If the ratio of the number of intersections m2 to the number m3 of the plurality of line segments 32Ed exceeds the predetermined threshold Thm, YES is determined in step S88, and it is determined that a cardia part has been detected (step S89), and the process ends. Specifically, when the ratio (m2 / m3) indicating the evaluation value of the entire circumference exceeds a predetermined threshold thm, for example, 0.7, YES is determined in step S88 and the cardia is determined (step S89), the process ends.

ステップS88でNOの場合、すなわち、割合(m2/m3)が、所定の閾値thmを超えていない場合は非噴門と判定し(ステップS90)、図23の処理を施したい一連の画像の全てについて図23の処理が終了したか否かを判定し(ステップS91)、全て終了しているときは、ステップS91でYESとなり、処理は終了する。ステップS91でNOの場合は、未処理の画像が残っているので、i=i+1の処理を行い(ステップS92)、以降、次の画像に対して、図23のステップS82からS88の処理を繰り返す。ステップS83からS89が消化管の境界部を検出する検出手段を構成する。   In the case of NO in step S88, that is, when the ratio (m2 / m3) does not exceed the predetermined threshold thm, it is determined as non-cardia (step S90), and all of a series of images to be processed in FIG. It is determined whether or not the processing of FIG. 23 has been completed (step S91). If all processing has been completed, YES is determined in step S91, and the processing ends. If NO in step S91, since an unprocessed image remains, the process of i = i + 1 is performed (step S92). Thereafter, the processes of steps S82 to S88 in FIG. 23 are repeated for the next image. . Steps S83 to S89 constitute detection means for detecting the boundary portion of the digestive tract.

次に、本実施の形態における各種変形例を説明する。
上述した例では、噴門部の判定のために、R画像データだけが読み出されるが、さらに、G画像データ若しくはB画像データ、またはG画像データ及びB画像データを読み出し、2つ以上の画像データについて暗部画素の2値化処理を行い、2つの以上の画像データにおける全周性の評価値が所定の閾値を超えるときに、噴門部を検出したと判定するようにしてもよい。
Next, various modifications of the present embodiment will be described.
In the above-described example, only the R image data is read for determination of the cardia, but further, G image data or B image data, or G image data and B image data are read, and two or more image data are read. You may make it determine with the cardia part having been detected, when the binarization process of a dark part pixel is performed and the evaluation value of the perimeter in two or more image data exceeds a predetermined threshold value.

また、第2の変形例として、上述した図23においては、各フレームの画像に基づいて、噴門部の検出を行っているが、連続する複数の画像、あるいは連続する複数の画像の中の所定の割合(例えば80%)以上において、全周性の評価値が所定の閾値を超える場合に、噴門部を検出したと判定するようにしてもよい。   Further, as a second modification, in FIG. 23 described above, the cardia portion is detected based on the image of each frame, but a predetermined number of continuous images or a predetermined number of continuous images are included. It may be determined that the cardia portion is detected when the evaluation value of the entire circumference exceeds a predetermined threshold at a ratio (for example, 80%) or more.

第3の変形例として、以上の説明は、連続する複数の画像に対して、処理を行っているが、図23の処理は、1枚の画像に対して行うようにしてもよい。   As a third modification, the above description has been performed on a plurality of continuous images, but the processing in FIG. 23 may be performed on one image.

第4の変形例として、全周性の評価を、所定の複数の領域内において、いくつの領域、あるいはどれぐらいの割合の領域においてエッジ成分画像が存在するかに基づいて行うようにしてもよい。図26は、第4の変形例に係わる全周性の評価を領域の割合に基づいて行うことを説明するための図である。例えば、図26に示すように、求めた重心32Ecを中心として、例えば8つの領域、0度から45度、45度から90度、90度から135度、135度から180度、180度から225度、225度から270度、270度から315度、315度から360の8つに分割する。そして、その各領域に、ステップS86で得られたエッジ成分画素が含まれるか否かを判定し、エッジ成分画素32Gが含まれている領域数が、所定の閾値以上であるときには、噴門部を検出したと判定してもよい。図26においては、斜線で示す6つの領域にエッジ成分画素が存在することを示している。閾値が6であれば、図26の場合は、噴門部を検出した判定される。   As a fourth modified example, the evaluation of the entire circumference may be performed based on how many areas or how much area the edge component image exists in a predetermined plurality of areas. . FIG. 26 is a diagram for explaining that the evaluation of the entire circumference according to the fourth modification is performed based on the ratio of regions. For example, as shown in FIG. 26, with the obtained center of gravity 32Ec as the center, for example, eight regions, 0 to 45 degrees, 45 to 90 degrees, 90 to 135 degrees, 135 to 180 degrees, 180 to 225 Divide into 8 degrees, 225 degrees to 270 degrees, 270 degrees to 315 degrees, and 315 degrees to 360 degrees. Then, it is determined whether or not the edge component pixels obtained in step S86 are included in each of the regions. When the number of regions including the edge component pixels 32G is equal to or greater than a predetermined threshold, the cardia portion is displayed. You may determine with having detected. In FIG. 26, it is shown that edge component pixels exist in six regions indicated by diagonal lines. If the threshold is 6, in the case of FIG. 26, it is determined that the cardia portion has been detected.

さらに、領域数ではなく、エッジ成分画素が存在する角度範囲に基づいて、噴門部を検出したと判定してもよい。例えば、図27に示すように、重心32Ecの周りに、エッジ成分画素が存在する角度範囲θを求め、その角度範囲θが所定の閾値、例えば270度以上か否かによって、噴門部を検出したと判定するようにしてもよい。図27は、さらに、全周性の評価を角度範囲に基づいて行うことを説明するための図である。なお、複数のエッジ成分画素の線が存在するときは、最大角度範囲のエッジ成分画素について、所定の閾値と比較して噴門部を検出したと判定するようにしてもよい。   Furthermore, it may be determined that the cardia portion is detected based on the angle range in which the edge component pixels exist instead of the number of regions. For example, as shown in FIG. 27, an angular range θ in which edge component pixels exist is obtained around the center of gravity 32Ec, and the cardia portion is detected based on whether or not the angular range θ is a predetermined threshold, for example, 270 degrees or more. May be determined. FIG. 27 is a diagram for explaining that the evaluation of the entire circumference is further performed based on the angle range. When there are a plurality of edge component pixel lines, the edge component pixels in the maximum angle range may be determined to be detected by comparing with a predetermined threshold value.

以上のように、暗部領域の2値化処理においては閾値Th2に応じて境界の位置は変動するが、本実施の形態によれば、そのような境界位置の変動があっても、そのような変動の影響を受けないで、噴門判定を高精度に行うことができる。
また、噴門部が円形に開いていない状態にある場合、あるいは、カプセル型内視鏡3から噴門までの距離が遠く、噴門部が遠景像である場合においても、噴門判定を高精度に行うことができる。
なお、本実施の形態においては、算出した特徴量に対する閾値処理の適用により、開いた噴門部の検出をしたが、例えば、公知の線形判別関数等の識別関数を用いて、その検出を行うようにしてもよい。また、他の実施の形態における特徴量を組み合わせて使用してもよい。
As described above, in the binarization processing of the dark area, the boundary position varies according to the threshold Th2, but according to the present embodiment, even if such a boundary position variation occurs, Cardiac determination can be performed with high accuracy without being affected by fluctuations.
Also, the cardia determination can be performed with high accuracy even when the cardia is not opened in a circular shape or when the distance from the capsule endoscope 3 to the cardia is long and the cardia is a distant view image. Can do.
In the present embodiment, an open cardia portion is detected by applying threshold processing to the calculated feature amount. For example, a detection function such as a known linear discriminant function is used to detect the cardia portion. It may be. Moreover, you may use combining the feature-value in other embodiment.

(第7の実施の形態)
次に、本発明の第7の実施の形態に係るカプセル型内視鏡装置を利用した噴門検出装置及びその方法について、図面を用いて説明する。本実施の形態において画像処理の対象となる内視鏡画像は、第1の実施の形態と同様に、カプセル型内視鏡装置1によって得られた連続した一連の内視鏡画像であるので、管腔画像処理装置である噴門検出装置の構成は、第1の実施の形態と同様であるので、説明は省略する。
(Seventh embodiment)
Next, a cardia detection apparatus and method using a capsule endoscope apparatus according to a seventh embodiment of the present invention will be described with reference to the drawings. Since the endoscopic image to be image-processed in the present embodiment is a continuous series of endoscopic images obtained by the capsule endoscope apparatus 1 as in the first embodiment, Since the structure of the cardia detection apparatus which is a lumen image processing apparatus is the same as that of the first embodiment, description thereof is omitted.

上述した第3の実施の形態から第6の実施の形態においては、開いた状態の噴門部を検出する場合であるが、噴門部は閉じている状態のときもある。本実施の形態に係る噴門検出装置は、閉じた状態の噴門部を検出することによって、各画像が、食道から胃に向かうカプセル型内視鏡が噴門部の手前の近傍にある等のときの画像であるか否かの判定を行うようにした点に特徴がある。   In the third to sixth embodiments described above, the cardia part in the open state is detected, but the cardia part may be in a closed state. The cardia detecting device according to the present embodiment detects the cardia portion in a closed state, so that each image is when the capsule endoscope from the esophagus to the stomach is in the vicinity of the front of the cardia portion, etc. It is characterized in that it is determined whether or not it is an image.

図28は、カプセル型内視鏡3が閉じている噴門部の手前にある場合の画像の例を示す図である。
カプセル型内視鏡3が管腔内において、閉じた噴門部を撮像した場合、噴門部が閉じていることから、撮像して得られた画像には明確な暗部領域が存在せず、さらに食道の末端で噴門部の周辺を正面視することから画面内の明るさが比較的均一な状態である。本実施の形態は、閉じた噴門部領域の面積が所定の大きさ未満であるときに、閉じた噴門部を検出したという判定を行う。
FIG. 28 is a diagram illustrating an example of an image in the case where the capsule endoscope 3 is in front of the cardia part where the capsule endoscope 3 is closed.
When the capsule endoscope 3 images a closed cardia part in the lumen, since the cardia part is closed, there is no clear dark region in the image obtained by imaging, and further, the esophagus Since the periphery of the cardia is viewed from the front at the end of the screen, the brightness in the screen is relatively uniform. In the present embodiment, when the area of the closed cardia part region is less than a predetermined size, it is determined that the closed cardia part has been detected.

図29は、得られた一連の内視鏡画像に基づいて、閉じた噴門部の検出を行う処理の流れの例を示すフローチャートである。被検者の口から入ってから撮像されて得られた一連の内視鏡画像は、複数のフレームからなり、各フレームについて図29の処理が実行される。なお、各内視鏡画像の画像データは、図29の処理がされる前に、逆ガンマ補正、ノイズ除去等の前処理がされているものである。また、図29の処理は、図15の処理と同様の処理ステップを含むため、図15と同様の処理については同様のステップ番号を付し、説明は簡略化する。   FIG. 29 is a flowchart illustrating an example of a flow of processing for detecting a closed cardia portion based on a series of obtained endoscopic images. A series of endoscopic images obtained by being picked up after entering from the mouth of the subject consists of a plurality of frames, and the processing of FIG. 29 is executed for each frame. Note that image data of each endoscopic image has been subjected to preprocessing such as inverse gamma correction and noise removal before the processing of FIG. 29 is performed. 29 includes the same processing steps as the processing of FIG. 15, the processing similar to that of FIG. 15 is denoted by the same step number, and the description is simplified.

図29の処理を施したい一連の画像の中における最初のフレームから処理するために、まず、フレーム番号iを1にする(ステップS61)。iは1からnの整数である。   In order to process from the first frame in a series of images to be processed in FIG. 29, first, the frame number i is set to 1 (step S61). i is an integer from 1 to n.

次に、フレーム番号iの画像FiのR画像データを、端末装置7の記憶装置(図示せず)から読み出す(ステップS62)。画像Fiは、RGBの3つのプレーンからなるが、ここでは、R画像データのみが読み出される。   Next, R image data of the image Fi of the frame number i is read from a storage device (not shown) of the terminal device 7 (step S62). The image Fi is composed of three RGB planes, but only R image data is read here.

なお、ここでは、後述する噴門部の判定のために、R画像データが読み出されるが、画像FiのG画像データ、あるいはB画像データを用いてもよい。   Here, the R image data is read for determination of the cardia described later, but G image data or B image data of the image Fi may be used.

読み出した画像FiのR画像データの全画素について、暗部画素の2値化処理を施す(ステップS63)。具体的には、各画素の画素値について、所定の閾値Th2と比較して2値化処理を施し、暗部画素を1とし、それ以外の画素を0(ゼロ)とする。jを、各フレームの画像データにおいて画素を特定するための番号とすれば、各画素の値rjが、閾値Th2を下回るか否かをチェックすることにより、閾値Th2を下回った画素を1とし、それ以外の画素を0(ゼロ)とする。   The dark portion pixel binarization process is performed on all the pixels of the read R image data of the image Fi (step S63). Specifically, the pixel value of each pixel is binarized by comparison with a predetermined threshold Th2, and the dark pixel is set to 1 and the other pixels are set to 0 (zero). If j is a number for specifying a pixel in the image data of each frame, by checking whether the value rj of each pixel is lower than the threshold Th2, a pixel that is lower than the threshold Th2 is set to 1. The other pixels are set to 0 (zero).

次に、暗部画素の複数の領域をラベリング処理により、ラベリングを行い、その中で最大面積Dの暗部領域を特定する(ステップS114)。ステップS114が、各画像Fiについての最大面積Dの暗部領域を特定する最大暗部領域特定工程あるいは最大暗部領域特定手段を構成する。図28において、画像32Iにおいて、最大面積Dの暗部領域32Iが示されている。   Next, a plurality of areas of the dark area pixels are labeled by a labeling process, and a dark area of the maximum area D is specified among them (step S114). Step S114 constitutes a maximum dark area specifying step or maximum dark area specifying means for specifying the dark area of the maximum area D for each image Fi. In FIG. 28, the dark area 32I having the maximum area D is shown in the image 32I.

そして、最大面積Dが、所定の閾値Thd1未満であるか否かを判断する(ステップS115)。閾値Thd1は例えば0.1である。   Then, it is determined whether or not the maximum area D is less than a predetermined threshold Thd1 (step S115). The threshold value Thd1 is 0.1, for example.

ステップS115でYESの場合、すなわち、画像全体の10%未満の暗部がある場合は、噴門部が検出されたと判定し(ステップS66)、処理は終了する。   If YES in step S115, that is, if there is a dark part of less than 10% of the entire image, it is determined that a cardia part has been detected (step S66), and the process ends.

ステップS115でNOの場合、すなわち、暗部が画像全体の10%未満でない場合は非噴門と判定し(ステップS67)、図29の処理を施したい一連の画像の全てについて図29の処理が終了したか否かを判定し(ステップS68)、全て終了しているときは、ステップS68でYESとなり、処理は終了する。ステップS68でNOの場合は、未処理の画像が残っているので、i=i+1の処理を行い(ステップS69)、以降、次の画像に対して、ステップS62からS64の処理を繰り返す。   If NO in step S115, that is, if the dark portion is not less than 10% of the entire image, it is determined as a non-cardia (step S67), and the processing of FIG. 29 is completed for all of the series of images to be processed in FIG. (Step S68), and when all the processes are completed, YES is obtained in Step S68, and the process is terminated. If NO in step S68, since an unprocessed image remains, the process of i = i + 1 is performed (step S69). Thereafter, the process of steps S62 to S64 is repeated for the next image.

なお、ステップS66では、最大の暗部領域の面積Dが所定の閾値Thd1未満であるときは、噴門部を検出と判定しているが、言い換えると、画像は、カプセル型内視鏡がその後噴門部を通過しようとしている、あるいは胃内へ到達しようとしているという判定ということもできる。ステップS63からS66が消化管の境界部を検出する検出手段を構成する。   In step S66, when the area D of the maximum dark area is less than the predetermined threshold value Thd1, it is determined that the cardia is detected. In other words, the image is acquired by the capsule endoscope and then the cardia. It can also be determined that the user is trying to pass through the stomach or is about to reach the stomach. Steps S63 to S66 constitute detection means for detecting the boundary portion of the digestive tract.

次に、本実施の形態における各種変形例を説明する。
上述した例では、噴門部の判定のために、R画像データだけが読み出されるが、さらに、G画像データ若しくはB画像データ、またはG画像データ及びB画像データを読み出し、2つ以上の画像データについて暗部画素の2値化処理を行い、2つの以上の画像データにおける最大面積の暗部領域の面積Dが全て所定の閾値Thd1未満のときに、噴門部を検出したと判定するようにしてもよい。
Next, various modifications of the present embodiment will be described.
In the above-described example, only the R image data is read for determination of the cardia, but further, G image data or B image data, or G image data and B image data are read, and two or more image data are read. It is also possible to perform darkening pixel binarization processing and determine that the cardia portion has been detected when the area D of the darkest region of the maximum area in two or more image data is less than the predetermined threshold Thd1.

また、第2の変形例として、上述した図29においては、各フレームの画像に基づいて、噴門部の検出を行っているが、連続する複数の画像が、あるいは連続する複数の画像の中の所定の割合(例えば80%)以上が、ステップS115の判定結果がD<Thd1であった場合に、噴門部を検出したと判定するようにしてもよい。   As a second modification, in FIG. 29 described above, the cardia portion is detected based on the image of each frame. However, a plurality of continuous images or a plurality of continuous images are included. A predetermined ratio (for example, 80%) or more may determine that the cardia portion has been detected when the determination result in step S115 is D <Thd1.

第3の変形例として、以上の説明は、連続する複数の画像に対して、処理を行っているが、図27の処理は、1枚の画像に対して行うようにしてもよい。   As a third modification, the above description has been performed on a plurality of continuous images, but the processing in FIG. 27 may be performed on a single image.

第4の変形例として、上述した最大面積の暗部領域の周辺に、図28に点線で示すような所定の大きさの関心領域(ROI)を設定し、その関心領域(ROI)内の明るさの標準偏差、分散あるいは変動係数分を算出し、その算出された標準偏差等の値が、所定の閾値未満であるか否かによって、閉じた状態の噴門部を検出するようにしてもよい。   As a fourth modification, a region of interest (ROI) having a predetermined size as shown by a dotted line in FIG. 28 is set around the dark area having the maximum area described above, and the brightness within the region of interest (ROI) is set. The standard deviation, variance, or coefficient of variation may be calculated, and the cardia portion in the closed state may be detected depending on whether the calculated standard deviation or the like is less than a predetermined threshold.

以上のように、本実施の形態によれば、画像中の暗部の面積に基づいて閉じた噴門部の検出をすることができる。   As described above, according to the present embodiment, it is possible to detect a closed cardia part based on the area of the dark part in the image.

なお、本実施の形態においては、算出した特徴量に対する閾値処理の適用により、閉じた噴門部の検出をしたが、例えば、公知の線形判別関数等の識別関数を用いて、その検出を行うようにしてもよい。また、他の実施の形態における特徴量を組み合わせて使用してもよい。   In the present embodiment, the closed cardia portion is detected by applying threshold processing to the calculated feature value. For example, the detection is performed using a discriminant function such as a known linear discriminant function. It may be. Moreover, you may use combining the feature-value in other embodiment.

(第8の実施の形態)
次に、本発明の第8の実施の形態に係るカプセル型内視鏡装置を利用した噴門検出装置及びその方法について、図面を用いて説明する。本実施の形態において画像処理の対象となる内視鏡画像は、第1の実施の形態と同様に、カプセル型内視鏡装置1によって得られた連続した一連の内視鏡画像であるので、噴門検出装置の構成は、第1の実施の形態と同様であるので、説明は省略する。
(Eighth embodiment)
Next, a cardia detecting apparatus and method using a capsule endoscope apparatus according to an eighth embodiment of the present invention will be described with reference to the drawings. Since the endoscopic image to be image-processed in the present embodiment is a continuous series of endoscopic images obtained by the capsule endoscope apparatus 1 as in the first embodiment, Since the structure of the cardia detection apparatus is the same as that of the first embodiment, description thereof is omitted.

本実施の形態に係る管腔画像処理装置である噴門検出装置は、閉じた状態の噴門部を検出することによって、各画像が、食道から胃に向かうカプセル型内視鏡が噴門部の手前の近傍にある等のときの画像であるか否かの判定であるか否かの判定を行うようにした点に特徴がある。   The cardia detection device, which is a lumen image processing device according to the present embodiment, detects the cardia portion in a closed state, so that each capsule has a capsule endoscope heading from the esophagus to the stomach before the cardia portion. It is characterized in that it is determined whether or not it is an image when it is in the vicinity.

図30は、得られた一連の内視鏡画像に基づいて、閉じた噴門部の検出を行う処理の流れの例を示すフローチャートである。被検者の口から入ってから撮像されて得られた一連の内視鏡画像は、複数のフレームからなり、各フレームについて図30の処理が実行される。なお、各内視鏡画像の画像データは、図30の処理がされる前に、逆ガンマ補正、ノイズ除去等の前処理がされているものである。   FIG. 30 is a flowchart illustrating an example of a flow of processing for detecting a closed cardia part based on a series of obtained endoscopic images. A series of endoscopic images obtained by imaging after entering through the mouth of the subject consists of a plurality of frames, and the processing of FIG. 30 is executed for each frame. Note that the image data of each endoscopic image is subjected to preprocessing such as inverse gamma correction and noise removal before the processing of FIG. 30 is performed.

図30の処理を施したい一連の画像の中における最初のフレームから処理するために、まず、フレーム番号iを1にする(ステップS121)。iは1からnの整数である。   In order to process from the first frame in a series of images to be processed in FIG. 30, first, the frame number i is set to 1 (step S121). i is an integer from 1 to n.

次に、フレーム番号iの画像FiのR画像データを、端末装置7の記憶装置(図示せず)から読み出す(ステップS122)。画像Fiは、RGBの3つのプレーンからなるが、ここでは、R画像データのみが読み出される。   Next, R image data of the image Fi of the frame number i is read from a storage device (not shown) of the terminal device 7 (step S122). The image Fi is composed of three RGB planes, but only R image data is read here.

なお、ここでは、後述する噴門部の判定のために、R画像データが読み出されるが、画像FiのG画像データ、あるいはB画像データを用いてもよい。   Here, the R image data is read for determination of the cardia described later, but G image data or B image data of the image Fi may be used.

読み出した画像FiのR画像データの全画素について、暗部画素の2値化処理を施す(ステップS123)。具体的には、各画素の画素値について、所定の閾値Th2と比較して2値化処理を施し、暗部画素を1とし、それ以外の画素を0(ゼロ)とする。jを、各フレームの画像データにおいて画素を特定するための番号とすれば、各画素の値rjが、閾値Th2を下回るか否かをチェックすることにより、閾値Th2を下回った画素を1とし、それ以外の画素を0(ゼロ)とする。   Darkening pixel binarization processing is performed on all pixels of the read R image data of the image Fi (step S123). Specifically, the pixel value of each pixel is binarized by comparison with a predetermined threshold Th2, and the dark pixel is set to 1 and the other pixels are set to 0 (zero). If j is a number for specifying a pixel in the image data of each frame, by checking whether the value rj of each pixel is lower than the threshold Th2, a pixel that is lower than the threshold Th2 is set to 1. The other pixels are set to 0 (zero).

次に、2値化処理された画像に対して細線化処理を施す(ステップS124)。図31において、画像31Jにおいて、閉じた噴門部の画像から細線化された噴門形状32Jが示されている。図31は、閉じた噴門部の画像から細線化された噴門形状を説明するための図である。そして、細線化されて生成された各線において、分岐あるいは交差をする点(以下、分岐点という)を算出し(ステップS125)、その分岐点の座標データは、集中度を示すデータとして記憶装置に記憶される。   Next, thinning processing is performed on the binarized image (step S124). In FIG. 31, in the image 31J, the cardia shape 32J thinned from the image of the closed cardia part is shown. FIG. 31 is a view for explaining the cardia shape thinned from the image of the closed cardia part. Then, a branch point or an intersection point (hereinafter referred to as a branch point) is calculated for each line generated by thinning (step S125), and the coordinate data of the branch point is stored in the storage device as data indicating the degree of concentration. Remembered.

次に、算出された分岐点の集中度を算出する(ステップS126)。ステップS126が、各画像Fiについての分岐点の集中度を算出する集中度算出工程あるいは集中度算出手段を構成する。集中度は、例えば、分岐点の座標値の分散値をパラメータとして用いる。   Next, the degree of concentration of the calculated branch point is calculated (step S126). Step S126 constitutes a concentration degree calculating step or concentration degree calculating means for calculating the concentration degree of the branch point for each image Fi. The degree of concentration uses, for example, a variance value of the coordinate values of branch points as a parameter.

図32は、集中度のパラメータである分散値を算出する処理の流れの例を示すフローチャートである。まず、算出された分岐点の座標データを記憶装置から取得する(ステップS141)。例えば、N個の分岐点が算出して得られたとすれば、N個の分岐点のx座標値の分散vxと、y座標値の分散vyをそれぞれ算出する(ステップS142)。N個の分岐点について、それぞれ分散vx、vyを記憶装置に記憶する。   FIG. 32 is a flowchart illustrating an example of a flow of processing for calculating a variance value that is a parameter of the degree of concentration. First, the calculated coordinate data of the branch point is acquired from the storage device (step S141). For example, if N branch points are calculated and obtained, the variance vx of the x coordinate values and the variance vy of the y coordinate values of the N branch points are calculated (step S142). The variances vx and vy are stored in the storage device for N branch points, respectively.

図30に戻って、集中度を示すデータである分散vx、vyが、それぞれ所定の閾値thv1、thv2未満であるかによって、集中度が高いか否かを判定する(ステップS127)。   Returning to FIG. 30, it is determined whether or not the degree of concentration is high depending on whether the variances vx and vy, which are data indicating the degree of concentration, are less than predetermined threshold values thv1 and thv2, respectively (step S127).

ステップS127でYESの場合、すなわち、分散vx、vyが、それぞれ所定の閾値thv1、thv2未満である場合は、噴門部が検出されたと判定し(ステップS128)、処理は終了する。   If YES in step S127, that is, if the variances vx and vy are less than the predetermined thresholds thv1 and thv2, respectively, it is determined that a cardia portion has been detected (step S128), and the process ends.

ステップS127でNOの場合、すなわち、分散vx、vyが、それぞれ所定の閾値thv1、thv2未満でない場合は非噴門と判定し(ステップS129)、図30の処理を施したい一連の画像の全てについて図30の処理が終了したか否かを判定し(ステップS130)、全て終了しているときは、ステップS130でYESとなり、処理は終了する。ステップS130でNOの場合は、未処理の画像が残っているので、i=i+1の処理を行い(ステップS131)、以降、次の画像に対して、ステップS122からS127の処理を繰り返す。ステップS123からS128が消化管の境界部を検出する検出手段を構成する。   In the case of NO in step S127, that is, when the variances vx and vy are not less than the predetermined thresholds thv1 and thv2, respectively, it is determined as non-cardia (step S129), and all the series of images that are desired to be processed in FIG. It is determined whether or not the process of 30 has been completed (step S130). If all the processes have been completed, YES is determined in step S130, and the process ends. In the case of NO in step S130, since an unprocessed image remains, the process of i = i + 1 is performed (step S131). Thereafter, the process of steps S122 to S127 is repeated for the next image. Steps S123 to S128 constitute detection means for detecting the boundary portion of the digestive tract.

図33は、分岐点を説明するための画像の例を示す図である。図33において、閉じた噴門部の場合、画像31Jの線の分岐点33Jは、画像31Jの一部に集中している。その集中の度合いを、上述した分散によって数値化し、例えば上述したような分散値を求め、その度合い、例えば分散値と所定の閾値とを比較することによって、閉じた噴門部が検出されたか否かの判定が行われる。本実施の形態は、閉じた噴門部を細線化したときの分岐点は集中するので、集中しているときは、噴門部を検出したという判定を行う。   FIG. 33 is a diagram illustrating an example of an image for explaining a branch point. In FIG. 33, in the case of the closed cardia, the branch point 33J of the line of the image 31J is concentrated on a part of the image 31J. The degree of concentration is quantified by the above-described dispersion, for example, the dispersion value as described above is obtained, and whether the closed cardia portion is detected by comparing the degree, for example, the dispersion value with a predetermined threshold value. Is determined. In the present embodiment, the branch points when the closed cardia part is thinned are concentrated, so that when it is concentrated, it is determined that the cardia part has been detected.

なお、ステップS128では、分散値が所定の閾値未満のときは、閉じた噴門部を検出と判定しているが、言い換えると、カプセル内視鏡3は、その後噴門部を通過しようとしている、あるいは胃内へ到達しようとしているという判定ということもできる。   In step S128, when the variance value is less than the predetermined threshold, it is determined that the closed cardia is detected. In other words, the capsule endoscope 3 is going to pass through the cardia after that, or It can also be said that it is about to reach the stomach.

次に、本実施の形態における各種変形例を説明する。
上述した例では、噴門部の判定のために、R画像データだけが読み出されるが、さらに、G画像データ若しくはB画像データ、またはG画像データ及びB画像データを読み出し、2つ以上の画像データについて集中度を算出し、2つの以上の画像データにおける集中度に基づいて、閉じた噴門部を検出したと判定するようにしてもよい。
Next, various modifications of the present embodiment will be described.
In the above-described example, only the R image data is read for determination of the cardia, but further, G image data or B image data, or G image data and B image data are read, and two or more image data are read. The degree of concentration may be calculated, and it may be determined that a closed cardia part has been detected based on the degree of concentration in two or more image data.

また、第2の変形例として、上述した図30においては、各フレームの画像に基づいて、噴門部の検出を行っているが、連続する複数の画像が、あるいは連続する複数の画像の中の所定の割合(例えば80%)以上が、ステップS127の判定結果がYESの場合であった場合に、閉じた噴門部を検出したと判定するようにしてもよい。   As a second modification, in FIG. 30 described above, the cardia portion is detected based on the image of each frame. However, a plurality of continuous images or a plurality of continuous images are included. If a predetermined ratio (for example, 80%) or more is a case where the determination result in step S127 is YES, it may be determined that a closed cardia portion has been detected.

第3の変形例として、以上の説明は、連続する複数の画像に対して、処理を行っているが、図30の処理は、1枚の画像に対して行うようにしてもよい。   As a third modification, the above description has been performed on a plurality of continuous images, but the processing in FIG. 30 may be performed on a single image.

なお、本実施の形態においては、算出した特徴量に対する閾値処理の適用により、閉じた噴門部の検出をしたが、例えば、公知の線形判別関数等の識別関数を用いて、その検出を行うようにしてもよい。また、他の実施の形態における特徴量を組み合わせて使用してもよい。   In the present embodiment, the closed cardia portion is detected by applying threshold processing to the calculated feature value. For example, the detection is performed using a discriminant function such as a known linear discriminant function. It may be. Moreover, you may use combining the feature-value in other embodiment.

以上説明した複数の実施の形態のそれぞれによれば、一枚の、あるいは連続した一連の内視鏡画像に基づいて、その画像が、食道・胃接合部を通過した時、噴門部に達しようとしている時等を検出することができるので、大量に撮像された内視鏡画像の中から食道疾患の診断に必要な画像を選択して食道疾患の診断が迅速に行うことができる。   According to each of the plurality of embodiments described above, based on a single or continuous series of endoscopic images, when the image passes through the esophagus / stomach junction, it will reach the cardia. Therefore, it is possible to quickly diagnose an esophageal disease by selecting an image necessary for diagnosing the esophageal disease from a large number of endoscopic images.

従って、以上説明した複数の実施の形態によれば、噴門部の検出ができる管腔画像処理装置を実現することができる。   Therefore, according to the plurality of embodiments described above, a lumen image processing apparatus capable of detecting the cardia portion can be realized.

例えば、Barret食道の判定は、食道・胃接合部の近辺の画像を基づいて行われる。そこで、上述したような噴門部の検出ができれば、その画像のみ、あるいは前後の画像のみを観ながら入念に診断することができるので、診断の迅速化が図れる。   For example, the determination of the Barret esophagus is performed based on an image near the esophagus / gastric junction. Therefore, if the cardia portion as described above can be detected, it is possible to make a careful diagnosis while viewing only the image or only the previous and subsequent images, so that the diagnosis can be speeded up.

以上の説明は、カプセル型内視鏡3を用いて得られた画像を用いた処理の例であるが、通常の内視鏡、すなわち細長い可撓性の挿入部を有する内視鏡により得られた画像に対して上述した処理を行うようにしてもよいことは言うまでもない。カプセル型内視鏡と通常の内視鏡は、共に管腔内の画像を得ることができるからである。   The above description is an example of processing using an image obtained using the capsule endoscope 3, but is obtained by a normal endoscope, that is, an endoscope having an elongated flexible insertion portion. It goes without saying that the above-described processing may be performed on the obtained image. This is because both the capsule endoscope and the normal endoscope can obtain an image in the lumen.

さらに、以上説明した複数の実施の形態に係る手法(変形例を含む)のそれぞれにおいても、噴門部の検出ができるが、複数の手法組み合わせて用いて噴門部の検出をするようにしてもよい。   Furthermore, although each of the methods (including modifications) according to the plurality of embodiments described above can detect the cardia, the cardia may be detected by combining a plurality of methods. .

本発明の第1の実施の形態に係るカプセル型内視鏡装置と、管腔画像処理装置としての端末装置の概略構成を示すブロック図である。1 is a block diagram showing a schematic configuration of a capsule endoscope apparatus according to a first embodiment of the present invention and a terminal apparatus as a lumen image processing apparatus. 本発明の第1の実施の形態に係るカカプセル型内視鏡の概略構造を説明する説明図である。It is explanatory drawing explaining the schematic structure of the capsule type | mold endoscope which concerns on the 1st Embodiment of this invention. 端末装置において実行される食道・胃接合部の通過により噴門部の検出を行う処理の流れの例を示すフローチャートである。It is a flowchart which shows the example of the flow of a process which detects a cardia part by passage of the esophagus and stomach junction part performed in a terminal device. 得られる一連の内視鏡画像における色調の変化を説明するための模式的グラフである。It is a schematic graph for demonstrating the change of the color tone in a series of obtained endoscopic images. 図3のステップS3の処理の流れの例を示すフローチャートである。It is a flowchart which shows the example of the flow of a process of FIG.3 S3. 平均色調特徴量の微分値を算出することによって、平均色調特徴量の変化を検出する処理の流れの例を示すフローチャートである。It is a flowchart which shows the example of the flow of a process which detects the change of an average color tone feature-value by calculating the differential value of an average color tone feature-value. 第1の実施の形態の第7の変形例における、得られる一連の内視鏡画像における色調特徴量の標準偏差あるいは分散の変化を説明するためのグラフである。It is a graph for demonstrating the change of the standard deviation or dispersion | distribution of the color tone feature-value in a series of obtained endoscopic images in the 7th modification of 1st Embodiment. 各フレームの画像において、第1の実施の形態及び変形例における画像処理を行う領域の例を示す図である。It is a figure which shows the example of the area | region which performs the image process in 1st Embodiment and a modification in the image of each frame. 第2の実施の形態に係る、得られる一連の内視鏡画像における明るさの変化、具体的には輝度の変化を説明するための模式的グラフである。It is a schematic graph for demonstrating the change of the brightness in the series of obtained endoscopic images based on 2nd Embodiment, specifically the change of a brightness | luminance. 第2の実施の形態に係る、得られた一連の内視鏡画像に基づいて、端末装置において実行される食道・胃接合部の通過時に噴門部の検出を行う処理の流れの例を示すフローチャートである。The flowchart which shows the example of the flow of a process which detects a cardia part at the time of passage of the esophagus and stomach junction part performed in a terminal device based on the series of obtained endoscopic images based on 2nd Embodiment. It is. 図10のステップS33の処理の流れの例を示すフローチャートである。It is a flowchart which shows the example of the flow of a process of step S33 of FIG. 画像の明るさ情報として、上述したようなRGBの3つの画素値から算出される輝度の代わりに、GあるいはBの画素データを用いた場合における一連の内視鏡画像におけるGあるいはBの画素データの変化を説明するための模式的グラフである。G or B pixel data in a series of endoscopic images when G or B pixel data is used as image brightness information instead of the luminance calculated from the three RGB pixel values as described above. It is a typical graph for explaining change of. 第2の実施の形態に係る、平均輝度値の微分値を算出することによって、明るさの変化を検出する処理の流れの例を示すフローチャートである。It is a flowchart which shows the example of the flow of a process which detects the change of a brightness by calculating the derivative value of an average luminance value based on 2nd Embodiment. 第3の実施の形態に係る、カプセル型内視鏡が開いている噴門部の手前にある場合の画像の例を示す図である。It is a figure which shows the example of an image in case it exists in front of the cardia part which the capsule endoscope based on 3rd Embodiment is open. 第3の実施の形態に係る、得られた一連の内視鏡画像に基づいて、開いた噴門部の検出を行う処理の流れの例を示すフローチャートである。It is a flowchart which shows the example of the flow of a process which detects an open cardia part based on the series of obtained endoscopic images based on 3rd Embodiment. 第4の実施の形態に係る、カプセル型内視鏡が開いている噴門部を通過する場合の画像の例を示す図である。It is a figure which shows the example of the image in the case of passing through the cardia part which the capsule endoscope based on 4th Embodiment is open. 第4の実施の形態に係る、得られた一連の内視鏡画像に基づいて、開いた噴門部の検出を行う処理の流れの例を示すフローチャートである。It is a flowchart which shows the example of the flow of a process which detects an open cardia part based on the series of obtained endoscopic images based on 4th Embodiment. 第4の実施の形態に係る、バンドパスフィルタリング処理におけるフィルタ特性を示す図である。It is a figure which shows the filter characteristic in the band pass filtering process based on 4th Embodiment. 図16の画像に対して、所定のバンドパスフィルタリング及び2値化の処理を施した結果の画像の例を示す図である。It is a figure which shows the example of the image of the result of having performed predetermined band pass filtering and the binarization process with respect to the image of FIG. 第5の実施の形態に係る、得られた一連の内視鏡画像に基づいて、噴門部の検出を行う処理の流れの例を示すフローチャートである。It is a flowchart which shows the example of the flow of a process which detects a cardia part based on the series of obtained endoscopic images based on 5th Embodiment. 第5の実施の形態に係る、抽出された境界の画像を示す図である。It is a figure which shows the image of the extracted boundary based on 5th Embodiment. 第5の実施の形態に係る、処理対象の画像に対して、所定のバンドパスフィルタリング及び2値化の処理を施した結果の画像の例を示す図である。It is a figure which shows the example of the image of the result of having performed predetermined band pass filtering and the binarization process with respect to the image of the process target based on 5th Embodiment. 第6の実施の形態に係る、得られた一連の内視鏡画像に基づいて、噴門部の検出を行う処理の流れの例を示すフローチャートである。It is a flowchart which shows the example of the flow of a process which detects a cardia part based on the series of obtained endoscopic images based on 6th Embodiment. 第6の実施の形態に係る、暗部領域重心座標算出処理によって算出された重心位置を示す図である。It is a figure which shows the gravity center position calculated by the dark part area | region gravity center coordinate calculation process based on 6th Embodiment. 第6の実施の形態に係る、全周性の評価を説明するための図である。It is a figure for demonstrating the evaluation of the perimeter based on 6th Embodiment. 第6の実施の形態の第4の変形例に係わる、全周性の評価を領域の割合に基づいて行うことを説明するための図である。It is a figure for demonstrating performing the evaluation of the perimeter based on the ratio of an area | region concerning the 4th modification of 6th Embodiment. 第7の実施の形態の第4の変形例に係わる、全周性の評価を角度範囲に基づいて行うことを説明するための図である。It is a figure for demonstrating performing evaluation of the perimeter based on an angle range concerning the 4th modification of 7th Embodiment. 第7の実施の形態に係る、カプセル型内視鏡が閉じている噴門部の手前にある場合の画像の例を示す図である。It is a figure which shows the example of the image in case the capsule endoscope based on 7th Embodiment exists in front of the cardia part which is closed. 第7の実施の形態に係る、得られた一連の内視鏡画像に基づいて、閉じた噴門部の検出を行う処理の流れの例を示すフローチャートである。It is a flowchart which shows the example of the flow of a process which performs the detection of the closed cardia part based on the series of obtained endoscopic images based on 7th Embodiment. 第8の実施の形態に係る、得られた一連の内視鏡画像に基づいて、閉じた噴門部の検出を行う処理の流れの例を示すフローチャートである。It is a flowchart which shows the example of the flow of a process which performs the detection of the closed cardia part based on the series of obtained endoscopic images based on 8th Embodiment. 第8の実施の形態に係る、閉じた噴門部の画像から細線化された噴門形状を説明するための画像の例を示す図である。It is a figure which shows the example of the image for demonstrating the cardia shape thinned from the image of the closed cardia part based on 8th Embodiment. 第8の実施の形態に係る、集中度のパラメータである分散値を算出する処理の流れの例を示すフローチャートである。It is a flowchart which shows the example of the flow of a process which calculates the dispersion value which is a parameter of the concentration degree based on 8th Embodiment. 第8の実施の形態に係る、分岐点を説明するための画像の例を示す図である。It is a figure which shows the example of the image for demonstrating a branch point based on 8th Embodiment.

符号の説明Explanation of symbols

1 カプセル型内視鏡装置、 2 患者、 3 カプセル型内視鏡、 4 アンテナユニット、 5 外部装置、 6 クレードル、 7 端末装置、 8a キーボード、 8b マウス、 8c ディスプレイ、 9 端末本体 10 ジャケット、 11 受信アンテナ、 12 液晶モニタ、 13 操作部
代理人 弁理士 伊 藤 進
DESCRIPTION OF SYMBOLS 1 Capsule type | mold endoscope apparatus, 2 Patient, 3 Capsule type | mold endoscope, 4 Antenna unit, 5 External apparatus, 6 Cradle, 7 Terminal device, 8a Keyboard, 8b Mouse, 8c Display, 9 Terminal main body 10 Jacket, 11 Reception Antenna, 12 LCD monitor, 13 Operating department agent Patent attorney Susumu Ito

Claims (15)

消化管を撮像した1枚のあるいは複数の管腔内画像から所定の特徴量を算出する特徴量算出手段と、
算出された前記特徴量に基づき消化管の境界部を検出する検出手段と、
前記検出結果に基づいて、前記管腔内画像が食道から噴門部に係る部分の画像であると判定する判定手段と、
を備えたことを特徴とする管腔画像処理装置。
A feature amount calculating means for calculating a predetermined feature amount from one or a plurality of intraluminal images obtained by imaging the digestive tract;
Detecting means for detecting a boundary portion of the digestive tract based on the calculated feature amount;
Based on the detection result, determination means for determining that the intraluminal image is an image of a portion related to the cardia from the esophagus;
A luminal image processing apparatus comprising:
前記所定の特徴量は、前記1枚のあるいは複数の管腔内画像の色調であることを特徴とする請求項1記載の管腔画像処理装置。   The lumen image processing apparatus according to claim 1, wherein the predetermined feature amount is a color tone of the one or plural intraluminal images. 前記所定の特徴量は、前記1枚のあるいは複数の管腔内画像の明るさであることを特徴とする請求項1記載の管腔画像処理装置。   2. The lumen image processing apparatus according to claim 1, wherein the predetermined feature amount is brightness of the one or a plurality of intraluminal images. 前記所定の特徴量は、前記1枚のあるいは複数の管腔内画像における暗部領域の面積であることを特徴とする請求項1記載の管腔画像処理装置。   The lumen image processing apparatus according to claim 1, wherein the predetermined feature amount is an area of a dark area in the one or a plurality of intraluminal images. 前記所定の特徴量は、前記1枚のあるいは複数の管腔内画像における暗部領域の形状であることを特徴とする請求項1記載の管腔画像処理装置。   2. The lumen image processing apparatus according to claim 1, wherein the predetermined feature amount is a shape of a dark area in the one or a plurality of intraluminal images. 前記検出手段は、算出された前記特徴量を所定の閾値と比較した結果に基づき消化管の前記境界部を検出することを特徴とする請求項1から請求項5のいずれか記載の管腔画像処理装置。   The lumen image according to any one of claims 1 to 5, wherein the detection unit detects the boundary portion of the digestive tract based on a result of comparing the calculated feature value with a predetermined threshold value. Processing equipment. 前記暗部領域の形状は、前記暗部領域の境界とエッジ部を含み、
前記検出手段は、前記境界と前記エッジ部との一致度を、所定の閾値と比較することによって前記境界部を検出することを特徴とする請求項5に記載の管腔画像処理装置。
The shape of the dark area includes a boundary and an edge of the dark area,
The lumen image processing apparatus according to claim 5, wherein the detection unit detects the boundary portion by comparing a degree of coincidence between the boundary and the edge portion with a predetermined threshold.
前記暗部領域の形状は、前記暗部領域のエッジ部を含み、
前記検出手段は、前記エッジ部が、所定の中心点の周りに存在する割合を、所定の閾値と比較することによって前記境界部を検出することを特徴とする請求項5に記載の管腔画像処理装置。
The shape of the dark area includes an edge portion of the dark area,
The lumen image according to claim 5, wherein the detection unit detects the boundary portion by comparing a ratio of the edge portion around a predetermined center point with a predetermined threshold value. Processing equipment.
前記噴門部は、開いた噴門であることを特徴とする請求項1から請求項8のいずれかに記載の管腔画像処理装置。   9. The lumen image processing apparatus according to claim 1, wherein the cardia part is an open cardia. 前記検出手段は、前記暗部面積が、所定の閾値を超えるか否かを比較し、
前記判定手段は、前記暗部面積が、前記所定の閾値を超えるときに、前記噴門部は開いた噴門部であると判定することを特徴とする請求項4に記載の管腔画像処理装置。
The detection means compares whether the dark area exceeds a predetermined threshold,
The lumen image processing apparatus according to claim 4, wherein the determination unit determines that the cardia part is an open cardia part when the dark part area exceeds the predetermined threshold value.
前記検出手段は、前記暗部面積が、前記所定の閾値未満であるか否かを比較し、
前記判定手段は、前記暗部面積が、前記所定の閾値未満であるときに、前記噴門部は閉じた噴門部であると判定することを特徴とする請求項4に記載の管腔画像処理装置。
The detection means compares whether the dark area is less than the predetermined threshold,
The luminal image processing apparatus according to claim 4, wherein the determination unit determines that the cardia part is a closed cardia part when the dark part area is less than the predetermined threshold value.
前記所定の特徴量は、前記1枚のあるいは複数の管腔内画像における暗部領域を細線化して得られた線の分岐点であり、
前記検出手段は、前記分岐点の集中度を、前記所定の閾値と比較することによって前記境界部を検出することを特徴とする請求項1記載の管腔画像処理装置。
The predetermined feature amount is a branch point of a line obtained by thinning a dark area in the one or plural intraluminal images,
The luminal image processing apparatus according to claim 1, wherein the detection unit detects the boundary portion by comparing a degree of concentration of the branch point with the predetermined threshold.
前記噴門部は、閉じた噴門であることを特徴とする請求項11又は請求項12に記載の管腔画像処理装置。   The lumen image processing apparatus according to claim 11, wherein the cardia portion is a closed cardia. 消化管を撮像した1枚のあるいは複数の管腔内画像から所定の特徴量を算出するステップと、
算出された前記特徴量に基づき消化管の境界部を検出するステップと、
前記検出結果に基づいて、前記管腔内画像が食道から噴門部に係る部分の画像であると判定するステップと、
を備えたことを特徴とする管腔画像処理方法。
Calculating a predetermined feature amount from one or a plurality of intraluminal images obtained by imaging the digestive tract;
Detecting a boundary portion of the digestive tract based on the calculated feature amount;
Based on the detection result, determining that the intraluminal image is an image of a portion related to the cardia from the esophagus;
A lumen image processing method comprising:
消化管を撮像した1枚のあるいは複数の管腔内画像から所定の特徴量を算出する機能と、
算出された前記特徴量に基づき消化管の境界部を検出する機能と、
前記検出結果に基づいて、前記管腔内画像が食道から噴門部に係る部分の画像であると判定する機能と、
をコンピュータに実現させるためのプログラム。

A function for calculating a predetermined feature amount from one or a plurality of intraluminal images obtained by imaging the digestive tract;
A function of detecting a boundary portion of the digestive tract based on the calculated feature amount;
Based on the detection result, the function to determine that the intraluminal image is an image of a portion related to the cardia from the esophagus;
A program to make a computer realize.

JP2005038117A 2005-02-15 2005-02-15 Lumen image processing apparatus, lumen image processing method, and program therefor Expired - Fee Related JP5057651B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2005038117A JP5057651B2 (en) 2005-02-15 2005-02-15 Lumen image processing apparatus, lumen image processing method, and program therefor
US11/884,515 US8055033B2 (en) 2005-02-15 2006-02-10 Medical image processing apparatus, luminal image processing apparatus, luminal image processing method, and programs for the same
PCT/JP2006/302381 WO2006087981A1 (en) 2005-02-15 2006-02-10 Medical image processing device, lumen image processing device, lumen image processing method, and programs for them
EP06713523.6A EP1849402B1 (en) 2005-02-15 2006-02-10 Medical image processing device, lumen image processing device, lumen image processing method, and programs for them
US13/209,792 US20110299748A1 (en) 2005-02-15 2011-08-15 Medical image processing apparatus, luminal image processing apparatus, luminal image processing method, and programs for the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005038117A JP5057651B2 (en) 2005-02-15 2005-02-15 Lumen image processing apparatus, lumen image processing method, and program therefor

Publications (2)

Publication Number Publication Date
JP2006223377A true JP2006223377A (en) 2006-08-31
JP5057651B2 JP5057651B2 (en) 2012-10-24

Family

ID=36985261

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005038117A Expired - Fee Related JP5057651B2 (en) 2005-02-15 2005-02-15 Lumen image processing apparatus, lumen image processing method, and program therefor

Country Status (1)

Country Link
JP (1) JP5057651B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009119366A1 (en) * 2008-03-24 2009-10-01 オリンパス株式会社 Capsule medical device, method for operating same, and capsule medical device system
JP2009240405A (en) * 2008-03-28 2009-10-22 Olympus Medical Systems Corp Endoscope system
JP2014054315A (en) * 2012-09-11 2014-03-27 Olympus Corp Medical system
WO2015198757A1 (en) * 2014-06-24 2015-12-30 オリンパス株式会社 Image processing device, endoscope system, and image processing method
JPWO2016084500A1 (en) * 2014-11-28 2017-04-27 オリンパス株式会社 Capsule endoscope, capsule endoscope activation system, and inspection system
JP2019149114A (en) * 2018-02-28 2019-09-05 東京電力ホールディングス株式会社 Data processor, method for analyzing image, and program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1014864A (en) * 1996-04-30 1998-01-20 Olympus Optical Co Ltd Diagnosis support device
JP2000155840A (en) * 1998-11-18 2000-06-06 Olympus Optical Co Ltd Image processing method
JP2004321603A (en) * 2003-04-25 2004-11-18 Olympus Corp Device, method and program for image display
JP2004350963A (en) * 2003-05-29 2004-12-16 Olympus Corp Capsule type medical treatment apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1014864A (en) * 1996-04-30 1998-01-20 Olympus Optical Co Ltd Diagnosis support device
JP2000155840A (en) * 1998-11-18 2000-06-06 Olympus Optical Co Ltd Image processing method
JP2004321603A (en) * 2003-04-25 2004-11-18 Olympus Corp Device, method and program for image display
JP2004350963A (en) * 2003-05-29 2004-12-16 Olympus Corp Capsule type medical treatment apparatus

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009119366A1 (en) * 2008-03-24 2009-10-01 オリンパス株式会社 Capsule medical device, method for operating same, and capsule medical device system
JP2009226065A (en) * 2008-03-24 2009-10-08 Olympus Corp Capsule medical device, its operation method, and capsule medical device system
US8328713B2 (en) 2008-03-24 2012-12-11 Olympus Corporation Capsule medical device, method for operating the same, and capsule medical device system
JP2009240405A (en) * 2008-03-28 2009-10-22 Olympus Medical Systems Corp Endoscope system
JP2014054315A (en) * 2012-09-11 2014-03-27 Olympus Corp Medical system
WO2015198757A1 (en) * 2014-06-24 2015-12-30 オリンパス株式会社 Image processing device, endoscope system, and image processing method
JP2016009984A (en) * 2014-06-24 2016-01-18 オリンパス株式会社 Image processing apparatus, endoscope system and image processing method
CN106464849A (en) * 2014-06-24 2017-02-22 奥林巴斯株式会社 Image processing device, endoscope system, and image processing method
CN106464849B (en) * 2014-06-24 2019-06-25 奥林巴斯株式会社 Image processing apparatus, endoscopic system and image processing method
US10360474B2 (en) 2014-06-24 2019-07-23 Olympus Corporation Image processing device, endoscope system, and image processing method
JPWO2016084500A1 (en) * 2014-11-28 2017-04-27 オリンパス株式会社 Capsule endoscope, capsule endoscope activation system, and inspection system
JP2019149114A (en) * 2018-02-28 2019-09-05 東京電力ホールディングス株式会社 Data processor, method for analyzing image, and program

Also Published As

Publication number Publication date
JP5057651B2 (en) 2012-10-24

Similar Documents

Publication Publication Date Title
EP1849402B1 (en) Medical image processing device, lumen image processing device, lumen image processing method, and programs for them
EP1806091B1 (en) Image processing method
US7885446B2 (en) System and method to detect a transition in an image stream
US7567692B2 (en) System and method for detecting content in-vivo
JP4652694B2 (en) Image processing method
EP1994878B1 (en) Medical image processing device and medical image processing method
US9324145B1 (en) System and method for detection of transitions in an image stream of the gastrointestinal tract
US7577283B2 (en) System and method for detecting content in-vivo
US8682418B2 (en) Diagnosis supporting apparatus and control method of diagnosis supporting apparatus
WO2006112227A1 (en) Image processing device and method
CN100563550C (en) Medical image-processing apparatus
JP5057651B2 (en) Lumen image processing apparatus, lumen image processing method, and program therefor
US20150363942A1 (en) Image processing device, endoscope apparatus, image processing method, and information storage device
US20150363929A1 (en) Endoscope apparatus, image processing method, and information storage device
JP6128989B2 (en) Image processing apparatus, endoscope apparatus, and operation method of image processing apparatus
CN104665756B (en) A kind of internal microsensor image acquisition and processing device and processing method thereof
JP6168878B2 (en) Image processing apparatus, endoscope apparatus, and image processing method
JP5315376B2 (en) Fence-like blood vessel detection device and method of operating the fence-like blood vessel detection device
Malagelada Vilarino et a

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080110

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110222

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110418

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120424

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120625

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120710

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120731

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150810

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 5057651

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150810

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees