JP5449444B2 - Colony counting device, colony counting method, and program - Google Patents
Colony counting device, colony counting method, and program Download PDFInfo
- Publication number
- JP5449444B2 JP5449444B2 JP2012097782A JP2012097782A JP5449444B2 JP 5449444 B2 JP5449444 B2 JP 5449444B2 JP 2012097782 A JP2012097782 A JP 2012097782A JP 2012097782 A JP2012097782 A JP 2012097782A JP 5449444 B2 JP5449444 B2 JP 5449444B2
- Authority
- JP
- Japan
- Prior art keywords
- connected component
- image
- colony
- value
- threshold
- 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.)
- Expired - Fee Related
Links
Images
Description
本発明は、コロニー計数装置、コロニー計数方法、及び、プログラムに関する。 The present invention relates to a colony counting device, a colony counting method, and a program.
現在、食品衛生に関する意識がますます高くなっている。このため、国内外の食品について、厳格な食品衛生検査が実施されている。食品衛生検査では、例えば、食品から採取された検体を培地で培養した後に、検体に発生した大腸菌群などの微生物のコロニーの個数をカウントし、発生したコロニーの個数が所定値未満であるか否かを検査する。 At present, awareness of food hygiene is increasing. For this reason, strict food hygiene inspections are carried out on domestic and foreign foods. In food hygiene inspection, for example, after culturing a sample collected from food in a medium, the number of colonies of microorganisms such as coliforms generated in the sample is counted, and whether the number of generated colonies is less than a predetermined value. Inspect.
現在、コロニーの個数を自動でカウントすることができるコロニー計数装置が開発されている。例えば、特許文献1には、コロニーが発生した培地を撮像して得られた画像データに基づいてコロニーに対応する連結領域を求め、連結領域に外接する長方形の長辺と短辺との比率などを考慮してコロニーの個数をカウントするコロニー計数装置などが開示されている。
Currently, a colony counting device capable of automatically counting the number of colonies has been developed. For example, in
このようなコロニー計数装置は、培地を撮像して得られた画像を、コロニーを表す画素の輝度値よりも高い閾値で二値化し、二値化された画像に対してラベリング処理を施すことにより、コロニーに対応する連結成分の個数をカウントする。二値化の際に使用する閾値は、コロニーの色の濃さなどに応じて設定することができる。 Such a colony counting apparatus binarizes an image obtained by imaging a culture medium with a threshold value higher than the luminance value of a pixel representing the colony, and performs a labeling process on the binarized image. Count the number of connected components corresponding to the colony. The threshold used for binarization can be set according to the color density of the colony.
しかしながら、培地に発生するコロニーの色の濃さは均一ではなく、培地には様々な色の濃さを有するコロニーが同時に存在する。特に、大腸菌群は、多くの種類の菌が存在し、その菌によって代謝活性は様々である。例えば、大腸菌群は酵素基質X−GAL(5−Bromo−4−Chloro−3−indolyl−β−D−galactopyranoside)を分解し、青色色素5,5’−dibromo−4,4’−dichloro−indigoを産出するが、その濃度は菌種により異なる。特に、フィルムないしシート状培地においては、その濃度差が顕著なため、コロニーの個数は大変計測し難くなっている。黄色ブドウ球菌においても、X−Phosphateの分解により、同様の色素産生を確認している。
However, the color density of the colonies generated in the medium is not uniform, and colonies having various color densities exist simultaneously in the medium. In particular, the coliform group has many types of bacteria, and the metabolic activity varies depending on the bacteria. For example, Escherichia coli group degrades the enzyme substrate X-GAL (5-Bromo-4-Chloro-3-indolyl-β-D-galactopyranoside), and the
ここで、例えば、近距離に存在する複数個の濃い色のコロニーの間の領域は、薄い色のコロニーよりも濃い色を有することがある。このような場合、例えば、薄い色のコロニーを検出しようとして閾値を高くすると、近距離に存在する複数個の濃い色のコロニーが1つのコロニーとして検出され、コロニーの数を正確にカウントすることができない。そこで、様々な色の濃さを有するコロニーの個数を正確にカウントすることが可能なコロニー計数装置が望まれている。 Here, for example, a region between a plurality of dark-colored colonies existing at a short distance may have a darker color than a light-colored colony. In such a case, for example, if the threshold value is increased in order to detect light-colored colonies, a plurality of dark-colored colonies existing at a short distance are detected as one colony, and the number of colonies can be accurately counted. Can not. Therefore, a colony counting device capable of accurately counting the number of colonies having various color densities is desired.
本発明は、このような状況に鑑みてなされたものであり、様々な色の濃さを有するコロニーの個数を正確にカウントすることが可能なコロニー計数装置、コロニー計数方法、及び、プログラムを提供することを目的とする。 The present invention has been made in view of such circumstances, and provides a colony counting device, a colony counting method, and a program capable of accurately counting the number of colonies having various color densities. The purpose is to do.
上記目的を達成するために、本発明の第1の観点に係るコロニー計数装置は、
検体に含まれる微生物の培養後の培地の様子を示すグレースケール画像を取得するグレースケール画像取得手段と、
閾値が供給される毎に、前記グレースケール画像取得手段により取得されたグレースケール画像を前記閾値により二値化することにより二値化画像を生成する二値化画像生成手段と、
前記二値化画像生成手段により前記二値化画像が生成される毎に、前記二値化画像にラベリング処理を実行することにより前記二値化画像から1つのコロニーを示す画素のまとまりである連結成分を抽出する連結成分抽出手段と、
前記連結成分抽出手段により前記連結成分が抽出される毎に、前記連結成分のうち記憶装置に記憶済みの連結成分情報により示される連結成分を包含しない連結成分を示す連結成分情報を、前記記憶装置にさらに記憶させる連結成分情報追加手段と、
前記閾値が下限値から上限値に至るまでの間、前記連結成分情報追加手段の処理が完了する毎に、前記閾値を所定値ずつ増加させて前記二値化画像生成手段に供給する閾値供給手段と、
前記記憶装置に記憶されている連結成分情報に基づいて、前記微生物のコロニーの個数を計数するコロニー計数手段と、を備える、
ことを特徴とする。
In order to achieve the above object, the colony counting device according to the first aspect of the present invention comprises:
A grayscale image acquisition means for acquiring a grayscale image showing the state of the culture medium after culturing the microorganisms contained in the specimen;
Binarized image generating means for generating a binarized image by binarizing the grayscale image acquired by the grayscale image acquiring means by the threshold value every time a threshold is supplied;
Each time the binarized image is generated by the binarized image generating means, a labeling process is performed on the binarized image, thereby connecting a group of pixels indicating one colony from the binarized image. Connected component extraction means for extracting the components;
Each time the connected component is extracted by the connected component extraction means, the storage device stores connected component information indicating a connected component that does not include the connected component indicated by the connected component information stored in the storage device. Connected component information adding means for further storing
Threshold supply means for increasing the threshold value by a predetermined value and supplying it to the binarized image generating means each time processing of the connected component information adding means is completed until the threshold value reaches the upper limit value. When,
Colony counting means for counting the number of colonies of the microorganism based on the connected component information stored in the storage device,
It is characterized by that.
前記グレースケール画像を構成する画素の輝度値の分布に基づいて、前記下限値と前記上限値とを決定する閾値範囲決定手段、をさらに備えてもよい。 You may further provide the threshold range determination means which determines the said lower limit and the said upper limit based on distribution of the luminance value of the pixel which comprises the said gray scale image.
前記閾値範囲決定手段は、前記グレースケール画像を構成する画素の輝度値毎の度数を表す輝度ヒストグラムに含まれる最大の山状の度数分布の輝度範囲の中で度数が最多である輝度値を特定し、特定した輝度値よりも低く、かつ、前記特定した輝度値の度数に対して所定の割合以下の度数である輝度値のうち、最高の輝度値を前記上限値に決定してもよい。 The threshold range determination means identifies a luminance value having the highest frequency in the luminance range of the maximum mountain-shaped frequency distribution included in the luminance histogram representing the frequency for each luminance value of the pixels constituting the grayscale image. The highest luminance value may be determined as the upper limit value among the luminance values that are lower than the specified luminance value and have a frequency equal to or less than a predetermined ratio with respect to the frequency of the specified luminance value.
前記閾値範囲決定手段は、前記グレースケール画像を構成する画素の輝度値の最小の輝度値を特定し、特定した輝度値を前記下限値に決定してもよい。 The threshold range determining unit may specify a minimum luminance value of luminance values of pixels constituting the gray scale image, and determine the specified luminance value as the lower limit value.
前記培地を撮像して得られたカラー画像を取得するカラー画像取得手段と、
前記カラー画像取得手段により取得されたカラー画像を構成する画素の色相の分布に基づいて、前記コロニーの色相範囲を特定する色相範囲特定手段と、
前記カラー画像取得手段により取得されたカラー画像をグレースケール化した画像を構成する画素のうち、前記色相範囲特定手段により特定された前記色相範囲に含まれない画素の輝度値を、前記上限値よりも高い輝度値に設定することにより取得されるグレースケール画像を、前記グレースケール画像取得手段に取得させるグレースケール画像として生成するグレースケール画像生成手段と、をさらに備えてもよい。
Color image acquisition means for acquiring a color image obtained by imaging the culture medium;
A hue range specifying means for specifying a hue range of the colony based on a hue distribution of pixels constituting the color image acquired by the color image acquiring means;
Among the pixels constituting the image obtained by converting the color image acquired by the color image acquisition unit into a gray scale, the luminance value of the pixel not included in the hue range specified by the hue range specifying unit is determined from the upper limit value. And a gray scale image generating unit that generates a gray scale image acquired by setting a higher luminance value as a gray scale image to be acquired by the gray scale image acquiring unit.
前記色相範囲特定手段は、前記カラー画像を構成する画素の色相毎の度数を表す色相ヒストグラムから最大の山状の度数分布の色相範囲を除外したのちに存在する山状の度数分布の色相範囲を前記コロニーの色相範囲として特定してもよい。 The hue range specifying means obtains a hue range of a mountain-shaped frequency distribution that exists after excluding the hue range of the maximum mountain-shaped frequency distribution from a hue histogram representing the frequency for each hue of pixels constituting the color image. You may specify as the hue range of the said colony.
前記培地を撮像して得られたカラー画像を取得するカラー画像取得手段と、
前記カラー画像取得手段により取得されたカラー画像をグレースケール化した画像にガウシアンフィルタをかけることに得られるグレースケール画像を、前記グレースケール画像取得手段に取得させるグレースケール画像として生成するグレースケール画像生成手段、をさらに備えてもよい。
Color image acquisition means for acquiring a color image obtained by imaging the culture medium;
Grayscale image generation for generating a grayscale image obtained by applying a Gaussian filter to a grayscale image obtained by converting the color image acquired by the color image acquisition unit to the grayscale image acquisition unit Means may be further provided.
上記目的を達成するために、本発明の第2の観点に係るコロニー計数方法は、
検体に含まれる微生物の培養後の培地の様子を示すグレースケール画像を取得するグレースケール画像取得ステップと、
閾値が供給される毎に、前記グレースケール画像取得ステップにより取得されたグレースケール画像を前記閾値により二値化することにより二値化画像を生成する二値化画像生成ステップと、
前記二値化画像生成ステップにより前記二値化画像が生成される毎に、前記二値化画像にラベリング処理を実行することにより前記二値化画像から1つのコロニーを示す画素のまとまりである連結成分を抽出する連結成分抽出ステップと、
前記連結成分抽出ステップにより前記連結成分が抽出される毎に、前記連結成分のうち記憶装置に記憶済みの連結成分情報により示される連結成分を包含しない連結成分を示す連結成分情報を、前記記憶装置にさらに記憶させる連結成分情報追加ステップと、
前記閾値が下限値から上限値に至るまでの間、前記連結成分情報追加ステップの処理が完了する毎に、前記閾値を所定値ずつ増加させて前記二値化画像生成ステップを実行させる閾値供給ステップと、
前記記憶装置に記憶されている連結成分情報に基づいて、前記微生物のコロニーの個数を計数するコロニー計数ステップと、を備える、
ことを特徴とする。
In order to achieve the above object, the colony counting method according to the second aspect of the present invention comprises:
A grayscale image acquisition step of acquiring a grayscale image showing the state of the culture medium after culturing the microorganisms contained in the specimen;
A binarized image generating step of generating a binarized image by binarizing the grayscale image acquired by the grayscale image acquiring step by the threshold value every time a threshold is supplied;
Each time the binarized image is generated by the binarized image generating step, a labeling process is performed on the binarized image, thereby connecting a group of pixels indicating one colony from the binarized image. A connected component extraction step for extracting components;
Each time the connected component is extracted by the connected component extracting step, connected storage information indicating connected components that do not include the connected components indicated by the connected component information stored in the storage device among the connected components is stored in the storage device. Connected component information adding step to be further stored in
A threshold supply step of increasing the threshold value by a predetermined value and executing the binarized image generation step each time the processing of the connected component information adding step is completed until the threshold value reaches the upper limit value. When,
A colony counting step for counting the number of colonies of the microorganism based on the connected component information stored in the storage device,
It is characterized by that.
上記目的を達成するために、本発明の第3の観点に係るプログラムは、
コンピュータを、
検体に含まれる微生物の培養後の培地の様子を示すグレースケール画像を取得するグレースケール画像取得手段、
閾値が供給される毎に、前記グレースケール画像取得手段により取得されたグレースケール画像を前記閾値により二値化することにより二値化画像を生成する二値化画像生成手段、
前記二値化画像生成手段により前記二値化画像が生成される毎に、前記二値化画像にラベリング処理を実行することにより前記二値化画像から1つのコロニーを示す画素のまとまりである連結成分を抽出する連結成分抽出手段、
前記連結成分抽出手段により前記連結成分が抽出される毎に、前記連結成分のうち記憶装置に記憶済みの連結成分情報により示される連結成分を包含しない連結成分を示す連結成分情報を、前記記憶装置にさらに記憶させる連結成分情報追加手段、
前記閾値が下限値から上限値に至るまでの間、前記連結成分情報追加手段の処理が完了する毎に、前記閾値を所定値ずつ増加させて前記二値化画像生成手段に供給する閾値供給手段、
前記記憶装置に記憶されている連結成分情報に基づいて、前記微生物のコロニーの個数を計数するコロニー計数手段、として機能させる、
ことを特徴とする。
In order to achieve the above object, a program according to the third aspect of the present invention provides:
Computer
A grayscale image acquisition means for acquiring a grayscale image showing the state of the culture medium after culturing the microorganisms contained in the specimen;
A binarized image generating unit that generates a binarized image by binarizing the grayscale image acquired by the grayscale image acquiring unit by the threshold every time a threshold is supplied;
Each time the binarized image is generated by the binarized image generating means, a labeling process is performed on the binarized image, thereby connecting a group of pixels indicating one colony from the binarized image. Connected component extraction means for extracting components;
Each time the connected component is extracted by the connected component extraction means, the storage device stores connected component information indicating a connected component that does not include the connected component indicated by the connected component information stored in the storage device. Connected component information adding means for further storing
Threshold supply means for increasing the threshold value by a predetermined value and supplying it to the binarized image generating means each time processing of the connected component information adding means is completed until the threshold value reaches the upper limit value. ,
Based on the connected component information stored in the storage device, function as colony counting means for counting the number of colonies of the microorganism,
It is characterized by that.
本発明によれば、様々な色の濃さを有するコロニーの個数を正確にカウントすることができる。 According to the present invention, it is possible to accurately count the number of colonies having various color densities.
以下、図面を参照して、本発明の実施形態に係るコロニー計数装置について説明する。 Hereinafter, a colony counting device according to an embodiment of the present invention will be described with reference to the drawings.
(実施形態)
まず、図1を参照して、本実施形態に係るコロニー計数装置100のハードウェア構成について説明する。なお、本発明が適用されるコロニー計数装置は、図1に示すコロニー計数装置100に限られない。例えば、コロニー計数装置100に種々の装置が組み込まれたコロニー計数装置に本発明が適用されてもよいし、コロニー計数装置100から適宜、種々の装置が除外されたコロニー計数装置に本発明が適用されてもよい。
(Embodiment)
First, a hardware configuration of the
まず、図1を参照して、コロニー計数装置100の物理的な構成について説明する。図1に示すようにコロニー計数装置100は、CPU(Central Processing Unit)101、ROM(Read Only Memory)102、RAM(Random Access Memory)103、記憶装置104、入力装置105、通信装置106、撮像制御部107、画像記憶部109、表示制御部110、音声処理部112、を備える。コロニー計数装置100が備えるこれらの構成要素は、バス120により相互に接続される。なお、撮像制御部107には、撮像装置108が接続される。また、表示制御部110には、表示装置111が接続される。そして、音声処理部112には、音声出力装置113が接続される。
First, the physical configuration of the
CPU101は、コロニー計数装置100の全体の動作を制御する。なお、CPU101は、ROM102に格納されているプログラムに従って動作し、RAM103をワークエリアとして使用する。
The
ROM102には、コロニー計数装置100の全体の動作を制御するためのプログラムやデータが記憶される。
The
RAM103は、CPU101のワークエリアとして機能する。つまり、CPU101は、RAM103にプログラムやデータを一時的に書き込み、これらのプログラムやデータを適宜参照する。
The
従って、CPU101とROM102とRAM103とは、制御部を構成する。制御部は、バス120に接続された各部を制御して、コロニー計数処理などを実行する。
Therefore, the
記憶装置104は、撮像画像やパラメータなどを記憶する。記憶装置104は、内蔵型の記憶装置であってもよいし、リムーバル型の記憶装置であってもよい。記憶装置104は、例えば、ハードディスク装置、メモリカードを備えるメモリカードスロット、CD−ROM(Compact Disk Read Only Memory)を備えるCD−ROMドライブなどにより構成される。
The
入力装置105は、作業者などの操作入力を受け付ける装置である。入力装置105は、例えば、マウス、キーボード、タッチスクリーン、コントローラ、ボタンなどにより構成される。
The
通信装置106は、CPU101による制御のもと、無線通信もしくは有線通信により、コロニー計数装置100の外部の装置などと通信を確立し、データを受信したり送信したりする。例えば、通信装置106は、インターネットなどの電気通信網を介してコロニー計数装置100に接続されたデータベースサーバから、撮像装置108などにより撮像された撮像画像を受信する。通信装置106は、NIC(Network Interface Card)、USB(Universal Serial Bus)ポートなどにより構成される。
Under the control of the
撮像制御部107は、CPU101による制御のもと、撮像制御部107に接続された撮像装置108を制御する。撮像制御部107は、例えば、撮像開始指示、撮像終了指示などを示す制御信号を撮像装置108に送信することにより、撮像装置108の動作を制御する。また、撮像制御部107は、例えば、解像度、露光時間、明るさなどの撮像設定を撮像装置108に送信することにより、撮像条件を撮像装置108に設定する。そして、撮像制御部107は、撮像装置108により取得された撮像画像を、撮像装置108から受信する。
The
撮像装置108は、被写体を撮像し、この被写体を示す撮像画像を生成する。撮像装置108は、撮像制御部107から供給される制御信号に従って、被写体を撮像する。撮像装置108は、生成した撮像画像を撮像制御部107に送信する。撮像画像は、例えば、各画素が、R(Red)の輝度値とG(Green)の輝度値とB(Blue)の輝度値とにより表されるカラー画像である。ただし、撮像画像は、各画素が1つの輝度値により表されるモノクロ画像であってもよい。撮像画像は、例えば、ディジタルデータにより表される。また、撮像画像のアスペクト比や解像度は、適宜調整が可能である。撮像装置108は、ディジタルカメラ、ディジタルビデオカメラ、フラットベッドスキャナ、専用リーダなどにより構成される。
The
なお、本実施形態では、撮像装置108による撮像の被写体は、検体に含まれる微生物の培養後の培地が複数装着された専用シート200である。ここで、検体は、検査対象の食品などから採取される。図2に示すように、専用シート200には、例えば、複数のフィルム型の基材シート210がマトリックス状に装着される。図2は、3×2=6個の基材シート210が専用シート200に装着されている例を示す。撮像装置108は、この専用シート200を撮像して、撮像画像を生成する。撮像画像は、例えば、300dpi、2472×3496Pixels、2.7Mbytesである。ただし、解像度等はこの例に限定されない。
In the present embodiment, the subject imaged by the
図3は、基材シート210に含まれる培養層230に、微生物のコロニー250が発生している様子を示している。また、基材シート210には、培養層230に関する識別情報220が記載される。識別情報220は、例えば、培養条件や日付などである。また、微生物は、例えば、大腸菌などの菌類である。なお、微生物の培養により、培養層230には、微生物のコロニー250が発生する。
FIG. 3 shows a state in which
本実施形態では、専用シート200の全体を撮像して得られたカラーの撮像画像から、培養層230を含む領域240が抽出されるものとして説明する。ただし、抽出される領域は、この例に限られない。例えば、抽出される領域は、培養層230の一部の領域であってもよい。以下、専用シート200の全体を撮像して得られたカラーの撮像画像から抽出される領域240を示す画像を、単にカラー画像という。また、培養層230を適宜、培地といい、基材シート210を適宜、台紙という。
In the present embodiment, a description will be given assuming that a
ここで、培養層230の色とコロニー250の色とは異なるため、カラー画像上において培養層230を表す領域とコロニー250を表す領域とを区別することができる。本実施形態では、コロニー250の色が暗めの青緑色に近い色であり、培養層230の色が明るめの肌色に近い色であり、基材シート210の色は明るい白色に近い色であるものとする。カラー画像をグレースケール化したときに生成されるグレースケール画像では、例えば、培養層230を表す画素の輝度値よりも低い第1の閾値よりも低い輝度値の画素がコロニー250を表す画素であり、培養層230を表す画素の輝度値よりも高い第2の閾値よりも高い輝度値の画素が基材シート210を表す画素であり、第1の閾値よりも高く第2の閾値よりも低い輝度値の画素が培養層230の色である。以下、「第1の閾値」を、適宜、単に「閾値」という。カラー画像上において、コロニー250を表す画素や培養層230を表す画素を検出する方法の詳細については、後述する。
Here, since the color of the
なお、基材シート210(台紙)がなくても、後述する二値化処理などは実行可能である。例えば、基材シート210の全面が培養層230となっている場合、第1の閾値のみによって、コロニー250を表す画素と培養層230を表す画素とを区別することができる。一方、基材シート210もしくは培養層230に、所定のサイズの格子を形成する罫線が付されている場合、この罫線を表す画素を、コロニー250を表す画素などと区別するための閾値が必要となる。この格子は、典型的には正方形である。この格子のサイズは、コロニー250の密度を求める際に用いられるスケールを示すことになる。
Even without the base sheet 210 (mounting paper), the binarization processing described later can be performed. For example, when the entire surface of the
なお、本実施形態では、フィルムないしシート状の乾燥培地である培養層230を採用する例について説明するが、シャーレに充填された寒天培地を採用してもよい。フィルムないしシート状の乾燥培地である培養層230を採用する場合、撮像装置108として、スキャナなどを採用することが好適である。一方、シャーレに充填された寒天培地を採用する場合、撮像装置108として、ディジタルカメラなどを採用することが好適である。
In addition, although this embodiment demonstrates the example which employ | adopts the
画像記憶部109は、コロニー250の検出対象の培養層230を含む専用シート200を撮像して得られた撮像画像などを記憶する。画像記憶部109は、例えば、撮像装置108から取得された撮像画像、記憶装置104に記憶されている撮像画像、もしくは、通信装置106により外部の装置から取得された撮像画像などを記憶する。画像記憶部109は、撮像画像の代わりに、撮像画像から抽出されたカラー画像を記憶してもよい。画像記憶部109は、例えば、フラッシュメモリなどにより構成される。
The
表示制御部110は、CPU101による制御のもと、表示装置111を制御する。例えば、表示制御部110は、表示装置111に表示させる画像を表す画像信号を生成し、生成した画像信号を表示装置111に供給する。
The
表示装置111は、表示制御部110から供給された画像信号に基づく画像を表示する。表示装置111は、例えば、LCD(Liquid Crystal Display)や有機EL(Electro Luminescence)などの表示装置により構成される。表示装置111は、タッチスクリーンであってもよい。この場合、タッチスクリーンは、表示装置として機能するほか、入力装置105としても機能する。
The
音声処理部112は、CPU101から供給されたディジタルオーディオ信号をD/A(Digital/Analog)コンバータ(図示せず)でアナログオーディオ信号に変換して、音声出力部113に供給する。音声処理部112は、CPU101から供給されたディジタルオーディオ信号に各種処理を加えるDSP(Digital Signal Processor)を含んでもよい。
The
音声出力装置113は、音声処理部112から供給されたアナログオーディオ信号を音声に変換して、出力する。音声出力装置113は、例えば、スピーカにより構成される。音声出力装置113は、ディジタルオーディオ信号またはアナログオーディオ信号を増幅する増幅装置を含んでもよい。
The
次に、図4〜図6を参照して、本実施形態に係るコロニー計数装置100が実行する連結成分カウント処理において実行されるラベリング処理について説明する。なお、以下に説明するラベリング処理の他、種々のラベリング処理を、本発明に採用することができる。なお、理解を容易にするため、グレースケール画像は、縦方向の16行×横方向の16行=256画素により構成されるものとして説明する。
Next, with reference to FIGS. 4-6, the labeling process performed in the connected component count process which the
まず、CPU101は、撮像画像から抽出されたカラー画像をグレースケール画像に変換する。例えば、CPU101は、NTSC(National Television System Committee)係数による加重平均法を採用して、カラー画像をグレースケール画像に変換することができる。例えば、カラー画像における各色の輝度値をR、G、Bとし、グレースケール画像における輝度値をYとすると、Y=(0.298912*R+0.586611*G+0.114478*B)である。
First, the
そして、CPU101は、グレースケール画像を二値化する。具体的には、CPU101は、グレースケール画像を構成する各画素の輝度値が閾値以上であるか否かを判別し、判別結果に従って各画素を二値化し、二値化画像を生成する。例えば、グレースケール画像を構成する各画素が0〜255までの256階調で表現されている場合、二値化画像を構成する各画素は0もしくは1の2階調で表現される。ここで、コロニー250のように暗い部分を示す画素の輝度値は0(黒)になり、培養層230のように明るい部分を示す画素の輝度値は1(白)にされる。
Then, the
なお、閾値は、例えば、コロニー250を示す画素の輝度値よりも十分に高く、培養層230を示す画素の輝度値よりも十分に低い輝度値に設定される。本実施形態では、グレースケール画像に基づいて決定された閾値範囲から閾値を選択する処理と、選択された閾値による二値化により生成された二値化画像から連結成分を抽出する処理とを、閾値が閾値範囲の最低値(下限値)から最高値(上限値)に至るまで繰り返される。ここでは、特定の閾値による二値化により生成された二値化画像から連結成分を抽出する処理について説明する。なお、閾値範囲は、撮像環境、コロニー250を構成する微生物の種類、培地の素材などにより、あらかじめ決定されていてもよい。
For example, the threshold value is set to a luminance value sufficiently higher than the luminance value of the pixel indicating the
図4に、二値化画像を示す。図4において、ハッチングで示している画素は、輝度値が0(黒)の画素であり、白抜きで示している画素は、輝度値が1(白)の画素である。ここで、輝度値が0(黒)の画素は、コロニー250を示す画素である。従って、輝度値が0(黒)の画素は、二値化画像上において数個のまとまりを構成する。このまとまりのそれぞれは、1つのコロニー250を示し、以下適宜、連結成分という。図4に示す例では、C01、C02、Co3で示される3つの連結成分(3つのコロニー250)が検出された例を示す。
FIG. 4 shows a binarized image. In FIG. 4, pixels indicated by hatching are pixels having a luminance value of 0 (black), and pixels indicated by white portions are pixels having a luminance value of 1 (white). Here, a pixel having a luminance value of 0 (black) is a pixel indicating the
ここで、各連結成分は、ラベル付けして管理することが望まれる。つまり、このラベルにより、連結成分を特定できることが望ましい。以下、図5を参照して、ラベリング処理について説明する。本実施形態では、縦、横、斜め方向に連続している部分を同じラベルにする8連結を採用する例について説明するが、縦、横方向に連続している部分を同じラベルにする4連結を採用することもできる。 Here, it is desirable to manage each connected component by labeling. That is, it is desirable that the connected component can be specified by this label. Hereinafter, the labeling process will be described with reference to FIG. In the present embodiment, an example is described in which 8 connections are used in which the portions that are continuous in the vertical, horizontal, and diagonal directions are the same label. Can also be adopted.
まず、CPU101は、ラベリングのために、各々がいずれかの画素に対応する画素数分のラベル番号を格納するための変数をRAM103などに用意する。そして、CPU101は、全てのラベル番号を0に初期化する。ここで、ある画素のラベル番号が0であることは、このある画素がラベル付けされていないことを示し、ある画素のラベル番号が0以外の整数nであることは、このある画素が整数nにラベル付けされていることを示す。また、本実施形態では、画素の輝度値が0(黒)の場合、この画素がラベル付けされ、画素の輝度値が1(白)の場合、この画素がラベル付けされないものとする。
First, for labeling, the
CPU101は、注目画素のラベル番号の更新処理を、注目画素を走査しながら実行することにより、全ての画素のラベル番号の更新処理を実行する。なお、注目画素は、最初は、図5における左上の画素(1行目1列目の画素)であり、右方向(列方向、横軸方向)に向かって1つずつシフトし、右端に至ると1つ下の行の左端の画素にシフトし、以下同様に図5における右下の画素(16行目16列目の画素)までシフトする。
The
ここで、ラベル番号の更新処理について説明する。まず、注目画素の輝度値が1(白)である場合、注目画素のラベル番号は更新されない。一方、注目画素の輝度値が0(黒)である場合、注目画素のラベル番号が更新される。注目画素のラベル番号が何に更新されるかは、注目画素を基準として、左上の画素、上の画素、右上の画素、左の画素の4つの画素のラベル番号が何であるかに依存する。例えば、図5におけるP34で示される3行目4列目の画素(以下「P34」とする。)が注目画素である場合、P23、P24、P25、P33のラベル番号に応じて、P34のラベル番号が決定する。 Here, the label number update process will be described. First, when the luminance value of the target pixel is 1 (white), the label number of the target pixel is not updated. On the other hand, when the luminance value of the target pixel is 0 (black), the label number of the target pixel is updated. What the label number of the target pixel is updated depends on what the label numbers of the four pixels of the upper left pixel, the upper pixel, the upper right pixel, and the left pixel are based on the target pixel. For example, when the pixel in the third row and the fourth column (hereinafter referred to as “P34”) indicated by P34 in FIG. 5 is the target pixel, the label of P34 is set according to the label numbers of P23, P24, P25, and P33. The number is determined.
具体的には、4つの画素のラベル番号が全て0である場合、注目画素に新たなラベル番号が割り振られる。つまり、過去に付されたラベル番号のうち最も大きいラベル番号よりも1大きいラベル番号が注目画素のラベル番号に設定される。一方、4つの画素のラベル番号のいずれかが0でない場合、4つのラベル番号のうちで最も小さいラベル番号(ただし、0以外のラベル番号)が注目画素のラベル番号に設定される。また、4つのラベル番号のうちに、この最も小さいラベル番号以外のラベル番号(ただし、0以外のラベル番号)がある場合、この最も小さいラベル番号以外のラベル番号が付されている全ての画素のラベル番号を、この最も小さいラベル番号に書き換える。 Specifically, when the label numbers of all four pixels are 0, a new label number is assigned to the target pixel. That is, a label number that is one larger than the largest label number among the label numbers assigned in the past is set as the label number of the target pixel. On the other hand, if any of the label numbers of the four pixels is not 0, the smallest label number among the four label numbers (however, a label number other than 0) is set as the label number of the target pixel. In addition, when there is a label number other than the smallest label number among the four label numbers (however, a label number other than 0), all of the pixels to which a label number other than the smallest label number is assigned. Rewrite the label number to this smallest label number.
以上説明したラベル番号の更新処理を全ての画素に対して実行すると、ラベリング処理が完了する。図5は、ラベリング処理により、C01、C02、C03の3つの連結成分が検出された例を示している。なお、他のラベル番号により書き換えられたラベル番号は使用されないので、使用されるラベル番号が連番になるようにラベル番号の振り直しをすることが望ましい。 When the label number updating process described above is executed for all pixels, the labeling process is completed. FIG. 5 shows an example in which three connected components C01, C02, and C03 are detected by the labeling process. Since label numbers rewritten with other label numbers are not used, it is desirable to reassign the label numbers so that the label numbers used are serial numbers.
図5に示すように、連結成分は不定形である。従って、本実施形態では、少なくとも後述する連結成分カウント処理が完了するまでは、連結成分を不定型なものとして扱う。しかしながら、連結成分を矩形で近似すると、連結成分の大きさなどを判別する処理などが容易になる。このため、例えば、連結成分カウント処理が完了したのちに、図6に示すように、連結成分をこの連結成分に外接する矩形で近似することができる。図6では、C01で示された連結成分をC11で近似し、C02で示された連結成分をC12で近似し、C03で示された連結成分をC13で近似する例を示している。なお、矩形は、撮像画像における縦軸方向(行方向)に平行な2本の線分と、撮像画像における横軸方向(列方向)に平行な2本の線分と、により囲まれる。なお、Lyは、C11により示される矩形の縦軸方向の長さを示し、Lxは、C11により示される矩形の横軸方向の長さを示している。この例では、C11により示される矩形の短辺の長さはLxであり、C11により示される矩形の長辺の長さはLyである。 As shown in FIG. 5, the connected component is indefinite. Therefore, in this embodiment, the connected component is treated as an indefinite type until at least the connected component counting process described later is completed. However, when the connected component is approximated by a rectangle, the process of determining the size of the connected component and the like are facilitated. Therefore, for example, after the connected component counting process is completed, the connected component can be approximated by a rectangle circumscribing the connected component as shown in FIG. FIG. 6 shows an example in which the connected component indicated by C01 is approximated by C11, the connected component indicated by C02 is approximated by C12, and the connected component indicated by C03 is approximated by C13. Note that the rectangle is surrounded by two line segments parallel to the vertical axis direction (row direction) in the captured image and two line segments parallel to the horizontal axis direction (column direction) in the captured image. Note that Ly indicates the length of the rectangle indicated by C11 in the vertical axis direction, and Lx indicates the length of the rectangle indicated by C11 in the horizontal axis direction. In this example, the length of the short side of the rectangle indicated by C11 is Lx, and the length of the long side of the rectangle indicated by C11 is Ly.
次に、図7を参照して、本実施形態に係るコロニー計数装置100の機能的な構成について説明する。図7に示すように、コロニー計数装置100は、グレースケール画像取得部11、二値化画像生成部12、連結成分抽出部13、連結成分情報追加部14、閾値供給部15、コロニー計数部16、閾値範囲決定部17、カラー画像取得部18、色相範囲特定部19、グレースケール画像生成部20、を備える。
Next, a functional configuration of the
グレースケール画像取得部11は、検体に含まれる微生物の培養後の培地の様子を示すグレースケール画像を取得する。グレースケール画像取得部11は、例えば、CPU101を含む。
The gray scale
二値化画像生成部12は、閾値が供給される毎に、グレースケール画像取得部11により取得されたグレースケール画像を閾値により二値化することにより二値化画像を生成する。二値化画像生成部12は、例えば、CPU101を含む。
The binarized
連結成分抽出部13は、二値化画像生成部12により二値化画像が生成される毎に、二値化画像にラベリング処理を実行することにより二値化画像から連結成分を抽出する。連結成分抽出部13は、例えば、CPU101を含む。
The connected
連結成分情報追加部14は、連結成分抽出部13により連結成分が抽出される毎に、連結成分のうち記憶部30に記憶済みの連結成分情報により示される連結成分を包含しない連結成分を示す連結成分情報を、記憶部30にさらに記憶させる。連結成分情報追加部14は、例えば、CPU101を含む。
The connected component
閾値供給部15は、閾値が下限値から上限値に至るまでの間、連結成分情報追加部14の処理が完了する毎に、閾値を所定値ずつ増加させて二値化画像生成部12に供給する。閾値供給部15は、例えば、CPU101を含む。
The
コロニー計数部16は、記憶部30に記憶されている連結成分情報に基づいて、微生物のコロニーの個数を計数する。コロニー計数部16は、例えば、CPU101を含む。
The
閾値範囲決定部17は、グレースケール画像を構成する画素の輝度値の分布に基づいて、下限値と上限値とを決定する。
The threshold
例えば、閾値範囲決定部17は、グレースケール画像を構成する画素の輝度値毎の度数を表す輝度ヒストグラムに含まれる最大の山状の度数分布の輝度範囲の中で度数が最多である輝度値を特定する。そして、閾値範囲決定部17は、特定した輝度値よりも低く、かつ、特定した輝度値の度数に対して所定の割合以下の度数である輝度値のうち、最高の輝度値を上限値に決定する。
For example, the threshold
また、例えば、閾値範囲決定部17は、グレースケール画像を構成する画素の輝度値の最小の輝度値を特定し、特定した輝度値を下限値に決定する。コロニー計数部16は、例えば、CPU101を含む。
For example, the threshold
カラー画像取得部18は、培地を撮像して得られたカラー画像を取得する。例えば、カラー画像は、撮像画像から抽出される。また、撮像画像は、静止画像でもよいし、動画像でもよい。カラー画像取得部18は、例えば、CPU101を含む。
The color
色相範囲特定部19は、カラー画像取得部18により取得されたカラー画像を構成する画素の色相の分布に基づいて、コロニーの色相範囲を特定する。
例えば、色相範囲特定部19は、カラー画像を構成する画素の色相毎の度数を表す色相ヒストグラムから最大の山状の度数分布の色相範囲を除外したのちに存在する山状の度数分布の色相範囲をコロニーの色相範囲として特定する。色相範囲特定部19は、例えば、CPU101を含む。
The hue
For example, the hue
グレースケール画像生成部20は、グレースケール画像取得部11に取得させるグレースケール画像を生成する。このグレースケール画像は、例えば、カラー画像取得部18により取得されたカラー画像をグレースケール化した画像を構成する画素のうち、色相範囲特定部19により特定された色相範囲に含まれない画素の輝度値を、上限値よりも高い輝度値に設定することにより取得される。
The gray scale
また、グレースケール画像生成部20は、カラー画像取得部18により取得されたカラー画像をグレースケール化した画像にガウシアンフィルタをかけることに得られるグレースケール画像を、グレースケール画像取得部11に取得させるグレースケール画像として生成してもよい。グレースケール画像生成部20は、例えば、CPU101を含む。
Further, the gray scale
記憶部30は、連結成分抽出部13により抽出された連結成分を示す連結成分情報を記憶する。記憶部30に記憶される連結成分情報は、CPU101などにより、連結成分抽出部13により連結成分が抽出される毎に、抽出された連結成分がさらに含まれるように更新される。連結成分情報は、例えば、連結成分を構成する各画素の位置(座標)や連結成分のラベル番号を示す情報であり、配列変数などにより管理される情報である。記憶部30は、例えば、RAM103や記憶装置104により構成される。
The
次に、本実施形態に係るコロニー計数装置100が実行するコロニー計数処理について説明する。図8は、コロニー計数装置100が実行するコロニー計数処理を示すフローチャートである。コロニー計数装置100は、例えば、作業者によるコロニー計数処理の開始指示が入力装置105に受け付けられたことを検知すると、図8に示すコロニー計数処理を開始する。
Next, a colony counting process executed by the
まず、CPU101は、撮像画像を取得する(ステップS101)。撮像画像の取得元は、典型的には、撮像装置108であるが、記憶装置104、画像記憶部109、通信装置106が通信可能な外部の装置などであってもよい。撮像画像は、典型的には、専用シート200を撮像して得られるカラーの画像である。撮像画像は、モノクロの画像でもよい。なお、CPU101は、取得した撮像画像に対して、種々のトリミング処理やフィルタリング処理を実行してもよい。CPU101は、例えば、取得した撮像画像をRAM103に記憶する。
First, the
CPU101は、ステップS101の処理を完了すると、カラー画像を取得する(ステップS102)。例えば、CPU101は、撮像画像から矩形の領域を抽出して、カラー画像とする。CPU101は、取得したカラー画像をRAM103に記憶する。
When completing the process in step S101, the
CPU101は、ステップS102の処理を完了すると、取得したカラー画像をグレースケール化することによりグレースケール画像を生成する(ステップS103)。グレースケール化は、例えば、NTSC計数による加重平均法を採用することができる。生成されたグレースケール画像は、例えば、RAM103に記憶される。
When completing the process in step S102, the
CPU101は、ステップS103の処理を完了すると、ガウシアンフィルタリング処理を実行する(ステップS104)。なお、ガウシアンフィルタは、注目画素に近い画素ほど平均値を計算するときの重みを大きくし、注目画素に遠い画素ほど平均値を計算するときの重みが小さいフィルタである。なお、この重みは、ガウス分布の関数を用いて計算することができる。
When completing the process of step S103, the
図9に、ガウシアンフィルタに用いる5×5のオペレータ(カーネル)を示す。グレースケール画像は、ガウシアンフィルタリング処理により、輝度値の分布が滑らかになる。図10(A)は、ガウシアンフィルタリング処理の未実行時のグレースケール画像を示す。図10(A)は、コロニー250を表す画素の輝度値の分布が一様でないために、1つのコロニー250が、C21、C22、C23により示されている3つの連結成分として検出された例を示している。
FIG. 9 shows a 5 × 5 operator (kernel) used for the Gaussian filter. The grayscale image has a smooth luminance value distribution by Gaussian filtering. FIG. 10A shows a grayscale image when the Gaussian filtering process is not executed. FIG. 10A shows an example in which one
図10(B)は、ガウシアンフィルタリング処理の実行時のグレースケール画像を示す。図10(B)は、ガウシアンフィルタリング処理により、コロニー250を表す画素の輝度値のばらつきが小さくなったため、1つのコロニー250が、C20により示されている1つの連結成分として検出された例を示している。CPU101は、ステップS104のガウシアンフィルタリング処理を完了すると、閾値範囲決定処理を実行する(ステップS105)。閾値範囲決定処理については、図11を参照して詳細に説明する。図11は、コロニー計数装置100が実行する閾値範囲決定処理を示すフローチャートである。なお、閾値範囲は、閾値範囲の下限値と閾値範囲の上限値とにより決定される。
FIG. 10B shows a grayscale image when the Gaussian filtering process is executed. FIG. 10B shows an example in which one
まず、CPU101は、グレースケール画像の輝度値のヒストグラムを生成する(ステップS201)。例えば、グレースケール画像を構成する画素の階調が、0〜255の256階調であるものとすると、CPU101は、0〜255の輝度値のそれぞれについて、グレースケール画像を構成する画素のうち、この輝度値である画素の数(度数)を求める。
First, the
CPU101は、ステップS201の処理を完了すると、生成したヒストグラムに移動平均をかける(ステップS202)。かかる移動平均処理により、ヒストグラム上のノイズ成分が除去され、なめらかなヒストグラムが生成される。生成したヒストグラムを表す情報は、適宜、RAM103に記憶される。
When the
図12に、グレースケール画像の輝度値のヒストグラムを示す。グレースケール画像は、コロニー250が発生した培養層230(培地)と基材シート210(台紙)とを表す画像である。従って、図12に示すように、培養層230を表す輝度値の画素の度数と、基材シート210を表す輝度値の画素の度数とが大きくなる。つまり、グレースケール画像の輝度値のヒストグラムは、培地を表す画素の輝度値と、台紙を表す画素の輝度値とに、大きなピークを有する。なお、カラー画像に台紙が含まれていない場合、台紙を表す画素の輝度値にピークが生じない。一方、カラー画像に罫線が含まれている場合、罫線を表す画素の輝度値にピークが発生する。
FIG. 12 shows a histogram of luminance values of a grayscale image. The gray scale image is an image representing the culture layer 230 (medium) in which the
ここで、コロニー250は、培養層230や基材シート210に比べ、暗い色である。従って、コロニー250を表す画素の輝度値は、培養層230を表す画素の輝度値や基材シート210を表す画素の輝度値よりも低くなる。なお、コロニー250の色は均一ではないため、コロニー250を表す画素の輝度値にはある程度の幅が存在する。同様に、培養層230を表す画素の輝度値や、培養層230を表す画素の輝度値にもある程度の幅が存在する。
Here, the
本実施形態では、二値化のための閾値範囲の最小値を示す下限値を、コロニー250を表す画素の輝度値の最小値とする。つまり、輝度値の0から昇べきの順に度数をチェックし、度数が初めて0でなくなる輝度値を、下限値に設定する。
In the present embodiment, the lower limit value indicating the minimum value of the threshold range for binarization is set as the minimum value of the luminance value of the pixel representing the
まず、CPU101は、ステップS202の処理が完了すると、注目輝度値を0に設定する(ステップS203)。具体的には、CPU101は、注目輝度値を表す変数をRAM103に設け、この注目輝度値を表す変数の値を0に初期化する。
First, when the process of step S202 is completed, the
CPU101は、ステップS203の処理が完了すると、注目輝度値の度数が0か否かを判別する(ステップS204)。なお、CPU101は、注目輝度値の度数は、上述したヒストグラムを表すデータを参照することにより確認することができる。
When the process of step S203 is completed, the
CPU101は、注目輝度値の度数が0であると判別すると(ステップS204:YES)、注目輝度値をインクリメントする(ステップS205)。例えば、CPU101は、RAM103に記憶されている注目輝度値を表す変数に、現在の値よりも1つ大きな値を書き込む。このように、インクリメント量は、典型的には1であるが、1に限定されない。CPU101は、ステップS205の処理を完了すると、ステップS204に処理を戻す。
When the
一方、CPU101は、注目輝度値の度数が0でないと判別すると(ステップS204:NO)、注目輝度値を下限値に設定する(ステップS206)。具体的には、CPU101は、下限値を表す変数をRAM103上に設け、この変数に注目輝度値を示す変数の値を代入する。
On the other hand, if the
また、本実施形態では、二値化のための閾値範囲の最大値を示す上限値を、培地を表す画素の輝度値のうち度数が最多の輝度値(以下「ピーク輝度値」という。)よりも低い輝度値であって、ピーク輝度値の度数の所定割合以下の最大の輝度値とする。つまり、ピーク輝度値から降べきの順に度数をチェックし、度数が初めてピーク輝度値の度数の処理割合以下になる輝度値を、上限値に設定する。 In the present embodiment, the upper limit value indicating the maximum value of the threshold range for binarization is determined from the luminance value having the highest frequency among the luminance values of the pixels representing the culture medium (hereinafter referred to as “peak luminance value”). Is the lowest luminance value, and the maximum luminance value is equal to or less than a predetermined ratio of the frequency of the peak luminance value. That is, the frequencies are checked in order of descending power from the peak luminance value, and the luminance value that becomes the first processing frequency or less of the frequency of the peak luminance value is set as the upper limit value.
まず、CPU101は、ステップS206の処理を完了すると、ヒストグラムにおける最大の山状領域を特定する(ステップS207)。この最大の山状領域は、培地を表す画素の輝度値により構成される。この理由は、グレースケール画像上において、培地を表す輝度範囲の画素が最も多いためである。なお、グレースケール画像上において、培地を表す画素の数(培地の面積)が台紙を表す画素の数(台紙の面積)よりも多い場合、台紙を表す画素の輝度値により構成される山状領域よりも、培地を表す画素の輝度値により構成される山状領域の方が大きくなる。最大の山状領域を検出する方法は任意である。
First, when the
例えば、注目輝度値を0から昇べきの順に走査しながら、注目輝度値の度数および注目輝度値の近傍の所定個数の輝度値の合計度数を比較し、合計度数が最大となる注目輝度値を、暫定的に、最大の山状領域の中心の輝度値に決定することができる。なお、中心の輝度値における合計度数に対する割合が、所定割合以上の輝度値の範囲を、山状領域に決定することができる。 For example, while scanning the target luminance value in order of increasing from 0, the frequency of the target luminance value and the total frequency of a predetermined number of luminance values in the vicinity of the target luminance value are compared, and the target luminance value having the maximum total frequency is compared. Temporarily, the luminance value at the center of the maximum mountain region can be determined. It should be noted that a range of luminance values in which the ratio of the central luminance value with respect to the total frequency is a predetermined ratio or more can be determined as a mountain region.
なお、ヒストグラム上において、培地を表す画素の度数のピークよりも、台紙を表す画素の度数のピークの方が高くなることがある。しかしながら、グレースケール画像上において、培地を表す輝度範囲の画素が最も多い場合、ヒストグラムに移動平均を強くかけることにより、培地を表す画素の度数のピークよりも、台紙を表す画素の度数のピークを低くすることができる。従って、ヒストグラムに適切に移動平均をかけることにより、培地を表す画素の度数のピーク、もしくは、培地を表す画素の輝度値により構成される山状領域を容易に発見することができる。 On the histogram, the frequency peak of the pixel representing the mount may be higher than the frequency peak of the pixel representing the culture medium. However, on the grayscale image, when the number of pixels in the luminance range representing the culture medium is the largest, by applying a strong moving average to the histogram, the frequency peak of the pixel representing the mount is made higher than the frequency peak of the pixel representing the culture medium. Can be lowered. Therefore, by appropriately applying a moving average to the histogram, it is possible to easily find a mountain-shaped region constituted by the peak of the frequency of the pixel representing the culture medium or the luminance value of the pixel representing the culture medium.
CPU101は、ステップS207の処理を完了すると、最大の山状領域における最大度数の輝度値を特定する(ステップS208)。つまり、CPU101は、最大の山状領域を構成する輝度範囲の中から最大度数の輝度値を特定する。この最大度数の輝度値を示す変数は、RAM103などに記憶される。なお、図12において最大の山状領域における最大度数をNmaxで示している。また、上限値における度数は、Nmax×20%の度数である。
When the
CPU101は、ステップS208の処理を完了すると、注目輝度値を最大度数の輝度値に設定する(ステップS209)。つまり、CPU101は、RAM103に記憶されている注目輝度値を示す変数の値を、最大度数の輝度値に初期化する。
When completing the process of step S208, the
CPU101は、ステップS209の処理を完了すると、注目輝度値の度数が最大度数の所定割合以下であるか否かを判別する(ステップS210)。所定割合は、例えば、20%とすることができるが、20%に限定されない。
When completing the process in step S209, the
CPU101は、注目輝度値の度数が最大度数の所定割合以下でないと判別すると(ステップS210:NO)、注目輝度値をデクリメントする(ステップS211)。つまり、CPU101は、RAM103に記憶されている注目輝度値を示す変数に、現在の値よりも1小さい値を代入する。なお、デクリメントする値は、典型的には1であるが、1に限定されない。CPU101は、ステップS211の処理を完了すると、ステップS210に処理を戻す。
If the
一方、CPU101は、注目輝度値の度数が最大度数の所定割合以下であると判別すると(ステップS210:YES)、注目輝度値を上限値に設定する(ステップS212)。具体的には、CPU101は、上限値を表す変数をRAM103上に設け、この変数に注目輝度値を示す変数の値を代入する。CPU101は、ステップS212の処理を完了すると、閾値範囲決定処理を完了する。
On the other hand, when the
CPU101は、ステップS105の閾値範囲決定処理を完了すると、色相バンドパスフィルタリング処理を実行する(ステップS106)。色相バンドパスフィルタリング処理については、図13を参照して詳細に説明する。図13は、コロニー計数装置100が実行する色相バンドパスフィルタリング処理を示すフローチャートである。
CPU101 will perform a hue band pass filtering process, if the threshold range determination process of step S105 is completed (step S106). The hue bandpass filtering process will be described in detail with reference to FIG. FIG. 13 is a flowchart showing the hue bandpass filtering process executed by the
まず、CPU101は、カラー画像の色相のヒストグラムを生成する(ステップS301)。具体的には、CPU101は、カラー画像を構成する各画素について、R(赤)の輝度値とG(緑)の輝度値とB(青)の輝度値との割合により、この画素の色相を決定する。色相は、赤→橙→黄→緑→青→藍→紫→赤により表され、0〜360度により表される。図14に、カラー画像の色相のヒストグラムを示す。
First, the
図14に示すように、ヒストグラム上には、培地を表す画素の色相により構成される山状領域と、コロニー250を表す画素の色相により構成される山状領域と、がみられる。本実施形態では、ヒストグラム上から培地を表す画素の色相により構成される山状領域を除外し、除外後のヒストグラム上にみられる、コロニー250を表す画素の色相により構成される山状領域を、有効な色相範囲に設定する。つまり、有効な色相範囲以外の色相範囲の画素は無効にされる。
As shown in FIG. 14, on the histogram, a mountain-shaped area constituted by the hue of the pixel representing the culture medium and a mountain-shaped area constituted by the hue of the pixel representing the
このような色相バンドパスフィルタリング処理により、培地の持つざらつきや罫線がコロニー250として誤認識されにくくなる。
Such hue bandpass filtering processing makes it difficult for the texture and ruled lines of the culture medium to be erroneously recognized as
まず、CPU101は、カラー画像の色相のヒストグラムを生成する(ステップS301)。具体的には、CPU101は、カラー画像を構成する各画素について、3原色の輝度値の割合に基づいて、色相を決定する。そして、CPU101は、色相毎に、この色相の画素の数を集計し、この色相の度数を求める。
First, the
CPU101は、ステップS301の処理を完了すると、ヒストグラムにおける最大の山状領域を特定する(ステップS302)。CPU101は、ステップS207と同様に、ヒストグラムにおける最大の山状領域を求めることができる。
When the
CPU101は、ステップS302の処理を完了すると、最大の山状領域の除外後の山状領域を、コロニー250の色相範囲として特定する(ステップS303)。CPU101は、ステップS302と同様の処理により、最大の山状領域の除外後のヒストグラムにおける山状領域を求めることができる。CPU101は、特定した色相範囲を示す情報を、RAM103に記憶する。
When the
CPU101は、ステップS303の処理を完了すると、グレースケール画像を構成する画素のうち、コロニー250の色相範囲外の色相を表す画素に、輝度値の最大値を設定する(ステップS304)。ここで、輝度値の最大値は、例えば、グレースケール画像が256階調である場合、輝度値の最大値は255(白)である。かかる処理によれば、グレースケール画像を二値化する際の閾値がどのような値に設定されても、輝度値の最大値が設定された画素は、二値化画像において1(白)に設定される。CPU101は、ステップS304の処理を完了すると、色相バンドパスフィルタリング処理を完了する。
When the
CPU101は、ステップS106の色相バンドパスフィルタリング処理を完了すると、連結成分カウント処理を実行する(ステップS107)。連結成分カウント処理については、図15を参照して詳細に説明する。図15は、コロニー計数装置100が実行する連結成分カウント処理を示すフローチャートである。
When the
まず、CPU101は、連結成分情報を初期化する(ステップS401)。連結成分情報は、記憶装置104などに記憶され、配列変数として管理される。連結成分情報は、例えば、検出された連結成分毎に、連結成分の位置および大きさ、連結成分に割り当てられたラベル番号などにより示される。記憶装置104内に連結成分情報が存在しない場合、CPU101は、連結成分情報を初期化しなくてもよい。
First, the
本実施形態では、連結成分は、図5にC01、C02、C03として示すように、不定形であるものとして扱われる。例えば、1つの連結成分は、この連結成分を構成する各画素の座標の配列と、ラベル番号と、を含む構造体型の変数(以下「構造体変数」という。)により表すことができる。そして、連結成分情報は、例えば、検出された連結成分の個数分の構造体変数の配列により管理される。 In the present embodiment, the connected component is treated as being indefinite as shown as C01, C02, and C03 in FIG. For example, one connected component can be represented by a structure type variable (hereinafter referred to as “structure variable”) including an array of coordinates of each pixel constituting the connected component and a label number. The connected component information is managed by, for example, an array of structure variables corresponding to the number of detected connected components.
CPU101は、ステップS401の処理を完了すると、閾値に下限値を設定する(ステップS402)。この閾値は、グレースケール画像を二値化画像に変換する際に用いられる閾値である。下限値は、この閾値の下限値であり、ステップS206において設定される。例えば、CPU101は、RAM103に設けられた閾値を示す変数に、RAM103に設けられた下限値を示す変数の値を代入する。
CPU101 will set a lower limit to a threshold value, if the process of step S401 is completed (step S402). This threshold is a threshold used when converting a grayscale image into a binarized image. The lower limit value is a lower limit value of the threshold value, and is set in step S206. For example, the
CPU101は、ステップS402の処理を完了すると、グレースケール画像を設定した閾値で二値化する(ステップS403)。CPU101は、生成した二値化画像を表す情報を、RAM103に記憶する。
When completing the process in step S402, the
CPU101は、ステップS403の処理を完了すると、二値化画像に対してラベリング処理を実行する(ステップS404)。ラベリング処理は、図4〜図6を用いて説明した処理である。なお、ラベリング処理により、0個以上の連結成分が検出される。検出された連結成分には、ユニークなラベル番号が付けられる。また、連結成分は、上述した構造体変数により管理される。連結成分を示す情報は、適宜、RAM103などに記憶される。
When completing the process in step S403, the
CPU101は、ステップS404の処理を完了すると、未選択の連結成分があるか否かを判別する(ステップS405)。具体的には、CPU101は、ステップS404のラベリング処理により検出された連結成分のうち、ステップS406において選択されていない連結成分があるか否かを、連結成分に対応付けられるフラグなどを参照して判別することができる。なお、ステップS406においてラベル番号が小さいものから順に連結成分が選択される場合、ラベル番号が最大の連結成分がステップS406において選択されたか否かにより、未選択の連結成分があるか否かを判別することができる。
When completing the process in step S404, the
CPU101は、未選択の連結成分があると判別すると(ステップS405:YES)、連結成分を1つ選択する(ステップS406)。なお、CPU101は、ラベル番号の昇べきの順、もしくは、ラベル番号の降べきの順に、連結成分を選択することができる。この場合、CPU101は、例えば、最後に選択した連結成分のラベル番号を示す変数をRAM103に記憶する。
When determining that there is an unselected connected component (step S405: YES), the
CPU101は、ステップS406の処理を完了すると、選択した連結成分が既検出の連結成分を包含しているか否かを判別する(ステップS407)。具体的には、CPU101は、現在よりも低い閾値による二値化により生成された二値化画像のラベリング処理により検出された連結成分のうち、連結成分を構成する全画素のそれぞれが、選択した連結成分を構成する全画素のうちのいずれかと一致する連結成分があるか否かを判別する。なお、過去に検出された連結成分を示す連結成分情報は、例えば、記憶装置104に記憶される。
When completing the process in step S406, the
CPU101は、既検出の連結成分を包含していると判別すると(ステップS407:YES)、ステップS405に処理を戻す。一方、CPU101は、既検出の連結成分を包含していないと判別すると(ステップS407:NO)、連結成分をラベリング結果に追加する(ステップS408)。具体的には、CPU101は、記憶装置104に記憶されている連結成分情報の配列の末尾に、選択された連結成分を示す情報を追加する。あるいは、CPU101は、連結成分情報が、選択された連結成分を示す情報をさらに含むように、連結成分情報を更新する。
If the
CPU101は、ステップS408の処理を完了すると、ラベル番号を振り直す(ステップS409)。つまり、CPU101は、既に検出済みの全ての連結成分と、今回新たに追加される1つの連結成分と、にユニークなラベル番号を与える。ラベル番号の付与の方法は、適宜、調整することができる。例えば、CPU101は、連結成分の配置順、もしくは、検出された順に、昇べきの順(降べきの順)にラベル番号を付与することができる。CPU101は、ステップS409の処理を完了すると、ステップS405に処理を戻す。
When the
一方、CPU101は、未選択の連結成分がないと判別すると(ステップS405:NO)、閾値をインクリメントする(ステップS410)。なお、未選択の連結成分がないと判別されることは、現在の閾値によって二値化された二値化画像から検出された連結成分のうち、追加すべき全ての連結成分が追加されたことを意味する。
On the other hand, when determining that there is no unselected connected component (step S405: NO), the
閾値のインクリメント量は、適宜、調整することができる。例えば、インクリメント量は、1にすることもできるし、その他のあらかじめ定められた整数値にすることもできる。もしくは、例えば、インクリメント量は、閾値の下限値と閾値の上限値との差を所定の整数で除算したときの商にしてもよい。CPU101は、RAM103に記憶されている閾値を示す変数に、インクリメント後の閾値を示す値を代入する。
The increment amount of the threshold can be adjusted as appropriate. For example, the increment amount can be 1 or other predetermined integer value. Alternatively, for example, the increment amount may be a quotient obtained by dividing the difference between the lower limit value of the threshold and the upper limit value of the threshold by a predetermined integer. The
CPU101は、ステップS410の処理を完了すると、閾値が上限値を超えているか否かを判別する(ステップS411)。つまり、CPU101は、ステップS410におけるインクリメント後の閾値が、ステップS212において設定された上限値を超えているか否かを、RAM103に記憶されている閾値を示す変数と上限値を示す変数とを比較することにより判別する。
When completing the process in step S410, the
CPU101は、閾値が上限値を超えていないと判別すると(ステップS411:NO)、ステップS403に処理を戻す。一方、CPU101は、閾値が上限値を超えていると判別すると(ステップS411:YES)、ラベリング結果を保存する(ステップS412)。なお、CPU101は、記憶装置104に記憶されている連結成分情報に基づいて、ラベリング結果を求め、ラベリング結果を示す情報を記憶装置104などに記憶することができる。CPU101は、ステップS412の処理を完了すると、連結成分カウント処理を完了する。
If the
ここで、図16〜図18を参照して、連結成分カウント処理により、連結成分が追加されていく様子について説明する。 Here, with reference to FIGS. 16 to 18, a state in which connected components are added by the connected component counting process will be described.
図16(A)は、グレースケール画像を示す図である。このグレースケール画像は、C31で示す不定形で囲まれたコロニー250と、C32で示す矩形で囲まれたコロニー250と、C33で示す矩形で囲まれたコロニー250と、の3つのコロニー250が撮像されたことを示している。ここで、C31で示す不定形で囲まれたコロニー250が濃い色を有し、C32で示す矩形で囲まれたコロニー250が普通の濃さの色を有し、C33で示す矩形で囲まれたコロニー250が薄い色を有しているものとする。
FIG. 16A shows a grayscale image. This grayscale image is captured by three
図16(B)は、閾値を最低値に設定してグレースケール画像を二値化することにより得られる二値化画像をラベリングしたときに検出される連結成分を示す図である。ここで、閾値を最低値に設定したときの二値化では、濃い色を示す輝度値の画素のみが0(黒)とされ、他の濃さの色を示す輝度値の画素は1(白)とされるものとする。この場合、図16(B)に示すように、C41の矩形により囲まれた濃い色を有するコロニー250のみが連結成分として検出される。
FIG. 16B is a diagram illustrating connected components detected when a binarized image obtained by binarizing a grayscale image with the threshold set to the lowest value is labeled. Here, in the binarization when the threshold value is set to the lowest value, only pixels having luminance values indicating dark colors are set to 0 (black), and pixels having luminance values indicating other dark colors are set to 1 (white). ). In this case, as shown in FIG. 16B, only the
図17(A)は、閾値を最低値から1単位増加させた閾値に設定してグレースケール画像を二値化することにより得られる二値化画像をラベリングしたときに検出される連結成分を示す図である。ここで、閾値を最低値から1単位増加させた閾値に設定したときの二値化では、濃い色を示す輝度値の画素と普通の濃さの色を示す輝度値の画素とが0(黒)とされ、薄い色を示す輝度値の画素は1(白)とされるものとする。この場合、図17(A)に示すように、C42の不定形により囲まれた濃い色を有するコロニー250と、C43の矩形により囲まれた普通の濃さの色を有するコロニー250と、が連結成分として検出される。ただし、C42の不定形により示される連結成分は、既に検出されたC41の矩形により示される連結成分を包含しているため、新たに検出された連結成分として連結成分情報に追加されない。これに対し、C43の矩形により示される連結成分は、既に検出された連結成分を1つも包含していないため、新たに検出された連結成分として連結成分情報に追加される。
FIG. 17A shows connected components detected when a binarized image obtained by binarizing a grayscale image by setting the threshold to a threshold increased by one unit from the lowest value is labeled. FIG. Here, in the binarization when the threshold value is set to a threshold value that is increased by one unit from the lowest value, the pixel of the luminance value indicating the dark color and the pixel of the luminance value indicating the normal dark color are 0 (black). ) And a pixel having a luminance value indicating a light color is 1 (white). In this case, as shown in FIG. 17A, a
図17(B)は、1単位増加後の閾値を設定してグレースケール画像を二値化することにより得られる二値化画像をラベリングしたときに検出される連結成分を示す図である。ここで、1単位増加後の閾値を設定したときの二値化では、濃い色を示す輝度値の画素と普通の濃さの色を示す輝度値の画素とが0(黒)とされ、薄い色を示す輝度値の画素は1(白)とされる。この場合、図17(B)に示すように、C51の不定形により囲まれた濃い色を有するコロニー250と、C52の矩形により囲まれた普通の濃さの色を有するコロニー250と、が連結成分として検出される。
FIG. 17B is a diagram illustrating connected components detected when a binarized image obtained by binarizing a grayscale image by setting a threshold value after an increment of 1 unit is labeled. Here, in the binarization when the threshold value after incrementing by one unit is set, the luminance value pixel indicating the dark color and the luminance value pixel indicating the normal dark color are set to 0 (black) and light. A pixel having a luminance value indicating a color is 1 (white). In this case, as shown in FIG. 17B, a
図18(A)は、閾値をさらに1単位増加させた閾値に設定してグレースケール画像を二値化することにより得られる二値化画像をラベリングしたときに検出される連結成分を示す図である。ここで、閾値をさらに1単位増加させた閾値に設定したときの二値化では、濃い色を示す輝度値の画素と普通の濃さの色を示す輝度値の画素と薄い色を示す輝度値の画素とが0(黒)とされるものとする。この場合、図18(A)に示すように、C44の不定形により囲まれた、濃い色を有するコロニー250と普通の濃さの色を有するコロニー250とが連結したものと、C45の矩形により囲まれた普通の濃さの色を有するコロニー250と、が連結成分として検出される。ただし、C44の不定形により示される連結成分は、既に検出されたC41の矩形により示される連結成分とC43の矩形により示される連結成分とを包含しているため、新たに検出された連結成分として連結成分情報に追加されない。これに対し、C45の矩形により示される連結成分は、既に検出された連結成分を1つも包含していないため、新たに検出された連結成分として連結成分情報に追加される。
FIG. 18A is a diagram showing connected components detected when a binarized image obtained by binarizing a grayscale image by setting the threshold to a threshold value further increased by 1 unit is labeled. is there. Here, in the binarization when the threshold value is set to a threshold value further increased by one unit, a luminance value pixel indicating a dark color, a luminance value pixel indicating a normal color, and a light value indicating a light color. It is assumed that these pixels are 0 (black). In this case, as shown in FIG. 18A, a combination of a
図18(B)は、2単位増加後の閾値を設定してグレースケール画像を二値化することにより得られる二値化画像をラベリングしたときに検出される連結成分を示す図である。ここで、2単位増加後の閾値を設定したときの二値化では、濃い色を示す輝度値の画素と普通の濃さの色を示す輝度値の画素と薄い色を示す輝度値の画素とが0(黒)とされる。この場合、図18(B)に示すように、C61の不定形により囲まれた、濃い色を有するコロニー250と普通の濃さの色を有するコロニー250とが連結したものと、C62の矩形により囲まれた薄い色を有するコロニー250と、が連結成分として検出される。
FIG. 18B is a diagram illustrating connected components detected when a binarized image obtained by binarizing a grayscale image by setting a threshold after an increase of 2 units is labeled. Here, in the binarization when the threshold value after an increase of 2 units is set, a pixel with a luminance value indicating a dark color, a pixel with a luminance value indicating a normal color, and a pixel with a luminance value indicating a light color, Is set to 0 (black). In this case, as shown in FIG. 18B, a combination of a
図16(B)、図17(A)、図18(A)に示したように、本実施形態における連結成分カウント処理により、閾値を1単位ずつ増加させながら連結成分を蓄積する場合、C41の矩形により示される連結成分と、C43の矩形により示される連結成分と、C45の矩形により示される連結成分と、の3つの連結成分が適切に検出される。つまり、この場合、色の濃さの異なる3つのコロニー250を適切に検出することができる。
As shown in FIG. 16B, FIG. 17A, and FIG. 18A, when the connected component is accumulated while increasing the threshold value by one unit by the connected component counting process in this embodiment, Three connected components, a connected component indicated by a rectangle, a connected component indicated by a rectangle C43, and a connected component indicated by a rectangle C45, are appropriately detected. That is, in this case, the three
一方、図16(B)、図17(B)、図18(B)に示したように、閾値を1回だけ設定して連結成分を抽出しようとすると、閾値をどのように設定したとしても、色の濃さの異なる3つのコロニー250を適切に検出することができない。
On the other hand, as shown in FIGS. 16 (B), 17 (B), and 18 (B), if a threshold is set only once and a connected component is extracted, no matter how the threshold is set. The three
CPU101は、ステップS107の連結成分カウント処理を完了すると、カウント結果表示処理を実行する(ステップS108)。具体的には、CPU101は、記憶装置104に記憶されている連結成分情報などに基づいて、各連結成分の位置、大きさ、形状、ならびに、連結成分の個数を、カラー画像とともに画面内に表示する。
When the
図19は、カウント結果表示処理により提示される画面を示す図である。画面300には、カラー画像の一部を示す背景画像310に重ねて、検出された連結成分の個数を示す個数画像320と、検出された連結成分の位置、大きさ、形状などを示す検出位置マーク330が表示される。なお、図19は、検出された不定形の連結成分が、矩形の連結成分に近似されて検出位置マーク330として表示されている例を示す。また、図19では、カラー画像の一部が拡大されて背景画像310として画面300に表示されている例を示しているが、カラー画像の全体が背景画像310として画面300に表示されてもよい。このように、画面300は、検出された連結成分に対応するコロニー250のカラー画像上における位置や形状をわかりやすく作業者に提示することができる。なお、作業者は、適宜、入力装置105などを操作して、カラー画像を拡大、縮小、スクロールすることにより、提示された連結成分を自由に観察することができる。
FIG. 19 is a diagram showing a screen presented by the count result display process. On the
なお、コロニー計数装置100は、検出された連結成分に関する情報を、画面300に表示するのみならず、記憶装置104などに記憶してもよいし、通信装置106を介して、ネットワークに接続された装置などに送信してもよい。
Note that the
CPU101は、ステップS108の処理を完了すると、コロニー計数処理を完了する。
When completing the process of step S108, the
本実施形態によれば、色の濃さにばらつきがあるコロニー250の個数を適切にカウントすることができる。なお、グレースケール画像上において、色が濃いコロニー250の周りは、コロニー250から離れるほど色が薄くなることが予想される。従って、二値化の輝度値を徐々に高くしていくと、低い閾値による検出処理により既に検出された連結成分は、高い閾値による検出処理で再度検出されることになる。しかしながら、本実施形態によれば、高い閾値による検出処理で新たに検出された連結成分が、低い閾値による検出処理で既に検出された連結成分を包含する場合、新たに検出された連結成分は、新たに検出されたものとみなされない。このため、ラベリング処理を複数の閾値で実行しても、連結成分が重複してカウントされにくくすることができる。従って、連結成分により示されるコロニー250の個数を正確にカウントすることが可能となる。
According to the present embodiment, it is possible to appropriately count the number of
(変形例)
本発明は、上記実施形態に開示したものに限られない。
(Modification)
The present invention is not limited to the one disclosed in the above embodiment.
例えば、閾値の下限値と閾値の上限値とを決定する手法は、上記実施形態において開示した手法に限られない。例えば、グレースケール画像に基づく種々の手法により、閾値の下限値と閾値の上限値とを適宜決定することができる。また、例えば、コロニー250を表す画素の輝度値の範囲があらかじめ予測可能な場合、閾値の範囲があらかじめ定められていてもよい。
For example, the method for determining the lower limit value of the threshold and the upper limit value of the threshold is not limited to the method disclosed in the above embodiment. For example, the lower limit value of the threshold value and the upper limit value of the threshold value can be appropriately determined by various methods based on the gray scale image. For example, when the range of the luminance value of the pixel representing the
また、色相バンドパスフィルタリング処理の手法も、上記実施形態において開示した手法に限られない。例えば、カラー画像に基づく種々の手法により、グレースケール画像に色相バンドパスフィルタリング処理を施すことができる。また、色相バンドパスフィルタリング処理はなくてもよい。 Further, the method of the hue bandpass filtering process is not limited to the method disclosed in the above embodiment. For example, the hue band pass filtering process can be performed on the grayscale image by various methods based on the color image. Further, the hue band pass filtering process may not be performed.
また、ガウシアンフィルタリング処理の手法も、上記実施形態において開示した手法に限られない。種々の手法により、グレースケール画像にガウシアンフィルタリング処理を施すことができる。また、ガウシアンフィルタリング処理はなくてもよい。さらに、ガウシアンフィルタリング処理の代わりに、移動平均フィルタ処理などが実行されてもよい。また、ガウシアンフィルタリング処理が実行されるタイミングは、上記実施形態の例に限定されない。例えば、ガウシアンフィルタリング処理が色相バンドパスフィルタリング処理の後に実行されてもよい。 Further, the Gaussian filtering processing technique is not limited to the technique disclosed in the above embodiment. A Gaussian filtering process can be applied to the grayscale image by various methods. Further, there is no need for Gaussian filtering processing. Further, a moving average filter process or the like may be executed instead of the Gaussian filtering process. Further, the timing at which the Gaussian filtering process is executed is not limited to the example of the above embodiment. For example, the Gaussian filtering process may be executed after the hue bandpass filtering process.
また、本発明に適用される培地は、上記実施形態において開示したものに限定されない。例えば、台紙がないタイプのフィルム培地を採用することができる。図20は、基材シート211の全面が培地(培養層)となっており、基材シート211の全面に、微生物のコロニー250が発生している様子を示している。また、基材シート211には、培地に関する識別情報220が記載されている。さらに、基材シート211(培地)には、縦方向および横方向に、一定の間隔で罫線260が引かれている。
Moreover, the culture medium applied to this invention is not limited to what was disclosed in the said embodiment. For example, a film medium of a type without a mount can be employed. FIG. 20 shows a state in which the entire surface of the
この場合、例えば、基材シート211の一部の領域である領域240を撮像することにより、カラー画像が取得される。カラー画像には、基材シート211(培地)、コロニー250、罫線260などが表現される。この場合、基材シート211(培地)の色と、コロニー250の色と、罫線260の色とは、RGBの各色の輝度値は互いに異なる。従って、色相フィルタリング処理や二値化処理により、コロニー250を基材シート211(培地)や罫線260と区別することができる。
In this case, for example, a color image is acquired by imaging a
第1の実施形態では、コロニー計数装置100がCPU101とROM102とRAM103とを備え、CPU101が、ROM102に記憶されているプログラムに従って、ソフトウェアによりコロニー計数処理が実現される例を示した。しかし、コロニー計数装置100が実行するコロニー計数処理は、ソフトウェアにより実現されるものに限定されない。例えば、コロニー計数装置100は、マイクロコンピュータ、FPGA(Field Programmable Gate Array)、PLD(Programmable Logic Device)、DSP(Digital Signal Processor)などにより構成されてもよい。
In the first embodiment, the
なお、本発明に係るコロニー計数装置は、専用のシステムによらず、通常のコンピュータシステムを用いても実現可能である。例えば、コンピュータに、上記動作を実行するためのプログラムを、フレキシブルディスク、CD−ROM(Compact Disk-Read Only Memory)、DVD(Digital Versatile Disk)、MO(Magnet Optical Disk)などのコンピュータ読み取り可能な記録媒体に記憶して配布し、これをコンピュータシステムにインストールすることにより、上述の処理を実行するコロニー計数装置を構成しても良い。さらに、インターネット上のサーバ装置が有するディスク装置等にプログラムを記憶しておき、例えば、搬送波に重畳させて、コンピュータにダウンロード等するものとしてもよい。 Note that the colony counting apparatus according to the present invention can be realized by using a normal computer system without using a dedicated system. For example, a computer readable recording such as a flexible disk, a CD-ROM (Compact Disk-Read Only Memory), a DVD (Digital Versatile Disk), or a MO (Magnet Optical Disk) is stored in a computer. You may comprise the colony counting device which performs the above-mentioned process by memorize | storing and distributing to a medium and installing this in a computer system. Furthermore, the program may be stored in a disk device or the like included in a server device on the Internet, and may be downloaded onto a computer by being superimposed on a carrier wave, for example.
11 グレースケール画像取得部
12 二値化画像生成部
13 連結成分抽出部
14 連結成分情報追加部
15 閾値供給部
16 コロニー計数部
17 閾値範囲部
18 カラー画像取得部
19 色相範囲特定部
20 グレースケール画像生成部
30 記憶部
100 コロニー計数装置
101 CPU
102 ROM
103 RAM
104 記憶装置
105 入力装置
106 通信装置
107 撮像制御部
108 撮像装置
109 画像記憶部
110 表示制御部
111 表示装置
112 音声処理部
113 音声出力装置
120 バス
200 専用シート
210、211 基材シート
220 識別情報
230 培養層
240 領域
250 コロニー
260 罫線
300 画面
310 背景画像
320 個数画像
330 検出位置マーク
DESCRIPTION OF
102 ROM
103 RAM
104
Claims (9)
閾値が供給される毎に、前記グレースケール画像取得手段により取得されたグレースケール画像を前記閾値により二値化することにより二値化画像を生成する二値化画像生成手段と、
前記二値化画像生成手段により前記二値化画像が生成される毎に、前記二値化画像にラベリング処理を実行することにより前記二値化画像から1つのコロニーを示す画素のまとまりである連結成分を抽出する連結成分抽出手段と、
前記連結成分抽出手段により前記連結成分が抽出される毎に、前記連結成分のうち記憶装置に記憶済みの連結成分情報により示される連結成分を包含しない連結成分を示す連結成分情報を、前記記憶装置にさらに記憶させる連結成分情報追加手段と、
前記閾値が下限値から上限値に至るまでの間、前記連結成分情報追加手段の処理が完了する毎に、前記閾値を所定値ずつ増加させて前記二値化画像生成手段に供給する閾値供給手段と、
前記記憶装置に記憶されている連結成分情報に基づいて、前記微生物のコロニーの個数を計数するコロニー計数手段と、を備える、
ことを特徴とするコロニー計数装置。 A grayscale image acquisition means for acquiring a grayscale image showing the state of the culture medium after culturing the microorganisms contained in the specimen;
Binarized image generating means for generating a binarized image by binarizing the grayscale image acquired by the grayscale image acquiring means by the threshold value every time a threshold is supplied;
Each time the binarized image is generated by the binarized image generating means, a labeling process is performed on the binarized image, thereby connecting a group of pixels indicating one colony from the binarized image. Connected component extraction means for extracting the components;
Each time the connected component is extracted by the connected component extraction means, the storage device stores connected component information indicating a connected component that does not include the connected component indicated by the connected component information stored in the storage device. Connected component information adding means for further storing
Threshold supply means for increasing the threshold value by a predetermined value and supplying it to the binarized image generating means each time processing of the connected component information adding means is completed until the threshold value reaches the upper limit value. When,
Colony counting means for counting the number of colonies of the microorganism based on the connected component information stored in the storage device,
A colony counting device characterized by that.
ことを特徴とする請求項1に記載のコロニー計数装置。 Threshold range determining means for determining the lower limit value and the upper limit value based on a distribution of luminance values of pixels constituting the gray scale image,
The colony counting device according to claim 1, wherein:
ことを特徴とする請求項2に記載のコロニー計数装置。 The threshold range determination means identifies a luminance value having the highest frequency in the luminance range of the maximum mountain-shaped frequency distribution included in the luminance histogram representing the frequency for each luminance value of the pixels constituting the grayscale image. The highest luminance value is determined as the upper limit value among luminance values that are lower than the specified luminance value and that are less than a predetermined ratio with respect to the frequency of the specified luminance value.
The colony counting device according to claim 2, wherein
ことを特徴とする請求項2または3に記載のコロニー計数装置。 The threshold range determining means specifies the minimum luminance value of the luminance values of the pixels constituting the grayscale image, and determines the specified luminance value as the lower limit value;
The colony counting device according to claim 2 or 3, wherein
前記カラー画像取得手段により取得されたカラー画像を構成する画素の色相の分布に基づいて、前記コロニーの色相範囲を特定する色相範囲特定手段と、
前記カラー画像取得手段により取得されたカラー画像をグレースケール化した画像を構成する画素のうち、前記色相範囲特定手段により特定された前記色相範囲に含まれない画素の輝度値を、前記上限値よりも高い輝度値に設定することにより取得されるグレースケール画像を、前記グレースケール画像取得手段に取得させるグレースケール画像として生成するグレースケール画像生成手段と、をさらに備える、
ことを特徴とする請求項1乃至4のいずれか1項に記載のコロニー計数装置。 Color image acquisition means for acquiring a color image obtained by imaging the culture medium;
A hue range specifying means for specifying a hue range of the colony based on a hue distribution of pixels constituting the color image acquired by the color image acquiring means;
Among the pixels constituting the image obtained by converting the color image acquired by the color image acquisition unit into a gray scale, the luminance value of the pixel not included in the hue range specified by the hue range specifying unit is determined from the upper limit value. Grayscale image generation means for generating a grayscale image acquired by setting a higher brightness value as a grayscale image to be acquired by the grayscale image acquisition means,
The colony counting apparatus according to any one of claims 1 to 4, wherein the colony counting apparatus is characterized in that
ことを特徴とする請求項5に記載のコロニー計数装置。 The hue range specifying means obtains a hue range of a mountain-shaped frequency distribution that exists after excluding the hue range of the maximum mountain-shaped frequency distribution from a hue histogram representing the frequency for each hue of pixels constituting the color image. Specify as the hue range of the colony,
The colony counting device according to claim 5, wherein
前記カラー画像取得手段により取得されたカラー画像をグレースケール化した画像にガウシアンフィルタをかけることに得られるグレースケール画像を、前記グレースケール画像取得手段に取得させるグレースケール画像として生成するグレースケール画像生成手段、をさらに備える、
ことを特徴とする請求項1乃至6のいずれか1項に記載のコロニー計数装置。 Color image acquisition means for acquiring a color image obtained by imaging the culture medium;
Grayscale image generation for generating a grayscale image obtained by applying a Gaussian filter to a grayscale image obtained by converting the color image acquired by the color image acquisition unit to the grayscale image acquisition unit Means further comprising:
The colony counting device according to any one of claims 1 to 6, wherein
閾値が供給される毎に、前記グレースケール画像取得ステップにより取得されたグレースケール画像を前記閾値により二値化することにより二値化画像を生成する二値化画像生成ステップと、
前記二値化画像生成ステップにより前記二値化画像が生成される毎に、前記二値化画像にラベリング処理を実行することにより前記二値化画像から1つのコロニーを示す画素のまとまりである連結成分を抽出する連結成分抽出ステップと、
前記連結成分抽出ステップにより前記連結成分が抽出される毎に、前記連結成分のうち記憶装置に記憶済みの連結成分情報により示される連結成分を包含しない連結成分を示す連結成分情報を、前記記憶装置にさらに記憶させる連結成分情報追加ステップと、
前記閾値が下限値から上限値に至るまでの間、前記連結成分情報追加ステップの処理が完了する毎に、前記閾値を所定値ずつ増加させて前記二値化画像生成ステップを実行させる閾値供給ステップと、
前記記憶装置に記憶されている連結成分情報に基づいて、前記微生物のコロニーの個数を計数するコロニー計数ステップと、を備える、
ことを特徴とするコロニー計数方法。 A grayscale image acquisition step of acquiring a grayscale image showing the state of the culture medium after culturing the microorganisms contained in the specimen;
A binarized image generating step of generating a binarized image by binarizing the grayscale image acquired by the grayscale image acquiring step by the threshold value every time a threshold is supplied;
Each time the binarized image is generated by the binarized image generating step, a labeling process is performed on the binarized image, thereby connecting a group of pixels indicating one colony from the binarized image. A connected component extraction step for extracting components;
Each time the connected component is extracted by the connected component extracting step, connected storage information indicating connected components that do not include the connected components indicated by the connected component information stored in the storage device among the connected components is stored in the storage device. Connected component information adding step to be further stored in
A threshold supply step of increasing the threshold value by a predetermined value and executing the binarized image generation step each time the processing of the connected component information adding step is completed until the threshold value reaches the upper limit value. When,
A colony counting step for counting the number of colonies of the microorganism based on the connected component information stored in the storage device,
The colony counting method characterized by this.
検体に含まれる微生物の培養後の培地の様子を示すグレースケール画像を取得するグレースケール画像取得手段、
閾値が供給される毎に、前記グレースケール画像取得手段により取得されたグレースケール画像を前記閾値により二値化することにより二値化画像を生成する二値化画像生成手段、
前記二値化画像生成手段により前記二値化画像が生成される毎に、前記二値化画像にラベリング処理を実行することにより前記二値化画像から1つのコロニーを示す画素のまとまりである連結成分を抽出する連結成分抽出手段、
前記連結成分抽出手段により前記連結成分が抽出される毎に、前記連結成分のうち記憶装置に記憶済みの連結成分情報により示される連結成分を包含しない連結成分を示す連結成分情報を、前記記憶装置にさらに記憶させる連結成分情報追加手段、
前記閾値が下限値から上限値に至るまでの間、前記連結成分情報追加手段の処理が完了する毎に、前記閾値を所定値ずつ増加させて前記二値化画像生成手段に供給する閾値供給手段、
前記記憶装置に記憶されている連結成分情報に基づいて、前記微生物のコロニーの個数を計数するコロニー計数手段、として機能させる、
ことを特徴とするプログラム。 Computer
A grayscale image acquisition means for acquiring a grayscale image showing the state of the culture medium after culturing the microorganisms contained in the specimen;
A binarized image generating unit that generates a binarized image by binarizing the grayscale image acquired by the grayscale image acquiring unit by the threshold every time a threshold is supplied;
Each time the binarized image is generated by the binarized image generating means, a labeling process is performed on the binarized image, thereby connecting a group of pixels indicating one colony from the binarized image. Connected component extraction means for extracting components;
Each time the connected component is extracted by the connected component extraction means, the storage device stores connected component information indicating a connected component that does not include the connected component indicated by the connected component information stored in the storage device. Connected component information adding means for further storing
Threshold supply means for increasing the threshold value by a predetermined value and supplying it to the binarized image generating means each time processing of the connected component information adding means is completed until the threshold value reaches the upper limit value. ,
Based on the connected component information stored in the storage device, function as colony counting means for counting the number of colonies of the microorganism,
A program characterized by that.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012097782A JP5449444B2 (en) | 2012-04-23 | 2012-04-23 | Colony counting device, colony counting method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012097782A JP5449444B2 (en) | 2012-04-23 | 2012-04-23 | Colony counting device, colony counting method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013223463A JP2013223463A (en) | 2013-10-31 |
JP5449444B2 true JP5449444B2 (en) | 2014-03-19 |
Family
ID=49594039
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012097782A Expired - Fee Related JP5449444B2 (en) | 2012-04-23 | 2012-04-23 | Colony counting device, colony counting method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5449444B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6355476B2 (en) * | 2014-08-18 | 2018-07-11 | 株式会社Screenホールディングス | Threshold determination method, image processing method, and image processing apparatus |
JP6198918B1 (en) * | 2016-09-29 | 2017-09-20 | 株式会社イノテック | Particle number measuring apparatus, particle number measuring method, program, and storage medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006325549A (en) * | 2005-05-30 | 2006-12-07 | Thk Co Ltd | Method for bacteriological examination |
JP5181385B2 (en) * | 2007-08-16 | 2013-04-10 | 国立大学法人名古屋大学 | Prediction model construction method for predicting cell quality, prediction model construction program, recording medium recording the program, and prediction model construction apparatus |
CN102471744B (en) * | 2009-07-21 | 2015-06-10 | 国立大学法人京都大学 | Image processing device, culture observation apparatus, and image processing method |
WO2011115218A1 (en) * | 2010-03-17 | 2011-09-22 | 株式会社エルメックス | Bacteriological testing method by means of film-type culture medium, and image capturing tool used for said bacteriological testing method |
WO2012043498A1 (en) * | 2010-09-30 | 2012-04-05 | 日本電気株式会社 | Information processing device, information processing system, information processing method, program, and recording medium |
-
2012
- 2012-04-23 JP JP2012097782A patent/JP5449444B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2013223463A (en) | 2013-10-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11037292B2 (en) | Cell image evaluation device and cell image evaluation control program | |
JP5043755B2 (en) | Resin material inspection device and program | |
US20070195165A1 (en) | Image display apparatus | |
CN105719274B (en) | Edge inspection system and method | |
JP2007336563A (en) | Method and system for specifying region of uniform color in digital image | |
US10139335B2 (en) | Observation image determination device, method, and program | |
US20160161464A1 (en) | Stem cell differentiation determination device, method, and program | |
EP2458555A2 (en) | Image processing device, image processing method, and image processing program | |
US20170178322A1 (en) | System and method for detecting anomalies in an image captured in-vivo | |
CN107103865B (en) | Method and device for detecting display area in display screen | |
JP2019208377A (en) | Colony detection device, colony detection method, and colony detection program | |
JP5449444B2 (en) | Colony counting device, colony counting method, and program | |
JP4143660B2 (en) | Image analysis method, image analysis apparatus, inspection apparatus, image analysis program, and computer-readable recording medium | |
JP2006024116A (en) | Area division for color image | |
WO2019181072A1 (en) | Image processing method, computer program, and recording medium | |
CN111317426A (en) | Endoscope parameter self-adaptive adjusting method and device | |
JP6355476B2 (en) | Threshold determination method, image processing method, and image processing apparatus | |
JP2004194610A (en) | Method and apparatus for inspecting microbial colony | |
KR20180068150A (en) | Classification system of dried sea cucumber using image analysis | |
JP6931418B2 (en) | Image processing methods, image processing devices, user interface devices, image processing systems, servers, and image processing programs | |
JP2015231343A (en) | Colony classification amending method, classification amending program, and classification amending apparatus | |
JP5917260B2 (en) | Colony counting support method and program | |
JP2017220020A (en) | Moving body detection system and moving body detection method | |
JP4544578B2 (en) | Defect inspection method and defect inspection apparatus using computer | |
JP2018063588A (en) | Color determination device, control method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130805 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20130805 |
|
A975 | Report on accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A971005 Effective date: 20130827 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130903 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20131028 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20131126 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20131224 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5449444 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |