JP2006268339A - Method for generating list of connected elements of image - Google Patents
Method for generating list of connected elements of image Download PDFInfo
- Publication number
- JP2006268339A JP2006268339A JP2005084414A JP2005084414A JP2006268339A JP 2006268339 A JP2006268339 A JP 2006268339A JP 2005084414 A JP2005084414 A JP 2005084414A JP 2005084414 A JP2005084414 A JP 2005084414A JP 2006268339 A JP2006268339 A JP 2006268339A
- Authority
- JP
- Japan
- Prior art keywords
- image
- connected component
- window frame
- list
- variable
- 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
Links
Images
Abstract
Description
本発明は、画像処理技術に関し、特にコンピュータを使用して画像連結成分の一覧を作成する方法において、画像中のオブジェクトに対応する画像の連結成分の一覧を作成する技術に関する。 The present invention relates to an image processing technique, and more particularly to a technique for creating a list of connected components of an image corresponding to an object in an image in a method for creating a list of image connected components using a computer.
一般に、多数のオブジェクトが存在する画像を、人手で解析しカウントしたり分類したりするのは、多くの場合、困難である。この問題を解決するために、コンピュータに作業を支援させることが考えられる。 In general, it is often difficult to manually analyze, count, and classify an image having a large number of objects. In order to solve this problem, it is conceivable to let the computer support the work.
薬の錠剤などのようにオブジェクトの形状・大きさが強く制限されている場合については、コンピュータにより自動的にカウントする方法が知られている(例えば特許文献1、特許文献2参照)。
In the case where the shape and size of an object is strongly limited, such as a medicine tablet, a method of automatically counting by a computer is known (for example, see
しかしながら、複雑な形状のオブジェクトについての処理については未開拓である。 However, processing for objects with complex shapes has not been developed yet.
例えば、食品を扱う工場や販売店では、衛生管理のために、常時、害虫の調査を行っている。従来は、接着剤を塗った紙、いわゆる捕虫紙を一定の期間、所定の場所に配置し、捕虫紙により捕らえられた虫を人手により分類していた。このような、虫を分類する作業は時間がかかるとともに、経験や能力の個人差が大きいことから、結果にばらつきが生じることが問題となっていた。そこで、コンピュータを用いて分類作業を半自動化することが望まれていた。 For example, factories and dealers that handle food constantly investigate pests for hygiene management. Conventionally, paper coated with an adhesive, so-called insect trap paper, is placed in a predetermined place for a certain period, and insects caught by the trap insect paper are classified manually. Such an operation for classifying insects takes time, and since there are large individual differences in experience and ability, there has been a problem that the results vary. Therefore, it has been desired to semi-automate the classification work using a computer.
また、衛星画像を利用した交通量観測についても同様な問題がある。交通量観測作業は、交通量を把握し、渋滞状況の情報を各車輌に与えて渋滞を避けさせるなどにより渋滞を緩和するための有効な手段である。衛星画像を使った交通量観測は、道路にセンサを設置して交通量を観測する方法に比べて、コストが安いという利点があり、各方面からその実現が期待されている。しかしながら、衛星画像から車輌を全自動的に検出することは現在の技術では不可能である。したがって、人手で衛星画像を解析する必要があるが、直接、この画像を解析するのは困難であるため、何らかの方法によって画像解析を支援することが望まれている。 There is a similar problem in traffic volume observation using satellite images. The traffic volume observation work is an effective means for reducing traffic congestion by grasping traffic volume and giving information on traffic congestion status to each vehicle to avoid traffic congestion. Traffic volume observation using satellite images has the advantage of lower costs compared to the method of observing traffic volume by installing sensors on the road, and its realization is expected from various directions. However, it is impossible with the current technology to detect a vehicle from a satellite image fully automatically. Therefore, it is necessary to manually analyze the satellite image. However, since it is difficult to directly analyze the image, it is desired to support the image analysis by some method.
本発明の目的は、複雑な形状のオブジェクトについても画像中のオブジェクトに対応する連結成分を抽出し、連結成分の特徴量に従って連結成分の像を配置する効率的な方法を求めることである。 An object of the present invention is to obtain an efficient method for extracting a connected component corresponding to an object in an image even for an object having a complicated shape and arranging an image of the connected component according to a feature amount of the connected component.
画像中に多数のオブジェクトが存在する場合に、オペレータがオブジェクトを識別するには、背景の影響を避けるなどのために、画像から個々のオブジェクトを抽出し、適当な基準に従ってオブジェクトを並べて表示することが効果的である。例えば、捕虫紙をカメラで撮影し、その画像をコンピュータで処理し、虫を大きさの順に並べることにより、虫の分類作業効率が向上する。 If there are many objects in the image, the operator can identify the objects by extracting individual objects from the image and displaying them side by side according to appropriate criteria, such as to avoid background effects. Is effective. For example, insect trapping paper is photographed with a camera, the image is processed with a computer, and the insects are arranged in order of size, so that the insect classification work efficiency is improved.
図1は、捕虫紙を撮影した画像である。捕虫紙上には多数の大小様々な形状の虫が捕らえられている。図3は捕虫紙上の虫を切り取って、虫の占める面積の広い順に並べた図である。矢印の方向にいくに従って虫の面積が狭くなる。図1又はそれを2値化した図2を利用するよりは、図3を使う方が能率的に虫の分類を行うことができる。 FIG. 1 is an image obtained by photographing insect trapping paper. Many insects of various sizes are captured on the trapping paper. FIG. 3 is a diagram in which the insects on the trapping paper are cut out and arranged in order of increasing area occupied by the insects. As you go in the direction of the arrow, the insect area decreases. Rather than using FIG. 1 or binarized FIG. 2, using FIG. 3 can more efficiently classify insects.
また、衛星画像についても同様の処理を行って、交通量の観測を容易にすることができる。図4(a)は処理対象の衛星画像であり、この画像中の車輌の数をカウントする。図4(c)は衛星画像中のオブジェクトを面積の広い順に並べた画像である。より具体的には、矢印の指す方向に向けてオブジェクトの面積が狭くなる。この画像には車輌の他に交通標識や車線の断片などのオブジェクトが紛れ込んでいるが、オペレータは図4(c)を使えば、図4(a)またはそれを2値化した図4(b)を使うより、より容易にオブジェクトの形状から車輌を選び出してカウントすることができる。 In addition, the same processing can be performed on the satellite image to facilitate traffic volume observation. FIG. 4A shows a satellite image to be processed, and the number of vehicles in this image is counted. FIG. 4 (c) is an image in which objects in a satellite image are arranged in order of increasing area. More specifically, the area of the object becomes narrower in the direction indicated by the arrow. This image contains objects such as traffic signs and lane fragments in addition to the vehicle. If the operator uses FIG. 4 (c), FIG. 4 (a) or binarized FIG. 4 (b) ) Can be selected and counted from the object shape more easily.
より詳細には、本発明は、濃淡画像を2値画像に変換する2値化ステップと、2値画像上の連結成分の画素に連結成分ごとに定まった番号を割り振られたラベル画像を生成するラベリングステップと、ラベル画像を参照して、各連結成分を囲む最小の長方形を設定する窓枠ステップと、各連結成分の特徴量を算出する特徴抽出ステップと、特徴量に従って連結成分をソートするソートステップと、ソートされた順に連結成分の像の一覧を表示する連結成分一覧画像を生成する描画ステップと、からなることを特徴とする連結成分一覧作成方法である。 More specifically, the present invention generates a label image in which a grayscale image is converted into a binary image, and a label image in which a number determined for each connected component is assigned to pixels of the connected component on the binary image. A labeling step, a window frame step for setting a minimum rectangle surrounding each connected component with reference to the label image, a feature extracting step for calculating a feature amount of each connected component, and a sort for sorting the connected components according to the feature amount A connected component list creating method comprising: a step; and a drawing step for generating a connected component list image that displays a list of connected component images in sorted order.
上記窓枠ステップにおいて、まず、各連結成分iについて変数xi min に十分大きな初期値を設定し、変数xi maxに十分小さな初期値を設定し、変数yi minに十分大きな初期値を設定し、変数yi maxに十分小さな初期値を設定し、次に、ラベル画像をラスタ走査して、現在の位置(x, y)が連結成分i上であれば、xがxi minより小さい時、xi minにxの値を代入し、xがxi maxより大きい時、xi max にxの値を代入し、yがyi minより小さい時、yi minにyの値を代入し、yがyi maxより大きい時、yi maxにyの値を代入して各連結成分を囲む最小の長方形を設定することを特徴とする連結成分一覧作成方法による。 In the window frame step, first, for each connected component i, a sufficiently large initial value is set for the variable x i min , a sufficiently small initial value is set for the variable x i max, and a sufficiently large initial value is set for the variable y i min. If the variable y i max is set to a sufficiently small initial value, and then the label image is raster scanned and the current position (x, y) is on the connected component i, x is smaller than x i min when, assigns the value of x to x i min, when x is greater than x i max, assigns the value of x to x i max, when y is smaller than y i min, the value of y to y i min assignment, and when y is greater than y i max, by connected component list generation method characterized by setting the minimum rectangle surrounding each connected component by substituting the value of y to y i max.
図5(a)は処理対象である画像を濃淡により表した図である。図5(a)に示される数字は画素の濃度を示す。図5(b)は濃淡画像に対して閾値を5として2値化された2値画像である。すなわち、濃淡画像中の濃度が5以上の画素は領域に、5未満の画素は背景に変換されている。2値画像の数字1は領域の画素であること、また、数字0は背景の画素を意味する。尚、図1のようにオブジェクトが濃淡画像の濃度が低い領域に対応している場合は、濃淡画像を濃度の反転した画像に変換した後に2値化を行う。図5(b)の2値画像の中には三つの連結成分がある。画素の連結性は注目している画素の上下左右とともに斜め方向も考慮した、いわゆる、8連結で定義されたものを採用している。図5(c)は2値画像に対してラベリングの処理を施した結果のラベル画像である(非特許文献1参照)。
FIG. 5A is a diagram showing the image to be processed by shading. The numbers shown in FIG. 5A indicate the pixel density. FIG. 5B shows a binary image obtained by binarizing a grayscale image with a threshold value of 5. That is, pixels with a density of 5 or more in the grayscale image are converted to regions, and pixels less than 5 are converted to the background. The
尚、ラベリングとは連結している画素同士には同一の番号を割り当て、分離している画素に対しては異なった番号を割り付ける処理のことである。ラベル画像中で背景の画素の値は0に設定され、三つの連結成分の画素は1から3までの数字で連結成分ごとに番号付けされている。図5(d)はラベル画像中の各連結成分に窓枠を設定した様子を示す図である。本命最初において、「窓枠」は、連結成分を囲む最小の長方形を意味し、この長方形の左上の画素と右下の画素の座標によって窓枠の位置が定義される。窓枠501が“1”、窓枠502が“2”、窓枠503が“3”の数字(番号)を付した連結成分に関する窓枠である。次に、連結成分の特徴量を抽出する。特徴量には、例えば面積、周囲長、円形度など様々な特徴量があるが、ここでは特徴量として面積を対象としている。
Labeling is a process of assigning the same number to connected pixels and assigning different numbers to separated pixels. The value of the background pixel in the label image is set to 0, and the pixels of the three connected components are numbered for each connected component with numbers from 1 to 3. FIG. 5D is a diagram showing a state in which a window frame is set for each connected component in the label image. First, “window frame” means the smallest rectangle surrounding the connected component, and the position of the window frame is defined by the coordinates of the upper left pixel and the lower right pixel of this rectangle. The
連結成分1(窓枠1)、連結成分2(窓枠2)、連結成分3(窓枠3)の面積は、それぞれ8画素、6画素、9画素である。図5(e)は連結成分をその面積の順に左から右、上から下に並べた画像である。すなわち、この画像中の左上に連結成分3が、その右に連結成分1が、左下に連結成分2が配置されている。各連結成分の画素の値は元の濃淡画像での濃度(輝度)を表している。
The areas of the connected component 1 (window frame 1), the connected component 2 (window frame 2), and the connected component 3 (window frame 3) are 8 pixels, 6 pixels, and 9 pixels, respectively. FIG. 5 (e) is an image in which connected components are arranged in order of area from left to right and from top to bottom. That is, the connected
本発明の画像中のオブジェクトに対応する連結成分を抽出し、連結成分の特徴量に従って連結成分の像を配置する方法によれば、オペレータが容易にオブジェクトをカウントしたり、分類したりすることができるようになる。また、窓枠を使うことにより、連結成分の情報を高速に抽出することが可能である。 According to the method of extracting connected components corresponding to objects in an image of the present invention and arranging images of the connected components according to the feature quantities of the connected components, the operator can easily count or classify the objects. become able to. Further, by using a window frame, it is possible to extract information on connected components at high speed.
以下、本発明の一実施の形態による連結成分一覧作成方法について説明を行う。図6は本発明の一実施の形態による連結成分一覧作成を行う画像処理システムの例を示す機能ブロック図である。本実施の形態による画像処理システムは、入力装置と、出力装置と、処理装置と、記憶装置と、を有している。入力装置は、例えばキーボード601又はマウスである。キーボード601、マウスは、パラメータの入力やコマンドの起動などに使われる。出力装置は、例えばLCDディスプレイ615が備えられている。ディスプレイ615は、各種の画像の表示やデータ処理の確認などに利用される。処理装置602は、2値化モジュール603と、ラベリングモジュール604と、窓枠モジュール605と、面積算出モジュール606と、ソートモジュール607と、描画モジュール608と、例えば6つのモジュールを含む。
Hereinafter, a connected component list creation method according to an embodiment of the present invention will be described. FIG. 6 is a functional block diagram showing an example of an image processing system for creating a connected component list according to an embodiment of the present invention. The image processing system according to the present embodiment includes an input device, an output device, a processing device, and a storage device. The input device is, for example, a
記憶装置609は、2値化モジュール603と描画モジュール608の入力である濃淡画像610と、2値化モジュール603の出力でラベリングモジュール604の入力である2値画像611と、ラベリングモジュール604の出力で窓枠モジュール605の入力であるラベル画像612と、描画モジュール608の出力である作業用画像613と、窓枠モジュール605の出力である領域配列614と、を記憶するそれぞれの記憶領域を含む。
The
図7は、図6の窓枠モジュール605における処理の詳細な流れを示すフローチャート図である。このフローチャート図には、領域配列と呼ばれる配列rが含まれている。領域配列rの要素r[i]は連結成分iについての情報を持つ構造体であり、図9(b)に示すように、id、xmin、xmax、ymin、ymax、sの六つのメンバを含む。idは連結成分iの識別子であり、xmin・xmax・ymin・ymaxは連結成分iを囲む窓枠を指定する。sは連結成分iの面積を表す。
FIG. 7 is a flowchart showing a detailed flow of processing in the
図7に示すように、本実施の形態による窓枠モジュール605における処理は、1)ステップ701からステップ708までの処理であって領域配列rに初期値を設定する処理部分と、2)ステップ709からステップ724までの処理であって領域配列rに窓枠の情報をセットする部分と、に分かれる。フローチャートの前半の部分(上記1))では、ラベル画像中の連結成分の個数をnRegionとすると、変数iを1からnRegionまで変えながら、ステップ704において領域配列の要素r[i]のメンバidにiを、ステップ705においてメンバxminに適当に大きな数bigNを、ステップ706においてメンバxmaxに適当に小さな数smallNを、ステップ707においてメンバyminに適当に大きな数bigNを、ステップ708においてメンバymaxに適当に小さな数smallNをそれぞれ代入する。
As shown in FIG. 7, the processing in the
画像のx軸の方向は、紙面上において左から右へ向いており、y軸の方向は紙面において上から下へ向いている。画像のx軸方向のサイズをWで、y軸方向のサイズをHで表す。フローチャートの後半の部分ではステップ709からステップ714までにおいて、ラベル画像を左から右へ、上から下へ走査する。ステップ715で座標(x, y)のラベル画像の画素の値を変数iに代入する。この画素が連結成分の画素であるか否かをチェックするために、ステップ716において変数iの値が0か否かを判定する。変数iの値が0であれば、連結成分の画素ではないためステップ714に進み、走査を繰り返す。変数iの値が0でなければ、連結成分の画素であるため、ステップ717に進む。そこで領域配列の要素r[i]のメンバxminがxより大きいか否かを判定し、大きい場合は(YES)、ステップ718でメンバxminにxを代入する。ステップ719でメンバxmaxがxより小さいか否かを判定し、小さければ(YES)、ステップ720でメンバxmaxにxを代入する。同様の処理をメンバyminとメンバymaxとについてステップ721からステップ724までのステップにおいて行う。走査を終了すると、領域配列の要素r[i]のメンバxminは連結成分iの左端のx座標の値を、メンバxmaxは右端のx座標の値を、メンバyminは上端のy座標の値を、メンバymaxは下端のy座標の値をそれぞれ持つことになる。本実施の形態によるフローチャート図の表すアルゴリズムを用いると、ラベル画像を一度走査するだけで処理が行えるため極めて効率が良いという利点がある。
The x-axis direction of the image is from left to right on the paper surface, and the y-axis direction is from top to bottom on the paper surface. The size of the image in the x-axis direction is represented by W, and the size in the y-axis direction is represented by H. In the latter half of the flowchart, in
図8は、図6の面積算出モジュール606における処理の詳細を示すフローチャート図である。このフローチャート図には、ステップ801からステップ803までの変数iについてのループと、ステップ805からステップ807までの変数yについてのループと、ステップ808からステップ810までの変数xについてのループが含まれる。最初のループでは、変数iは連結成分を表し、1からnRegionまで変わる。後の二つのループでは変数yはr[i].yminからr[i].ymaxまで変わり、変数xはr[i].xminからr[i].xmaxまで変わる。すなわち、これらのループでは、連結成分iを囲む窓枠を左から右へ、上から下へ走査する。図8において、全ての連結成分iについて、領域配列の要素のメンバr[i].sを0に初期化し(ステップ804)、連結成分iを囲む窓枠内のラベル画像の画素が連結成分iの画素であれば(ステップ811)、メンバr[i].sの値を一つ増やして(ステップ812)連結成分iの面積を算出する。この窓枠を使った面積算出アルゴリズムにおいては最小限の画素にアクセスするだけで良いため、算出処理の効率が良いという利点がある。
FIG. 8 is a flowchart showing details of processing in the
次に図6のソートモジュール607が連結成分をその面積が大きい順にソートする。図9(a)はソートで使われる配列orderの要素の構造を示したものである。図9(a)に示すように、要素はメンバsとメンバidからなる構造体である。order[i].sとorder[i].idの初期値はそれぞれr[i].sとr[i].idである。図9(c)は図5(d)の窓枠付きラベル画像と領域配列rと配列orderの関係を示した図である。図9(c)の左側の配列orderはソート前の状態を示し、右側の配列orderはソート後の状態を示す。ソートの結果、連結成分3・連結成分1・連結成分2の順に配列orderの要素を並べることができる。
Next, the
図10は図6の描画モジュール608の処理の詳細を示すフローチャート図である。描画モジュール608は、連結成分を面積の大きい順に出力画像の左から右に並べて描画する。一行に収まりきれない場合には改行を行う。変数xと変数yとは連結成分を出力画像中に配置した時の連結成分を囲む窓枠の左上の点のx座標とy座標を意味する。変数dyは一行の連結成分中でy方向の最も大きいサイズを求めるための変数である。
FIG. 10 is a flowchart showing details of processing of the
図10に示すように、まず、ステップ1001からステップ1003までにおいて、変数x、変数y、および、変数dyに初期値0を設定する。次に、ステップ1004において変数iに1を代入する。ステップ1005においてiが連結成分の個数nRegion以下か否かを判定する。nRegion以下でないなら(NO)、処理を終了する(return)。nRegion以下なら(YES)、ステップ1006においてi番目に面積の大きい連結成分の識別子を得るために、order[i].idの値を変数idに代入する。次に、ステップ1007において連結成分idを出力画像中に配置した時の右端のx座標xRightを算出する。ステップ1008においてxRightが出力画像の幅Wより大きいか否かを判定する。大きくなければ(NO)、ステップ1013において連結成分idを出力画像中に配置した時の下端のy座標yLowを算出する。ステップ1014においてyLowが出力画像の高さHより大きいか否かを判定する。大きければ(YES)、処理を終了する(return)。大きくなければ(NO)、ステップ1015において手続きdraw(id, x, y)を呼んで、連結成分idを描き込む。次に、ステップ1016とステップ1017とにおいてdyと連結成分idの高さを比較して、dyの方が小さければ、dyに連結成分idの高さを代入する。
As shown in FIG. 10, first, in
次に、ステップ1018において、変数xをxRightと連結成分間の間隔SPACEを加算した値にする。ステップ1019において変数iの値を1つ増やし、ステップ1005に戻ってループする。ステップ1008で大きければ(YES)、改行の処理を行う。すなわち、ステップ1009において変数xの値を0にし、ステップ1010において変数yの値をy + dy + SPACEにする。ステップ1011において変数dyの値を0にする。ステップ1012において変数yが出力画像の高さHより大きいか否かを判定する。変数yが出力画像の高さHより大きければ(YES)、処理を終了する。変数yが出力画像の高さHより大きくなければ(NO)、ステップ1005に戻り、ループする。
Next, in
図11は、図10のステップ1015で呼んでいる手続きdraw(id, x, y)の詳細を示すフローチャート図である。図11に示すフローチャート図には、ステップ1101からステップ1103までの変数y1についてのループと、ステップ1104からステップ1106までの変数x1についてのループがある。二つのループでは変数y1はr[id].yminからr[id].ymaxまで変わり、変数x1はr[id].xminからr[id].xmaxまで変わる。すなわち、これらのループでは連結成分idを囲む窓枠を左から右へ、上から下へ走査する。ステップ1107で座標(x1, y1)のラベル画像の画素が連結成分idの画素であるか否かを判定する。座標(x1, y1)のラベル画像の画素が連結成分idの画素でなければ(NO)、直接、ステップ1106へ進む。座標(x1, y1)のラベル画像の画素が連結成分idの画素であれば(YES)、ステップ1108とステップ1109とで連結成分idを囲む窓枠の左上の点(r[id].xmin, r[id].ymin)を点(x, y)に対応させる平行移動によって、点(x1, y1)を点(x2, y2)に変換する。ステップ1110で入力画像imgInの座標(x1, y1)の画素の値を出力画像imgOutの座標(x2, y2)の画素に代入する。次にステップ1106へ進む。ステップ1106では変数x1の値を一つ増やし、ステップ1105に戻ってループする。
FIG. 11 is a flowchart showing details of the procedure draw (id, x, y) called in
この窓枠を使ったアルゴリズムは最小限の画素にアクセスするので、効率が良い。従来の方法(非特許文献1p.108)では、一つの連結成分を描く毎に画像全体を走査する必要があるため、全体で連結成分の個数だけ画像全体を走査する。一方、本実施の形態による窓枠を使ったアルゴリズムでは、連結成分の窓枠内だけを走査すればよいので、全ての連結成分を描くのに高々一回の画像全体の走査で済む。
This window frame algorithm is efficient because it accesses the minimum number of pixels. In the conventional method (
尚、上記の例では、虫や常在などの画像解析を例にして説明したが、例えば、天体写真、星の明るさなどに関する解析にも利用できることは言うまでもない。また、上記各処理をコンピュータに実行させるためのプログラムも本発明の範疇に入るものである。 In the above example, image analysis such as insects and resident is described as an example, but it goes without saying that it can also be used for analysis of astronomical photographs, star brightness, and the like. A program for causing a computer to execute each of the above processes also falls within the scope of the present invention.
以上、本実施の形態による画像処理技術における連結成分一覧作成方法においては、画像中のオブジェクトに対応する連結成分を抽出し、連結成分の特徴量に従って連結成分の像を配置する方法により、オペレータが容易にオブジェクトをカウントしたり、分類したりすることができるようになった。また、窓枠を使うことにより、連結成分の情報を高速に抽出することができるという利点がある。 As described above, in the connected component list creation method in the image processing technique according to the present embodiment, the operator extracts the connected component corresponding to the object in the image and arranges the image of the connected component according to the feature amount of the connected component. You can now easily count and classify objects. Moreover, there is an advantage that the information of the connected component can be extracted at high speed by using the window frame.
本発明は画像処理技術に利用可能である。 The present invention is applicable to image processing technology.
601・・・キーボード、602・・・処理装置、603・・・2値化モジュール、604・・・ラベリングモジュール、605・・・窓枠モジュール、606・・・面積算出モジュール、607・・・ソートモジュール、608・・・描画モジュール、609・・・記憶装置、610・・・濃淡画像、611・・・2値画像、612・・・ラベル画像、613・・・作業用画像、614・・・領域配列、615・・・ディスプレイ。 601 ... Keyboard, 602 ... Processing device, 603 ... Binarization module, 604 ... Labeling module, 605 ... Window frame module, 606 ... Area calculation module, 607 ... Sort Module, 608 ... Drawing module, 609 ... Storage device, 610 ... Gray image, 611 ... Binary image, 612 ... Label image, 613 ... Work image, 614 ... Area arrangement, 615... Display.
Claims (3)
画像を濃淡に関する2値画像に変換する2値化ステップと、
前記2値画像上の連結成分の画素に連結成分毎に定まった番号が割り振られたラベル画像を生成するラベリングステップと、
該ラベル画像を参照して、各連結成分を囲む最小の長方形からなる窓枠を設定する窓枠設定ステップと、
前記窓枠内において各連結成分の特徴量を算出する特徴量抽出ステップと、
前記特徴量に基づいて前記各連結成分をソートするソートステップと、
ソートされた順に前記各連結成分の像の一覧を表示する連結成分一覧を生成するステップと
を有することを特徴とする画像連結成分一覧作成方法。 In a method of creating a list of image connected components using a computer,
A binarization step for converting the image into a binary image relating to shading;
A labeling step for generating a label image in which a number determined for each connected component is assigned to pixels of the connected component on the binary image;
With reference to the label image, a window frame setting step for setting a window frame consisting of a minimum rectangle surrounding each connected component;
A feature amount extracting step of calculating a feature amount of each connected component within the window frame;
A sorting step of sorting each connected component based on the feature amount;
Generating a connected component list for displaying a list of images of the respective connected components in the sorted order.
まず、各連結成分iについて
変数xi minに十分大きな初期値を設定し、変数xi maxに十分小さな初期値を設定し、変数yi minに十分大きな初期値を設定し、変数yi maxに十分小さな初期値を設定し、
次に、ラベル画像をラスタ走査して、現在の位置(x, y)が連結成分i上であれば、xがxi minより小さい時、xi minにxの値を代入し、xがxi maxより大きい時、xi maxにxの値を代入し、yがyi minより小さい時、yi minにyの値を代入し、yがyi maxより大きい時、yi maxにyの値を代入し、各連結成分を囲む最小の長方形を設定することを特徴とする請求項1に記載の画像連結成分一覧作成方法。 In the window frame step,
First, for each connected component i, a sufficiently large initial value is set for the variable x i min , a sufficiently small initial value is set for the variable x i max , a sufficiently large initial value is set for the variable y i min , and the variable y i max Set a sufficiently small initial value to
Next, the label image is raster scanned, if the current position (x, y) is connected component i, at x is less than x i min, and assigns the value of x to x i min, x is when greater than x i max, assigns the value of x to x i max, when y is smaller than y i min, and assigns the value of y to y i min, when y is greater than y i max, y i max The image connected component list creation method according to claim 1, wherein a value of y is substituted into and a minimum rectangle surrounding each connected component is set.
連結している画素同士に同じラベルを付すラベリングモジュールと、
同じラベルが付された各連結成分を囲む最小の長方形からなる窓枠を設定する窓枠モジュールと、
前記窓枠内において各連結成分の特徴量を算出する特徴量抽出モジュールと、
前記特徴量に基づいて前記各連結成分をソートするソートモジュールと、
ソートされた順に前記各連結成分の像の一覧を表示する連結成分一覧を生成する連結成分一覧生成モジュールと
を備えた画像処理装置。 A binarization module that binarizes the image based on the magnitude of the pixel density;
A labeling module for attaching the same label to connected pixels;
A window frame module for setting a window frame consisting of a minimum rectangle surrounding each connected component with the same label;
A feature amount extraction module for calculating a feature amount of each connected component in the window frame;
A sorting module for sorting the connected components based on the feature amount;
An image processing apparatus comprising: a connected component list generation module that generates a connected component list that displays a list of images of the respective connected components in the sorted order.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005084414A JP2006268339A (en) | 2005-03-23 | 2005-03-23 | Method for generating list of connected elements of image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005084414A JP2006268339A (en) | 2005-03-23 | 2005-03-23 | Method for generating list of connected elements of image |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006268339A true JP2006268339A (en) | 2006-10-05 |
Family
ID=37204268
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005084414A Pending JP2006268339A (en) | 2005-03-23 | 2005-03-23 | Method for generating list of connected elements of image |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006268339A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101026051B1 (en) | 2008-12-15 | 2011-03-30 | 삼성전기주식회사 | Method for grouping pixels in 2d digital image |
US9124818B2 (en) | 2013-11-01 | 2015-09-01 | Kabushiki Kaisha Toshiba | Image erasing apparatus and method for processing image on sheet |
-
2005
- 2005-03-23 JP JP2005084414A patent/JP2006268339A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101026051B1 (en) | 2008-12-15 | 2011-03-30 | 삼성전기주식회사 | Method for grouping pixels in 2d digital image |
US9124818B2 (en) | 2013-11-01 | 2015-09-01 | Kabushiki Kaisha Toshiba | Image erasing apparatus and method for processing image on sheet |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102220174B1 (en) | Learning-data enhancement device for machine learning model and method for learning-data enhancement | |
CN111784685B (en) | Power transmission line defect image identification method based on cloud edge cooperative detection | |
CN109781733B (en) | Defect inspection apparatus, defect inspection method, and computer-readable storage medium | |
CN104424482B (en) | Image processing equipment and image processing method | |
US9547800B2 (en) | System and a method for the detection of multiple number-plates of moving cars in a series of 2-D images | |
JP4942510B2 (en) | Vehicle image recognition apparatus and method | |
US20120269398A1 (en) | Method and system for identifying a license plate | |
CN105308944A (en) | Classifying objects in images using mobile devices | |
CN106971185B (en) | License plate positioning method and device based on full convolution network | |
US8331680B2 (en) | Method of gray-level optical segmentation and isolation using incremental connected components | |
CN109951635A (en) | It takes pictures processing method, device, mobile terminal and storage medium | |
US20030012438A1 (en) | Multiple size reductions for image segmentation | |
JP2006293528A (en) | Method and apparatus for selecting learning image, and method, apparatus, program and recording medium for creating image processing algorithm | |
US20200302135A1 (en) | Method and apparatus for localization of one-dimensional barcodes | |
CN110837809A (en) | Blood automatic analysis method, blood automatic analysis system, blood cell analyzer, and storage medium | |
CN112733858B (en) | Image character rapid identification method and device based on character region detection | |
JP6630341B2 (en) | Optical detection of symbols | |
JP2006268339A (en) | Method for generating list of connected elements of image | |
Bala et al. | Image simulation for automatic license plate recognition | |
Varkentin et al. | Development of an application for car license plates recognition using neural network technologies | |
JP2017228297A (en) | Text detection method and apparatus | |
CN114549628A (en) | Power pole inclination detection method, device, equipment and storage medium | |
CN112464946A (en) | Garbage image collection method and system based on big data | |
JP6373729B2 (en) | Program, image processing apparatus and image processing method | |
CN109558876B (en) | Character recognition processing method and device |