[go: up one dir, main page]

JP2004030430A - Image processing method and image processing apparatus - Google Patents

Image processing method and image processing apparatus Download PDF

Info

Publication number
JP2004030430A
JP2004030430A JP2002188353A JP2002188353A JP2004030430A JP 2004030430 A JP2004030430 A JP 2004030430A JP 2002188353 A JP2002188353 A JP 2002188353A JP 2002188353 A JP2002188353 A JP 2002188353A JP 2004030430 A JP2004030430 A JP 2004030430A
Authority
JP
Japan
Prior art keywords
image
image processing
processing method
black
histogram
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2002188353A
Other languages
Japanese (ja)
Other versions
JP3885001B2 (en
Inventor
Kunihiro Yamamoto
山本 邦浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2002188353A priority Critical patent/JP3885001B2/en
Priority to US10/375,195 priority patent/US7321687B2/en
Publication of JP2004030430A publication Critical patent/JP2004030430A/en
Application granted granted Critical
Publication of JP3885001B2 publication Critical patent/JP3885001B2/en
Priority to US11/843,481 priority patent/US7567708B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Image Analysis (AREA)

Abstract

【課題】ノイズの多い環境下では、矩形切り出し処理を高精度に行うことは困難であった。
【解決手段】原画像を2値化した画像において、その水平及び垂直方向の黒画素数のヒストグラムを作成し、該ヒストグラムを台形近似することによって、前記2値画像における矩形領域の存在範囲を示す頂点座標を検出する。そして、該存在範囲内における矩形領域の傾き方向を検出することによって、2値画像から矩形領域を高精度に検出することができる。
【選択図】  図3
[PROBLEMS] It is difficult to perform rectangular cutout processing with high accuracy in an environment with much noise.
In an image obtained by binarizing an original image, a histogram of the number of black pixels in the horizontal and vertical directions is created, and the histogram is approximated by a trapezoid to indicate a range of a rectangular area in the binary image. Detect vertex coordinates. Then, by detecting the inclination direction of the rectangular area within the existence range, the rectangular area can be detected from the binary image with high accuracy.
[Selection diagram] FIG.

Description

【0001】
【発明の属する技術分野】
本発明は、画像処理方法及び画像処理装置に関し、特に矩形画像の検出を行う画像処理方法及び画像処理装置に関する。
【0002】
【従来の技術】
従来より、原画像から矩形領域を検出し、切り出すためのアルゴリズムが種々提案されている。例えば、特開平8−237537号においては、まず輪郭抽出を行い、輪郭が直線を成す部分を探すことによって矩形領域の探索を行なう技術が記載されている。
【0003】
【発明が解決しようとする課題】
しかしながら従来の矩形切り出しのアルゴリズムによれば、ノイズの多い環境下においては、矩形輪郭の直線部分を検出すること、さらに、4つの直線を関連付けて1個の矩形を検出することは困難であった。従って、正確な切り出しを行うことは困難であり、切り出し結果の精度は十分とはいえなかった。
【0004】
本発明は上述した問題を解決するためになされたものであり、ノイズの多い環境下でも矩形領域を高精度に検出可能とする画像処理方法及び画像処理装置を提供することを目的とする。
【0005】
【課題を解決するための手段】
上記目的を達成するための一手法として、本発明の画像処理方法は以下の工程を備える。
【0006】
すなわち、画像から矩形領域を検出する画像処理方法であって、原画像を2値化した画像において、その水平及び垂直方向の黒画素数のヒストグラムを作成するヒストグラム作成工程と、該ヒストグラムを台形近似することによって、前記2値画像における矩形領域の存在範囲を検出する矩形範囲検出工程と、前記存在範囲内における、前記矩形領域の傾き方向を検出する傾き方向検出工程と、を有することを特徴とする。
【0007】
さらに、前記2値画像に対してラベル付けを行うラベリング工程を有し、前記ヒストグラム作成工程においては、前記ラベル付けされた画素数のヒストグラムを作成することを特徴とする。
【0008】
【発明の実施の形態】
以下、本発明に係る一実施形態について、図面を参照して詳細に説明する。
【0009】
<第1実施形態>
●システム構成
図1は、本発明が実行されるコンピュータシステムの構成を示すブロック図である。101はCPUであり、システム全体の制御を行なう。102はキーボードであり、102aのマウスとともにシステムへのデータ入力に使用される。103は表示装置であり、CRTや液晶等で構成されている。104はROM、105はRAMであり、システムの記憶装置を構成し、システムが実行するプログラムやシステムが利用するデータを記憶する。106はハードディスク装置(HDD)、107はフロッピディスク装置(FDD)であり、システムのファイルシステムに使用される外部記憶装置を構成している。108はプリンタである。
【0010】
109はネットワークI/Fであり、LANまたはWANに接続している。I/F109を介して、コンピュータプログラムやデジタル画像等のデータファイルを他のコンピュータシステムとやりとりすることができる。プログラムやデータはハードディスク106に記録されたり、直接RAM105に展開されて実行される。
【0011】
110はイメージスキャナであり、原稿台上の写真や印刷物を読み込んで、多値のデジタル画像データとしてRAM105上に取り込むことができる。
【0012】
●矩形画像概要
図2に、イメージスキャナ110から取り込んで2値化された画像の一例を示す。図中の矩形は、写真等の矩形の原稿画像(以下、矩形画像と称する)を示し、3つの楕円はノイズを示している。なお、同図においては説明のためノイズを簡略化して示したが、実際のノイズ分はサイズも形状も不定であり、その数も数百から数千個程度になることが多い。また、画像の2値化は所定の閾値との比較による周知の単純二値化法を用いるとし、ここでは詳細な説明を省略する。
【0013】
図2に示す画像は、RAM105上で幅W画素、高さH画素のビットマップとして保持されている。各画素は1バイトの深さを持ち、黒画素は値255、白画素は値0で示されるとする。また、RAM105上のビットマップは2次元配列としてアクセスできるものとし、該ビットマップの左上を起点として水平方向にi番目、垂直方向にj番目の画素をbuf(i,j)と表記する。本実施形態ではこのビットマップから、以下に示す方法によって矩形画像の存在領域の座標を特定する。
【0014】
●ヒストグラム作成
図3は、図2に示す2値画像においてノイズが存在しない理想的な状態を想定した場合に、水平方向に黒画素を計数したヒストグラムの様子を示す図であり、同図上部が2値画像、下部がヒストグラム例を示す。同図によれば、2値画像の矩形の4頂点に対応して、ヒストグラムが概ね台形をなすことがわかる。なお、実際の2値画像はノイズを含むため、ヒストグラムが完全な台形となることはないが、水平方向における頂点の位置を特定するのに十分な情報を、このヒストグラムの台形形状から得ることができる。
【0015】
図4は、図3に示したヒストグラムの作成処理を示すフローチャートである。以下、ヒストグラムデータを格納する配列をhist()で示す。
【0016】
先ずステップS401,S402において、変数x,y及びのそれぞれに値0を代入し、ステップS403で変数hist(x)に値0を代入する。
【0017】
そしてステップS404において、ビットマップ上の画素buf(x,y)と値255を比較し、異なればステップS406へ進むが、等しければステップS405へ進んでhist(x)を値1だけインクリメントした後、ステップS406へ進む。
【0018】
ステップS406では変数yを値1だけインクリメントし、次にステップS407においてyとビットマップの高さHを比較する。yとHが異なればステップS404へ戻るが、等しければステップS408へ進んで変数xを値1だけインクリメントし、ステップS409でxとビットマップ幅Wを比較する。xとWが異なればステップS402へ戻るが、等しければ処理を終了する。
【0019】
●頂点検出処理
以上の処理によって、黒画素を計数したヒストグラムの配列hist()が得られる。このヒストグラムは図3に示したように、X軸及び3つの直線で囲まれた台形をなしている。本実施形態ではこの台形において、左辺がX軸と交わる位置をa、左辺と上底が交わる位置をb、右辺と上底が交わる位置をc、右辺がX軸と交わる位置をdとする。
【0020】
ここで図5のフローチャートを用いて、ヒストグラムが呈する台形の左辺を解析して、上記位置a,bを求める方法について説明する。
【0021】
まずステップS501において、hist(x)が最大になるピーク点Pを検出する。図3に示すヒストグラムにおいては、X=400前後の位置に高さ800のピークがある。次にステップS502において、点Pの前方向に、ピークの半分の高さになる点Fを検出する。図3に示すヒストグラムにおいては、X=100前後の位置が点Fに相当する。そしてステップS503で、点Fの前方向にピークの1/4の高さになる点F0を検出し、さらにステップS504で、点Fの後方向にピークの3/4の高さになる点F1を検出する。
【0022】
次にステップS505において、F0≦X≦F1の全ての点について、周知の回帰分析を用いて直線近似を行うことによって、図3に示すような直線Lを得る。そしてステップS506において直線LがX軸と交わる点を算出し、この点をaとして得る。そしてステップS507において、直線LがピークPの高さの98%になる点を算出し、この点をbとして得る。これは、ピークPはノイズ分を含んでいるため実際のピークよりも多めに出ていることを考慮して、これを98%分に補正するためである。以上、図5に示すフローチャートにより、ピークPの前方向への探索を行って点a,bを得る例について説明したが、同様にピークPの後方向に探索を行うことにより、点c、dを得ることができる。
【0023】
また、以上は水平方向の頂点位置検出についての説明であるが、上記説明における縦軸と横軸を反転して全く同様の方法を適用することにより、垂直方向における頂点位置検出を行うことが可能である。これにより図6に示すように、矩形を囲む縦横それぞれ4個の座標値、すなわち8個の変数(ax,bx,cx,dx,ay,by,cy,dy)を、頂点候補として得ることができる。
【0024】
ここで、矩形から上記8つの変数は一意に決定されるが、逆に、8つの変数から矩形を決定することはできない。すなわち図7に示すように、8つの変数に基づく矩形としては、その斜行方向(以下、斜行モード)によって4通りの頂点座標が考えられるが、そのいずれであるかを決定することができない。なお図7においては、矩形が完全に水平である特別な場合(不図示)をモード0として、4つの斜行モードをそれぞれ、モード1,2,−1,−2とする。これら各モードで示される画像からは同じ形状のヒストグラムが生成されるため、ヒストグラム以外の他の方法によって、斜行モードを判定する必要がある。
【0025】
●斜行モード判定
以下、本実施形態における斜行モード判定処理について、詳細に説明する。
【0026】
上述した図6は、図7に示すモード1の状態に相当するが、図6において斜線で示した2つの三角領域の内側に存在する黒画素を計数すると、理想的には黒画素(図中網点部分)が含まれないため、黒画素の計数結果は0になると考えられる。以下、この図6に示す斜線領域を、モード1のテンプレートと呼ぶ。なお、図7に示す他のモードについても同様に、矩形上部に存在する2つの三角領域を、各モードのテンプレートとする。
【0027】
ここで図8に示すように、実際にはモード1である矩形画像(図中網点部分)に対してモード2のテンプレート(図中斜線部分)を当てはめると、テンプレートの内側に矩形部分がはみ出してしまうため、黒画素数の計数結果は0にならない。本実施形態ではこの特性を利用して、矩形の斜行モードを判定する。
【0028】
具体的には、判定対象となる矩形画像に対して4つのモードのテンプレートを適用した場合の黒画素数をそれぞれ計数し、計数結果が最少であるテンプレートを、その画像の斜行モードとして決定する。すなわち、テンプレートへの入り込みの度合いが最も少ない場合が、該矩形画像が最も近似する斜行度合いであるとする。もちろん、テンプレート外に存在する黒画素を計数し、計数結果が最大であるテンプレートによって斜行モードを決定することも可能である。
【0029】
以上の処理により、2値画像中の矩形領域の4つの頂点座標を特定することができる。従ってこの情報に基づき、原画像に対して周知の斜行補正及び画像切り出し処理を施すことによって、例えばイメージスキャナ110上に配置した矩形の写真画像を切り出すことができる。
【0030】
なお、上記周知の斜行補正処理としては、単純補間法(ニアレストネイバ法)または線形補間法(バイリニア法)を用いることが望ましく、前者は速度に優れ、後者は画質に優れるので、用途に応じて使い分ければ良い。
【0031】
以上説明したように本実施形態によれば、ノイズの多い環境下であっても、矩形領域を正確に検出することができる。
【0032】
なお、矩形領域が完全な長方形であれば、理想的なヒストグラムとして、左右の斜辺が対称となる理想的な台形を呈するはずであるが、ノイズの影響により左右の斜辺が対称とはならず、すなわち、図3に示すa−b間の距離が、c−d間の距離と等しくならないことがある。そのような場合には、ノイズの影響が少ないと考えられる方の斜辺から得られるデータにあわせて、台形近似を行う。具体的には左右の斜辺について、回帰分析による直線近似の精度(直線と実データの間の2乗誤差)を比較して、誤差の少ないほうを採用すれば良い。
【0033】
同様に、矩形検出の結果として得られた4つの頂点を結んだ矩形が、ノイズの影響で必ずしも長方形にならず、隣り合う辺が直交しないことも考えられる。このような場合も、ノイズの影響が少ないと考えられる方のデータに基づいて、矩形が長方形になるように修正を施すことで、矩形検出の精度を向上することができる。
【0034】
<第2実施形態>
以下、本発明に係る第2実施形態について説明する。なお、第2実施形態におけるシステム構成は上述した第1実施形態と同様であるため、説明を省略する。
【0035】
上述した第1実施形態においては、画像内に1つの矩形領域が存在する場合について説明した。このような状況としては例えば、イメージスキャナ110の原稿台上に1枚の写真を必ずしも水平ではなく載置した状態でスキャンを行い、その後自動的に斜行補正、画像切り出しを行うことで、写真画像を抽出する処理が想定される。
【0036】
しかしながら、一般的なフラットヘッドスキャナの原稿台はA4サイズ程度の原稿の載置を可能とするため、一般的な写真(所謂L版サイズ)の複数枚を一度に載置することができる。従って、このような複数枚の写真画像を一回のスキャンによって読み取り、得られた画像から写真画像を示す矩形領域だけを切り出すことができれば、スキャン作業の効率化が図れる。
【0037】
そこで第2実施形態においては、一枚の画像から、複数の矩形画像を検出することを特徴とする。
【0038】
以下、図9を参照して、第2実施形態における複数の矩形画像の検出処理について説明する。図9の左部は、原稿台の副走査方向(図中長手方向)に2枚の写真を離して配置した際の2値化画像を示し、図9の右部は該2値化画像の副走査方向におけるヒストグラムの様子を示す。同図から分かるように、複数枚の写真が離れて配置されている場合、ヒストグラムに複数個の台形が現れる。従って第2実施形態においてはこのヒストグラムを参照することによって、これら複数の台形の間、すなわち図9において1点鎖線Lで示した位置で、画像を二つに切り分ける。すると、以降は上述した第1実施形態で示した方法によって、該切り分けられた各々の領域において、矩形画像をそれぞれ検出することができる。
【0039】
なお、図9においては複数枚の写真を副走査方向に離して配置した場合について説明したが、これを主走査方向(図中短手方向)に離して配置した場合も同様に、主走査方向についてのヒストグラムを作成することによって、画像を主走査方向で切り分け、それぞれの矩形画像を抽出することができる。
【0040】
以上説明したように第2実施形態によれば、一枚の画像から複数の矩形画像を検出することができる。
【0041】
<第3実施形態>
以下、本発明に係る第3実施形態について説明する。なお、第3実施形態におけるシステム構成は上述した第1実施形態と同様であるため、説明を省略する。
【0042】
第3実施形態においては、図2に示すような2値画像に対して理想的なラベリング処理を施すことによってノイズの影響を排除し、矩形画像の検出をより高精度に行うことを特徴とする。
【0043】
ここで、図2に示す2値画像における理想的なラベリング処理とは、黒画素同士の連結に基づき、例えば上方の矩形オブジェクトに含まれる全ての画素に対して画素値1を与え、下方の矩形オブジェクトに含まれる全画素に対しては画素値2を与えることである。すなわち、微小なノイズ分にはラベルを与えず、画素値255のままにしておく。
【0044】
●ラベリング処理概要
以下、上記理想的なラベリングを実現するためのラベリング方法について、詳細に説明する。
【0045】
図10は、図2における上方の矩形オブジェクトを含む左上部分に対応し、第3実施形態における塗りつぶし処理の起点となるブロックの探索方法を説明するための図である。
【0046】
まず図10に示すように、図2に示したW画素×H画素のビットマップ全体を、w画素×h画素のブロックに分け、その内部が全て値255の黒画素で占められるようなブロック(以下、「黒ブロック」と称する)を図中矢印方向に探索する。図3において黒矩形で示したブロックが、見つかった黒ブロックである。
【0047】
第3実施形態では、見つかった黒ブロックと黒画素が連結している領域を塗りつぶすことによって、高速なラベリングを実現する。図11に、第3実施形態におけるラベリング処理全体のフローチャートを示し、説明する。
【0048】
まずステップS1401で、変数cに値1を代入し、ステップS1402で黒ブロック探索を行う。この黒ブロック探索処理の詳細については後述する。
【0049】
次にステップS1403において黒ブロックが見つかったか否かを判断し、見つかったらステップS1404へ進むが、見つからなければ処理を終了する。
【0050】
ステップS1404では、見つかった黒ブロックを起点にして、黒画素連結領域をラベルcで塗りつぶす。この塗りつぶし処理の詳細については後述する。
【0051】
そしてステップS1405で変数cを1だけインクリメントしてステップS1402に戻り、以上の処理を繰り返す。
【0052】
この処理の結果、所定以上の大きさを持つオブジェクトのみに対して、ラベル1,2,…,cを与えることができる。
【0053】
●黒ブロック探索処理
以下、図11のステップS1402に示した黒ブロック探索処理の詳細を図12のフローチャートに示し、説明する。
【0054】
まずステップS1501〜S1504において、変数y,x,j,iをそれぞれ値0で初期化する。そしてステップS1505でbuf(x+i,y+j)が黒画素を示す255であるか否かを判断し、255であればステップS1506へ、255でなければステップS1510へ進む。
【0055】
ステップS1506では変数iを値1だけインクリメントし、ステップS1507でiがブロック幅を示すwに等しければステップS1508へ進み、異なればステップS1505へ進む。
【0056】
ステップS1508では変数jを値1だけインクリメントし、ステップS1509でjがブロック高さを示すhに等しければ処理を終了し、このとき、(x,y)を左上起点とするw×h画素ブロックが黒ブロックであるとして検出される。jがhと異なるときはステップS1504へ戻る。
【0057】
ステップS1510ではxにwを加え、ステップS1511でxが画像幅を示すW以上であればステップS1512へ進み、そうでなければステップS1503へ戻る。
【0058】
ステップS1512ではyにhを加え、ステップS1513でyが画像高さを示すH以上であれば処理を終了し、このとき、黒ブロックは存在しないと判定される。yがH未満であればステップS1502へ戻る。
【0059】
以上の処理によって、W画素×H画素の2値画像からw画素×h画素の黒ブロックが検出される。
【0060】
●連結領域の塗りつぶし処理
以下、図11のステップS1404に示した連結領域の塗りつぶし処理の詳細を図13のフローチャートに示し、説明する。
【0061】
なお、オブジェクトの塗りつぶし処理としては種々の方法が知られており、第3実施形態ではどのような塗りつぶし方法を用いても良い。したがって、ここでは基本的な方法について説明することとし、説明の簡略化のためオブジェクトは外に凸である単純な形状であると仮定する。
【0062】
上述した黒ブロック探索処理の結果、図14に示すように(x,y)を左上起点とするブロックが黒ブロックとして検出されている。そこで第3実施形態の塗りつぶし処理においては、この黒ブロックの中心点である((x+w)/2,(y+h)/2)を起点として、黒画素で連結している領域をラベルcで塗りつぶす。すなわち、値255である画素値を値cで置き換える。
【0063】
具体的にはまずステップS601において、黒ブロックの中心点((x+w)/2,(y+h)/2)を含む走査線について、該走査線上の黒連結部分をラベルcで塗りつぶす。すなわち、図14に示す黒ブロックを含むオブジェクトにおける上記走査線の左端(x0,y+h/2)と右端(x1,y+h/2)を結ぶ線分(図14においてオブジェクトを水平方向に切断する線分)がラベルcで塗りつぶされる。なお、上記(x0,y+h/2)と(x1,y+h/2)を結ぶ線分を以下では連結線分と称し、その塗りつぶし処理の詳細については後述する。
【0064】
そして、ステップS602で連結線分から下にある黒連結部分を塗りつぶし、ステップS603で連結線分から上にある黒連結部分を塗りつぶす。なお、ステップS602,S603における塗りつぶし処理の詳細については後述する。
【0065】
この処理の結果、黒ブロックと黒画素で連結した領域を、ラベルcで塗りつぶすことができる。
【0066】
●連結線分の塗りつぶし処理
以下、図13のステップS601に示した連結線分の塗りつぶし処理の詳細を図15のフローチャートに示し、説明する。なお、説明の簡略化のために、処理の起点となる黒ブロックの中心点((x+w)/2,(y+h)/2)を、座標(X,Y)で示すとする。すなわち、X=(x+w)/2,Y=(y+h)/2とする。
【0067】
まず、ステップS801で変数iにXを代入し、ステップS802でiを値1だけデクリメントする。そして、ステップS803でbuf(i,Y)が値255に等しいか否かを判定し、異なればステップS804へ進むが、等しければステップS802へ戻ってiをさらにデクリメントする。
【0068】
ステップS804では変数x0に値i+1を格納し、ステップS805では変数iにXを代入する。そしてステップS806でiを値1だけインクリメントし、ステップS807でbuf(i,Y)が値255に等しいか否かを判定し、等しければステップS808へ進むが、異なればステップS806へ戻ってiをさらにインクリメントする。
【0069】
ステップS808では、変数x1に値i−1を格納し、ステップS809では変数iに値x0を代入し、ステップS810ではbuf(i,Y)にcを代入する。そしてステップS811でiを値1だけインクリメントし、ステップS812でiがx1よりも大きければ処理を終了するが、そうでなければステップS810に戻る。
【0070】
この処理により、変数x0,x1に連結線分の両端におけるx座標を格納し、該連結線分をラベルcで塗りつぶすことができる。
【0071】
●連結線分から下(上)の塗りつぶし処理
以下、図13のステップS602に示した連結線分から下にある黒連結部分の塗りつぶし処理の詳細を図16のフローチャートに示し、説明する。なお、ここでもY=y+h/2とし、したがって、(x0,Y)と(x1,Y)を結ぶ連結線分より下の黒連結部分をラベルcで塗りつぶす。
【0072】
まず、ステップS901で変数Yを値1だけインクリメントし、ステップS902で変数iにx0を代入する。そしてステップS903でbuf(i,Y)が値255に等しいか否かを判定し、異なればステップS904へ、等しければステップS906へ進む。
【0073】
ステップS904ではiを値1だけインクリメントし、ステップS905でiがx1よりも大きければ処理を終了するが、そうでなければステップS903に戻る。
【0074】
ステップS906ではXにiを代入し、ステップS907で(X,Y)を起点として、横方向、すなわち走査線上の連結線分を塗りつぶす。なお、この走査線上の塗りつぶし処理については図15のフローチャートで示したため、ここではその詳細な説明を省略する。
【0075】
なお、図13のステップS603に示した連結線分から上にある黒連結部分の塗りつぶし処理については、基本的に上述した図16のフローチャートに示す、下方向への塗りつぶし処理と同様であり、ステップS901においてYをインクリメントする代わりにデクリメントすれば良く、他のステップについては同様の処理を行えば良い。
【0076】
以上説明したようなラベリング処理によれば、所定サイズの黒ブロックを含むオブジェクト、すなわち所定サイズ以上の面積をもつオブジェクトについてのみ、ラベル付けを行うことができる。したがって、微小なノイズ領域に対してラベルを付けてしまうことがなく、高速なラベリングが可能になる。
【0077】
●ラベリング後の矩形検出
以上のラベリング処理により、図2に示すbuf()の2次元配列においては、同図上方の矩形オブジェクトに含まれる全ての画素に対してラベル1としての画素値1が、下方の矩形オブジェクトに含まれる全画素に対してはラベル2としての画素値2が、それ以外の微小ノイズ部分の黒画素には画素値255が、背景の白画素には値0が、それぞれ格納される。
【0078】
第3実施形態においては、各ラベル領域毎に矩形オブジェクトの位置(頂点座標)を判定する。すなわち、ラベリング後の画像に対して、上述した第1及び第2実施形態において説明した矩形検出処理を施す。具体的には、上述した図4に示すヒストグラムの作成フローチャートにおいて、ステップS404に示すbuf()の比較対象を、黒画素を示す値255から、ラベル値(この場合、1または2)に変更すれば良い。これにより、ラベル1及びラベル2の領域が、矩形として検出される。
【0079】
なお、ここでは2個の矩形を含む場合を例として説明したが、任意個数の矩形を含む2値画像に対して上記ラベリング処理を施し、各ラベル毎に、矩形検出処理を行うことが可能であることは言うまでもない。
【0080】
以上説明したように第3実施形態によれば、2値画像に対して理想的なラベリング処理を施すことによってノイズの影響を排除し、矩形画像の検出をより高精度に行うことができる。
【0081】
<第4実施形態>
以下、本発明に係る第4実施形態について説明する。なお、第4実施形態におけるシステム構成は上述した第1実施形態と同様であるため、説明を省略する。
【0082】
上述した第3実施形態においては、2値画像から黒ブロックの探索を行なう際にまず2値画像全体をブロックに分割した後に、各ブロックの内部が全て黒画素であるか否かをチェックした。しかしながら黒ブロックの探索方法としては他の方法も適用可能であり、例えば第4実施形態においては、2値画像内におけるブロックの左上座標を連続的に変化させていく方法について説明する。この方法によれば演算負荷は高くなるものの、黒ブロックの検出性能を向上することができる。
【0083】
図17は、第4実施形態において矩形オブジェクト内の黒ブロックを探索する様子を示す図である。同図によれば第4実施形態における探索の起点(x,y)は、第3実施形態で図10に示したブロック境界からは外れた位置にあることが分かる。
【0084】
図18に、第4実施形態における黒ブロックの探索処理のフローチャートを示し、詳細に説明する。
【0085】
まずステップS1101〜S1104において、変数y,x,j,iをそれぞれ値0で初期化する。そしてステップS1105でbuf(x+i,y+j)が黒画素を示す255であるか否かを判断し、255であればステップS1106へ、255でなければステップS1110へ進む。
【0086】
ステップS1106では変数iを値1だけインクリメントし、ステップS1107でiがブロック幅を示すwに等しければステップS1108へ進み、異なればステップS1105へ進む。
【0087】
ステップS1108では変数jを値1だけインクリメントし、ステップS1109でjがブロック高さを示すhに等しければ処理を終了し、このとき、(x,y)を左上起点とするw×h画素ブロックが黒ブロックであるとして検出される。jがhと異なるときはステップS1104へ戻る。
【0088】
ステップS1110ではxにi+1を加える。なお、ここでxを単に値1だけインクリメントしても、最終的には全く同様の結果が得られるが、i+1を加えることで探索の無駄を省き、処理を高速化できる。
【0089】
そして、ステップS1111でxが画像幅を示すW以上であればステップS1112へ進み、そうでなければステップS1103へ戻る。
【0090】
ステップS1112ではyを値1だけインクリメントし、ステップS1113でyが画像高さを示すHに等しければ処理を終了し、このとき、黒ブロックは存在しないと判定される。yがHに等しくなければステップS1102へ戻る。
【0091】
以上の処理によって、W画素×H画素の2値画像からw画素×h画素の黒ブロックが検出される。そして、以降は上述した第3実施形態と同様に、黒画素連結領域の塗りつぶし及び矩形検出処理を行うことができる。
【0092】
以上説明したように第4実施形態によれば、所定サイズの黒ブロックをより高精度に検出することができる。したがって、有効なオブジェクトのみについてのラベリングを、より高精度に行うことができ、ひいては、より高精度な矩形検出が可能となる。
【0093】
なお、上述した第3及び第4実施形態によれば、ブロック内の全画素が黒画素であることを黒ブロックの判定条件としたが、例えばノイズの状態によっては、黒領域の内部に白画素が多数混入することがある。そこで本発明においては例えば、ブロック内部の黒画素数をカウントし、これが所定の閾値を超えた場合に黒ブロックであると判定しても良い。
【0094】
また、探索すべき黒ブロックは必ずしも矩形である必要はなく、例えば六角形等の多角形や、円形もしくは楕円形であってもよいし、想定されるオブジェクトの形状に応じて選択可能なようにしてもよい。
【0095】
また、探索ブロックのサイズも1つの所定サイズに限らず、例えば大きなブロックサイズから探索をはじめ、オブジェクトが見つからなければ徐々にサイズを小さくして探索を繰り返すようにしても良い。これにより、想定されたよりも小さなオブジェクトをノイズと誤認し、無視してしまう危険性を回避できる。
【0096】
【他の実施形態】
なお、本発明は、複数の機器(例えばホストコンピュータ、インタフェイス機器、リーダ、プリンタなど)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置など)に適用しても良い。
【0097】
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUまたはMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても達成されることは言うまでもない。
【0098】
この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
【0099】
プログラムコードを供給するための記憶媒体としては、例えば、フロッピーディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、ROMなどを用いることが出来る。
【0100】
また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(オペレーティングシステム)などが実際の処理の一部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0101】
さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0102】
【発明の効果】
以上説明したように本発明によれば、ノイズの多い環境下でも矩形領域を高精度に検出することができる。
【図面の簡単な説明】
【図1】本発明に係る一実施形態における画像処理システムの概要構成を示すブロック図である。
【図2】本実施形態において検出対象となる2値画像例を示す図である。
【図3】本実施形態における黒画素数の水平方向ヒストグラム例を示す図である。
【図4】本実施形態におけるヒストグラム算出処理を示すフローチャートである。
【図5】本実施形態におけるヒストグラムの台形近似方法を示すフローチャートである。
【図6】本実施形態における矩形画像の検出座標例を示す図である。
【図7】本実施形態における4つの斜行モードを示す図である。
【図8】本実施形態における斜行モード判定の原理を説明するための図である。
【図9】第2実施形態において、複数枚の写真を配置した際のヒストグラムの様子を示す図である。
【図10】第3実施形態における黒ブロック探索方法を説明するための図である。
【図11】第3実施形態におけるラベリング処理の概要を示すフローチャートである。
【図12】第3実施形態における黒ブロック探索処理を示すフローチャートである。
【図13】第3実施形態における塗りつぶし処理を示すフローチャートである。
【図14】第3実施形態における連結線分塗りつぶし方法を説明するための図である。
【図15】第3実施形態における連結線分塗りつぶし処理を示すフローチャートである。
【図16】第3実施形態における連結線分下領域の塗りつぶし処理を示すフローチャートである。
【図17】第4実施形態における黒ブロック探索方法を説明するための図である。
【図18】第4実施形態における黒ブロック探索処理を示すフローチャートである。
【符号の説明】
101 CPU
102 キーボード
102a マウス
103 表示部
104 ROM
105 RAM
106 ハードディスク
107 フロッピーディスク
108 プリンタ
109 ネットワークI/F
110 イメージスキャナ
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image processing method and an image processing apparatus, and more particularly to an image processing method and an image processing apparatus for detecting a rectangular image.
[0002]
[Prior art]
Conventionally, various algorithms have been proposed for detecting and cutting out a rectangular area from an original image. For example, Japanese Patent Application Laid-Open No. 8-23737 describes a technique for extracting a contour and then searching for a rectangular area by searching for a portion where the contour forms a straight line.
[0003]
[Problems to be solved by the invention]
However, according to the conventional rectangle extraction algorithm, it is difficult to detect a straight line portion of a rectangular outline and detect a single rectangle by associating four straight lines in a noisy environment. . Therefore, it is difficult to perform accurate clipping, and the precision of the clipping result is not sufficient.
[0004]
SUMMARY An advantage of some aspects of the invention is to provide an image processing method and an image processing apparatus capable of detecting a rectangular area with high accuracy even in a noisy environment.
[0005]
[Means for Solving the Problems]
As one technique for achieving the above object, the image processing method of the present invention includes the following steps.
[0006]
That is, an image processing method for detecting a rectangular region from an image, wherein in a binarized image of an original image, a histogram creation step of creating a histogram of the number of black pixels in the horizontal and vertical directions, and a trapezoidal approximation of the histogram And a tilt direction detecting step of detecting a tilt direction of the rectangular area within the range of the rectangular area in the binary image. I do.
[0007]
The method further includes a labeling step of labeling the binary image, wherein the histogram creation step creates a histogram of the number of labeled pixels.
[0008]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.
[0009]
<First embodiment>
● System configuration
FIG. 1 is a block diagram showing a configuration of a computer system on which the present invention is executed. Reference numeral 101 denotes a CPU, which controls the entire system. A keyboard 102 is used together with a mouse 102a to input data to the system. A display device 103 includes a CRT, a liquid crystal, and the like. A ROM 104 and a RAM 105 constitute a storage device of the system and store programs executed by the system and data used by the system. 106 is a hard disk drive (HDD) and 107 is a floppy disk drive (FDD), which constitutes an external storage device used for the file system of the system. 108 is a printer.
[0010]
Reference numeral 109 denotes a network I / F, which is connected to a LAN or a WAN. Via the I / F 109, data files such as computer programs and digital images can be exchanged with other computer systems. The programs and data are recorded on the hard disk 106 or directly expanded on the RAM 105 and executed.
[0011]
Reference numeral 110 denotes an image scanner which can read a photograph or printed matter on a document table and take it into the RAM 105 as multi-valued digital image data.
[0012]
● Rectangular image overview
FIG. 2 shows an example of a binarized image captured from the image scanner 110. The rectangles in the figure indicate rectangular original images such as photographs (hereinafter, referred to as rectangular images), and the three ellipses indicate noise. Although the noise is simplified in FIG. 1 for the sake of explanation, the size and shape of the actual noise are undefined, and the number of noises is often several hundred to several thousand. In addition, the binarization of the image uses a well-known simple binarization method by comparison with a predetermined threshold value, and a detailed description is omitted here.
[0013]
The image shown in FIG. 2 is stored on the RAM 105 as a bitmap of W pixels wide and H pixels high. It is assumed that each pixel has a depth of 1 byte, and a black pixel is indicated by a value of 255 and a white pixel is indicated by a value of 0. The bitmap on the RAM 105 can be accessed as a two-dimensional array, and the i-th pixel in the horizontal direction and the j-th pixel in the vertical direction starting from the upper left of the bitmap are denoted as buf (i, j). In this embodiment, the coordinates of the region where the rectangular image exists are specified from the bitmap by the following method.
[0014]
● Histogram creation
FIG. 3 is a diagram showing a state of a histogram in which black pixels are counted in the horizontal direction when an ideal state in which no noise is present in the binary image shown in FIG. 2 is assumed. , The lower part shows an example of a histogram. According to the figure, it is understood that the histogram has a substantially trapezoidal shape corresponding to the four vertices of the rectangle of the binary image. Since the actual binary image contains noise, the histogram is not completely trapezoidal, but sufficient information for specifying the position of the vertex in the horizontal direction can be obtained from the trapezoidal shape of the histogram. it can.
[0015]
FIG. 4 is a flowchart showing the histogram creation processing shown in FIG. Hereinafter, an array for storing the histogram data is represented by hist ().
[0016]
First, in steps S401 and S402, a value 0 is substituted for each of the variables x, y, and in step S403, a value 0 is substituted for the variable hist (x).
[0017]
Then, in step S404, the pixel buf (x, y) on the bitmap is compared with the value 255, and if they are different, the process proceeds to step S406. If they are equal, the process proceeds to step S405 to increment hist (x) by one. Proceed to step S406.
[0018]
In step S406, the variable y is incremented by one, and then in step S407, y is compared with the height H of the bitmap. If y and H are different, the process returns to step S404, but if they are equal, the process proceeds to step S408, where the variable x is incremented by 1 and x is compared with the bitmap width W in step S409. If x and W are different, the process returns to step S402, but if they are equal, the process ends.
[0019]
● Vertex detection processing
Through the above processing, an array hist () of a histogram in which black pixels are counted is obtained. This histogram has a trapezoidal shape surrounded by the X axis and three straight lines as shown in FIG. In the present embodiment, in this trapezoid, a position where the left side intersects the X axis is a, a position where the left side intersects the upper base is b, a position where the right side intersects the upper base is c, and a position where the right side intersects the X axis is d.
[0020]
Here, a method of obtaining the positions a and b by analyzing the left side of the trapezoid represented by the histogram will be described with reference to the flowchart of FIG.
[0021]
First, in step S501, a peak point P at which hist (x) is maximized is detected. In the histogram shown in FIG. 3, there is a peak with a height of 800 at a position around X = 400. Next, in step S502, a point F that is half the height of the peak is detected in the forward direction of the point P. In the histogram shown in FIG. 3, positions around X = 100 correspond to the point F. In step S503, a point F0 having a height of 1/4 of the peak in the forward direction of the point F is detected. Further, in step S504, a point F1 having a height of 3/4 of the peak in the backward direction of the point F is detected. Is detected.
[0022]
Next, in step S505, a straight line L as shown in FIG. 3 is obtained by performing linear approximation for all points of F0 ≦ X ≦ F1 using a well-known regression analysis. In step S506, a point at which the straight line L intersects the X axis is calculated, and this point is obtained as a. In step S507, a point at which the straight line L is 98% of the height of the peak P is calculated, and this point is obtained as b. This is to correct the peak P to 98% in consideration of the fact that the peak P includes a noise component and thus appears more than the actual peak. The example in which the search for the peak P is performed in the forward direction to obtain the points a and b has been described with reference to the flowchart illustrated in FIG. 5, but the search for the points c and d is similarly performed by performing the search in the backward direction for the peak P. Can be obtained.
[0023]
Also, the above description is about the detection of the vertex position in the horizontal direction. However, it is possible to detect the vertex position in the vertical direction by applying the exactly same method by inverting the vertical axis and the horizontal axis in the above description. It is. As a result, as shown in FIG. 6, four coordinate values in the vertical and horizontal directions surrounding the rectangle, that is, eight variables (ax, bx, cx, dx, ay, by, cy, dy) can be obtained as vertex candidates. it can.
[0024]
Here, the above eight variables are uniquely determined from the rectangle, but conversely, the rectangle cannot be determined from the eight variables. That is, as shown in FIG. 7, as a rectangle based on eight variables, four kinds of vertex coordinates can be considered depending on the skew direction (hereinafter, skew mode), but it is not possible to determine which one of them is. . In FIG. 7, a special case (not shown) in which the rectangle is completely horizontal is mode 0, and the four skew modes are modes 1, 2, -1, and -2, respectively. Since a histogram having the same shape is generated from the images shown in these modes, it is necessary to determine the skew mode by a method other than the histogram.
[0025]
● Skew mode judgment
Hereinafter, the skew mode determination processing in the present embodiment will be described in detail.
[0026]
FIG. 6 described above corresponds to the state of mode 1 shown in FIG. 7. However, when the number of black pixels existing inside the two triangular areas shown by oblique lines in FIG. Since the halftone dot portion is not included, the counting result of the black pixels is considered to be zero. Hereinafter, the hatched area shown in FIG. 6 is referred to as a mode 1 template. Similarly, in the other modes shown in FIG. 7, two triangular regions existing above the rectangle are used as templates for each mode.
[0027]
Here, as shown in FIG. 8, when a template of mode 2 (hatched portion in the figure) is applied to a rectangular image (dotted portion in the diagram) which is actually mode 1, the rectangular portion protrudes inside the template. Therefore, the result of counting the number of black pixels does not become zero. In the present embodiment, the rectangular skew mode is determined using this characteristic.
[0028]
Specifically, the number of black pixels in the case where the template in the four modes is applied to the rectangular image to be determined is counted, and the template with the smallest counting result is determined as the skew mode of the image. . That is, it is assumed that the case where the degree of entry into the template is the smallest is the degree of skew that the rectangular image most closely approximates. Of course, it is also possible to count the black pixels existing outside the template, and determine the skew mode based on the template having the largest counting result.
[0029]
By the above processing, the coordinates of the four vertices of the rectangular area in the binary image can be specified. Therefore, based on this information, a well-known skew correction and image cutout processing are performed on the original image, so that a rectangular photographic image arranged on the image scanner 110 can be cut out, for example.
[0030]
It is desirable to use a simple interpolation method (nearest neighbor method) or a linear interpolation method (bilinear method) as the above-described known skew correction processing. The former is superior in speed, and the latter is superior in image quality. You can use them appropriately.
[0031]
As described above, according to the present embodiment, a rectangular area can be accurately detected even in an environment with much noise.
[0032]
If the rectangular area is a perfect rectangle, as an ideal histogram, the right and left hypotenuses should exhibit an ideal trapezoid. That is, the distance between a and b shown in FIG. 3 may not be equal to the distance between cd. In such a case, trapezoidal approximation is performed in accordance with data obtained from the hypotenuse that is considered to be less affected by noise. Specifically, for the right and left hypotenuses, the accuracy of the linear approximation (square error between the straight line and the actual data) by regression analysis is compared, and the one with the smaller error may be adopted.
[0033]
Similarly, a rectangle connecting four vertices obtained as a result of rectangle detection may not necessarily be a rectangle due to the influence of noise, and adjacent sides may not be orthogonal. Even in such a case, the accuracy of the rectangle detection can be improved by performing correction so that the rectangle becomes a rectangle based on the data considered to be less affected by noise.
[0034]
<Second embodiment>
Hereinafter, a second embodiment according to the present invention will be described. Note that the system configuration in the second embodiment is the same as in the above-described first embodiment, and a description thereof will not be repeated.
[0035]
In the first embodiment described above, the case where one rectangular area exists in the image has been described. As such a situation, for example, scanning is performed in a state where one photograph is not necessarily placed horizontally on the platen of the image scanner 110, and then skew correction and image cutout are automatically performed. A process of extracting an image is assumed.
[0036]
However, since the platen of a general flat head scanner can place a document of about A4 size, a plurality of general photographs (so-called L size) can be placed at a time. Accordingly, if such a plurality of photographic images can be read by one scan and only a rectangular region indicating the photographic image can be cut out from the obtained image, the scanning operation can be made more efficient.
[0037]
Therefore, the second embodiment is characterized in that a plurality of rectangular images are detected from one image.
[0038]
Hereinafter, a process of detecting a plurality of rectangular images in the second embodiment will be described with reference to FIG. The left part of FIG. 9 shows a binarized image when two photographs are arranged apart in the sub-scanning direction (longitudinal direction in the figure) of the document table, and the right part of FIG. 9 shows the binarized image. 7 shows a state of a histogram in the sub-scanning direction. As can be seen from the figure, when a plurality of photographs are arranged apart from each other, a plurality of trapezoids appear in the histogram. Therefore, in the second embodiment, by referring to this histogram, the image is divided into two between these trapezoids, that is, at the position indicated by the dashed line L in FIG. Then, a rectangular image can be detected in each of the divided areas by the method described in the first embodiment.
[0039]
Although FIG. 9 illustrates the case where a plurality of photographs are arranged apart in the sub-scanning direction, the same applies when the plurality of photographs are arranged apart in the main scanning direction (short direction in the drawing). By creating a histogram of, the image can be cut in the main scanning direction and each rectangular image can be extracted.
[0040]
As described above, according to the second embodiment, a plurality of rectangular images can be detected from one image.
[0041]
<Third embodiment>
Hereinafter, a third embodiment according to the present invention will be described. Note that the system configuration in the third embodiment is the same as in the above-described first embodiment, and a description thereof will not be repeated.
[0042]
The third embodiment is characterized in that the effect of noise is eliminated by performing an ideal labeling process on a binary image as shown in FIG. 2 and the rectangular image is detected with higher accuracy. .
[0043]
Here, the ideal labeling process in the binary image shown in FIG. 2 is based on the connection between black pixels, for example, by giving a pixel value of 1 to all the pixels included in the upper rectangular object, The pixel value 2 is given to all the pixels included in the object. That is, a label is not given to a minute noise portion, and the pixel value is kept at 255.
[0044]
● Overview of labeling process
Hereinafter, a labeling method for realizing the ideal labeling will be described in detail.
[0045]
FIG. 10 is a diagram for explaining a method of searching for a block corresponding to the upper left portion including the upper rectangular object in FIG. 2 and serving as a starting point of the filling process in the third embodiment.
[0046]
First, as shown in FIG. 10, the entire bitmap of W pixels × H pixels shown in FIG. 2 is divided into blocks of w pixels × h pixels, and the block (block) is occupied entirely by black pixels having a value of 255 ( Hereinafter, this is referred to as a “black block”) in the direction of the arrow in the figure. The block indicated by the black rectangle in FIG. 3 is the found black block.
[0047]
In the third embodiment, high-speed labeling is realized by filling an area where a found black block and a black pixel are connected. FIG. 11 shows and describes a flowchart of the entire labeling process in the third embodiment.
[0048]
First, in step S1401, a value 1 is substituted for a variable c, and in step S1402, a black block search is performed. The details of the black block search process will be described later.
[0049]
Next, in step S1403, it is determined whether a black block has been found. If found, the process proceeds to step S1404, but if not found, the process ends.
[0050]
In step S1404, the black pixel connection area is painted with the label c with the found black block as a starting point. The details of the painting process will be described later.
[0051]
In step S1405, the variable c is incremented by one, and the process returns to step S1402, and the above processing is repeated.
[0052]
As a result of this processing, labels 1, 2,..., C can be given only to objects having a size larger than a predetermined value.
[0053]
● Black block search processing
Hereinafter, the details of the black block search processing shown in step S1402 of FIG. 11 will be described with reference to the flowchart of FIG.
[0054]
First, in steps S1501 to S1504, variables y, x, j, and i are each initialized with a value of 0. In step S1505, it is determined whether or not buf (x + i, y + j) is 255 indicating a black pixel. If it is 255, the process proceeds to step S1506. If it is not 255, the process proceeds to step S1510.
[0055]
In step S1506, the variable i is incremented by the value 1, and in step S1507, if i is equal to w indicating the block width, the flow advances to step S1508; otherwise, the flow advances to step S1505.
[0056]
In step S1508, the variable j is incremented by the value 1, and in step S1509, if j is equal to h indicating the block height, the process ends. At this time, a w × h pixel block having (x, y) as the upper left starting point Detected as a black block. If j is different from h, the process returns to step S1504.
[0057]
In step S1510, w is added to x. If x is equal to or larger than W indicating the image width in step S1511, the process advances to step S1512; otherwise, the process returns to step S1503.
[0058]
In step S1512, h is added to y. If y is equal to or more than H indicating the image height in step S1513, the process ends, and at this time, it is determined that there is no black block. If y is less than H, the process returns to step S1502.
[0059]
By the above processing, a black block of w pixels × h pixels is detected from the binary image of W pixels × H pixels.
[0060]
● Filling process of connected area
Hereinafter, the details of the connection area filling processing shown in step S1404 of FIG. 11 will be described with reference to a flowchart of FIG.
[0061]
Note that various methods are known as the object filling process, and any of the filling methods may be used in the third embodiment. Therefore, the basic method will be described here, and it is assumed that the object has a simple shape that is outwardly convex for simplification of the description.
[0062]
As a result of the above-described black block search processing, a block starting from (x, y) at the upper left is detected as a black block as shown in FIG. Therefore, in the filling process according to the third embodiment, an area connected by black pixels is filled with a label c starting from ((x + w) / 2, (y + h) / 2) which is the center point of the black block. That is, the pixel value having the value 255 is replaced with the value c.
[0063]
Specifically, first, in step S601, for a scanning line including the center point ((x + w) / 2, (y + h) / 2) of the black block, the black connected portion on the scanning line is painted out with the label c. That is, a line segment connecting the left end (x0, y + h / 2) and the right end (x1, y + h / 2) of the scanning line in the object including the black block shown in FIG. 14 (the line segment cutting the object in the horizontal direction in FIG. 14) ) Is filled with the label c. The line connecting (x0, y + h / 2) and (x1, y + h / 2) is hereinafter referred to as a connected line, and the details of the painting process will be described later.
[0064]
Then, in step S602, the black connecting part below the connecting line is painted out, and in step S603, the black connecting part above the connecting line is painted out. The details of the painting process in steps S602 and S603 will be described later.
[0065]
As a result of this processing, the area connected by the black blocks and the black pixels can be filled with the label c.
[0066]
● Filling connection line
Hereinafter, the details of the connection line segment filling process shown in step S601 of FIG. 13 will be described with reference to the flowchart of FIG. For the sake of simplicity, it is assumed that the center point ((x + w) / 2, (y + h) / 2) of the black block, which is the starting point of the processing, is indicated by coordinates (X, Y). That is, X = (x + w) / 2 and Y = (y + h) / 2.
[0067]
First, X is substituted for a variable i in step S801, and i is decremented by 1 in step S802. Then, in step S803, it is determined whether or not buf (i, Y) is equal to the value 255. If the values are different, the process proceeds to step S804, but if they are equal, the process returns to step S802 to further decrement i.
[0068]
In step S804, the value i + 1 is stored in the variable x0, and in step S805, X is substituted for the variable i. Then, in step S806, i is incremented by the value 1, and in step S807, it is determined whether or not buf (i, Y) is equal to the value 255. If the values are equal, the process proceeds to step S808. Increment further.
[0069]
In step S808, the value i-1 is stored in the variable x1, in step S809, the value x0 is substituted for the variable i, and in step S810, c is substituted for buf (i, Y). Then, i is incremented by 1 in step S811, and if i is larger than x1 in step S812, the process ends. If not, the process returns to step S810.
[0070]
With this processing, the x-coordinates at both ends of the connected line segment can be stored in the variables x0 and x1, and the connected line segment can be painted out with the label c.
[0071]
● Bottom (upper) fill processing from connected lines
Hereinafter, the details of the filling process of the black connecting portion below the connecting line segment shown in step S602 of FIG. 13 will be described with reference to the flowchart of FIG. In this case, Y = y + h / 2, and therefore, the black connecting portion below the connecting line connecting (x0, Y) and (x1, Y) is painted out with the label c.
[0072]
First, the variable Y is incremented by 1 in step S901, and x0 is substituted for the variable i in step S902. Then, in step S903, it is determined whether or not buf (i, Y) is equal to the value 255. If they are different, the process proceeds to step S904, and if they are equal, the process proceeds to step S906.
[0073]
In step S904, i is incremented by the value 1, and in step S905, if i is greater than x1, the process ends. If not, the process returns to step S903.
[0074]
In step S906, i is substituted for X, and in step S907, a horizontal line, that is, a connected line segment on the scanning line is painted starting from (X, Y). Note that the painting process on the scanning line is shown in the flowchart of FIG. 15, and a detailed description thereof will be omitted here.
[0075]
Note that the filling process of the black connected portion above the connected line segment shown in step S603 of FIG. 13 is basically the same as the downward filling process shown in the flowchart of FIG. In the above, Y may be decremented instead of incremented, and similar processing may be performed for other steps.
[0076]
According to the labeling process described above, labeling can be performed only for an object including a black block of a predetermined size, that is, an object having an area equal to or larger than the predetermined size. Therefore, a label is not attached to a minute noise area, and high-speed labeling can be performed.
[0077]
● Rectangle detection after labeling
By the above labeling process, in the two-dimensional array of buf () shown in FIG. 2, the pixel value 1 as the label 1 is included in the lower rectangular object for all the pixels included in the upper rectangular object in FIG. The pixel value 2 as the label 2 is stored for all the pixels to be processed, the pixel value 255 is stored for the black pixels in the other minute noise portions, and the value 0 is stored for the white pixels on the background.
[0078]
In the third embodiment, the position (vertex coordinates) of a rectangular object is determined for each label area. That is, the image after labeling is subjected to the rectangle detection processing described in the first and second embodiments. Specifically, in the histogram creation flowchart shown in FIG. 4 described above, the comparison target of buf () shown in step S404 is changed from the value 255 indicating a black pixel to a label value (1 or 2 in this case). Good. As a result, the areas of label 1 and label 2 are detected as rectangles.
[0079]
Although the case where two rectangles are included has been described as an example, the above-described labeling process can be performed on a binary image including an arbitrary number of rectangles, and the rectangle detection process can be performed for each label. Needless to say, there is.
[0080]
As described above, according to the third embodiment, the effect of noise can be eliminated by performing ideal labeling processing on a binary image, and a rectangular image can be detected with higher accuracy.
[0081]
<Fourth embodiment>
Hereinafter, a fourth embodiment according to the present invention will be described. Note that the system configuration in the fourth embodiment is the same as in the above-described first embodiment, and a description thereof will not be repeated.
[0082]
In the above-described third embodiment, when searching for a black block from a binary image, first, the entire binary image is divided into blocks, and then it is checked whether or not each block is entirely black pixels. However, other methods are also applicable as a method of searching for a black block. For example, in the fourth embodiment, a method of continuously changing the upper left coordinates of a block in a binary image will be described. According to this method, although the calculation load increases, the detection performance of the black block can be improved.
[0083]
FIG. 17 is a diagram illustrating a manner of searching for a black block in a rectangular object in the fourth embodiment. According to the drawing, it can be seen that the starting point (x, y) of the search in the fourth embodiment is located outside the block boundary shown in FIG. 10 in the third embodiment.
[0084]
FIG. 18 shows a flowchart of a black block search process according to the fourth embodiment, which will be described in detail.
[0085]
First, in steps S1101 to S1104, variables y, x, j, and i are each initialized with a value of 0. In step S1105, it is determined whether or not buf (x + i, y + j) is 255 indicating a black pixel. If it is 255, the process proceeds to step S1106. If it is not 255, the process proceeds to step S1110.
[0086]
In step S1106, the variable i is incremented by the value 1. In step S1107, if i is equal to w indicating the block width, the flow advances to step S1108; otherwise, the flow advances to step S1105.
[0087]
In step S1108, the variable j is incremented by the value 1, and in step S1109, if j is equal to h indicating the block height, the process ends. At this time, a w × h pixel block having (x, y) as the upper left starting point is Detected as a black block. If j is different from h, the process returns to step S1104.
[0088]
In step S1110, i + 1 is added to x. Here, even if x is simply incremented by the value 1, exactly the same result is finally obtained. However, by adding i + 1, wasteful search can be omitted and the processing can be speeded up.
[0089]
If x is equal to or more than W indicating the image width in step S1111, the process proceeds to step S1112; otherwise, the process returns to step S1103.
[0090]
In step S1112, y is incremented by a value of 1. In step S1113, if y is equal to H indicating the image height, the process ends. At this time, it is determined that there is no black block. If y is not equal to H, the process returns to step S1102.
[0091]
By the above processing, a black block of w pixels × h pixels is detected from the binary image of W pixels × H pixels. Thereafter, similarly to the above-described third embodiment, the black pixel connection area can be filled and the rectangle detection processing can be performed.
[0092]
As described above, according to the fourth embodiment, a black block having a predetermined size can be detected with higher accuracy. Therefore, labeling of only valid objects can be performed with higher accuracy, and thus more accurate rectangle detection can be performed.
[0093]
According to the above-described third and fourth embodiments, the determination condition of the black block is that all the pixels in the block are black pixels. However, for example, depending on the state of noise, white pixels may be included in the black area. In some cases. Therefore, in the present invention, for example, the number of black pixels in a block may be counted, and if this count exceeds a predetermined threshold, it may be determined that the block is a black block.
[0094]
Further, the black block to be searched does not necessarily have to be rectangular, and may be, for example, a polygon such as a hexagon, a circle or an ellipse, or be selectable according to the assumed shape of the object. You may.
[0095]
The size of the search block is not limited to one predetermined size. For example, the search may be started from a large block size, and if no object is found, the size may be gradually reduced and the search may be repeated. As a result, it is possible to avoid a risk that an object smaller than expected is erroneously recognized as noise and ignored.
[0096]
[Other embodiments]
The present invention can be applied to a system including a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.), but may be a device including one device (for example, a copying machine, a facsimile machine, etc.). May be applied.
[0097]
Further, an object of the present invention is to provide a storage medium storing a program code of software for realizing the functions of the above-described embodiments to a system or an apparatus, and a computer (or CPU or MPU) of the system or apparatus to store the storage medium. Needless to say, this can also be achieved by reading out and executing the program code stored in the.
[0098]
In this case, the program code itself read from the storage medium realizes the function of the above-described embodiment, and the storage medium storing the program code constitutes the present invention.
[0099]
As a storage medium for supplying the program code, for example, a floppy disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a CD-R, a magnetic tape, a nonvolatile memory card, a ROM, and the like can be used.
[0100]
When the computer executes the readout program code, not only the functions of the above-described embodiments are realized, but also an OS (Operating System) running on the computer based on the instruction of the program code. It goes without saying that a case where a part of the actual processing is performed and the function of the above-described embodiment is realized by the processing is also included.
[0101]
Further, after the program code read from the storage medium is written into a memory provided on a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. It goes without saying that a CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.
[0102]
【The invention's effect】
As described above, according to the present invention, a rectangular area can be detected with high accuracy even in a noisy environment.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a schematic configuration of an image processing system according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating an example of a binary image to be detected in the present embodiment.
FIG. 3 is a diagram illustrating an example of a horizontal histogram of the number of black pixels in the embodiment.
FIG. 4 is a flowchart illustrating a histogram calculation process according to the embodiment.
FIG. 5 is a flowchart illustrating a trapezoidal approximation method of a histogram according to the present embodiment.
FIG. 6 is a diagram illustrating an example of detection coordinates of a rectangular image according to the present embodiment.
FIG. 7 is a diagram illustrating four skew modes in the embodiment.
FIG. 8 is a diagram for explaining the principle of skew mode determination in the embodiment.
FIG. 9 is a diagram illustrating a state of a histogram when a plurality of photographs are arranged in the second embodiment.
FIG. 10 is a diagram for explaining a black block search method according to a third embodiment.
FIG. 11 is a flowchart illustrating an outline of a labeling process in a third embodiment.
FIG. 12 is a flowchart illustrating a black block search process according to the third embodiment.
FIG. 13 is a flowchart illustrating a painting process according to the third embodiment.
FIG. 14 is a diagram illustrating a method for painting a connected line segment according to the third embodiment.
FIG. 15 is a flowchart illustrating a connection line segment filling process according to the third embodiment.
FIG. 16 is a flowchart illustrating a process of painting a region below a connected line segment according to the third embodiment.
FIG. 17 is a diagram for explaining a black block search method according to the fourth embodiment.
FIG. 18 is a flowchart illustrating a black block search process according to the fourth embodiment.
[Explanation of symbols]
101 CPU
102 keyboard
102a mouse
103 Display
104 ROM
105 RAM
106 Hard Disk
107 floppy disk
108 Printer
109 Network I / F
110 Image Scanner

Claims (29)

画像から矩形領域を検出する画像処理方法であって、
原画像を2値化した画像において、その水平及び垂直方向の黒画素数のヒストグラムを作成するヒストグラム作成工程と、
該ヒストグラムを台形近似することによって、前記2値画像における矩形領域の存在範囲を検出する矩形範囲検出工程と、
前記存在範囲内における、前記矩形領域の傾き方向を検出する傾き方向検出工程と、
を有することを特徴とする画像処理方法。
An image processing method for detecting a rectangular area from an image, comprising:
A histogram creation step of creating a histogram of the number of black pixels in the horizontal and vertical directions in an image obtained by binarizing the original image;
A rectangular range detecting step of detecting the existence range of a rectangular region in the binary image by approximating the histogram with a trapezoid;
An inclination direction detecting step of detecting an inclination direction of the rectangular area in the existence range;
An image processing method comprising:
前記矩形範囲検出工程においては、
前記2値画像の水平及び垂直方向における前記ヒストグラムのそれぞれについて台形近似を行い、
前記2値画像の水平及び垂直方向のそれぞれついて、矩形領域の存在範囲を検出する
ことを特徴とする請求項1記載の画像処理方法。
In the rectangular range detecting step,
Performing a trapezoidal approximation for each of the histograms in the horizontal and vertical directions of the binary image,
2. The image processing method according to claim 1, wherein an existence range of a rectangular area is detected in each of the horizontal and vertical directions of the binary image.
前記矩形範囲検出工程においては、前記矩形領域に対する複数の頂点座標候補を検出することを特徴とする請求項2記載の画像処理方法。3. The image processing method according to claim 2, wherein in the rectangular range detection step, a plurality of vertex coordinate candidates for the rectangular area are detected. 前記矩形範囲検出工程においては、前記近似された台形の頂点座標を、前記矩形領域に対する複数の頂点座標候補として検出することを特徴とする請求項3記載の画像処理方法。4. The image processing method according to claim 3, wherein in the rectangular range detecting step, the vertex coordinates of the approximated trapezoid are detected as a plurality of vertex coordinate candidates for the rectangular area. 前記傾き方向検出工程においては、前記矩形領域の複数の頂点座標候補から4頂点の座標を特定することを特徴とする請求項4記載の画像処理方法。5. The image processing method according to claim 4, wherein in the tilt direction detecting step, coordinates of four vertices are specified from a plurality of vertex coordinate candidates of the rectangular area. 前記傾き方向検出工程においては、
前記矩形領域に対する複数の頂点座標候補に基づいて、該矩形領域の複数の傾き方向を仮定し、
該複数の傾き方向のそれぞれで示される矩形領域について、その外部に存在する黒画素数を計数し、
それぞれの計数結果に基づいて1つの傾き方向を特定することによって、
前記4頂点の座標を特定することを特徴とする請求項5記載の画像処理方法。
In the tilt direction detecting step,
Based on a plurality of vertex coordinate candidates for the rectangular area, assuming a plurality of inclination directions of the rectangular area,
For a rectangular area indicated by each of the plurality of tilt directions, the number of black pixels existing outside the rectangular area is counted,
By specifying one inclination direction based on each counting result,
6. The image processing method according to claim 5, wherein coordinates of the four vertices are specified.
前記傾き方向検出工程においては、
前記矩形領域に対する複数の頂点座標候補に基づいて、該矩形領域の複数の傾き方向を仮定し、
該複数の傾き方向のそれぞれで示される矩形領域について、その内部に存在する黒画素を計数し、
それぞれの計数結果に基づいて1つの傾き方向を特定することによって、
前記4頂点の座標を特定することを特徴とする請求項5記載の画像処理方法。
In the tilt direction detecting step,
Based on a plurality of vertex coordinate candidates for the rectangular area, assuming a plurality of inclination directions of the rectangular area,
For a rectangular area indicated by each of the plurality of tilt directions, the number of black pixels existing inside the rectangular area is counted,
By specifying one inclination direction based on each counting result,
6. The image processing method according to claim 5, wherein coordinates of the four vertices are specified.
さらに、前記傾き方向検出工程において検出された4頂点の座標によって決定される矩形領域に対して、斜行補正を施す斜行補正工程を備えることを特徴とする請求項5記載の画像処理方法。6. The image processing method according to claim 5, further comprising a skew correction step of performing skew correction on a rectangular area determined by the coordinates of the four vertices detected in the tilt direction detecting step. 前記斜行補正工程においては、バイリニア法による補間を行うことを特徴とする請求項8記載の画像処理方法。9. The image processing method according to claim 8, wherein in the skew correction step, interpolation is performed by a bilinear method. 前記斜行補正工程においては、ニアレストネイバ法による補間を行うことを特徴とする請求項8記載の画像処理方法。9. The image processing method according to claim 8, wherein in the skew correction step, interpolation is performed by a nearest neighbor method. 前記矩形範囲検出工程においては、前記矩形領域が長方形であると仮定して、前記ヒストグラムを台形近似することを特徴とする請求項1記載の画像処理方法。The image processing method according to claim 1, wherein in the rectangular range detecting step, the histogram is approximated by a trapezoid, assuming that the rectangular area is rectangular. 前記矩形領域は、写真画像を示す領域であることを特徴とする請求項11記載の画像処理方法。The image processing method according to claim 11, wherein the rectangular area is an area indicating a photographic image. さらに、多値の原画像を2値化して前記2値画像を得る2値化工程を有することを特徴とする請求項1記載の画像処理方法。2. The image processing method according to claim 1, further comprising a binarization step of binarizing a multi-valued original image to obtain the binary image. 前記原画像は、1枚の写真画像が配置された画像であることを特徴とする請求項13記載の画像処理方法。14. The image processing method according to claim 13, wherein the original image is an image in which one photographic image is arranged. 前記原画像が、複数枚の写真画像が主走査方向に離れた位置に配置された画像である場合、
前記ヒストグラム作成工程においては、前記2値画像を前記写真画像毎に主走査方向で分割し、該分割した2値画像毎に、前記ヒストグラムを作成することを特徴とする請求項13記載の画像処理方法。
When the original image is an image in which a plurality of photographic images are arranged at positions separated in the main scanning direction,
14. The image processing apparatus according to claim 13, wherein, in the histogram creating step, the binary image is divided for each of the photographic images in the main scanning direction, and the histogram is created for each of the divided binary images. Method.
前記原画像が、複数枚の写真画像が副走査方向に離れた位置に配置された画像である場合、
前記ヒストグラム作成工程においては、前記2値画像を前記写真画像毎に副走査方向で分割し、該分割した2値画像毎に、前記ヒストグラムを作成することを特徴とする請求項13記載の画像処理方法。
When the original image is an image in which a plurality of photographic images are arranged at positions separated in the sub-scanning direction,
14. The image processing apparatus according to claim 13, wherein, in the histogram creating step, the binary image is divided in the sub-scanning direction for each of the photographic images, and the histogram is created for each of the divided binary images. Method.
さらに、前記2値画像に対してラベル付けを行うラベリング工程を有し、
前記ヒストグラム作成工程においては、前記ラベル付けされた画素数のヒストグラムを作成することを特徴とする請求項1記載の画像処理方法。
A labeling step of labeling the binary image;
2. The image processing method according to claim 1, wherein in the histogram creating step, a histogram of the number of labeled pixels is created.
前記ラベリング工程は、
前記2値画像において、その内部における黒画素数が所定割合以上であるような所定サイズのブロックを、黒ブロックとして検出する黒ブロック検出工程と、検出された黒ブロック内および該黒ブロックに連結している黒画素について、所定のラベル値で置き換えるラベル付け工程と、
を有することを特徴とする請求項17記載の画像処理方法。
The labeling step includes:
In the binary image, a black block detecting step of detecting, as a black block, a block of a predetermined size in which the number of black pixels inside the binary image is equal to or more than a predetermined ratio, and connecting the block within the detected black block and the black block. A labeling step of replacing black pixels with a predetermined label value,
18. The image processing method according to claim 17, comprising:
前記黒ブロック検出工程においては、その内部が全て黒画素からなるブロックを、前記黒ブロックとして検出することを特徴とする請求項18記載の画像処理方法。19. The image processing method according to claim 18, wherein, in the black block detection step, a block whose inside is entirely composed of black pixels is detected as the black block. 前記黒ブロック検出工程は、
前記2値画像全体を前記所定サイズのブロックに分割する分割工程と、
前記ブロックごとに黒ブロックであるか否かを判定する判定工程と、
を有することを特徴とする請求項18記載の画像処理方法。
The black block detection step includes:
A dividing step of dividing the entire binary image into blocks of the predetermined size;
A determining step of determining whether or not each block is a black block;
19. The image processing method according to claim 18, comprising:
前記黒ブロック検出工程においては、
前記2値画像において前記所定サイズのブロック位置を順次ずらすことによって、黒ブロックを検出することを特徴とする請求項18記載の画像処理方法。
In the black block detection step,
19. The image processing method according to claim 18, wherein a black block is detected by sequentially shifting a position of the block of the predetermined size in the binary image.
前記黒ブロック検出工程においては、前記2値画像において前記所定サイズの黒ブックが検出されなかった場合に、該所定サイズよりも小さなサイズの黒ブロックを検出することを特徴とする請求項18記載の画像処理方法。19. The black block detecting step, wherein when a black book having the predetermined size is not detected in the binary image, a black block having a size smaller than the predetermined size is detected. Image processing method. 前記ラベル付け工程は、
前記黒ブロック内の基準ラインを前記ラベル値で置き換える基準ラベル付け工程と、
前記前記基準ラインよりも上部に連結している黒画素を前記ラベル値で置き換える上部ラベル付け工程と、
前記前記基準ラインよりも下部に連結している黒画素を前記ラベル値で置き換える下部ラベル付け工程と、
を有することを特徴とする請求項18記載の画像処理方法。
The labeling step comprises:
A reference labeling step of replacing a reference line in the black block with the label value;
An upper labeling step of replacing black pixels connected above the reference line with the label value,
A lower labeling step of replacing black pixels connected below the reference line with the label value,
19. The image processing method according to claim 18, comprising:
上記黒ブロックは矩形であることを特徴とする請求項18記載の画像処理方法。19. The image processing method according to claim 18, wherein the black block is a rectangle. 上記黒ブロックは多角形であることを特徴とする請求項18記載の画像処理方法。19. The image processing method according to claim 18, wherein the black block is a polygon. 上記黒ブロックは円形であることを特徴とする請求項18記載の画像処理方法。19. The image processing method according to claim 18, wherein the black block is circular. 画像から矩形領域を検出する画像処理装置であって、
原画像を2値化した画像において、その水平及び垂直方向の黒画素数のヒストグラムを作成するヒストグラム作成手段と、
該ヒストグラムを台形近似することによって、前記2値画像における矩形領域の存在範囲を検出する矩形範囲検出手段と、
前記存在範囲内における、前記矩形領域の傾き方向を検出する傾き方向検出手段と、
を有することを特徴とする画像処理装置。
An image processing device for detecting a rectangular area from an image,
Histogram creation means for creating a histogram of the number of black pixels in the horizontal and vertical directions in an image obtained by binarizing the original image;
Rectangular range detection means for detecting the existence range of a rectangular region in the binary image by approximating the histogram with a trapezoid;
An inclination direction detecting means for detecting an inclination direction of the rectangular area within the existence range,
An image processing apparatus comprising:
画像から矩形領域を検出する画像処理プログラムであって、
原画像を2値化した画像において、その水平及び垂直方向の黒画素数のヒストグラムを作成するヒストグラム作成工程のコードと、
該ヒストグラムを台形近似することによって、前記2値画像における矩形領域の存在範囲を検出する矩形範囲検出工程のコードと、
前記存在範囲内における、前記矩形領域の傾き方向を検出する傾き方向検出工程のコードと、
を有することを特徴とするコンピュータ可読なプログラム。
An image processing program for detecting a rectangular area from an image,
In a binarized image of the original image, a code of a histogram creating step of creating a histogram of the number of black pixels in the horizontal and vertical directions,
A code for a rectangular range detecting step of detecting the existence range of the rectangular region in the binary image by trapezoidal approximation of the histogram;
In the existence range, code of a tilt direction detecting step of detecting a tilt direction of the rectangular area,
A computer-readable program, comprising:
請求項28記載のプログラムを記録した記録媒体。A recording medium on which the program according to claim 28 is recorded.
JP2002188353A 2002-03-07 2002-06-27 Image processing method and image processing apparatus Expired - Fee Related JP3885001B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2002188353A JP3885001B2 (en) 2002-06-27 2002-06-27 Image processing method and image processing apparatus
US10/375,195 US7321687B2 (en) 2002-03-07 2003-02-28 Apparatus and method for image processing to label an object in a binary image
US11/843,481 US7567708B2 (en) 2002-03-07 2007-08-22 Apparatus and method for image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002188353A JP3885001B2 (en) 2002-06-27 2002-06-27 Image processing method and image processing apparatus

Publications (2)

Publication Number Publication Date
JP2004030430A true JP2004030430A (en) 2004-01-29
JP3885001B2 JP3885001B2 (en) 2007-02-21

Family

ID=31183128

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002188353A Expired - Fee Related JP3885001B2 (en) 2002-03-07 2002-06-27 Image processing method and image processing apparatus

Country Status (1)

Country Link
JP (1) JP3885001B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004304265A (en) * 2003-03-28 2004-10-28 Seiko Epson Corp Image processing system, projector, program, information storage medium, and image processing method
US7738696B2 (en) 2005-09-06 2010-06-15 Canon Kabushiki Kaisha Image processing apparatus and method for extracting a document area
US8818110B2 (en) 2008-05-08 2014-08-26 Canon Kabushiki Kaisha Image processing apparatus that groups object images based on object attribute, and method for controlling the same

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004304265A (en) * 2003-03-28 2004-10-28 Seiko Epson Corp Image processing system, projector, program, information storage medium, and image processing method
US7266240B2 (en) 2003-03-28 2007-09-04 Seiko Epson Corporation Image processing system, projector, computer-readable medium, and image processing method
US7738696B2 (en) 2005-09-06 2010-06-15 Canon Kabushiki Kaisha Image processing apparatus and method for extracting a document area
US8818110B2 (en) 2008-05-08 2014-08-26 Canon Kabushiki Kaisha Image processing apparatus that groups object images based on object attribute, and method for controlling the same

Also Published As

Publication number Publication date
JP3885001B2 (en) 2007-02-21

Similar Documents

Publication Publication Date Title
US7567708B2 (en) Apparatus and method for image processing
US6738154B1 (en) Locating the position and orientation of multiple objects with a smart platen
US6839466B2 (en) Detecting overlapping images in an automatic image segmentation device with the presence of severe bleeding
JP5047051B2 (en) Image processing apparatus and image encoding method
US5892854A (en) Automatic image registration using binary moments
US7831107B2 (en) Image processing apparatus, image processing method, and program
US8326039B2 (en) Image processing apparatus, image processing method, and recording medium
US6704456B1 (en) Automatic image segmentation in the presence of severe background bleeding
US20140293383A1 (en) Image-Processing Device Identifying Object in Image Specified by Encircling Line
US9131193B2 (en) Image-processing device removing encircling lines for identifying sub-regions of image
US7885486B2 (en) Image processing system, method for processing image and computer readable medium
US8238686B2 (en) Image processing apparatus, method and recording medium
JP5049922B2 (en) Image processing apparatus and image processing method
KR101377910B1 (en) Image processing method and image processing apparatus
JP3615333B2 (en) Ruled line eraser
JP4878209B2 (en) Image processing apparatus, image processing method, and computer program
JP3885001B2 (en) Image processing method and image processing apparatus
KR101903617B1 (en) Method for editing static digital combined images comprising images of multiple objects
JP2011013900A (en) Image processing apparatus, image processing method, program, and storage medium
JPH1166310A (en) Image feature extraction apparatus and method, and recording medium storing image feature extraction program
EP0975146B1 (en) Locating the position and orientation of multiple objects with a smart platen
JP3814547B2 (en) Image processing apparatus and method
JP7301529B2 (en) Image processing device, image processing method, and program
JP2004032537A (en) Image processing method and image processing apparatus
JPH10336428A (en) Image processing unit

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060116

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060224

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060425

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060605

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060706

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060811

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061011

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20061019

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: 20061107

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061120

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20101124

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20101124

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111124

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121124

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20131124

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees