JP2018102586A - Fundus image processing device - Google Patents

Fundus image processing device Download PDF

Info

Publication number
JP2018102586A
JP2018102586A JP2016251985A JP2016251985A JP2018102586A JP 2018102586 A JP2018102586 A JP 2018102586A JP 2016251985 A JP2016251985 A JP 2016251985A JP 2016251985 A JP2016251985 A JP 2016251985A JP 2018102586 A JP2018102586 A JP 2018102586A
Authority
JP
Japan
Prior art keywords
value
pixel
image
blood vessel
gradation
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.)
Pending
Application number
JP2016251985A
Other languages
Japanese (ja)
Inventor
茂出木 敏雄
Toshio Modegi
敏雄 茂出木
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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
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 Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2016251985A priority Critical patent/JP2018102586A/en
Publication of JP2018102586A publication Critical patent/JP2018102586A/en
Pending legal-status Critical Current

Links

Landscapes

  • Eye Examination Apparatus (AREA)
  • Image Processing (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a fundus image processing device capable of obtaining an image by which determination of an artery-vein diameter ratio is facilitated.SOLUTION: A fundus image processing device comprises: blood vessel region enhancement means 10 for acquiring a blood vessel enhancement image in which as a probability of being a blood vessel region is higher, a higher value is set, by enhancing a blood vessel region to a color fundus image; hue conversion means (20, 30, 40) for acquiring a hue conversion image in which an RGB balue is converted into a hue value of an L gradation by converting the RGB value acquired by referring to a corresponding pixel of the color fundus image to each pixel in the blood vessel region into the hue value of the L gradation; threshold calculation means 50 for calculating a threshold of binarization by using a histogram calculated on the basis of the pixel corresponding to the blood vessel region of the hue conversion image; and artery-vein identification image generation means 60 for, on the basis of a comparison result between the hue value of the L gradation of each pixel corresponding to the blood vessel region of the hue conversion image and the threshold, acquiring an artery-vein identification image to which an attribute of an artery or a vein is applied.SELECTED DRAWING: Figure 2

Description

本発明は、眼底画像の処理技術に関し、特に、眼底画像を用いて動静脈径比を得る処理を支援するための技術に関する。   The present invention relates to a fundus image processing technique, and more particularly to a technique for supporting a process for obtaining an arteriovenous diameter ratio using a fundus image.

生活習慣病として代表的な高血圧・脂質異常症・糖尿病・動脈硬化など、いわゆるメタボリックシンドロームにおいて、血圧・脂質・血糖は簡便に計測でき自己検診も可能である。しかし、動脈硬化の計測(通称:血管年齢検査)については、現状ではPWV検査(脈波伝播速度)、ABI検査(足関節上腕血圧比)、頚動脈エコー検査など、検査設備を備えた循環器専門のクリニックでないと計測ができない。   In so-called metabolic syndrome such as hypertension, dyslipidemia, diabetes, and arteriosclerosis that are typical lifestyle-related diseases, blood pressure, lipid, and blood glucose can be easily measured and self-examination is possible. However, at present, arteriosclerosis measurement (commonly known as blood vessel age test) is specialized in circulatory organs equipped with testing equipment such as PWV test (pulse wave velocity), ABI test (ankle brachial blood pressure ratio), and carotid echocardiography. Measurement is not possible if it is not a clinic.

これに対して、眼科クリニックが保有する眼底カメラを用いて眼底血管口径を計測することにより、高血圧や動脈硬化を簡便に計測する手法も知られている。眼底は人体の中で唯一血管を直接観察できる箇所であり、眼底動脈の硬化が全身の動脈と同様に進行すると仮定すれば、眼底写真の撮影により動脈硬化の計測が可能になる。眼底カメラは小型化・低価格化が進み、海外では既にスマートフォンでも撮影できる特殊なレンズが販売されており、眼底写真の自己撮影のインフラも整いつつある。   On the other hand, a technique for simply measuring hypertension and arteriosclerosis by measuring the fundus blood vessel diameter using a fundus camera owned by an ophthalmology clinic is also known. The fundus is the only place in the human body where blood vessels can be directly observed. If it is assumed that hardening of the fundus artery proceeds in the same manner as the arteries throughout the body, it is possible to measure arteriosclerosis by taking fundus photographs. Fundus cameras are becoming smaller and less expensive, and overseas, special lenses that can be photographed with smartphones are already being sold, and infrastructure for self-photographing of fundus photographs is being prepared.

眼底写真を用いた高血圧や動脈硬化の計測手法として、Scheie分類が提案されており、動静脈径比、動静脈交叉部の静脈径比、動脈の血柱反射比の3者が主要な計測項目であり、これらに対応した計測支援手法も提案されている(特許文献1参照)。また、動静脈径比の計測を完全自動で行う手法も提案されている(特許文献2参照)。   Scheie classification has been proposed as a method for measuring hypertension and arteriosclerosis using fundus photographs. The main measurement items are the arteriovenous diameter ratio, the arteriovenous intersection ratio, and the arterial reflex ratio. A measurement support method corresponding to these has also been proposed (see Patent Document 1). In addition, a method of fully automatically measuring the arteriovenous diameter ratio has been proposed (see Patent Document 2).

特開2007−319403号公報JP 2007-319403 A 特開平10−243924号公報Japanese Patent Laid-Open No. 10-243924

特許文献1に記載の技術では、血管幅の計測について、ユーザにより円形で指示された中心から、隣接画素との画素値の差が大きい箇所を境界とみなし、最近傍の境界点までの距離をもとに、血管の半径を算出している。しかし、眼底の病態により血管境界がぼけている場合、境界点を特定できず、血管幅が小さ目に計測される問題がある。特許文献2に記載の技術では、動脈と静脈では輝度に差があり(背景に比べ双方とも輝度が低いが、静脈は動脈より顕著に低い)、同一のしきい値で二値化して血管抽出すると、動脈幅は小さ目に静脈幅は大き目になる。そのため、動静脈径比が正しく計測できない。また、動静脈判別を自動で行う手法を提案し、誤判定箇所を血管の連続性により自動修正する機能も提案されているが、血管の分岐箇所では連続性の判定も誤る可能性がある。   In the technique described in Patent Document 1, regarding the measurement of the blood vessel width, a point where the difference in pixel value from the adjacent pixel is large is regarded as a boundary from the center instructed in a circle by the user, and the distance to the nearest boundary point is calculated. Based on this, the radius of the blood vessel is calculated. However, when the blood vessel boundary is blurred due to the condition of the fundus, there is a problem that the boundary point cannot be specified and the blood vessel width is measured to be small. In the technique described in Patent Document 2, there is a difference in brightness between an artery and a vein (both brightness is lower than the background, but the vein is significantly lower than the artery), and binarization is performed with the same threshold value to extract blood vessels. Then, the artery width is small and the vein width is large. Therefore, the arteriovenous diameter ratio cannot be measured correctly. Also, a method of automatically performing arteriovenous discrimination has been proposed and a function of automatically correcting an erroneous determination location based on the continuity of a blood vessel has been proposed.

上記のような問題により、現状では眼科医が眼底写真の上にゲージを当てて目視で計測する手法が一般的である。そのため、動静脈径比は1/2、1/3といった大まかな数値になり、進行度を定量的に比較できないという問題がある。一方、読み取り精度を上げても、計測者の主観によるバラツキ、計測箇所によるバラツキが多くなり、多くの計測箇所をサンプリングする必要があるが、眼科医の作業負荷が大きく現実的ではない。 Due to the problems as described above, at present, a method in which an ophthalmologist applies a gauge on a fundus photograph and visually measures it is common. Therefore, the arteriovenous diameter ratio is a rough value such as 1/2 or 1/3, and there is a problem that the degree of progress cannot be compared quantitatively. On the other hand, even if the reading accuracy is increased, the variation due to the subjectivity of the measurer and the variation due to the measurement location increase, and it is necessary to sample a large number of measurement locations, but the workload of the ophthalmologist is large and not realistic.

そこで、本発明は、動静脈径比の計測などを行い易くするため動脈と静脈が識別された画像を得ることが可能な眼底画像処理装置を提供することを課題とする。   Therefore, an object of the present invention is to provide a fundus image processing apparatus capable of obtaining an image in which an artery and a vein are identified in order to facilitate measurement of an arteriovenous diameter ratio and the like.

上記課題を解決するため、本発明第1の態様では、
カラー眼底画像に対して、血管領域である確率が高い画素ほど高い値が設定されたグレースケールの血管強調画像を得る血管領域強調手段と、
前記血管強調画像の中で所定の値以上の画素値をもつ画素を血管領域の画素として抽出し、前記血管領域の各画素に対して、前記カラー眼底画像の対応する画素を参照してRGB値を取得し、取得したRGB値をL階調(Lは正の整数)の色相値に変換し、画素値がL階調の色相値に変換された色相変換画像を得る色相変換手段と、
前記色相変換画像の前記血管領域に対応する画素を基に、L階調のヒストグラムを算出し、算出されたヒストグラムを用いて判別分析法により二値化のしきい値を算出するしきい値算出手段と、
前記色相変換画像の前記血管領域に対応する各画素のL階調の色相値と前記しきい値との比較結果に基づいて、少なくとも動脈または静脈を含む属性が付与された動静脈識別画像を得る動静脈識別画像生成手段と、
を有することを特徴とする眼底画像処理装置を提供する。
In order to solve the above problems, in the first aspect of the present invention,
A blood vessel region enhancement means for obtaining a grayscale blood vessel enhancement image in which a higher value is set for a pixel having a higher probability of being a blood vessel region with respect to a color fundus image;
A pixel having a pixel value greater than or equal to a predetermined value in the blood vessel enhanced image is extracted as a pixel of the blood vessel region, and an RGB value is obtained by referring to a corresponding pixel of the color fundus image for each pixel of the blood vessel region. Hue conversion means for converting the acquired RGB value into a hue value of L gradation (L is a positive integer) and obtaining a hue conversion image in which the pixel value is converted to the hue value of L gradation;
Threshold calculation that calculates a histogram of L gradation based on pixels corresponding to the blood vessel region of the hue conversion image, and calculates a threshold value for binarization by a discriminant analysis method using the calculated histogram Means,
An arteriovenous identification image to which an attribute including at least an artery or a vein is given is obtained based on a comparison result between an L tone hue value of each pixel corresponding to the blood vessel region of the hue conversion image and the threshold value. An arteriovenous identification image generating means;
There is provided a fundus image processing apparatus characterized by comprising:

また、本発明第2の態様では、
前記色相変換手段は、
前記血管強調画像の中で所定の値以上の画素値をもつ画素を血管領域の画素として抽出し、前記血管領域の各画素に対して、前記カラー眼底画像の対応する画素を参照してRGB値を取得し、取得したRGB値をK(KはLより大きい整数)階調の色相値に変換し、画素値がK階調の色相値に変換された多階調色相変換画像を得る多階調色相変換手段と、
前記K階調の範囲内に、cmin(cminは正の整数)からcmax(cmaxはcminより大きくK−1より小さい)の範囲の中央階調領域を定義する中央階調領域定義手段と、
前記多階調色相変換画像に対して、cmin以下を0、cmax以上をL−1に飽和させ、cminからcmaxまでを0からL−1の値をとるL階調の前記色相変換画像に変換する低階調化手段と、
を更に有することを特徴とする。
In the second aspect of the present invention,
The hue conversion means includes
A pixel having a pixel value greater than or equal to a predetermined value in the blood vessel enhanced image is extracted as a pixel of the blood vessel region, and an RGB value is obtained by referring to a corresponding pixel of the color fundus image for each pixel of the blood vessel region. The obtained RGB values are converted into hue values of K (K is an integer greater than L) gradation, and a multi-gradation hue conversion image in which pixel values are converted to hue values of K gradation is obtained. Gradation hue conversion means;
A central gradation area defining means for defining a central gradation area within a range of cmin (cmin is a positive integer) to cmax (cmax is larger than cmin and smaller than K-1) within the range of the K gradation;
With respect to the multi-tone hue conversion image, the hue conversion image of L gradation having a value from 0 to L-1 from 0 to L-1 is obtained by saturating cmin or less to 0 and cmax or more to L-1. A gradation reduction means for conversion;
It further has these.

また、本発明第3の態様では、前記多階調色相変換手段は、前記血管領域の全ての画素に対して、前記取得したRGB値を色相値に変換した後、最小の色相値を0、最大の色相値をK−1に変換するようにK階調の整数の色相値に変換することを特徴とする。   In the third aspect of the present invention, the multi-gradation hue conversion unit converts the acquired RGB values into hue values for all pixels in the blood vessel region, and then sets the minimum hue value to 0. The maximum hue value is converted into an integer hue value of K gradation so as to be converted into K-1.

また、本発明第4の態様では、前記中央階調領域定義手段は、前記多階調色相変換画像の前記血管領域に対応する画素をもとに、算出された高精度ヒストグラムにおいて、前記血管領域に対応する画素の総数をCt、中央値をhcとして、中央値hcの両側それぞれにCt/4の画素が含まれる範囲を前記中央階調領域として定義することを特徴とする。   Further, in the fourth aspect of the present invention, the central gradation area defining means includes the blood vessel in the high-accuracy histogram calculated based on pixels corresponding to the blood vessel area of the multi-gradation hue conversion image. The total number of pixels corresponding to the region is defined as Ct, the median value is hc, and a range including pixels of Ct / 4 on both sides of the median value hc is defined as the median gradation region.

また、本発明第5の態様では、
前記血管領域強調手段は、
前記カラー眼底画像が有する色成分のうち少なくとも1つの色成分に基づいてグレースケール眼底画像を得るグレースケール変換手段と、
前記グレースケール眼底画像の各画素に対して、所定の範囲に含まれる近傍画素の画素値の平均値を算出し、当該画素の画素値に所定の値から前記平均値を減算した値を加算することにより、平坦化画像を作成する画像平坦化手段と、
前記平坦化画像に対して、所定の構造要素を用いてオープニング処理を行い血管候補領域の輝度を一定以上に揃えた線状成分強調画像を作成する線状成分強調手段と、
前記線状成分強調画像において、所定の条件を満たさない画素値を、変換後の血管強調画像の階調の最小値になるように置き換え、前記所定の条件を満たす画素値が、階調の最小値付近の値から最大値の範囲になるように画素の階調を補正し、血管強調画像を作成する画素階調変換手段と、
を有することを特徴とする。
In the fifth aspect of the present invention,
The blood vessel region enhancement means includes
Grayscale conversion means for obtaining a grayscale fundus image based on at least one of the color components of the color fundus image;
For each pixel of the grayscale fundus image, an average value of pixel values of neighboring pixels included in a predetermined range is calculated, and a value obtained by subtracting the average value from the predetermined value is added to the pixel value of the pixel. Image flattening means for creating a flattened image,
Linear component enhancement means for performing an opening process on the flattened image using a predetermined structural element and creating a linear component enhanced image in which the luminance of the blood vessel candidate region is equal to or higher than a certain level;
In the linear component emphasized image, a pixel value that does not satisfy the predetermined condition is replaced with the minimum gradation value of the converted blood vessel emphasized image, and the pixel value that satisfies the predetermined condition is the minimum gradation value. Pixel gradation conversion means for correcting the gradation of the pixel so as to be in the range of the maximum value from the value near the value, and creating a blood vessel emphasized image;
It is characterized by having.

また、本発明第6の態様では、前記色相変換手段は、前記血管強調画像が256階調の画素値をもつとき、128以上の画素値をもつ画素を血管領域の画素として抽出することを特徴とする。   In the sixth aspect of the present invention, the hue conversion unit extracts pixels having a pixel value of 128 or more as pixels of a blood vessel region when the blood vessel emphasized image has a pixel value of 256 gradations. And

また、本発明第7の態様では、前記多階調色相変換手段は、前記取得したRGB値をK階調の色相値に変換する際、R、G、Bに対応する値をr、g、bとし、αを所定の実数値とし、h=(g−b)α/(2r−g−b)を用い、2r−g−b=0の場合h=0とし、2r−g−b<0の場合、通常眼ではh=0とし、白内障眼では、h=(g−b)α/(2r−g−b)として、得られたhの値に基づいて、変換を行うことを特徴とする。   In the seventh aspect of the present invention, the multi-gradation hue conversion means converts the acquired RGB values into the K-gradation hue values by using the values corresponding to R, G, and B as r, g , B, α as a predetermined real value, h = (g−b) α / (2r−g−b), and 2r−g−b = 0, h = 0 and 2r−g−b If <0, h = 0 for normal eyes and h = (g−b) α / (2r−g−b) for cataract eyes based on the obtained value of h. Features.

また、本発明第8の態様では、前記しきい値算出手段は、前記L階調を256階調とし、算出されたヒストグラムの階調1から階調254の範囲を用いて判別分析法の処理を実行し、前記しきい値を算出することを特徴とする。   In the eighth aspect of the present invention, the threshold value calculation means sets the L gradation to 256 gradations, and uses the range of gradation 1 to gradation 254 of the calculated histogram to perform the process of discriminant analysis method. And the threshold value is calculated.

また、本発明第9の態様では、前記動静脈識別画像生成手段は、前記L階調を256階調とし、前記しきい値をSavとすると、前記色相変換画像の前記血管領域に対応する各画素の色相値Hueに対して、(Hue−Sav)×2なる演算を行って−255から255の範囲の画素値に変換し、前記血管領域に対応しない各画素に対して画素値0を設定し、画素値が正の場合は動脈の属性が付与された画素、画素値が負の場合は静脈の属性が付与された画素、画素値が0の場合は、前記血管領域に含まれない画素になるように、前記動静脈識別画像を生成することを特徴とする。   Also, in the ninth aspect of the present invention, the arteriovenous identification image generating means sets the L gradation to 256 gradations and the threshold value to Sav, and each corresponding to the blood vessel region of the hue conversion image. The pixel value Hue is converted to a pixel value in the range of −255 to 255 by performing an operation of (Hue−Sav) × 2 for the hue value Hue of the pixel, and a pixel value 0 is set for each pixel not corresponding to the blood vessel region. If the pixel value is positive, the pixel is given the artery attribute, if the pixel value is negative, the pixel is given the vein attribute, and if the pixel value is 0, the pixel is not included in the blood vessel region Then, the arteriovenous identification image is generated.

また、本発明第10の態様では、
前記動静脈識別画像生成手段により生成された動静脈識別画像に対して、画素値が(画素値の最大値−1)から1の値をもつ画素を補正対象画素として順次探索し、
探索された各補正対象画素の画素値の絶対値をZTとし、前記補正対象画素の8近傍画素の中で画素値の絶対値の最大値をZM、前記8近傍画素の中で動脈の属性をもつ画素の画素値の絶対値の総和をCp、前記8近傍画素の中で静脈の属性をもつ画素の画素値の絶対値の総和をCnとすると、ZM>ZTであり、
最大値ZMをもつ画素の属性が動脈でCp>Cnを満たす、または最大値ZMをもつ画素の属性が静脈でCp<Cnを満たす場合、前記補正対象画素の属性を最大値ZMをもつ画素の属性に置換し、前記補正対象画素の画素値の絶対値をZMに置換するように、前記探索された全ての補正対象画素に対して順次補正するようにしている動静脈識別画像補正手段を更に有することを特徴とする。
In the tenth aspect of the present invention,
With respect to the arteriovenous identification image generated by the arteriovenous identification image generating means, sequentially search for pixels having pixel values from (maximum pixel value-1) to 1 as correction target pixels,
The absolute value of the pixel value of each of the correction target pixels searched for is ZT, the maximum absolute value of the pixel values among the eight neighboring pixels of the correction target pixel is ZM, and the arterial attribute is selected among the eight neighboring pixels. ZM> ZT, where Cp is the sum of absolute values of the pixel values of pixels having Cp and Cn is the sum of absolute values of the pixel values of pixels having the vein attribute among the eight neighboring pixels,
When the attribute of the pixel having the maximum value ZM satisfies Cp> Cn in the artery, or the attribute of the pixel having the maximum value ZM satisfies Cp <Cn in the vein, the attribute of the correction target pixel is set to the pixel having the maximum value ZM. An arteriovenous identification image correcting unit that sequentially corrects all of the searched correction target pixels so as to replace the attribute and replace the absolute value of the pixel value of the correction target pixel with ZM. It is characterized by having.

また、本発明第11の態様では、
前記動静脈識別画像生成手段により生成された動静脈識別画像より、(2N+1)×(2N+1)画素(N≧1)の画素ブロックを順次抽出し、前記画素ブロックの中で、動脈の属性をもつ画素数の総和をCpa、前記画素ブロックの中で、静脈の属性をもつ画素数の総和をCnaとすると、
Cpa>Cnaの場合、前記画素ブロックの中の全ての画素の属性を動脈に設定し、Cpa<Cnaの場合、前記画素ブロックの中の全ての画素の属性を静脈に設定するように補正する動静脈識別画像補正手段を更に有することを特徴とする。
In the eleventh aspect of the present invention,
A pixel block of (2N + 1) × (2N + 1) pixels (N ≧ 1) is sequentially extracted from the arteriovenous identification image generated by the arteriovenous identification image generating means, and has an arterial attribute in the pixel block. If the total number of pixels is Cpa, and the total number of pixels having the vein attribute in the pixel block is Cna,
When Cpa> Cna, the attribute of all pixels in the pixel block is set as an artery, and when Cpa <Cna, the correction is performed so that the attributes of all pixels in the pixel block are set as veins. It further has a vein identification image correcting means.

また、本発明第12の態様では、コンピュータを、前記眼底画像処理装置として機能させるためのプログラムを提供する。   According to a twelfth aspect of the present invention, there is provided a program for causing a computer to function as the fundus image processing apparatus.

本発明によれば、動静脈径比の判定を行い易くするための画像を得ることが可能となる。   According to the present invention, it is possible to obtain an image for facilitating determination of an arteriovenous diameter ratio.

本発明の一実施形態に係る眼底画像処理装置100のハードウェア構成図である。1 is a hardware configuration diagram of a fundus image processing apparatus 100 according to an embodiment of the present invention. 本発明の一実施形態に係る眼底画像処理装置の構成を示す機能ブロック図である。1 is a functional block diagram illustrating a configuration of a fundus image processing apparatus according to an embodiment of the present invention. 本発明の一実施形態に係る眼底画像処理装置の処理概要を示すフローチャートである。It is a flowchart which shows the process outline | summary of the fundus image processing apparatus according to an embodiment of the present invention. フルカラー眼底画像と血管強調画像の一例を示す図である。It is a figure which shows an example of a full-color fundus image and a blood vessel emphasis image. K=2048としたときの、2048階調色相ヒストグラムを示す図である。It is a figure which shows a 2048 gradation hue histogram when K = 2048. 図5のヒストグラムを基に抽出された中央階調領域を示す図である。It is a figure which shows the center gradation area | region extracted based on the histogram of FIG. L=256としたときの、L階調変換画像Hue(x,y)の一例を示す図である。It is a figure which shows an example of L gradation conversion image Hue (x, y) when L = 256. L=256としたときの、256階調色相ヒストグラムを示す図である。It is a figure which shows a 256 tone hue histogram when L = 256. 第1の手法による動静脈識別画像Hues(x,y)の補正の一例を示す図である。It is a figure which shows an example of correction | amendment of the arteriovenous identification image Hues (x, y) by a 1st method. 第2の手法による動静脈識別画像Hues(x,y)の補正の一例を示す図である。It is a figure which shows an example of correction | amendment of the arteriovenous identification image Hues (x, y) by a 2nd method. 動静脈判定結果画像AVsepの表示例を示す図である。It is a figure which shows the example of a display of the arteriovenous determination result image AVsep. 第1の手法による補正後の動静脈判定結果画像AVsepの表示例を示す図である。It is a figure which shows the example of a display of the arteriovenous determination result image AVsep after correction | amendment by a 1st method. 第1の手法および第2の手法による補正後の動静脈判定結果画像AVsepの表示例を示す図である。It is a figure which shows the example of a display of the arteriovenous determination result image AVsep after correction | amendment by the 1st method and the 2nd method. 図4に対応する白内障眼のフルカラー眼底画像と血管強調画像の別の一例を示す図である。It is a figure which shows another example of the full-color fundus image of a cataract eye corresponding to FIG. 4, and a blood vessel emphasized image. 図14に示す症例に対する動静脈判定結果画像AVsepの表示例を示す図である。It is a figure which shows the example of a display of the arteriovenous determination result image AVsep with respect to the case shown in FIG. 図15に示す症例に対する第1に手法および第2の手法による補正後の動静脈判定結果画像AVsepの表示例を示す図である。FIG. 16 is a diagram illustrating a display example of an arteriovenous determination result image AVsep after correction by the first method and the second method for the case illustrated in FIG. 15. 血管領域強調手段10の詳細を示す機能ブロック図である。3 is a functional block diagram showing details of a blood vessel region emphasizing means 10. FIG. 血管領域強調手段10によるステップS100の血管領域強調処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the blood vessel region enhancement process of step S100 by the blood vessel region enhancement means 10. グレースケール眼底画像上の画素(x,y)と平均値Mean(x,y)を算出するための近傍画素との関係を示す図である。It is a figure which shows the relationship between the pixel (x, y) on a gray scale fundus image, and the vicinity pixel for calculating average value Mean (x, y). ステップS130の線状成分強調処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the linear component emphasis process of step S130. オープニング処理で用いる線形構造要素の一例を示す図である。It is a figure which shows an example of the linear structural element used by an opening process. オープニング処理で用いる円形構造要素の一例を示す図である。It is a figure which shows an example of the circular structural element used by an opening process. 方向d=1の場合の線形構造要素の具体的な画素値を示す図である。It is a figure which shows the specific pixel value of the linear structure element in the case of direction d = 1. 方向d=2の場合の線形構造要素の具体的な画素値を示す図である。It is a figure which shows the specific pixel value of the linear structure element in the direction of d = 2.

以下、本発明の好適な実施形態について図面を参照して詳細に説明する。
<1.装置構成>
図1は、本発明の一実施形態に係る眼底画像処理装置のハードウェア構成図である。本実施形態に係る眼底画像処理装置100は、汎用のコンピュータで実現することができ、図1に示すように、CPU(Central Processing Unit)1と、コンピュータのメインメモリであるRAM(Random Access Memory)2と、CPU1が実行するプログラムやデータを記憶するためのハードディスク、フラッシュメモリ等の大容量の記憶装置3と、キーボード、マウス等の指示入力I/F(インターフェース)4と、データ記憶媒体等の外部装置とデータ通信するためのデータ入出力I/F(インターフェース)5と、液晶ディスプレイ等の表示デバイスである表示部6と、を備え、互いにバスを介して接続されている。
DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments of the invention will be described in detail with reference to the drawings.
<1. Device configuration>
FIG. 1 is a hardware configuration diagram of a fundus image processing apparatus according to an embodiment of the present invention. The fundus image processing apparatus 100 according to the present embodiment can be realized by a general-purpose computer. As shown in FIG. 1, a CPU (Central Processing Unit) 1 and a RAM (Random Access Memory) that is a main memory of the computer. 2, a large-capacity storage device 3 such as a hard disk or flash memory for storing programs and data executed by the CPU 1, an instruction input I / F (interface) 4 such as a keyboard and a mouse, and a data storage medium A data input / output I / F (interface) 5 for data communication with an external apparatus and a display unit 6 which is a display device such as a liquid crystal display are provided, and are connected to each other via a bus.

図2は、本実施形態に係る眼底画像処理装置の構成を示す機能ブロック図である。図2において、10は血管領域強調手段、20は多階調色相変換手段、30は中央階調領域定義手段、40は低階調化手段、50はしきい値算出手段、60は動静脈識別画像生成手段、65は動静脈径比算出手段、67は動静脈識別画像補正手段、70は眼底画像記憶手段、80は動静脈識別画像記憶手段である。多階調色相変換手段20、中央階調領域定義手段30、低階調化手段40は、まとめて色相変換手段として機能する。   FIG. 2 is a functional block diagram illustrating a configuration of the fundus image processing apparatus according to the present embodiment. In FIG. 2, 10 is a blood vessel region emphasizing unit, 20 is a multi-tone conversion unit, 30 is a central tone region defining unit, 40 is a tone-lowering unit, 50 is a threshold value calculating unit, and 60 is an arteriovenous device. Identification image generating means, 65 is an arteriovenous diameter ratio calculating means, 67 is an arteriovenous identification image correcting means, 70 is a fundus image storage means, and 80 is an arteriovenous identification image storage means. The multi-gradation hue conversion unit 20, the central gradation region definition unit 30, and the gradation reduction unit 40 collectively function as a hue conversion unit.

血管領域強調手段10、多階調色相変換手段20、中央階調領域定義手段30、低階調化手段40、しきい値算出手段50、動静脈識別画像生成手段60、動静脈径比算出手段65、動静脈識別画像補正手段67は、CPU1が、記憶装置3に記憶されているプログラムを実行することにより実現される。眼底画像記憶手段70は、可視光・光源方式の眼底カメラを用いてフルカラーで撮影された、血管領域の抽出対象となるフルカラー眼底画像を記憶した記憶手段であり、記憶装置3により実現される。眼底画像処理装置にフルカラー眼底画像を読み込ませて、そのまま処理を行う場合は、RAM2が眼底画像記憶手段70としての役割を果たす。フルカラー眼底画像とは、RGBの3成分により記録された画像データであり、被験者の眼底が撮影されたものである。本実施形態では、RGB各色8ビット256階調で記録されたものを用いている。   Blood vessel region enhancement means 10, multi-gradation hue conversion means 20, central gradation area definition means 30, lower gradation reduction means 40, threshold value calculation means 50, arteriovenous identification image generation means 60, arteriovenous diameter ratio calculation The means 65 and the arteriovenous identification image correcting means 67 are realized by the CPU 1 executing a program stored in the storage device 3. The fundus image storage unit 70 is a storage unit that stores a full-color fundus image to be extracted from a blood vessel region, which is captured in full color using a visible light / light source type fundus camera, and is realized by the storage device 3. When the full-color fundus image is read by the fundus image processing apparatus and processed as it is, the RAM 2 serves as the fundus image storage unit 70. A full-color fundus image is image data recorded with three RGB components, and is obtained by photographing the fundus of a subject. In the present embodiment, RGB recorded with 8-bit 256 gradations for each color is used.

動静脈識別画像記憶手段80は、動静脈識別画像生成手段60により生成され、または、動静脈識別画像補正手段67により補正された動静脈識別画像を記憶する記憶手段であり、記憶装置3により実現される。動静脈識別画像は、動脈である可能性の高い画素は正の大きい値を持ち、静脈である可能性の高い画素は負の小さい値を持つ画像であり、本実施形態では、8ビット256階調の形式のグレースケール形式(モノクロ形式)であって、さらに各画素が動脈/静脈の別を示す正負の符号を備えた形式で記録される。   The arteriovenous identification image storage unit 80 is a storage unit that stores the arteriovenous identification image generated by the arteriovenous identification image generation unit 60 or corrected by the arteriovenous identification image correction unit 67, and is realized by the storage device 3. Is done. The arteriovenous identification image is an image in which a pixel that is likely to be an artery has a large positive value and a pixel that is likely to be a vein has a small negative value. In this embodiment, 8-bit 256th floor This is a gray scale format (monochrome format) in a key format, and each pixel is recorded in a format having a positive / negative sign indicating whether the pixel is an artery / vein.

図2に示した各構成手段は、現実には図1に示したように、コンピュータおよびその周辺機器等のハードウェアに専用のプログラムを搭載することにより実現される。すなわち、コンピュータが、専用のプログラムに従って各手段の内容を実行することになる。なお、本明細書において、コンピュータとは、CPU等の演算処理部を有し、データ処理が可能な装置を意味し、パーソナルコンピュータなどの汎用コンピュータだけでなく、タブレット等の携帯型端末も含む。   Each component shown in FIG. 2 is actually realized by installing a dedicated program in hardware such as a computer and its peripheral devices as shown in FIG. That is, the computer executes the contents of each means according to a dedicated program. Note that in this specification, a computer means an apparatus having an arithmetic processing unit such as a CPU and capable of data processing, and includes not only a general-purpose computer such as a personal computer but also a portable terminal such as a tablet.

図1に示した記憶装置3には、CPU1を動作させ、コンピュータを、眼底画像処理装置として機能させるための専用のプログラムが実装されている。この専用のプログラムを実行することにより、CPU1は、血管領域強調手段10、多階調色相変換手段20、中央階調領域定義手段30、低階調化手段40、しきい値算出手段50、動静脈識別画像生成手段60としての機能を実現することになる。また、記憶装置3は、眼底画像記憶手段70、動静脈識別画像記憶手段80として機能するだけでなく、眼底画像処理装置としての処理に必要な様々なデータを記憶する。   A dedicated program for operating the CPU 1 and causing the computer to function as a fundus image processing apparatus is installed in the storage device 3 illustrated in FIG. By executing this dedicated program, the CPU 1 causes the blood vessel region enhancement means 10, the multi-gradation hue conversion means 20, the central gradation area definition means 30, the gradation reduction means 40, the threshold value calculation means 50, The function as the arteriovenous identification image generating means 60 is realized. The storage device 3 not only functions as the fundus image storage unit 70 and the arteriovenous identification image storage unit 80 but also stores various data necessary for processing as the fundus image processing apparatus.

<2.処理動作>
<2.1.前処理>
まず、処理対象とするフルカラー眼底画像を用意する。フルカラー眼底画像としては、デジタル方式の眼底カメラによりフルカラーで撮影した画像ファイルがあれば、そのまま使用できる。また、アナログ方式の眼底カメラにより写真媒体に記録された古いものであれば、保管されていたアナログのカラーのネガ・ポジフィルム、印画紙、インスタント写真等をスキャナによりフルカラーで読み取る等してデジタルのフルカラー眼底画像ファイルを取得する。一般には、可視光・光源方式の眼底カメラを用いてフルカラーで撮影することによりフルカラー眼底画像が得られる。取得したフルカラー眼底画像は、眼底画像処理装置の眼底画像記憶手段70に記憶させる。本実施形態では、フルカラー眼底画像としてR,G,B各成分8ビット256階調のカラー画像を用意する。
<2. Processing action>
<2.1. Pretreatment>
First, a full-color fundus image to be processed is prepared. As a full-color fundus image, if there is an image file taken in full color by a digital fundus camera, it can be used as it is. In addition, if it is an old one recorded on a photographic medium by an analog fundus camera, the stored digital color negative / positive film, photographic paper, instant photo, etc. are read in full color with a scanner. Obtain a full-color fundus image file. Generally, a full-color fundus image is obtained by photographing in full color using a visible light / light source type fundus camera. The acquired full-color fundus image is stored in the fundus image storage means 70 of the fundus image processing apparatus. In this embodiment, R, G, B component 8-bit color images with 256 gradations are prepared as full-color fundus images.

<2.2.処理概要>
次に、図1、図2に示した眼底画像処理装置の処理動作について説明する。図3は、本発明の一実施形態に係る眼底画像処理装置の処理概要を示すフローチャートである。上述のように、処理対象であるフルカラー眼底画像は、RGB各色8ビット256階調の画像データである。したがって、x方向の画素数Xs、y方向の画素数Ysのフルカラー眼底画像は、色成分を示す変数c=0(Red),1(Green),2(Blue)とすると、Image(x,y,c)=0〜255(x=0,・・・,Xs−1;y=0,・・・,Ys−1;c=0,1,2)と定義される。
<2.2. Process Overview>
Next, the processing operation of the fundus image processing apparatus shown in FIGS. 1 and 2 will be described. FIG. 3 is a flowchart showing an outline of processing of the fundus image processing apparatus according to the embodiment of the present invention. As described above, the full-color fundus image to be processed is 8-bit 256-gradation image data for each RGB color. Therefore, a full-color fundus image having the number of pixels Xs in the x direction and the number of pixels Ys in the y direction is represented by Image (x, y) when variables c = 0 (Red), 1 (Green), and 2 (Blue) indicating color components are used. , C) = 0 to 255 (x = 0,..., Xs-1; y = 0,..., Ys-1; c = 0, 1, 2).

まず、血管領域強調手段10が、フルカラー眼底画像に対して、血管領域を強調する処理を行い、血管強調画像を得る(ステップS100)。血管領域強調手段10、および血管領域強調手段10が行うステップS100の血管領域強調処理の詳細については後述する。血管強調画像Tray(x,y)は、血管領域であるか否かの確率を示す256段階の血管抽出度をもつグレースケール画像である。血管強調画像において、Tray(x,y)=0の場合は完全に非血管領域を示し、Tray(x,y)=255の場合は完全に血管領域を示す。図4は、フルカラー眼底画像と血管強調画像の一例を示す図である。図4(a)に示すフルカラー眼底画像に対して、ステップS100の処理を実行することにより、図4(b)に示す血管強調画像が得られる。図4(b)に示される通り、本願で使用している血管領域強調処理では、Tray(x,y)の値が比較的大きい血管領域であると判定される画素領域の中には、眼底撮影時の枠線など、本来であれば非血管領域に含まれなくてはいけない非眼底領域の画素も含まれてしまう。 First, the blood vessel region emphasizing unit 10 performs processing for enhancing the blood vessel region on the full-color fundus image to obtain a blood vessel emphasized image (step S100). Details of the blood vessel region emphasizing unit 10 and the blood vessel region emphasizing process in step S100 performed by the blood vessel region emphasizing unit 10 will be described later. The blood vessel enhancement image Ray (x, y) is a grayscale image having a blood vessel extraction degree of 256 levels indicating the probability of being a blood vessel region. In the blood vessel-enhanced image, when Tray (x, y) = 0, the non-blood vessel region is completely indicated, and when Tray (x, y) = 255, the blood vessel region is completely indicated. FIG. 4 is a diagram illustrating an example of a full-color fundus image and a blood vessel enhancement image. By executing the process of step S100 on the full-color fundus image shown in FIG. 4A, the blood vessel emphasized image shown in FIG. 4B is obtained. As shown in FIG. 4B, in the blood vessel region enhancement processing used in the present application, a pixel region determined to be a blood vessel region having a relatively large value of Tray (x, y) includes the fundus Pixels in the non-fundus region that should otherwise be included in the non-blood vessel region, such as a frame line at the time of photographing, are also included.

血管強調画像が得られたら、次に、多階調色相変換手段20が、血管領域画素の色相変換を行う(ステップS200)。具体的には、まず、血管強調画像Tray(x,y)>128を満たす座標(x,y)に対応する全ての画素Image(x,y,c)に対して、以下の〔数式1〕に従った処理を実行することにより色相値hを得る。なお、〔数式1〕においては、r=Image(x,y,0)、g=Image(x,y,1)、b=Image(x,y,2)とする。   If the blood vessel emphasized image is obtained, then the multi-tone hue conversion means 20 performs the hue conversion of the blood vessel region pixels (step S200). Specifically, first, for all pixels Image (x, y, c) corresponding to coordinates (x, y) satisfying the blood vessel emphasized image Ray (x, y)> 128, the following [Equation 1] The hue value h is obtained by executing the processing according to the above. In [Formula 1], r = Image (x, y, 0), g = Image (x, y, 1), and b = Image (x, y, 2).

〔数式1〕
通常眼の場合
2r>g+bのとき、h=(g−b)α/(2r−g−b)
2r≦g+bのとき、h=0
白内障眼の場合
2rとg+bが等しくないとき、h=(g−b)α/(2r−g−b)
2r=g+bのとき、h=0
[Formula 1]
In the case of normal eyes, when 2r> g + b, h = (g−b) α / (2r−g−b)
When 2r ≦ g + b, h = 0
For cataractous eyes When 2r and g + b are not equal, h = (g−b) α / (2r−g−b)
When 2r = g + b, h = 0

〔数式1〕に従った処理を実行する際、事前の設定に従って、通常眼、白内障眼に応じた処理が行われる。事前の設定は、オペレータが、指示入力I/F4を介して、通常眼、白内障眼であるかを指定することにより行われる。〔数式1〕におけるαとしては、任意の実数値を設定することができるが、本実施形態では、α=768.0に設定されている。通常眼の場合は、血管領域では必ず2r>g+bとなり、それを満たさない画素は非眼底領域(撮影時の枠線など)と判断できるが、白内障眼の場合は、フルカラー眼底画像においてBlue成分であるbの値が大きくなり、血管領域でも2r<g+bとなることがある。通常眼の設定で行うと、血管領域に対してh=0と非眼底領域と誤判定し、多くの血管領域が抽出されなくなる。そのため、白内障と考えられる場合には、2r=g+bになる画素を除き全ての画素を血管領域とみなす。尚、数式1は血管強調画像Tray(x,y)>128を満たす血管領域の画素に対して適用しているが、眼底カメラで撮影時の枠線など眼底画像に含まれる非眼底領域の画素もTray(x,y)>128を満たしてしまうため、そのまま血管領域として処理する。   When executing the process according to [Equation 1], the process corresponding to the normal eye and the cataract eye is performed according to the prior setting. The prior setting is performed by the operator specifying whether the eye is a normal eye or a cataract eye via the instruction input I / F 4. As [alpha] in [Formula 1], an arbitrary real value can be set, but in this embodiment, [alpha] = 768.0 is set. In the case of a normal eye, 2r> g + b is always satisfied in the blood vessel region, and pixels that do not satisfy the condition can be determined as a non-fundus region (such as a frame line at the time of photographing). However, in the case of a cataractous eye, There is a case where a certain value of b becomes large, and 2r <g + b in the blood vessel region. When the normal eye setting is used, h = 0 is erroneously determined for the blood vessel region as a non-fundus region, and many blood vessel regions are not extracted. Therefore, when it is considered to be a cataract, all the pixels are regarded as a blood vessel region except for a pixel where 2r = g + b. Although Formula 1 is applied to pixels in the blood vessel region that satisfies the blood vessel emphasized image Ray (x, y)> 128, pixels in the non-fundus region included in the fundus image, such as a frame line at the time of photographing with the fundus camera. Since it also satisfies Ray (x, y)> 128, it is processed as a blood vessel region as it is.

〔数式1〕における処理は、h=(g−b)α/(2r−g−b)を用い、2r−g−b=0の場合h=0とし、2r−g−b<0の場合、通常眼では非眼底領域(非血管領域)の画素と判断しh=0とし、白内障眼では、血管領域でも2r−g−b<0を満たす画素があるため、血管領域であるか非眼底領域(非血管領域)の画素であるかを色相値で判断できないため、非眼底領域(非血管領域)の画素も含めて血管領域の画素とみなし、h=(g−b)α/(2r−g−b)で算出される色相値を与える。   The processing in [Equation 1] uses h = (g−b) α / (2r−g−b). When 2r−g−b = 0, h = 0 and 2r−g−b <0. In normal eyes, the pixel is determined to be a non-fundus region (non-blood vessel region) and h = 0, and in a cataract eye, there is a pixel satisfying 2r−g−b <0 even in the vascular region. Since it cannot be determined by the hue value whether the pixel is a region (non-vascular region) pixel, it is regarded as a pixel of the vascular region including pixels of the non-fundus region (non-vascular region), and h = (g−b) α / (2r The hue value calculated in -gb) is given.

続いて、算出されたhの最小値hmin、hの最大値hmaxを用いて、以下の〔数式2〕に従った処理を実行することによりK階調変換画像Hueh(x,y)を得る。K階調変換画像Hueh(x,y)は、後述するL階調変換画像Hue(x,y)より相対的に多階調であるため、多階調色相変換画像と呼ぶこともできる。   Subsequently, by using the calculated minimum value hmin of h and the maximum value hmax of h, a process according to the following [Equation 2] is executed to obtain a K gradation converted image Hueh (x, y). Since the K gradation conversion image Hueh (x, y) has relatively many gradations than the L gradation conversion image Hue (x, y) described later, it can also be called a multi gradation hue conversion image.

〔数式2〕
Hueh(x,y)=(h−hmin)(K−1)/(hmax−hmin)
0≦Hueh(x,y)≦K−1
[Formula 2]
Hueh (x, y) = (h−hmin) (K−1) / (hmax−hmin)
0 ≦ Hueh (x, y) ≦ K−1

〔数式2〕の第1式の結果得られたHueh(x,y)は実数値であるため、小数点以下1桁を四捨五入して整数値に置き換える。〔数式2〕における階調Kとしては、任意の値を設定することができるが、本実施形態では、K=2048に設定されている。この場合、K階調変換画像Hueh(x,y)は、0〜2047の値をとる2048階調のグレースケール画像である。色相値hは、血管強調画像Tray(x,y)>128となる血管領域である可能性が高い画素についてのみ、求められているため、K階調変換画像Hueh(x,y)も血管領域である可能性が高い画素に対応する画像となる。   Since Hueh (x, y) obtained as a result of the first formula of [Formula 2] is a real value, one digit after the decimal point is rounded off and replaced with an integer value. An arbitrary value can be set as the gradation K in [Formula 2], but in this embodiment, K = 2048 is set. In this case, the K gradation conversion image Hueh (x, y) is a 2048 gradation gray scale image having a value of 0-2047. Since the hue value h is obtained only for a pixel that is highly likely to be a blood vessel region where the blood vessel emphasized image Tray (x, y)> 128, the K gradation converted image Hueh (x, y) is also a blood vessel region. It becomes an image corresponding to a pixel having a high possibility of being.

K階調変換画像が得られたら、次に、中央階調領域定義手段30が、中央階調領域の抽出を行う(ステップS300)。具体的には、まず、K階調変換画像Hueh(x,y)の、血管強調画像Tray(x,y)>128を満たす画素(x,y)におけるヒストグラムhisth(h1)(0≦h1≦K−1)を求める。ヒストグラムhisth(h1)が得られたら、以下の〔数式3〕に従った処理を実行することにより、ヒストグラムhisth(h1)の中央値(50%位置)hcを求める。   If the K gradation conversion image is obtained, then the central gradation area defining means 30 extracts the central gradation area (step S300). Specifically, first, the histogram histh (h1) (0 ≦ h1 ≦) in the pixel (x, y) satisfying the blood vessel emphasized image Ray (x, y)> 128 of the K gradation conversion image Hueh (x, y). K-1) is obtained. When the histogram histh (h1) is obtained, the median (50% position) hc of the histogram histh (h1) is obtained by executing processing according to the following [Equation 3].

〔数式3〕
Ct=Σh1=0,Khisth(h1)
Σh1=0,hchisth(h1)≧Ct/2
[Formula 3]
Ct = Σ h1 = 0, K histh (h1)
Σ h1 = 0, hc histh (h1) ≧ Ct / 2

〔数式3〕において、Ctは、K階調変換画像Hueh(x,y)の画素の総数である。〔数式3〕の第2式の条件を最初に満たしたh1の値hcを中央値とする。   In [Formula 3], Ct is the total number of pixels of the K gradation conversion image Hueh (x, y). The value hc of h1 that first satisfies the condition of the second equation of [Equation 3] is set as the median value.

中央値hcが得られたら、以下の〔数式4〕に従った処理を実行することにより、中央階調領域の最小値cminと最大値cmaxを求める。   When the median value hc is obtained, the minimum value cmin and the maximum value cmax of the central gradation region are obtained by executing processing according to the following [Equation 4].

〔数式4〕
hc−1≧h1≧0の範囲で、Σh1=cmin,hc-1histh(h1)≧Ct/4
hc≦h1≦K−1の範囲で、Σh1=hc,cmaxhisth(h1)≧Ct/4
[Formula 4]
In the range of hc-1 ≧ h1 ≧ 0, Σ h1 = cmin, hc-1 histh (h1) ≧ Ct / 4
In the range of hc ≦ h1 ≦ K−1, Σ h1 = hc, cmax histh (h1) ≧ Ct / 4

〔数式4〕において、第1式をh1=hc−1から小さい方へ順に積算していき、初めて第1式が成立したときのh1の値を最小値cminとし、第2式をh1=hcから大きい方へ順に積算していき、初めて第2式が成立したときのh1の値を最大値cmaxとする。これにより、中央値hcの両側それぞれにCt/4の画素が含まれる範囲を中央階調領域として定義することができる。   In [Expression 4], the first expression is integrated in order from h1 = hc−1 to the smaller one, and the value of h1 when the first expression is established for the first time is set as the minimum value cmin, and the second expression is expressed as h1 = hc. The values are accumulated in order from the largest to the largest, and the value of h1 when the second formula is satisfied for the first time is taken as the maximum value cmax. Thereby, a range in which Ct / 4 pixels are included on both sides of the median value hc can be defined as a central gradation region.

図5は、K=2048としたときの、2048階調色相の高精度ヒストグラムを示す図である。図5においては、中央値hc=1032、最小値cmin=1023、最大値cmax=1037となった例を示している。図6は、図5のヒストグラムを基に抽出された中央階調領域を示す図である。図6の例では、cmin(1023)からcmax(1037)までが中央階調領域として抽出されている。   FIG. 5 is a diagram showing a high-accuracy histogram of 2048 gradation hues when K = 2048. FIG. 5 shows an example in which the median value hc = 1032, the minimum value cmin = 1023, and the maximum value cmax = 1037. FIG. 6 is a diagram showing a central gradation region extracted based on the histogram of FIG. In the example of FIG. 6, cmin (1023) to cmax (1037) are extracted as the central gradation region.

中央階調領域が抽出されたら、次に、低階調化手段40が、K階調変換画像Hueh(x,y)の低階調化を行う(ステップS400)。具体的には、以下の〔数式5〕に従った処理を実行することによりL階調色相変換画像Hue(x,y)を得る。なお、Lは正の整数である。   Once the central gradation area is extracted, the gradation reduction means 40 performs gradation reduction of the K gradation conversion image Hueh (x, y) (step S400). Specifically, an L gradation hue conversion image Hue (x, y) is obtained by executing processing according to the following [Equation 5]. L is a positive integer.

〔数式5〕
Tray(x,y)>128を満たす(x,y)に対して
Hue(x,y)=(Hueh(x,y)−cmin)(L−1)/(cmax−cmin)
Hue(x,y)<0の場合、Hue(x,y)=0
Hue(x,y)>L−1の場合、Hue(x,y)=L−1
[Formula 5]
For (x, y) that satisfies (Ray (x, y)> 128) Hue (x, y) = (Hueh (x, y) −cmin) (L−1) / (cmax−cmin)
If Hue (x, y) <0, Hue (x, y) = 0
If Hue (x, y)> L-1, then Hue (x, y) = L-1.

〔数式5〕に示すように、演算後のHue(x,y)が負の値かL−1を超える場合、それぞれ最小値0、最大値L−1に飽和させる。〔数式5〕における階調Lとしては、任意の値を設定することができるが、本実施形態では、L=256に設定されている。この場合、L階調変換画像Hue(x,y)は、0〜255の値をとる256階調のグレースケール画像である。   As shown in [Formula 5], when the calculated Hue (x, y) exceeds a negative value or exceeds L−1, it is saturated to the minimum value 0 and the maximum value L−1, respectively. An arbitrary value can be set as the gradation L in [Equation 5], but in this embodiment, L = 256 is set. In this case, the L gradation conversion image Hue (x, y) is a 256 gradation gray scale image having a value of 0 to 255.

図7は、L=256としたときの、L階調変換画像Hue(x,y)の一例を示す図である。動脈に相当する画素は高輝度となり、静脈に相当する画素は低輝度となる。前述の通り、Tray(x,y)>128を満たす画素の中には、眼底カメラで撮影時の枠線など眼底画像に含まれる非眼底領域の画素も含まれ、これらのL階調色相変換画像Hue(x,y)の値は、飽和させた画素値の0(通常眼の場合)またはL−1(白内障眼の場合)をとる。   FIG. 7 is a diagram illustrating an example of the L gradation conversion image Hue (x, y) when L = 256. Pixels corresponding to arteries have high luminance, and pixels corresponding to veins have low luminance. As described above, the pixels satisfying Tray (x, y)> 128 include pixels in the non-fundus region included in the fundus image, such as a frame line at the time of photographing with the fundus camera. The value of the converted image Hue (x, y) is 0 (in the case of normal eyes) or L-1 (in the case of cataract eyes) of the saturated pixel value.

L階調変換画像が得られたら、次に、しきい値算出手段50は、しきい値を算出する(ステップS500)。具体的には、まず、0〜L−1の値をもつグレースケールのL階調変換画像Hue(x,y)(x=0,・・・,Xs−1;y=0,・・・,Ys−1)に対して、Tray(x,y)>128を満たす(x,y)について濃度ヒストグラムHist(va)(va=0,・・・,L−1)を算出する。そして、ヒストグラムを2分割する境界(しきい値)をs(s=2,・・・,L−2)とし、以下の〔数式6〕に従った処理を実行し、判別値D(s)を算出する。   If an L gradation conversion image is obtained, then the threshold value calculation means 50 calculates a threshold value (step S500). Specifically, first, a grayscale L gradation conversion image Hue (x, y) (x = 0,..., Xs-1; y = 0,... Having a value of 0 to L−1. , Ys−1), a density histogram Hist (va) (va = 0,..., L−1) is calculated for (x, y) that satisfies Ray (x, y)> 128. Then, the boundary (threshold value) for dividing the histogram into two is set to s (s = 2,..., L−2), processing according to the following [Equation 6] is executed, and the discriminant value D (s) Is calculated.

〔数式6〕
Sum1(s)=Σva=1,s-1Hist(va)va
Sum2(s)=Σva=s,L-2Hist(va)va
N1(s)=Σva=1,s-1Hist(va)
N2(s)=Σva=s,L-2Hist(va)
V1(s)=Sum1(s)/N1(s)
V2(s)=Sum2(s)/N2(s)
W(s)=(V1−V2)
D(s)=N1(s)N2(s)W(s)2
[Formula 6]
Sum1 (s) = Σ va = 1, s-1 Hist (va) va
Sum2 (s) = Σ va = s, L-2 Hist (va) va
N1 (s) = Σ va = 1, s-1 Hist (va)
N2 (s) = Σ va = s, L-2 Hist (va)
V1 (s) = Sum1 (s) / N1 (s)
V2 (s) = Sum2 (s) / N2 (s)
W (s) = (V1-V2)
D (s) = N1 (s) N2 (s) W (s) 2

上記〔数式6〕の第1式において、Σの添え字の“va=1,s−1”は、vaが1からs−1までの総和を求めることを示している。同様に、第2式〜第4式においても添え字の範囲で総和を求める。va=0の場合は静脈であることが明らかであり,va=L−1の場合は動脈であることが明らかであり、血管領域に含まれる非眼底領域の画素もva=0(通常眼の場合)またはva=L−1(白内障眼の場合)をとるため、演算の範囲から除外している。また、上記〔数式6〕において、N1(s)は階調値(画素値)sより低階調側の画素個数、N2(s)は階調値(画素値)sより高階調側の画素個数、V1(s)は階調値(画素値)sより低階調側の階調平均値、V2(s)は階調値(画素値)sより高階調側の階調平均値である。例えば、L=256の場合、va=1〜254の範囲を用いて判別分析法の処理を実行していることになる。   In the first formula of the above [Formula 6], the subscript “va = 1, s−1” of Σ indicates that the sum of va from 1 to s−1 is obtained. Similarly, in the second to fourth formulas, the sum is obtained within the range of subscripts. When va = 0, it is clear that it is a vein, and when va = L−1, it is clear that it is an artery, and the pixel of the non-fundus region included in the blood vessel region is also va = 0 (normal eye Case) or va = L−1 (in the case of cataract eyes), it is excluded from the calculation range. In the above [Expression 6], N1 (s) is the number of pixels on the lower gradation side than the gradation value (pixel value) s, and N2 (s) is a pixel on the higher gradation side than the gradation value (pixel value) s. The number, V1 (s) is the gradation average value on the lower gradation side than the gradation value (pixel value) s, and V2 (s) is the gradation average value on the higher gradation side than the gradation value (pixel value) s. . For example, when L = 256, the discriminant analysis process is executed using the range of va = 1 to 254.

上記〔数式6〕の最後の式である判別式に従ってD(s)を算出し、判別値D(s)を最大とするsを二値化(動静脈識別)のしきい値Savに選定する。ステップS500における、しきい値Savを特定する処理は、公知の判別分析法と実質的に同じものとなっている。   D (s) is calculated according to the discriminant that is the last equation of the above [Formula 6], and s that maximizes the discriminant value D (s) is selected as the threshold value Sav for binarization (arterial vein identification). . The process of specifying the threshold value Sav in step S500 is substantially the same as a known discriminant analysis method.

図8は、L=256としたときの、256階調色相ヒストグラムを示す図である。図8の例では、中央値hc=1032、最小値cmin=1023、最大値cmax=1037である場合に、しきい値Sav=201が特定された例を示している。   FIG. 8 is a diagram showing a 256 tone hue histogram when L = 256. The example of FIG. 8 shows an example in which the threshold value Sav = 201 is specified when the median value hc = 1032, the minimum value cmin = 1023, and the maximum value cmax = 1037.

しきい値Savが得られたら、次に、動静脈識別画像生成手段60が、動静脈識別画像を生成する(ステップS600)。具体的には、まず、以下の〔数式7〕に従った処理を実行することにより動静脈識別画像Hues(x,y)を得る。   If the threshold value Sav is obtained, then the arteriovenous identification image generating means 60 generates an arteriovenous identification image (step S600). Specifically, first, an arteriovenous identification image Hues (x, y) is obtained by executing processing according to the following [Equation 7].

〔数式7〕
Tray(x,y)>128のとき、h2=(Hue(x,y)−Sav)×2
Tray(x,y)≦128のとき、h2=0
|h2|>255の場合、|h2|←255(正負符号はそのまま)
Hues(x,y)=h2(正負の符号付き)
[Formula 7]
When Tray (x, y)> 128, h2 = (Hue (x, y) −Sav) × 2
H2 = 0 when Tray (x, y) ≦ 128
When | h2 |> 255, | h2 | ← 255 (the sign is the same)
Hues (x, y) = h2 (with positive and negative signs)

〔数式7〕においては、L階調変換画像Hue(x,y)としきい値Savとの比較結果に基づいて、Hues(x,y)を求めている。〔数式7〕に従った処理の結果、動脈である可能性の高い画素(x,y)は正の値を持ち、静脈である可能性の高い画素(x,y)は負の値を持つ動静脈識別画像Hues(x,y)が得られる。すなわち、動静脈識別画像Hues(x,y)の各画素には、正負の符号により動脈または静脈の属性が付与されている。   In [Formula 7], Hues (x, y) is obtained based on the comparison result between the L gradation converted image Hue (x, y) and the threshold value Sav. As a result of the processing according to [Formula 7], a pixel (x, y) that is likely to be an artery has a positive value, and a pixel (x, y) that is likely to be a vein has a negative value. An arteriovenous identification image Hues (x, y) is obtained. In other words, an artery or vein attribute is given to each pixel of the arteriovenous identification image Hues (x, y) by a positive or negative sign.

動静脈識別画像生成手段60は、さらに、以下の〔数式8〕に従った処理を実行することにより動静脈判定結果画像AVsep(x,y,c)を得る。   The arteriovenous identification image generation means 60 further obtains an arteriovenous determination result image AVsep (x, y, c) by executing processing according to the following [Equation 8].

〔数式8〕
AVsep(x,y,0)=(Hues(x,y)/2+L/2)×Tray(x,y)/(L−1)
AVsep(x,y,1)=Tray(x,y)/4
AVsep(x,y,2)=(−Hues(x,y)/2+L/2)×Tray2(x,y)/(L−1)
[Formula 8]
AVsep (x, y, 0) = (Hues (x, y) / 2 + L / 2) × Tray (x, y) / (L−1)
AVsep (x, y, 1) = Tray (x, y) / 4
AVsep (x, y, 2) = (− Hues (x, y) / 2 + L / 2) × Tray2 (x, y) / (L−1)

動静脈判定結果画像AVsep(x,y,c)においても、フルカラー眼底画像Image(x,y,c)と同様、色成分を示す変数c=0(Red),1(Green),2(Blue)となっている。動脈の場合はRed成分が大きくなるとともにBlue成分が小さくなり、静脈の場合はBlue成分が大きくなるとともに、Red成分が大きくなり、Green成分は血管領域であれば大きくなり、血管領域であるか否かを識別する作用をもたせているが、動脈と静脈の視覚的な識別を容易にするため、血管強調画像の画素値を大きく削減している。得られた動静脈判定結果画像AVsep(x,y,c)において、L=256の場合、一般的なフルカラー画像として表示させることができ、動脈、静脈の別を視覚的に把握することができる。   In the arteriovenous determination result image AVsep (x, y, c) as well as the full-color fundus image Image (x, y, c), variables c = 0 (Red), 1 (Green), 2 (Blue) indicating color components ). In the case of arteries, the Red component increases and the Blue component decreases, and in the case of veins, the Blue component increases and the Red component increases, and the Green component increases in the blood vessel region. However, in order to facilitate visual discrimination between the arteries and veins, the pixel values of the blood vessel emphasized image are greatly reduced. In the obtained arteriovenous determination result image AVsep (x, y, c), when L = 256, it can be displayed as a general full-color image, and the distinction between an artery and a vein can be visually grasped. .

動静脈識別画像Hues(x,y)が得られたら、次に、動静脈径比算出手段65が、動静脈識別画像で識別されている動脈領域および静脈領域に対応する元の眼底画像の領域を参照しながら公知の手法により動静脈径比を算出する(ステップS700)。   Once the arteriovenous identification image Hues (x, y) is obtained, the arterial / venous diameter ratio calculating unit 65 then performs the region of the original fundus image corresponding to the arterial region and the vein region identified in the arteriovenous identification image. , The arteriovenous diameter ratio is calculated by a known method (step S700).

上記実施形態では、動静脈識別画像生成手段60が〔数式7〕に従って算出した動静脈識別画像Hues(x,y)を用いて、そのまま動静脈径比を算出したが、L階調色相変換画像Hue(x,y)の色相値に対して単一のしきい値Savだけで動静脈を二値判定する方法では、動静脈の判定が誤った画素が少なからず存在する。動静脈識別画像Hues(x,y)において誤った動静脈の属性が付与された画素を補正し、補正後の動静脈識別画像Hues(x,y)を用いて動静脈径比を算出する方が高精度な結果を得ることができる。このような補正は、動静脈識別画像補正手段67により行われるが、はじめに、提案する補正方法の原理を説明する。動脈に流れる血液は、酸素が結合したヘモグロビンをもつ赤血球が主に流れるため色相値は赤色に傾き、静脈に流れる血液は、二酸化炭素が結合したヘモグロビンをもつ赤血球が主に流れるため色相値は青色に傾くが、部分的には動脈に静脈血が流れたり、その逆もあるため、色相値だけで動静脈を完全に判別することはできない。動静脈の判定が誤った画素を補正する方法としては、血管属性の一貫性を活用することが考えられる。一連の血管とみなせる領域の動脈または静脈の属性が部分的に反転することは有りえないため、動脈と静脈の属性が局所的に反転している箇所があれば、誤りであると補正することができる。しかし、血管は分岐したり交差したりするため、一連の血管とみなせる領域を2次元の眼底画像から抽出することは難しい。そこで、本願では一連の血管の一部とみなせる血管領域内の連結した画素ブロックに注目し、前記ブロック内で動脈と静脈の属性が局所的に反転している画素を補正する方法を2つ提案する。以下に、動静脈識別画像補正手段67が行う補正について、2通りの手法を説明する。   In the above embodiment, the arteriovenous identification image Hues (x, y) calculated by the arteriovenous identification image generating means 60 according to [Equation 7] is used to calculate the arteriovenous diameter ratio as it is. In the method of binary determination of the arteriovenous only with a single threshold value Sav with respect to the hue value of the image Hue (x, y), there are not a few pixels in which the determination of the arteriovenous is erroneous. A method of correcting a pixel to which an incorrect arteriovenous attribute is given in an arteriovenous identification image Hues (x, y) and calculating an arteriovenous diameter ratio using the corrected arteriovenous identification image Hues (x, y) However, highly accurate results can be obtained. Such correction is performed by the arteriovenous identification image correction means 67. First, the principle of the proposed correction method will be described. Blood flowing through the artery mainly flows red blood cells with oxygen-bound hemoglobin, so the hue value is inclined to red, while blood flowing through the veins flows mainly through red blood cells with hemoglobin bound with carbon dioxide, so the hue value is blue. However, since venous blood flows partially in the artery and vice versa, it is not possible to completely distinguish the arteries and veins from the hue value alone. As a method for correcting pixels in which the determination of arteriovenous is wrong, it is conceivable to utilize the consistency of blood vessel attributes. The attribute of an artery or vein in a region that can be regarded as a series of blood vessels cannot be partially reversed, so if there is a place where the attribute of the artery and vein is locally reversed, correct it as an error. Can do. However, since blood vessels branch or intersect, it is difficult to extract a region that can be regarded as a series of blood vessels from a two-dimensional fundus image. Therefore, in this application, paying attention to connected pixel blocks in a blood vessel region that can be regarded as a part of a series of blood vessels, two methods for correcting pixels in which the attributes of arteries and veins are locally inverted in the block are proposed. To do. Hereinafter, two methods of correction performed by the arteriovenous identification image correcting unit 67 will be described.

第1の手法について説明する。第1の手法では、ステップS600における動静脈識別画像Hues(x,y)の生成後、動静脈識別画像補正手段67は、まず、kをL−2(最大値(L−1)−1)〜1に順次変化させ、符号付き色相値の絶対値|Hues(x,y)|=kを満たす画素(x,y)を補正対象画素として探索する。その補正対象画素(x,y)の8近傍の画素(x+u,y+v)(u=−1,0,1;v=−1,0,1;u=v=0を除く)の符号付き色相値に対して、以下の〔数式9〕に従った処理を実行し、正符号の色相値総和Cp、負符号の色相値総和Cnを算出する。   The first method will be described. In the first method, after generating the arteriovenous identification image Hues (x, y) in step S600, the arterial and vein identification image correcting means 67 first sets k to L-2 (maximum value (L-1) -1). The pixel (x, y) satisfying the absolute value | Hues (x, y) | = k of the signed hue value is sequentially searched as a correction target pixel. Signed hues of 8 neighboring pixels (x + u, y + v) (excluding u = -1, 0, 1; v = -1, 0, 1; u = v = 0) of the correction target pixel (x, y) The processing according to the following [Equation 9] is executed on the value to calculate the positive sign hue value sum Cp and the negative sign hue value sum Cn.

〔数式9〕
Cp=Σu=-1,1Σv=-1,1; Hues(x+u,y+v)>0Hues(x+u,y+v)
Cn=−Σu=-1,1Σv=-1,1; Hues(x+u,y+v)<0Hues(x+u,y+v)
[Formula 9]
Cp = Σ u = -1,1 Σ v = -1,1; Hues (x + u, y + v)> 0 Hues (x + u, y + v)
Cn = −Σu = -1,1 Σv = -1,1; Hues (x + u, y + v) <0 Hues (x + u, y + v)

〔数式9〕において、第1式は、8近傍の画素のうち正の値をとる色相値の総和を算出するためのものであり、第2式は、8近傍の画素のうち負の値をとる色相値絶対値の総和を算出するためのものである。続いて、8近傍の画素(x+u,y+v)のうち絶対値が最大となる色相値をHues(x+um,y+vm)とし、以下の〔数式10〕に従った処理を実行し、補正された動静脈識別画像Hues(x,y)を得る。   In [Equation 9], the first expression is for calculating the sum of hue values that take a positive value among the eight neighboring pixels, and the second expression is a negative value among the eight neighboring pixels. This is for calculating the total sum of the hue value absolute values. Subsequently, Hue (x + um, y + vm) having the maximum absolute value among the eight neighboring pixels (x + u, y + v) is set to Hues (x + um, y + vm), and processing according to the following [Equation 10] is executed to correct the corrected arteriovenous vein An identification image Hues (x, y) is obtained.

〔数式10〕
|Hues(x+um,y+vm)|>|Hues(x,y)|を満たし(第1条件)、
Hues(x+um,y+vm)>0かつCp>Cn(第2条件)、またはHues(x+um,y+vm)<0かつCp<Cn(第3条件)を満たす場合、
Hues(x,y)←Hues(x+um,y+vm)
[Formula 10]
| Hues (x + um, y + vm) |> | Hues (x, y) | is satisfied (first condition),
When Hues (x + um, y + vm)> 0 and Cp> Cn (second condition), or Hues (x + um, y + vm) <0 and Cp <Cn (third condition) are satisfied,
Hues (x, y) <-Hues (x + um, y + vm)

〔数式10〕においては、第1条件を満たし、第2条件または第3条件を満たす場合に、符号付き色相値Hues(x,y)がHues(x+um,y+vm)の値に置換されることになる。第2条件における“Hues(x+um,y+vm)>0”は画素の属性が動脈であることを示し、第3条件における“Hues(x+um,y+vm)<0”は画素の属性が静脈であることを示している。また、第1条件は、探索された補正対象画素の画素値の絶対値|Hues(x,y)|をZTとし、補正対象画素の8近傍画素の中で画素値の絶対値の最大値|Hues(x+um,y+vm)|をZMとすると、ZM>ZTと表現することもできる。探索された補正対象画素(x,y)に対して、〔数式10〕に従った処理を実行したら、同一のkの値で探索された符号付き色相値の絶対値|Hues(x,y)|=kを満たす他の画素(x,y)に対して、同様に〔数式9〕〔数式10〕に従った処理を実行する。|Hues(x,y)|=kを満たす全ての画素(x,y)に対して前述の処理を実行したら、kの値をデクリメントし、|Hues(x,y)|=kを満たす画素を探索し、|Hues(x,y)|=kを満たす全ての画素(x,y)に対して前述の処理を実行する。kの値をデクリメントした結果、k=0になったら、動静脈識別画像補正手段67による第1の手法に基づく処理は終了とする。
図9は、第1の手法による動静脈識別画像Hues(x,y)の補正の一例を示す図である。図9(a)は動静脈識別画像Hues(x,y)の中でk=70の条件で探索された画素の一例とその画素の8近傍を示す。図9(a)(b)にそれぞれ示す9個の画素のうち、中央に示す画素が探索された補正対象の画素(x,y)であり、他の画素は8近傍画素(x+u,y+v)(u=−1,0,1;v=−1,0,1;u=v=0を除く)である。図9(a)の例で、〔数式9〕に従った処理を実行すると、Cp=60+180+130+110=380となり、Cn=−(−20−60−40−30)=150となり、絶対値が最大となる色相値Hues(x+um,y+vm)=130となる。
In [Formula 10], when the first condition is satisfied and the second condition or the third condition is satisfied, the signed hue value Hues (x, y) is replaced with the value of Hues (x + um, y + vm). Become. “Hues (x + um, y + vm)> 0” in the second condition indicates that the pixel attribute is an artery, and “Hues (x + um, y + vm) <0” in the third condition indicates that the pixel attribute is a vein. Show. The first condition is that the absolute value | Hues (x, y) | of the pixel value of the searched correction target pixel is ZT, and the maximum absolute value of the pixel value among the eight neighboring pixels of the correction target pixel | If Hues (x + um, y + vm) | is ZM, it can also be expressed as ZM> ZT. If the processing according to [Equation 10] is executed for the searched correction target pixel (x, y), the absolute value of the signed hue value searched with the same value of k | Hues (x, y) Similarly, the processing according to [Equation 9] and [Equation 10] is executed for other pixels (x, y) satisfying | = k. When the above processing is executed for all pixels (x, y) satisfying | Hues (x, y) | = k, the value of k is decremented, and pixels satisfying | Hues (x, y) | = k And the above-described processing is executed for all pixels (x, y) that satisfy | Hues (x, y) | = k. As a result of decrementing the value of k, when k = 0, the processing based on the first technique by the arteriovenous identification image correcting unit 67 is ended.
FIG. 9 is a diagram illustrating an example of correction of the arteriovenous identification image Hues (x, y) by the first method. FIG. 9A shows an example of a pixel searched under the condition of k = 70 in the arteriovenous identification image Hues (x, y) and 8 neighborhoods of the pixel. Of the nine pixels shown in FIGS. 9A and 9B, the pixel shown in the center is the pixel (x, y) to be corrected, and the other pixels are eight neighboring pixels (x + u, y + v). (Excluding u = -1, 0, 1; v = -1, 0, 1; u = v = 0). In the example of FIG. 9A, when the processing according to [Formula 9] is executed, Cp = 60 + 180 + 130 + 110 = 380, Cn = − (− 20−60−40−30) = 150, and the absolute value is maximum. The hue value Hues (x + um, y + vm) = 130.

図9(a)の場合、〔数式10〕の第1条件は|130|>|−70|となるため、本条件を満たし、第2条件は130>0かつ380>150となるため、本条件を満たす。したがって、図9(b)に示すように、〔数式10〕に従い中央の画素が(x,y)の値が、130に置き換えられることになる。図9(a)から図9(b)に変換するのと同様な処理を、k=70の条件で探索された他の画素に対して実行するとともに、kの値を254から1に変えた条件で探索された全ての画素に対して実行する。   In the case of FIG. 9A, since the first condition of [Equation 10] is | 130 |> | −70 |, this condition is satisfied, and the second condition is 130> 0 and 380> 150. Meet the conditions. Therefore, as shown in FIG. 9B, the value of (x, y) in the center pixel is replaced with 130 in accordance with [Formula 10]. The same processing as converting from FIG. 9A to FIG. 9B is executed for other pixels searched under the condition of k = 70, and the value of k is changed from 254 to 1. This is executed for all the pixels searched by the condition.

第2の手法について説明する。第2の手法は、実質的にはモルフォロジー膨張処理である。第2の手法では、ステップS600における動静脈識別画像Hues(x,y)の生成後、動静脈識別画像補正手段67は、まず、−255〜255の値をもつ動静脈識別画像において、モルフォロジーのサイズを(2N+1)×(2N+1)とすると、N≦x≦Xs−N−1,N≦y≦Ys−N−1の各画素(x,y)の周辺(2N+1)×(2N+1)画素(N≧1)の画素ブロックを順次抽出する。Nの値としては、眼底画像のサイズが1280×1024画素の場合、第1の方法のようにN=1(3×3画素)では効果が弱いため、N=3(7×7画素)以上に設定することが望ましい。そして、各画素ブロックに対して、〔数式9〕と同様な以下の〔数式11〕に従った処理を実行し、正符号の色相値を持つ色相値の総和Cpa、負符号の色相値を持つ色相値の絶対値の総和Cnaを計数する。   The second method will be described. The second method is substantially a morphological expansion process. In the second method, after the generation of the arteriovenous identification image Hues (x, y) in step S600, the arteriovenous identification image correcting unit 67 first determines the morphology of the arteriovenous identification image having a value of −255 to 255. Assuming that the size is (2N + 1) × (2N + 1), (2N + 1) × (2N + 1) pixels (2N + 1) × (2N + 1) pixels around each pixel (x, y) where N ≦ x ≦ Xs−N−1 and N ≦ y ≦ Ys−N−1. N ≧ 1) pixel blocks are sequentially extracted. As the value of N, when the size of the fundus image is 1280 × 1024 pixels, N = 1 (3 × 3 pixels) is not effective as in the first method, and therefore N = 3 (7 × 7 pixels) or more. It is desirable to set to. Then, the processing according to the following [Equation 11] similar to [Equation 9] is executed for each pixel block, and the sum Cpa of hue values having a positive sign hue value and a hue value having a negative sign are obtained. The sum total Cna of absolute values of hue values is counted.

〔数式11〕
Cpa=Σu=-N,NΣv=-N,N; Hues(x+u,y+v)>0Hues(x+u,y+v)
Cna=−Σu=-N,NΣv=-N,N; Hues(x+u,y+v)<0Hues(x+u,y+v)
[Formula 11]
Cpa = Σu = −N, N Σv = −N, N; Hues (x + u, y + v)> 0 Hues (x + u, y + v)
Cna = −Σu = −N, N Σv = −N, N; Hues (x + u, y + v) <0 Hues (x + u, y + v)

そして、Cpa>Cnaの場合、中央の画素の色相値Hues(x,y)の符号を正にする。また、Cpa<Cnaの場合、中央の画素の色相値Hues(x,y)の符号を負にする。いずれも絶対値の変更は行わない。このようにして、(N,N)から(Xs−N−1,Ys−N−1)の範囲の(Xs−2N)×(Ys−2N)個の全ての画素に対して、周辺の(2N+1)×(2N+1)個の画素ブロックを参照しながら、同様な補正処理を繰り返す。この時、隣接する画素の周辺の画素ブロックには既に補正を行った画素が含まれるが、本願では更新後の色相値を用いる(更新前の色相値を用いる方法もあるが、更新後の色相値を用いる方法に比べ補正効果が強くなる)。また、(Xs−2N)×(Ys−2N)個の全ての画素に対して補正処理が終了しても補正効果が不十分であることが多いため、(Xs−2N)×(Ys−2N)個の全ての画素に対する補正処理を複数回繰り返すことが望ましい。本願では6回繰り返すようにしている。   When Cpa> Cna, the sign of the hue value Hues (x, y) of the center pixel is made positive. When Cpa <Cna, the sign of the hue value Hues (x, y) of the center pixel is negative. In either case, the absolute value is not changed. In this way, for all (Xs−2N) × (Ys−2N) pixels in the range from (N, N) to (Xs−N−1, Ys−N−1), the peripheral ( Similar correction processing is repeated while referring to 2N + 1) × (2N + 1) pixel blocks. At this time, the pixel block around the adjacent pixel includes a pixel that has already been corrected. In this application, the updated hue value is used (there is a method using the hue value before update, The correction effect is stronger than the method using the value). Further, since the correction effect is often insufficient even when the correction processing is completed for all the (Xs−2N) × (Ys−2N) pixels, (Xs−2N) × (Ys−2N). It is desirable to repeat the correction process for all the pixels a plurality of times. In this application, it is repeated 6 times.

図10は、第2の手法による動静脈識別画像Hues(x,y)の補正の一例を示す図である。図10(a)(b)にそれぞれ示す25個の画素のうち、中央の画素が(x,y)であり、周辺の24画素が(x+u,y+v)(−N≦u≦N,−N≦v≦N;N=2)である。図10(a)の例では、〔数式11〕に従い、Cpa=1350となり、Cna=470となる。   FIG. 10 is a diagram illustrating an example of correction of the arteriovenous identification image Hues (x, y) by the second method. Of the 25 pixels shown in FIGS. 10A and 10B, the center pixel is (x, y), and the surrounding 24 pixels are (x + u, y + v) (−N ≦ u ≦ N, −N). ≦ v ≦ N; N = 2). In the example of FIG. 10A, Cpa = 1350 and Cna = 470 according to [Formula 11].

図10(a)の場合、Cpa(=1350)>Cna(=470)であるため、図10(b)に示すように、5×5個の中央の画素の色相値Hues(x,y)の符号が正に変換されることになる。   In the case of FIG. 10A, since Cpa (= 1350)> Cna (= 470), as shown in FIG. 10B, the hue value Hues (x, y) of 5 × 5 central pixels. Will be converted to a positive sign.

動静脈識別画像生成手段60により生成され、または動静脈識別画像補正手段67により補正された動静脈判定結果画像AVsep(x,y,c)は、表示部6に表示することができる。   The arteriovenous determination result image AVsep (x, y, c) generated by the arteriovenous identification image generating unit 60 or corrected by the arteriovenous identification image correcting unit 67 can be displayed on the display unit 6.

また、動静脈識別画像生成手段60は、フルカラー動静脈判定結果画像AVsep(x,y,c)から2種のグレースケール動静脈判定結果画像を生成することができる。具体的には、以下の〔数式12〕に従った処理を実行し、グレースケール動静脈判定結果画像を生成する。   In addition, the arteriovenous identification image generating means 60 can generate two types of gray scale arteriovenous determination result images from the full-color arteriovenous determination result image AVsep (x, y, c). Specifically, processing according to the following [Equation 12] is executed to generate a grayscale arteriovenous determination result image.

〔数式12〕
av=AVsep(x,y,1)×4
AVsep(x,y,0)>AVsep(x,y,2)のとき、
h3=(AVsep(x,y,0)×255/av−128)×2
AVsep(x,y,0)<AVsep(x,y,2)のとき、
h3=−(AVsep(x,y,2)×255/av−128)×2
AVsep(x,y,0)=AVsep(x,y,2)のとき、h3=0
h3<−255の場合、h3←−255
h3>255の場合、h3←255
[Formula 12]
av = AVsep (x, y, 1) × 4
When AVsep (x, y, 0)> AVsep (x, y, 2),
h3 = (AVsep (x, y, 0) × 255 / av−128) × 2
When AVsep (x, y, 0) <AVsep (x, y, 2),
h3 = − (AVsep (x, y, 2) × 255 / av−128) × 2
When AVsep (x, y, 0) = AVsep (x, y, 2), h3 = 0
When h3 <−255, h3 ← −255
If h3> 255, h3 ← 255

動脈像をグレースケールで表示する場合、R=G=B=h3×av/128とし、静脈像をグレースケールで表示する場合、R=G=B=−h3×av/128とし、RGB同一の階調で表示させる。ただし、0≦R,G,B≦255の範囲を超えないようにする。   When displaying an arterial image in gray scale, R = G = B = h3 × av / 128, and when displaying a vein image in gray scale, R = G = B = −h3 × av / 128, which is identical to RGB. Display with gradation. However, the range of 0 ≦ R, G, B ≦ 255 should not be exceeded.

図11〜図13は、図4(a)に示す通常眼のフルカラー眼底画像に対して、前述の一連処理に基づいて動静脈判定結果画像AVsepを生成した例を示す図である。図11は、動静脈識別画像生成手段60により生成され動静脈識別画像補正手段67による補正を行っていない場合、図12は、動静脈識別画像補正手段67により第1の手法を用いて補正を行った場合、図13は、動静脈識別画像補正手段67により第1の手法および第2の手法を用いて補正を行った場合を示している。第2の手法はN=3に設定し、694×599画素(原画像:700×605画素)に対する一連の補正処理を6回繰り返している。図11〜図13のいずれも左側の図がフルカラー表示、右側上段が動脈のグレースケール表示、右側下段が静脈のグレースケール表示である。また、本願発明は前述の通り白内障眼にも対応している。図14は、図4に対応する白内障眼のフルカラー眼底画像と血管強調画像の別の一例を示す図である。図15と図16は、図14(a)に示す700×605画素の白内障眼のフルカラー眼底画像に対して、前述の一連処理に基づいて動静脈判定結果画像AVsepを生成した例を示す図である。図15は、動静脈識別画像生成手段60により生成され動静脈識別画像補正手段67による補正を行っていない場合で、図14(b)に示す血管強調画像を生成し、図示は省略するが、図7と同様な256階調変換画像を作成し、前述の判別分析法によりしきい値Sav=89と算出し、動静脈判定結果画像AVsepを生成したものである。通常眼の図11に比べ、ブルー成分に富むため、Savの値が顕著に低く静脈側に傾いていることが分かる。また、通常眼の図11では、血管領域に含まれる撮影時の枠線など非眼底領域の画素値は静脈側の−255という値が多くなるが、白内障眼の図15では、動脈側の+255という値が多くなる。図16は、図13と同様に動静脈識別画像補正手段67により第1の手法および第2の手法を用いて補正を行った場合を示している。第2の手法は同様にN=3に設定し、694×599画素(原画像:700×605画素)に対する一連の補正処理を6回繰り返している。図15と図16のいずれも左側の図がフルカラー表示、右側上段が動脈のグレースケール表示、右側下段が静脈のグレースケール表示である。   FIGS. 11 to 13 are diagrams illustrating an example in which the arteriovenous determination result image AVsep is generated based on the above-described series of processing for the full-color fundus image of the normal eye illustrated in FIG. FIG. 11 shows the case where the correction is made by the arteriovenous identification image correction unit 67 and is generated by the arteriovenous identification image generation unit 60, and FIG. FIG. 13 shows a case where correction is performed by the arteriovenous identification image correcting means 67 using the first method and the second method. In the second method, N = 3 is set, and a series of correction processing for 694 × 599 pixels (original image: 700 × 605 pixels) is repeated six times. In each of FIGS. 11 to 13, the left side is a full color display, the upper right side is a gray scale display of an artery, and the lower right side is a gray scale display of a vein. The present invention also supports cataract eyes as described above. FIG. 14 is a diagram illustrating another example of a full-color fundus image of a cataract eye and a blood vessel emphasized image corresponding to FIG. FIGS. 15 and 16 are diagrams illustrating an example in which the arteriovenous determination result image AVsep is generated based on the above-described series of processing for the 700 × 605 pixel full-color fundus image of the cataract eye illustrated in FIG. is there. FIG. 15 shows a case where the blood vessel emphasis image shown in FIG. 14B is generated by the arteriovenous identification image generating unit 60 and not corrected by the arterial and vein identification image correcting unit 67, and is not shown. A 256-gradation conversion image similar to that in FIG. 7 is created, the threshold value Sav = 89 is calculated by the above-described discriminant analysis method, and an arteriovenous determination result image AVsep is generated. Compared to FIG. 11 of the normal eye, it is rich in blue components, and thus it can be seen that the value of Sav is remarkably low and tilted toward the vein side. Further, in FIG. 11 for the normal eye, the pixel value of the non-fundus region such as a frame line included in the blood vessel region has a value of −255 on the vein side, but in FIG. 15 for the cataract eye, +255 on the arterial side. The value will increase. FIG. 16 shows a case where correction is performed using the first method and the second method by the arteriovenous identification image correcting unit 67 as in FIG. 13. In the second method, N = 3 is similarly set, and a series of correction processing for 694 × 599 pixels (original image: 700 × 605 pixels) is repeated six times. In both of FIGS. 15 and 16, the left figure is a full color display, the upper right side is a gray scale display of an artery, and the lower right side is a gray scale display of a vein.

更に、動静脈識別画像生成手段60は、指示入力I/Fを介した外部からの指示に基づいて、対話的に、フルカラー動静脈判定結果画像AVsep(x,y,c)を修正することもできる。具体的には、ユーザにより修正領域(x1≦x≦x2,y1≦y≦y2)と動脈または静脈の属性変更が指示された場合に、その領域内の血管領域の対象画素の属性を全て動脈または静脈に変更する。詳細には、対象画素がAVsep(x,y,0)>AVsep(x,y,2)で動脈への属性変更の場合は、そのまま変更しない。対象画素がAVsep(x,y,0)>AVsep(x,y,2)で静脈への属性変更の場合は、AVsep(x,y,0)とAVsep(x,y,2)の値を互いに逆転させる。対象画素がAVsep(x,y,0)<AVsep(x,y,2)で動脈への属性変更の場合は、AVsep(x,y,0)とAVsep(x,y,2)の値を互いに逆転させる。対象画素がAVsep(x,y,0)<AVsep(x,y,2)で静脈への属性変更の場合は、そのまま変更しない。   Further, the arteriovenous identification image generating means 60 may interactively correct the full-color arteriovenous determination result image AVsep (x, y, c) based on an external instruction via the instruction input I / F. it can. Specifically, when the user has instructed to change the attribute of the correction region (x1 ≦ x ≦ x2, y1 ≦ y ≦ y2) and the artery or vein, all the attributes of the target pixels of the blood vessel region in the region Or change to veins. More specifically, when the target pixel is AVsep (x, y, 0)> AVsep (x, y, 2) and the attribute is changed to the artery, it is not changed as it is. When the target pixel is AVsep (x, y, 0)> AVsep (x, y, 2) and the attribute is changed to a vein, the values of AVsep (x, y, 0) and AVsep (x, y, 2) are set. Reverse each other. When the target pixel is AVsep (x, y, 0) <AVsep (x, y, 2) and the attribute is changed to an artery, the values of AVsep (x, y, 0) and AVsep (x, y, 2) are set. Reverse each other. When the target pixel is AVsep (x, y, 0) <AVsep (x, y, 2) and the attribute is changed to the vein, it is not changed as it is.

<3.血管領域強調手段>
次に、血管領域強調手段10、および血管領域強調手段10が行うステップS100の血管領域強調処理の詳細について説明する。図17は、血管領域強調手段10の詳細を示す機能ブロック図である。図17において、11はグレースケール変換手段、12は画像平坦化手段、13は線状成分強調手段、14は画素階調変換手段である。
<3. Blood vessel region enhancement means>
Next, details of the blood vessel region emphasizing unit 10 and the blood vessel region emphasizing process in step S100 performed by the blood vessel region emphasizing unit 10 will be described. FIG. 17 is a functional block diagram showing details of the blood vessel region enhancement means 10. In FIG. 17, 11 is a gray scale conversion means, 12 is an image flattening means, 13 is a linear component enhancement means, and 14 is a pixel gradation conversion means.

図18は、血管領域強調手段10によるステップS100の血管領域強調処理の詳細を示すフローチャートである。グレースケール変換手段11は、フルカラー眼底画像Image(x,y,c)に対して、以下の〔数式13〕に従った処理を実行することによりグレースケール変換する(ステップS110)。   FIG. 18 is a flowchart showing details of the blood vessel region enhancement processing in step S100 by the blood vessel region enhancement means 10. The gray scale conversion means 11 performs gray scale conversion on the full-color fundus image Image (x, y, c) by executing processing according to the following [Equation 13] (step S110).

〔数式13〕
Gr(x,y)=Image(x,y,1)
[Formula 13]
Gr (x, y) = Image (x, y, 1)

上記〔数式13〕において、Image(x,y,1)は、フルカラー眼底画像のうち、G(グリーン、緑)の成分を示している。したがって、上記〔数式13〕においては、各画素のG成分のみを抽出し、グレースケール形式の画像Gr(x,y)を得ている。一般に健常者の眼底画像は、主にG成分とB成分に血管像が現れる。一方、白内障の症状が進んだ患者の眼底画像は、B成分の血管像が健常者に比べてネガポジ反転したり(背景部のB成分の輝度が血管領域に対して向上する)、不鮮明になる。そのため、単一の色成分であるG成分を抽出することにより健常者、白内障患者の双方の血管成分を抽出し易くなる。   In the above [Equation 13], Image (x, y, 1) represents a G (green, green) component of the full-color fundus image. Therefore, in the above [Equation 13], only the G component of each pixel is extracted to obtain a grayscale image Gr (x, y). In general, in a fundus image of a healthy person, blood vessel images appear mainly in the G component and the B component. On the other hand, in the fundus image of a patient with advanced cataract symptoms, the B component blood vessel image is negative-positive-inverted compared to a normal subject (the brightness of the B component in the background portion is improved with respect to the blood vessel region) or becomes blurred. . Therefore, by extracting the G component that is a single color component, it becomes easier to extract the blood vessel components of both healthy subjects and cataract patients.

さらに、グレースケール変換手段11は、グレースケール形式の画像Gr(x,y)に対して、以下の〔数式14〕に従った処理を実行することによりネガポジ反転してグレースケール眼底画像Gray(x,y)を得る。ここで、眼底画像に対してネガポジ反転させる理由は、血管候補領域の輝度を高くし背景の非血管候補領域の輝度を低くすることにより、グレースケール眼底画像の血管候補領域に対して疑似カラーで着色することができ、複数のグレースケール眼底画像を合成しても背景部(非血管候補領域)が混ざり合わないため、血管候補領域の位置関係が把握しやすくなるためである。   Further, the gray scale conversion unit 11 performs a process according to the following [Equation 14] on the gray scale image Gr (x, y), thereby performing negative / positive inversion, and gray scale fundus image Gray (x , Y). Here, the reason for negative / positive inversion with respect to the fundus image is that the luminance of the blood vessel candidate region is increased and the luminance of the non-blood vessel candidate region of the background is decreased, so that the blood vessel candidate region of the grayscale fundus image is pseudo-colored. This is because coloring can be performed, and even when a plurality of gray scale fundus images are combined, the background portion (non-blood vessel candidate region) is not mixed, and the positional relationship between the blood vessel candidate regions can be easily grasped.

〔数式14〕
Gray(x,y)=255−Gr(x,y)
[Formula 14]
Gray (x, y) = 255-Gr (x, y)

上記〔数式14〕に従った処理を実行して、ネガポジ反転することにより、周囲に比べ輝度が低い血管領域の画素値が高い状態に変換される。ここで、ネガポジ反転とは、元の画素値の大きいもの程小さい値に変換する処理を意味する。   By executing the processing according to the above [Equation 14] and performing negative / positive inversion, the pixel value of the blood vessel region having a lower luminance than the surroundings is converted into a high state. Here, negative / positive reversal means a process of converting a smaller original pixel value to a smaller value.

グレースケール眼底画像が得られたら、次に、画像平坦化手段12が、所定の範囲に含まれる近傍画素の画素値の平均値を算出し、その画素の画素値に所定の値から平均値を減算した値を加算することにより、平坦化画像を作成する(ステップS120)。具体的には、以下の〔数式15〕に従った処理を実行することにより、グレースケールの平坦化画像Gray´(x,y)を得る。   When the gray scale fundus image is obtained, the image flattening unit 12 calculates the average value of the pixel values of neighboring pixels included in the predetermined range, and calculates the average value from the predetermined value to the pixel value of the pixel. A flattened image is created by adding the subtracted values (step S120). Specifically, a grayscale flattened image Gray ′ (x, y) is obtained by executing processing according to the following [Equation 15].

〔数式15〕
Mean(x,y)=[Σj=-m+1,mΣi=-m+1,mGray(x+i,y+j)}/(4m2
Gray´(x,y)=Gray(x,y)+Mid−Mean(x,y)
[Formula 15]
Mean (x, y) = [Σ j = −m + 1, m Σ i = −m + 1, m Gray (x + i, y + j)} / (4 m 2 )
Gray ′ (x, y) = Gray (x, y) + Mid−Mean (x, y)

上記〔数式15〕において、mは1以上の整数であり、Σの添え字の“j=−m+1,m” “i=−m+1,m”は、jが−m+1からmまで、およびiが−m+1からmまでの4m2個の画素の総和を求めることを示している。すなわち、Mean(x,y)は、画素(x,y)から前後左右m画素の範囲に含まれる近傍画素の画素値の平均値を示している。近傍画素の画素数としては、画像の全画素の1/3000〜1/7000の範囲とすることが好ましい。本実施形態では、m=8として近傍画素を256(=4m2=2m×2m)個としている。これは、グレースケール眼底画像Gray(x,y)が1280×1024画素の場合、約1/50000に相当する。 In the above [Expression 15], m is an integer of 1 or more, and the subscript “j = −m + 1, m” of Σ is “i = −m + 1, m” where j is from −m + 1 to m, and i is The sum of 4m 2 pixels from −m + 1 to m is obtained. That is, Mean (x, y) represents an average value of pixel values of neighboring pixels included in a range of m pixels before, after, from the pixel (x, y). The number of neighboring pixels is preferably in the range of 1/3000 to 1/7000 of all pixels in the image. In the present embodiment, m = 8 and 256 (= 4 m 2 = 2m × 2 m) neighboring pixels. This corresponds to about 1 / 50,000 when the gray scale fundus image Gray (x, y) is 1280 × 1024 pixels.

この平均値Mean(x,y)を用いて、〔数式15〕の第2式により、各画素(x,y)の画素値Gray(x,y)に所定の値Midから平均値Mean(x,y)を減算した値を加算することにより、平坦化画像Gray´(x,y)が得られる。所定の値Midは、画素が取り得る階調の中央値である。本実施形態では、画像が0〜255の値を取り得るため、中央値としては、127、128の2つがあるが、便宜上Mid=128としている。   Using the average value Mean (x, y), the pixel value Gray (x, y) of each pixel (x, y) is changed from the predetermined value Mid to the average value Mean (x , Y) is added to obtain a flattened image Gray ′ (x, y). The predetermined value Mid is a median value of gradations that the pixel can take. In this embodiment, since an image can take a value of 0 to 255, there are two median values of 127 and 128, but for convenience, Mid = 128.

上記平均値Mean(x,y)を算出する際、上記〔数式15〕の第1式に示したように、直接近傍画素の画素値の総和を求めるようにしてもよいが、この手法だと、演算処理の負荷が高い。そのため、本実施形態では、画像平坦化手段12は、以下の〔数式16〕に従った処理を実行することにより、少ない処理負荷で高速に平均値Mean(x,y)を算出するようにしている。   When calculating the average value Mean (x, y), as shown in the first equation of [Equation 15], the sum of the pixel values of neighboring pixels may be obtained directly. The processing load is high. Therefore, in the present embodiment, the image flattening unit 12 calculates the average value Mean (x, y) at high speed with a small processing load by executing processing according to the following [Equation 16]. Yes.

〔数式16〕
S(i,j)=Σjj=0,j-1Σii=0,Xs-1Gray(ii,jj)+Σjj=0,iGray(ii,j)
Mean(x,y)=[S(x+m,y+m)−S(x−m,y+m)−S(x+m,y−m)+S(x−m,y−m)}/(4m2
[Formula 16]
S (i, j) = Σjj = 0, j−1 Σii = 0, Xs−1 Gray (ii, jj) + Σjj = 0, i Gray (ii, j)
Mean (x, y) = [S (x + m, y + m) −S (x−m, y + m) −S (x + m, ym) + S (x−m, ym)} / (4 m 2 )

上記〔数式16〕の第1式において、S(i,j)は、先頭の画素(画像の左上端x=0、y=0)から画素(i,j)までの画素値Gray(ii,jj)の全Xs×j+i+1個の累積値である。   In the first equation of [Equation 16], S (i, j) is a pixel value Gray (ii, j) from the first pixel (upper left corner of the image x = 0, y = 0) to the pixel (i, j). jj) is a cumulative value of all Xs × j + i + 1.

図19は、グレースケール眼底画像上の画素(x,y)と平均値Mean(x,y)を算出するための近傍画素との関係を示す図である。大きな太枠で囲ったように、平均値Mean(x,y)を算出するために、左上方の画素(x−m+1,y−m+1)〜右下方の画素(x+m,y+m)の全2m×2m個の画素値を加算する必要がある。この際、画像の先頭の画素から画素(x,y)までの画素値の累積値S(x,y)を〔数式16〕の第1式を用いて算出しておく。すると、前記2m×2m個の近傍画素と、それらの左方に隣接する画素(x−m,y−m+1)〜画素(x−m,y+m)からなる2m個の画素、それらの上方に隣接する画素(x−m+1,y−m)〜画素(x+m,y−m)からなる2m個の画素、およびそれらの左上方に隣接する画素(x−m,y−m)を加えた各画素は、図19に示したような累積値をもつ。   FIG. 19 is a diagram illustrating a relationship between a pixel (x, y) on a grayscale fundus image and neighboring pixels for calculating an average value Mean (x, y). In order to calculate the average value Mean (x, y) as surrounded by a large thick frame, all 2m × from the upper left pixel (x−m + 1, y−m + 1) to the lower right pixel (x + m, y + m) It is necessary to add 2m pixel values. At this time, a cumulative value S (x, y) of pixel values from the first pixel of the image to the pixel (x, y) is calculated using the first equation of [Equation 16]. Then, 2m × 2m neighboring pixels and 2m pixels composed of pixels (x−m, y−m + 1) to pixels (x−m, y + m) adjacent to the left side thereof are adjacent above them. Each pixel is obtained by adding 2m pixels consisting of pixels (xm + 1, ym) to pixels (x + m, ym) and pixels (xm, ym) adjacent to the upper left of those pixels Has a cumulative value as shown in FIG.

そうすると、平均値Mean(x,y)は、〔数式16〕の第2式に示すように、4つの画素の累積値を加減算するだけの少ない処理負荷で高速に算出することができる。ここで、累積値を加算する4つの画素とは、図19に、小さい太枠で囲った(x+m,y+m)、(x−m,y+m)、(x+m,y−m)、(x−m,y−m)の4画素である。グレースケール眼底画像Gray(x,y)の各画素(x,y)に近傍画素の平均値Mean(x,y)を所定の値Midから減算した値を加算することにより、平坦化画像Gray´(x,y)が得られる。   Then, the average value Mean (x, y) can be calculated at high speed with a small processing load by adding and subtracting the accumulated values of the four pixels, as shown in the second formula of [Formula 16]. Here, the four pixels to which the cumulative value is added are (x + m, y + m), (x−m, y + m), (x + m, ym), and (x−m) surrounded by a small thick frame in FIG. , Ym). By adding a value obtained by subtracting the average value Mean (x, y) of neighboring pixels from a predetermined value Mid to each pixel (x, y) of the grayscale fundus image Gray (x, y), a flattened image Gray ′ is obtained. (X, y) is obtained.

結局、〔数式16〕に従った処理を実行することにより、画像平坦化手段12は、画像のサイズがXs×Ysである前記グレースケール眼底画像に対して、あらかじめ(0,0)から(Xs−1,y−1)の範囲のXs×y個、および(0,y)から(x,y)の範囲のx+1個からなる全Xs×y+x+1個の画素値の総和を各画素(x,y)における累積値S(x,y)として算出する処理を行い、S(x+m,y+m)−S(x−m,y+m)−S(x+m,y−m)+S(x−m,y−m)の値を、2m×2mで除算した値を平均値として算出している。各画素(x,y)における累積値S(x,y)を事前に算出する処理が余分に加わるが、この計算はXs×Ys回の加算演算だけで行える。これに対して、累積値S(x,y)を用いずに、各画素(x,y)における平均値Mean(x,y)を算出しようとすると、各画素ごとに2m×2m回の加算演算が必要となり、トータルXs×Ys×2m×2m回の加算演算が必要となる。これに対して、累積値S(x,y)を用いれば、各画素ごとに4回の加減算で済み、事前の画像全体の累積値計算を含めてトータルXs×Ys×5回の加減算で完結する。   Eventually, by executing the processing according to [Equation 16], the image flattening unit 12 applies (X, 0) to (Xs) in advance for the gray scale fundus image whose image size is Xs × Ys. −1, y−1) in the range of Xs × y, and x + 1 in the range of (0, y) to (x, y), the sum of all Xs × y + x + 1 pixel values is calculated for each pixel (x, A process of calculating as a cumulative value S (x, y) in y) is performed, and S (x + m, y + m) −S (x−m, y + m) −S (x + m, ym) + S (x−m, y−). A value obtained by dividing the value of m) by 2 m × 2 m is calculated as an average value. Although an extra process for calculating the accumulated value S (x, y) in each pixel (x, y) is added in advance, this calculation can be performed only by Xs × Ys addition operations. On the other hand, if the average value Mean (x, y) at each pixel (x, y) is calculated without using the cumulative value S (x, y), 2m × 2m addition is performed for each pixel. An operation is required, and a total Xs × Ys × 2m × 2m addition operation is required. On the other hand, if the cumulative value S (x, y) is used, four additions / subtractions are required for each pixel, and a total of Xs × Ys × 5 additions / subtractions including the cumulative value calculation for the entire image in advance is completed. To do.

平坦化画像が得られたら、次に、線状成分強調手段13が、平坦化画像に対して、オープニング処理(収縮・膨張処理)を行って線状成分の強調を行い、線状成分強調画像を得る(ステップS130)。図20は、ステップS130における線状成分強調の処理動作を示すフローチャートである。   Once the flattened image is obtained, the linear component enhancing means 13 performs an opening process (shrinkage / expansion process) on the flattened image to emphasize the linear component, and the linear component emphasized image. Is obtained (step S130). FIG. 20 is a flowchart showing the linear component enhancement processing operation in step S130.

まず、線状成分強調手段13は、画像平坦化手段12により得られた平坦化画像に対して、8種の線形構造要素によるオープニング処理を行う(ステップS131)。ステップS131のオープニング処理では、線形構造要素を複数個用いて、複数の線形オープニング画像を作成する。本実施形態では、指定構造要素として8個の線形構造要素を用いる。これは、方向が8方向に異なる線形の構造要素である線形構造要素である。図21は、本実施形態で用いる線形構造要素の一例を示す図である。   First, the linear component enhancement unit 13 performs an opening process using eight types of linear structural elements on the flattened image obtained by the image flattening unit 12 (step S131). In the opening process in step S131, a plurality of linear opening images are created using a plurality of linear structural elements. In the present embodiment, eight linear structural elements are used as designated structural elements. This is a linear structural element that is a linear structural element whose direction is different in eight directions. FIG. 21 is a diagram illustrating an example of a linear structural element used in the present embodiment.

図21に示す線形構造要素は、マスクとしての役割を果たすものであるため、二値画像である。そのため、図21において、“0”と表記された画素の値は“0”であるが、“0”以外の数値が表記された画素の値は、8種類の各方向dに応じて“1”となり、他の方向のとき“0”である。図21における“0”以外の数字は方向を示している。“1”は水平方向(図面左右方向)であり、以後数字が1増えるに従って22.5度間隔で方向が変化する。“2” “4”“6”“8”については、画素の格子状配置の関係から、同一数字の列が直線上に配列することができないため、近傍の区画に配置されている。“234”や“678”などの3桁の数字は、それぞれ“2” “3”“4”の3方向、“6”“7”“8”の3方向のいずれかの方向の場合に、画素値が“1”となることを示している。なお、“9”は中心となる画素を示しており、中心となる画素の値は常に“1”である。   Since the linear structural element shown in FIG. 21 serves as a mask, it is a binary image. Therefore, in FIG. 21, the value of the pixel indicated as “0” is “0”, but the value of the pixel indicated as a numerical value other than “0” is “1” according to each of the eight types of directions d. ”And“ 0 ”in the other direction. Numbers other than “0” in FIG. 21 indicate directions. “1” is the horizontal direction (the horizontal direction in the drawing), and thereafter the direction changes at intervals of 22.5 degrees as the number increases by one. “2”, “4”, “6”, and “8” are arranged in adjacent sections because columns of the same number cannot be arranged on a straight line because of the lattice arrangement of pixels. Three-digit numbers such as “234” and “678” are in the three directions “2” “3” “4” and “6” “7” “8”, respectively. It shows that the pixel value is “1”. Note that “9” indicates the center pixel, and the value of the center pixel is always “1”.

図21に示すように、線形構造要素は、円形構造要素の半径Rの2倍の長さで画素幅が1画素であって、22.5度間隔の直線の少なくとも近傍に配置され、8方向を定義したものとなる。実際には、各方向において画素値“1”が与えられる連続する画素は、直線となることが好ましいが、線形構造要素の全体画素数が少ない場合は、必ずしも直線にならない。そのため、図21の例では、“2” “4”“6”“8”で示す方向については、直線ではなく、画素値“1”となる画素は、22.5度間隔の直線の近傍に配置されることになる。   As shown in FIG. 21, the linear structuring element is twice as long as the radius R of the circular structuring element, has a pixel width of one pixel, and is arranged at least in the vicinity of straight lines spaced at 22.5 degrees, and has eight directions. Is defined. Actually, it is preferable that the continuous pixels to which the pixel value “1” is given in each direction be a straight line, but it is not always a straight line when the total number of pixels of the linear structural element is small. Therefore, in the example of FIG. 21, in the directions indicated by “2”, “4”, “6”, and “8”, the pixel having the pixel value “1” is not in the vicinity of the straight line having an interval of 22.5 degrees. Will be placed.

実際に用いる線形構造要素は、中心から半径7画素の条件を追加したものとなる。すなわち、図21に示した線形構造要素と、図22に示した円形構造要素の論理積(AND)をとったものとなる。図22は、本実施形態で用いる円形構造要素の一例を示す図である。図22に示すように、本実施形態では、半径7画素、すなわち中心から距離7画素以下を有効とした15×15のマスク画像の形態である円形構造要素を用いる。図22に示すように、15×15の画素のうち、中心から距離7画素以下の画素値は“1”、その他の中心から距離7を超える画素の画素値は“0”である。図21に示した線形構造要素と、図22に示した円形構造要素の論理積(AND)をとることにより、例えば、方向d=1の場合は、図23に示したような二値のマスク画像が得られる。また、方向d=2の場合は、図24に示したような二値のマスク画像が得られる。図23、図24において、“1”と示されている画素が参照画素である。すなわち、オープニング処理の際に参照される参照画素が定義された(2R+1)×(2R+1)画素の2値画像で、半径Rの円形内部に参照画素が定義され、2R+1の長さで画素幅が1画素であって、22.5度間隔の直線の少なくとも近傍に配置されることにより、8方向が定義されることになる。   The actually used linear structural element is obtained by adding a condition of a radius of 7 pixels from the center. That is, the logical product (AND) of the linear structural element shown in FIG. 21 and the circular structural element shown in FIG. 22 is obtained. FIG. 22 is a diagram illustrating an example of a circular structural element used in the present embodiment. As shown in FIG. 22, in this embodiment, a circular structural element that is a form of a 15 × 15 mask image in which a radius of 7 pixels, that is, a distance of 7 pixels or less from the center is effective is used. As shown in FIG. 22, among the 15 × 15 pixels, the pixel value at a distance of 7 pixels or less from the center is “1”, and the pixel value of a pixel exceeding the distance 7 from the other center is “0”. By taking the logical product (AND) of the linear structuring element shown in FIG. 21 and the circular structuring element shown in FIG. 22, for example, in the case of direction d = 1, a binary mask as shown in FIG. An image is obtained. When the direction d = 2, a binary mask image as shown in FIG. 24 is obtained. In FIG. 23 and FIG. 24, a pixel indicated as “1” is a reference pixel. That is, in the binary image of (2R + 1) × (2R + 1) pixels in which the reference pixel to be referred to in the opening process is defined, the reference pixel is defined inside the circle with the radius R, and the pixel width is 2R + 1 in length. Eight directions are defined by arranging one pixel at least in the vicinity of straight lines having an interval of 22.5 degrees.

図21に示した線形構造要素はM(d,u,v)={0,1}(d=1,・・・,8;u=−R,・・・,0,・・・,R;v=−R,・・・,0,・・・,R)と定義することができる。なお、Rは有効とする半径を示しており、図21の例では、R=7である。また、uは図21における横軸、vは図21における縦軸を、それぞれ示す。線状成分強調手段13は、線形構造要素M(d,u,v)を用いて、上記〔数式15〕に従った処理を実行して得られた平坦化画像Gray´(x,y)に対して、以下の〔数式17〕に従った処理を実行し、収縮画像Eray(x,y)を得る。   The linear structural elements shown in FIG. 21 are M (d, u, v) = {0, 1} (d = 1,..., 8; u = −R,..., 0,. V = −R,..., 0,. Note that R indicates an effective radius, and R = 7 in the example of FIG. U represents the horizontal axis in FIG. 21, and v represents the vertical axis in FIG. The linear component emphasizing means 13 uses the linear structural element M (d, u, v) on the flattened image Gray ′ (x, y) obtained by executing the processing according to the above [Equation 15]. On the other hand, processing according to the following [Equation 17] is executed to obtain a contracted image Eray (x, y).

〔数式17〕
Eray(d,x,y)=MINu=-R,R;v=-R,R[(255−M(d,u,v)×254)×(Gray´(x+u,y+v)+1)−1]
[Formula 17]
Eray (d, x, y) = MIN u = −R, R; v = −R, R [(255−M (d, u, v) × 254) × (Gray ′ (x + u, y + v) +1) − 1]

上記〔数式17〕において、MINは最小値をとることを示しており、MINの添え字の“u=−R,R;v=−R,R”は、u,vが−RからRの範囲における演算を行うことを示している。すなわち、“x=R,・・・,Xs−R−1;y=R,・・・,Ys−R−1“の各画素Gray´(x,y)に対して、“u=−R,R;v=−R,R”の隣接画素内でM(u,v)=1である画素値の最小値に変換を行っている。したがって、図21の例では、線形構造要素の(2R+1)×(2R+1)画素でR=7として225画素を用いて演算を行い、その最小値がEray(x,y)として与えられることになる。   In the above [Equation 17], MIN indicates that it takes the minimum value, and the subscript “u = −R, R; v = −R, R” of MIN indicates that u and v are from −R to R. It shows performing an operation on a range. That is, for each pixel Gray ′ (x, y) of “x = R,..., Xs−R−1; y = R,. , R; v = −R, R ″ is converted into the minimum pixel value of M (u, v) = 1 in the adjacent pixels. Therefore, in the example of FIG. 21, the calculation is performed using 225 pixels with R = 7 for (2R + 1) × (2R + 1) pixels of the linear structure element, and the minimum value is given as Ray (x, y). .

上記〔数式17〕に従った処理を実行して収縮画像Eray(d,x,y)が得られたら、このEray(d,x,y)をGray´(x,y)に置き換えて、上記〔数式17〕に従った処理を繰り返し実行することもできる。繰り返しの回数は、適宜設定することが可能である。ただし、通常は画質劣化を抑えるため、1回に設定し繰り返しは行わない。8つの各方向dについて行うことにより、d=1〜8の8種の収縮画像Eray(d,x,y)が得られる。   When the contracted image Eray (d, x, y) is obtained by executing the processing according to the above [Equation 17], this Eray (d, x, y) is replaced with Gray ′ (x, y), It is also possible to repeatedly execute the process according to [Equation 17]. The number of repetitions can be set as appropriate. However, it is normally set once and not repeated in order to suppress image quality deterioration. By performing for each of the eight directions d, eight kinds of contracted images Eray (d, x, y) of d = 1 to 8 are obtained.

収縮処理を繰り返し実行して8種の収縮画像Eray(d,x,y)が得られたら、次に、線状成分強調手段13は、収縮処理に用いた線形構造要素を指定構造要素として用いて膨張処理を行う。具体的には、線形構造要素M(d,u,v)を用いて、収縮画像Eray(d,x,y)に対して、以下の〔数式18〕に従った処理を実行し、膨張後の画像Dray(d,x,y)を得る。   If the contraction process is repeatedly executed and eight kinds of contraction images Eray (d, x, y) are obtained, then the linear component emphasizing means 13 uses the linear structural element used for the contraction process as the designated structural element. The expansion process is performed. Specifically, using the linear structural element M (d, u, v), the contracted image Eray (d, x, y) is subjected to processing according to the following [Equation 18], and after expansion Image Dray (d, x, y) is obtained.

〔数式18〕
Dray(d,x,y)=MAXu=-R,R;v=-R,R[M(d,u,v)×Eray(d,x+u,y+v)]
[Formula 18]
Dray (d, x, y) = MAX u = −R, R; v = −R, R [M (d, u, v) × Eray (d, x + u, y + v)]

上記〔数式18〕において、MAXは最大値をとることを示しており、MAXの添え字の“u=−R,R;v=−R,R”は、u,vが−RからRの範囲における演算を行うことを示している。すなわち、“x=R,・・・,Xs−R−1;y=R,・・・,Ys−R−1“の各画素Eray(d,x,y)に対して、“u=−R,R;v=−R,R”の隣接画素内でM(d,u,v)=1である画素値の最大値に変換を行っている。したがって、図21の例では、線形構造要素の(2R+1)×(2R+1)画素として225画素を用いて演算を行い、その最大値がDray(d,x,y)として与えられることになる。   In the above [Equation 18], MAX indicates the maximum value, and the suffix “u = −R, R; v = −R, R” of MAX indicates that u and v are from −R to R. It shows performing an operation on a range. That is, for each pixel Eray (d, x, y) of “x = R,..., Xs−R−1; y = R,. R, R; v = −R, R ″ is converted into the maximum pixel value of M (d, u, v) = 1 in the adjacent pixels. Therefore, in the example of FIG. 21, the calculation is performed using 225 pixels as (2R + 1) × (2R + 1) pixels of the linear structure element, and the maximum value is given as Dray (d, x, y).

上記〔数式18〕に従った処理を実行して膨張後の画像Dray(d,x,y)が得られたら、このDray(d,x,y)をEray(d,x,y)に置き換えて、上記〔数式18〕に従った処理を繰り返し実行することもできる。繰り返しの回数は、収縮処理の繰り返しの回数と同じ回数にする必要があり、通常は収縮処理とも1回に設定し繰り返しは行わない。8つの各方向dについて行うことにより、d=1〜8の8種の膨張後の画像Dray(d,x,y)が得られる。収縮および膨張を行った結果得られる画像は、線形オープニング画像Dray(d,x,y)として得られる。   When the expanded image Dray (d, x, y) is obtained by executing the processing according to [Formula 18], this Dray (d, x, y) is replaced with Eray (d, x, y). Thus, the processing according to the above [Formula 18] can be repeatedly executed. The number of repetitions needs to be the same as the number of repetitions of the contraction process. Normally, the contraction process is set to one and no repetition is performed. By performing for each of the eight directions d, eight kinds of post-expansion images Dray (d, x, y) of d = 1 to 8 are obtained. An image obtained as a result of contraction and expansion is obtained as a linear opening image Dray (d, x, y).

次に、線状成分強調手段13は、8種の線形オープニング画像の最大値の画像を作成する処理を行う(ステップS132)。具体的には、以下の〔数式19〕に従った処理を実行し、最大値の画像である線状成分強調画像Lray(x,y)を得る。   Next, the linear component emphasizing unit 13 performs a process of creating an image of the maximum value of the eight types of linear opening images (step S132). Specifically, processing according to the following [Equation 19] is executed to obtain a linear component emphasized image Lray (x, y) that is an image of the maximum value.

〔数式19〕
Lray(x,y)=MAXd=1,8Dray(d,x,y)
[Formula 19]
Lray (x, y) = MAX d = 1,8 Dray (d, x, y)

上記〔数式19〕において、MAXは最大値をとることを示しており、MAXの添え字の“d=1,8”は、8種の全ての線形オープニング画像Dray(d,x,y)における演算を行うことを示している。すなわち、各画素(x,y)について、8種の線形オープニング画像Dray(d,x,y)の最大値を取得する処理を行っている。この結果、最大値の画像である線状成分強調画像Lray(x,y)が得られる。   In the above [Equation 19], MAX indicates that it takes the maximum value, and the subscript “d = 1, 8” of MAX is in all eight types of linear opening images Dray (d, x, y). It shows performing an operation. That is, for each pixel (x, y), a process of acquiring the maximum value of eight types of linear opening images Dray (d, x, y) is performed. As a result, a linear component emphasized image Lray (x, y) that is an image of the maximum value is obtained.

線状成分強調画像が得られたら、次に、画素階調変換手段14が、線状成分強調画像に対して、階調変換(コントラスト補正)を行い、血管強調画像を得る(ステップS140)。具体的には、まず、画素階調変換手段14は、0〜255の値をもつ、線状成分強調画像Lray(x,y)のXs×Ys個の全画素について、画素値vbの度数分布H(vb)(vb=0,・・・,255)を求める。そして、以下の〔数式20〕に示す条件を満たす最小値vbminを求める。   After the linear component enhanced image is obtained, the pixel gradation converting unit 14 performs gradation conversion (contrast correction) on the linear component enhanced image to obtain a blood vessel enhanced image (step S140). Specifically, first, the pixel gradation conversion unit 14 calculates the frequency distribution of the pixel value vb for all Xs × Ys pixels of the linear component emphasized image Lray (x, y) having a value of 0 to 255. H (vb) (vb = 0,..., 255) is obtained. Then, the minimum value vbmin that satisfies the condition shown in the following [Equation 20] is obtained.

〔数式20〕
Σvb=0,vbminH(vb)≧(Xs×Ys)×α
[Formula 20]
Σvb = 0, vbmin H (vb) ≧ (Xs × Ys) × α

上記〔数式20〕において、Σの添え字の“vb=0,vbmin”は、vbが0からvbminまでの総和を求めることを示している。したがって、上記〔数式20〕に示す条件とは、全画素数(Xs×Ys)のうち、およそ比率α×100%の画素が、画素値vbmin以下の画素値となることを示している。比率αとしては、眼底画像中に含まれる血管以外の領域の比率を与える必要があり、この比率は取得された眼底画像ごとに変動するが、平均的には0.7〜0.9、典型的な例として0.8と設定することが好ましい。結局、〔数式20〕を用いることにより、線状成分強調画像に含まれる非血管候補領域と血管候補領域とを判別する画素値のしきい値として、線状成分強調画像の最小画素値vb=0から数えて画素数の総和が線状成分強調画像の全画素数の所定の比率αを超える画素値のうち最小の画素値vbminを特定することができる。   In the above [Equation 20], the subscript “vb = 0, vbmin” of Σ indicates that the sum of vb from 0 to vbmin is obtained. Therefore, the condition shown in the above [Expression 20] indicates that, of the total number of pixels (Xs × Ys), pixels with a ratio α × 100% have pixel values equal to or less than the pixel value vbmin. As the ratio α, it is necessary to give a ratio of a region other than the blood vessel included in the fundus image, and this ratio varies for each acquired fundus image, but on average 0.7 to 0.9, typically As a specific example, it is preferable to set 0.8. Eventually, by using [Equation 20], the minimum pixel value vb of the linear component enhanced image is used as a threshold value of the pixel value for discriminating between the non-blood vessel candidate region and the blood vessel candidate region included in the linear component enhanced image. It is possible to specify the minimum pixel value vbmin among pixel values in which the total number of pixels counted from 0 exceeds a predetermined ratio α of the total number of pixels of the linear component emphasized image.

上記〔数式20〕に示す条件を満たす最小値vbminが求められたら、次に、画素階調変換手段14は、x=0,・・・,Xs−1;y=0,・・・,Ys−1の全画素に対して、以下の〔数式21〕に従った処理を実行し、コントラスト補正を行い、血管強調画像Tray(x,y)を得る。   Once the minimum value vbmin that satisfies the condition shown in [Equation 20] is obtained, the pixel gradation conversion means 14 then x = 0,..., Xs−1; y = 0,. The processing according to the following [Equation 21] is performed on all the pixels of −1 to perform contrast correction, and a blood vessel emphasized image Ray (x, y) is obtained.

〔数式21〕
Tray(x,y)={Lray(x,y)−vbmin}×255×β/(255−vbmin)
[Formula 21]
Ray (x, y) = {Lray (x, y) −vbmin} × 255 × β / (255−vbmin)

上記〔数式21〕において、βは輝度スケーリング値である。輝度スケーリング値βとしては、任意に設定することができるが、設定された比率αに依存するため、α=0.8に設定した場合、好ましくは70〜90、特に好ましい例として80とすることができる。すなわち、βはαの100倍程度に設定することが好ましい。   In the above [Equation 21], β is a luminance scaling value. The luminance scaling value β can be set arbitrarily, but depends on the set ratio α, so when α = 0.8, it is preferably 70 to 90, and particularly preferably 80. Can do. That is, β is preferably set to about 100 times α.

Tray(x,y)は画素値であるため、〔数式21〕の結果が負の値となった場合には、Tray(x,y)=0と置き換える。したがって、所定の条件Lray(x,y)>vbminを満たさない画素は、最小値“0”に置き換えられ、所定の条件Lray(x,y)>vbminを満たす画素は、最小値“0”より大きい値“1”から最大値の範囲になるようにTray(x,y)の画素値が設定される。Tray(x,y)においては、階調の最小値である“0”が血管候補領域外を示し、血管候補領域は“1”以上、“255”以下となる。血管候補領域の最小値は、階調の最小値付近の値が設定される。本実施形態では、階調の最小値付近の値として、階調の最小値+1を設定しているが、それ以上であってもよい。もちろん、血管領域のコントラストを高くするため、階調の最小値+1であることが好ましい。このようにして得られた血管強調画像Tray(x,y)は、血管領域である確率が高い画素ほど高い値をもつグレースケールの画像となる。   Since Ray (x, y) is a pixel value, when the result of [Formula 21] becomes a negative value, it is replaced with Ray (x, y) = 0. Therefore, pixels that do not satisfy the predetermined condition Lray (x, y)> vbmin are replaced with the minimum value “0”, and pixels that satisfy the predetermined condition Lray (x, y)> vbmin are from the minimum value “0”. The pixel value of Tray (x, y) is set so as to be in the range from the large value “1” to the maximum value. In Tray (x, y), “0”, which is the minimum value of the gradation, indicates the outside of the blood vessel candidate region, and the blood vessel candidate region is “1” or more and “255” or less. As the minimum value of the blood vessel candidate region, a value near the minimum value of the gradation is set. In the present embodiment, the minimum gradation value + 1 is set as the value near the minimum gradation value, but it may be more than that. Of course, in order to increase the contrast of the blood vessel region, it is preferable that the minimum value of the gradation is +1. The blood vessel emphasized image Ray (x, y) obtained in this way becomes a gray scale image having a higher value as the pixel having a higher probability of being a blood vessel region.

所定の条件Lray(x,y)>vbminを満たさない画素を最小値に設定する場合、上述のように“0”とすることが好ましいが、“0”以外の値であってもよい。眼底領域は一般に円形をしているため、矩形形状の眼底画像には非眼底領域も含まれるため、非眼底領域を“0”に設定し、眼底領域内の非血管候補領域を“1”に設定し、眼底領域内の血管候補領域を“2”〜“255”に設定することもできる。コントラストを高くすることが目的であるため、当然のことながら、血管候補領域における最小値は“0”に近い値にすることが好ましい。   When a pixel that does not satisfy the predetermined condition Lray (x, y)> vbmin is set to the minimum value, it is preferably set to “0” as described above, but may be a value other than “0”. Since the fundus region is generally circular, the non-fundus region is also included in the rectangular fundus image. Therefore, the non-fundus region is set to “0” and the non-blood vessel candidate region in the fundus region is set to “1”. It is also possible to set the blood vessel candidate region in the fundus region to “2” to “255”. Since the purpose is to increase the contrast, as a matter of course, the minimum value in the blood vessel candidate region is preferably set to a value close to “0”.

本実施形態では、8種類の方向に従って8種の線形オープニング画像に対して処理を行うため、22.5度の均等間隔で変更させた各方向に均等に粒状成分の抽出を抑えることができる。作成する画像の数も方向に応じた8個だけであるため、演算処理の負荷を抑えることができる。   In this embodiment, since processing is performed on eight types of linear opening images according to eight types of directions, extraction of granular components can be suppressed evenly in each direction changed at an equal interval of 22.5 degrees. Since the number of images to be created is only eight according to the direction, it is possible to reduce the load of the arithmetic processing.

<4.変形例等>
以上、本発明の好適な実施形態について説明したが、本発明は上記実施形態に限定されず、種々の変形が可能である。例えば、上記実施形態では、撮影により得られた眼底画像としてフルカラー画像を用いたが、近年業務用のデジタルカメラの階調は10ビット以上に拡大しており、各色1024階調等のフルカラー画像を取得することも可能になっており、より階調数の多いカラー画像を用いてもよい。
<4. Modified example>
The preferred embodiments of the present invention have been described above. However, the present invention is not limited to the above embodiments, and various modifications can be made. For example, in the above embodiment, a full-color image is used as a fundus image obtained by photographing. However, in recent years, the gradation of a commercial digital camera has been expanded to 10 bits or more, and a full-color image such as 1024 gradations for each color is used. It is also possible to obtain a color image having a larger number of gradations.

1・・・CPU(Central Processing Unit)
2・・・RAM(Random Access Memory)
3・・・記憶装置
4・・・指示入力I/F
5・・・データ入出力I/F
6・・・表示部
10・・・血管領域強調手段
11・・・グレースケール変換手段
12・・・画像平坦化手段
13・・・線状成分強調手段
14・・・画素階調変換手段
20・・・多階調色相変換手段(色相変換手段)
30・・・中央階調領域定義手段(色相変換手段)
40・・・低階調化手段(色相変換手段)
50・・・しきい値算出手段
60・・・動静脈識別画像生成手段
65・・・動静脈径比算出手段
67・・・動静脈識別画像補正手段
70・・・眼底画像記憶手段
80・・・動静脈識別画像記憶手段
100・・・眼底画像処理装置
1 ... CPU (Central Processing Unit)
2 ... RAM (Random Access Memory)
3 ... Storage device 4 ... Instruction input I / F
5. Data input / output I / F
6 ... Display unit 10 ... Blood vessel region enhancement means 11 ... Gray scale conversion means 12 ... Image flattening means 13 ... Linear component enhancement means 14 ... Pixel gradation conversion means 20 ..Multi-tone hue conversion means (hue conversion means)
30: Median gradation area defining means (hue converting means)
40... Gradation reduction means (hue conversion means)
50 ... Threshold value calculating means 60 ... Arteriovenous identification image generating means 65 ... Arteriovenous diameter ratio calculating means 67 ... Arteriovenous identification image correcting means 70 ... Fundus image storage means 80 ... Arteriovenous identification image storage means 100 ... Fundus image processing apparatus

Claims (12)

カラー眼底画像に対して、血管領域である確率が高い画素ほど高い値が設定されたグレースケールの血管強調画像を得る血管領域強調手段と、
前記血管強調画像の中で所定の値以上の値をもつ画素を血管領域の画素として抽出し、前記血管領域の各画素に対して、前記カラー眼底画像の対応する画素を参照してRGB値を取得し、取得したRGB値をL階調(Lは正の整数)の色相値に変換し、画素値がL階調の色相値に変換された色相変換画像を得る色相変換手段と、
前記色相変換画像の前記血管領域に対応する画素を基に、L階調のヒストグラムを算出し、算出されたヒストグラムを用いて判別分析法により二値化のしきい値を算出するしきい値算出手段と、
前記色相変換画像の前記血管領域に対応する各画素のL階調の色相値と前記しきい値との比較結果に基づいて、少なくとも動脈または静脈を含む属性が付与された動静脈識別画像を得る動静脈識別画像生成手段と、
を有することを特徴とする眼底画像処理装置。
A blood vessel region enhancement means for obtaining a grayscale blood vessel enhancement image in which a higher value is set for a pixel having a higher probability of being a blood vessel region with respect to a color fundus image;
A pixel having a value greater than or equal to a predetermined value in the blood vessel enhanced image is extracted as a pixel of the blood vessel region, and an RGB value is referred to each pixel of the blood vessel region with reference to a corresponding pixel of the color fundus image. Hue conversion means for acquiring and converting the acquired RGB value to a hue value of L gradation (L is a positive integer) and obtaining a hue conversion image in which the pixel value is converted to the hue value of L gradation;
Threshold calculation that calculates a histogram of L gradation based on pixels corresponding to the blood vessel region of the hue conversion image, and calculates a threshold value for binarization by a discriminant analysis method using the calculated histogram Means,
An arteriovenous identification image to which an attribute including at least an artery or a vein is given is obtained based on a comparison result between an L tone hue value of each pixel corresponding to the blood vessel region of the hue conversion image and the threshold value. An arteriovenous identification image generating means;
A fundus image processing apparatus comprising:
前記色相変換手段は、
前記血管強調画像の中で所定の値以上の値をもつ画素を血管領域の画素として抽出し、前記血管領域の各画素に対して、前記カラー眼底画像の対応する画素を参照してRGB値を取得し、取得したRGB値をK(KはLより大きい整数)階調の色相値に変換し、画素値がK階調の色相値に変換された多階調色相変換画像を得る多階調色相変換手段と、
前記K階調の範囲内に、cmin(cminは正の整数)からcmax(cmaxはcminより大きくK−1より小さい)の範囲の中央階調領域を定義する中央階調領域定義手段と、
前記多階調色相変換画像に対して、cmin以下を0、cmax以上をL−1に飽和させ、cminからcmaxまでを0からL−1の値をとるL階調の前記色相変換画像に変換する低階調化手段と、
を更に有することを特徴とする請求項1に記載の眼底画像処理装置。
The hue conversion means includes
A pixel having a value greater than or equal to a predetermined value in the blood vessel enhanced image is extracted as a pixel of the blood vessel region, and an RGB value is referred to each pixel of the blood vessel region with reference to a corresponding pixel of the color fundus image. A multi-level image obtained by converting the acquired RGB value into a hue value of K (K is an integer greater than L) gradation and obtaining a multi-gradation hue conversion image in which the pixel value is converted into a hue value of K gradation. Toning hue conversion means;
A central gradation area defining means for defining a central gradation area within a range of cmin (cmin is a positive integer) to cmax (cmax is larger than cmin and smaller than K-1) within the range of the K gradation;
With respect to the multi-tone hue conversion image, the hue conversion image of L gradation having a value from 0 to L-1 from 0 to L-1 is obtained by saturating cmin or less to 0 and cmax or more to L-1. A gradation reduction means for conversion;
The fundus image processing apparatus according to claim 1, further comprising:
前記多階調色相変換手段は、前記血管領域の全ての画素に対して、前記取得したRGB値を色相値に変換した後、最小の色相値を0、最大の色相値をK−1に変換するようにK階調の整数の色相値に変換することを特徴とする請求項2に記載の眼底画像処理装置。   The multi-gradation hue conversion unit converts the acquired RGB values into hue values for all pixels in the blood vessel region, and then sets the minimum hue value to 0 and the maximum hue value to K-1. The fundus image processing apparatus according to claim 2, wherein the fundus image processing apparatus converts the hue value into an integer hue value of K gradations. 前記中央階調領域定義手段は、前記多階調色相変換画像の前記血管領域に対応する画素をもとに、算出された高精度ヒストグラムにおいて、前記血管領域に対応する画素の総数をCt、中央値をhcとして、中央値hcの両側それぞれにCt/4の画素が含まれる範囲を前記中央階調領域として定義することを特徴とする請求項2または請求項3に記載の眼底画像処理装置。   The center gradation area defining means calculates the total number of pixels corresponding to the blood vessel area in a high-accuracy histogram calculated based on the pixels corresponding to the blood vessel area of the multi-tone hue conversion image, Ct, 4. The fundus image processing apparatus according to claim 2, wherein a median value is defined as the median gradation region, where hc is a median value and Ct / 4 pixels are included on both sides of the median value hc. . 前記血管領域強調手段は、
前記カラー眼底画像が有する色成分のうち少なくとも1つの色成分に基づいてグレースケール眼底画像を得るグレースケール変換手段と、
前記グレースケール眼底画像の各画素に対して、所定の範囲に含まれる近傍画素の画素値の平均値を算出し、当該画素の画素値に所定の値から前記平均値を減算した値を加算することにより、平坦化画像を作成する画像平坦化手段と、
前記平坦化画像に対して、所定の構造要素を用いてオープニング処理を行い血管候補領域の輝度を一定以上に揃えた線状成分強調画像を作成する線状成分強調手段と、
前記線状成分強調画像において、所定の条件を満たさない画素値を、変換後の血管強調画像の階調の最小値になるように置き換え、前記所定の条件を満たす画素値が、階調の最小値付近の値から最大値の範囲になるように画素の階調を補正し、血管強調画像を作成する画素階調変換手段と、
を有することを特徴とする請求項1から請求項4のいずれか一項に記載の眼底画像処理装置。
The blood vessel region enhancement means includes
Grayscale conversion means for obtaining a grayscale fundus image based on at least one of the color components of the color fundus image;
For each pixel of the grayscale fundus image, an average value of pixel values of neighboring pixels included in a predetermined range is calculated, and a value obtained by subtracting the average value from the predetermined value is added to the pixel value of the pixel. Image flattening means for creating a flattened image,
Linear component enhancement means for performing an opening process on the flattened image using a predetermined structural element and creating a linear component enhanced image in which the luminance of the blood vessel candidate region is equal to or higher than a certain level;
In the linear component emphasized image, a pixel value that does not satisfy the predetermined condition is replaced with the minimum gradation value of the converted blood vessel emphasized image, and the pixel value that satisfies the predetermined condition is the minimum gradation value. Pixel gradation conversion means for correcting the gradation of the pixel so as to be in the range of the maximum value from the value near the value, and creating a blood vessel emphasized image;
The fundus image processing apparatus according to any one of claims 1 to 4, further comprising:
前記色相変換手段は、前記血管強調画像が256階調の値をもつとき、128以上の値をもつ画素を血管領域の画素として抽出することを特徴とする請求項1から請求項5のいずれか一項に記載の眼底画像処理装置。   The hue conversion means extracts a pixel having a value of 128 or more as a pixel of a blood vessel region when the blood vessel emphasized image has a value of 256 gradations. The fundus image processing apparatus according to one item. 前記多階調色相変換手段は、前記取得したRGB値をK階調の色相値に変換する際、R、G、Bに対応する値をr、g、bとし、αを所定の実数値とし、h=(g−b)α/(2r−g−b)を用い、2r−g−b=0の場合h=0とし、2r−g−b<0の場合、通常眼ではh=0とし、白内障眼では、h=(g−b)α/(2r−g−b)として、得られたhの値に基づいて、変換を行うことを特徴とする請求項2に記載の眼底画像処理装置。   The multi-gradation hue conversion means converts the acquired RGB values into K gradation hue values by setting values corresponding to R, G, and B to r, g, and b, and α is a predetermined real value. And h = (g−b) α / (2r−g−b), h = 0 when 2r−g−b = 0, and h = 2 for the normal eye when 2r−g−b <0. The fundus according to claim 2, wherein in the case of a cataract eye, conversion is performed based on the obtained value of h as h = (g−b) α / (2r−g−b). Image processing device. 前記しきい値算出手段は、前記L階調を256階調とし、算出されたヒストグラムの階調1から階調254の範囲を用いて判別分析法の処理を実行し、前記しきい値を算出することを特徴とする請求項1から請求項7のいずれか一項に記載の眼底画像処理装置。   The threshold value calculation means calculates the threshold value by setting the L gradation to 256 gradations, and executing the process of discriminant analysis using the range of gradation 1 to gradation 254 of the calculated histogram. The fundus image processing apparatus according to any one of claims 1 to 7, wherein the fundus image processing apparatus comprises: 前記動静脈識別画像生成手段は、前記L階調を256階調とし、前記しきい値をSavとすると、前記色相変換画像の前記血管領域に対応する各画素の色相値Hueに対して、(Hue−Sav)×2なる演算を行って−255から255の範囲の画素値に変換し、前記血管領域に対応しない各画素に対して画素値0を設定し、画素値が正の場合は動脈の属性が付与された画素、画素値が負の場合は静脈の属性が付与された画素、画素値が0の場合は、前記血管領域に含まれない画素になるように、前記動静脈識別画像を生成することを特徴とする請求項1から請求項8のいずれか一項に記載の眼底画像処理装置。   The arteriovenous identification image generating means sets the L gradation to 256 gradations and the threshold value to Sav, with respect to the hue value Hue of each pixel corresponding to the blood vessel region of the hue conversion image ( Hue-Sav) × 2 is performed to convert the pixel value to a range of −255 to 255, and a pixel value of 0 is set for each pixel not corresponding to the blood vessel region. If the pixel value is negative, the pixel is assigned a vein attribute, and if the pixel value is 0, the arteriovenous identification image is such that the pixel is not included in the blood vessel region. The fundus image processing apparatus according to any one of claims 1 to 8, wherein: 前記動静脈識別画像生成手段により生成された動静脈識別画像に対して、画素値が(画素値の最大値−1)から1の値をもつ画素を補正対象画素として順次探索し、
探索された各補正対象画素の画素値の絶対値をZTとし、前記補正対象画素の8近傍画素の中で画素値の絶対値の最大値をZM、前記8近傍画素の中で動脈の属性をもつ画素の画素値の絶対値の総和をCp、前記8近傍画素の中で静脈の属性をもつ画素の画素値の絶対値の総和をCnとすると、ZM>ZTであり、
最大値ZMをもつ画素の属性が動脈でCp>Cnを満たす、または最大値ZMをもつ画素の属性が静脈でCp<Cnを満たす場合、前記補正対象画素の属性を最大値ZMをもつ画素の属性に置換し、前記補正対象画素の画素値の絶対値をZMに置換するように、前記探索された全ての補正対象画素に対して順次補正するようにしている動静脈識別画像補正手段を更に有することを特徴とする請求項1から請求項9のいずれか一項に記載の眼底画像処理装置。
With respect to the arteriovenous identification image generated by the arteriovenous identification image generating means, sequentially search for pixels having pixel values from (maximum pixel value-1) to 1 as correction target pixels,
The absolute value of the pixel value of each of the correction target pixels searched for is ZT, the maximum absolute value of the pixel values among the eight neighboring pixels of the correction target pixel is ZM, and the arterial attribute is selected among the eight neighboring pixels. ZM> ZT, where Cp is the sum of absolute values of the pixel values of pixels having Cp and Cn is the sum of absolute values of the pixel values of pixels having the vein attribute among the eight neighboring pixels,
When the attribute of the pixel having the maximum value ZM satisfies Cp> Cn in the artery, or the attribute of the pixel having the maximum value ZM satisfies Cp <Cn in the vein, the attribute of the correction target pixel is set to the pixel having the maximum value ZM. An arteriovenous identification image correcting unit that sequentially corrects all of the searched correction target pixels so as to replace the attribute and replace the absolute value of the pixel value of the correction target pixel with ZM. The fundus image processing apparatus according to any one of claims 1 to 9, further comprising:
前記動静脈識別画像生成手段により生成された動静脈識別画像より、(2N+1)×(2N+1)画素(N≧1)の画素ブロックを順次抽出し、前記画素ブロックの中で、動脈の属性をもつ画素数の総和をCpa、前記画素ブロックの中で、静脈の属性をもつ画素数の総和をCnaとすると、
Cpa>Cnaの場合、前記画素ブロックの中の全ての画素の属性を動脈に設定し、Cpa<Cnaの場合、前記画素ブロックの中の全ての画素の属性を静脈に設定するように補正する動静脈識別画像補正手段を更に有することを特徴とする請求項1から請求項10のいずれか一項に記載の眼底画像処理装置。
A pixel block of (2N + 1) × (2N + 1) pixels (N ≧ 1) is sequentially extracted from the arteriovenous identification image generated by the arteriovenous identification image generating means, and has an arterial attribute in the pixel block. If the total number of pixels is Cpa, and the total number of pixels having the vein attribute in the pixel block is Cna,
When Cpa> Cna, the attribute of all pixels in the pixel block is set as an artery, and when Cpa <Cna, the correction is performed so that the attributes of all pixels in the pixel block are set as veins. The fundus image processing apparatus according to claim 1, further comprising a vein identification image correction unit.
コンピュータを、請求項1から請求項11のいずれか一項に記載の眼底画像処理装置として機能させるためのプログラム。   A program for causing a computer to function as the fundus image processing apparatus according to any one of claims 1 to 11.
JP2016251985A 2016-12-26 2016-12-26 Fundus image processing device Pending JP2018102586A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016251985A JP2018102586A (en) 2016-12-26 2016-12-26 Fundus image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016251985A JP2018102586A (en) 2016-12-26 2016-12-26 Fundus image processing device

Publications (1)

Publication Number Publication Date
JP2018102586A true JP2018102586A (en) 2018-07-05

Family

ID=62784924

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016251985A Pending JP2018102586A (en) 2016-12-26 2016-12-26 Fundus image processing device

Country Status (1)

Country Link
JP (1) JP2018102586A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113111915A (en) * 2021-03-15 2021-07-13 同济大学 Database enhancement method applied to vein insertion robot blood vessel identification
CN117437236A (en) * 2023-12-21 2024-01-23 中国人民解放军总医院第一医学中心 Gastrointestinal mirror image anomaly detection method and system
CN117934271A (en) * 2024-03-22 2024-04-26 西安电子科技大学 Real-time processing method and system for retinal vascular images and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113111915A (en) * 2021-03-15 2021-07-13 同济大学 Database enhancement method applied to vein insertion robot blood vessel identification
CN117437236A (en) * 2023-12-21 2024-01-23 中国人民解放军总医院第一医学中心 Gastrointestinal mirror image anomaly detection method and system
CN117437236B (en) * 2023-12-21 2024-03-01 中国人民解放军总医院第一医学中心 Gastrointestinal mirror image anomaly detection method and system
CN117934271A (en) * 2024-03-22 2024-04-26 西安电子科技大学 Real-time processing method and system for retinal vascular images and electronic equipment

Similar Documents

Publication Publication Date Title
JP2018171177A (en) Fundus image processing device
AU2018282455B2 (en) Diagnosis assisting device, and image processing method in diagnosis assisting device
JP2018114031A (en) Fundus image processing device
JP3810776B2 (en) A method for detecting and correcting red eyes in digital images.
CN109816666B (en) Symmetrical full convolution neural network model construction method, fundus image blood vessel segmentation device, computer equipment and storage medium
JP2022180466A (en) Diagnosis support device, learning device, diagnosis support method, learning method, and program
KR102519515B1 (en) Information processing device, information processing method, computer program
JP2021529061A (en) Image processing methods, electronic devices and storage media
JP2018038789A (en) Diagnosis support device, method for processing image on diagnosis support device and program
JP2018102586A (en) Fundus image processing device
US11406340B2 (en) Method for converting tone of chest X-ray image, storage medium, image tone conversion apparatus, server apparatus, and conversion method
JP6620636B2 (en) Fundus image processing device
KR20200046775A (en) Surgical assist device and method for 3D analysis based on liver cancer area in CT image
JP2018201629A (en) Fundus image processing device
US20230222668A1 (en) Image processing apparatus, image processing method, and recording medium
WO2020167251A1 (en) Retina vessel measurement
CN110111318A (en) A kind of detection method and system of annular artifact
JP7382059B2 (en) Image processing device, image processing method, and program
JP2021111076A (en) Diagnostic device using ai, diagnostic system, and program
JP2020110250A (en) Fundus image processing device
JP2016073537A (en) Apparatus and method for analyzing ocular fundus image
CN112734701A (en) Fundus focus detection method, fundus focus detection device and terminal equipment
JP6481432B2 (en) Fundus image processing device
US20240104701A1 (en) System and method for non-invasive visualization and characterization of lumen structures and flow therewithin
JP7296773B2 (en) MEDICAL IMAGE PROCESSING APPARATUS AND MEDICAL IMAGE PROCESSING PROGRAM