JP2015089048A - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP2015089048A
JP2015089048A JP2013227649A JP2013227649A JP2015089048A JP 2015089048 A JP2015089048 A JP 2015089048A JP 2013227649 A JP2013227649 A JP 2013227649A JP 2013227649 A JP2013227649 A JP 2013227649A JP 2015089048 A JP2015089048 A JP 2015089048A
Authority
JP
Japan
Prior art keywords
unit
image data
image
histogram
input
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
JP2013227649A
Other languages
Japanese (ja)
Other versions
JP6224419B2 (en
Inventor
貴良 岩本
Takayoshi Iwamoto
貴良 岩本
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Data Corp
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 Oki Data Corp filed Critical Oki Data Corp
Priority to JP2013227649A priority Critical patent/JP6224419B2/en
Publication of JP2015089048A publication Critical patent/JP2015089048A/en
Application granted granted Critical
Publication of JP6224419B2 publication Critical patent/JP6224419B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To perform appropriate correction processing on input image data.SOLUTION: An image processing device includes: an image reading unit 41 for reading out input image data from a first image storage unit, to generate a first conversion image data; a histogram generator unit 43 for generating a histogram on the basis of the first conversion image data; a validity determination unit 44 for determining whether the histogram is valid; a parameter derivation unit 45 for setting a parameter when the histogram is valid; an image correction unit 46 for correcting the first conversion image data on the basis of the parameter; and an image output unit 54 for reading out an output image data recorded in a second image storage unit to output to an output device. Because the parameter is set when the histogram is valid, the parameter can be calculated with high accuracy on the basis of the histogram.

Description

本発明は、画像処理装置に関するものである。   The present invention relates to an image processing apparatus.

従来、複写機、複合機等の画像処理装置、例えば、複合機においては、スキャナ部で原稿の画像が読み取られ、読取データが入力画像データとして画像処理部に送られ、該画像処理部において入力画像データに基づいて出力画像データが生成されてプリンタ部に送られ、該プリンタ部において出力画像データに基づいて印刷が行われるようになっている。   2. Description of the Related Art Conventionally, in an image processing apparatus such as a copying machine or a multifunction machine, for example, a multifunction machine, an image of a document is read by a scanner unit, and the read data is sent to the image processing unit as input image data, and input by the image processing unit Output image data is generated based on the image data and sent to the printer unit, and printing is performed based on the output image data in the printer unit.

この場合、画像処理部において、入力画像データに対して、原稿の下地領域の色成分(背景色)を除去するための下地除去処理、原稿の裏面の画像が透けて表面に現れる裏写りを除去するための裏写り除去処理等の補正処理が行われる。   In this case, the image processing unit removes the background removal process for removing the color component (background color) of the background area of the document from the input image data, and removes the show-through that appears on the front surface of the image on the back side of the document. Correction processing such as show-through removal processing is performed.

そのために、入力画像データにおける濃度情報のヒストグラムが作成され、該ヒストグラムの最頻値が特徴量(基準濃度)として算出され、該特徴量に基づいて前記下地除去処理、裏写り除去処理等の補正処理が行われる(例えば、特許文献1参照。)。   For this purpose, a histogram of density information in the input image data is created, the mode value of the histogram is calculated as a feature amount (reference density), and corrections such as the background removal processing and show-through removal processing are performed based on the feature amount. A process is performed (for example, refer patent document 1).

特開2010−93684号公報JP 2010-93684 A

しかしながら、前記従来の複合機においては、入力画像データのすべての濃度情報を取得し、ヒストグラムを作成しようとすると、ヒストグラムを記録するための記憶容量の大きいメモリが必要になり、複合機のコストが高くなってしまう。   However, in the conventional multi-function device, if all density information of the input image data is acquired and a histogram is to be created, a memory having a large storage capacity for recording the histogram is required, and the cost of the multi-function device is reduced. It will be high.

そこで、入力画像データを限定したり、濃度情報を間引きしたりしてサンプリングを行い、サンプリングによって取得される濃度情報の数、すなわち、サンプリング数を少なくするようにしているが、サンプリング数が少ないと、ヒストグラムに基づいて特徴量を精度良く算出することができない。したがって、入力画像データに対して適正な補正処理を行うことができなくなってしまう。   Therefore, sampling is performed by limiting input image data or thinning out density information, and the number of density information acquired by sampling, that is, the number of sampling is reduced, but if the number of sampling is small Therefore, it is not possible to accurately calculate the feature amount based on the histogram. Therefore, it becomes impossible to perform an appropriate correction process on the input image data.

本発明は、前記従来の複合機の問題点を解決して、入力画像データに対して適正な補正処理を行うことができる画像処理装置を提供することを目的とする。   It is an object of the present invention to provide an image processing apparatus that can solve the problems of the conventional multi-function peripheral and can perform appropriate correction processing on input image data.

そのために、本発明の画像処理装置においては、画像入力部によって取得された入力画像データを記録するための第1の画像記憶部と、該第1の画像記憶部から前記入力画像データを読み出し、色空間を変換して第1の変換画像データを生成する画像読出部と、前記第1の変換画像データに基づいてヒストグラムを作成するヒストグラム作成部と、該ヒストグラム作成部によって作成されたヒストグラムが有効であるかどうかを判断する有効性判定部と、ヒストグラムが有効である場合に、入力画像データを補正するためのパラメータを設定するパラメータ導出部と、該パラメータ導出部によって設定されたパラメータに基づいて、前記第1の変換画像データを補正し、第2の変換画像データを生成する画像補正部と、前記第2の変換画像データを読み込み、色空間を変換して出力画像データを生成し、第2の画像記憶部に記録する画像書込部と、前記第2の画像記憶部に記録された出力画像データを読み出して出力デバイスに送る画像出力部とを有する。   Therefore, in the image processing apparatus of the present invention, the first image storage unit for recording the input image data acquired by the image input unit, and the input image data is read from the first image storage unit, An image reading unit that converts color space to generate first converted image data, a histogram generation unit that generates a histogram based on the first converted image data, and a histogram generated by the histogram generation unit are effective Based on the parameter set by the parameter deriving unit, the parameter deriving unit for setting a parameter for correcting the input image data when the histogram is valid, An image correction unit that corrects the first converted image data and generates second converted image data; and the second converted image data. Output image data by converting the color space, generating output image data, and reading and outputting the output image data recorded in the second image storage unit And an image output unit to be sent to the device.

本発明によれば、画像処理装置においては、画像入力部によって取得された入力画像データを記録するための第1の画像記憶部と、該第1の画像記憶部から前記入力画像データを読み出し、色空間を変換して第1の変換画像データを生成する画像読出部と、前記第1の変換画像データに基づいてヒストグラムを作成するヒストグラム作成部と、該ヒストグラム作成部によって作成されたヒストグラムが有効であるかどうかを判断する有効性判定部と、ヒストグラムが有効である場合に、入力画像データを補正するためのパラメータを設定するパラメータ導出部と、該パラメータ導出部によって設定されたパラメータに基づいて、前記第1の変換画像データを補正し、第2の変換画像データを生成する画像補正部と、前記第2の変換画像データを読み込み、色空間を変換して出力画像データを生成し、第2の画像記憶部に記録する画像書込部と、前記第2の画像記憶部に記録された出力画像データを読み出して出力デバイスに送る画像出力部とを有する。   According to the present invention, in the image processing device, the first image storage unit for recording the input image data acquired by the image input unit, and the input image data is read from the first image storage unit, An image reading unit that converts color space to generate first converted image data, a histogram generation unit that generates a histogram based on the first converted image data, and a histogram generated by the histogram generation unit are effective Based on the parameter set by the parameter deriving unit, the parameter deriving unit for setting a parameter for correcting the input image data when the histogram is valid, An image correction unit that corrects the first converted image data and generates second converted image data; and the second converted image data Read, convert color space to generate output image data, and record in the second image storage unit; read out output image data recorded in the second image storage unit and output to the output device And an image output unit to be sent.

この場合、ヒストグラム作成部によって作成されたヒストグラムが有効であるかどうかが判断され、ヒストグラムが有効である場合に、パラメータ導出部によってパラメータが設定され、該パラメータに基づいて第1の変換画像データが補正されるので、ヒストグラムに基づいてパラメータを精度良く算出することができる。したがって、入力画像データに対して適正な補正処理を行うことができる。   In this case, it is determined whether or not the histogram created by the histogram creation unit is valid. If the histogram is valid, a parameter is set by the parameter deriving unit, and the first converted image data is generated based on the parameter. Since the correction is made, the parameters can be calculated with high accuracy based on the histogram. Therefore, an appropriate correction process can be performed on the input image data.

本発明の第1の実施の形態における制御部の制御ブロック図である。It is a control block diagram of the control part in the 1st Embodiment of this invention. 本発明の第1の実施の形態における複合機の斜視図である。1 is a perspective view of a multifunction machine according to a first embodiment of the present invention. 本発明の第1の実施の形態における複合機の制御ブロック図である。FIG. 2 is a control block diagram of the multifunction machine according to the first embodiment of the present invention. 本発明の第1の実施の形態におけるサンプリング条件判定部の制御ブロック図である。It is a control block diagram of the sampling condition determination part in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるパラメータ導出部の制御ブロック図である。It is a control block diagram of a parameter deriving unit in the first embodiment of the present invention. 本発明の第1の実施の形態における複合機の動作を示す第1のフローチャートである。3 is a first flowchart illustrating an operation of the multifunction peripheral according to the first embodiment of the present invention. 本発明の第1の実施の形態における複合機の動作を示す第2のフローチャートである。It is a 2nd flowchart which shows operation | movement of the multifunctional device in the 1st Embodiment of this invention. 本発明の第1の実施の形態における間引き対象画素を説明するための図である。It is a figure for demonstrating the thinning-out object pixel in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるヒストグラムの度数分布の例を示す図である。It is a figure which shows the example of the frequency distribution of the histogram in the 1st Embodiment of this invention. 本発明の第1の実施の形態における設定変換テーブルの例を示す図である。It is a figure which shows the example of the setting conversion table in the 1st Embodiment of this invention. 本発明の第1の実施の形態における汎用変換テーブルの例を示す図である。It is a figure which shows the example of the general purpose conversion table in the 1st Embodiment of this invention. ヒストグラムの総画素数が小さい場合の入力画像データの例を示す図である。It is a figure which shows the example of input image data in case the total number of pixels of a histogram is small. ヒストグラムの総画素数が小さい場合の出力画像データの例を示す図である。It is a figure which shows the example of output image data in case the total number of pixels of a histogram is small. ヒストグラムの総画素数が小さい場合に作成されるヒストグラムの例を示す図である。It is a figure which shows the example of the histogram produced when the total number of pixels of a histogram is small. 本発明の第2の実施の形態における制御部の制御ブロック図である。It is a control block diagram of the control part in the 2nd Embodiment of this invention. 本発明の第2の実施の形態における複合機の動作を示す第1のフローチャートである。6 is a first flowchart illustrating an operation of the multifunction peripheral according to the second embodiment of the present invention. 本発明の第2の実施の形態における複合機の動作を示す第2のフローチャートである。It is a 2nd flowchart which shows operation | movement of the multifunctional device in the 2nd Embodiment of this invention. 本発明の第1の実施の形態における画像読出部及び画像書込部の動作を示す図である。It is a figure which shows operation | movement of the image reading part in the 1st Embodiment of this invention, and an image writing part. 本発明の第2の実施の形態における画像読出部及び画像書込部の動作を示す図である。It is a figure which shows operation | movement of the image reading part in the 2nd Embodiment of this invention, and an image writing part.

以下、本発明の実施の形態について図面を参照しながら詳細に説明する。この場合、画像処理装置としてのカラーの複合機について説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In this case, a color multifunction peripheral as an image processing apparatus will be described.

図2は本発明の第1の実施の形態における複合機の斜視図、図3は本発明の第1の実施の形態における複合機の制御ブロック図である。   FIG. 2 is a perspective view of the multifunction device according to the first embodiment of the present invention, and FIG. 3 is a control block diagram of the multifunction device according to the first embodiment of the present invention.

図において、10はカラーの複合機、20は第1の媒体としての原稿の画像を読み取り、読取データを発生させるスキャナ部、30は、該スキャナ部20から送られた読取データを画像データとして受け、画像データに基づいて第2の媒体としての用紙に画像を形成(印刷)する出力デバイスとしての電子写真方式のプリンタ部、PLは操作パネルである。該操作パネルPLには、スイッチ、ボタン等から成る操作部P1、及び液晶パネル等から成る表示部P2が配設される。   In the figure, 10 is a color multifunction peripheral, 20 is a scanner unit that reads an image of a document as a first medium and generates read data, and 30 receives the read data sent from the scanner unit 20 as image data. An electrophotographic printer unit, PL, is an operation panel as an output device for forming (printing) an image on a sheet as a second medium based on the image data. The operation panel PL is provided with an operation unit P1 including switches and buttons, and a display unit P2 including a liquid crystal panel.

前記スキャナ部20は、原稿を載置するための載置台としてのフラットベッド101、該フラットベッド101を覆うカバー102、該カバー102に配設され、原稿を自動的に給紙するための自動原稿送り装置(ADF)103、前記フラットベッド101の下方に配設され、原稿の画像を読み取る画読取部としての図示されない読取ヘッド、該読取ヘッドによって生成された画像信号に基づいて、ビットマップデータから成る画像データ、すなわち、入力画像データを生成する図示されない信号処理部等を備える。   The scanner unit 20 includes a flat bed 101 as a mounting table on which a document is placed, a cover 102 that covers the flat bed 101, and an automatic document that is disposed on the cover 102 and automatically feeds the document. A feeding device (ADF) 103, a reading head (not shown) as an image reading unit that is arranged below the flat bed 101 and reads an image of a document, and based on the bitmap data based on an image signal generated by the reading head Image signal, that is, a signal processing unit (not shown) for generating input image data.

前記読取ヘッドは、光源、受光素子等を備え、フラットベッド101に載置された原稿の画像を読み取る場合、フラットベッド101に沿って移動させられ、自動原稿送り装置103によって給紙された原稿の画像を読み取る場合、所定の位置に置かれて、光源からの光を原稿に照射し、原稿によって反射させられた光、すなわち、反射光を受光素子によって受光して画像信号を生成し、前記信号処理部に送る。   The reading head includes a light source, a light receiving element, and the like. When reading an image of a document placed on the flat bed 101, the reading head is moved along the flat bed 101 and the document fed by the automatic document feeder 103 is read. When reading an image, it is placed at a predetermined position, irradiates light from a light source onto the document, and light reflected by the document, that is, reflected light is received by a light receiving element to generate an image signal. Send to processing section.

該信号処理部は、読取ヘッドから送られた画像信号を受け、画像信号に対してA/D変換、シェーディング補正等の信号処理を行い、前記入力画像データを生成し、入力インタフェース11を介して制御部12に送る。   The signal processing unit receives the image signal sent from the reading head, performs signal processing such as A / D conversion and shading correction on the image signal, generates the input image data, and inputs the image data via the input interface 11. This is sent to the control unit 12.

また、前記プリンタ部30は、用紙を収容する媒体収容部としての用紙カセット111、ブラック、イエロー、マゼンタ及びシアンの4色の図示されない画像形成ユニット、各画像形成ユニットに配設された像担持体としての感光体ドラム、該各感光体ドラムと対向させて配設された露光装置としての図示されないLEDヘッド、前記各画像形成ユニットに配設された現像器、前記各感光体ドラムと対向させて配設された転写部材としての図示されない転写ローラ、定着装置としての図示されない定着器等を備える。   The printer unit 30 includes a paper cassette 111 as a medium storage unit for storing paper, an image forming unit (not shown) of four colors of black, yellow, magenta, and cyan, and an image carrier disposed in each image forming unit. A photosensitive drum as an exposure apparatus, an LED head (not shown) as an exposure device disposed to face the respective photosensitive drums, a developing device disposed in each image forming unit, and the respective photosensitive drums to face each other. A transfer roller (not shown) serving as a transfer member disposed, a fixing device (not shown) serving as a fixing device, and the like are provided.

プリンタ部30の前記各LEDヘッドに画像データが送られると、各LEDヘッドは後述される出力画像データに基づいて感光体ドラムを露光し、感光体ドラムの表面に潜像としての静電潜像を形成する。そして、現像器が静電潜像を現像して感光体ドラム上に現像剤像としてのトナー像を形成すると、前記転写ローラは、前記用紙カセット111から送られた用紙に各色のトナー像を順次転写し、カラーのトナー像を形成し、定着器はカラーのトナー像を用紙に定着させて、カラーの画像を形成する。なお、この場合、前記スキャナ部20、プリンタ部30等は制御部12に対して外部装置となる。   When image data is sent to each LED head of the printer unit 30, each LED head exposes the photosensitive drum based on output image data described later, and an electrostatic latent image as a latent image is formed on the surface of the photosensitive drum. Form. When the developing device develops the electrostatic latent image to form a toner image as a developer image on the photosensitive drum, the transfer roller sequentially applies the toner images of the respective colors onto the paper fed from the paper cassette 111. The toner image is transferred to form a color toner image, and the fixing device fixes the color toner image on a sheet to form a color image. In this case, the scanner unit 20, the printer unit 30 and the like are external devices with respect to the control unit 12.

前記制御部12は、揮発性のメモリから成る第1の記憶装置としてのRAM13、読込専用のメモリから成る第2の記憶装置としてのROM14、演算装置としてのCPU15等を備え、該CPU15は、各種の演算を行ったり、ROM14に記録されたプログラムを実行したりする。   The control unit 12 includes a RAM 13 as a first storage device including a volatile memory, a ROM 14 as a second storage device including a read-only memory, a CPU 15 as an arithmetic device, and the like. And the program recorded in the ROM 14 is executed.

ところで、本実施の形態においては、スキャナ部20において原稿の画像を読み取った場合に、原稿の下地領域の色成分を除去したり、原稿の裏面の画像が透けて表面に現れる裏写りを除去したりすることができるようになっている。   By the way, in the present embodiment, when the scanner unit 20 reads an image of a document, the color component of the background area of the document is removed, or the show-through that appears on the front surface through the image on the back side of the document is removed. You can do that.

そのために、前記制御部12は、入力画像データを受け、該入力画像データに対して補正処理を行うことによって出力画像データを生成し、該出力画像データを出力インタフェース16を介してプリンタ部30に送る。   For this purpose, the control unit 12 receives input image data, generates output image data by performing correction processing on the input image data, and sends the output image data to the printer unit 30 via the output interface 16. send.

該プリンタ部30は、制御部12から送られた出力画像データを受けると、出力画像データから各色の画像データを抽出し、各色の画像データをLEDヘッドに送る。   Upon receiving the output image data sent from the control unit 12, the printer unit 30 extracts the image data of each color from the output image data and sends the image data of each color to the LED head.

次に、前記制御部12の制御ブロックについて説明する。   Next, the control block of the control unit 12 will be described.

図1は本発明の第1の実施の形態における制御部の制御ブロック図である。   FIG. 1 is a control block diagram of a control unit in the first embodiment of the present invention.

図に示されるように、制御部12は、画像入力部51、第1の画像記憶部としての入力画像記憶部52、画像処理部40、第2の画像記憶部としての出力画像記憶部53及び画像出力部54を備える。なお、前記入力画像記憶部52は、スキャナ部20から送られた入力画像データを記録するために、出力画像記憶部53は、プリンタ部30に送る出力画像データを記録するためにそれぞれRAM13に形成される。   As shown in the figure, the control unit 12 includes an image input unit 51, an input image storage unit 52 as a first image storage unit, an image processing unit 40, an output image storage unit 53 as a second image storage unit, and An image output unit 54 is provided. The input image storage unit 52 records the input image data sent from the scanner unit 20, and the output image storage unit 53 forms the output image data sent to the printer unit 30 in the RAM 13, respectively. Is done.

ところで、本実施の形態においては、前述されたように、原稿の下地領域の色成分を除去したり、原稿の裏面の画像が透けて表面に現れる裏写りを除去したりするために、前記入力画像記憶部52に記録された入力画像データに対して補正処理が行われるようになっている。   By the way, in the present embodiment, as described above, in order to remove the color component of the background area of the document or to remove the show-through that appears on the front surface of the image on the back side of the document, Correction processing is performed on the input image data recorded in the image storage unit 52.

そのために、前記入力画像データについて色空間が変換され、色空間が変換された後の画素、すなわち、入力画素の画素値、例えば、明度値のヒストグラムが作成され、ヒストグラムの特徴量が算出され、該特徴量に基づいて、原稿の下地領域の色成分を除去したり、原稿の裏面の画像が透けて表面に現れる裏写りを除去したりするためのパラメータが設定(導出)され、該パラメータに基づいて入力画像データに対して前記補正処理が行われる。   Therefore, a color space is converted for the input image data, a pixel after the color space is converted, that is, a pixel value of the input pixel, for example, a histogram of brightness values, is created, and a feature amount of the histogram is calculated, Based on the feature amount, parameters are set (derived) for removing the color component of the background area of the document or removing the show-through appearing on the front surface through the image on the back side of the document. Based on this, the correction process is performed on the input image data.

この場合、すべての入力画素についてヒストグラムを作成しようとすると、ヒストグラムを記録するために前記RAM13の記憶容量を大きくする必要があるので、入力画像記憶部52に記録された入力画像データのうちのヒストグラムを作成するのに使用される入力画像データを限定したり、前記入力画素を間引きしたり、画素値に基づいて入力画素を制限したりすることによってサンプリング数を少なくしてサンプリングした入力画素についてヒストグラムを作成するようにしている。   In this case, if an attempt is made to create histograms for all input pixels, it is necessary to increase the storage capacity of the RAM 13 in order to record the histogram, so the histogram of the input image data recorded in the input image storage unit 52 is required. A histogram of input pixels sampled with a reduced number of samples by limiting the input image data used to create the image, decimating the input pixels, or limiting the input pixels based on pixel values Like to create.

ところが、サンプリング数を少なくすると、ヒストグラムに基づいて特徴量を精度良く算出することができない。したがって、入力画像データに対して適正な補正処理を行うことができなくなってしまう。   However, if the number of samplings is reduced, the feature amount cannot be calculated with high accuracy based on the histogram. Therefore, it becomes impossible to perform an appropriate correction process on the input image data.

そこで、作成したヒストグラムが有効であるかどうかを判断し、ヒストグラムが有効である場合に、算出した特徴量に基づいてパラメータを設定し、該パラメータに基づいて入力画像データに対して前記補正処理を行うようにしている。   Therefore, it is determined whether or not the created histogram is valid. If the histogram is valid, a parameter is set based on the calculated feature amount, and the correction processing is performed on the input image data based on the parameter. Like to do.

そのために、前記画像処理部40は、画像読出部41、サンプリング条件判定部42、ヒストグラム作成部43、有効性判定部44、パラメータ導出部45、画像補正部46及び画像書込部47を備える。なお、各部における通信制御、書込制御、画像処理等の演算は、制御部12において前記CPU15(図3)が、RAM13をワーキングメモリとして使用し、ROM14に記録されたプログラムを実行することによって行われる。   For this purpose, the image processing unit 40 includes an image reading unit 41, a sampling condition determination unit 42, a histogram creation unit 43, an effectiveness determination unit 44, a parameter derivation unit 45, an image correction unit 46, and an image writing unit 47. Calculations such as communication control, writing control, and image processing in each unit are performed by the CPU 15 (FIG. 3) in the control unit 12 using the RAM 13 as a working memory and executing a program recorded in the ROM 14. Is called.

前記画像入力部51は、画像入力処理を行い、スキャナ部20から送られた入力画像データを入力インタフェース11を介して受けることによって取得し、取得した入力画像データを前記入力画像記憶部52に書き込み、記録する。なお、本実施の形態においては、画像入力部51が、スキャナ部20から送られた入力画像データを取得するようになっているが、入力画像データを、上位装置としてのホストコンピュータから取得したり、ネットワークを介して接続されたパソコン、又はHDD等の記憶媒体から取得したり、USBメモリスティック等の可搬の記憶媒体から取得したりすることができる。   The image input unit 51 performs image input processing, acquires the input image data sent from the scanner unit 20 via the input interface 11, and writes the acquired input image data into the input image storage unit 52. ,Record. In the present embodiment, the image input unit 51 acquires the input image data sent from the scanner unit 20, but the input image data can be acquired from a host computer as a host device. It can be obtained from a storage medium such as a personal computer or HDD connected via a network, or from a portable storage medium such as a USB memory stick.

前記画像読出部41は、画像読出処理を行い、入力画像記憶部52に記録された入力画像データを入力画像記憶部52の先頭から、すなわち、ページ先頭アドレスから1画素ずつ読み出し、読み出した入力画像データの色空間(例えば、RGB色空間)を所定の色空間(例えば、CIEL*a*b色空間)に変換することによって、所定の色空間の画像データ(以下「第1の変換画像データ」という。)を生成し、サンプリング条件判定部42及びヒストグラム作成部43に送る。また、前記画像読出部41は、入力画像データを、データ量、すなわち、データのサイズが、ヒストグラムを作成するのに必要な第1の読出サイズになるまで読み出し、読み出した入力画像データについて色空間の変換を行うと、入力画像データの読出し及び色空間の変換を停止する。ここで、RGB色空間とは赤、緑及び青の三原色がそれぞれ値R、値G及び値Bで表される色空間であり、CIEL*a*b色空間とは、明るさ、緑及びマゼンタの混合比、並びに青及び黄の混合比で表される色空間である。なお、Lは明度値を0〜100〔%〕で表したものであり、0〔%〕が黒とされ、100〔%〕が白とされる。また、aは緑及びマゼンタの混合比であり、マイナス値では緑が強くなり、プラス値ではマゼンタが強くなる。そして、bは青及び黄の混合比であり、マイナス値では青が強くなり、プラス値では黄が強くなる。   The image reading unit 41 performs an image reading process, reads the input image data recorded in the input image storage unit 52 from the head of the input image storage unit 52, that is, one pixel at a time from the page head address, and reads the input image By converting a data color space (for example, RGB color space) into a predetermined color space (for example, CIE L * a * b color space), image data in the predetermined color space (hereinafter, “first converted image data”). Is sent to the sampling condition determination unit 42 and the histogram creation unit 43. The image reading unit 41 reads the input image data until the amount of data, that is, the size of the data reaches a first reading size necessary for creating a histogram, and the read input image data is a color space. When the conversion is performed, the reading of the input image data and the conversion of the color space are stopped. Here, the RGB color space is a color space in which the three primary colors of red, green, and blue are represented by value R, value G, and value B, respectively, and the CIEL * a * b color space is brightness, green, and magenta. And a color space represented by a mixture ratio of blue and yellow. Note that L represents a lightness value in a range of 0 to 100 [%], where 0 [%] is black and 100 [%] is white. Further, a is a mixing ratio of green and magenta. When the value is negative, green becomes stronger, and when the value is positive, magenta becomes stronger. And b is a mixture ratio of blue and yellow, and blue is strong at a negative value, and yellow is strong at a positive value.

さらに、画像読出部41は、パラメータ導出部45から送られた、パラメータが設定されたことを表す後述される設定終了信号を受けると、入力画像記憶部52に記録された入力画像データを、再びページ先頭アドレスから1画素ずつ読み出し、読み出した入力画像データの色空間の変換を行い、第1の変換画像データを生成して画像補正部46に送る。続いて、前記画像読出部41は、入力画像データを、データのサイズが、画像補正部46における補正処理の処理量に応じて設定された第2の読出サイズになるまで読み出し、読み出した入力画像データについて色空間の変換を行うと、入力画像データの読出し及び色空間の変換を停止する。   Further, when the image reading unit 41 receives a setting end signal, which will be described later, sent from the parameter deriving unit 45 and indicating that the parameter has been set, the image reading unit 41 again inputs the input image data recorded in the input image storage unit 52. One pixel is read from the page head address, the color space of the read input image data is converted, and first converted image data is generated and sent to the image correction unit 46. Subsequently, the image reading unit 41 reads the input image data until the size of the data reaches the second reading size set according to the amount of correction processing in the image correction unit 46, and the read input image When color space conversion is performed on data, reading of input image data and color space conversion are stopped.

前記サンプリング条件判定部42は、サンプリング条件判定処理を行い、画像読出部41から前記第1の変換画像データを読み込み、第1の変換画像データの前記入力画素が、ヒストグラムを作成するために画素をサンプリングする条件、すなわち、サンプリング条件を満たすかどうかを判断する。そして、サンプリング条件判定部42は、入力画素がサンプリング条件を満たす場合、サンプリング判定信号を1にし、入力画素がサンプリング条件を満たさない場合、サンプリング判定信号を0にして、ヒストグラム作成部43に送る。   The sampling condition determination unit 42 performs a sampling condition determination process, reads the first converted image data from the image reading unit 41, and the input pixel of the first converted image data selects a pixel to create a histogram. It is determined whether or not sampling conditions, that is, sampling conditions are satisfied. The sampling condition determination unit 42 sets the sampling determination signal to 1 when the input pixel satisfies the sampling condition, and sets the sampling determination signal to 0 when the input pixel does not satisfy the sampling condition, and sends the sampling determination signal to the histogram creation unit 43.

該ヒストグラム作成部43は、ヒストグラム作成処理を行い、サンプリング条件判定部42によってサンプリング条件を満たすと判断された入力画素に基づいてヒストグラムを作成する。そのために、ヒストグラム作成部43は、サンプリング条件判定部42から送られた前記サンプリング判定信号を受け、サンプリング判定信号が1である場合に、画像読出部41から送られた第1の変換画像データの入力画素の画素値、例えば、明度値Lを参照し、画素値におけるヒストグラムの度数をカウントし、各画素値に対応する度数の分布を表すヒストグラムを作成する。なお、このとき、ヒストグラム作成部43は、ヒストグラムの度数の合計値である総画素数をカウントし、サンプリング判定信号が0である場合は、ヒストグラムの度数及び総画素数をカウントしない。   The histogram creation unit 43 performs a histogram creation process, and creates a histogram based on the input pixels determined to satisfy the sampling condition by the sampling condition determination unit 42. For this purpose, the histogram creation unit 43 receives the sampling determination signal sent from the sampling condition determination unit 42 and, when the sampling determination signal is 1, the first converted image data sent from the image reading unit 41. The pixel value of the input pixel, for example, the lightness value L is referred to, the frequency of the histogram in the pixel value is counted, and a histogram representing the frequency distribution corresponding to each pixel value is created. At this time, the histogram creation unit 43 counts the total number of pixels, which is the total value of the histogram frequencies, and does not count the histogram frequency and the total number of pixels when the sampling determination signal is 0.

また、前記ヒストグラム作成部43は、前記第1の読出サイズになるまで読み出された入力画像データについてヒストグラムを作成すると、作成したヒストグラムをRAM13に記録する。   Further, when the histogram creating unit 43 creates a histogram for the input image data read until the first reading size is reached, the created histogram is recorded in the RAM 13.

そして、前記有効性判定部44は、有効性判定処理を行い、ヒストグラム作成部43によってカウントされたヒストグラムの総画素数を読み込み、総画素数が有効条件を満たすかどうかによってヒストグラムが有効であるかどうかを判断する。すなわち、前記有効性判定部44は、ヒストグラムの総画素数が所定の閾値以上である場合、有効条件を満たすとしてヒストグラムが有効であると判断し、有効性判定信号を1(有効)にして生成し、パラメータ導出部45に送り、ヒストグラムの総画素数が前記所定の閾値未満である場合、有効条件を満たさないとしてヒストグラムが有効ではないと判断し、有効性判定信号を0(無効)にして生成し、パラメータ導出部45に送る。   Then, the validity determination unit 44 performs a validity determination process, reads the total number of pixels of the histogram counted by the histogram creation unit 43, and determines whether the histogram is valid depending on whether the total number of pixels satisfies the validity condition. Judge whether. That is, when the total number of pixels in the histogram is equal to or greater than a predetermined threshold, the validity determination unit 44 determines that the histogram is valid as the validity condition is satisfied, and generates the validity determination signal as 1 (effective). When the total number of pixels in the histogram is less than the predetermined threshold, it is determined that the histogram is not valid because the validity condition is not satisfied, and the validity determination signal is set to 0 (invalid). Generated and sent to the parameter deriving unit 45.

該パラメータ導出部45は、パラメータ導出処理を行い、前記RAM13に記録されたヒストグラムを参照し、有効性判定部44から送られた有効性判定信号に基づいて、入力画像データを補正するためのパラメータを設定し、画像補正部46に送る。このとき同時に、パラメータ導出部45は、前記設定終了信号を1にして画像読出部41及び画像書込部47に送る。パラメータが設定されないときの前記設定終了信号は0にされる。   The parameter deriving unit 45 performs a parameter deriving process, refers to the histogram recorded in the RAM 13, and corrects the input image data based on the validity determination signal sent from the validity determining unit 44. Is sent to the image correction unit 46. At the same time, the parameter deriving unit 45 sets the setting end signal to 1 and sends it to the image reading unit 41 and the image writing unit 47. The setting end signal when the parameter is not set is set to zero.

前記画像補正部46は、画像補正処理を行い、パラメータ導出部45によって設定されたパラメータに基づいて、画像読出部41から送られた第1の変換画像データに対して、原稿の下地領域の色成分を除去するための下地除去処理、原稿の裏面の画像が透けて表面に現れる裏写りを除去するための裏写り除去処理等の補正処理を行い、補正処理が行われた後の画像データ(以下「第2の変換画像データ」という。)を生成し、画像書込部47に送る。   The image correction unit 46 performs image correction processing, and based on the parameters set by the parameter deriving unit 45, the color of the background area of the document with respect to the first converted image data sent from the image reading unit 41 Image data after performing correction processing such as background removal processing to remove components, and show-through removal processing to remove show-through that appears on the front side of the image on the back side of the document. (Hereinafter referred to as “second converted image data”) is generated and sent to the image writing unit 47.

該画像書込部47は、画像書込処理を行い、画像補正部46から第2の変換画像データを受け、パラメータ導出部45から送られた設定終了信号に基づいて出力画像データを生成し、出力画像記憶部53に書き込む。すなわち、画像書込部47は、設定終了信号が1である場合、前記第2の変換画像データの色空間(例えば、CIEL*a*b色空間)を、プリンタ部30の色空間(例えば、CMYBk色空間)に変換し、プリンタ部30の色空間に変換された画像データを前記出力画像データとし、前記出力画像記憶部53の先頭から、すなわち、ページ先頭アドレスから1画素ずつ出力画像記憶部53に書き込む。なお、設定終了信号が0である場合、画像書込部47は出力画像データを生成しない。また、CMYBk色空間は、シアン、マゼンタ、イエロー及びブラックの各色を値C、値M、値Y及び値Bkで表す色空間である。   The image writing unit 47 performs an image writing process, receives the second converted image data from the image correction unit 46, generates output image data based on the setting end signal sent from the parameter deriving unit 45, Write to the output image storage unit 53. That is, when the setting end signal is 1, the image writing unit 47 uses the color space (for example, CIE L * a * b color space) of the second converted image data as the color space (for example, the printer unit 30). CMYBk color space) and the image data converted into the color space of the printer unit 30 is used as the output image data, and the output image storage unit pixel by pixel from the top of the output image storage unit 53, that is, from the page top address. 53 is written. When the setting end signal is 0, the image writing unit 47 does not generate output image data. The CMYBk color space is a color space in which each color of cyan, magenta, yellow, and black is represented by value C, value M, value Y, and value Bk.

そして、前記画像出力部54は、画像出力処理を行い、出力画像記憶部53から出力画像データを読み出し、出力インタフェース16(図3)を介してプリンタ部30に送る。該プリンタ部30は、出力画像データを受けると、出力画像データに基づいて、前述されたように用紙に画像を形成する。   The image output unit 54 performs image output processing, reads output image data from the output image storage unit 53, and sends it to the printer unit 30 via the output interface 16 (FIG. 3). When receiving the output image data, the printer unit 30 forms an image on a sheet based on the output image data as described above.

なお、本実施の形態においては、プリンタ部30に出力画像データが送られるようになっているが、出力画像データを、ホストコンピュータに送ったり、ネットワークを介して接続されたパソコン、又はHDD等の記憶媒体に送ったり、USBメモリスティック等の可搬の記憶媒体に送ったりすることができる。さらに、出力画像データをモニタに送ることができる。   In the present embodiment, output image data is sent to the printer unit 30, but the output image data is sent to a host computer, a personal computer connected via a network, an HDD, or the like. It can be sent to a storage medium or can be sent to a portable storage medium such as a USB memory stick. Furthermore, output image data can be sent to a monitor.

次に、前記サンプリング条件判定部42について説明する。   Next, the sampling condition determination unit 42 will be described.

図4は本発明の第1の実施の形態におけるサンプリング条件判定部の制御ブロック図である。   FIG. 4 is a control block diagram of the sampling condition determination unit in the first embodiment of the present invention.

図に示されるように、サンプリング条件判定部42は、間引き判定部42a、閾値判定部42b及び総合判定部42cを備える。   As shown in the figure, the sampling condition determination unit 42 includes a thinning determination unit 42a, a threshold determination unit 42b, and a comprehensive determination unit 42c.

間引き判定部42aは、入力画素が画像平面上のどの座標に位置するかを判断するとともに、位置する座標に基づいて、入力画素が第1の条件を満たすかどうかを、あらかじめ設定された間引き間隔パラメータに基づいて間引かれる対象となる画素、すなわち、間引き対象画素でないかどうかによって判断する。そして、間引き判定部42aは、入力画素が間引き対象画素でなく、第1の条件を満たすと判断すると、第1の判定信号を1にして総合判定部42cに送り、入力画素が間引き対象画素であり、第1の条件を満たさないと判断すると、第2の判定信号を0にして総合判定部42cに送る。   The thinning determination unit 42a determines at which coordinates on the image plane the input pixel is located, and determines whether the input pixel satisfies the first condition based on the coordinates at which the input pixel is located. Judgment is made based on whether or not the pixel is a pixel to be thinned out based on the parameter, that is, whether the pixel is not a thinning target pixel. When the thinning determination unit 42a determines that the input pixel is not the thinning target pixel and satisfies the first condition, the thinning determination unit 42a sets the first determination signal to 1 and sends it to the comprehensive determination unit 42c, and the input pixel is the thinning target pixel. If it is determined that the first condition is not satisfied, the second determination signal is set to 0 and sent to the comprehensive determination unit 42c.

閾値判定部42bは、入力画素の画素値を参照し、画素値が第2の条件を満たすかどうかを、あらかじめ設定された有効範囲内に収まるかどうかによって判断する。そして、閾値判定部42bは、画素値が有効範囲内に収まり、第2の条件を満たすと判断すると、第2の判定信号を1にして総合判定部42cに送り、画素値が有効範囲内に収まらず、第2の条件を満たさないと判断すると、第2の判定信号を0にして総合判定部42cに送る。   The threshold determination unit 42b refers to the pixel value of the input pixel, and determines whether the pixel value satisfies the second condition by whether it falls within a preset effective range. When the threshold value determination unit 42b determines that the pixel value falls within the effective range and satisfies the second condition, the threshold value determination unit 42b sets the second determination signal to 1 and sends it to the comprehensive determination unit 42c, and the pixel value falls within the effective range. If it does not fit and it is determined that the second condition is not satisfied, the second determination signal is set to 0 and sent to the comprehensive determination unit 42c.

該総合判定部42cは、間引き判定部42a及び閾値判定部42bから送られた第1、第2の判定信号の論理積(AND)を採ることによって、第1、第2の条件が満たされるかどうかを判断し、第1、第2の条件が満たされる場合に、サンプリング条件が満たされると判断し、サンプリング判定信号を1にし、第1、第2の条件のうちの少なくとも一方が満たされない場合に、サンプリング条件が満たされないと判断し、サンプリング判定信号を0にする。   Whether the comprehensive determination unit 42c satisfies the first and second conditions by taking the logical product (AND) of the first and second determination signals sent from the thinning determination unit 42a and the threshold determination unit 42b. When the first and second conditions are satisfied, the sampling condition is determined to be satisfied, the sampling determination signal is set to 1, and at least one of the first and second conditions is not satisfied Then, it is determined that the sampling condition is not satisfied, and the sampling determination signal is set to zero.

なお、本実施の形態においては、サンプリング条件を満たすかどうかを判断するための判定項目として、間引き判定部42a及び閾値判定部42bによる二つの判定項目が設定され、第1、第2の条件が満たされる場合に、サンプリング条件が満たされると判断するようになっているが、一つの判定項目を設定し、第1、第2の条件のうちの一方が満たされる場合に、サンプリング条件が満たされると判断することができる。また、三つ以上の判定項目を設定することができる。   In the present embodiment, two determination items by the thinning determination unit 42a and the threshold determination unit 42b are set as determination items for determining whether or not the sampling condition is satisfied, and the first and second conditions are set as follows. When satisfied, the sampling condition is determined to be satisfied. However, if one determination item is set and one of the first and second conditions is satisfied, the sampling condition is satisfied. It can be judged. Three or more determination items can be set.

次に、前記パラメータ導出部45について説明する。   Next, the parameter deriving unit 45 will be described.

図5は本発明の第1の実施の形態におけるパラメータ導出部の制御ブロック図である。   FIG. 5 is a control block diagram of the parameter deriving unit in the first embodiment of the present invention.

図に示されるように、パラメータ導出部45は、パラメータを設定するために特徴量算出部45a及びパラメータ設定部45bを備える。   As shown in the figure, the parameter deriving unit 45 includes a feature amount calculating unit 45a and a parameter setting unit 45b for setting parameters.

前記特徴量算出部45aは、前記RAM13(図3)に記録されたヒストグラムを参照し、ヒストグラムの特徴量、本実施の形態においては、原稿の下地領域の色成分を除去するための明度値Lの閾値Lthを算出する。そして、前記パラメータ設定部45bは、前記有効性判定部44から送られた有効性判定信号が1であるかどうかを判断し、有効性判定信号が1である場合、特徴量算出部45aによって算出された明度値Lの閾値Lthを読み込み、該閾値Lthに基づいて、第1のパラメータとしての設定変換テーブルを設定する。また、有効性判定部44から送られた有効性判定信号が0である場合、パラメータ設定部45bは、あらかじめ設定された第2のパラメータとしての汎用変換テーブルを設定する。そして、パラメータ設定部45bは、設定変換テーブル又は汎用変換テーブルを設定するのと同時に、設定終了信号を1にして生成し、画像読出部41及び画像書込部47に送る。   The feature quantity calculation unit 45a refers to the histogram recorded in the RAM 13 (FIG. 3), and the feature value of the histogram, in this embodiment, a lightness value L for removing the color component of the background area of the document. The threshold value Lth is calculated. Then, the parameter setting unit 45b determines whether or not the validity determination signal sent from the validity determination unit 44 is 1, and when the validity determination signal is 1, the parameter setting unit 45b calculates by the feature amount calculation unit 45a. The threshold value Lth of the brightness value L is read, and a setting conversion table as a first parameter is set based on the threshold value Lth. When the validity determination signal sent from the validity determination unit 44 is 0, the parameter setting unit 45b sets a general-purpose conversion table as a second parameter set in advance. Then, the parameter setting unit 45 b sets the setting conversion table or the general-purpose conversion table, and simultaneously generates a setting end signal as 1 and sends it to the image reading unit 41 and the image writing unit 47.

次に、前記構成の複合機10の動作について説明する。   Next, the operation of the MFP 10 having the above-described configuration will be described.

この場合、第1の変換画像データの画素値として明度値Lを使用して作成されたヒストグラムに基づいて、原稿の下地領域の色成分を除去する下地除去処理について説明する。   In this case, background removal processing for removing the color component of the background area of the document based on the histogram created using the lightness value L as the pixel value of the first converted image data will be described.

図6は本発明の第1の実施の形態における複合機の動作を示す第1のフローチャート、図7は本発明の第1の実施の形態における複合機の動作を示す第2のフローチャート、図8は本発明の第1の実施の形態における間引き対象画素を説明するための図、図9は本発明の第1の実施の形態におけるヒストグラムの度数分布の例を示す図、図10は本発明の第1の実施の形態における設定変換テーブルの例を示す図、図11は本発明の第1の実施の形態における汎用変換テーブルの例を示す図である。なお、図9において、横軸に明度値Lを、縦軸に度数G(L)を採ってあり、図10及び11において、横軸に入力側の明度値Liを、縦軸に出力側の明度値Loを採ってある。   FIG. 6 is a first flowchart showing the operation of the multifunction device in the first embodiment of the present invention. FIG. 7 is a second flowchart showing the operation of the multifunction device in the first embodiment of the present invention. FIG. 9 is a diagram for explaining the pixel to be thinned out in the first embodiment of the present invention, FIG. 9 is a diagram showing an example of a histogram frequency distribution in the first embodiment of the present invention, and FIG. FIG. 11 is a diagram illustrating an example of a setting conversion table according to the first embodiment, and FIG. 11 is a diagram illustrating an example of a general-purpose conversion table according to the first embodiment of the present invention. 9, the horizontal axis represents the lightness value L, the vertical axis represents the frequency G (L), and in FIGS. 10 and 11, the horizontal axis represents the lightness value Li on the input side, and the vertical axis represents the lightness value Li on the output side. The brightness value Lo is taken.

まず、前記画像入力部51は、スキャナ部20から送られた入力画像データを入力インタフェース11を介して取得し、取得した入力画像データを前記入力画像記憶部52に書き込む。   First, the image input unit 51 acquires the input image data sent from the scanner unit 20 via the input interface 11 and writes the acquired input image data in the input image storage unit 52.

続いて、前記画像読出部41は、入力画像記憶部52における読出位置を初期化してページ先頭アドレスにする。   Subsequently, the image reading unit 41 initializes the reading position in the input image storage unit 52 to set the page head address.

この場合、画像読出部41は、入力画像データを1ラインずつ主走査方向に読み出し、1ラインの読出しが終了するたびに、読み出すラインを副走査方向に順次変更する。   In this case, the image reading unit 41 reads the input image data line by line in the main scanning direction, and sequentially changes the line to be read in the sub scanning direction every time reading of one line is completed.

なお、前記入力画像データの主走査方向におけるサイズ、すなわち、画像幅をWとし、副走査方向におけるサイズ、すなわち、画像高さをHとし、読み出す入力画像データのページ先頭アドレスに対応する入力画素の座標(x,y)の先頭の座標を(0,0)としたとき、読出位置を初期化したときの入力画素の座標(x,y)は、
x=0
y=0
になり、n画素目(0≦n≦(W−1)*(H−1))の画素の座標は(xn ,yn )になり、xn はn/Wの剰余で表され、yn はn/Wの商で表される。
The size of the input image data in the main scanning direction, that is, the image width is W, the size in the sub-scanning direction, that is, the image height is H, and the input pixel corresponding to the page head address of the input image data to be read When the first coordinate of the coordinate (x, y) is (0, 0), the coordinate (x, y) of the input pixel when the readout position is initialized is
x = 0
y = 0
And the coordinates of the pixel of the nth pixel (0 ≦ n ≦ (W−1) * (H−1)) are (x n , y n ), and x n is expressed by a remainder of n / W, y n is represented by a quotient of n / W.

この場合、前記画像読出部41は、入力画像記憶部52に記録された入力画像データのうちの、原稿における、文字、図形等の画像が形成されていない下地領域の入力画像データを読み出す。したがって、読み出される入力画像データに応じて前記画像高さHが設定される。   In this case, the image reading unit 41 reads the input image data of the background area in which the image of characters, figures, etc. is not formed in the original document among the input image data recorded in the input image storage unit 52. Therefore, the image height H is set in accordance with the read input image data.

次に、画像読出部41は、入力画像記憶部52に記録された入力画像データをページ先頭アドレスから1画素ずつ読み出し、読み出した入力画像データの色空間、本実施の形態においては、RGB色空間を、所定の色空間、本実施の形態においては、CIEL*a*b色空間に変換し、CIEL*a*b色空間に変換された第1の変換画像データをサンプリング条件判定部42及びヒストグラム作成部43に送る。この場合、n画素目の入力画像データ、すなわち、RGBデータ(Rn ,Gn ,Bn )が読み出され、色空間が変換され、CIEL*a*bデータ(Ln ,an ,bn )が第1の変換画像データにされる。 Next, the image reading unit 41 reads the input image data recorded in the input image storage unit 52 pixel by pixel from the page head address, and the color space of the read input image data, in this embodiment, the RGB color space Is converted into a predetermined color space, in this embodiment, a CIEL * a * b color space, and the first converted image data converted into the CIEL * a * b color space is converted into a sampling condition determination unit 42 and a histogram. The data is sent to the creation unit 43. In this case, input image data of the nth pixel, that is, RGB data (R n , G n , B n ) is read, the color space is converted, and the CIE L * a * b data (L n , a n , b) n ) is the first converted image data.

続いて、サンプリング条件判定部42において、間引き判定部42aは、第1の変換画像データを読み込み、入力画素が間引き対象画素でないかどうかを判断する。入力画素が間引き対象画素でない場合に、閾値判定部42bは、入力画素の画素値があらかじめ設定された画素値の有効範囲内に収まるかどうかを判断する。入力画素の画素値があらかじめ設定された画素値の有効範囲内に収まる場合に、総合判定部42cはサンプリング判定信号を1にする。   Subsequently, in the sampling condition determination unit 42, the thinning determination unit 42a reads the first converted image data and determines whether the input pixel is not a thinning target pixel. When the input pixel is not a thinning target pixel, the threshold determination unit 42b determines whether or not the pixel value of the input pixel falls within the preset effective range of the pixel value. When the pixel value of the input pixel falls within the effective range of the pixel value set in advance, the comprehensive determination unit 42c sets the sampling determination signal to 1.

一方、入力画素が間引き対象画素であるか、又は入力画素の画素値があらかじめ設定された画素値の有効範囲内に収まらない場合に、総合判定部42cはサンプリング判定信号を0にする。   On the other hand, when the input pixel is a pixel to be thinned out or the pixel value of the input pixel does not fall within the effective range of the preset pixel value, the comprehensive determination unit 42c sets the sampling determination signal to 0.

本実施の形態においては、図8に示されるように、例えば、画像幅Wが8であり、画像高さHが8である入力画像データにおいて、主走査方向のサンプリング間隔xiが4とされ、副走査方向のサンプリング間隔yiが2として設定された場合に、前記入力画素の座標(xn ,yn )に対して、xn /xiの剰余が0であり、かつ、yn /yiの剰余が0である画素、例えば、図8における画素q1について、間引き判定部42aは間引き対象画素ではないと判断し、xn /xiの剰余が0でないか、又はyn /yiの剰余が0でない画素、例えば、図8における画素q2について、間引き判定部42aは間引き対象画素であると判断する。 In the present embodiment, as shown in FIG. 8, for example, in input image data having an image width W of 8 and an image height H of 8, the sampling interval xi in the main scanning direction is set to 4, When the sampling interval yi in the sub-scanning direction is set to 2, the remainder of x n / xi is 0 with respect to the coordinates (x n , y n ) of the input pixel, and y n / y i For a pixel whose remainder is 0, for example, the pixel q1 in FIG. 8, the thinning determination unit 42a determines that the pixel is not a thinning target pixel, and the remainder of x n / xi is not 0 or the remainder of y n / yi is 0. For a pixel that is not, for example, the pixel q2 in FIG. 8, the thinning determination unit 42a determines that the pixel is a thinning target pixel.

また、例えば、n画素目の画素値(Ln ,an ,bn )に対して、それぞれの有効範囲の最大値をLmax 、amax 、bmax とし、最小値をLmin 、amin 、bmin とし、高明度・低彩度の領域だけを有効範囲とした場合、最大値Lmax 、amax 、bmax 及び最小値Lmin 、amin 、bmin は、
max =100
min =80
max =5
min =−5
max =5
min =−5
に設定される。
Further, for example, for the pixel value (L n , a n , b n ) of the nth pixel, the maximum value of each effective range is set to L max , a max , b max , and the minimum value is L min , a min , B min, and when only the high brightness / low chroma region is the effective range, the maximum values L max , a max , b max and the minimum values L min , a min , b min are
L max = 100
L min = 80
a max = 5
a min = -5
b max = 5
b min = -5
Set to

そして、閾値判定部42bは、n画素目の画素値(Ln ,an ,bn )を参照し、画素値Ln ,an ,bn が、
min ≦Ln ≦Lmax
であり、かつ、
min ≦an ≦amax
であり、かつ、
min ≦bn ≦bmax
である場合、画素値(Ln ,an ,bn )は有効範囲内に収まると判断し、画素値Ln ,an ,bn が、
min ≦Ln ≦Lmax
ではないか、又は、
min ≦an ≦amax
ではないか、又は、
min ≦bn ≦bmax
ではない場合、画素値(Ln ,an ,bn )は有効範囲内に収まらないと判断する。
Then, the threshold determination unit 42b refers to the pixel values (L n , a n , b n ) of the nth pixel, and the pixel values L n , a n , b n are
L min ≦ L n ≦ L max
And
a min ≦ a n ≦ a max
And
b min ≦ b n ≦ b max
The pixel values (L n , a n , b n ) are determined to be within the effective range, and the pixel values L n , a n , b n are
L min ≦ L n ≦ L max
Or
a min ≦ a n ≦ a max
Or
b min ≦ b n ≦ b max
If not, it is determined that the pixel value (L n , a n , b n ) does not fall within the effective range.

次に、前記ヒストグラム作成部43は、サンプリング条件判定部42から送られたサンプリング判定信号を受け、サンプリング判定信号が1である場合に、画像読出部41から送られた第1の変換画像データの画素値、本実施の形態においては、明度値Lを参照し、該明度値Lにおけるヒストグラムの度数(L)をカウントする。すなわち、ヒストグラム作成部43は、各明度値Lごとの度数G(L)をインクリメントする。また、ヒストグラム作成部43は、サンプリング判定信号が1である場合、ヒストグラムの総画素数Nqをカウントし、サンプリング信号が0である場合、ヒストグラムの度数G(L)及び総画素数Nqをカウントしない。   Next, the histogram creation unit 43 receives the sampling determination signal sent from the sampling condition determination unit 42 and, when the sampling determination signal is 1, the first converted image data sent from the image reading unit 41. Pixel value, in the present embodiment, the brightness value L is referred to, and the histogram frequency (L) at the brightness value L is counted. That is, the histogram creation unit 43 increments the frequency G (L) for each lightness value L. Further, when the sampling determination signal is 1, the histogram creation unit 43 counts the total number of pixels Nq of the histogram, and when the sampling signal is 0, the histogram creation unit 43 does not count the histogram frequency G (L) and the total number of pixels Nq. .

そして、前記画像読出部41は、入力画像記憶部52から読み出した入力画像データのサイズZが第1の読出サイズZ1より小さいかどうかを判断し、入力画像データのサイズZが第1の読出サイズZ1より小さい場合、入力画像データの読出位置をインクリメントし、次の入力画像データを読み出し、読み出した入力画像データの色空間の変換を行い、第1の変換画像データをサンプリング条件判定部42及びヒストグラム作成部43に送る。この場合、入力画像データのサイズZ及び第1の読出サイズZ1は、いずれも画素数で表され、第1の読出サイズZ1は、前記画像高さHである256ライン分の値、すなわち、
Z1=W×256
にされる。
The image reading unit 41 determines whether the size Z of the input image data read from the input image storage unit 52 is smaller than the first read size Z1, and the size Z of the input image data is the first read size. If smaller than Z1, the reading position of the input image data is incremented, the next input image data is read, the color space of the read input image data is converted, and the first converted image data is converted into the sampling condition determination unit 42 and the histogram. The data is sent to the creation unit 43. In this case, the size Z of the input image data and the first read size Z1 are both expressed by the number of pixels, and the first read size Z1 is a value for 256 lines that is the image height H, that is,
Z1 = W × 256
To be.

続いて、前記ヒストグラム作成部43は、サンプリング条件判定部42から送られたサンプリング判定信号を受け、サンプリング判定信号が1である場合は、第1の変換画像データの明度値Lを参照し、該明度値Lにおけるヒストグラムの度数(L)をカウントするとともに、ヒストグラムの総画素数Nqをカウントする。   Subsequently, the histogram creation unit 43 receives the sampling determination signal sent from the sampling condition determination unit 42, and when the sampling determination signal is 1, refers to the lightness value L of the first converted image data, The frequency (L) of the histogram at the lightness value L is counted, and the total number of pixels Nq of the histogram is counted.

このようにして、ヒストグラム作成部43は、前記第1の読出サイズZ1になるまで読み出された入力画像データについて、第1の変換画像データの入力画素の明度値Lを参照することによって、図9に示されるような、各明度値Lに対する度数G(L)の分布を表すヒストグラムを作成し、RAM13に記録する。   In this way, the histogram creation unit 43 refers to the lightness value L of the input pixel of the first converted image data for the input image data read until the first read size Z1 is reached. A histogram representing the distribution of the frequency G (L) for each lightness value L as shown in FIG. 9 is created and recorded in the RAM 13.

そして、画像読出部41が入力画像記憶部52から読み出した入力画像データのサイズZが第1の読出サイズZ1と等しくなると、前記有効性判定部44は、ヒストグラム作成部43からヒストグラムの総画素数Nqを読み出し、総画素数Nqが閾値Nth以上であるかどうかによって、総画素数Nqが有効条件を満たすかどうかを判断する。   When the size Z of the input image data read by the image reading unit 41 from the input image storage unit 52 becomes equal to the first reading size Z1, the validity determination unit 44 sends the total number of pixels of the histogram from the histogram creation unit 43. Nq is read out, and whether or not the total pixel number Nq satisfies the effective condition is determined based on whether or not the total pixel number Nq is equal to or greater than the threshold value Nth.

本実施の形態において、閾値Nthは、前記第1の読出サイズZ1の所定の割合、本実施の形態においては、20〔%〕の値にされ、総画素数Nqが、
Nq≧Nth
=Z1×0.2
である場合、前記有効性判定部44は、総画素数Nqが有効条件を満たし、ヒストグラムが有効であると判断し、有効性判定信号を1にし、総画素数Nqが、
Nq<Nth
=Z1×0.2
である場合、前記有効性判定部44は、総画素数Nqが有効条件を満たさず、ヒストグラムが有効でないと判断し、有効性判定信号を0にし、パラメータ導出部45に送る。
In the present embodiment, the threshold value Nth is set to a predetermined ratio of the first read size Z1, in this embodiment, 20%, and the total number of pixels Nq is
Nq ≧ Nth
= Z1 × 0.2
The validity determination unit 44 determines that the total number of pixels Nq satisfies the validity condition and the histogram is valid, sets the validity determination signal to 1, and the total number of pixels Nq is
Nq <Nth
= Z1 × 0.2
In this case, the validity determination unit 44 determines that the total number of pixels Nq does not satisfy the validity condition and the histogram is not valid, sets the validity determination signal to 0, and sends it to the parameter deriving unit 45.

続いて、パラメータ導出部45は、有効性判定信号を読み込み、有効性判定信号が1である場合に、前記特徴量算出部45aはヒストグラム作成部43から送られたヒストグラムを参照し、ヒストグラムの明度値Lの閾値Lthを算出する。   Subsequently, the parameter derivation unit 45 reads the validity determination signal, and when the validity determination signal is 1, the feature amount calculation unit 45a refers to the histogram sent from the histogram creation unit 43, and the brightness of the histogram A threshold value Lth of the value L is calculated.

そのために、特徴量算出部45aは、前記ヒストグラムにおいて明度値Lが高い(L=100)側から低い(L=0)側にかけて順次度数G(L)を読み込み、最初に、
G(L)>G(L+1)
になる明度値Lをピーク開始明度値Lsとし、最初に
G(L−1)>G(L)
になる明度値Lをピーク明度値Lpとする。
For this purpose, the feature amount calculation unit 45a sequentially reads the frequency G (L) from the side with the lightness value L from the high (L = 100) side to the low (L = 0) side in the histogram.
G (L)> G (L + 1)
The lightness value L that becomes is the peak start lightness value Ls, and first G (L-1)> G (L)
The lightness value L that becomes is the peak lightness value Lp.

ところで、原稿の下地領域の明度値Lは、一般的に、ピーク明度値Lpを中心にほぼ正規分布となる度数分布を有するので、特徴量算出部45aは、原稿の下地領域の色成分を除去するための明度値Lの閾値Lth
Lth=Lp−(Ls−Lp)
を算出する。
Incidentally, since the lightness value L of the background area of the document generally has a frequency distribution that is substantially normal with the peak lightness value Lp as the center, the feature amount calculation unit 45a removes the color component of the background area of the document. Threshold value Lth of brightness value L for
Lth = Lp− (Ls−Lp)
Is calculated.

次に、パラメータ導出部45のパラメータ設定部45bは、特徴量算出部45aによって算出された閾値Lthに基づいて、原稿の下地領域の色成分を除去するための、図10に示されるような設定変換テーブルを設定し、同時に、設定終了信号を1にし、画像読出部41及び画像書込部47に送る。前記設定変換テーブルは、0〜100で表された、画像補正部46の入力側、すなわち、変換前の明度値Li、及び明度値Liに対応させて設定され、かつ、0〜100で表された、画像補正部46の出力側、すなわち、変換後の明度値Loから成り、明度値Liが所定の値Lf(例えば、50)未満である場合、図10においてラインf1で示されるように、明度値Loは明度値Liと等しくされ、明度値Liが閾値Lth以上である場合、ラインf2で示されるように、明度値Liの大小に関係なく、明度値Loは100にされる。また、明度値Liが前記値Lf以上、かつ、閾値Lth未満である場合に、ラインf1における明度値Liが値Lfになるポイントをpt1とし、ラインf2における明度値Liが閾値Lthになるポイントをpt2としたとき、明度値Loはポイントpt1、pt2を結ぶラインf3上の値にされる。   Next, the parameter setting unit 45b of the parameter deriving unit 45 sets as shown in FIG. 10 for removing the color component of the background area of the document based on the threshold value Lth calculated by the feature amount calculation unit 45a. A conversion table is set, and simultaneously, a setting end signal is set to 1 and sent to the image reading unit 41 and the image writing unit 47. The setting conversion table is set in correspondence with the input side of the image correction unit 46 represented by 0 to 100, that is, the lightness value Li and the lightness value Li before conversion, and is represented by 0 to 100. In addition, when the output value of the image correction unit 46, that is, the lightness value Lo after conversion and the lightness value Li is less than a predetermined value Lf (for example, 50), as shown by a line f1 in FIG. The lightness value Lo is equal to the lightness value Li. When the lightness value Li is equal to or greater than the threshold value Lth, the lightness value Lo is set to 100 regardless of the magnitude of the lightness value Li, as indicated by the line f2. Further, when the lightness value Li is not less than the value Lf and less than the threshold value Lth, the point at which the lightness value Li in the line f1 becomes the value Lf is defined as pt1, and the point where the lightness value Li in the line f2 becomes the threshold value Lth. When pt2 is set, the lightness value Lo is set to a value on the line f3 connecting the points pt1 and pt2.

これにより、明度値Liは、値Lfから閾値Lthまで変化するのに伴って、ラインf3で示されるように徐々に大きくなるので、原稿の下地領域の色成分を除去するのに伴って、階調飛びが生じることがなくなる。   As a result, the lightness value Li gradually increases as shown by the line f3 as the value Lf changes from the value Lf to the threshold value Lth. No jumping occurs.

また、有効性判定信号が0である場合、パラメータ設定部45bは、あらかじめ設定された汎用変換テーブルを設定し、同時に、設定終了信号を1にして生成し、画像読出部41及び画像書込部47に送る。本実施の形態において、汎用変換テーブルにおいては、図11に示されるように、入力側の明度値Liと出力側の明度値Loとが等しくされるが、画像補正部46における補正処理の内容に応じて明度値Liと明度値Loとを異ならせることができる。   When the validity determination signal is 0, the parameter setting unit 45b sets a preset general-purpose conversion table, and simultaneously generates a setting end signal as 1, thereby generating the image reading unit 41 and the image writing unit. Send to 47. In the present embodiment, in the general-purpose conversion table, as shown in FIG. 11, the lightness value Li on the input side is equal to the lightness value Lo on the output side. Accordingly, the lightness value Li and the lightness value Lo can be made different.

そして、画像読出部41は、設定終了信号を受けると、前記パラメータ設定部45bによって設定された設定変換テーブル又は汎用変換テーブルに基づいて、入力画像データに対して補正処理を行うために、再び入力画像記憶部52における読出位置を初期化してページ先頭アドレスにする。また、画像書込部47は、設定終了信号を受けると、出力画像記憶部53に、補正処理が行われた後の出力画像データを書き込むための書込位置を初期化してページ先頭アドレスにする。   When the image reading unit 41 receives the setting end signal, the image reading unit 41 inputs again to perform correction processing on the input image data based on the setting conversion table or the general-purpose conversion table set by the parameter setting unit 45b. The read position in the image storage unit 52 is initialized to the page head address. Also, upon receiving the setting end signal, the image writing unit 47 initializes the writing position for writing the output image data after the correction processing is performed in the output image storage unit 53 to obtain the page head address. .

すなわち、読出位置及び書出位置を初期化したときの各座標(x,y)は、
x=0
y=0
にされる。
That is, the coordinates (x, y) when the reading position and the writing position are initialized are:
x = 0
y = 0
To be.

次に、画像読出部41は、入力画像記憶部52に記録された入力画像データをページ先頭アドレスから1画素ずつ読み出し、読み出した入力画像データのRGB色空間をCIEL*a*b色空間に変換し、画像補正部46に送る。この場合、n画素目の入力画像データ、すなわち、RGBデータ(Rn ,Gn ,Bn )が読み出され、色空間が変換され、CIEL*a*bデータ(Ln ,an ,bn )が第1の変換画像データにされ、画像補正部46に送られる。 Next, the image reading unit 41 reads the input image data recorded in the input image storage unit 52 pixel by pixel from the page head address, and converts the RGB color space of the read input image data into the CIE L * a * b color space. To the image correction unit 46. In this case, input image data of the nth pixel, that is, RGB data (R n , G n , B n ) is read, the color space is converted, and the CIE L * a * b data (L n , a n , b) n ) is converted into first converted image data and sent to the image correction unit 46.

続いて、前記画像補正部46は、第1の変換画像データを受けると、画像補正処理を行い、パラメータ導出部45において設定された設定変換テーブルを参照し、第1の変換画像データにおける明度Lを、明度値Liと明度値Loとで変換することによって、下地除去処理の補正処理を行い、補正処理が行われた後の第2の変換画像データを画像書込部47に送る。   Subsequently, when the image correction unit 46 receives the first converted image data, the image correction unit 46 performs image correction processing, refers to the setting conversion table set in the parameter derivation unit 45, and determines the lightness L in the first converted image data. Is converted by the lightness value Li and the lightness value Lo to perform the background removal processing correction processing, and the second converted image data after the correction processing is sent to the image writing section 47.

該画像書込部47は、画像補正部46から送られた第2の変換画像データを受け、パラメータ導出部45から送られた設定終了信号に基づいて出力画像データを生成し、出力画像記憶部53に書き込む。すなわち、画像書込部47は、設定終了信号が1である場合、前記第2の変換画像データのCIEL*a*b色空間を、プリンタ部30のCMYBk色空間に変換し、CMYBk色空間に変換された画像データを前記出力画像データとし、ページ先頭アドレスから1画素ずつ前記出力画像記憶部53に書き込む。この場合、n画素目の第2の変換画像データ、すなわち、CIEL*a*bデータ(Ln ,an ,bn )が読み込まれ、色空間が変換され、CMYBkデータ(Cn 、Mn 、Yn 、Bkn )が出力画像データにされ、出力画像記憶部53に記録される。なお、設定終了信号が0である場合、画像書込部47は出力画像データを生成しない。 The image writing unit 47 receives the second converted image data sent from the image correcting unit 46, generates output image data based on the setting end signal sent from the parameter deriving unit 45, and outputs an output image storage unit. 53 is written. That is, when the setting end signal is 1, the image writing unit 47 converts the CIE L * a * b color space of the second converted image data into the CMYBk color space of the printer unit 30 and converts it into the CMYBk color space. The converted image data is used as the output image data, and is written into the output image storage unit 53 pixel by pixel from the page head address. In this case, the second converted image data of the nth pixel, that is, CIE L * a * b data (L n , a n , b n ) is read, the color space is converted, and CMYBk data (C n , M n , Y n, Bk n) is the output image data, it is recorded in the output image storage unit 53. When the setting end signal is 0, the image writing unit 47 does not generate output image data.

そして、前記画像読出部41は、入力画像記憶部52から読み出した入力画像データのサイズZが第2の読出サイズZ2より小さいかどうかを判断し、入力画像データのサイズZが第2の読出サイズZ2より小さい場合、入力画像データの読出位置をインクリメントし、次の入力画像データを読み出し、読み出した入力画像データの色空間の変換を行い、第1の変換画像データを画像補正部46に送る。該画像補正部46は、第1の変換画像データを受けると、補正処理を行い、第1の変換画像データにおける明度Lを明度値Liと明度値Loとで変換することによって、下地除去処理を行い、下地除去処理が行われた後の第2の変換画像データを画像書込部47に送る。   The image reading unit 41 determines whether the size Z of the input image data read from the input image storage unit 52 is smaller than the second reading size Z2, and the size Z of the input image data is the second reading size. If smaller than Z2, the read position of the input image data is incremented, the next input image data is read, the color space of the read input image data is converted, and the first converted image data is sent to the image correction unit 46. Upon receiving the first converted image data, the image correcting unit 46 performs correction processing, and converts the lightness L in the first converted image data between the lightness value Li and the lightness value Lo, thereby performing background removal processing. The second converted image data after the background removal processing is performed is sent to the image writing unit 47.

また、画像書込部47は、第2の変換画像データの色空間の変換を行い、出力画像データの書込位置をインクリメントし、出力画像データを出力画像記憶部53に書き込む。   Further, the image writing unit 47 converts the color space of the second converted image data, increments the writing position of the output image data, and writes the output image data in the output image storage unit 53.

画像読出部41が入力画像記憶部52から読み出した入力画像データのサイズZが第2の読出サイズZ2と等しくなると、画像出力部54は出力インタフェース16を介してプリンタ部30に出力画像データを送る。プリンタ部30は、制御部12から送られた出力画像データを受けると、出力画像データから各色の画像データを抽出し、各色の画像データをLEDヘッドに送る。   When the size Z of the input image data read by the image reading unit 41 from the input image storage unit 52 becomes equal to the second reading size Z2, the image output unit 54 sends the output image data to the printer unit 30 via the output interface 16. . Upon receiving the output image data sent from the control unit 12, the printer unit 30 extracts the image data of each color from the output image data and sends the image data of each color to the LED head.

この場合、第2の読出サイズZ2は
Z2=W×H
にされる。
In this case, the second read size Z2 is Z2 = W × H
To be.

次に、フローチャートについて説明する。
ステップS1 画像入力部51は入力画像データを取得する。
ステップS2 画像読出部41は読出位置を初期化する。
ステップS3 画像読出部41は入力画像データを読み出し、色空間を変換する。
ステップS4 間引き判定部42aは入力画素が間引き対象画素でないかどうかを判断する。入力画素が間引き対象画素でない場合はステップS5に、入力画素が間引き対象画素である場合はステップS7に進む。
ステップS5 閾値判定部42bは入力画素の画素値が有効範囲内に収まるかどうかを判断する。入力画素の画素値が有効範囲内に収まる場合はステップS6に、入力画素の画素値が有効範囲内に収まらない場合はステップS7に進む。
ステップS6 総合判定部42cはサンプリング判定信号を1にする。
ステップS7 総合判定部42cはサンプリング判定信号を0にする。
ステップS8 ヒストグラム作成部43はサンプリング判定信号が1であるかどうかを判断する。サンプリング信号が1である場合はステップS9に、サンプリング信号が1でない場合はステップS10に進む。
ステップS9 ヒストグラム作成部43はヒストグラムの度数G(L)をカウントし、ヒストグラムの総画素数Nqをカウントする。
ステップS10 画像読出部41は入力画像データのサイズZが第1の読出サイズZ1より小さいかどうかを判断する。入力画像データのサイズZが第1の読出サイズZ1より小さい場合はステップS11に、入力画像データのサイズZが第1の読出サイズZ1以上である場合はステップS12に進む。
ステップS11 画像読出部41は読出位置をインクリメントし、ステップS3に戻る。
ステップS12 パラメータ導出部45は有効性判定信号が1であるかどうかを判断する。有効性判定信号が1である場合はステップS13に、有効性判定信号が1でない場合はステップS15に進む。
ステップS13 特徴量算出部45aは特徴量を算出する。
ステップS14 パラメータ設定部45bは設定変換テーブルを設定する。
ステップS15 パラメータ設定部45bは汎用変換テーブルを設定する。
ステップS16 画像読出部41は読出位置を初期化し、画像書込部47は書込位置を初期化する。
ステップS17 画像読出部41は入力画像データを読み出し、色空間を変換する。
ステップS18 画像補正部46は画像補正処理を行う。
ステップS19 画像書込部47は色空間を変換し、出力画像データを書き込む。
ステップS20 画像読出部41は入力画像データのサイズZが第2の読出サイズZ2より小さいかどうかを判断する。入力画像データのサイズZが第2の読出サイズZ2より小さい場合はステップS21に、入力画像データのサイズZが第2の読出サイズZ2以上である場合はステップS22に進む。
ステップS21 画像読出部41は読出位置をインクリメントし、画像書込部47は書込位置をインクリメントし、ステップS17に戻る。
ステップS22 画像出力部54は出力画像データを生成し、処理を終了する。
Next, a flowchart will be described.
Step S1: The image input unit 51 acquires input image data.
Step S2: The image reading unit 41 initializes the reading position.
Step S3 The image reading unit 41 reads input image data and converts the color space.
Step S4: The thinning determination unit 42a determines whether the input pixel is not a thinning target pixel. If the input pixel is not a thinning target pixel, the process proceeds to step S5. If the input pixel is a thinning target pixel, the process proceeds to step S7.
Step S5: The threshold determination unit 42b determines whether or not the pixel value of the input pixel is within the effective range. If the pixel value of the input pixel falls within the valid range, the process proceeds to step S6. If the pixel value of the input pixel does not fall within the valid range, the process proceeds to step S7.
Step S6: The overall judgment unit 42c sets the sampling judgment signal to 1.
Step S7: The comprehensive judgment unit 42c sets the sampling judgment signal to 0.
Step S8: The histogram creation unit 43 determines whether or not the sampling determination signal is 1. If the sampling signal is 1, the process proceeds to step S9. If the sampling signal is not 1, the process proceeds to step S10.
Step S9 The histogram creation unit 43 counts the histogram frequency G (L) and counts the total number of pixels Nq of the histogram.
Step S10: The image reading unit 41 determines whether the size Z of the input image data is smaller than the first reading size Z1. If the size Z of the input image data is smaller than the first readout size Z1, the process proceeds to step S11. If the size Z of the input image data is greater than or equal to the first readout size Z1, the process proceeds to step S12.
Step S11 The image reading unit 41 increments the reading position and returns to step S3.
Step S12: The parameter deriving unit 45 determines whether or not the validity determination signal is 1. If the validity determination signal is 1, the process proceeds to step S13. If the validity determination signal is not 1, the process proceeds to step S15.
Step S13: The feature amount calculation unit 45a calculates a feature amount.
Step S14: The parameter setting unit 45b sets a setting conversion table.
Step S15 The parameter setting unit 45b sets a general-purpose conversion table.
Step S16 The image reading unit 41 initializes the reading position, and the image writing unit 47 initializes the writing position.
Step S17 The image reading unit 41 reads input image data and converts the color space.
Step S18 The image correction unit 46 performs image correction processing.
Step S19 The image writing unit 47 converts the color space and writes the output image data.
Step S20: The image reading unit 41 determines whether the size Z of the input image data is smaller than the second reading size Z2. If the size Z of the input image data is smaller than the second readout size Z2, the process proceeds to step S21. If the size Z of the input image data is greater than or equal to the second readout size Z2, the process proceeds to step S22.
Step S21 The image reading unit 41 increments the reading position, the image writing unit 47 increments the writing position, and the process returns to step S17.
Step S22: The image output unit 54 generates output image data and ends the process.

このように、本実施の形態においては、ヒストグラム作成部43によって作成されたヒストグラムが有効であるかどうかが判断され、ヒストグラムが有効である場合に、パラメータ導出部45によってパラメータが設定され、該パラメータに基づいて、第1の変換画像データが補正されるので、ヒストグラムに基づいてパラメータを精度良く算出することができる。したがって、前記入力画像データに対して適正な補正処理を行うことができる。   As described above, in the present embodiment, it is determined whether the histogram created by the histogram creating unit 43 is valid, and when the histogram is valid, the parameter is set by the parameter deriving unit 45, and the parameter is set. Since the first converted image data is corrected based on the above, the parameters can be calculated with high accuracy based on the histogram. Therefore, an appropriate correction process can be performed on the input image data.

また、ヒストグラムが有効でない場合は、パラメータとして汎用変換テーブルが設定されるので、画像補正部46における画像補正処理を簡素化することができる。   When the histogram is not valid, the general-purpose conversion table is set as a parameter, so that the image correction process in the image correction unit 46 can be simplified.

次に、ヒストグラムの総画素数Nqが閾値Nthより小さく、総画素数Nqが有効条件を満たさない場合に、下地除去処理を行ったときの画像品位について説明する。   Next, image quality when the background removal processing is performed when the total number of pixels Nq in the histogram is smaller than the threshold value Nth and the total number of pixels Nq does not satisfy the valid condition will be described.

図12はヒストグラムの総画素数が小さい場合の入力画像データの例を示す図、図13はヒストグラムの総画素数が小さい場合の出力画像データの例を示す図、図14はヒストグラムの総画素数が小さい場合に作成されるヒストグラムの例を示す図である。なお、図14において、横軸に明度値Lを、縦軸に度数G(L)を採ってある。   12 shows an example of input image data when the total number of pixels in the histogram is small, FIG. 13 shows an example of output image data when the total number of pixels in the histogram is small, and FIG. 14 shows the total number of pixels in the histogram. It is a figure which shows the example of the histogram produced when is small. In FIG. 14, the lightness value L is taken on the horizontal axis, and the frequency G (L) is taken on the vertical axis.

この場合、原稿の下地領域の色成分が白ではなく、高明度・低彩度の色及び低明度・高彩度の色から成る場合について説明する。   In this case, a case will be described in which the color component of the background area of the document is not white, but is composed of high brightness / low saturation color and low brightness / high saturation color.

図12において、Diは入力画像データであり、この場合、該入力画像データDiの画像幅は12にされ、画像高さは6にされ、主走査方向のサンプリング間隔及び副走査方向のサンプリング間隔がいずれも2に設定される。   In FIG. 12, Di is input image data. In this case, the input image data Di has an image width of 12, an image height of 6, and a sampling interval in the main scanning direction and a sampling interval in the sub-scanning direction. Both are set to 2.

この場合、図面上でハッチングが付された画素dz1〜dz4等は、低明度・高彩度の色によって下地領域を形成する画素であり、図面上で網目が付された画素dz5〜dz8等は、高明度・低彩度の色によって下地領域を形成する画素である。また、図面上で四角形の中に円が描かれた画素dz3、dz4、dz7、dz8等は、間引く対象とならない画素、すなわち、非間引き対象画素であり、図面上で四角形の中に円が描かれていない画素dz1、dz2、dz5、dz6等は間引き対象画素である。   In this case, the hatched pixels dz1 to dz4 in the drawing are pixels that form a base region with colors of low brightness and high saturation, and the pixels dz5 to dz8 that are shaded in the drawing are highly bright. This is a pixel that forms a base region with a color of low and low saturation. In addition, pixels dz3, dz4, dz7, dz8, etc. in which a circle is drawn in a rectangle on the drawing are pixels that are not to be thinned out, that is, non-thinning target pixels, and a circle is drawn in the rectangle on the drawing. Pixels dz1, dz2, dz5, dz6, etc. that are not present are thinning target pixels.

ところで、本実施の形態においては、間引き判定部42aによって、入力画素が間引き対象画素でないと判断され、閾値判定部42bによって、入力画素の画素値があらかじめ設定された有効範囲内に収まると判断された場合に、総合判定部42cにおいてサンプリング判定信号が1にされ、ヒストグラム作成部43によってヒストグラムが作成されるようになっている。   By the way, in the present embodiment, the thinning determination unit 42a determines that the input pixel is not a thinning target pixel, and the threshold determination unit 42b determines that the pixel value of the input pixel falls within the preset effective range. In this case, the sampling determination signal is set to 1 in the overall determination unit 42c, and the histogram generation unit 43 generates a histogram.

ここで、間引き判定部42aによって、入力画素が間引き対象画素でないと判断され、かつ、入力画素が高明度・低彩度の画素である場合にだけ、閾値判定部42bによって、入力画素の画素値があらかじめ設定された有効範囲内に収まると判断されると、総合判定部42cにおいてサンプリング判定信号が1にされるのは、図面上で網目が付され、四角形の中に円が描かれた画素dz7、dz8等だけになる。   Here, only when the input pixel is determined not to be a thinning target pixel by the thinning determination unit 42a and the input pixel is a pixel having high brightness and low saturation, the threshold value determination unit 42b performs the pixel value of the input pixel. Is determined to fall within the preset effective range, the sampling determination signal is set to 1 in the overall determination unit 42c because a pixel is added with a mesh in the drawing and a circle is drawn in a rectangle Only dz7, dz8, etc.

その場合、サンプリング判定信号が1にされた画素dz7、dz8等に基づいて、ヒストグラム作成部43によって形成されるヒストグラムの度数分布は、図14に示されるようになり、ピーク明度値Lp及びその近傍の明度値Lにおける度数G(L)が極めて小さくなり、これに伴い、ヒストグラムの総画素数Nqも小さくなる。   In that case, the frequency distribution of the histogram formed by the histogram creation unit 43 based on the pixels dz7, dz8, etc. in which the sampling determination signal is set to 1 is as shown in FIG. 14, and the peak lightness value Lp and its vicinity The frequency G (L) at the lightness value L of the histogram becomes extremely small, and accordingly, the total number of pixels Nq of the histogram also becomes small.

この状態で、仮に、有効性判定部44がヒストグラムが有効であると判断し、パラメータ導出部45が、図14に示されるヒストグラムを参照し、明度値Lの閾値Lthを算出し、該閾値Lthに基づいて、パラメータ設定部45bが図10に示されるような設定変換テーブルを設定すると、入力側の明度値Liが閾値Lth以上である高明度・低彩度の画素dz7、dz8等だけ、出力側の明度値Loが白色と同じ最大の100にされてしまう。   In this state, the validity determination unit 44 temporarily determines that the histogram is valid, and the parameter derivation unit 45 calculates the threshold value Lth of the lightness value L with reference to the histogram shown in FIG. When the parameter setting unit 45b sets the setting conversion table as shown in FIG. 10, only the high and low chroma pixels dz7, dz8, etc. whose input side lightness value Li is greater than or equal to the threshold value Lth are output. The brightness value Lo on the side is set to 100, which is the same as white.

その結果、図13に示されるような出力画像データDoが生成されてしまう。   As a result, output image data Do as shown in FIG. 13 is generated.

図13において、Doは出力画像データであり、該出力画像データDoの画像幅は12にされ、画像高さは6にされ、主走査方向のサンプリング間隔及び副走査方向のサンプリング間隔がいずれも2に設定される。出力画像データDoの画素dz1’〜dz8’は前記入力画素データDiの画素dz1〜dz8に対応する。   In FIG. 13, Do is output image data, the image width of the output image data Do is 12, the image height is 6, and the sampling interval in the main scanning direction and the sampling interval in the sub-scanning direction are both 2. Set to The pixels dz1 'to dz8' of the output image data Do correspond to the pixels dz1 to dz8 of the input pixel data Di.

この場合、図14のヒストグラムは画素dz7、dz8等だけによって作成され、入力側の明度値Liが閾値Lth以上である高明度・低彩度の画素dz5〜dz8等だけ、出力側の明度値Loが白色と同じ最大の100にされ、出力画像データDoの画素dz5’〜dz8’等において色成分が除去される。   In this case, the histogram of FIG. 14 is created only by the pixels dz7, dz8, etc., and only the high-lightness / low-saturation pixels dz5 to dz8 whose input-side lightness value Li is greater than or equal to the threshold value Lth are output-side lightness values Lo. Is set to 100, the same as white, and color components are removed from the pixels dz5 ′ to dz8 ′ and the like of the output image data Do.

ところが、入力画素データDiの低明度・高彩度の色によって下地領域を形成する画素dz1〜dz4等については、出力側の明度値Loが入力側の明度値Liと等しくされるので、出力画像データDoの画素dz1’〜dz4’等において色成分は除去されない。   However, for the pixels dz1 to dz4 and the like that form the background region with the low brightness and high saturation colors of the input pixel data Di, the output side brightness value Lo is made equal to the input side brightness value Li, so that the output image data Do The color components are not removed in the pixels dz1 ′ to dz4 ′.

この場合、出力画像データDoに基づいて用紙に画像を形成すると、下地領域の色合いが大きく変わってしまう。   In this case, if an image is formed on a sheet based on the output image data Do, the color of the base region changes greatly.

これに対して、本実施の形態においては、図14に示されるように、ヒストグラムが画素dz7、dz8等だけによって作成される場合には、ヒストグラムの総画素数Nqが閾値Nthより小さく、総画素数Nqが有効条件を満たさないので、下地除去処理が行われない。   On the other hand, in the present embodiment, as shown in FIG. 14, when the histogram is created by only the pixels dz7, dz8, etc., the total number of pixels Nq of the histogram is smaller than the threshold value Nth, Since the number Nq does not satisfy the effective condition, the background removal process is not performed.

次に、本発明の第2の実施の形態について説明する。なお、第1の実施の形態と同じ構造を有するものについては、同じ符号を付与し、同じ構造を有することによる発明の効果については同実施の形態の効果を援用する。   Next, a second embodiment of the present invention will be described. In addition, about the thing which has the same structure as 1st Embodiment, the same code | symbol is provided and the effect of the same embodiment is used about the effect of the invention by having the same structure.

図15は本発明の第2の実施の形態における制御部の制御ブロック図である。   FIG. 15 is a control block diagram of the control unit according to the second embodiment of the present invention.

この場合、画像処理部40に制御信号制御部48が配設される。   In this case, a control signal control unit 48 is provided in the image processing unit 40.

そして、画像読出部41は、第1の画像記憶部としての入力画像記憶部52に記録された入力画像データをページ先頭アドレスから1画素ずつ読み出し、読み出した入力画像データの色空間(例えば、RGB色空間)を、所定の色空間(例えば、CIEL*a*b色空間)に変換し、所定の色空間に変換された画像データである第1の変換画像データをサンプリング条件判定部42、ヒストグラム作成部43及び画像補正部46に送る。   Then, the image reading unit 41 reads the input image data recorded in the input image storage unit 52 as the first image storage unit pixel by pixel from the page head address, and reads the color space (for example, RGB) of the read input image data Color space) is converted into a predetermined color space (for example, CIE L * a * b color space), and the first converted image data, which is image data converted into the predetermined color space, is sampled by the sampling condition determining unit 42 and the histogram. The data is sent to the creation unit 43 and the image correction unit 46.

また、画像読出部41は、前記制御信号制御部48から送られる制御信号に従って、入力画像データの読出しを開始したり、入力画像データの読出しを継続したり、入力画像データの読出しを停止したり、入力画像データの読出しを停止した位置から読み出しを再開したりする。   The image reading unit 41 starts reading the input image data, continues reading the input image data, or stops reading the input image data in accordance with the control signal sent from the control signal control unit 48. The reading is resumed from the position where the reading of the input image data is stopped.

前記画像補正部46は、あらかじめ指定された初期パラメータとしての、かつ、第2のパラメータとしての汎用変換テーブルに基づいて、画像読出部41から送られた第1の変換画像データを補正し、補正した画像データである第2の変換画像データを画像書込部47に送る。   The image correction unit 46 corrects the first converted image data sent from the image reading unit 41 based on the general-purpose conversion table as the initial parameter specified in advance and as the second parameter, and performs correction. The second converted image data, which is the processed image data, is sent to the image writing unit 47.

該画像書込部47は、画像補正部46から送られた第2の変換画像データを出力デバイスの色空間(例えば、CMYBk色空間等)に変換して出力画像データを生成し、ページ先頭アドレスから1画素ずつ出力画像記憶部55に書き込む。そして、制御信号制御部48から送られた制御信号に従って、出力画像データの読出しを開始したり、出力画像データの書込みを継続したり、出力画像データの書込みを停止したり、出力画像データの書込みを停止した位置から書込みを再開したりする。   The image writing unit 47 converts the second converted image data sent from the image correcting unit 46 into a color space (for example, CMYBk color space) of the output device to generate output image data, and a page head address To the output image storage unit 55 pixel by pixel. Then, in accordance with the control signal sent from the control signal control unit 48, the reading of the output image data is started, the writing of the output image data is continued, the writing of the output image data is stopped, and the writing of the output image data is performed. To resume writing from the position where is stopped.

また、前記制御信号制御部48は、制御信号制御処理を行い、有効性判定部44からの有効性判定信号及びパラメータ導出部45からの設定終了信号に基づいて、画像読出部41において、入力画像データの読出しを開始したり、入力画像データの読出しを継続したり、入力画像データの読出しを停止したり、入力画像データの読出しを停止した位置から読出しを再開したり、画像書込部47において、出力画像データの書込みを開始したり、出力画像データの書込みを継続したり、出力画像データの書込みを停止したり、出力画像データの書込みを停止した位置から書込みを再開したりするための制御信号を生成する。   In addition, the control signal control unit 48 performs control signal control processing, and the image reading unit 41 performs input image processing based on the validity determination signal from the validity determination unit 44 and the setting end signal from the parameter derivation unit 45. In the image writing unit 47, the reading of the data is started, the reading of the input image data is continued, the reading of the input image data is stopped, the reading is restarted from the position where the reading of the input image data is stopped, Control to start writing output image data, continue writing output image data, stop writing output image data, and resume writing from the position where writing of output image data was stopped Generate a signal.

次に、前記構成の画像処理装置としての複合機10の動作について説明する。   Next, the operation of the multifunction machine 10 as the image processing apparatus having the above configuration will be described.

この場合、第1の実施の形態と同様に、第1の変換画像データの画素値として明度値Lを使用して作成されたヒストグラムに基づいて、原稿の下地領域の色成分を除去するための下地除去処理について説明する。   In this case, as in the first embodiment, based on the histogram created using the lightness value L as the pixel value of the first converted image data, the color component in the background area of the document is removed. The background removal process will be described.

図16は本発明の第2の実施の形態における複合機の動作を示す第1のフローチャート、図17は本発明の第2の実施の形態における複合機の動作を示す第2のフローチャートである。   FIG. 16 is a first flowchart showing the operation of the multifunction machine according to the second embodiment of the present invention, and FIG. 17 is a second flowchart showing the operation of the multifunction machine according to the second embodiment of the present invention.

まず、前記画像入力部51は、スキャナ部20から送られた入力画像データを入力インタフェース11を介して取得し、取得した入力画像データを前記入力画像記憶部52に書き込む。   First, the image input unit 51 acquires the input image data sent from the scanner unit 20 via the input interface 11 and writes the acquired input image data in the input image storage unit 52.

続いて、制御信号制御部48は制御信号の初期値として開始信号を生成し、画像読出部41及び画像書込部47に送る。前記画像読出部41は、制御信号制御部48から送られた開始信号を受けて、入力画像記憶部52における読出位置を初期化してページ先頭アドレスにする。読出位置を初期化したときの入力画素の座標(x,y)は、
x=0
y=0
になる。また、前記画像書込部47は、制御信号制御部48から送られた開始信号を受けて、出力画像記憶部53における書込位置を初期化してページ先頭アドレスにする。書込位置を初期化したときの出力画素の座標(x,y)は、
x=0
y=0
になる。
Subsequently, the control signal control unit 48 generates a start signal as an initial value of the control signal and sends it to the image reading unit 41 and the image writing unit 47. The image reading unit 41 receives the start signal sent from the control signal control unit 48, initializes the reading position in the input image storage unit 52, and sets it as the page head address. The coordinates (x, y) of the input pixel when the readout position is initialized are:
x = 0
y = 0
become. The image writing unit 47 receives the start signal sent from the control signal control unit 48, initializes the writing position in the output image storage unit 53, and sets it as the page head address. The coordinates (x, y) of the output pixel when the writing position is initialized are:
x = 0
y = 0
become.

次に、パラメータ導出部45のパラメータ設定部45bは、初期パラメータとして、図11に示されるような汎用変換テーブルを設定する。   Next, the parameter setting unit 45b of the parameter deriving unit 45 sets a general-purpose conversion table as shown in FIG. 11 as an initial parameter.

続いて、画像読出部41は、入力画像記憶部52に記録された入力画像データをページ先頭アドレスから1画素ずつ読み出し、読み出した入力画像データのRGB色空間をCIEL*a*b色空間に変換し、CIEL*a*b色空間に変換された第1の変換画像データをサンプリング条件判定部42、ヒストグラム作成部43及び画像補正部46に送る。この場合、n画素目の入力画像データ、すなわち、RGBデータ(Rn ,Gn ,Bn )が読み出され、色空間が変換され、CIEL*a*bデータ(Ln ,an ,bn )が第1の変換画像データになる。 Subsequently, the image reading unit 41 reads the input image data recorded in the input image storage unit 52 pixel by pixel from the page head address, and converts the RGB color space of the read input image data into the CIEL * a * b color space. The first converted image data converted into the CIE L * a * b color space is sent to the sampling condition determination unit 42, the histogram creation unit 43, and the image correction unit 46. In this case, input image data of the nth pixel, that is, RGB data (R n , G n , B n ) is read, the color space is converted, and the CIE L * a * b data (L n , a n , b) n ) is the first converted image data.

続いて、サンプリング条件判定部42はサンプリング条件判定処理を行い、ヒストグラム作成部43はサンプリング条件判定部42の判定結果に基づいてヒストグラム作成処理を行うが、このとき、画像補正部46は画像補正処理を並列処理によって行う。すなわち、図16におけるステップS35〜S40とステップS41〜ステップS42とが並列して行われる。   Subsequently, the sampling condition determination unit 42 performs sampling condition determination processing, and the histogram creation unit 43 performs histogram creation processing based on the determination result of the sampling condition determination unit 42. At this time, the image correction unit 46 performs image correction processing. Is performed by parallel processing. That is, steps S35 to S40 and steps S41 to S42 in FIG. 16 are performed in parallel.

この場合、前記サンプリング条件判定部42において、間引き判定部42a(図4)は、第1の変換画像データを読み込み、第1の実施の形態と同じ方法で、入力画素が間引き対象画素でないかどうかを判断する。入力画素が間引き対象画素でない場合に、閾値判定部42bは、第1の実施の形態と同じ方法で、入力画素の画素値があらかじめ設定された画素値の有効範囲内に収まるかどうかを判断する。そして、入力画素の画素値があらかじめ設定された画素値の有効範囲内に収まる場合に、総合判定部42cはサンプリング判定信号を1にする。   In this case, in the sampling condition determination unit 42, the thinning determination unit 42a (FIG. 4) reads the first converted image data, and determines whether the input pixel is not a thinning target pixel in the same manner as in the first embodiment. Judging. When the input pixel is not the pixel to be thinned out, the threshold determination unit 42b determines whether the pixel value of the input pixel falls within the effective range of the pixel value set in advance by the same method as in the first embodiment. . When the pixel value of the input pixel falls within the effective range of the pixel value set in advance, the comprehensive determination unit 42c sets the sampling determination signal to 1.

一方、入力画素が間引き対象画素であるか、又は入力画素の画素値があらかじめ設定された画素値の有効範囲内に収まらない場合に、総合判定部42cはサンプリング判定信号を0にする。   On the other hand, when the input pixel is a pixel to be thinned out or the pixel value of the input pixel does not fall within the effective range of the preset pixel value, the comprehensive determination unit 42c sets the sampling determination signal to 0.

次に、前記ヒストグラム作成部43は、サンプリング条件判定部42から送られたサンプリング判定信号を受け、サンプリング判定信号が1である場合に、画像読出部41から送られた第1の変換画像データの画素値、本実施の形態においては、明度値Lを参照し、明度値Lにおけるヒストグラムの度数(L)をカウントする。すなわち、ヒストグラム作成部43は、各明度値Lごとの度数G(L)をインクリメントする。また、ヒストグラム作成部43は、サンプリング判定信号が1である場合、ヒストグラムの総画素数Nqをカウントし、サンプリング信号が0である場合、ヒストグラムの度数G(L)及び総画素数Nqをカウントしない。   Next, the histogram creation unit 43 receives the sampling determination signal sent from the sampling condition determination unit 42 and, when the sampling determination signal is 1, the first converted image data sent from the image reading unit 41. Pixel value, in the present embodiment, the brightness value L is referred to, and the histogram frequency (L) at the brightness value L is counted. That is, the histogram creation unit 43 increments the frequency G (L) for each lightness value L. Further, when the sampling determination signal is 1, the histogram creation unit 43 counts the total number of pixels Nq of the histogram, and when the sampling signal is 0, the histogram creation unit 43 does not count the histogram frequency G (L) and the total number of pixels Nq. .

一方、前記画像補正部46は、画像読出部41から送られた第1の変換画像データを受けると、パラメータ導出部45のパラメータ設定部45bにおいて設定された汎用変換テーブルを参照し、第1の変換画像データを補正し、補正された画像データである第2の変換画像データを画像書込部47に送る。なお、汎用変換テーブルにおいては、図11に示されるように、入力側の明度値Liと出力側の明度値Loとが等しくされるので、第1の変換画像データはそのまま第2の変換画像データになる。   On the other hand, when receiving the first converted image data sent from the image reading unit 41, the image correcting unit 46 refers to the general conversion table set in the parameter setting unit 45b of the parameter deriving unit 45, and The converted image data is corrected, and the second converted image data that is the corrected image data is sent to the image writing unit 47. In the general-purpose conversion table, as shown in FIG. 11, the lightness value Li on the input side and the lightness value Lo on the output side are made equal, so the first converted image data is directly used as the second converted image data. become.

続いて、画像書込部47は、前記第2の変換画像データのCIEL*a*b色空間を、出力デバイスとしてのプリンタ部30のCMYBk色空間に変換し、プリンタ部30の色空間に変換された画像データを前記出力画像データとし、ページ先頭アドレスから1画素ずつ前記出力画像記憶部53に書き込む。この場合、n画素目の第1の変換画像データ、すなわち、CIEL*a*bデータ(Ln ,an ,bn )が読み込まれ、色空間が変換され、CMYBkデータ(Cn 、Mn 、Yn 、Bkn )が出力画像データとして生成され、出力画像記憶部53に記録される。 Subsequently, the image writing unit 47 converts the CIEL * a * b color space of the second converted image data into the CMYBk color space of the printer unit 30 as an output device, and converts it into the color space of the printer unit 30. The processed image data is used as the output image data, and is written into the output image storage unit 53 pixel by pixel from the page head address. In this case, the first converted image data of the nth pixel, that is, CIE L * a * b data (L n , a n , b n ) is read, the color space is converted, and CMYBk data (C n , M n , Y n, Bk n) is generated as output image data, is recorded in the output image storage unit 53.

このようにして、サンプリング条件判定部42によってサンプリング条件判定処理が行われ、ヒストグラム作成部43によってサンプリング条件判定部42の判定結果に基づいてヒストグラム作成処理が行われるとともに、画像補正部46によって画像補正処理が並列処理によって行われている間に、前記画像読出部41は、入力画像記憶部52から読み出した入力画像データのサイズZが第1の読出サイズZ1より小さいかどうかを判断し、入力画像データのサイズZが第1の読出サイズZ1より小さい場合に、制御信号制御部48は、入力画像データの読出しを継続する制御信号として継続信号を生成し、画像読出部41に送るとともに、出力画像データの書込みを継続する制御信号として継続信号を生成し、画像書込部47に送る。これにより、画像読出部41は、入力画像データの読出位置をインクリメントし、次の入力画像データを読み出し、読み出した入力画像データの色空間の変換を行い、第1の変換画像データをサンプリング条件判定部42、ヒストグラム作成部43及び画像補正部46に送る。また、画像書込部47は、第2の変換画像データの色空間の変換を行い、出力画像データの書込位置をインクリメントし、出力画像データを出力画像記憶部53に書き込む。この場合、入力画像データのサイズZ及び第1の読出サイズZ1は、いずれも画素数で表され、第1の読出サイズZ1は256ライン分の値、すなわち、
Z1=W×256
にされる。
In this manner, the sampling condition determination process is performed by the sampling condition determination unit 42, the histogram generation process is performed by the histogram generation unit 43 based on the determination result of the sampling condition determination unit 42, and the image correction unit 46 performs image correction. While the processing is performed by parallel processing, the image reading unit 41 determines whether the size Z of the input image data read from the input image storage unit 52 is smaller than the first reading size Z1, and the input image When the data size Z is smaller than the first read size Z1, the control signal control unit 48 generates a continuation signal as a control signal for continuing the reading of the input image data, sends it to the image reading unit 41, and outputs the output image. A continuation signal is generated as a control signal for continuing the data writing and is sent to the image writing unit 47. Thereby, the image reading unit 41 increments the reading position of the input image data, reads the next input image data, converts the color space of the read input image data, and determines the first converted image data as a sampling condition determination Sent to the unit 42, the histogram creation unit 43, and the image correction unit 46. Further, the image writing unit 47 converts the color space of the second converted image data, increments the writing position of the output image data, and writes the output image data in the output image storage unit 53. In this case, the size Z of the input image data and the first readout size Z1 are both expressed by the number of pixels, and the first readout size Z1 is a value for 256 lines, that is,
Z1 = W × 256
To be.

そして、画像読出部41が入力画像記憶部52から読み出した入力画像データのサイズZが第1の読出サイズZ1と等しくなると、前記制御信号制御部48は、入力画像データの読出しを停止する制御信号として停止信号を生成し、画像読出部41に送るとともに、出力画像データの書込みを停止する制御信号として停止信号を生成し、画像書込部47に送る。これにより、画像読出部41は、入力画像データの読出しを停止し、画像書込部47は、出力画像データの書込みを停止する。   When the size Z of the input image data read from the input image storage unit 52 by the image reading unit 41 becomes equal to the first reading size Z1, the control signal control unit 48 controls the control signal to stop reading the input image data. Is generated and sent to the image reading unit 41, and a stop signal is generated and sent to the image writing unit 47 as a control signal for stopping the writing of the output image data. Thereby, the image reading unit 41 stops reading the input image data, and the image writing unit 47 stops writing the output image data.

続いて、有効性判定部44は、ヒストグラム作成部43から送られたヒストグラムの総画素数Nqを参照し、総画素数Nqが閾値Nth以上であるかどうかによって、総画素数Nqが有効条件を満たすかどうかを判断する。   Subsequently, the validity determination unit 44 refers to the total number of pixels Nq of the histogram sent from the histogram creation unit 43, and the total number of pixels Nq satisfies the validity condition depending on whether the total number of pixels Nq is equal to or greater than the threshold value Nth. Judge whether to meet.

本実施の形態において、閾値はNthは、前記第1の読出サイズZ1の20〔%〕の値にされ、総画素数Nqが、
Nq≧Nth
=Z1×0.2
である場合、前記有効性判定部44は、総画素数Nqが有効条件を満たし、ヒストグラムが有効であると判断し、有効性判定信号を1にして生成し、パラメータ導出部45に送る。また、総画素数Nqが、
Nq<Nth
=Z1×0.2
である場合、前記有効性判定部44は、総画素数Nqが有効条件を満たさず、ヒストグラムが有効でないと判断し、有効性判定信号を0にして生成し、制御信号制御部48に送る。
In the present embodiment, the threshold value Nth is set to a value of 20% of the first read size Z1, and the total number of pixels Nq is
Nq ≧ Nth
= Z1 × 0.2
In this case, the validity determination unit 44 determines that the total number of pixels Nq satisfies the validity condition and that the histogram is valid, generates a validity determination signal as 1, and sends it to the parameter deriving unit 45. The total number of pixels Nq is
Nq <Nth
= Z1 × 0.2
In this case, the validity determination unit 44 determines that the total number of pixels Nq does not satisfy the validity condition and the histogram is not valid, generates the validity determination signal as 0, and sends it to the control signal control unit 48.

これにより、該制御信号制御部48は、直ちに、入力画像データの読出しを再開する制御信号として再開信号を生成し、画像読出部41に送るとともに、出力画像データの書込みを再開する制御信号として再開信号を生成し、画像書込部47に送る。前記画像読出部41は、制御信号制御部48から送られた再開信号を受け、読出しを停止した位置から読出しを再開し、画像書込部47は、制御信号制御部48から送られた再開信号を受け、書込みを停止した位置から書込みを再開する。   Thus, the control signal control unit 48 immediately generates a restart signal as a control signal for restarting reading of the input image data, sends it to the image reading unit 41, and restarts as a control signal for restarting writing of the output image data. A signal is generated and sent to the image writing unit 47. The image reading unit 41 receives the restart signal sent from the control signal control unit 48 and resumes reading from the position where the reading is stopped, and the image writing unit 47 sends the restart signal sent from the control signal control unit 48. The writing is resumed from the position where the writing was stopped.

また、パラメータ導出部45は、有効性判定信号を読み込み、有効性判定信号が1である場合、前記特徴量算出部45a(図5)はヒストグラム作成部43から送られたヒストグラムを参照し、ヒストグラムの明度値Lの閾値Lthを算出する。   Also, the parameter deriving unit 45 reads the validity determination signal, and when the validity determination signal is 1, the feature amount calculation unit 45a (FIG. 5) refers to the histogram sent from the histogram creation unit 43, and the histogram The threshold value Lth of the lightness value L is calculated.

次に、パラメータ導出部45のパラメータ設定部45bは、特徴量算出部45aによって算出された閾値Lthに基づいて、原稿の下地領域の色成分を除去するための、図10に示されるような第1のパラメータとしての設定変換テーブルを設定し、同時に、設定終了信号を1にして生成し、制御信号制御部48に送る。   Next, the parameter setting unit 45b of the parameter deriving unit 45 removes the color component of the background area of the document based on the threshold value Lth calculated by the feature amount calculation unit 45a, as shown in FIG. A setting conversion table as a parameter of 1 is set, and at the same time, a setting end signal is set to 1 and generated and sent to the control signal control unit 48.

そして、該制御信号制御部48は、パラメータ導出部45から送られた設定終了信号を受けることによって、入力画像データの読出しをページ先頭アドレスから開始する制御信号として開始信号を生成し、画像読出部41に送る。   The control signal control unit 48 receives the setting end signal sent from the parameter deriving unit 45, generates a start signal as a control signal for starting the reading of the input image data from the page head address, and generates an image reading unit. 41.

該画像読出部41は、制御信号制御部48から送られた開始信号を受けると、入力画像記憶部52における読出位置を初期化してページ先頭アドレスにする。また、画像書込部47は、制御信号制御部48から送られた開始信号を受けると、出力画像記憶部53に出力画像データを書き込むための書込位置を初期化してページ先頭アドレスにする。   When the image reading unit 41 receives the start signal sent from the control signal control unit 48, the image reading unit 41 initializes the reading position in the input image storage unit 52 to be the page head address. Further, when the image writing unit 47 receives the start signal sent from the control signal control unit 48, the image writing unit 47 initializes the writing position for writing the output image data in the output image storage unit 53 and sets it as the page head address.

すなわち、読出位置及び書出位置を初期化したときの入力画素の各座標(x,y)は、
x=0
y=0
にされる。
That is, the coordinates (x, y) of the input pixel when the reading position and the writing position are initialized are:
x = 0
y = 0
To be.

次に、画像読出部41は、入力画像記憶部52に記録された入力画像データをページ先頭アドレスから1画素ずつ読み出し、読み出した入力画像データのRGB色空間をCIEL*a*b色空間に変換し、画像補正部46に送る。この場合、n画素目の入力画像データ、すなわち、RGBデータ(Rn ,Gn ,Bn )が読み出され、色空間が変換され、CIEL*a*bデータ(Ln ,an ,bn )が第1の変換画像データになり、画像補正部46に送られる。 Next, the image reading unit 41 reads the input image data recorded in the input image storage unit 52 pixel by pixel from the page head address, and converts the RGB color space of the read input image data into the CIE L * a * b color space. To the image correction unit 46. In this case, input image data of the nth pixel, that is, RGB data (R n , G n , B n ) is read, the color space is converted, and the CIE L * a * b data (L n , a n , b) n ) becomes the first converted image data and is sent to the image correction unit 46.

続いて、前記画像補正部46は、第1の変換画像データを受けると、パラメータ導出部45において設定された設定変換テーブルを参照し、第1の変換画像データにおける明度Lを変換することによって、下地除去処理の補正処理を行い、補正処理が行われた後の第2の変換画像データを画像書込部47に送る。   Subsequently, when the image correction unit 46 receives the first converted image data, the image correction unit 46 refers to the setting conversion table set in the parameter derivation unit 45 and converts the lightness L in the first converted image data. The background conversion process is corrected, and the second converted image data after the correction process is sent to the image writing unit 47.

該画像書込部47は、画像補正部46から送られた第2の変換画像データを受け、制御信号制御部48から送られた開始信号を受けると、出力画像データを生成し、出力画像記憶部53に書き込む。すなわち、画像書込部47は、開始信号を受けると、前記第2の変換画像データのCIEL*a*b色空間をプリンタ部30のCMYBk色空間に変換し、CMYBk色空間に変換された画像データを前記出力画像データとし、ページ先頭アドレスから1画素ずつ前記出力画像記憶部53に書き込む。この場合、n画素目の第2の変換画像データ、すなわち、CIEL*a*bデータ(Ln ,an ,bn )が読み込まれ、色空間が変換され、CMYBkデータ(Cn 、Mn 、Yn 、Bkn )が出力画像データにされ、出力画像記憶部53に記録される。 The image writing unit 47 receives the second converted image data sent from the image correction unit 46, receives the start signal sent from the control signal control unit 48, generates output image data, and stores the output image data. Write to part 53. That is, when receiving the start signal, the image writing unit 47 converts the CIEL * a * b color space of the second converted image data into the CMYBk color space of the printer unit 30, and the image converted into the CMYBk color space. Data is used as the output image data, and is written into the output image storage unit 53 pixel by pixel from the page head address. In this case, the second converted image data of the nth pixel, that is, CIE L * a * b data (L n , a n , b n ) is read, the color space is converted, and CMYBk data (C n , M n , Y n, Bk n) is the output image data, it is recorded in the output image storage unit 53.

そして、前記画像読出部41は、入力画像記憶部52から読み出した入力画像データのサイズZが第2の読出サイズZ2より小さいかどうかを判断し、入力画像データのサイズZが第2の読出サイズZ2より小さい場合に、制御信号制御部48は、入力画像データの読出しを継続する制御信号として継続信号を生成し、画像読出部41に送るとともに、出力画像データの書込みを継続する制御信号として継続信号を生成し、画像書込部47に送る。これにより、画像読出部41は、入力画像データの読出位置をインクリメントし、次の入力画像データを読み出し、読み出した入力画像データの色空間の変換を行い、第1の変換画像データをサンプリング条件判定部42、ヒストグラム作成部43及び画像補正部46に送る。また、画像書込部47は、第2の変換画像データの色空間の変換を行い、出力画像データの書込位置をインクリメントし、出力画像データを出力画像記憶部53に書き込む。   The image reading unit 41 determines whether the size Z of the input image data read from the input image storage unit 52 is smaller than the second reading size Z2, and the size Z of the input image data is the second reading size. If it is smaller than Z2, the control signal control unit 48 generates a continuation signal as a control signal for continuing the reading of the input image data, sends it to the image reading unit 41, and continues as a control signal for continuing the writing of the output image data. A signal is generated and sent to the image writing unit 47. Thereby, the image reading unit 41 increments the reading position of the input image data, reads the next input image data, converts the color space of the read input image data, and determines the first converted image data as a sampling condition determination Sent to the unit 42, the histogram creation unit 43, and the image correction unit 46. Further, the image writing unit 47 converts the color space of the second converted image data, increments the writing position of the output image data, and writes the output image data in the output image storage unit 53.

画像読出部41が入力画像記憶部52から読み出した入力画像データのサイズZが第2の読出サイズZ2と等しくなると、制御信号制御部48は、入力画像データの読出しを停止する制御信号として停止信号を生成し、画像読出部41に送るとともに、出力画像データの書込みを停止する制御信号として停止信号を生成し、画像書込部47に送る。   When the size Z of the input image data read by the image reading unit 41 from the input image storage unit 52 becomes equal to the second read size Z2, the control signal control unit 48 uses a stop signal as a control signal for stopping reading of the input image data. Is generated and sent to the image reading unit 41, and a stop signal is generated as a control signal for stopping writing of the output image data, and is sent to the image writing unit 47.

これにより、画像読出部41は入力画像データの読出しを停止し、画像書込部47は出力画像データの出力画像記憶部53への記録を停止し、画像出力部54は出力インタフェース16を介してプリンタ部30に出力画像データを送る。プリンタ部30は、制御部12から送られた出力画像データを受けると、出力画像データから各色の画像データを抽出し、各色の画像データをLEDヘッドに送る。   As a result, the image reading unit 41 stops reading the input image data, the image writing unit 47 stops recording the output image data in the output image storage unit 53, and the image output unit 54 passes through the output interface 16. The output image data is sent to the printer unit 30. Upon receiving the output image data sent from the control unit 12, the printer unit 30 extracts the image data of each color from the output image data and sends the image data of each color to the LED head.

次に、フローチャートについて説明する。
ステップS31 画像入力部51は入力画像データを取得する。
ステップS32 制御信号制御部48は開始信号を送り、画像読出部41は読出位置を初期化し、画像書込部47は書込位置を初期化する。
ステップS33 パラメータ設定部45bは汎用変換テーブルを設定する。
ステップS34 画像読出部41は入力画像データを読み出し、色空間を変換する。
ステップS35 間引き判定部42aは入力画素が間引き対象画素でないかどうかを判断する。入力画素が間引き対象画素でない場合はステップS36に、入力画素が間引き対象画素である場合はステップS38に進む。
ステップS36 閾値判定部42bは入力画素の画素値が有効範囲内に収まるどうかを判断する。入力画素の画素値が有効範囲内に収まる場合はステップS37に、入力画素の画素値が有効範囲内に収まらない場合はステップS38に進む。
ステップS37 総合判定部42cはサンプリング判定信号を1にする。
ステップS38 総合判定部42cはサンプリング判定信号を0にする。
ステップS39 ヒストグラム作成部43はサンプリング判定信号が1であるかどうかを判断する。サンプリング判定信号が1である場合はステップS40に、サンプリング判定信号が1でない場合はステップS43に進む。
ステップS40 ヒストグラム作成部43はヒストグラムの度数G(L)をカウントする。
ステップS41 画像補正部46は画像補正処理を行う。
ステップS42 画像書込部47は色空間を変換し、出力画像データを書き込む。
ステップS43 画像読出部41は入力画像データのサイズZが第1の読出サイズZ1より小さいかどうかを判断する。入力画像データのサイズZが第1の読出サイズZ1より小さい場合はステップS44に、入力画像データのサイズZが第1の読出サイズZ1以上である場合はステップS45に進む。
ステップS44 制御信号制御部48は継続信号を送り、画像読出部41は読出位置をインクリメントし、画像書込部47は書込位置をインクリメントし、ステップS34に戻る。
ステップS45 制御信号制御部48は停止信号を送る。
ステップS46 パラメータ導出部45は有効性判定信号が1であるかどうかを判断する。有効性判定信号が1である場合はステップS47に、有効性判定信号が1でない場合はステップS53に進む。
ステップS47 特徴量算出部45aは特徴量を算出する。
ステップS48 パラメータ設定部45bは設定変換テーブルを設定する。
ステップS49 制御信号制御部48は開始信号を送り、画像読出部41は読出位置を初期化し、画像書込部47は書込位置を初期化する。
ステップS50 画像読出部41は入力画像データを読み出し、色空間を変換する。
ステップS51 画像補正部46は画像補正処理を行う。
ステップS52 画像書込部47は色空間を変換し、出力画像データを書き込む。
ステップS53 画像読出部41は入力画像データのサイズZが第2の読出サイズZ2より小さいかどうかを判断する。入力画像データのサイズZが第2の読出サイズZ2より小さい場合はステップS55に、入力画像データのサイズZが第2の読出サイズZ2以上である場合はステップS56に進む。
ステップS55 制御信号制御部48は継続信号を送り、画像読出部41は読込位置をインクリメントし、画像書込部47は書込位置をインクリメントし、ステップS50に戻る。
ステップS56 制御信号制御部48は停止信号を送る。
ステップS57 画像出力部54は出力画像データをプリンタ部30に送り、処理を終了する。
Next, a flowchart will be described.
Step S31 The image input unit 51 acquires input image data.
Step S32: The control signal control unit 48 sends a start signal, the image reading unit 41 initializes the reading position, and the image writing unit 47 initializes the writing position.
Step S33: The parameter setting unit 45b sets a general-purpose conversion table.
Step S34: The image reading unit 41 reads the input image data and converts the color space.
Step S35: The thinning determination unit 42a determines whether the input pixel is not a thinning target pixel. If the input pixel is not a thinning target pixel, the process proceeds to step S36. If the input pixel is a thinning target pixel, the process proceeds to step S38.
Step S36: The threshold determination unit 42b determines whether or not the pixel value of the input pixel is within the effective range. If the pixel value of the input pixel falls within the valid range, the process proceeds to step S37. If the pixel value of the input pixel does not fall within the valid range, the process proceeds to step S38.
Step S37: The comprehensive judgment unit 42c sets the sampling judgment signal to 1.
Step S38: The comprehensive judgment unit 42c sets the sampling judgment signal to 0.
Step S39: The histogram creation unit 43 determines whether or not the sampling determination signal is 1. If the sampling determination signal is 1, the process proceeds to step S40. If the sampling determination signal is not 1, the process proceeds to step S43.
Step S40 The histogram creation unit 43 counts the histogram frequency G (L).
Step S41 The image correction unit 46 performs image correction processing.
Step S42: The image writing unit 47 converts the color space and writes the output image data.
Step S43: The image reading unit 41 determines whether the size Z of the input image data is smaller than the first reading size Z1. If the input image data size Z is smaller than the first read size Z1, the process proceeds to step S44. If the input image data size Z is greater than or equal to the first read size Z1, the process proceeds to step S45.
Step S44 The control signal control unit 48 sends a continuation signal, the image reading unit 41 increments the reading position, the image writing unit 47 increments the writing position, and the process returns to step S34.
Step S45: The control signal control unit 48 sends a stop signal.
Step S46: The parameter deriving unit 45 determines whether or not the validity determination signal is 1. If the validity determination signal is 1, the process proceeds to step S47. If the validity determination signal is not 1, the process proceeds to step S53.
Step S47: The feature amount calculation unit 45a calculates a feature amount.
Step S48: The parameter setting unit 45b sets a setting conversion table.
Step S49 The control signal control unit 48 sends a start signal, the image reading unit 41 initializes the reading position, and the image writing unit 47 initializes the writing position.
Step S50 The image reading unit 41 reads the input image data and converts the color space.
Step S51 The image correction unit 46 performs image correction processing.
Step S52 The image writing unit 47 converts the color space and writes the output image data.
Step S53: The image reading unit 41 determines whether the size Z of the input image data is smaller than the second reading size Z2. If the size Z of the input image data is smaller than the second read size Z2, the process proceeds to step S55. If the size Z of the input image data is greater than or equal to the second read size Z2, the process proceeds to step S56.
Step S55 The control signal control unit 48 sends a continuation signal, the image reading unit 41 increments the reading position, the image writing unit 47 increments the writing position, and the process returns to step S50.
Step S56: The control signal control unit 48 sends a stop signal.
Step S57 The image output unit 54 sends the output image data to the printer unit 30 and ends the process.

次に、第1、第2の実施の形態における画像読出部41及び画像書込部47の動作について説明する。   Next, operations of the image reading unit 41 and the image writing unit 47 in the first and second embodiments will be described.

図18は本発明の第1の実施の形態における画像読出部及び画像書込部の動作を示す図、図19は本発明の第2の実施の形態における画像読出部及び画像書込部の動作を示す図である。   FIG. 18 is a diagram showing the operations of the image reading unit and the image writing unit in the first embodiment of the present invention, and FIG. 19 is the operations of the image reading unit and the image writing unit in the second embodiment of the present invention. FIG.

図18に示されるように、第1の実施の形態においては、タイミングt0で画像読出部41による入力画像データのページ先頭アドレス(先頭)からの読出しが開始され、サンプリング条件判定部42によるサンプリング条件判定処理、及びヒストグラム作成部43によるヒストグラム作成処理が行われている間、画像書込部47による出力画像データの書込みは行われない。   As shown in FIG. 18, in the first embodiment, the image reading unit 41 starts reading the input image data from the page start address (start) at the timing t0, and the sampling condition determining unit 42 performs the sampling condition. While the determination process and the histogram creation process by the histogram creation unit 43 are being performed, the output image data is not written by the image writing unit 47.

そして、タイミングt1で、画像読出部41が入力画像記憶部52から読み出した入力画像データのサイズZが前記第1の読出サイズZ1と等しくなると、画像読出部41による入力画像データの読出しが停止され、有効性判定部44による有効性判定処理、及びパラメータ導出部45によるパラメータ設定処理が行われ、タイミングt2でパラメータ導出部45によって設定終了信号が出力され、画像読出部41及び画像書込部47に送られると、画像読出部41による入力画像データのページ先頭アドレスからの読出しが開始され、すべての入力画像データについて画像補正部46による補正処理が行われるとともに、画像書込部47による出力画像データのページ先頭アドレスからの書込みが開始される。   At time t1, when the size Z of the input image data read from the input image storage unit 52 by the image reading unit 41 becomes equal to the first reading size Z1, reading of the input image data by the image reading unit 41 is stopped. The validity determination process by the validity determination unit 44 and the parameter setting process by the parameter derivation unit 45 are performed, and the setting end signal is output by the parameter derivation unit 45 at the timing t2, and the image reading unit 41 and the image writing unit 47 are output. Is read from the page head address of the input image data by the image reading unit 41, the correction processing by the image correction unit 46 is performed on all the input image data, and the output image by the image writing unit 47 Writing of data from the page top address is started.

また、図19に示されるように、第2の実施の形態においては、タイミングt0で画像読出部41による入力画像データのページ先頭アドレス(先頭)からの読出しが開始され、サンプリング条件判定部42によるサンプリング条件判定処理、及びヒストグラム作成部43によるヒストグラム作成処理が行われ、このとき、画像補正部46によって汎用変換テーブルが使用されて画像補正処理が並列処理によって行われるとともに、画像書込部47による出力画像データのページ先頭アドレス(先頭)からの書込みが開始される。   Also, as shown in FIG. 19, in the second embodiment, the image reading unit 41 starts reading the input image data from the page head address (top) at the timing t0, and the sampling condition determining unit 42 Sampling condition determination processing and histogram creation processing by the histogram creation unit 43 are performed. At this time, the image correction unit 46 uses the general-purpose conversion table to perform image correction processing by parallel processing, and by the image writing unit 47. Writing of the output image data from the page head address (head) is started.

そして、タイミングt1で、画像読出部41が入力画像記憶部52から読み出した入力画像データのサイズZが第1の読出サイズZ1と等しくなると、画像読出部41による入力画像データの読出し、及び画像書込部47による出力画像データの書込みが停止される。   At time t1, when the size Z of the input image data read from the input image storage unit 52 by the image reading unit 41 becomes equal to the first reading size Z1, the input image data is read by the image reading unit 41 and the image document is read. Writing of the output image data by the insertion unit 47 is stopped.

続いて、有効性判定部44による有効性判定処理が行われ、有効性判定部44によって、有効性判定信号が0(無効)にされて出力されると、タイミングt2で制御信号制御部48によって、制御信号として再開信号が生成され、画像読出部41及び画像書込部47に送られる。そして、前記画像読出部41は、入力画像データの読出しを再開し、画像書込部47は出力画像データの書込みを再開する。   Subsequently, the validity determination process is performed by the validity determination unit 44. When the validity determination signal is output as 0 (invalid) by the validity determination unit 44, the control signal control unit 48 outputs the signal at timing t2. A restart signal is generated as a control signal and sent to the image reading unit 41 and the image writing unit 47. The image reading unit 41 resumes reading of input image data, and the image writing unit 47 resumes writing of output image data.

その後、画像読出部41が入力画像記憶部52から読み出した入力画像データのサイズZが前記第2の読出サイズZ2と等しくなるまで、画像読出部41による入力画像データの読出し、画像補正部46による汎用変換テーブルを使用することによる画像補正処理、及び画像書込部47による出力画像データの書込みが行われる。   Thereafter, until the size Z of the input image data read from the input image storage unit 52 by the image reading unit 41 becomes equal to the second reading size Z2, the input image data is read by the image reading unit 41, and the image correction unit 46 Image correction processing using the general-purpose conversion table, and output image data writing by the image writing unit 47 are performed.

この場合、有効性判定信号が0(無効)であり、汎用変換テーブルが継続して使用されるので、既に画像補正処理が行われた画像データは有効であり、タイミングt2で画像補正処理を開始する必要がない。したがって、画像読出部41及び画像書込部47による処理時間を短くすることができる。   In this case, since the validity determination signal is 0 (invalid) and the general-purpose conversion table is continuously used, the image data that has already undergone the image correction process is valid, and the image correction process is started at timing t2. There is no need to do. Therefore, the processing time by the image reading unit 41 and the image writing unit 47 can be shortened.

このように、本実施の形態においては、有効性判定部44によってヒストグラムが有効でないと判断されると、制御信号として再開信号が生成され、該再開信号が画像読出部41及び画像書込部47に送られ、画像読出部41による入力画像データの読出し、画像補正部46による汎用変換テーブルに基づく補正処理、及び画像書込部47による出力画像データの書込みが継続されるので、画像読出部41及び画像書込部47による処理時間を短くすることができる。   Thus, in the present embodiment, when the validity determination unit 44 determines that the histogram is not valid, a restart signal is generated as a control signal, and the restart signal is used as the image reading unit 41 and the image writing unit 47. Since the input image data is read by the image reading unit 41, the correction processing based on the general-purpose conversion table by the image correcting unit 46, and the output image data is written by the image writing unit 47, the image reading unit 41 is continued. In addition, the processing time by the image writing unit 47 can be shortened.

また、前記各実施の形態においては、明度値Lに基づいてヒストグラムが作成されるようになっているが、画素値の要素に基づいてヒストグラムを作成することができる。   In each of the above embodiments, a histogram is created based on the lightness value L. However, a histogram can be created based on the element of the pixel value.

そして、前記各実施の形態においては、画像読出部41が、入力画像記憶部52に記録された入力画像データのうちの、原稿における、文字、図形等の画像が形成されていない下地領域の入力画像データを読み出し、ヒストグラム作成部43が、画像が形成されていない下地領域の入力画像データに対応する第1の変換画像データの入力画素の画素値に基づいてヒストグラムを作成するようになっているが、画像読出部41によって、すべての入力画像データに対応する第1の変換画像データの入力画素の画素値に基づいてヒストグラムを作成することができる。   In each of the above embodiments, the image reading unit 41 inputs the background area in the original image in which characters, graphics, and the like are not formed, among the input image data recorded in the input image storage unit 52. The image data is read, and the histogram creation unit 43 creates a histogram based on the pixel value of the input pixel of the first converted image data corresponding to the input image data of the background area where no image is formed. However, the image reading unit 41 can create a histogram based on the pixel values of the input pixels of the first converted image data corresponding to all the input image data.

その場合、作成されたヒストグラムには、下地領域の色成分によって形成される度数分布のほかに、文字、図形等の画像によって複数の度数が形成されるが、下地領域の色成分によって形成される度数分布は、明度値Lが最も高くなるので、有効性判定部44は、明度値Lが最も高い度数分布に基づいてヒストグラムが有効であるかどうかを判断し、パラメータ導出部45は、明度値Lが最も高い度数分布に基づいて設定パラメータを設定する。   In this case, in the created histogram, in addition to the frequency distribution formed by the color components of the background area, a plurality of frequencies are formed by images such as characters and figures, but are formed by the color components of the background area. Since the frequency distribution has the highest lightness value L, the validity determination unit 44 determines whether the histogram is valid based on the frequency distribution with the highest lightness value L, and the parameter derivation unit 45 determines the lightness value. Setting parameters are set based on the frequency distribution with the highest L.

さらに、前記各実施の形態においては、カラーの複合機10について説明しているが、本発明を、モノクロの複合機に適用したり、複写機、ファクシミリ等の画像処理装置に適用したりすることができる。   Further, in each of the above-described embodiments, the color multifunction peripheral 10 has been described. However, the present invention may be applied to a monochrome multifunction peripheral or an image processing apparatus such as a copying machine or a facsimile. Can do.

なお、本発明は前記各実施の形態に限定されるものではなく、本発明の趣旨に基づいて種々変形させることが可能であり、それらを本発明の範囲から排除するものではない。   The present invention is not limited to the above embodiments, and various modifications can be made based on the gist of the present invention, and they are not excluded from the scope of the present invention.

10 複合機
30 プリンタ部
41 画像読出部
43 ヒストグラム作成部
44 有効性判定部
45 パラメータ導出部
46 画像補正部
47 画像書込部
51 画像入力部
52 入力画像記憶部
53 出力画像記憶部
54 画像出力部
DESCRIPTION OF SYMBOLS 10 Multifunction device 30 Printer part 41 Image reading part 43 Histogram preparation part 44 Effectiveness determination part 45 Parameter derivation part 46 Image correction part 47 Image writing part 51 Image input part 52 Input image storage part 53 Output image storage part 54 Image output part

Claims (10)

(a)画像入力部によって取得された入力画像データを記録するための第1の画像記憶部と、
(b)該第1の画像記憶部から前記入力画像データを読み出し、色空間を変換して第1の変換画像データを生成する画像読出部と、
(c)前記第1の変換画像データに基づいてヒストグラムを作成するヒストグラム作成部と、
(d)該ヒストグラム作成部によって作成されたヒストグラムが有効であるかどうかを判断する有効性判定部と、
(e)ヒストグラムが有効である場合に、入力画像データを補正するためのパラメータを設定するパラメータ導出部と、
(f)該パラメータ導出部によって設定されたパラメータに基づいて、前記第1の変換画像データを補正し、第2の変換画像データを生成する画像補正部と、
(g)前記第2の変換画像データを読み込み、色空間を変換して出力画像データを生成し、第2の画像記憶部に記録する画像書込部と、
(h)前記第2の画像記憶部に記録された出力画像データを読み出して出力デバイスに送る画像出力部とを有することを特徴とする画像処理装置。
(A) a first image storage unit for recording input image data acquired by the image input unit;
(B) an image reading unit that reads the input image data from the first image storage unit, converts a color space, and generates first converted image data;
(C) a histogram creating unit that creates a histogram based on the first converted image data;
(D) an effectiveness determination unit that determines whether or not the histogram created by the histogram creation unit is valid;
(E) a parameter derivation unit that sets parameters for correcting input image data when the histogram is valid;
(F) an image correcting unit that corrects the first converted image data and generates second converted image data based on the parameters set by the parameter deriving unit;
(G) an image writing unit that reads the second converted image data, converts a color space to generate output image data, and records the output image data in a second image storage unit;
(H) An image processing apparatus comprising: an image output unit that reads out output image data recorded in the second image storage unit and sends the output image data to an output device.
前記有効性判定部は、ヒストグラム作成部によって作成されたヒストグラムの度数の合計値が閾値以上であるかどうかを判断し、合計値が閾値以上である場合に、ヒストグラムが有効であると判断する請求項1に記載の画像処理装置。   The effectiveness determination unit determines whether the total value of the frequencies of the histogram created by the histogram creation unit is equal to or greater than a threshold value, and determines that the histogram is valid when the total value is equal to or greater than the threshold value. Item 8. The image processing apparatus according to Item 1. (a)前記入力画像データの入力画素がサンプリング条件を満たすかどうかを判断するサンプリング条件判定部を有するとともに、
(b)前記入力画素がサンプリング条件を満たす場合に、前記ヒストグラム作成部は、サンプリング条件を満たすと判断された入力画素に基づいてヒストグラムを作成する請求項1又は2に記載の画像処理装置。
(A) a sampling condition determining unit that determines whether or not an input pixel of the input image data satisfies a sampling condition;
(B) The image processing apparatus according to claim 1, wherein when the input pixel satisfies a sampling condition, the histogram creation unit creates a histogram based on the input pixel determined to satisfy the sampling condition.
前記サンプリング条件判定部は、入力画素が間引き対象画素でない場合に、入力画素がサンプリング条件を満たすと判断する請求項3に記載の画像処理装置。   The image processing apparatus according to claim 3, wherein the sampling condition determining unit determines that the input pixel satisfies the sampling condition when the input pixel is not a thinning target pixel. 前記サンプリング条件判定部は、入力画素の画素値が有効範囲内に収まる場合に、入力画素がサンプリング条件を満たすと判断する請求項3又は4に記載の画像処理装置。   The image processing apparatus according to claim 3, wherein the sampling condition determination unit determines that the input pixel satisfies the sampling condition when a pixel value of the input pixel is within an effective range. 前記パラメータ導出部によってパラメータが設定されるのに伴って、前記画像読出部は、第1の画像記憶部の先頭から入力画像データの読出しを再度開始し、前記画像書込部は、第2の画像記憶部の先頭から出力画像データの書込みを開始する請求項1〜5のいずれか1項に記載の画像処理装置。   As the parameter is set by the parameter deriving unit, the image reading unit starts reading the input image data again from the top of the first image storage unit, and the image writing unit The image processing apparatus according to claim 1, wherein writing of output image data is started from the head of the image storage unit. 前記パラメータ導出部は、前記有効性判定部によってヒストグラムが有効であると判断された場合、パラメータとして設定変換テーブルを設定し、前記有効性判定部によってヒストグラムが有効でないと判断された場合、パラメータとして汎用変換テーブルを設定する請求項6に記載の画像処理装置。   The parameter derivation unit sets a setting conversion table as a parameter when the validity determination unit determines that the histogram is valid, and as a parameter when the validity determination unit determines that the histogram is not valid. The image processing apparatus according to claim 6, wherein a general-purpose conversion table is set. (a)前記パラメータ導出部は、初期パラメータとして汎用変換テーブルを設定し、
(b)前記ヒストグラム作成部によるヒストグラムの作成と、前記画像補正部による汎用変換テーブルに基づく第1の変換画像データの補正、及び前記画像書込部による出力画像データの書込みとが並列して行われる請求項1〜5のいずれか1項に記載の画像処理装置。
(A) The parameter derivation unit sets a general-purpose conversion table as an initial parameter,
(B) Creation of a histogram by the histogram creation unit, correction of first converted image data based on a general-purpose conversion table by the image correction unit, and writing of output image data by the image writing unit are performed in parallel. The image processing apparatus according to any one of claims 1 to 5.
(a)前記有効性判定部によるヒストグラムの有効性の判定結果に基づいて制御信号を生成する制御信号制御部を有するとともに、
(b)該制御信号制御部によって生成された制御信号に基づいて、前記画像読出部は、第1の画像記憶部から入力画像データを読み出し、前記画像書込部は、第2の画像記憶部に出力画像データを書き込む請求項8に記載の画像処理装置。
(A) having a control signal control unit that generates a control signal based on the determination result of the effectiveness of the histogram by the effectiveness determination unit;
(B) Based on the control signal generated by the control signal control unit, the image reading unit reads input image data from the first image storage unit, and the image writing unit is a second image storage unit. The image processing apparatus according to claim 8, wherein the output image data is written in the.
前記制御信号制御部は、前記有効性判定部によってヒストグラムが有効であると判断された場合、制御信号として開始信号を生成し、開始信号を画像読出部及び画像書込部に送り、前記有効性判定部によってヒストグラムが有効でないと判断された場合、制御信号として再開信号を生成し、再開信号を画像読出部及び画像書込部に送る請求項9に記載の画像処理装置。   The control signal control unit generates a start signal as a control signal when the validity determination unit determines that the histogram is valid, sends the start signal to the image reading unit and the image writing unit, and The image processing apparatus according to claim 9, wherein when the determination unit determines that the histogram is not valid, a restart signal is generated as a control signal, and the restart signal is sent to the image reading unit and the image writing unit.
JP2013227649A 2013-10-31 2013-10-31 Image processing device Expired - Fee Related JP6224419B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013227649A JP6224419B2 (en) 2013-10-31 2013-10-31 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013227649A JP6224419B2 (en) 2013-10-31 2013-10-31 Image processing device

Publications (2)

Publication Number Publication Date
JP2015089048A true JP2015089048A (en) 2015-05-07
JP6224419B2 JP6224419B2 (en) 2017-11-01

Family

ID=53051375

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013227649A Expired - Fee Related JP6224419B2 (en) 2013-10-31 2013-10-31 Image processing device

Country Status (1)

Country Link
JP (1) JP6224419B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03201772A (en) * 1989-12-28 1991-09-03 Konica Corp Image scanner
JPH04313774A (en) * 1991-01-28 1992-11-05 Fuji Xerox Co Ltd Surface removing system for image processor
JP2005176168A (en) * 2003-12-15 2005-06-30 Fuji Xerox Co Ltd Image processor
JP2006295625A (en) * 2005-04-12 2006-10-26 Canon Inc Image processing apparatus, method thereof, computer program, and recording medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03201772A (en) * 1989-12-28 1991-09-03 Konica Corp Image scanner
JPH04313774A (en) * 1991-01-28 1992-11-05 Fuji Xerox Co Ltd Surface removing system for image processor
JP2005176168A (en) * 2003-12-15 2005-06-30 Fuji Xerox Co Ltd Image processor
JP2006295625A (en) * 2005-04-12 2006-10-26 Canon Inc Image processing apparatus, method thereof, computer program, and recording medium

Also Published As

Publication number Publication date
JP6224419B2 (en) 2017-11-01

Similar Documents

Publication Publication Date Title
US8600154B2 (en) Image processing apparatus and image processing method
JP6182092B2 (en) Image processing apparatus and image processing method
JP2009038537A (en) Image processor, image formation device, image processing program, and recording medium for recording image processing program therein
JP2018166277A (en) Image processing system, and computer program
JP2022173510A (en) Image processing apparatus, image processing method, and program
JP5648409B2 (en) Image processing apparatus, image processing method, and program
US11240401B2 (en) Image processing apparatus and image processing method
US7835045B2 (en) Image processing device and image processing method
JP2011176463A (en) Image processor and image forming apparatus
JP6224419B2 (en) Image processing device
JP2019134232A (en) Image formation device, and method and program for the device
JP5216799B2 (en) Image processing apparatus and image forming apparatus
US10657428B2 (en) Image processing unit, image forming apparatus, image processing method, and storage medium
US10587775B2 (en) Image processing apparatus, image processing method, and storage medium for edge enhancement based on plural conditions
JP5422520B2 (en) Image processing device
JP5949399B2 (en) Image processing apparatus and program
JP5361830B2 (en) Image processing device
JP2011155620A (en) Image processing apparatus and image forming apparatus
JP2009060359A (en) Image processor, image processing method, and image printing device
JP2016139868A (en) Image processing apparatus
JP5265040B2 (en) Image processing apparatus, image forming apparatus, computer program, recording medium, and image processing method
US20180343362A1 (en) Image processing apparatus and control method
JP2012034012A (en) Image processing apparatus, image forming apparatus
JP2013025186A (en) Image forming apparatus and image processing method
JP2020123898A (en) Image processing apparatus, image forming apparatus, image processing program, and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160314

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170124

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170228

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170414

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20171005

R150 Certificate of patent or registration of utility model

Ref document number: 6224419

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees