JP2012008914A - Image processing device and image processing program - Google Patents

Image processing device and image processing program Download PDF

Info

Publication number
JP2012008914A
JP2012008914A JP2010146094A JP2010146094A JP2012008914A JP 2012008914 A JP2012008914 A JP 2012008914A JP 2010146094 A JP2010146094 A JP 2010146094A JP 2010146094 A JP2010146094 A JP 2010146094A JP 2012008914 A JP2012008914 A JP 2012008914A
Authority
JP
Japan
Prior art keywords
color
image
boundary
main
limited
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.)
Pending
Application number
JP2010146094A
Other languages
Japanese (ja)
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 JP2010146094A priority Critical patent/JP2012008914A/en
Publication of JP2012008914A publication Critical patent/JP2012008914A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Color Image Communication Systems (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image processing device and an image processing program capable of obtaining a binary image in which missing of information expressed by color differences in an image to be processed is reduced.SOLUTION: A limited color image generation unit 11 generates a limited color image by limiting colors used in an image to be processed to plural main colors. A binary image generation unit 12 binarizes the image to be processed to generate a binary image. A color boundary extraction unit 13 extracts a color boundary between adjacent main colors which are different in the limited color image generated by the limited color image generation unit 11, both of the adjacent main colors being converted into either one value in the binary image generated by the binary image generation unit 12. A determination unit 14 determines which side of the color boundary is to be corrected based on the main colors constituting the color boundary extracted by the color boundary extraction unit 13 and features about the regions of the main colors, and a correction unit 15 corrects values of the binary image on the determined side.

Description

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

従来より、例えばカラー画像を白黒のプリンタで出力する場合やデータ量を減らして保存する場合などでは、カラー画像を二値画像に変換することが行われている。カラー画像を単純に明度などによって二値画像に変換すると、例えば色文字が色相の異なる背景色中に存在する場合などでは、文字と背景がともに二値の一方の値に変換され、文字と背景の区別がなくなってしまう。   Conventionally, for example, when a color image is output by a monochrome printer or when the data amount is reduced and stored, the color image is converted into a binary image. When a color image is simply converted to a binary image by brightness, for example, when a color character exists in a background color with a different hue, the character and background are both converted to one of the binary values. The distinction is lost.

例えば特許文献1においては、カラー画像の輝度情報をもとに文字などの特定領域と背景などの周辺領域に分けて輝度補正を行い、モノクロ画像を得ている。この場合、ある色が文字と背景に用いられている場合に二値で出力すると、いずれか一方は二値画像に反映されない。また、特定領域として文字領域の境界から膨張させて得ており、その特定領域あるいは周辺領域の輝度を補正するため、込み入った画線を有する場合にはつぶれが発生する。   For example, in Patent Document 1, luminance correction is performed for a specific area such as a character and a peripheral area such as a background based on the luminance information of a color image to obtain a monochrome image. In this case, when a certain color is used for the character and the background, if one color is output, either one is not reflected in the binary image. In addition, it is obtained by expanding from the boundary of the character area as a specific area, and in order to correct the luminance of the specific area or the peripheral area, a collapse occurs when it has a complicated image line.

また、例えば特許文献2においては、単色化する際に濃度差が予め決められた範囲内に含まれる場合に、境界線を生成して領域を分離している。例えば特許文献3においても、二値化した画像と境界線の画像を排他的論理和により合成して二値画像を得ている。   For example, in Patent Document 2, when a density difference is included in a predetermined range when making a single color, a boundary line is generated to separate the regions. For example, also in Patent Document 3, a binary image is obtained by synthesizing a binarized image and an image of a boundary line by exclusive OR.

特開2006−121674号公報JP 2006-121684 A 特開2008−005065号公報JP 2008-005065 A 特開平11−205617号公報Japanese Patent Laid-Open No. 11-205617

本発明は、処理対象の画像中で色の違いにより表現されている情報の欠落を低減した二値画像を得ることができる画像処理装置及び画像処理プログラムを提供することを目的とするものである。   An object of the present invention is to provide an image processing apparatus and an image processing program capable of obtaining a binary image in which loss of information expressed by a color difference in a processing target image is reduced. .

本願請求項1に記載の発明は、処理対象の画像中で使用されている色を複数の主要色に限定した限定色画像を生成する限定色画像生成手段と、前記画像を二値化して二値画像を生成する二値画像生成手段と、前記限定色画像で異なる主要色が隣接するが前記二値画像では前記隣接する主要色ともいずれか一方の値に変換されている色境界を抽出する色境界抽出手段と、前記色境界を構成する主要色及び該主要色の領域に関する特徴から前記色境界のいずれの側を補正するかを決定する決定手段と、前記二値画像における前記色境界の前記決定手段で決定された側の値を補正する補正手段を有することを特徴とする画像処理装置である。   According to the first aspect of the present invention, limited color image generation means for generating a limited color image in which colors used in the image to be processed are limited to a plurality of main colors, and binarization by binarizing the image. A binary image generating unit that generates a value image and a color boundary in which different primary colors are adjacent to each other in the limited color image but are converted to one of the adjacent primary colors in the binary image are extracted. Color boundary extraction means; determination means for determining which side of the color boundary is to be corrected based on features relating to the primary color and the area of the primary color that constitutes the color boundary; and the color boundary of the binary image An image processing apparatus comprising correction means for correcting a value determined by the determination means.

本願請求項2に記載の発明は、処理対象の画像中で使用されている色を複数の主要色に限定した限定色画像を生成する限定色画像生成手段と、前記限定色画像を前記主要色または該主要色の領域または該主要色と他の主要色との隣接関係に従って二値化して二値画像を生成する二値画像生成手段と、前記限定色画像で異なる主要色が隣接するが前記二値画像では前記隣接する主要色ともいずれか一方の値に変換されている色境界を抽出する色境界抽出手段と、前記色境界を構成する主要色及び該主要色の領域に関する特徴から前記色境界のいずれの側を補正するかを決定する決定手段と、前記二値画像における前記色境界の前記決定手段で決定された側の値を補正する補正手段を有することを特徴とする画像処理装置である。   According to the second aspect of the present invention, a limited color image generating unit that generates a limited color image in which colors used in a processing target image are limited to a plurality of main colors, and the limited color image is converted into the main color. Or a binary image generating means for generating a binary image by binarizing according to an adjacent relationship between the primary color region or the primary color and another primary color, and different primary colors are adjacent to each other in the limited color image. In the binary image, the color boundary extraction means for extracting a color boundary that has been converted to one of the values of the adjacent main color, and the color from the characteristics relating to the main color constituting the color boundary and the area of the main color An image processing apparatus comprising: a determination unit that determines which side of the boundary is to be corrected; and a correction unit that corrects a value determined by the determination unit of the color boundary in the binary image. It is.

本願請求項3に記載の発明は、本願請求項1または請求項2に記載の発明における前記色境界抽出手段が、前記限定色画像全体から前記主要色の組み合わせのそれぞれについて前記色境界を抽出し、前記決定手段が、前記主要色の組み合わせのそれぞれについて当該主要色の組み合わせのいずれの主要色の側を補正するかを決定することを特徴とする画像処理装置である。   In the invention according to claim 3 of the present application, the color boundary extraction means in the invention according to claim 1 or 2 of the present application extracts the color boundary for each combination of the main colors from the entire limited color image. In the image processing apparatus, the determination unit determines which of the main color combinations to be corrected for each of the main color combinations.

本願請求項4に記載の発明は、本願請求項1から請求項3のいずれか1項に記載の発明における前記決定手段が、前記色境界を構成する前記主要色の領域に従って前記色境界のいずれの側を補正するかを決定することを特徴とする画像処理装置である。   According to a fourth aspect of the present invention, in the invention according to any one of the first to third aspects of the present invention, the deciding means according to any one of the first to third aspects of the present invention determines which of the color boundaries according to the region of the primary color constituting the color boundary. It is an image processing apparatus that determines whether to correct the side of the image.

本願請求項5に記載の発明は、コンピュータに、請求項1から請求項4のいずれか1項に記載の画像処理装置の機能を実行させるものであることを特徴とする画像処理プログラムである。   An invention according to claim 5 of the present application is 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 4.

本願請求項1に記載の発明によれば、本構成を有しない場合に比べて、処理対象の画像中で色の違いにより表現されている情報の欠落を低減した二値画像を得ることができるという効果がある。   According to the invention described in claim 1 of the present application, it is possible to obtain a binary image in which a lack of information expressed by a color difference is reduced in an image to be processed compared to a case where the present configuration is not provided. There is an effect.

本願請求項2に記載の発明によれば、本構成を有しない場合に比べて、処理対象の画像中で色の違いにより表現されている情報の欠落を低減した二値画像を得ることができるという効果がある。   According to the invention described in claim 2 of the present application, it is possible to obtain a binary image in which the lack of information expressed by the difference in color in the image to be processed is reduced as compared with the case where the present configuration is not provided. There is an effect.

本願請求項3に記載の発明によれば、画像全体に対して統一した二値化処理を行うことができる。   According to the third aspect of the present invention, unified binarization processing can be performed on the entire image.

本願請求項4に記載の発明によれば、処理対象の画像中には存在したが欠落した色境界について、本構成を有しない場合に比べて適切な側を補正することができる。   According to the invention described in claim 4 of the present application, it is possible to correct an appropriate side of the color boundary that is present in the image to be processed but is missing as compared with the case where the present configuration is not provided.

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

本発明の第1の実施の形態を示す構成図である。It is a block diagram which shows the 1st Embodiment of this invention. 本発明の第1の実施の形態における処理の具体例の説明図である。It is explanatory drawing of the specific example of the process in the 1st Embodiment of this invention. 込み入った図形における色境界の一方の側を補正する一例の説明図である。It is explanatory drawing of an example which correct | amends one side of the color boundary in a complicated figure. 包括度の一例の説明図である。It is explanatory drawing of an example of a comprehensiveness. 本発明の第2の実施の形態を示す構成図である。It is a block diagram which shows the 2nd Embodiment of this invention. 本発明の第2の実施の形態における処理の具体例の説明図である。It is explanatory drawing of the specific example of the process in the 2nd Embodiment of this invention. 本発明の各実施の形態で説明した機能をコンピュータプログラムで実現した場合におけるコンピュータプログラム及びそのコンピュータプログラムを格納した記憶媒体とコンピュータの一例の説明図である。FIG. 15 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 are realized by the computer program.

図1は、本発明の第1の実施の形態を示す構成図である。図中、11は限定色画像生成部、12は二値画像生成部、13は色境界抽出部、14は決定部、15は補正部である。限定色画像生成部11は、処理対象の画像中で使用されている色を複数の主要色に限定した限定色画像を生成する。限定色画像の生成方法としては公知の手法を用いればよい。例えば、処理対象の画像中で使用されている色を色空間において解析し、例えば色ヒストグラムやクラスタリングなどによって主要色を抽出するとともに、処理対象の画像中で使用されている色を主要色のいずれかへ置換して行けばよい。あるいは、例えば輪郭追跡により領域分割を行い、各領域における主要色の抽出と各領域の色を主要色へ変換することにより限定色画像を生成してもよい。もちろん、他の方法であってもよい。   FIG. 1 is a block diagram showing a first embodiment of the present invention. In the figure, 11 is a limited color image generation unit, 12 is a binary image generation unit, 13 is a color boundary extraction unit, 14 is a determination unit, and 15 is a correction unit. The limited color image generation unit 11 generates a limited color image in which colors used in the processing target image are limited to a plurality of main colors. A known method may be used as a method for generating the limited color image. For example, the color used in the image to be processed is analyzed in the color space, and the main color is extracted by, for example, a color histogram or clustering. Replace it with k. Alternatively, for example, a limited color image may be generated by performing region division by contour tracking and extracting the main color in each region and converting the color of each region into the main color. Of course, other methods may be used.

二値画像生成部12は、処理対象の画像を二値化して二値画像を生成する。二値化方法としては公知の手法を用いればよい。例えば処理対象の画像における各画素の明度を、予め決められた閾値、あるいは該画素と隣接する複数の画素を含めて決められる閾値と比較し、二値化すればよい。   The binary image generation unit 12 binarizes the image to be processed and generates a binary image. A known method may be used as the binarization method. For example, the brightness of each pixel in the image to be processed may be binarized by comparing it with a predetermined threshold or a threshold determined including a plurality of pixels adjacent to the pixel.

色境界抽出部13は、限定色画像生成部11で生成された限定色画像では異なる主要色が隣接するが、その隣接する主要色のいずれも、二値画像生成部12で生成された二値画像ではいずれか一方の値に変換されている色境界を抽出する。このような色境界は、限定色画像では異なる色が隣接して境界が存在しているが、二値画像生成部12で生成された二値画像では境界が存在せず、処理対象の画像中で色の違いにより表現されている情報が欠落している箇所である。この色境界抽出部13で抽出した色境界が、決定部14及び補正部15の処理対象となる。色境界抽出部13は、色境界を抽出する毎に決定部14に受け渡して決定部14及び補正部15の処理を行うようにしてもよいし、処理対象の画像全体から色境界を抽出した後に決定部14に受け渡してもよい。また、限定色画像及び二値画像を走査して色境界を抽出して行くほか、主要色の組み合わせごとに色境界を抽出してもよい。   In the limited color image generated by the limited color image generation unit 11, the color boundary extraction unit 13 has different main colors adjacent to each other, but any of the adjacent main colors is a binary generated by the binary image generation unit 12. In the image, the color boundary that has been converted into one of the values is extracted. In such a limited color image, different colors are adjacent to each other in the limited color image, but there is no boundary in the binary image generated by the binary image generation unit 12, and the boundary is not included in the image to be processed. This is where the information expressed by the color difference is missing. The color boundary extracted by the color boundary extraction unit 13 is a processing target of the determination unit 14 and the correction unit 15. Each time the color boundary extraction unit 13 extracts the color boundary, the color boundary extraction unit 13 may pass the determination unit 14 to perform the processing of the determination unit 14 and the correction unit 15, or after extracting the color boundary from the entire processing target image. You may deliver to the determination part 14. In addition to extracting the color boundary by scanning the limited color image and the binary image, the color boundary may be extracted for each combination of main colors.

決定部14は、色境界抽出部13で抽出された色境界を構成する主要色及びその主要色の領域に関する特徴から、色境界のいずれの側を補正するかを決定する。主要色に関する特徴としては、当該主要色の明度や彩度、色相などがある。また、主要色の領域に関する特徴としては、当該主要色が使用されている領域の大きさ(画素数、外接矩形の大きさ)、長さ、太さや、包括関係(一方に含まれているか否か、包括度、重なり度合いなど)、複雑さなどがある。これらの特徴から、例えば判定度合いを表す関数Fを用いて色境界を構成する各主要色について判定度合いを算出し、いずれかを補正する側の主要色として決定すればよい。あるいは、上述の特徴から、例えば優先順位などに従って論理判定してもよい。なお、このような色境界のいずれの側を補正するかの決定は、それぞれの色境界において行ってもよいし、画像全体における色境界を構成する主要色の組ごとに行ってもよい。   The determining unit 14 determines which side of the color boundary is to be corrected based on the main color that constitutes the color boundary extracted by the color boundary extracting unit 13 and the characteristics of the main color region. Features relating to the main color include brightness, saturation, hue, and the like of the main color. In addition, as features relating to the main color area, the size (number of pixels, the size of the circumscribed rectangle), length, thickness, and comprehensive relationship (whether it is included in one side) where the main color is used Or the degree of inclusion, the degree of overlap, etc.) and the complexity. From these characteristics, for example, a determination degree may be calculated for each main color constituting the color boundary using a function F representing the determination degree, and one of them may be determined as a main color to be corrected. Alternatively, the logical determination may be made according to, for example, the priority order from the above-described features. The determination of which side of the color boundary is corrected may be performed at each color boundary, or may be performed for each set of main colors constituting the color boundary in the entire image.

補正部15は、二値画像生成部12で生成した二値画像における色境界抽出部13で抽出した色境界について、決定部14で決定された側の値を補正する。色境界抽出部13で抽出した色境界は、二値画像では境界が存在せずに二値のいずれか一方の値となっていることから、補正は、色境界の決定部14で決定された側の値を二値の他方の値に変更すればよい。これにより、二値画像においても色の違いが存在する色境界が分かるようになり、カラー情報が二値画像に反映されることになる。なお、補正する画素数などは予め決めておけばよい。   The correction unit 15 corrects the value determined by the determination unit 14 for the color boundary extracted by the color boundary extraction unit 13 in the binary image generated by the binary image generation unit 12. Since the color boundary extracted by the color boundary extraction unit 13 is one of binary values without a boundary in the binary image, the correction is determined by the color boundary determination unit 14. The value on the side may be changed to the other value of the binary value. As a result, the color boundary where the color difference exists in the binary image can be recognized, and the color information is reflected in the binary image. The number of pixels to be corrected may be determined in advance.

図2は、本発明の第1の実施の形態における処理の具体例の説明図である。図2(A)には処理対象の画像の具体例を示している。図2(A)に示した画像では、灰色の背景中に黒の文字「A」と、橙色の文字「B」と、緑の文字「C」が含まれた橙色の矩形とが存在している。なお、図示の都合上、色の違いは、黒については塗り潰し、他の色については斜線を異ならせて示している。   FIG. 2 is an explanatory diagram of a specific example of processing according to the first embodiment of this invention. FIG. 2A shows a specific example of an image to be processed. In the image shown in FIG. 2A, a black character “A”, an orange character “B”, and an orange rectangle including a green character “C” exist in a gray background. Yes. For convenience of illustration, the difference in color is indicated by black for the other color and different shaded lines for the other colors.

図2(A)に示した画像を処理対象とし、二値画像生成部12で二値化した二値画像を図2(B)に示している。この例では、二値を白と黒により示しており、黒の文字「A」が一方の値(黒)に、その他の部分は他方の値(白)になったものとしている。この二値画像では、橙の文字「B」や矩形、緑の文字「C」については反映されておらず、カラー情報が欠落していることになる。   FIG. 2B shows a binary image binarized by the binary image generation unit 12 with the image shown in FIG. In this example, the binary values are indicated by white and black, and the black character “A” is set to one value (black) and the other portion is set to the other value (white). In this binary image, the orange character “B”, the rectangle, and the green character “C” are not reflected, and the color information is missing.

一方、限定色画像生成部11は図2(A)に示した処理対象の画像中の色を主要色に限定した限定色画像を生成する。例えば図2(A)に示した画像が画像読取装置等で読み取ったものであった場合には、読取誤差などによって境界部に異なる色が存在したり、本来はベタの部分でも色のばらつきが生じている場合がある。限定色画像を生成しておけば、次の色境界抽出部13で抽出する色境界が明確になる。図2(A)に示した例では、主要色として黒、灰、橙、緑が抽出され、これらの色以外については主要色のいずれかに変換して、限定色画像が生成される。ここでは図2(A)の画像で代用することとする。   On the other hand, the limited color image generation unit 11 generates a limited color image in which the colors in the processing target image shown in FIG. For example, when the image shown in FIG. 2A is read by an image reading device or the like, different colors exist at the boundary due to reading errors or the like, and there is a variation in color even in a solid portion. It may have occurred. If the limited color image is generated, the color boundary extracted by the next color boundary extraction unit 13 becomes clear. In the example shown in FIG. 2A, black, gray, orange, and green are extracted as main colors, and a color other than these colors is converted into one of the main colors to generate a limited color image. Here, the image in FIG. 2A is substituted.

色境界抽出部13は、限定色画像生成部11で生成された限定色画像では異なる主要色が隣接するが、その隣接する主要色のいずれも、二値画像生成部12で生成された二値画像ではいずれか一方の値に変換されている色境界を抽出する。この具体例では、図2(A)と図2(B)を比較して分かるように、図2(A)で存在する灰色と橙の境界、及び、橙と緑の境界は、図2(B)に示す二値画像ではいずれも境界の両側において白で示されている。すなわち、灰色と橙が隣接する境界では、隣接する主要色である灰色と橙のいずれも、二値画像では二値の一方の値(白)に変換されている。また、橙と緑が隣接する境界でも、隣接する主要色である橙と緑のいずれも、二値画像では二値の一方の値(白)に変換されている。従って、灰色と橙の境界、及び、橙と緑の境界を、ここでは修正処理の対象となる色境界として抽出する。抽出した色境界を、図2(C)に破線により示している。   In the limited color image generated by the limited color image generation unit 11, the color boundary extraction unit 13 has different main colors adjacent to each other, but any of the adjacent main colors is a binary generated by the binary image generation unit 12. In the image, the color boundary that has been converted into one of the values is extracted. In this specific example, as can be seen by comparing FIG. 2A and FIG. 2B, the gray-orange boundary and the orange-green boundary existing in FIG. In the binary image shown in B), both are shown in white on both sides of the boundary. That is, at the boundary where gray and orange are adjacent, both the adjacent primary colors gray and orange are converted into one of the binary values (white) in the binary image. Further, even at the boundary where orange and green are adjacent, both the adjacent main colors orange and green are converted into one of the binary values (white) in the binary image. Therefore, the boundary between gray and orange and the boundary between orange and green are extracted as color boundaries to be corrected here. The extracted color boundary is indicated by a broken line in FIG.

決定部14は、色境界抽出部13で抽出された色境界を構成する主要色及びその主要色の領域に関する特徴から、色境界のいずれの側を補正するかを決定し、補正部15は、二値画像生成部12で生成した二値画像における色境界抽出部13で抽出した色境界について、決定部14で決定された側の値を補正する。まず、橙と緑の色境界について、いずれの側を補正するかを決定する。ここでは緑の側を補正するものと決定部14で決定し、補正部15が緑の側を補正するものとする。橙と緑の色境界について緑の側を補正した結果を図2(D)に示している。また、灰色と橙の色境界についても、いずれの側を補正するかを決定する。ここでは橙の側を補正するものと決定部14で決定し、補正部15が橙の側を補正するものとする。灰色と橙の色境界について橙の側を補正した結果を図2(D)に反映し、図2(E)に示している。   The determination unit 14 determines which side of the color boundary is to be corrected based on the characteristics related to the main color and the region of the main color that form the color boundary extracted by the color boundary extraction unit 13, and the correction unit 15 For the color boundary extracted by the color boundary extraction unit 13 in the binary image generated by the binary image generation unit 12, the value on the side determined by the determination unit 14 is corrected. First, it is determined which side of the orange / green color boundary is to be corrected. Here, it is assumed that the determination unit 14 determines that the green side is to be corrected, and the correction unit 15 corrects the green side. FIG. 2D shows the result of correcting the green side for the orange-green color boundary. Further, it is determined which side of the gray / orange color boundary is to be corrected. Here, it is assumed that the determination unit 14 determines that the orange side is to be corrected, and the correction unit 15 corrects the orange side. The result of correcting the orange side for the gray / orange color boundary is reflected in FIG. 2D and shown in FIG.

この図2(E)に示した二値画像が処理結果として出力されることになる。図2(B)に示した二値画像では消失していた橙の文字「B」や矩形、緑の文字「C」の輪郭が現れ、カラー情報が欠落せずに存在が分かるようになる。   The binary image shown in FIG. 2E is output as the processing result. In the binary image shown in FIG. 2B, the outlines of the orange character “B”, the rectangle, and the green character “C” that have disappeared appear, and the presence of color information is not lost.

図3は、込み入った図形における色境界の一方の側を補正する一例の説明図である。上述のように、色境界を構成する主要色のうち、いずれの側を補正するかを決定部14で決定し、決定した側について色境界の補正を行っている。例えば図3(A)に示すように込み入った図形が存在する場合を考える。ここでは斜線を異ならせて色の違いを示しているが、いずれの色も二値画像では一方の値に変換されているものとする。ここでは二値を白と黒とし、白に変換されているものとする。   FIG. 3 is an explanatory diagram of an example of correcting one side of a color boundary in a complicated figure. As described above, the determination unit 14 determines which side of the main colors constituting the color boundary is to be corrected, and the color boundary is corrected for the determined side. For example, consider a case where there is a complicated figure as shown in FIG. Here, different colors are shown by changing diagonal lines, but it is assumed that any color is converted into one value in the binary image. Here, it is assumed that the binary values are white and black and converted to white.

例えば、図3(A)において存在する色境界の両側を補正すると、その結果は図3(B)に示すものとなる。入り組んだ部分はつぶれてしまい、消失している。これに対して、色境界の一方を補正すると図3(B)に示す二値画像となり、入り組んだ部分は二値画像に反映されている。色境界の一方の側を補正することにより、込み入った部分が存在する細かいまたは小さい文字などについて、二値画像に反映されるようにしている。   For example, when both sides of the color boundary existing in FIG. 3A are corrected, the result is as shown in FIG. The complicated part is crushed and disappears. On the other hand, when one of the color boundaries is corrected, the binary image shown in FIG. 3B is obtained, and the complicated portion is reflected in the binary image. By correcting one side of the color boundary, fine or small characters with complicated portions are reflected in the binary image.

色境界のいずれの側を補正するかは、上述のように決定部14において、色境界を構成する主要色に関する特徴、及び、その主要色の領域に関する特徴から決定する。その具体例について、いくつか説明する。例えば、上述した判定度合いを表す関数Fを用いる場合、その関数Fとしては、
F=α×太さ+β×大きさ+γ×包括度−δ×彩度
を用いるとよい。ここで、係数α、β、γ、δは予め与えられる正数である。関数Fの値が小さい主要色の側を色境界において補正する側として決定し、補正すればよい。太さは、判定対象の色境界から別の色境界までの距離であり、文字であれば線幅でよい。大きさは、当該色境界を含む主要色の領域の広さであり、例えば画素数から求めてもよいし、当該領域の外接矩形の大きさでもよい。図4は、包括度の一例の説明図である。包括度は、色境界を構成する一方の主要色の領域の外接矩形が、他方の主要色の領域の外接矩形と重なっていない部分の面積比率である。図4に示す例では、理解しやすくするために、2つの外接矩形を横にずらして記載しているが、横にずれずに重なっているとした場合、外接矩形1の半分が外接矩形2と重なっているので、重なっていない部分の面積比率は1/2である。また、外接矩形2については2/3が外接矩形1と重なっているので、重なっていない部分の面積比率は1/3である。あるいは、包含されているか否かで包括度を決定してもよい。彩度は当該主要色の彩度を用いればよい。
As described above, which side of the color boundary is to be corrected is determined by the determination unit 14 from the characteristics regarding the main color constituting the color boundary and the characteristics regarding the area of the main color. Some specific examples will be described. For example, when the function F representing the above-described determination degree is used, as the function F,
F = α × thickness + β × size + γ × inclusion level−δ × saturation may be used. Here, the coefficients α, β, γ, and δ are positive numbers given in advance. The main color side having a small value of the function F may be determined as the side to be corrected at the color boundary and corrected. The thickness is a distance from a color boundary to be determined to another color boundary, and may be a line width if it is a character. The size is the size of the main color region including the color boundary, and may be obtained from the number of pixels, for example, or may be the size of a circumscribed rectangle of the region. FIG. 4 is an explanatory diagram of an example of the comprehensiveness. The comprehensiveness is an area ratio of a portion where a circumscribed rectangle of one main color area constituting the color boundary does not overlap with a circumscribed rectangle of the other main color area. In the example shown in FIG. 4, for ease of understanding, the two circumscribed rectangles are shifted to the side. Therefore, the area ratio of the non-overlapping portion is ½. In addition, since 2/3 of the circumscribed rectangle 2 overlaps the circumscribed rectangle 1, the area ratio of the non-overlapping portion is 1/3. Alternatively, the comprehensiveness may be determined based on whether or not it is included. The saturation may be the saturation of the main color.

この関数Fの具体例では、太さが太く、大きく、他の主要色の外接矩形と重ならず、彩度が低いほど、関数Fの値は大きくなり、逆に細くて小さく、他の主要色の外接矩形に重なり、彩度が高いほど、値は小さくなる。関数Fの値が小さいほど、背景と前景のうち前景らしいことが推測され、関数Fの値が大きいほど背景らしいことが推測される。図3でも示したが、込み入った図形では前景と推測される側を補正することとし、関数Fの小さい色領域の境界を補正する側として決定して補正すればよい。   In this specific example of the function F, the value of the function F increases as the thickness is thicker and larger, does not overlap with the circumscribed rectangles of other main colors, and the saturation is lower. The higher the saturation is, the smaller the value. It is estimated that the smaller the value of the function F is, the more likely the foreground is between the background and the foreground, and the larger the value of the function F, the more likely it is the background. As shown in FIG. 3, in the complicated figure, the side estimated as the foreground is corrected, and the correction may be made by determining the side of the color region having a small function F as the side to be corrected.

例えば図2に示した例において、橙の矩形中に緑の文字「C」が存在する部分において、橙と緑の色境界では、緑の文字「C」の方が細く、小さく、橙の矩形に包含されている。従って、橙の矩形から算出される関数Fの値よりも、緑の文字「C」から算出される関数Fの値の方が小さくなる。従って、橙と緑の色境界では緑の側を補正することと決定し、緑の側を補正することになる。   For example, in the example shown in FIG. 2, in the portion where the green character “C” is present in the orange rectangle, the green character “C” is narrower and smaller at the orange-green color boundary. Is included. Therefore, the value of the function F calculated from the green character “C” is smaller than the value of the function F calculated from the orange rectangle. Accordingly, it is determined that the green side is corrected at the orange / green color boundary, and the green side is corrected.

なお、文字などでは太さが変化することもあることから、太さの平均と太さの分散を用いて上述の関数Fを変形し、
F=α1×太さの平均+α2×太さの分散+β×大きさ+γ×包括度−δ×彩度
としてもよい。ここで、係数α1、α2、β、γ、δは予め与えられる正数である。関数Fの値が小さい主要色の側を色境界において補正する側として決定し、補正すればよい。もちろん、このほかの主要色の色に関する特徴、主要色の領域に関する特徴を用いた関数としてもよいし、判定度合いを算出する関数としてどのような式を用いるかについても変更してよい。
Since the thickness of characters and the like may change, the above function F is modified using the average thickness and variance of the thickness,
F = α1 × average thickness + α2 × thickness dispersion + β × size + γ × inclusion level−δ × saturation. Here, the coefficients α1, α2, β, γ, and δ are positive numbers given in advance. The main color side having a small value of the function F may be determined as the side to be corrected at the color boundary and corrected. Of course, it may be a function using other characteristics relating to the color of the main color and characteristics relating to the area of the main color, or what expression is used as a function for calculating the determination degree.

色境界のいずれの側を補正するかを決定部14で決定する際には、上述の関数により算出した判定度合いを用いる方法のほか、主要色の色の特徴や領域の特徴から、例えば優先順位などに従って論理判定してもよい。一例としては、
S1.包括度の小さい主要色の側を補正する側として決定する
S2.太さの小さい主要色の側を補正する側として決定する
S3.領域の大きさが小さい主要色の側を補正する側として決定する
S4.彩度が大きい主要色の側を補正する側として決定する
と順位付けしておき、S1から順に2つの主要色について特徴値の差が予め与えられた閾値以内の場合に、そのステップの内容で補正する側を決定し、閾値よりも大きい場合には次に進むこととして判定して行く。例えばS1では色境界を構成する2つの主要色の領域の包括度の差が予め与えられている閾値以内であれば、包括度が小さい主要色の側を補正する側として決定する。また、包括度の差が予め与えられている閾値以内であればS2に進み、太さの比較を行う。このようにして、順に判定を行って行けばよい。S4でも彩度差が予め与えられた閾値以内であれば、いずれかの主要色の側を強制的に補正する側として決定すればよい。もちろん、ここに示した順位付け及び各判定項目は一例であって、他の判定項目を使用してもよいし、順序についてもこの例に限られるものではない。
When the determination unit 14 determines which side of the color boundary is to be corrected, in addition to the method using the determination degree calculated by the above-described function, the priority order is determined based on the color characteristics of the main color and the area characteristics. The logic may be determined according to the above. As an example,
S1. Determine the side of the main color with a low coverage as the side to be corrected S2. Determine the side of the main color with a small thickness as the side to be corrected S3. The main color side having a small area size is determined as the correction side. S4. Prioritizing that the side of the main color with high saturation is determined as the side to be corrected, if the difference between the feature values of the two main colors in order from S1 is within a predetermined threshold, correction is performed with the contents of that step. The side to be performed is determined, and if it is larger than the threshold value, it is determined that the process proceeds to the next. For example, in S1, if the difference in coverage between the two main color regions constituting the color boundary is within a predetermined threshold value, the side of the main color having a lower coverage is determined as the correction side. On the other hand, if the difference in inclusiveness is within a predetermined threshold, the process proceeds to S2, and the thickness is compared. In this way, the determination may be made in order. Even in S4, if the saturation difference is within a predetermined threshold value, one of the main colors may be determined as a side to be forcibly corrected. Of course, the ranking and each determination item shown here are only examples, and other determination items may be used, and the order is not limited to this example.

上述の判定は、色境界ごとに行ってもよいし、あるいは、画像中で一括して判定してもよい。色境界毎に行う場合でも、ある色境界において行った決定は、当該色境界を構成する主要色の組とともに記憶しておき、その主要色の組では他の色境界でもその決定を反映するとよい。二値画像において統一的に色境界の部分が補正されることになる。   The above-described determination may be performed for each color boundary, or may be performed collectively in the image. Even when it is performed for each color boundary, a determination made at a certain color boundary is stored together with a set of main colors constituting the color boundary, and the determination may be reflected at other color boundaries in the set of main colors. . Color boundary portions are corrected uniformly in the binary image.

また、画像中で一括して判定する場合には、ある2つの主要色が隣接する色境界が画像中に複数存在する場合があることから、補正する側の決定に使用する色境界を特定するか、あるいは各色境界における特徴を統計的に処理するとよい。例えば、ある2つの主要色が隣接する色境界が存在する各主要色の領域のうち、太さが最大の一方の主要色の領域と、その領域に隣接する他方の主要色の領域のうち太さが最大の領域とを対象とし、補正する側を決定すればよい。あるいは太さの分散を使用し、太さの分散が最小の一方の主要色の領域と、その領域に隣接する他方の主要色の領域のうち太さの分散が最小の領域とを対象とし、補正する側を決定すればよい。また、太さに代えて領域の大きさを使用し、大きさが最大の一方の主要色の領域と、その領域に隣接する他方の主要色の領域のうち大きさが最大の領域とを対象とし、補正する側を決定すればよい。もちろん、他の特徴を使用してもよい。これらの代表させた領域を使用して補正する側を決定したら、その決定を当該2つの主要色が隣接する他の色境界についても用いる。また、このような補正する側の決定を、色領域を構成する2つの主要色の組ごとに行えばよい。   Further, when determining in a lump in an image, there may be a plurality of color boundaries in which two main colors are adjacent to each other. Therefore, the color boundary used for determining the correction side is specified. Alternatively, the characteristics at each color boundary may be processed statistically. For example, among the main color areas where there is a color boundary where two main colors are adjacent to each other, one main color area having the maximum thickness and the other main color area adjacent to the area are thick. It is only necessary to determine a correction side with respect to a region having a maximum length. Alternatively, using the variance of thickness, targeting the area of one main color with the smallest thickness variance and the area with the smallest thickness variance among the other major color areas adjacent to that area, What is necessary is just to determine the side to correct. In addition, the size of the area is used instead of the thickness, and the area of the one main color with the largest size and the area with the largest size among the areas of the other main color adjacent to the area are targeted. And the correction side may be determined. Of course, other features may be used. Once these representative regions are used to determine the side to be corrected, the determination is also used for other color boundaries adjacent to the two main colors. In addition, such correction side determination may be performed for each set of two main colors constituting the color region.

各色境界における特徴を統計的に処理する場合には、隣接する2つの主要色の組ごとに、当該2つの主要色が隣接する1または複数の色境界における特徴量を集計して、集計結果からいずれの側を補正するかを決定すればよい。あるいは、各色境界においていずれの側を補正するかを判定した後、いずれの側を補正すると判定した色境界が多かったかにより、当該2つの主要色の組についていずれの側を補正するかを決定してもよい。   When statistically processing the features at each color boundary, for each set of two adjacent main colors, the feature amounts at one or more color boundaries adjacent to the two main colors are totaled, and the total results are calculated. It suffices to determine which side is to be corrected. Alternatively, after determining which side of each color boundary is to be corrected, it is determined which side is to be corrected for the set of the two main colors depending on which side is determined to be corrected. May be.

このようないずれの側を補正するかの決定を、色境界を構成する2つの主要色の組ごとに行い、その2つの主要色の組が隣接する色境界に対しては、いずれの色境界についても決定した側を補正部15で統一的に補正すればよい。   Such a determination of which side is corrected is performed for each set of two main colors constituting the color boundary, and for which color boundary adjacent to the two main color sets, which color boundary The determined side may be uniformly corrected by the correction unit 15.

図5は、本発明の第2の実施の形態を示す構成図である。図1に示した本発明の第1の実施の形態と異なる部分について主に説明して行く。この第2の実施の形態では、二値画像生成部12は限定色画像生成部11で生成した限定色画像を二値化する例を示している。   FIG. 5 is a block diagram showing a second embodiment of the present invention. Differences from the first embodiment of the present invention shown in FIG. 1 will be mainly described. In the second embodiment, the binary image generation unit 12 binarizes the limited color image generated by the limited color image generation unit 11.

二値画像生成部12は、主要色の色(具体的には、明度、彩度、色相など)、主要色の領域(大きさ、長さ、太さ、包括関係、複雑さなど)、主要色と他の主要色との隣接関係(主要色と他の主要色とが隣接する部分の長さや隣接している個数など)などに応じて、限定色画像生成部11で生成した限定色画像を二値化し、二値画像を生成する。   The binary image generation unit 12 includes main color colors (specifically, brightness, saturation, hue, etc.), main color areas (size, length, thickness, inclusion relationship, complexity, etc.), main color, etc. The limited color image generated by the limited color image generation unit 11 according to the adjacency relationship between the color and the other main color (the length of the adjacent portion of the main color and the other main color, the number of adjacent portions, etc.) Is binarized to generate a binary image.

例えば、二値の一方の値に変換するか否かを判定するための判定度合いを表す関数Gを用い、
G=α×太さ+β×大きさ+γ×包括度−δ×彩度
により判定度合いを算出する。ここで、係数α、β、γ、δは予め与えられる正数である。算出された判定度合いが予め決められた値以下であれば、二値の一方の値(例えば黒)に変換し、そうでなければ二値の他方の値(例えば白)に変換すればよい。太さは、ある主要色と隣接する境界から別の境界までの距離であり、文字であれば線幅でよい。大きさは、当該主要色の領域の広さであり、例えば画素数から求めてもよいし、当該領域の外接矩形の大きさでもよい。包括度は、一方の主要色の領域の外接矩形が、隣接する他方の主要色の領域の外接矩形と重なっていない部分の面積比率である。彩度は当該主要色の彩度を用いればよい。算出される判定度合いが小さいほど前景の図形であることが想定され、大きいほど背景であることが想定される。それぞれに応じた二値のいずれかの値に変換すればよい。
For example, using a function G representing a degree of determination for determining whether to convert to one of binary values,
G = α × thickness + β × size + γ × inclusion level−δ × saturation degree is calculated. Here, the coefficients α, β, γ, and δ are positive numbers given in advance. If the calculated degree of determination is less than or equal to a predetermined value, it is converted to one of the binary values (for example, black), otherwise it is converted to the other binary value (for example, white). The thickness is a distance from a boundary adjacent to a certain primary color to another boundary, and may be a line width if it is a character. The size is the width of the region of the main color, and may be obtained from the number of pixels, for example, or may be the size of a circumscribed rectangle of the region. The comprehensiveness is an area ratio of a portion where a circumscribed rectangle of one main color region does not overlap with a circumscribed rectangle of the other adjacent main color region. The saturation may be the saturation of the main color. It is assumed that the lower the calculated degree of determination is, the more the foreground figure is, and the larger the background is, the higher the background. What is necessary is just to convert into the binary value according to each.

あるいは、二値の値を変更する度合いを表す関数Hを用い、
H=ε×隣接する部分の長さ
により度合いを算出する。ここで、係数εは予め与えられる正数である。算出された度合いの値が予め決められた値より大きい隣接する主要色については、二値の値を異ならせればよい。
Alternatively, a function H representing the degree of changing the binary value is used,
The degree is calculated from H = ε × length of adjacent portions. Here, the coefficient ε is a positive number given in advance. For adjacent main colors whose calculated degree values are larger than a predetermined value, the binary values may be different.

このようにして生成された二値画像は色境界抽出部13に渡され、限定色画像生成部11で生成された限定色画像では異なる主要色が隣接するが、その隣接する主要色のいずれも、二値画像ではいずれか一方の値に変換されている色境界が抽出される。そして、決定部14で色境界のいずれの側を補正するかを決定し、決定された側を補正部15で補正する。色境界抽出部13,決定部14、補正部15の処理については上述の第1の実施の形態で説明したとおりである。   The binary image generated in this way is passed to the color boundary extraction unit 13, and different primary colors are adjacent to each other in the limited color image generated by the limited color image generation unit 11. In the binary image, the color boundary converted to one of the values is extracted. Then, the determination unit 14 determines which side of the color boundary is to be corrected, and the determined unit corrects the determined side. The processing of the color boundary extraction unit 13, the determination unit 14, and the correction unit 15 is as described in the first embodiment.

図6は、本発明の第2の実施の形態における処理の具体例の説明図である。図6(A)には処理対象の画像の具体例を示しており、図2(A)に示したものである。図6(A)に示した画像では、灰色の背景中に黒の文字「A」と、橙色の文字「B」と、緑の文字「C」が含まれた橙色の矩形とが存在している。なお、図示の都合上、色の違いは、黒については塗り潰し、他の色については斜線を異ならせて示している。   FIG. 6 is an explanatory diagram of a specific example of processing according to the second embodiment of the present invention. FIG. 6A shows a specific example of an image to be processed, which is shown in FIG. In the image shown in FIG. 6A, a black character “A”, an orange character “B”, and an orange rectangle including a green character “C” are present in a gray background. Yes. For convenience of illustration, the difference in color is indicated by black for the other color and different shaded lines for the other colors.

図6(A)に示した画像を処理対象とし、限定色画像生成部11は図6(A)に示した処理対象の画像中の色を主要色に限定した限定色画像を生成する。この例では、主要色として黒、灰、橙、緑が抽出され、これらの色以外については主要色のいずれかに変換して限定色画像が生成される。ここでは図6(A)の画像で代用することとする。   The limited color image generation unit 11 generates a limited color image in which the colors in the image to be processed shown in FIG. 6A are limited to the main color, with the image shown in FIG. In this example, black, gray, orange, and green are extracted as main colors, and a limited color image is generated by converting these colors to any of the main colors. Here, the image in FIG. 6A is substituted.

二値画像生成部12は、限定色画像生成部11で生成した限定色画像を、主要色の隣接関係に応じて二値化し、二値画像を生成する。二値画像生成部12で二値化した二値画像を図6(B)に示している。この例では、二値を白と黒により示しており、黒の文字「A」と橙の文字「B」とともに、橙の矩形及びその中の緑の文字「C」についても一方の値(黒)に変換され、背景となる灰色の部分は他方の値(白)に変換されたものとしている。この二値画像では、橙の矩形の中の緑の文字「C」については反映されておらず、処理対象の画像中で色の違いにより表現されている情報が欠落していることになる。   The binary image generation unit 12 binarizes the limited color image generated by the limited color image generation unit 11 according to the adjacent relationship of the main colors, and generates a binary image. The binary image binarized by the binary image generation unit 12 is shown in FIG. In this example, binary values are indicated by white and black, and the black character “A” and the orange character “B”, as well as one value (black) of the orange rectangle and the green character “C” therein. ), And the gray portion as the background is converted to the other value (white). In this binary image, the green letter “C” in the orange rectangle is not reflected, and the information expressed by the color difference in the image to be processed is missing.

色境界抽出部13は、限定色画像生成部11で生成された限定色画像では異なる主要色が隣接するが、その隣接する主要色のいずれも、二値画像生成部12で生成された二値画像ではいずれか一方の値に変換されている色境界を抽出する。この具体例では、図6(A)で存在する橙と緑の境界は、図6(B)に示す二値画像ではいずれも境界の両側とも、二値画像では二値の一方の値(黒)に変換されている。従って、橙と緑の境界を、ここでは修正処理の対象となる色境界として抽出する。抽出した色境界を、図6(C)に破線により示している。   In the limited color image generated by the limited color image generation unit 11, the color boundary extraction unit 13 has different main colors adjacent to each other, but any of the adjacent main colors is a binary generated by the binary image generation unit 12. In the image, the color boundary that has been converted into one of the values is extracted. In this specific example, the boundary between orange and green that exists in FIG. 6A is either one of the binary images shown in FIG. ). Accordingly, the boundary between orange and green is extracted here as the color boundary to be corrected. The extracted color boundary is indicated by a broken line in FIG.

決定部14は、色境界抽出部13で抽出された橙と緑が隣接する色境界について、橙と緑の領域に関する特徴から、橙と緑のいずれの側を補正するかを決定する。ここでは、緑の側を補正することと決定したものとしている。補正部15は、二値画像生成部12で生成した二値画像における色境界抽出部13で抽出した色境界について、決定部14で決定された側の値を補正する。ここでは、橙と緑が隣接する色境界において、二値画像の緑の側を補正する。補正した結果を図6(D)に示している。   The determination unit 14 determines which side of orange or green is to be corrected based on the characteristics regarding the orange and green regions for the color boundary adjacent to orange and green extracted by the color boundary extraction unit 13. Here, it is assumed that it is decided to correct the green side. The correction unit 15 corrects the value determined by the determination unit 14 for the color boundary extracted by the color boundary extraction unit 13 in the binary image generated by the binary image generation unit 12. Here, the green side of the binary image is corrected at the color boundary where orange and green are adjacent. The corrected result is shown in FIG.

この図6(D)に示した二値画像が処理結果として出力されることになる。図6(B)に示した二値画像では消失していた緑の文字「C」の輪郭が現れ、処理対象の画像中で色の違いにより表現されている情報が欠落せずに存在が分かるようになる。   The binary image shown in FIG. 6D is output as the processing result. In the binary image shown in FIG. 6B, the outline of the green character “C” that has disappeared appears, and the information represented by the difference in color in the image to be processed is present without being lost. It becomes like this.

図7は、本発明の各実施の形態で説明した機能をコンピュータプログラムで実現した場合におけるコンピュータプログラム及びそのコンピュータプログラムを格納した記憶媒体とコンピュータの一例の説明図である。図中、21はプログラム、22はコンピュータ、31は光磁気ディスク、32は光ディスク、33は磁気ディスク、34はメモリ、41はCPU、42は内部メモリ、43は読取部、44はハードディスク、45はインタフェース、46は通信部である。   FIG. 7 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 are realized by the computer program. In the figure, 21 is a program, 22 is a computer, 31 is a magneto-optical disk, 32 is an optical disk, 33 is a magnetic disk, 34 is a memory, 41 is a CPU, 42 is an internal memory, 43 is a reading unit, 44 is a hard disk, 45 is An interface 46 is a communication unit.

上述の本発明の各実施の形態で説明した各部の機能を全部あるいは部分的に、コンピュータにより実行可能なプログラム21によって実現してもよい。その場合、そのプログラム21およびそのプログラムが用いるデータなどは、コンピュータが読み取り可能な記憶媒体に記憶させておけばよい。記憶媒体とは、コンピュータのハードウェア資源に備えられている読取部43に対して、プログラムの記述内容に応じて、磁気、光、電気等のエネルギーの変化状態を引き起こして、それに対応する信号の形式で、読取部43にプログラムの記述内容を伝達するものである。例えば、光磁気ディスク31,光ディスク32(CDやDVDなどを含む)、磁気ディスク33,メモリ34(ICカード、メモリカード、フラッシュメモリなどを含む)等である。もちろんこれらの記憶媒体は、可搬型に限られるものではない。   You may implement | achieve the function of each part demonstrated by each embodiment of the above-mentioned all or part by the program 21 which can be performed by computer. In that case, the program 21 and the 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 43 provided in the hardware resource of the computer. In this format, the description content of the program is transmitted to the reading unit 43. For example, there are a magneto-optical disk 31, an optical disk 32 (including a CD and a DVD), a magnetic disk 33, a memory 34 (including an IC card, a memory card, a flash memory, and the like). Of course, these storage media are not limited to portable types.

これらの記憶媒体にプログラム21を格納しておき、例えばコンピュータ22の読取部43あるいはインタフェース45にこれらの記憶媒体を装着することによって、コンピュータからプログラム21を読み出し、内部メモリ42またはハードディスク44(磁気ディスクやシリコンディスクなどを含む)に記憶し、CPU41によってプログラム21を実行することによって、上述の本発明の実施の一形態で説明した機能が全部あるいは部分的に実現される。あるいは、通信路を介してプログラム21をコンピュータ22に転送し、コンピュータ22では通信部46でプログラム21を受信して内部メモリ42またはハードディスク44に記憶し、CPU41によってプログラム21を実行することによって実現してもよい。   The program 21 is stored in these storage media, and the program 21 is read from the computer by, for example, mounting these storage media on the reading unit 43 or the interface 45 of the computer 22, and the internal memory 42 or the hard disk 44 (magnetic disk) And the program 21 is executed by the CPU 41, the functions described in the above-described embodiment of the present invention are realized in whole or in part. Alternatively, the program 21 is transferred to the computer 22 via the communication path, and the computer 22 receives the program 21 by the communication unit 46 and stores it in the internal memory 42 or the hard disk 44, and the CPU 21 executes the program 21. May be.

コンピュータ22には、このほかインタフェース45を介して様々な装置と接続してもよい。例えば情報を表示する表示手段や利用者からの情報を受け付ける受付手段等も接続されていてもよい。また、例えば画像読取装置がインタフェース45を介して接続され、画像読取装置で読み取った画像あるいは該画像に処理を施した画像を処理対象の画像として本発明の各実施の形態で説明した処理を行ってもよい。処理後の二値画像は、ハードディスク44に記憶させ、またはインタフェース45を介して記憶媒体に記憶させ、あるいは通信部46を通じて外部へ転送してもよい。さらに、出力装置としての画像形成装置がインタフェース45を介して接続されていてもよく、処理後の二値画像を形成してもよい。   In addition, the computer 22 may be connected to various devices via an interface 45. For example, display means for displaying information, reception means for receiving information from the user, and the like may be connected. Further, for example, an image reading device is connected via the interface 45, and the processing described in each embodiment of the present invention is performed by using an image read by the image reading device or an image obtained by processing the image as a processing target image. May be. The processed binary image may be stored in the hard disk 44, stored in a storage medium via the interface 45, or transferred to the outside through the communication unit 46. Further, an image forming apparatus as an output device may be connected via the interface 45, and a processed binary image may be formed.

もちろん、部分的にハードウェアによって構成することもできるし、全部をハードウェアで構成してもよい。あるいは、他の構成とともに本発明の各実施の形態で説明した機能の全部あるいは部分的に含めたプログラムとして構成してもよい。もちろん、他の用途に適用する場合には、その用途におけるプログラムと一体化してもよい。   Of course, it may be partially configured by hardware, or all may be configured by hardware. Or you may comprise as a program which included all or one part of the function demonstrated by each embodiment of this invention with other structures. Of course, when applied to other purposes, it may be integrated with the program for that purpose.

11…限定色画像生成部、12…二値画像生成部、13…色境界抽出部、14…決定部、15…補正部、21…プログラム、22…コンピュータ、31…光磁気ディスク、32…光ディスク、33…磁気ディスク、34…メモリ、41…CPU、42…内部メモリ、43…読取部、44…ハードディスク、45…インタフェース、46…通信部。   DESCRIPTION OF SYMBOLS 11 ... Limited color image generation part, 12 ... Binary image generation part, 13 ... Color boundary extraction part, 14 ... Determination part, 15 ... Correction part, 21 ... Program, 22 ... Computer, 31 ... Magneto-optical disk, 32 ... Optical disk 33 ... Magnetic disk, 34 ... Memory, 41 ... CPU, 42 ... Internal memory, 43 ... Reading unit, 44 ... Hard disk, 45 ... Interface, 46 ... Communication unit.

Claims (5)

処理対象の画像中で使用されている色を複数の主要色に限定した限定色画像を生成する限定色画像生成手段と、前記画像を二値化して二値画像を生成する二値画像生成手段と、前記限定色画像で異なる主要色が隣接するが前記二値画像では前記隣接する主要色ともいずれか一方の値に変換されている色境界を抽出する色境界抽出手段と、前記色境界を構成する主要色及び該主要色の領域に関する特徴から前記色境界のいずれの側を補正するかを決定する決定手段と、前記二値画像における前記色境界の前記決定手段で決定された側の値を補正する補正手段を有することを特徴とする画像処理装置。   Limited color image generation means for generating a limited color image in which colors used in the image to be processed are limited to a plurality of main colors, and binary image generation means for binarizing the image to generate a binary image A color boundary extracting means for extracting a color boundary that is adjacent to a different primary color in the limited color image but is converted to one of the adjacent primary colors in the binary image; and A determining means for determining which side of the color boundary is to be corrected based on the features relating to the primary color and the area of the primary color; and a value on the side determined by the determining means for the color boundary in the binary image An image processing apparatus comprising correction means for correcting the above. 処理対象の画像中で使用されている色を複数の主要色に限定した限定色画像を生成する限定色画像生成手段と、前記限定色画像を前記主要色または該主要色の領域または該主要色と他の主要色との隣接関係に従って二値化して二値画像を生成する二値画像生成手段と、前記限定色画像で異なる主要色が隣接するが前記二値画像では前記隣接する主要色ともいずれか一方の値に変換されている色境界を抽出する色境界抽出手段と、前記色境界を構成する主要色及び該主要色の領域に関する特徴から前記色境界のいずれの側を補正するかを決定する決定手段と、前記二値画像における前記色境界の前記決定手段で決定された側の値を補正する補正手段を有することを特徴とする画像処理装置。   A limited color image generating unit configured to generate a limited color image in which colors used in an image to be processed are limited to a plurality of main colors; and the limited color image is the primary color, the primary color region, or the primary color. A binary image generating means for generating a binary image by binarizing according to the adjacent relationship between the main image and another main color, and different main colors are adjacent to each other in the limited color image. Color boundary extraction means for extracting a color boundary that has been converted into one of the values, and which side of the color boundary is to be corrected based on the main color that constitutes the color boundary and the characteristics relating to the area of the main color An image processing apparatus comprising: a determination unit that determines; and a correction unit that corrects a value determined by the determination unit of the color boundary in the binary image. 前記色境界抽出手段は、前記限定色画像全体から前記主要色の組み合わせのそれぞれについて前記色境界を抽出し、前記決定手段は、前記主要色の組み合わせのそれぞれについて当該主要色の組み合わせのいずれの主要色の側を補正するかを決定することを特徴とする請求項1または請求項2に記載の画像処理装置。   The color boundary extraction unit extracts the color boundary for each of the main color combinations from the entire limited color image, and the determination unit selects any of the main color combinations for each of the main color combinations. The image processing apparatus according to claim 1, wherein whether to correct the color side is determined. 前記決定手段は、前記色境界を構成する前記主要色の領域に従って前記色境界のいずれの側を補正するかを決定することを特徴とする請求項1から請求項3のいずれか1項に記載の画像処理装置。   The said determination means determines which side of the said color boundary is correct | amended according to the area | region of the said main color which comprises the said color boundary. Image processing apparatus. コンピュータに、請求項1から請求項4のいずれか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 4.
JP2010146094A 2010-06-28 2010-06-28 Image processing device and image processing program Pending JP2012008914A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010146094A JP2012008914A (en) 2010-06-28 2010-06-28 Image processing device and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010146094A JP2012008914A (en) 2010-06-28 2010-06-28 Image processing device and image processing program

Publications (1)

Publication Number Publication Date
JP2012008914A true JP2012008914A (en) 2012-01-12

Family

ID=45539354

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010146094A Pending JP2012008914A (en) 2010-06-28 2010-06-28 Image processing device and image processing program

Country Status (1)

Country Link
JP (1) JP2012008914A (en)

Similar Documents

Publication Publication Date Title
US7965892B2 (en) Image processing apparatus, control method thereof, and program
JP6743092B2 (en) Image processing apparatus, image processing control method, and program
JP5847063B2 (en) Image processing device
US8538191B2 (en) Image correction apparatus and method for eliminating lighting component
JP2008310817A (en) Method for detecting line structure from text map and image processor
JP5870745B2 (en) Image processing apparatus, binarization threshold value calculation method, and computer program
US9438767B2 (en) Image processing apparatus, image processing method, and storage medium
JP2010074342A (en) Image processing apparatus, image forming apparatus, and program
JP5151708B2 (en) Image processing apparatus and image processing program
US9424488B2 (en) Applying a segmentation engine to different mappings of a digital image
JP5725276B2 (en) Binarization processing apparatus, image processing apparatus, binarization processing program, image processing program
JP3957734B1 (en) Program, information storage medium, 2D code generation system, 2D code
JP5333787B2 (en) Image processing apparatus and image processing program
JP2005275854A (en) Image processor, image processing method, image processing program and recording medium with this program stored thereon
JP2012008914A (en) Image processing device and image processing program
US11570331B2 (en) Image processing apparatus, image processing method, and storage medium
JP5459481B2 (en) Image processing apparatus and image processing program
JP5245991B2 (en) BRIGHTNESS CORRECTION PROGRAM, BRIGHTNESS CORRECTION METHOD, AND BRIGHTNESS CORRECTION DEVICE
JP6091400B2 (en) Image processing device
JP6486082B2 (en) Image processing apparatus, image processing method, and program
JP2009164897A (en) Binarizing device and binarization processing program
JP4890351B2 (en) Image processing apparatus, image processing program, computer-readable recording medium storing the image processing program, and image processing method
JP3957735B1 (en) Program, information storage medium, 2D code generation system, 2D code
JP2015088910A (en) Image processing device
US9396418B2 (en) Information processing apparatus, information processing method, and storage medium for processing an image and a pattern included in an XOR-and-XOR rendering command set