JP2005204263A - Image processing apparatus and image processing method - Google Patents
Image processing apparatus and image processing method Download PDFInfo
- Publication number
- JP2005204263A JP2005204263A JP2004011037A JP2004011037A JP2005204263A JP 2005204263 A JP2005204263 A JP 2005204263A JP 2004011037 A JP2004011037 A JP 2004011037A JP 2004011037 A JP2004011037 A JP 2004011037A JP 2005204263 A JP2005204263 A JP 2005204263A
- Authority
- JP
- Japan
- Prior art keywords
- image data
- pixel
- processing
- filter
- line detection
- 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.)
- Withdrawn
Links
- 238000003672 processing method Methods 0.000 title claims description 3
- 238000001514 detection method Methods 0.000 claims abstract description 61
- 238000001914 filtration Methods 0.000 claims abstract description 10
- 238000000034 method Methods 0.000 claims description 26
- 230000006870 function Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 10
- 238000000926 separation method Methods 0.000 description 5
- GZPBVLUEICLBOA-UHFFFAOYSA-N 4-(dimethylamino)-3,5-dimethylphenol Chemical compound CN(C)C1=C(C)C=C(O)C=C1C GZPBVLUEICLBOA-UHFFFAOYSA-N 0.000 description 4
- 238000007781 pre-processing Methods 0.000 description 4
- 230000003044 adaptive effect Effects 0.000 description 3
- 238000009499 grossing Methods 0.000 description 3
- 238000012356 Product development Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000002250 progressing effect Effects 0.000 description 1
Images
Landscapes
- Color, Gradation (AREA)
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
Description
本発明は、画像データをフィルタ処理する技術に関する。 The present invention relates to a technique for filtering image data.
従来、原稿をスキャナ部によって読み取り、読み取った原稿の画像データに様々な画像処理を施し、プリンタ部から出力するデジタル複写機(複合機)が知られている。また、近年では、複写機の出力画像として、より高画質なものが求められるようになってきており、上述の画像処理の技術革新が進んでいる。 2. Description of the Related Art Conventionally, there has been known a digital copying machine (multifunction machine) that reads a document with a scanner unit, performs various image processing on image data of the read document, and outputs the image data from a printer unit. In recent years, a higher quality image is demanded as an output image of a copying machine, and the above-described technological innovation of image processing is progressing.
一方、製品の開発サイクルも短くなってきており、画像処理技術の開発に際しては、必要な追加機能に対応した画像処理機能を迅速に搭載していくことが望まれている。 On the other hand, the product development cycle is also becoming shorter, and it is desired to quickly install an image processing function corresponding to a necessary additional function when developing an image processing technique.
ところで、上述の画像処理では、複数の処理を順次行っており、一つ一つの処理の組み合わせによって成り立っている。そして、これらの一連の画像処理の中でもフィルタ処理が多用されており、フィルタサイズ、フィルタ数、入出力信号のビット数、二値化処理等の違いによって多種類のフィルタが用いられている。 By the way, in the above-mentioned image processing, a plurality of processes are sequentially performed, and each process is constituted by a combination. Of these series of image processing, filter processing is frequently used, and various types of filters are used depending on differences in filter size, number of filters, number of input / output signal bits, binarization processing, and the like.
例えば、原稿を画素単位に文字領域と網点領域(イメージ・グラフィック領域)とに分離する像域分離処理においては、文字領域を検出する前処理としてフィルタ処理を行った後、二つの閾値により二値化し、二つのエッジ信号を生成する必要がある。また同様に、網点領域を検出する前処理としてフィルタ処理を行った後、二つの閾値により二値化し、二つのエッジ信号を生成する必要がある。また、網点画像内に存在する文字領域を検出する処理として、網点画像が黒線上にない場合にはフィルタ処理を行い、黒線上にある場合にはフィルタ処理を行わない「適応的スムージング処理」を行った後、更にフィルタ処理を行い、一つの閾値に対して二値化し、網点内文字判定信号を生成する処理を行う必要がある。また、これらの像域分離処理によって出力される像域信号からフィルタを選択する処理が行われている(例えば、特許文献1参照)。
しかしながら、上記従来技術に記載したように、像域分離処理の結果から得られた像域信号によってフィルタの選択を行う画像処理、網点画像内の文字領域検出等の画像処理を実行するために複数の異なる空間フィルタやその周辺処理をそれぞれ設けることになる。
特に、線検出機能と空間フィルタ処理が分離していることにより、線検出結果に応じたフィルタ切り替えを行い、高速な適応的スムージング処理を行うことが困難であった。
However, as described in the above prior art, in order to perform image processing such as image processing for selecting a filter based on the image area signal obtained from the result of the image area separation processing, and character area detection in a halftone image. A plurality of different spatial filters and their peripheral processing are provided.
In particular, since the line detection function and the spatial filter processing are separated, it is difficult to perform high-speed adaptive smoothing processing by performing filter switching according to the line detection result.
本発明は、上記課題を解決するためになされたもので、空間フィルタ処理に線検出機能を付加することを目的とする。 The present invention has been made to solve the above-described problems, and an object thereof is to add a line detection function to the spatial filter processing.
本発明の画像処理装置は、所定領域の画像データに基づき、当該所定領域における注目画素が線を構成する画素か否かを検出する線検出手段と、前記所定領域の画像データに対してフィルタ処理を行う処理手段と、前記線検出手段での検出結果に応じて、前記フィルタ処理された画像データか、未処理の画像データの何れかを選択して出力する選択手段とを有することを特徴とする。 An image processing apparatus according to the present invention includes: line detection means for detecting whether or not a pixel of interest in a predetermined area is a pixel constituting a line based on image data of the predetermined area; and filtering processing for the image data of the predetermined area And a selection unit that selects and outputs either the filtered image data or the unprocessed image data according to the detection result of the line detection unit. To do.
また、本発明の画像処理方法は、所定領域の画像データに基づき、当該所定領域における注目画素が線を構成する画素か否かを検出する線検出工程と、前記所定領域の画像データに対してフィルタ処理を行う処理工程と、前記線検出工程における検出結果に応じて、前記フィルタ処理された画像データか、未処理の画像データの何れかを選択して出力する選択工程とを有することを特徴とする。 According to the image processing method of the present invention, a line detection step of detecting whether or not a pixel of interest in the predetermined area is a pixel constituting a line based on the image data of the predetermined area, and the image data of the predetermined area A processing step of performing a filtering process, and a selection step of selecting and outputting either the filtered image data or the unprocessed image data according to a detection result in the line detection step. And
本発明によれば、空間フィルタ処理に線検出機能を付加することにより、同一のモジュール構成で複数種類の画像処理に対応させることができる。 According to the present invention, by adding a line detection function to the spatial filter processing, it is possible to cope with a plurality of types of image processing with the same module configuration.
以下、図面を参照しながら発明を実施するための最良の形態について詳細に説明する。まず、第1の実施形態として、所定領域内の画像信号に対して線検出を行い、注目画素が線上にある場合はフィルタ処理していない信号を出力し、線上にない場合はフィルタ処理した信号を出力する「適応的スムージング処理」を実現し、またフィルタ処理した信号を二値化する画像処理モジュールについて説明する。 The best mode for carrying out the invention will be described below in detail with reference to the drawings. First, as a first embodiment, line detection is performed on an image signal in a predetermined area, and a signal that is not filtered is output when the pixel of interest is on the line, and a filtered signal is output when the pixel of interest is not on the line. An image processing module that realizes “adaptive smoothing processing” for outputting the signal and binarizes the filtered signal will be described.
[第1の実施形態]
図1は、第1の実施形態における画像処理モジュールの構成の一例を示すブロック図である。図1において、102はメモリであり、所定領域内の画像信号を一時的に保持する。101はメモリコントローラであり、メモリ102に対する画像信号の書き込み或いはメモリ102からの画像信号の読み出しを制御する。103は線検出処理部であり、所定領域内の縦方向、横方向の線を検出する。104はフィルタ処理部であり、所定領域内の画像信号に対して空間フィルタ処理を行う。105は二値化処理部であり、フィルタ処理部104でフィルタ処理された画像信号を二値化する。106はクリップ処理部であり、フィルタ処理部104でフィルタ処理された画像信号に対してオーバーフロー又はアンダーフロー処理を行う。107はセレクタであり、線検出処理部103での判定結果によりフィルタ処理部104でフィルタ処理され、クリップ処理部106でクリップ処理された信号か、フィルタ処理される前の信号の何れかを選択する。
[First Embodiment]
FIG. 1 is a block diagram illustrating an example of a configuration of an image processing module according to the first embodiment. In FIG. 1,
以上の構成において、メモリコントローラ101は、画像処理モジュールへ1画素単位で順次入力されてくる1ライン分の画素信号と、メモリ102にすでに書き込まれている4ライン分の画素信号とを同期させて読み出し、計5ライン分の画素信号を線検出処理部103及びフィルタ処理部104へ出力すると共に、次のラインが入力されてきたときに使用する4ライン分の画素信号をメモリ102に書き込む。
In the above configuration, the
このように、メモリコントローラ101によって読み出された5ライン分の画素信号は線検出処理部103へ入力され、線検出処理部103が、連続する5画素の画素信号の差が少なく平坦で、かつ、注目画素を含む5画素の画素信号レベルが低ければ、黒い線上に注目画素があると判定する。
In this way, the pixel signals for five lines read by the
図2は、線検出処理部103で処理される領域内の画素配置を示す図である。図2において、d00〜d44は5×5画素領域内の各画素の画素値を示し、以下の演算を行う。まず各列の画素値に対して演算を行う。
FIG. 2 is a diagram illustrating a pixel arrangement in an area processed by the line
ここで、max(A,B,C,D,E)は画素値A,B,C,D,Eのうちの最大値を示し、またmin(A,B,C,D,E)は画素値A,B,C,D,Eのうちの最小値を示す。 Here, max (A, B, C, D, E) represents the maximum value among the pixel values A, B, C, D, E, and min (A, B, C, D, E) represents the pixel. The minimum value among the values A, B, C, D, and E is shown.
0列の5画素の画素値より
TL_MAX = max(d00, d10, d20, d30, d40)
TL_MIN = min(d00, d10, d20, d30, d40)
TL_ALL = d00 + d10 + d20 + d30 + d40
2列の5画素の画素値より
TC_MAX = max(d02, d12, d22, d32, d42)
TC_MIN = min(d02, d12, d22, d32, d42)
TC_ALL = d02 + d12 + d22 + d32 + d42
4列の5画素の画素値より
TR_MAX = max(d04, d14, d24, d34, d44)
TR_MIN = min(d04, d14, d24, d34, d44)
TR_ALL = d04 + d14 + d24 + d34 + d44
1列の5画素の画素値より
TLC_MAX = max(d01, d11, d21, d31, d41)
TLC_MIN = min(d01, d11, d21, d31, d41)
3列の5画素の画素値より
TRC_MAX = max(d03, d13, d23, d33, d43)
TRC_MIN = min(d03, d13, d23, d33, d43)
以上の算出された値とあらかじめ設定された閾値TMML,TLMTとから、以下の条件1又は条件2が満たされた場合は縦線があると判定し、縦線検出信号TD=1となる。また、条件1,2の何れも満たさない場合は縦線がないと判定し、縦線検出信号TD=0となる。
From the pixel value of 5 pixels in row 0
TL_MAX = max (d00, d10, d20, d30, d40)
TL_MIN = min (d00, d10, d20, d30, d40)
TL_ALL = d00 + d10 + d20 + d30 + d40
From the pixel values of 5 pixels in 2 rows
TC_MAX = max (d02, d12, d22, d32, d42)
TC_MIN = min (d02, d12, d22, d32, d42)
TC_ALL = d02 + d12 + d22 + d32 + d42
From pixel values of 5 pixels in 4 rows
TR_MAX = max (d04, d14, d24, d34, d44)
TR_MIN = min (d04, d14, d24, d34, d44)
TR_ALL = d04 + d14 + d24 + d34 + d44
From the pixel value of 5 pixels in 1 row
TLC_MAX = max (d01, d11, d21, d31, d41)
TLC_MIN = min (d01, d11, d21, d31, d41)
From pixel values of 5 pixels in 3 rows
TRC_MAX = max (d03, d13, d23, d33, d43)
TRC_MIN = min (d03, d13, d23, d33, d43)
From the above calculated values and preset threshold values TMML and TLMT, when the following condition 1 or condition 2 is satisfied, it is determined that there is a vertical line, and the vertical line detection signal TD = 1. If neither of the conditions 1 and 2 is satisfied, it is determined that there is no vertical line, and the vertical line detection signal TD = 0.
条件1
TL_MAX -TL_MIN ≦ TMML かつ
TLC_MAX -TLC_MIN ≦ TMML かつ
TC_MAX -TC_MIN ≦ TMML かつ
TL_ALL -TC_ALL ≧ TLMT*5
条件2
TR_MAX -TR_MIN ≦ TMML かつ
TRC_MAX -TRC_MIN ≦ TMML かつ
TC_MAX -TC_MIN ≦ TMML かつ
TR_ALL -TC_ALL ≧ TLMT*5
次に、上述した各列の演算と同様に、各行の画素値に対して演算を行う。
Condition 1
TL_MAX -TL_MIN ≤ TMML and
TLC_MAX -TLC_MIN ≤ TMML and
TC_MAX -TC_MIN ≤ TMML and
TL_ALL -TC_ALL ≧ TLMT * 5
Condition 2
TR_MAX -TR_MIN ≤ TMML and
TRC_MAX -TRC_MIN ≤ TMML and
TC_MAX -TC_MIN ≤ TMML and
TR_ALL -TC_ALL ≥ TLMT * 5
Next, similarly to the calculation of each column described above, the calculation is performed on the pixel value of each row.
0行の5画素の画素値より
YU_MAX = max(d00, d01, d02, d03, d04)
YU_MIN = min(d00, d01, d02, d03, d04)
YU_ALL = d00 + d01 + d02 + d03 + d04
2行の5画素の画素値より
YC_MAX = max(d20, d21, d22, d23, d24)
YC_MIN = min(d20, d21, d22, d23, d24)
YC_ALL = d20 + d21 + d22 + d23 + d24
4行の5画素の画素値より
YS_MAX = max(d40, d41, d42, d43, d44)
YS_MIN = min(d40, d41, d42, d43, d44)
YS_ALL = d40 + d41 + d42 + d43 + d44
1行の5画素の画素値より
YUC_MAX = max(d10, d11, d12, d13, d14)
YUC_MIN = min(d10, d11, d12, d13, d14)
3行の5画素の信号より
YSC_MAX = max(d30, d31, d32, d33, d34)
YSC_MIN = min(d30, d31, d32, d33, d34)
以上の算出された値とあらかじめ設定された閾値YMML,YLMTとから、以下の条件1又は条件2が満たされた場合は横線があると判定し、横線検出信号YD=1となる。また、条件1,2の何れも満たさない場合は横線がないと判定し、横線検出信号YD=0となる。
From the pixel value of 5 pixels in 0 row
YU_MAX = max (d00, d01, d02, d03, d04)
YU_MIN = min (d00, d01, d02, d03, d04)
YU_ALL = d00 + d01 + d02 + d03 + d04
From pixel values of 5 pixels in 2 rows
YC_MAX = max (d20, d21, d22, d23, d24)
YC_MIN = min (d20, d21, d22, d23, d24)
YC_ALL = d20 + d21 + d22 + d23 + d24
From pixel values of 5 pixels in 4 rows
YS_MAX = max (d40, d41, d42, d43, d44)
YS_MIN = min (d40, d41, d42, d43, d44)
YS_ALL = d40 + d41 + d42 + d43 + d44
From the pixel value of 5 pixels in one row
YUC_MAX = max (d10, d11, d12, d13, d14)
YUC_MIN = min (d10, d11, d12, d13, d14)
From 3 pixels of 5 pixels signal
YSC_MAX = max (d30, d31, d32, d33, d34)
YSC_MIN = min (d30, d31, d32, d33, d34)
From the above calculated values and preset threshold values YMML and YLMT, if the following condition 1 or condition 2 is satisfied, it is determined that there is a horizontal line, and the horizontal line detection signal YD = 1. If neither of the conditions 1 and 2 is satisfied, it is determined that there is no horizontal line, and the horizontal line detection signal YD = 0.
条件1
YU_MAX -YU_MIN ≦ YMML かつ
YUC_MAX -YUC_MIN ≦ YMML かつ
YC_MAX -YC_MIN ≦ YMML かつ
YU_ALL -YC_ALL ≧ YLMT*5
条件2
YS_MAX -YS_MIN ≦ YMML かつ
YSC_MAX -YSC_MIN ≦ YMML かつ
YC_MAX -YC_MIN ≦ YMML かつ
YS_ALL -YC_ALL ≧ YLMT*5
以上の演算により、線検出信号SELは、上記縦線検出信号TD、横線検出信号YDから、
SEL = TD or YD
となり、縦線又は横線がある場合、線検出信号SEL=1となる。
Condition 1
YU_MAX -YU_MIN ≤ YMML and
YUC_MAX -YUC_MIN ≤ YMML and
YC_MAX -YC_MIN ≤ YMML and
YU_ALL -YC_ALL ≧ YLMT * 5
Condition 2
YS_MAX -YS_MIN ≤ YMML and
YSC_MAX -YSC_MIN ≤ YMML and
YC_MAX -YC_MIN ≤ YMML and
YS_ALL -YC_ALL ≥ YLMT * 5
Through the above calculation, the line detection signal SEL is derived from the vertical line detection signal TD and the horizontal line detection signal YD.
SEL = TD or YD
When there is a vertical line or a horizontal line, the line detection signal SEL = 1.
次に、線検出処理部103と同様に、メモリコントローラ101によって読み出された5ライン分の画素信号を入力する、フィルタ処理部104において行われるフィルタ演算について説明する。
Next, similarly to the line
図3は、フィルタ処理部104のフィルタ演算において各画素に対応するフィルタ係数を示す図である。図3において、c00〜c44は5×5画素領域内の各画素のフィルタ係数を示し、以下の演算を行う。
FIG. 3 is a diagram illustrating filter coefficients corresponding to each pixel in the filter calculation of the
f22 = Σ cij * dij (i,j=0〜4)
ここで、フィルタ係数c00〜c44は符号付きであり、負の数も取りうるので演算結果のf22も符号付きである。
f22 = Σcij * dij (i, j = 0 ~ 4)
Here, since the filter coefficients c00 to c44 are signed and can take a negative number, the calculation result f22 is also signed.
次に、二値化処理部105において、フィルタ処理部104でフィルタ演算された信号f22を入力し、第1の閾値THRES1及び第二の閾値THRES2と比較し、
f22<THRES1 ならば edge1=1、そうでない場合はedge1=0となり、
f22>THRES2 ならば edge2=1、そうでない場合はedge2=0となる。
Next, in the
If f22 <THRES1, edge1 = 1, otherwise edge1 = 0,
If f22> THRES2, then edge2 = 1, otherwise edge2 = 0.
また、クリップ処理部106では、符号付きのフィルタ処理された信号f22のオーバーフロー又はアンダーフロー処理を行い、あらかじめ設定された値DMAXと比較し、
f22<0 ならば 0を、f22>DMAX ならばDMAXを、0≦f22≦DMAXならば、f22を出力する。
Further, the
If f22 <0, 0 is output, if f22> DMAX, DMAX is output, and if 0 ≦ f22 ≦ DMAX, f22 is output.
次に、セレクタ107において、線検出信号SELを使用するか否かを示す値SEL_ACTIVEがあらかじめ設定されており、ここで、SEL_ACTIVE=0のとき、常にf22が出力される。また、SEL_ACTIVE=1のときは上述の線検出信号SELにより、SEL=1のときd22を、SEL=0のときf22を注目画素の出力信号として出力する。
Next, in the
つまり、注目画素が縦線又は横線上にあると判定されると、SEL=1になり、フィルタ処理されていない信号を出力し、そうでない場合はSEL=0となり、フィルタ処理された信号を出力する。 In other words, if it is determined that the pixel of interest is on the vertical or horizontal line, SEL = 1 and an unfiltered signal is output, otherwise SEL = 0 and a filtered signal is output. To do.
このような構成にすることにより、フィルタ処理された画素信号をクリップ処理する前に二値化処理を行え、また多ビット出力としては、フィルタ処理された画素信号を所定の閾値でオーバーフロー又はアンダーフロー処理した後、出力することができる。 With such a configuration, binarization can be performed before clipping the filtered pixel signal, and the filtered pixel signal can be overflowed or underflowed at a predetermined threshold as multi-bit output. After processing, it can be output.
[第2の実施形態]
次に、図面を参照しながら本発明に係る第2の実施形態を詳細に説明する。第2の実施形態では、1つのメモリを共用して線検出処理及び複数種類のフィルタ処理を行うものである。
[Second Embodiment]
Next, a second embodiment according to the present invention will be described in detail with reference to the drawings. In the second embodiment, one memory is shared to perform line detection processing and a plurality of types of filter processing.
図4は、第2の実施形態における画像処理モジュールの構成の一例を示すブロック図である。図4において、402はメモリであり、所定領域内の画像信号を一時的に保持する。401はメモリコントローラであり、メモリ402に対する画像信号の書き込み或いはメモリ402からの画像信号の読み出しを制御する。403は線検出処理部であり、所定領域内の縦方向、横方向の線を検出する。404はフィルタ処理部であり、所定領域内の画像信号に対して空間フィルタ処理を行う。405は二値化処理部であり、フィルタ処理部404でフィルタ処理された画像信号を二値化する。406はクリップ処理部であり、フィルタ処理部404でフィルタ処理された画像信号に対してオーバーフロー又はアンダーフロー処理を行う。407はセレクタであり、線検出処理部403での判定結果によりフィルタ処理部404でフィルタ処理され、クリップ処理部406でクリップ処理された信号か、フィルタ処理される前の信号の何れかを選択する。
FIG. 4 is a block diagram illustrating an example of the configuration of the image processing module according to the second embodiment. In FIG. 4,
また、414〜417及び424〜427はフィルタ処理部404〜セレクタ407に対応する処理部である。
以上の構成において、メモリコントローラ401は、画像処理モジュールへ1画素単位で順次入力されてくる1ライン分の画素信号と、メモリ402にすでに書き込まれている6ライン分の画素信号とを同期させて読み出し、計7ライン分の画素信号をフィルタ処理部404、414、424へ出力し、中央の5ライン分の画素信号を線検出処理部403へ出力すると共に、次のラインが入力されてきたときに使用する6ライン分の画素信号をメモリ402に書き込む。
In the above configuration, the
線検出処理部403は第1の実施形態と同一の処理を行う部分であるが、線検出処理とフィルタ処理を行う画素領域が第1の実施形態と異なる。
The line
図5は、線検出処理部403及びフィルタ処理部404、414、424で用いられる画素配置を示す図である。図5に示す領域内の画素配置のうち、線検出処理部403では5×5画素領域内の各画素d11〜d15、d21〜d25、d31〜d35、d41〜d45、d51〜d55を用いる。従って、第2の実施形態では、上述の5×5画素領域内の各画素の画素値に対して第1の実施形態と同様に、以下の演算を行う。
FIG. 5 is a diagram illustrating a pixel arrangement used in the line
1列の5画素の画素値より
TL_MAX = max(d11, d21, d31, d41, d51)
TL_MIN = min(d11, d21, d31, d41, d51)
TL_ALL = d11 + d21 + d31 + d41 + d51
3列の5画素の画素値より
TC_MAX = max(d13, d23, d33, d43, d53)
TC_MIN = min(d13, d23, d33, d43, d53)
TC_ALL = d13 + d23 + d33 + d43 + d53
5列の5画素の画素値より
TR_MAX = max(d15, d25, d35, d45, d55)
TR_MIN = min(d15, d25, d35, d45, d55)
TR_ALL = d15 + d25 + d35 + d45 + d55
2列の5画素の画素値より
TLC_MAX = max(d12, d22, d32, d42, d52)
TLC_MIN = min(d12, d22, d32, d42, d52)
4列の5画素の画素値より
TRC_MAX = max(d14, d24, d34, d44, d54)
TRC_MIN = min(d14, d24, d34, d44, d54)
以上の算出された値を用いて縦線があるか否かを判定する処理は第1の実施形態と同一であり、ここでの説明は省略する。
From the pixel value of 5 pixels in 1 row
TL_MAX = max (d11, d21, d31, d41, d51)
TL_MIN = min (d11, d21, d31, d41, d51)
TL_ALL = d11 + d21 + d31 + d41 + d51
From pixel values of 5 pixels in 3 rows
TC_MAX = max (d13, d23, d33, d43, d53)
TC_MIN = min (d13, d23, d33, d43, d53)
TC_ALL = d13 + d23 + d33 + d43 + d53
From pixel values of 5 pixels in 5 rows
TR_MAX = max (d15, d25, d35, d45, d55)
TR_MIN = min (d15, d25, d35, d45, d55)
TR_ALL = d15 + d25 + d35 + d45 + d55
From the pixel values of 5 pixels in 2 rows
TLC_MAX = max (d12, d22, d32, d42, d52)
TLC_MIN = min (d12, d22, d32, d42, d52)
From pixel values of 5 pixels in 4 rows
TRC_MAX = max (d14, d24, d34, d44, d54)
TRC_MIN = min (d14, d24, d34, d44, d54)
The process for determining whether or not there is a vertical line using the above calculated values is the same as in the first embodiment, and a description thereof is omitted here.
次に、上述した各列の演算と同様に、各行の画素値に対して演算を行い、横線があるか否かを判定する。 Next, similarly to the calculation of each column described above, the calculation is performed on the pixel value of each row to determine whether there is a horizontal line.
1行の5画素の画素値より
YU_MAX = max(d11, d12, d13, d14, d15)
YU_MIN = min(d11, d12, d13, d14, d15)
YU_ALL = d11 + d12 + d13 + d14 + d15
3行の5画素の画素値より
YC_MAX = max(d31, d32, d33, d34, d35)
YC_MIN = min(d31, d32, d33, d34, d35)
YC_ALL = d31 + d32 + d33 + d34 + d35
5行の5画素の画素値より
YS_MAX = max(d51, d52, d53, d54, d55)
YS_MIN = min(d51, d52, d53, d54, d55)
YS_ALL = d51 + d52 + d53 + d54 + d55
2行の5画素の画素値より
YUC_MAX = max(d21, d22, d23, d24, d25)
YUC_MIN = min(d21, d22, d23, d24, d25)
4行の5画素の画素値より
YSC_MAX = max(d41, d42, d43, d44, d45)
YSC_MIN = min(d41, d42, d43, d44, d45)
以上の算出された値を用いて横線があるか否かを判定する処理は第1の実施形態と同一であり、ここでの説明は省略する。
From the pixel value of 5 pixels in one row
YU_MAX = max (d11, d12, d13, d14, d15)
YU_MIN = min (d11, d12, d13, d14, d15)
YU_ALL = d11 + d12 + d13 + d14 + d15
From pixel values of 5 pixels in 3 rows
YC_MAX = max (d31, d32, d33, d34, d35)
YC_MIN = min (d31, d32, d33, d34, d35)
YC_ALL = d31 + d32 + d33 + d34 + d35
From the pixel value of 5 pixels in 5 rows
YS_MAX = max (d51, d52, d53, d54, d55)
YS_MIN = min (d51, d52, d53, d54, d55)
YS_ALL = d51 + d52 + d53 + d54 + d55
From pixel values of 5 pixels in 2 rows
YUC_MAX = max (d21, d22, d23, d24, d25)
YUC_MIN = min (d21, d22, d23, d24, d25)
From pixel values of 5 pixels in 4 rows
YSC_MAX = max (d41, d42, d43, d44, d45)
YSC_MIN = min (d41, d42, d43, d44, d45)
The process for determining whether or not there is a horizontal line using the above calculated values is the same as in the first embodiment, and a description thereof is omitted here.
以上の演算により、線検出信号SELは、上記縦線検出信号TD、横線検出信号YDから、
SEL = TD or YD
となり、縦線又は横線がある場合、線検出信号SEL=1となる。
Through the above calculation, the line detection signal SEL is derived from the vertical line detection signal TD and the horizontal line detection signal YD.
SEL = TD or YD
When there is a vertical line or a horizontal line, the line detection signal SEL = 1.
次に、上述のメモリコントローラ401によって読み出された7ライン分の画素信号を入力する、フィルタ処理部404において行われるフィルタ演算について説明する。
Next, a description will be given of a filter operation performed in the
図6は、フィルタ処理部404のフィルタ演算において各画素に対応するフィルタ係数を示す図である。図6において、c00'〜c66'は7×7画素領域内の各画素のフィルタ係数を示し、以下の演算を行う。
FIG. 6 is a diagram illustrating filter coefficients corresponding to each pixel in the filter calculation of the
f33' = Σ cij' * dij (i,j=0〜6)
ここで、フィルタ係数c00'〜c66'は符号付きであり、負の数も取りうるので演算結果のf33も符号付きである。また同様に、フィルタ処理部414では図7のフィルタ係数c00"〜c66"を用い、フィルタ処理部424では図8のフィルタ係数c00"'〜c66"'を用いて以下の演算を行う。
f33 '= Σcij' * dij (i, j = 0 ~ 6)
Here, the filter coefficients c00 ′ to c66 ′ are signed, and can take a negative number, so the calculation result f33 is also signed. Similarly, the
尚、フィルタ処理部414のフィルタ係数は、例えば網点領域を検出する前処理として行われるフィルタ処理のフィルタ係数であり、フィルタ処理部424のフィルタ係数は、例えば文字領域を検出する前処理として行われるフィルタ処理のフィルタ係数である。
The filter coefficient of the
f33" = Σ cij" * dij (i,j=0〜6)
f33"' = Σ cij"' * dij (i,j=0〜6)
次に、二値化処理部405、415、425では、フィルタ処理された信号f33'、f33"、f33"'をそれぞれ入力し、第1の実施形態と同一の処理を行う。
f33 "= Σ cij" * dij (i, j = 0 to 6)
f33 "'= Σcij"' * dij (i, j = 0 ~ 6)
Next, the
また、クリップ処理部406、416、426及びセレクタ407、417、427での処理内容も第1の実施形態と同一である。
The processing contents in the
このような構成にすることにより、1つのメモリを共用して線検出処理及び複数種類のフィルタ処理を行うことができる。 With such a configuration, it is possible to perform a line detection process and a plurality of types of filter processes by sharing one memory.
[第3の実施形態]
次に、図面を参照しながら本発明に係る第3の実施形態を詳細に説明する。第3の実施形態では、第2の実施形態における画像処理モジュールの第1のフィルタ出力に対応したセレクタ407の出力に、第1の実施形態における画像処理モジュールが縦列接続され、第2及び第3のフィルタ出力に対応した二値化処理部415及び425の二値信号に網点判定処理部及び文字判定処理部が縦列接続され、この構成により、文字判定、網点判定、網点内文字判定の各処理を行うものである。
[Third Embodiment]
Next, a third embodiment according to the present invention will be described in detail with reference to the drawings. In the third embodiment, the image processing module in the first embodiment is connected in cascade to the output of the
図9は、第3の実施形態における画像処理モジュールの構成の一例を示すブロック図である。図9において、左側のブロック内の構成901〜907、914〜917、924〜927は第2の実施形態で説明した図4に示した構成401〜407、414〜417、424〜427に相当する。また右側のブロック内の構成931〜937は第1の実施形態で説明した図1に示した構成101〜107に相当する。
FIG. 9 is a block diagram illustrating an example of a configuration of an image processing module according to the third embodiment. In FIG. 9,
908は網点判定処理部であり、二値化処理部915から出力された2つの二値信号に基づいて網点判定を行う。909は文字判定処理部であり、二値化処理部925から出力された2つの二値信号に基づいて文字判定を行う。
A halftone dot
以上の構成において、メモリコントローラ901は、画像処理モジュールへ1画素単位で順次入力されてくる1ライン分の画素信号と、メモリ902にすでに書き込まれている6ライン分の画素信号とを同期させて読み出し、計7ライン分の画素信号をフィルタ処理部904、914、924へ出力し、中央の5ライン分の画素信号を線検出処理部903へ出力すると共に、次のラインが入力されてきたときに使用する6ライン分の画素信号をメモリ902に書き込む。
In the above configuration, the
また同様に、メモリコントローラ931は、セレクタ907より1画素単位で順次入力されてくる1ライン分の画素信号と、メモリ932にすでに書き込まれている6ライン分の画素信号とを同期させて読み出し、計7ライン分の画素信号をフィルタ処理部934へ出力し、中央の5ライン分の画素信号を線検出処理部933へ出力すると共に、次のラインが入力してきたときに使用する6ライン分の画素信号をメモリ932に書き込む。
Similarly, the
線検出処理部903、933は、それぞれ第1、第2の実施形態と同一の処理を行う。2つの線検出信号SELを生成するが、後述するように、フィルタ処理部904に対応した線検出信号は使用しない。
The line
フィルタ処理部904、914、924、934も第1、第2の実施形態と同様な処理を行う。ここで、cij""は図10に示すフィルタ処理部934のフィルタ係数である。
The
尚、フィルタ処理部934のフィルタ係数は、例えば網点内文字領域を検出する前処理として行われるフィルタ処理のフィルタ係数である。
Note that the filter coefficient of the
f33' = Σ cij' * dij (i,j=0〜6)
f33" = Σ cij" * dij (i,j=0〜6)
f33"' = Σ cij"' * dij (i,j=0〜6)
f33"" = Σ cij"" * dij (i,j=0〜6)
二値化処理部905、915、925、935はフィルタ処理された信号f33'、f33"、f33"'、f33""を入力し、第1、第2の実施形態と同一の処理を行うが、このうち、f33'に対応する二値化処理部905の出力信号は使用しない。またf33""に対応した二値化処理部935では一つの閾値に対する二値信号のみが使用される。
f33 '= Σcij' * dij (i, j = 0 ~ 6)
f33 "= Σ cij" * dij (i, j = 0 to 6)
f33 "'= Σcij"' * dij (i, j = 0 ~ 6)
f33 "" = Σcij "" * dij (i, j = 0 ~ 6)
The
クリップ処理部906、916、926、936及びセレクタ907、917、927、937の処理内容も第1及び第2の実施形態と同一であるが、フィルタ処理された信号f33"、f33"'、f33""に対するクリップ処理、セレクタ後の多ビット信号は使用しない。
The processing contents of the
上述のような構成にすることにより、空間フィルタ処理に線検出機能を付加し、線検出結果に応じて空間フィルタのオン又はオフを制御できるようになり、適応的スムージング処理を行うことができる。また、クリップ処理前のフィルタ出力に複数の閾値に対応した二値化処理を付加することで、像域分離処理に使用する様々な二値信号を生成することができる。更に、像域分離処理で使用する4つの付加機能を持つ空間フィルタ及び画像信号に対する空間フィルタも全て同一構成で対応可能となり、画像処理モジュールの開発期間を大きく短縮化することができ、再利用性を向上させることができる。 With the configuration as described above, it is possible to add a line detection function to the spatial filter processing and to control the on / off of the spatial filter according to the line detection result, and to perform adaptive smoothing processing. Also, by adding a binarization process corresponding to a plurality of threshold values to the filter output before the clip process, various binary signals used for the image area separation process can be generated. Furthermore, the spatial filter for the four additional functions used in the image area separation processing and the spatial filter for the image signal can all be handled with the same configuration, so that the development period of the image processing module can be greatly shortened and reusability can be greatly improved. Can be improved.
尚、本発明は複数の機器(例えば、ホストコンピュータ,インターフェース機器,リーダ,プリンタなど)から構成されるシステムに適用しても、1つの機器からなる装置(例えば、複写機,ファクシミリ装置など)に適用しても良い。 Even if the present invention is applied to a system composed of a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.), it is applied to an apparatus (for example, a copier, a facsimile machine, etc.) composed of a single device. It may be applied.
また、本発明の目的は前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記録媒体を、システム或いは装置に供給し、そのシステム或いは装置のコンピュータ(CPU若しくはMPU)が記録媒体に格納されたプログラムコードを読出し実行することによっても、達成されることは言うまでもない。 Another object of the present invention is to supply a recording medium in which a program code of software realizing the functions of the above-described embodiments is recorded to a system or apparatus, and the computer (CPU or MPU) of the system or apparatus stores the recording medium in the recording medium. Needless to say, this can also be achieved by reading and executing the programmed program code.
この場合、記録媒体から読出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記録媒体は本発明を構成することになる。 In this case, the program code itself read from the recording medium realizes the functions of the above-described embodiment, and the recording medium storing the program code constitutes the present invention.
このプログラムコードを供給するための記録媒体としては、例えばフロッピー(登録商標)ディスク,ハードディスク,光ディスク,光磁気ディスク,CD−ROM,CD−R,磁気テープ,不揮発性のメモリカード,ROMなどを用いることができる。 As a recording medium for supplying the program code, for example, a floppy (registered trademark) 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, or the like is used. be able to.
また、コンピュータが読出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)などが実際の処理の一部又は全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。 Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an OS (operating system) operating on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.
更に、記録媒体から読出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部又は全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。 Further, after the program code read from the recording medium is written in a memory provided in 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 the CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.
101 メモリコントローラ
102 メモリ
103 線検出処理部
104 フィルタ処理部
105 二値化処理部
106 クリップ処理部
107 セレクタ
101
Claims (5)
前記所定領域の画像データに対してフィルタ処理を行う処理手段と、
前記線検出手段での検出結果に応じて、前記フィルタ処理された画像データか、未処理の画像データの何れかを選択して出力する選択手段とを有することを特徴とする画像処理装置。 Line detection means for detecting whether the pixel of interest in the predetermined area is a pixel constituting a line based on the image data of the predetermined area;
Processing means for performing a filtering process on the image data of the predetermined area;
An image processing apparatus comprising: selection means for selecting and outputting either the filtered image data or unprocessed image data according to the detection result of the line detection means.
前記制御手段は、前記メモリから画像データを読み出して前記線検出手段及び処理手段に出力することを特徴とする請求項1に記載の画像処理装置。 A memory for temporarily storing the input image data; and a control means for controlling writing to or reading from the memory;
The image processing apparatus according to claim 1, wherein the control unit reads image data from the memory and outputs the read image data to the line detection unit and the processing unit.
前記所定領域の画像データに対してフィルタ処理を行う処理工程と、
前記線検出工程における検出結果に応じて、前記フィルタ処理された画像データか、未処理の画像データの何れかを選択して出力する選択工程とを有することを特徴とする画像処理方法。 A line detection step of detecting whether the pixel of interest in the predetermined area is a pixel constituting a line based on the image data of the predetermined area;
A processing step of performing a filtering process on the image data of the predetermined area;
An image processing method comprising: a selection step of selecting and outputting either the filtered image data or the unprocessed image data according to a detection result in the line detection step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004011037A JP2005204263A (en) | 2004-01-19 | 2004-01-19 | Image processing apparatus and image processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004011037A JP2005204263A (en) | 2004-01-19 | 2004-01-19 | Image processing apparatus and image processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005204263A true JP2005204263A (en) | 2005-07-28 |
Family
ID=34823588
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004011037A Withdrawn JP2005204263A (en) | 2004-01-19 | 2004-01-19 | Image processing apparatus and image processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005204263A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007235430A (en) * | 2006-02-28 | 2007-09-13 | Ricoh Co Ltd | Image processor and processing method, image distribution device, image formation apparatus, program, and recording medium |
JP2017007243A (en) * | 2015-06-24 | 2017-01-12 | キヤノン株式会社 | Image processing device, control method and program for image processing device |
-
2004
- 2004-01-19 JP JP2004011037A patent/JP2005204263A/en not_active Withdrawn
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007235430A (en) * | 2006-02-28 | 2007-09-13 | Ricoh Co Ltd | Image processor and processing method, image distribution device, image formation apparatus, program, and recording medium |
JP2017007243A (en) * | 2015-06-24 | 2017-01-12 | キヤノン株式会社 | Image processing device, control method and program for image processing device |
US10440226B2 (en) | 2015-06-24 | 2019-10-08 | Canon Kabushiki Kaisha | Image processing apparatus, control method of image processing apparatus, and storage medium with performing smoothing on object other than character |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP1330116A2 (en) | Vertical black line removal in a document scanner | |
JP6338469B2 (en) | Image processing apparatus and image processing method | |
JP2005174363A (en) | Digital image processing system | |
JP5219706B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP2001358925A (en) | Unit and method for image processing and recording medium | |
JPH02100575A (en) | Picture processor | |
US8989493B1 (en) | Method and apparatus for identifying regions of an image to be filtered during processing of the image | |
JP6693310B2 (en) | Image processing apparatus, image processing method and program | |
JP2005204263A (en) | Image processing apparatus and image processing method | |
JP2008147712A (en) | Image processor and image processing method | |
US11570331B2 (en) | Image processing apparatus, image processing method, and storage medium | |
JP4787776B2 (en) | Image processing apparatus, image forming apparatus including the same, and image processing method | |
JP4035696B2 (en) | Line segment detection apparatus and image processing apparatus | |
JP3188804B2 (en) | Mixed image processing device | |
JP4324532B2 (en) | Image processing apparatus and storage medium | |
JP2007328652A (en) | Image processing device and image processing program | |
JPH11136505A (en) | Picture processor and picture processing method | |
JP2005031759A (en) | Image processor and image processing method to which spatial filter is applied | |
JP2005176168A (en) | Image processor | |
JP2009253645A (en) | Image processor and processing method thereof | |
JP3564216B2 (en) | Image processing device | |
JP4215225B2 (en) | Image processing apparatus and image processing method | |
JPH11112796A (en) | Image processor | |
JP4961310B2 (en) | Image processing apparatus and image forming apparatus | |
JP2003250048A (en) | Image processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20070403 |