JP2006050548A - Image processing device and method - Google Patents

Image processing device and method Download PDF

Info

Publication number
JP2006050548A
JP2006050548A JP2005122523A JP2005122523A JP2006050548A JP 2006050548 A JP2006050548 A JP 2006050548A JP 2005122523 A JP2005122523 A JP 2005122523A JP 2005122523 A JP2005122523 A JP 2005122523A JP 2006050548 A JP2006050548 A JP 2006050548A
Authority
JP
Japan
Prior art keywords
image
color
background
main
component value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2005122523A
Other languages
Japanese (ja)
Other versions
JP4695914B2 (en
Inventor
Yasuji Nakajima
保司 中島
Hideki Irisawa
英毅 入澤
Toru Ozaki
透 尾崎
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2005122523A priority Critical patent/JP4695914B2/en
Publication of JP2006050548A publication Critical patent/JP2006050548A/en
Application granted granted Critical
Publication of JP4695914B2 publication Critical patent/JP4695914B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To make a software process to be performed at a higher speed by simplifying an operation process for acquiring a color to be daubed when producing a base image for making a color image to be multilayered, and to make a hardware process to be performed at a low cost. <P>SOLUTION: A main image such as characters etc. to be drawn in relatively low brightness within an original image is to be extracted from the original image, and the base image is to be produced by daubing a portion within the original image corresponding to an image line portion of the main image by a desired color to be daubed on the basis of image data of its neighboring pixels. At this time, the color to be daubed is to be determined in accordance with a brightness component value determined on the basis of the brightness component value of the neighboring pixel and a color difference component value which is previously determined. Especially, the color difference component value when determining the color to be daubed is previously set to an intermediate value, and the color to be daubed is made to be colorless. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、カラー画像を複数のレイヤに分けてファイル化する、いわゆるマルチレイヤ画像を生成する画像処理装置及び画像処理方法に関し、特にカラー画像を文字などの主画像とその背景となる下地画像とに分けて異なる圧縮方法にて圧縮処理する画像処理装置及び画像処理方法に関するものである。   The present invention relates to an image processing apparatus and an image processing method for generating a so-called multi-layer image in which a color image is divided into a plurality of layers, and more particularly to a main image such as characters and a background image as a background thereof. The present invention relates to an image processing apparatus and an image processing method that perform compression processing using different compression methods.

文書の電子化のため、文書をスキャナで読み取ってイメージデータ化する方法が広く普及しており、またコンピュータ上の文書作成ソフトウェアで作成された文書を配布する際に配布先で支障なく閲覧できるように文書をイメージデータ化しておくことが望ましく、このような文書のイメージデータ化にあたっては、記憶装置の容量の節約や通信時間の短縮などの要望からデータ量を削減するための様々な圧縮方法が利用されている。   In order to digitize documents, a method of reading a document with a scanner and converting it to image data has become widespread, and when distributing a document created with document creation software on a computer, it can be viewed without any problems at the distribution destination. It is desirable to convert the document into image data, and in order to convert such a document into image data, various compression methods for reducing the amount of data due to demands such as saving storage capacity and shortening communication time are available. It's being used.

しかるにカラー文書の場合、通常低輝度で描画される文字とその周辺との輝度差が原因でカラー圧縮処理により再生画質が低下することがあり、このような不具合を避けるため、カラー画像を文字画像と下地画像とに分けて異なる圧縮方法にて圧縮処理する技術が知られている。(特許文献1参照)。この技術では、カラー画像の2値化により文字像を抽出して、その文字像の周辺と同一の色を用いて文字像の部分を塗り潰した下地画像を作成するようにしている。
特開2003−244447号公報
However, in the case of a color document, the reproduction quality may be degraded by color compression processing due to the difference in brightness between the character that is usually drawn at low brightness and its surroundings. There is known a technique of performing compression processing using different compression methods separately for the background image and the background image. (See Patent Document 1). In this technique, a character image is extracted by binarizing a color image, and a base image is created by filling the character image portion with the same color as the periphery of the character image.
JP 2003-244447 A

しかしながら、前記従来の技術では、下地画像を作成する際の塗り潰し色を取得するにあたり、文字像の周辺の背景となる画素の値を平均処理して求めるようにしており、R・G・Bの各成分値ごとに平均値を算出するため、演算工程が煩雑になり、ソフトウェア処理する場合には処理に長時間を要し、またハードウェア処理する場合には回路構成が複雑になり、製造コストが嵩む難点がある。   However, in the conventional technique, when obtaining the fill color when creating the background image, the values of the pixels serving as the background around the character image are obtained by averaging, and R, G, B Since the average value is calculated for each component value, the calculation process becomes complicated. When software processing is performed, a long time is required for processing, and when hardware processing is performed, the circuit configuration becomes complicated and the manufacturing cost is increased. There is a difficult point.

本発明は、このような従来技術の問題点を解消するべく案出されたものであり、その主な目的は、カラー画像をマルチレイヤ化するための下地画像を生成する際に、塗り潰し色取得のための演算工程を簡略化して、ソフトウェア処理での高速化を図り、またハードウェア処理での低コスト化を図ることができるように構成された画像処理装置及び画像処理方法を提供することにある。さらに、本発明は、白抜き文字のように、カラーの原画像内において文字や線画図形などの主画像が下地画像(背景画像)に比較して高輝度で描画される場合でも適切な塗り潰し処理を行うことができ、また、主画像部分の周囲を取り巻くように下地画像中に残存する輪郭部分により生じる下地画像の圧縮効率の低下及び画質の劣化を避けることができるように構成することも目的としている。   The present invention has been devised to solve such problems of the prior art, and its main purpose is to obtain a fill color when generating a background image for multi-layering a color image. The present invention provides an image processing apparatus and an image processing method that are configured to simplify the calculation process for the software, to increase the speed in software processing, and to reduce the cost in hardware processing is there. Furthermore, the present invention provides an appropriate filling process even when a main image such as a character or a line drawing figure is drawn with higher brightness than a background image (background image) in a color original image, such as a white character. It is also possible to prevent the deterioration in the compression efficiency and the deterioration of the image quality of the background image caused by the outline portion remaining in the background image so as to surround the main image portion. It is said.

このような課題を解決するために、本発明による画像処理装置においては、請求項1に示すとおり、原画像中に下地と異なる輝度で描画される主画像を原画像から取り出す主画像生成手段と、前記主画像に対応する原画像中の部分をその周辺画素の画データに基づく所要の塗り潰し色で塗り潰して下地画像を生成する下地画像生成手段と、これにより得られた主画像及び下地画像の各画データを互いに異なる圧縮方法にて圧縮処理する画像圧縮手段とを有し、前記下地画像生成手段が、周辺画素の輝度成分値に基づいて決定された輝度成分値と、予め設定された色度成分値とにより前記塗り潰し色を決定するものとした。   In order to solve such a problem, in the image processing apparatus according to the present invention, as shown in claim 1, main image generating means for extracting from the original image a main image drawn with a luminance different from that of the background in the original image; , A background image generating means for generating a background image by filling a portion in the original image corresponding to the main image with a required fill color based on image data of the surrounding pixels, and the main image and the background image obtained thereby Image compression means for compressing each image data by different compression methods, and the base image generation means is configured to determine a luminance component value determined based on luminance component values of peripheral pixels and a preset color. The filling color is determined based on the degree component value.

これによると、塗り潰し色を取得するにあたり、輝度成分値のみの演算で済むため、演算工程が大幅に簡略化されるので、ソフトウェア処理にあっては処理時間を短縮し、またハードウェア処理にあっては回路構成を単純化することができる。   According to this, since it is only necessary to calculate the luminance component value to obtain the fill color, the calculation process is greatly simplified, so that the processing time is shortened in software processing and the hardware processing is performed. Thus, the circuit configuration can be simplified.

この場合、主画像に対応する原画像中の部分が、その周辺部分と異なる塗り潰し色で塗り潰されることになるが、この塗り潰し色は周辺部分と輝度の差が小さいため、圧縮処理により再生画質が大きく低下することはない。   In this case, the portion of the original image corresponding to the main image is filled with a different fill color from the surrounding portion. However, since the fill color has a small difference in luminance from the peripheral portion, the reproduction image quality is improved by the compression process. There is no significant drop.

また、主画像が複数の色で描画されている場合には、主画像をその表示色ごとに仕分けして、表示色別に複数のレイヤに分けてファイルに格納する構成とすると良い。また、文字などの主画像と下地画像とを複数のレイヤに分けて格納するファイル形式は、特に限定されないが、汎用性の高いものとして、PDF、TIFF、XMLなどが好適である。また、主画像生成手段は、輝度成分値を所定のしきい値と比較して2値化することで、比較的低輝度で描画される主画像を原画像から抽出することができる。   When the main image is drawn in a plurality of colors, the main image may be sorted for each display color and stored in a file by dividing into a plurality of layers for each display color. Further, the file format for storing the main image such as characters and the background image divided into a plurality of layers is not particularly limited, but PDF, TIFF, XML, and the like are preferable as highly versatile. Further, the main image generation means can extract the main image drawn with relatively low luminance from the original image by binarizing the luminance component value with a predetermined threshold value.

前記画像処理装置においては、請求項2に示すとおり、前記主画像が、少なくとも文字、罫線、並びに線画図形のいずれかである構成とすることができる。これによると、文字、罫線、並びに線画図形を構成する線及び点は、比較的低輝度で描画されるため、下地画像と分けて圧縮処理することにより再生画質を向上させることができる。   In the image processing apparatus, as described in claim 2, the main image may be at least one of a character, a ruled line, and a line drawing figure. According to this, since characters, ruled lines, and lines and points constituting a line drawing figure are drawn with relatively low luminance, the reproduction image quality can be improved by performing compression processing separately from the base image.

前記画像処理装置においては、請求項3に示すとおり、前記下地画像生成手段において塗り潰し色を決定する際の色度成分値が中間値に予め設定され、塗り潰し色が無彩色となる構成とすることができる。これによると、塗り潰し色の色度成分値を中間値としておくことで、周辺画素の輝度成分値に基づいて輝度成分値を決定した際に、多くの場合に白色となる下地部分と塗り潰し色とが同一の白色となり、最適な結果が得られる。   In the image processing apparatus, as described in claim 3, the chromaticity component value used when determining the fill color in the background image generation means is preset to an intermediate value, and the fill color is an achromatic color. Can do. According to this, by setting the chromaticity component value of the filled color as an intermediate value, when the luminance component value is determined based on the luminance component value of the surrounding pixels, the background portion that is often white and the filled color Will be the same white color for optimal results.

前記画像処理装置においては、請求項4に示すとおり、前記画像圧縮手段が、下地画像をJPEG圧縮するものであり、このJPEG圧縮の際の輝度成分値及び色度成分値のサンプリング比率Y:Cb:Crが4:1:1、4:2:2、及び4:2:0のいずれかである構成とすることができる。   In the image processing apparatus, as described in claim 4, the image compressing unit compresses the background image by JPEG, and the sampling ratio Y: Cb of the luminance component value and the chromaticity component value at the time of the JPEG compression. : Cr can be any of 4: 1 :: 1, 4: 2: 2, and 4: 2: 0.

前記画像処理装置においては、請求項5に示すとおり、前記下地画像生成手段による塗り潰し処理が、JPEG圧縮処理での処理単位である所定のブロック単位で行われる構成とすることができる。これによると、塗り潰し処理とJPEG圧縮処理とを同じ処理単位で取り扱うことができる。   In the image processing apparatus, as described in claim 5, the painting process by the base image generation unit can be performed in a predetermined block unit which is a processing unit in the JPEG compression process. According to this, the filling process and the JPEG compression process can be handled in the same processing unit.

また本発明による画像処理装置においては、請求項6に示すとおり、原画像中に下地と異なる輝度で描画される主画像を原画像から取り出す主画像生成手段と、前記主画像に対応する原画像中の部分をその周辺画素の画データに基づく所要の塗り潰し色で塗り潰して下地画像を生成する下地画像生成手段と、これにより得られた主画像及び下地画像の各画データを互いに異なる圧縮方法にて圧縮処理する画像圧縮手段とを有し、前記下地画像生成手段が、主画像が周囲より低輝度となる通常画像の場合に、周辺画素の輝度成分値に基づいて決定された輝度成分値と、予め設定された色度成分値とにより前記塗り潰し色を決定し、主画像が周囲より高輝度となる反転画像の場合に、周辺画素の色度成分値に基づいて決定された色度成分値と、予め設定された輝度成分値とにより前記塗り潰し色を決定するものとした。   In the image processing apparatus according to the present invention, as described in claim 6, main image generation means for extracting from the original image a main image drawn in the original image with a luminance different from the background, and the original image corresponding to the main image A background image generating means for generating a background image by filling the inside portion with a required fill color based on the image data of the surrounding pixels, and the image data of the main image and the background image obtained thereby are compressed into different compression methods. Image compression means for performing compression processing, and when the base image generation means is a normal image in which the main image has a lower luminance than the surroundings, the luminance component value determined based on the luminance component values of the surrounding pixels; The chromaticity component value determined on the basis of the chromaticity component values of the surrounding pixels in the case where the main image is an inverted image having a higher brightness than the surroundings, by determining the fill color based on a preset chromaticity component value And pre- And it shall determine the fill color by the set luminance component value.

これによると、主画像が周囲を低輝度な有彩色で囲まれた反転画像の場合でも、適切な塗り潰し色を取得して、画像品質を向上させることができる。   According to this, even when the main image is an inverted image surrounded by a chromatic color with low luminance, an appropriate fill color can be acquired to improve the image quality.

反転画像では、明瞭に視認し得るように主画像部分とその周囲の下地部分とで輝度差が大きくなるが、通常画像と同様に、周辺画素の輝度成分値に基づく輝度成分値と、予め設定された色度成分値とにより塗り潰し色を決定すると、主画像部分とその周囲の下地部分とで色度成分値の差が大きくなり、圧縮処理(例えばJPEG)を行った際に、主画像部分の塗り潰し色(例えばグレー)が主画像部分の外側に滲み出て画像品質を低下させることがあり、これに対し、本発明のように構成すると、画像品質の低下を避けることができる。   In the reverse image, the luminance difference between the main image portion and the surrounding background portion increases so that it can be clearly seen. However, as with normal images, the luminance component value based on the luminance component value of the surrounding pixels is set in advance. When the fill color is determined based on the chromaticity component values, the difference in chromaticity component values between the main image portion and the surrounding background portion becomes large, and the main image portion is subjected to compression processing (for example, JPEG). In some cases, the filled color (for example, gray) oozes out of the main image portion and degrades the image quality. On the other hand, when configured as in the present invention, the image quality can be prevented from degrading.

また本発明による画像処理装置においては、請求項7に示すとおり、原画像中に下地と異なる輝度で描画される主画像を原画像から取り出す主画像生成手段と、前記主画像に対応する原画像中の部分をその周辺画素の画データに基づく所要の主画像塗り潰し色で塗り潰して下地画像を生成する下地画像生成手段と、これにより得られた主画像及び下地画像の各画データを互いに異なる圧縮方法にて圧縮処理する画像圧縮手段とを有し、前記下地画像生成手段が、主画像部分の周囲を取り巻くように原画像中に存在する輪郭部分を、その外側の領域の画素の値から取得した輪郭塗り潰し色で塗り潰す処理を行うものとした。   In the image processing apparatus according to the present invention, as described in claim 7, main image generation means for extracting from the original image a main image drawn in the original image with a luminance different from the background, and the original image corresponding to the main image Underground image generation means for generating the background image by filling the inside part with the required main image fill color based on the image data of the surrounding pixels, and the respective image data of the main image and the background image obtained thereby are compressed differently An image compression means for compressing the image by the method, wherein the background image generation means obtains a contour portion existing in the original image so as to surround the main image portion from the pixel values of the outer region. The process of filling with the contour fill color was performed.

これによると、輪郭部分が除去された下地画像を得ることができるため、下地画像を圧縮処理する際の圧縮効率の低下及び画質の劣化を避けると共に、ソフトウェア処理での高速化を図り、またハードウェア処理での回路構成の簡略化を図ることができる。   According to this, since the background image from which the outline portion is removed can be obtained, a reduction in compression efficiency and a deterioration in image quality when the background image is compressed can be avoided, and a high speed can be achieved by software processing. It is possible to simplify the circuit configuration in the wear processing.

前記画像処理装置においては、請求項8に示すとおり、前記下地画像生成手段が、対象画素を中心にした所定の画素数の窓領域により画素ごとに輪郭塗り潰し色を抽出する構成とすることができる。これによると、画素ごとに輪郭塗り潰し色が決定されるため、処理に要するメモリ容量が少なくて済む。ここでは、ページ全体の画データを保持する必要はなく、例えば窓領域の大きさ(画素数)に対応するライン数の画データを保持しておけば良い。   In the image processing device, as described in claim 8, the background image generation means can extract a contour fill color for each pixel by a window region having a predetermined number of pixels centering on the target pixel. . According to this, since the contour fill color is determined for each pixel, the memory capacity required for processing can be reduced. Here, it is not necessary to hold the image data of the entire page, and it is sufficient to hold the image data of the number of lines corresponding to the size (number of pixels) of the window area, for example.

この場合、窓領域内に主画像部分を構成する画素(例えば2値画像上での黒画素)が存在する場合に、対象画素が輪郭部分を構成するものと判定して、対象画素の塗り潰しを行うようにすることで、主画像の境界画素から所定の距離までの画素を輪郭部分として塗り潰すことができる。   In this case, when there are pixels (for example, black pixels on the binary image) that constitute the main image portion in the window area, it is determined that the target pixel constitutes the contour portion, and the target pixel is filled. By doing so, pixels from the boundary pixel of the main image to a predetermined distance can be filled as a contour portion.

特に、輪郭部分は、主画像部分の外周を取り巻くように帯状に延在し、この輪郭部分の幅は、画像読取装置の特性などに応じて異なるため、原画像の状態に応じて窓の大きさ(画素数)を変更する構成とすると良く、これにより輪郭部分の幅に応じた適切な塗り潰し処理を行うことができる。   In particular, the contour portion extends in a band shape so as to surround the outer periphery of the main image portion, and the width of the contour portion varies depending on the characteristics of the image reading device and the like, so the size of the window depends on the state of the original image. The size (number of pixels) may be changed, so that an appropriate filling process according to the width of the contour portion can be performed.

また、輪郭塗り潰し色の抽出は、窓領域内の画素の値に基づいて行うようにすると良く、このとき、窓領域内で下地部分と認められる画素、すなわち主画像部分の構成画素及び輪郭部分の構成画素のいずれにも該当しないものとみなされる周辺画素の値に基づいて輪郭塗り潰し色を決定すれば良い。   The extraction of the outline fill color may be performed based on the value of the pixel in the window region. At this time, the pixels recognized as the background portion in the window region, that is, the constituent pixels of the main image portion and the contour portion are extracted. The contour fill color may be determined based on the values of peripheral pixels that are regarded as not corresponding to any of the constituent pixels.

このとき、窓領域内に下地部分と認められる画素が複数存在する場合に、それらの画素の値を平均して輪郭塗り潰し色を求める構成すると良く、これにより単一の画素値に基づく場合よりも適切な輪郭塗り潰し色を取得することができる。さらに、窓領域内に下地部分と認められる画素がない場合には、対象画素の直前の画素を対象とした処理で取得した輪郭塗り潰し色を採用する構成とすると良く、この場合には特に、直前の画素の輪郭塗り潰し色の値と対象画素の現状の値とを比較し、両者に所定値を超える色差がある場合には、直前の画素の輪郭塗り潰し色は採用せず、塗り潰し処理を行わない構成とすると良く、これにより下地色が変化する部分で、誤った色で塗り潰される不具合を避けることができる。   At this time, when there are a plurality of pixels that can be recognized as the background portion in the window region, it is preferable to average the values of those pixels to obtain a contour fill color, which makes it more preferable than a case based on a single pixel value. An appropriate contour fill color can be obtained. Further, when there is no pixel that can be recognized as a background part in the window area, it is preferable to adopt a configuration in which the contour fill color obtained by the process for the pixel immediately before the target pixel is adopted. If the pixel fill color value is compared with the current value of the target pixel, and if there is a color difference that exceeds a predetermined value, the contour fill color of the previous pixel is not adopted and the fill process is not performed. It is good to have a configuration, and it is possible to avoid a problem that the background color changes so that it is filled with an incorrect color.

また本発明による画像処理方法においては、請求項9に示すとおり、原画像中に下地と異なる輝度で描画される主画像を原画像から取り出すステップと、前記主画像に対応する原画像中の部分をその周辺画素の画データに基づく所要の塗り潰し色で塗り潰して下地画像を生成するステップと、これにより得られた主画像及び下地画像の各画データを互いに異なる圧縮方法にて圧縮処理するステップとを有し、前記下地画像を生成するステップにおいて、周辺画素の輝度成分値に基づいて決定された輝度成分値と、予め設定された色度成分値とにより前記塗り潰し色を決定するものとした。   In the image processing method according to the present invention, the main image drawn in the original image with a luminance different from the background is extracted from the original image, and a portion in the original image corresponding to the main image is provided. Generating a background image by painting with a required fill color based on the image data of the surrounding pixels, and compressing each image data of the main image and the background image obtained thereby by different compression methods; In the step of generating the background image, the fill color is determined based on a luminance component value determined based on luminance component values of peripheral pixels and a preset chromaticity component value.

これによると、塗り潰し色を取得するにあたり、輝度成分値のみの演算で済むため、演算工程が大幅に簡略化されるので、ソフトウェア処理にあっては処理時間を短縮し、またハードウェア処理にあっては回路構成を単純化することができる。   According to this, since only the luminance component value needs to be calculated in order to obtain the fill color, the calculation process is greatly simplified, so that the processing time is shortened in software processing and the hardware processing. Thus, the circuit configuration can be simplified.

また本発明による画像処理方法においては、請求項10に示すとおり、原画像中に下地と異なる輝度で描画される主画像を原画像から取り出すステップと、前記主画像に対応する原画像中の部分をその周辺画素の画データに基づく所要の塗り潰し色で塗り潰して下地画像を生成するステップと、これにより得られた主画像及び下地画像の各画データを互いに異なる圧縮方法にて圧縮処理するステップとを有し、前記下地画像を生成するステップにおいて、主画像が周囲より低輝度となる通常画像の場合に、周辺画素の輝度成分値に基づいて決定された輝度成分値と、予め設定された色度成分値とにより前記塗り潰し色を決定し、主画像が周囲より高輝度となる反転画像の場合に、周辺画素の色度成分値に基づいて決定された色度成分値と、予め設定された輝度成分値とにより前記塗り潰し色を決定するものとした。   In the image processing method according to the present invention, as described in claim 10, a step of extracting from the original image a main image drawn with a luminance different from the background in the original image, and a portion in the original image corresponding to the main image Generating a background image by painting with a required fill color based on the image data of the surrounding pixels, and compressing each image data of the main image and the background image obtained thereby by different compression methods; In the step of generating the background image, when the main image is a normal image having a lower luminance than the surroundings, the luminance component value determined based on the luminance component values of the surrounding pixels and a preset color The fill color is determined based on the chromaticity component value, and when the main image is an inverted image having higher brightness than the surroundings, the chromaticity component value determined based on the chromaticity component values of the surrounding pixels, And it shall determine the fill color by the set luminance component value.

これによると、主画像が周囲を低輝度な有彩色で囲まれた反転画像の場合でも、適切な塗り潰し色を取得して、画像品質を向上させることができる。   According to this, even when the main image is an inverted image surrounded by a chromatic color with low luminance, an appropriate fill color can be acquired to improve the image quality.

また本発明による画像処理方法においては、請求項11に示すとおり、原画像中に下地と異なる輝度で描画される主画像を原画像から取り出すステップと、前記主画像に対応する原画像中の部分をその周辺画素の画データに基づく所要の主画像塗り潰し色で塗り潰して下地画像を生成するステップと、これにより得られた主画像及び下地画像の各画データを互いに異なる圧縮方法にて圧縮処理するステップとを有し、前記下地画像を生成するステップにおいて、主画像部分の周囲を取り巻くように原画像中に存在する輪郭部分を、その外側の領域の画素の値から取得した輪郭塗り潰し色で塗り潰す処理を行うものとした。   In the image processing method according to the present invention, as described in claim 11, a step of taking out from the original image a main image drawn with a luminance different from the background in the original image, and a portion in the original image corresponding to the main image And generating a background image by painting with the required main image fill color based on the image data of the surrounding pixels, and compressing each image data of the main image and the background image obtained by different compression methods A step of generating the background image, wherein a contour portion existing in the original image so as to surround the main image portion is painted with a contour fill color obtained from the pixel values of the outer region. The crushing process was performed.

これによると、輪郭部分が除去された下地画像を得ることができるため、下地画像を圧縮処理する際の圧縮効率の低下及び画質の劣化を避けると共に、ソフトウェア処理での高速化を図り、またハードウェア処理での回路構成の簡略化を図ることができる。   According to this, since it is possible to obtain a background image from which the outline portion has been removed, it is possible to avoid a decrease in compression efficiency and a deterioration in image quality when the background image is compressed, and to increase the speed in software processing. It is possible to simplify the circuit configuration in the wear processing.

なお、本発明においては、明るさを示す輝度成分値と色合いを示す色度成分値とで色を表示する表色系(色空間)が用いられ、例えばYCbCr表色系では、輝度成分値はY、色度(色差)成分値はCb・Crとなる。   In the present invention, a color system (color space) that displays a color with a luminance component value indicating brightness and a chromaticity component value indicating hue is used. For example, in the YCbCr color system, the luminance component value is Y, the chromaticity (color difference) component value is Cb · Cr.

このように本発明によれば、カラー画像をマルチレイヤ化するための下地画像を生成する際に、輝度成分値に関する演算のみで塗り潰し色を取得することができ、塗り潰し色取得のための演算工程が大幅に簡略化されるので、ソフトウェア処理にあっては処理時間を短縮して高速化を図る上で大きな効果が得られ、またハードウェア処理にあっては回路構成を単純化して製造コストを削減する上で大きな効果が得られる。また、主画像が周囲を低輝度な有彩色で囲まれた反転画像の場合に、周辺画素の色度成分値に基づく色度成分値及び固定値とした輝度成分値により塗り潰し色を決定することで、適切な塗り潰し色を取得することができ、画像品質を向上させる上で顕著な効果が得られる。さらに、主画像部分の周囲の輪郭部分を、その外側の領域の画素の値から取得した輪郭塗り潰し色で塗り潰すことで、輪郭部分が除去された下地画像を得ることができるため、下地画像を圧縮処理する際の圧縮効率の低下及び画質の劣化を避けると共に、ソフトウェア処理での高速化を図り、またハードウェア処理での回路構成の簡略化を図ることができる。   As described above, according to the present invention, when generating a background image for multi-layering a color image, it is possible to acquire a fill color only by calculation related to a luminance component value, and a calculation process for acquiring a fill color In software processing, the processing time can be shortened and the speed can be increased. In hardware processing, the circuit configuration can be simplified to reduce the manufacturing cost. A great effect can be obtained in the reduction. In addition, when the main image is an inverted image surrounded by a low-brightness chromatic color, the fill color is determined by the chromaticity component value based on the chromaticity component value of the surrounding pixel and the luminance component value as a fixed value. Thus, an appropriate fill color can be acquired, and a remarkable effect can be obtained in improving the image quality. Furthermore, since the background image from which the contour portion has been removed can be obtained by painting the contour portion around the main image portion with the contour fill color obtained from the pixel values of the outer region, the background image can be obtained. It is possible to avoid a reduction in compression efficiency and a deterioration in image quality during the compression process, increase the speed in software processing, and simplify the circuit configuration in hardware processing.

以下、本発明の実施の形態を、図面を参照しながら説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本発明による画像処理装置が適用された複合機の構成概略を示すブロック図である。この複合機は、原稿の画像を読み取るCCD1と、適切な読取結果が得られるようにCCD1からの画データを処理する読取データ処理部2と、適切なプリント結果が得られるように読取データ処理部2からの画データを処理するプリントデータ処理部3と、プリントデータ処理部3からの画データに基づいて記録紙に画像を記録するプリンタエンジン4とを有し、原稿画像を記録紙に複写する複写機能を備えている。   FIG. 1 is a block diagram showing a schematic configuration of a multifunction machine to which an image processing apparatus according to the present invention is applied. This multi-function machine includes a CCD 1 that reads an image of a document, a read data processing unit 2 that processes image data from the CCD 1 so as to obtain an appropriate read result, and a read data processing unit that obtains an appropriate print result. 2 has a print data processing unit 3 that processes image data from 2, and a printer engine 4 that records an image on recording paper based on the image data from the print data processing unit 3, and copies the original image onto the recording paper. It has a copy function.

また、この複合機は、原稿の画像を読み取って出力画像ファイルを作成するスキャナ機能を備えており、CCD1及び読取データ処理部2を経て得られた画データが、マルチレイア画像生成部5に送られ、ここで読取画データが下地画像と文字画像とに分離された上で異なる圧縮方法にて圧縮処理されてレイヤ別に格納したPDF(portable document format)のファイル形式による出力ファイル(マルチレイヤ画像ファイル)が作成される。   In addition, this multifunction device has a scanner function for reading an image of a document and creating an output image file, and image data obtained through the CCD 1 and the read data processing unit 2 is sent to the multi-layer image generation unit 5. In this case, the read image data is separated into a base image and a character image, compressed by a different compression method, and stored in a PDF (portable document format) file format (multi-layer image file). ) Is created.

さらに、この複合機は、PCなどのコンピュータ上の文書作成ソフトウェアで作成された文書の印刷データからマルチレイヤ画像ファイルを作成するデータ変換機能を備えており、ポストスクリプトなどのページ記述言語による印刷データがネットワーク制御部6で受信され、その印刷データがデータ変換部7にてRBGの画データに変換された後、マルチレイア画像生成部5に送られてマルチレイヤ画像ファイルが作成される。   Furthermore, this multifunction device has a data conversion function for creating a multilayer image file from print data of a document created by document creation software on a computer such as a PC, and print data in a page description language such as a postscript. Is received by the network control unit 6, and the print data is converted into RBG image data by the data conversion unit 7, and then sent to the multi-layer image generation unit 5 to create a multilayer image file.

読取データ処理部2は、CCD1の出力信号のA/D変換及びオフセット調整を行うA/D・オフセット調整部11と、CCD1の感度ムラを修正するシェーディング・黒補正部12と、ラインセンサで構成されるCCD1による副走査方向のずれを補正するライン間補正部13と、CCD1の特性に応じたガンマ補正を行うガンマ補正部14とを有している。   The read data processing unit 2 includes an A / D / offset adjustment unit 11 that performs A / D conversion and offset adjustment of the output signal of the CCD 1, a shading / black correction unit 12 that corrects sensitivity unevenness of the CCD 1, and a line sensor. The line-to-line correction unit 13 corrects a shift in the sub-scanning direction caused by the CCD 1 and the gamma correction unit 14 performs gamma correction according to the characteristics of the CCD 1.

プリントデータ処理部3は、RGBの画データをCMYKの画データに色空間変換する色変換部16と、プリンタエンジン4の出力解像度に対応する画像サイズに拡大・縮小する変倍部17と、プリンタエンジン4の出力特性に適合するように階調を補正するプリンタ階調補正部18と、色変換部16及びプリンタ階調補正部18の処理を画像の特性に応じて適正に行わせるために文字や写真などの領域を検出する像域判定部19とを有している。   The print data processing unit 3 includes a color conversion unit 16 that performs color space conversion of RGB image data to CMYK image data, a scaling unit 17 that expands and contracts to an image size corresponding to the output resolution of the printer engine 4, and a printer. A printer gradation correction unit 18 that corrects gradation so as to conform to the output characteristics of the engine 4 and characters in order to appropriately perform the processing of the color conversion unit 16 and the printer gradation correction unit 18 according to the characteristics of the image. And an image area determination unit 19 for detecting an area such as a photograph.

図2は、図1に示したマルチレイア画像生成部の構成を示すブロック図である。マルチレイア画像生成部5は、カラーの原画像内において下地画像(背景画像)に比較して低輝度で描画される文字や線画図形などの主画像を原画像から取り出す主画像生成部(主画像生成手段)21と、主画像の画線部に対応する原画像中の部分を所要の塗り潰し色で塗り潰して下地画像を生成する下地画像生成部(下地画像生成手段)22と、これにより得られた主画像及び下地画像とを互いに異なる圧縮方法にて圧縮処理する主画像圧縮部(画像圧縮手段)23及び下地画像圧縮部(画像圧縮手段)24と、これにより得られた主画像及び下地画像の各圧縮画像データを複数のレイヤに振り分けてファイル化するファイル生成部25とを有している。   FIG. 2 is a block diagram illustrating a configuration of the multi-layer image generation unit illustrated in FIG. The multi-layer image generation unit 5 extracts a main image such as a character or a line drawing figure drawn from the original image with a lower luminance in the original color image than the background image (background image). Generation means) 21, a background image generation section (background image generation means) 22 for generating a background image by painting a portion of the original image corresponding to the image line portion of the main image with a required fill color, and The main image compression unit (image compression unit) 23 and the background image compression unit (image compression unit) 24 that compress the main image and the background image using different compression methods, and the main image and the background image obtained thereby Each of the compressed image data is divided into a plurality of layers to be filed.

主画像生成部21は、RGBの画データから画素ごとの輝度を算出する輝度生成部31と、これにより得られた輝度画像を所定のしきい値を基準にして2値化する2値化処理部32と、これにより得られた2値画像内の文字や図形などの領域を判定する領域判定部33と、これにより得られた領域情報に基づいて文字や図形などの主画像を抽出する像抽出部34と、これにより得られた主画像の再生時の表示色を原画像から抽出する主画像色抽出部35と、これにより得られた表示色ごとに主画像を別レイヤでファイルに格納するために色別の主画像のデータを作成する色別レイヤ分割部36とを有している。   The main image generation unit 21 includes a luminance generation unit 31 that calculates luminance for each pixel from RGB image data, and a binarization process that binarizes the luminance image obtained thereby based on a predetermined threshold value. An image for extracting a main image such as a character or a graphic based on the area information obtained by the area determination unit 33 for determining an area such as a character or a graphic in the binary image obtained thereby; An extraction unit 34, a main image color extraction unit 35 that extracts a display color at the time of reproduction of the main image obtained thereby from the original image, and stores the main image in a file in a separate layer for each display color obtained thereby In order to do this, it has a color-by-color layer dividing unit 36 that creates data of main images by color.

領域判定部33では、2値画像内の文字、罫線で区切られた表、線画で描かれた図形、ビットマップイメージ(写真など)の各領域を判定し、ここで得られる各領域の2値画像上の位置(座標)に関する領域情報に基づいて像抽出部34において、主画像としての文字、罫線、並びに線画図形の画像が抽出される。文字領域では、行認識を経て1文字単位の画像を切り出す処理が行われる。表領域では、表構造を認識して罫線の画像、並びにセル単位の画像を切り出す処理を行うようにしても良い。   The area determination unit 33 determines each area of the character in the binary image, the table separated by the ruled line, the figure drawn by the line drawing, and the bitmap image (photograph, etc.), and the binary of each area obtained here Based on the area information regarding the position (coordinates) on the image, the image extracting unit 34 extracts characters, ruled lines, and line drawing figures as main images. In the character area, a process of cutting out an image of one character unit through line recognition is performed. In the table area, the table structure may be recognized and a ruled line image and a cell unit image may be cut out.

主画像圧縮部23では、2値画像の圧縮に適した圧縮方式、例えばMMRやJBIGにより文字や線画図形などの主画像のデータが圧縮処理される。下地画像圧縮部24では、多値画像の圧縮効率に優れた圧縮方式、例えばJPEGにより下地画像のデータが圧縮処理される。このようにして得られた主画像及び下地画像の各圧縮画像データは、ファイル生成部25で別レイヤとしてファイル化され、これにより原画像をそのままJPEG圧縮した場合に、周辺の下地部分より低輝度に描画された文字や線画などの主画像により、周辺の下地部分にモスキートノイズが発生することを避けることができる。   The main image compression unit 23 compresses main image data such as characters and line drawing figures by a compression method suitable for binary image compression, for example, MMR or JBIG. In the background image compression unit 24, the data of the background image is compressed by a compression method with excellent multi-value image compression efficiency, for example, JPEG. The compressed image data of the main image and the background image obtained in this manner is filed as a separate layer in the file generation unit 25, so that when the original image is directly JPEG compressed, the luminance is lower than that of the surrounding background portion. It is possible to avoid the occurrence of mosquito noise in the surrounding background portion due to the main images such as characters and line drawings drawn on the screen.

主画像の圧縮データを色別レイヤに振り分けるにあたっては、色別レイヤを予め所定の数(例えば、8つ)だけ設定しておき、主画像色抽出部35では、レイヤ数に対応する色数とするため、近似色に統一する減色処理が行われる。また主画像色抽出部35では、色別に分離された主画像(2値画像)の表示色と色別レイヤの識別番号との対応関係を示すカラーパレット情報が生成され、このカラーパレット情報は、ファイル生成部25においてマルチレイヤ画像ファイルに格納される。   In assigning the compressed data of the main image to the color-specific layers, a predetermined number (for example, eight) of color-specific layers is set in advance, and the main image color extracting unit 35 determines the number of colors corresponding to the number of layers. Therefore, a color reduction process for unifying the approximate colors is performed. The main image color extraction unit 35 generates color palette information indicating the correspondence between the display color of the main image (binary image) separated by color and the identification number of each color layer. The file generation unit 25 stores the multi-layer image file.

下地画像生成部22は、主画像生成部21の像抽出部34で得た2値の主画像の画線部、すなわち2値画像上で黒画素となる画素に対応する原画像中の部分をその周辺色に類似する塗り潰し色で塗り潰して下地画像を生成するものであり、塗り潰しのための塗り潰し色を原画像から抽出する塗り潰し色抽出部37と、主画像生成部21の像抽出部34で得た主画像の画線部に対応する原画像中の部分を、塗り潰し色抽出部37で得た塗り潰し色で塗り潰す塗り潰し処理部38とを有している。   The base image generation unit 22 represents a portion of the binary main image obtained by the image extraction unit 34 of the main image generation unit 21, that is, a portion in the original image corresponding to a pixel that is a black pixel on the binary image. A background image is generated by painting with a paint color similar to the surrounding color, and a paint color extracting unit 37 that extracts a paint color for painting from the original image and an image extracting unit 34 of the main image generating unit 21. A paint processing unit 38 is provided for painting a portion in the original image corresponding to the image line part of the obtained main image with the paint color obtained by the paint color extracting unit 37.

塗り潰し色抽出部37では、像抽出部34で得た主画像の画線部の周囲の非画線部に対応する原画像中の部分の画素値を参考にして塗り潰し色が決定される。特にここでは、RGBの画データがYCbCrの画データに変換された後、非画線部に対応する原画像中の部分の画素の輝度成分値に基づいて塗り潰し色の輝度成分値Yが決定され、他方、塗り潰し色の色差成分値Cb・Crは、中間値、例えば色差成分値を256段階で表す場合にはCb=Cr=128に予め設定されており、塗り潰し色は無彩色となる。   The fill color extraction unit 37 determines the fill color with reference to the pixel values of the part in the original image corresponding to the non-image line part around the image line part of the main image obtained by the image extraction unit 34. In particular, here, after the RGB image data is converted to YCbCr image data, the luminance component value Y of the fill color is determined based on the luminance component value of the pixel in the portion of the original image corresponding to the non-image portion. On the other hand, the color difference component values Cb · Cr of the fill color are preset to Cb = Cr = 128 when the intermediate value, for example, the color difference component value is expressed in 256 levels, and the fill color is an achromatic color.

下地画像圧縮部(画像圧縮手段)24では、下地画像のデータがJPEG圧縮され、このJPEG圧縮では、輝度成分値に対して色差成分値を大きく圧縮するダウンサンプリングが行われる。輝度成分値Y及び色差成分値Cb・Crのサンプリング比率Y:Cb:Crは、4:1:1、4:2:2、4:2:0のいずれかとすれば良い。   In the background image compression unit (image compression means) 24, the data of the background image is JPEG-compressed, and in this JPEG compression, downsampling for greatly compressing the color difference component value with respect to the luminance component value is performed. The sampling ratio Y: Cb: Cr of the luminance component value Y and the color difference component values Cb · Cr may be any one of 4: 1: 1, 4: 2: 2, 4: 2: 0.

図3は、図2に示したマルチレイヤ画像生成部での処理の要領を示す概念図である。主画像生成部21の輝度生成部31及び2値化処理部32を経て原画像を2値化した2値画像が得られ、さらに領域判定部33及び像抽出部34を経て文字、表、図形などの領域種別ごとの主画像の画データが得られ、文字領域の画像は、2値画像において文字に外接する矩形により1文字単位で切り分けて1文字ごとの文字画像が得られる。   FIG. 3 is a conceptual diagram showing a processing procedure in the multilayer image generation unit shown in FIG. A binary image obtained by binarizing the original image is obtained through the luminance generation unit 31 and the binarization processing unit 32 of the main image generation unit 21, and further, the characters, tables, and figures are obtained through the region determination unit 33 and the image extraction unit 34. The image data of the main image for each area type is obtained, and the image of the character area is segmented in units of one character by a rectangle circumscribing the character in the binary image to obtain a character image for each character.

主画像生成部21の主画像色抽出部35で行われる主画像の色の抽出、並びに下地画像生成部22の塗り潰し色抽出部37及び塗り潰し処理部38で行われる塗り潰し色の抽出及び塗りつぶしの処理は、JPEG圧縮処理での処理単位となる8×8画素からなるブロックごとに行われる。   Extraction of the color of the main image performed by the main image color extraction unit 35 of the main image generation unit 21, and extraction of the fill color and fill processing performed by the fill color extraction unit 37 and the fill processing unit 38 of the base image generation unit 22. Is performed for each block of 8 × 8 pixels, which is a processing unit in JPEG compression processing.

まず主画像生成部21の主画像色抽出部35では、2値画像上で黒画素となる画線部を構成する画素と同一座標の画素の色が多値画像(原画像)のデータから取得され、その多値画像上の各画素値の平均値を算出する、すなわち各画素のRGBの各値をそれぞれ平均してRGBごとの平均値を算出して、主画像の画線部を表示する色(例えば、赤色)が決定される。   First, in the main image color extracting unit 35 of the main image generating unit 21, the color of the pixel having the same coordinate as that of the pixel constituting the image line unit which is a black pixel on the binary image is acquired from the data of the multi-valued image (original image). The average value of each pixel value on the multi-valued image is calculated, that is, the RGB values of each pixel are averaged to calculate the average value for each RGB, and the image line portion of the main image is displayed. A color (eg, red) is determined.

また下地画像生成部22の塗り潰し色抽出部37では、2値画像上で黒画素となる画線部の周囲で白画素となる非画線部を構成する画素と同一座標の画素の輝度成分値が、YCbCr表色系変換された多値画像のデータから取得され、その多値画像上の各画素ごとの輝度成分値の平均値が算出され、その平均輝度成分値と中間値(128)に予め設定され色差成分値とにより、塗り潰し色が決定される。例えば、2値画像の非画線部に対応する多値画像中の部分が青色であれば、塗り潰し処理部38で得られる下地画像では、2値画像の画線部に対応する部分がその周囲の青色と同一輝度の灰色で塗り潰された配色となる。   In addition, the fill color extraction unit 37 of the base image generation unit 22 has luminance component values of pixels having the same coordinates as the pixels constituting the non-image part that is a white pixel around the image line part that is a black pixel on the binary image. Is obtained from the data of the multivalued image subjected to the YCbCr color system conversion, the average value of the luminance component values for each pixel on the multivalued image is calculated, and the average luminance component value and the intermediate value (128) are calculated. The fill color is determined based on the color difference component value set in advance. For example, if the portion in the multi-valued image corresponding to the non-image area of the binary image is blue, the portion corresponding to the image area of the binary image is surrounded by the background image obtained by the fill processing unit 38. The color scheme is filled with gray with the same brightness as the blue color.

なお、主画像の表示色の取得の際には、処理ブロック内の画線部を構成する全ての画素を対象せず、適宜な規則にしたがって選出された複数の画素を対象として表示色を決定するものとしても良い。また下地画像の塗り潰し色の取得の際も、同様に非画線部を構成する画素の中から適宜な規則にしたがって選出された複数の画素を対象として塗り潰し色を決定するものとしても良い。この他、1文字ごとの文字画像の外周部に位置する画素を、下地画像の塗り潰し色決定の基準とすることも可能である。   When acquiring the display color of the main image, the display color is determined for a plurality of pixels selected according to an appropriate rule, not for all the pixels constituting the image line portion in the processing block. It is good to do. Similarly, when obtaining the fill color of the background image, the fill color may be determined for a plurality of pixels selected according to an appropriate rule from the pixels constituting the non-image portion. In addition, pixels located on the outer periphery of the character image for each character can be used as a reference for determining the fill color of the base image.

以上のようにして下地画像が作成されるが、ここでは塗り潰し色の色差成分値が固定されているため、場合によっては塗り潰し画素とその周辺画素との間の色差成分値の差が大きくなり、下地画像圧縮の演算に手間取ることがあるが、JPEG圧縮のように輝度成分値に対して色差成分値を大きく圧縮するダウンサンプリングが行われる場合には、輝度成分値に比較して色差成分値の演算負担が相対的に小さくなるため、塗り潰し色取得も含めた全体的な演算負担は軽減される。   Although the background image is created as described above, since the color difference component value of the fill color is fixed here, the difference in the color difference component value between the fill pixel and its surrounding pixels is increased in some cases, Although it may take time to calculate the background image compression, when downsampling is performed in which the color difference component value is greatly compressed with respect to the luminance component value as in JPEG compression, the color difference component value is compared with the luminance component value. Since the calculation load is relatively reduced, the overall calculation load including the acquisition of the fill color is reduced.

図4及び図5は、図2に示したマルチレイヤ画像生成部での処理の手順を示すフロー図である。ここでは、文字を主画像とした例について示す。   4 and 5 are flowcharts showing a processing procedure in the multilayer image generation unit shown in FIG. Here, an example in which characters are used as a main image is shown.

まずメモリに格納されたRGBによる原画像の画データが主画像生成部21において取得され(ステップ101)、ついで表色系(色空間)変換処理によりYCbCrによる画データが生成され(ステップ102)、その輝度成分値Yによる輝度画像が輝度生成部31で作成された後、その輝度画像を2値化する処理が2値化処理部32で行われる(ステップ103)。そして2値画像内の文字や図形などの領域を検出するレイアウト解析処理が領域判定部33で行われ、文字や図形などの領域種別や領域の原画像上の位置(座標)に関する属性を領域ごとに記載した領域リストが作成される(ステップ104)。   First, image data of an RGB original image stored in the memory is acquired in the main image generation unit 21 (step 101), and then image data based on YCbCr is generated by color system (color space) conversion processing (step 102). After the luminance image by the luminance component value Y is created by the luminance generation unit 31, the binarization processing unit 32 performs a process of binarizing the luminance image (step 103). A layout analysis process for detecting areas such as characters and graphics in the binary image is performed by the area determination unit 33, and attributes relating to the area type and the position (coordinates) of the area on the original image are set for each area. Is created (step 104).

次に1文字単位の画像を取得する工程(ステップ105〜108)に進み、ここではまず文字領域内の2値画像から1文字ごとの文字画像を切り出す処理が像抽出部34で行われ(ステップ106)、ついで切り出した1文字ごとの文字画像の格納先アドレスを領域リストに追加する処理が行われる(ステップ107)。   Next, the process proceeds to a process of acquiring an image of one character unit (steps 105 to 108). Here, a process of cutting out a character image for each character from the binary image in the character region is first performed by the image extraction unit 34 (step 106) Next, a process of adding the storage address of the character image for each character cut out to the area list is performed (step 107).

次に文字画像の表示色を1文字ごとに取得して色別文字レイヤに振り分けて圧縮処理する工程(ステップ109〜116)に進み、ここではまず領域リストを参照して文字領域に属する文字画像に関する処理ブロックごとの座標を求める処理が行われ、これにより得られた処理ブロックに関する情報を記載した文字リストが作成される(ステップ110)。そして文字リストに記載された処理ブロック単位で文字画像の表示色を取得する処理が主画像色抽出部35で行われ(ステップ112)、ついで処理ブロック単位の画像を表示色ごとに仕分けする処理が色別レイヤ分割部36で行われる(ステップ113)。さらに対象文字領域に属する全ての文字ごとの表示色の取得及び仕分けの処理が終了すると(ステップ114)、表示色ごとの2値画像を圧縮する処理が主画像圧縮部23で行われる(ステップ115)。   Next, the display color of the character image is acquired for each character, and the process proceeds to the step of compressing the image by assigning it to the character layer by color (steps 109 to 116). Here, the character image belonging to the character region is first referred to the region list. The processing for obtaining the coordinates for each processing block is performed, and a character list describing the information regarding the processing block thus obtained is created (step 110). Then, the process of acquiring the display color of the character image in units of processing blocks described in the character list is performed by the main image color extraction unit 35 (step 112), and then the process of sorting the image in units of processing blocks for each display color is performed. This is performed by the color-specific layer dividing unit 36 (step 113). Further, when the display color acquisition and sorting process for all characters belonging to the target character area is completed (step 114), the main image compression unit 23 performs a process of compressing the binary image for each display color (step 115). ).

次に図5に示すように、下地画像の塗り潰し色を処理ブロック単位で取得して塗り潰す工程(ステップ117〜123)に進み、ここではまず前記と同様に1文字ごとの処理ブロックに関する情報を記載した文字リストが作成された後(ステップ118)、文字リストに記載された処理ブロック単位で塗り潰し色を取得する処理が塗り潰し色抽出部37で行われ(ステップ120)、ついで取得した塗り潰し色で塗り潰す処理が塗り潰し処理部38で処理ブロック単位で行われる(ステップ121)。   Next, as shown in FIG. 5, the process proceeds to a process (steps 117 to 123) of obtaining and painting the fill color of the background image in units of processing blocks. Here, first, information on the processing block for each character is obtained as described above. After the described character list is created (step 118), a process of acquiring a fill color for each processing block described in the character list is performed by the fill color extracting unit 37 (step 120), and then the acquired fill color is used. The painting process is performed by the painting processing unit 38 in units of processing blocks (step 121).

そして1ページ分の塗り潰し処理が終了すると(ステップ123)、塗り潰し済みの多値画像をサブサンプリングしてJPEG圧縮する処理が下地画像圧縮部24で行われる(ステップ124・125)。   When the filling process for one page is completed (step 123), the background image compression unit 24 performs the sub-sampling of the filled multi-value image and JPEG compression (steps 124 and 125).

このようにして文字画像及び下地画像の圧縮データが取得されると、マルチレイヤ画像ファイルの作成の工程に進み、文字画像及び下地画像の各圧縮データにヘッダ情報を付けてファイルに書き込む処理がファイル生成部25で行われる(ステップ126・127)。   When the compressed data of the character image and the background image is acquired in this way, the process proceeds to the process of creating the multilayer image file, and the process of adding the header information to each compressed data of the character image and the background image and writing to the file is performed. This is performed by the generation unit 25 (steps 126 and 127).

図6は、図1に示したマルチレイア画像生成部の別の例を示すブロック図である。ここでは、前記の例と同様に、主画像生成部21において、輝度生成部31及び2値化処理部32を経て得られた2値画像内の文字や図形などの領域を判定する処理が領域判定部33にて行われ、ここで得られた領域情報に基づいて文字や図形などの主画像を抽出する処理が像抽出部34にて行われるようになっているが、前記の例とは異なり、像抽出部34において、その主画像となる文字が周囲より低輝度となる通常文字と、主画像となる文字が周囲より高輝度となる白抜き文字(反転文字)とを判別し、その判別結果(白抜き文字情報)が下地画像生成部22の塗り潰し処理部38に送られる。   FIG. 6 is a block diagram illustrating another example of the multi-layer image generation unit illustrated in FIG. Here, as in the above example, the main image generation unit 21 performs processing for determining regions such as characters and graphics in the binary image obtained through the luminance generation unit 31 and the binarization processing unit 32. A process of extracting a main image such as a character or a figure based on the area information obtained here is performed by the determining unit 33, and the image extracting unit 34 performs the process. In contrast, the image extraction unit 34 discriminates between a normal character in which the character that is the main image has a lower luminance than the surroundings and a white character (inverted character) in which the characters that are the main image have a higher luminance than the surroundings. The discrimination result (outlined character information) is sent to the fill processing unit 38 of the base image generation unit 22.

ここで、通常文字は、2値画像上で黒画素で構成され、その周囲を白画素で覆われる状態となるのに対し、白抜き文字(反転文字)は、2値画像上で白画素で構成され、その周囲を黒画素で覆われる状態となる。なおここでは、文字について、主画像が周囲より低輝度となる通常画像と主画像が周囲より高輝度となる反転画像との識別して異なる処理を行うようにしているが、罫線や線画図形についても同様の処理が可能である。   Here, a normal character is composed of black pixels on a binary image and is surrounded by white pixels, whereas a white character (reverse character) is a white pixel on a binary image. Configured, and the periphery thereof is covered with black pixels. Note that here, for characters, the normal image whose main image has lower brightness than the surroundings and the reverse image whose main image has higher brightness than the surroundings are identified and processed differently, but for ruled lines and line drawing figures The same processing is possible.

図7は、図6に示した下地画像生成部の構成を詳しく示すブロック図である。下地画像生成部22の塗り潰し色抽出部37では、RGBの画データがY・Cb・Crの画データに変換された後、像抽出部34で得た主画像の周囲の画素に対応する原画像中の部分の画素値を参考にして塗り潰し色が決定され、特にここでは、主画像の周囲の画素に対応する原画像中の部分の画素値に基づいて、輝度成分値Y及び色差成分値Cb・Crの各値が求められる。   FIG. 7 is a block diagram showing in detail the configuration of the background image generation unit shown in FIG. In the fill color extraction unit 37 of the base image generation unit 22, after the RGB image data is converted into Y, Cb, and Cr image data, the original image corresponding to the surrounding pixels of the main image obtained by the image extraction unit 34. The fill color is determined with reference to the pixel value of the inner part. In particular, here, the luminance component value Y and the color difference component value Cb are based on the pixel value of the part in the original image corresponding to the surrounding pixels of the main image. -Each value of Cr is obtained.

塗り潰し処理部38には、像抽出部34からの白抜き文字情報に基づいて、塗り潰し色抽出部37からの画信号を切り換えるY・Cb・Crの各画信号ごとの信号切換部42a・42b・42cが設けられており、白抜き文字情報が通常文字(0)を示す場合には、輝度成分値Yは、塗り潰し色抽出部37で得られたものがそのまま主画像部分塗り潰し処理部41に送られ、色差成分値Cb・Crは、固定値が主画像部分塗り潰し処理部41に送られる。他方、白抜き文字情報が白抜き文字(1)を示す場合には、輝度成分値Yは、固定値が主画像部分塗り潰し処理部41に送られ、色差成分値Cb・Crは、塗り潰し色抽出部37で得られたものが主画像部分塗り潰し処理部41に送られる。   Based on the outline character information from the image extraction unit 34, the fill processing unit 38 switches the image signal from the fill color extraction unit 37 to the signal switching units 42 a, 42 b, and Y for each image signal of Y, Cb, and Cr. 42c is provided, and when the outline character information indicates a normal character (0), the luminance component value Y obtained by the fill color extraction unit 37 is sent to the main image partial fill processing unit 41 as it is. The color difference component values Cb and Cr are sent to the main image partial filling processing unit 41 as fixed values. On the other hand, when the white character information indicates a white character (1), a fixed value of the luminance component value Y is sent to the main image partial fill processing unit 41, and the color difference component value Cb / Cr is a solid color extraction. What is obtained in the section 37 is sent to the main image partial filling processing section 41.

通常文字の場合に色差成分値Cb・Crを決定する固定値は、前記の例と同様に、中間値、例えば色差成分値を256段階で表す場合にはCb=Cr=128に設定されており、塗り潰し色は無彩色となる。他方、白抜き文字(反転文字)の場合に輝度成分値Yを決定する固定値は、中間値より小さい値、例えば輝度成分値を256段階で表す場合にはY=100に設定されている。これは、白抜き文字の場合に、文字を明瞭に視認し得るように、その周囲が、通常、比較的低輝度で描画されることが多いことによるものであり、これにより適切な塗り潰し色を取得することができる。   The fixed value for determining the color difference component value Cb · Cr in the case of a normal character is set to Cb = Cr = 128 when the intermediate value, for example, the color difference component value is expressed in 256 levels, as in the above example. The fill color is achromatic. On the other hand, the fixed value for determining the luminance component value Y in the case of a white character (inverted character) is set to a value smaller than the intermediate value, for example, Y = 100 when the luminance component value is expressed in 256 levels. This is due to the fact that the surrounding area is usually drawn at a relatively low luminance so that the character can be clearly seen in the case of white characters. Can be acquired.

下地画像圧縮部(画像圧縮手段)24では、前記と同様に、下地画像のデータがJPEG圧縮され、このJPEG圧縮では、輝度成分値に対して色差成分値を大きく圧縮するダウンサンプリングが行われる。輝度成分値Y及び色差成分値Cb・Crのサンプリング比率Y:Cb:Crは、4:1:1、4:2:2、4:2:0のいずれかとすれば良い。   In the background image compression unit (image compression means) 24, the background image data is JPEG compressed as described above, and in this JPEG compression, downsampling is performed to greatly compress the color difference component value with respect to the luminance component value. The sampling ratio Y: Cb: Cr of the luminance component value Y and the color difference component values Cb · Cr may be any one of 4: 1: 1, 4: 2: 2, 4: 2: 0.

図8は、図7に示した下地画像生成部22での処理の要領を示す概念図である。白抜き文字(反転文字)の場合には、2値画像に対して白画素と黒画素とを反転させる処理が行われ、これにより得られた反転2値画像上で主画像としての文字が黒画素(画線部)で構成され、主画像生成部21の主画像色抽出部35において、反転2値画像上で黒画素となる画素と同一座標の画素の色が多値画像(原画像)のデータから取得され、その多値画像上の各画素値の平均値を算出する、すなわち各画素のRGBの各値をそれぞれ平均してRGBごとの平均値を算出して、主画像を表示する色(例えば、薄いグレー)が決定される。   FIG. 8 is a conceptual diagram showing a processing procedure in the base image generation unit 22 shown in FIG. In the case of a white character (inverted character), processing for inverting white pixels and black pixels is performed on the binary image, and the character as the main image is black on the inverted binary image obtained as a result. In the main image color extraction unit 35 of the main image generation unit 21, the color of the pixel having the same coordinates as the pixel that is the black pixel on the inverted binary image is a multi-value image (original image). The average value of each pixel value on the multi-valued image is calculated, that is, the RGB value of each pixel is averaged to calculate the average value for each RGB, and the main image is displayed. A color (eg, light gray) is determined.

また下地画像生成部22の塗り潰し色抽出部37では、反転2値画像上で黒画素となる画線部の周囲で白画素となる非画線部を構成する画素と同一座標の画素の色差成分値Cb・Crが、YCbCr表色系変換された多値画像のデータから取得され、その多値画像上の各画素ごとの色差成分値Cb・Crの平均値が算出され、その平均色差成分値と、所定値(100)に予め設定された輝度成分値Yとにより、塗り潰し色が決定される。例えば、反転2値画像の非画線部に対応する多値画像中の部分が赤色であれば、塗り潰し処理部38で得られる下地画像では、反転2値画像の画線部に対応する部分がその周囲の赤色と概ね同一の色差の赤色で塗り潰された配色となる。   In addition, the fill color extraction unit 37 of the base image generation unit 22 has a color difference component of pixels having the same coordinates as the pixels constituting the non-image part that is a white pixel around the image line part that is a black pixel on the inverted binary image. The value Cb · Cr is acquired from the data of the multivalued image subjected to the YCbCr color system conversion, the average value of the color difference component values Cb · Cr for each pixel on the multivalued image is calculated, and the average color difference component value And the fill color is determined by the luminance component value Y preset to the predetermined value (100). For example, if the portion in the multi-valued image corresponding to the non-image portion of the inverted binary image is red, the portion corresponding to the image portion of the inverted binary image is included in the background image obtained by the fill processing unit 38. The color scheme is filled with red having the same color difference as the surrounding red.

また、図7に示したように、下地画像生成部22の塗り潰し処理部38には、前記の通り、主画像生成部21の像抽出部34で得た主画像に対応する原画像中の部分を、塗り潰し色抽出部37で得た塗り潰し色で塗り潰す主画像部分塗り潰し処理部41の他に、主画像部分の周囲を取り巻くように原画像中に存在する輪郭部分を、その外側の領域の画素値に基づいて決定された塗り潰し色で塗り潰す輪郭部分塗り潰し処理部43が設けられており、ここで塗り潰し処理を経たY・Cb・Crの各画信号が、Y・Cb・Crの各画信号ごとのOR回路44a・44b・44cを介して下地画像圧縮部24に送られる。   Further, as shown in FIG. 7, as described above, the filling processing unit 38 of the base image generation unit 22 includes a portion in the original image corresponding to the main image obtained by the image extraction unit 34 of the main image generation unit 21. In addition to the main image portion fill processing unit 41 that fills with the fill color obtained by the fill color extracting unit 37, the contour portion existing in the original image so as to surround the main image portion is displayed in the outer region. A contour portion fill processing unit 43 is provided for filling with a fill color determined based on the pixel value. The Y, Cb, and Cr image signals that have undergone the fill process are converted into Y, Cb, and Cr images. The signal is sent to the background image compression unit 24 through the OR circuits 44a, 44b, and 44c for each signal.

図9は、図7に示した輪郭部分塗り潰し処理部での処理の概要を示す概念図である。原画像には、画像読取装置の特性などに応じて、主画像部分の周囲を取り巻くように主画像部分の描画色が薄く残る輪郭部分が形成されていることがあり、この輪郭部分は、圧縮効率の低下及び画質の劣化を招くことから、輪郭部分塗り潰し処理部43において、輪郭部分をその外側の下地部分の色で塗り潰す処理が行われ、輪郭部分が除去された下地画像を得ることができる。   FIG. 9 is a conceptual diagram showing an outline of processing in the contour partial filling processing unit shown in FIG. Depending on the characteristics of the image reader and other factors, the original image may have a contour that remains thin in the drawing color of the main image so as to surround the main image. Since the efficiency is lowered and the image quality is deteriorated, the contour portion fill processing unit 43 performs a process of painting the contour portion with the color of the background portion outside the contour portion, thereby obtaining a background image from which the contour portion is removed. it can.

図10は、図7に示した輪郭部分塗り潰し処理での処理の要領を示す概念図である。輪郭部分塗り潰し処理部43では、画素ごとの画信号が入力されると、1画素ずつその画素が輪郭部分にあるか否かの判定、並びに塗り潰し色の抽出の各処理が行われ、これらの処理は、対象画素を中心とした所定の窓領域単位で行われる。   FIG. 10 is a conceptual diagram showing the outline of processing in the contour partial filling processing shown in FIG. When the image signal for each pixel is input, the contour part fill processing unit 43 performs a process of determining whether or not the pixel is in the contour part and extracting a fill color one by one. Is performed in units of a predetermined window area centered on the target pixel.

対象画素が輪郭部分にあるか否かの判定処理は、窓領域内に対象画素を除いて文字(主画像)を構成する黒画素が存在するか否かにより行われ、ここで黒画素が存在し、対象画素が輪郭部分にあるものと判定されると、次に塗り潰し色の抽出処理が行われる。   Whether or not the target pixel is in the contour portion is determined by whether or not there is a black pixel that constitutes a character (main image) in the window area, excluding the target pixel. If it is determined that the target pixel is in the contour portion, then a fill color extraction process is performed.

塗り潰し色の抽出処理では、まず窓領域内に下地部分を構成する周辺画素があるか否かの判定が行われ、具体的には、窓領域内において黒画素に隣接する隣接画素を除いた残りの周辺画素があるか否かの判定が行われ、ここで周辺画素があるものと判定されると、黒画素及び隣接画素を除いた周辺画素の値を平均して対象画素の塗り潰し色が決定される。他方、周辺画素がない場合には、対象画素の直前の画素を対象とした処理で取得した塗り潰し色が採用される。   In the fill color extraction process, it is first determined whether or not there are peripheral pixels that form the background portion in the window area. Specifically, in the window area, the remaining pixels excluding adjacent pixels adjacent to the black pixel are determined. It is determined whether or not there are peripheral pixels. If it is determined that there are peripheral pixels, the values of the peripheral pixels excluding the black pixels and adjacent pixels are averaged to determine the fill color of the target pixel. Is done. On the other hand, when there is no peripheral pixel, the fill color acquired by the process for the pixel immediately before the target pixel is adopted.

例えば(I)、(II)で示す例では、判定領域内に周辺画素があるため、周辺画素の値を平均して対象画素の塗り潰し色が決定される。これに対し、(III)で示す例では、周辺画素がないため、判定領域内での塗り潰し色の抽出は行われず、対象画素の直前の画素を対象とした処理で取得した塗り潰し色が採用され、特にここでは直前の画素及びさらにその前の画素でも判定領域内での塗り潰し色の抽出は行われないため、実際には(II)の過程で取得した塗り潰し色が採用される。このとき、文字部分の内外では、通常、色の変化はないため、適切な塗り潰し色を得ることができる。   For example, in the examples shown in (I) and (II), since there are peripheral pixels in the determination area, the fill color of the target pixel is determined by averaging the values of the peripheral pixels. On the other hand, in the example shown in (III), since there is no surrounding pixel, the filling color is not extracted in the determination region, and the filling color acquired by the process for the pixel immediately before the target pixel is adopted. In particular, since the fill color in the determination region is not extracted even in the immediately preceding pixel and the previous pixel, the fill color acquired in the process (II) is actually used. At this time, since there is usually no color change inside and outside the character portion, an appropriate filled color can be obtained.

さらに、直前の画素を対象とした処理で取得した塗り潰し色を採用する場合には、下地色が変化する部分で誤った色で塗り潰されることがないように、直前の画素で採用された輪郭塗り潰し色の値と、対象画素の現状の値とを比較し、両者に所定値を超える色差がある場合には、直前の画素の輪郭塗り潰し色は採用せず、塗り潰し処理を行わないようにする。   Furthermore, when using the fill color acquired in the process for the previous pixel, the contour fill used for the previous pixel is used so that the wrong color is not filled in the portion where the background color changes. The color value is compared with the current value of the target pixel, and when there is a color difference exceeding a predetermined value, the contour fill color of the immediately preceding pixel is not adopted and the fill process is not performed.

なお、この輪郭部分塗り潰し処理は、入力される画素ごとに順次行われ、塗り潰した後の値に基づいて、後方に位置する画素の処理が行われる。また、ここでは、説明の便宜のため、2値画像上で黒画素となる主画像部分を多値画像上に重ねて表示しているが、主画像部分の実際の画データは多値画像での画素値となる。   Note that the contour partial filling process is sequentially performed for each input pixel, and the process of the pixel located behind is performed based on the value after filling. Further, here, for convenience of explanation, the main image portion which is a black pixel on the binary image is displayed superimposed on the multi-value image, but the actual image data of the main image portion is a multi-value image. Of the pixel value.

図11は、図10に示した窓領域の大きさを変更した場合の例を示す概念図である。窓領域は、N×N(Nは縦横の画素数で、3以上)の正方形をなし、(A)に示す例は、窓領域を3×3としたものであり、対象画素とこれに上下、左右、斜めの各方向で隣接する合計9画素で窓領域が構成される。(B)に示す例は、窓領域5×5としたものであり、合計25画素で窓領域が構成される。   FIG. 11 is a conceptual diagram showing an example when the size of the window area shown in FIG. 10 is changed. The window area is a square of N × N (N is the number of vertical and horizontal pixels, 3 or more), and the example shown in (A) is a window area of 3 × 3. A window region is composed of a total of nine pixels adjacent in the left, right, and diagonal directions. In the example shown in (B), the window area is 5 × 5, and the window area is configured by a total of 25 pixels.

窓領域の大きさ(画素数)は、原画像の状態、具体的には輪郭部分の幅に応じて変更することができ、対象画素が輪郭部分にあるか否かの判定処理で、窓領域内に対象画素を除いて黒画素が存在するか否かを判定する際に、(B)に示したように、輪郭部分の幅に応じて窓領域が大きく設定されていると、文字部分(主画像部分)の境界画素(黒画素)から所定の距離までの画素を輪郭部分にあるものと判定して塗り潰すことができ、塗り潰し処理の精度を向上させることができる。   The size (number of pixels) of the window area can be changed according to the state of the original image, specifically, the width of the contour portion. In the determination processing whether the target pixel is in the contour portion, When it is determined whether or not there is a black pixel except for the target pixel, as shown in (B), if the window area is set large according to the width of the contour portion, the character portion ( Pixels from the boundary pixels (black pixels) of the main image portion) to a predetermined distance can be determined to be in the contour portion and can be filled, and the accuracy of the filling processing can be improved.

図12は、図6に示したマルチレイア画像生成部での処理の手順を示すフロー図である。これは、図4に示したフローに続くものであり、下地画像の塗り潰し色を処理ブロック単位で取得して塗り潰す工程において、1文字ごとの処理ブロックに関する情報を記載した文字リストが作成された後に(ステップ118)、まず文字部分(主画像部分)の周囲に存在する輪郭部分を塗り潰す処理が輪郭部分塗り潰し処理部43で行われ(ステップ131)、ついで文字リストに記載された処理ブロック単位で文字部分の塗り潰し色を取得する処理が塗り潰し色抽出部37で行われ(ステップ132)、ついで取得した塗り潰し色で文字部分を塗り潰す処理が塗り潰し処理部38で処理ブロック単位で行われる(ステップ133)。この他は、前記図5に示した例と同様である。   FIG. 12 is a flowchart showing a processing procedure in the multi-layer image generation unit shown in FIG. This is a continuation of the flow shown in FIG. 4, and in the process of obtaining and filling the fill color of the background image in units of processing blocks, a character list describing information about the processing blocks for each character was created. Later (step 118), a process of filling the contour portion existing around the character portion (main image portion) is first performed by the contour portion fill processing unit 43 (step 131), and then the processing block unit described in the character list Then, the process of acquiring the fill color of the character part is performed in the fill color extracting unit 37 (step 132), and the process of filling the character part with the acquired fill color is performed in the process block unit in the fill processing unit 38 (step). 133). The rest is the same as the example shown in FIG.

図13は、図12に示した輪郭部分塗り潰し処理の手順を示すフロー図である。ここでは、図10に示した要領で、対象画素を中心とするN×Nの窓領域での黒画素の出現状況に基づいて対象画素が文字部分(主画像部分)の周囲に存在する輪郭部分にあるか否かの判定が行われ、対象画素が輪郭部分である場合には、窓領域内の文字部分から離間した位置にある周辺画素の値から塗り潰し色を抽出する処理が行われ、これにより取得した輪郭塗り潰し色で対象画素を塗り潰す処理が行われる。   FIG. 13 is a flowchart showing a procedure of the contour portion filling process shown in FIG. Here, in the manner shown in FIG. 10, the contour portion where the target pixel exists around the character portion (main image portion) based on the appearance state of the black pixel in the N × N window region centered on the target pixel. If the target pixel is an outline part, a process of extracting a fill color from the values of surrounding pixels located at a position separated from the character part in the window area is performed. The process of filling the target pixel with the outline filling color obtained by the above is performed.

まず輪郭部分塗り潰し処理部43において、対象画素を中心とするN×Nの窓領域内にその中心の対象画素を除いて黒画素が存在するか否かにより、対象画素が輪郭部分を構成するものか否かの判定が行われ(ステップ201)、これにより窓領域内に黒画素が存在し、対象画素が輪郭部分を構成するものと判定されると、次に窓領域内に主画像の画素(黒画素)及びこれに隣接する隣接画素のいずれにも該当しない周辺画素が存在するか否かを判定する処理が行われ(ステップ202)、これにより窓領域内に周辺画素が存在するものと判定されると、周辺画素の画素値を平均して輪郭塗り潰し色を決定する処理が行われ(ステップ203)、さらにここで取得した輪郭塗り潰し色の値に対象画素の値を置き換える塗り潰し処理が行われる(ステップ204)。   First, in the contour portion filling processing unit 43, the target pixel constitutes the contour portion depending on whether or not a black pixel exists in the N × N window region centered on the target pixel except for the target pixel at the center. Is determined (step 201). When it is determined that a black pixel exists in the window area and the target pixel constitutes a contour portion, the pixel of the main image is next displayed in the window area. (Black pixel) and a process for determining whether there is a peripheral pixel that does not correspond to any of the adjacent pixels adjacent to it (Step 202), so that the peripheral pixel exists in the window area When the determination is made, a process for determining the contour fill color by averaging the pixel values of the surrounding pixels is performed (step 203), and a fill process for replacing the value of the target pixel with the value of the contour fill color obtained here is performed. Be called Step 204).

他方、窓領域内の黒画素の有無により対象画素が輪郭部分にあるか否かの判定(ステップ201)で、窓領域内に黒画素が存在せず、対象画素が輪郭部分を構成しないものと判定されると、塗り潰しは行われない。また、窓領域内に周辺画素が存在するか否かの判定(ステップ202)で、窓領域内に周辺画素が存在しないものと判定されると、窓領域内での輪郭塗り潰し色の取得処理(ステップ203)は行われず、直前に取得した輪郭塗り潰し色の値に対象画素の値を置き換える塗り潰し処理が行われる(ステップ204)。   On the other hand, in the determination of whether or not the target pixel is in the contour portion based on the presence or absence of the black pixel in the window region (step 201), there is no black pixel in the window region and the target pixel does not constitute the contour portion. If determined, the painting is not performed. If it is determined in the step 202 whether or not there are peripheral pixels in the window area, it is determined that there are no peripheral pixels in the window area. Step 203) is not performed, and a fill process is performed in which the value of the target pixel is replaced with the value of the outline fill color acquired immediately before (step 204).

図14は、図12に示した文字塗り潰し色抽出処理の手順を示すフロー図である。ここでは、対象となる文字部分が白抜き文字を構成するものか否かの判定が行われ、白抜き文字でない通常文字の場合には、図3に示した要領で塗り潰し色が決定され、他方、白抜き文字の場合には、図8に示した要領で塗り潰し色が決定される。   FIG. 14 is a flowchart showing a procedure of the character filling color extraction process shown in FIG. Here, it is determined whether or not the target character portion constitutes a white character, and in the case of a normal character that is not a white character, the fill color is determined in the manner shown in FIG. In the case of white characters, the fill color is determined in the manner shown in FIG.

まず像抽出部34にて切り分けられた1文字ごとの文字画像の外周部に位置する画素の値(Y、Cb、Cr)を多値画像から検索してその画素値から文字周辺色の候補を求める処理が塗り潰し色抽出部37で行われる(ステップ301)。そして塗り潰し処理部38において、対象となる文字部分が白抜き文字か否かの判定が行われ(ステップ302)、白抜き文字と判定されると、塗り潰し色抽出部37で取得した文字周辺色の候補の色差成分値Cb・Cr及び所定の固定値とした輝度成分値Yにより塗り潰し色を求める処理が行われる(ステップ303)。他方、白抜き文字でないと判定されると(ステップ302)、文字周辺色の候補の輝度成分値Y及び所定の固定値とした色差成分値Cb・Crにより塗り潰し色を求める処理が行われる(ステップ304)。   First, the values (Y, Cb, Cr) of pixels located on the outer periphery of the character image for each character segmented by the image extracting unit 34 are searched from the multi-valued image, and character peripheral color candidates are determined from the pixel values. The required processing is performed by the fill color extracting unit 37 (step 301). Then, the filling processing unit 38 determines whether or not the target character portion is a white character (step 302). If it is determined that the character portion is a white character, the character surrounding color acquired by the painting color extracting unit 37 is determined. A process of obtaining a fill color from the candidate color difference component values Cb and Cr and the luminance component value Y set to a predetermined fixed value is performed (step 303). On the other hand, if it is determined that the character is not a white character (step 302), a process for obtaining a fill color from the luminance component value Y of the character surrounding color candidate and the color difference component value Cb / Cr set to a predetermined fixed value is performed (step 302). 304).

図15は、図12に示した文字部分塗り潰し処理の手順を示すフロー図である。ここでは、まず2値画像中に黒画素が存在するか否かの判定が行われ(ステップ401)、2値画像中に黒画素が存在するものと判定されると、図14に示した塗り潰し色抽出処理で決定された塗り潰し色で、文字(主画像部分)と同一の位置(座標)となる多値画像上の画素を塗り潰す処理が行われる(ステップ402)。他方、2値画像中に黒画素が存在しない場合には、塗り潰す処理は行われない。   FIG. 15 is a flowchart showing a procedure of the character part filling process shown in FIG. Here, it is first determined whether or not black pixels are present in the binary image (step 401). If it is determined that black pixels are present in the binary image, the filling shown in FIG. Processing is performed to fill the pixels on the multi-valued image at the same position (coordinates) as the character (main image portion) with the fill color determined in the color extraction processing (step 402). On the other hand, when there is no black pixel in the binary image, the painting process is not performed.

本発明にかかる画像処理装置及び画像処理方法は、カラー画像をマルチレイヤ化するための下地画像を生成する際に、塗り潰し色取得のための演算工程を簡略化する効果を有し、カラー画像を文字などの主画像と下地画像とに分けて異なる圧縮方法にて圧縮処理する画像処理装置及び画像処理方法などとして有用である。   The image processing apparatus and the image processing method according to the present invention have an effect of simplifying a calculation process for obtaining a fill color when generating a background image for multi-layering a color image. It is useful as an image processing apparatus and an image processing method that perform compression processing using different compression methods separately for main images such as characters and background images.

本発明による画像処理装置が適用された複合機の構成概略を示すブロック図1 is a block diagram showing a schematic configuration of a multifunction machine to which an image processing apparatus according to the present invention is applied. 図1に示したマルチレイア画像生成部の構成を示すブロック図The block diagram which shows the structure of the multi-layer image production | generation part shown in FIG. 図2に示したマルチレイヤ画像生成部での処理の要領を示す概念図The conceptual diagram which shows the point of the process in the multilayer image generation part shown in FIG. 図2に示したマルチレイヤ画像生成部での処理の手順を示すフロー図The flowchart which shows the procedure of the process in the multilayer image generation part shown in FIG. 図2に示したマルチレイヤ画像生成部での処理の手順を示すフロー図The flowchart which shows the procedure of the process in the multilayer image generation part shown in FIG. 図1に示したマルチレイア画像生成部の別の例を示すブロック図The block diagram which shows another example of the multi-layer image production | generation part shown in FIG. 図6に示した下地画像生成部の構成を詳しく示すブロック図The block diagram which shows in detail the structure of the base image generation part shown in FIG. 図7に示した下地画像生成部での処理の要領を示す概念図FIG. 7 is a conceptual diagram showing a processing procedure in the base image generation unit shown in FIG. 図7に示した輪郭部分塗り潰し処理部での処理の概要を示す概念図The conceptual diagram which shows the outline | summary of the process in the outline partial filling process part shown in FIG. 図7に示した輪郭部分塗り潰し処理での処理の要領を示す概念図The conceptual diagram which shows the point of the process in the outline partial filling process shown in FIG. 図10に示した窓領域の大きさを変更した場合の例を示す概念図Conceptual diagram showing an example when the size of the window area shown in FIG. 10 is changed 図6に示したマルチレイア画像生成部での処理の手順を示すフロー図The flowchart which shows the procedure of the process in the multi-layer image production | generation part shown in FIG. 図12に示した輪郭部分塗り潰し処理の手順を示すフロー図The flowchart which shows the procedure of the outline partial filling process shown in FIG. 図12に示した文字塗り潰し色抽出処理の手順を示すフロー図The flowchart which shows the procedure of the character filling color extraction process shown in FIG. 図12に示した文字部分塗り潰し処理の手順を示すフロー図The flowchart which shows the procedure of the character part filling process shown in FIG.

符号の説明Explanation of symbols

5 マルチレイア画像生成部
21 主画像生成部(主画像生成手段)
22 下地画像生成部(下地画像生成手段)
23 主画像圧縮部(画像圧縮手段)
24 下地画像圧縮部(画像圧縮手段)
37 塗り潰し色抽出部
38 塗り潰し処理部
5 Multilayer image generation unit 21 Main image generation unit (main image generation means)
22 Background image generation unit (background image generation means)
23 Main image compression unit (image compression means)
24 Base image compression unit (image compression means)
37 Fill Color Extraction Unit 38 Fill Processing Unit

Claims (11)

原画像中に下地と異なる輝度で描画される主画像を原画像から取り出す主画像生成手段と、
前記主画像に対応する原画像中の部分をその周辺画素の画データに基づく所要の塗り潰し色で塗り潰して下地画像を生成する下地画像生成手段と、
これにより得られた主画像及び下地画像の各画データを互いに異なる圧縮方法にて圧縮処理する画像圧縮手段とを有し、
前記下地画像生成手段が、周辺画素の輝度成分値に基づいて決定された輝度成分値と、予め設定された色度成分値とにより前記塗り潰し色を決定することを特徴とする画像処理装置。
A main image generating means for extracting from the original image a main image drawn with a luminance different from that of the background in the original image;
A background image generation means for generating a background image by painting a portion in the original image corresponding to the main image with a required fill color based on the image data of the surrounding pixels;
Image compression means for compressing each image data of the main image and the background image obtained thereby by different compression methods;
The image processing apparatus, wherein the background image generation unit determines the fill color based on a luminance component value determined based on luminance component values of peripheral pixels and a preset chromaticity component value.
前記主画像が、少なくとも文字、罫線、並びに線画図形のいずれかであることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the main image is at least one of a character, a ruled line, and a line drawing figure. 前記下地画像生成手段において塗り潰し色を決定する際の色度成分値が中間値に予め設定され、塗り潰し色が無彩色となることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein a chromaticity component value for determining a fill color in the base image generation unit is preset to an intermediate value, and the fill color is an achromatic color. 前記画像圧縮手段が、下地画像をJPEG圧縮するものであり、このJPEG圧縮の際の輝度成分値及び色度成分値のサンプリング比率Y:Cb:Crが4:1:1、4:2:2、及び4:2:0のいずれかであることを特徴とする請求項1に記載の画像処理装置。   The image compression means compresses the background image by JPEG, and the sampling ratio Y: Cb: Cr of the luminance component value and the chromaticity component value at the time of the JPEG compression is 4: 1: 1, 4: 2: 2. And the image processing apparatus according to claim 1, wherein the image processing apparatus is any one of 4: 2: 0. 前記下地画像生成手段による塗り潰し処理が、JPEG圧縮処理での処理単位である所定のブロック単位で行われることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the filling process by the base image generation unit is performed in a predetermined block unit which is a processing unit in the JPEG compression process. 原画像中に下地と異なる輝度で描画される主画像を原画像から取り出す主画像生成手段と、
前記主画像に対応する原画像中の部分をその周辺画素の画データに基づく所要の塗り潰し色で塗り潰して下地画像を生成する下地画像生成手段と、
これにより得られた主画像及び下地画像の各画データを互いに異なる圧縮方法にて圧縮処理する画像圧縮手段とを有し、
前記下地画像生成手段が、主画像が周囲より低輝度となる通常画像の場合に、周辺画素の輝度成分値に基づいて決定された輝度成分値と、予め設定された色度成分値とにより前記塗り潰し色を決定し、主画像が周囲より高輝度となる反転画像の場合に、周辺画素の色度成分値に基づいて決定された色度成分値と、予め設定された輝度成分値とにより前記塗り潰し色を決定することを特徴とする画像処理装置。
A main image generating means for extracting from the original image a main image drawn with a luminance different from that of the background in the original image;
A background image generation means for generating a background image by painting a portion in the original image corresponding to the main image with a required fill color based on the image data of the surrounding pixels;
Image compression means for compressing each image data of the main image and the background image obtained thereby by different compression methods;
In the case where the base image is a normal image in which the main image has a lower luminance than the surroundings, the background image generating means uses the luminance component value determined based on the luminance component value of the surrounding pixels and the chromaticity component value set in advance. When the fill color is determined and the main image is an inverted image having higher brightness than the surroundings, the chromaticity component value determined based on the chromaticity component values of the peripheral pixels and the preset luminance component value An image processing apparatus characterized by determining a fill color.
原画像中に下地と異なる輝度で描画される主画像を原画像から取り出す主画像生成手段と、
前記主画像に対応する原画像中の部分をその周辺画素の画データに基づく所要の主画像塗り潰し色で塗り潰して下地画像を生成する下地画像生成手段と、
これにより得られた主画像及び下地画像の各画データを互いに異なる圧縮方法にて圧縮処理する画像圧縮手段とを有し、
前記下地画像生成手段が、主画像部分の周囲を取り巻くように原画像中に存在する輪郭部分を、その外側の領域の画素の値から取得した輪郭塗り潰し色で塗り潰す処理を行うことを特徴とする画像処理装置。
A main image generating means for extracting from the original image a main image drawn with a luminance different from that of the background in the original image;
A background image generating means for generating a background image by painting a portion in the original image corresponding to the main image with a required main image fill color based on image data of surrounding pixels;
Image compression means for compressing each image data of the main image and the background image obtained thereby by different compression methods;
The background image generating means performs a process of filling a contour portion existing in the original image so as to surround the periphery of the main image portion with a contour fill color acquired from the pixel value of the outer region. An image processing apparatus.
前記下地画像生成手段が、対象画素を中心にした所定の画素数の窓領域により画素ごとに輪郭塗り潰し色を抽出することを特徴とする請求項7に記載の画像処理装置。   The image processing apparatus according to claim 7, wherein the base image generation unit extracts a contour fill color for each pixel using a window region having a predetermined number of pixels centered on the target pixel. 原画像中に下地と異なる輝度で描画される主画像を原画像から取り出すステップと、
前記主画像に対応する原画像中の部分をその周辺画素の画データに基づく所要の塗り潰し色で塗り潰して下地画像を生成するステップと、
これにより得られた主画像及び下地画像の各画データを互いに異なる圧縮方法にて圧縮処理するステップとを有し、
前記下地画像を生成するステップにおいて、周辺画素の輝度成分値に基づいて決定された輝度成分値と、予め設定された色度成分値とにより前記塗り潰し色を決定することを特徴とする画像処理方法。
Extracting from the original image a main image drawn with a brightness different from that of the background in the original image;
Painting a portion in the original image corresponding to the main image with a required fill color based on image data of the surrounding pixels to generate a background image;
Compressing each image data of the main image and the background image obtained thereby by different compression methods,
In the step of generating the background image, the fill color is determined based on a luminance component value determined based on luminance component values of peripheral pixels and a preset chromaticity component value. .
原画像中に下地と異なる輝度で描画される主画像を原画像から取り出すステップと、
前記主画像に対応する原画像中の部分をその周辺画素の画データに基づく所要の塗り潰し色で塗り潰して下地画像を生成するステップと、
これにより得られた主画像及び下地画像の各画データを互いに異なる圧縮方法にて圧縮処理するステップとを有し、
前記下地画像を生成するステップにおいて、主画像が周囲より低輝度となる通常画像の場合に、周辺画素の輝度成分値に基づいて決定された輝度成分値と、予め設定された色度成分値とにより前記塗り潰し色を決定し、主画像が周囲より高輝度となる反転画像の場合に、周辺画素の色度成分値に基づいて決定された色度成分値と、予め設定された輝度成分値とにより前記塗り潰し色を決定することを特徴とする画像処理方法。
Extracting from the original image a main image drawn with a brightness different from that of the background in the original image;
Painting a portion in the original image corresponding to the main image with a required fill color based on image data of the surrounding pixels to generate a background image;
Compressing each image data of the main image and the background image obtained thereby by different compression methods,
In the step of generating the background image, when the main image is a normal image having lower luminance than the surroundings, a luminance component value determined based on the luminance component values of the surrounding pixels, a preset chromaticity component value, The fill color is determined by the above, and when the main image is an inverted image having higher brightness than the surroundings, the chromaticity component value determined based on the chromaticity component values of the surrounding pixels, and a preset luminance component value An image processing method, wherein the fill color is determined by:
原画像中に下地と異なる輝度で描画される主画像を原画像から取り出すステップと、
前記主画像に対応する原画像中の部分をその周辺画素の画データに基づく所要の主画像塗り潰し色で塗り潰して下地画像を生成するステップと、
これにより得られた主画像及び下地画像の各画データを互いに異なる圧縮方法にて圧縮処理するステップとを有し、
前記下地画像を生成するステップにおいて、主画像部分の周囲を取り巻くように原画像中に存在する輪郭部分を、その外側の領域の画素の値から取得した輪郭塗り潰し色で塗り潰す処理を行うことを特徴とする画像処理方法。
Extracting from the original image a main image drawn with a brightness different from that of the background in the original image;
Painting a portion in the original image corresponding to the main image with a required main image fill color based on image data of surrounding pixels to generate a background image;
Compressing each image data of the main image and the background image obtained thereby by different compression methods,
In the step of generating the background image, a process of filling a contour portion existing in the original image so as to surround the periphery of the main image portion with a contour fill color obtained from the pixel value of the outer region is performed. A featured image processing method.
JP2005122523A 2004-07-05 2005-04-20 Image processing apparatus and image processing method Expired - Fee Related JP4695914B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005122523A JP4695914B2 (en) 2004-07-05 2005-04-20 Image processing apparatus and image processing method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2004197841 2004-07-05
JP2004197841 2004-07-05
JP2005122523A JP4695914B2 (en) 2004-07-05 2005-04-20 Image processing apparatus and image processing method

Publications (2)

Publication Number Publication Date
JP2006050548A true JP2006050548A (en) 2006-02-16
JP4695914B2 JP4695914B2 (en) 2011-06-08

Family

ID=36028524

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005122523A Expired - Fee Related JP4695914B2 (en) 2004-07-05 2005-04-20 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP4695914B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009081791A (en) * 2007-09-27 2009-04-16 Fuji Xerox Co Ltd Image processing apparatus, and image processing program
JP2009200573A (en) * 2008-02-19 2009-09-03 Fuji Xerox Co Ltd Image processing apparatus and image processing program
CN101901487A (en) * 2009-05-21 2010-12-01 夏普株式会社 Method for compressing image, image compressing device, image processing system, computer program and recording medium
JP2014107683A (en) * 2012-11-27 2014-06-09 Kyocera Document Solutions Inc Image processing device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11261833A (en) * 1998-03-11 1999-09-24 Fuji Xerox Co Ltd Image processor and image transmitter
JP2000184205A (en) * 1998-12-18 2000-06-30 Fuji Xerox Co Ltd Image forming system and its control method
JP2000198241A (en) * 1999-01-04 2000-07-18 Fuji Xerox Co Ltd Imaging system and control method thereof
JP2003018413A (en) * 2001-07-03 2003-01-17 Canon Inc Image compressor, image compression method, program code and storage medium
JP2003244447A (en) * 2002-02-15 2003-08-29 Canon Inc Image processor and image processing method
JP2003348361A (en) * 2002-05-22 2003-12-05 Canon Inc Image processing apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11261833A (en) * 1998-03-11 1999-09-24 Fuji Xerox Co Ltd Image processor and image transmitter
JP2000184205A (en) * 1998-12-18 2000-06-30 Fuji Xerox Co Ltd Image forming system and its control method
JP2000198241A (en) * 1999-01-04 2000-07-18 Fuji Xerox Co Ltd Imaging system and control method thereof
JP2003018413A (en) * 2001-07-03 2003-01-17 Canon Inc Image compressor, image compression method, program code and storage medium
JP2003244447A (en) * 2002-02-15 2003-08-29 Canon Inc Image processor and image processing method
JP2003348361A (en) * 2002-05-22 2003-12-05 Canon Inc Image processing apparatus

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009081791A (en) * 2007-09-27 2009-04-16 Fuji Xerox Co Ltd Image processing apparatus, and image processing program
JP2009200573A (en) * 2008-02-19 2009-09-03 Fuji Xerox Co Ltd Image processing apparatus and image processing program
CN101901487A (en) * 2009-05-21 2010-12-01 夏普株式会社 Method for compressing image, image compressing device, image processing system, computer program and recording medium
JP2010273121A (en) * 2009-05-21 2010-12-02 Sharp Corp Method and apparatus for compressing image, image forming apparatus, computer program, and recording medium
JP4707751B2 (en) * 2009-05-21 2011-06-22 シャープ株式会社 Image compression method, image compression apparatus, image forming apparatus, computer program, and recording medium
JP2014107683A (en) * 2012-11-27 2014-06-09 Kyocera Document Solutions Inc Image processing device
EP2736000A3 (en) * 2012-11-27 2014-10-29 Kyocera Document Solutions Inc. Image processing device
US9165205B2 (en) 2012-11-27 2015-10-20 Kyocera Document Solutions Inc. Image processing device generating character image and background image on the basis of connected pixel group

Also Published As

Publication number Publication date
JP4695914B2 (en) 2011-06-08

Similar Documents

Publication Publication Date Title
JP2720924B2 (en) Image signal encoding device
JP5132530B2 (en) Image coding apparatus, image processing apparatus, and control method thereof
JP4333708B2 (en) Method, apparatus, and computer program for processing input data related to generation of electronic file
JP4728695B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium
US8503036B2 (en) System and method of improving image quality in digital image scanning and printing by reducing noise in output image data
US8565531B2 (en) Edge detection for mixed raster content (MRC) images for improved compression and image quality
JP4127594B2 (en) Image processing method and apparatus
JP2005045404A (en) Image processor and method, and program
US8395813B2 (en) Subtractive color method, subtractive color processing apparatus, image forming apparatus, and computer-readable storage medium for computer program
JP3715905B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP4695914B2 (en) Image processing apparatus and image processing method
JP4035456B2 (en) Image compression method and image compression apparatus
US6987587B2 (en) Multiple recognition image processing apparatus
JP5151708B2 (en) Image processing apparatus and image processing program
US20090315892A1 (en) Vector image generation method, image processing apparatus, and computer-readable storage medium for computer program
US8577132B2 (en) Electronic document generation system, electronic document generation method, and program
JP5003445B2 (en) Image processing apparatus, character area specifying method, and character area specifying program
JP4648073B2 (en) Image processing apparatus, image reading apparatus including the same, and image processing method
JP2004350240A (en) Image processing apparatus and image processing method
JP4659789B2 (en) Image processing apparatus, image processing method, program, and recording medium
JP2007088912A (en) Image processing apparatus and program
JP4710672B2 (en) Character color discrimination device, character color discrimination method, and computer program
US7502145B2 (en) Systems and methods for improved line edge quality
JP4446797B2 (en) Document restoration apparatus, document restoration method, document restoration program, and recording medium
JP4375106B2 (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: 20080403

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101116

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110113

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110228

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

Free format text: PAYMENT UNTIL: 20140304

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees