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

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP3909604B2
JP3909604B2 JP2005004894A JP2005004894A JP3909604B2 JP 3909604 B2 JP3909604 B2 JP 3909604B2 JP 2005004894 A JP2005004894 A JP 2005004894A JP 2005004894 A JP2005004894 A JP 2005004894A JP 3909604 B2 JP3909604 B2 JP 3909604B2
Authority
JP
Japan
Prior art keywords
image
block
coefficient
image processing
luminance value
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
Application number
JP2005004894A
Other languages
Japanese (ja)
Other versions
JP2006195622A (en
Inventor
和弘 佐藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hiroshima Industrial Promotion Organization
Original Assignee
Hiroshima Industrial Promotion Organization
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hiroshima Industrial Promotion Organization filed Critical Hiroshima Industrial Promotion Organization
Priority to JP2005004894A priority Critical patent/JP3909604B2/en
Publication of JP2006195622A publication Critical patent/JP2006195622A/en
Application granted granted Critical
Publication of JP3909604B2 publication Critical patent/JP3909604B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Description

本発明は、画像処理装置に関し、特に、画像の2値化やエッジ検出を行う画像処理装置に関するものである。   The present invention relates to an image processing apparatus, and more particularly to an image processing apparatus that performs binarization and edge detection of an image.

本格的な情報化時代を迎え、身近な電子機器で画像を頻繁に扱うようになってきた。それに加え、コンピュータとアプリケーションソフトの普及で、誰でも簡単にデジタル画像を処理できるようになった。   In the full-fledged information age, images are frequently handled by familiar electronic devices. In addition, the spread of computers and application software has made it easy for anyone to process digital images.

画像処理を行う際、エッジ検出や2値化処理を良く実施する(下記特許文献1を参照)。   When performing image processing, edge detection and binarization processing are often performed (see Patent Document 1 below).

2値化とは、画像を構成する各画素の明るさを、一定の基準値により、黒色と白色の2つの値に変換する作業のことである。ここで、一定の基準値のことを閾値という。通常、画像の各画素は、0〜255のRGB値を有している。このRGB値の平均値が各画素に於ける明るさになる。基準とする閾値の値によって、2値化を施した画像は異なる。   Binarization is an operation of converting the brightness of each pixel constituting an image into two values of black and white according to a certain reference value. Here, a certain reference value is referred to as a threshold value. Usually, each pixel of the image has an RGB value of 0-255. The average value of the RGB values is the brightness at each pixel. The binarized image differs depending on the reference threshold value.

エッジ検出とは、画像の明るさの変化によりオブジェクトの輪郭を算出する作業のことである。画像内の全ての画素は、色情報を有している。その画像内の色情報が急激に変化する場所がオブジェクトの領域の境界(輪郭)である。明るさの変化は、微分計算を利用することで算出することができる。
特開平05−300369号公報
Edge detection is an operation for calculating the contour of an object based on a change in the brightness of an image. All the pixels in the image have color information. The place where the color information in the image changes rapidly is the boundary (outline) of the object area. The change in brightness can be calculated by using differential calculation.
Japanese Patent Laid-Open No. 05-300369

しかしながら、一般的な2値化処理方法では、例えば照明ムラ等の原因で図12(A)に示すような激しいシェージングを伴う画像の場合、適切に2値化処理が行われない問題が発生する。   However, in a general binarization processing method, for example, in the case of an image with intense shading as shown in FIG. .

具体的には、濃淡画像から2値化画像を得るためには、1と0とを判定する境界(閾値)の設定が必要となる。閾値の設定方法としては、全ての処理を1つの閾値で2値化する固定閾値法と、部分的に閾値を変動させる浮遊閾値法がある。上記したようなシェージングが激しい画像を固定閾値法にて処理した場合、図12(B)に示すような画像になってしまい、一部の情報が失われてしまっている。ここでは、2値化処理による情報が失われる部分をハッチングにて示している。従って部分的に最適な閾値を選択する浮動閾値法を用いなければならない。しかし、図12(A)に示すの画像の濃淡の分布は図13のヒストグラムに示すように閾値を決定する双峰性を探すことが困難で有る。   Specifically, in order to obtain a binarized image from a grayscale image, it is necessary to set a boundary (threshold value) for determining 1 and 0. As a threshold setting method, there are a fixed threshold method in which all processes are binarized with one threshold and a floating threshold method in which the threshold is partially changed. When an image with severe shading as described above is processed by the fixed threshold method, an image as shown in FIG. 12B is obtained, and some information is lost. Here, the part where the information by the binarization process is lost is shown by hatching. Therefore, a floating threshold method must be used to select a partially optimal threshold. However, as shown in the histogram of FIG. 13, it is difficult to search for the bimodality that determines the threshold value in the density distribution of the image shown in FIG.

更に、微分処理を用いる一般的なエッジ処理を行う場合は、画像の暗い部分では微分信号自体が小さくなるために、この部分でのエッジ処理が困難になる問題があった。   Further, when general edge processing using differential processing is performed, the differential signal itself is small in a dark portion of an image, so that there is a problem that it is difficult to perform edge processing in this portion.

本発明は、上記問題を鑑みて成されたものである。本発明の主たる目的は、シェージングを伴う画像でも良好にエッジ処理や2値化処理を行うことができる画像処理装置を提供することにある。   The present invention has been made in view of the above problems. A main object of the present invention is to provide an image processing apparatus capable of performing edge processing and binarization processing satisfactorily even for images accompanied by shading.

本発明の画像処理装置は、処理対象の画像に含まれる画素の輝度値に基づく係数を用いて前記画像の画像処理を行う画像処理装置であり、前記画像を、各々が計算対象の対象画素を含む複数のブロックに分割する分割手段と、各前記ブロックにて、前記ブロックに含まれる画素の輝度値を平均して平均輝度値を算出し、前記対象画素の輝度値と前記各ブロックの前記平均輝度値とを用いて正規化された前記係数を算出する正規化手段と、を具備することを特徴とする。  The image processing apparatus of the present invention is an image processing apparatus that performs image processing of the image using a coefficient based on a luminance value of a pixel included in the processing target image, and each of the images is a target pixel to be calculated. And dividing means for dividing the block into a plurality of blocks, and calculating an average luminance value by averaging the luminance values of the pixels included in the block in each of the blocks, and calculating the average luminance value of the target pixel and the average of the blocks Normalizing means for calculating the coefficient normalized using the luminance value.

本発明の画像処理方法は、処理対象の画像に含まれる画素の輝度値に基づく係数を用いて前記画像の画像処理を行う画像処理方法であり、前記画像を、各々が計算対象の対象画素を含む複数のブロックに分割する分割ステップと、各前記ブロックにて、前記ブロックに含まれる画素の輝度値を平均して平均輝度値を算出し、前記対象画素の輝度値と前記各ブロックの前記平均輝度値とを比較して正規化された前記係数を算出する正規化ステップと、を具備することを特徴とする。  The image processing method of the present invention is an image processing method for performing image processing of the image using a coefficient based on a luminance value of a pixel included in the image to be processed. A division step of dividing the block into a plurality of blocks, and calculating an average luminance value by averaging the luminance values of the pixels included in the block in each of the blocks, and calculating the average luminance value of the target pixel and the average of the blocks And a normalization step of calculating the normalized coefficient by comparing with a luminance value.

本発明に依れば、激しいシェージングを伴う画像の2値化またはエッジ検出を行う場合でも、シェージングに起因する低周波成分をほぼ完全に除去してこれらの処理を行うことができる。従って、画質の低い文書の2値化またはエッジ検出を行うことが可能となる。   According to the present invention, even when binarization or edge detection of an image accompanied by intense shading is performed, these processes can be performed by almost completely removing low-frequency components caused by shading. Therefore, it is possible to perform binarization or edge detection of a document with low image quality.

<第1の実施の形態>
本形態では、本形態の画像処理を用いて画像処理を行う際に用いる凹凸係数に関して説明する。
<First Embodiment>
In this embodiment, the unevenness coefficient used when image processing is performed using the image processing of this embodiment will be described.

凹凸係数とは、処理対象の画像の濃度凹凸情報を正規化した関数であり、この係数を用いることにより、局所的に明るさが変化する画像の画像処理を適切に行うことができる。   The unevenness coefficient is a function obtained by normalizing density unevenness information of an image to be processed. By using this coefficient, image processing of an image whose brightness changes locally can be appropriately performed.

具体的には、凹凸係数は、数画素平方単位に分割した画素ブロック単位で計算し、各画素値をブロック内の全画素の平均輝度値で除算した値である。したがって、この係数はブロック内の交流成分の分布状態をブロックの平均輝度値で正規化したものとなり、直流成分や低周波成分が排除された情報となる。その結果、照明の強さが変わり画面の平均的な明るさが変化しても、画面上の同一部分の凹凸係数を常に同じ値に保つことが可能となる。また、照明むら等の要因で画面上の明るさが場所によって緩やかに変化している場合も、画素ブロック程度の小さな面積の範囲では、明るさの変化も無視できる程度に小さくなる。   Specifically, the unevenness coefficient is a value calculated by a pixel block unit divided into several pixels square unit, and each pixel value divided by an average luminance value of all pixels in the block. Therefore, this coefficient is obtained by normalizing the distribution state of the AC component in the block with the average luminance value of the block, and is information in which the DC component and the low frequency component are excluded. As a result, even if the intensity of illumination changes and the average brightness of the screen changes, the unevenness coefficient of the same portion on the screen can always be kept at the same value. In addition, even when the brightness on the screen changes gradually depending on the location due to factors such as illumination unevenness, the change in brightness is small enough to be ignored in a small area range such as a pixel block.

したがって、凹凸係数は照明むらに起因する低周波数成分をほぼ完全に除去することができる。この点が微分処理でエッジ検出を行う従来の方法とは異なる。従来の微分処理では、同じ凹凸状態の画面であっても、照明が暗くなると微分信号自体も小さくなり検出しにくくなる。そのため、画像の暗部やシェージングを伴う画像ではエッジ検出や2値化処理がうまく行かない場合が多かった。   Therefore, the unevenness coefficient can almost completely remove a low frequency component caused by illumination unevenness. This is different from the conventional method in which edge detection is performed by differential processing. In the conventional differential processing, even if the screen has the same uneven state, the differential signal itself becomes small and difficult to detect when the illumination becomes dark. For this reason, edge detection and binarization processing often do not work well with dark images or images with shading.

次に、上記した凹凸係数の算出方法を説明する。この凹凸係数の基本概念は、画像をn×n画素単位に分割し、ブロックごとに下記数1を用いて求めるもので、ブロック内の全画素の平均値と各画素値との比を計算した値である。したがって、全ての画素について凹凸係数を計算することになる。   Next, a method for calculating the unevenness coefficient will be described. The basic concept of this unevenness coefficient is to divide an image into n × n pixel units and obtain the ratio of the average value of all the pixels in the block and each pixel value by using the following equation 1 for each block. Value. Therefore, the unevenness coefficient is calculated for all pixels.

ここでXijは、n×nの画素数で構成するi番目の画素ブロックのj番目の画素値、Aveはiブロック内の全画素の平均輝度値、rijはXijに対応した凹凸係数である。 Here, X ij is the j-th pixel value of the i-th pixel block composed of n × n pixels, Ave i is the average luminance value of all the pixels in the i block, and r ij is the unevenness corresponding to X ij It is a coefficient.

図1に、ある画像について導出した凹凸係数の頻度分布を示す。凹凸係数の値が1.0付近に集中しており、画像の平坦部の平坦部の面積やエッジ部の状況など画像の特徴を表現していることが判る。   FIG. 1 shows the frequency distribution of the unevenness coefficient derived for a certain image. It can be seen that the unevenness coefficient values are concentrated in the vicinity of 1.0, and express the characteristics of the image such as the area of the flat portion of the flat portion of the image and the state of the edge portion.

しかし、上記数1の方法で求めた凹凸係数は、画素ブロックの平均値で各画素値を正規化するため、ブロックサイズが大きくなるとブロック歪が検知される場合がある。そこで、画質劣化の要因となるブロック歪を抑える目的で、隣接ブロック間との相関を利用した凹凸係数の算出方法を検討した。   However, since the unevenness coefficient obtained by the method of Equation 1 normalizes each pixel value with the average value of the pixel blocks, block distortion may be detected when the block size increases. Therefore, for the purpose of suppressing block distortion that causes image quality degradation, a method for calculating the unevenness coefficient using the correlation with adjacent blocks was examined.

隣接ブロックとの相関を利用した凹凸係数(以下平滑化凹凸係数と呼ぶ)の算出方法を説明する。   A method for calculating a concavo-convex coefficient (hereinafter referred to as a smoothed concavo-convex coefficient) using a correlation with an adjacent block will be described.

図2と数2に、ブロックサイズを2×2とした場合の平滑化凹凸係数の具体的な算出方法を示す。   FIGS. 2 and 2 show a specific calculation method of the smoothing unevenness coefficient when the block size is 2 × 2.

なお、この場合はX22が平滑化凹凸係数の算出対象画素である。数2に示すように、X22を含めるようにして縦および横方向に1画素づつ、ずらしながら切り出した2×2画素の4つのブロックについて、それぞれ平均値Ave1〜Ave4を計算し、Ave1〜Ave4でX22を除算して求めた4つの比を、さらに平均化することにより平滑化凹凸係数R22を算出した。 Incidentally, X 22 in this case is the calculation target pixels of the smoothing unevenness factor. As shown in Equation 2, pixel by pixel in the vertical and horizontal directions so as to include the X 22, the four blocks of 2 × 2 pixels cut out while shifting, respectively to calculate the average value Ave1~Ave4, Ave1~Ave4 in the four ratios determined by dividing the X 22, to calculate the smoothing unevenness coefficient R 22 by further averaging.

しかしこの方法は、分割ブロックサイズを大きくすればするほど、平均値と平滑化凹凸係数を算出する除算の回数が増えて計算時間が長くなる。そこで平均値を近似的に算出する簡易計算法を検討した。これは4つの平均値算出に使用する画素の重複数を考慮したもので、数3にその算出式を示す。この方法は一回の計算で平均値を算出できるため、簡単かつ迅速に凹凸係数を導出できる。また、この計算式は除算による丸め誤差の重複を抑えることもできる。   However, in this method, as the divided block size is increased, the number of divisions for calculating the average value and the smoothing unevenness coefficient increases and the calculation time becomes longer. Therefore, a simple calculation method for calculating the average value approximately was examined. This takes into account the overlapping number of pixels used for the calculation of the four average values, and Equation 3 shows the calculation formula. In this method, since the average value can be calculated by one calculation, the unevenness coefficient can be derived easily and quickly. In addition, this calculation formula can also suppress duplication of rounding errors due to division.

上記数3の平均値算出法は、3×3のマスクオペレータを使用した畳み込み積分に類似した計算になる。なわち平滑化凹凸係数は、図3に示すような対象画素値を重み付き平均値で除算した値となる。そこで、この方法で導出した凹凸係数を平滑化凹凸係数と定義し、以後この算出法を用いてシミュレーション実験を行った。 The average value calculation method of Equation 3 is a calculation similar to convolution integration using a 3 × 3 mask operator. That is, the smoothing unevenness coefficient is a value obtained by dividing the target pixel value as shown in FIG. 3 by the weighted average value. Therefore, the unevenness coefficient derived by this method was defined as a smoothed unevenness coefficient, and a simulation experiment was performed using this calculation method thereafter.

なお、分割ブロックサイズを3×3や4×4のように増やしていくと、凹凸係数を導出する演算範囲も、それぞれ5×5および7×7画素サイズに拡大してゆき、計算範囲も広くなる。1例として画素ブロックのサイズを3×3とした場合のマスクオペレータを図4に示す。   If the divided block size is increased to 3 × 3 or 4 × 4, the calculation range for deriving the unevenness coefficient is expanded to 5 × 5 and 7 × 7 pixel sizes, respectively, and the calculation range is wide. Become. As an example, FIG. 4 shows a mask operator when the pixel block size is 3 × 3.

平滑化凹凸関数の特徴を説明する。前述のように、平滑化凹凸係数は数画素平方単位に分割した画素ブロックごとに求めるもので、ブロック内の全画素の平均輝度値と各画素値との比を求めた値である。したがってこの係数は、画像のミクロ部分における濃度変化の割合だけを表す関数となり、画素ブロックの直流成分は自動的に排除されることになる。その結果、画面上の同一画素部分の凹凸係数は、照明状態の如何に関わらず常に同じ値になる。   The characteristics of the smoothing uneven function will be described. As described above, the smoothing unevenness coefficient is obtained for each pixel block divided into units of several pixels square, and is a value obtained by calculating the ratio between the average luminance value of all the pixels in the block and each pixel value. Therefore, this coefficient becomes a function representing only the density change rate in the micro portion of the image, and the DC component of the pixel block is automatically excluded. As a result, the unevenness coefficient of the same pixel portion on the screen always has the same value regardless of the illumination state.

また画面上の明るさの変化が、画素ブロック単位で考えた場合に、無視できる程度の小さな変化になってしまう場合は、明るさの変化をほぼ完全に除去することができる。この点が平滑化凹凸係数の大きな利点の1つであり、この特徴を利用すればエッジ検出や2値化処理の際、照明むら等の不均一な低周波情報を除去することができる。また、平滑化凹凸係数の演算には、隣接画素間の相関を考慮した畳み込み積分を用いているため、ブロック間の不連続性を抑えることができる。   In addition, when the change in brightness on the screen is a small change that can be ignored when considered in units of pixel blocks, the change in brightness can be almost completely eliminated. This is one of the great advantages of the smoothing unevenness coefficient. If this feature is used, non-uniform low frequency information such as illumination unevenness can be removed during edge detection and binarization processing. Moreover, since the convolution integral which considered the correlation between adjacent pixels is used for the calculation of the smoothing uneven | corrugated coefficient, the discontinuity between blocks can be suppressed.

<第2の実施の形態>
本形態では、第1の実施の形態にて説明した平滑化凹凸係数を用いて、具体的に画像処理を行った例を説明する。
<Second Embodiment>
In this embodiment, an example in which image processing is specifically performed using the smoothing unevenness coefficient described in the first embodiment will be described.

先ず、平滑化凹凸係数を用いてエッジ成分の抽出を行った例を説明する。   First, an example in which edge components are extracted using a smoothing unevenness coefficient will be described.

平滑化凹凸係数の特徴を確認するため、図5に示す8ビットで量子化した画像を対象画像に選んで平滑化凹凸係数を算出し、エッジ成分の抽出を試みた。なおマスクオペレータは3×3で行った。算出した平滑化凹凸係数に8ビット(256レベル)の中間値である128の値をバイアスとして乗算し、エッジ画像を作製した。図6にその画像示す。   In order to confirm the characteristics of the smoothing unevenness coefficient, an image quantized with 8 bits shown in FIG. 5 was selected as the target image, the smoothing unevenness coefficient was calculated, and extraction of edge components was attempted. The mask operator was 3 × 3. An edge image was produced by multiplying the calculated smoothing unevenness coefficient by a value of 128, which is an intermediate value of 8 bits (256 levels), as a bias. The image is shown in FIG.

また比較対象画像として3×3画素サイズの8方向のラプラシアンフィルタ(バイアス値128)で処理したエッジ画像を図7に示す。これら2つの画像を比較してみると、エッジ検出効果は変わらないものの、平滑化凹凸係数で処理した画像は、ラプラシアンフィルタの処理画像に存在するリンギングや細かい粒状性雑音が少なく、画像がすっきりしているのがわかる。これは平滑化凹凸係数が、周辺画像を考慮した平均値演算を実施しているため、画面の積分効果がでているためと考えられる。   FIG. 7 shows an edge image processed by an 8-direction Laplacian filter (bias value 128) having a 3 × 3 pixel size as a comparison target image. When these two images are compared, the edge detection effect does not change, but the image processed with the smoothing unevenness coefficient has less ringing and fine graininess noise present in the processed image of the Laplacian filter, and the image is clear. I can see that This is presumably because the smoothing unevenness coefficient performs an average value calculation in consideration of the peripheral image, and thus has an integral effect on the screen.

次に、図8(A)に示すような照明の極端に暗い画像のエッジ抽出を試みた。先程と同様、図8(A)の原画像から平滑化凹凸係数を算出し、その係数に128を乗算して求めたエッジ画像を図8(B)に、ラプラシアンフィルタで処理した画像を図8(C)に示す。   Next, edge extraction of an extremely dark image with illumination as shown in FIG. As in the previous case, the smoothed unevenness coefficient is calculated from the original image of FIG. 8A, and the edge image obtained by multiplying the coefficient by 128 is shown in FIG. 8B, and the image processed by the Laplacian filter is shown in FIG. Shown in (C).

図8(B)に示す画像は比較的鮮明にエッジ処理が行われている。それに対して、図8(C)に示す画像は、鮮明なエッジの抽出が行われていない。即ち、平滑化凹凸係数を用いたエッジ検出方法は、暗い画面でもエッジ検出の能力が落ちないことを示している。これは、平滑化凹凸係数が画面の緩やかな明るさの変化に左右されず、画面のミクロな部分のコントラスト比を忠実に再現できるからである。このような特徴は、従来の微分形エッジ検出法では実現が難しく、平滑化凹凸係数の持つ大きな特徴ということができる。   The image shown in FIG. 8B is subjected to edge processing relatively clearly. On the other hand, in the image shown in FIG. 8C, a clear edge is not extracted. That is, the edge detection method using the smoothing unevenness coefficient indicates that the edge detection capability does not deteriorate even in a dark screen. This is because the smoothing unevenness coefficient is not influenced by a gradual change in brightness of the screen, and the contrast ratio of the micro portion of the screen can be faithfully reproduced. Such a feature is difficult to realize by the conventional differential edge detection method, and can be said to be a large feature of the smoothing unevenness coefficient.

次に、平滑化凹凸係数を用いて2値化処理を行った例を説明する。   Next, an example in which binarization processing is performed using a smoothing unevenness coefficient will be described.

平滑化凹凸係数は、画像のミクロ部分である画素ブロックの平均値を常時1に正規化する。従って、平滑化凹凸係数の場合は閾値を1つ設定するだけで、自動的に画素ブロックの閾値レベルを変動させることが可能になる。すなわち、画素ブロック単位で最適な閾値を自動的に設定することになり、照明むら等の弊害を除外した2値化処理を行なうことが可能になる。   The smoothing unevenness coefficient always normalizes the average value of the pixel block, which is a micro part of the image, to 1. Therefore, in the case of the smoothing unevenness coefficient, the threshold level of the pixel block can be automatically changed by setting only one threshold. That is, an optimum threshold value is automatically set for each pixel block, and binarization processing can be performed without adverse effects such as uneven illumination.

すなわち、下記数4に示すように、平滑化凹凸係数Rijの範囲を制限することにより、変動閾値式2値化処理を実施することができる。 That is, as shown in the following equation 4, the variation threshold value binarization process can be performed by limiting the range of the smoothing unevenness coefficient R ij .

図9に、この方法を用いてシェージング画像を2値化した結果を示す。図9(A)は2値化処理を行う前の画像であり、図9(B)は2値化処理により得られた処理画像である。処理画像が示すように、本方式による2値化処理は全面にわたって文字を明確に検出しており、シェージングの影響をほとんど感じさせない結果が得られた。このように凹凸係数を用いた2値化処理は、係数値に1つの閾値を設定するだけで、自動的に最適閾値を選択する浮動閾値法として動作することになり、どのような画像でも優れた2値化処理能力を発揮することができる。 FIG. 9 shows the result of binarizing the shading image using this method. FIG. 9A shows an image before binarization processing, and FIG. 9B shows a processed image obtained by binarization processing. As shown in the processed image, the binarization processing by this method clearly detected characters over the entire surface, and a result that hardly felt the influence of shading was obtained. In this way, the binarization processing using the unevenness coefficient operates as a floating threshold method that automatically selects the optimum threshold value by setting only one threshold value for the coefficient value, and is excellent for any image. The binarization processing capability can be demonstrated.

次に、図10を参照して、文字が含まれる画像を処理する場合に於いて、文字の太さとブロックサイズに関して説明する。   Next, with reference to FIG. 10, the character thickness and block size will be described in the case of processing an image including characters.

凹凸係数を用いた2値化処理法は、処理対象となる画像の直流成分を削除するため、文字の太さ等が画素ブロックサイズに比べて大きい場合、図10(A)に示すような白抜けの問題が発生する。これは真っ白な画面と真っ黒な画面の凹凸係数が、いずれも1になるために発生する。すなわち、閾値を1に設定し数4の条件で2値化した場合、画素ブロック全体が黒の領域に入り凹凸係数が1になると、黒の領域が白に反転してしまう。   In the binarization processing method using the concavo-convex coefficient, the direct current component of the image to be processed is deleted. Therefore, when the thickness of the character is larger than the pixel block size, white as shown in FIG. Omission problems occur. This occurs because the concavo-convex coefficient of a white screen and a black screen are both 1. That is, when the threshold is set to 1 and binarization is performed under the condition of Equation 4, when the entire pixel block enters a black region and the unevenness coefficient becomes 1, the black region is inverted to white.

この問題の解決策としては、画素ブロックサイズを文字の太さ以上に大きくする方法がある。この方法で2値化した画像を図10(B)に示す。この画像では白抜けの現象は発生していない。   As a solution to this problem, there is a method of making the pixel block size larger than the thickness of the character. An image binarized by this method is shown in FIG. This image has no white spots.

また、上述問題に対する他の方法として、画素ブロックの平均輝度値を監視する方法がある。具体的には、画素ブロックの平均輝度値Aveを常に監視しておき、例え凹凸係数が1であってもAveがほぼ0のときには、その部分を強制的に黒にする。この方法であっても、図10(B)に示すような画像を得ることができる。 As another method for the above problem, there is a method of monitoring the average luminance value of the pixel block. Specifically, the average luminance value Ave i of the pixel block is constantly monitored, and even if the unevenness coefficient is 1, if the Ave i is almost 0, that portion is forcibly made black. Even with this method, an image as shown in FIG. 10B can be obtained.

<第3の実施の形態>
本形態では、上述した凹凸係数あるいは平滑化凹凸係数を利用した2種類の画像処理フィルタに関して説明する。第1のフィルタは明度の変化に対して周波数特性が変化しないフィルタであり、第2のフィルタは明度の変化に応じて周波数特性が変化するフィルタである。
<Third Embodiment>
In this embodiment, two types of image processing filters using the above-described unevenness coefficient or smoothed unevenness coefficient will be described. The first filter is a filter whose frequency characteristics do not change with changes in brightness, and the second filter is a filter whose frequency characteristics change according to changes in brightness.

先ず、上述した第1のフィルタの計算式を下記数5に示す。   First, the calculation formula of the first filter described above is shown in Equation 5 below.

上記数5では、Aveijはブロックの画素の平均値であり、Rijは凹凸係数または平滑化凹凸係数である。また、Yijはフィルタ処理後の画素値である。 In Equation 5, Ave ij is the average value of the pixels of the block, and R ij is the unevenness coefficient or the smoothed unevenness coefficient. Y ij is a pixel value after filtering.

このフィルタではフィルタ特性を任意の定数nにより自由に変化させることができる。また、画像の明度変化に関係なく常に一定の周波数特性が得られる。この線形フィルタは、エッジ強調からぼかし特性に至るまで、nの値によって特性を自由に変化させることができる。第1のフィルタの特性は、n=1を境にして変化する。具体的には、nが1よりも大きい場合は、第1のフィルタはエッジ強調の処理を行う。また、nが1よりも小さい場合は、第1のフィルタはぼかし処理を行う。尚、nの値が1の場合は、下記数6の様に展開され、フィルタ処理後の画素値は入力画素値と同様になる。   In this filter, the filter characteristics can be freely changed by an arbitrary constant n. In addition, a constant frequency characteristic can always be obtained regardless of the change in brightness of the image. This linear filter can freely change the characteristics depending on the value of n from edge enhancement to blurring characteristics. The characteristic of the first filter changes with n = 1 as a boundary. Specifically, when n is larger than 1, the first filter performs edge enhancement processing. When n is smaller than 1, the first filter performs a blurring process. When the value of n is 1, it is expanded as shown in Equation 6 below, and the pixel value after filtering is the same as the input pixel value.

次に、画面の明るさに応じて周波数特性が自動的に変化する第2のフィルタを下記数7に示す。 Next, a second filter whose frequency characteristics automatically change according to the brightness of the screen is shown in the following equation (7).

上記数7では、Aveijはブロックの画素の平均値であり、Xijは入力画素値である。このフィルタではエッジ強調やぼかし処理の具合を任意の定数kにより自由に変化させることができる。また、このフィルタでは、パラメータkの値とAveijの大小関係でフィルタの周波数特性が自動的に変化する。具体的には、k=Aveijを境にフィルタの周波数特性が変化する。kの値がAveijよりも大きいときは、エッジ強調(ハイパス特性)の特性を有する。また、kの値がAveijよりも小さいときは、ぼかし処理(ローパス特性)の特性を有する。また、k=Aveijの時は下記数8の様に展開され、フィルタ処理後の画素値が、入力値と等しくなる。 In Equation 7, Ave ij is an average value of the pixels of the block, and X ij is an input pixel value. In this filter, the degree of edge enhancement and blurring can be freely changed by an arbitrary constant k. In this filter, the frequency characteristic of the filter automatically changes depending on the magnitude relationship between the value of the parameter k and Ave ij . Specifically, the frequency characteristic of the filter changes with k = Ave ij as a boundary. When the value of k is larger than Ave ij , it has edge enhancement (high pass characteristics) characteristics. Further, when the value of k is smaller than Ave ij , it has a blurring process (low-pass characteristic) characteristic. Further, when k = Ave ij, the following expression 8 is developed, and the pixel value after the filter processing becomes equal to the input value.

このフィルタでは、画像の明度(ブロック平均値)の変化により、ハイパス特性からローパス特性まで、周波数特性が自動的に変化する。 In this filter, the frequency characteristic automatically changes from a high-pass characteristic to a low-pass characteristic due to a change in image brightness (block average value).

図11(A)に示す画像は、左側の方が右側よりも明るくなるように明度変化をつけた画像である。   The image shown in FIG. 11A is an image in which the brightness is changed so that the left side is brighter than the right side.

図11(B)は、図11(A)に示す画像を第2のフィルタにて処理した画像である。この画像を参照すると、明度の変化に伴い周波数特性が変化していることが理解できる。即ち、明度が低い(暗い)画像の右側ではエッジ強調の画像処理が行われている。また、明度が高い(明るい)画像の左側では、ぼかし処理が行われている。   FIG. 11B is an image obtained by processing the image shown in FIG. 11A with the second filter. Referring to this image, it can be understood that the frequency characteristics change as the brightness changes. That is, edge-enhanced image processing is performed on the right side of a low-lightness (dark) image. In addition, blurring processing is performed on the left side of an image with high (bright) brightness.

このフィルタでは、画像の暗い部分にてエッジ強調が行われる。従って、例えば、暗い部分のエッジを強調することにより、レントゲン写真の病巣部分を強調することができる。   With this filter, edge enhancement is performed in a dark portion of an image. Therefore, for example, by emphasizing an edge of a dark part, a lesion part of the X-ray photograph can be emphasized.

本発明の凹凸係数のヒストグラムを示すグラフである。It is a graph which shows the histogram of the uneven | corrugated coefficient of this invention. 本発明の平滑化凹凸係数の算出範囲を示す表である。It is a table | surface which shows the calculation range of the smoothing uneven | corrugated coefficient of this invention. 本発明の平滑化凹凸係数を算出する際に用いるマスクオペレータ(2×2)を示す表である。It is a table | surface which shows the mask operator (2x2) used when calculating the smoothing uneven | corrugated coefficient of this invention. 本発明の平滑化凹凸係数を算出する際に用いるマスクオペレータ(3×3)を示す表である。It is a table | surface which shows the mask operator (3x3) used when calculating the smoothing uneven | corrugated coefficient of this invention. エッジ処理を行う対象となる原画像である。This is an original image to be subjected to edge processing. 本発明の画像処理装置を用いて、エッジ検出を行った画像である。It is the image which performed edge detection using the image processing apparatus of this invention. 従来の微分法を用いてエッジ検出を行った画像である。It is the image which performed edge detection using the conventional differentiation method. (A)はエッジ処理を行う対象となる原画像であり、(B)は本発明の平滑化凹凸係数を用いてエッジ検出を行った画像であり、(C)は従来の微分法を用いてエッジ検出を行った画像である。(A) is an original image to be subjected to edge processing, (B) is an image subjected to edge detection using the smoothing unevenness coefficient of the present invention, and (C) is a conventional differentiation method. It is the image which performed edge detection. (A)は2値化処理の対象となる画像であり、(B)は本発明の平滑化凹凸係数を用いて2値化処理を行った画像である。(A) is an image to be binarized, and (B) is an image that has been binarized using the smoothing unevenness coefficient of the present invention. (A)および(B)は、本発明の平滑化凹凸係数を用いて2値化を行った画像である。(A) and (B) are images binarized using the smoothing unevenness coefficient of the present invention. (A)はフィルタ処理を行う前の画像であり、(B)は本発明のフィルタ処理を行った後の画像である。(A) is an image before performing the filtering process, and (B) is an image after performing the filtering process of the present invention. (A)は2値化処理の対象となる画像であり、(B)は従来の2値化処理を適用させた画像である。(A) is an image to be binarized, and (B) is an image to which a conventional binarization process is applied. 図12(A)に示した画像のヒストグラムを示すグラフである。13 is a graph showing a histogram of the image shown in FIG.

Claims (7)

処理対象の画像に含まれる画素の輝度値に基づく係数を用いて前記画像の画像処理を行う画像処理装置であり、  An image processing apparatus that performs image processing of the image using a coefficient based on a luminance value of a pixel included in an image to be processed;
前記画像を、各々が計算対象の対象画素を含む複数のブロックに分割する分割手段と、  Dividing means for dividing the image into a plurality of blocks each including a target pixel to be calculated;
各前記ブロックにて、前記ブロックに含まれる画素の輝度値を平均して平均輝度値を算出し、前記対象画素の輝度値と前記各ブロックの前記平均輝度値とを用いて正規化された前記係数を算出する正規化手段と、  In each of the blocks, the average luminance value is calculated by averaging the luminance values of the pixels included in the block, and normalized using the luminance value of the target pixel and the average luminance value of each block Normalization means for calculating the coefficients;
を具備することを特徴とする画像処理装置。  An image processing apparatus comprising:
前記正規化手段は、各前記ブロックの前記平均輝度値で前記対象画素の輝度値を除算して比を求め、前記各ブロックの前記比を平均して正規化された前記係数を算出することを特徴とする請求項1記載の画像処理装置。  The normalizing means obtains a ratio by dividing the luminance value of the target pixel by the average luminance value of each of the blocks, and calculates the normalized coefficient by averaging the ratio of each of the blocks. The image processing apparatus according to claim 1, wherein: 前記分割手段は、前記画像を、前記対象画素を右下端部に含む第1ブロックと、前記対象画素を右上端部に含む第2ブロックと、前記対象画素を左上端部に含む第3ブロックと、前記対象画素を左下端部に含む第4ブロックに分割し、  The dividing means includes a first block including the target pixel at a lower right end, a second block including the target pixel at an upper right end, and a third block including the target pixel at an upper left end. , Dividing the target pixel into a fourth block including the lower left portion,
前記正規化手段は、前記第1ブロック、前記第2ブロック、前記第3ブロックおよび前記第4ブロックの各々に含まれる画素の輝度値から、前記係数を算出することを特徴とする請求項1記載の画像処理装置。  2. The normalization unit calculates the coefficient from luminance values of pixels included in each of the first block, the second block, the third block, and the fourth block. Image processing apparatus.
前記係数を用いて、前記画像の2値化、前記画像のエッジ処理または前記画像のフィルタリングを行うことを特徴とする請求項1記載の画像処理装置。  The image processing apparatus according to claim 1, wherein binarization of the image, edge processing of the image, or filtering of the image is performed using the coefficient. 前記画像は、文字を含む画像であり、  The image is an image including characters,
前記ブロックの大きさを、前記文字を構成する線よりも大きくして、前記係数を用いた2値化を行い、  The size of the block is made larger than the line constituting the character, and binarization using the coefficient is performed,
2値化された前記画像から文字を検出することを特徴とする請求項1記載の画像処理装置。  The image processing apparatus according to claim 1, wherein characters are detected from the binarized image.
前記係数に基づいて、黒色を示す黒信号または白色を示す白信号を付与する2値化手段と、  Binarization means for providing a black signal indicating black or a white signal indicating white based on the coefficient;
前記ブロックの平均輝度値に基づいて、前記2値化手段により付与された白信号を黒信号に変更する変更手段とを具備することを特徴とする請求項1記載の画像処理装置。  The image processing apparatus according to claim 1, further comprising: a changing unit that changes a white signal provided by the binarizing unit to a black signal based on an average luminance value of the block.
処理対象の画像に含まれる画素の輝度値に基づく係数を用いて前記画像の画像処理を行う画像処理方法であり、  An image processing method for performing image processing of the image using a coefficient based on a luminance value of a pixel included in an image to be processed;
前記画像を、各々が計算対象の対象画素を含む複数のブロックに分割する分割ステップと、  A division step of dividing the image into a plurality of blocks each including a target pixel to be calculated;
各前記ブロックにて、前記ブロックに含まれる画素の輝度値を平均して平均輝度値を算出し、前記対象画素の輝度値と前記各ブロックの前記平均輝度値とを比較して正規化された前記係数を算出する正規化ステップと、  In each of the blocks, the luminance value of the pixels included in the block is averaged to calculate an average luminance value, and the luminance value of the target pixel and the average luminance value of each block are compared and normalized. A normalization step of calculating the coefficient;
を具備することを特徴とする画像処理方法。  An image processing method comprising:
JP2005004894A 2005-01-12 2005-01-12 Image processing apparatus and image processing method Expired - Fee Related JP3909604B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005004894A JP3909604B2 (en) 2005-01-12 2005-01-12 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005004894A JP3909604B2 (en) 2005-01-12 2005-01-12 Image processing apparatus and image processing method

Publications (2)

Publication Number Publication Date
JP2006195622A JP2006195622A (en) 2006-07-27
JP3909604B2 true JP3909604B2 (en) 2007-04-25

Family

ID=36801678

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005004894A Expired - Fee Related JP3909604B2 (en) 2005-01-12 2005-01-12 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP3909604B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008108052A (en) * 2006-10-25 2008-05-08 Hiroshima Industrial Promotion Organization Image processor and image processing method
JP5779089B2 (en) 2011-12-28 2015-09-16 株式会社ドワンゴ Edge detection apparatus, edge detection program, and edge detection method
CN109905690B (en) * 2017-12-11 2021-06-22 瑞昱半导体股份有限公司 Image adjusting device and method
WO2023189791A1 (en) * 2022-03-31 2023-10-05 ソニーセミコンダクタソリューションズ株式会社 Image processing device, image processing method, and learning device

Also Published As

Publication number Publication date
JP2006195622A (en) 2006-07-27

Similar Documents

Publication Publication Date Title
JP4112362B2 (en) System and method for enhancing scanned document images for color printing
JP4423298B2 (en) Text-like edge enhancement in digital images
JP2696211B2 (en) Method and apparatus for pattern recognition from grayscale images
US8923612B2 (en) Image processing apparatus and method, and program
JP2001005960A (en) Method and device for processing image
JP2001118062A (en) Automatic dynamic range compressing method
CN110648349A (en) Weld defect segmentation method based on background subtraction and connected region algorithm
KR20130016213A (en) Text enhancement of a textual image undergoing optical character recognition
US8248662B2 (en) Image forming apparatus and method thereof
CN104504703A (en) Welding spot color image segmentation method based on chip element SMT (surface mounting technology)
US7269296B2 (en) Method and apparatus for shoot suppression in image detail enhancement
JP3909604B2 (en) Image processing apparatus and image processing method
JP2003283878A (en) Method for improving picture quality
JP3762019B2 (en) Image processing method
JP2010232795A (en) Apparatus and method for reducing gradation number
KR101089902B1 (en) Apparatus and method for estimating edge of digital image
Safonov et al. Adaptive sharpening of photos
Boiangiu et al. Methods of bitonal image conversion for modern and classic documents
JP4247993B2 (en) Image inspection apparatus, image inspection method, control program, and readable storage medium
TWI401616B (en) Gradient-based halftoning method
JPH0816773A (en) Image processing method
KR101024818B1 (en) Image processing apparatus using error diffusion method
JPH0624014B2 (en) Gray image processing method
JPH10269352A (en) Image processor and method
JP4084719B2 (en) Image processing apparatus, image forming apparatus including the image processing apparatus, image processing method, image processing program, and computer-readable recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060810

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20060810

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20060905

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061017

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061116

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070117

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130202

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130202

Year of fee payment: 6

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20130202

Year of fee payment: 6

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20130202

Year of fee payment: 6

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

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

Free format text: PAYMENT UNTIL: 20130202

Year of fee payment: 6

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees