JP2009188892A - Image processing apparatus, and image processing program - Google Patents

Image processing apparatus, and image processing program Download PDF

Info

Publication number
JP2009188892A
JP2009188892A JP2008028832A JP2008028832A JP2009188892A JP 2009188892 A JP2009188892 A JP 2009188892A JP 2008028832 A JP2008028832 A JP 2008028832A JP 2008028832 A JP2008028832 A JP 2008028832A JP 2009188892 A JP2009188892 A JP 2009188892A
Authority
JP
Japan
Prior art keywords
color
image
unit
binarization
region
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2008028832A
Other languages
Japanese (ja)
Other versions
JP5146653B2 (en
Inventor
Atsushi Ito
篤 伊藤
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2008028832A priority Critical patent/JP5146653B2/en
Publication of JP2009188892A publication Critical patent/JP2009188892A/en
Application granted granted Critical
Publication of JP5146653B2 publication Critical patent/JP5146653B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus and image processing program which removes show-through effects from the whole image accurately so that a shape of a boundary with a different density or color is preserved. <P>SOLUTION: A binarization part 11 binarizes an input image and creates a binarization image which is a binary image showing parts of a textured color and other parts. A contraction and expansion part 12 applies expansion processing after applying contraction processing, and obtains the binarization image. A region setting part 13 sets a reference region for referring to the input image so that pixel values corresponding to a target pixel in the binarization image are contained in a large number. A color estimating part 14 sets a parameter according to the size of the reference region set by the region setting part 13, estimates the original color free from show-through effects in the target pixel using the pixel values within the reference region, and outputs it as the color of the target pixel. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、画像処理装置及び画像処理プログラムに関するものである。   The present invention relates to an image processing apparatus and an image processing program.

従来より、両面に画像がある原稿の画像を読み取った場合や、原稿を重ねて画像を読み取った場合に、読取対象面の画像だけでなく、裏面や他の原稿の画像が透けて読み取られてしまう、いわゆる裏写りが発生している。この裏写りを除去する技術の一つとして、原稿の両面の画像を読み込み、それら両面の画像を参照することで裏写りの除去を行うことが知られている。   Conventionally, when an image of a document with images on both sides is scanned, or when an image is scanned with the documents overlaid, not only the image on the surface to be scanned but also the image on the back and other documents are scanned through. So-called show-through has occurred. As one of the techniques for removing the show-through, it is known to remove the show-through by reading images on both sides of the document and referring to the images on both sides.

片面のみの画像から裏写りを除去する方法としては、いわゆる下地除去処理を行うことにより実現していた。下地除去処理は、ある固定値もしくは検出された下地レベルに従って、読み取った画像に対して階調補正を行うものである。この場合、下地以外の色の領域では処理が行われず、裏写りがそのまま残ることになる。   A method of removing show-through from an image on only one side has been realized by performing so-called background removal processing. In the background removal process, gradation correction is performed on a read image in accordance with a certain fixed value or a detected background level. In this case, the process is not performed in the color area other than the background, and the show-through remains.

また別の方法として、例えば特許文献1には、画像中のエッジを検出してエッジ以外の領域に対してカラー閾値処理を行って裏写りを除去することが記載されている。また、例えば特許文献2には、さらにテキスト領域や写真を囲む長方形枠を検出し、枠として検出されなかった画素に対してのみ裏写りを除去する処理を行うことが提案されている。これらの方法では、エッジ部分や枠領域を処理対象から除外しているため、エッジ部分や枠領域に裏写りした画像が残ることになる。   As another method, for example, Patent Document 1 describes that an edge in an image is detected and color threshold processing is performed on a region other than the edge to remove show-through. Further, for example, Patent Document 2 proposes that a rectangular frame surrounding a text area or a photograph is further detected, and a process for removing show-through is performed only for pixels that are not detected as a frame. In these methods, since the edge portion and the frame region are excluded from the processing target, a show-through image remains in the edge portion and the frame region.

画像全体に対して裏写りを除去する方法として、特許文献3に記載した方法がある。この方法では、注目画素を含む参照領域を設定し、その参照領域中の画素値から色頻度値を算出する。この色頻度値から極大となるいくつかの色値を特定し、その中から裏写りしていない元の色を推定している。この方法では、濃度や色が異なる部分が参照領域中に存在する場合に、色の推定の誤差により、濃度や色が異なる境界の形状が保存されないことがある。   As a method for removing show-through from the entire image, there is a method described in Patent Document 3. In this method, a reference area including a target pixel is set, and a color frequency value is calculated from pixel values in the reference area. Several color values that are maximal are specified from the color frequency values, and the original color that is not show-through is estimated from among them. In this method, when a portion having a different density or color exists in the reference region, the shape of the boundary having a different density or color may not be saved due to an error in color estimation.

特開2001−169080号公報JP 2001-169080 A 特開2002−252746号公報JP 2002-252746 A 特開2007−104286号公報JP 2007-104286 A

本発明は、濃度や色が異なる境界の形状が保存されるように画像全体に対して正しく裏写りを除去する画像処理装置及び画像処理プログラムを提供することを目的とするものである。   It is an object of the present invention to provide an image processing apparatus and an image processing program that correctly remove show-through from an entire image so that boundary shapes having different densities and colors are stored.

本願請求項1に記載の発明は、入力画像を二値化する二値化手段と、前記注目画素を含むとともに二値化した画像における注目画素に対応する画素値が多く含まれるように参照領域を設定する領域設定手段と、前記入力画像中の前記領域設定手段で設定した参照領域内の画素の値をもとに裏写りしていない元の色を推定する色推定手段を有することを特徴とする画像処理装置である。   The invention according to claim 1 includes a binarizing unit that binarizes an input image, and a reference region that includes the target pixel and includes a large number of pixel values corresponding to the target pixel in the binarized image. And a color estimation unit for estimating an original color that is not show-through based on a pixel value in a reference region set by the region setting unit in the input image. The image processing apparatus.

本願請求項2に記載の発明は、入力画像を二値化する二値化手段と、前記注目画素を含むとともに二値化した画像における注目画素に対応する画素値で構成される参照領域を設定する領域設定手段と、前記入力画像中の前記領域設定手段で設定した参照領域内の画素の値をもとに裏写りしていない元の色を推定する色推定手段を有することを特徴とする画像処理装置である。   According to the second aspect of the present invention, a binarization unit that binarizes an input image and a reference region that includes the target pixel and includes pixel values corresponding to the target pixel in the binarized image are set. And a color estimation unit that estimates an original color that is not show-through based on a value of a pixel in a reference region set by the region setting unit in the input image. An image processing apparatus.

本願請求項3に記載の発明は、本願請求項1または請求項2に記載の画像処理装置における前記色推定手段が、前記領域設定手段によって設定された参照領域の大きさに従った色の推定処理を行うことを特徴とする画像処理装置である。   According to a third aspect of the present invention, in the image processing apparatus according to the first or second aspect of the present invention, the color estimation unit estimates the color according to the size of the reference region set by the region setting unit. An image processing apparatus that performs processing.

本願請求項4に記載の発明は、本願請求項1から請求項3のいずれか1項に記載の画像処理装置において、さらに、前記二値化手段で二値化した画像に対して収縮処理を施した後に膨張処理を施す収縮膨張手段を有し、前記領域設定手段は、前記収縮膨張手段による処理後の二値化画像を使用して前記参照領域を設定することを特徴とする画像処理装置である。   According to a fourth aspect of the present invention, in the image processing apparatus according to any one of the first to third aspects of the present invention, a contraction process is further performed on the image binarized by the binarization unit. An image processing apparatus comprising: a contraction / expansion unit that performs expansion processing after being applied, wherein the region setting unit sets the reference region using a binarized image processed by the contraction / expansion unit It is.

本願請求項5に記載の発明は、入力画像を二値化する二値化手段と、前記二値化手段で二値化した画像に対して収縮処理を施した後に膨張処理を施す収縮膨張手段と、前記収縮膨張手段で収縮処理を施した画像とその後に膨張処理を施した画像との差分を端部二値画像として取得する端部二値画像取得手段と、前記入力画像から裏写りしていない元の色を推定する色推定手段と、前記端部二値画像取得手段で取得された前記端部二値画像に応じて前記色推定手段で推定された色と推定前の色との間で色調整を行う色調整手段を有することを特徴とする画像処理装置である。   The invention described in claim 5 includes a binarizing unit that binarizes an input image, and a contraction / expansion unit that performs expansion processing after performing contraction processing on the image binarized by the binarization unit. Edge binary image acquisition means for acquiring the difference between the image subjected to the contraction process by the contraction / expansion means and the image subjected to the expansion process thereafter as an end binary image, and show-through from the input image A color estimation unit that estimates a non-original color, a color estimated by the color estimation unit according to the end binary image acquired by the end binary image acquisition unit, and a color before estimation An image processing apparatus having color adjustment means for performing color adjustment in between.

本願請求項6に記載の発明は、本願請求項1から請求項5のいずれか1項に記載の画像処理装置における二値化手段が、浮動二値化処理により地肌色とそれ以外の色に二値化することを特徴とする画像処理装置である。   In the invention described in claim 6 of the present application, the binarization means in the image processing apparatus according to any one of claims 1 to 5 converts the background color and other colors by floating binarization processing. An image processing apparatus characterized by binarization.

本願請求項7に記載の発明は、本願請求項1から請求項4のいずれか1項に記載の画像処理装置における二値化手段が、移動平均法により二値化することを特徴とする画像処理装置である。   The invention according to claim 7 of the present application is characterized in that the binarization means in the image processing apparatus according to any one of claims 1 to 4 binarizes by a moving average method. It is a processing device.

本願請求項8に記載の発明は、入力画像を移動平均法により二値化する二値化手段と、前記二値化手段で二値化した画像に対して収縮処理を施した画像中の孤立領域に対してラベリングを行った後に異なるラベルが付与された孤立領域が結合しないように膨張処理を施す収縮膨張手段と、前記収縮膨張手段による処理後のラベリングされた二値化画像を使用して前記注目画素を含むとともに前記二値化画像において前記注目画素にラベルが付与されている場合に該注目画素に対応するラベルの画素が多く含まれるように参照領域を設定する領域設定手段と、前記入力画像中の前記領域設定手段で設定した参照領域内の画素の値をもとに裏写りしていない元の色を推定する色推定手段を有することを特徴とする画像処理装置である。   The invention according to claim 8 of the present application is a binarization unit that binarizes an input image by a moving average method, and an isolation in an image obtained by performing a contraction process on an image binarized by the binarization unit Using a contraction / expansion unit that performs an expansion process so that isolated regions to which different labels are applied after labeling are not combined and a labeled binarized image processed by the contraction / expansion unit are used. An area setting means for setting a reference area so as to include many pixels of a label corresponding to the target pixel when the target pixel is included in the binarized image and includes the target pixel; An image processing apparatus comprising color estimation means for estimating an original color not show-through based on a pixel value in a reference area set by the area setting means in the input image.

本願請求項9に記載の発明は、入力画像を移動平均法により二値化する二値化手段と、前記二値化手段で二値化した画像に対して収縮処理を施した画像中の孤立領域に対してラベリングを行った後に異なるラベルが付与された孤立領域が結合しないように膨張処理を施す収縮膨張手段と、前記収縮膨張手段による処理後のラベリングされた二値化画像を使用して前記注目画素を含むとともに前記二値化画像において前記注目画素にラベルが付与されている場合に該注目画素に対応するラベルの画素で構成される参照領域を設定する領域設定手段と、前記入力画像中の前記領域設定手段で設定した参照領域内の画素の値をもとに裏写りしていない元の色を推定する色推定手段を有することを特徴とする画像処理装置である。   The invention according to claim 9 of the present application is a binarizing unit that binarizes an input image by a moving average method, and an isolated image in which an image binarized by the binarizing unit is subjected to a contraction process. Using a contraction / expansion unit that performs an expansion process so that isolated regions to which different labels are applied after labeling are not combined and a labeled binarized image processed by the contraction / expansion unit are used. A region setting means for setting a reference region including a pixel of a label corresponding to the target pixel when the target pixel includes the target pixel and a label is assigned to the target pixel in the binarized image; An image processing apparatus comprising color estimation means for estimating an original color not show-through based on a value of a pixel in a reference area set by the area setting means.

本願請求項10に記載の発明は、本願請求項8または請求項9に記載の画像処理装置における色推定手段が、前記領域設定手段によって設定された参照領域の大きさに従った色の推定処理を行うことを特徴とする画像処理装置である。   In the invention according to claim 10 of the present application, the color estimation unit in the image processing apparatus according to claim 8 or 9 of the present application performs color estimation processing according to the size of the reference region set by the region setting unit. It is an image processing apparatus characterized by performing.

本願請求項11に記載の発明は、入力画像を移動平均法により二値化する二値化手段と、前記二値化手段で二値化した画像に対して収縮処理を施した後に膨張処理を施す収縮膨張手段と、前記入力画像から裏写りしていない元の色を推定する色推定手段と、前記収縮膨張手段による処理後の二値画像に応じて前記色推定手段で推定された色と推定前の色との間で色調整を行う色調整手段を有することを特徴とする画像処理装置である。   The invention according to claim 11 of the present application is a binarization unit that binarizes an input image by a moving average method, and performs an expansion process after performing a contraction process on an image binarized by the binarization unit. Contraction / expansion means to be applied; color estimation means for estimating an original color not show-through from the input image; and a color estimated by the color estimation means in accordance with a binary image processed by the contraction / expansion means; An image processing apparatus comprising color adjusting means for performing color adjustment with a color before estimation.

本願請求項12に記載の発明は、コンピュータに、請求項1ないし請求項11のいずれか1項に記載の画像処理装置の機能を実行させることを特徴とする画像処理プログラムである。   The invention according to claim 12 of the present application is an image processing program that causes a computer to execute the function of the image processing apparatus according to any one of claims 1 to 11.

本願請求項1、2,5に記載の発明によれば、濃度や色が異なる境界の形状が保存されるように画像全体に対して正しく裏写りを除去することができる。   According to the invention described in claims 1, 2, and 5 of the present application, the show-through can be correctly removed from the entire image so that the shape of the boundary with different density and color is preserved.

本願請求項3に記載の発明によれば、本願請求項1,2に記載の発明と比べて、より正しく裏写りしていない元の色を推定することができる。   According to the invention described in claim 3 of the present application, it is possible to estimate the original color which is not show-through more correctly than in the inventions described in claims 1 and 2 of the present application.

本願請求項4に記載の発明によれば、文字や線、ノイズなどに影響されることなく、裏写りを除去することができる。   According to the fourth aspect of the present invention, the show-through can be removed without being affected by characters, lines, noise, or the like.

本願請求項6に記載の発明によれば、地肌色とそれ以外の色との境界の形状を保存して、裏写りを除去することができる。   According to the sixth aspect of the present invention, the show-through can be removed by preserving the shape of the boundary between the background color and the other colors.

本願請求項7に記載の発明によれば、本願請求項1から4に記載の発明と比べて、濃度や色が異なる境界部分における裏写りしていない元の色をより正しく推定することができる。   According to the invention described in claim 7 of the present application, compared to the invention described in claims 1 to 4 of the present application, it is possible to more accurately estimate the original color that is not show-through at the boundary portion having a different density or color. .

本願請求項8,9に記載の発明によれば、地肌色及びそれ以外の部分でも、濃度や色が異なるそれぞれの境界の形状を保存して、裏写りを除去することができる。   According to the inventions described in claims 8 and 9 of the present application, it is possible to remove the show-through by storing the shape of each boundary having different densities and colors in the background color and other portions.

本願請求項10に記載の発明によれば、本願請求項8,9に記載の発明と比べて、より正しく裏写りしていない元の色を推定することができる。   According to the invention described in claim 10 of the present application, it is possible to estimate an original color that is not show-through more correctly than in the inventions described in claims 8 and 9 of the present application.

本願請求項11に記載の発明によれば、地肌色及びそれ以外の部分でも、濃度や色が異なる境界の形状を保存して、裏写りを除去することができる。   According to the eleventh aspect of the present invention, the show-through can be removed by preserving the shapes of the borders having different densities and colors in the background color and other portions.

本願請求項12に記載の発明によれば、本願請求項1ないし請求項11のいずれか1項に記載の発明の効果を得ることができる。   According to the invention of claim 12 of the present application, the effect of the invention of any one of claims 1 to 11 of the present application can be obtained.

図1は、本発明の第1の実施の形態の構成例を示すブロック図である。図中、11は二値化部、12は収縮膨張部、13は領域設定部、14は色推定部である。二値化部11は、入力画像を二値化して、少なくとも地肌部分とそれ以外とが分かるようにする。二値化の方法としては、浮動二値化処理など、周知の方法を用いればよい。   FIG. 1 is a block diagram showing a configuration example of the first embodiment of the present invention. In the figure, 11 is a binarization unit, 12 is a contraction / expansion unit, 13 is an area setting unit, and 14 is a color estimation unit. The binarization unit 11 binarizes the input image so that at least a background portion and other portions can be understood. As a binarization method, a known method such as a floating binarization process may be used.

収縮膨張部12は、二値化部11で二値化した画像に対して収縮処理を施した後に膨張処理を施し、前景二値化画像を得る。収縮処理は、地肌部分以外の領域を収縮させる処理であり、この収縮処理により線幅が所定の幅以下の文字や線画については消去される。収縮処理で残った地肌部分以外の領域について、膨張処理によって元の大きさの領域に戻すことになる。   The contraction / expansion unit 12 performs contraction processing on the image binarized by the binarization unit 11 and then performs expansion processing to obtain a foreground binarized image. The shrinking process is a process of shrinking an area other than the background portion, and characters and line drawings having a line width equal to or smaller than a predetermined width are deleted by the shrinking process. The region other than the background portion remaining after the shrinking process is returned to the original size by the expansion process.

領域設定部13は、色推定部14における処理対象となる注目画素を含む参照領域を設定する。この参照領域は、膨張収縮部12で得た前景二値化画像における注目画素に対応する画素値が多く含まれるように設定する。例えば二値を「0」と「1」とした場合、注目画素が「0」であれば、前景二値化画像の画素値が「0」の画素が多く含まれるように参照領域を設定する。また、注目画素が「1」であれば、前景二値化画像の画素値が「1」の画素が多く含まれるように参照領域を設定する。   The region setting unit 13 sets a reference region including a target pixel that is a processing target in the color estimation unit 14. This reference area is set so that many pixel values corresponding to the target pixel in the foreground binarized image obtained by the expansion / contraction part 12 are included. For example, when the binary values are “0” and “1”, if the target pixel is “0”, the reference region is set so that many pixels with the pixel value “0” in the foreground binarized image are included. . If the target pixel is “1”, the reference area is set so that many pixels having a pixel value “1” in the foreground binarized image are included.

色推定部14は、入力画像中の領域設定部13で設定した参照領域内の画素の値をもとに、裏写りしていない元の色を推定して注目画素の色として出力する。推定の際には、領域設定部13によって設定された参照領域の大きさに従った色の推定処理を行う。色の推定処理としては、特許文献3に記載されている方法を用いる。   Based on the value of the pixel in the reference region set by the region setting unit 13 in the input image, the color estimation unit 14 estimates the original color that is not show-through and outputs it as the color of the target pixel. At the time of estimation, a color estimation process according to the size of the reference area set by the area setting unit 13 is performed. As the color estimation process, the method described in Patent Document 3 is used.

図2は、色推定部の一例を示すブロック図、図3は、色推定部の動作の一例の説明図である。図中、21は色ヒストグラム算出部、22は色値候補選出部、23は推定色決定部、24はパラメータ設定部である。色推定部14は、入力された画像について、各画素を順に処理対象の注目画素とし、その注目画素について裏写りしていない元の色を推定する。   FIG. 2 is a block diagram illustrating an example of the color estimation unit, and FIG. 3 is an explanatory diagram illustrating an example of the operation of the color estimation unit. In the figure, 21 is a color histogram calculation unit, 22 is a color value candidate selection unit, 23 is an estimated color determination unit, and 24 is a parameter setting unit. The color estimation unit 14 sequentially sets each pixel as a target pixel to be processed in the input image, and estimates an original color that is not revealed in the target pixel.

色ヒストグラム算出部21は、領域設定部13で設定された参照領域内のそれぞれの画素の色のヒストグラムを算出する。図3(A)において太線で囲んだ部分が領域設定部13で設定された参照領域の一例であり、この参照領域内の画素の色のヒストグラムを算出する。算出されたヒストグラムは、図3(B)に示すような、例えば3次元の色空間中の頻度値となる。   The color histogram calculation unit 21 calculates a color histogram of each pixel in the reference region set by the region setting unit 13. In FIG. 3A, a portion surrounded by a thick line is an example of the reference region set by the region setting unit 13, and a histogram of the color of the pixels in this reference region is calculated. The calculated histogram is a frequency value in, for example, a three-dimensional color space as shown in FIG.

色値候補選出部22は、注目画素の色を置き換える、すなわち裏写りしていない、元の色の候補(色値候補)を選出する。そのための処理として、まず、注目画素の色に対応する色空間中の位置から所定の部分色空間内のヒストグラムを2次微分し、頻度の凸部の色(頻度が局所最大値となる色)を求める。求められた頻度の凸部の色を色値候補とする。   The color value candidate selection unit 22 selects an original color candidate (color value candidate) that replaces the color of the target pixel, that is, does not show through. As a process for this, first, a histogram in a predetermined partial color space is second-order differentiated from a position in the color space corresponding to the color of the pixel of interest, and the color of the convex portion of the frequency (the color whose frequency is the local maximum) Ask for. The color of the convex portion having the obtained frequency is set as a color value candidate.

図3(B)における黒丸を処理対象の画素の色に対応する位置とし、その黒丸を頂点とする3次元領域(部分色空間)を2次微分の対象としている。図3(C)には、その2次微分の対象となる3次元領域のみを取り出して示しており、黒丸は2次微分により頻度が凸部となる色を示している。この色が色値候補となる。   A black circle in FIG. 3B is set to a position corresponding to the color of the pixel to be processed, and a three-dimensional area (partial color space) having the black circle as a vertex is set as an object of secondary differentiation. In FIG. 3C, only the three-dimensional region that is the target of the secondary differentiation is extracted and shown, and the black circle indicates a color whose frequency becomes a convex portion by the secondary differentiation. This color is a color value candidate.

推定色決定部23は、色値候補選出部22で選出された色値候補から、裏写り前のもとの色と推定される推定色を決定する。決定方法としてはいくつかの方法が考えられる。例えば色値候補のうち、色値候補の頻度値が最大のものや、注目画素の色との色差が小さいもの、明度が高いもの、などを選択するなどがある。もちろん、これらを組み合わせたり、他の条件により選択してもよい。あるいは、複数の色値候補の中間色を推定色として決定したり、処理対象の画素の色との関係から重み付け演算して決定するなど、様々な方法で推定色を決定してもよい。   The estimated color determination unit 23 determines an estimated color estimated as the original color before show-through from the color value candidates selected by the color value candidate selection unit 22. Several methods can be considered as the determination method. For example, among the color value candidates, the one with the highest frequency value of the color value candidate, the one with a small color difference from the color of the pixel of interest, the one with high brightness, and the like are selected. Of course, these may be combined or selected according to other conditions. Alternatively, the estimated color may be determined by various methods, such as determining an intermediate color of a plurality of color value candidates as an estimated color, or determining by weighting from the relationship with the color of the pixel to be processed.

パラメータ設定部24は、色ヒストグラム算出部21、色値候補選出部22、推定色決定部23の各部に処理のためのパラメータを設定する。ここでは、領域設定部13で設定された参照領域の大きさに応じたパラメータを設定し、各部が参照領域の大きさに応じた処理を行うようにしている。もちろん、キーボード等の入力装置から入力されたパラメータを設定してもよいし、あるいは予め記憶されているパラメータを設定してもよい。また、これらを組み合わせてパラメータを設定してもよい。設定するパラメータとしては、例えば色値候補選出部22では部分色空間の設定や色値候補の決定の際の閾値など、推定色決定部23では色値候補から推定色を決定する際の重み付けなどがある。   The parameter setting unit 24 sets parameters for processing in each of the color histogram calculation unit 21, the color value candidate selection unit 22, and the estimated color determination unit 23. Here, parameters corresponding to the size of the reference area set by the area setting unit 13 are set, and each unit performs processing according to the size of the reference area. Of course, parameters input from an input device such as a keyboard may be set, or parameters stored in advance may be set. Moreover, you may set a parameter combining these. As the parameters to be set, for example, the color value candidate selection unit 22 sets a partial color space or a threshold when determining color value candidates, and the estimated color determination unit 23 weights when determining an estimated color from the color value candidates. There is.

図4は、本発明の第1の実施の形態の構成例における動作の一例を示す流れ図である。S101において、二値化部11は入力された画像を二値化し、地肌色の部分とそれ以外の部分とを示す2値の画像である二値化画像を生成する。   FIG. 4 is a flowchart showing an example of operation in the configuration example of the first exemplary embodiment of the present invention. In S <b> 101, the binarization unit 11 binarizes the input image, and generates a binarized image that is a binary image indicating a background color portion and other portions.

S102において、収縮膨張部12は二値化部11で生成された二値化画像について、収縮処理を施した後に膨張処理を施し、前景二値化画像を得る。   In S102, the contraction / expansion unit 12 performs a contraction process on the binarized image generated by the binarization unit 11, and then performs an expansion process to obtain a foreground binarized image.

S103において、領域設定部13は色推定部14における注目画素を含む参照領域を設定する。上述のように、前景二値化画像における注目画素に対応する画素値が多く含まれるように、入力された画像を参照するための参照領域を設定する。この参照領域の設定は、それぞれの注目画素について行うことになる。   In S <b> 103, the region setting unit 13 sets a reference region including the target pixel in the color estimation unit 14. As described above, the reference region for referring to the input image is set so that many pixel values corresponding to the target pixel in the foreground binarized image are included. This reference area is set for each target pixel.

S104において、色推定部14は領域設定部13で設定された参照領域の大きさに応じてパラメータを設定し、参照領域内の画素値を用いて注目画素において裏写りしていない元の色を推定して、注目画素の色として出力する。この色推定の処理は、それぞれの注目画素について行うことになる。   In S104, the color estimation unit 14 sets a parameter according to the size of the reference region set by the region setting unit 13, and uses the pixel value in the reference region to determine the original color that is not revealed in the target pixel. Estimated and output as the color of the target pixel. This color estimation process is performed for each target pixel.

図5は、本発明の第1の実施の形態の構成例における動作の具体例の説明図である。上述の動作の一例について、具体例を用いて説明する。図5(A)は入力された画像の一例を示している。ここでは、ある色によって楕円の図形が描かれている。図示の都合上、斜線を施して示している。なお、背景色は紙の色であるとする。この楕円にかかるように、「HEA」の文字が裏写りによって鏡像で含まれている。図示の都合上、これらの文字を点線によって示している。   FIG. 5 is an explanatory diagram of a specific example of the operation in the configuration example of the first exemplary embodiment of the present invention. An example of the above operation will be described using a specific example. FIG. 5A shows an example of an input image. Here, an oval figure is drawn with a certain color. For convenience of illustration, it is shown with diagonal lines. It is assumed that the background color is the paper color. As shown in this ellipse, the characters “HEA” are included in a mirror image by show-through. For the convenience of illustration, these characters are indicated by dotted lines.

このような入力された画像に対して、S101において二値化部11は二値化処理を行う。この例では浮動二値化処理によって二値化を行うものとする。これにより、図5(B)に示す二値化画像が得られる。ここでは楕円部分と裏写りした文字の部分が背景色以外の部分として抽出されている。図示の都合上、これらの部分を黒く示している。   In step S101, the binarization unit 11 performs binarization processing on such an input image. In this example, binarization is performed by floating binarization processing. Thereby, the binarized image shown in FIG. 5B is obtained. Here, the ellipse part and the part of the character that show through are extracted as a part other than the background color. For convenience of illustration, these portions are shown in black.

S102において、収縮膨張部12は図5(B)に示した二値化画像に対して収縮処理と膨張処理を施す。収縮処理の際に所定の線幅以下の線は消えてしまうため、膨張処理を行って元の大きさに戻すと二値化画像中の文字の部分が消去される。これにより、図5(C)に示した前景二値化画像が得られる。   In S102, the contraction / expansion unit 12 performs contraction processing and expansion processing on the binarized image shown in FIG. Since the line having a predetermined line width or less disappears during the contraction process, the character portion in the binarized image is deleted when the expansion process is performed to restore the original size. Thereby, the foreground binarized image shown in FIG. 5C is obtained.

S103では、領域設定部13は注目画素を含む参照領域を設定する。図5(D)には注目画素が地肌色の領域の画素である場合を示し、図5(E)には注目画素が地肌色以外の領域の画素である場合を示している。いずれの場合も、基本的な参照領域として注目画素を中心とする矩形(ここでは正方形)領域を用い、この矩形領域を、注目画素に対応する前景二値化画像の値に応じて拡張する。   In S103, the region setting unit 13 sets a reference region including the target pixel. FIG. 5D shows a case where the target pixel is a pixel in a background color region, and FIG. 5E shows a case where the target pixel is a pixel in a region other than the background color. In either case, a rectangular (here square) region centered on the pixel of interest is used as a basic reference region, and this rectangular region is expanded according to the value of the foreground binarized image corresponding to the pixel of interest.

例えば図5(D)に示す例では、注目画素が地肌色の領域の画素であることから、地肌色の画素が多く含まれるように、矩形領域を拡張する。この例では領域aと領域bについては地肌色の画素で構成されているので、矩形領域をこれらの領域まで拡張し、図5(F)に示すような参照領域を設定する。なお、図5(D)における領域cについても、地肌色以外の画素が少数であるので、参照領域に含めてもよい。   For example, in the example shown in FIG. 5D, since the target pixel is a background color pixel, the rectangular region is expanded so that many background color pixels are included. In this example, since the area a and the area b are composed of background color pixels, the rectangular area is extended to these areas and a reference area as shown in FIG. 5F is set. Note that the region c in FIG. 5D may also be included in the reference region because there are a small number of pixels other than the background color.

また、図5(E)に示す例では、注目画素が地肌色以外の領域の画素であることから、地肌色以外の画素が多く含まれるように、矩形領域を拡張する。この例では少なくとも領域bについては地肌色の画素で構成されているので、矩形領域をこれらの領域まで拡張し、図5(G)に示すような参照領域を設定する。なお、図5(E)における領域aについても参照領域に含め、図5(H)に示すような参照領域を設定してもよい。   In the example shown in FIG. 5E, since the target pixel is a pixel in a region other than the background color, the rectangular region is expanded so that many pixels other than the background color are included. In this example, since at least the area b is composed of background color pixels, the rectangular area is extended to these areas, and a reference area as shown in FIG. 5G is set. Note that the region a in FIG. 5E may also be included in the reference region, and a reference region as shown in FIG. 5H may be set.

矩形領域の周囲に配置された各領域を参照領域に含めるか否かは、いずれかの値の画素数と予め設定されている閾値とを比較して行えばよい。閾値は、注目画素の前景二値化画像の値が地肌色を示す場合とそれ以外の場合とで異ならせてもよい。なお、拡張する領域の大きさや形状は任意に設定すればよい。例えば斜め方向への拡張を行ってもよい。   Whether each area arranged around the rectangular area is included in the reference area may be determined by comparing the number of pixels of any value with a preset threshold value. The threshold value may be different between the case where the value of the foreground binarized image of the target pixel indicates the background color and the other case. Note that the size and shape of the area to be expanded may be set arbitrarily. For example, expansion in an oblique direction may be performed.

このようにして領域設定部13で設定した参照領域を用いて、S104において色推定部14がパラメータの設定と裏写りしていない元の色の推定を行うことになる。色推定部14では、地肌色の領域では地肌色の画素を多く使用して色推定を行い、地肌色以外の領域についても地肌色以外の画素を多く使用して色推定を行うことになる。従って、地肌色とそれ以外の色とが接している領域においても推定誤差が少なくなり、境界の形状が保存されることになる。   Using the reference region set by the region setting unit 13 in this way, in S104, the color estimation unit 14 performs parameter setting and estimation of the original color that is not revealed. The color estimation unit 14 performs color estimation using many background color pixels in the background color region, and performs color estimation using many pixels other than the background color in regions other than the background color. Accordingly, the estimation error is reduced even in the area where the background color and the other colors are in contact, and the boundary shape is preserved.

図6は、本発明の第1の実施の形態の構成例における動作の別の具体例の説明図である。上述の動作の具体例では、二値化部11における二値化処理として浮動二値化処理を行った場合について示した。ここでは、二値化部11における二値化処理として移動平均法を用いた場合について具体例を示す。移動平均法では、二値化の処理対象の画素を含む所定の大きさの領域を設定し、その領域内の画素の値の平均値をもとに閾値を設定して処理対象の画素の二値化を行うものである。従って、周囲の画素と濃度や色が異なる境界領域が抽出されることになる。その境界領域の幅は、閾値となる平均値を算出する領域の大きさによって調整する。ここでは、領域設定部13が設定する基本的な大きさの参照領域の幅よりも広い幅の境界領域が得られるように二値化時の領域を設定するものとする。   FIG. 6 is an explanatory diagram of another specific example of the operation in the configuration example of the first exemplary embodiment of the present invention. In the specific example of the above-described operation, the case where the floating binarization process is performed as the binarization process in the binarization unit 11 is shown. Here, a specific example is shown of the case where the moving average method is used as the binarization processing in the binarization unit 11. In the moving average method, an area of a predetermined size including a pixel to be binarized is set, and a threshold is set based on an average value of the pixels in the area, and two pixels to be processed are processed. The value is to be converted. Accordingly, a boundary region having a density and color different from those of the surrounding pixels is extracted. The width of the boundary region is adjusted according to the size of the region for calculating an average value serving as a threshold value. Here, it is assumed that the binarization region is set so that a boundary region having a width wider than the reference region width set by the region setting unit 13 is obtained.

図6(A)は入力された画像の一例を示している。ここでは、ある色によって矩形が描かれている。図示の都合上、斜線により矩形部分の色を示している。なお、背景色は紙の色であるとする。この矩形にかかるように、「HEA」の文字が裏写りによって鏡像で含まれている。図示の都合上、これらの文字を点線によって示している。   FIG. 6A shows an example of an input image. Here, a rectangle is drawn with a certain color. For convenience of illustration, the color of the rectangular portion is indicated by diagonal lines. It is assumed that the background color is the paper color. As shown in this rectangle, the characters “HEA” are included in a mirror image by show-through. For the convenience of illustration, these characters are indicated by dotted lines.

このような入力された画像に対して、S101において二値化部11は移動平均法により二値化処理を行う。これにより、図6(B)に示す二値化画像が得られる。ここでは、矩形の境界部分において所定の幅の領域が抽出されている。図示の都合上、これらの部分を黒く示している。なお、この例では裏写りした文字の部分についても、周囲とは濃度や色が異なるものとして抽出されている。   In step S101, the binarization unit 11 performs binarization processing on the input image using the moving average method. Thereby, the binarized image shown in FIG. 6B is obtained. Here, an area having a predetermined width is extracted at a rectangular boundary. For convenience of illustration, these portions are shown in black. In this example, the show-through character portion is also extracted as having a different density and color from the surroundings.

S102において、収縮膨張部12は図6(B)に示した二値化画像に対して収縮処理と膨張処理を施す。収縮処理の際に所定の線幅以下の線は消えてしまうため、膨張処理を行って元の大きさに戻すと二値化画像中の文字の部分が消去される。これにより、図6(C)に示した二値化画像が得られる。   In S102, the contraction / expansion unit 12 performs contraction processing and expansion processing on the binarized image shown in FIG. Since the line having a predetermined line width or less disappears during the contraction process, the character portion in the binarized image is deleted when the expansion process is performed to restore the original size. Thereby, the binarized image shown in FIG. 6C is obtained.

S103では、領域設定部13は注目画素を含む参照領域を設定する。図6(D)には注目画素が地肌色の領域の画素である場合を示し、図6(F)には注目画素が地肌色以外の領域の内部の画素である場合を示し、図6(E)には注目画素が二値化処理によって得られた境界領域の画素である場合を示している。いずれの場合も、基本的な参照領域として注目画素を中心とする矩形(ここでは正方形)領域を用い、この矩形領域を、注目画素に対応する二値化画像の値に応じて拡張する。   In S103, the region setting unit 13 sets a reference region including the target pixel. FIG. 6D shows a case where the target pixel is a pixel in the background color area, and FIG. 6F shows a case where the target pixel is a pixel inside the area other than the background color. E) shows a case where the target pixel is a pixel in the boundary region obtained by the binarization process. In either case, a rectangular (here square) region centered on the target pixel is used as a basic reference region, and this rectangular region is expanded according to the value of the binarized image corresponding to the target pixel.

例えば図6(D)に示す例では、注目画素が地肌色の領域の画素であることから、地肌色の画素が多く含まれるように、矩形領域を拡張する。この例では領域a,bについては地肌色の画素で構成されているので、矩形領域をこれらの領域まで拡張し、図6(G)に示すような参照領域を設定する。また、図6(F)に示す例についても地肌色以外の色の画素が多く含まれるように、矩形領域を拡張する。この例では、領域a,bの部分まで矩形領域を拡張し、図6(I)に示すような参照領域を設定する。なお、図6(D)においては領域cについても参照領域に含めてもよい。   For example, in the example shown in FIG. 6D, since the target pixel is a pixel in the background color area, the rectangular area is expanded so that many background color pixels are included. In this example, since the areas a and b are composed of background color pixels, the rectangular area is extended to these areas and a reference area as shown in FIG. 6G is set. Also, in the example shown in FIG. 6F, the rectangular area is expanded so that many pixels of colors other than the background color are included. In this example, the rectangular area is expanded to areas a and b, and a reference area as shown in FIG. 6I is set. In FIG. 6D, the region c may be included in the reference region.

また、図6(E)に示す例では注目画素が境界領域の画素である。この場合には、境界領域の画素が多く含まれるように、矩形領域を拡張する。この例では領域a,cについては境界領域の画素で構成されているので、矩形領域をこれらの領域まで拡張し、図6(H)に示すような参照領域を設定する。   In the example shown in FIG. 6E, the target pixel is a pixel in the boundary region. In this case, the rectangular area is expanded so that many pixels in the boundary area are included. In this example, since the areas a and c are composed of pixels in the boundary area, the rectangular area is extended to these areas and a reference area as shown in FIG. 6H is set.

矩形領域の周囲に配置された各領域を参照領域に含めるか否かは、いずれかの値の画素数と予め設定されている閾値とを比較して行えばよい。閾値は、注目画素が二値化処理によって得られた境界領域か否かによって異ならせてもよい。なお、拡張する領域の大きさや形状は任意に設定すればよい。例えば斜め方向への拡張を行ってもよい。   Whether each area arranged around the rectangular area is included in the reference area may be determined by comparing the number of pixels of any value with a preset threshold value. The threshold value may be varied depending on whether or not the target pixel is a boundary region obtained by the binarization process. Note that the size and shape of the area to be expanded may be set arbitrarily. For example, expansion in an oblique direction may be performed.

このようにして領域設定部13で設定した参照領域を用いて、S104において色推定部14がパラメータの設定と裏写りしていない元の色の推定を行うことになる。色推定部14では、地肌色の領域では地肌色の画素を多く使用し、また、地肌色以外の領域の内部についても地肌色以外の画素を多く使用して色推定を行う。さらに境界領域についても境界部分の画素を多く使用して色推定を行うことになる。従って、境界領域における推定誤差が少なくなり、正確にもとの色が推定され、境界の形状が保存されることになる。   Using the reference region set by the region setting unit 13 in this way, in S104, the color estimation unit 14 performs parameter setting and estimation of the original color that is not revealed. The color estimation unit 14 uses many background color pixels in the background color region, and performs color estimation using many pixels other than the background color in the region other than the background color. Further, color estimation is performed using a large number of pixels in the boundary area. Therefore, the estimation error in the boundary region is reduced, the original color is accurately estimated, and the boundary shape is preserved.

図7は、本発明の第1の実施の形態の構成例における別の動作例を示す流れ図である。上述のように移動平均法により二値化処理を行うことによって境界領域が抽出されるが、この境界領域は地肌色以外の領域内に存在する色の異なる境界部分についても抽出される。この動作例では、このような地肌色以外の領域内に存在する境界部分についても色推定の精度を向上させた例を示している。   FIG. 7 is a flowchart showing another operation example in the configuration example of the first exemplary embodiment of the present invention. As described above, the boundary region is extracted by performing the binarization process by the moving average method, and this boundary region is also extracted for the boundary portion having a different color existing in the region other than the background color. In this operation example, an example is shown in which the accuracy of color estimation is improved for a boundary portion existing in a region other than the background color.

S111において、二値化部11は入力された画像を移動平均法により二値化し、濃度や色が変化する境界部分を示す2値の画像である二値化画像を生成する。   In S <b> 111, the binarization unit 11 binarizes the input image by a moving average method, and generates a binarized image that is a binary image indicating a boundary portion where the density and color change.

S112において、収縮膨張部12は二値化部11で生成された二値化画像について収縮処理を施し、孤立領域をラベリングする。ラベリングの方法は任意であり、周知の方法を適用すればよい。   In S112, the contraction / expansion unit 12 performs contraction processing on the binarized image generated by the binarization unit 11, and labels an isolated region. The labeling method is arbitrary, and a known method may be applied.

さらに収縮膨張部12は、S113において、異なるラベルが付与された孤立領域が結合しないように膨張処理を施し、前景二値化画像とする。   Further, in S113, the contraction / expansion unit 12 performs an expansion process so that isolated regions to which different labels are attached are not combined, thereby obtaining a foreground binarized image.

S114において、領域設定部13は色推定部14における注目画素を含む参照領域を設定する。参照領域の設定は、前景二値化画像における注目画素にラベルが付与されている場合には、その注目画素に対応するラベルの画素が多く含まれるように設定する。なお、注目画素にラベルが付与されていない場合には、参照領域を拡張しなくてもよいし、あるいは、ラベルが付与されていない画素が多く含まれるように参照領域を設定してもよい。参照領域の設定は、それぞれの注目画素について行う。   In S <b> 114, the region setting unit 13 sets a reference region including the target pixel in the color estimation unit 14. The reference area is set such that when a pixel of interest in the foreground binarized image is labeled, a number of pixels with a label corresponding to the pixel of interest are included. In addition, when the label is not provided to the target pixel, the reference area may not be expanded, or the reference area may be set so that many pixels not provided with the label are included. The reference area is set for each target pixel.

S115において、色推定部14は領域設定部13で設定された参照領域の大きさに応じてパラメータを設定し、参照領域内の画素値を用いて注目画素において裏写りしていない元の色を推定して、注目画素の色として出力する。この色推定の処理は、それぞれの注目画素について行うことになる。   In S115, the color estimation unit 14 sets a parameter according to the size of the reference region set by the region setting unit 13, and uses the pixel value in the reference region to determine the original color that is not revealed in the target pixel. Estimated and output as the color of the pixel of interest. This color estimation process is performed for each target pixel.

図8は、本発明の第1の実施の形態の構成例における動作のさらに別の具体例の説明図である。図8(A)は入力された画像の一例を示している。ここでは、ある色によって矩形が描かれ、その一部に別の色によって矩形が描かれた例を示している。図示の都合上、斜線によりそれぞれの矩形部分の色を示している。なお、背景色は紙の色であるとする。これらの矩形にかかるように、「HEA」の文字が裏写りによって鏡像で含まれている。図示の都合上、これらの文字を点線によって示している。なお、この例では移動平均法による二値化処理によって、領域設定部13が設定する基本的な大きさの参照領域の幅よりも狭い幅の境界領域が得られるものとする。   FIG. 8 is an explanatory diagram of still another specific example of the operation in the configuration example of the first exemplary embodiment of the present invention. FIG. 8A shows an example of an input image. Here, an example is shown in which a rectangle is drawn with a certain color, and a rectangle is drawn with a different color at a part thereof. For convenience of illustration, the color of each rectangular portion is indicated by diagonal lines. It is assumed that the background color is the paper color. As shown in these rectangles, the characters “HEA” are included in the mirror image by show-through. For the convenience of illustration, these characters are indicated by dotted lines. In this example, it is assumed that a boundary region having a width narrower than the width of the reference region having a basic size set by the region setting unit 13 is obtained by binarization processing using the moving average method.

入力された画像に対して、S111において二値化部11は移動平均法により二値化処理を行う。これにより、図8(B)に示す二値化画像が得られる。ここでは、それぞれの矩形の境界部分において所定の幅の領域が抽出されている。図示の都合上、これらの部分を黒く示している。なお、この例では裏写りした文字の部分についても、周囲とは濃度や色が異なるものとして抽出されている。   In step S111, the binarization unit 11 performs binarization processing on the input image by the moving average method. Thereby, the binarized image shown in FIG. 8B is obtained. Here, a region having a predetermined width is extracted at each rectangular boundary. For convenience of illustration, these portions are shown in black. In this example, the show-through character portion is also extracted as having a different density and color from the surroundings.

S112において、収縮膨張部12は図8(B)に示した二値化画像に対して収縮処理を施し、孤立領域をラベリングする。収縮処理の際に所定の線幅以下の線は消えてしまうため、文字の部分が消去されて矩形の境界部分が残っている。この矩形の境界部分に対してラベリング処理を行う。このラベリング処理によって、それぞれの矩形の境界領域を区別する。収縮処理によって図8(C)に示した二値化画像が得られ、それぞれの孤立領域にラベルを付している。ここでは、小さい矩形の境界部分にラベル1を、大きい矩形の地肌との境界部分にラベル2を、それぞれ付している。   In S <b> 112, the contraction / expansion unit 12 performs contraction processing on the binarized image illustrated in FIG. 8B to label isolated regions. In the shrinking process, the line having a predetermined line width or less disappears, so that the character portion is deleted and a rectangular boundary portion remains. A labeling process is performed on the boundary portion of the rectangle. By this labeling process, each rectangular boundary region is distinguished. The binarized image shown in FIG. 8C is obtained by the contraction process, and labels are attached to the isolated regions. Here, the label 1 is attached to the boundary portion of the small rectangle, and the label 2 is attached to the boundary portion of the large rectangular background.

収縮膨張部12は、さらにS113において、収縮処理を行った二値化画像に対して膨張処理を施す。これにより、図8(D)に示した二値化画像が得られる。なお、膨張させた部分に対してもラベルを拡張して付しておく。   In step S113, the contraction / expansion unit 12 performs an expansion process on the binarized image that has undergone the contraction process. Thereby, the binarized image shown in FIG. 8D is obtained. Note that the label is also extended and attached to the expanded portion.

S114では、領域設定部13は注目画素を含む参照領域を設定する。図8(E)には注目画素が境界領域の画素である場合を示している。基本的な参照領域として注目画素を中心とする矩形(ここでは正方形)領域を用い、この矩形領域を、注目画素に対応するラベルの画素が多く含まれるように参照領域を拡張する。   In S114, the region setting unit 13 sets a reference region including the target pixel. FIG. 8E shows a case where the target pixel is a pixel in the boundary region. As a basic reference area, a rectangular area (in this case, a square) centered on the target pixel is used, and the reference area is expanded in this rectangular area so that many pixels with a label corresponding to the target pixel are included.

例えば図8(E)に示す例では、注目画素に対応するラベルがラベル1であることから、ラベル1の画素が多く含まれるように、基本的な参照領域を拡張する。この例では領域a,cにラベル1の画素が多く含まれているので、矩形領域をこれらの領域まで拡張し、図8(F)に示すような参照領域を設定する。なお、領域bについては、境界領域の画素が含まれているものの、異なるラベル(ラベル2)であるため、この領域への拡張は行わない。   For example, in the example shown in FIG. 8E, since the label corresponding to the target pixel is label 1, the basic reference area is expanded so that many pixels of label 1 are included. In this example, since many pixels of label 1 are included in areas a and c, the rectangular area is expanded to these areas, and a reference area as shown in FIG. 8F is set. In addition, although the pixel of the boundary area | region is contained about the area | region b, since it is a different label (label 2), the expansion to this area | region is not performed.

注目画素にラベルが付与されていない場合には、基本的な参照領域(矩形領域)をそのまま適用してもよいし、あるいは、ラベルが付与されていない画素が多く含まれるように参照領域を拡張してもよい。   When the target pixel is not labeled, the basic reference area (rectangular area) may be applied as it is, or the reference area is expanded to include many pixels that are not labeled. May be.

矩形領域の周囲に配置された各領域を参照領域に含めるか否かは、注目画素に対応するラベルが付与された(あるいはラベルが付与されていない)画素数と予め設定されている閾値とを比較して行えばよい。閾値は、注目画素が二値化処理によって得られた境界領域か否かによって異ならせてもよい。なお、拡張する領域の大きさや形状は任意に設定すればよい。例えば斜め方向への拡張を行ってもよい。   Whether or not to include each area arranged around the rectangular area in the reference area is based on the number of pixels to which the label corresponding to the target pixel is assigned (or no label is assigned) and a preset threshold value. What is necessary is just to compare. The threshold value may be varied depending on whether or not the target pixel is a boundary region obtained by the binarization process. Note that the size and shape of the area to be expanded may be set arbitrarily. For example, expansion in an oblique direction may be performed.

このようにして領域設定部13で設定した参照領域を用いて、S115において色推定部14がパラメータの設定と裏写りしていない元の色の推定を行うことになる。色推定部14では、地肌色の領域では地肌色の画素を多く使用し、また、地肌色以外の領域の内部についても地肌色以外の画素を多く使用して色推定を行う。さらに境界領域についても、注目画素に濃度や色が類似する境界部分の画素を多く使用して色推定を行うことになる。従って、境界領域における推定誤差が少なくなり、正確にもとの色が推定され、境界の形状が保存されることになる。   Using the reference region set by the region setting unit 13 in this way, in S115, the color estimation unit 14 performs parameter setting and estimation of the original color that is not revealed. The color estimation unit 14 uses many background color pixels in the background color region, and performs color estimation using many pixels other than the background color in the region other than the background color. Further, for the boundary region, color estimation is performed by using many pixels in the boundary portion whose density and color are similar to the target pixel. Therefore, the estimation error in the boundary region is reduced, the original color is accurately estimated, and the boundary shape is preserved.

次に、本発明の第2の実施の形態について説明する。この第2の実施の形態では、図1に示した第1の実施の形態の構成中、領域設定部13における参照領域の設定方法が異なる。この第2の実施の形態における領域設定部13は、膨張収縮部12で得た前景二値化画像における注目画素に対応する画素値で構成される参照領域を設定する。例えば二値を「0」と「1」とした場合、注目画素が「0」であれば、前景二値化画像の画素値が「0」の画素で構成される参照領域を設定する。また、注目画素が「1」であれば、前景二値化画像の画素値が「1」の画素で構成される参照領域を設定する。   Next, a second embodiment of the present invention will be described. In the second embodiment, the reference region setting method in the region setting unit 13 is different from the configuration of the first embodiment shown in FIG. The area setting unit 13 in the second embodiment sets a reference area composed of pixel values corresponding to the target pixel in the foreground binarized image obtained by the expansion / contraction unit 12. For example, when the binary values are “0” and “1”, if the pixel of interest is “0”, a reference region composed of pixels having a pixel value of “0” in the foreground binarized image is set. If the target pixel is “1”, a reference area composed of pixels having a pixel value of “1” in the foreground binarized image is set.

この第2の実施の形態の動作例としては、図4に示した第1の実施の形態の流れ図におけるS103の処理として、領域設定部13は、前景二値化画像における注目画素に対応する画素値で構成される参照領域を設定すればよい。   As an operation example of the second embodiment, as the processing of S103 in the flowchart of the first embodiment shown in FIG. 4, the area setting unit 13 uses a pixel corresponding to the target pixel in the foreground binarized image. A reference area composed of values may be set.

図9は、本発明の第2の実施の形態の構成例における動作の具体例の説明図である。上述の第1の実施の形態で説明した通り、図5(A)に示した画像が入力されると、二値化部11が二値化処理を行って図5(B)に示す二値化画像が得られる。ここでは浮動二値化により二値化画像を得たものとしている。さらに、収縮膨張部12が図5(B)に示した二値化画像に対して収縮処理と膨張処理を施し、図5(C)に示した前景二値化画像が得られる。   FIG. 9 is an explanatory diagram of a specific example of the operation in the configuration example of the second exemplary embodiment of the present invention. As described in the first embodiment, when the image shown in FIG. 5A is input, the binarization unit 11 performs binarization processing and the binary shown in FIG. 5B. A converted image is obtained. Here, a binarized image is obtained by floating binarization. Further, the contraction / expansion unit 12 performs contraction processing and expansion processing on the binarized image shown in FIG. 5B, and the foreground binarized image shown in FIG. 5C is obtained.

得られた前景二値化画像をもとに、領域設定部13は注目画素を含む参照領域を設定する。図9(A)には注目画素が地肌色の領域の画素である場合と、注目画素が地肌色以外の領域の画素である場合について、注目画素を中心とする基本的な参照領域を示している。いずれの場合も、基本的な参照領域として注目画素を中心とする矩形(ここでは正方形)領域を用いている。この基本的な参照領域の画素のうち、注目画素に対応する画素値の画素で構成される領域を参照領域として設定する。   Based on the obtained foreground binarized image, the region setting unit 13 sets a reference region including the target pixel. FIG. 9A shows a basic reference region centered on the target pixel when the target pixel is a pixel in the background color region and when the target pixel is a pixel in a region other than the background color. Yes. In either case, a rectangular (here, square) region centered on the target pixel is used as a basic reference region. Of the pixels in this basic reference area, an area composed of pixels having pixel values corresponding to the target pixel is set as a reference area.

例えば、図9(C)に示す例は注目画素が地肌色の領域の画素である場合を示している。図9(A)に示した注目画素が地肌色の場合の基本的な参照領域では、一部に地肌色以外の領域(図中の黒く塗りつぶした領域)が含まれている。この地肌色以外の領域を除去し、図9(C)に示すような地肌色の画素で構成される部分を参照領域として設定すればよい。   For example, the example shown in FIG. 9C shows a case where the target pixel is a pixel in the background color area. In the basic reference region when the pixel of interest shown in FIG. 9A is a background color, a region other than the background color (a region painted black in the drawing) is included in part. An area other than the background color may be removed, and a portion composed of background color pixels as shown in FIG. 9C may be set as a reference area.

また、図9(B)に示す例は注目画素が地肌色以外の領域の画素である場合を示している。図9(A)に示した注目画素が地肌色以外の場合の基本的な参照領域では、一部に地肌色の領域(図中の白い領域)が含まれている。この地肌色以外の領域を除去し、図9(B)に示すような地肌色以外の画素で構成される部分を参照領域として設定すればよい。   Further, the example shown in FIG. 9B shows a case where the target pixel is a pixel in a region other than the background color. In the basic reference region when the pixel of interest shown in FIG. 9A is other than the background color, a background color region (white region in the drawing) is partially included. An area other than the background color may be removed, and a portion composed of pixels other than the background color as shown in FIG. 9B may be set as a reference area.

このようにして設定された参照領域を用いて、色推定部14がパラメータの設定と裏写りしていない元の色の推定を行えばよい。色推定部14では、地肌色の領域では地肌色の画素を使用して色推定を行い、地肌色以外の領域についても地肌色以外の画素を使用して色推定を行うことになる。従って、地肌色とそれ以外の色とが接している領域においても推定誤差が少なくなり、境界の形状が保存されることになる。   Using the reference region set in this way, the color estimation unit 14 may perform parameter setting and estimation of the original color that is not revealed. The color estimation unit 14 performs color estimation using a background color pixel in the background color region, and performs color estimation using a pixel other than the background color for a region other than the background color. Accordingly, the estimation error is reduced even in the area where the background color and the other colors are in contact, and the boundary shape is preserved.

図10は、本発明の第2の実施の形態の構成例における動作の別の具体例の説明図である。この具体例では二値化部11が移動平均法により二値化処理を行う例を示しており、図6で説明したように二値化により抽出される境界領域の幅が基本的な参照領域の大きさよりも広いものとしている。二値化部11で二値化された画像は、さらに収縮膨張部12で縮小処理と膨張処理が施され、図10(A)に示す前景二値化画像が得られる。   FIG. 10 is an explanatory diagram of another specific example of the operation in the configuration example of the second exemplary embodiment of the present invention. In this specific example, the binarization unit 11 performs binarization processing by the moving average method, and the width of the boundary region extracted by binarization is the basic reference region as described in FIG. It is assumed to be wider than the size of. The image binarized by the binarization unit 11 is further subjected to reduction processing and expansion processing by the contraction / expansion unit 12 to obtain a foreground binarized image shown in FIG.

得られた前景二値化画像をもとに、領域設定部13は注目画素を含む参照領域を設定する。図10(A)には注目画素が地肌色の領域の画素である場合と、注目画素が地肌色以外の領域のうち境界領域の画素である場合及びそれ以外の場合について、注目画素を中心とする基本的な参照領域を示している。いずれの場合も、基本的な参照領域として注目画素を中心とする矩形(ここでは正方形)領域を用いている。この基本的な参照領域の画素のうち、注目画素に対応する画素値の画素で構成される領域を参照領域として設定する。   Based on the obtained foreground binarized image, the region setting unit 13 sets a reference region including the target pixel. FIG. 10A shows a case where the target pixel is a pixel in the background color region, a case where the target pixel is a pixel in the boundary region among regions other than the background color, and a case other than that. The basic reference area is shown. In either case, a rectangular (here, square) region centered on the target pixel is used as a basic reference region. Of the pixels in this basic reference area, an area composed of pixels having pixel values corresponding to the target pixel is set as a reference area.

例えば、図10(B)に示す例は注目画素が地肌色の領域の画素である場合を示している。図10(A)に示した注目画素が地肌色の場合の基本的な参照領域では、一部に地肌色以外の領域(図中の黒く塗りつぶした境界領域)が含まれている。この地肌色以外の領域を除去し、図10(B)に示すような地肌色の画素で構成される部分を参照領域として設定すればよい。また図10(D)に示す例は注目画素が地肌色以外の領域のうち、境界領域以外の内部の画素である場合を示している。この場合には、図中の黒く塗りつぶした境界領域が一部に含まれている。この地肌色以外の領域を除去し、図10(D)に示すような地肌色以外の領域のうちの境界領域外の画素で構成される部分を参照領域として設定すればよい。   For example, the example illustrated in FIG. 10B illustrates a case where the target pixel is a pixel in the background color area. In the basic reference region when the pixel of interest shown in FIG. 10A is the background color, a region other than the background color (a border region filled in black in the drawing) is partially included. An area other than the background color may be removed, and a portion composed of background color pixels as shown in FIG. 10B may be set as a reference area. In addition, the example illustrated in FIG. 10D illustrates a case where the target pixel is an internal pixel other than the boundary region among regions other than the background color. In this case, the boundary area filled in black in the drawing is partially included. An area other than the background color may be removed, and a part constituted by pixels outside the boundary area in the area other than the background color as shown in FIG. 10D may be set as the reference area.

さらに、図10(C)に示す例は注目画素が地肌色以外の領域の境界領域の画素である場合を示している。この例の場合、注目画素は地肌色以外の画素ではあるが、内部の画素とは区別して扱う。そのため、注目画素が境界領域の画素である場合には、地肌色以外の領域であっても、境界領域以外の画素が含まれないように、図10(C)に示すような参照領域を設定する。   Furthermore, the example shown in FIG. 10C shows a case where the target pixel is a pixel in a boundary region other than the background color. In this example, the target pixel is a pixel other than the background color, but is treated separately from the internal pixel. Therefore, when the target pixel is a pixel in the boundary area, a reference area as shown in FIG. 10C is set so that pixels other than the boundary area are not included even if the area is other than the background color. To do.

このようにして設定された参照領域を用いて、色推定部14がパラメータの設定と裏写りしていない元の色の推定を行う。色推定部14では、地肌色の領域では地肌色の画素を使用して色推定を行い、地肌色以外の領域のうち境界領域以外の内部の領域についてはその領域の画素を使用して色推定を行うことになる。さらに、境界領域についても、その境界領域の画素を使用して色推定を行うことになる。従って、それぞれの領域における、特性が類似した画素を使用して色推定を行うことになり、推定誤差が少なく、境界の形状が保存されることになる。   Using the reference region set in this way, the color estimation unit 14 performs parameter setting and estimation of the original color that is not revealed. In the background color region, the color estimation unit 14 performs color estimation using the background color pixels, and among the regions other than the background color, color estimation is performed using the pixels in the region other than the boundary region. Will do. Further, color estimation is performed for the boundary region using pixels in the boundary region. Therefore, color estimation is performed using pixels having similar characteristics in each region, and there is little estimation error, and the boundary shape is preserved.

図11は、本発明の第2の実施の形態の構成例における動作のさらに別の具体例の説明図である。この具体例も二値化部11が移動平均法により二値化処理を行う例を示しており、図8に示した例のように、基本的な参照領域の大きさの方が二値化により抽出される境界領域の幅よりも大きい場合を示している。   FIG. 11 is an explanatory diagram of still another specific example of the operation in the configuration example of the second exemplary embodiment of the present invention. This specific example also shows an example in which the binarization unit 11 performs binarization processing by the moving average method, and the size of the basic reference area is binarized as in the example shown in FIG. The case where it is larger than the width | variety of the boundary area | region extracted by FIG.

図8(A)に示した二値化部11で二値化された画像は、収縮膨張部12で縮小処理を行った後に孤立領域に対してラベリング処理を行い、さらに膨張処理が施されて、図11(A)に示す前景二値化画像が得られる。これは、図8(E)と同じものである。   The image binarized by the binarization unit 11 shown in FIG. 8 (A) is subjected to a reduction process by the contraction / expansion unit 12 and then a labeling process is performed on the isolated region, and the expansion process is further performed. A foreground binarized image shown in FIG. 11A is obtained. This is the same as FIG.

得られた前景二値化画像をもとに、領域設定部13は注目画素を含む参照領域を設定する。図11(A)には注目画素が境界領域の画素である場合を示している。基本的な参照領域として注目画素を中心とする矩形(ここでは正方形)領域を用いている。この基本的な参照領域の画素のうち、注目画素に対応するラベルが付与された画素で構成される領域を参照領域として設定する。   Based on the obtained foreground binarized image, the region setting unit 13 sets a reference region including the target pixel. FIG. 11A shows a case where the target pixel is a pixel in the boundary area. As a basic reference area, a rectangular (here, square) area centered on the target pixel is used. Of the pixels in this basic reference area, an area composed of pixels assigned labels corresponding to the target pixel is set as a reference area.

例えば図11(A)に示す例では、注目画素に対応するラベルがラベル1である場合を示しており、基本的な参照領域の画素のうち、ラベル1の画素で構成される参照領域を設定する。なお、境界領域の画素であっても、他のラベルが付与されている画素は除外する。これにより、図11(B)に示すような参照領域を設定することになる。   For example, the example shown in FIG. 11A shows a case where the label corresponding to the target pixel is label 1, and a reference area composed of pixels of label 1 is set out of the basic reference area pixels. To do. In addition, even if it is a pixel of a border region, the pixel to which the other label is provided is excluded. As a result, a reference area as shown in FIG. 11B is set.

図示していないが、注目画素にラベルが付与されていない場合には、基本的な参照領域(矩形領域)をそのまま適用してもよいし、あるいは、ラベルが付与されている画素を除外してラベルが付与されていない画素で構成される参照領域を設定してもよい。   Although not shown, when the target pixel is not labeled, the basic reference region (rectangular region) may be applied as it is, or the pixel to which the label is added is excluded. You may set the reference area | region comprised by the pixel to which the label is not provided.

このようにして設定された参照領域を用いて、色推定部14がパラメータの設定と裏写りしていない元の色の推定を行う。色推定部14では、地肌色の領域では地肌色の画素を使用して色推定を行い、地肌色以外の領域のうち境界領域以外の内部の領域についてはその領域の画素を使用して色推定を行うことになる。さらに、境界領域についても、ラベリングされた結果に応じて参照領域が設定されているので、色が類似した画素を使用して色推定を行うことになり、推定誤差が少なく、境界の形状が保存されることになる。   Using the reference region set in this way, the color estimation unit 14 performs parameter setting and estimation of the original color that is not revealed. In the background color region, the color estimation unit 14 performs color estimation using the background color pixels, and among the regions other than the background color, color estimation is performed using the pixels in the region other than the boundary region. Will do. Furthermore, because the reference area is set according to the result of labeling for the boundary area, color estimation is performed using pixels with similar colors, and there is little estimation error, and the boundary shape is saved. Will be.

なお、いずれの二値化方法を用いた場合においても、設定された参照領域に含まれる画素が少ないと、色推定部14で裏写りしていない元の色を推定する際に誤差が生じる場合がある。例えば色ヒストグラム算出部21で色ヒストグラムを算出する際のサンプル数が少なくなり、少ない頻度値の中から色値候補を抽出しなければならなくなる。そのため、抽出された色値候補にばらつきが生じ、また色値候補から推定色を決定する際にも誤差が生じやすくなる。このような場合に対処するため、例えば上述の第1の実施の形態で説明したように、注目画素に対応する値の画素が増加するように参照領域を拡張する方法を併用するとよい。   Note that, in any of the binarization methods, if there are few pixels included in the set reference area, an error occurs when the original color that is not show-through is estimated by the color estimation unit 14. There is. For example, the number of samples when the color histogram calculation unit 21 calculates the color histogram is reduced, and color value candidates must be extracted from a small frequency value. For this reason, the extracted color value candidates vary, and an error is likely to occur when an estimated color is determined from the color value candidates. In order to deal with such a case, for example, as described in the first embodiment described above, a method of extending the reference region so that the number of pixels corresponding to the target pixel increases may be used in combination.

図12は、本発明の第3の実施の形態の構成例を示すブロック図である。図中、31は二値化部、32は収縮処理部、33は膨張処理部、34は端部二値画像取得部、35は色推定部、36は色調整部である。二値化部31は、入力画像を二値化して、少なくとも地肌部分とそれ以外とが分かるようにする。二値化の方法としては、浮動二値化処理など、周知の方法を用いればよい。   FIG. 12 is a block diagram illustrating a configuration example of the third exemplary embodiment of the present invention. In the figure, 31 is a binarization unit, 32 is a contraction processing unit, 33 is an expansion processing unit, 34 is an end binary image acquisition unit, 35 is a color estimation unit, and 36 is a color adjustment unit. The binarization unit 31 binarizes the input image so that at least the background portion and other portions can be understood. As a binarization method, a known method such as a floating binarization process may be used.

収縮処理部32は、二値化部31で二値化した画像に対して収縮処理を施す。この収縮処理によって、地肌部分以外の領域を収縮させる。この収縮処理により線幅が所定の幅以下の文字や線画については消去される。   The contraction processing unit 32 performs contraction processing on the image binarized by the binarization unit 31. By this contraction process, the region other than the background portion is contracted. With this shrinking process, characters and line drawings whose line width is equal to or smaller than a predetermined width are deleted.

膨張処理部33は、収縮処理部32で収縮処理を施した後の二値化画像に対して膨張処理を施す。収縮処理部32による収縮処理で残った地肌部分以外の領域について、膨張処理によって元の大きさの領域に戻すことになる。   The expansion processing unit 33 performs expansion processing on the binarized image that has been subjected to the contraction processing by the contraction processing unit 32. The region other than the background portion remaining after the contraction processing by the contraction processing unit 32 is returned to the original size region by the expansion processing.

端部二値画像取得部34は、収縮処理手段32で収縮処理を施した二値化画像と、その後に膨張処理部33で膨張処理を施した二値化画像との差分を端部二値画像として取得する。収縮処理を施した二値化画像とその後に膨張処理を施した二値化画像との差分は、地肌部分以外の領域の端部の領域を示している。   The end binary image acquisition unit 34 calculates the difference between the binarized image subjected to the contraction process by the contraction processing unit 32 and the binarized image subjected to the expansion process by the expansion processing unit 33 thereafter to the end binary. Obtain as an image. The difference between the binarized image that has been subjected to the contraction process and the binarized image that has been subjected to the expansion process thereafter indicates an end region other than the background portion.

色推定部35は、入力された画像の各画素を注目画素として、その注目画素を含む所定の参照領域内の画素の値をもとに、裏写りしていない元の色を推定する。この色推定部35としては、上述の図2に示した構成を適用すればよい。   The color estimation unit 35 uses each pixel of the input image as a target pixel, and estimates an original color that is not show-through based on the value of a pixel in a predetermined reference area including the target pixel. As the color estimation unit 35, the configuration shown in FIG.

色調整部36は、端部二値画像取得部34で取得された端部二値画像に応じて、色推定部35で推定された色と推定前の色との間で色調整を行う。上述のように端部二値画像は地肌部分以外の領域の端部領域を示しており、その端部領域においては、推定色をそのまま出力せずに推定前の色に近づけた色を出力するように調整すればよい。   The color adjustment unit 36 performs color adjustment between the color estimated by the color estimation unit 35 and the color before estimation according to the end binary image acquired by the end binary image acquisition unit 34. As described above, the edge binary image shows an edge area of an area other than the background part, and in that edge area, the estimated color is not output as it is, but a color close to the color before estimation is output. It may be adjusted as follows.

色推定部35で得られた推定色は、この第3の実施の形態では背景色とそれ以外の領域の境界部分でも一律に参照領域を設定して推定色を決定するため、境界部分での推定誤りが発生し、輪郭形状が崩れる場合がある。色調整部36で調整を行うことによって、境界領域での輪郭形状の崩れを目立たなくしている。   In this third embodiment, the estimated color obtained by the color estimation unit 35 is determined uniformly by setting the reference region even in the boundary portion between the background color and the other regions. An estimation error may occur, and the contour shape may collapse. By adjusting the color adjusting unit 36, the collapse of the contour shape in the boundary region is made inconspicuous.

図13は、本発明の第3の実施の形態の構成例における動作の一例を示す流れ図である。S121において、二値化部31は入力された画像を二値化し、地肌色の部分とそれ以外の部分とを示す2値の画像である二値化画像を生成する。   FIG. 13 is a flowchart showing an example of operation in the configuration example of the third exemplary embodiment of the present invention. In S121, the binarization unit 31 binarizes the input image, and generates a binarized image that is a binary image indicating the background color portion and the other portions.

S122において、収縮処理部32が二値化部31で生成された二値化画像について収縮処理を施し、その後にS123において膨張処理部33が膨張処理を施す。さらにS124において、端部二値画像取得部34は、S122で縮小処理を施した二値化画像と、S123でさらに膨張処理を施した二値化画像との差分をとり、端部二値画像を取得する。この端部二値画像には、背景色以外の領域のうちの端部領域が抽出されている。   In S122, the contraction processing unit 32 performs contraction processing on the binarized image generated by the binarization unit 31, and then in S123, the expansion processing unit 33 performs expansion processing. Further, in S124, the end binary image acquisition unit 34 calculates a difference between the binarized image subjected to the reduction process in S122 and the binarized image further subjected to the expansion process in S123 to obtain an end binary image. To get. In this edge binary image, an edge area out of areas other than the background color is extracted.

ここからの処理は、入力された画像のそれぞれの画素を注目画素として行う。S125において、色推定部35は注目画素における裏写りしていない元の色を推定する。S126において、色調整部36はS124で取得した端部二値画像をもとに、S125で推定された色と、推定前の色との間で色調整を行う。より具体的には、S124で取得した端部二値画像を参照し、注目画素に対応する端部二値画像の画素が端部領域以外を示している場合にはS125で得られた推定色を出力する。注目画素に対応する端部二値画像の画素が端部領域を示している場合には、推定色と推定前の色との間の色に調整する。調整量は、任意に設定すればよい。この調整によって、端部領域外の領域の端部に生じる色推定の誤差を軽減して目立たなくしている。   The processing from here is performed using each pixel of the input image as a target pixel. In S125, the color estimation unit 35 estimates an original color that is not show-through in the target pixel. In S126, the color adjusting unit 36 performs color adjustment between the color estimated in S125 and the color before estimation based on the edge binary image acquired in S124. More specifically, with reference to the edge binary image acquired in S124, and the pixel of the edge binary image corresponding to the target pixel indicates a region other than the edge region, the estimated color obtained in S125 Is output. When the pixel of the end binary image corresponding to the target pixel indicates the end region, the color is adjusted to a color between the estimated color and the color before estimation. The adjustment amount may be set arbitrarily. By this adjustment, an error in color estimation generated at the end of the region outside the end region is reduced and made inconspicuous.

図14は、本発明の第3の実施の形態の構成例における動作の具体例の説明図である。図14(A)には、図5(A)に示した画像の一例を示しており、この画像が入力されたものとする。図示の都合上、楕円の図形の色については斜線を施して示し、また裏写りした文字については点線によって示している。   FIG. 14 is an explanatory diagram of a specific example of the operation in the configuration example of the third exemplary embodiment of the present invention. FIG. 14A shows an example of the image shown in FIG. 5A, and it is assumed that this image has been input. For convenience of illustration, the color of the ellipse figure is indicated by hatching, and the show-through character is indicated by a dotted line.

このような入力された画像に対して、S121において二値化部31が二値化処理を行うことにより、図14(B)に示す二値化画像が得られる。ここでは楕円部分と裏写りした文字の部分が背景色以外の部分として抽出されている。図示の都合上、これらの部分を黒く示している。   The binarization unit 31 performs binarization processing on such an input image in S121, thereby obtaining a binarized image shown in FIG. Here, the ellipse part and the part of the character that show through are extracted as a part other than the background color. For convenience of illustration, these portions are shown in black.

S122において、収縮処理部32は図14(B)に示した二値化画像に対して収縮処理を施す。この結果を図14(C)に示している。収縮処理の際に所定の線幅以下の線は消えてしまう。また、楕円形の部分は収縮処理によって小さくなっている。   In S122, the contraction processing unit 32 performs contraction processing on the binarized image shown in FIG. The result is shown in FIG. During the shrinking process, the line below the predetermined line width disappears. In addition, the oval portion is reduced by the shrinking process.

さらにS123において、図14(C)に示した収縮処理が施された画像に対して、膨張処理部33は膨張処理を施す。この結果を図14(D)に示している。この膨張処理によって、楕円形の部分は元の大きさに戻る。なお、文字の部分は収縮処理の際に消えてしまうため、膨張処理を施しても再現しない。   In step S123, the expansion processing unit 33 performs expansion processing on the image on which the contraction processing illustrated in FIG. The result is shown in FIG. By this expansion process, the elliptical portion returns to its original size. Note that the character portion disappears during the contraction process, and therefore is not reproduced even if the expansion process is performed.

S124では、収縮処理を施した二値化画像と、さらに膨張処理を施した二値化画像との差分から端部二値画像を取得する。上述のように、収縮処理を施した二値化画像では楕円形の部分は収縮して元の大きさより小さくなっているので、膨張処理でもとの大きさに戻った二値化画像との差分、すなわち膨張処理後の二値化画像では楕円形内であるが収縮処理後の二値化画像では楕円形外となる部分が抽出される。これにより、図14(E)に示すように楕円の端部の領域が抽出されることになる。   In S124, an end binary image is acquired from the difference between the binarized image subjected to the contraction process and the binarized image subjected to the expansion process. As described above, in the binarized image subjected to the shrinking process, the oval part is shrunk and becomes smaller than the original size, so the difference from the binarized image that was restored to the original size by the dilation process That is, a portion that is within the ellipse in the binarized image after the expansion process but is outside the ellipse is extracted from the binarized image after the contraction process. Thereby, the area | region of the edge part of an ellipse is extracted as shown in FIG.14 (E).

このようにして端部二値画像が得られたら、入力された画像の各画素を注目画素として、S125において裏写り前の色を推定する。そして、得られた推定色について、S126において色調整を行う。注目画素が地肌色以外の領域の端部領域、すなわち図14(E)に示した端部二値画像において黒く示した領域の画素である場合には、推定色と元の色との間で色調整を行う。それ以外の場合には推定色を出力する。   When the end binary image is obtained in this way, the color before show-through is estimated in S125 with each pixel of the input image as the target pixel. Then, color adjustment is performed in S126 for the obtained estimated color. When the pixel of interest is an edge region other than the background color, that is, a pixel in the region shown in black in the edge binary image shown in FIG. 14E, between the estimated color and the original color Perform color adjustment. In other cases, the estimated color is output.

上述のように、色推定部35が図2に示す構成によって所定の参照領域を設定して裏写りのない元の色を推定すると、地肌色の領域とそれ以外の領域との境界部分で参照領域内に両方の画素が混在するため推定誤りが発生する場合がある。この第3の実施の形態で説明したように、地肌色以外の領域の端部領域については、推定された色と元の色との間で色調整を行うことにより、推定誤りが発生しても目立たなくし、境界部分の形状が崩れるのを防止している。   As described above, when the color estimation unit 35 sets a predetermined reference area with the configuration shown in FIG. 2 and estimates the original color without show-through, the reference is made at the boundary between the background color area and the other areas. An estimation error may occur because both pixels are mixed in a region. As described in the third embodiment, an estimation error occurs in the end region other than the background color by performing color adjustment between the estimated color and the original color. Is also inconspicuous, preventing the shape of the boundary from collapsing.

図15は、本発明の第3の実施の形態の変形例を示すブロック図である。この第3の実施の形態の変形例では、二値化部41は移動平均法により入力画像を二値化して二値化画像を得る。既に述べたように、移動平均法を用いて二値化処理を行った場合、二値化画像として境界領域が抽出される。そのため、端部二値画像取得部34を設けずに構成している。これに伴い、色調整部36は膨張処理部33で膨張処理を施した後の二値化画像を端部二値画像とし、端部二値画像に応じて、色推定部35で推定された色と推定前の色との間で色調整を行うことになる。   FIG. 15 is a block diagram showing a modification of the third embodiment of the present invention. In the modification of the third embodiment, the binarization unit 41 binarizes the input image by the moving average method to obtain a binarized image. As already described, when binarization processing is performed using the moving average method, a boundary region is extracted as a binarized image. Therefore, the end binary image acquisition unit 34 is not provided. Accordingly, the color adjustment unit 36 uses the binarized image after the expansion processing by the expansion processing unit 33 as an end binary image, and is estimated by the color estimation unit 35 according to the end binary image. Color adjustment is performed between the color and the color before estimation.

図16は、本発明の第3の実施の形態の変形例の構成例における動作の一例を示す流れ図である。S131において、二値化部41は入力された画像を移動平均法によって二値化し、濃度や色が変化する境界部分を示す2値の画像である二値化画像を生成する。   FIG. 16 is a flowchart showing an example of the operation in the configuration example of the modified example of the third embodiment of the present invention. In S131, the binarization unit 41 binarizes the input image by a moving average method, and generates a binarized image that is a binary image indicating a boundary portion in which density and color change.

S132において、収縮処理部32は二値化部41で生成された二値化画像について収縮処理を施し、その後に膨張処理部33は膨張処理を施す。得られた二値化画像を端部二値画像とする。   In S <b> 132, the contraction processing unit 32 performs contraction processing on the binarized image generated by the binarization unit 41, and then the expansion processing unit 33 performs expansion processing. Let the obtained binarized image be an end binary image.

一方、S133において、色推定部35は注目画素において裏写りしていない元の色を推定し、推定色とする。   On the other hand, in S133, the color estimation unit 35 estimates an original color that is not show-through in the pixel of interest and sets it as an estimated color.

S134において、色調整部36はS132で収縮膨張処理を行った後の端部二値画像をもとに、S133で得た推定色と、推定前の色との間で色調整を行う。より具体的には、端部二値画像を参照し、注目画素に対応する値が濃度や色の境界領域以外を示している場合にはS133で得られた推定色を出力する。注目画素に対応する値が濃度や色の境界領域を示している場合には、推定色と推定前の色との間の色に調整する。調整量は、任意に設定すればよい。この調整によって、濃度や色が変化する境界領域に生じる色推定の誤差を軽減して目立たなくしている。   In S134, the color adjustment unit 36 performs color adjustment between the estimated color obtained in S133 and the color before estimation based on the end binary image after the contraction / expansion processing in S132. More specifically, referring to the end binary image, if the value corresponding to the target pixel indicates a region other than the density or color boundary region, the estimated color obtained in S133 is output. If the value corresponding to the pixel of interest indicates a density or color boundary region, the color is adjusted to a color between the estimated color and the color before estimation. The adjustment amount may be set arbitrarily. By this adjustment, an error in color estimation generated in the boundary region where the density and color change is reduced and made inconspicuous.

図17は、本発明の第3の実施の形態の変形例の構成例における動作の具体例の説明図である。図17(A)は入力された画像の一例を示している。ここでは、ある色によって矩形が描かれ、更にその中に異なる色によって矩形が描かれている。図示の都合上、斜線を異ならせて色の違いを示している。なお、背景色は紙の色であるとする。これらの矩形にかかるように、「HEA」の文字が裏写りによって鏡像で含まれている。図示の都合上、これらの文字を点線によって示している。   FIG. 17 is an explanatory diagram of a specific example of the operation in the configuration example of the modified example of the third embodiment of the present invention. FIG. 17A shows an example of an input image. Here, a rectangle is drawn with a certain color, and further, a rectangle is drawn with a different color. For the convenience of illustration, the diagonal lines are different to show the color difference. It is assumed that the background color is the paper color. As shown in these rectangles, the characters “HEA” are included in the mirror image by show-through. For the convenience of illustration, these characters are indicated by dotted lines.

このような入力された画像に対して、S131において二値化部41は移動平均法により二値化処理を行う。これにより、図17(B)に示す二値化画像が得られる。ここでは色が異なる境界部分と裏写りした文字の部分が抽出されている。図示の都合上、これらの部分を黒く示している。   In step S131, the binarization unit 41 performs binarization processing on the input image using the moving average method. Thereby, the binarized image shown in FIG. Here, the boundary part and the part of the show-through character which are different in color are extracted. For convenience of illustration, these portions are shown in black.

S132において、収縮処理部32は図17(B)に示した二値化画像に対して収縮処理を施し、さらに膨張処理部33が膨張処理を施す。収縮処理の際に所定の線幅以下の線は消えてしまうため、膨張処理を行って元の太さに戻すと二値化画像中の文字の部分が消去される。これにより、図17(C)に示した端部二値画像が得られる。   In S132, the contraction processing unit 32 performs contraction processing on the binarized image shown in FIG. 17B, and the expansion processing unit 33 further performs expansion processing. Since the line having a predetermined line width or less disappears during the contraction process, the character portion in the binarized image is deleted when the expansion process is performed to restore the original thickness. As a result, the end binary image shown in FIG. 17C is obtained.

一方、色推定部35では入力された画像の各画素を注目画素として、S133において裏写り前の色を推定して推定色とする。そして、得られた推定色について、S134において色調整を行う。注目画素が濃度や色の変化する境界領域、すなわち図17(C)に示した端部二値画像において黒く示した領域の画素である場合には、推定色と元の色との間で色調整を行う。それ以外の場合には推定色を出力する。   On the other hand, the color estimation unit 35 uses each pixel of the input image as a target pixel, and in S133, estimates a color before show-through to obtain an estimated color. Then, color adjustment is performed in S134 for the obtained estimated color. If the pixel of interest is a boundary region where the density or color changes, that is, a pixel in the region shown in black in the edge binary image shown in FIG. 17C, the color between the estimated color and the original color Make adjustments. In other cases, the estimated color is output.

上述のように、色推定部35が図2に示す構成によって所定の参照領域を設定して裏写りのない元の色を推定すると、濃度や色が大きく変化する境界領域では推定誤りが発生する場合がある。この第3の実施の形態の変形例においても、境界領域については、推定色と元の色との間で色調整を行うことにより、推定誤りが発生しても目立たなくし、境界部分の形状が崩れるのを防止している。   As described above, when the color estimation unit 35 sets a predetermined reference area with the configuration shown in FIG. 2 and estimates the original color without show-through, an estimation error occurs in the boundary area where the density and color change greatly. There is a case. Also in the modified example of the third embodiment, the boundary region is not noticeable even if an estimation error occurs by performing color adjustment between the estimated color and the original color, and the shape of the boundary portion is reduced. Prevents collapse.

図18は、本発明の各実施の形態及びその変形例で説明した機能をコンピュータプログラムで実現した場合におけるコンピュータプログラム及びそのコンピュータプログラムを格納した記憶媒体とコンピュータの一例の説明図である。図中、51はプログラム、52はコンピュータ、61は光磁気ディスク、62は光ディスク、63は磁気ディスク、64はメモリ、71はCPU、72は内部メモリ、73は読取部、74はハードディスク、75はインタフェース、76は通信部である。   FIG. 18 is an explanatory diagram of an example of a computer program, a storage medium storing the computer program, and a computer when the functions described in the embodiments of the present invention and the modifications thereof are realized by a computer program. In the figure, 51 is a program, 52 is a computer, 61 is a magneto-optical disk, 62 is an optical disk, 63 is a magnetic disk, 64 is a memory, 71 is a CPU, 72 is an internal memory, 73 is a reading unit, 74 is a hard disk, and 75 is An interface 76 is a communication unit.

上述の各実施の形態及びその変形例で説明した各部の機能の一部または全部を、コンピュータにより実行可能なプログラム51によって実現してもよい。その場合、そのプログラム51およびそのプログラムが用いるデータなどは、コンピュータが読み取り可能な記憶媒体に記憶しておけばよい。記憶媒体とは、コンピュータのハードウェア資源に備えられている読取部73に対して、プログラムの記述内容に応じて、磁気、光、電気等のエネルギーの変化状態を引き起こして、それに対応する信号の形式で、読取部73にプログラムの記述内容を伝達できるものである。例えば、光磁気ディスク61,光ディスク62(CDやDVDなどを含む)、磁気ディスク63,メモリ64(ICカード、メモリカードなどを含む)等である。もちろんこれらの記憶媒体は、可搬型に限られるものではない。   A part or all of the functions of the units described in the above-described embodiments and modifications thereof may be realized by a program 51 that can be executed by a computer. In that case, the program 51 and data used by the program may be stored in a computer-readable storage medium. The storage medium is a signal of a corresponding signal that causes a change state of energy such as magnetism, light, electricity, etc. according to the description content of the program to the reading unit 73 provided in the hardware resource of the computer. In this format, the program description can be transmitted to the reading unit 73. For example, there are a magneto-optical disk 61, an optical disk 62 (including a CD and a DVD), a magnetic disk 63, a memory 64 (including an IC card and a memory card), and the like. Of course, these storage media are not limited to portable types.

これらの記憶媒体にプログラム51を格納しておき、例えばコンピュータ52の読取部73あるいはインタフェース75にこれらの記憶媒体を装着することによって、コンピュータからプログラム51を読み出し、内部メモリ72またはハードディスク74に記憶し、CPU71によってプログラム51を実行することによって、上述の各実施の形態及びその変形例で説明した機能の全部または一部を実現すればよい。あるいは、ネットワークなどを介してプログラム51をコンピュータ52に転送し、コンピュータ52では通信部76でプログラム51を受信して内部メモリ72またはハードディスク74に記憶し、CPU71によってプログラム51を実行することによって、上述の各実施の形態及びその変形例で説明した機能の全部または一部を実現してもよい。なお、コンピュータ52には、このほかインタフェース75を介して様々な装置が接続されていてもよく、例えば情報を表示する表示装置やユーザが情報を入力する入力装置等も接続されている。   The program 51 is stored in these storage media, and the program 51 is read from the computer and stored in the internal memory 72 or the hard disk 74 by, for example, mounting these storage media on the reading unit 73 or the interface 75 of the computer 52. By executing the program 51 by the CPU 71, all or a part of the functions described in the above embodiments and modifications thereof may be realized. Alternatively, the program 51 is transferred to the computer 52 via a network or the like, and the computer 52 receives the program 51 by the communication unit 76 and stores the program 51 in the internal memory 72 or the hard disk 74. You may implement | achieve all or one part of the function demonstrated by each embodiment and its modification. In addition, various devices may be connected to the computer 52 via the interface 75. For example, a display device for displaying information and an input device for inputting information by the user are also connected.

もちろん、一部の機能についてハードウェアによって構成してもよいし、すべてをハードウェアで構成してもよい。あるいは、プログラム51を他の構成とともに構成してもよい。例えば複写機などの画像読取装置や画像形成装置を含む装置において制御プログラムとともに1つのプログラムとして構成し、画像読取装置で読み取られた裏写りを含む画像から裏写りを除去するように構成してもよい。もちろん、他の用途に適用する場合には、その用途におけるプログラムと一体化してもよい。   Of course, some functions may be configured by hardware, or all may be configured by hardware. Or you may comprise the program 51 with another structure. For example, an apparatus including an image reading apparatus such as a copying machine or an image forming apparatus may be configured as one program together with a control program so that show-through is removed from an image including a show-through read by the image reading apparatus. Good. Of course, when applied to other purposes, it may be integrated with the program for that purpose.

本発明の第1の実施の形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of the 1st Embodiment of this invention. 色推定部の一例を示すブロック図である。It is a block diagram which shows an example of a color estimation part. 色推定部の動作の一例の説明図である。It is explanatory drawing of an example of operation | movement of a color estimation part. 本発明の第1の実施の形態の構成例における動作の一例を示す流れ図である。It is a flowchart which shows an example of the operation | movement in the structural example of the 1st Embodiment of this invention. 本発明の第1の実施の形態の構成例における動作の具体例の説明図である。It is explanatory drawing of the specific example of operation | movement in the structural example of the 1st Embodiment of this invention. 本発明の第1の実施の形態の構成例における動作の別の具体例の説明図である。It is explanatory drawing of another specific example of the operation | movement in the structural example of the 1st Embodiment of this invention. 本発明の第1の実施の形態の構成例における別の動作例を示す流れ図である。It is a flowchart which shows another operation example in the structural example of the 1st Embodiment of this invention. 本発明の第1の実施の形態の構成例における動作のさらに別の具体例の説明図である。It is explanatory drawing of another specific example of the operation | movement in the structural example of the 1st Embodiment of this invention. 本発明の第2の実施の形態の構成例における動作の具体例の説明図である。It is explanatory drawing of the specific example of operation | movement in the structural example of the 2nd Embodiment of this invention. 本発明の第2の実施の形態の構成例における動作の別の具体例の説明図である。It is explanatory drawing of another specific example of the operation | movement in the structural example of the 2nd Embodiment of this invention. 本発明の第2の実施の形態の構成例における動作のさらに別の具体例の説明図である。It is explanatory drawing of another specific example of the operation | movement in the structural example of the 2nd Embodiment of this invention. 本発明の第3の実施の形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の構成例における動作の一例を示す流れ図である。It is a flowchart which shows an example of the operation | movement in the structural example of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の構成例における動作の具体例の説明図である。It is explanatory drawing of the specific example of operation | movement in the structural example of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の変形例を示すブロック図である。It is a block diagram which shows the modification of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の変形例の構成例における動作の一例を示す流れ図である。It is a flowchart which shows an example of the operation | movement in the structural example of the modification of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の変形例の構成例における動作の具体例の説明図である。It is explanatory drawing of the specific example of operation | movement in the structural example of the modification of the 3rd Embodiment of this invention. 本発明の各実施の形態及びその変形例で説明した機能をコンピュータプログラムで実現した場合におけるコンピュータプログラム及びそのコンピュータプログラムを格納した記憶媒体とコンピュータの一例の説明図である。FIG. 20 is an explanatory diagram of an example of a computer program, a storage medium storing the computer program, and a computer when the functions described in the embodiments of the present invention and the modifications thereof are realized by a computer program.

符号の説明Explanation of symbols

11…二値化部、12…収縮膨張部、13…領域設定部、14…色推定部、21…色ヒストグラム算出部、22…色値候補選出部、23…推定色決定部、24…パラメータ設定部、31…二値化部、32…収縮処理部、33…膨張処理部、34…端部二値画像取得部、35…色推定部、36…色調整部、51…プログラム、52…コンピュータ、61…光磁気ディスク、62…光ディスク、63…磁気ディスク、64…メモリ、71…CPU、72…内部メモリ、73…読取部、74…ハードディスク、75…インタフェース、76…通信部。   DESCRIPTION OF SYMBOLS 11 ... Binarization part, 12 ... Contraction expansion part, 13 ... Area setting part, 14 ... Color estimation part, 21 ... Color histogram calculation part, 22 ... Color value candidate selection part, 23 ... Estimated color determination part, 24 ... Parameter Setting unit 31... Binarization unit 32. Shrinkage processing unit 33. Expansion processing unit 34. End binary image acquisition unit 35. Color estimation unit 36. Color adjustment unit 51. Computer 61 ... Magneto-optical disk 62 ... Optical disk 63 ... Magnetic disk 64 ... Memory 71 ... CPU 72 ... Internal memory 73 ... Reading unit 74 ... Hard disk 75 ... Interface 76 ... Communication unit

Claims (12)

入力画像を二値化する二値化手段と、前記注目画素を含むとともに二値化した画像における注目画素に対応する画素値が多く含まれるように参照領域を設定する領域設定手段と、前記入力画像中の前記領域設定手段で設定した参照領域内の画素の値をもとに裏写りしていない元の色を推定する色推定手段を有することを特徴とする画像処理装置。   Binarization means for binarizing an input image; area setting means for setting a reference area so as to include many pixel values corresponding to the target pixel in the binarized image including the target pixel; and the input An image processing apparatus comprising color estimation means for estimating an original color that is not show-through based on a value of a pixel in a reference area set by the area setting means in the image. 入力画像を二値化する二値化手段と、前記注目画素を含むとともに二値化した画像における注目画素に対応する画素値で構成される参照領域を設定する領域設定手段と、前記入力画像中の前記領域設定手段で設定した参照領域内の画素の値をもとに裏写りしていない元の色を推定する色推定手段を有することを特徴とする画像処理装置。   Binarization means for binarizing an input image, area setting means for setting a reference area including pixel values corresponding to the pixel of interest in the binarized image including the pixel of interest, and in the input image An image processing apparatus comprising color estimation means for estimating an original color that is not show-through based on a value of a pixel in a reference area set by the area setting means. 前記色推定手段は、前記領域設定手段によって設定された参照領域の大きさに従った色の推定処理を行うことを特徴とする請求項1または請求項2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the color estimation unit performs a color estimation process according to a size of a reference area set by the area setting unit. さらに、前記二値化手段で二値化した画像に対して収縮処理を施した後に膨張処理を施す収縮膨張手段を有し、前記領域設定手段は、前記収縮膨張手段による処理後の二値化画像を使用して前記参照領域を設定することを特徴とする請求項1から請求項3のいずれか1項に記載の画像処理装置。   The image processing apparatus further includes a contraction / expansion unit that performs an expansion process after performing a contraction process on the image binarized by the binarization unit, and the region setting unit performs binarization after the process by the contraction / expansion unit The image processing apparatus according to claim 1, wherein the reference area is set using an image. 入力画像を二値化する二値化手段と、前記二値化手段で二値化した画像に対して収縮処理を施した後に膨張処理を施す収縮膨張手段と、前記収縮膨張手段で収縮処理を施した画像とその後に膨張処理を施した画像との差分を端部二値画像として取得する端部二値画像取得手段と、前記入力画像から裏写りしていない元の色を推定する色推定手段と、前記端部二値画像取得手段で取得された前記端部二値画像に応じて前記色推定手段で推定された色と推定前の色との間で色調整を行う色調整手段を有することを特徴とする画像処理装置。   A binarization unit that binarizes an input image, a contraction / expansion unit that performs an expansion process on the image binarized by the binarization unit, and a contraction process performed by the contraction / expansion unit End binary image acquisition means for acquiring a difference between the applied image and an image subjected to expansion processing thereafter as an end binary image, and color estimation for estimating an original color not show-through from the input image And color adjusting means for performing color adjustment between the color estimated by the color estimating means and the color before estimation according to the edge binary image acquired by the edge binary image acquiring means An image processing apparatus comprising: 前記二値化手段は、浮動二値化処理により地肌色とそれ以外の色に二値化することを特徴とする請求項1から請求項5のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the binarization unit binarizes into a background color and other colors by floating binarization processing. 前記二値化手段は、移動平均法により二値化することを特徴とする請求項1から請求項4のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the binarization unit binarizes by a moving average method. 入力画像を移動平均法により二値化する二値化手段と、前記二値化手段で二値化した画像に対して収縮処理を施した画像中の孤立領域に対してラベリングを行った後に異なるラベルが付与された孤立領域が結合しないように膨張処理を施す収縮膨張手段と、前記収縮膨張手段による処理後のラベリングされた二値化画像を使用して前記注目画素を含むとともに前記二値化画像において前記注目画素にラベルが付与されている場合に該注目画素に対応するラベルの画素が多く含まれるように参照領域を設定する領域設定手段と、前記入力画像中の前記領域設定手段で設定した参照領域内の画素の値をもとに裏写りしていない元の色を推定する色推定手段を有することを特徴とする画像処理装置。   Different from binarization means for binarizing an input image by a moving average method, and after labeling an isolated region in an image obtained by performing shrinkage processing on an image binarized by the binarization means The binarization includes the pixel of interest and the binarization using a binarized image that is subjected to expansion processing so as not to combine the isolated regions to which labels are attached, and a labeled binarized image after processing by the contraction / expansion unit Set by a region setting unit that sets a reference region so that many pixels of a label corresponding to the target pixel are included when the target pixel is labeled in the image, and the region setting unit in the input image An image processing apparatus comprising color estimation means for estimating an original color that is not show-through based on a value of a pixel in the reference area. 入力画像を移動平均法により二値化する二値化手段と、前記二値化手段で二値化した画像に対して収縮処理を施した画像中の孤立領域に対してラベリングを行った後に異なるラベルが付与された孤立領域が結合しないように膨張処理を施す収縮膨張手段と、前記収縮膨張手段による処理後のラベリングされた二値化画像を使用して前記注目画素を含むとともに前記二値化画像において前記注目画素にラベルが付与されている場合に該注目画素に対応するラベルの画素で構成される参照領域を設定する領域設定手段と、前記入力画像中の前記領域設定手段で設定した参照領域内の画素の値をもとに裏写りしていない元の色を推定する色推定手段を有することを特徴とする画像処理装置。   Different from binarization means for binarizing an input image by a moving average method, and after labeling an isolated region in an image obtained by performing shrinkage processing on an image binarized by the binarization means The binarization includes the pixel of interest and the binarization using a binarized image that is subjected to expansion processing so as not to combine the isolated regions to which labels are attached, and a labeled binarized image after processing by the contraction / expansion unit When a label is given to the target pixel in the image, a region setting unit that sets a reference region composed of pixels with a label corresponding to the target pixel, and a reference set by the region setting unit in the input image An image processing apparatus comprising color estimation means for estimating an original color that is not show-through based on pixel values in a region. 前記色推定手段は、前記領域設定手段によって設定された参照領域の大きさに従った色の推定処理を行うことを特徴とする請求項8または請求項9に記載の画像処理装置。   The image processing apparatus according to claim 8, wherein the color estimation unit performs a color estimation process according to the size of the reference area set by the area setting unit. 入力画像を移動平均法により二値化する二値化手段と、前記二値化手段で二値化した画像に対して収縮処理を施した後に膨張処理を施す収縮膨張手段と、前記入力画像から裏写りしていない元の色を推定する色推定手段と、前記収縮膨張手段による処理後の二値画像に応じて前記色推定手段で推定された色と推定前の色との間で色調整を行う色調整手段を有することを特徴とする画像処理装置。   From the input image, a binarization unit that binarizes an input image by a moving average method, a contraction / expansion unit that performs an expansion process on the image binarized by the binarization unit, Color estimation means for estimating an original color that is not show-through, and color adjustment between the color estimated by the color estimation means according to the binary image after processing by the contraction and expansion means and the color before estimation An image processing apparatus comprising color adjusting means for performing the above. コンピュータに、請求項1ないし請求項11のいずれか1項に記載の画像処理装置の機能を実行させることを特徴とする画像処理プログラム。   An image processing program for causing a computer to execute the function of the image processing apparatus according to any one of claims 1 to 11.
JP2008028832A 2008-02-08 2008-02-08 Image processing apparatus and image processing program Expired - Fee Related JP5146653B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008028832A JP5146653B2 (en) 2008-02-08 2008-02-08 Image processing apparatus and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008028832A JP5146653B2 (en) 2008-02-08 2008-02-08 Image processing apparatus and image processing program

Publications (2)

Publication Number Publication Date
JP2009188892A true JP2009188892A (en) 2009-08-20
JP5146653B2 JP5146653B2 (en) 2013-02-20

Family

ID=41071660

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008028832A Expired - Fee Related JP5146653B2 (en) 2008-02-08 2008-02-08 Image processing apparatus and image processing program

Country Status (1)

Country Link
JP (1) JP5146653B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015142226A (en) * 2014-01-28 2015-08-03 株式会社Pfu Image processing apparatus, image processing method and computer program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015142226A (en) * 2014-01-28 2015-08-03 株式会社Pfu Image processing apparatus, image processing method and computer program
US9143653B2 (en) 2014-01-28 2015-09-22 Pfu Limited Image processing apparatus, method, and computer program product identifying show-through position based on back side image and expanded front side image

Also Published As

Publication number Publication date
JP5146653B2 (en) 2013-02-20

Similar Documents

Publication Publication Date Title
JP3904840B2 (en) Ruled line extraction device for extracting ruled lines from multi-valued images
RU2721188C2 (en) Improved contrast and noise reduction on images obtained from cameras
JP4250483B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP4853653B2 (en) Image processing apparatus and image processing program
JP2007214695A (en) Electronic watermark embedding apparatus and electronic watermark embedding method
US8189236B2 (en) Image processing apparatus, image processing method and computer-readable medium
US9131193B2 (en) Image-processing device removing encircling lines for identifying sub-regions of image
JP2008310817A (en) Method for detecting line structure from text map and image processor
JP2010074342A (en) Image processing apparatus, image forming apparatus, and program
JP4502001B2 (en) Image processing apparatus and image processing method
JP2007104706A (en) Image processing apparatus and image processing method
JP4441300B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium storing the program
JP5146653B2 (en) Image processing apparatus and image processing program
JP4868139B2 (en) Image processing apparatus and image processing program
JP5761353B2 (en) Ridge direction extraction device, ridge direction extraction method, ridge direction extraction program
JP4771087B2 (en) Image processing apparatus and image processing program
JP4569785B2 (en) Binarization device and binarization processing program
JP2009140244A (en) Image processing program and image processor
JP5365817B2 (en) Image processing apparatus and image processing program
JP3830350B2 (en) Color image processing method, color image processing apparatus, program, and recording medium
JP5453215B2 (en) Image processing apparatus, image forming apparatus, and image processing method
US20220021787A1 (en) Apparatus, method, and storage medium for removing shading dots
JP4403993B2 (en) Image processing apparatus, image forming apparatus, image processing method, and program
JP3957523B2 (en) Color image processing apparatus, color image processing method, program, and recording medium
JP7377661B2 (en) Image semantic region segmentation device, region detection sensitivity improvement method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110119

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111104

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111116

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120110

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120620

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120727

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121113

R150 Certificate of patent or registration of utility model

Ref document number: 5146653

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20151207

Year of fee payment: 3

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees