JP2024080365A - Image processing device, control method thereof, and program - Google Patents
Image processing device, control method thereof, and program Download PDFInfo
- Publication number
- JP2024080365A JP2024080365A JP2022193494A JP2022193494A JP2024080365A JP 2024080365 A JP2024080365 A JP 2024080365A JP 2022193494 A JP2022193494 A JP 2022193494A JP 2022193494 A JP2022193494 A JP 2022193494A JP 2024080365 A JP2024080365 A JP 2024080365A
- Authority
- JP
- Japan
- Prior art keywords
- color
- character
- unit
- area
- background
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Editing Of Facsimile Originals (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
【課題】PDF(高圧縮)時の文字背景の塗りつぶし等の色変化を抑制する画像処理装置、その制御方法およびプログラムを提供する。【解決手段】入力された多値画像データの中から文字領域を検出する検出部(303)と、検出された文字領域内における文字を切り出し、当該文字領域内において単一文字の存在領域である単位文字領域を得る切り出し部(304)と、切り出された文字以外の文字領域内の背景色の色分布に基づいて決定した変換色を、多値画像データを縮小した縮小多値画像における文字領域内における「単位文字領域」に割り当てて出力する割り当て部(308)と、出力画像を圧縮した画像内の文字領域における背景色に相当する色を変換色で置き換える色変換部(311)と、を備えることを特徴とする。【選択図】 図3[Problem] To provide an image processing device that suppresses color changes such as filling in the background of characters when the image is converted to PDF (high compression), and a control method and program for the same. [Solution] The image processing device is characterized by comprising a detection unit (303) that detects a character area from input multi-value image data, an extraction unit (304) that extracts characters from the detected character area and obtains a unit character area within the character area in which a single character exists, an assignment unit (308) that assigns a conversion color determined based on the color distribution of the background color within the character area other than the extracted characters to a "unit character area" within the character area in a reduced multi-value image obtained by reducing the multi-value image data, and outputs the converted color, and a color conversion unit (311) that replaces a color equivalent to the background color in the character area in an image obtained by compressing the output image, with the conversion color. [Selected Figure] Figure 3
Description
本発明は、入力された多値画像の色変化を抑えつつ圧縮可能な画像処理装置、その制御方法およびプログラムに関する。 The present invention relates to an image processing device capable of compressing an input multi-valued image while suppressing color changes, and a control method and program for the same.
近年、スキャナの普及等によって紙文書の電子化が進んでいる。一般に、カラー画像はファイルサイズが大きいため、現在、JPEG圧縮等を行って画像を圧縮する方法が普及している。しかし、JPEG圧縮は写真等の自然画像を圧縮するのには非常に効果的な手法であるが、文字が記載された文字部をJPEG圧縮すると「モスキートノイズ」と称される画像劣化が発生する。 In recent years, the spread of scanners has led to the digitization of paper documents. Generally, color images have large file sizes, so currently, methods of compressing images using JPEG compression, etc., are widespread. However, while JPEG compression is a very effective method for compressing natural images such as photographs, when text areas are compressed using JPEG compression, image degradation known as "mosquito noise" occurs.
このため、特許文献1に開示されているような画像圧縮方法が提案されている。この方法にあっては、入力された画像を「文字領域」、「写真領域」および「背景領域」に領域分割を行う。そして、「文字領域」部分に2値化処理を行った上で「写真領域」をMMR圧縮し「背景領域」の部分はJPEG圧縮を行う。これにより、「文字領域」の品質を維持したまま、フルカラー画像も小さなファイルサイズで表現できる。 For this reason, an image compression method has been proposed, as disclosed in Patent Document 1. In this method, the input image is divided into a "text region," a "photographic region," and a "background region." The "text region" is then binarized, after which the "photographic region" is compressed using MMR compression, and the "background region" is compressed using JPEG compression. This makes it possible to represent full-color images in small file sizes while maintaining the quality of the "text region."
ここで、「MMR圧縮データ(「MMRデータ」とも称する)」、「JPEG圧縮データ(JPEGデータとも称する)」および「文字領域の文字色データ」をPDF形式に変換したデータを「PDF(高圧縮)」と称する。また、「文字領域」の文字色は、入力された画像、または、入力された画像を縮小した縮小多値画像から抽出されこれを「文字色抽出」と称する。 Here, data obtained by converting "MMR compressed data (also referred to as "MMR data")," "JPEG compressed data (also referred to as "JPEG data")," and "text color data in text areas" into PDF format is referred to as "PDF (high compression)." Furthermore, the text color in the "text area" is extracted from the input image or a reduced multi-value image obtained by reducing the input image, and this is referred to as "text color extraction."
ところで、前述のとおり「写真領域」および「背景領域」は縮小され、かつ、JPEG圧縮される。従来の画像全面に対するJPEG圧縮に比べ、「文字領域」以外の領域のみをJPEG圧縮することで「文字領域」の画像劣化を抑制しているため、より圧縮率を高めてファイルサイズを小さくしている。 As mentioned above, the "photo area" and "background area" are reduced in size and compressed using JPEG. Compared to conventional JPEG compression of the entire image, JPEG compression of only the areas other than the "text area" prevents image degradation in the "text area," resulting in a higher compression rate and smaller file size.
しかしながら、「文字領域」以外の領域は、従来よりも高圧縮率となり、また、画像が縮小されているため、従来よりも「ブロックノイズ」が発生し易くなる。このため、PDF(高圧縮)は、従来の画像全面に対するJPEG圧縮に比べ、色変化が目立ち易くなる可能性がある。特に、「文字領域」の背景の塗りつぶし等は、「文字領域」の色埋め処理も縮小多値画像に対して行うため、見た目上の色変化が生じやすいという問題があった。 However, areas other than "text areas" are compressed at a higher rate than before, and because the image is reduced, "block noise" is more likely to occur than before. For this reason, PDF (high compression) may cause color changes to be more noticeable than the conventional JPEG compression of the entire image. In particular, when filling in the background of a "text area," the color filling process of the "text area" is also performed on a reduced multi-value image, which can cause apparent color changes.
そこで、本発明の目的は、PDF(高圧縮)の文字背景の塗りつぶし等における色変化を抑制する画像処理装置、その制御方法およびプログラムを提供することにある。 The object of the present invention is to provide an image processing device that suppresses color changes when filling in the background of characters in PDF (high compression), as well as a control method and program for the same.
上記目的を達成するために、本発明は、文字を含む矩形領域を文字領域として抽出可能な画像処理装置であって、入力された多値画像データの中から文字領域を検出する検出部と、前記検出部により検出された文字領域内における文字を切り出し、当該文字領域内において単一文字の存在領域である単位文字領域を得る切り出し部と、前記切り出し部により切り出された文字以外の文字領域内の背景色の色分布に基づいて決定した変換色を、前記多値画像データを縮小した縮小多値画像における文字領域内における単位文字領域に割り当てて出力する割り当て部と、前記割り当て部による出力画像を圧縮した画像内の文字領域における背景色に相当する色を前記変換色で置き換える色変換部と、を備えることを特徴とする。 In order to achieve the above object, the present invention is an image processing device capable of extracting a rectangular area containing characters as a character area, and is characterized by comprising: a detection unit that detects a character area from input multi-value image data; a cut-out unit that cuts out characters from within the character area detected by the detection unit and obtains a unit character area within the character area, which is an area containing a single character; an assignment unit that assigns a conversion color determined based on the color distribution of the background color within the character area other than the characters cut out by the cut-out unit to the unit character area within the character area in a reduced multi-value image obtained by reducing the multi-value image data, and outputs the converted color; and a color conversion unit that replaces a color equivalent to the background color in the character area in an image obtained by compressing the output image by the assignment unit with the converted color.
本発明によれば、文字領域の背景色を抽出し特定色に置き換えることで、PDF(高圧縮)の文字背景の塗りつぶし等における色変化を抑制する画像処理装置、その制御方法およびプログラムを実現することができる効果を奏する。 The present invention has the effect of realizing an image processing device, a control method and a program for suppressing color changes when filling in the background of text in a PDF (high compression) by extracting the background color of the text area and replacing it with a specific color.
以下、本発明の実施の形態について図面を参照しながら詳細に説明する。しかしながら、以下の実施の形態に記載される構成はあくまで例示に過ぎず、本発明の範囲は実施の形態に記載される構成によって限定されることはない。まず、本発明の第1実施形態について説明する。 The following describes in detail the embodiments of the present invention with reference to the drawings. However, the configurations described in the following embodiments are merely examples, and the scope of the present invention is not limited to the configurations described in the embodiments. First, the first embodiment of the present invention will be described.
<第1実施形態>
<画像処理システム>
図1は、第1実施形態に係る画像処理システムの構成図である。図1に示すように、画像処理システムは、MFP(複合機)101とクライアントPC102とが相互に所要の情報を通信可能にネットワーク103で接続されている。図1中の点線104と、点線105とは処理の流れを示している。点線104は、ユーザがMFP101のスキャナ機能を用いて紙文書をスキャン画像として読み込む処理を示している。この際、ユーザは、後述するMFP101の操作部(図2の203)を操作して、スキャン画像を送信する宛先(例えばクライアントPC102)と、スキャンや送信に関する各種設定とを行うことが可能になっている。
First Embodiment
<Image Processing System>
Fig. 1 is a configuration diagram of an image processing system according to a first embodiment. As shown in Fig. 1, in the image processing system, an MFP (multifunction peripheral) 101 and a client PC 102 are connected by a network 103 so that required information can be communicated between them. Dotted lines 104 and 105 in Fig. 1 indicate a process flow. The dotted line 104 indicates a process in which a user uses the scanner function of the MFP 101 to read a paper document as a scanned image. At this time, the user can operate an operation unit (203 in Fig. 2) of the MFP 101, which will be described later, to set a destination (e.g., the client PC 102) to which the scanned image is to be sent, and various settings related to scanning and sending.
この各種設定として、カラーモード、ファイル形式(例えばJPEG、TIFF、PDF、PDF(高圧縮))等を指定がある。本実施形態においては、データ書式としてPDF(高圧縮)が指定された場合についての説明を行う。PDF(高圧縮)の処理詳細については後述する。 These various settings include color mode, file format (e.g., JPEG, TIFF, PDF, PDF (high compression)), etc. In this embodiment, we will explain the case where PDF (high compression) is specified as the data format. Details of the PDF (high compression) processing will be described later.
点線105は、MFP101が、指定された各種設定に基づいてソフトウェアあるいはハードウェアを利用してデータを生成し、指定された宛先に送信する処理を示している。ここで、クライアントPC102へ送信された画像は、PDF等の一般的なファイル形式で送信されることになるので、クライアントPC102の有する汎用的なビューアで閲覧可能である。 The dotted line 105 indicates the process in which the MFP 101 generates data using software or hardware based on the various specified settings and transmits it to the specified destination. Here, the image transmitted to the client PC 102 is transmitted in a common file format such as PDF, so that it can be viewed using a general-purpose viewer that the client PC 102 has.
<MFPの構成>
図2は第1実施形態におけるMFP101の構成図である。MFP101は、画像入力デバイスとしてのスキャナ部201、画像出力デバイスとしてのプリンタ部202、MFP全体の制御を行う制御ユニット204およびユーザーインタフェースとなる操作部203を有する。制御ユニット204は、スキャナ部201、プリンタ部202、操作部203と接続され、また、LAN209と接続することで、画像情報やデバイス情報の入出力を行う機能を有するコントローラである。
<Configuration of MFP>
2 is a diagram showing the configuration of the MFP 101 in the first embodiment. The MFP 101 has a scanner unit 201 as an image input device, a printer unit 202 as an image output device, a control unit 204 that controls the entire MFP, and an operation unit 203 that serves as a user interface. The control unit 204 is a controller that is connected to the scanner unit 201, the printer unit 202, and the operation unit 203, and also has a function of inputting and outputting image information and device information by connecting to a LAN 209.
制御ユニット204の内部のシステムバス216には、CPU205、RAM206、操作部I/F207、NetworkI/F208,ROM210、記憶部211およびデータ処理部215が接続され相互に所要の情報を通信可能となっている。CPU205は、システム全体を制御するプロセッサである。RAM206は、CPU205が動作するためのシステムワークメモリであり、画像データを一時記憶するための画像メモリとしても機能する。ROM210は、ブート型ROMであり、システムのブートプログラム等のプログラムが格納されている。記憶部211は、ハードディスクドライブ等の不揮発性記憶媒体であり、システム制御ソフトウェア、画像データ等を格納する。CPU205が記憶部211に記憶されているシステム制御プログラムを実行することにより、MPF101の各種の機能が実現される。 The CPU 205, RAM 206, operation unit I/F 207, network I/F 208, ROM 210, storage unit 211, and data processing unit 215 are connected to a system bus 216 inside the control unit 204, and are capable of communicating required information between them. The CPU 205 is a processor that controls the entire system. The RAM 206 is a system work memory for the operation of the CPU 205, and also functions as an image memory for temporarily storing image data. The ROM 210 is a boot-type ROM in which programs such as a system boot program are stored. The storage unit 211 is a non-volatile storage medium such as a hard disk drive, and stores system control software, image data, etc. The CPU 205 executes the system control programs stored in the storage unit 211 to realize various functions of the MPF 101.
操作部I/F207は、操作部(UI)203とのインターフェース部であり、操作部203に表示するための画像データを操作部203に対して出力する。また、操作部I/F207は、操作部203を介して本装置に対してユーザが指示操作した情報を、CPU205に送る機能を有する。NetworkI/F208は、本装置をLAN209に接続し、装置外部からあるいは装置外部にデータの入出力を行う。例えば、PDF形式の圧縮データを別装置に送信したり、別装置からPDF形式の圧縮データを受信したりするためのものである。なお、データ処理部215については後述する。 The operation unit I/F 207 is an interface with the operation unit (UI) 203, and outputs image data to be displayed on the operation unit 203 to the operation unit 203. The operation unit I/F 207 also has a function of sending information on user operations on this device via the operation unit 203 to the CPU 205. The network I/F 208 connects this device to a LAN 209, and inputs and outputs data to and from outside the device. For example, it is used to transmit compressed data in PDF format to another device, and to receive compressed data in PDF format from another device. The data processing unit 215 will be described later.
また、ImageBusI/F212は、システムバス216と、画像データを高速で転送する画像バス217とを接続し、データ構造を変換するバスブリッジである。画像バス217は、例えばPCIバス、IEEE1394等で構成される。画像バス217には、RIP部213とデバイスI/F214とが接続されている。RIP部213は、PDL(ページ記述言語)コードを解析し、指定された解像度のビットマップイメージに展開する処理であるレンダリング処理を実現する。デバイスI/F214は、信号線218を介してスキャナ部201と接続され、また、信号線219を介してプリンタ部202と接続されており、画像データの同期系/非同期系の変換を行う。 The ImageBusI/F 212 is a bus bridge that connects the system bus 216 and an image bus 217 that transfers image data at high speed, and converts the data structure. The image bus 217 is composed of, for example, a PCI bus, IEEE 1394, etc. The RIP unit 213 and the device I/F 214 are connected to the image bus 217. The RIP unit 213 performs rendering processing, which is processing that analyzes PDL (page description language) code and develops it into a bitmap image of a specified resolution. The device I/F 214 is connected to the scanner unit 201 via a signal line 218, and is also connected to the printer unit 202 via a signal line 219, and performs synchronous/asynchronous conversion of image data.
<データ処理部215>
データ処理部215では、領域判定、圧縮処理、PDFファイル生成等の処理を行うことによりPDF(高圧縮)を生成する。生成されたPDF(高圧縮)は、NetworkI/F208およびLAN209を介して、指定された宛先(例えばクライアントPC102)に送信される。また、データ処理部215は、NetworkI/F208およびLAN209を介して受信した圧縮データの伸長を行うこともできる。伸長画像は、RIP部213およびデバイスI/F214を介してプリンタ部202に送られ、印刷される。
<Data Processing Unit 215>
The data processing unit 215 generates a PDF (highly compressed) by performing processes such as area determination, compression processing, and PDF file generation. The generated PDF (highly compressed) is transmitted to a specified destination (e.g., the client PC 102) via the network I/F 208 and LAN 209. The data processing unit 215 can also decompress compressed data received via the network I/F 208 and LAN 209. The decompressed image is transmitted to the printer unit 202 via the RIP unit 213 and device I/F 214 and printed.
<データ処理部215の構成>
次に、図3を参照して、データ処理部215により実現される入力データからPDF(高圧縮)を生成する画像処理装置の構成について説明する。図3は、入力データ(RGBの多値画像データ)から出力データ(PDF(高圧縮))を生成するための各処理部を示す。CPU205がROM210、または、記憶部211に格納されたコンピュータプログラムを読み出し実行することにより、図3の各処理部が実現される。なお、その一部または全部をASIC等のハードウェアで構成することもできる。
<Configuration of data processing unit 215>
Next, the configuration of an image processing device that generates PDF (high compression) from input data, which is realized by the data processing unit 215, will be described with reference to Fig. 3. Fig. 3 shows each processing unit for generating output data (PDF (high compression)) from input data (RGB multi-value image data). Each processing unit in Fig. 3 is realized by the CPU 205 reading and executing a computer program stored in the ROM 210 or the storage unit 211. Note that a part or all of them can also be configured with hardware such as an ASIC.
データ処理部215は、グレー変換部301、2値化部302、第一の領域判定部303、第二の領域判定部304、MMR圧縮部305、文字色抽出部306、縮小部307、文字領域穴埋め部308およびJPEG圧縮部309を有する。データ処理部215は更に、色変換部311と、最終段のPDF生成部310とを有する。 The data processing unit 215 has a gray conversion unit 301, a binarization unit 302, a first area determination unit 303, a second area determination unit 304, an MMR compression unit 305, a character color extraction unit 306, a reduction unit 307, a character area filling unit 308, and a JPEG compression unit 309. The data processing unit 215 further has a color conversion unit 311 and a final stage PDF generation unit 310.
まず、スキャナ部201によって読み取られた入力データ(RGBの多値画像データ)の一例を図5の符号「500」に示す。符号「500」は、符号「501」で示す文字列「EF」、符号「502」は色背景上の文字「EF」、符号「503」は示す白抜き文字「EF」、符号「504」は写真を含む画像の一例である。 First, an example of input data (RGB multi-value image data) read by the scanner unit 201 is shown as "500" in Figure 5. The code "500" is an example of an image including the character string "EF" shown as "501", the character string "EF" on a colored background as "502", the white character string "EF" shown as "503", and the image "504" including a photograph.
<グレー変換部301>
グレー変換部301は、スキャナ部201によって読み取られた入力データ(RGBの多値画像データ)から、グレーの多値画像データを生成する。本実施形態においては、グレーの信号として、一般的なYUVカラースペースにおいて次式(数式1)で定義される輝度Yを用いるがグレー変換はこれに限るものではない。
<Gray conversion unit 301>
The gray conversion unit 301 generates gray multi-value image data from the input data (RGB multi-value image data) read by the scanner unit 201. In this embodiment, a luminance Y defined by the following equation (Equation 1) in a general YUV color space is used as a gray signal, but the gray conversion is not limited to this.
Y=0.299×R+0.587×G+0.114×B ・・・(数式1) Y = 0.299 x R + 0.587 x G + 0.114 x B ... (Formula 1)
<2値化部302>
2値化部302は、グレー変換部301から得られるグレーの多値画像データから、2値画像データを生成する。本実施形態における2値化の方法は、グレーの多値画像データから得られるヒストグラムから単一の閾値を算出する。そして、この算出した閾値を用いて、グレーの多値画像データの2値化を行う。図5の符号「510」は、2値化部302によって2値化された結果を示している。
<Binarization Unit 302>
The binarization unit 302 generates binary image data from the gray multi-value image data obtained from the gray conversion unit 301. The binarization method in this embodiment calculates a single threshold value from a histogram obtained from the gray multi-value image data. The gray multi-value image data is then binarized using this calculated threshold value. The reference numeral "510" in Fig. 5 indicates the result of binarization by the binarization unit 302.
<第一の領域判定部303>
第一の領域判定部303は、2値化部302で生成された2値画像データから、「文字領域」と「写真領域」とを検出する。これにより、「文字領域情報(X、Y、W、H)」、反転文字領域であることを示す情報(以下、「反転文字領域情報」)、および「写真領域情報(X、Y、W、H)」が得られる。「文字領域情報(X、Y、W、H)」の「X、Y」は検出した文字領域である矩形領域の左上角の「座標位置(X,Y)」を表し、「W、H」はそれぞれ矩形領域の「幅」(横方向長さ)と「高さ」(縦方向長さ)を表す。図5の符号「520」は、第一の領域判定部303によって「文字領域」と「写真領域」が検出された検出例を示す。符号「521」、符号「522」、符号「523」は、「文字領域情報(X、Y、W、H)」を示しており、符号「524」は、「写真領域情報(X、Y、W、H)」を示している。なお、符号「523」は「反転文字情報」があるため、「反転文字領域」であることを示している。
<First Area Determination Unit 303>
The first area determination unit 303 detects a "character area" and a "photo area" from the binary image data generated by the binarization unit 302. This provides "character area information (X, Y, W, H)," information indicating an inverted character area (hereinafter, "inverted character area information"), and "photo area information (X, Y, W, H).""X,Y" in the "character area information (X, Y, W, H)" represents the "coordinate position (X, Y)" of the upper left corner of the rectangular area that is the detected character area, and "W, H" represent the "width" (horizontal length) and "height" (vertical length) of the rectangular area, respectively. Reference numeral "520" in FIG. 5 indicates a detection example in which a "character area" and a "photo area" are detected by the first area determination unit 303. Reference numerals "521,""522," and "523" indicate "character area information (X, Y, W, H)," and reference numeral "524" indicates "photo area information (X, Y, W, H)." The code "523" indicates that it is an "inverted character area" since it has "inverted character information".
この処理は、公知の領域識別手法(例えば特開平06-068301号公報)に開示されており、これによって処理される。例えば、2値画像データ510に対して、領域判定を行った場合についての概要を説明する。(1)黒画素の輪郭を追跡することにより、「黒画素塊」を検出する。その結果、図5の符号「530」に示すような6個の「黒画素塊1」、「黒画素塊2」、「黒画素塊3」、「黒画素塊4」、「黒画素塊5」、「黒画素塊6」が得られる。 This process is disclosed in a known area identification method (for example, JP-A-06-068301) and is carried out using this method. For example, an overview of the case where area determination is performed on binary image data 510 will be described. (1) "Black pixel blocks" are detected by tracing the contours of black pixels. As a result, six "black pixel block 1", "black pixel block 2", "black pixel block 3", "black pixel block 4", "black pixel block 5", and "black pixel block 6" are obtained as shown by reference numeral "530" in Figure 5.
(2)得られた黒画素塊を、大きさや形状、黒画素密度のうちの少なくとも1つを用いて、「文字」、「反転文字」および「写真」のいずれかに分類する。例えば、縦横比が「1」に近く、かつ、大きさが設定範囲内の「黒画素塊」を「文字」を構成する「黒画素塊」と判定する。また、矩形形状で黒画素密度が高い画素塊は「反転文字」と判定する。そして、残りの「黒画素塊」を「写真」を構成する「黒画素塊」と判定する。その結果、図5の符号「530」における「黒画素塊1」、「黒画素塊2」および「黒画素塊3」、「黒画素塊4」は「文字」、「黒画素塊5」は「反転文字」、「黒画素塊6」は「写真」と判定される。 (2) The obtained black pixel blocks are classified into "characters," "inverted characters," or "photographs" using at least one of the following: size, shape, and black pixel density. For example, a "black pixel block" whose aspect ratio is close to "1" and whose size is within a set range is determined to be a "black pixel block" that constitutes "characters." A pixel block that is rectangular in shape and has a high black pixel density is determined to be an "inverted character." The remaining "black pixel blocks" are then determined to be "black pixel blocks" that constitute a "photograph." As a result, "black pixel block 1," "black pixel block 2," "black pixel block 3," and "black pixel block 4" at reference number "530" in Figure 5 are determined to be "characters," "black pixel block 5" is determined to be "inverted characters," and "black pixel block 6" is determined to be a "photograph."
(3)「文字」を構成する「黒画素塊」同士の距離が所定距離(例えば「3画素」)内である場合に、その「黒画素塊」同士を同じグループに分類する。その上で、同じグループに分類された「黒画素塊」の何れをも包含する「外接矩形領域」を「文字領域」と判定する。その結果、図5の符号「530」における「黒画素塊1」と「黒画素塊2」、および、「黒画素塊3」と「黒画素塊4」とは「黒画素塊」同士の距離が近いと判断され「文字領域」と判定される。 上記の(1)から(3)の処理により、符号「521」、符号「522」で示すものが「文字領域」、符号「523」で示すものが「反転文字領域」、符号「524」で示すものが「写真領域」であるという判定結果が出力される。以上は、第一の領域判定部303が行う処理である。 (3) If the distance between the "black pixel blocks" that make up a "character" is within a predetermined distance (for example, "3 pixels"), the "black pixel blocks" are classified into the same group. Then, the "circumscribed rectangular area" that includes all of the "black pixel blocks" classified into the same group is determined to be a "character area". As a result, the "black pixel block 1" and "black pixel block 2", and the "black pixel block 3" and "black pixel block 4" in reference number "530" in FIG. 5 are determined to be close to each other and are determined to be "character areas". By the above processes from (1) to (3), the determination results are output that the areas indicated by reference numbers "521" and "522" are "character areas", the area indicated by reference number "523" is "inverted character area", and the area indicated by reference number "524" is "photographic area". The above is the process performed by the first area determination unit 303.
<第二の領域判定部304>
第二の領域判定部304は、第一の領域判定部303で「文字領域」と判定された領域に対して「文字切り出し処理」を実行する。これにより、「単位文字領域情報(x、y、w、h)」が得られる。図5の符号「540」は、符号「521」、符号「522」、符号「523」で示す各領域に対して、文字切り出し処理を行った結果を示す。ここで、符号「541」~符号「546」は「単位文字領域情報(x、y、w、h)」を示している。文字切り出し処理は「文字領域」の中で、横方向からの射影と縦方向からの射影にもとづき、各文字の外接矩形を「文字切り矩形」として切り出す処理である。
<Second Area Determination Unit 304>
The second area determination unit 304 executes a "character segmentation process" on the area determined to be a "character area" by the first area determination unit 303. This results in "unit character area information (x, y, w, h)." Reference numeral "540" in FIG. 5 indicates the result of performing the character segmentation process on each of the areas indicated by reference numerals "521,""522," and "523." Here, reference numerals "541" to "546" indicate "unit character area information (x, y, w, h)." The character segmentation process is a process of segmenting the circumscribed rectangle of each character as a "character segmentation rectangle" based on the horizontal projection and the vertical projection in the "character area."
<MMR圧縮部305>
MMR圧縮部305は、2値化部302によって2値化された2値画像データを入力し、第一の領域判定部303によって「文字領域」と判定された領域に対してMMR圧縮を行う。圧縮されたMMRデータは、後述するPDF生成部310へ入力される。
<MMR compression unit 305>
The MMR compression unit 305 inputs the binary image data binarized by the binarization unit 302, and performs MMR compression on the area determined to be a "text area" by the first area determination unit 303. The compressed MMR data is input to a PDF generation unit 310, which will be described later.
<縮小部307>
縮小部307は、スキャナ部201によって読み取られた入力データ(RGBの多値画像データ)の縮小を行って「縮小多値画像」を生成する。生成された「縮小多値画像」は、RAM206に一時的に格納される。本実施形態において、「縮小」とは低解像度への解像度変換を意味し、例えばバイキュービック法による解像度変換が行われる。
<Reduction Unit 307>
The reduction unit 307 reduces the input data (RGB multi-value image data) read by the scanner unit 201 to generate a "reduced multi-value image." The generated "reduced multi-value image" is temporarily stored in the RAM 206. In this embodiment, "reduction" refers to resolution conversion to a lower resolution, and for example, resolution conversion is performed using the bicubic method.
<文字領域穴埋め部308>
文字領域穴埋め部308は、2値化部302によって2値化された「2値画像データ」、および、第一の領域判定部303から得られた「文字領域情報(X、Y、W、H)」を参照し「文字領域」内の「背景色」の平均値を算出する。「背景色」の値と、算出した「背景色」の平均値はRAM206に一時的に格納される。また、第二の領域判定部304から得られた「単位文字領域情報(x、y、w、h)」を参照し、算出した「背景色」の平均値を縮小多値画像の「単位文字領域」に割り当てる。つまり、算出した「背景色」で「縮小多値画像」の「文字領域」内の「単位文字領域」を穴埋めし(割り当てし)、穴埋めされた「穴埋め縮小多値画像」を生成する。これにより、後のJPEG圧縮部309の圧縮率が向上する。
<Character Region Filling Unit 308>
The character region filling unit 308 refers to the "binary image data" binarized by the binarization unit 302 and the "character region information (X, Y, W, H)" obtained from the first region determination unit 303, and calculates the average value of the "background color" in the "character region". The "background color" value and the calculated average value of the "background color" are temporarily stored in the RAM 206. Also, the unit character region information (x, y, w, h) obtained from the second region determination unit 304 is referred to, and the calculated average value of the "background color" is assigned to the "unit character region" of the reduced multi-value image. In other words, the "unit character region" in the "character region" of the reduced multi-value image is filled (assigned) with the calculated "background color", and a filled "filled reduced multi-value image" is generated. This improves the compression rate of the subsequent JPEG compression unit 309.
<JPEG圧縮部309>
JPEG圧縮部309は、文字領域穴埋め部308により生成された「穴埋め縮小多値画像」をJPEG圧縮する。JPEGデータは、後述するPDF生成部310へ入力される。
<JPEG compression unit 309>
A JPEG compression unit 309 JPEG-compresses the "filled reduced multi-valued image" generated by the character area filling unit 308. The JPEG data is input to a PDF generation unit 310, which will be described later.
<文字色抽出部306>
文字色抽出部306は、第一の領域判定部303および第二の領域判定部304から得られる「文字領域情報(X、Y、W、H)」および「単位文字領域情報(x、y、w、h)」を参照して次の処理を実行する。つまり、「文字領域情報」、「単位文字領域情報」を参照して、2値化部302によって生成された2値画像データの「黒部分」と、縮小部307によって生成される「縮小多値画像」の位置を対応させながら「文字領域」中の文字毎の「代表色」を抽出する。
<Character Color Extraction Unit 306>
The character color extraction unit 306 executes the following process by referring to the "character area information (X, Y, W, H)" and "unit character area information (x, y, w, h)" obtained from the first area determination unit 303 and the second area determination unit 304. That is, by referring to the "character area information" and the "unit character area information", the "representative color" of each character in the "character area" is extracted while matching the position of the "black portion" of the binary image data generated by the binarization unit 302 with the position of the "reduced multi-value image" generated by the reduction unit 307.
図7は文字色抽出部306の処理を説明するための模式的な説明図である。符号「701」、符号「702」、符号「703」は、縮小部307によって生成される「縮小多値画像150(dpi)」であり、符号「704」、符号「705」、符号「706」は、2値化部302によって生成される「2値画像300(dpi)」である。また、符号「707」、符号「708」、符号「709」は「2値画像データ(300dpi)」および文字毎の文字色であり、符号「710」、符号「711」、符号「712」は、文字色抽出後の文字色を示す。 Figure 7 is a schematic diagram for explaining the processing of the character color extraction unit 306. Reference characters "701", "702", and "703" are "reduced multi-value image 150 (dpi)" generated by the reduction unit 307, and reference characters "704", "705", and "706" are "binary image 300 (dpi)" generated by the binarization unit 302. Reference characters "707", "708", and "709" are "binary image data (300 dpi)" and character colors for each character, and reference characters "710", "711", and "712" indicate the character colors after character color extraction.
ここで、符号「704」で示す「2値画像データ(300dpi)」の「単位文字領域情報(x、y、w、h)」を参照し、該2値画像の「黒部分」に対応する色値を符号「701」で示す「縮小多値画像(150dpi)」から取得する。ここで、図8を参照して説明を補足することにする。図8の符号「801」は、符号「704」の「2値画像(300dpi)」の拡大図であり、符号「802」は、符号「701」の「縮小多値画像(150dpi)」の拡大図である。符号「801」で示すものと符号「802」で示すものは、1画素の大きさを同じにして図示している。 Here, the "unit character area information (x, y, w, h)" of the "binary image data (300 dpi)" indicated by the reference numeral "704" is referenced, and the color value corresponding to the "black portion" of the binary image is obtained from the "reduced multi-value image (150 dpi)" indicated by the reference numeral "701". Here, the explanation will be supplemented with reference to FIG. 8. Reference numeral "801" in FIG. 8 is an enlarged view of the "binary image (300 dpi)" indicated by the reference numeral "704", and reference numeral "802" is an enlarged view of the "reduced multi-value image (150 dpi)" indicated by the reference numeral "701". The images indicated by the reference numerals "801" and "802" are illustrated with the same size of one pixel.
このため「150(dpi)」である符号「802」は、「300(dpi)」である符号「801」と比べて幅と高さは「1/2」となっている。文字色抽出部306は、符号「801」の「黒画素」である符号「803」~符号「806」の位置に対応する色値「807」を参照する。このようにして、文字色抽出部306は、符号「801」の全黒画素に対応する色値を取得し、色値(文字色)の平均値を算出する。 Therefore, code "802", which is "150 dpi", has a width and height that are "1/2" of code "801", which is "300 dpi". The text color extraction unit 306 references color value "807", which corresponds to the positions of codes "803" to "806", which are the "black pixels" of code "801". In this way, the text color extraction unit 306 obtains color values corresponding to all the black pixels of code "801" and calculates the average color value (text color).
符号「707」には、このようにして得られた文字毎の平均色が示されている。符号「707」に示すように文字「E」は、「平均色(R、G、B)=(80、80、80)」であり、文字「F」は「平均色(R、G、B)=(75、75、75)」である。文字「E」と「F」の平均色が異なる理由は次にようになる。「縮小多値画像(150dpi)」は、スキャナによって読み取られたデータを縮小したものである。よって、文字「E」も「F」も画素毎に色値はばらつきを有しており、縮小によって文字のエッジ部に生じる中間調の状態が文字「E」と「F」で異なる点等が挙げられる。文字色抽出部306では、これらの文字毎の色値を揃えるため、類似した色、例えば、所定の輝度差、色差の範囲内であれば一つの「代表色」に置き換えることを行う。 Reference numeral "707" indicates the average color of each character obtained in this way. As shown in reference numeral "707", the character "E" has "average color (R, G, B) = (80, 80, 80)" and the character "F" has "average color (R, G, B) = (75, 75, 75)". The reason why the average colors of the characters "E" and "F" are different is as follows. The "reduced multi-value image (150 dpi)" is a reduced version of data read by a scanner. Therefore, the color values of the characters "E" and "F" vary from pixel to pixel, and the halftone state that occurs at the edge of the character due to reduction is different between the characters "E" and "F". In order to align the color values of each character, the character color extraction unit 306 replaces them with a similar color, for example, a single "representative color" if it is within a range of a predetermined luminance difference or color difference.
本実施形態においては、平均色算出前の2値画像データにおいて「黒画素」の数が多い文字の平均色を「代表色」として選択する方法を採用する。つまり、「E」を構成する画素数と、「F」を構成する画素数とを比較すると、「E」を構成する画素数が多い。これにより、文字「E」の「平均色(R、G、B)=(80、80、80)」を「代表色」として選択する。符号「710」は、文字「E」、「F」とも「代表色(R、G、B)=(80、80、80)」であることを示している。同様に、符号「705」で示す「2値画像データ300(dpi)」の「単位文字領域情報(x、y、w、h)」を参照し、該2値画像データの「黒部分」に対応する色値を符号「702」で示す「縮小多値画像150(dpi)」から取得する。 In this embodiment, a method is adopted in which the average color of a character with a large number of "black pixels" in the binary image data before the average color calculation is selected as the "representative color". In other words, when comparing the number of pixels that make up "E" with the number of pixels that make up "F", the number of pixels that make up "E" is greater. As a result, the "average color (R, G, B) = (80, 80, 80)" of the character "E" is selected as the "representative color". The symbol "710" indicates that the "representative color (R, G, B) = (80, 80, 80)" of both the characters "E" and "F" is selected. Similarly, the "unit character area information (x, y, w, h)" of the "binary image data 300 (dpi)" indicated by the symbol "705" is referenced, and the color value corresponding to the "black portion" of the binary image data is obtained from the "reduced multi-value image 150 (dpi)" indicated by the symbol "702".
符号「708」は、このようにして得られた文字毎の平均色である。符号「708」に示すように文字「E」は「平均色(R、G、B)=(100、80、100)」であり、文字「F」は「平均色(R、G、B)=(95、75、95)」である。また、符号「711」は、文字「E」、「F」とも「代表色(R、G、B)=(100、80、100)」であることを示している。 Reference number "708" is the average color for each character obtained in this way. As shown in reference number "708", the character "E" has "average color (R, G, B) = (100, 80, 100)" and the character "F" has "average color (R, G, B) = (95, 75, 95)". Reference number "711" indicates that both the characters "E" and "F" have "representative color (R, G, B) = (100, 80, 100)".
同様に、符号「706」で示す「2値画像データ300(dpi)」の「単位文字領域情報(x、y、w、h)」を参照し、該2値画像データの「黒部分」に対応する色値を符号「703」で示す「縮小多値画像150(dpi)」から取得する。符号「709」は、このようにして得られた文字毎の平均色である。符号「709」に示すように文字「E」は「平均色(R、G、B)=(140、140、140)」であり、文字「F」は「平均色(R、G、B)=(135、135、135)」である。また、符号「712」は、文字「E」、「F」とも「代表色(R、G、B)=(140、140、140)」であることを示している。以上のようにして、文字色抽出部306は「文字領域」毎の文字色を抽出する。 Similarly, the "unit character area information (x, y, w, h)" of the "binary image data 300 (dpi)" indicated by the reference symbol "706" is referenced, and the color value corresponding to the "black portion" of the binary image data is obtained from the "reduced multi-value image 150 (dpi)" indicated by the reference symbol "703". Reference symbol "709" is the average color for each character obtained in this manner. As indicated by the reference symbol "709", the character "E" has an "average color (R, G, B) = (140, 140, 140)" and the character "F" has an "average color (R, G, B) = (135, 135, 135)". Furthermore, reference symbol "712" indicates that both the characters "E" and "F" have "representative color (R, G, B) = (140, 140, 140)". In this manner, the character color extraction unit 306 extracts the character color for each "character area".
<色変換部311>
色変換部311は、文字領域穴埋め部308によってRAM206に格納された「背景色」とその平均値を参照し、JPEG圧縮部309で圧縮された画像内の文字領域における「背景色」に相当する色を平均値に置き換える。色変換部311による具体的な処理は後述する。
<Color conversion unit 311>
The color conversion unit 311 refers to the "background color" and its average value stored in the RAM 206 by the character area filling unit 308, and replaces the color corresponding to the "background color" in the character area in the image compressed by the JPEG compression unit 309 with the average value. Specific processing by the color conversion unit 311 will be described later.
<PDF生成部310>
PDF生成部310は、MMR圧縮部305で圧縮されたMMRデータ、文字色抽出部306より得られた文字色、JPEG圧縮部309で圧縮され色変換部311で色変換されたJPEGデータを合成する。そして、PDFフォーマットに変換してPDF(高圧縮)を生成する。
<PDF Generation Unit 310>
A PDF generating unit 310 combines the MMR data compressed by the MMR compressing unit 305, the character color obtained by the character color extracting unit 306, and the JPEG data compressed by the JPEG compressing unit 309 and color-converted by the color converting unit 311. Then, the PDF generating unit 310 converts the data into a PDF format to generate a PDF (highly compressed).
以上説明したように、第一の領域判定部303(検出部)は、入力された多値画像データの中から文字領域を検出する。また、第二の領域判定部304(切り出し部)は、検出された文字領域内における文字を切り出し、当該文字領域内において単一文字の存在領域である単位文字領域を得る。次いで、文字領域穴埋め部308(割り当て部)は、切り出された文字以外の文字領域内の背景色の色分布に基づいて決定した変換色を、多値画像データを「縮小」した「縮小多値画像」における文字領域内における「単位文字領域」に割り当てて出力する。そして、色変換部311は、文字領域穴埋め部308による出力画像をJPEG圧縮等で圧縮した画像内の文字領域における背景色に相当する色を変換色で置き換える。これにより、PDF(高圧縮)の文字背景の塗りつぶし等における色変化を抑制することが可能となる。なお、文字領域穴埋め部308が、色分布に基づいて、背景色の色信号毎の頻度分布を示すヒストグラムを作成し、作成したヒストグラムにおいて最多頻度を示す色を変換色とする構成とすることもできる。 As described above, the first area determination unit 303 (detection unit) detects a character area from the input multi-value image data. The second area determination unit 304 (cut-out unit) cuts out characters from the detected character area and obtains a unit character area, which is an area in which a single character exists in the character area. Next, the character area filling unit 308 (assignment unit) assigns a conversion color determined based on the color distribution of the background color in the character area other than the cut-out characters to a "unit character area" in the character area in the "reduced multi-value image" obtained by "reducing" the multi-value image data, and outputs the converted color. Then, the color conversion unit 311 replaces the color corresponding to the background color in the character area in the image compressed by JPEG compression or the like from the output image by the character area filling unit 308 with the converted color. This makes it possible to suppress color changes in filling in the character background of PDF (high compression), etc. Alternatively, the character region filling unit 308 can create a histogram showing the frequency distribution of each color signal of the background color based on the color distribution, and set the most frequently occurring color in the created histogram as the conversion color.
<データ処理部215の各処理説明>
次に、図4(A)、(B)、(C)のフローチャートを参照して、データ処理部215が実行する各処理の説明を行う。なお、該フローチャートに対応するプログラムは、図2で示したROM210や記憶部211に格納されていてCPU205によって実行される。CPU205は、ImageBusI/F212、システムバス216、画像バス217を用いて、データ処理部215とデータの送受信することが可能である。「MMRデータ生成」、「JPEGデータ生成」、「文字色データ生成」の夫々のフローチャートを参照して処理内容を説明する。
<Description of Each Process of Data Processing Unit 215>
Next, the processes executed by the data processing unit 215 will be described with reference to the flowcharts of Figures 4(A), (B), and (C). The programs corresponding to the flowcharts are stored in the ROM 210 or storage unit 211 shown in Figure 2 and are executed by the CPU 205. The CPU 205 can transmit and receive data to and from the data processing unit 215 using the Image Bus I/F 212, the system bus 216, and the image bus 217. The process contents will be described with reference to the respective flowcharts of "MMR data generation", "JPEG data generation", and "character color data generation".
<MMRデータの生成>
まず、図4(A)のステップS401~S405を参照して「MMRデータ生成」について説明を行う。まず、ステップS401において、CPU205は、スキャナ部201によって読み取られた入力データ(RGBの多値画像データ)から「グレー多値画像データ」を生成する。グレー変換については、グレー変換部301の動作の説明において述べた通りである。次に、ステップS402において、CPU205は、ステップS401において得られる「グレー多値画像データ」から「2値画像データ」を生成する。2値化画像データについては2値化部302の動作の説明において述べた通りである。
<Generation of MMR data>
First, "MMR data generation" will be described with reference to steps S401 to S405 in Fig. 4A. First, in step S401, the CPU 205 generates "gray multi-value image data" from the input data (RGB multi-value image data) read by the scanner unit 201. The gray conversion is as described in the explanation of the operation of the gray conversion unit 301. Next, in step S402, the CPU 205 generates "binary image data" from the "gray multi-value image data" obtained in step S401. The binary image data is as described in the explanation of the operation of the binarization unit 302.
次に、ステップS403(第一の領域判定)において、CPU205は、ステップS402において生成された「2値画像データ」から、「文字領域」と「写真領域」を検出する。ここで得られた「文字領域情報(X、Y、W、H)」および「反転文字領域情報」はRAM206に一時的に格納される。ステップS403の第一の領域判定については、第一の領域判定部303の動作の説明において述べた通りである。 Next, in step S403 (first area determination), the CPU 205 detects a "text area" and a "photographic area" from the "binary image data" generated in step S402. The "text area information (X, Y, W, H)" and "inverted text area information" obtained here are temporarily stored in the RAM 206. The first area determination in step S403 is as described in the explanation of the operation of the first area determination unit 303.
次に、ステップS404(第二の領域判定)において、CPU205は、ステップS403において「文字領域」と判定された領域に対して文字切り出し処理を行う。ここで得られた「単位文字領域情報(x、y、w、h)」はRAM206に一時的に格納される。ステップS404の第二の領域判定については、第二の領域判定部304の動作の説明において述べた通りである。 Next, in step S404 (second area determination), the CPU 205 performs character extraction processing on the area determined to be a "character area" in step S403. The "unit character area information (x, y, w, h)" obtained here is temporarily stored in the RAM 206. The second area determination in step S404 is as described in the explanation of the operation of the second area determination unit 304.
次に、ステップS405において、CPU205は、ステップS402において2値化された「2値画像データ」を入力し、ステップS403において「文字領域」と判定された「領域(前記2値画像データ上の文字領域)」をMMR圧縮する。MMR圧縮については、MMR圧縮部305の動作の説明において述べた通りである。以上のようにしてMMRデータが生成され、RAM206に一時的に格納される。 Next, in step S405, the CPU 205 inputs the "binary image data" binarized in step S402, and performs MMR compression on the "area (character area on the binary image data)" determined to be a "character area" in step S403. The MMR compression is as described in the explanation of the operation of the MMR compression unit 305. The MMR data is generated in this manner, and temporarily stored in the RAM 206.
<JPEGデータの生成>
次に、図4(C)のステップS420~S426を参照して「JPEGデータ生成」について説明する。まず、ステップS420において、CPU205は、入力データ(RGBの多値画像データ)に対して「縮小」を行って「縮小多値画像」を生成する。生成された「縮小多値画像」はRAM206に一時的に格納される。「縮小」については、縮小部307の動作の説明において述べた通りである。
<Generation of JPEG data>
Next, "JPEG data generation" will be described with reference to steps S420 to S426 in Fig. 4C. First, in step S420, the CPU 205 performs "reduction" on the input data (RGB multi-value image data) to generate a "reduced multi-value image." The generated "reduced multi-value image" is temporarily stored in the RAM 206. "Reduction" is as described in the explanation of the operation of the reduction unit 307.
次に、ステップS421において、CPU205は、ステップS402において生成された2値画像データ、および、ステップS403において得られた「文字領域情報(X、Y、W、H)」を参照し「文字領域」内の背景色を抽出する。具体的には、前述の文字色抽出部306の処理における、文字に相当する2値画像データの「黒部分」以外の領域の色値を、図8の符号「802」で示す「縮小多値画像150(dpi)」から抽出する。例えば、図8の符号「802」に示すものであれば「、(R,G,B)=(255,200,255)、(255,210,255)、(255,190,255)」の3つの色値が抽出される(図7の符号「702」参照)。 Next, in step S421, the CPU 205 extracts the background color in the "text area" by referring to the binary image data generated in step S402 and the "text area information (X, Y, W, H)" obtained in step S403. Specifically, the color values of the area other than the "black part" of the binary image data corresponding to the text in the processing of the text color extraction unit 306 described above are extracted from the "reduced multi-value image 150 (dpi)" shown by reference number "802" in FIG. 8. For example, in the case of the one shown by reference number "802" in FIG. 8, three color values of ", (R, G, B) = (255, 200, 255), (255, 210, 255), (255, 190, 255)" are extracted (see reference number "702" in FIG. 7).
次に、ステップS422において、CPU205は、ステップS421において抽出された「文字領域」内の背景色の平均値を算出する。平均値は、以下の「数式2」の通り、抽出した背景色のR,G,Bの値をそれぞれ平均したものを用いる。 Next, in step S422, the CPU 205 calculates the average value of the background color in the "text area" extracted in step S421. The average value is calculated by averaging the R, G, and B values of the extracted background color, as shown in the following "Formula 2."
ここで、Ar,Ag、AbはそれぞれR,G,Bの平均値、nは、抽出された背景色数、「i」は「1」~「n」までの整数、「Ri」、「Gi」、「Bi」はそれぞれ抽出された背景色の「i」番目のR,G,Bの値、Σは総和の計算を表す。 Here, Ar, Ag, and Ab are the average values of R, G, and B, respectively, n is the number of extracted background colors, "i" is an integer from "1" to "n", "Ri", "Gi", and "Bi" are the R, G, and B values of the "i"th extracted background color, respectively, and Σ represents the calculation of the sum.
ここで、ステップS421において抽出した背景色のRGB値と、ステップS422において算出した背景色平均値を対応付けてRAM206に一時的に格納する。例えば、図6のような形で、「No.(601)」、「背景色(602)」および「背景色平均(603)」を関連付けてテーブルデータとして格納する。この「No.(601)」」は文字領域毎に順番に付される。なお、抽出した背景色と算出した平均値が対応付けられて参照できる形になっていればいずれの態様で格納しておいても良い。 Here, the RGB values of the background color extracted in step S421 and the background color average value calculated in step S422 are associated and temporarily stored in RAM 206. For example, as shown in FIG. 6, "No. (601)", "background color (602)" and "background color average (603)" are associated and stored as table data. This "No. (601)" is assigned in order to each character area. Note that any form of storage may be used as long as the extracted background color and the calculated average value can be associated and referenced.
次に、ステップS423において、得られた「単位文字領域情報(x、y、w、h)」を参照し、算出した背景色の平均値を縮小多値画像の「単位文字領域」に割り当てる。つまり、算出した背景色で「縮小多値画像」の「単位文字領域」を穴埋めし、穴埋めした「穴埋め縮小多値画像」を生成する。文字領域穴埋めについては、文字領域穴埋め部308の動作の説明において述べた通りである。 Next, in step S423, the obtained "unit character area information (x, y, w, h)" is referenced, and the calculated average value of the background color is assigned to the "unit character area" of the reduced multi-value image. In other words, the "unit character area" of the "reduced multi-value image" is filled with the calculated background color, and a filled "filled reduced multi-value image" is generated. Character area filling is as described in the explanation of the operation of character area filling unit 308.
次に、ステップS424において、CPU205は「全文字領域」に対する処理が終了したか否かを判定する。「全文字領域」に対する処理が終了していないと判定された場合(N)は、ステップS421に戻る。一方、ステップS424において「全文字領域」に対する処理が終了したと判定された場合(Y)、ステップS425に進む。そして、ステップS425において、CPU205は、ステップS423において生成された「穴埋め縮小多値画像」をJPEG圧縮する。JPEG圧縮については、JPEG圧縮部309の動作の説明において述べた通りである。 Next, in step S424, the CPU 205 determines whether or not processing of the "all character areas" has been completed. If it is determined that processing of the "all character areas" has not been completed (N), the process returns to step S421. On the other hand, if it is determined in step S424 that processing of the "all character areas" has been completed (Y), the process proceeds to step S425. Then, in step S425, the CPU 205 JPEG-compresses the "filled reduced multi-value image" generated in step S423. The JPEG compression is as described in the explanation of the operation of the JPEG compression unit 309.
そして、ステップS426において、CPU205は、ステップS425においてJPEG圧縮された画像に対して色変換を行う。ステップS423において、CPU426は、RAM206に格納されたテーブルデータを参照し、背景色のRGB値を背景色平均のRGB値に置き換える。なお、本実施形態においては、画像全面に対して色変換を行ったが画像内の特定領域のみ色変換するようにしても良い。以上のようにJPEGデータが生成され、RAM206に一時的に格納される。なお、本実施形態においては、置き換え後の背景色のRGB値として「文字領域」内の背景色の平均値としたが、これに限られるものではない。例えば、色分布のピークのRGB値や色分布の特性に応じて決定したRGB値等で置き換えても良い。 Then, in step S426, the CPU 205 performs color conversion on the image JPEG compressed in step S425. In step S423, the CPU 426 refers to the table data stored in the RAM 206 and replaces the RGB values of the background color with the average RGB values of the background color. Note that in this embodiment, color conversion is performed on the entire image, but color conversion may be performed only on a specific area within the image. JPEG data is generated in this manner and temporarily stored in the RAM 206. Note that in this embodiment, the RGB values of the background color after replacement are set to the average value of the background color within the "text area," but this is not limited to this. For example, replacement may be performed with the RGB value of the peak of the color distribution, or with RGB values determined according to the characteristics of the color distribution.
<文字色データの生成>
次に、図4(B)のステップS410~S414を参照して「文字色データ生成」について説明する。まず、ステップS410において、CPU205は、2値画像データ、および、ステップS403において得られた「文字領域情報(X、Y、W、H)」を参照することにより最初の「文字領域」を探索する。次に、ステップS411において、CPU205は、注目する領域である「注目領域」が「文字領域」であるか否かを判定する。「注目領域」が「文字領域」であると判定された場合(Y)、ステップS412へ進む一方、「文字領域」で無いと判定された場合(N)、ステップS414へ進む。
<Generating character color data>
Next, the "character color data generation" will be described with reference to steps S410 to S414 in Fig. 4B. First, in step S410, the CPU 205 searches for the first "character area" by referring to the binary image data and the "character area information (X, Y, W, H)" obtained in step S403. Next, in step S411, the CPU 205 determines whether the "attention area" that is the area of interest is a "character area". If it is determined that the "attention area" is a "character area" (Y), the process proceeds to step S412, whereas if it is determined that the "attention area" is not a "character area" (N), the process proceeds to step S414.
次に、ステップS412において、CPU205は、ステップS403において得られる「文字領域情報(X,Y、W、H)」、および、ステップS404において得られる「単位文字領域情報(x、y、w、h)」を参照して次の処理を行う。即ち、2値画像データの「黒部分」と、ステップS420において生成される「縮小多値画像」との位置を対応させながら「文字領域」毎の文字色を抽出する。代表色の抽出方法については文字色抽出部306の動作の説明において前述した通りである。 Next, in step S412, the CPU 205 performs the following process by referring to the "character area information (X, Y, W, H)" obtained in step S403 and the "unit character area information (x, y, w, h)" obtained in step S404. That is, the CPU 205 extracts the character color for each "character area" while matching the positions of the "black parts" of the binary image data with the "reduced multi-value image" generated in step S420. The method of extracting the representative color is as described above in the explanation of the operation of the character color extraction unit 306.
次に、ステップS413において、CPU205は「全文字領域」に対する処理が終了したか否かを判定する。CPU205が「全文字領域」に対する処理が終了したと判定した場合(Y)、本処理を終了する。一方、CPU205が「全文字領域」に対する処理が終了していないと判定した場合(N)、ステップS414へ進み次の「文字領域」を探索する。以上のように文字領域毎に文字色データが生成され、RAM206に一時的に格納される。 Next, in step S413, CPU 205 determines whether or not processing for "all character areas" has been completed. If CPU 205 determines that processing for "all character areas" has been completed (Y), this process ends. On the other hand, if CPU 205 determines that processing for "all character areas" has not been completed (N), the process proceeds to step S414 and searches for the next "character area." As described above, character color data is generated for each character area and temporarily stored in RAM 206.
<PDF(高圧縮)の生成>
図4のフローチャートで説明したように「MMRデータ」、「JPEGデータ」、「文字色データ」が生成される。CPU205は、これらのデータをPDF形式に変換することでPDF(高圧縮)を生成する。以上のように行うことで、文字背景色等に対し、ブロックノイズ等による色ムラを単一の色に置き換ることができ、PDF(高圧縮)時の色変化を抑制することができる。
<Generating PDF (highly compressed)>
As explained in the flowchart of Fig. 4, "MMR data", "JPEG data", and "character color data" are generated. The CPU 205 generates a PDF (high compression) by converting these data into PDF format. By performing the above, color unevenness due to block noise, etc. in the character background color, etc. can be replaced with a single color, and color changes at the time of PDF (high compression) can be suppressed.
<第2実施形態>
第1実施形態においては、「文字領域」内の背景色のRGB値が色変換の対象であった。しかし、PDF(高圧縮)における色味変化の要因として、圧縮によるブロックノイズ、解像度変換以外に「下地補正」がある。「下地補正」は、画像の紙の部分等の下地にあたる領域を補正するものである。一般的に、印刷物をスキャンした場合、白い紙を読み込んだ場合でも、スキャン後の色は完全な白色とはならず、少し色が付いた状態になりノイズ等も発生する。
Second Embodiment
In the first embodiment, the RGB values of the background color in the "text area" were the subject of color conversion. However, factors that cause color changes in PDF (high compression) include "background correction" in addition to block noise due to compression and resolution conversion. "Background correction" corrects the background area of the image, such as the paper part. Generally, when scanning a printed material, even if white paper is read, the color after scanning will not be completely white, but will be slightly colored and noise will occur.
そこで、下地を補正することで、紙部分等の下地を「白色」に補正しノイズも同時に除去することで、スキャン後の画像の視認性を向上させ、圧縮効果を向上するができる。通常、「下地補正」は、明るい信号値(例えば、RGB値であれば各々「240」等)よりも高い値は全て白(RGB値「255」)に置き換えることを行う。しかしながら、この置き換えは画像全面に行うため、下地以外でも明るい信号値であれば「255」に置き換えられ色変化が発生する。そこで、「下地領域」とその下地色の値を抽出し、「下地領域」に対してのみ、下地色を白に置き換えることにより「下地補正」時でも下地領域以外の色味の変化を抑えたPDF(高圧縮)処理を行う。なお、第1実施形態と同様の処理に関しては説明を省略する。 Therefore, by correcting the background, the background of the paper part, etc. is corrected to "white" and noise is removed at the same time, improving the visibility of the image after scanning and improving the compression effect. Normally, "background correction" replaces all values higher than a bright signal value (for example, RGB values of "240" etc.) with white (RGB value "255"). However, since this replacement is performed on the entire image, bright signal values other than the background are replaced with "255", causing color changes. Therefore, by extracting the "background area" and the value of the background color, and replacing the background color only for the "background area" with white, PDF (high compression) processing is performed with reduced color changes other than the background area even during "background correction". Note that a description of the same processing as in the first embodiment will be omitted.
図9は第2実施形態における「JPEGデータ生成」の処理を示すフローチャートである。図9におけるステップS900~S904は、第1実施形態における図4(C)と同一の処理であるため重複説明を省略する。まず、ステップS905において、CPU205は、ステップS903にける「文字領域穴埋め」処理後の画像から「下地領域」を検出する。例えば、「下地領域」は「文字領域穴埋め」処理後の画像の色分布を抽出し、分布が多い色で、かつ、明るい色である信号値範囲を「下地信号値」とし当該「下地信号値」を持つ画素群を「下地領域」とする。もちろん、下地領域が検出でき下地の信号値が抽出できればいずれの方法を採用しても良い。 Figure 9 is a flow chart showing the "JPEG data generation" process in the second embodiment. Steps S900 to S904 in Figure 9 are the same as those in Figure 4 (C) in the first embodiment, so repeated explanations will be omitted. First, in step S905, the CPU 205 detects a "background region" from the image after the "text region filling" process in step S903. For example, the "background region" is determined by extracting the color distribution of the image after the "text region filling" process, and determining the signal value range that is a commonly distributed color and is bright as the "background signal value" and the group of pixels that have this "background signal value" as the "background region." Of course, any method may be used as long as the background region can be detected and the background signal value can be extracted.
次に、ステップS906において、CPU205は、検出した「下地領域」の「下地信号」の変換信号値を決定する。基本的には「白」に置き換えるため、RGBであればR,G,Bの値を「255」に置き換える。なお、スキャン対象の印刷物の紙が色紙であるなど下地を白以外に置き換えたい場合は、その紙色に合わせて変換色を決定してもよい。 Next, in step S906, the CPU 205 determines the conversion signal value of the "background signal" of the detected "background area." Basically, to replace it with "white," if it is RGB, the R, G, and B values are replaced with "255." Note that if you want to replace the background with something other than white, such as if the paper of the printed matter to be scanned is colored paper, the conversion color may be determined to match the color of the paper.
ステップS907(JPEG圧縮)、ステップS908(色変換)は、第1実施形態(図4(C))と同じ処理であるため重複説明を省略する。以上のような処理を実行することにより「下地色」は白に置き換えつつ、文字領域内の背景色等は色味を変化させないようにすることができる。 Step S907 (JPEG compression) and step S908 (color conversion) are the same processes as in the first embodiment (FIG. 4(C)), so a duplicated explanation will be omitted. By performing the above-described processes, the "base color" can be replaced with white while the color of the background in the text area and the like is not changed.
以上説明したように、CPU205は、多値画像データの下地領域を検出し(下地領域検出部)、また、CPU205は、検出された下地領域から下地の変換色を決定する(下地色決定部)。そして、CPU205は、JPEG圧縮等で圧縮した画像内の下地領域における下地色を、下地色決定部により決定された変換色に置き換える(下地色変換部)。これにより、紙部分等の下地を「白色」に補正しノイズも同時に除去することで、スキャン後の画像の視認性を向上させ、圧縮効果を向上するができる。 As described above, the CPU 205 detects the background area of the multi-value image data (background area detection section), and determines the conversion color of the background from the detected background area (background color determination section). The CPU 205 then replaces the background color in the background area of the image compressed using JPEG compression or the like with the conversion color determined by the background color determination section (background color conversion section). This makes it possible to improve the visibility of the scanned image and the compression effect by correcting the background of the paper part, etc. to "white" and simultaneously removing noise.
<変形例>
(1)MFP101とネットワーク接続されるのは、PCの他に携帯端末等でも良い。携帯端末にはスマートフォン、タブレット端末等のモバイル端末が挙げられる。また、ネットワークは通信線等の有線通信の他に、ネットワークの一部または全部を無線通信としても良い。(2)また、色変換に使用するRBG値であって推奨されるものを複数個、予め不揮発的に記憶しておきこれらのいずれかを採用するようにしても良い。
<Modification>
(1) The device connected to the MFP 101 via a network may be a mobile terminal or the like in addition to a PC. Examples of the mobile terminal include mobile terminals such as smartphones and tablet terminals. In addition to wired communication such as a communication line, the network may be partially or entirely wireless communication. (2) Furthermore, a plurality of recommended RGB values to be used for color conversion may be stored in advance in a non-volatile manner, and any one of these may be adopted.
<追記>
本実施形態の開示は、以下の構成を含む。
(構成1) 文字を含む矩形領域を文字領域として抽出可能な画像処理装置であって、
入力された多値画像データの中から文字領域を検出する検出部と、
前記検出部により検出された文字領域内における文字を切り出し、当該文字領域内において単一文字の存在領域である単位文字領域を得る切り出し部と、
前記切り出し部により切り出された文字以外の文字領域内の背景色の色分布に基づいて決定した変換色を、前記多値画像データを縮小した縮小多値画像における文字領域内における単位文字領域に割り当てて出力する割り当て部と、
前記割り当て部による出力画像を圧縮した画像内の文字領域における背景色に相当する色を前記変換色で置き換える色変換部と、を備えることを特徴とする画像処理装置。
(構成2) 前記割り当て部は、前記文字領域内の背景色の色信号の平均値を変換色と決定することを特徴する構成1に記載の画像処理装置。
(構成3) 前記割り当て部は、前記色分布に基づいて、前記背景色の色信号毎の頻度分布を示すヒストグラムを作成し、作成したヒストグラムにおいて最多頻度を示す色を変換色とすることを特徴する構成1に記載の画像処理装置。
(構成4) 文字領域内の背景色と、変換色とを関連付けて記憶する関連付け部を更に備え、
前記色変換部は、前記関連付け部の記憶内容を参照して、文字領域内の背景色を変換色で置き換えることを特徴とする構成1乃至3のいずれか一項に記載の画像処理装置。
(構成5) 前記検出された文字領域毎の文字色を抽出する文字色抽出部を更に備えたことを特徴とする構成1乃至3のいずれか一項に記載の画像処理装置。
(構成6) 前記文字色抽出部は更に、
前記多値画像データの2値画像データの黒部分の位置と、前記縮小多値画像における前記黒部分に対応する位置の色とを比較し、文字領域中の文字毎の文字色を抽出することを特徴とする構成5に記載の画像処理装置。
(構成7) 前記文字色抽出部は更に、
前記2値画像データにおいて黒画素数が最も多い文字の平均色を文字色の代表色として出力することを特徴とする構成6に記載の画像処理装置。
(構成8) 前記多値画像データを2値化した画像データにおいて、前記検出部により検出された文字領域に対してMMR圧縮を行うMMR圧縮部と、
前記MR圧縮部により圧縮されたMMRデータ、前記文字色抽出部より抽出された文字色、および、前記出力画像をJPEG圧縮した画像内の文字領域における背景色を前記色変換部で色変換されたJPEGデータを合成するPDF生成部と、を更に備えたことを特徴とする構成5乃至7のいずれか一項に記載の画像処理装置。
(構成9) 前記多値画像データの下地領域を検出する下地領域検出部と、
前記下地領域検出部により検出された下地領域から下地の変換色を決定する下地色決定部と、
圧縮した画像内の下地領域における下地色を前記下地色決定部により決定された変換色に置き換える下地色変換部と、更に備えたことを特徴とする請求項1乃至7のいずれか一項に記載の画像処理装置。
<Additional Note>
The disclosure of this embodiment includes the following configuration.
(Configuration 1) An image processing device capable of extracting a rectangular area including characters as a character area, comprising:
a detection unit for detecting a character region from input multi-value image data;
a segmentation unit that segments a character within the character region detected by the detection unit, and obtains a unit character region, which is a region in which a single character exists within the character region;
an allocation unit that allocates a conversion color determined based on a color distribution of a background color in a character area other than the character extracted by the extraction unit to a unit character area in the character area in a reduced multi-value image obtained by reducing the multi-value image data, and outputs the conversion color;
a color conversion unit that replaces a color corresponding to a background color in a character area in an image obtained by compressing an output image from the allocation unit with the conversion color.
(Configuration 2) The image processing device according to configuration 1, wherein the allocating section determines an average value of color signals of a background color within the character region as the conversion color.
(Configuration 3) The image processing device according to configuration 1, wherein the allocating unit creates a histogram indicating a frequency distribution for each color signal of the background color based on the color distribution, and sets a color showing a highest frequency in the created histogram as a conversion color.
(Configuration 4) The apparatus further includes an association unit that associates a background color in a character region with a conversion color and stores the associated color,
4. The image processing device according to claim 1, wherein the color conversion unit replaces a background color in a character area with a conversion color by referring to the contents stored in the association unit.
(Configuration 5) The image processing device according to any one of configurations 1 to 3, further comprising a character color extraction unit that extracts a character color for each of the detected character areas.
(Configuration 6) The character color extraction unit further comprises:
The image processing device according to configuration 5, characterized in that a position of a black portion of the binary image data of the multi-value image data is compared with a color of a position corresponding to the black portion in the reduced multi-value image, and a character color of each character in a character area is extracted.
(Configuration 7) The character color extraction unit further comprises:
7. The image processing apparatus according to configuration 6, wherein an average color of a character having the largest number of black pixels in the binary image data is output as a representative color of the character color.
(Configuration 8) An MMR compression unit that performs MMR compression on a character region detected by the detection unit in the image data obtained by binarizing the multi-value image data;
The image processing device according to any one of configurations 5 to 7, further comprising: a PDF generation unit that synthesizes JPEG data obtained by color conversion of the MMR data compressed by the MR compression unit, the character color extracted by the character color extraction unit, and a background color in a character area in an image obtained by JPEG compressing the output image by the color conversion unit.
(Configuration 9) A background area detection unit for detecting a background area of the multi-value image data;
a background color determination unit that determines a converted background color from the background area detected by the background area detection unit;
8. The image processing apparatus according to claim 1, further comprising a background color conversion unit that replaces a background color in a background area in the compressed image with the conversion color determined by the background color determination unit.
以上、本発明の好ましい実施形態について説明したが、本発明は上述した実施の形態に限定されず、その要旨の範囲内で種々の変形および変更が可能である。例えば、本発明は、上述の実施の形態の1以上の機能を実現するプログラムを、ネットワークや記録媒体を介してシステムや装置に供給し、そのシステムまたは装置のコンピュータのプロセッサがプログラムを読みだして実行する処理でも実現可能である。また、本発明は、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 Although the preferred embodiment of the present invention has been described above, the present invention is not limited to the above-mentioned embodiment, and various modifications and variations are possible within the scope of the gist of the present invention. For example, the present invention can also be realized by supplying a program that realizes one or more of the functions of the above-mentioned embodiment to a system or device via a network or recording medium, and having the computer processor of the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., an ASIC) that realizes one or more functions.
101 MFP
102 クライアントPC
201 スキャナ部
202 プリンタ部
205 CPU
206 RAM
207 操作部
210 ROM
211 記憶部
215 データ処理部
213 RIP部
301 グレー変換部
302 2値化部
303 第一の領域判定部
304 第二の領域判定部
305 MMR圧縮部
306 文字色抽出部
307 縮小部
308 文字領域穴埋め部
309 JPEG圧縮部
310 PDF生成部
311 色変換部
101 MFP
102 Client PC
201 Scanner unit 202 Printer unit 205 CPU
206 RAM
207 Operation unit 210 ROM
211 Storage unit 215 Data processing unit 213 RIP unit 301 Gray conversion unit 302 Binarization unit 303 First area determination unit 304 Second area determination unit 305 MMR compression unit 306 Character color extraction unit 307 Reduction unit 308 Character area filling unit 309 JPEG compression unit 310 PDF generation unit 311 Color conversion unit
Claims (11)
入力された多値画像データの中から文字領域を検出する検出部と、
前記検出部により検出された文字領域内における文字を切り出し、当該文字領域内において単一文字の存在領域である単位文字領域を得る切り出し部と、
前記切り出し部により切り出された文字以外の文字領域内の背景色の色分布に基づいて決定した変換色を、前記多値画像データを縮小した縮小多値画像における文字領域内における単位文字領域に割り当てて出力する割り当て部と、
前記割り当て部による出力画像を圧縮した画像内の文字領域における背景色に相当する色を前記変換色で置き換える色変換部と、を備えることを特徴とする画像処理装置。 An image processing device capable of extracting a rectangular area including characters as a character area,
a detection unit for detecting a character region from input multi-value image data;
a segmentation unit that segments a character within the character region detected by the detection unit, and obtains a unit character region, which is a region in which a single character exists within the character region;
an allocation unit that allocates a conversion color determined based on a color distribution of a background color in a character area other than the character extracted by the extraction unit to a unit character area in the character area in a reduced multi-value image obtained by reducing the multi-value image data, and outputs the conversion color;
a color conversion unit that replaces a color corresponding to a background color in a character area in an image obtained by compressing an output image from the allocation unit with the conversion color.
前記文字領域内の背景色の色信号の平均値を変換色と決定することを特徴する請求項1に記載の画像処理装置。 The allocation unit:
2. The image processing apparatus according to claim 1, wherein an average value of the color signals of the background color within the character area is determined as the converted color.
前記色分布に基づいて、前記背景色の色信号毎の頻度分布を示すヒストグラムを作成し、作成したヒストグラムにおいて最多頻度を示す色を変換色とすることを特徴する請求項1に記載の画像処理装置。 The allocation unit:
2. The image processing apparatus according to claim 1, further comprising: a histogram showing a frequency distribution for each color signal of the background color based on the color distribution; and a color showing the highest frequency in the histogram is determined as the conversion color.
前記色変換部は、前記関連付け部の記憶内容を参照して、文字領域内の背景色を変換色で置き換えることを特徴とする請求項1乃至3のいずれか一項に記載の画像処理装置。 The method further includes an association unit that associates and stores a background color in the character area with a conversion color,
4. The image processing apparatus according to claim 1, wherein the color conversion unit replaces a background color in a character area with a conversion color by referring to the contents stored in the association unit.
前記多値画像データの2値画像データの黒部分の位置と、前記縮小多値画像における前記黒部分に対応する位置の色とを比較し、文字領域中の文字毎の文字色を抽出することを特徴とする請求項5に記載の画像処理装置。 The character color extraction unit further
6. The image processing device according to claim 5, further comprising: a processor for processing the image data; a processor for processing the image data; and a processor for processing the image data.
前記2値画像データにおいて黒画素数が最も多い文字の平均色を文字色の代表色として出力することを特徴とする請求項6に記載の画像処理装置。 The character color extraction unit further
7. The image processing apparatus according to claim 6, wherein an average color of a character having the largest number of black pixels in the binary image data is output as a representative color of the character.
前記MR圧縮部により圧縮されたMMRデータ、前記文字色抽出部より抽出された文字色、および、前記出力画像をJPEG圧縮した画像内の文字領域における背景色を前記色変換部で色変換されたJPEGデータを合成するPDF生成部と、を更に備えたことを特徴とする請求項5に記載の画像処理装置。 an MMR compression unit that performs MMR compression on the character region detected by the detection unit in the image data obtained by binarizing the multi-value image data;
6. The image processing device according to claim 5, further comprising a PDF generation unit that synthesizes the MMR data compressed by the MR compression unit, the character color extracted by the character color extraction unit, and JPEG data color-converted by the color conversion unit into a background color in a character area in an image obtained by JPEG compressing the output image.
前記下地領域検出部により検出された下地領域から下地の変換色を決定する下地色決定部と、
圧縮した画像内の下地領域における下地色を前記下地色決定部により決定された変換色に置き換える下地色変換部と、更に備えたことを特徴とする請求項1乃至3のいずれか一項に記載の画像処理装置。 a background region detection unit for detecting a background region of the multi-value image data;
a background color determination unit that determines a converted background color from the background area detected by the background area detection unit;
4. The image processing apparatus according to claim 1, further comprising a background color conversion unit that replaces a background color in a background area in the compressed image with the conversion color determined by the background color determination unit.
入力された多値画像データの中から文字領域を検出する検出工程と、
前記検出工程により検出された文字領域内における文字を切り出し、当該文字領域内において単一文字の存在領域である単位文字領域を得る切り出し工程と、
前記切り出し工程により切り出された文字以外の文字領域内の背景色の色分布に基づいて決定した変換色を、前記多値画像データを縮小した縮小多値画像における文字領域内における単位文字領域に割り当てて出力する割り当て工程と、
前記割り当て工程の出力画像を圧縮した画像内の文字領域における背景色に相当する色を前記変換色で置き換える色変換工程と、を有することを特徴とする画像処理方法。 A method for controlling an image processing device capable of extracting a rectangular area including characters as a character area, comprising the steps of:
a detection step of detecting a character region from inputted multi-value image data;
a segmentation step of segmenting a character from within the character region detected by the detection step, and obtaining a unit character region, which is a region in which a single character exists within the character region;
an allocating step of allocating converted colors determined based on a color distribution of a background color in a character region other than the characters extracted in the extracting step to unit character regions in the character region in a reduced multi-valued image obtained by reducing the multi-valued image data, and outputting the converted colors;
a color conversion step of replacing a color corresponding to a background color in a character area in an image obtained by compressing the output image of the allocation step with the conversion color.
前記制御方法は、
入力された多値画像データの中から文字領域を検出する検出工程と、
前記検出工程により検出された文字領域内における文字を切り出し、当該文字領域内において単一文字の存在領域である単位文字領域を得る切り出し工程と、
前記切り出し工程により切り出された文字以外の文字領域内の背景色の色分布に基づいて決定した変換色を、前記多値画像データを縮小した縮小多値画像における文字領域内における単位文字領域に割り当てて出力する割り当て工程と、
前記割り当て工程の出力画像を圧縮した画像内の文字領域における背景色に相当する色を前記変換色で置き換える色変換工程と、を有することを特徴とするプログラム。 A program for causing a computer to execute a control method for an image processing device capable of extracting a rectangular area including characters as a character area, the program comprising:
The control method includes:
a detection step of detecting a character region from inputted multi-value image data;
a segmentation step of segmenting a character from within the character region detected by the detection step, and obtaining a unit character region, which is a region in which a single character exists within the character region;
an allocating step of allocating a converted color determined based on a color distribution of a background color in a character region other than the characters extracted in the extracting step to a unit character region in the character region in a reduced multi-valued image obtained by reducing the multi-valued image data, and outputting the converted color;
a color conversion step of replacing a color corresponding to a background color in a character area in an image obtained by compressing an output image from the allocation step with the conversion color.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022193494A JP2024080365A (en) | 2022-12-02 | 2022-12-02 | Image processing device, control method thereof, and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022193494A JP2024080365A (en) | 2022-12-02 | 2022-12-02 | Image processing device, control method thereof, and program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2024080365A true JP2024080365A (en) | 2024-06-13 |
Family
ID=91432072
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2022193494A Pending JP2024080365A (en) | 2022-12-02 | 2022-12-02 | Image processing device, control method thereof, and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2024080365A (en) |
-
2022
- 2022-12-02 JP JP2022193494A patent/JP2024080365A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5875637B2 (en) | Image processing apparatus and image processing method | |
| JP5132530B2 (en) | Image coding apparatus, image processing apparatus, and control method thereof | |
| US8503036B2 (en) | System and method of improving image quality in digital image scanning and printing by reducing noise in output image data | |
| US8384964B2 (en) | Image processing apparatus and image processing method | |
| JP6743092B2 (en) | Image processing apparatus, image processing control method, and program | |
| US8670623B2 (en) | Image processing apparatus, image conversion method, and computer-readable storage medium for computer program based on calculated degree of complexity | |
| US8971647B2 (en) | Image compression apparatus, image compression method, and storage medium | |
| JP3715905B2 (en) | Image processing apparatus, image processing method, program, and storage medium | |
| JP4582200B2 (en) | Image processing apparatus, image conversion method, and computer program | |
| JP6370080B2 (en) | Image processing apparatus, image processing method, and program. | |
| JP2003244447A (en) | Image processing apparatus and image processing method | |
| JP7185451B2 (en) | Image processing device, image processing method, and program | |
| US10931852B2 (en) | Image processing apparatus, image processing method, and storage medium, with determining whether or not character clipping rectangle determined to be non-character region is character region | |
| JP2022030055A (en) | Image processing apparatus, image processing method, and program | |
| JP7654375B2 (en) | IMAGE PROCESSING APPARATUS, CONTROL METHOD FOR IMAGE PROCESSING APPARATUS, AND PROGRAM | |
| JP2024080365A (en) | Image processing device, control method thereof, and program | |
| US11924390B2 (en) | Apparatus, method, and storage medium for performing color reduction processing | |
| JP4695914B2 (en) | Image processing apparatus and image processing method | |
| JP4375106B2 (en) | Image processing device | |
| JP4710672B2 (en) | Character color discrimination device, character color discrimination method, and computer program | |
| US12499592B2 (en) | Image processing apparatus for generating color-reduced image, control method thereof, and storage medium | |
| JP2024097205A (en) | IMAGE PROCESSING APPARATUS, CONTROL METHOD FOR IMAGE PROCESSING APPARATUS, AND PROGRAM | |
| US9098768B2 (en) | Character detection apparatus, character detection method, and computer-readable storage medium | |
| JP2020102148A (en) | Image processing device, image processing method, and program | |
| JP4123071B2 (en) | Image processing device |