JP5653308B2 - Region detection apparatus, region detection method, and program - Google Patents
Region detection apparatus, region detection method, and program Download PDFInfo
- Publication number
- JP5653308B2 JP5653308B2 JP2011145958A JP2011145958A JP5653308B2 JP 5653308 B2 JP5653308 B2 JP 5653308B2 JP 2011145958 A JP2011145958 A JP 2011145958A JP 2011145958 A JP2011145958 A JP 2011145958A JP 5653308 B2 JP5653308 B2 JP 5653308B2
- Authority
- JP
- Japan
- Prior art keywords
- contour
- series
- pixel
- pixels
- extracted
- 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.)
- Active
Links
Images
Landscapes
- Character Input (AREA)
Description
本発明の実施形態は、画像から枠で囲まれた領域を検出する領域検出装置、領域検出方法及びプログラムに関する。 Embodiments described herein relate generally to an area detection apparatus, an area detection method, and a program for detecting an area surrounded by a frame from an image.
画像から枠で囲まれた領域を検出する技術として、道路標識から赤枠を検出し、その中の標示を識別する技術(第1の技術)が従来から知られている。 As a technique for detecting a region surrounded by a frame from an image, a technique (first technique) for detecting a red frame from a road sign and identifying a label therein is conventionally known.
また、帳票上の黒罫線に囲まれた白画素の連結領域を検出することにより、文字の抽出や認識を行う技術(第2の技術)も従来から知られている。 A technique (second technique) for extracting and recognizing characters by detecting a connected region of white pixels surrounded by black ruled lines on a form has also been known.
上述したような、道路標識から特定の色の枠を検出する第1の技術は、カラー画像を必要とする。このため、画像を取得する手段が例えばモノクロカメラである場合、色情報を利用できないことから、枠検出(領域検出)に第1の技術を適用することは難しい。 As described above, the first technique for detecting a frame of a specific color from a road sign requires a color image. For this reason, when the means for acquiring an image is, for example, a monochrome camera, it is difficult to apply the first technique to frame detection (region detection) because color information cannot be used.
また、上第1及び第2の技術では、検出すべき領域を取り囲む枠の外側と内側を区別する必要がある。しかし、枠と枠内の文字等が接触している場合、前記区別の基準が不明確となる場合がある。 In the first and second technologies, it is necessary to distinguish the outside and the inside of the frame surrounding the area to be detected. However, when the frame and the characters in the frame are in contact with each other, the distinction criteria may be unclear.
本発明が解決しようとする課題は、枠と枠内の文字等が接触している場合における枠の内側と外側の区別をより確実にし、枠に囲まれた領域の検出性能を向上できる領域検出装置、領域検出方法及びプログラムを提供することにある。 The problem to be solved by the present invention is that the area detection can improve the detection performance of the area surrounded by the frame by making the distinction between the inside and the outside of the frame when the frame and the characters in the frame are in contact with each other. An apparatus, a region detection method, and a program are provided.
実施形態によれば、領域検出装置は、凸包抽出手段と、領域取得手段とを具備する。前記輪郭線抽出手段は、入力画像から第1の輪郭画素の系列を輪郭線毎に抽出する。前記凸包抽出手段は、前記抽出された第1の輪郭画素の系列毎に、当該第1の輪郭画素の系列の凸包を構成する第2の輪郭画素の系列を抽出する。前記領域取得手段は、前記抽出された第2の輪郭画素の系列を、前記入力画像から検出された領域の情報として取得する。 According to the embodiment, the region detection device includes a convex hull extraction unit and a region acquisition unit. The contour extracting means extracts a first contour pixel series from the input image for each contour. The convex hull extracting means extracts, for each series of the extracted first contour pixels, a second contour pixel series constituting a convex hull of the first contour pixel series. The area acquisition unit acquires the extracted second contour pixel series as information of an area detected from the input image.
以下、実施の形態につき図面を参照して説明する。
[第1の実施形態]
図1は第1の実施形態に係る領域検出装置のハードウェア構成を示すブロック図である。図1に示す領域検出装置は、コンピュータ(以下、PCと称する)10を用いて実現されるものとする。PC10は、CPU11と、記憶装置12と、入出力制御部13とを備えている。CPU11、記憶装置12及び入出力制御部13は、バス14によって相互接続されている。
Hereinafter, embodiments will be described with reference to the drawings.
[First Embodiment]
FIG. 1 is a block diagram showing a hardware configuration of the area detection apparatus according to the first embodiment. The area detection apparatus shown in FIG. 1 is realized using a computer (hereinafter referred to as a PC) 10. The PC 10 includes a
記憶装置12は、領域検出ソフトウェア121及び文字認識ソフトウェア122のようなソフトウェア群、入力画像、及び作業データ等を格納するのに用いられる。CPU11は、記憶装置12から領域検出ソフトウェア121を読み取って実行することにより、入力画像から枠に囲まれた領域を検出する領域検出処理を行う。領域検出処理は、領域検出結果を記憶装置12または外部デバイスに出力する処理を含む。CPU11はまた、記憶装置12から文字認識ソフトウェア122を読み取って実行することにより、領域検出処理で検出された領域内の文字を認識する文字認識処理を行う。文字認識処理は、文字認識結果を記憶装置12または外部デバイスに出力する処理を含む。
The
入出力制御部13は、画像を撮像する画像取得手段としてのカメラ21と接続されている。入出力制御部13はまた、シリアルインタフェース22と接続されている。入出力制御部13は、カメラ21からの画像の入力、及び外部デバイス(カメラ21以外の外部デバイス)へのシリアルインタフェース22を介してのシリアル出力を制御(つまり、外部の装置との間の入出力を制御)する。入出力制御部13はまた、カメラ21から入力した画像を、例えばダイレクトメモリアクセス(DMA)により記憶装置12へ転送する。入出力制御部13は更に、CPU11による領域検出ソフトウェア121或いは文字認識ソフトウェア122の実行の結果(つまり、領域検出結果或いは文字認識結果)等を、シリアルインタフェース22を介して外部デバイスにシリアル出力する、或いはバス14を介して記憶装置12に出力する。
The input /
図2は第1の実施形態に係る領域検出装置の機能構成を示すブロック図である。図2に示す領域検出装置の機能構成は、CPU11が領域検出ソフトウェア121を読み取って実行することによって実現される。
FIG. 2 is a block diagram showing a functional configuration of the area detection apparatus according to the first embodiment. The functional configuration of the area detection apparatus shown in FIG. 2 is realized by the
図2に示す領域検出装置は、輪郭線抽出手段210、選択手段220及び領域出力手段230を備えている。
輪郭線抽出手段210は、カメラ21から入力された画像(つまり、入力画像)から輪郭線毎に輪郭画素の系列を検出することにより、当該輪郭画素の系列の集合S1を抽出する。
The region detection apparatus shown in FIG. 2 includes a contour
The contour
選択手段220は、輪郭画素の系列の集合S1から1つまたは複数の輪郭画素の系列を選択することにより、当該選択した輪郭画素の系列の集合S4(つまり、集合S1の部分集合S4)を抽出する。
領域出力手段230は、選択(抽出)された画素の系列の集合S4を、領域検出の結果として外部デバイスまたは記憶装置12に出力する。
The selection means 220 extracts one or more contour pixel sequences from the contour pixel sequence set S1, thereby extracting the selected contour pixel sequence set S4 (that is, a subset S4 of the set S1). To do.
The
次に。図2に示す領域検出装置の動作について説明する。以下の説明では1次元の配列αの第i番目の要素をα(i)、2次元の配列βの横方向にj番目、縦方向にi番目の要素をβ(i,j)と表す。但し、記号αは任意の1次元配列変数、βは任意の2次元配列変数の、それぞれ変数名を表すものとする。また、以下では入力画像が原則モノクログレースケール画像(いわゆるものモノクロ画像)であるものとして説明する。 next. The operation of the region detection apparatus shown in FIG. 2 will be described. In the following description, the i-th element of the one-dimensional array α is expressed as α (i), the j-th element in the horizontal direction of the two-dimensional array β, and the i-th element in the vertical direction as β (i, j). Here, the symbol α represents an arbitrary one-dimensional array variable, and β represents an arbitrary two-dimensional array variable. In the following description, it is assumed that the input image is in principle a monochrome grayscale image (so-called monochrome image).
図3は入力画像の例を示す図である。図3に示す入力画像は、丸枠の中に文字列「10」を含む。入力画像は横幅w画素、高さh画素の画素値の配列であり、記憶装置12に格納される。また、以下の説明では、入力画像の座標(x,y)の画素を画素(x,y)と表記する。画素(x,y)の画素値は2次元配列f、つまりf(x,y)として読み書きできるものとする。但し、xは図3における矢印31の方向(右方向)を正、yは図3における矢印32の方向(下方向)を正とする。
FIG. 3 is a diagram illustrating an example of an input image. The input image shown in FIG. 3 includes a character string “10” in a round frame. The input image is an array of pixel values having a horizontal width of w pixels and a height of h pixels, and is stored in the
輪郭線抽出手段210は、図3に示す入力画像から、輪郭線毎に輪郭画素の系列を検出することにより、当該輪郭画素の系列の集合S1を抽出する。この集合S1の抽出のために、輪郭線抽出手段210は、エッジ検出手段211及び輪郭線追跡手段212を備えている。
The contour
エッジ検出手段211は、入力画像内の隣接する画素間からエッジを検出する。より詳細には、エッジ検出手段211は、隣接する画素間の画素値の差に基づいてエッジを検出する。ここではエッジ検出手段211は、隣接する画素間の画素値の差の絶対値がしきい値Te以上の場合にエッジを検出し、Te未満の場合にエッジを検出しない。
The
輪郭線追跡手段212は、検出されたエッジで区切られた画素の塊毎に、当該画素の塊の輪郭線を追跡する。輪郭線追跡手段212は、輪郭線追跡により検出された輪郭線を構成する輪郭画素の系列を、上記画素の塊に対応する輪郭線毎に抽出する。
The contour
以下、エッジ検出手段211によるエッジ検出の詳細について説明する。ここで、横方向(x方向)のエッジの有無を表す変数をh(x,y)と表記し、縦方向(y方向)のエッジの有無を表す変数をv(x,y)と表記する。
Details of edge detection by the
エッジ検出手段211は、入力画像から、後述する方法で、変数h(x,y)及び縦方向のエッジの有無を表す変数v(x,y)を−1≦y≦h−1且つ1≦x≦w−1で規定される範囲の座標(x,y)全てについて算出する。
The
変数h(x,y)は、入力画像の座標(x,y)の画素(x,y)と縦方向に隣接する画素(x,y+1)とを結ぶ線分を横切る横エッジが検出されたか否かを表す。
h(x,y)には、横エッジが検出された場合は0、当該横エッジが検出されなかった場合は1が代入される。したがってh(x,y)は、
|f(x,y)−f(x,y+1)|≧Te
ならば0、
|f(x,y)−f(x,y+1)|<Te
ならば1となる。
Whether the variable h (x, y) is detected as a horizontal edge crossing a line segment connecting the pixel (x, y) at the coordinates (x, y) of the input image and the pixel (x, y + 1) adjacent in the vertical direction Indicates whether or not.
For h (x, y), 0 is substituted when a horizontal edge is detected, and 1 is substituted when the horizontal edge is not detected. Therefore h (x, y) is
| F (x, y) −f (x, y + 1) | ≧ Te
Then 0,
| F (x, y) -f (x, y + 1) | <Te
Then it becomes 1.
変数v(x,y)は、入力画像の座標(x,y)の画素(x,y)と横方向に隣接する画素(x+1,y)とを結ぶ線分を横切る縦エッジが検出されたか否かを表す。
v(x,y)には、縦エッジが検出された場合は0、当該縦エッジが検出されなかった場合は1が代入される。したがってh(x,y)は、
|f(x,y)−f(x+1,y)|≧Te
ならば0、
|f(x,y)−f(x+1,y)|<Te
ならば1となる。
Whether the variable v (x, y) is detected as a vertical edge crossing a line segment connecting the pixel (x, y) at the coordinate (x, y) of the input image and the pixel (x + 1, y) adjacent in the horizontal direction Indicates whether or not.
For v (x, y), 0 is substituted when a vertical edge is detected, and 1 is substituted when the vertical edge is not detected. Therefore h (x, y) is
| F (x, y) −f (x + 1, y) | ≧ Te
Then 0,
| F (x, y) -f (x + 1, y) | <Te
Then it becomes 1.
但しエッジ検出手段211は、入力画像の外側の画素、即ちx<0またはx≧wまたはy<0またはy≧hの画素については、画素値f(x,y)が予め定められた値Cであるものとみなして、h(x,y)及びv(x,y)を算出する。
However, the
図4は、図3に示す入力画像内で隣接する2つの画素の対の群のうち、エッジ検出手段211によって当該2つの画素間にエッジが検出されなかった画素同士を線分で結んだ様子を示す図である。
FIG. 4 illustrates a state in which pixels in the pair of adjacent two pixels in the input image illustrated in FIG. 3 are connected to each other by a line segment in which no edge is detected between the two pixels by the
輪郭線追跡手段212は、検出されたエッジ(横方向のエッジまたは縦方向のエッジ)で区切られた画素の塊の輪郭線を追跡することにより、輪郭線毎に当該輪郭線を構成する輪郭画素の系列を検出する。輪郭線追跡手段212は、この輪郭線毎の輪郭画素の系列を検出することにより、検出された輪郭線の集合を表す、輪郭画素の系列の集合S1を抽出する。
The contour
以下、輪郭線追跡手段212による輪郭線検出の詳細について説明する。
輪郭線追跡手段212は、輪郭線検出のために以下の変数群
(a1)入力画像と同様の、横幅w画素、高さh画素の整数の配列g
(a2)輪郭線の追跡開始画素(つまり追跡開始点)の座標を表す整数変数x0,y0
(a3)現在追跡中の画素(輪郭点)の座標を表す整数変数x,y
(a4)上下左右の方向を、値0で右方向、値1で上方向、値2で左方向、値3で下方向を表す整数変数d0,d1,d2
(a5)追跡中の輪郭線の番号(且つ追跡が完了した輪郭線の個数)を表す整数変数N1
(a5)抽出(列挙)された輪郭画素の個数(輪郭画素数)を表す整数変数M1
(a6)抽出(列挙)された輪郭画素の2次元座標を格納する配列変数(配列)p1
(a7)要素r1(n)が、第n番目に追跡された輪郭線を構成する画素の系列の先頭画素(つまり始点)の配列p1中での位置を表す整数の配列変数(配列)r1
(a8)要素m1(n)が、第n番目に追跡された輪郭線を構成する画素(つまり輪郭画素)の系列に含まれる輪郭画素の個数(輪郭画素数)を表す整数の配列変数(配列)m1
を用いる。これらの変数群は、記憶装置12に格納される。
Hereinafter, details of contour detection by the contour tracking means 212 will be described.
The contour
(A2) Integer variables x0 and y0 representing the coordinates of the tracking start pixel (that is, the tracking start point) of the contour line
(A3) Integer variables x and y representing the coordinates of the currently tracked pixel (contour point)
(A4) Integer variables d0, d1, and d2 representing the up, down, left, and right directions as 0 for the right direction, 1 for the upward direction, 2 for the left direction, and 3 for the downward direction
(A5) Integer variable N1 representing the number of the contour line being tracked (and the number of contour lines that have been tracked)
(A5) Integer variable M1 representing the number of contour pixels extracted (enumerated) (the number of contour pixels)
(A6) Array variable (array) p1 for storing the two-dimensional coordinates of the extracted (enumerated) contour pixels
(A7) An integer array variable (array) r1 in which the element r1 (n) represents the position in the array p1 of the first pixel (that is, the start point) of the series of pixels constituting the nth tracked contour line
(A8) The element m1 (n) is an integer array variable (array) indicating the number of contour pixels (number of contour pixels) included in a series of pixels (that is, contour pixels) constituting the nth tracked contour line ) M1
Is used. These variable groups are stored in the
次に、輪郭線追跡手段212によって実行される輪郭線抽出処理の手順について、図5及び図6のフローチャートを参照して説明する。この輪郭線抽出処理では、以下に述べるように、輪郭線を構成する輪郭画素が抽出(列挙)される。
Next, the procedure of the contour line extraction process executed by the contour
まず輪郭線追跡手段212は、N1を0に、M1を0に、それぞれ初期化する(ステップ501)。また輪郭線追跡手段212は、配列gの要素を全て0に初期化する(ステップ502)。また輪郭線追跡手段212は、y0を0に初期化する(ステップ503)。
First, the
次に輪郭線追跡手段212は、y0がhに達するまで以下のループAの処理(ステップ504)を繰り返す。
まず輪郭線追跡手段212は、x0を0に初期化する(ステップ505)。次に輪郭線追跡手段212は、x0がwに達するまで以下のループBの処理(ステップ506)を繰り返す。
Next, the contour
First, the
まず輪郭線追跡手段212は、g(x0,y0)=0で且つh(x0,y0)=0であるかを判定する(ステップ507)。もし、ステップ507の判定がYesであるならば、輪郭線追跡手段212は、m1(N1)に0を、r(N1)にM1を、それぞれ代入する(ステップ508)。また輪郭線追跡手段212は、xにx0を、yにy0を、それぞれ代入する(ステップ509)。また輪郭線追跡手段212は、d0に2を代入する(ステップ510)。次に輪郭線追跡手段212は、d1にd0を代入する(ステップ511)。
First, the
すると輪郭線追跡手段212は、x=x0で且つy=y0で且つd1=d0となるまで以下のループCの処理(ステップ601)を繰り返す。
まず輪郭線追跡手段212は、p1(M1)に座標(x,y)を代入する(ステップ602)。このステップ602が繰り返されることにより、座標(x,y)の画素(x,y)が輪郭画素として列挙(抽出)される。
Then, the contour
First, the contour tracking means 212 substitutes coordinates (x, y) for p1 (M1) (step 602). By repeating this
次に輪郭線追跡手段212は、m1(N1)にm1(N1)+1を代入し(ステップ603)、M1にM1+1を代入する(ステップ604)。
Next, the
次に輪郭線追跡手段212は、座標(x,y)の画素(x,y)と、当該画素(x,y)からd2が指し示す方向に隣接した画素(隣接画素)との間にエッジが検出されているかを判定する(ステップ605)。このステップ605において輪郭線追跡手段212は、前記判定結果に基づき、隣接画素との間にエッジが検出されていない方向を指すようになるまで、d2を以下の値
・(d1+3) MOD 4
・ d1
・(d1+1) MOD 4
・(d1+2) MOD 4
の順に変更する。但し、d2の方向の画素が入力画像の範囲外ならば、輪郭線追跡手段212は、隣接画素の値は0であるとみなす。ここで、「a MOD b」はaをbで割った余りを表す。
Next, the contour
・ D1
・ (D1 + 1)
・ (D1 + 2)
Change in the order. However, if the pixel in the direction of d2 is outside the range of the input image, the contour
また輪郭線追跡手段212は、d2が指し示す方向に隣接した画素との間にエッジが検出されているかを、d2の値によって以下のように判定する。
d2=0で且つh(x,y)=0なら、エッジが検出されている。
d2=1で且つv(x,y−1)=0なら、エッジが検出されている。
d2=2で且つh(x−1,y)=0なら、エッジが検出されている。
d2=3で且つv(x,y)=0なら、エッジが検出されている。
その他の場合は、エッジが検出されていない。
The
If d2 = 0 and h (x, y) = 0, an edge has been detected.
If d2 = 1 and v (x, y-1) = 0, an edge is detected.
If d2 = 2 and h (x-1, y) = 0, an edge has been detected.
If d2 = 3 and v (x, y) = 0, an edge has been detected.
In other cases, no edge is detected.
輪郭線追跡手段212は、ステップ605を実行し終えると、d1にd2を代入し(ステップ606)、g(x,y)に1を代入する(ステップ607)。
次に輪郭線追跡手段212は、d1の値に応じて、以下のいずれかの処理を行う(ステップ608)。
d1=0なら、輪郭線追跡手段212はxにx+1を代入する。
d1=1なら、輪郭線追跡手段212はyにy−1を代入する。
d1=2なら、輪郭線追跡手段212はxにx−1を代入する。
d1=3なら、輪郭線追跡手段212はxにy+1を代入する。
After completing the execution of step 605, the
Next, the contour
If d1 = 0, the contour tracking means 212 substitutes x + 1 for x.
If d1 = 1, the contour tracking means 212 substitutes y−1 for y.
If d1 = 2, the contour tracking means 212 substitutes x−1 for x.
If d1 = 3, the contour tracking means 212 substitutes y + 1 for x.
ステップ608の後、x=x0で且つy=y0で且つd1=d0が成立していないならば、輪郭線追跡手段212はループC(ステップ601)を再び実行する。
これに対し、x=x0で且つy=y0で且つd1=d0が成立しているならば、輪郭線追跡手段212はループC(ステップ601)の繰り返しを終了する。
After
On the other hand, if x = x0, y = y0, and d1 = d0 are established, the contour
すると輪郭線追跡手段212は、N1にN1+1を代入する(ステップ609)。
次に輪郭線追跡手段212は、x0を1増やす(ステップ610)。また、前記ステップ507の判定がNoの場合にも、輪郭線追跡手段212はx0を1増やす(ステップ610)。
Then, the contour
Next, the contour
ステップ610の後、x0=wが成立していないならば、輪郭線追跡手段212はループB(ステップ506)を再び実行する。
これに対し、x0=wが成立しているならば、輪郭線追跡手段212はループB(ステップ506)の繰り返しを終了する。
すると輪郭線追跡手段212は、y0を1増やす(ステップ611)。
After
On the other hand, if x0 = w is established, the
Then, the contour
ステップ611の後、y0=hが成立していないならば、輪郭線追跡手段212はループA(ステップ504)を再び実行する。
これに対し、y0=hが成立しているならば、輪郭線追跡手段212はループA(ステップ504)の繰り返しを終了する。
After
On the other hand, if y0 = h is established, the
以上に述べた輪郭線追跡手段212の処理により、記憶装置12には、抽出された輪郭線(を構成する輪郭画素の系列)の群に関する情報が格納される。図7は、この輪郭線の群に関する情報のデータ構造の例を示す図である。このデータ構造は、整数変数N1、整数変数M1、配列変数(配列)r1、配列変数(配列)p1及び配列変数(配列)m1を含む。
As a result of the processing of the
図8は、図3に示した入力画像から輪郭線追跡手段212によって抽出された輪郭画素の系列全てをまとめて示す図である。図8には、11の輪郭画素の系列801乃至811(より詳細には、11の輪郭線を構成する輪郭画素の系列801乃至811)が示されている。系列801乃至811は、輪郭画素の系列の集合S1を構成する。
FIG. 8 is a diagram showing all the series of contour pixels extracted by the contour
図9は、図8に示した輪郭画素の系列801乃至811のうちの系列801乃至806を個別に示す図であり、図10は、当該輪郭画素の系列801乃至811のうちの系列807乃至811を個別に示す図である。
FIG. 9 is a diagram individually showing the
再び図2を参照すると、選択手段220は、輪郭線抽出手段210によって抽出されたた集合S1から、1つまたは複数の輪郭画素の系列を選択する。そして選択手段220は、選択された輪郭画素の系列を含む集合S4を、集合S1の部分集合S4として抽出する。選択手段220による輪郭画素の系列(つまり部分集合S4)の選択(抽出)の詳細について以下に説明する。
Referring to FIG. 2 again, the
選択手段220は、n=0,…,N1−1の各々について、第n番目に追跡された輪郭線を構成する輪郭画素の系列を選択するか否かを、次のような方法により判定する。
(1-1)まず選択手段220は、第n番目に追跡された輪郭線が取り囲む面積を算出する。算出された面積が負の場合、即ち第n番目に追跡された輪郭線がエッジで区切られた画素の塊の外輪郭をなす場合には、選択手段220は、当該輪郭線を構成する画素の系列を選択しないと判定する。図8に示した輪郭画素の系列(輪郭線)の集合の場合、例えば、系列802及び803のうちの系列802、系列804び805のうちの系列804、系列806及び807のうちの系列806、系列808及び809のうちの系列808、そして系列810及び811のうちの系列810が、上記外輪郭をなすために選択されない。
The selection means 220 determines, for each of n = 0,..., N1-1, whether or not to select a series of contour pixels that constitute the nth tracked contour line by the following method. .
(1-1) First, the
第n番目に追跡された輪郭線が取り囲む面積は、i=0,…,m1(n)−1の各々についての以下の値
(p1(r1(n)+i).x
+p1(r1(n)+i+1 MOD m1(n)).x)
×(p1(r1(n)+i).y−p1(r1(n)+i+1).y)/2
を足し合わせることによって算出される。ここで、p1(r1(n)+i).xは、p1(r1(n)+i)に格納された2次元座標のx成分を示し、p1(r1(n)+i).yは、p1(r1(n)+i)に格納された2次元座標のy成分を示す。p1(r1(n)+i+1).についても同様である。
The area surrounded by the nth tracked contour is the following value for each of i = 0,..., M1 (n) −1: (p1 (r1 (n) + i) .x
+ P1 (r1 (n) + i + 1 MOD m1 (n)). x)
X (p1 (r1 (n) + i) .y-p1 (r1 (n) + i + 1) .y) / 2
It is calculated by adding together. Here, p1 (r1 (n) + i). x indicates the x component of the two-dimensional coordinates stored in p1 (r1 (n) + i), and p1 (r1 (n) + i). y represents the y component of the two-dimensional coordinate stored in p1 (r1 (n) + i). p1 (r1 (n) + i + 1). The same applies to.
(1-2)次に選択手段220は、i=0,…,m1(n)−1に関するp1(r1(n)+i).xの、それぞれ最小値xmin(n)及び最大値xmax(n)を算出する。そして選択手段220は、第n番目に追跡された輪郭線の幅xmax(n)−xmin(n)+1を算出する。
(1-2) Next, the
算出された幅xmax(n)−xmin(n)+1が、予め定められたしきい値wmin未満であるか、或いは予め定められたしきい値wmaxを超えるならば、選択手段220は、第n番目に追跡された輪郭線を構成する輪郭画素の系列を選択しない。wminが後述するように16の場合、上述の外輪郭をなさない系列807,809及び811も選択されない。
If the calculated width xmax (n) −xmin (n) +1 is less than the predetermined threshold value wmin or exceeds the predetermined threshold value wmax, the
(1-3)同様に選択手段220は、i=0,…,m1(n)−1に関するp1(r1(n)+i).yの、それぞれ最小値ymin(n)及び最大値ymax(n)を算出する。そして選択手段220は、第n番目に追跡された輪郭線の高さymax(n)−ymin(n)+1を算出する。
(1-3) Similarly, the
算出された高さxmax(n)−xmin(n)+1が、予め定められたしきい値hmin未満であるか、或いは予め定められたしきい値hmaxを超えるならば、選択手段220は、第n番目に追跡された輪郭線を構成する輪郭画素の系列を選択しない。 If the calculated height xmax (n) −xmin (n) +1 is less than the predetermined threshold value hmin or exceeds the predetermined threshold value hmax, the selection means 220 will A series of contour pixels constituting the nth tracked contour line is not selected.
wmax及びhmaxは、入力画像の周縁に対応する輪郭線の輪郭画素の系列801のように、枠とは無関係の輪郭線の輪郭画素の系列が選択されるのを防止するために設定される。一方、wmin及びhminは、枠として用いられないような小領域の輪郭線の輪郭画素の系列が選択されるのを防止するために設定される。
The wmax and hmax are set in order to prevent the selection of the contour pixel series of the contour line irrelevant to the frame, such as the
(1-4)上記(1-2)、(1-3)のいずれにも該当しない場合、選択手段220は、第n番目に追跡された輪郭線を構成する輪郭画素の系列を選択する。
このようにして選択手段220は、集合S1から選択条件に合致する輪郭画素の系列を選択し、当該選択された輪郭画素の系列を集合(部分集合)S4に格納する。
(1-4) If none of the above (1-2) and (1-3) applies, the selection means 220 selects a series of contour pixels that constitutes the nth tracked contour line.
In this way, the
集合S4の記憶装置12におけるデータ構造は集合S1と同様である。つまり、集合S4のデータ構造は、変数M1、N1、r1、p1、m1の代わりに、変数M4、N4、r4、p4、m4を用いる点を除いてS1と同等である。後述する集合S2についても同様であり、変数M1、N1、r1、p1、m1の代わりに、変数M2、N2、r2、p2、m2が用いられる。また、後述する集合S3についても同様であり、変数M1、N1、r1、p1、m1の代わりに、変数M3、N3、r3、p3、m3が用いられる。
The data structure in the
図11は、図9及び図10に示した輪郭画素の系列801乃至811から、上述の選択条件の下で選択手段220により抽出された輪郭画素の系列の集合S4の例を示す図である。選択条件は、例えばwmin=16、hmin=16、wmax=34、hmin=34を含む。図11では、集合S4を構成する輪郭画素の系列(つまり選択された輪郭画素の系列)が実線で表され、選択されなかった輪郭画素の系列が破線で表されている。図11の例では、集合S4は、2個の輪郭画素の系列803及び805から構成されており、領域検出装置によって検出された領域を表す。
FIG. 11 is a diagram illustrating an example of a set S4 of contour pixel series extracted by the
なお、選択手段220が、前述の方法で抽出した集合のうちで面積が最大の系列だけを含む集合を集合S4として抽出してもよい。また選択手段220が、集合S1を構成する全ての輪郭画素の系列をS4に含めても良い。つまり、S4=S1とすることにより、枠で囲まれた領域の輪郭画素の系列だけでなく、他の領域の輪郭画素の系列を抽出しても構わない。このように選択手段220において輪郭画素の系列を選択する方法は、後続の処理の負荷の大小や利用可能な計算機資源等の条件が許す限り、いかなる方法であっても良い。
Note that the
領域出力手段230は、選択手段220によって輪郭画素の系列の集合S4が抽出されると領域取得手段として機能して、当該輪郭画素の系列の集合S4を、入力画像から検出された領域の情報(つまり、領域検出の結果)として取得する。領域出力手段230は、取得された領域検出の結果(つまり集合S4)を、領域検出装置の外部のデバイス(外部デバイス)または記憶装置12に出力する。ここでは、領域出力手段230による集合S4の出力は、文字認識ソフトウェア122(より詳細には、文字認識ソフトウェア122に従って文字認識処理を実行するCPU11)から参照可能な記憶装置12の領域に変数M4、N4、r4、p4、m4のコピーを作成することによって行われる。なお、領域出力手段230による集合S4の出力が、例えば入出力制御部13及びシリアルインタフェース22を介して、変数M4、N4、r4、p4、m4の内容を外部デバイスに送信することで行われても構わない。つまり、領域出力手段230による集合S4の出力は、当該集合S4が何らかの形で情報処理の用に供される方法で行われるならば、他の方法で行われても構わない。
When the
図12は、第1の実施形態に係る領域検出装置に付加されている文字認識機構の機能構成を示すブロック図である。図12に示す文字認識機構の機能構成は、CPU11が文字認識ソフトウェア122を読み取って実行することによって実現される。なお、文字認識機構が、外部デバイスに備えられていてもよい。この場合、領域出力手段230による集合S4の出力が、外部デバイスに対して行われればよい。
FIG. 12 is a block diagram showing a functional configuration of a character recognition mechanism added to the area detection apparatus according to the first embodiment. The functional configuration of the character recognition mechanism shown in FIG. 12 is realized by the
図12に示す文字認識機構は、2値化手段240、画像抽出手段250、認識手段260及び認識結果出力手段270を備えている。
2値化手段240は、入力画像を2値化して2値画像を生成する。
The character recognition mechanism shown in FIG. 12 includes binarization means 240, image extraction means 250, recognition means 260, and recognition result output means 270.
The
画像抽出手段250は、領域出力手段230によって出力された集合S4に含まれる輪郭画素の系列の各々について、上記2値画像から対応する画像を抽出する。つまり画像抽出手段250は、図2に示す領域検出装置によって検出された領域の画像を抽出する。
The
認識手段260は、画像抽出手段250によって抽出された画像上の文字(つまり領域検出装置で検出された領域内の文字)を認識する。認識結果出力手段270は、認識手段260によって認識された結果(認識結果)を、記憶装置12または外部デバイスに出力する。
The recognizing
以下、図12に示す文字認識機構の動作の詳細について説明する。
2値化手段240は、入力画像を2値化して2値画像を生成する。この2値化には、例えば、周知のNiblackのアルゴリズムが用いられるものとする。図13は、図3に示した入力画像を2値化することによって生成される2値画像の例を示す図である。
Details of the operation of the character recognition mechanism shown in FIG. 12 will be described below.
The
画像抽出手段250は、集合S4に含まれる輪郭画素の系列で示される領域(つまり、領域検出装置によって検出された領域)の内部の画素を、上記2値画像から抽出する。そして画像抽出手段250は、検出された領域の外部の画素を白画素で埋めることにより、当該領域の外部の画素が白画素で埋められた抽出画像を生成する。この画像抽出手段250による抽出画像の生成について更に具体的に説明する。
The image extraction means 250 extracts pixels inside the region indicated by the series of contour pixels included in the set S4 (that is, the region detected by the region detection device) from the binary image. The
まず画像抽出手段250は、周知のソリッド・スキャン・コンバージョンのアルゴリズムを用いて、集合S4に含まれる輪郭画素の系列に囲まれた領域(検出された領域)内の画素値が1で、当該領域外の画素値が0のマスク画像を生成する。そして画像抽出手段250は、マスク画像上の画素値が1の座標における画素値が入力画像のそれと一致し、残りの画素の画素値が白を示す抽出画像を生成する。
First, the image extraction means 250 uses a well-known solid scan conversion algorithm and the pixel value in the region (detected region) surrounded by the series of contour pixels included in the set S4 is 1, and the region A mask image having an outer pixel value of 0 is generated. Then, the
図14は、図3に示した入力画像から最終的に抽出される輪郭画素の系列が図11に示した系列803及び805である場合に、画像抽出手段250により生成されるマスク画像及び抽出画像の例を示す図である。ここでは、マスク画像は図14(a)に示されており、画素値が1の画素が白で、画素値が0の画素が灰色で表されている。画素値が1の画素(つまり、白で表される画素)の領域は、図11に示した系列805の示す輪郭線の内部の領域であり、図3に示した入力画像に含まれている丸枠内の領域に対応する。一方、抽出画像は図14(b)に示されている。図14(b)に示す抽出画像は、図3に示した入力画像に含まれている丸枠内の文字列「10」を含む。
FIG. 14 shows a mask image and an extracted image generated by the image extraction means 250 when the series of contour pixels finally extracted from the input image shown in FIG. 3 is the
認識手段260は、周知の文字認識処理により文字列画像上の文字(文字列)を次のように認識する。まず認識手段260は、上記抽出画像からラベリングにより黒画素の連結成分を抽出した上で、当該連結成分の外接矩形内から部分画像を抽出する。次に認識手段260は、抽出された部分画像を部分空間法により認識して、認識結果に対応する文字コードを取得する。
The recognizing
認識結果出力手段270は、認識手段260によって取得された文字コードを記憶装置12に出力する。もし、認識手段260によって複数の文字コードが取得されたならば、認識結果出力手段270は、当該複数の文字コードを外接矩形の中心座標の順にソートする。そして認識結果出力手段270は、ソートされた文字コードの列を、文字認識結果を表す文字列データとして、記憶装置12に出力する。なお、認識結果出力手段270が、文字列データと改行コード(ASCIIコードならば0x0a)とを文字認識結果として入出力制御部13及びシリアルインタフェース22を介して外部デバイスに出力してもよい。つまり、認識結果出力手段270による文字認識結果の出力は、当該文字認識結果が何らかの形で情報処理の用に供される方法で行われるならば、他の方法で行われても構わない。
The recognition result output unit 270 outputs the character code acquired by the
第1の実施形態によれば、入力画像がモノクログレースケールでありながら、当該入力画像内の隣接する画素間からエッジを検出し、検出されたエッジで区切られた画素の塊毎に、当該画素の塊の輪郭線を追跡することにより、領域を形成する輪郭線を検出すること、つまり領域を検出することができる。 According to the first embodiment, while an input image is a monochrome gray scale, an edge is detected between adjacent pixels in the input image, and the pixel is detected for each block of pixels divided by the detected edge. By tracing the contour line of the lump of the object, it is possible to detect the contour line forming the region, that is, to detect the region.
上記第1の実施形態では、入力画像がモノクログレースケールであることを想定している。しかしながら、入力画像がカラーであっても構わない。入力画像がカラーである場合、画素値の配列fの各要素に、カラーの画素値を表現する2次元以上のベクトル(以下、画素値ベクトルと称する)を適用するとよい。 In the first embodiment, it is assumed that the input image is a monochrome gray scale. However, the input image may be in color. When the input image is in color, a two-dimensional or higher vector (hereinafter referred to as a pixel value vector) expressing the color pixel value may be applied to each element of the pixel value array f.
画素値ベクトルを適用する場合、第1の実施形態において、しきい値Teとの比較のためエッジ検出手段211によって算出される、隣接する画素間の画素値の差の絶対値に代えて、当該隣接する画素間の画素値ベクトルの差分のノルムを用いるとよい。また、画素値ベクトルの成分を、赤、緑、青の色成分を表すRGB値としても、或いは赤、緑の色成分を表す2値としてもよい。要するに、画素値ベクトルの成分として、カメラ21で撮像された画像の色を表現する値の組み合せならば、いずれを用いても構わない。
When applying the pixel value vector, in the first embodiment, instead of the absolute value of the difference between the pixel values calculated by the
また、カメラ21から入力された画素値の色成分の組み合せを、エッジ検出により一層適した別の色成分に変換する前処理が行われてもよい。この前処理として、例えばRGB表色系からHSV表色系への変換等が挙げられる。
In addition, preprocessing may be performed in which a combination of color components of pixel values input from the
[第2実施形態]
次に、第2の実施形態について説明する。
第2の実施形態に係る領域検出装置のハードウェア構成は、第1の実施形態と同様である。但し、領域検出ソフトウェア121の構成は第1の実施形態と異なる。一方、文字認識ソフトウェア122の構成、つまり文字認識機構の構成は第1の実施形態と同様である。これらの点を考慮して、以下の説明では、便宜的に図1及び図12を援用する。
[Second Embodiment]
Next, a second embodiment will be described.
The hardware configuration of the region detection apparatus according to the second embodiment is the same as that of the first embodiment. However, the configuration of the
図15は第2の実施形態に係る領域検出装置の機能構成を示すブロック図である。図15において図2と等価な構成要素には同一参照番号を付して、当該等価な構成要素についての詳細な説明は省略する。 FIG. 15 is a block diagram showing a functional configuration of an area detection apparatus according to the second embodiment. 15, components equivalent to those in FIG. 2 are denoted by the same reference numerals, and detailed description thereof is omitted.
図15に示す領域検出装置は、図2に示した領域検出装置(第1の実施形態)と同様に、輪郭線抽出手段210及び領域出力手段230を備えている。この領域検出装置は更に、凸包抽出手段280及び選択手段221を備えている。
The area detection device shown in FIG. 15 includes a contour
凸包抽出手段280は、輪郭線抽出手段210(より詳細には、輪郭線抽出手段210の輪郭線追跡手段212)によって抽出された輪郭画素の系列(以下、第1の輪郭画素の系列と称する)の集合S1に基づき、当該第1の輪郭画素の系列の各々の凸包を抽出する。具体的には、凸包抽出手段280は、集合S1に含まれる第1の輪郭画素の系列の各々について、GrahamScanのアルゴリズムを適用することで当該第1の輪郭画素の系列の凸包の頂点に位置する輪郭画素が当該凸包の外輪上での順に並んだ系列(以下、第2の輪郭画素の系列と称する)を抽出する。凸包抽出手段280は、抽出された第2の輪郭画素の系列を全て含む集合S3を取得する。つまり凸包抽出手段280は、集合S1に含まれる第1の輪郭画素の系列に対応して抽出された全ての第2の輪郭画素の系列を含む集合S3を取得する。集合S3を構成する第2の輪郭画素の系列の情報(変数M3、N3、r3、p3、m3)は記憶装置12に格納される。
The convex hull extracting means 280 is a series of contour pixels (hereinafter referred to as a first contour pixel series) extracted by the contour extracting means 210 (more specifically, the contour tracking means 212 of the
選択手段221は、凸包抽出手段280によって取得された第2の輪郭画素の系列の集合S3から1つまたは複数の輪郭画素の系列を選択することにより、当該選択した輪郭画素の系列の集合S4(つまり、集合S3の部分集合S4)を抽出する。
The selecting
次に、第2の実施形態の特徴について説明する。
まず輪郭線抽出手段210が、入力画像から、第1の実施形態と同様に輪郭線毎に輪郭画素の系列を検出することにより、当該輪郭画素の系列の集合S1を抽出したものとする。図16は、この入力画像の例を示す図である。図16に示す入力画像では、図3に示した入力画像と異なり、丸枠内の文字列「10」のうちの文字「0」の一部が、当該丸枠の内側と接触している。
Next, features of the second embodiment will be described.
First, it is assumed that the contour
図17は、図16に示した入力画像から輪郭線追跡手段212によって抽出された輪郭画素の系列全てをまとめて示す図である。図17には、10の輪郭画素の系列1701乃至1710(より詳細には、10の輪郭線を構成する輪郭画素の系列1701乃至1710)が示されている。系列1701乃至1710は、輪郭画素の系列の集合S1を構成する。
FIG. 17 is a diagram collectively showing all the contour pixel series extracted by the
ここで、系列1701乃至1704は、それぞれ図8の系列801乃至804に対応し、系列1706,1707,1708,1709及び1710は、それぞれ図8の系列806,807,809,810,及び811に対応する。これに対し、系列1705は、図8の2つの系列805及び808に対応する。その理由は、上述したように、図8の系列805に対応する丸枠の内側の輪郭線と文字「0」の外側の輪郭線とが接触しているためである。
Here,
図18は、図17に示した輪郭画素の系列1701乃至1710のうちの系列1701乃至1706を個別に示す図であり、図19は、当該輪郭画素の系列1701乃至1710のうちの系列1707乃至1710を個別に示す図である。
18 is a diagram individually showing the
図20は、図17に示した輪郭画素の系列1701乃至1710のうちの系列1705から凸包抽出手段280によって抽出された凸包を構成する輪郭画素の系列の例を示す図である。ここでは、第1の実施形態から類推されるように、輪郭画素の系列の集合S4は、系列1705から抽出された凸包を構成する輪郭画素の系列(図20参照)と、系列1703から抽出された凸包を構成する輪郭画素の系列とから構成される。
FIG. 20 is a diagram illustrating an example of a series of contour pixels constituting a convex hull extracted by the convex
図21は、図16に示した入力画像の場合に、画像抽出手段250によって生成されるマスク画像及び抽出画像の例を示す図である。ここでは、マスク画像は図21(a)に示されており、画素値が1の画素が白で、画素値が0の画素が灰色で表されている。このマスク画像は、図16に示した入力画像及び図20に示した輪郭画素の系列(つまり、系列1705から抽出された凸包を構成する輪郭画素の系列)に基づいて画像抽出手段250によって生成されたものである。
FIG. 21 is a diagram showing an example of a mask image and an extracted image generated by the
一方、抽出画像は図21(b)に示されている。図21(b)は、図16に示した入力画像及び図21(a)に示したマスク画像に基づいて生成される抽出画像の例を示している。 On the other hand, the extracted image is shown in FIG. FIG. 21B shows an example of an extracted image generated based on the input image shown in FIG. 16 and the mask image shown in FIG.
図22は第2の実施形態との比較のために、図16に示した入力画像の場合に、第1の実施形態において画像抽出手段250によって生成されるマスク画像及び抽出画像の例を示す図である。ここでは、マスク画像は図22(a)に示されており、抽出画像は図22(b)に示されている。図22(a)に示すマスク画像は、図16に示した入力画像と図18(e)に示した輪郭画素の系列に基づいて生成されたものであり、画素値が1の画素が白で、画素値が0の画素が灰色で表されている。
FIG. 22 is a diagram showing an example of a mask image and an extracted image generated by the
図22(a)に示すマスク画像では、文字「0」を取り囲む輪郭線と枠の内側の輪郭線とが繋がっており、文字「0」を囲んでいない。したがって、図22(a)に示すマスク画像と図16に示した入力画像とに基づいて抽出画像を生成すると、図22(b)に示すように、文字「0」が消失し、文字列「10」のうちの文字「1」のみが残ったものとなる。第2実施形態において、凸包を構成する輪郭画素の系列を適用しているのは、このような文字の消失(より詳細には、検出されるべき領域の輪郭線が枠に接触していることに起因して発生する文字の消失)を防止するためである。 In the mask image shown in FIG. 22A, the outline surrounding the character “0” and the outline inside the frame are connected, and the character “0” is not enclosed. Therefore, when an extracted image is generated based on the mask image shown in FIG. 22A and the input image shown in FIG. 16, the character “0” disappears and the character string “0” is lost as shown in FIG. Only the character “1” of “10” remains. In the second embodiment, the series of contour pixels constituting the convex hull is applied because of such disappearance of the character (more specifically, the contour line of the region to be detected is in contact with the frame. This is for the purpose of preventing the loss of characters caused by the above.
第2の実施形態によれば、抽出された輪郭線を構成する輪郭画素の系列の各々の凸包を抽出することにより、たとえ枠と枠内の文字等が接触している場合でも、枠の内側と外側の区別をより確実にし、枠に囲まれた領域の検出性能を向上することができる。 According to the second embodiment, by extracting the convex hull of each of the series of contour pixels constituting the extracted contour line, even if the frame and the characters in the frame are in contact with each other, The distinction between the inside and the outside can be made more reliable, and the detection performance of the area surrounded by the frame can be improved.
[第3の実施形態]
次に、第3の実施形態について説明する。
第3の実施形態に係る領域検出装置のハードウェア構成は、第1の実施形態と同様である。但し、領域検出ソフトウェア121の構成は第1の実施形態と異なる。一方、文字認識ソフトウェア122の構成、つまり文字認識機構の構成は第1の実施形態と同様である。これらの点を考慮して、以下の説明では、便宜的に図1及び図12を援用する。
[Third Embodiment]
Next, a third embodiment will be described.
The hardware configuration of the area detection apparatus according to the third embodiment is the same as that of the first embodiment. However, the configuration of the
図23は第3の実施形態に係る領域検出装置の機能構成を示すブロック図である。図23において図2と等価な構成要素には同一参照番号を付して、当該等価な構成要素についての詳細な説明は省略する。 FIG. 23 is a block diagram illustrating a functional configuration of an area detection device according to the third embodiment. In FIG. 23, components equivalent to those in FIG. 2 are denoted by the same reference numerals, and detailed description thereof is omitted.
図23に示す領域検出装置は、図2に示した領域検出装置(第1の実施形態)と同様に、輪郭線抽出手段210及び領域出力手段230を備えている。図23に示す領域検出装置は更に、明暗判定手段290、変化点検出手段300、輪郭線修正手段310及び選択手段222を備えている。
The area detection device shown in FIG. 23 includes a contour
明暗判定手段290は、輪郭線抽出手段210(より詳細には、輪郭線抽出手段210の輪郭線追跡手段212)によって抽出された輪郭画素の系列の集合S1に基づき、当該輪郭画素の系列が近傍の画素と比較して明るいか暗いかを判定する。
Based on the set S1 of the contour pixel series extracted by the contour line extraction unit 210 (more specifically, the contour
変化点検出手段300は、明暗判定手段290によって判定された明暗が対応する輪郭画素の系列で示される輪郭線上で変化する点(画素)の集合を当該輪郭画素の系列上で検出する。
The change
輪郭線修正手段310は、変化点検出手段300によって検出された点において輪郭線を繋ぎ直し、その繋ぎ直された輪郭線を構成する画素(輪郭画素)の系列の集合S2を取得する。 The contour correcting means 310 reconnects the contour lines at the points detected by the change point detecting means 300, and acquires a set S2 of series of pixels (contour pixels) constituting the reconnected contour lines.
選択手段222は、輪郭線修正手段310によって取得された集合S2から1つまたは複数の輪郭画素の系列を選択することにより、当該選択した輪郭画素の系列の集合S4(つまり、集合S3の部分集合S4)を抽出する。
The selecting
次に。図23に示す領域検出装置の動作について説明する。
ここでは、図23に示す領域検出装置によって図24に示す入力画像から枠で囲まれた領域が検出されるものとする。図24に示す入力画像では、図3に示した入力画像と異なり、枠(丸枠)の一部に、いわゆる白飛びが発生している。つまり、本来黒画素として検出されるべき画素の系列が徐々に白画素に変化している。
next. The operation of the region detection apparatus shown in FIG. 23 will be described.
Here, it is assumed that a region surrounded by a frame is detected from the input image shown in FIG. 24 by the region detection apparatus shown in FIG. In the input image shown in FIG. 24, unlike the input image shown in FIG. 3, so-called whiteout occurs in a part of the frame (round frame). That is, the series of pixels that should be detected as black pixels gradually changes to white pixels.
輪郭線抽出手段210のエッジ検出手段211は、図24に示す入力画像内の隣接する画素間からエッジを検出する。
図25は、図24に示す入力画像内で隣接する2つの画素の対の群のうち、エッジ検出手段211によって当該2つの画素間にエッジが検出されなかった画素同士を線分で結んだ様子を示す図である。
The
FIG. 25 shows a state in which pixels in the pair of two adjacent pixels in the input image shown in FIG. 24 are connected by a line segment where no edge is detected between the two pixels by the
輪郭線抽出手段210の輪郭線追跡手段212は、エッジ検出手段211によって検出されたエッジで区切られた画素の塊毎に、当該画素の塊の輪郭線を追跡する。輪郭線追跡手段212は、輪郭線追跡により検出された輪郭線を構成する輪郭画素の系列を、上記画素の塊に対応する輪郭線毎に抽出する。
The
図26は、図24に示した入力画像から輪郭線追跡手段212によって抽出された輪郭画素の系列全てをまとめて示す図である。図26には、8つの輪郭画素の系列2601乃至2608(より詳細には、8つの輪郭線を構成する輪郭画素の系列2601乃至2608)が示されている。系列2601乃至2608は、輪郭画素の系列の集合S1を構成する。
FIG. 26 is a diagram collectively showing all contour pixel series extracted by the contour
ここで、系列2603乃至2608は、それぞれ図8の系列806乃至811に対応する。これに対し、系列2601は、図8の2つの系列802及び803に対応し、系列2602は、図8の2つの系列804及び805に対応する。その理由は、上述したように、図8の系列802及び803並びに804及び805に対応する丸枠の部分で白飛びが発生しているためである。なお、図26には、図8の系列801に相当する輪郭画素の系列は省略されている。
Here,
図27は、図26に示した輪郭画素の系列2601乃至2608のうちの系列2601乃至2606を個別に示す図であり、図28は、当該輪郭画素の系列2601乃至2608のうちの系列2607及び2608を個別に示す図である。
FIG. 27 is a diagram individually showing the
明暗判定手段290は、上記集合S1に含まれている輪郭画素の系列における輪郭画素の各々が近傍の画素と比較して明るいか暗いかを判定する。具体的には、明暗判定手段290は、輪郭画素が近傍の画素(予め定められた範囲内の画素)と比較して明るいか暗いかを、当該輪郭画素の画素値と、当該輪郭画素の上下左右にD画素を含む正方形(つまり、当該輪郭画素を中心とする縦横が2D+1の領域)の内部の画素値の平均値とを比較することで判定する。図29に明暗判定手段290による明暗判定の対象となる画素と近傍の画素との位置関係の例を示す。図29において、判定の対象となる画素には記号×が付されている。
The light / dark determination means 290 determines whether each of the contour pixels in the contour pixel series included in the set S1 is brighter or darker than the neighboring pixels. Specifically, the
明暗判定手段290による上述の明暗判定は、M1個の輪郭画素の各々について行われる。M1個の輪郭画素の各々の明暗判定結果は、要素数M1の整数配列sに格納される。この整数配列sは記憶装置12に格納される。
The above-described light / dark determination by the light / dark determination means 290 is performed for each of the M1 contour pixels. The brightness / darkness determination results of each of the M1 contour pixels are stored in the integer array s having the number of elements M1. This integer array s is stored in the
以下、明暗判定手段290によって実行される明暗判定処理の手順について図30のフローチャートを参照して説明する。
まず明暗判定手段290は、輪郭画素の番号を表す整数変数iを0に初期化する(ステップ3001)。
Hereinafter, the procedure of the brightness determination process executed by the brightness determination means 290 will be described with reference to the flowchart of FIG.
First, the brightness determination means 290 initializes an integer variable i representing the number of the contour pixel to 0 (step 3001).
次に明暗判定手段290は、iがM1以上であるかを判定する(ステップ3002)。もし、i≧M1でないならば(ステップ3002のNo)、明暗判定手段290は、座標(p1(i).x,p1(i).y)の画素の画素値と、当該画素の上下左右にD画素を含む正方形の内部の画素値の平均値との差Δ(i)を計算する(ステップ3003)。 Next, the brightness determination means 290 determines whether i is M1 or more (step 3002). If i ≧ M1 is not satisfied (No in step 3002), the light / dark determination means 290 determines the pixel value of the pixel at the coordinates (p1 (i) .x, p1 (i) .y) and the top, bottom, left and right of the pixel. The difference Δ (i) from the average value of the pixel values inside the square including the D pixel is calculated (step 3003).
次に明暗判定手段290は、Δ(i)が正であるかを判定する(ステップ3004)。明暗判定手段290は、Δ(i)が正であるならば(ステップ3004のYes)、s(i)に「明」を示す1を代入し(ステップ3005)、そうでないならば(ステップ3004のNo)、s(i)に「暗」を示す0を代入する(ステップ3006)。s(i)は、図7に示した配列(配列変数)p1の座標(p1(i).x、p1(i).y)に対応付けて記憶装置12に格納される。
Next, the brightness determination means 290 determines whether Δ (i) is positive (step 3004). If Δ (i) is positive (Yes in step 3004), the brightness / darkness determining means 290
次に明暗判定手段290は、iにi+1を代入して(ステップ3007)、ステップ3002に戻る。以上の処理がM1回繰り返されて、i≧M1となると(ステップ3002のYes)、明暗判定手段290は明暗判定処理を終了する。
Next, the brightness determination means 290 substitutes i + 1 for i (step 3007) and returns to step 3002. When the above process is repeated M1 times and i ≧ M1 is satisfied (Yes in step 3002), the light /
図31は、明暗判定手段290によって取得される、配列p1内の各画素(つまり抽出された輪郭画素の系列の各画素)が近傍の画素と比較して明るいか暗いかの判定結果を示す配列(配列変数)s1を含む、記憶装置12に格納される輪郭線の群に関する情報のデータ構造の例を示す図である。
FIG. 31 is an array showing a determination result of whether each pixel in the array p1 (that is, each pixel in the series of extracted contour pixels) obtained by the light / dark determination means 290 is brighter or darker than neighboring pixels. It is a figure which shows the example of the data structure of the information regarding the group of the contour line stored in the memory |
変化点検出手段300は、明暗判定手段290によって判定された明暗が対応する輪郭画素の系列で示される輪郭線上で変化する点(以下、変化点と称する)を、当該輪郭画素の系列上で検出する。変化点検出手段300は、検出された変化点を、対応する輪郭線の輪郭画素の系列上での当該変化点の順序数として、記憶装置12に格納する。
The change
以下、変化点検出手段300によって実行される変化点検出処理の手順について図32のフローチャートを参照して説明する。
まず変化点検出手段300は、輪郭線の番号を表す整数変数jを0に初期化する(ステップ3201)。以下の説明では、jで示される輪郭線を輪郭線jと称することもある。
Hereinafter, the procedure of the change point detection process executed by the change point detection means 300 will be described with reference to the flowchart of FIG.
First, the change point detection means 300 initializes an integer variable j representing the contour number to 0 (step 3201). In the following description, the contour line indicated by j may be referred to as a contour line j.
次に変化点検出手段300は、jがN1以上であるかを判定する(ステップ3202)。もし、j≧N1でないならば(ステップ3202のNo)、輪郭線j上の変化点の個数を示す整数の配列変数e(j)に0を代入する(ステップ3203)。次に変化点検出手段300は、s(m1(j)−1)とs(0)とが異なるかを判定する(ステップ3204)。つまり変化点検出手段300は、輪郭線jの終点(最後の画素)及び始点(最初の画素)の明暗が異なるかを判定する。
Next, the change point detection means 300 determines whether j is N1 or more (step 3202). If j ≧ N1 is not satisfied (No in step 3202), 0 is substituted into an integer array variable e (j) indicating the number of change points on the contour line j (step 3203). Next, the change point detection means 300 determines whether s (m1 (j) -1) and s (0) are different (step 3204). That is, the change
もし、s(m1(j)−1)≠s(0)であるならば(ステップ3204のYes)、変化点検出手段300は、輪郭線jの始点は終点に対して変化点であると判定する。この場合、変化点検出手段300は、変化点の輪郭線j上における輪郭画素の番号を表す整数の配列変数c(e(j)+r1(j))に0を代入し(ステップ3205)、e(j)を1増やす(ステップ3206)。そして変化点検出手段300は、輪郭線j上の輪郭画素の番号を表す整数変数iを1に初期化する(ステップ3207)。以下の説明では、iで示される輪郭画素を輪郭画素iと称することもある。一方、s(m1(j)−1)≠s(0)でないならば(ステップ3204のNo)、変化点検出手段300はステップ3207にジャンプしてiを1に初期化する。
If s (m1 (j) -1) ≠ s (0) (Yes in step 3204), the change
次に変化点検出手段300は、前述のステップ3002と同様にiがM1以上であるかを判定する(ステップ3208)。もし、i≧M1でないならば(ステップ3208のNo)、変化点検出手段300は、s(i−1)とs(i)とが異なるかを判定する(ステップ3209)。つまり変化点検出手段300は、輪郭線j上のi−1番目の画素及びi番目の画素の明暗が異なるかを判定する。
Next, the change point detection means 300 determines whether i is equal to or greater than M1 as in step 3002 (step 3208). If i ≧ M1 is not satisfied (No in Step 3208), the change
もし、s(i−1)≠s(i)であるならば(ステップ3209のYes)、変化点検出手段300は、i番目の画素は変化点であると判定し、c(e(j)+r1(j))にiを代入し(ステップ3210)、e(j)を1増やす(ステップ3211)。次に変化点検出手段300はiにi+1を代入し(ステップ3212)、ステップ3208に戻る。これに対し、s(i−1)≠s(i)でないならば(ステップ3209のNo)、つまりs(i−1)=s(i)であるならば、変化点検出手段300はi番目の画素は変化点でないと判定する。この場合、変化点検出手段300は、ステップ3212にジャンプしてiにi+1を代入し、ステップ3208に戻る。
If s (i-1) .noteq.s (i) (Yes in step 3209), the change point detection means 300 determines that the i-th pixel is a change point, and c (e (j) I is substituted into + r1 (j)) (step 3210), and e (j) is incremented by 1 (step 3211). Next, the change point detection means 300 substitutes i + 1 for i (step 3212) and returns to step 3208. On the other hand, if s (i−1) ≠ s (i) is not satisfied (No in step 3209), that is, if s (i−1) = s (i), the change point detecting means 300 is the i th This pixel is determined not to be a change point. In this case, the change
ステップ3208において変化点検出手段300は、i≧m1(j)であるかを判定する。もし、i≧m1(j)であるならば(ステップ3208のYes)、変化点検出手段300はjにj+1を代入し(ステップ3213)、ステップ3202に戻る。ステップ3202において変化点検出手段300は、j≧N1であるかを判定する。もし、j≧N1であるならば(ステップ3202のYes)、変化点検出手段300は変化点検出処理を終了する。
In
図33は、変化点検出手段300によって取得される、各輪郭線上の変化点の個数を表す配列e及び当該変化点の輪郭画素の番号を表す配列cを含む、記憶装置12に格納される輪郭線の群に関する情報のデータ構造の例を示す図である。
FIG. 33 shows the contour stored in the
輪郭線修正手段310は、変化点検出手段300によって検出された変化点において輪郭線を繋ぎ直す。そして輪郭線修正手段310は、繋ぎ直された輪郭線を構成する画素(輪郭画素)の系列の集合S2を取得する。輪郭線修正手段310は、上述の輪郭線の繋ぎ直し(つまり修正)のために、輪郭線切断手段311及び輪郭線再接続手段312を備えている。
The contour correcting means 310 reconnects the contour lines at the change points detected by the change
輪郭線切断手段311は、変化点検出手段300によって検出された変化点において対応する輪郭画素の系列(つまり輪郭線)を切断する。輪郭線切断手段311は、この輪郭線の切断により、切断された輪郭線の断片を構成する輪郭画素の系列を取得する。取得された、輪郭線の断片を構成する輪郭画素の系列は、記憶装置12に格納される。
The contour cutting means 311 cuts the corresponding contour pixel series (that is, the contour line) at the change point detected by the change point detection means 300. The contour cutting means 311 obtains a series of contour pixels that constitute a fragment of the cut contour line by cutting the contour line. The acquired series of contour pixels constituting the fragment of the contour line is stored in the
輪郭線再接続手段312は、輪郭線切断手段311によって取得された輪郭線の1つまたは複数の断片(つまり1つ以上の断片)を構成する輪郭画素の系列(1つ以上の系列)における端点を繋ぎ合わせる。この接続(つまり断片の接続)により、輪郭線再接続手段312は、接続(修正)された輪郭線を構成する画素の系列を取得する。
The contour reconnecting means 312 is an end point in a series (one or more series) of contour pixels constituting one or a plurality of fragments (that is, one or more fragments) of the contour line acquired by the contour cutting means 311. Connect together. By this connection (that is, fragment connection), the
第3の実施形態では、輪郭線の断片を構成する輪郭画素の系列に含まれる画素(輪郭画素)の座標が要素数M1の配列p8に格納される。また、輪郭線の断片を構成する画素の系列に含まれる当該画素の数(輪郭画素数)が整数の配列m8に、当該系列(つまり断片)の始点のp8中での位置(開始位置)が整数の配列r8に格納される。図34は、輪郭線の断片を構成する輪郭画素の系列を含む、記憶装置12に格納される輪郭線の群に関する情報のデータ構造の例を示す図である。
In the third embodiment, the coordinates of pixels (contour pixels) included in a series of contour pixels that form a fragment of the contour line are stored in the array p8 having the number of elements M1. In addition, in the array m8 in which the number of pixels (contour pixel number) included in the series of pixels constituting the fragment of the contour line is an integer, the position (start position) in p8 of the start point of the series (that is, the fragment) is Stored in an integer array r8. FIG. 34 is a diagram illustrating an example of a data structure of information relating to a group of contour lines stored in the
次に、輪郭線切断手段311によって実行される輪郭線切断処理の手順について、図35乃至図37のフローチャートを参照して説明する。
まず輪郭線切断手段311は、切断中の輪郭線の番号を表す変数jを0に初期化する(ステップ3501)。このステップ3501において輪郭線切断手段311は、kを0に、N8を0に、それぞれ初期化する。kは輪郭線の切断された断片の始点の、当該輪郭線の輪郭画素の系列における位置(番号)を表す整数変数、N8は配列p8の要素数を表す整数変数である。
Next, the procedure of the contour cutting process executed by the contour cutting means 311 will be described with reference to the flowcharts of FIGS.
First, the outline cutting means 311 initializes a variable j representing the number of the outline being cut to 0 (step 3501). In
次に輪郭線切断手段311は、jがN1以上であるかを判定する(ステップ3502)。もし、j≧N1でないならば(ステップ3502のNo)、輪郭線切断手段311はe(j)が0であるかを判定する(ステップ3503)。つまり輪郭線切断手段311は、輪郭線j上の変化点の個数が0であるかを判定する。 Next, the outline cutting means 311 determines whether j is N1 or more (step 3502). If j ≧ N1 is not satisfied (No in step 3502), the contour cutting means 311 determines whether e (j) is 0 (step 3503). That is, the contour cutting means 311 determines whether the number of change points on the contour j is zero.
もし、e(j)=0であるならば(ステップ3503のYes)、輪郭線切断手段311はm8(N8)にm1(j)を、r8(N8)にkを、iに0を、それぞれ代入する(ステップ3504,3505,3506)。
If e (j) = 0 (Yes in step 3503), the contour cutting means 311 sets m1 (j) to m8 (N8), k to r8 (N8), 0 to i, respectively. Substitution is performed (
次に輪郭線切断手段311は、iがm1(j)以上であるかを判定する(ステップ3507)。もし、i≧m1(j)でないならば、輪郭線切断手段311はp8(k).xにp1(k).xを、p8(k).yにp1(k).yを、それぞれ代入する(ステップ3508,3509)。つまり輪郭線切断手段311は、輪郭線j上のk番目の画素の座標を配列p1から配列p8にコピーする。次に輪郭線切断手段311は、i及びkを、それぞれ1増やす(ステップ3510)。
Next, the outline cutting means 311 determines whether i is greater than or equal to m1 (j) (step 3507). If i ≧ m1 (j) is not satisfied, the contour cutting means 311 determines that p8 (k). x is p1 (k). x, p8 (k). p1 (k). y is substituted respectively (
すると輪郭線切断手段311はステップ3507に戻り、iがm1(j)以上であるかを判定する。もし、i≧m1(j)であるならば(ステップ3507のYes)、輪郭線切断手段311はN8を1増やし(ステップ3511)、しかる後にjを1増やす(ステップ3512)。そして輪郭線切断手段311はステップ3502に戻る。 Then, the outline cutting means 311 returns to step 3507 and determines whether i is m1 (j) or more. If i ≧ m1 (j) (Yes in step 3507), the contour cutting means 311 increases N8 by 1 (step 3511), and then increases j by 1 (step 3512). Then, the outline cutting means 311 returns to step 3502.
一方、ステップ3503で、e(j)=0でないと判定されたならば、輪郭線切断手段311はステップ3601に進む。ステップ3601において輪郭線切断手段311は、c(r1(j))が0であるかを判定する。もし、c(r1(j))=0であるならば(ステップ3601のYes)、輪郭線切断手段311は、輪郭線上で最後に切り出す断片の直前の変化点の輪郭線上での番号を表す整数変数eaにe(j)−1を代入する(ステップ3602)。そして輪郭線切断手段311は、後述するステップ3706に進む。
On the other hand, if it is determined in
これに対し、c(r1(j))=0でないならば(ステップ3601のNo)、輪郭線切断手段311はsi2にc(e(j)−1)を代入する(ステップ3603)。また輪郭線切断手段311は、ei3にc(0)−1を、eaにe(j)−2をそれぞれ代入する(ステップ3604,3605)。
On the other hand, if c (r1 (j)) = 0 is not satisfied (No in step 3601), the contour cutting means 311 substitutes c (e (j) -1) for si2 (step 3603). The contour cutting means 311 substitutes c (0) -1 for ei3 and e (j) -2 for ea (
輪郭線切断手段311は、ステップ3605を実行すると、m8(N8)に0を代入し、iにsi2を、それぞれ代入する(ステップ3606,3607)。次に輪郭線切断手段311は、ステップ3507と同様に、iがm1(j)以上であるかを判定する(ステップ3608)。
When executing
もし、i≧m1(j)でないならば(ステップ3608のNo)、輪郭線切断手段311は、p8(k).xにp1(r1(j)+i).xを、p8(k).yにp1(r1(j)+i).yを、それぞれ代入する(ステップ3609,3610)。また輪郭線切断手段311は、i、k及びm8(N8)を、それぞれ1増やす(ステップ3611)。
If i ≧ m1 (j) is not satisfied (No in step 3608), the contour cutting means 311 determines that p8 (k). x is p1 (r1 (j) + i). x, p8 (k). y is p1 (r1 (j) + i). y is substituted respectively (
すると輪郭線切断手段311はステップ3608に戻り、iがm1(j)以上であるかを判定する。もし、i≧m1(j)であるならば(ステップ3608のYes)、輪郭線切断手段311はステップ3701に進む。ステップ3701において輪郭線切断手段311は、iに0を代入する。
Then, the contour cutting means 311 returns to step 3608 and determines whether i is greater than or equal to m1 (j). If i ≧ m1 (j) (Yes in step 3608), the contour cutting means 311 proceeds to step 3701. In
次に輪郭線切断手段311は、iがei3より大きいかを判定する(ステップ3702)。もし、i>ei3でないならば(ステップ3702のNo)、輪郭線切断手段311は、p8(k).xにp1(r1(j)+i).xを、p8(k).yにp1(r1(j)+i).yを、それぞれ代入する(ステップ3703,3704)。次に輪郭線切断手段311は、i、k及びm8(N8)をそれぞれ1増やし(ステップ3705)、ステップ2702に戻る。これに対し、i>ei3であるならば(ステップ3702のYes)、輪郭線切断手段311はステップ3706に進む。
Next, the outline cutting means 311 determines whether i is larger than ei3 (step 3702). If i> ei3 is not satisfied (No in step 3702), the contour cutting means 311 determines that p8 (k). x is p1 (r1 (j) + i). x, p8 (k). y is p1 (r1 (j) + i). y is substituted respectively (
ステップ3706において輪郭線切断手段311は、新しく切り出す輪郭線の断片の直前の変化点の輪郭線上での番号を表す整数変数aに0を代入する。次に輪郭線切断手段311は、aがeaより大きいかを判定する(ステップ3707)。もし、a>eaであるならば(ステップ3707のYes)、輪郭線切断手段311はステップ3512にジャンプする。すると輪郭線切断手段311は、jを1増やして(ステップ3512)、ステップ3502に戻る。
In
一方、a>eaでないならば(ステップ3707のNo)、輪郭線切断手段311は、iにc(a)を、ei4にc(a)+e(a)−1を、それぞれ代入する(ステップ3708)。次に輪郭線切断手段311は、iがei4よりも大きいかを判定する(ステップ3709)。もし、i>ei4であるならば(ステップ3709のYes)、輪郭線切断手段311は、a及びN8を、それぞれ1増やし(ステップ3710)、ステップ3707に戻る。
On the other hand, if a> ea is not satisfied (No in step 3707), the
これに対し、i>ei4でないならば(ステップ3709のNo)、輪郭線切断手段311は、p8(k).xにp1(r1(j)+i).xを、p8(k).yにp1(r1(j)+i).yを、それぞれ代入する(ステップ3711,3712)。また輪郭線切断手段311は、i、k及びm8(N8)を、それぞれ1増やす(ステップ3713)。そして輪郭線切断手段311は、ステップ3709に戻る。
On the other hand, if i> ei4 is not satisfied (No in step 3709), the contour cutting means 311 determines that p8 (k). x is p1 (r1 (j) + i). x, p8 (k). y is p1 (r1 (j) + i). y is substituted respectively (
前述したように輪郭線切断手段311は、ステップ3512においてjを1増やすと、ステップ3502に戻る。もし、jを1増やした結果、i≧N1となったならば(ステップ3502のYes)、輪郭線切断手段311は輪郭線切断処理を終了する。
As described above, the contour cutting means 311 returns to step 3502 when j is increased by 1 in
以上に述べた輪郭線切断手段311の処理により,前記輪郭線抽出手段210で抽出された輪郭線の各々が前記変化点検出手段300で検出した変化点の各々を境に切断した断片が生成され,配列変数p8,m8及びr8に格納される.
図38は、図26に示した輪郭線(つまり、図24に示した入力画像から抽出された輪郭線)が輪郭線切断手段311によって切断された断片の輪郭画素の系列を含む全ての輪郭画素の系列をまとめて示す図である。なお、図38において、図26と同一の輪郭画素の系列には、同一参照番号を付してある。図38には、図26に示した輪郭画素の系列2601から構成される輪郭線が切断された2つの断片の輪郭画素の系列2601a及び2601bと、輪郭画素の系列2602から構成される輪郭線が切断された2つの断片の輪郭画素の系列2602a及び2602bとが示されている。また、図38には、図26に示した輪郭画素の系列2603乃至2608も示されている。
By the processing of the contour cutting means 311 described above, a fragment is generated by cutting each of the contour lines extracted by the contour line extracting means 210 at each change point detected by the change
FIG. 38 shows all the contour pixels including the contour pixel series of the fragments in which the contour line shown in FIG. 26 (that is, the contour line extracted from the input image shown in FIG. 24) is cut by the contour cutting means 311. FIG. In FIG. 38, the same reference numbers are assigned to the same contour pixel series as in FIG. In FIG. 38, there are two
図39は、図38に示した輪郭画素の系列のうちの系列2601a,2601b,2602a,2602b,2603及び2604を個別に示す図であり、図40は、図38に示した輪郭画素の系列のうちの系列2605乃至2608を個別に示す図である。
FIG. 39 is a diagram individually showing
輪郭線再接続手段312は、前述したように、輪郭線切断手段311によって取得された輪郭線の1つ以上の断片を構成する輪郭画素の系列の端点を繋ぎ合わせる(つまり接続する)ことにより、修正された輪郭線を構成する画素の系列を取得する。取得された輪郭線を構成する画素の系列の集合S2は記憶装置12に格納される。
As described above, the
輪郭線再接続手段312が輪郭線の断片同士を接続するためには、記憶装置12に格納された順に各断片の後ろに接続すべき断片を決定する必要がある。以下、輪郭線再接続手段312によって実行される接続断片決定処理の手順について図41及び図42のフローチャートを参照して説明する。
In order for the contour reconnecting means 312 to connect the fragments of the contour line, it is necessary to determine the fragments to be connected after each fragment in the order stored in the
まず輪郭線再接続手段312は、j=0,…,N8−1のそれぞれについて、F(j)に0を代入する(ステップ4101)。ここで、Fは要素数N8の整数の配列であり、F(j)は配列Fのj番目の要素を示す。次に輪郭線再接続手段312は、整数変数k及びjを、それぞれ0を代入する(ステップ4102,4103)。
First, the contour reconnecting means 312
次に輪郭線再接続手段312は、jがN8以上であるかを判定する(ステップ4104)。この例のようにj≧N8でないならば(ステップ4104のNo)、輪郭線再接続手段312はF(j)が0であるかを判定する(ステップ4105)。この例のようにF(j)=0であるならば(ステップ4105のYes)、輪郭線再接続手段312は、r8(j)の示す画素を始点とするj番目の断片の隣接画素の系列をp8から取得し、当該j番目の断片の隣接画素の系列を集合S2のk番目の系列として当該集合S2に格納する(ステップ4106)。ここで、j番目の断片の隣接画素の系列を構成する隣接画素の個数は、m8(j)で示され、集合S2に格納される隣接画素の系列は、p8(r8(j))の位置から始まるm8(j)個の画素から構成される。
Next, the
次に輪郭線再接続手段312は、j番目の断片の隣接画素の系列が集合S2に既に格納済みであることを示すために、F(j)に1を代入する(ステップ4107)。次に輪郭線再接続手段312は、整数変数flagに0を代入する(ステップ4108)。一方、F(j)=0でないならば(ステップ4105のNo)、つまりF(j)=1であるならば、輪郭線再接続手段312はj番目の断片の隣接画素の系列が集合S2に既に格納済みであると判断する。この場合、輪郭線再接続手段312は、整数変数flagに0を代入する(ステップ4108)。
Next, the contour reconnecting means 312
輪郭線再接続手段312は、整数変数flagに0を代入すると(ステップ4108)、j2=0,…,N8−1のそれぞれについて、score(j2)に0を代入する(ステップ4109)。scoreは要素数N8の実数の配列であり、score_(j2)は、配列scoreのj2番目の要素を示す。
The contour reconnecting means 312
次に輪郭線再接続手段312は、実数変数score_maxに−1を、整数変数j2_optに0を、それぞれ代入する(ステップ4110)。そして輪郭線再接続手段312は整数変数j2に0を代入する(ステップ4111)。
Next, the
次に輪郭線再接続手段312は、j2がN8以上であるかを判定する(ステップ4201)。この例のようにj2≧N8でないならば(ステップ4201のNo)、輪郭線再接続手段312は、F(j2)=0で、且つs1(r8(j2))=s1(r8(j))で、且つj2番目の断片上の最初の輪郭画素とj番目の断片の最後の輪郭画素とのユークリッド距離ud(j2,j)が予め定められた正の定数εより小さいかを判定する(ステップ4202)。ここで、s1(r8(j2))=s1(r8(j))であること、つまりj2番目の断片の始点の明暗がj番目の断片の始点の明暗と一致することは、j2番目の断片上の輪郭画素を近傍の輪郭画素と比較した明暗がj番目の断片上のそれと一致することを示す。また、ud(j2,j)<εは、j2番目の断片上の端点(例えば始点)とj番目の断片の端点(例えば終点)の位置が予め定められた範囲(つまり、近傍として定義される範囲)にあることを示す。 Next, the contour reconnecting means 312 determines whether j2 is N8 or more (step 4201). If j2 ≧ N8 is not satisfied as in this example (No in step 4201), the contour reconnecting means 312 is F (j2) = 0 and s1 (r8 (j2)) = s1 (r8 (j)) And whether the Euclidean distance ud (j2, j) between the first contour pixel on the j2th fragment and the last contour pixel of the jth fragment is smaller than a predetermined positive constant ε (step) 4202). Here, the fact that s1 (r8 (j2)) = s1 (r8 (j)), that is, the lightness and darkness of the start point of the j2th fragment matches the lightness and darkness of the start point of the jth fragment is It shows that the contrast of the upper contour pixel with the neighboring contour pixels matches that on the jth fragment. Further, ud (j2, j) <ε is defined as a range in which the positions of the end point (for example, the start point) on the j2th fragment and the end point (for example, the end point) of the jth fragment are predetermined (that is, the vicinity). Range).
もし、ステップ4202の判定がYesであるならば、輪郭線再接続手段312は、j番目の断片の最後の輪郭画素(つまり終点)から最後からδ番目の輪郭画素へのベクトルVAを算出する(ステップ4203)。δは予め定められた自然数である。また輪郭線再接続手段312は、j2番目の断片の最初の輪郭画素(つまり始点)から最初からδ番目の輪郭画素へのベクトルVBを算出する(ステップ4204)。
If the determination in
次に輪郭線再接続手段312は、ベクトルVAとベクトルVBとがなす角度θを余弦定理により算出する(ステップ4205)。ここでは、角度θの単位は「度」であるとする。次に輪郭線再接続手段312は、角度θがscore_maxよりも大きいかを判定する(ステップ4206)。 Next, the contour reconnecting means 312 calculates the angle θ formed by the vector VA and the vector VB by the cosine theorem (step 4205). Here, it is assumed that the unit of the angle θ is “degree”. Next, the contour reconnecting means 312 determines whether the angle θ is larger than score_max (step 4206).
ステップ4209の判定は、ベクトルVAとベクトルVBとがなす角度θが、j2がそれぞれ0,…,N8−1番目の断片のうちj番目の断片に対して最も大きい(つまり180度に最も近い)断片を検出するために、ステップ4202の示す条件を満たす断片について繰り返し行われる。j番目の断片に対してベクトルVAとベクトルVBとがなす角度θが最も大きい断片がj2_opt番目の断片である場合、j2_opt番目の断片の端点(ここでは始点)が、0,…,N8−1番目の断片の端点の中で、j番目の断片の端点(ここでは終点)に対して最も正対しているといえる。
In
もし、θ>score_maxであるならば(ステップ4206のYes)、輪郭線再接続手段312は、score_maxにθを、整数変数j2_optにj2を代入する(ステップ4207)。次に輪郭線再接続手段312はflagに1を代入し(ステップ4208)、しかる後にj2を1増やす(ステップ4209)。flag=1は、j番目の断片に接続されるべき断片が存在することを示す。整数変数j2_opt=j2は、j番目の断片に接続されるべき断片として、断片0,…,j2のうちの断片j2が最適であることを示す。
If θ> score_max (Yes in step 4206), the
一方、θ>score_maxでないならば(ステップ4206のNo)、輪郭線再接続手段312はステップ4209にジャンプしてj2を1増やす。また、ステップ4202の判定がNoの場合にも、輪郭線再接続手段312はステップ4209にジャンプしてj2を1増やす。
On the other hand, if θ> score_max is not satisfied (No in step 4206), the contour reconnecting means 312 jumps to step 4209 to increase j2 by one. Even when the determination at
輪郭線再接続手段312は、j2を1増やすと(ステップ4209)、ステップ4201に戻り、j2≧N8であるかを判定する。もし、j2≧N8であるならば、輪郭線再接続手段312は、j番目の断片に接続されるべき断片をj2=0,…,N8−1についてチェックし終えたと判断する。 The contour line reconnecting means 312 increases j2 by 1 (step 4209), returns to step 4201, and determines whether j2 ≧ N8. If j2 ≧ N8, the contour reconnecting means 312 determines that the fragments to be connected to the jth fragment have been checked for j2 = 0,..., N8-1.
そこで輪郭線再接続手段312は、flagが1であるかを判定する(ステップ4210)。もし、flag=1であるならば(ステップ4210のYes)、輪郭線再接続手段312は、集合S2のk番目の輪郭画素の系列(の示す輪郭線の断片)の末尾にj2_opt番目の断片の輪郭画素の系列を追加する(ステップ4211)。
Therefore, the contour
このように、k番目の輪郭線の断片へのj2_opt番目の断片の追加は、当該j2_opt番目の断片に含まれる輪郭画素の系列を当該輪郭線の輪郭画素の系列に追加することで行われる。これにより、k番目の輪郭線の断片にj2_opt番目の断片が繋ぎ合わされたことになる。ここで、j2_opt番目の断片の輪郭画素の系列は、p8に格納されている断片の輪郭画素の系列のうち、輪郭画素r8(j2_opt)の示す画素を始点とする断片の輪郭画素の系列であり、m8(j)で示される個数の輪郭画素から構成される。 In this way, the addition of the j2_opt-th fragment to the k-th contour line fragment is performed by adding the contour pixel series included in the j2_opt-th fragment to the contour pixel series of the contour line. As a result, the j2_opt-th fragment is joined to the k-th contour fragment. Here, the sequence of contour pixels of the j2_opt-th fragment is a sequence of contour pixels of a fragment starting from the pixel indicated by the contour pixel r8 (j2_opt) among the sequence of contour pixels of the fragment stored in p8. , M8 (j), the number of contour pixels.
輪郭線再接続手段312は、k番目の輪郭線の断片にj2_opt番目の断片を追加すると(ステップ4211)、F(j2_opt)に1を代入する(ステップ4212)。次に輪郭線再接続手段312は、kを1増やし(ステップ4112)、jを1増やす(ステップ4113)。一方、flag=1でないならば(ステップ4210のNo)、輪郭線再接続手段312はステップ4112にジャンプしてkを1増やし、jを1増やす(ステップ4113)。輪郭線再接続手段312は、jを1増やすと(ステップ4113)、ステップ4104に戻り、jがN8以上であるかを判定する。もし、j≧N8であるならば(ステップ4104のYes)、輪郭線再接続手段312は輪郭線再接続処理を終了する。
The contour reconnecting means 312 adds the j2_opt-th fragment to the k-th contour fragment (step 4211), and substitutes 1 for F (j2_opt) (step 4212). Next, the contour reconnecting means 312 increases k by 1 (step 4112) and increases j by 1 (step 4113). On the other hand, if flag = 1 is not satisfied (No in step 4210), the contour reconnecting means 312 jumps to step 4112 to increase k by 1 and increase j by 1 (step 4113). The contour reconnecting means 312 increases j by 1 (step 4113), returns to step 4104, and determines whether j is N8 or more. If j ≧ N8 (Yes in step 4104), the contour
図43は、図38に示した輪郭画素の系列の群に含まれている切断された断片の輪郭画素の系列の再接続後の全ての輪郭画素の系列をまとめて示す図である。なお、図43において、図38と同一の輪郭画素の系列には、同一参照番号を付してある。図43には、図38に示した断片の輪郭画素の系列2601aの始点及び終点が接続された輪郭線の輪郭画素の系列4301及び図38に示した断片の輪郭画素の系列2601bの始点及び終点が接続された輪郭線の輪郭画素の系列4302が示されている。
FIG. 43 is a diagram collectively showing all contour pixel sequences after reconnection of the contour pixel sequence of the cut fragment included in the group of contour pixel sequences shown in FIG. In FIG. 43, the same reference numbers are assigned to the same contour pixel series as in FIG. FIG. 43 shows a contour
系列4301及び4302は、それぞれ断片の輪郭画素の系列2601a及び2601bを、上記ステップ4106で集合S2に格納することにより生成される。系列2601a及び2601bの末尾に別の断片の輪郭画素の系列が追加されない場合、つまりステップ4211が実行されない場合、系列2601a及び2601bが集合S2に格納されるだけで、系列2601aの両端、及び系列2601bの両端が、それぞれ繋がれたことになる。
The
図43にはまた、図38に示した断片の輪郭画素の系列2602aの始点及び終点が接続された輪郭線の輪郭画素の系列4303及び図38に示した断片の輪郭画素の系列2602bの始点及び終点が接続された輪郭線の輪郭画素の系列4304が示されている。系列4303及び4304は、それぞれ断片の輪郭画素の系列2602a及び2602bを、上記ステップ4106で集合S2に格納することにより生成される。図43には更に、図38に示した輪郭画素の系列2603乃至2608も示されている。
43 also includes a contour
図44は、図43に示した輪郭画素の系列のうちの系列4301乃至4304、2603及び2604を個別に示す図であり、図45は、図43に示した輪郭画素の系列のうちの系列2605乃至2608を個別に示す図である。
44 is a diagram individually showing
なお、輪郭線の断片を構成する輪郭画素の系列におけるそれぞれ1つまたは複数の端点を繋ぎ合わせる手法は、近傍の画素と比較した明暗が一致しており、端点が最も正対している断片同士を繋ぎ合せる手法ならば、第3の実施形態で適用した方法に限らずいかなる方法で行ってもよい。 Note that the method of connecting one or more end points in a series of contour pixels that constitutes a fragment of the contour line matches the fragments whose end points are most directly facing each other, with the lightness and darkness compared with the neighboring pixels matching. As long as it is a technique to connect, it is not limited to the method applied in the third embodiment, and any method may be used.
また、輪郭線再接続手段312が、M2にM1を、N2にN8を、それぞれ代入し、j=1,…,N8について、r2(j)にr8(j)を、m1(j)にr8(j)を、それぞれ代入してもよい。つまり、輪郭線再接続手段312が、輪郭線切断手段311によって得られた断片の両端を単純に繋いだものを新しい輪郭線としてもよい。
The contour reconnecting means 312 substitutes M1 for M2, N8 for N2, and for j = 1,..., N8, r8 (j) for r2 (j) and r8 for m1 (j). (J) may be substituted respectively. That is, the
さて、輪郭線再接続手段312による輪郭線再接続処理が終了すると、選択手段222は、輪郭線修正手段310によって取得された集合S2から、第1の実施形態における選択手段220と同様に1つまたは複数の輪郭画素の系列を選択することにより、当該選択した輪郭画素の系列の集合S4を抽出する。
When the contour line reconnection process by the contour
第3の実施形態によれば、輪郭画素の系列で示される輪郭線上で変化する点(変化点)を検出して、当該変化点において輪郭線を繋ぎ直すことにより、光の反射などに起因する白飛びに頑健な領域検出を実現することができる。 According to the third embodiment, a point (change point) that changes on a contour line indicated by a series of contour pixels is detected, and the contour line is reconnected at the change point, resulting in light reflection or the like. It is possible to realize area detection that is robust against whiteout.
[第4実施形態]
次に、第4の実施形態について説明する。
第4の実施形態に係る領域検出装置のハードウェア構成は、第1の実施形態と同様である。但し、領域検出ソフトウェア121の構成は第1の実施形態と異なる。
[Fourth Embodiment]
Next, a fourth embodiment will be described.
The hardware configuration of the region detection apparatus according to the fourth embodiment is the same as that of the first embodiment. However, the configuration of the
図46は第4の実施形態に係る領域検出装置の機能構成を示すブロック図である。図46において、図2、図15または図23と等価な構成要素には同一参照番号を付して、当該等価な構成要素についての詳細な説明は省略する。 FIG. 46 is a block diagram showing a functional configuration of an area detection apparatus according to the fourth embodiment. 46, components equivalent to those in FIG. 2, FIG. 15, or FIG. 23 are given the same reference numerals, and detailed descriptions thereof are omitted.
図46に示す領域検出装置は、図2、図15及び図23に示した領域検出装置と同様に、輪郭線抽出手段210及び領域出力手段230を備えている。図46に示す領域検出装置はまた、図23に示した領域検出装置と同様に、明暗判定手段290、変化点検出手段300及び変化点検出手段300を備えている。図46に示す領域検出装置は更に、図15に示した領域検出装置内の凸包抽出手段280に相当する凸包抽出手段281を備えると共に、図15に示した領域検出装置と同様に選択手段221を備えている。
The area detection device shown in FIG. 46 includes a contour
凸包抽出手段281は、輪郭線修正手段310(輪郭線再接続手段312)によって取得された集合S2に含まれる輪郭画素の系列の各々の凸包を抽出し、当該凸包を構成する画素の系列の集合S3を取得する。凸包抽出手段281は、凸包抽出の対象となる輪郭画素の系列の集合が集合S1ではなくて集合S2である点を除き、第2の実施形態で適用される凸包抽出手段280と同様である。
The convex
図46に示す領域検出装置の特徴は、第3の実施形態で適用された図23に示す領域検出装置の構成において、輪郭線修正手段310及び領域出力手段230の間に、第2の実施形態で適用された凸包抽出手段280及び選択手段221に対応する、凸包抽出手段281及び選択手段221を追加した点にある。
The feature of the region detection device shown in FIG. 46 is that, in the configuration of the region detection device shown in FIG. 23 applied in the third embodiment, between the contour line correction means 310 and the region output means 230, the second embodiment. The convex
第2の実施形態及び第3の実施形態から明らかなように、第4の実施形態によれば、白飛びに頑健な領域検出を実現すると共に、枠と枠内の文字等が接触している場合における枠に囲まれた領域の検出性能を向上することができる。 As is apparent from the second and third embodiments, according to the fourth embodiment, a region that is robust against whiteout is realized, and the frame and the characters in the frame are in contact with each other. The detection performance of the region surrounded by the frame in the case can be improved.
以上説明した少なくとも1つの実施形態によれば、枠と枠内の文字等が接触している場合における枠の内側と外側の区別をより確実にし、枠に囲まれた領域の検出性能を向上できる領域検出装置、領域検出方法及びプログラムを提供することができる。 According to at least one embodiment described above, it is possible to more reliably distinguish between the inside and outside of the frame when the frame and the characters in the frame are in contact, and to improve the detection performance of the region surrounded by the frame. An area detection apparatus, an area detection method, and a program can be provided.
本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。 Although several embodiments of the present invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.
10…コンピュータ(PC)、11…CPU、12…記憶装置、21…カメラ、210…輪郭線抽出手段、211…エッジ検出手段、212…輪郭線追跡手段、220,221…選択手段、230…領域出力手段、240…2値化手段、250…画像抽出手段、260…認識手段、270…認識結果出力手段、280,281…凸包抽出手段、290…明暗判定手段、300…変化点検出手段、310…輪郭線修正手段、311…輪郭線切断手段、312…輪郭線再接続手段。
DESCRIPTION OF
Claims (7)
前記抽出された第1の輪郭画素の系列毎に、当該第1の輪郭画素の系列の凸包を構成する第2の輪郭画素の系列を抽出する凸包抽出手段と、
前記抽出された第2の輪郭画素の系列を、前記入力画像から検出された枠に囲まれた領域の情報として取得する領域取得手段と
を具備する領域検出装置。 Contour line extraction means for extracting a series of first contour pixels from the input image for each contour line related to the frame detected from the input image ;
A convex hull extracting means for extracting a second contour pixel series constituting a convex hull of the first contour pixel series for each of the extracted first contour pixel series;
An area detection apparatus comprising: an area acquisition unit configured to acquire the extracted second contour pixel series as information of an area surrounded by a frame detected from the input image.
前記凸包抽出手段は、前記輪郭線抽出手段によって抽出された前記第1の輪郭画素の系列毎に、当該第1の輪郭画素の系列の凸包の頂点に位置する輪郭画素が当該凸包の外輪上での順に並んだ系列を前記第2の輪郭画素の系列として抽出し、
前記マスク画像生成手段は、前記枠に囲まれた領域内の画素値が1で当該領域外の画素値が0のマスク画像を生成し、
前記抽出画像生成手段は、前記マスク画像上の画素値が1の座標における画素の画素値が前記入力画像の画素値と一致し、残りの画素の画素値が白を示す抽出画像を生成する
請求項1記載の領域検出装置。 A mask image generating unit and an extracted image generating unit;
The convex hull extracting means is configured such that, for each series of the first contour pixels extracted by the contour line extracting means, a contour pixel positioned at a vertex of the convex hull of the first contour pixel series is the convex hull. Extracting a sequence arranged in order on the outer ring as a sequence of the second contour pixels;
The mask image generating means generates a mask image having a pixel value of 1 in an area surrounded by the frame and a pixel value of 0 outside the area;
The extracted image generating means generates an extracted image in which a pixel value of a pixel at a coordinate having a pixel value of 1 on the mask image matches a pixel value of the input image, and a pixel value of the remaining pixels indicates white. Item 1. The area detection apparatus according to Item 1.
前記入力画像内の隣接する画素間からエッジを検出するエッジ検出手段と、
前記エッジで区切られた画素の塊の輪郭線を追跡することにより前記輪郭線を構成する前記第1の輪郭画素の系列を前記輪郭線毎に抽出する輪郭線追跡手段と
を含む請求項1記載の領域検出装置。 The contour line extracting means includes
Edge detection means for detecting an edge between adjacent pixels in the input image;
The contour line tracking means for extracting the series of the first contour pixels constituting the contour line for each contour line by tracking the contour line of the block of pixels divided by the edge. Area detection device.
前記輪郭線抽出手段が、前記入力画像から第1の輪郭画素の系列を、前記入力画像から検出された枠に関係する輪郭線毎に抽出するステップと、
前記凸包抽出手段が、前記抽出された第1の輪郭画素の系列毎に、当該第1の輪郭画素の系列の凸包を構成する第2の輪郭画素の系列を抽出する凸包抽出ステップと、
前記領域取得手段が、前記抽出された第2の輪郭画素の系列を、前記入力画像から検出された枠に囲まれた領域の情報として取得するステップと
を具備する領域検出方法。 In an area detection device comprising an outline extraction means, a convex hull extraction means, and an area acquisition means, an area detection method for detecting an area surrounded by a frame from an input image,
The contour line extracting means extracting a series of first contour pixels from the input image for each contour line related to a frame detected from the input image ;
A convex hull extracting step in which the convex hull extracting means extracts, for each of the extracted first contour pixel series, a second contour pixel series constituting a convex hull of the first contour pixel series; ,
A step of acquiring the region of the extracted second contour pixel as information of a region surrounded by a frame detected from the input image;
前記領域検出装置は、マスク画像生成手段及び抽出画像生成手段を更に具備し、
前記マスク画像生成手段が、前記枠に囲まれた領域内の画素値が1で当該領域外の画素値が0のマスク画像を生成するステップと、
前記抽出画像生成手段が、前記マスク画像上の画素値が1の座標における画素の画素値が前記入力画像の画素値と一致し、残りの画素の画素値が白を示す抽出画像を生成するステップと、
を更に具備する請求項4記載の領域検出方法。 In the convex hull extracting step, the convex hull extracting means is positioned at the vertex of the convex hull of the first contour pixel series for each series of the first contour pixels extracted by the contour line extracting means. Extracting a series of contour pixels arranged in order on the outer ring of the convex hull as the second contour pixel series;
The region detection apparatus further includes a mask image generation unit and an extraction image generation unit,
The mask image generating means generating a mask image in which the pixel value in the region surrounded by the frame is 1 and the pixel value outside the region is 0;
The extracted image generating means generates an extracted image in which the pixel value of a pixel at a coordinate having a pixel value of 1 on the mask image matches the pixel value of the input image, and the pixel values of the remaining pixels are white. When,
The region detection method according to claim 4, further comprising:
入力画像から第1の輪郭画素の系列を、前記入力画像から検出された枠に関係する輪郭線毎に抽出する輪郭線抽出手段と、
前記抽出された第1の輪郭画素の系列毎に、当該第1の輪郭画素の系列の凸包を構成する第2の輪郭画素の系列を抽出する凸包抽出手段と、
前記抽出された第2の輪郭画素の系列を、前記入力画像から検出された枠に囲まれた領域の情報として取得する領域取得手段と
して機能させるためのプログラム。 Computer
Contour line extraction means for extracting a series of first contour pixels from the input image for each contour line related to the frame detected from the input image ;
A convex hull extracting means for extracting a second contour pixel series constituting a convex hull of the first contour pixel series for each of the extracted first contour pixel series;
A program for causing the extracted second contour pixel series to function as area acquisition means for acquiring information of an area surrounded by a frame detected from the input image.
前記凸包抽出手段は、前記輪郭線抽出手段によって抽出された前記第1の輪郭画素の系列毎に、当該第1の輪郭画素の系列の凸包の頂点に位置する輪郭画素が当該凸包の外輪上での順に並んだ系列を前記第2の輪郭画素の系列として抽出する手段であり、
前記マスク画像生成手段は、前記枠に囲まれた領域内の画素値が1で当該領域外の画素値が0のマスク画像を生成する手段であり、
前記抽出画像生成手段は、前記マスク画像上の画素値が1の座標における画素の画素値が前記入力画像の画素値と一致し、残りの画素の画素値が白を示す抽出画像を生成する手段である
請求項6記載のプログラム。 Further causing the computer to function as a mask image generation unit and an extraction image generation unit,
The convex hull extracting means is configured such that, for each series of the first contour pixels extracted by the contour line extracting means, a contour pixel positioned at a vertex of the convex hull of the first contour pixel series is the convex hull. Means for extracting a series arranged in order on the outer ring as a series of the second contour pixels;
The mask image generation means is a means for generating a mask image in which the pixel value in the region surrounded by the frame is 1 and the pixel value outside the region is 0,
The extracted image generating means generates an extracted image in which a pixel value of a pixel at a coordinate having a pixel value of 1 on the mask image matches a pixel value of the input image, and a pixel value of the remaining pixels indicates white. The program according to claim 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011145958A JP5653308B2 (en) | 2011-06-30 | 2011-06-30 | Region detection apparatus, region detection method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011145958A JP5653308B2 (en) | 2011-06-30 | 2011-06-30 | Region detection apparatus, region detection method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013012157A JP2013012157A (en) | 2013-01-17 |
JP5653308B2 true JP5653308B2 (en) | 2015-01-14 |
Family
ID=47685962
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011145958A Active JP5653308B2 (en) | 2011-06-30 | 2011-06-30 | Region detection apparatus, region detection method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5653308B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014049729A1 (en) | 2012-09-26 | 2014-04-03 | 株式会社 東芝 | Motion video recognition device and motion video recognition method |
CN111754461B (en) * | 2020-05-28 | 2024-03-01 | 江苏理工学院 | Method and device for positioning image character area of semiconductor chip |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS60126777A (en) * | 1983-12-14 | 1985-07-06 | Hitachi Ltd | Character extracting system |
JPH0711816B2 (en) * | 1986-09-02 | 1995-02-08 | 株式会社日立製作所 | Character cutting method |
JPH01154298A (en) * | 1987-12-11 | 1989-06-16 | Hitachi Ltd | Character recognizing method |
-
2011
- 2011-06-30 JP JP2011145958A patent/JP5653308B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2013012157A (en) | 2013-01-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110046529B (en) | Two-dimensional code identification method, device and equipment | |
CN101770582B (en) | Image matching system and method | |
KR100339691B1 (en) | Apparatus for recognizing code and method therefor | |
JP4396376B2 (en) | Graphic reading method and apparatus, and main color extraction method and apparatus | |
KR101461233B1 (en) | Image processing device, image processing method and recording medium | |
WO2012098842A1 (en) | Feature extraction unit, feature extraction method, feature extraction program, and image processing device | |
JP4694613B2 (en) | Document orientation determination apparatus, document orientation determination method, program, and recording medium therefor | |
US9171224B2 (en) | Method of improving contrast for text extraction and recognition applications | |
CN105303156B (en) | Character detection device, method, and program | |
JP5337563B2 (en) | Form recognition method and apparatus | |
JP2007072628A (en) | Face direction discriminating device | |
JP4993615B2 (en) | Image recognition method and apparatus | |
JP2007325656A (en) | Image processing method and image processing device | |
JP5653308B2 (en) | Region detection apparatus, region detection method, and program | |
JP5337844B2 (en) | Region detection apparatus, region detection method, and program | |
CN116324911A (en) | Method for extracting characters from a vehicle license plate and license plate character extraction device for performing the method | |
JP6542406B1 (en) | Reading system, reading method, program, and storage medium | |
US20150262382A1 (en) | Image processing apparatus and image processing method | |
CN111670458B (en) | Reading system | |
JP2005242600A (en) | Pattern recognition processing apparatus, method, and program | |
JP2004110543A (en) | Face image processing unit and program | |
JP2014225754A (en) | Marker embedding device, marker detection device, marker embedding method, marker detection method, and program | |
US20230118236A1 (en) | Collation device and non-transitory computer readable medium storing program | |
JP4973603B2 (en) | Image processing apparatus and image processing program | |
JP2002230564A (en) | Contour extraction device and method and contour extraction program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20131003 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20131015 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20131205 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20131209 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20131212 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20131219 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20131226 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20140109 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20140513 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140813 |
|
A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20140903 |
|
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: 20141021 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20141118 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5653308 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |