JP6001983B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP6001983B2
JP6001983B2 JP2012219074A JP2012219074A JP6001983B2 JP 6001983 B2 JP6001983 B2 JP 6001983B2 JP 2012219074 A JP2012219074 A JP 2012219074A JP 2012219074 A JP2012219074 A JP 2012219074A JP 6001983 B2 JP6001983 B2 JP 6001983B2
Authority
JP
Japan
Prior art keywords
value
lightness
color
image data
saturation
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.)
Expired - Fee Related
Application number
JP2012219074A
Other languages
Japanese (ja)
Other versions
JP2014072820A (en
Inventor
貴良 岩本
貴良 岩本
Original Assignee
株式会社沖データ
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 株式会社沖データ filed Critical 株式会社沖データ
Priority to JP2012219074A priority Critical patent/JP6001983B2/en
Publication of JP2014072820A publication Critical patent/JP2014072820A/en
Application granted granted Critical
Publication of JP6001983B2 publication Critical patent/JP6001983B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Description

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

従来、画像処理装置においては、スキャナ等で読み込まれた原画像データから、原稿の用紙に相当する領域、すなわち、背景領域の色を白に変換する背景除去処理が行われている。該背景除去処理では、スキャナ等のデバイスで使用されるRGB等のデバイス依存色で表された原画像データを、明るさを表す明度値と彩度や色みを表す色差成分値とが独立したCIE L* * * 、CIE XYZ等のデバイス非依存色に変換する。そして、背景の明度値を検出し、検出した明度値以上の画素の明度値を一律に明度最大値にするような階調変換を行い、明度最大値となった画素の彩度値を0(無彩色)とすることによって、背景を白に飛ばすようになっている。 2. Description of the Related Art Conventionally, in an image processing apparatus, a background removal process is performed in which an area corresponding to a document sheet, that is, a background area color is converted to white from original image data read by a scanner or the like. In the background removal processing, the original image data represented by device-dependent colors such as RGB used in a device such as a scanner has independent brightness values representing brightness and color difference component values representing saturation and color. Conversion to device-independent colors such as CIE L * a * b * and CIE XYZ. Then, the brightness value of the background is detected, gradation conversion is performed so that the brightness values of the pixels equal to or higher than the detected brightness value are uniformly set to the maximum brightness value, and the saturation value of the pixel having the maximum brightness value is set to 0 ( (Achromatic), the background is made to fly white.

もっとも、このような背景除去処理では、背景領域外の画素であっても、背景の明度値以上の明度値である彩度値の高い画素の色が白になってしまう。そこで、これを防ぐために、階調変換を行った後に、明度最大値となる画素のうち、所定の閾(しきい)値を超える彩度値の画素については、その彩度値を保存し、所定の閾値以下の彩度値の画素についてのみ、その彩度値を0とするようになっている(例えば、特許文献1参照。)。   However, in such a background removal process, even for pixels outside the background region, the color of the pixel having a high saturation value that is a lightness value equal to or higher than the lightness value of the background is white. Therefore, in order to prevent this, after performing the gradation conversion, among the pixels having the maximum brightness value, for the pixels having a saturation value exceeding the predetermined threshold (threshold) value, the saturation value is stored, Only for pixels having a saturation value equal to or less than a predetermined threshold, the saturation value is set to 0 (see, for example, Patent Document 1).

特開2006−67233号公報JP 2006-67233 A

しかしながら、従来の画像処理装置においては、背景の明度値以上の画素の明度値を一律に明度最大値に変換した状態で彩度の変換が行われるので、背景の明度値以上の異なる明度値において彩度値を保存すべき画素と彩度値を0にすべき画素とが混在した場合には、それらを区別して処理することは不可能であった。例えば、ともに背景画素よりも高明度高彩度であるカラー高明度画素とスキャナの蓋(ふた)裏反射板画素とがあり、カラー高明度画素が蓋裏反射板画素よりも彩度値が低いときには、カラー高明度色を残すことと蓋裏反射板の色を消すこととは、トレードオフの関係にならざるを得なかった。   However, in the conventional image processing apparatus, since the saturation conversion is performed in a state where the lightness values of pixels equal to or higher than the background lightness value are uniformly converted to the maximum lightness value, in different lightness values equal to or higher than the background lightness value. When pixels where saturation values are to be stored and pixels where saturation values are to be 0 are mixed, it is impossible to distinguish and process them. For example, there are color high brightness pixels that are both brighter and more saturated than the background pixels, and scanner lid (reflector) back reflector pixels, and when the color high brightness pixels have a lower saturation value than the lid back reflector pixels, Leaving the color high brightness color and erasing the color of the back cover reflector had to be in a trade-off relationship.

本発明は、前記従来の画像処理装置の問題点を解決して、画像データの色差成分に対して明度値に応じて異なる変換処理を行うようにして、背景の明度値以上の明度値を備える画素であって、互いに異なる明度値を備える彩度値を保存すべき画素と0にすべき画素とが混在した場合であっても、それらを区別して処理することができる画像処理装置を提供することを目的とする。   The present invention solves the problems of the conventional image processing apparatus and performs a different conversion process according to the lightness value on the color difference component of the image data so as to have a lightness value equal to or higher than the lightness value of the background. Provided is an image processing apparatus capable of distinguishing and processing even when pixels that should store chroma values having different brightness values and pixels that should be 0 are mixed. For the purpose.

そのために、本発明の画像処理装置においては、原稿を載置する載置台と、該載置台上に載置された原稿に光を照射する光源と、該光源から照射された光を反射する反射板とを備える読取部から原画像データを取得する画像取得部と、該画像取得部が取得した前記原画像データを、明度成分と色差成分とが独立した明度色差色空間で表わされる第1画像データヘ変換する変換処理を行う入力色空間変換部と、前記第1画像データから背景色を検出する背景色検出部と、前記第1画像データを、明度最大値を超える明度値を含む拡張色空間で表される第2画像データに変換する変換処理を行う拡張色空間変換部と、前記拡張色空間において、前記背景色の明度彩度値を示す第1点と、前記反射板の色の明度彩度値である基準明度彩度値を示す第2点と、を通る直線により定められる、明度値に応じて異なる彩度変換閾値を導出する彩度変換閾値導出部と、前記第2画像データの色差成分に対し、前記彩度変換閾値に基づいて変換処理を行う色差成分変換部と、該色差成分変換部が変換処理を行った前記第2画像データの明度値を、前記明度最大値以下の値に変換する変換処理を行う明度成分変換部と、該明度成分変換部が変換処理を行った前記第2画像データを出力形式の色空間の第3画像データに変換する変換処理を行う出力色空間変換部と、前記第3画像データを出力する画像出力部と、を備える。 Therefore, in the image processing apparatus of the present invention, a mounting table on which a document is placed, a light source that irradiates light on the document placed on the placing table, and a reflection that reflects the light emitted from the light source An image acquisition unit that acquires original image data from a reading unit that includes a plate, and the original image data acquired by the image acquisition unit is represented by a lightness color difference color space in which a lightness component and a color difference component are independent. An input color space conversion unit that performs conversion processing to convert data, a background color detection unit that detects a background color from the first image data, and an extended color space that includes a lightness value that exceeds the lightness maximum value. An extended color space conversion unit that performs conversion processing to convert to the second image data represented by: a first point that indicates the lightness saturation value of the background color in the extended color space; and the lightness of the color of the reflector the indicating the reference lightness saturation value is the saturation value A saturation conversion threshold value deriving unit for deriving a saturation conversion threshold value which is determined by a straight line passing through a point and differs depending on the lightness value, and for the color difference component of the second image data, based on the saturation conversion threshold value A chrominance component conversion unit that performs conversion processing; and a luminosity component conversion unit that performs conversion processing for converting the lightness value of the second image data that has been converted by the chrominance component conversion unit into a value that is equal to or less than the maximum lightness value. An output color space conversion unit that performs conversion processing for converting the second image data that has been converted by the lightness component conversion unit into third image data in an output format color space; and outputs the third image data. An image output unit.

本発明によれば、画像処理装置においては、画像データの色差成分に対して明度値に応じて異なる変換処理を行うようになっている。これにより、背景の明度値以上の明度値を備える画素であって、互いに異なる明度値を備える彩度値を保存すべき画素と0にすべき画素とが混在した場合であっても、それらを区別して処理することができる。   According to the present invention, the image processing apparatus performs different conversion processing on the color difference component of the image data according to the lightness value. Thus, even when pixels having a lightness value equal to or higher than the lightness value of the background and having a saturation value having different lightness values and pixels to be stored in a mixture are set to 0, It can be distinguished and processed.

本発明の第1の実施の形態における画像処理装置本体の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the image processing apparatus main body in the 1st Embodiment of this invention. 本発明の第1の実施の形態における画像処理装置の外観を示す斜視図である。1 is a perspective view illustrating an appearance of an image processing apparatus according to a first embodiment of the present invention. 本発明の第1の実施の形態における画像処理装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an image processing device according to a first embodiment of the present invention. 本発明の第1の実施の形態における画像処理装置の背景除去処理の結果を説明する図である。It is a figure explaining the result of the background removal process of the image processing apparatus in the 1st Embodiment of this invention. 本発明の第1の実施の形態における画像処理装置の背景除去処理の色空間上での動作を説明する図である。It is a figure explaining the operation | movement on the color space of the background removal process of the image processing apparatus in the 1st Embodiment of this invention. 本発明の第1の実施の形態における画像処理装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the image processing apparatus in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるL値ヒストグラムの例を示す図である。It is a figure which shows the example of the L value histogram in the 1st Embodiment of this invention. 本発明の第1の実施の形態における画像処理装置の背景色検出のサブルーチンを示すフローチャートである。4 is a flowchart illustrating a background color detection subroutine of the image processing apparatus according to the first embodiment of the present invention. 本発明の第1の実施の形態における画像処理装置の背景除去のサブルーチンを示すフローチャートである。It is a flowchart which shows the subroutine of the background removal of the image processing apparatus in the 1st Embodiment of this invention. 本発明の第2の実施の形態における画像処理装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the image processing apparatus in the 2nd Embodiment of this invention. 本発明の第2の実施の形態における画像処理装置の背景除去処理の結果を説明する図である。It is a figure explaining the result of the background removal process of the image processing apparatus in the 2nd Embodiment of this invention. 本発明の第2の実施の形態における画像処理装置の背景除去処理の色空間上での動作を説明する図である。It is a figure explaining the operation | movement on the color space of the background removal process of the image processing apparatus in the 2nd Embodiment of this invention. 本発明の第2の実施の形態における画像処理装置の背景除去のサブルーチンを示すフローチャートである。It is a flowchart which shows the subroutine of the background removal of the image processing apparatus in the 2nd Embodiment of this invention.

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

図2は本発明の第1の実施の形態における画像処理装置の外観を示す斜視図、図3は本発明の第1の実施の形態における画像処理装置の構成を示すブロック図である。   FIG. 2 is a perspective view showing the appearance of the image processing apparatus according to the first embodiment of the present invention, and FIG. 3 is a block diagram showing the configuration of the image processing apparatus according to the first embodiment of the present invention.

図において、10は画像処理装置であり、スキャナ、プリンタ、ファクシミリ装置、複写機等の各種機能を併せ持つカラー複合機であるが、ここでは、少なくとも、原稿からカラー画像を読み取る読取部としてのスキャナ12と、該スキャナ12が原稿から読み取ったカラー画像データに対して加工や補正などの変換を施す画像処理装置本体11と、画像を印刷用紙等の媒体に印刷する画像形成部としてのプリンタ13とを有するものとして説明する。   In the figure, reference numeral 10 denotes an image processing apparatus, which is a color complex machine having various functions such as a scanner, a printer, a facsimile machine, and a copying machine. Here, at least a scanner 12 as a reading unit for reading a color image from a document. An image processing apparatus main body 11 that performs conversion such as processing and correction on color image data read from the original by the scanner 12, and a printer 13 as an image forming unit that prints an image on a medium such as printing paper. It explains as having.

本実施の形態において、前記画像処理装置本体11は、入力I/F(インターフェイス)14、制御部15及び出力I/F(インターフェイス)22を備える。   In the present embodiment, the image processing apparatus main body 11 includes an input I / F (interface) 14, a control unit 15, and an output I / F (interface) 22.

また、前記スキャナ12は、原稿載置台、光源、反射板、受光素子及び信号処理部(図示せず)を備え、原稿載置台に載置された原稿に光源からの光を照射し、照射した光を原稿及びスキャナ蓋裏部の反射板にて反射させ、その反射光を受光素子が受光して画像信号を読み取り、信号処理部によってA/D変換やシェーディング補正などの信号処理を施し、RGB画像データを取得する。そして、取得した画像データを入力I/F14を介して画像処理装置本体11の制御部15へ送信する。   The scanner 12 includes a document placing table, a light source, a reflecting plate, a light receiving element, and a signal processing unit (not shown), and irradiates the document placed on the document placing table with light from the light source. The light is reflected by the reflector on the back of the document and the scanner lid, the light receiving element receives the reflected light, reads the image signal, and performs signal processing such as A / D conversion and shading correction by the signal processing unit. Get image data. Then, the acquired image data is transmitted to the control unit 15 of the image processing apparatus main body 11 via the input I / F 14.

入力I/F14は、外部装置からの画像データを取得するために外部装置と接続するためのインターフェイスであり、スキャナ12と接続され、該スキャナ12で読み取られた画素毎に3色のRGB色成分値によって表現されるカラー画像データを取得する。   The input I / F 14 is an interface for connecting to an external device in order to acquire image data from the external device. The input I / F 14 is connected to the scanner 12 and has three RGB color components for each pixel read by the scanner 12. Acquires color image data represented by a value.

制御部15は、揮発性メモリであるRAM16、読み込み専用のメモリであるROM17、プロセッサであるCPU21を備え、画像データの一時記憶や画像処理プログラムの演算、実行などの制御を行う。   The control unit 15 includes a RAM 16 that is a volatile memory, a ROM 17 that is a read-only memory, and a CPU 21 that is a processor, and performs control such as temporary storage of image data and calculation and execution of an image processing program.

出力I/F22は、画像処理装置本体11の制御部15によって処理されたカラー画像データを外部装置に出力するために外部装置と接続するためのインターフェイスであり、プリンタ13と接続され、CMYK画像データをプリンタ13に出力する。   The output I / F 22 is an interface for connecting to an external device in order to output the color image data processed by the control unit 15 of the image processing apparatus main body 11 to the external device. The output I / F 22 is connected to the printer 13 and receives CMYK image data. Is output to the printer 13.

プリンタ13は、例えば、電子写真方式のプリンタであり、受信したCMYK画像データに従い、印刷用紙等の媒体にトナー色材による画像を形成する。   The printer 13 is, for example, an electrophotographic printer, and forms an image using a toner color material on a medium such as printing paper in accordance with the received CMYK image data.

次に、前記画像処理装置本体11を機能の観点から説明する。   Next, the image processing apparatus main body 11 will be described from the viewpoint of functions.

図1は本発明の第1の実施の形態における画像処理装置本体の機能構成を示すブロック図である。   FIG. 1 is a block diagram showing a functional configuration of the image processing apparatus main body according to the first embodiment of the present invention.

図に示されるように、前記画像処理装置本体11は、機能の観点から、原画像データを取得する画像取得部23と、該画像取得部23が取得した原画像データを、 明度成分と色差成分とが独立した明度色差色空間で表わされる第1画像データヘ変換する変換処理を行う入力色空間変換部24と、前記第1画像データから背景色を検出する背景色検出部25と、背景除去処理を行う背景除去部26と、明度成分変換部33が変換処理を行った第2画像データを出力形式の色空間の第3画像データに変換する変換処理を行う出力色空間変換部34と、画像出力部35とを有する。そして、前記背景除去部26は、第1画像データを、 明度最大値を超える明度値を含む拡張色空間で表される第2画像データに変換する変換処理を行う拡張色空間変換部27と、明度値に応じて異なる彩度変換閾値を導出する彩度変換閾値導出部31と、第2画像データの色差成分に対し、明度値に応じて異なる変換処理を行う色差成分変換部32と、該色差成分変換部32が変換処理を行った第2画像データの明度値を、明度最大値以下の値に変換する変換処理を行う明度成分変換部33とを備える。なお、各部における通信制御、書き込み制御、及び、画像処理の演算は、制御部15におけるCPU21が、RAM16をワーキングメモリとして使用し、ROM17に格納されたプログラムを実行することによって、行われる。   As shown in the figure, from the viewpoint of function, the image processing apparatus body 11 includes an image acquisition unit 23 that acquires original image data, and the original image data acquired by the image acquisition unit 23 as a lightness component and a color difference component. An input color space conversion unit 24 that performs conversion processing into first image data represented in a lightness color difference color space, a background color detection unit 25 that detects a background color from the first image data, and background removal processing A background removal unit 26 that performs the conversion process, an output color space conversion unit 34 that performs a conversion process that converts the second image data that has been converted by the lightness component conversion unit 33 into the third image data in the color space of the output format, and an image And an output unit 35. The background removal unit 26 performs an extension color space conversion unit 27 that performs conversion processing for converting the first image data into second image data represented by an extended color space including a brightness value exceeding the maximum brightness value, A saturation conversion threshold value deriving unit 31 for deriving a saturation conversion threshold value that differs according to the lightness value, a color difference component conversion unit 32 that performs a different conversion process according to the lightness value for the color difference component of the second image data, A lightness component conversion unit 33 that performs conversion processing for converting the lightness value of the second image data that has been subjected to the conversion processing by the color difference component conversion unit 32 into a value that is equal to or less than the maximum lightness value; Note that the communication control, write control, and image processing calculations in each unit are performed by the CPU 21 in the control unit 15 using the RAM 16 as a working memory and executing a program stored in the ROM 17.

画像取得部23は、入力I/F14を通してスキャナ12で読み取られたRGB画像データを取得し、取得したRGB画像データをRAM16に保存する。なお、本実施の形態においては、スキャナ12から送信されたRGB画像データを取得するものとして説明するが、PC(パーソナルコンピュータ)や、ネットワークに接続されたHDD(ハードディスクドライブ)等の記憶謀体や、USBメモリスティック等の可搬記憶媒体を入力I/F14に接続してRGB画像データを取得してもよい。また、取得する画像データは、RGB画像データに限定されるものでなく、RGB以外の色空間の画像データであってもよい。   The image acquisition unit 23 acquires RGB image data read by the scanner 12 through the input I / F 14 and stores the acquired RGB image data in the RAM 16. In the present embodiment, description will be made on the assumption that the RGB image data transmitted from the scanner 12 is acquired. However, a storage object such as a PC (personal computer) or an HDD (hard disk drive) connected to a network, Alternatively, a portable storage medium such as a USB memory stick may be connected to the input I / F 14 to acquire RGB image data. Further, the acquired image data is not limited to RGB image data, and may be image data in a color space other than RGB.

入力色空間変換部24は、RAM16に保存されたRGB画像データを、明度成分と色差成分とが独立した均等色空間であるCIE L* * * (以下「Lab」と称する。)空間の画像データである第1画像データとしてのLab画像データに変換する。本実施の形態においては、入力されたRGB値(Rin、Gin、Bin)の組み合わせに対応したLab値(Lin、ain、bin)を導出する3次元ルックアップテーブルをあらかじめ作成しておき、画像データの画素毎にRGB値を読み取り、3次元ルックアップテーブルを参照して、対応するLab値に変換する。3次元ルックアップテーブルによる色空間の変換方法としては、公知の変換方法、例えば、特開平9−208389号公報に記載されている変換方法を用いる。そして、入力色空間変換部24によって変換されたLab画像データは、背景色検出部25及び背景除去部26の拡張色空間変換部27へ転送される。 The input color space conversion unit 24 converts the RGB image data stored in the RAM 16 into a CIE L * a * b * (hereinafter referred to as “Lab”) space, which is a uniform color space in which the brightness component and the color difference component are independent. The image data is converted into Lab image data as first image data. In the present embodiment, a three-dimensional lookup table for deriving Lab values (L in , a in , b in ) corresponding to combinations of input RGB values (R in , G in , B in ) is created in advance. In addition, the RGB value is read for each pixel of the image data, and converted into the corresponding Lab value with reference to the three-dimensional lookup table. As a color space conversion method using a three-dimensional lookup table, a known conversion method, for example, a conversion method described in JP-A-9-208389 is used. The Lab image data converted by the input color space conversion unit 24 is transferred to the background color detection unit 25 and the extended color space conversion unit 27 of the background removal unit 26.

背景色検出部25は、入力色空間変換部24によって変換されたLab画像データを参照し、後述される検出方法により、背景領域の明度値のうち最低値に該当する明度値を背景明度値とし、背景領域の色差成分値の平均値を背景色差成分値とした背景色Lab値(Lws、aws、bws)を検出する。そして、背景色検出部25によって検出された背景色Lab値(Lws、aws、bws)は、背景除去部26の拡張色空間変換部27及び彩度変換閾値導出部31へ転送される。 The background color detection unit 25 refers to the Lab image data converted by the input color space conversion unit 24, and determines the lightness value corresponding to the lowest value among the lightness values of the background region as a background lightness value by a detection method described later. Then, a background color Lab value (L ws , a ws , b ws ) using the average value of the color difference component values of the background region as the background color difference component value is detected. The background color Lab values (L ws , a ws , b ws ) detected by the background color detection unit 25 are transferred to the extended color space conversion unit 27 and the saturation conversion threshold value derivation unit 31 of the background removal unit 26. .

背景除去部26は、入力色空間を拡張色空間に変換する拡張色空間変換部27と、明度値に応じて異なる彩度変換閾値を導出する彩度変換閾値導出部31と、彩度変換閾値に基づき拡張明度値Lp に応じて色差成分値(ap 、bp )を変換する色差成分変換部32と、拡張明度値Lp を元の明度値Lの範囲に変換する明度成分変換部33とを備える。 The background removal unit 26 includes an extended color space conversion unit 27 that converts the input color space into an extended color space, a saturation conversion threshold value derivation unit 31 that derives a saturation conversion threshold value that varies depending on the lightness value, and a saturation conversion threshold value. chrominance component values in accordance with the extended lightness value L p based on (a p, b p) and chrominance component transformer 32 for converting the brightness component conversion unit that converts the extended lightness value L p in the range of the original lightness value L 33.

拡張色空間変換部27は、入力色空間変換部24によって変換された入力Lab空間のLab値である入力Lab値(Lin、ain、bin)を、明度値Lの最大値としての明度最大値Lmax (本実施の形態ではLmax =100とする)を超える明度値を含む拡張色空間で表される第2画像データのLab値である拡張Lab値(Lp 、ap 、bp )に変換する。具体的には、背景色検出部25から取得した背景色明度値Lwsが明度最大値Lmax に変換されるような単調増加な明度変換関数を導出し、導出した明度変換関数を用いて入力明度値Linを拡張明度値Lp に変換する。なお、拡張色差成分値(ap 、bp )は、入力色差成分値(ain、bin)と同じ値とする。 The extended color space conversion unit 27 uses the input Lab value (L in , a in , b in ), which is the Lab value of the input Lab space converted by the input color space conversion unit 24, as the maximum value of the lightness value L. Extended Lab values (L p , a p , b) that are Lab values of the second image data represented in the extended color space including a lightness value exceeding the maximum value L max (L max = 100 in the present embodiment). p ). Specifically, a monotonically increasing lightness conversion function is derived such that the background color lightness value L ws acquired from the background color detection unit 25 is converted to the lightness maximum value L max , and input using the derived lightness conversion function The brightness value L in is converted into an extended brightness value L p . The extended color difference component values (a p , b p ) are the same values as the input color difference component values (a in , b in ).

本実施の形態では、説明を単純にするために、明度値のみを変換し、色差成分値は入力値を用いているが、一般には、3成分の複合的な演算により拡張Lab値(Lp 、ap 、bp )を求める。例えば、次の式(1)のようにLabの3×3マトリクス演算などを用いることができる。 In this embodiment, in order to simplify the explanation, only the lightness value is converted and the input value is used as the color difference component value. However, in general, an extended Lab value (L p , A p , b p ). For example, Lab 3 × 3 matrix operation or the like can be used as in the following equation (1).

本実施の形態では、該式(1)において、係数s11=s22=1、係数s01=s02=s10=s12=s20=s21=0、定数t0 =t1 =t2 =0として、係数s00を導出することにより明度変換関数を導出する。 In the present embodiment, in the equation (1), coefficient s 11 = s 22 = 1, coefficient s 01 = s 02 = s 10 = s 12 = s 20 = s 21 = 0, constant t 0 = t 1 = A lightness conversion function is derived by deriving a coefficient s 00 with t 2 = 0.

そして、変換された拡張Lab値(Lp 、ap 、bp )は、色差成分変換部32へ転送される。 The converted extended Lab values (L p , a p , b p ) are transferred to the color difference component conversion unit 32.

彩度変換閾値導出部31は、背景色検出部25によって検出された背景色Lab値(Lws、aws、bws)から求められる背景色明度彩度値(Lws、Cws)と、所定の基準明度彩度値(Lf 、Cf )とに基づき、明度値に応じて異なる彩度変換閾値Cth(l)を導出する。
The saturation conversion threshold value deriving unit 31 includes a background color brightness saturation value (L ws , C ws ) obtained from the background color Lab values (L ws , a ws , b ws ) detected by the background color detection unit 25, and Based on predetermined reference lightness saturation values (L f , C f ), a saturation conversion threshold value C th (l) that differs depending on the lightness value is derived.

該明度成分変換部33は、色差成分変換部32によって色差成分変換されたLab値(Lp 、aq 、bq )の明度値Lp のうち、明度最大値Lmax より大きい明度値をLmax 以下の値に変換する。明度値が変換されたLab値(Lq 、aq 、bq )は、出力色空間変換部34へ転送される。 該明degree component converter 33, the color difference components converted Lab values by the color difference component conversion unit 32 (L p, a q, b q) of the brightness value L p of the brightness maximum value L max greater lightness value L Convert to a value less than max . The Lab values (L q , a q , b q ) obtained by converting the lightness values are transferred to the output color space conversion unit 34.

該出力色空間変換部34は、背景除去部26によって変換された第2画像データを、出力形式の色空間の第3画像データとしてのCMYK画像データに変換する。本実施の形態では、入力されたLab値の組み合わせに対応した出力CMYK値を導出する3次元ルックアップテーブルをあらかじめ作成しておき、画像データの画素毎にLab値を読み取り、3次元ルックアップテーブルを参照して、対応するCMYK値に変換する。変換されたCMYK画像データは、画像出力部35へ転送される。   The output color space conversion unit 34 converts the second image data converted by the background removal unit 26 into CMYK image data as third image data in the color space of the output format. In the present embodiment, a three-dimensional lookup table for deriving an output CMYK value corresponding to a combination of input Lab values is created in advance, and the Lab value is read for each pixel of image data. Are converted into corresponding CMYK values. The converted CMYK image data is transferred to the image output unit 35.

該画像出力部35は、出力I/F22を通してプリンタ13へCMYK画像データを出力する。すると、プリンタ13は、受信したCMYK画像データに従い、印刷用紙等の媒体にトナー等の色材によって画像を形成する。   The image output unit 35 outputs CMYK image data to the printer 13 through the output I / F 22. Then, in accordance with the received CMYK image data, the printer 13 forms an image with a color material such as toner on a medium such as printing paper.

次に、前記構成の背景除去部26が実行する背景除去処理について詳細に説明する。   Next, the background removal process executed by the background removal unit 26 having the above configuration will be described in detail.

図4は本発明の第1の実施の形態における画像処理装置の背景除去処理の結果を説明する図、図5は本発明の第1の実施の形態における画像処理装置の背景除去処理の色空間上での動作を説明する図である。なお、図4において、(a)は画像取得部が取得した画像データを示す図、(b)は従来の背景除去処理を実行した後の画像データを示す図、(c)は従来の他の背景除去処理を実行した後の画像データを示す図、(d)は本発明の第1の実施の形態における背景除去処理を実行した後の画像データを示す図であり、図5において、(a−1)は本発明の第1の実施の形態における拡張色空間変換部の動作を説明する図、(a−2)は本発明の第1の実施の形態における色差成分変換部の動作を説明する図、(a−3)は本発明の第1の実施の形態における明度成分変換部の動作を説明する図、(b−1)は従来の明度成分変換の動作を説明する図、(b−2)は従来の彩度変換の動作を説明する図である。   FIG. 4 is a diagram for explaining the result of the background removal processing of the image processing apparatus according to the first embodiment of the present invention, and FIG. 5 is the color space of the background removal processing of the image processing apparatus according to the first embodiment of the present invention. It is a figure explaining the operation | movement above. 4A is a diagram showing image data acquired by the image acquisition unit, FIG. 4B is a diagram showing image data after performing a conventional background removal process, and FIG. The figure which shows the image data after performing a background removal process, (d) is a figure which shows the image data after performing the background removal process in the 1st Embodiment of this invention, In FIG. -1) is a diagram for explaining the operation of the extended color space conversion unit in the first embodiment of the present invention, and (a-2) is for explaining the operation of the color difference component conversion unit in the first embodiment of the present invention. (A-3) is a diagram for explaining the operation of the lightness component conversion unit in the first embodiment of the present invention, (b-1) is a diagram for explaining the operation of the conventional lightness component conversion, (b) FIG. 2B is a diagram illustrating a conventional saturation conversion operation.

図4(a)に示されるように、スキャナ12によって該スキャナ12の読取サイズよりも小さいサイズの原稿を読み取った場合、画像取得部23が取得したRGB画像データには、原稿の色に相当する背景色51と、スキャナ12の蓋裏部の反射板色52とが含まれる。また、原稿の領域には、明度の低いカラー画像部53と、明度の高いカラー画像部54とが存在する。   As shown in FIG. 4A, when a document having a size smaller than the reading size of the scanner 12 is read by the scanner 12, the RGB image data acquired by the image acquisition unit 23 corresponds to the color of the document. A background color 51 and a reflector color 52 on the back of the lid of the scanner 12 are included. Further, a color image portion 53 having a low lightness and a color image portion 54 having a high lightness exist in the document area.

本実施の形態における背景除去部26の実行する背景除去処理では、図4(d)に示されるように、画像であるカラー画像部53及び54の色情報は除去されず、背景色51及び反射板色52の色情報のみが除去される。
In the background removal process executed by the background removal unit 26 in the present embodiment, as shown in FIG. 4D, the color information of the color image parts 53 and 54 that are images is not removed, but the background color 51 and the reflection are obtained. Only the color information of the plate color 52 is removed.

そして、前記点61、点62及び点63は、すべて、明度値が背景色51の明度値Lws以上であるので、それぞれ、明度値が明度最大値Lmax =100である点64、点65及び点66に変換される。 The points 61, 62, and 63 all have a lightness value equal to or higher than the lightness value Lws of the background color 51. Therefore, the lightness value is the lightness maximum value Lmax = 100. And point 66.

このように、従来の背景除去処理における明度成分変換では、変換後に彩度値の差は区別可能であるが、明度値の差についての情報は失われてしまう。   Thus, in the lightness component conversion in the conventional background removal processing, the difference in the saturation value can be distinguished after the conversion, but information on the lightness value difference is lost.

また、図5(b−2)には、従来の背景除去処理における彩度変換の動作が示されている。   FIG. 5B-2 shows the operation of saturation conversion in the conventional background removal processing.

ここでは、図5(b−1)に示される従来の背景除去処理における明度成分変換の動作によって明度最大値Lmax となった画素値のうち、所定の閾値(例えば、破線71で示される背景色51の彩度値Cws)以下の彩度値を0とし、すなわち、点67に変換し、閾値より大きい彩度値は変更しないものとする。この場合、彩度値を0とすべき背景色51の彩度値(点64)と反射板色52の彩度値(点66)との間に、彩度値を保存すべきカラー高明度色の彩度値(点65)があるため、カラー高明度色とともに反射板色52が残ってしまう。その結果、図4(b)に示されるように、反射板色52が除去されないことになる。 Here, a predetermined threshold value (for example, the background indicated by the broken line 71) among the pixel values having the maximum brightness value L max by the brightness component conversion operation in the conventional background removal process shown in FIG. It is assumed that the saturation value below the saturation value C ws ) of the color 51 is set to 0, that is, converted to a point 67 and the saturation value greater than the threshold value is not changed. In this case, the color high brightness in which the saturation value is to be stored between the saturation value of the background color 51 (point 64) and the saturation value (point 66) of the reflector color 52 which should have a saturation value of 0. Since there is a color saturation value (point 65), the reflector color 52 remains together with the color high brightness color. As a result, as shown in FIG. 4B, the reflector color 52 is not removed.

一方、反射板色52を消すために前記閾値を大きく取った場合には、点64、点65及び点66のすべてが点67に変換され、反射板色52とともにカラー高明度色が消えてしまう。その結果、図4(c)に示されるように、明度の高いカラー画像部54が消えてしまうことになる。   On the other hand, when the threshold value is set large in order to erase the reflector color 52, all of the points 64, 65 and 66 are converted into points 67, and the color high brightness color disappears together with the reflector color 52. . As a result, as shown in FIG. 4C, the color image portion 54 with high brightness disappears.

このように、従来の背景除去処理では、背景色51の明度値以上の画素の明度値を一律に明度最大値に変換した状態で彩度変換の動作が行われるので、明度の高いカラー画像部54を残すことと、反射板色52を消すこととを、同時には実現することができない。   As described above, in the conventional background removal processing, the saturation conversion operation is performed in a state where the brightness values of the pixels equal to or higher than the brightness value of the background color 51 are uniformly converted to the maximum brightness value. It is not possible to leave 54 and erase the reflector color 52 at the same time.

これに対して、図5(a−1)には、本実施の形態における背景除去部26の拡張色空間変換部27の動作が示されている。   In contrast, FIG. 5A-1 shows the operation of the extended color space conversion unit 27 of the background removal unit 26 in the present embodiment.

ここで、点72、点73及び点74は、それぞれ、背景色51(点61)、カラー高明度色(点62)及び反射板色52(点63)に対して拡張色空間変換を行った後の点である。拡張色空間は、明度最大値Lmax を超える明度値を含むので、変換後の点72、点73及び点74は、明度値及び彩度値について、互いの差が区別可能である。なお、あらかじめ取得可能な反射板色52(点63)の明度値と彩度値とを、基準明度彩度値(Lf 、Cf )とする。 Here, the point 72, the point 73, and the point 74 were subjected to extended color space conversion for the background color 51 (point 61), the color high brightness color (point 62), and the reflector color 52 (point 63), respectively. It is a later point. Since the extended color space includes lightness values that exceed the lightness maximum value L max , the converted points 72, 73, and 74 can be distinguished from each other in terms of lightness values and saturation values. In addition, let the brightness value and saturation value of the reflector color 52 (point 63) which can be acquired beforehand be a standard brightness saturation value ( Lf , Cf ).

また、図5(a−2)には、本実施の形態における背景除去部26の色差成分変換部32の動作が示されている。   FIG. 5A-2 shows the operation of the color difference component conversion unit 32 of the background removal unit 26 in the present embodiment.

ここで、破線75は、彩度変換閾値導出部31が導出した彩度変換閾値Cth(l)を示している。該彩度変換閾値Cth(l)は、背景色51(点61)が拡張色空間変換された点72を始点とし反射板色52(点63)が拡張色空間変換された点74を通る半直線として導出されている。 Here, the broken line 75 indicates the saturation conversion threshold value C th (l) derived by the saturation conversion threshold value deriving unit 31. The saturation conversion threshold value C th (l) passes through a point 74 where the background color 51 (point 61) is subjected to the extended color space conversion and the reflector color 52 (point 63) is subjected to the extended color space conversion. It is derived as a half line.

そして、色差成分変換部32は、入力した拡張彩度値Cp が、入力した明度値における彩度変換閾値Cth(Lp )以下である点72及び点74を、それぞれ、彩度値が0である点76及び点77に変換する(aq =bq =0)。また、拡張彩度値Cp が彩度変換閾値Cth(Lp )より大きい点73に対しては、彩度値(色差成分値)の変換を行わない(aq =ap 、bq =bp )。 Then, the chrominance component conversion unit 32 sets the point 72 and the point 74 in which the input extended saturation value C p is equal to or less than the saturation conversion threshold value C th (L p ) in the input lightness value, respectively. Convert to points 76 and 77 which are 0 (a q = b q = 0). Further, the saturation value (color difference component value) is not converted for the point 73 where the extended saturation value C p is larger than the saturation conversion threshold C th (L p ) (a q = a p , b q = B p ).

さらに、図5(a−3)には、本実施の形態における背景除去部26の明度成分変換部33の動作が示されている。   Further, FIG. 5A-3 shows the operation of the lightness component conversion unit 33 of the background removal unit 26 in the present embodiment.

ここで、背景色51(点61)、カラー高明度色(点62)及び反射板色52(点63)は、色差成分変換部32によって、それぞれ、点76、点73及び点77に変換されている。そして、点73及び点77は、明度最大値Lmax よりも大きい明度値となっているので、明度成分変換部33は、これらの明度値を明度値Lの再現範囲内の所定の明度値(本実施の形態ではLmax )に変換する。これにより、点73は点78に変換され、点77は、無彩色軸(縦軸)上であるために、背景色51の変換値である点76(白色)に変換される。 Here, the background color 51 (point 61), the color high brightness color (point 62), and the reflector color 52 (point 63) are converted into points 76, 73, and 77 by the color difference component converter 32, respectively. ing. Since the point 73 and the point 77 are lightness values larger than the lightness maximum value L max , the lightness component conversion unit 33 converts these lightness values into predetermined lightness values within the reproduction range of the lightness value L ( In this embodiment, it is converted to L max ). Thereby, the point 73 is converted to a point 78, and the point 77 is converted to a point 76 (white) which is a conversion value of the background color 51 because it is on the achromatic color axis (vertical axis).

その結果、背景色51(点61)及び反射板色52(点63)は白色(点76)へ変換され、カラー高明度色(点62)は明度最大値で彩度値を備える色(点78)へ変換される。したがって、図4(d)に示されるように、目的の出力を得ることができる。つまり、明度の低いカラー画像部53も、明度の高いカラー画像部54も残しながら、背景色51及び反射板色52を消すことができる。   As a result, the background color 51 (point 61) and the reflector color 52 (point 63) are converted to white (point 76), and the color high brightness color (point 62) is a color (point) with a maximum brightness value and a saturation value. 78). Therefore, the target output can be obtained as shown in FIG. That is, the background color 51 and the reflector color 52 can be erased while the color image portion 53 having a low brightness and the color image portion 54 having a high brightness remain.

このように、本実施の形態における背景除去部26が実行する背景除去処理では、背景明度値以上の明度値を備える画素であって、互いに異なる明度値を備える彩度値を保存すべき画素と0にすべき画素とが混在した場合であっても、それらを区別して適切に処理することが可能となる。   As described above, in the background removal process executed by the background removal unit 26 in the present embodiment, pixels that have brightness values that are equal to or higher than the background brightness value and that should store saturation values that have different brightness values. Even when pixels that should be set to 0 are mixed, it is possible to distinguish and appropriately process them.

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

図6は本発明の第1の実施の形態における画像処理装置の動作を示すフローチャートである。   FIG. 6 is a flowchart showing the operation of the image processing apparatus according to the first embodiment of the present invention.

まず、画像取得部23は、RGB画像データを取得する。具体的には、入力I/F14を通してスキャナ12で読み取られたRGB画像データを取得し、RAM16に記録して保存する。   First, the image acquisition unit 23 acquires RGB image data. Specifically, RGB image data read by the scanner 12 is acquired through the input I / F 14, recorded in the RAM 16 and stored.

続いて、入力色空間変換部24は、Lab画像データへの色空間変換を行う。具体的には、RAM16に保存したRGB画像データを、明度成分と色差成分とが独立した均等色空間であるLab空間の画像データとしてのLab画像データに変換する。   Subsequently, the input color space conversion unit 24 performs color space conversion into Lab image data. Specifically, the RGB image data stored in the RAM 16 is converted into Lab image data as image data in the Lab space, which is a uniform color space in which the brightness component and the color difference component are independent.

続いて、背景色検出部25は、背景色検出処理を実行する。具体的には、入力色空間変換部24によって変換されたLab画像データを参照し、背景色を検出する。   Subsequently, the background color detection unit 25 executes background color detection processing. Specifically, the background color is detected with reference to the Lab image data converted by the input color space conversion unit 24.

続いて、背景除去部26は、背景除去処理を実行する。具体的には、図5(a−1)〜(a−3)に示されるような動作を行う。   Subsequently, the background removal unit 26 performs background removal processing. Specifically, the operations shown in FIGS. 5A-1 to 5A-3 are performed.

続いて、出力色空間変換部34は、出力CMYK画像データへ変更する。具体的には、背景除去部26によって変換されたLab画像データを、3次元ルックアップテーブルを参照して、CMYK画像データに変換する。   Subsequently, the output color space conversion unit 34 changes to output CMYK image data. Specifically, the Lab image data converted by the background removal unit 26 is converted into CMYK image data with reference to a three-dimensional lookup table.

最後に、画像出力部35がCMYK画像データを出力する。具体的には、出力I/F22を介してプリンタ13へCMYK画像データを出力する。そして、処理を終了する。   Finally, the image output unit 35 outputs CMYK image data. Specifically, the CMYK image data is output to the printer 13 via the output I / F 22. Then, the process ends.

次に、フローチャートについて説明する。
ステップS1 画像取得部23は、RGB画像データを取得する。
ステップS2 入力色空間変換部24は、Lab画像データへの色空間変換を行う。
ステップS3 背景色検出部25は、背景色検出処理を実行する。
ステップS4 背景除去部26は、背景除去処理を実行する。
ステップS5 出力色空間変換部34は、出力CMYK画像データへ変更する。
ステップS6 画像出力部35がCMYK画像データを出力し、処理を終了する。
Next, a flowchart will be described.
Step S1: The image acquisition unit 23 acquires RGB image data.
Step S2: The input color space conversion unit 24 performs color space conversion to Lab image data.
Step S3 The background color detection unit 25 executes background color detection processing.
Step S4 The background removal unit 26 performs background removal processing.
Step S5: The output color space conversion unit 34 changes the output color space to output CMYK image data.
Step S6: The image output unit 35 outputs CMYK image data, and the process ends.

次に、背景色検出のサブルーチンについて説明する。   Next, a background color detection subroutine will be described.

図7は本発明の第1の実施の形態におけるL値ヒストグラムの例を示す図、図8は本発明の第1の実施の形態における画像処理装置の背景色検出のサブルーチンを示すフローチャートである。   FIG. 7 is a diagram showing an example of an L value histogram in the first embodiment of the present invention, and FIG. 8 is a flowchart showing a background color detection subroutine of the image processing apparatus in the first embodiment of the present invention.

まず、背景色検出部25は、入力色空間変換部24によって変換されたLab画像データの各画素のLab値を参照し、Lab画像データの明度ヒストグラムとしてのL値ヒストグラムを作成する。該L値ヒストグラムは、例えば、図7に示されるようなものであり、縦軸が出現頻度histgram[L]を示し、横軸が明度値Lを示している。図7に示される例では、3つのピークが見られ、明度値の高いほうから順に、それぞれ、スキャナ蓋裏部の反射板の明度値、背景として検出すべき原稿面を含む明度値、及び、文字、網点画像等の画像の明度値に相当する。   First, the background color detection unit 25 refers to the Lab value of each pixel of the Lab image data converted by the input color space conversion unit 24 and creates an L value histogram as a lightness histogram of the Lab image data. The L value histogram is, for example, as shown in FIG. 7. The vertical axis indicates the appearance frequency histgram [L], and the horizontal axis indicates the lightness value L. In the example shown in FIG. 7, three peaks are seen, and in order from the highest brightness value, the brightness value of the reflector on the back of the scanner lid, the brightness value including the document surface to be detected as the background, and This corresponds to the brightness value of an image such as a character or halftone dot image.

続いて、背景色検出部25は、Lab画像データの各画素のLab値を参照し、L値毎のa値の総和sum_a[L]と、L値毎のb値の総和sum_b[L]とを取得する。   Subsequently, the background color detection unit 25 refers to the Lab value of each pixel of the Lab image data, and sums sum_a [L] of a values for each L value and sum_b [L] of sums of b values for each L value. To get.

続いて、背景色検出部25は、L値ヒストグラム[L]を、明度閾値Lthから低明度側へ探索し、最初のピーク開始明度値start_Lを検出する。ピーク開始明度値とは、図7に示される例において、背景色のピークの高明度側の裾(すそ)の部分にあたる明度値42のことである。また、Lthは、例えば、スキャナ蓋裏部の反射板の最低明度値のように、原稿の明度値以上で背景のピーク検出からあらかじめ除外する既知の所定値である。 Subsequently, the background color detection unit 25, the L value histogram [L], and searches the lightness threshold value L th to the low brightness side, for detecting a first peak start lightness value Start_L. The peak start brightness value is the brightness value 42 corresponding to the skirt (hem) portion on the high brightness side of the peak of the background color in the example shown in FIG. Further, L th is a known predetermined value that is excluded in advance from the background peak detection when the value is equal to or higher than the brightness value of the document, such as the minimum brightness value of the reflector on the back of the scanner lid.

本実施の形態では、L=Lthから明度値を下げていき、ヒストグラムがはじめてhistgram[L]>0となったL値をピーク開始明度値start_Lとする。 In this embodiment, L = L th will lower the brightness value from the histogram is the first time histgram [L]> 0 and since L value peak start lightness value start_L a.

続いて、背景色検出部25は、start_Lから更に低明度側へ探索し、ピーク頂点明度値top_Lを検出する。ピーク頂点明度値とは、図7に示される例において、右側のピークの最高頻度となったときの明度値43のことであり、本実施の形態では、ヒストグラムがはじめてhistgram[L]<histgram[L+1]となったL値であるものとする。   Subsequently, the background color detection unit 25 searches further from the start_L to the lower lightness side, and detects the peak vertex lightness value top_L. In the example shown in FIG. 7, the peak vertex lightness value is the lightness value 43 when the peak frequency on the right side is the highest. In this embodiment, the histogram is first displayed as histgram [L] <histgram [ It is assumed that the L value is L + 1].

続いて、背景色検出部25は、検出したピーク開始明度値start_L及びピーク頂点明度値top_Lを用いて、背景明度値Lwsを決定する。背景にあたる画素の明度値は、ある一点ではなく、正規分布していると考えられるため、本実施の形態では、背景画素がとり得る明度値の最低明度値を背景明度値Lwsとして決定する。これにより、該背景明度値Lwsより高い明度値であるすべての背景画素を除去対象とすることができる。 Subsequently, the background color detection unit 25 determines the background lightness value L ws using the detected peak start lightness value start_L and peak vertex lightness value top_L. Since it is considered that the brightness value of the pixel corresponding to the background is not a single point but is normally distributed, in the present embodiment, the minimum brightness value that the background pixel can take is determined as the background brightness value L ws . As a result, all background pixels having a brightness value higher than the background brightness value L ws can be targeted for removal.

また、背景明度値Lwsの低明度側の裾は、ピーク開始明度値start_Lからピーク頂点明度値top_Lまでの幅だけピーク頂点明度値top_Lから低明度側に進んだ位置(図7における明度値44)に存在すると考えられるので、次の式(2)によって算出された値を背景明度値Lwsとする。
ws=top_L−(start_L−top_L) ・・・式(2)
ただし、ピーク頂点明度値top_L(明度値43)のピークは、必ずしも正規分布ではないことから、背景明度値Lws以上の明度値には、背景以外の画像の明度値が含まれる場合もある。
Further, the lower lightness side skirt of the background lightness value L ws is a position advanced from the peak vertex lightness value top_L to the low lightness side by a width from the peak start lightness value start_L to the peak vertex lightness value top_L (lightness value 44 in FIG. 7). ), The value calculated by the following equation (2) is set as the background lightness value L ws .
L ws = top_L− (start_L−top_L) (2)
However, the peak of the peak apex lightness value Top_L (brightness value 43), since not always normally distributed, the background brightness value L ws or lightness values, may be included the brightness value of the non-image background.

最後に、背景色検出部25は、背景色差成分値(aws、bws)を決定する。本実施の形態では、該背景色差成分値(aws、bws)の値は、背景明度値Lwsからピーク開始明度値start_Lまでの間の明度値を備える画素のa値及びb値のそれぞれの平均値とする。よって、既に作成したL値[L]と、既に取得したL値毎のa値の総和sum_a[L]及びL値毎のb値の総和smu_b[L]を用いて、次の式(3)及び(4)によって算出した値を背景色差成分値(aws、bws)とする。 Finally, the background color detection unit 25 determines background color difference component values (a ws , b ws ). In this embodiment, the back views difference component values (a ws, b ws) value of each of a and b values of the pixels with a brightness value between the background lightness value L ws to peak start lightness value start_L The average value of Therefore, using the L value [L] that has already been created, the sum sum_a [L] of the a values for each L value that has already been acquired, and the sum smu_b [L] of the b values for each L value, And the value calculated by (4) is used as the background color difference component value (a ws , b ws ).

以上により、背景色Lab値(Lws、aws、bws)が検出されるので、背景色検出処理を終了する。 As described above, the background color Lab values (L ws , a ws , b ws ) are detected, and thus the background color detection process ends.

次に、フローチャートについて説明する。
ステップS3−1 Lab画像データのL値ヒストグラムを作成する。
ステップS3−2 L値毎のa値の総和sum_a[L]と、L値毎のb値の総和sum_b[L]とを取得する。
ステップS3−3 L値ヒストグラム[L]を、明度閾値Lthから低明度側へ探索し、最初のピーク開始明度値start_Lを検出する。
ステップS3−4 start_Lから更に低明度側へ探索し、ピーク頂点明度値top_Lを検出する。
ステップS3−5 背景明度値Lwsを決定する。
ステップS3−6 背景色差成分値(aws、bws)を決定し、背景色検出処理を終了する。
Next, a flowchart will be described.
Step S3-1: An L value histogram of Lab image data is created.
Step S3-2: A sum sum_a [L] of a values for each L value and a sum sum_b [L] of b values for each L value are acquired.
Step S3-3 L value histogram [L], and searches the lightness threshold value L th to the low brightness side, for detecting a first peak start lightness value Start_L.
Step S3-4 The search is further performed from the start_L to the lower lightness side, and the peak vertex lightness value top_L is detected.
Step S3-5: Determine the background brightness value L ws .
Step S3-6: Determine the background color difference component values (a ws , b ws ) and end the background color detection process.

次に、背景除去のサブルーチンについて説明する。   Next, a background removal subroutine will be described.

図9は本発明の第1の実施の形態における画像処理装置の背景除去のサブルーチンを示すフローチャートである。   FIG. 9 is a flowchart showing a background removal subroutine of the image processing apparatus according to the first embodiment of the present invention.

まず、背景除去部26は、背景色検出部25が検出した背景色Lab値(Lws、aws、bws)を取得する。 First, the background removal unit 26 acquires the background color Lab values (L ws , a ws , b ws ) detected by the background color detection unit 25.

続いて、背景除去部26の拡張色空間変換部27は、取得した背景色Lab値(Lws、aws、bws)の背景色明度値Lwsを参照し、入力明度値Linを、明度最大値Lmax を超える明度値を含む拡張明度値Lp に変換する拡張色空間変換関数T1(l)を導出する。 Subsequently, the extended color space conversion unit 27 of the background removal unit 26 refers to the background color brightness value L ws of the acquired background color Lab values (L ws , a ws , b ws ), and determines the input brightness value L in as An extended color space conversion function T1 (l) for converting to an extended brightness value L p including a brightness value exceeding the maximum brightness value L max is derived.

次の式(5)は、拡張色空間変換関数T1(l)の一例である。   The following equation (5) is an example of the extended color space conversion function T1 (l).

なお、拡張色空間変換関数T1(l)は、前記式(5)に示されるものに限らず、背景色明度値Lwsが明度最大値Lmax に変換され、かつ、背景色明度値Lws以上の明度値が明度最大値Lmax 以上の明度値に単純増加で変換される連続関数であれば、どのような関数でも適用可能である。 Note that the extended color space conversion function T1 (l) is not limited to that expressed by the above formula (5), and the background color lightness value L ws is converted to the maximum lightness value L max and the background color lightness value L ws is obtained. Any function can be applied as long as it is a continuous function in which the above brightness value is converted into a brightness value equal to or greater than the brightness maximum value L max with a simple increase.

続いて、拡張色空間変換部27は、既に導出した拡張色空間変換関数T1(l)を用いて、次の式(6)のように入力明度値Linを拡張色空間の明度値に変換する。これにより、入力色空間変換部24によって変換された入力Lab空間のLab値である入力Lab値(Lin、ain、bin)が拡張色空間のLab値である拡張Lab値(Lp 、ap 、bp )に変換される。 Subsequently, the extended color space conversion unit 27 uses the already derived extended color space conversion function T1 (l) to convert the input lightness value Lin into the lightness value of the extended color space as in the following equation (6). To do. Thus, the input Lab values (L in , a in , b in ) that are Lab values of the input Lab space converted by the input color space conversion unit 24 are extended Lab values (L p , a p , b p ).

なお、本実施の形態において、拡張色空間変換後の色差成分値(ap 、bp )は、入力された色差成分値(ain、bin)と同じとする。
In the present embodiment, the color difference component values (a p , b p ) after the extended color space conversion are the same as the input color difference component values (a in , b in ).

続いて、彩度変換閾値導出部31は、背景色明度彩度値(Lws、Cws)と、所定の基準明度彩度値(Lf 、Cf )とに基づき、既に求めた拡張色空間の明度値に応じて異なる彩度変換閾値Cth(l)を導出する。 Subsequently, the saturation conversion threshold value deriving unit 31 uses the background color lightness saturation value (L ws , C ws ) and the predetermined reference lightness saturation value (L f , C f ) to obtain the extended color that has already been obtained. Different saturation conversion threshold values C th (l) are derived according to the lightness values of the space.

次の式(7)は彩度変換閾値Cth(l)の一例である。 The following equation (7) is an example of the saturation conversion threshold C th (l).

続いて、色差成分変換部32は、拡張彩度値Cp が彩度変換閾値導出部31が導出した彩度変換閾値Cth(Lp )以下であるか否かを判断する。 Subsequently, the color difference component conversion unit 32 determines whether or not the extended saturation value C p is equal to or less than the saturation conversion threshold C th (L p ) derived by the saturation conversion threshold deriving unit 31.

そして、拡張彩度値Cp が彩度変換閾値Cth(Lp )以下である場合、色差成分変換部32は、色差成分値を0にする色差成分変換を行う。色差成分変換されたLab値はLab値(Lp 、aq 、bq )であって、aq =0、bq =0である。 When the extended saturation value C p is equal to or less than the saturation conversion threshold C th (L p ), the color difference component conversion unit 32 performs color difference component conversion that sets the color difference component value to 0. Lab values subjected to color difference component conversion are Lab values (L p , a q , b q ), and a q = 0 and b q = 0.

また、拡張彩度値Cp が彩度変換閾値Cth(Lp )以下でない場合、色差成分変換部32は、色差成分変換を行わない。この場合、aq =ap 、bq =bp である。 When the extended saturation value C p is not equal to or less than the saturation conversion threshold C th (L p ), the color difference component conversion unit 32 does not perform color difference component conversion. In this case, a q = a p and b q = b p .

最後に、背景除去部26の明度成分変換部33は、色差成分変換部32が色差成分変換を行ったLab値(Lp 、aq 、bq )を入力し、明度値Lp が明度最大値Lmax より大きい画素の明度値を、明度最大値Lmax に変換する。明度値が変換されたLab値(Lq 、aq 、bq )は出力色空間変換部34へ転送され、背景除去処理が終了する。 Finally, the lightness component conversion unit 33 of the background removal unit 26 receives the Lab values (L p , a q , b q ) that have been subjected to the color difference component conversion by the color difference component conversion unit 32, and the lightness value L p is the maximum lightness. the brightness value of the value L max greater than the pixel, and converts the lightness maximum value L max. The Lab values (L q , a q , b q ) obtained by converting the lightness values are transferred to the output color space conversion unit 34, and the background removal process ends.

次に、フローチャートについて説明する。
ステップS4−1 背景除去部26は、背景色Lab値(Lws、aws、bws)を取得する。
ステップS4−2 拡張色空間変換部27は、拡張色空間変換関数T1(l)を導出する。
ステップS4−3 入力Lab値(Lin、ain、bin)が拡張Lab値(Lp 、ap 、bp )に変換される。
ステップS4−4 彩度変換閾値導出部31は、背景色彩度値Cwsを導出する。
ステップS4−5 彩度変換閾値導出部31は、既に求めた拡張色空間の明度値に応じて異なる彩度変換閾値Cth(l)を導出する。
ステップS4−6 色差成分変換部32は、拡張彩度値Cp を求める。
ステップS4−7 色差成分変換部32は、拡張彩度値Cp が彩度変換閾値Cth(Lp )以下であるか否かを判断する。拡張彩度値Cp が彩度変換閾値Cth(Lp )以下である場合はステップS4−8に進み、拡張彩度値Cp が彩度変換閾値Cth(Lp )以下でない場合はステップS4−9に進む。
ステップS4−8 色差成分変換部32は、色差成分値を0にする色差成分変換を行う。
ステップS4−9 色差成分変換部32は、色差成分変換を行わない。
ステップS4−10 明度成分変換部33は、明度値Lp が明度最大値Lmax より大きい画素の明度値を、明度最大値Lmax に変換し、背景除去処理が終了する。
Next, a flowchart will be described.
Step S4-1: The background removal unit 26 acquires background color Lab values (L ws , a ws , b ws ).
Step S4-2: The extended color space conversion unit 27 derives an extended color space conversion function T1 (l).
Step S4-3: The input Lab values (L in , a in , b in ) are converted into extended Lab values (L p , a p , b p ).
Step S4-4 The saturation conversion threshold value deriving unit 31 derives the background color saturation value Cws .
Step S4-5 The saturation conversion threshold value deriving unit 31 derives a different saturation conversion threshold value C th (l) according to the brightness value of the already obtained extended color space.
Step S4-6 chrominance component transformer 32 obtains the extended chroma value C p.
Step S4-7: The color difference component converter 32 determines whether or not the extended saturation value C p is equal to or less than the saturation conversion threshold C th (L p ). If the extended saturation value C p is less than or equal to the saturation conversion threshold C th (L p ), the process proceeds to step S4-8, and if the extended saturation value C p is not less than or equal to the saturation conversion threshold C th (L p ). Proceed to step S4-9.
Step S4-8 The color difference component conversion unit 32 performs color difference component conversion for setting the color difference component value to zero.
Step S4-9: The color difference component conversion unit 32 does not perform color difference component conversion.
Step S4-10 brightness component converter 33, the lightness value L p lightness value of the lightness maximum value L max greater than the pixel, and converts the lightness maximum value L max, the background removal process is completed.

このように、本実施の形態においては、背景明度値以上の明度値を備える画素であって、互いに異なる明度値を備える彩度値を保存すべき画素と0にすべき画素とが混在した場合でも、彩度値を保存すべき画素と0にすべき画素とを区別して処理することができる。   As described above, in the present embodiment, a pixel having a lightness value equal to or higher than the background lightness value and a pixel to store a saturation value having a different lightness value and a pixel to be set to 0 are mixed. However, it is possible to distinguish and process the pixel whose chroma value is to be stored and the pixel whose chroma value is to be 0.

次に、本発明の第2の実施の形態について説明する。なお、第1の実施の形態と同じ構造を有するものについては、同じ符号を付与することによってその説明を省略する。また、前記第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 description is abbreviate | omitted by providing the same code | symbol. The description of the same operation and the same effect as those of the first embodiment is also omitted.

図10は本発明の第2の実施の形態における画像処理装置の機能構成を示すブロック図である。   FIG. 10 is a block diagram showing a functional configuration of the image processing apparatus according to the second embodiment of the present invention.

本実施の形態において、背景除去部26は、拡張色空間変換部27と、彩度変換閾値導出部31と、色差成分変換部32と、明度成分変換部33とに加えて、彩度の連続性を維持しながら明度値に応じて異なる色差成分を変換するための彩度変換関数を導出する彩度変換関数導出部81を更に備える。   In the present embodiment, the background removal unit 26 includes a continuous saturation in addition to the extended color space conversion unit 27, the saturation conversion threshold value derivation unit 31, the color difference component conversion unit 32, and the lightness component conversion unit 33. A saturation conversion function deriving unit 81 for deriving a saturation conversion function for converting different color difference components according to the lightness value while maintaining the characteristics.

彩度変換閾値導出部31は、背景色検出部25によって検出された背景色Lab値(Lws、aws、bws)から求められる背景色明度彩度値(Lws、Cws)と、所定の基準明度彩度値(Lf 、Cf )とに基づき、明度値に応じて異なる彩度変換閾値Cth(l)とを導出する。この際、明度最大値Lmax と明度値Lmax −1とでの彩度変換の違いによる彩度階調ギャップを防ぐため、明度最大値Lmax 以下の明度値についても閾値を導出する。 The saturation conversion threshold value deriving unit 31 includes a background color brightness saturation value (L ws , C ws ) obtained from the background color Lab values (L ws , a ws , b ws ) detected by the background color detection unit 25, and Based on the predetermined reference lightness saturation value (L f , C f ), a saturation conversion threshold value C th (l) that differs depending on the lightness value is derived. At this time, in order to prevent a saturation gradation gap due to a difference in saturation conversion between the lightness maximum value L max and the lightness value L max −1, a threshold value is also derived for lightness values equal to or lower than the lightness maximum value L max .

そして、彩度変換関数導出部81は、彩度変換閾値導出部31が導出した明度値に応じて異なる彩度変換閾値Cth(l)を境界として、彩度方向の階調ギャップが発生しないような彩度変換関数S(l、c)を導出する。 Then, the saturation conversion function deriving unit 81 does not generate a gradation gap in the saturation direction with the saturation conversion threshold C th (l) that differs depending on the lightness value derived by the saturation conversion threshold deriving unit 31 as a boundary. Such a saturation conversion function S (l, c) is derived.

また、色差成分変換部32は、彩度変換関数導出部81が導出した彩度変換関数S(l、c)を用いて、拡張色空間変換部27によって変換された拡張Lab値(Lp 、ap 、bp )の色差成分値(ap 、bp )を、彩度の連続性を維持しながら(aq 、bq )に変換したLab値(Lp 、aq 、bq )を導出する。 In addition, the color difference component conversion unit 32 uses the saturation conversion function S (l, c) derived by the saturation conversion function deriving unit 81 to use the extended Lab value (L p , a p, the chrominance component values of b p) (a p, the b p), while maintaining the continuity of chroma (a q, converted Lab values b q) (L p, a q, b q) Is derived.

なお、その他の点の構成については、前記第1の実施の形態と同様であるので、その説明を省略する。   Since the configuration of other points is the same as that of the first embodiment, description thereof is omitted.

次に、本実施の形態における背景除去部26が実行する背景除去処理について詳細に説明する。   Next, the background removal process executed by the background removal unit 26 in the present embodiment will be described in detail.

図11は本発明の第2の実施の形態における画像処理装置の背景除去処理の結果を説明する図、図12は本発明の第2の実施の形態における画像処理装置の背景除去処理の色空間上での動作を説明する図である。なお、図11において、(a)は画像取得部が取得した画像データを示す図、(b)は本発明の第1の実施の形態における背景除去処理を実行した後の画像データを示す図、(c)は本発明の第2の実施の形態における背景除去処理を実行した後の画像データを示す図であり、図12において、(a−1)は本発明の第2の実施の形態における拡張色空間変換部の動作を説明する図、(a−2)は本発明の第2の実施の形態における色差成分変換部の動作を説明する図、(a−3)は本発明の第2の実施の形態における明度成分変換部の動作を説明する図である。   FIG. 11 is a diagram for explaining the result of the background removal processing of the image processing apparatus according to the second embodiment of the present invention, and FIG. 12 is the color space of the background removal processing of the image processing apparatus according to the second embodiment of the present invention. It is a figure explaining the operation | movement above. In FIG. 11, (a) is a diagram showing image data acquired by the image acquisition unit, (b) is a diagram showing image data after performing background removal processing in the first embodiment of the present invention, (C) is a figure which shows the image data after performing the background removal process in the 2nd Embodiment of this invention, In FIG. 12, (a-1) is in the 2nd Embodiment of this invention. The figure explaining operation | movement of an extended color space conversion part, (a-2) is a figure explaining operation | movement of the color difference component conversion part in the 2nd Embodiment of this invention, (a-3) is 2nd figure of this invention. It is a figure explaining the operation | movement of the lightness component conversion part in the embodiment.

図11(a)に示されるように、スキャナ12によって該スキャナ12の読取サイズよりも小さいサイズの原稿を読み取った場合、画像取得部23が取得したRGB画像データには、前記第1の実施の形態と同様に、原稿の色に相当する背景色51と、スキャナ12の蓋裏部の反射板色52とが含まれる。また、原稿の領域には、明度の高いカラー画像部54と、明度が低く彩度値が高いカラー画像部55から明度値が高く彩度値が低いカラー画像部56へのグラデーション画像とが存在する。   As shown in FIG. 11A, when a document having a size smaller than the reading size of the scanner 12 is read by the scanner 12, the RGB image data acquired by the image acquisition unit 23 is included in the first embodiment. Similar to the form, a background color 51 corresponding to the color of the document and a reflector color 52 on the back of the lid of the scanner 12 are included. Also, in the document area, there are a color image portion 54 having a high lightness and a gradation image from a color image portion 55 having a low lightness and a high saturation value to a color image portion 56 having a high lightness value and a low saturation value. To do.

前記第1の実施の形態においては、背景明度値以上の明度値を備える画素を、彩度値を保存すべき画素と0にすべき画素とを区別して処理することが可能であるが、グラデーション画像のような明度彩度が連続的に変化する画像が含まれる場合、図11(b)における82で示されるように、彩度変換閾値Cth(l)を境界とした彩度方向の階調や、明度最大値Lmax と明度値Lmax −1とでの彩度方向の階調にギャップが発生するときがある。 In the first embodiment, it is possible to process a pixel having a lightness value equal to or higher than the background lightness value while distinguishing between a pixel that should store a saturation value and a pixel that should be set to 0. When an image such as an image with continuously changing lightness and saturation is included, as indicated by 82 in FIG. 11B, the floor in the saturation direction with the saturation conversion threshold C th (l) as a boundary. There is a case where a gap occurs in the tone or the gradation in the saturation direction between the lightness maximum value L max and the lightness value L max −1.

本実施の形態における背景除去部26の実行する背景除去処理では、図11(c)に示されるように、明度の高いカラー画像部54の彩度はやや低くなり(部分93)、グラデーション画像の彩度がやや低くなる部分(部分92)があるが、グラデーションの高明度低彩度部の彩度階調ギャップは起こらず自然な階調が維持される(部分94)。   In the background removal process executed by the background removal unit 26 in the present embodiment, as shown in FIG. 11C, the saturation of the color image portion 54 with high brightness is slightly lowered (part 93), and the gradation image Although there is a portion where the saturation is slightly low (portion 92), a saturation gradation gap in the high brightness and low saturation portion of the gradation does not occur and a natural gradation is maintained (portion 94).

図12において、縦軸及び横軸は、前記第1の実施の形態で説明した図5と同様に、明度値L及び彩度値Cを示している。   In FIG. 12, the vertical axis and the horizontal axis indicate the lightness value L and the saturation value C, as in FIG. 5 described in the first embodiment.

図12(a−1)は、本実施の形態における背景除去部26の拡張色空間変換部27の動作が示されている。   FIG. 12A-1 shows the operation of the extended color space conversion unit 27 of the background removal unit 26 in the present embodiment.

ここで、点72、点73及び点74は、前記第1の実施の形態と同様に、それぞれ、背景色51(点61)、カラー高明度色(点62)及び反射板色52(点63)に対して拡張色空間変換を行った後の点である。また、点84は、背景色51と同じ彩度値で明度値がやや小さい点83に対して拡張色空間変換を行った後の点である。なお、あらかじめ取得可能な反射板色52(点63)の明度値と彩度値とを、基準明度彩度値(Lf 、Cf )とする。 Here, similarly to the first embodiment, the points 72, 73, and 74 are the background color 51 (point 61), the color high brightness color (point 62), and the reflector color 52 (point 63), respectively. ) For the extended color space conversion. A point 84 is a point after the extended color space conversion is performed on the point 83 having the same saturation value as that of the background color 51 and a lightness value. In addition, let the brightness value and saturation value of the reflector color 52 (point 63) which can be acquired beforehand be a standard brightness saturation value ( Lf , Cf ).

また、図12(a−2)は、本実施の形態における背景除去部26の色差成分変換部32の動作が示されている。   FIG. 12 (a-2) shows the operation of the color difference component conversion unit 32 of the background removal unit 26 in the present embodiment.

ここで、破線85は、彩度変換閾値導出部31が導出した彩度変換閾値Cth(l)を示している。該彩度変換閾値Cth(l)は、背景色51(点61)と反射板色52(点63)とがそれぞれ拡張色空間変換された点72と点74とを通る直線として導出されている。 Here, a broken line 85 indicates the saturation conversion threshold C th (l) derived by the saturation conversion threshold deriving unit 31. The saturation conversion threshold C th (l) is derived as a straight line passing through points 72 and 74 where the background color 51 (point 61) and the reflector color 52 (point 63) have been subjected to extended color space conversion, respectively. Yes.

そして、色差成分変換部32は、入力した拡張彩度値Cp が、入力した明度値における彩度変換閾値Cth(Lp )以下である点を色差成分値aq =bq =0とし、無彩色とする。例えば、点72及び点74を、それぞれ、彩度値が0である点76及び点77に変換する。 Then, the color difference component conversion unit 32 sets the color difference component value a q = b q = 0 as a point where the input extended saturation value C p is equal to or less than the saturation conversion threshold C th (L p ) in the input brightness value. Achromatic color. For example, the points 72 and 74 are converted into points 76 and 77 having a saturation value of 0, respectively.

また、拡張彩度値Cp が彩度変換閾値Cth(Lp )より大きい点73に対しては、彩度変換関数導出部81によって導出された彩度方向の階調ギャップが発生しないような彩度変換関数S(l、c)を用いて、拡張彩度値Cp が彩度変換閾値Cth(Lp )以下である点の彩度値が0になることに合わせて彩度値を下げつつ、無彩色とせずに、彩度情報を残した値となるように変換する、例えば、点73及び点84を、それぞれ、点86及び点87に変換する。 Further, at the point 73 where the extended saturation value C p is larger than the saturation conversion threshold C th (L p ), the gradation gap in the saturation direction derived by the saturation conversion function deriving unit 81 does not occur. The saturation value of the point at which the extended saturation value C p is equal to or less than the saturation conversion threshold value C th (L p ) is set to 0 using the saturation conversion function S (l, c). While reducing the value, conversion is performed so that the saturation information remains without using an achromatic color. For example, a point 73 and a point 84 are converted into a point 86 and a point 87, respectively.

さらに、図12(a−3)には、本実施の形態における背景除去部26の明度成分変換部33の動作が示されている。   Further, FIG. 12 (a-3) shows the operation of the lightness component conversion unit 33 of the background removal unit 26 in the present embodiment.

ここで、背景色51(点61)、カラー高明度色(点62)、反射板色52(点63)、及び、背景色51と同じ彩度値で明度値がやや小さい点83は、色差成分変換部32によって、それぞれ、点76、点86、点77及び点87に変換されている。そして、点86及び点77は、明度最大値Lmax よりも大きい明度値となっているので、明度成分変換部33は、これらの明度値を明度値Lの再現範囲内の所定の明度値(本実施の形態ではLmax )に変換する。これにより、点86は点91に変換され、点77は、無彩色軸(縦軸)上であるために、背景色51の変換値である点76(白色)に変換される。 Here, the background color 51 (point 61), the color high brightness color (point 62), the reflector color 52 (point 63), and the point 83 having the same saturation value as the background color 51 and a slightly small brightness value are color differences. The component conversion unit 32 converts the points into points 76, 86, 77, and 87, respectively. Since the point 86 and the point 77 are lightness values larger than the lightness maximum value L max , the lightness component conversion unit 33 converts these lightness values into predetermined lightness values within the reproduction range of the lightness value L ( In this embodiment, it is converted to L max ). Thereby, the point 86 is converted to the point 91, and the point 77 is converted to the point 76 (white) which is the conversion value of the background color 51 because it is on the achromatic color axis (vertical axis).

その結果、前記第1の実施の形態と同様に、背景色51(点61)及び反射板色52(点63)は白色(点76)へ変換される。また、カラー高明度色(点62)は明度最大値Lmax で元の彩度値よりやや低い彩度値を備える色(点91)へ変換され、背景色51(点61)と同じ彩度値を備え、明度値がやや低い点83は、明度最大値Lmax 以下の明度で元の彩度値よりやや低い彩度値を備える色(点87)へ変換される。したがって、図11(c)に示されるように、目的の出力を得ることができる。つまり、明度の高いカラー画像部54の彩度はやや低くなり(部分93)、グラデーション画像の彩度がやや低くなる部分(部分92)があるが、グラデーションの高明度低彩度部の彩度階調ギャップは起こらず自然な階調が維持され(部分94)、しかも、前記第1の実施の形態と同様に、背景色51及び反射板色52を消すことができる。 As a result, as in the first embodiment, the background color 51 (point 61) and the reflector color 52 (point 63) are converted to white (point 76). The color high brightness color (point 62) is converted to a color (point 91) having a maximum brightness value L max and a saturation value slightly lower than the original saturation value, and the same saturation as the background color 51 (point 61). A point 83 having a value and a slightly low brightness value is converted to a color (point 87) having a brightness less than the maximum brightness value L max and a saturation value slightly lower than the original saturation value. Therefore, the target output can be obtained as shown in FIG. That is, the saturation of the color image portion 54 with high lightness is slightly low (part 93) and there is a portion (part 92) where the saturation of the gradation image is slightly low (part 92), but the saturation of the high lightness and low saturation portion of the gradation is present. A gradation gap does not occur and a natural gradation is maintained (portion 94), and the background color 51 and the reflector color 52 can be erased as in the first embodiment.

このように、本実施の形態における背景除去部26が実行する背景除去処理では、背景明度値以上の明度値を備える画素であって、互いに異なる明度値を備える彩度値を保存すべき画素と0にすべき画素とが混在した場合であっても、それらを区別して適切に処理するとともに、自然画のように階調の連続性のある画像に対しても、彩度の階調ギャップを防ぐことができる。   As described above, in the background removal process executed by the background removal unit 26 in the present embodiment, pixels that have brightness values that are equal to or higher than the background brightness value and that should store saturation values that have different brightness values. Even if pixels that should be 0 are mixed, they are distinguished and processed appropriately, and saturation gradation gap is also applied to images with continuous gradation such as natural images. Can be prevented.

次に、本実施の形態における画像処理装置10の動作について説明する。なお、ここでは、背景除去のサブルーチンについてのみ説明することとし、その他の動作については、前記第1の実施の形態と同様であるので、その説明を省略する。   Next, the operation of the image processing apparatus 10 in the present embodiment will be described. Here, only the background removal subroutine will be described, and the other operations are the same as those in the first embodiment, and the description thereof will be omitted.

図13は本発明の第2の実施の形態における画像処理装置の背景除去のサブルーチンを示すフローチャートである。   FIG. 13 is a flowchart showing a background removal subroutine of the image processing apparatus according to the second embodiment of the present invention.

なお、背景除去部26が背景色Lab値(Lws、aws、bws)を取得してから、背景除去部26の色差成分変換部32が拡張彩度値Cp を求めるまでの動作、すなわち、図13におけるステップS4−11〜ステップS4−16の動作は、前記第1の実施の形態におけるステップS4−1〜ステップS4−6の動作と同様であるので、その説明を省略する。 The operation from when the background removal unit 26 acquires the background color Lab values (L ws , a ws , b ws ) until the color difference component conversion unit 32 of the background removal unit 26 obtains the extended saturation value C p , That is, the operations in steps S4-11 to S4-16 in FIG. 13 are the same as the operations in steps S4-1 to S4-6 in the first embodiment, and a description thereof will be omitted.

色差成分変換部32が拡張彩度値Cp を求めると、続いて、背景除去部26の彩度変 換関数導出部81は、取得した背景色Lab値(Lws、aws、bws)の明度値Lwsと、彩度変換閾値導出部31が導出した背景色彩度値Cwsとを参照し、明度値に応じて異なる彩度変換関数S(l、c)を導出する。 When the color difference component conversion unit 32 obtains the extended saturation value C p , the saturation conversion function derivation unit 81 of the background removal unit 26 subsequently acquires the acquired background color Lab value (L ws , a ws , b ws ). and brightness value L ws of, with reference to the background color saturation value C ws the chroma conversion threshold derivation unit 31 derives derives different saturation transform function S (l, c) according to the brightness value.

次の式(8)及び(9)は、彩度変換関数S(l、c)の一例である。   The following equations (8) and (9) are examples of the saturation conversion function S (l, c).

なお、Cmax は、例えば、Cmax =128である。 C max is, for example, C max = 128.

続いて、背景除去部26の色差成分変換部32は、彩度変換及び色差成分変換を行う。具体的には、彩度変換関数導出部81が導出した彩度変換関数S(l、c)を用いて、次の式(10)によって、彩度変換後の彩度値Cq を求める。
q =S(Lp 、Cp ) ・・・式(10)
また、該彩度値Cq を用いて色差成分値(ap 、bp )を、次の式(11)及び(12)によって、(aq 、bq )に変換する。
Subsequently, the color difference component conversion unit 32 of the background removal unit 26 performs saturation conversion and color difference component conversion. Specifically, using the saturation conversion function S (l, c) derived by the saturation conversion function deriving unit 81, the saturation value C q after the saturation conversion is obtained by the following equation (10).
C q = S (L p , C p ) (10)
Further, the color difference component values (a p , b p ) are converted into (a q , b q ) by the following equations (11) and (12) using the saturation value C q .

最後に、背景除去部26の明度成分変換部33は、色差成分変換部32が色差成分変換を行ったLab値(Lp 、aq 、bq )を入力し、明度値Lp が明度最大値Lmax より大きい画素の明度値を、明度最大値Lmax に変換する。明度値が変換されたLab値(Lq 、aq 、bq )は出力色空間変換部34へ転送され、背景除去処理が終了する。 Finally, the lightness component conversion unit 33 of the background removal unit 26 receives the Lab values (L p , a q , b q ) that have been subjected to the color difference component conversion by the color difference component conversion unit 32, and the lightness value L p is the maximum lightness. the brightness value of the value L max greater than the pixel, and converts the lightness maximum value L max. The Lab values (L q , a q , b q ) obtained by converting the lightness values are transferred to the output color space conversion unit 34, and the background removal process ends.

次に、フローチャートについて説明する。
ステップS4−11 背景除去部26は、背景色Lab値(Lws、aws、bws)を取得する。
ステップS4−12 拡張色空間変換部27は、拡張色空間変換関数T1(l)を導出する。
ステップS4−13 入力Lab値(Lin、ain、bin)が拡張Lab値(Lp 、ap 、bp )に変換される。
ステップS4−14 彩度変換閾値導出部31は、背景色彩度値Cwsを導出する。
ステップS4−15 彩度変換閾値導出部31は、既に求めた拡張色空間の明度値に応じて異なる彩度変換閾値Cth(l)を導出する。
ステップS4−16 色差成分変換部32は、拡張彩度値Cp を求める。
ステップS4−17 彩度変換関数導出部81は、彩度変換関数S(l、c)を導出する。
ステップS4−18 色差成分変換部32は、彩度変換及び色差成分変換を行う。
ステップS4−19 明度成分変換部33は、明度値Lp が明度最大値Lmax より大きい画素の明度値を、明度最大値Lmax に変換し、背景除去処理が終了する。
Next, a flowchart will be described.
Step S4-11: The background removal unit 26 acquires a background color Lab value (L ws , a ws , b ws ).
Step S4-12: The extended color space conversion unit 27 derives an extended color space conversion function T1 (l).
Step S4-13: The input Lab values (L in , a in , b in ) are converted into extended Lab values (L p , a p , b p ).
Step S4-14 chroma conversion threshold derivation unit 31 derives the background color saturation value C ws.
Step S4-15 The saturation conversion threshold value deriving unit 31 derives a different saturation conversion threshold value C th (l) according to the already obtained brightness value of the extended color space.
Step S4-16 chrominance component transformer 32 obtains the extended chroma value C p.
Step S4-17 The saturation conversion function deriving unit 81 derives the saturation conversion function S (l, c).
Step S4-18 The color difference component conversion unit 32 performs saturation conversion and color difference component conversion.
Step S4-19 brightness component converter 33, the lightness value L p lightness value of the lightness maximum value L max greater than the pixel, and converts the lightness maximum value L max, the background removal process is completed.

このように、本実施の形態においては、背景明度値以上の明度値を備える画素であって、互いに異なる明度値を備える彩度値を保存すべき画素と0にすべき画素とが混在した場合でも、彩度値を保存すべき画素と0にすべき画素とを区別して処理することができるとともに、自然画のような階調の連続性のある画像に対しても、彩度の階調ギャップを防ぐことができる。   As described above, in the present embodiment, a pixel having a lightness value equal to or higher than the background lightness value and a pixel to store a saturation value having a different lightness value and a pixel to be set to 0 are mixed. However, it is possible to distinguish and process the pixels for which the saturation value should be stored and the pixels for which the saturation value should be set to 0, and the saturation gradation for an image having a continuous gradation such as a natural image. A gap can be prevented.

なお、前記第1及び第2の実施の形態においては、カラー画像データ(CMYK画像データ)を出力I/F22を介してプリンタ13ヘ出力する場合について説明したが、カラー画像データの出力先はこれに限定されるものでなく、HDD、モニタ等の他の出力デバイスであってもよく、また、出力I/F22を介することなく、画像処理装置10に内蔵した出力デバイスに出力するようにしてもよい。   In the first and second embodiments, the case where color image data (CMYK image data) is output to the printer 13 via the output I / F 22 has been described. However, the output destination of the color image data is this. The output device may be another output device such as an HDD or a monitor, and may be output to an output device built in the image processing apparatus 10 without going through the output I / F 22. Good.

さらに、前記第1及び第2の実施の形態においては、明度成分と色差成分とが独立した明度色差色空間としてCIE L* * * を適用した例についてのみ説明したが、YCbCr色空間等のように、明るさを示す成分と色彩を示す成分とが独立した色空間であれば、いかなる種類の色空間であっても適用することができる。 Furthermore, in the first and second embodiments, only the example in which CIE L * a * b * is applied as the lightness color difference color space in which the lightness component and the color difference component are independent has been described. However, the YCbCr color space, etc. As described above, any color space can be applied as long as the brightness component and the color component are independent.

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

本発明は、画像処理装置に利用することができる。   The present invention can be used in an image processing apparatus.

10 画像処理装置
12 スキャナ
13 プリンタ
23 画像取得部
24 入力色空間変換部
25 背景色検出部
27 拡張色空間変換部
31 彩度変換閾値導出部
32 色差成分変換部
33 明度成分変換部
34 出力色空間変換部
35 画像出力部
51 背景色
81 彩度変換関数導出部
DESCRIPTION OF SYMBOLS 10 Image processing apparatus 12 Scanner 13 Printer 23 Image acquisition part 24 Input color space conversion part 25 Background color detection part 27 Extended color space conversion part 31 Saturation conversion threshold value derivation part 32 Color difference component conversion part 33 Lightness component conversion part 34 Output color space Conversion unit 35 Image output unit 51 Background color 81 Saturation conversion function derivation unit

Claims (13)

原稿を載置する載置台と、該載置台上に載置された原稿に光を照射する光源と、該光源から照射された光を反射する反射板とを備える読取部から原画像データを取得する画像取得部と、
該画像取得部が取得した前記原画像データを、明度成分と色差成分とが独立した明度色差色空間で表わされる第1画像データヘ変換する変換処理を行う入力色空間変換部と、
前記第1画像データから背景色を検出する背景色検出部と、
前記第1画像データを、明度最大値を超える明度値を含む拡張色空間で表される第2画像データに変換する変換処理を行う拡張色空間変換部と、
前記拡張色空間において、前記背景色の明度彩度値を示す第1点と、前記反射板の色の明度彩度値である基準明度彩度値を示す第2点と、を通る直線により定められる、明度値に応じて異なる彩度変換閾値を導出する彩度変換閾値導出部と、
前記第2画像データの色差成分に対し、前記彩度変換閾値に基づいて変換処理を行う色差成分変換部と、
該色差成分変換部が変換処理を行った前記第2画像データの明度値を、前記明度最大値以下の値に変換する変換処理を行う明度成分変換部と、
該明度成分変換部が変換処理を行った前記第2画像データを出力形式の色空間の第3画像データに変換する変換処理を行う出力色空間変換部と、
前記第3画像データを出力する画像出力部と、
を備えることを特徴とする画像処理装置。
Original image data is obtained from a reading unit including a placing table for placing a document, a light source for irradiating light on the document placed on the placing table, and a reflecting plate for reflecting light emitted from the light source. An image acquisition unit to
An input color space conversion unit that performs a conversion process for converting the original image data acquired by the image acquisition unit into first image data represented by a lightness color difference color space in which a lightness component and a color difference component are independent;
A background color detection unit for detecting a background color from the first image data;
An extended color space conversion unit that performs conversion processing for converting the first image data into second image data represented by an extended color space including a lightness value that exceeds a lightness maximum value;
In the extended color space, it is defined by a straight line passing through a first point indicating the lightness saturation value of the background color and a second point indicating a reference lightness saturation value which is the lightness saturation value of the color of the reflector. A saturation conversion threshold value derivation unit for deriving a saturation conversion threshold value that differs according to the lightness value;
A color difference component conversion unit that performs a conversion process on the color difference component of the second image data based on the saturation conversion threshold;
A lightness component conversion unit that performs conversion processing for converting the lightness value of the second image data that has been converted by the color difference component conversion unit into a value that is equal to or less than the lightness maximum value;
An output color space conversion unit that performs conversion processing for converting the second image data that has been converted by the lightness component conversion unit into third image data in a color space of an output format;
An image output unit for outputting the third image data;
An image processing apparatus comprising:
前記色差成分変換部は、前記第2画像データの彩度値が前記彩度変換閾値以下である場合、前記第2画像データの彩度値を0にする請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the color difference component conversion unit sets a saturation value of the second image data to 0 when a saturation value of the second image data is equal to or less than the saturation conversion threshold. 前記彩度変換閾値を境界とし、前記第2画像データの彩度値が前記彩度変換閾値より大きい場合、前記第2画像データの彩度値を、0でない所定の値に下げるような彩度変換関数を導出する彩度変換関数導出部を更に備え、
前記色差成分変換部は、前記第2画像データの色差成分に対し、前記彩度変換関数に従った変換処理を行う請求項2に記載の画像処理装置。
Saturation that lowers the saturation value of the second image data to a predetermined value other than 0 when the saturation conversion threshold is a boundary and the saturation value of the second image data is larger than the saturation conversion threshold A saturation conversion function deriving unit for deriving the conversion function;
The image processing apparatus according to claim 2, wherein the color difference component conversion unit performs a conversion process according to the saturation conversion function on the color difference component of the second image data.
前記入力色空間変換部は、3次元ルックアップテーブルを参照する請求項1〜3のいずれか1項に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the input color space conversion unit refers to a three-dimensional lookup table. 前記背景色検出部は、前記第1画像データの明度ヒストグラムから背景色を検出する請求項1〜4のいずれか1項に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the background color detection unit detects a background color from a brightness histogram of the first image data. 前記拡張色空間変換部は、前記背景色検出部が検出した背景色の明度値を前記明度最大値に変換し、前記背景色の明度値以上の明度値を前記明度最大値以上の明度値に変換する請求項1〜5のいずれか1項に記載の画像処理装置。 The extended color space conversion unit converts the lightness value of the background color detected by the background color detection unit to the lightness maximum value, and converts the lightness value equal to or higher than the lightness value of the background color to a lightness value equal to or higher than the lightness maximum value. The image processing apparatus according to claim 1, wherein the image processing apparatus converts the image processing apparatus. 前記明度成分変換部は、前記明度最大値を超える明度値を前記明度最大値に変換する請求項1〜6のいずれか1項に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the lightness component conversion unit converts a lightness value exceeding the lightness maximum value into the lightness maximum value. 前記出力色空間変換部は、前記明度成分変換部が変換処理を行った前記第2画像データを、前記出力形式の色空間としての出力デバイスの色空間であるCMYK色空間の画像データに変換する請求項1〜7のいずれか1項に記載の画像処理装置。 The output color space conversion unit converts the second image data converted by the lightness component conversion unit into image data in a CMYK color space, which is a color space of an output device as a color space of the output format. The image processing apparatus according to claim 1. 前記出力色空間変換部は、前記明度成分変換部が変換処理を行った前記第2画像データを、前記出力形式の色空間としての出力デバイスの色空間であるRGB色空間の画像データに変換する請求項1〜7のいずれか1項に記載の画像処理装置。 The output color space conversion unit converts the second image data converted by the lightness component conversion unit into image data in an RGB color space that is a color space of an output device as a color space of the output format. The image processing apparatus according to claim 1. 前記出力色空間変換部は、前記明度成分変換部が変換処理を行った前記第2画像データを、前記出力形式の色空間としてのCIE L* * * 空間の画像データに変換する請求項1〜7のいずれか1項に記載の画像処理装置。 The output color space conversion unit converts the second image data converted by the lightness component conversion unit into image data in a CIE L * a * b * space as a color space of the output format. The image processing apparatus according to any one of 1 to 7. 前記出力色空間変換部は、3次元ルックアップテーブルを参照する請求項1〜10のいずれか1項に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the output color space conversion unit refers to a three-dimensional lookup table. 前記読取部は前記原稿からカラー画像データを読み取、前記画像取得部は前記読取部が読み取ったカラー画像データを取得する請求項1〜11のいずれか1項に記載の画像処理装置。 The reading unit is read-color image data from the document, the image acquiring unit is an image processing apparatus according to any one of claims 1 to 11 for acquiring color image data in which the reading unit has read. 色材によって媒体に画像を形成する画像形成部を更に備え、前記画像出力部は前記第3画像データを前記画像形成部に出力する請求項1〜12のいずれか1項に記載の画像処理装置。 The image processing apparatus according to claim 1, further comprising an image forming unit that forms an image on a medium using a color material, wherein the image output unit outputs the third image data to the image forming unit. .
JP2012219074A 2012-10-01 2012-10-01 Image processing device Expired - Fee Related JP6001983B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012219074A JP6001983B2 (en) 2012-10-01 2012-10-01 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012219074A JP6001983B2 (en) 2012-10-01 2012-10-01 Image processing device

Publications (2)

Publication Number Publication Date
JP2014072820A JP2014072820A (en) 2014-04-21
JP6001983B2 true JP6001983B2 (en) 2016-10-05

Family

ID=50747612

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012219074A Expired - Fee Related JP6001983B2 (en) 2012-10-01 2012-10-01 Image processing device

Country Status (1)

Country Link
JP (1) JP6001983B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003008913A (en) * 2001-06-20 2003-01-10 Fuji Xerox Co Ltd Image processor
JP4342773B2 (en) * 2002-07-05 2009-10-14 シャープ株式会社 Background adjustment method in color reproduction apparatus, program for background adjustment, and color reproduction apparatus

Also Published As

Publication number Publication date
JP2014072820A (en) 2014-04-21

Similar Documents

Publication Publication Date Title
JP4118749B2 (en) Image processing apparatus, image processing program, and storage medium
US9036199B2 (en) Image processing apparatus for performing color matching processing, image processing method, and computer-readable medium
JP5180670B2 (en) Image processing apparatus and image processing method
JP2009038523A (en) Unit and method for processing image
JP4350778B2 (en) Image processing apparatus, image processing program, and recording medium
JP6808325B2 (en) Image processing equipment, image processing methods and programs
US20080100862A1 (en) Image processing apparatus and control method for image processing apparatus
JP2012212964A (en) Image processor
JP2015173419A (en) Image processing device, control method of the same and program
JP2007318520A (en) Image processor, image processing method and image processing program
JP2012212962A (en) Controller
US8705889B2 (en) Image processing apparatus, image forming system, and image forming method with geometric processing
US9716810B2 (en) Image processing apparatus configured to perform smoothing based on analysis of PDL data, and storage medium storing program therefor
US8139268B2 (en) Image processing apparatus and image processing method of generating monochrome image data from two color components
JP6001983B2 (en) Image processing device
JP2007274629A (en) Image processing method, image processing device, imaging device, program and recoding medium
JP2004222078A (en) Image processor, image processing method, and program thereof
JP4169674B2 (en) Image processing apparatus, image processing program, and storage medium
JP6633871B2 (en) Information processing apparatus, control method therefor, and program
JP7135575B2 (en) Image processing device, image reading device and program
JP5090969B2 (en) Image processing device
US20220230030A1 (en) Image processing apparatus, image processing method, and storage medium
JP4847565B2 (en) Apparatus for creating copies, control method for apparatus for creating copies, and program
JP2022061279A (en) Image processing apparatus, method for controlling image processing apparatus, and program
JP2004064111A (en) Color processing apparatus and method therefor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150316

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160113

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160209

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160311

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160705

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160715

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160902

R150 Certificate of patent or registration of utility model

Ref document number: 6001983

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees