JP2013239819A - Image processing apparatus and image processing method - Google Patents
Image processing apparatus and image processing method Download PDFInfo
- Publication number
- JP2013239819A JP2013239819A JP2012110486A JP2012110486A JP2013239819A JP 2013239819 A JP2013239819 A JP 2013239819A JP 2012110486 A JP2012110486 A JP 2012110486A JP 2012110486 A JP2012110486 A JP 2012110486A JP 2013239819 A JP2013239819 A JP 2013239819A
- Authority
- JP
- Japan
- Prior art keywords
- contour
- character
- outline
- contour line
- background
- 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
Links
Landscapes
- Editing Of Facsimile Originals (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
Description
本発明は、画像処理装置及び画像処理方法に関する。 The present invention relates to an image processing apparatus and an image processing method.
従来、シャープな文字を再現するため、文字の輪郭のドット密度を増やす、輪郭線を付加する等して、文字の輪郭を強調する画像処理が行われている(例えば、特許文献1参照)。輪郭を強調することにより、スクリーン処理によるジャギーの発生を抑制して、滑らかな輪郭を再現することも可能である。 Conventionally, in order to reproduce a sharp character, image processing for enhancing the outline of the character by increasing the dot density of the outline of the character or adding an outline is performed (for example, see Patent Document 1). By emphasizing the contour, it is possible to suppress the occurrence of jaggy due to the screen processing and reproduce a smooth contour.
輪郭線を付加する場合、輪郭線の階調値を変えて輪郭強調の強度を調整するが、従来は文字とその背景の明るさによって階調値が決定されていた。 When adding a contour line, the gradation value of the contour line is changed to adjust the strength of contour emphasis. Conventionally, the gradation value is determined by the brightness of the character and its background.
しかしながら、文字と背景が同系色の場合、1画素幅の輪郭線を付加しただけでは、書込み時の電位が安定せずに輪郭線が目立たないことがある。このような同系色の場合に合わせて、輪郭線の階調値を大きくする対応が考えられる。この対応は、文字と背景が同色に近ければ問題無いが、同色から離れると輪郭線の強調が強くなることによって、輪郭線の色味が文字からも背景からもずれてにごりやすい。また、輪郭線が目立ちすぎることがあり、色味、階調ともに最適な輪郭線を安定して付加することが望まれている。 However, when the characters and the background are similar colors, the potential at the time of writing may not be stable and the contour line may not be conspicuous only by adding a one-pixel width contour line. In response to such similar colors, it is conceivable to increase the gradation value of the contour line. This correspondence is not a problem if the character and the background are close to the same color, but the emphasis of the contour line becomes stronger when the character and the background are separated from each other, so that the color of the contour line is easily shifted from the character and the background. In addition, the contour line may be too conspicuous, and it is desired to stably add an optimum contour line for both color and gradation.
また、文字と背景が異系色である場合、色味の差により文字と背景の境界が視覚的に判別しやすい分、元の画像を保持しつつ、シャープな輪郭線を付加することが望まれている。 Also, if the character and background are different colors, it is desirable to add a sharp outline while retaining the original image because the boundary between the character and the background is easy to distinguish visually due to the difference in color. It is rare.
本発明の課題は、文字と背景に対して最適な階調、色味の輪郭線を安定的に付加することである。 An object of the present invention is to stably add contour lines having optimum gradation and color to characters and backgrounds.
請求項1に記載の発明によれば、
画像データ及びその属性データを解析し、文字とその輪郭を判定する文字輪郭判定部と、
前記文字とその背景間の明度差及び色差を算出する算出部と、
前記明度差に応じて輪郭線の階調値を決定し、前記色差に応じて輪郭線の太さを決定する輪郭線決定部と、
前記文字の輪郭に、決定された階調値及び太さの輪郭線を付加し、輪郭を強調する輪郭線付加部と、
を備える画像処理装置が提供される。
According to the invention of claim 1,
A character outline determination unit that analyzes image data and attribute data thereof and determines a character and its outline;
A calculation unit for calculating a brightness difference and a color difference between the character and its background;
A contour line determination unit that determines a gradation value of a contour line according to the brightness difference, and determines a thickness of the contour line according to the color difference;
An outline adding unit that adds an outline of the determined gradation value and thickness to the outline of the character and emphasizes the outline;
An image processing apparatus is provided.
請求項2に記載の発明によれば、
前記算出部は、
前記文字と背景の彩度をそれぞれ算出し、
前記文字又は背景の何れかの彩度が閾値以上である場合、文字と背景間の色差を算出し、
前記文字及び背景の何れの彩度も閾値未満である場合、文字と背景間の色差を0に設定する請求項1に記載の画像処理装置が提供される。
According to invention of Claim 2,
The calculation unit includes:
Calculate the saturation of the character and background,
If the saturation of either the character or background is greater than or equal to a threshold, calculate the color difference between the character and the background,
The image processing apparatus according to claim 1, wherein the color difference between the character and the background is set to 0 when the saturation of both the character and the background is less than a threshold value.
請求項3に記載の発明によれば、
前記輪郭線決定部は、
前記色差に応じて、0以上の実数値を持つ輪郭線の太さ係数を決定し、
前記太さ係数が0である場合、輪郭線のライン数を0に決定し、
前記太さ係数が0でない場合、太さ係数の整数部に1を加算して得られた整数を、輪郭線のライン数として決定する請求項1又は2に記載の画像処理装置が提供される。
According to invention of Claim 3,
The contour determination unit
According to the color difference, the thickness coefficient of the contour line having a real value of 0 or more is determined,
When the thickness coefficient is 0, the number of contour lines is determined to be 0,
3. The image processing apparatus according to claim 1, wherein when the thickness coefficient is not 0, an integer obtained by adding 1 to the integer part of the thickness coefficient is determined as the number of contour lines. .
請求項4に記載の発明によれば、
前記輪郭線決定部は、
前記色差に対応する輪郭線の太さ係数が予め設定されたテーブルを用いて、前記輪郭線の太さ係数を決定する請求項3に記載の画像処理装置が提供される。
According to invention of Claim 4,
The contour determination unit
The image processing apparatus according to claim 3, wherein a thickness coefficient of the contour line is determined using a table in which a thickness coefficient of the contour line corresponding to the color difference is set in advance.
請求項5に記載の発明によれば、
前記輪郭線決定部は、
前記明度差に応じて輪郭線の階調強度を決定し、
前記輪郭線のライン数が1以下の場合、前記階調強度に太さ係数を乗算して得られた値を、輪郭線の階調値として決定し、
前記輪郭線のライン数が1より大きい場合、前記階調強度を太さ係数で除算して得られた値を、輪郭線の外郭の階調値として決定し、前記階調強度と外郭の階調値の差を、輪郭線の内郭の階調値として決定し、
前記輪郭線付加部は、
前記輪郭線のライン数が1以下の場合、前記文字の輪郭に前記輪郭線の階調値を付加し、
前記輪郭線のライン数が1より大きい場合、前記文字の輪郭に前記外郭の階調値を付加し、輪郭の内側の文字に前記内郭の階調値を付加する請求項3又は4に記載の画像処理装置が提供される。
According to the invention of claim 5,
The contour determination unit
Determine the tone intensity of the contour line according to the brightness difference,
When the number of lines of the contour line is 1 or less, a value obtained by multiplying the gradation strength by a thickness coefficient is determined as a gradation value of the contour line;
When the number of contour lines is greater than 1, the value obtained by dividing the gradation intensity by the thickness coefficient is determined as the gradation value of the outline of the outline, and the gradation intensity and the contour level are determined. The difference between the tone values is determined as the tone value of the contour outline,
The outline adding part is
When the number of lines of the contour line is 1 or less, the gradation value of the contour line is added to the contour of the character,
5. The gradation value of the outline is added to the outline of the character when the number of lines of the outline is greater than 1, and the gradation value of the outline is added to the character inside the outline. An image processing apparatus is provided.
請求項6に記載の発明によれば、
前記輪郭線決定部は、
前記明度差に対応する輪郭線の階調強度が予め設定されたテーブルを用いて、前記輪郭線の階調強度を決定する請求項5に記載の画像処理装置が提供される。
According to the invention of claim 6,
The contour determination unit
The image processing apparatus according to claim 5, wherein the gradation strength of the contour line is determined using a table in which the gradation strength of the contour line corresponding to the brightness difference is set in advance.
請求項7に記載の発明によれば、
画像データ及びその属性データを解析し、文字とその輪郭を判定する文字輪郭判定工程と、
前記文字とその背景間の明度差及び色差を算出する算出工程と、
前記明度差に応じて輪郭線の階調値を決定し、前記色差に応じて輪郭線の太さを決定する輪郭線決定工程と、
前記文字の輪郭に、決定された階調値及び太さの輪郭線を付加し、輪郭を強調する輪郭線付加工程と、
を含む画像処理方法が提供される。
According to the invention of claim 7,
A character contour determination step of analyzing image data and attribute data thereof and determining a character and its contour;
A calculation step of calculating a brightness difference and a color difference between the character and its background;
An outline determination step for determining a gradation value of an outline according to the brightness difference, and determining a thickness of the outline according to the color difference;
Adding a contour line of the determined gradation value and thickness to the contour of the character, and emphasizing the contour;
An image processing method is provided.
本発明によれば、文字と背景の明度差によって輪郭線の階調値を調整するだけでなく、文字と背景の色差によって輪郭線の太さを調整することができる。文字と背景の明るさ、色味に合わせて、階調値により輪郭線の明るさと色味を調整し、太さによって輪郭線の書込みを安定させることができ、文字と背景に対して最適な階調、色味の輪郭線を安定的に付加することができる。 According to the present invention, not only the gradation value of the contour line is adjusted by the brightness difference between the character and the background, but also the thickness of the contour line can be adjusted by the color difference between the character and the background. The brightness and color tone of the contour line can be adjusted according to the gradation value according to the brightness and color of the text and background, and the writing of the contour line can be stabilized by the thickness, which is optimal for text and background. A contour line of gradation and color can be stably added.
以下、図面を参照して本発明の画像処理装置及び画像処理方法の実施の形態について説明する。 Embodiments of an image processing apparatus and an image processing method of the present invention will be described below with reference to the drawings.
図1は、本実施の形態に係る画像処理装置Gを示す。
図1に示すように、画像処理装置Gは、文字輪郭判定部1、算出部2、輪郭線決定部3、輪郭線付加部4、スクリーン処理部5を備えている。
画像処理装置Gは、画像データを輪郭強調処理して、文字の輪郭に輪郭線を付加し、輪郭を強調することができる。画像処理装置Gを、コピー機やプリンター等の画像形成装置に搭載することもできるし、画像データを編集するコンピューター装置等に搭載することもできる。
FIG. 1 shows an image processing apparatus G according to the present embodiment.
As shown in FIG. 1, the image processing apparatus G includes a character contour determination unit 1, a calculation unit 2, a contour line determination unit 3, a contour line addition unit 4, and a screen processing unit 5.
The image processing apparatus G can perform contour enhancement processing on image data, add a contour line to the contour of a character, and enhance the contour. The image processing apparatus G can be mounted on an image forming apparatus such as a copying machine or a printer, or can be mounted on a computer apparatus that edits image data.
文字輪郭判定部1は、入力された画像データ及びその属性データを解析し、文字とその輪郭を判定する。属性データは、画像データの各画素が、文字(Text)、図形(Graphics)、写真(Image)の何れの属性に属するかを示す。
文字輪郭判定部1は、属性データにより画像データの各画素が、文字か否かを判定する。文字輪郭判定部1は、文字と判定された画素が、文字以外の属性を持つ画素と隣接している場合、文字の輪郭であると判定する。なお、属性データに、輪郭を示すデータが含まれている場合があり、この場合は属性データによって輪郭か否かを判定することができる。
The character outline determination unit 1 analyzes the input image data and its attribute data, and determines the character and its outline. The attribute data indicates whether each pixel of the image data belongs to an attribute of a character (Text), a graphic (Graphics), or a photograph (Image).
The character outline determination unit 1 determines whether each pixel of the image data is a character based on the attribute data. When the pixel determined to be a character is adjacent to a pixel having an attribute other than the character, the character contour determination unit 1 determines that the pixel is a character contour. In some cases, the attribute data includes data indicating a contour. In this case, whether or not the contour is a contour can be determined based on the attribute data.
算出部2は、文字輪郭判定部1により輪郭と判定された文字とその背景の彩度、文字と背景間の明度差、色差を算出する。
文字、背景の画素は、R、G、B又はC、M、Y、Kの色毎に画素値を持つので、算出部2はR、G、B又はC、M、Y、Kの画素値を、明度L*、色度a*、b*に変換する。算出部2は、文字、背景の明度L*、色度a*、b*を用いて、文字、背景の彩度C*、文字と背景の明度差ΔL*、色差として色相差ΔH*を算出することができる。彩度C*、色相差ΔH*は下記式により表される。
C*=√{(a*)2+(b*)2}
ΔH*=√{(Δa*)2+(Δb*)2−(ΔC*)2}
ここで、ΔL*は文字と背景の明度L*の差、Δa*は文字と背景の色度a*の差、Δb*は文字と背景の色度b*の差を表す。
The calculation unit 2 calculates the saturation of the character determined as the contour by the character contour determination unit 1 and its background, the brightness difference between the character and the background, and the color difference.
Since the character and background pixels have pixel values for each of R, G, B or C, M, Y, and K colors, the calculation unit 2 uses R, G, B, or C, M, Y, and K pixel values. Is converted to lightness L * , chromaticity a * , b * . The calculation unit 2 uses the character and background lightness L * and chromaticity a * and b * to calculate the character and background chroma C * , the character and background lightness difference ΔL * , and the hue difference ΔH * as the color difference. can do. Saturation C * and hue difference ΔH * are expressed by the following equations.
C * = √ {(a * ) 2 + (b * ) 2 }
ΔH * = √ {(Δa * ) 2 + (Δb * ) 2 − (ΔC * ) 2 }
Here, ΔL * represents the difference between the lightness L * of the character and the background, Δa * represents the difference between the character and the background chromaticity a * , and Δb * represents the difference between the character and the background chromaticity b * .
輪郭線決定部3は、算出部2により算出された明度差に応じて輪郭線の階調値を決定し、色差に応じて輪郭線の太さを決定する。 The contour determination unit 3 determines the gradation value of the contour according to the brightness difference calculated by the calculation unit 2, and determines the thickness of the contour according to the color difference.
輪郭線付加部4は、文字の輪郭に、輪郭線決定部3により決定された階調値及び太さの輪郭線を付加し、輪郭を強調する。
スクリーン処理部5により画像データがスクリーン処理された場合、輪郭線付加部4は、スクリーン処理後の文字の輪郭に、輪郭線を付加する。
The contour adding unit 4 adds the contour line having the gradation value and the thickness determined by the contour determining unit 3 to the contour of the character to enhance the contour.
When the image data is screen-processed by the screen processing unit 5, the contour line adding unit 4 adds a contour line to the contour of the character after the screen processing.
スクリーン処理部5は、画像データをスクリーン処理し、輪郭線付加部4に出力する。 The screen processing unit 5 screens the image data and outputs it to the contour line adding unit 4.
図2及び図3は、上記画像処理装置Gが実行する輪郭線強調処理のフローチャートである。
図2に示すように、文字輪郭判定部1が、入力された画像データ及び属性データを解析して、文字とその輪郭の画素を判定する(ステップS1)。
2 and 3 are flowcharts of the contour enhancement processing executed by the image processing apparatus G. FIG.
As shown in FIG. 2, the character outline determination unit 1 analyzes the input image data and attribute data, and determines a character and pixels of the outline (step S1).
算出部2は、n×m(n、mは3以上の奇数)画素の画像データ及び属性データを入力する(ステップS2)。n×m画素の中心に位置する注目画素が、文字輪郭判定部1により文字の輪郭と判定されていない場合(ステップS3;N)、ステップS2に戻る。算出部2は、1画素位置をシフトして、n×m画素の画像データ及び属性データの入力を繰り返す。 The calculation unit 2 inputs image data and attribute data of n × m (n and m are odd numbers of 3 or more) pixels (step S2). When the pixel of interest located at the center of the n × m pixels is not determined as the character outline by the character outline determination unit 1 (step S3; N), the process returns to step S2. The calculation unit 2 shifts the position of one pixel and repeats input of image data and attribute data of n × m pixels.
n×m画素の中心に位置する注目画素が、文字輪郭判定部1により文字の輪郭であると判定されている場合(ステップS3:Y)、算出部2は注目画素の隣接画素が文字かその背景かを判別する。例えば、算出部2は隣接画素の属性データを参照し、文字の属性であれば文字、それ以外の属性であれば背景と判別することもできるし、注目画素との画素値の差が閾値未満であれば隣接画素を文字、閾値以上であれば隣接画素を背景と判別することもできる。また、算出部2は、文字と背景の画素値から明度差と彩度を算出する(ステップS4)。文字又は背景の画素が複数ある場合、文字、背景毎に画素値を平均してから明度差、彩度を算出する。 When the target pixel located at the center of the n × m pixels is determined to be the character outline by the character outline determination unit 1 (step S3: Y), the calculation unit 2 determines whether the adjacent pixel of the target pixel is a character. Determine whether the background. For example, the calculation unit 2 can refer to the attribute data of adjacent pixels, and can determine that the character is a character if it is a character attribute, and the background if it is any other attribute, and the difference in pixel value from the target pixel is less than a threshold value If it is, the adjacent pixel can be determined as a character, and if it is equal to or greater than the threshold, the adjacent pixel can be determined as a background. Further, the calculation unit 2 calculates the brightness difference and the saturation from the pixel values of the character and the background (Step S4). When there are a plurality of characters or background pixels, the pixel value is averaged for each character and background, and then the brightness difference and saturation are calculated.
算出部2は、文字及び背景の彩度を閾値と比較し、文字及び背景の何れの彩度も閾値未満であれば(ステップS5;Y)、算出部2は文字と背景を同色として扱い、文字と背景の色差を0に設定する(ステップS7)。文字又は背景の何れかの彩度が閾値以上であれば(ステップS5;N)、算出部2は、文字と背景の画素値から色差を算出する(ステップS6)。 The calculation unit 2 compares the saturation of the character and the background with the threshold value, and if the saturation of both the character and the background is less than the threshold value (step S5; Y), the calculation unit 2 treats the character and the background as the same color, The color difference between the character and the background is set to 0 (step S7). If the saturation of either the character or the background is greater than or equal to the threshold (step S5; N), the calculation unit 2 calculates a color difference from the pixel values of the character and the background (step S6).
輪郭線決定部3は、算出部2により算出された文字と背景の色差に応じて、輪郭線の太さ係数を決定する(ステップS8)。輪郭線決定部3は、太さ係数の決定時、色差に対応する輪郭線の太さ係数が予め設定された太さ係数テーブルを用いる。 The contour line determination unit 3 determines the thickness coefficient of the contour line according to the color difference between the character and the background calculated by the calculation unit 2 (step S8). The contour line determination unit 3 uses a thickness coefficient table in which the thickness coefficient of the contour line corresponding to the color difference is set in advance when the thickness coefficient is determined.
太さ係数テーブルは適宜設計することができるが、例えば図4に示すような太さ係数テーブルを用いることができる。図4に示すように、太さ係数は0以上の実数値であり、色差が大きいほど小さく設定されている。
文字と背景が同色に近く色差が小さい場合、露光装置によって輪郭線を書込む際の電位が安定せず、意図した強度で輪郭強調されないことがあるため、輪郭線を太くし、輪郭線の付加を安定させるように、図4に示す太さ係数テーブルが設計されている。彩度が小さく、文字と背景が同色と扱われた場合、色差が0に設定されるため、図4に示す太さ係数テーブルによれば、最大値の太さ係数が得られる。また、文字と背景が異系色に近く、色差が大きい場合、視覚的に文字と背景の判別が容易となることから、輪郭線を細くし、シャープな輪郭を再現するように、図4に示す太さ係数テーブルが設計されている。
The thickness coefficient table can be designed as appropriate. For example, a thickness coefficient table as shown in FIG. 4 can be used. As shown in FIG. 4, the thickness coefficient is a real value of 0 or more, and is set smaller as the color difference is larger.
If the characters and background are close to the same color and the color difference is small, the potential when writing the contour line by the exposure device may not be stable, and the contour may not be emphasized at the intended intensity. The thickness coefficient table shown in FIG. 4 is designed so as to stabilize. When the saturation is small and the character and the background are treated as the same color, the color difference is set to 0. Therefore, according to the thickness coefficient table shown in FIG. 4, the maximum thickness coefficient is obtained. In addition, when the character and the background are close to different colors and the color difference is large, it is easy to visually distinguish the character and the background. Therefore, in order to make the outline thin and reproduce the sharp outline, FIG. The thickness coefficient table shown is designed.
次に、輪郭線決定部3は、算出部2により算出された文字と背景の明度差に応じて、輪郭線全体の階調強度を決定する(ステップS9)。輪郭線決定部3は、階調強度の決定時、明度差に対応する輪郭線の階調強度が予め設定された階調強度テーブルを用いる。 Next, the contour line determination unit 3 determines the tone intensity of the entire contour line according to the brightness difference between the character and the background calculated by the calculation unit 2 (step S9). The contour line determination unit 3 uses a gradation strength table in which the gradation strength of the contour line corresponding to the brightness difference is set in advance when the gradation strength is determined.
階調強度テーブルは適宜設計することができるが、例えば図5に示すような階調強度テーブルを用いることができる。
図5に示す階調強度テーブルは、明度差が極小さい(0%付近)場合、輪郭線の付加により輪郭を必要以上に目立たせてしまうことから、階調強度が小さく設定されている。明度差が小さい(20%周辺)場合、文字と背景の輪郭が明確でないため、ある程度まで階調強度が引き上げられている。明度差が中間程度(50%周辺)である場合、輪郭線が付加されずとも視覚的に文字と背景の判別が十分可能であるため、元画像の保持を優先するよう、階調強度が小さく設定されている。明度差が大きい(60%以上)場合、文字の輪郭を明確にするため、階調強度が明度差に比例して増加するよう設定されている。
The gradation intensity table can be designed as appropriate. For example, a gradation intensity table as shown in FIG. 5 can be used.
In the gradation intensity table shown in FIG. 5, the gradation intensity is set to be small because the outline becomes more conspicuous by the addition of the outline when the brightness difference is extremely small (near 0%). When the brightness difference is small (around 20%), the contour of the character and the background is not clear, so the gradation intensity is raised to some extent. When the brightness difference is about the middle (around 50%), it is possible to visually distinguish between the character and the background without adding a contour line. Therefore, the tone intensity is small so that the preserving of the original image is prioritized. Is set. When the brightness difference is large (60% or more), the gradation intensity is set to increase in proportion to the brightness difference in order to clarify the outline of the character.
輪郭線決定部3は、決定された輪郭線の太さ係数及び階調強度に応じて、輪郭線のライン数及び階調値を決定する(ステップS10)。図3は、ライン数及び階調値を決定する処理の流れを示している。
図3に示すように、輪郭線決定部3は、太さ係数が0である場合(ステップS101;N)、輪郭線のライン数を0に決定する(ステップS102)。輪郭線決定部3は、太さ係数が0ではない、つまり0より大きい場合(ステップS101;Y)、太さ係数の整数部に1を加算して得られた整数を、輪郭線のライン数として決定する(ステップS103)。例えば、太さ係数が1.7であれば、その整数部は1であるので、ライン数は1+1=2である。結果として、太さ係数が1未満であればライン数が1に、太さ係数が1以上2未満であればライン数が2に、太さ係数が2以上3未満であればライン数が3に決定される。
The contour determination unit 3 determines the number of contour lines and the gradation value according to the determined thickness coefficient and gradation strength of the contour line (step S10). FIG. 3 shows a flow of processing for determining the number of lines and the gradation value.
As shown in FIG. 3, when the thickness coefficient is 0 (step S101; N), the contour determination unit 3 determines the number of contour lines to be 0 (step S102). If the thickness coefficient is not 0, that is, greater than 0 (step S101; Y), the contour line determination unit 3 uses the integer obtained by adding 1 to the integer part of the thickness coefficient as the number of lines of the contour line. (Step S103). For example, if the thickness coefficient is 1.7, the integer part is 1, so the number of lines is 1 + 1 = 2. As a result, if the thickness coefficient is less than 1, the number of lines is 1, if the thickness coefficient is 1 or more and less than 2, the number of lines is 2, and if the thickness coefficient is 2 or more and less than 3, the number of lines is 3. To be determined.
次に、輪郭線決定部3は、輪郭線のライン数が1以下である場合(ステップS104;N)、階調強度に太さ係数を乗算して得られた値を、輪郭線の階調値として決定する(ステップS105)。例えば、階調強度が80%、太さ係数が0.9である場合、輪郭線の階調値は80×0.9=72%である。 Next, when the number of contour lines is 1 or less (step S104; N), the contour determination unit 3 uses the value obtained by multiplying the gradation strength by the thickness coefficient as the contour gradation. The value is determined (step S105). For example, when the gradation intensity is 80% and the thickness coefficient is 0.9, the gradation value of the contour line is 80 × 0.9 = 72%.
輪郭線決定部3は、輪郭線のライン数が1より大きい場合(ステップS104;Y)、輪郭線のライン毎に階調値を決定する。まず、輪郭線決定部3は、階調強度を太さ係数で除算して得られた値を、輪郭線の外郭の階調値として決定する。次に、階調強度から外郭の階調値を引いた差を、輪郭線の内郭の階調値として決定する(ステップS106)。
例えば、ライン数が2であり、階調強度が85%、太さ係数が1.2である場合、外郭の階調値は、85/1.2≒71%(小数点以下を四捨五入)であり、内郭の階調値は、85−71=14%である。
When the number of contour lines is greater than 1 (step S104; Y), the contour line determination unit 3 determines a gradation value for each contour line. First, the outline determination unit 3 determines a value obtained by dividing the gradation intensity by the thickness coefficient as the gradation value of the outline of the outline. Next, a difference obtained by subtracting the outline gradation value from the gradation intensity is determined as the outline value of the outline of the outline (step S106).
For example, when the number of lines is 2, the gradation intensity is 85%, and the thickness coefficient is 1.2, the outline gradation value is 85 / 1.2≈71% (rounded off after the decimal point). The inner gradation value is 85-71 = 14%.
ライン数が3以上の場合、内郭が2以上あるので、輪郭線決定部3は、階調強度から既に決定された外郭、内郭の階調値を引いた差を、太さ係数から外郭、内郭のライン数を引いた差で除算し、内郭の階調値として決定する。
例えば、階調強度が85%、太さ係数が2.2であり、ライン数が3の場合、外郭の階調値は、85/2.2≒39%(小数点以下を四捨五入)であり、外郭のすぐ内側にある内郭の階調値は、(85−39)/1.2≒38%(小数点以下を四捨五入)、外郭から1画素離れた内郭の階調値は、85−39−38=8%である。
When the number of lines is 3 or more, there are 2 or more outlines. Therefore, the outline determining unit 3 calculates the difference obtained by subtracting the already determined outline and tone values from the tone intensity from the thickness coefficient. Then, it is divided by the difference obtained by subtracting the number of lines of the inner outline, and determined as the gradation value of the inner outline.
For example, when the gradation intensity is 85%, the thickness coefficient is 2.2, and the number of lines is 3, the outline gradation value is 85 / 2.2≈39% (rounded off after the decimal point) The tone value of the inner contour just inside the outer contour is (85-39) /1.2≈38% (rounded off the decimal point), and the tone value of the inner contour one pixel away from the outer contour is 85-39. -38 = 8%.
輪郭線付加部4は、輪郭線決定部3により決定されたライン数及び階調値の輪郭線を、文字の輪郭である注目画素に付加する(ステップS11)。ライン数が1の場合、輪郭線付加部4は、注目画素の画素値を輪郭線の階調値に変更する。ライン数が2以上の場合、注目画素は輪郭の外郭であるので、輪郭線付加部4は、注目画素の画素値を外郭の階調値に変更する。さらに、輪郭の内側の文字、例えば背景から注目画素へ向かう方向において注目画素と隣接する文字の画素の画素値を内郭の階調値に変更する。 The contour adding unit 4 adds the number of lines and the contour of the gradation value determined by the contour determining unit 3 to the target pixel which is the character contour (step S11). When the number of lines is 1, the outline adding unit 4 changes the pixel value of the target pixel to the outline gradation value. When the number of lines is 2 or more, the target pixel is the outline of the contour, and therefore the contour adding unit 4 changes the pixel value of the target pixel to the contour gradation value. Further, the pixel value of the character inside the outline, for example, the pixel of the character adjacent to the target pixel in the direction from the background to the target pixel is changed to the inner gradation value.
スクリーン処理部5により画像データがスクリーン処理された場合、輪郭線付加部4は、スクリーン処理後の画素値を、輪郭線の階調値に変更することが好ましい。スクリーン処理された場合、文字の輪郭に必ずドットが打点される保証が無く、輪郭強調の効果が得られない場合があるが、スクリーン処理後に輪郭線の階調値に変更することによりこれを防ぐ。 When the image data is screen-processed by the screen processing unit 5, the contour line adding unit 4 preferably changes the pixel value after the screen processing to the gradation value of the contour line. When screen processing is performed, there is no guarantee that dots will be printed on the outline of characters, and the effect of contour enhancement may not be obtained, but this is prevented by changing to the contour gradation value after screen processing. .
図6aは、Tの文字Txと同系色の背景Bc1からなる元画像を示している。図6bは、元画像に付加された輪郭線のイメージ図であり、図6aのA−A線上の各画素の画素値を高さで表している。図6bに示すように、同系色の文字Txと背景Bc1は色差が小さいため、輪郭線を安定して付加できるように輪郭線のライン数が2に決定されている。輪郭線の階調値は、外郭R1と内郭R2のライン毎に分配されている。 FIG. 6a shows an original image composed of a background Bc1 of the same color as the letter Tx of T. FIG. 6B is an image diagram of the contour line added to the original image, and the pixel value of each pixel on the AA line in FIG. 6A is represented by a height. As shown in FIG. 6B, since the color difference between the similar color character Tx and the background Bc1 is small, the number of contour lines is determined to be 2 so that the contour lines can be stably added. The gradation value of the contour line is distributed for each of the outline R1 and the outline R2.
図7aは、Tの文字Txと異系色の背景Bc2からなる元画像を示している。図7bは、元画像に付加された輪郭線のイメージ図であり、図7aのB−B線上の各画素の画素値を高さで表している。図7bに示すように、異系色の文字Txと背景Bc2は色差が大きいため、シャープな輪郭が再現されるように輪郭線のライン数が1に決定されている。また、明度差が中間程度であり、文字と背景の判別が容易であることから、元画像の保持を優先して輪郭Rの階調値が小さく決定されている。 FIG. 7a shows an original image composed of a letter Tx of T and a background Bc2 of a different color. FIG. 7B is an image diagram of the contour line added to the original image, and represents the pixel value of each pixel on the BB line in FIG. 7A by height. As shown in FIG. 7b, since the color difference between the character Tx and the background Bc2 of different colors is large, the number of contour lines is determined to be 1 so that a sharp contour is reproduced. In addition, since the brightness difference is intermediate and it is easy to discriminate between a character and a background, the gradation value of the contour R is determined to be small in favor of retaining the original image.
以上のように、本実施の形態によれば、画像処理装置Gは、画像データ及びその属性データを解析し、文字とその輪郭を判定する文字輪郭判定部1と、文字とその背景間の明度差及び色差を算出する算出部2と、明度差に応じて輪郭線の階調値を決定し、色差に応じて輪郭線の太さを決定する輪郭線決定部3と、文字の輪郭に、決定された階調値及び太さの輪郭線を付加し、輪郭を強調する輪郭線付加部4と、を備えている。 As described above, according to the present embodiment, the image processing apparatus G analyzes the image data and its attribute data, determines the character and its outline, and the brightness between the character and its background. A contour calculation unit 2 that calculates a difference and a color difference; a contour gradation determination unit 3 that determines a gradation value of a contour line according to a brightness difference; a contour line determination unit 3 that determines a thickness of the contour line according to a color difference; An outline adding unit 4 for adding an outline of the determined gradation value and thickness and emphasizing the outline;
これにより、文字と背景の明度差によって輪郭線の階調値を調整するだけでなく、文字と背景の色差によって輪郭線の太さを調整することができる。文字と背景の明るさ、色味に合わせて、階調値により輪郭線の明るさと色味を調整し、太さによって輪郭線の書込みを安定させることができ、文字と背景に対して最適な階調、色味の輪郭線を安定的に付加することができる。 Thereby, not only the gradation value of the contour line is adjusted by the brightness difference between the character and the background, but also the thickness of the contour line can be adjusted by the color difference between the character and the background. The brightness and color tone of the contour line can be adjusted according to the gradation value according to the brightness and color of the text and background, and the writing of the contour line can be stabilized by the thickness, which is optimal for text and background. A contour line of gradation and color can be stably added.
上記実施の形態は本発明の好適な一例であり、これに限定されない。本発明の主旨を逸脱しない範囲で適宜変更可能である。
例えば、上述した輪郭線強調処理の内容をプログラム化し、このプログラムをコンピューターにより読み取り、実行することにより、実現することもできる。プログラムのコンピューター読み取り可能な媒体としては、ROM、フラッシュメモリー等の不揮発性メモリー、CD-ROM等の可搬型記録媒体を適用することが可能である。また、プログラムのデータを、通信回線を介して提供する媒体として、キャリアウエーブ(搬送波)も適用可能である。
The above embodiment is a preferred example of the present invention, and the present invention is not limited to this. Modifications can be made as appropriate without departing from the spirit of the present invention.
For example, it can be realized by programming the contents of the above-described contour emphasis processing, reading the program by a computer, and executing the program. As a computer-readable medium for the program, a non-volatile memory such as a ROM and a flash memory, and a portable recording medium such as a CD-ROM can be applied. Further, a carrier wave (carrier wave) can be applied as a medium for providing program data via a communication line.
G 画像処理装置
1 文字輪郭判定部
2 算出部
3 輪郭線決定部
4 輪郭線付加部
5 スクリーン処理部
G Image processing device 1 Character contour determination unit 2 Calculation unit 3 Contour line determination unit 4 Contour line addition unit 5 Screen processing unit
Claims (7)
前記文字とその背景間の明度差及び色差を算出する算出部と、
前記明度差に応じて輪郭線の階調値を決定し、前記色差に応じて輪郭線の太さを決定する輪郭線決定部と、
前記文字の輪郭に、決定された階調値及び太さの輪郭線を付加し、輪郭を強調する輪郭線付加部と、
を備える画像処理装置。 A character outline determination unit that analyzes image data and attribute data thereof and determines a character and its outline;
A calculation unit for calculating a brightness difference and a color difference between the character and its background;
A contour line determination unit that determines a gradation value of a contour line according to the brightness difference, and determines a thickness of the contour line according to the color difference;
An outline adding unit that adds an outline of the determined gradation value and thickness to the outline of the character and emphasizes the outline;
An image processing apparatus comprising:
前記文字と背景の彩度をそれぞれ算出し、
前記文字又は背景の何れかの彩度が閾値以上である場合、文字と背景間の色差を算出し、
前記文字及び背景の何れの彩度も閾値未満である場合、文字と背景間の色差を0に設定する請求項1に記載の画像処理装置。 The calculation unit includes:
Calculate the saturation of the character and background,
If the saturation of either the character or background is greater than or equal to a threshold, calculate the color difference between the character and the background,
The image processing apparatus according to claim 1, wherein the color difference between the character and the background is set to 0 when the saturation of both the character and the background is less than a threshold value.
前記色差に応じて、0以上の実数値を持つ輪郭線の太さ係数を決定し、
前記太さ係数が0である場合、輪郭線のライン数を0に決定し、
前記太さ係数が0でない場合、太さ係数の整数部に1を加算して得られた整数を、輪郭線のライン数として決定する請求項1又は2に記載の画像処理装置。 The contour determination unit
According to the color difference, the thickness coefficient of the contour line having a real value of 0 or more is determined,
When the thickness coefficient is 0, the number of contour lines is determined to be 0,
3. The image processing apparatus according to claim 1, wherein when the thickness coefficient is not 0, an integer obtained by adding 1 to the integer part of the thickness coefficient is determined as the number of contour lines.
前記色差に対応する輪郭線の太さ係数が予め設定されたテーブルを用いて、前記輪郭線の太さ係数を決定する請求項3に記載の画像処理装置。 The contour determination unit
The image processing apparatus according to claim 3, wherein a thickness coefficient of the contour line is determined using a table in which a thickness coefficient of the contour line corresponding to the color difference is set in advance.
前記明度差に応じて輪郭線の階調強度を決定し、
前記輪郭線のライン数が1以下の場合、前記階調強度に太さ係数を乗算して得られた値を、輪郭線の階調値として決定し、
前記輪郭線のライン数が1より大きい場合、前記階調強度を太さ係数で除算して得られた値を、輪郭線の外郭の階調値として決定し、前記階調強度と外郭の階調値の差を、輪郭線の内郭の階調値として決定し、
前記輪郭線付加部は、
前記輪郭線のライン数が1以下の場合、前記文字の輪郭に前記輪郭線の階調値を付加し、
前記輪郭線のライン数が1より大きい場合、前記文字の輪郭に前記外郭の階調値を付加し、輪郭の内側の文字に前記内郭の階調値を付加する請求項3又は4に記載の画像処理装置。 The contour determination unit
Determine the tone intensity of the contour line according to the brightness difference,
When the number of lines of the contour line is 1 or less, a value obtained by multiplying the gradation strength by a thickness coefficient is determined as a gradation value of the contour line;
When the number of contour lines is greater than 1, the value obtained by dividing the gradation intensity by the thickness coefficient is determined as the gradation value of the outline of the outline, and the gradation intensity and the contour level are determined. The difference between the tone values is determined as the tone value of the contour outline,
The outline adding part is
When the number of lines of the contour line is 1 or less, the gradation value of the contour line is added to the contour of the character,
5. The gradation value of the outline is added to the outline of the character when the number of lines of the outline is greater than 1, and the gradation value of the outline is added to the character inside the outline. Image processing apparatus.
前記明度差に対応する輪郭線の階調強度が予め設定されたテーブルを用いて、前記輪郭線の階調強度を決定する請求項5に記載の画像処理装置。 The contour determination unit
The image processing apparatus according to claim 5, wherein the gradation strength of the contour line is determined using a table in which the gradation strength of the contour line corresponding to the brightness difference is set in advance.
前記文字とその背景間の明度差及び色差を算出する算出工程と、
前記明度差に応じて輪郭線の階調値を決定し、前記色差に応じて輪郭線の太さを決定する輪郭線決定工程と、
前記文字の輪郭に、決定された階調値及び太さの輪郭線を付加し、輪郭を強調する輪郭線付加工程と、
を含む画像処理方法。 A character contour determination step of analyzing image data and attribute data thereof and determining a character and its contour;
A calculation step of calculating a brightness difference and a color difference between the character and its background;
An outline determination step for determining a gradation value of an outline according to the brightness difference, and determining a thickness of the outline according to the color difference;
Adding a contour line of the determined gradation value and thickness to the contour of the character, and emphasizing the contour;
An image processing method including:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012110486A JP5924112B2 (en) | 2012-05-14 | 2012-05-14 | Image processing apparatus and image processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012110486A JP5924112B2 (en) | 2012-05-14 | 2012-05-14 | Image processing apparatus and image processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013239819A true JP2013239819A (en) | 2013-11-28 |
JP5924112B2 JP5924112B2 (en) | 2016-05-25 |
Family
ID=49764512
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012110486A Expired - Fee Related JP5924112B2 (en) | 2012-05-14 | 2012-05-14 | Image processing apparatus and image processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5924112B2 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016084020A (en) * | 2014-10-27 | 2016-05-19 | 三菱電機株式会社 | Onboard display control unit and onboard display system |
JP2017047602A (en) * | 2015-09-02 | 2017-03-09 | シャープ株式会社 | Image processing device, image processing method, and program |
JP2019041280A (en) * | 2017-08-25 | 2019-03-14 | 富士ゼロックス株式会社 | Image processing apparatus, image forming apparatus, and program |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005260404A (en) * | 2004-03-10 | 2005-09-22 | Fuji Xerox Co Ltd | Image processor |
JP2007013566A (en) * | 2005-06-30 | 2007-01-18 | Kyocera Mita Corp | Image processor and image forming apparatus |
JP2011061328A (en) * | 2009-09-07 | 2011-03-24 | Ricoh Co Ltd | Image processing method, image processor, image forming device, program, storage medium, and image forming system |
-
2012
- 2012-05-14 JP JP2012110486A patent/JP5924112B2/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005260404A (en) * | 2004-03-10 | 2005-09-22 | Fuji Xerox Co Ltd | Image processor |
JP2007013566A (en) * | 2005-06-30 | 2007-01-18 | Kyocera Mita Corp | Image processor and image forming apparatus |
JP2011061328A (en) * | 2009-09-07 | 2011-03-24 | Ricoh Co Ltd | Image processing method, image processor, image forming device, program, storage medium, and image forming system |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016084020A (en) * | 2014-10-27 | 2016-05-19 | 三菱電機株式会社 | Onboard display control unit and onboard display system |
JP2017047602A (en) * | 2015-09-02 | 2017-03-09 | シャープ株式会社 | Image processing device, image processing method, and program |
JP2019041280A (en) * | 2017-08-25 | 2019-03-14 | 富士ゼロックス株式会社 | Image processing apparatus, image forming apparatus, and program |
Also Published As
Publication number | Publication date |
---|---|
JP5924112B2 (en) | 2016-05-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105574918B (en) | A kind of material adding method, device and the terminal of 3D models | |
JP5609903B2 (en) | Image processing apparatus and image processing method | |
JP6417851B2 (en) | Image processing apparatus and computer program | |
JP2005269639A (en) | Method and system for converting color image to gray scale image, gray scale image, method for improving conversion from color to gray scale, and edge emphasizing method | |
JP2007082145A (en) | Image processing apparatus, image processing method, and program | |
JP2008252699A (en) | Image processor and image processing method | |
US9449375B2 (en) | Image processing apparatus, image processing method, program, and recording medium | |
JP6127877B2 (en) | Image processing apparatus and computer program | |
JP4575963B2 (en) | Image processing device | |
US8285036B2 (en) | Image processing method, image processing apparatus, and computer-readable storage medium for computer program | |
JP5924112B2 (en) | Image processing apparatus and image processing method | |
JP2008011286A (en) | Image processing program and image processor | |
US7978910B2 (en) | Method and apparatus for adaptively filtering input image in color domains | |
JP2014078808A (en) | Image processing apparatus and image processing method | |
US10638019B2 (en) | Gray component replacement in a digital image to generate a color transformed image | |
JP2009301090A (en) | Image processor and image processing program | |
JP6736299B2 (en) | Printing device, printing method, and program | |
JP3921737B2 (en) | Image processing apparatus, image processing method, and medium on which image processing control program is recorded | |
JP6869709B2 (en) | Image processing equipment, image processing methods and programs | |
JP4138345B2 (en) | Image processing apparatus and image output apparatus | |
JP4067538B2 (en) | Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium | |
JP2005235238A (en) | Method and apparatus of image processing and storage medium | |
JP2013202927A (en) | Image forming method and image forming apparatus | |
US10798267B2 (en) | Image processing to set output pixel values subject to edge or thin line correction | |
JP2010026690A (en) | Image processing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20141219 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20151218 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160105 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160302 |
|
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: 20160322 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160404 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5924112 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |