JP5293482B2 - Image processing apparatus, image processing method, and information recording medium - Google Patents
Image processing apparatus, image processing method, and information recording medium Download PDFInfo
- Publication number
- JP5293482B2 JP5293482B2 JP2009176673A JP2009176673A JP5293482B2 JP 5293482 B2 JP5293482 B2 JP 5293482B2 JP 2009176673 A JP2009176673 A JP 2009176673A JP 2009176673 A JP2009176673 A JP 2009176673A JP 5293482 B2 JP5293482 B2 JP 5293482B2
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- value
- density
- pixels
- black
- 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
- Image Processing (AREA)
Description
本発明は、画像処理装置、画像処理方法、及び、情報記録媒体に関する。 The present invention relates to an image processing device, an image processing method, and an information recording medium.
従来から、二値画像を縮小する画像処理の技術がある。例えば、プリンタ、スキャナ、複写機等で扱う画像の解像度が高くなっている一方で、高解像度の画像を求めない場合等には、縮小画像を生成することが行われる。また、例えば、画像ビューワー等で高解像度の画像を閲覧する際に、サムネール等の縮小画像の生成、又は、表示装置の画面に収まる程度の画像を生成することが行われる。 Conventionally, there is an image processing technique for reducing a binary image. For example, when the resolution of an image handled by a printer, scanner, copier, or the like is high, but a high-resolution image is not required, a reduced image is generated. Further, for example, when a high-resolution image is browsed by an image viewer or the like, a reduced image such as a thumbnail or an image that fits on the screen of the display device is generated.
二値画像を縮小する技術として、例えば、特開平7−123246号公報(特許文献1)には、二値画像を縮小する際に、縮小率に応じたブロック毎に一つの多値画素に変換し、その多値画素を二値化する二値画像縮小装置が開示されている。特許文献1に開示の二値画像縮小装置は、さらに、多値画素を二値化する際に、その多値画素の基となるブロック内の二値画像データの画素の配置に応じて、例外処理を設けている。 As a technique for reducing a binary image, for example, in Japanese Patent Laid-Open No. 7-123246 (Patent Document 1), when a binary image is reduced, it is converted into one multivalued pixel for each block according to the reduction ratio. A binary image reduction device that binarizes the multi-valued pixel is disclosed. In the binary image reduction device disclosed in Patent Document 1, when binarizing a multi-value pixel, an exception is made depending on the arrangement of the pixels of the binary image data in the block that is the basis of the multi-value pixel. Processing is provided.
また、特開2002−354233号公報(特許文献2)には、二値画像を縮小する際に、一旦縮小された多値画像を生成し、そこから中間調を表現するディザ又は誤差拡散等により、二値化を行う画像縮小装置等の発明が開示されている。 Japanese Patent Application Laid-Open No. 2002-354233 (Patent Document 2) generates a multi-valued image once reduced when a binary image is reduced, and uses dither or error diffusion to express a halftone therefrom. An invention such as an image reduction device that performs binarization is disclosed.
ところで、二値画像には、帳票等のように、表や線等を多く含むものがある。帳票等は、図や写真は多く含まれない場合が多い。このような帳票の二値画像を縮小すると、細線の切れやかすれが生じることがあり、これを避けるためにOR圧縮を行うと、黒が多くなりすぎることがある。 Incidentally, some binary images include many tables, lines, and the like, such as forms. Forms and the like often do not contain many figures and photos. When such a binary image of a form is reduced, fine lines may be cut or blurred, and if OR compression is performed to avoid this, black may increase excessively.
しかしながら、上記特許文献2に記載の画像縮小装置等の発明では、ディザや誤差拡散等により二値化を行うため、細線等の処理を行うと、画像中の表等の構造がつぶれた形になることがある。また、上記特許文献1に記載の二値画像縮小装置の発明では、二値画像データのブロック毎の画素の並びに応じて、例外処理を設けるため、画素の並びを検証しなくてはならず、処理が煩雑になる。 However, in the invention such as the image reduction device described in Patent Document 2, since binarization is performed by dithering, error diffusion, or the like, if processing such as thin lines is performed, the structure of the table or the like in the image is collapsed. May be. Further, in the invention of the binary image reduction device described in Patent Document 1, an exception process is provided according to the arrangement of the pixels for each block of the binary image data, so the arrangement of the pixels must be verified, Processing becomes complicated.
本発明は、上記の点に鑑みて、これらの問題を解消するために発明されたものであり、二値画像の原画像中の画像要素の形状をなるべく維持する縮小画像を、簡易な構成により生成する画像処理装置、画像処理方法、及び、情報記録媒体を提供することを目的としている。 The present invention has been invented to solve these problems in view of the above points, and a reduced image that maintains the shape of an image element in an original image of a binary image as much as possible with a simple configuration. An object is to provide an image processing apparatus, an image processing method, and an information recording medium.
上記目的を達成するために、本発明の画像形成装置は次の如き構成を採用した。二値画像をブロックに分割するブロック分割部と、前記ブロック毎に、多値画素に変換して、縮小画像を生成する縮小画像生成部と、前記多値画素毎に、該多値画素を含む所定の範囲の多値画素の濃度の平均を算出し、当該濃度の平均以上の画素数を黒色画素の個数の最小値とし、当該最小値を濃度に換算した値を示す黒画素比率保存閾値を決定する黒画素比率保存閾値決定部と、一の多値画素が白画素となる濃度の閾値を決定する濃度閾値決定部と、
前記黒画素比率保存閾値と前記濃度の閾値とに基づいて、前記縮小画像が有する画素を二値化する二値化部と、を有し、前記二値化部は、前記多値画素の濃度が、該多値画素に対応する前記黒画素比率保存閾値以上の場合、及び、前記多値画素の濃度が、該多値画素に対応する前記黒画素比率保存閾値より小さく、該多値画素の濃度が該多値画素の周囲の画素の濃度の平均より大きく、かつ、該多値画素の濃度が前記濃度の閾値以上の場合に、該多値画素を黒画素とする構成とすることができる。
In order to achieve the above object, the image forming apparatus of the present invention employs the following configuration. Includes a block dividing unit for dividing the binary image into blocks, each said block, and it converts the multi-level pixel, a reduced image generation unit for generating a reduced image, for each of the multi-level pixel, the multivalued pixels An average density of multi-valued pixels in a predetermined range is calculated, a black pixel ratio storage threshold value indicating a value obtained by converting the minimum value into a density is set as the minimum value of the number of black pixels with the number of pixels equal to or higher than the average of the density A black pixel ratio storage threshold determination unit to determine, a density threshold determination unit to determine a threshold of density at which one multi-value pixel becomes a white pixel,
On the basis of the black pixel ratio storing threshold and the threshold value of the density, have a, a binarization unit for binarizing the pixels in which the reduced image has, the binarization unit, the concentration of the multi-level pixel Is greater than or equal to the black pixel ratio storage threshold corresponding to the multi-value pixel, and the density of the multi-value pixel is smaller than the black pixel ratio storage threshold corresponding to the multi-value pixel, When the density is larger than the average density of the pixels around the multi-value pixel and the density of the multi-value pixel is equal to or higher than the density threshold, the multi-value pixel can be configured as a black pixel. .
これにより、二値画像の原画像中の画像要素の形状をなるべく維持する縮小画像を、簡易な構成により生成する画像処理装置を提供することができる。 Accordingly, it is possible to provide an image processing apparatus that generates a reduced image that maintains the shape of an image element in an original image of a binary image as much as possible with a simple configuration.
なお、上記課題を解決するため、本発明は、上記画像処理装置における画像処理方法、及び、その画像処理方法をコンピュータに実行させるためのプログラムを記憶した情報記録媒体としてもよい。 In order to solve the above problems, the present invention may be an information recording medium storing an image processing method in the image processing apparatus and a program for causing a computer to execute the image processing method.
本発明の画像処理装置、画像処理方法、及び、情報記録媒体によれば、二値画像の原画像中の画像要素の形状をなるべく維持する縮小画像を、簡易な構成により生成する画像処理装置、画像処理方法、及び、情報記録媒体を提供することが可能になる。 According to the image processing device, the image processing method, and the information recording medium of the present invention, an image processing device that generates a reduced image that maintains the shape of an image element in an original image of a binary image as much as possible with a simple configuration, An image processing method and an information recording medium can be provided.
以下、本発明の実施の形態を図面に基づき説明する。なお、以下の実施の形態では、多値画像の画素の濃度を0から255の範囲とし、0が白、255が黒を表す例について説明する。また、二値画像の画素は、0が白画素、1が黒画素を表す。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following embodiment, an example will be described in which the density of pixels of a multi-valued image is in a range from 0 to 255, 0 is white, and 255 is black. In the binary image, 0 represents a white pixel and 1 represents a black pixel.
〔本発明の実施の形態〕
(本実施形態の画像処理装置の機能構成の例)
図1は、本実施形態の画像処理装置の機能構成の例を示す図である。図1の画像処理装置100は、ブロック分割部10、縮小画像生成部20、黒画素比率保存閾値決定部30、濃度閾値決定部40、二値化部50、画像メモリ81、及び、ワークメモリ82が、バスにより接続されている。
Embodiment of the present invention
(Example of functional configuration of image processing apparatus according to this embodiment)
FIG. 1 is a diagram illustrating an example of a functional configuration of the image processing apparatus according to the present embodiment. 1 includes a block dividing unit 10, a reduced
ブロック分割部10は、二値画像を、縮小率に応じたブロックに分割する。縮小画像生成部20は、ブロック毎に、一の多値画素を生成することにより、多値の縮小画像を生成する。黒画素比率保存閾値決定部30は、多値の縮小画像を二値化する際に用いる閾値である黒画素比率保存閾値を決定する。黒画素比率保存閾値は、多値の縮小画像の所定の範囲の画素を、二値で表現する際に、その所定の範囲に含まれる黒画素の個数を多値画像の画素の濃度に換算した値である。
The block dividing unit 10 divides the binary image into blocks corresponding to the reduction ratio. The reduced
濃度閾値決定部40は、多値の縮小画像に含まれる画素を二値に変換する際に、白画素となる多値画素の濃度の閾値を決定する。この濃度の閾値は、縮小率に基づいて決定される。
The density threshold
二値化部50は、黒画素比率保存閾値決定部30により決定された黒画素比率保存閾値と、濃度閾値決定部40により決定された濃度の閾値と、に基づいて、多値の縮小画像の画素毎に、濃度を二値に変換する。
Based on the black pixel ratio storage threshold determined by the black pixel ratio storage
画像メモリ81は、入力される二値画像の画像データを格納する。ワークメモリ82は、ブロック分割部10、縮小画像生成部20、黒画素比率保存閾値決定部30、濃度閾値決定部40、及び、二値化部50が、処理を行う際の一時的なデータを格納する。なお、画像メモリ81及びワークメモリ82は、一のメモリとして構成されてもよい。
The image memory 81 stores input binary image image data. The
以下に、ブロック分割部10、縮小画像生成部20、黒画素比率保存閾値決定部30、濃度閾値決定部40、及び、二値化部50の処理の詳細について説明する。
Details of the processes of the block dividing unit 10, the reduced
(ブロック分割部10の処理)
ブロック分割部10は、二値画像の原画像をブロックに分割する。図2は、ブロック分割部10が、二値画像の原画像を、縮小率に応じたブロックに分割する例を示す図である。図2では、縦方向及び横方向の縮小率が、それぞれ、40%である場合の例を示す。縮小率が40%の場合、縮小二値画像の1画素には、縦2.5画素、横2.5画素のブロックが対応する。ブロックb1では、画素A、B、F、Gの4つの画素が含まれる。ブロックb1には、さらに、画素C、H、K、Lの4つの画素が、それぞれ、1/2画素ずつ含まれる。また、画素Mは、1/4画素含まれる。
(Processing of block dividing unit 10)
The block dividing unit 10 divides the original binary image into blocks. FIG. 2 is a diagram illustrating an example in which the block dividing unit 10 divides an original binary image into blocks corresponding to a reduction ratio. FIG. 2 shows an example in which the reduction ratios in the vertical direction and the horizontal direction are 40%, respectively. When the reduction ratio is 40%, one pixel of the reduced binary image corresponds to a block of 2.5 pixels vertically and 2.5 pixels horizontally. The block b1 includes four pixels A, B, F, and G. The block b1 further includes four pixels C, H, K, and L, each of which is ½ pixel. Further, the pixel M is included in 1/4 pixel.
(縮小画像生成部20の処理)
縮小画像生成部20は、ブロック分割部10により分割されたブロック毎に、含まれる画素の平均濃度を計算する。例えば、縮小率が縦横それぞれ50%の場合には、2×2画素が1つのブロックとなる。そこで、2×2画素の中の黒画素の数を計数して1つの4階調の多値画素を得る。図2に示すブロックの場合には、黒を255、白を0として、ブロック内の画素値の面積平均を求める。これにより、ブロック毎に1つの値を得る。
(Processing of the reduced image generation unit 20)
The reduced
(黒画素比率保存閾値決定部30の処理)
黒画素比率保存閾値決定部30は、黒画素比率保存閾値を保存する閾値を算出する。黒画素比率保存閾値決定部30は、縮小画像生成部20により生成された縮小画像の画素毎に、所定の範囲の画素の平均濃度αを、次式(1)により算出する。所定の範囲とは、例えば、注目画素の周囲の8画素、注目画素の上下の数ラインの画素を含む範囲、又は、縮小画像の全体等である。なお、所定の範囲は、縮小率に応じて定められてもよい。
The black pixel ratio storage threshold
黒画素比率保存閾値決定部30は、次に、X画素中に、Y画素の黒があった場合に、平均濃度αになる画素数又は平均濃度αを超える画素数である画素数Yを、次式(2)により算出する。
部分領域(X)の中は実際には0〜255の画素値を持つ画素が入っているため、この値Yは、仮想的な値である。この値Yは、部分領域(X)中が白画素と黒画素のみの場合に、全部でY個の黒画素があると、部分領域(X)の平均濃度は、多値画素による平均濃度と同一か、又は、やや濃くなることを意味する。すなわち、値Yは、黒画素の個数の最小値である。 Since the partial area (X) actually contains pixels having pixel values of 0 to 255, this value Y is a virtual value. If the value Y is only white and black pixels in the partial area (X) and there are Y black pixels in total, the average density of the partial area (X) is the average density of the multivalued pixels. Means the same or slightly darker. That is, the value Y is the minimum value of the number of black pixels.
黒画素比率保存閾値決定部30は、次に、注目画素を含む周囲の部分領域X画素分の濃度C(k)の濃度ヒストグラムにより、部分領域Xに含まれる黒画素の個数の最小値Yに対応する濃度を決定する。次式(3)は、平均濃度αを濃度ヒストグラムhist(n)により表した式であり、次式(4)は、黒画素の個数の最小値を濃度に換算した値Nを表す式である。
値Nの範囲は、濃度の範囲に等しく、本実施の形態では、0≦N≦255である。この値Nを、「黒画素比率保存閾値」という。部分領域(X)を二値化する際に、濃度Nを閾値としてそれ以上を黒に、N未満の濃度値を白として二値化することにより、二値化後の部分領域の(X)の平均濃度が、多値画像の部分領域(X)の平均濃度とほぼ等しくなる。 The range of the value N is equal to the concentration range, and in this embodiment, 0 ≦ N ≦ 255. This value N is referred to as “black pixel ratio storage threshold”. When binarizing the partial area (X), by binarizing the density N as a threshold value with black as the density N and the density value less than N as white, (X) of the partial area after binarization Is substantially equal to the average density of the partial area (X) of the multi-valued image.
なお、黒画素比率保存閾値決定部30は、平均濃度αを取得する範囲を、精度や使用メモリの容量に基づいて決定するとよい。例えば、平均濃度αを取得する場合に、画像全面を用いることにより、画像全体に対して安定的なパラメーターとなり、黒画素比率保存閾値を決定する際に、より精度が高くなる。
Note that the black pixel ratio storage threshold
また、処理に用いるメモリの容量を節約する場合や小さなメモリにより本実施の形態に係る画像処理装置を実現する場合には、処理の効率を考慮して平均濃度αを取得する範囲を決定するとよい。例えば、縮小多値画像の所定数のライン分の画素値を保持し、そのデータで平均濃度を取得するとよい。ライン数は、例えば、注目画素の前後を用いた3とするとよい。これにより、後述する二値化処理において、周囲の8画素を用いる(ルール2)の判定の処理と、縦方向の範囲が同一となり、処理を効率的に行い、メモリを効率的に用いることができる。 When saving the capacity of the memory used for processing or when realizing the image processing apparatus according to the present embodiment with a small memory, it is preferable to determine the range for obtaining the average density α in consideration of the processing efficiency. . For example, pixel values for a predetermined number of lines of the reduced multi-valued image may be held, and the average density may be acquired from the data. For example, the number of lines may be 3 using the front and back of the target pixel. As a result, in the binarization process described later, the process in the vertical direction is the same as the determination process of using the surrounding 8 pixels (rule 2), and the range in the vertical direction is the same. it can.
(濃度閾値決定部40の処理)
濃度閾値決定部40は、二値化する際に用いるもう一つの閾値である濃度の閾値を決定する。濃度の閾値は、一の多値画素が白画素となる値である。濃度の閾値Mは、次式(5)により求められる。
M=((階調の数)/2)×(変倍率)・・・(5)
但し、(変倍率)は、縦の変倍率と横の変倍率とのうち、より値が大きな変倍率を採用する。なお、縮小の際の変倍率の値は、縮小後の画像が小さい方が、変倍率の値がより小さい。
(Processing of density threshold value determination unit 40)
The density threshold
M = ((number of gradations) / 2) × (magnification) (5)
However, (magnification ratio) employs a magnification ratio having a larger value among the vertical magnification ratio and the horizontal magnification ratio. Note that the value of the scaling factor at the time of reduction is smaller when the image after reduction is smaller.
例えば、縮小率Wが40%の場合には、濃度の閾値Mは、
M=128×0.4=51
となる。なお、上式において演算結果は、四捨五入している。
For example, when the reduction ratio W is 40%, the density threshold M is
M = 128 × 0.4 = 51
It becomes. In the above formula, the calculation result is rounded off.
なお、式(5)は、経験的に定めた値である。より詳細には、例えば、以下の(a)から(c)の背景がある。
(a)変倍率が100%に近ければ濃度の閾値M=128として、多数決的に白黒を決定する。
(b)変倍率が50%の場合には、濃度の閾値M=64となる。すなわち、50%縮小の場合、元画像の2×2画素が結果画像の1画素に対応し、濃度の閾値M=64≒255/4は、「元画像の2×2画素の領域に黒画素が1つあれば結果画像を黒とする」というOR圧縮的な決定則となる。
(c)縮小後の画像がさらに小さい場合、例えば1/Nの場合、「元画像のN×N領域に長さN/2の線が1本あれば結果画像を黒とする」という線保存的な決定則となる。図3は、4×4画素のうち、2画素が黒画素である。したがって、図3の例は、この領域に基づく縮小後の画像の画素が、黒画素となる最低の濃度の閾値を示す。
Equation (5) is an empirically determined value. More specifically, for example, there are the following backgrounds (a) to (c).
(A) If the magnification ratio is close to 100%, the density threshold M = 128 is determined, and monochrome is determined in a majority manner.
(B) When the scaling factor is 50%, the density threshold M = 64. That is, in the case of 50% reduction, 2 × 2 pixels of the original image correspond to one pixel of the result image, and the density threshold M = 64≈255 / 4 is “a black pixel in the 2 × 2 pixel region of the original image” If there is one, the result image is black.
(C) If the reduced image is even smaller, for example 1 / N, the line is stored as “the result image is black if there is one line of length N / 2 in the N × N region of the original image”. It becomes a regular decision rule. In FIG. 3, 2 pixels out of 4 × 4 pixels are black pixels. Therefore, the example of FIG. 3 shows the threshold value of the lowest density at which the pixels of the image after reduction based on this region become black pixels.
(二値化部50の処理)
二値化部50は、黒画素比率保存閾値Nと濃度の閾値Mと、を用いて、二値化を行う。二値化部50が多値画素を二値化する際のルールは、次の(ルール1)及び(ルール2)である。
(Processing of binarization unit 50)
The
(ルール1)多値画像の注目画素の濃度をCとし、C≧Nであればその画素を黒画素とする。そうでなければ(2)へ。
(ルール2)注目画素の濃度Cが、隣接する8点の平均濃度よりも大きい、すなわち、
C×8>隣接8点の濃度和
が成り立ち、かつ、
C≧M
であればその画素を黒画素とする。そうでなければその画素を白画素とする。
(Rule 1) The density of the pixel of interest in the multi-valued image is C, and if C ≧ N, the pixel is a black pixel. Otherwise go to (2).
(Rule 2) The density C of the target pixel is larger than the average density of the eight adjacent points, that is,
C × 8> concentration sum of adjacent 8 points holds, and
C ≧ M
If so, the pixel is a black pixel. Otherwise, the pixel is a white pixel.
(ルール2)により、濃度の閾値Mを適用して黒画素とする場合を、注目点が周囲の平均的な濃度よりも濃い場合に限定している。これにより周囲に比べて明るい空隙領域をつぶす劣化や、線幅を過度に太くする劣化を抑えることができる。 According to (Rule 2), the case where the density threshold value M is applied to form a black pixel is limited to the case where the point of interest is darker than the surrounding average density. As a result, it is possible to suppress deterioration that crushes a bright void area compared to the surroundings and deterioration that excessively increases the line width.
図4は、本実施の形態に係る画像処理方法を示すフロー図である。図4のステップS101では、ブロック分割部10が、入力される二値画像を縮小率に応じたブロックに分割する。ステップS101に続いてステップS102に進み、縮小画像生成部20が、ステップS101で分割されたブロック毎に、一の多値画素の値を取得する。これにより、縮小された多値画像が生成される。
FIG. 4 is a flowchart showing an image processing method according to the present embodiment. In step S101 in FIG. 4, the block dividing unit 10 divides the input binary image into blocks corresponding to the reduction ratio. Progressing to step S102 following step S101, the reduced
ステップS102に続いてステップS103に進み、黒画素比率保存閾値決定部30が、黒画素比率保存閾値Nを決定する。ステップS103に続いてステップS104に進み、濃度閾値決定部40が、最低の濃度の閾値Mを決定する。ステップS104に続いてステップS105に進み、二値化部50が、縮小された多値画像の各画素を二値化する。
Progressing to step S103 following step S102, the black pixel ratio storage threshold
図4の処理において、最低濃度の閾値Mは、縮小率により決まるため、図4に示す順でなくても構わない。例えば、処理の先頭で求め、それを保持することにより、他の画素の二値化においても、その値を用いる処理でよい。 In the processing of FIG. 4, the minimum density threshold value M is determined by the reduction ratio, and therefore may not be in the order shown in FIG. 4. For example, it is possible to use the value in the binarization of other pixels by obtaining the value at the beginning of the process and holding it.
図5は、ライン毎に縮小された多値画像を生成する処理を示すフロー図である。図5のステップS201では、ブロック分割部10が、入力される二値画像を縮小率に応じたブロックに分割する。ステップS202では、濃度閾値決定部40が、縮小率に基づく最低の濃度の閾値Mを決定する。この値は、例えば、ワークメモリ82に保持される。
FIG. 5 is a flowchart showing processing for generating a multi-valued image reduced for each line. In step S201 in FIG. 5, the block dividing unit 10 divides the input binary image into blocks corresponding to the reduction ratio. In step S202, the density threshold
ステップS202に続いてステップS203に進み、ブロック分割部10が、入力された二値画像の3ライン分のブロックを生成し、縮小画像生成部20が、分割されたブロックにより縮小された多値画像を生成する。なお、画像の上端及び下端のラインについては、フィルタ処理等により、仮想の画素を補う処理等、公知の技術を用いるとよい。より詳細には、画像の先頭ラインと同じ画素を有するラインが先頭ラインの直上にあると想定して処理をしてもよい。
Progressing to step S203 following step S202, the block dividing unit 10 generates a block corresponding to three lines of the input binary image, and the reduced
ステップS203に続いてステップS204に進み、黒画素比率保存閾値決定部30が、黒画素比率保存閾値を算出する。この閾値が、黒画素比率保存閾値Nとなる。ステップS204に続いてステップS205に進み、ステップS203で得られた3ライン分のブロックに対応する多値画像を二値化する。
Progressing to step S204 following step S203, the black pixel ratio storage threshold
ステップS205に続いてステップS206に進み、注目ラインが、多値最後のラインか否かを判断する。最後のラインの場合は、ステップS209に進み処理を終了する。最後のラインではない場合は、ステップS207に進む。ステップS206に続くステップS207では、処理する注目ラインを一つずらす。 Progressing to step S206 following step S205, it is determined whether or not the target line is the last multi-value line. In the case of the last line, the process proceeds to step S209 and the process ends. If it is not the last line, the process proceeds to step S207. In step S207 following step S206, the target line to be processed is shifted by one.
ステップS207に続いてステップS208に進み、新たな注目ラインにおいて、ブロック分割部10がブロックに分割し、縮小画像生成部20が縮小された多値画像を生成する。ステップS208の処理の後、ステップS204に戻って処理を繰り返す。
Progressing to step S208 following step S207, in the new target line, the block dividing unit 10 divides the block, and the reduced
図6は、本実施の形態に係る画像処理装置の構成を示すブロック図である。図6の画像処理装置は、マイクロプロセッサ等のデジタル処理により、本実施形態に係る画像処理方法を実行することができる。 FIG. 6 is a block diagram showing the configuration of the image processing apparatus according to the present embodiment. The image processing apparatus in FIG. 6 can execute the image processing method according to the present embodiment by digital processing such as a microprocessor.
図6の画像処理装置は、CPU1、メモリ2、ワークエリアRAM3、プログラム格納ROM/RAM4、スキャナ5、印刷装置6、ディスプレイ7、及び、CD−ROM/FDドライブ8を有する。 The image processing apparatus in FIG. 6 includes a CPU 1, a memory 2, a work area RAM 3, a program storage ROM / RAM 4, a scanner 5, a printing device 6, a display 7, and a CD-ROM / FD drive 8.
CPU1は、プログラム格納ROM/RAM4に格納されたプログラム、又は、CD−ROM/FD等の記録媒体からCD−ROM/FDドライブ8が読み出したプログラムを、読み出して実行し、ワークエリアRAM3を用いて文書画像データに対するブロック分割処理等を含む画像処理を実行する。 The CPU 1 reads and executes a program stored in the program storage ROM / RAM 4 or a program read by the CD-ROM / FD drive 8 from a recording medium such as a CD-ROM / FD, and uses the work area RAM 3. Image processing including block division processing for document image data is executed.
CPU1は、処理された画像データをメモリ2に格納させる。CPU1は、また、画像データをディスプレイ7に表示させ、又は、印刷装置6により出力させる。 The CPU 1 stores the processed image data in the memory 2. The CPU 1 also displays the image data on the display 7 or causes the printing device 6 to output it.
メモリ2は、画像データを格納する。ワークエリアRAM3は、CPU1がプログラムを実行する際に供せられる。プログラム格納ROM/RAM4は、CPU1が実行するプログラムを格納する。 The memory 2 stores image data. The work area RAM 3 is provided when the CPU 1 executes a program. The program storage ROM / RAM 4 stores a program executed by the CPU 1.
スキャナ5は、文書画像原稿を光学的に読み取り電気信号である画像データに変換する。印刷装置6は、CPU1により画像データが印刷される。ディスプレイ7は、画像データ7を含む情報を表示する。CD−ROM/FDドライブ8は、CD−ROM又はフロッピー(登録商標)ディスク等の記録媒体が挿入され、記録媒体に格納された情報が読み出される。 The scanner 5 optically reads a document image original and converts it into image data that is an electrical signal. In the printing device 6, image data is printed by the CPU 1. The display 7 displays information including the image data 7. In the CD-ROM / FD drive 8, a recording medium such as a CD-ROM or a floppy (registered trademark) disk is inserted, and information stored in the recording medium is read out.
本実施の形態により、高倍率の縮小をしても細い罫線が、かすれにくくなる。より詳細には、二値画像を縮小して二値画像を得たい場合に、高速で、高倍率の縮小を行っても、細い罫線で枠・表を構成しているような画像において、枠・表の構造を従来よりも壊さないで閲覧・処理できる二値画像を得ることができる。 According to this embodiment, thin ruled lines are difficult to fade even when reduced at high magnification. More specifically, when it is desired to obtain a binary image by reducing the binary image, even if the reduction is performed at a high magnification at a high speed, the frame and the table are configured with thin ruled lines. A binary image that can be viewed and processed without breaking the structure of the table than before can be obtained.
以上、発明を実施するための最良の形態について説明を行ったが、本発明は、この最良の形態で述べた実施の形態に限定されるものではない。本発明の主旨をそこなわない範囲で変更することが可能である。 Although the best mode for carrying out the invention has been described above, the present invention is not limited to the embodiment described in the best mode. Modifications can be made without departing from the spirit of the present invention.
1 CPU
2 メモリ
3 ワークエリアRAM
4 プログラム格納ROM/RAM
5 スキャナ
6 印刷装置
7 ディスプレイ
8 CD−ROM/FDドライブ
10 ブロック分割部
20 縮小画像生成部
30 黒画素比率保存閾値決定部
40 濃度閾値決定部
50 二値化部
81 画像メモリ
82 ワークメモリ
100 画像処理装置
1 CPU
2 Memory 3 Work area RAM
4 Program storage ROM / RAM
5 Scanner 6 Printing Device 7 Display 8 CD-ROM / FD Drive 10
Claims (7)
前記ブロック毎に、多値画素に変換して、縮小画像を生成する縮小画像生成部と、
前記多値画素毎に、該多値画素を含む所定の範囲の多値画素の濃度の平均を算出し、当該濃度の平均以上の画素数を黒色画素の個数の最小値とし、当該最小値を濃度に換算した値を示す黒画素比率保存閾値を決定する黒画素比率保存閾値決定部と、
一の多値画素が白画素となる濃度の閾値を決定する濃度閾値決定部と、
前記黒画素比率保存閾値と前記濃度の閾値とに基づいて、前記縮小画像が有する画素を二値化する二値化部と、を有し、
前記二値化部は、
前記多値画素の濃度が、該多値画素に対応する前記黒画素比率保存閾値以上の場合、及び、前記多値画素の濃度が、該多値画素に対応する前記黒画素比率保存閾値より小さく、該多値画素の濃度が該多値画素の周囲の画素の濃度の平均より大きく、かつ、該多値画素の濃度が前記濃度の閾値以上の場合に、該多値画素を黒画素とすることを特徴とする画像処理装置。 A block dividing unit for dividing the binary image into blocks ;
For each of the blocks, and converts the multi-level pixel, a reduced image generation unit for generating a reduced image,
For each multi-value pixel, the average of the density of multi-value pixels in a predetermined range including the multi-value pixel is calculated, the number of pixels equal to or higher than the average of the density is set as the minimum value of the number of black pixels, and the minimum value is A black pixel ratio storage threshold value determination unit for determining a black pixel ratio storage threshold value indicating a value converted into density;
A density threshold value determining unit that determines a density threshold value at which one multi-value pixel is a white pixel;
On the basis of the black pixel ratio storing threshold and the threshold value of the density, have a, a binarization unit for binarizing the pixels in which the reduced image has,
The binarization unit includes:
When the density of the multi-value pixel is equal to or higher than the black pixel ratio storage threshold corresponding to the multi-value pixel, and the density of the multi-value pixel is smaller than the black pixel ratio storage threshold corresponding to the multi-value pixel. When the density of the multi-value pixel is larger than the average density of the pixels around the multi-value pixel and the density of the multi-value pixel is equal to or higher than the density threshold, the multi-value pixel is set as a black pixel . An image processing apparatus.
前記ブロック毎に、多値画素に変換して、縮小画像を生成する縮小画像生成ステップと、
前記多値画素毎に、該多値画素を含む所定の範囲の多値画素の濃度の平均を算出し、当該画素の平均以上の画素数を黒色画素の個数の最小値とし、当該最小値を濃度に換算した値を示す黒画素比率保存閾値を決定する黒画素比率保存閾値決定ステップと、
一の多値画素が白画素となる濃度の閾値を決定する濃度閾値決定ステップと、
前記黒画素比率保存閾値と前記濃度の閾値とに基づいて、前記縮小画像が有する画素を二値化する二値化ステップと、を有し、
前記二値化ステップは、前記多値画素の濃度が、該多値画素に対応する前記黒画素比率保存閾値以上の場合、及び、前記多値画素の濃度が、該多値画素に対応する前記黒画素比率保存閾値より小さく、該多値画素の濃度が該多値画素の周囲の画素の濃度の平均より大きく、かつ、該多値画素の濃度が前記濃度の閾値以上の場合に、該多値画素を黒画素とすることを特徴とする画像処理方法。 A block dividing step for dividing the binary image into blocks ;
For each of the blocks, and converts the multi-level pixel, a reduced image generation step of generating a reduced image,
For each multi-value pixel, calculate the average density of multi-value pixels in a predetermined range including the multi-value pixel, set the number of pixels equal to or greater than the average of the pixels as the minimum value of the number of black pixels, and set the minimum value to A black pixel ratio storage threshold value determining step for determining a black pixel ratio storage threshold value indicating a value converted into density;
A density threshold value determining step for determining a density threshold value at which one multi-value pixel is a white pixel;
On the basis of the black pixel ratio storing threshold and the threshold value of the density, have a, a binarization step for binarizing the pixels in which the reduced image has,
In the binarization step, the density of the multi-value pixel is equal to or higher than the black pixel ratio storage threshold corresponding to the multi-value pixel, and the density of the multi-value pixel corresponds to the multi-value pixel. When the density of the multi-valued pixel is smaller than the black pixel ratio storage threshold, the density of the pixels around the multi-valued pixel is greater than the average, and the density of the multi-valued pixel is equal to or higher than the density threshold, An image processing method, wherein a value pixel is a black pixel .
前記ブロック毎に、多値画素に変換して、縮小画像を生成する縮小画像生成ステップと、
前記多値画素毎に、該多値画素を含む所定の範囲の多値画素の濃度の平均を算出し、当該画素の平均以上の画素数を黒色画素の個数の最小値とし、当該最小値を濃度に換算した値を示す黒画素比率保存閾値を決定する黒画素比率保存閾値決定ステップと、
一の多値画素が白画素となる濃度の閾値を決定する濃度閾値決定ステップと、
前記黒画素比率保存閾値と前記濃度の閾値とに基づいて、前記縮小画像が有する画素を二値化する二値化ステップと、を有し、
前記二値化ステップは、前記多値画素の濃度が、該多値画素に対応する前記黒画素比率保存閾値以上の場合、及び、前記多値画素の濃度が、該多値画素に対応する前記黒画素比率保存閾値より小さく、該多値画素の濃度が該多値画素の周囲の画素の濃度の平均より大きく、かつ、該多値画素の濃度が前記濃度の閾値以上の場合に、該多値画素を黒画素とする画像処理方法をコンピュータに実行させるためのコンピュータプログラムを記録した情報記録媒体。 A block dividing step for dividing the binary image into blocks ;
For each of the blocks, and converts the multi-level pixel, a reduced image generation step of generating a reduced image,
For each multi-value pixel, calculate the average density of multi-value pixels in a predetermined range including the multi-value pixel, set the number of pixels equal to or greater than the average of the pixels as the minimum value of the number of black pixels, and set the minimum value to A black pixel ratio storage threshold value determining step for determining a black pixel ratio storage threshold value indicating a value converted into density;
A density threshold value determining step for determining a density threshold value at which one multi-value pixel is a white pixel;
On the basis of the black pixel ratio storing threshold and the threshold value of the density, have a, a binarization step for binarizing the pixels in which the reduced image has,
In the binarization step, the density of the multi-value pixel is equal to or higher than the black pixel ratio storage threshold corresponding to the multi-value pixel, and the density of the multi-value pixel corresponds to the multi-value pixel. When the density of the multi-valued pixel is smaller than the black pixel ratio storage threshold, the density of the pixels around the multi-valued pixel is greater than the average, and the density of the multi-valued pixel is equal to or higher than the density threshold, An information recording medium recording a computer program for causing a computer to execute an image processing method in which a value pixel is a black pixel .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009176673A JP5293482B2 (en) | 2009-07-29 | 2009-07-29 | Image processing apparatus, image processing method, and information recording medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009176673A JP5293482B2 (en) | 2009-07-29 | 2009-07-29 | Image processing apparatus, image processing method, and information recording medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2011034126A JP2011034126A (en) | 2011-02-17 |
| JP5293482B2 true JP5293482B2 (en) | 2013-09-18 |
Family
ID=43763175
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2009176673A Expired - Fee Related JP5293482B2 (en) | 2009-07-29 | 2009-07-29 | Image processing apparatus, image processing method, and information recording medium |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5293482B2 (en) |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH02181878A (en) * | 1989-01-09 | 1990-07-16 | Nippon Telegr & Teleph Corp <Ntt> | Image processor |
| JP2845376B2 (en) * | 1989-06-09 | 1999-01-13 | キヤノン株式会社 | Pixel density converter |
| JP2003259113A (en) * | 2002-02-28 | 2003-09-12 | Konica Corp | Image processor |
-
2009
- 2009-07-29 JP JP2009176673A patent/JP5293482B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2011034126A (en) | 2011-02-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Jung et al. | A new histogram modification based reversible data hiding algorithm considering the human visual system | |
| JP6418788B2 (en) | Image processing apparatus, image processing method, and program | |
| JP2005318593A (en) | Reformatting of image data for further compressed image data size | |
| US8705134B2 (en) | Method of processing an image to clarify text in the image | |
| JP6362632B2 (en) | Image processing apparatus and image processing method | |
| US8619330B2 (en) | Image processing apparatus and image processing method | |
| JP2010056827A (en) | Apparatus and program for processing image | |
| JP2010205174A (en) | Image processing apparatus and image forming apparatus | |
| US8023756B2 (en) | Image encoding apparatus and method of controlling same | |
| JP5293482B2 (en) | Image processing apparatus, image processing method, and information recording medium | |
| US10931852B2 (en) | Image processing apparatus, image processing method, and storage medium, with determining whether or not character clipping rectangle determined to be non-character region is character region | |
| JP2006197178A (en) | Image processing apparatus, image processing method, program, and storage medium | |
| JP2010136036A (en) | Image processor, image conversion method, and computer program | |
| CN103034978A (en) | Image processing apparatus and image processing method | |
| JP3262425B2 (en) | Image processing device | |
| JP3624153B2 (en) | Image processing apparatus and image processing method | |
| JP4324532B2 (en) | Image processing apparatus and storage medium | |
| JP4517288B2 (en) | Image processing apparatus, image processing method, and program thereof | |
| US20070188812A1 (en) | Image processing device, image reading device and image processing method | |
| JP2010028819A (en) | Image processing apparatus and method, and image reading apparatus | |
| JP2009111786A (en) | Image processing apparatus and image processing method | |
| JP2000011088A (en) | Method for extracting characteristic information of read image, image processing device and mail address reading device | |
| JP6146220B2 (en) | Method, apparatus and system | |
| JP4469511B2 (en) | Image processing method | |
| JP4613712B2 (en) | Image data synthesis apparatus and image data synthesis program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120528 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130207 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130305 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130424 |
|
| 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: 20130514 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130527 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 5293482 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
| LAPS | Cancellation because of no payment of annual fees |