JP5883715B2 - Image processing LSI, image processing system, and image processing method - Google Patents
Image processing LSI, image processing system, and image processing method Download PDFInfo
- Publication number
- JP5883715B2 JP5883715B2 JP2012100950A JP2012100950A JP5883715B2 JP 5883715 B2 JP5883715 B2 JP 5883715B2 JP 2012100950 A JP2012100950 A JP 2012100950A JP 2012100950 A JP2012100950 A JP 2012100950A JP 5883715 B2 JP5883715 B2 JP 5883715B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- area
- character
- marker
- luminance
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Editing Of Facsimile Originals (AREA)
- Facsimile Image Signal Circuits (AREA)
Description
本発明は、画像処理LSI、画像処理システムおよび画像処理方法に関し、特にマーキングを付された文字列と絵柄を含む画像からマーキング領域を抽出する画像処理プロセスに好適に利用できるものである。 The present invention relates to an image processing LSI, an image processing system, and an image processing method, and can be suitably used for an image processing process for extracting a marking region from an image including a character string and a design with a marking.
原稿画像を撮像して公衆に表示する書画カメラが、教育現場などで例えば教師と生徒のコミュニケーションツールとして利用されている。そのような場面では、教師は教材である原稿画像の説明文の一部を隠して生徒に提示し、生徒にその部分を考えさせるような利用法がある。その場合、教師が原稿画像上で隠したい文字列を蛍光ペンなどのマーカーで塗っておくと、書画カメラを使って生徒に表示したときに、マーカーを塗った部分が塗りつぶされて文字が読めないようにする処理を施すことができ、このような処理を行うか否かを切り替えられることが望ましい。このような処理は、マーキングを付された文字列を含む画像からマーキング領域を抽出する画像処理プロセスを使って、実現することができる。 Document cameras that capture document images and display them to the public are used as communication tools for teachers and students, for example, in educational settings. In such a scene, there is a usage in which the teacher hides a part of the explanation of the manuscript image as a teaching material and presents it to the student, and makes the student think about the part. In that case, if the teacher paints the character string that he wants to hide on the manuscript image with a marker such as a highlighter pen, when the document camera is used to display it to the student, the marker-painted part is filled and the text cannot be read. It is desirable to be able to perform such processing, and to switch whether or not to perform such processing. Such processing can be realized by using an image processing process for extracting a marking region from an image including a character string with a marking.
特許文献1には、マスク画像を作成するための入力作業を単純化することができる学習支援装置が開示されている。文字認識部によって文字表示領域を認識し、別途入力される位置指定情報に基づいて、マスクされるべきマスク領域を定めてマスク画像を作成する。
特許文献2には、必要な部分がマーキングされた文書画像から、画像データの色成分の相違に基づいてマーキング領域を抽出する技術が開示されている。通常の画像と、マーキングに使用する色成分のみを抽出した画像の2面を入力し、この2面の画像データを比較することにより、マーキング領域とマーキングによって指定された文字列を抽出する。
一方、特許文献3には、写真画像やグラデーションなどの背景と文字列を含む画像から、背景レイヤーと文字列に分離する技術が開示されている。m×n画素のブロックにおける最小濃度値と最大濃度値の差である最大濃度差に基づいて下地領域、写真領域、および文字領域に分離する。特許文献4には、文字と写真が混在したカラー文書画像から写真領域を抽出する技術が開示されている。
On the other hand,
特許文献1に記載される学習支援装置は、教師が指定する文字列を生徒から読めないようにマスクするマスク画像を作成し、マスクのオン・オフを切り替え可能に構成しているが、教師はマスクすべき位置を入力する必要がある。特許文献2にはマーキングされた文書画像からマーキング領域とマーキングによって指定された文字列を抽出するので、これを上記学習支援装置と組み合わせれば、マスクすべき文字の指定が容易になる。しかし、特許文献2に記載されている技術は、写真や絵、図柄などの文字以外の画像が混在していることを想定していない。特定の色成分をマーキング領域として抽出するので、もし、絵柄など文字以外の画像が混在していた場合には、絵柄などの中でマーキングと同じ色成分を持つ領域が、マーキング領域として抽出されてしまう。
The learning support device described in
一方、特許文献3と4に記載される技術によれば、文字と写真が混在した画像について、文字領域と写真領域に分離することができる。しかし、特許文献3に記載される技術は、文字領域にマーキングが付されていることを想定していないので、最大濃度差に基づいて分離するとマーキングされた文字領域が写真領域に分類される可能性がある。例えば上記特許文献2記載の文書画像からマーキング領域を抽出する技術の前処理として、特許文献3に記載される技術を組合せても、マーキングされた文字が誤って写真領域と判定されてしまうと、そもそも、マーキング領域を抽出する対象である文字領域から除外されてしまうので、マーキング領域を適切に抽出することができない。また、特許文献4に記載される技術は、カラーの文字やグラデーションの背景があっても、文字と写真の領域を分離することができるが、画像全体を2値化して文字領域における背景を無視するように処理するため、文字領域におけるマーキングは抽出することができない。
On the other hand, according to the techniques described in
このような課題を解決するための手段を以下に説明するが、その他の課題と新規な特徴は、本明細書の記述及び添付図面から明らかになるであろう。 Means for solving such problems will be described below, but other problems and novel features will become apparent from the description of the present specification and the accompanying drawings.
一実施の形態によれば、下記の通りである。 According to one embodiment, it is as follows.
すなわち、一部の文字列をその文字列の色とは異なる色の領域で覆うマーキングを施された文字列と絵柄を含む原稿画像に対して、原稿画像全体の領域における、輝度、色成分または輝度差の頻度分布を求め、その頻度分布に基づいて文字領域を特定する。 That is, with respect to a document image including a character string and a pattern that are marked so as to cover a part of the character string with a color region different from the color of the character string, the luminance, color component, or A frequency distribution of luminance differences is obtained, and a character region is specified based on the frequency distribution.
文字領域の特定のため、複数画素よりなる画像ブロック内の最大輝度と最小輝度の差である輝度差を原稿画像内の画素ごとに求める。輝度差が所定の範囲以上または以下にある画素の位置を文字領域であると一次判定し、さらに、その結果に基づいて、画像ブロックよりも大きい領域単位で、絵柄領域と文字領域とを分離する二次判定を行う。 In order to specify the character area, a luminance difference that is the difference between the maximum luminance and the minimum luminance in the image block composed of a plurality of pixels is obtained for each pixel in the document image. The position of a pixel whose luminance difference is within or below a predetermined range is primarily determined as a character area, and based on the result, the pattern area and the character area are separated in units of area larger than the image block. Make a secondary decision.
文字領域と特定された領域における、輝度、色成分または輝度差の頻度分布をさらに求め、その頻度分布に基づいて、マーカー領域を抽出する。 A frequency distribution of luminance, color component or luminance difference in the area specified as the character area is further obtained, and a marker area is extracted based on the frequency distribution.
前記一実施の形態によって得られる効果を簡単に説明すれば下記のとおりである。 The effect obtained by the one embodiment will be briefly described as follows.
すなわち、絵柄を含んだ原稿画像からであっても、一部にマーキングを施された文字列画像からマーカー領域を抽出することができる。 That is, even from a document image including a pattern, a marker region can be extracted from a character string image partially marked.
1.実施の形態の概要
先ず、本願において開示される代表的な実施の形態について概要を説明する。代表的な実施の形態についての概要説明で括弧を付して参照する図面中の参照符号はそれが付された構成要素の概念に含まれるものを例示するに過ぎない。
1. First, an outline of a typical embodiment disclosed in the present application will be described. Reference numerals in the drawings referred to in parentheses in the outline description of the representative embodiments merely exemplify what are included in the concept of the components to which the reference numerals are attached.
〔1〕<変化量区別処理+文字絵柄ブロック特定処理(画像処理LSI)>
一部の文字列(11)を前記文字列の色とは異なる色の領域(12)で覆うマーキングを施された文字列と絵柄(13、14)を含む原稿画像(101)から文字列をマーキングしているマーカー領域(15)を抽出する画像処理部(104)を備える画像処理LSI(200)であって、以下のとおり構成される。
[1] <Change amount distinguishing process + character / picture block specifying process (image processing LSI)>
A character string is extracted from an original image (101) including a character string and a pattern (13, 14) that are marked to cover a part of the character string (11) with an area (12) of a color different from the color of the character string. An image processing LSI (200) including an image processing unit (104) for extracting a marked marker region (15) is configured as follows.
前記画像処理部(104)は、前記メモリに格納されている前記原稿画像に対して前記原稿画像内の画素ごとに、前記画素を含む複数画素よりなる画像ブロック内の最大輝度と最小輝度の差を前記画素における輝度差として求める(ステップ2)。前記輝度差が第1閾値から第2閾値までの範囲にある画素の位置を絵柄領域と、前記輝度差が前記範囲外にある画素の位置を文字領域と、それぞれ一次判定する変化量区別処理を行う(ステップ3)。前記変化量区別処理によって一次判定された結果に基づいて、前記画像ブロックよりも大きい領域単位で、絵柄領域と文字領域とを二次判定する文字絵柄ブロック特定処理を行なう(ステップ4)。前記二次判定によって文字領域と判定された領域における、輝度または色の強度または輝度差の第1頻度分布に基づいて(ステップ5)、前記マーカー領域を抽出する(ステップ6)。 The image processing unit (104) is configured to, for each pixel in the document image with respect to the document image stored in the memory, a difference between a maximum luminance and a minimum luminance in an image block including a plurality of pixels including the pixel. Is obtained as a luminance difference in the pixel (step 2). A change amount distinguishing process in which a pixel position where the luminance difference is in a range from a first threshold value to a second threshold value is a pattern area, and a pixel position where the luminance difference is outside the range is a character area. Perform (Step 3). Based on the result of the primary determination by the change amount distinguishing process, a character / design block specifying process for secondary determination of the design area and the character area in units of areas larger than the image block is performed (step 4). Based on the first frequency distribution of luminance or color intensity or luminance difference in the area determined as the character area by the secondary determination (step 5), the marker area is extracted (step 6).
これにより、絵柄を含んだ原稿画像からであっても、一部にマーキングを施された文字列画像からマーカー領域を抽出することができる。 As a result, even from a document image including a pattern, a marker region can be extracted from a character string image partially marked.
〔2〕<原稿画像全体の輝度差のヒストグラムに基づく変化量区別処理>
項1において、前記画像処理部は、前記原稿画像の全領域を対象とした前記輝度差の第2頻度分布を算出し、前記第2頻度分布において、前記輝度差が0を含むピークの輝度差が大きい側の裾の輝度差を前記第1閾値とし、前記輝度差が最大値に近い側のピークの輝度差が小さい側の裾の輝度差を前記第2閾値として求める。
[2] <Change amount discrimination processing based on histogram of luminance difference of entire document image>
In
これにより、絵柄と一部にマーキングを施された文字列とが混在した原稿画像からであっても、精度よく文字領域を絵柄領域から分離することができる。 As a result, the character area can be accurately separated from the picture area even from a document image in which the picture and a character string with a part of the marking are mixed.
〔3〕<変化量区別処理における閾値の学習>
項1または2において、前記画像処理部は、前記第1閾値と前記第2閾値に初期値を与えその後入力される原稿画像ごとに適応的に前記第1閾値と前記第2閾値を更新する。
[3] <Learning of threshold value in change amount discrimination processing>
In
これにより、変化量区別処理において、前記第1閾値と前記第2閾値の適切な値を、短時間に算出することができる。 Thereby, in change amount distinction processing, the suitable value of the 1st threshold and the 2nd threshold can be computed in a short time.
〔4〕<ノイズ除去処理による文字絵柄ブロック特定処理>
項1において、前記文字絵柄ブロック特定処理は、前記変化量区別処理によって一次判定された結果が文字領域か否かを表す2値を前記原稿画像内の各画素について求めて2値画像を作成し、前記2値画像に対するノイズ除去処理を行う。
[4] <Character / pattern block identification processing by noise removal processing>
In
これにより、変化量区別処理よりも広い領域を対象とした、文字絵柄ブロック特定処理を行うことができる。 As a result, it is possible to perform the character / picture block specifying process targeting a wider area than the change amount distinguishing process.
〔5〕<膨張収縮処理を含む文字絵柄ブロック特定処理>
項4において、前記ノイズ除去処理は、前記2値画像に対する1回以上の膨張処理と、前記膨張処理後の同じ回数の収縮処理を含む。
[5] <Character / pattern block specifying process including expansion / contraction process>
In
これにより、簡便な画像信号処理によって、変化量区別処理よりも広い領域を対象とした、文字絵柄ブロック特定処理を行うことができる。 As a result, the character / picture block specifying process can be performed by a simple image signal process for a larger area than the change amount distinguishing process.
〔6〕<色成分ごとに行う文字領域のヒストグラム処理>
項1において、前記第1頻度分布は色の強度の頻度分布であり、前記第1頻度分布に基づいて、前記マーカー領域を抽出する。
[6] <Histogram processing of character area performed for each color component>
In
これにより、多様な濃さおよび色、さらには複数種類の色のマーカーで、文字にマーキングが施されている場合であっても、正確にマーカー領域を抽出することができる。 As a result, the marker region can be accurately extracted even when the characters are marked with various darkness and colors, and markers of a plurality of types of colors.
〔7〕<色成分ごとのヒストグラム処理+同じ色の画素の連続数>
項6において、前記第1頻度分布の同じ色強度の区分にある画素が、前記原稿画像内で連続する画素数に基づいて、前記マーカー領域を抽出する。
[7] <Histogram processing for each color component + continuous number of pixels of the same color>
In
これにより、文字領域分析処理において、正確に文字とマーカーを区別することができる。 Thereby, in a character area analysis process, a character and a marker can be distinguished correctly.
〔8〕<ノイズ除去処理を含む文字領域分析処理>
項1、項6または項7において、前記画像処理部は、前記第1頻度分布におけるピークの占める前記輝度または前記輝度差または前記色の強度の範囲に基づいて、画素ごとにマーカー領域と判定されるか否かによる2値画像を作成し、前記2値画像に対してノイズ除去処理を施して、前記マーカー領域を抽出する。
[8] <Character area analysis processing including noise removal processing>
In
これにより、文字領域におけるマーカー領域を、より正確に抽出することができる。 Thereby, the marker area in the character area can be extracted more accurately.
〔9〕<マーカー領域を覆う矩形領域生成>
項1乃至8のうちの1項において、前記マーカー領域の外周を囲む矩形領域を求め、前記原稿画像の画像データのうち、前記矩形領域の画像データの輝度もしくは色または輝度及び色を変更した、表示画像(16)を出力する。
[9] <Generate rectangular area covering marker area>
In one of
これにより、抽出したマーカー領域を覆う矩形領域を生成し、マーキングの施された文字を読めないように処理し、あるいは逆に強調して表示することができる。 As a result, a rectangular region covering the extracted marker region can be generated and processed so that the marked characters cannot be read, or conversely highlighted.
〔10〕<マーカー色登録領域>
項1乃至項9のうちの1項において、前記原稿画像内にマーカー登録領域(90)を設け、前記マーカー登録領域内における、輝度または輝度差または色の強度の第3頻度分布を算出し、前記第3頻度分布に基づいてマーカー領域と判定すべき輝度または輝度差または色の強度の範囲を求め、前記原稿画像から前記マーカー領域を抽出する。
[10] <Marker color registration area>
In one of
これにより、より簡便かつ確実にマーカー領域を抽出することができ、複雑な色が混ざった原稿において特定色の色を抽出することができ、より汎用性が高くなる。 Thereby, the marker area can be extracted more easily and reliably, the color of the specific color can be extracted from the original document mixed with complex colors, and the versatility becomes higher.
〔11〕<原稿の動きへのマーカー領域の追随処理>
項1乃至項10のうちの1項において、時系列的に撮像された複数のフレームを構成するそれぞれのフレームを前記原稿画像とする。前記画像処理部は、前記マーカー領域を抽出したフレームの原稿画像と、その後に撮像された後続フレームの原稿画像を比較して動きベクトルを抽出し、前記動きベクトルによって位置情報を補正したマーカー領域を前記後続フレームの原稿画像におけるマーカー領域とする。
[11] <Following processing of marker area to document movement>
In one of
これにより、全てのフレームごとにマーカー領域を抽出することなく、一つのマーカー領域の抽出結果を複数フレームに渡って利用することができる。 Thereby, the extraction result of one marker area can be used over a plurality of frames without extracting a marker area for every frame.
〔12〕<変化量区別処理+文字絵柄ブロック特定処理(画像処理システム)>
一部の文字列(11)を前記文字列の色とは異なる色の領域(12)で覆うマーキングを施された文字列と絵柄(13、14)を含む原稿画像(101)から文字列をマーキングしているマーカー領域(15)を抽出する画像処理システムであって、以下のとおり構成される。
[12] <Change amount distinguishing process + character / pattern block specifying process (image processing system)>
A character string is extracted from an original image (101) including a character string and a pattern (13, 14) that are marked to cover a part of the character string (11) with an area (12) of a color different from the color of the character string. An image processing system for extracting a marked marker region (15), which is configured as follows.
前記原稿画像に対して、前記原稿画像内の画素ごとに、前記画素を含む複数画素よりなる画像ブロック内の最大輝度と最小輝度の差を前記画素における輝度差として求める(ステップ2)。前記輝度差が第1閾値から第2閾値までの範囲にある画素の位置を絵柄領域と、前記輝度差が前記範囲外にある画素の位置を文字領域と、それぞれ一次判定する変化量区別処理を行う(ステップ3)。前記変化量区別処理によって一次判定された結果に基づいて、前記画像ブロックよりも大きい領域単位で、絵柄領域と文字領域とを二次判定する文字絵柄ブロック特定処理を行う(ステップ4)。前記二次判定によって文字領域と判定された領域における、輝度または色の強度または輝度差の第1頻度分布に基づいて(ステップ5)、前記マーカー領域を抽出する(ステップ6)。 For the original image, for each pixel in the original image, a difference between the maximum luminance and the minimum luminance in an image block composed of a plurality of pixels including the pixel is obtained as a luminance difference in the pixels (step 2). A change amount distinguishing process in which a pixel position where the luminance difference is in a range from a first threshold value to a second threshold value is a pattern area, and a pixel position where the luminance difference is outside the range is a character area. Perform (Step 3). Based on the result of the primary determination by the change amount distinguishing process, a character / pattern block specifying process is performed in which the pattern area and the character area are secondarily determined in units of areas larger than the image block (step 4). Based on the first frequency distribution of luminance or color intensity or luminance difference in the area determined as the character area by the secondary determination (step 5), the marker area is extracted (step 6).
これにより、絵柄を含んだ原稿画像からであっても、一部にマーキングを施された文字列画像からマーカー領域を抽出することができる。 As a result, even from a document image including a pattern, a marker region can be extracted from a character string image partially marked.
〔13〕<原稿画像全体の輝度差のヒストグラムに基づく変化量区別処理>
項12において、前記原稿画像の全領域を対象とした前記輝度差の第2頻度分布を算出し、前記第2頻度分布において、前記輝度差が0を含むピークの輝度差が大きい側の裾の輝度差を前記第1閾値とし、前記輝度差が最大値に近い側のピークの輝度差が小さい側の裾の輝度差を前記第2閾値として求める。
[13] <Change amount discrimination process based on histogram of luminance difference of entire document image>
In
これにより、絵柄と一部にマーキングを施された文字列とが混在した原稿画像からであっても、精度よく文字領域を絵柄領域から分離することができる。 As a result, the character area can be accurately separated from the picture area even from a document image in which the picture and a character string with a part of the marking are mixed.
〔14〕<ノイズ除去処理による文字絵柄ブロック特定処理>
項12において、前記文字絵柄ブロック特定処理は、前記変化量区別処理によって一次判定された結果が文字領域か否かを表す2値を前記原稿画像内の各画素について求めて2値画像を作成し、前記2値画像に対するノイズ除去処理を含む。
[14] <Character / pattern block identification processing by noise removal processing>
In the
これにより、変化量区別処理よりも広い領域を対象とした、文字絵柄ブロック特定処理を行うことができる。 As a result, it is possible to perform the character / picture block specifying process targeting a wider area than the change amount distinguishing process.
〔15〕<膨張収縮処理を含む文字絵柄ブロック特定処理>
項14において、前記ノイズ除去処理は、前記2値画像に対する1回以上の膨張処理と、前記膨張処理後の同じ回数の収縮処理を含む。
[15] <Character / pattern block specifying process including expansion / contraction process>
In
これにより、簡便な画像信号処理によって、変化量区別処理よりも広い領域を対象とした、文字絵柄ブロック特定処理を行うことができる。 As a result, the character / picture block specifying process can be performed by a simple image signal process for a larger area than the change amount distinguishing process.
〔16〕<ノイズ除去処理を含む文字領域分析処理>
項12において、輝度または色の強度または輝度差の前記第1頻度分布におけるピークの占める前記輝度または前記輝度差または前記色の強度の範囲に基づいて、画素ごとにマーカー領域と判定されるか否かによる2値画像を作成し、前記2値画像に対してノイズ除去処理を施して、前記マーカー領域を抽出する。
[16] <Character area analysis processing including noise removal processing>
In
これにより、文字領域におけるマーカー領域を、より正確に抽出することができる。 Thereby, the marker area in the character area can be extracted more accurately.
〔17〕<書画カメラ>
項12乃至項16のうちの1項において、前記画像処理システムは、カメラとメモリ(203)と表示装置(105、106)とをさらに備える。原稿を前記カメラによって撮像して入力して前記メモリに格納し、前記撮像された画像データにカラー信号処理(206)を施して前記原稿画像とし、前記原稿画像の画像データのうち、抽出した前記マーカー領域の画像データの輝度もしくは色または輝度及び色を変更した表示画像を前記表示装置に表示する。
[17] <Document camera>
In one of of
これにより、絵柄を含んだ原稿画像からであっても、一部にマーキングを施された文字列画像からマーカー領域を抽出し、抽出したマーカー領域の画像データに対して所望の信号処理をかけて表示することができる、書画カメラを提供することができる。 Thus, even from a document image including a pattern, a marker region is extracted from a character string image partially marked, and desired signal processing is performed on the image data of the extracted marker region. A document camera that can be displayed can be provided.
〔18〕<教師用表示と生徒用表示>
項17において、前記表示装置を第1表示装置(106)とし、前記画像処理システムはさらに第2表示装置(105)を備え、前記第2表示装置に前記原稿画像を表示する。
[18] <Teacher display and student display>
In Item 17, the display device is a first display device (106), and the image processing system further includes a second display device (105), and displays the original image on the second display device.
これにより、教師用と生徒用のそれぞれに相異なる画像を表示することができる。 Thereby, it is possible to display different images for the teacher and the student.
〔19〕<変化量区別処理+文字絵柄ブロック特定処理(画像処理方法)>
一部の文字列(11)を前記文字列の色とは異なる色の領域(12)で覆うマーキングを施された文字列と絵柄(13、14)を含む原稿画像(101)から文字列をマーキングしているマーカー領域(15)を抽出する画像処理方法であって、以下のとおり構成される。
[19] <Change amount distinguishing process + character / pattern block specifying process (image processing method)>
A character string is extracted from an original image (101) including a character string and a pattern (13, 14) that are marked to cover a part of the character string (11) with an area (12) of a color different from the color of the character string. An image processing method for extracting a marked marker region (15), which is configured as follows.
前記原稿画像に対して、前記原稿画像内の画素ごとに、前記画素を含む複数画素よりなる画像ブロック内の最大輝度と最小輝度の差を前記画素における輝度差として求める(ステップ2)。前記輝度差が第1閾値から第2閾値までの範囲にある画素の位置を絵柄領域と、前記輝度差が前記範囲外にある画素の位置を文字領域と、それぞれ一次判定する変化量区別処理を行う(ステップ3)。前記変化量区別処理によって一次判定された結果に基づいて、前記画像ブロックよりも大きい領域単位で、絵柄領域と文字領域とをそれぞれ二次判定する文字絵柄ブロック特定処理を行う(ステップ4)。前記文字領域における、輝度または色の強度または輝度差の頻度分布に基づいて(ステップ5)、前記マーカー領域を抽出する(ステップ6)。 For the original image, for each pixel in the original image, a difference between the maximum luminance and the minimum luminance in an image block composed of a plurality of pixels including the pixel is obtained as a luminance difference in the pixels (step 2). A change amount distinguishing process in which a pixel position where the luminance difference is in a range from a first threshold value to a second threshold value is a pattern area, and a pixel position where the luminance difference is outside the range is a character area. Perform (Step 3). Based on the result of the primary determination by the change amount distinguishing process, a character / pattern block specifying process is performed in which a pattern area and a character area are secondarily determined for each area larger than the image block (step 4). Based on the frequency distribution of luminance or color intensity or luminance difference in the character region (step 5), the marker region is extracted (step 6).
これにより、絵柄を含んだ原稿画像からであっても、一部にマーキングを施された文字列画像からマーカー領域を抽出することができる。 As a result, even from a document image including a pattern, a marker region can be extracted from a character string image partially marked.
〔20〕<原稿画像全体の輝度差のヒストグラムに基づく変化量区別処理>
項19において、前記原稿画像の全領域を対象とした前記輝度差の第2頻度分布を算出し、前記第2頻度分布において、前記輝度差が0を含むピークの輝度差が大きい側の裾の輝度差を前記第1閾値とし、前記輝度差が最大値に近い側のピークの輝度差が小さい側の裾の輝度差を前記第2閾値として求める。
[20] <Change amount discrimination processing based on histogram of luminance difference of entire document image>
In Item 19, a second frequency distribution of the luminance difference for the entire region of the original image is calculated, and in the second frequency distribution, the peak of the peak including the luminance difference of 0 on the side where the luminance difference is large is calculated. The luminance difference is set as the first threshold value, and the luminance difference at the bottom of the peak where the luminance difference is close to the maximum value is determined as the second threshold value.
これにより、絵柄と一部にマーキングを施された文字列とが混在した原稿画像からであっても、精度よく文字領域を絵柄領域から分離することができる。 As a result, the character area can be accurately separated from the picture area even from a document image in which the picture and a character string with a part of the marking are mixed.
〔21〕<ノイズ除去処理による文字絵柄ブロック特定処理>
項19において、前記文字絵柄ブロック特定処理は、前記変化量区別処理によって一次判定された結果が文字領域か否かを表す2値を前記原稿画像内の各画素について求めて2値画像を作成し、前記2値画像に対するノイズ除去処理を行う。
[21] <Character / pattern block identification processing by noise removal processing>
In item 19, the character picture block specifying process creates a binary image by obtaining a binary value indicating whether or not the result of the primary determination by the change amount distinguishing process is a character area for each pixel in the document image. Then, noise removal processing is performed on the binary image.
これにより、変化量区別処理よりも広い領域を対象とした、文字絵柄ブロック特定処理を行うことができる。 As a result, it is possible to perform the character / picture block specifying process targeting a wider area than the change amount distinguishing process.
〔22〕<膨張収縮処理を含む文字絵柄ブロック特定処理>
項21において、前記ノイズ除去処理は、前記2値画像に対する1回以上の膨張処理と、前記膨張処理後の同じ回数の収縮処理を含む。
[22] <Character / pattern block specifying process including expansion / contraction process>
In
これにより、簡便な画像信号処理によって、変化量区別処理よりも広い領域を対象とした、文字絵柄ブロック特定処理を行うことができる。 As a result, the character / picture block specifying process can be performed by a simple image signal process for a larger area than the change amount distinguishing process.
〔23〕<色成分ごとに行う文字領域のヒストグラム処理>
項19において、前記第1頻度分布は色の強度の頻度分布であり、前記第1頻度分布に基づいて、前記マーカー領域を抽出する。
[23] <Histogram processing of character area performed for each color component>
In Item 19, the first frequency distribution is a frequency distribution of color intensity, and the marker region is extracted based on the first frequency distribution.
これにより、多様な濃さおよび色、さらには複数種類の色のマーカーで、文字にマーキングが施されている場合であっても、正確にマーカー領域を抽出することができる。 As a result, the marker region can be accurately extracted even when the characters are marked with various darkness and colors, and markers of a plurality of types of colors.
〔24〕<色成分ごとのヒストグラム処理+同じ色の画素の連続数>
項23において、前記第1頻度分布の同じ色強度の区分にある画素が、前記原稿画像内で連続する画素数に基づいて、前記マーカー領域を抽出する。
[24] <Histogram processing for each color component + continuous number of pixels of the same color>
In
これにより、文字領域分析処理において、正確に文字とマーカーを区別することができる。 Thereby, in a character area analysis process, a character and a marker can be distinguished correctly.
〔25〕<ノイズ除去処理を含む文字領域分析処理>
項19において、輝度または色の強度または輝度差の前記第1頻度分布におけるピークの占める前記輝度または前記輝度差または前記色の強度の範囲に基づいて、画素ごとにマーカー領域と判定されるか否かによる2値画像を作成し、前記2値画像に対してノイズ除去処理を施して、前記マーカー領域を抽出する。
[25] <Character area analysis processing including noise removal processing>
In item 19, whether or not each pixel is determined to be a marker region based on the luminance, the luminance difference, or the color intensity range occupied by a peak in the first frequency distribution of luminance, color intensity, or luminance difference A binary image is created, and noise removal processing is performed on the binary image to extract the marker region.
これにより、文字領域におけるマーカー領域を、より正確に抽出することができる。 Thereby, the marker area in the character area can be extracted more accurately.
〔26〕<原稿画像全体のヒストグラムによる像域分離+文字領域のヒストグラムによるマーカー領域抽出(画像処理システム)>
一部の文字列(11)を前記文字列の色とは異なる色の領域(12)で覆うマーキングを施された文字列と絵柄(13、14)を含む原稿画像(101)から文字列をマーキングしているマーカー領域(15)を抽出する画像処理システムであって、以下のとおり構成される。
[26] <Image area separation by histogram of whole document image + marker area extraction by histogram of character area (image processing system)>
A character string is extracted from an original image (101) including a character string and a pattern (13, 14) that are marked to cover a part of the character string (11) with an area (12) of a color different from the color of the character string. An image processing system for extracting a marked marker region (15), which is configured as follows.
前記原稿画像に対して、前記原稿画像全体の領域における、輝度または色の強度または輝度差の第2頻度分布を求め、前記第2頻度分布に基づいて、前記原稿画像内の文字領域を特定する(ステップ2、3、4)。文字領域と特定された前記領域における、輝度または色の強度または輝度差の第1頻度分布に基づいて、前記マーカー領域を抽出する(ステップ5、6)。
A second frequency distribution of luminance or color intensity or luminance difference in the entire area of the original image is obtained for the original image, and a character area in the original image is specified based on the second frequency distribution. (
これにより、絵柄を含んだ原稿画像からであっても、一部にマーキングを施された文字列画像からマーカー領域を抽出することができる。 As a result, even from a document image including a pattern, a marker region can be extracted from a character string image partially marked.
〔27〕<変化量区別処理+文字絵柄ブロック特定処理による像域分離>
前記原稿画像全体の領域における画素単位で、文字領域か絵柄領域かを判断する変化量区別処理と、前記変化量区別処理による判断結果に基づく2値画像に対して、前記変化量区別処理の判断単位よりも広い領域を単位として文字領域か絵柄領域かを判断する文字絵柄ブロック特定処理により、文字領域を特定する。
[27] <Change amount distinction process + image area separation by character / pattern block identification process>
Judgment of the change amount distinguishing process for a binary image based on a result of determination by the change amount distinguishing process and a change result distinguishing process for judging whether the region is a character area or a picture area in units of pixels in the entire area of the original image The character area is specified by character / pattern block specifying processing for determining whether the area is wider than the unit or not.
これにより、マーカー領域における輝度や色が絵柄領域における輝度や色と共通する原稿であっても、正確に文字領域と絵柄領域を分離して文字領域を特定し、マーカー領域を精度よく抽出することができる。 As a result, even if the brightness and color in the marker area is the same as the brightness and color in the pattern area, the character area and the pattern area are accurately separated to identify the character area, and the marker area is extracted accurately. Can do.
〔28〕<原稿画像全体の輝度差のヒストグラムに基づく変化量区別処理>
項26または項27において、前記第2頻度分布において、前記輝度差が0を含むピークの輝度差が大きい側の裾の輝度差を前記第1閾値とし、前記輝度差が最大値に近い側のピークの輝度差が小さい側の裾の輝度差を前記第2閾値として求める。
[28] <Change amount discrimination processing based on histogram of luminance difference of entire document image>
In the
これにより、絵柄と一部にマーキングを施された文字列とが混在した原稿画像からであっても、精度よく文字領域を絵柄領域から分離することができる。 As a result, the character area can be accurately separated from the picture area even from a document image in which the picture and a character string with a part of the marking are mixed.
2.実施の形態の詳細
実施の形態について更に詳述する。
2. Details of Embodiments Embodiments will be further described in detail.
〔実施形態1〕
実施形態1について説明する。図1は実施形態1に係る画像処理の内容を示すフローチャートであり、図2は実施形態1の画像処理を書画カメラに適用した例におけるシステム全体の概要を表すブロック図であり、図3は画像処理部のハードウェア構成を表すブロック図であり、図4は実施形態1の画像処理を書画カメラに適用した例における画像処理の動作例を説明する模式図である。
The first embodiment will be described. FIG. 1 is a flowchart showing the contents of image processing according to the first embodiment, FIG. 2 is a block diagram showing an overview of the entire system in an example in which the image processing of the first embodiment is applied to a document camera, and FIG. FIG. 4 is a block diagram illustrating a hardware configuration of a processing unit. FIG. 4 is a schematic diagram illustrating an example of image processing operation in an example in which the image processing according to the first exemplary embodiment is applied to a document camera.
図2において、被写体である原稿101は、レンズなどの光学系102を通して撮像され、イメージセンサ103によって電気信号に変換され、画像処理部104で必要な信号処理を施された後、モニタA105及びモニタB106などに表示される。イメージセンサ103は、例えばCCDやCMOSセンサが一般的に用いられる。画像処理部104は、イメージセンサ103からの電気信号を元に画像の各種補正(クランプ、シェーディング補正、欠陥画素補正、色補正、γ補正など)を行う。教師用のモニタA105には、補正後の映像を出力する。生徒用のモニタB106には、教師用と同様の補正を行った後さらに本実施形態1に係る画像処理を施した画像を表示する。
In FIG. 2, a
図3は、図2に示したシステムのうち、画像処理部104のハードウェア構成の一例を表すブロック図である。CPU201、不揮発性メモリ202、DRAMなどのメモリ203、撮像系駆動制御部204、センサ画像入力部205、カラー信号処理部206、画像認識処理部207、および、表示画像処理部208が、バス209を介して接続されている。破線で囲まれた部分を1チップのLSI200で構成すると、不揮発メモリやDRAMなどを混在させる複雑な製造工程を採用する必要がない。一方、不揮発性メモリ202、DRAMなどのメモリ203を同一チップや同一モジュールに混載すると、実装面積と消費電力を抑えることができる。
FIG. 3 is a block diagram illustrating an example of a hardware configuration of the
CPU201は、LSI200全体のフローを制御し、また、LSI200内の各信号処理部204〜208の演算結果をもとに、次のプロセスのためのパラメータを算出するなどの演算を行う。不揮発性メモリ202は、CPU201のプログラムや初期パラメータ、定数データテーブルなどを格納するメモリである。メモリ203は、主に画像メモリとして使われる。撮像系駆動制御部204は、レンズのズーム制御やフォーカス制御、イメージセンサの動作モード、その他のタイミングの制御などを行う制御部である。センサ画像入力部205は、イメージセンサ103からの画素データを取り込むためのセンサ画像入力部であり、イメージセンサ103から入力された画像信号を画素ごとの画像データに整えて、メモリ203に格納する。カラー信号処理制御部206は、センサ画像入力部205がメモリ203に格納したデータを読み出して、映像信号に対し色をはじめとした各種補正(クランプ、シェーディング補正、欠陥画素補正、色補正、γ補正など)を行う。
The
画像認識処理部207は、入力画像を元に各種用途に応じてプログラマブルに処理を行うユニットで、主に画像認識を行う。画像認識には高いプログラマブル性が要求されることから、画像認識処理部207は、高性能のCPUか、更には処理のリアルタイム性を維持するためにより高速なプログラマブルデバイスで実現するのが好適である。特に、処理の並列性が高いため、SIMD(Single Instruction Multiple Dataflow)などのアーキテクチャを持つ、並列プロセッサを採用することもできる。この画像認識処理部207は、画像の中の特定の色、物体形状、動きベクトルの計測などを行うことが可能である。
The image
表示画像処理部208は、モニタで表示可能な画像サイズに画像の解像度を合わせ、さらにキャラクタ画像を重ねる処理などを適宜施して出力する。
The display
各信号処理部204〜208は、メモリ203に格納された画像データを読み出して処理を行い、結果をメモリ203に格納する。センサ画像入力、カラー信号処理、画像認識処理、表示画像処理は、入力される画像に対して順次実行される処理であるので、バス209のトラフィックを緩和するために、各処理部の間を専用のバスで接続してもよい。各信号処理部204〜208は、専用のハードウェアで演算処理を行うが、CPU201を演算性能の高いもの変更するか、別のプロセッサに置き換えて、それらの処理の一部もしくは全部をソフトウェアで実現しても良い。例えば、画像認識処理部207を構成する、プログラマブルユニットで、画像認識以外のセンサ画像入力、カラー信号処理、画像認識処理、表示画像処理などの処理の一部または全部を、実行させてもよい。
Each
図3に示した画像処理部104の動作をさらに詳しく説明する。
The operation of the
電源投入後、不揮発性メモリ202に格納されているプログラムにより、CPU201がブートされ動作可能となる。CPU201は全てのモジュールの初期設定を終えると、映像入力を可能とするシーケンスに移る。まず撮像系駆動制御部204に対して駆動開始の指示を行う。この指示を元に、撮像系駆動制御部204は、イメージセンサ103に対してモードの初期設定を行った後、水平同期信号、垂直同期信号などの各種タイミング信号を発行し、それに同期した映像入力信号を得る。
After the power is turned on, the
映像入力された信号は、センサ画像入力部205にて、センサから送信されるフォーマットでの画像を取り込み、本システムで扱える画素順(画素並び)や、フォーマット、タイミングに変換して一旦メモリ203に格納する。映像入力された信号をそのフォーマットのまま一旦メモリ203に格納し、そのデータを改めて読み出して、センサ画像入力部205にて画素順(画素並び)や、フォーマット、タイミングに変換してもよい。バス209上のデータ転送量であるトラフィックが増えるが、センサ画像入力部205の処理に対する時間的な制約は緩和される。
The image input signal is captured by the sensor
その後所定のフォーマットに変換された画像信号はカラー信号処理部206で様々な変換が行われる。例えば、入力される撮像信号の波形の所定の部分を一定の電圧に固定するクランプ処理、レンズ周辺での光量を補正するシェーディング補正、欠陥のある画素を抽出して補正する欠陥画素補正、映像の色合いを調整する色補正、ディスプレイに表示される画像などの彩度や明るさを修正するためのγ補正などである。カラー信号処理部206は、例えば、これらの信号処理を始めとする、映像信号のリアルタイム処理を実行するハードウェアで構成されている。これらの信号処理は、ソフトウェアで実行してもよい。カラー信号処理部206で処理された映像信号は、一旦画像メモリ203に格納される。
Thereafter, the color
格納されている画像はその後、画像認識処理部207に入力され、各種の認識処理を行う。画像認識処理部207では、目的とする出力が補正された画像、又は特定の量を表すパラメータを出力とすることができ、そのデータは再度メモリ203に格納される。
The stored image is then input to the image
表示画像処理部208は、画像メモリ203に格納された画像をそのままモニタへ出力したり、特定の領域や文字列を塗りつぶすためのキャラクタを重ね合わせたりする制御を行い、映像出力を行う。ここでの映像出力は目的に応じた映像を出力するために、複数の映像出力から構成することもできる。
The display
図4は実施形態1の画像処理を書画カメラに適用した例における画像処理の動作例を説明する模式図である。原稿101は、例えば(a)に示すように、説明文11と写真13、自然画14などを含んで構成されている。ここで説明文11には、例えば蛍光ペンで一部にマーキングが施されたマーカー領域12がある。本実施形態1に係る画像処理では、原稿画像101を読み込んで、(b)に示すようにマーカー領域15を抽出し、抽出したマーカー領域を例えば黒く塗りつぶした矩形領域16を生成し、(c)に示すように原稿画像101と重ね合せて生徒向けに表示する。教師は生徒に対して思考を促すために重要項目を始めは隠した状態で表示し、後に表示して見せることで、生徒に強く印象付けることができる。実施形態1に係る画像処理は、例えばこのような画像処理に応用することが可能な画像処理であって、一部にマーキングが施された文字列と写真や自然画などの絵柄を含む原稿画像101から、文字列をマーキングしているマーカー領域を抽出する。
FIG. 4 is a schematic diagram for explaining an operation example of image processing in an example in which the image processing of
図1は実施形態1に係る画像処理の内容を示すフローチャートであり、例えば図4に示した上記書画カメラの機能を実現するために、図2の画像処理部104、さらにその中でも図3の画像認識処理部207で実行される。原稿画像を読み込む(ステップ1)と、画素ごとの輝度差Pdを算出し(ステップ2)、これに基づいて変化量区別処理(ステップ3)を実行する。ここで原稿画像とは、センサから映像入力された画像そのものではなく、センサ画像入力部205で適切にフォーマット変換された画像を指し、カラー信号処理部207で適宜必要な補正処理を施された後の画像であってもよい。輝度差は後述するように、画像における輝度の空間的な(平面方向の)変化量を表すパラメータであり、これに基づいてそれぞれの画素が文字領域に位置しているか、絵柄領域に位置しているかを判定する。これは、画素ごとの微視的な判定であるので誤判定を生じやすく、一次判定と位置付ける。次に文字絵柄ブロック特定処理(ステップ4)を行う。これは上記一次判定結果を巨視的に見直す二次判定である。変化量区別処理(ステップ3)が画素ごとに判定したのに対して、それよりも大きな領域(広い領域)単位で判断し、文字領域と絵柄領域とに分離する。次に、文字領域分析処理(ステップ5)を行う。文字領域と判定された領域において、マーキングされた文字とマーキングされていない文字を区別し、マーカー領域を抽出する(ステップ6)。その後、マーカー領域内を覆う矩形領域の画像を生成し(ステップ7)、それを原稿画像に重ね合せて表示する(ステップ8)と、図4に示した、生徒向けに一部の文字列が隠された画像を生成することができる。
FIG. 1 is a flowchart showing the contents of image processing according to the first embodiment. For example, in order to realize the function of the document camera shown in FIG. 4, the
マーカー領域を適切に抽出することができれば、その後、マーカー領域を利用する他の処理に応用することもできる。例えば、文字列を隠すために文字の色をマーカーの色と同じ色に変換したり、文字を隠す代わりにマーカー領域を点滅させて強調したり、さらにマーキングされた文字列に対して文字認識を行って、文字や意味のデータとして扱うこともできる。 If the marker region can be appropriately extracted, it can be applied to other processes using the marker region thereafter. For example, the character color is converted to the same color as the marker color to hide the character string, the marker area is blinked and highlighted instead of hiding the character, and character recognition is performed on the marked character string. It can also be handled as character or semantic data.
原稿画像を文字領域と絵柄領域に分離する像域分離処理のうち、輝度差Pd算出処理(ステップ2)について、さらに詳しく説明する。原稿画像に対して、複数画素よりなる画像ブロックを定め、その画像ブロック内の最大輝度と最小輝度の差である輝度差を、原稿画像内の画素ごとに求める。例えば、m×n画素の最大値・最小値フィルタを用いて、m×n画素の矩形の画像ブロック内の最大輝度Pmaxと最小輝度Pminを求め、その差を輝度差Pd=Pmax−Pminとして算出し、m×n画像ブロックの中央の画素における輝度差とする。 Of the image area separation process for separating the document image into the character area and the picture area, the luminance difference Pd calculation process (step 2) will be described in more detail. An image block composed of a plurality of pixels is determined for the document image, and a brightness difference that is the difference between the maximum brightness and the minimum brightness in the image block is determined for each pixel in the document image. For example, the maximum luminance Pmax and the minimum luminance Pmin in an m × n pixel rectangular image block are obtained using an m × n pixel maximum / minimum value filter, and the difference is calculated as a luminance difference Pd = Pmax−Pmin. And the luminance difference at the center pixel of the m × n image block.
図5は、輝度差Pd算出処理の一例を示す説明図である。(a)は、3×3マトリクスの例である。中心の画素P4が着目画素であり、周囲画素P0〜P3およびP5〜P8を含む9画素について、各画素(9個)の輝度情報から最大輝度をPmax(P0:P8)、最小輝度をPmin(P0:P8)を算出する。比較には比較器などを使うと良い。算出したPmax(P0:P8)とPmin(P0:P8)から輝度差Pd=Pmax(P0:P8)−Pmin(P0:P8)を算出する。(b)に矢印で示すように、原稿画像全体を対象に、1ラインごとに着目画素を1画素ごとに水平方向にシフトするラスタースキャンを行い、上記と同様に画素ごとの輝度差を算出する。(b)は理想的に表示される文字の一部と格子状の画素を重ねて模式的に描いてあるが、画像データは画素ごとに輝度(Y)と色(Cr、CbまたはI、Qなど)、あるいは、RGBの三原色の強度成分情報で表される。輝度差算出処理は、輝度情報(Y)を対象とするのが一般的であるが、文字領域の文字の色、背景色、マーカーの色などによっては、色ごとの強度成分情報を用いることもできる。また、原稿画像の周辺部分を着目画素とすると、m×n画像ブロックの周辺画素のうちの一部の画素が原稿画像の範囲外となってしまって輝度情報が得られないこともあるが、周知の末端処理などにより補償するか、あるいは、輝度情報が得られている画素のみを考慮して最大値・最小値を求めてもよい。 FIG. 5 is an explanatory diagram illustrating an example of the luminance difference Pd calculation process. (A) is an example of a 3 × 3 matrix. The central pixel P4 is the pixel of interest, and for nine pixels including the surrounding pixels P0 to P3 and P5 to P8, the maximum luminance is Pmax (P0: P8) and the minimum luminance is Pmin (from the luminance information of each pixel (nine)). P0: P8) is calculated. Use a comparator for comparison. The brightness difference Pd = Pmax (P0: P8) −Pmin (P0: P8) is calculated from the calculated Pmax (P0: P8) and Pmin (P0: P8). As indicated by arrows in (b), a raster scan is performed in which the target pixel is shifted in the horizontal direction for each pixel for the entire original image, and the luminance difference for each pixel is calculated in the same manner as described above. . (B) is schematically drawn by superimposing a part of a character to be ideally displayed and a grid-like pixel, but image data has luminance (Y) and color (Cr, Cb or I, Q for each pixel. Or the intensity component information of the three primary colors of RGB. In general, the luminance difference calculation process targets luminance information (Y). However, depending on the character color, background color, marker color, etc. in the character area, intensity component information for each color may be used. it can. Further, when the peripheral portion of the original image and the pixel of interest, but also a part of pixels among the peripheral pixels m × n image block can not be obtained luminance information has become out of the range of the original image, Compensation may be performed by a known end process or the maximum value / minimum value may be obtained in consideration of only pixels for which luminance information is obtained.
像域分離処理のために、次に、輝度差Pd算出処理(ステップ2)の結果に対して、変化量区別処理(ステップ3)を行う。一般に文字領域に対しては以下の特徴がある。即ち、
特徴A: 文字上の隣接画素間の輝度はほぼ同じであり、輝度差Pdは0か極めて小さい。
特徴B: 文字の背景内の隣接画素間の輝度はほぼ同じであり、輝度差Pdは0か極めて小さい。
特徴C: 文字と背景の境界部分では、輝度差が大きい。
For the image area separation processing, next, change amount discrimination processing (step 3) is performed on the result of the luminance difference Pd calculation processing (step 2). In general, character areas have the following characteristics. That is,
Feature A: The luminance between adjacent pixels on the character is almost the same, and the luminance difference Pd is 0 or very small.
Feature B: The luminance between adjacent pixels in the background of the character is almost the same, and the luminance difference Pd is 0 or very small.
Feature C: There is a large luminance difference at the boundary between the character and the background.
一方、絵柄領域では、隣接画素の輝度はなだらかに変化する傾向があり輝度差は大きくない。 On the other hand, in the picture area, the luminance of adjacent pixels tends to change gently, and the luminance difference is not large.
上記の特徴に基づき、輝度差についての2つの閾値レベルTH1、TH2を定義して、以下に示す評価条件によって変化量区別処理を行う。TH1は一定色(文字、背景のどちらかに相当)を判定するための閾値レベルであり、TH2は文字と背景を区別するための閾値レベルである。
条件A: Pd≦TH1の場合、文字領域と判定する。
条件B: TH1<Pd≦TH2の場合、絵柄領域と判定する。
条件C: TH2<Pdの場合も文字領域と判定する。
Based on the above characteristics, two threshold levels TH1 and TH2 for the luminance difference are defined, and the change amount distinguishing process is performed according to the following evaluation conditions. TH1 is a threshold level for determining a certain color (corresponding to either character or background), and TH2 is a threshold level for distinguishing between a character and the background.
Condition A: When Pd ≦ TH1, the character area is determined.
Condition B: When TH1 <Pd ≦ TH2, the pattern area is determined.
Condition C: If TH2 <Pd, it is determined as a character area.
条件Aは、文字領域の背景又は文字のどちらかの領域であり、条件Cは、文字領域の文字と背景の境界領域である。 The condition A is either the background of the character area or the area of the character, and the condition C is a boundary area between the character and the background of the character area.
図6は、原稿画像の輝度差Pdの頻度分布を使って上記閾値を求める方法の説明図である。原稿画像全体について、輝度差Pdの頻度分布(ヒストグラム)を求める。横軸は輝度差を適当な範囲毎に刻んだもので、縦軸はその範囲に含まれる画素の数をカウントしたものである。短冊状のグラフとなるが、この包絡線を観察することにより、画像の特徴を抽出することができる。文字列が白地に黒文字で描かれているとすると、黒は輝度の最小値、白は輝度の最大値であるから、輝度差が最も小さいPd1の近傍のピークは、文字どうしまたは背景領域の白地どうしの輝度差であると考えられ、輝度差が最も大きいPd8の近傍のピークは、文字と背景の境界領域であると考えられる。その間の中間的な輝度差Pd4を中心とするなだらかなピークは、絵柄領域であると考えられる。自然画や写真では、極端に大きい輝度差や極端に小さい輝度差の頻度は小さく、画素間の輝度差は比較的中間的な値に広く分布しているのが一般的だからである。マーキングのない文字列のみからなる文字領域と自然画の絵柄領域とからなる原稿画像では、輝度差Pd1とPd8近傍の、2つのピークを含む包絡線81のような頻度分布となる。
FIG. 6 is an explanatory diagram of a method for obtaining the threshold value using the frequency distribution of the luminance difference Pd of the document image. A frequency distribution (histogram) of the luminance difference Pd is obtained for the entire document image. The abscissa represents the difference in luminance for each appropriate range, and the ordinate represents the number of pixels included in the range. Although it becomes a strip-like graph, the feature of an image can be extracted by observing this envelope. If the character string is drawn in black on a white background, black is the minimum luminance value and white is the maximum luminance value, so the peak near Pd1 with the smallest luminance difference is the white background between characters or the background area. It is considered that there is a luminance difference between them, and the peak in the vicinity of Pd8 having the largest luminance difference is considered to be a boundary region between the character and the background. A gentle peak centered on the intermediate luminance difference Pd4 is considered to be a pattern region. This is because in natural images and photographs, the frequency of extremely large or very small luminance differences is small, and the luminance difference between pixels is generally widely distributed in a relatively intermediate value. In a manuscript image composed of a character area consisting only of a character string without marking and a pattern area of a natural image, a frequency distribution such as an
文字領域がマーキングされた文字列を含む場合には、マーカーの輝度と色が決まると、それに応じて決まるマーカーと文字の輝度差とマーカーと背景の輝度差においてピークが現れる。マーカーの輝度と色は一定しているので、マーカーと文字の輝度差とマーカーと背景の輝度差は、それぞれ特定の値をとり、広く分布することはない。マーカー領域と文字の輝度差は白地の背景と文字の輝度差よりも小さいので、Pd8よりも低い側に新たなピークが現れる。マーカーの色が文字の黒と近い場合には、輝度差の小さいPd2近傍にピーク82が現れ、マーカーの色が薄く白地に近い場合には、例えばPd6近傍にピーク83が現れる。
When the character area includes a marked character string, when the brightness and color of the marker are determined, a peak appears in the brightness difference between the marker and the character and the brightness difference between the marker and the background determined accordingly. Since the brightness and color of the marker are constant, the brightness difference between the marker and the character and the brightness difference between the marker and the background take specific values and are not widely distributed. Since the brightness difference between the marker area and the character is smaller than the brightness difference between the white background and the character, a new peak appears on the side lower than Pd8. When the marker color is close to the black character, a
TH1は、一定色(文字、背景のどちらかに相当)を判定するための閾値レベルであり、TH2は、文字と背景を区別するための閾値レベルであるから、Pd2からPd3の範囲を中心に特にPd3の近傍にTH1を定め、Pd5からPd6の範囲を中心に特にPd5の近傍にTH2を定めると良い。画像認識処理では、輝度差Pd算出処理(ステップ2)の後若しくはこの処理と同時に頻度分布を求め、その頻度分布の特徴を解析することにより、閾値TH1とTH2を求めることができる。例えば、閾値の予想される範囲、Pd2からPd3の近傍までの範囲における包絡線の底からTH1を定め、Pd5からPd7の近傍までの範囲における包絡線の底からTH2を定めることができる。 TH1 is a threshold level for determining a certain color (equivalent to either character or background), and TH2 is a threshold level for distinguishing between a character and the background, so the range from Pd2 to Pd3 is the center. In particular, TH1 should be determined in the vicinity of Pd3, and TH2 should be determined in the vicinity of Pd5 around the range from Pd5 to Pd6. In the image recognition process, the threshold values TH1 and TH2 can be obtained by obtaining the frequency distribution after the luminance difference Pd calculation process (step 2) or simultaneously with this process and analyzing the characteristics of the frequency distribution. For example, TH1 can be determined from the bottom of the envelope in the expected range of the threshold, the range from Pd2 to the vicinity of Pd3, and TH2 can be determined from the bottom of the envelope in the range from Pd5 to the vicinity of Pd7.
図7は、変化量区別処理を実施した際の判定結果のイメージを示す説明図である。 FIG. 7 is an explanatory diagram illustrating an image of a determination result when the change amount distinguishing process is performed.
(a)は、文字領域11を拡大した図である。上側にマーカーなしの文字を、下側にマーキングを施された文字12を示す。格子1個が1画素を表し、文字は画素内に文字と背景との境界がある画素は実際には中間的な輝度となるが、図7では擬似的に文字そのものを表示している。(b)は(a)の画像に対して、上記の変化量区別処理を行った結果、上記条件Aおよび条件Cに該当し文字領域20と判定された画素を斜めの格子状のハッチングで表し、条件Bに該当して絵柄領域21と判定された画素を右上がりの斜めのハッチングで表している。(c)は絵柄領域を拡大した図であり、(b)と同様に(d)は、(c)の画像に対して変化量区別処理を行った結果、上記条件Aおよび条件Cに該当し文字領域と判定された画素20を斜めの格子状のハッチングで表し、条件Bに該当して絵柄領域と判定された画素21を右上がりの斜めのハッチングで表している。
(A) is the figure which expanded the
文字領域では、条件Aおよび条件Cに該当し文字領域と判定された画素20が多いものの、特にマーキングを施された文字の領域では、絵柄領域と判定される画素21が多い。マーキングを施された文字領域では、背景と文字の輝度差が、マーキングを施されておらず背景が白地の文字領域における輝度差よりも小さいため、TH2を下回って絵柄領域と判定されている。一方、絵柄領域でも、濃淡の変化が急な領域では、文字領域20と判定されている。例示していないが、輝度差がさらに小さくTH1を下回る領域では、絵柄領域でも文字領域と判定される。
In the character area, there are
以上のような誤判定は、変化量区別処理(ステップ3)では、画素ごとという局所領域について文字か絵柄かを判定するために発生する。これを一次判定と位置付ける。この一次判定結果に対して、文字絵柄ブロック特定処理(ステップ4)を行う。これは、画素ごとという局所領域について行った変化量区別処理よりも大きい領域(広い領域)を単位として、文字領域か絵柄領域かを判定する二次判定である。 The erroneous determination as described above occurs in the change amount distinguishing process (step 3) in order to determine whether the local area of each pixel is a character or a picture. This is regarded as primary determination. A character / pattern block specifying process (step 4) is performed on the primary determination result. This is a secondary determination for determining whether the area is a character area or a picture area in units of an area (wide area) larger than the change amount distinguishing process performed for the local area for each pixel.
図8は、像域分離処理の過程を示した説明図である。(a)は変化量区別処理(ステップ3)の実行前の原稿画像101である。(b)は変化量区別処理(ステップ3)の判定結果、(c)はさらに文字絵柄ブロック特定処理(ステップ4)を実行した判定結果である。変化量区別処理(ステップ3)では、(b)では、文字領域と判定された領域20の中に、絵柄領域と判定された微小な領域21が含まれ、絵柄領域と判定された領域21の中にも、文字領域と判定された微小な領域20が含まれている。(c)では、大きな領域ごとに文字領域と絵柄領域に分離されている。
FIG. 8 is an explanatory diagram showing the process of image area separation processing. (A) is the
文字絵柄ブロック特定処理(ステップ4)は、具体的には例えば、2値画像の膨張処理と収縮処理を行うことができる。膨張処理を複数回(複数画素数分)行い、その後同じ回数分(同じ画素数分)だけ収縮する処理をすることで、ノイズを取り除くことができる。図9は、2値画像の膨張処理と収縮処理の具体例を示す説明図である。変化量区別処理(ステップ3)による一次判定結果は、画素ごとに文字領域か絵柄領域かの2値で表されるので、2値画像として扱うことができる。(a)に示すように、右下がりのハッチングを施した領域22の中に、3×3画素の格子状のハッチングで示されたノイズによる微小領域23が含まれている例を取り上げる。右下がりのハッチングを施した領域22を1画素だけ膨張処理すると、四方に1画素ずつ膨張するとともに内側にも1画素ずつ膨張するので、格子状のハッチングで示された微小領域23は、浸食されて1×1画素の領域24になる。さらに1画素、(a)から2画素膨張処理を行うと、格子状のハッチングで示された微小領域は、浸食されて消失する(25)。ここから、1画素縮小処理をしても、一旦消失した格子状のハッチングで示された微小領域が再生することはなく、(d)に示すように、周囲から1画素ずつ縮小した領域となり、さらに1画素縮小処理をすると、(e)に示すように(a)と同じ大きさの領域で内側の3×3画素の微小領域、即ちノイズ領域が消失した画像を生成することができる。文字絵柄ブロック特定処理(ステップ4)に2値画像の膨張処理と収縮処理を行う場合には、文字領域を膨張処理後収縮処理し、さらに絵柄領域を膨張処理後収縮処理するなど、文字領域と絵柄領域のそれぞれについて、膨張・収縮処理を行う。膨張・収縮処理に代えて、多数決処理やフィルタ処理によっても、同様の効果を得ることができる。
Specifically, the character / pattern block specifying process (step 4) can perform, for example, an expansion process and a contraction process of a binary image. Noise can be removed by performing expansion processing a plurality of times (for a number of pixels) and then performing a contraction process for the same number of times (the same number of pixels). FIG. 9 is an explanatory diagram illustrating a specific example of a dilation process and a dilation process of a binary image. Since the primary determination result by the change amount distinguishing process (step 3) is represented by binary values of a character area or a picture area for each pixel, it can be handled as a binary image. As shown in (a), an example in which a
文字領域分析処理(ステップ5)について説明する。文字絵柄ブロック特定処理(ステップ4)によって文字領域と判定された領域において、輝度、色の強度または輝度差の頻度分布(ヒストグラム)を求める。
図10はヒストグラムの例で、横軸を輝度とし、輝度の範囲に含まれる画素数を縦軸にカウントしたものである。この時、背景、文字、マーカーの3つの輝度値が想定される。一般に文字領域における画素値のヒストグラムでは、背景色に相当する輝度値の画素数が一番多く、文字色とマーカーに相当する画素数がピークとして現れる。(a)はマーカーがない場合のヒストグラムの例であり、輝度値Y2に文字色の画素数のピークが現れ、輝度値Y6に背景色の画素数のピークが現れている。(b)はマーカーがある場合のヒストグラムの例であり、(a)の傾向に加えて、さらにマーカーの輝度値Y4に画素数のピークが現れている。
The character area analysis process (step 5) will be described. In a region determined as a character region by the character / pattern block specifying process (step 4), a frequency distribution (histogram) of luminance, color intensity, or luminance difference is obtained.
FIG. 10 shows an example of a histogram in which the horizontal axis represents luminance, and the number of pixels included in the luminance range is counted on the vertical axis. At this time, three luminance values of background, character, and marker are assumed. In general, in a histogram of pixel values in a character area, the number of pixels corresponding to a background color is the largest, and the number of pixels corresponding to a character color and a marker appears as a peak. (A) is an example of a histogram when there is no marker, and a peak of the number of pixels of the character color appears in the luminance value Y2, and a peak of the number of pixels of the background color appears in the luminance value Y6. (B) is an example of a histogram when there is a marker. In addition to the tendency of (a), a peak of the number of pixels appears in the luminance value Y4 of the marker.
もし、マーカー記入前の原稿画像が撮影されていれば、マーカー記入前の画像のヒストグラム(a)とマーカーが記入されたヒストグラム(b)を算出し、(a)と(b)のヒストグラムの比較を行うことで、マーカーの輝度を抽出することができる。これにより、マーカーの輝度を正確に抽出することができる。 If the original image before the marker entry is taken, the histogram (a) of the image before the marker entry and the histogram (b) where the marker is entered are calculated, and the histograms of (a) and (b) are compared. By performing the above, the brightness of the marker can be extracted. Thereby, the brightness | luminance of a marker can be extracted correctly.
一方、既にマーカー記入済みの(b)のヒストグラムしか得られない場合は、3つのピークを抽出することで、マーカーの領域を抽出することができる。即ち、輝度値Y3からY5の範囲内にある画素をマーカー領域の画素と判断することができる。分析対象の領域に絵柄が含まれていれば、輝度値Y3からY5の範囲に多くの画素が含まれる恐れがあるが、このステップでは、像域分離をした後の文字領域について分析を行っているので、輝度値Y3からY5の範囲に含まれる画素は、マーカー領域の画素であると判定することができる。仮に像域分離が不十分で誤差として絵柄が含まれていたとしても、その画素数は像域分離前に比べれば著しく少ないので、マーカー領域の判定に与える影響はほとんどない。 On the other hand, when only the histogram (b) in which the marker has already been entered is obtained, the marker region can be extracted by extracting three peaks. That is, it is possible to determine a pixel in the range of the luminance values Y3 to Y5 as a pixel in the marker area. If the area to be analyzed contains a pattern, there may be many pixels in the range of luminance values Y3 to Y5. In this step, the character area after image area separation is analyzed. Therefore, the pixels included in the range of the luminance values Y3 to Y5 can be determined as pixels in the marker area. Even if the image area separation is insufficient and a pattern is included as an error, the number of pixels is significantly smaller than that before the image area separation, so there is almost no influence on the determination of the marker area.
マーカー領域の特徴を、輝度についてのヒストグラムでは効率よく抽出することができない場合には、色成分のヒストグラムにより、マーカー領域を抽出することができる。マーカーは特徴的な色であることが多いからである。色成分のヒストグラムは、Y以外の色差成分であるCrとCbのヒストグラムを求めて判断することができる。さらに、色毎、例えばR(赤)成分での分析、G(緑)成分での分析、B(青)成分での分析を行うことでより精度よく抽出も可能である。YCrCbとRGBの間には線形の関係があり、3行3列の行列演算により簡単に相互に変換することができるので、輝度Y、色差成分CrとCbで抽出できなかった場合にRGBに変換してヒストグラムを求めればよい。 When the feature of the marker area cannot be extracted efficiently with the histogram of luminance, the marker area can be extracted with the histogram of color components. This is because the marker is often a characteristic color. The color component histogram can be determined by obtaining a histogram of Cr and Cb, which are color difference components other than Y. Furthermore, it is possible to extract with higher accuracy by performing analysis with each color, for example, analysis with an R (red) component, analysis with a G (green) component, and analysis with a B (blue) component. Since there is a linear relationship between YCrCb and RGB, it can be easily converted into each other by a 3-by-3 matrix operation, so if it cannot be extracted with luminance Y and color difference components Cr and Cb, it will be converted to RGB Then, a histogram can be obtained.
この他、ステップ2で算出した輝度差Pdについてのヒストグラムを求めて、マーカー領域に特徴的な輝度差を特定し、それに基づいてマーカー領域を抽出することもできる。さらに、変化量区別処理(ステップ3)の閾値を決めるために求めた、原稿画像全体の輝度差についてのヒストグラムからであっても、マーカー領域に特徴的な輝度差を特定することができれば、改めて文字領域のみのヒストグラムを求めることなく、マーカー領域を抽出することができる。一般に、マーカーと文字、マーカーと背景の輝度差は、中間値となり絵柄領域の輝度差との区別をつけることが困難であるが、絵柄領域がないか極めて小さい場合には、絵柄領域のヒストグラムにおける影響が小さいので、文字領域のみにおけるヒストグラム算出処理を省略することができる。
In addition, a histogram for the luminance difference Pd calculated in
マーカー領域抽出処理(ステップ6)について説明する。文字領域における輝度レベルをYinとし、マーカーの輝度の左端(最小)輝度レベルをML、右端(最大)輝度レベルをMRとして再度変換処理を行う。文字領域全体の画素について、ML ≦ Yin ≦ MRを満たすか否かを判断し、その結果を2値で表した2値画像を生成する。図11は、文字領域におけるマーカー領域抽出処理の過程を示す説明図である。図10の(b)の例において、輝度値Y4を中心とするピークがマーカー色であると判断されると、ML=Y3、MR=Y5として上記処理を行う。 The marker area extraction process (step 6) will be described. The conversion process is performed again with the brightness level in the character area as Yin, the left end (minimum) brightness level of the marker brightness as ML, and the right end (maximum) brightness level as MR. It is determined whether or not ML ≦ Yin ≦ MR is satisfied for the pixels in the entire character area, and a binary image representing the result in binary is generated. FIG. 11 is an explanatory diagram showing a process of marker area extraction processing in a character area. In the example of FIG. 10B, when it is determined that the peak centered on the luminance value Y4 is the marker color, the above processing is performed with ML = Y3 and MR = Y5.
図11において(a)は、上記処理により文字領域におけるマーカー部分を抽出した結果である。マーカー領域と判定された領域26を右下がりの太いハッチングで表し、それ以外の文字またはマーカーのない背景と判定された領域27を右上がりの細いハッチングで表している。画素ごとに、上記判定式を満たすか否かの判断を行うので、生成した2値画像でみると、画素単位のノイズ成分が含まれている。本来のマーカー以外に、たまたまマーカーと判断されるノイズレベルがある可能性もあるからである。その対策として、(a)の2値画像に対して、ノイズ除去フィルタを通して、ノイズ対策を行う。例えば、3×3マトリクスにおいては、9画素から中間の値にするメディアンフィルタや、9画素から多数決を取り、多いものに中心画素を置き換えていく多数決を取るフィルタなどが考えられる。これにより(b)のようにノイズ除去をしたマーカー領域を抽出することができる。
FIG. 11A shows the result of extracting the marker portion in the character area by the above processing. A
さらに、原稿画像全体に対して、以上の処理を行うことにより、複数存在するマーカー領域を抽出して、それぞれのマーカー領域の原稿画像における座標を算出することもできる。 Further, by performing the above processing on the entire document image, a plurality of marker regions can be extracted, and the coordinates of each marker region in the document image can be calculated.
マーカー領域内の矩形領域生成処理(ステップ7)について説明する。図12は、マーカー領域内の矩形領域生成処理(ステップ7)の処理過程を表す説明図である。(a)はマーカー領域抽出処理(ステップ6)で特定された座標から抽出した、マーカー領域に相当する画像である。この特定されたマーカー領域において、内部の文字を覆い隠すための矩形領域の生成を行う。(b)において、マーカー領域15とされる画素において、上下左右の頂点から上下左右の各辺を求め、上辺、下辺、左辺、右辺の各辺に囲まれる矩形の領域を全て同じ色にする。この時の色合いは、含まれる文字色と同一の色合いにする。この文字色は、図10のヒストグラムを解析して特定することができる。より精度を出すには、抽出したマーカー領域内において改めてヒストグラムを作成するなどでして確認しても良い。こうして特定した色によりマーカー領域全体を埋めたものが(c)となる。
A rectangular area generation process (step 7) in the marker area will be described. FIG. 12 is an explanatory diagram showing the process of rectangular area generation processing (step 7) in the marker area. (A) is an image corresponding to the marker region extracted from the coordinates specified in the marker region extraction process (step 6). In the specified marker area, a rectangular area for covering up the internal characters is generated. In (b), in the pixel to be the
これらの説明は1か所のマーカー領域について説明したが、複数のマーカー領域について同時に実行してもよい。通常マーカーの数は限られているため、限定した数量であればハードウェアで実現することもできる。ソフトウェアで処理する場合は、複数のマーカー領域を順次処理する。処理時間は長くなるが、専用ハードウェアは必要としない。 These descriptions have been made for one marker area, but a plurality of marker areas may be executed simultaneously. Usually, since the number of markers is limited, a limited number can be realized by hardware. When processing by software, a plurality of marker areas are sequentially processed. Processing time is increased, but no dedicated hardware is required.
矩形領域重ね合せ処理(ステップ8)について説明する。矩形領域決定後、この矩形データを通常出力画面に重ね合わせて表示する。マーカー領域内の矩形領域生成処理(ステップ7)によって生成された矩形領域のデータは、キャラクタ画像として画像メモリ203に格納される。一方、原稿画像をそのまま投影する通常の画面もこの画像メモリ203に格納されており、通常画面と矩形領域画面のデータを表示画像処理部208に送る。この表示画像処理部208では通常画面の画像データに矩形領域画面(キャラクタ画像)を上書し、モニタへの映像出力を行う。尚、この2つの画像重ね合せの例では、それぞれの画像を一旦画像メモリ203に格納し、表示画像処理部208で重ね合せているが、矩形領域画面(キャラクタ画像)については、画像メモリ203に格納せず、頂点乃至は始点、終点の座標を示すデータを表示処理部208に渡し、表示画像処理部208にて通常画面(原稿画像)における矩形領域の輝度を置き換える処理をしても良い。
The rectangular area overlapping process (step 8) will be described. After the rectangular area is determined, this rectangular data is displayed superimposed on the normal output screen. The data of the rectangular area generated by the rectangular area generating process (step 7) in the marker area is stored in the
矩形領域をマーカーの色から文字色に変更することにより文字を隠す処理について説明したが、マーカーの色を変更せず、文字の色をマーカーの色に変更して文字を読めないようにする処理に置き換えてもよい。 The process of hiding text by changing the rectangular area from the marker color to the text color has been explained. However, the text color is changed to the marker color without changing the marker color so that the text cannot be read. May be replaced.
以上のような処理フローにより、蛍光ペンなどのマーカーで塗り潰したマーカー領域に対して、自動で輝度・色を認識し画面の移動と共に追従させ、特定の領域を塗り潰した表示を行うことができる。これにより、色が混ざった原稿や、絵柄と文字が混在した原稿において、文字の領域を特定する手段を前処理として行い、特定文字列をマーキングした文字列に対して、自動的にマーカー認識を行い、塗り潰し表示をすることが可能となる。 With the processing flow as described above, it is possible to automatically recognize the brightness and color of the marker area painted with a marker such as a highlighter pen and follow it along with the movement of the screen, thereby performing display in which a specific area is filled. As a result, in a manuscript with mixed colors or a manuscript with mixed patterns and characters, a means for specifying the character area is used as a pre-process, and marker recognition is automatically performed on the character string marked with the specific character string. It is possible to fill and display.
〔実施形態2〕
画面の所定のエリアを使い、ユーザーに初期特定色をマーカー色として登録させ、登録色に相当する色領域を判別して、黒に置き換える。これにより、より簡便かつ確実にマーカー領域を抽出し、原稿画像上のマーキングされた文字列を覆い隠す処理を行うことができる。
[Embodiment 2]
Using a predetermined area of the screen, the user registers the initial specific color as a marker color, determines a color area corresponding to the registered color, and replaces it with black. As a result, it is possible to extract the marker region more easily and reliably and to perform a process of obscuring the marked character string on the document image.
図13と図14は、実施形態2に係る画像処理の経過の一例を示す説明図である。 13 and 14 are explanatory diagrams illustrating an example of the progress of image processing according to the second embodiment.
(a)はモニタAの映像である。モニタA105の映像には原稿画像をそのまま表示し、さらに、ユーザーに初期特定色をマーカー色として登録させる登録領域を示す枠を重ねて表示する。その際、登録領域90にマーカーの色を登録するよう促す。マーカー記載者が登録領域90にマーカー色を用紙に書き込む。ハードウェア側は、登録領域90の画像を抽出し、初期画像91として画像メモリ203に登録する。(b)は登録領域90にマーカーが記入された後のモニタA105の映像である。登録領域90の画像を抽出して、マーカー登録画像92として画像メモリ203に登録する。次に、画像メモリ203から初期画像91を読み出し、(c)に示すように画像認識処理部207において色相別のヒストグラムをとる。ヒストグラム情報は、画像メモリ203に初期画像91のヒストグラム情報として格納する。さらに、画像メモリ203からマーカー登録画像92を読み出し、(d)に示すように画像認識処理部207において色相別のヒストグラムをとる。ヒストグラム情報は、画像メモリ203にマーカー登録画像92のヒストグラム情報として格納する。初期画像91のヒストグラム情報とマーカー登録画像92のヒストグラム情報の差分をとる。図14の(e)にその差分を取った結果の一例を示す。+がマーカー登録画像92で初期画像91から増加した色相の増加分を表し、−は減少分を表す。一番大きく増加した色相をマーカーの色相と認識する。
(A) is an image of the monitor A. The original image is displayed as it is on the image of the
次に、原稿画像を撮像する。原稿画像は、(f)に示すように文字列11の一部に登録領域90を使って登録した色のマーキング12が施されている。撮像された原稿画像から色相mに相当する画素を検出し、検出された領域から更に、文字色を特定するために、(g)に示すように色相mに一致した画素が集中するマーカー領域を検出する。画像認識処理部207では、(h)に示すように入力された画像のヒストグラムを抽出する。ヒストグラムの抽出の結果、マーカー色(色相m)とマーキングを施された単語(文字列)の色相値がそれぞれピークを持つヒストグラムとなる。他方の色相pが文字の色を表す色相である。
Next, a document image is captured. As shown in (f), the original image has a color marking 12 registered using a
マーカー領域の色相mの画素を色相pに置き換えたキャラクタ画像16を生成する処理を行ない、これを表示画像処理部208において原稿画像と重ね合わせることにより、(i)に示すようにマーキングを施された文字列を覆い隠すことができる。
The
以降、本実施形態2では、センサから入力された映像をカラー信号処理部206の処理を経て画像メモリ203に格納した後(原稿画像)に、画像認識処理部207にて色相mを抽出した後に色相Pに置き換えたキャラクタを作成し、画像メモリ203に格納する(キャラクタ画像)。表示画像処理部208では、上記原稿画像を取り込み、キャラクタ画像を重ね合わせる処理を行い、映像出力を行って表示する。
Thereafter, in the second embodiment, after the video input from the sensor is stored in the
これにより、マーカー領域が登録領域90に制限されるので、より簡便かつ確実にマーカー領域を抽出することができ、複雑な色が混ざった原稿において特定色の色を抽出することができ、より汎用性が高くなる。
Accordingly, since the marker area is limited to the
〔実施形態3〕
原稿画像が移動しても、高速にマーカー領域を追尾して重ね合せ表示処理を行う実施形態について説明する。
[Embodiment 3]
An embodiment will be described in which the overlay display process is performed by tracking the marker area at high speed even when the document image moves.
図15と図16は、実施形態3に係る画像処理の経過の一例を示す説明図である。 15 and 16 are explanatory diagrams illustrating an example of the progress of the image processing according to the third embodiment.
初期の原稿画像を撮像し、画像メモリ203に参照画像として保存し、原稿画像の一部の文字列にマーキングを行い、その画像を撮像して画像メモリ203にマーキング済画像として保存する。
An initial document image is captured, stored as a reference image in the
画像認識処理部207において、画像メモリ203より参照画像とマーキング済画像を読み出す。画像の相関をとるために、画像の分割を行う。(a)に示すように参照画像の一部の領域を参照ブロック94とし、マーキング済画像の対応する領域を探索範囲95とする。(b)に示すように、探索範囲95には、種々の動きベクトル97の方向と大きさを想定した複数の対象ブロック96の画像を規定し、それぞれについて、参照ブロック94との間で差分絶対値総和(SAD:Sum of Absolute Difference)をとる。このSADの演算値が最小となる方向が動きベクトル97を表す。原稿画像全体をいくつかに分けて複数の参照ブロックをきめ、少なくとも2箇所以上でSAD演算を実行し、複数の結果から多数決演算などにより、全体の動き方向のベクトルを選ぶとよい。
The image
(c)に示すように、算出したベクトルから、参照画像とマーキング済画像の絶対座標のズレ量を算出し、このズレ量を元に参照画像の座標を補正する(ステップ98)。その後マーキング済画像から参照画像を減算する(ステップ99)。これにより、マーカー部分のみが抽出される。 As shown in (c), the amount of deviation between the absolute coordinates of the reference image and the marked image is calculated from the calculated vector, and the coordinates of the reference image are corrected based on this amount of deviation (step 98). Thereafter, the reference image is subtracted from the marked image (step 99). Thereby, only the marker part is extracted.
抽出したマーカー部分についての追尾処理を行う。図16の(d)に示すように1フレーム前の画像と現画像との差分に基づいて、移動ベクトルを算出する。具体的な算出方法は、図15の(a)と(b)を参照して説明した、動きベクトルの抽出と同様である。(e)に示すように、算出した移動ベクトル97に合わせてマーカー部分を塗りつぶしたキャラクタ画像16を移動させ、最新の原稿画像を追尾していく。これにより、全てのフレームごとにマーカー領域を抽出することなく、一つのマーカー領域の抽出結果を複数フレームに渡って利用することができる。一方、この追尾は、原稿画像が別の原稿に交換された場合に対応することができない。そこで、数フレームに1回の割合でマーカー領域の抽出を更新しながら行うことで、誤認識を改善することが可能である。
A tracking process is performed for the extracted marker portion. As shown in FIG. 16D, the movement vector is calculated based on the difference between the image one frame before and the current image. A specific calculation method is the same as the motion vector extraction described with reference to FIGS. 15A and 15B. As shown in (e), the
本実施形態3では、マーカーなしの原稿画像をベースとした差分を取ることにより、変更箇所のみに着目して塗り潰すため、複雑な色が混ざった原稿においても、色の誤認識が抑えられ、想定していなかった箇所の塗り潰しを防ぐことができる。また、周囲の照明条件の変動に対して、上述した実施形態1や実施形態2よりも精度よく塗り潰し箇所を特定することができる。また、追尾の処理は、全体の実施形態1の画像認識処理に比べて高速に行うことができる。 In the third embodiment, by taking a difference based on an original document image without a marker and painting only by paying attention to the changed portion, erroneous recognition of colors can be suppressed even in an original document mixed with complicated colors. It is possible to prevent the filling of the part that was not assumed. In addition, it is possible to specify the portion to be painted with higher accuracy than the first embodiment and the second embodiment described above with respect to fluctuations in ambient lighting conditions. Further, the tracking process can be performed at a higher speed than the image recognition process of the entire first embodiment.
〔実施形態4〕
実施形態1では、文字領域内の背景と文字の色レベルの判断を、輝度Yのみで判断したが、本実施形態4では3原色の色成分であるR、G、Bで判断する実施形態である。輝度Yだけでの比較に比べて、処理回路の増加、計算時間の増加がある一方、R、G、B成分での解析は情報が多い分、より精度よく認識される効果がある。図17は、実施形態4に係る文字領域内の背景と文字の色レベルの判断についての説明図であり、図18は、文字とマーカーの色の特定方法を示す説明図である。
[Embodiment 4]
In the first embodiment, the background in the character area and the color level of the character are determined only by the luminance Y, but in the fourth embodiment, the determination is made based on R, G, and B which are the three primary color components. is there. Compared with the luminance Y alone, there are an increase in processing circuits and an increase in calculation time. On the other hand, analysis with R, G, and B components has the effect of being recognized more accurately because of more information. FIG. 17 is an explanatory diagram for determining the background and the color level of a character in the character area according to the fourth embodiment, and FIG. 18 is an explanatory diagram illustrating a method for specifying the character and marker colors.
例えば、背景が白、文字が黒、マーカーがシアンと黄の2色であるとすると、RGBの3原色成分を3次元座標空間に表した場合、(a)に示すような分布となる。また、各画素におけるR、G、B各成分を仮に8bitとすると、3色で計24bitで色を表現することができる。この24bitと各色の対応は(b)に示すようになる。(b)のR、G、B各成分の各表記は16進で表した8bitのデータである。この24ビットを1次元の軸とみなして、文字領域における各画素のヒストグラムを取ると、(c)に示す通りとなる。 For example, assuming that the background is white, the characters are black, and the markers are two colors of cyan and yellow, when the RGB three primary color components are represented in a three-dimensional coordinate space, the distribution is as shown in (a). Further, assuming that each of R, G, and B components in each pixel is 8 bits, a color can be expressed with 3 colors in a total of 24 bits. The correspondence between 24 bits and each color is as shown in (b). Each notation of the R, G, and B components in (b) is 8-bit data expressed in hexadecimal. If these 24 bits are regarded as a one-dimensional axis and a histogram of each pixel in the character area is taken, the result is as shown in (c).
次に、(c)に示したヒストグラムで選別された4色からマーカーの色を特定する。まず、一般に文字領域における背景色が一番多くあることから、(c)において一番分布の多いものが背景となる。次に、文字の特定に移る。文字とマーカーは画素数については同程度であるのが一般的であるため、(c)のヒストグラムでは区別することができない。一方、空間的な画素の分布については、マーカーが互いに隣接した画素の連続になる傾向があるのに対し、文字は必ずしも隣接画素の連続が長くない特性を持つ。そこで、R、G、B各色において、ヒストグラムの同じ色区分にある画素が連続する画素数を、例えば水平方向にカウントする。図18の(a)の文字については、黒が連続した部分をカウントし、これをH_Aとする。同様に(b)のマーカーについてカウントしたものをH_B、(c)のマーカーについてカウントしたものをH_Cとする。それぞれのカウント値のヒストグラムをとると、それぞれ(d)(e)(f)のようになる。文字は、横方向の連続部分は少なく、且つ頻度は高い傾向がある。一方、マーカーは連続性がある反面、頻度は少ない方向である。この傾向を利用することにより、水平方向の連続する画素のカウント値のヒストグラムに基づいて、文字とマーカーの色を特定することができる。 Next, the color of the marker is specified from the four colors selected by the histogram shown in (c). First, since there are generally the most background colors in the character area, the background with the most distribution in (c) is the background. Next, the process moves to character specification. Since characters and markers generally have the same number of pixels, they cannot be distinguished from the histogram in (c). On the other hand, with respect to the spatial pixel distribution, the marker tends to be a series of adjacent pixels, whereas a character does not necessarily have a long continuous adjacent pixel. Therefore, for each of the R, G, and B colors, the number of pixels in which pixels in the same color section of the histogram continue is counted, for example, in the horizontal direction. For the character in FIG. 18 (a), the portion where black continues is counted, and this is designated as H_A. Similarly, H_B is counted for the marker (b), and H_C is counted for the marker (c). If the histogram of each count value is taken, it will become like (d), (e), and (f), respectively. Characters tend to be less frequent and more frequent in the horizontal direction. On the other hand, the marker is continuous, but the frequency is low. By utilizing this tendency, it is possible to specify the colors of characters and markers based on a histogram of count values of consecutive pixels in the horizontal direction.
これにより、輝度Yが同程度の文字色とマーカー色が複数混在する画像であっても、精度よくマーカー領域を抽出することができる。 Thereby, even in an image in which a plurality of character colors and marker colors having the same luminance Y are mixed, a marker region can be extracted with high accuracy.
〔実施形態5〕
図19は、実施形態1乃至4に例示される実施形態の技術を、書画カメラに応用したシステムの構成例である。(a)は、画像処理部104に2個の表示データ出力部208_1と208_2を搭載した書画カメラシステムで、教師用のモニタA105と、生徒用のモニタB106に互いに異なる画像を表示することができる。例えば、教師用のモニタA105には、マーカーを通して文字が読める状態で原稿画像をそのまま表示し、生徒用のモニタB106には、実施形態1乃至4に例示される実施形態の画像処理を行い、マーカー領域を塗りつぶして原稿画像においてマーキングされた文字列を覆い隠した状態で表示することができる。
[Embodiment 5]
FIG. 19 is a configuration example of a system in which the technique of the embodiment illustrated in the first to fourth embodiments is applied to a document camera. (A) is a document camera system in which two display data output units 208_1 and 208_2 are mounted on the
(b)は、1個の表示データ出力部208を備える。出力信号形式として、PC107へ一旦出力し、PC107を介してモニタまたはプロジェクタ106に表示することができる。
(B) includes one display
以上本発明者によってなされた発明を実施形態に基づいて具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能であることは言うまでもない。 Although the invention made by the present inventor has been specifically described based on the embodiments, it is needless to say that the present invention is not limited thereto and can be variously modified without departing from the gist thereof.
例えば、書画カメラにおいてマーキングされた文字列を、生成した矩形領域で覆い隠す処理について説明したが、他の画像処理システムにも同様に適用することができる。また、マーカー領域は、原稿画像の内容を覆い隠すために用いる代わりに、原稿画像の強調や文字認識のために用いることもできる。 For example, the process of obscuring the character string marked by the document camera with the generated rectangular area has been described, but the present invention can be similarly applied to other image processing systems. In addition, the marker area can be used for emphasizing the document image and for character recognition instead of using it to cover the contents of the document image.
1 原稿画像入力
2 輝度差Pd算出処理
3 変化量区別処理
4 文字絵柄ブロック特定処理
5 文字領域分析処理
6 マーカー領域抽出処理
7 マーカー領域内矩形領域生成処理
8 矩形領域重ね合せ処理
11 一部にマーキングを施された文字列
12 マーキングを施された文字列
13、14 絵柄領域
15 マーカー領域
16 キャラクタ画像
20 文字領域と判定された画素またはその領域
21 絵柄領域と判定された画素またはその領域
26 マーカー領域と判定された画素またはその領域
27 マーカー以外の文字またはマーカーのない背景と判定された画素またはその領域
90 マーカー色登録領域
94 参照ブロック
95 探索範囲
96 対象ブロック
97 動きベクトル
101 原稿画像
104 画像処理部
105、106 モニタ
200 画像処理LSI
203 メモリ
207 画像認識処理部
208 表示画像処理部
DESCRIPTION OF
203
Claims (16)
前記画像処理部は、
前記原稿画像に対して前記原稿画像内の画素ごとに、前記画素を含む複数画素よりなる画像ブロック内の最大輝度と最小輝度の差を前記画素における輝度差として求め、前記輝度差が第1閾値から第2閾値までの範囲にある画素の位置を絵柄領域と、前記輝度差が前記範囲外にある画素の位置を文字領域と、それぞれ一次判定する変化量区別処理を行い、
前記変化量区別処理によって一次判定された結果に基づいて、前記画像ブロックよりも大きい領域単位で、絵柄領域と文字領域とを二次判定する文字絵柄ブロック特定処理を行い、
前記二次判定によって文字領域と判定された領域における、輝度または色の強度または輝度差の第1頻度分布に基づいて、前記マーカー領域を抽出する、画像処理LSI。 An image processing unit is provided for extracting a marker region marking a character string from a document image including a character string and a pattern subjected to marking that covers a part of the character string with a color region different from the color of the character string. An image processing LSI,
The image processing unit
For each pixel in the original image with respect to the original image, a difference between the maximum luminance and the minimum luminance in an image block including a plurality of pixels including the pixel is obtained as a luminance difference in the pixels, and the luminance difference is a first threshold value. A change amount distinguishing process for primarily determining the position of a pixel in the range from the first threshold to the second threshold and the position of the pixel having the luminance difference outside the range as a character area,
Based on the result of the primary determination by the change amount distinguishing process, a character pattern block specifying process that secondarily determines a pattern area and a character area in a larger area unit than the image block,
An image processing LSI that extracts the marker area based on a first frequency distribution of luminance, color intensity, or luminance difference in an area determined as a character area by the secondary determination.
前記画像処理部は、前記マーカー領域を抽出したフレームの原稿画像と、その後に撮像された後続フレームの原稿画像を比較して動きベクトルを抽出し、前記動きベクトルによって位置情報を補正したマーカー領域を前記後続フレームの原稿画像におけるマーカー領域とする、画像処理LSI。 In claim 1, each frame constituting a plurality of frames imaged in time series is set as the original image,
The image processing unit extracts a motion vector by comparing a document image of a frame from which the marker region has been extracted with a document image of a subsequent frame that has been captured, and a marker region in which position information is corrected by the motion vector. An image processing LSI serving as a marker area in the document image of the subsequent frame .
前記原稿画像に対して、前記原稿画像内の画素ごとに、前記画素を含む複数画素よりなる画像ブロック内の最大輝度と最小輝度の差を前記画素における輝度差として求め、前記輝度差が第1閾値から第2閾値までの範囲にある画素の位置を絵柄領域と、前記輝度差が前記範囲外にある画素の位置を文字領域と、それぞれ一次判定する変化量区別処理を行い、 For the original image, for each pixel in the original image, a difference between a maximum luminance and a minimum luminance in an image block including a plurality of pixels including the pixels is obtained as a luminance difference in the pixels, and the luminance difference is a first luminance difference. A change amount distinguishing process for primarily determining the position of a pixel in a range from a threshold value to a second threshold value as a picture area and the position of a pixel in which the luminance difference is outside the range as a character area,
前記変化量区別処理によって一次判定された結果に基づいて、前記画像ブロックよりも大きい領域単位で、絵柄領域と文字領域とを二次判定する文字絵柄ブロック特定処理を行い、 Based on the result of the primary determination by the change amount distinguishing process, a character pattern block specifying process that secondarily determines a pattern area and a character area in a larger area unit than the image block,
前記二次判定によって文字領域と判定された領域における、輝度または色の強度または輝度差の第1頻度分布に基づいて、前記マーカー領域を抽出する、画像処理システム。 An image processing system that extracts the marker area based on a first frequency distribution of luminance or color intensity or luminance difference in an area determined as a character area by the secondary determination.
前記原稿画像に対して、前記原稿画像内の画素ごとに、前記画素を含む複数画素よりなる画像ブロック内の最大輝度と最小輝度の差を前記画素における輝度差として求め、前記輝度差が第1閾値から第2閾値までの範囲にある画素の位置を絵柄領域と、前記輝度差が前記範囲外にある画素の位置を文字領域と、それぞれ一次判定する変化量区別処理を行い、 For the original image, for each pixel in the original image, a difference between a maximum luminance and a minimum luminance in an image block including a plurality of pixels including the pixels is obtained as a luminance difference in the pixels, and the luminance difference is a first luminance difference. A change amount distinguishing process for primarily determining the position of a pixel in a range from a threshold value to a second threshold value as a picture area and the position of a pixel in which the luminance difference is outside the range as a character area,
前記変化量区別処理によって一次判定された結果に基づいて、前記画像ブロックよりも大きい領域単位で、絵柄領域と文字領域とをそれぞれ二次判定する文字絵柄ブロック特定処理を行い、 Based on the result of the primary determination by the change amount distinguishing process, a character pattern block specifying process that secondarily determines the pattern area and the character area in units of areas larger than the image block,
前記文字領域における、輝度または色の強度または輝度差の頻度分布に基づいて、前記マーカー領域を抽出する、画像処理方法。 An image processing method for extracting the marker area based on a frequency distribution of luminance or color intensity or luminance difference in the character area.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2012100950A JP5883715B2 (en) | 2012-04-26 | 2012-04-26 | Image processing LSI, image processing system, and image processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2012100950A JP5883715B2 (en) | 2012-04-26 | 2012-04-26 | Image processing LSI, image processing system, and image processing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2013229785A JP2013229785A (en) | 2013-11-07 |
| JP5883715B2 true JP5883715B2 (en) | 2016-03-15 |
Family
ID=49677011
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2012100950A Expired - Fee Related JP5883715B2 (en) | 2012-04-26 | 2012-04-26 | Image processing LSI, image processing system, and image processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5883715B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2017098928A (en) * | 2015-04-10 | 2017-06-01 | 株式会社リコー | Image forming apparatus and image forming method |
| JP6477585B2 (en) * | 2016-04-28 | 2019-03-06 | 京セラドキュメントソリューションズ株式会社 | Image processing apparatus and image processing system |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS62219766A (en) * | 1986-03-20 | 1987-09-28 | Fuji Xerox Co Ltd | Picture processor |
| JPH08102842A (en) * | 1994-09-29 | 1996-04-16 | Fuji Xerox Co Ltd | Marker detection device |
| JP3536165B2 (en) * | 1996-04-03 | 2004-06-07 | 株式会社リコー | Image processing device and image output device |
| JP4542976B2 (en) * | 2005-10-13 | 2010-09-15 | 株式会社リコー | Image processing apparatus, image processing method, image processing program, and recording medium |
-
2012
- 2012-04-26 JP JP2012100950A patent/JP5883715B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2013229785A (en) | 2013-11-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100947002B1 (en) | Image processing method and apparatus, digital camera, and recording medium recording image processing program | |
| US7489345B2 (en) | Image processing apparatus, image-taking system, image processing method and image processing program | |
| JP7255718B2 (en) | Information processing device, recognition support method, and computer program | |
| JP4715527B2 (en) | Imaging apparatus, image processing method and program for captured image | |
| WO2017214523A1 (en) | Mismatched foreign light detection and mitigation in the image fusion of a two-camera system | |
| JP2003061105A (en) | Image processing method, image processing program, image processing apparatus, and digital still camera using the same | |
| JP4386959B1 (en) | Image processing device | |
| JP4375322B2 (en) | Image processing apparatus, image processing method, program thereof, and computer-readable recording medium recording the program | |
| JP2019220887A (en) | Image processing system, image processing method, and program | |
| JP5541679B2 (en) | Image processing apparatus and method, and program | |
| CN114782502B (en) | A multi-spectral multi-sensor collaborative processing method and device, and storage medium | |
| KR20110023762A (en) | Image processing apparatus, image processing method and computer readable storage medium | |
| JP4747970B2 (en) | Image processing device | |
| JP5395650B2 (en) | Subject area extraction device and control method thereof, subject tracking device, and program | |
| JP5883715B2 (en) | Image processing LSI, image processing system, and image processing method | |
| CN101796542A (en) | Arrangement and method for procesing image data | |
| JP2005250628A (en) | Camera calibration pattern, apparatus and method | |
| EP2541469B1 (en) | Image recognition device, image recognition method and image recognition program | |
| JP7030425B2 (en) | Image processing device, image processing method, program | |
| JP2014225753A (en) | Marker detection device, marker detection method, and program | |
| JP7244301B2 (en) | Image processing device | |
| JP6118295B2 (en) | Marker embedding device, marker detection device, method, and program | |
| JP2014203341A (en) | Information terminal apparatus and recognition target | |
| JP7677003B2 (en) | Imaging device and model learning system | |
| CN113168675B (en) | Image processing device, image processing method and image processing program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150216 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20151203 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160106 |
|
| 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: 20160128 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160208 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 5883715 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |