JP2007299317A - Backlit image correcting device, backlit image correcting method, backlit image correcting program, image reading device, image reading method, and printing device - Google Patents

Backlit image correcting device, backlit image correcting method, backlit image correcting program, image reading device, image reading method, and printing device Download PDF

Info

Publication number
JP2007299317A
JP2007299317A JP2006128440A JP2006128440A JP2007299317A JP 2007299317 A JP2007299317 A JP 2007299317A JP 2006128440 A JP2006128440 A JP 2006128440A JP 2006128440 A JP2006128440 A JP 2006128440A JP 2007299317 A JP2007299317 A JP 2007299317A
Authority
JP
Japan
Prior art keywords
image
correction
color
backlight
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2006128440A
Other languages
Japanese (ja)
Other versions
JP4158811B2 (en
Inventor
Taira Obara
平 小原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2006128440A priority Critical patent/JP4158811B2/en
Priority to US11/731,844 priority patent/US8014602B2/en
Publication of JP2007299317A publication Critical patent/JP2007299317A/en
Application granted granted Critical
Publication of JP4158811B2 publication Critical patent/JP4158811B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To give adequate backlight correcting treatment to a backlit image without determining the backlit image or not. <P>SOLUTION: The backlit image correcting device generates data for a color-based histogram showing the distribution of the number of pixels to concentration values for the colors of the pixels in accordance with data for the pixels constituting the image. It comprises a histogram generating part, an attribute information acquiring part for separating a region shown by the color-based histogram into two or more small regions by the concentration values in accordance with the generated data for the color-based histogram, selecting at least one small region out of the two or more small regions, and acquiring color-based attribute information regarding the small region, a correction information generating part for generating correction information to apply backlight correcting processing to the image in accordance with the acquired color-based attribute information, and a backlight correcting processing part for applying the backlight correcting processing to the image in accordance with the generated correction information. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、逆光画像補正装置、逆光画像補正方法、逆光画像補正プログラム、画像読み取り装置、画像読み取り方法、および印刷装置に関する。   The present invention relates to a backlight image correction device, a backlight image correction method, a backlight image correction program, an image reading device, an image reading method, and a printing device.

イメージスキャナ等をはじめとする各種画像読み取り装置は、一般に、パーソナルコンピュータ等のいわゆるコンピュータ装置に有線または無線等により接続されて、原稿から読み取った画像を画像データとしてコンピュータ装置に送信する。コンピュータ装置は、画像読み取り装置から送信された画像データを受信して各種メモリやハードディスク装置等のデータ記憶装置に記憶する。この際に、コンピュータ装置では、画像読み取り装置から送られてきた画像データに対して各種調整処理が施される。   Various image reading apparatuses such as an image scanner are generally connected to a so-called computer apparatus such as a personal computer by wire or wireless, and transmit an image read from a document as image data to the computer apparatus. The computer device receives the image data transmitted from the image reading device and stores it in a data storage device such as various memories or a hard disk device. At this time, the computer apparatus performs various adjustment processes on the image data sent from the image reading apparatus.

ここで施される調整処理としては、例えば、画像の明暗を調整するヒストグラム調整や、画像の濃淡の表現を部分的に変更する濃度補正等がある。これらの調整は、コンピュータ装置にインストールされている画像読み取り装置のドライバプログラムやアプリケーションプログラム等の各種プログラムによって自動的に実行されたり、またユーザ等により実行されたりする。また、この他、逆光画像を補正する調整などがある。この逆光補正の方法としては、種々の方法が提案されている(特許文献1〜3参照)。
特開平10−79885号公報 特開2004−56416号公報 特開2000−134467号公報
Examples of the adjustment processing performed here include histogram adjustment for adjusting the brightness of an image, density correction for partially changing the expression of light and shade of an image, and the like. These adjustments are automatically executed by various programs such as a driver program and an application program of the image reading apparatus installed in the computer apparatus, or are executed by a user or the like. In addition, there is an adjustment for correcting a backlight image. Various methods have been proposed as the backlight correction method (see Patent Documents 1 to 3).
Japanese Patent Laid-Open No. 10-79885 JP 2004-56416 A JP 2000-134467 A

しかしながら、ここで提案されている補正方法では、対象となる画像について、まず逆光画像であるか否かを判定してから、その画像について逆光画像であると判定した場合に、その画像に対して逆光補正処理を施すようになっている。対象となる画像について逆光画像であるか否か適切に判定することができない場合には、逆光画像ではない画像に対して逆光補正処理を施してしまう虞があった。特に従来から提案されている補正方法には、対象となる画像について逆光画像であるか否かを適切に判定することができない方法もあった。   However, in the correction method proposed here, when it is first determined whether or not the target image is a backlight image, and it is determined that the image is a backlight image, Backlight correction processing is performed. When it is not possible to appropriately determine whether or not the target image is a backlight image, there is a possibility that the backlight correction process may be performed on the image that is not the backlight image. In particular, among the conventionally proposed correction methods, there is a method in which it is not possible to appropriately determine whether or not a target image is a backlight image.

本発明は、このような事情に鑑みてなされたものであって、その目的は、逆光画像か否か判定することなく、逆光画像に対して適切な逆光補正処理を施すことにある。   The present invention has been made in view of such circumstances, and an object thereof is to perform an appropriate backlight correction process on a backlight image without determining whether the image is a backlight image.

前記目的を達成するための主たる発明は、
(A)画像を構成する画素のデータに基づき、前記画素の各色の濃度値に対する前記画素の数の分布を表わす各色別のヒストグラムのデータを生成するヒストグラムデータ生成部と、
(B)前記ヒストグラムデータ生成部により生成された前記各色別のヒストグラムのデータに基づき、前記各色別のヒストグラムにより表される領域をそれぞれ前記濃度値の大きさ別に2つ以上の小領域に区分して、これら2つ以上の小領域の中から少なくとも1つの小領域を選出して、当該小領域に関する属性情報を各色別に取得する属性情報取得部と、
(C)前記属性情報取得部により取得された各色別の前記属性情報に基づき、前記画像に対して逆光補正処理を施すための補正情報を生成する補正情報生成部と、
(D)前記補正情報生成部により生成された前記補正情報に基づき、前記画像に対して前記逆光補正処理を施す逆光補正処理部と、
(E)を備えたことを特徴とする逆光画像補正装置である。
The main invention for achieving the object is as follows:
(A) a histogram data generation unit that generates histogram data for each color representing the distribution of the number of pixels with respect to the density value of each color of the pixels based on data of pixels constituting the image;
(B) Based on the histogram data for each color generated by the histogram data generation unit, the area represented by the histogram for each color is divided into two or more small areas for each density value. An attribute information acquisition unit that selects at least one small area from the two or more small areas and acquires attribute information about the small area for each color;
(C) a correction information generation unit that generates correction information for performing backlight correction processing on the image based on the attribute information for each color acquired by the attribute information acquisition unit;
(D) a backlight correction processing unit that performs the backlight correction processing on the image based on the correction information generated by the correction information generation unit;
A backlight image correction apparatus including (E).

本発明の他の特徴は、本明細書及び添付図面の記載により明らかにする。   Other features of the present invention will become apparent from the description of the present specification and the accompanying drawings.

本明細書及び添付図面の記載により、少なくとも以下の事項が明らかとなる。   At least the following matters will become apparent from the description of the present specification and the accompanying drawings.

(A)画像を構成する画素のデータに基づき、前記画素の各色の濃度値に対する前記画素の数の分布を表わす各色別のヒストグラムのデータを生成するヒストグラムデータ生成部と、
(B)前記ヒストグラムデータ生成部により生成された前記各色別のヒストグラムのデータに基づき、前記各色別のヒストグラムにより表される領域をそれぞれ前記濃度値の大きさ別に2つ以上の小領域に区分して、これら2つ以上の小領域の中から少なくとも1つの小領域を選出して、当該小領域に関する属性情報を各色別に取得する属性情報取得部と、
(C)前記属性情報取得部により取得された各色別の前記属性情報に基づき、前記画像に対して逆光補正処理を施すための補正情報を生成する補正情報生成部と、
(D)前記補正情報生成部により生成された前記補正情報に基づき、前記画像に対して前記逆光補正処理を施す逆光補正処理部と、
(E)を備えたことを特徴とする逆光画像補正装置。
(A) a histogram data generation unit that generates histogram data for each color representing the distribution of the number of pixels with respect to the density value of each color of the pixels based on data of pixels constituting the image;
(B) Based on the histogram data for each color generated by the histogram data generation unit, the area represented by the histogram for each color is divided into two or more small areas for each density value. An attribute information acquisition unit that selects at least one small area from the two or more small areas and acquires attribute information about the small area for each color;
(C) a correction information generation unit that generates correction information for performing backlight correction processing on the image based on the attribute information for each color acquired by the attribute information acquisition unit;
(D) a backlight correction processing unit that performs the backlight correction processing on the image based on the correction information generated by the correction information generation unit;
A backlight image correction device comprising (E).

このような逆光画像補正装置にあっては、画像を構成する画素のデータに基づき生成された各色別のヒストグラムのデータに基づき、各色別のヒストグラムにより表される領域を濃度値の大きさ別に2つ以上の小領域に区分して、これら2つ以上の小領域の中から選出された少なくとも1つの小領域に関する属性情報を各色別に取得して、取得した各色別の属性情報に基づき、逆光補正処理を施すための補正情報を生成して、この補正情報に基づき、画像に対して逆光補正処理を施すことで、画像に対して適切な逆光補正処理を施すことができる。   In such a backlight image correction apparatus, based on the data of the histogram for each color generated based on the data of the pixels constituting the image, the area represented by the histogram for each color is divided into 2 for each density value. Divide into two or more small areas, acquire attribute information for each color from at least one small area selected from these two or more small areas, and correct backlight based on the acquired attribute information for each color By generating correction information for performing processing and performing backlight correction processing on the image based on the correction information, appropriate backlight correction processing can be performed on the image.

かかる逆光画像補正装置にあっては、前記各色別のヒストグラムデータとして、レッド、グリーンおよびブルーの各色のヒストグラムのデータが前記ヒストグラムデータ生成部により生成されても良い。このように各色別のヒストグラムデータとして、レッド、グリーンおよびブルーの各色のヒストグラムデータが生成されれば、画像を構成する画素のデータとして、レッド、グリーンおよびブルーの各色の濃度値のデータを有している場合に、画像に対してより適切な逆光補正処理を施すことができる。   In such a backlight image correction device, histogram data for each color of red, green, and blue may be generated by the histogram data generation unit as the histogram data for each color. As described above, if histogram data for each color of red, green and blue is generated as histogram data for each color, it has density value data for each color of red, green and blue as data of pixels constituting the image. In this case, a more appropriate backlight correction process can be performed on the image.

また、かかる逆光画像補正装置にあっては、前記2つ以上の小領域には、相互に面積が等しい2つ以上の小領域が含まれても良い。このように2つ以上の小領域に、相互に面積が等しい2つ以上の小領域が含まれれば、画像に対してより適切な逆光補正処理を施すことができる。   In the backlight image correction apparatus, the two or more small regions may include two or more small regions having the same area. In this way, if two or more small regions include two or more small regions having the same area, more appropriate backlight correction processing can be performed on the image.

また、かかる逆光画像補正装置にあっては、前記2つ以上の小領域には、前記画素の数が相互に等しい2つ以上の小領域が含まれても良い。このように2つ以上の小領域に、前記画素の数が相互に等しい2つ以上の小領域が含まれれば、画像に対してより適切な逆光補正処理を施すことができる。   In this backlight image correction apparatus, the two or more small regions may include two or more small regions having the same number of pixels. In this way, if two or more small regions include two or more small regions having the same number of pixels, a more appropriate backlight correction process can be performed on the image.

また、かかる逆光画像補正装置にあっては、前記2つ以上の小領域には、前記画素の数および面積のうちの少なくともいずれか一方が相互に等しい2つ以上の小領域が含まれ、前記属性情報取得部は、前記画素の数および面積のうちの少なくともいずれか一方が相互に等しい2つ以上の小領域からそれぞれ前記属性情報を取得しても良い。このように2つ以上の小領域に、画素の数および面積のうちの少なくともいずれか一方が相互に等しい2つ以上の小領域が含まれ、属性情報取得部が、画素の数および面積のうちの少なくともいずれか一方が相互に等しい2つ以上の小領域からそれぞれ属性情報を取得することで、画像に対してより適切な逆光補正処理を施すことができる。   Further, in the backlight image correction device, the two or more small regions include two or more small regions in which at least one of the number and area of the pixels is equal to each other, The attribute information acquisition unit may acquire the attribute information from two or more small regions in which at least one of the number and area of the pixels is equal to each other. As described above, the two or more small regions include two or more small regions in which at least one of the number and area of the pixels is equal to each other, and the attribute information acquisition unit includes the number of pixels and the area. By acquiring the attribute information from two or more small regions in which at least one of them is equal to each other, a more appropriate backlight correction process can be performed on the image.

また、かかる逆光画像補正装置にあっては、前記属性情報取得部は、前記属性情報として、前記少なくとも1つの小領域についてそれぞれ前記濃度値の平均値を各色別に取得しても良い。このように属性情報取得部が、属性情報として、少なくとも1つの小領域についてそれぞれ濃度値の平均値を各色別に取得することで、画像に対してより適切な逆光補正処理を施すことができる。   In the backlight image correction apparatus, the attribute information acquisition unit may acquire an average value of the density values for each color as the attribute information for each of the at least one small region. As described above, the attribute information acquisition unit acquires, as the attribute information, the average value of the density values for each color for at least one small region, so that more appropriate backlight correction processing can be performed on the image.

また、かかる逆光画像補正装置にあっては、前記補正情報生成部は、前記属性情報取得部により取得された各色別の前記濃度値の平均値に基づき、前記少なくとも1つの小領域についてそれぞれ輝度に関する情報を取得して、当該輝度に関する情報に基づき前記補正情報を生成しても良い。このように補正情報生成部が、各色別の濃度値の平均値に基づき、少なくとも1つの小領域についてそれぞれ輝度に関する情報を取得して、当該輝度に関する情報に基づき補正情報を生成することで、画像に対してより適切な逆光補正処理を施すことができる。   Further, in the backlight image correction device, the correction information generation unit relates to the brightness for each of the at least one small region based on an average value of the density values for each color acquired by the attribute information acquisition unit. Information may be acquired and the correction information may be generated based on the information related to the luminance. As described above, the correction information generation unit acquires information on luminance for each of at least one small region based on the average value of the density values for each color, and generates correction information based on the information on the luminance, thereby generating an image. Thus, a more appropriate backlight correction process can be performed.

また、かかる逆光画像補正装置にあっては、前記補正情報生成部は、前記輝度に関する情報として、前記少なくとも1つの小領域についてそれぞれ画素の輝度の平均値を取得しても良い。このように補正情報生成部が、輝度に関する情報として、少なくとも1つの小領域についてそれぞれ画素の輝度の平均値を取得することで、画像に対してより適切な逆光補正処理を施すことができる。   In the backlight image correction apparatus, the correction information generation unit may acquire an average value of the luminance of each pixel for the at least one small region as the information on the luminance. As described above, the correction information generation unit obtains the average value of the luminance of each pixel for at least one small region as the luminance-related information, so that more appropriate backlight correction processing can be performed on the image.

また、かかる逆光画像補正装置にあっては、前記補正情報生成部は、前記少なくとも1つの小領域についてそれぞれ取得した前記輝度の平均値のうちのすくなくともいずれか1つと、前記画像の全体の輝度の平均値とを加算して得られた値に基づき、前記補正情報を生成しても良い。このように補正情報生成部が、少なくとも1つの小領域についてそれぞれ取得した輝度の平均値のうちのすくなくともいずれか1つと、画像の全体の輝度の平均値とを加算して得られた値に基づき、補正情報を生成することで、画像に対してより適切な逆光補正処理を施すことができる。   In the backlight image correction apparatus, the correction information generation unit may calculate at least one of the average luminance values acquired for each of the at least one small area and the total luminance of the image. The correction information may be generated based on a value obtained by adding the average value. As described above, the correction information generation unit is based on a value obtained by adding at least one of the average luminance values acquired for each of at least one small region and the average luminance value of the entire image. By generating the correction information, it is possible to perform a more appropriate backlight correction process on the image.

また、かかる逆光画像補正装置にあっては、前記逆光補正処理部は、前記補正情報に基づき前記逆光補正処理を施す際に、前記画像を構成する各画素の濃度値を変換しても良い。このように逆光補正処理部が、補正情報に基づき逆光補正処理を施す際に、画像を構成する各画素の濃度値を変換することで、逆光補正処理を簡単に施すことができる。   In the backlight image correction apparatus, the backlight correction processing unit may convert the density value of each pixel constituting the image when performing the backlight correction processing based on the correction information. As described above, when the backlight correction processing unit performs the backlight correction processing based on the correction information, the backlight correction processing can be easily performed by converting the density value of each pixel constituting the image.

また、かかる逆光画像補正装置にあっては、前記補正情報生成部は、前記補正情報として、前記逆光補正処理部により変換される前の濃度値と、前記逆光補正処理部により変換された後の濃度値との対応関係に関する情報を生成しても良い。このような情報が補正情報として生成されれば、逆光補正処理を簡単に施すことができる。   Further, in the backlight image correction apparatus, the correction information generation unit, as the correction information, the density value before being converted by the backlight correction processing unit, and after being converted by the backlight correction processing unit Information regarding the correspondence relationship with the density value may be generated. If such information is generated as correction information, the backlight correction process can be easily performed.

(A)画像を構成する画素のデータに基づき、前記画素の各色の濃度値に対する前記画素の数の分布を表わす各色別のヒストグラムのデータを生成するヒストグラムデータ生成部と、
(B)前記ヒストグラムデータ生成部により生成された前記各色別のヒストグラムのデータに基づき、前記各色別のヒストグラムにより表される領域をそれぞれ前記濃度値の大きさ別に2つ以上の小領域に区分して、これら2つ以上の小領域の中から少なくとも1つの小領域を選出して、当該小領域に関する属性情報を各色別に取得する属性情報取得部と、
(C)前記属性情報取得部により取得された各色別の前記属性情報に基づき、前記画像に対して逆光補正処理を施すための補正情報を生成する補正情報生成部と、
(D)前記補正情報生成部により生成された前記補正情報に基づき、前記画像に対して前記逆光補正処理を施す逆光補正処理部と、
(E)を備え、
(F)前記各色別のヒストグラムのデータとして、レッド、グリーンおよびブルーの各色のヒストグラムデータが前記ヒストグラムデータ生成部により生成され、
(G)前記2つ以上の小領域には、前記画素の数および面積のうちの少なくともいずれか一方が相互に等しい2つ以上の小領域が含まれ、前記属性情報取得部は、前記画素の数および面積のうちの少なくともいずれか一方が相互に等しい2つ以上の小領域からそれぞれ前記属性情報を取得し、
(H)前記属性情報取得部は、前記属性情報として、前記少なくとも1つの小領域についてそれぞれ前記濃度値の平均値を各色別に取得し、
(I)前記補正情報生成部は、前記属性情報取得部により取得された各色別の前記濃度値の平均値に基づき、前記少なくとも1つの小領域についてそれぞれ輝度の平均値を取得し、
(J)前記補正情報生成部は、前記少なくとも1つの小領域についてそれぞれ取得した前記輝度の平均値のうちのすくなくともいずれか1つと、前記画像の全体の輝度の平均値とを加算して得られた値に基づき、前記補正情報を生成し、
(K)前記逆光補正処理部は、前記補正情報に基づき前記逆光補正処理を施す際に、前記画像を構成する各画素の濃度値を変換し、
(L)前記補正情報生成部は、前記補正情報として、前記逆光補正処理部により変換される前の濃度値と、前記逆光補正処理部により変換された後の濃度値との対応関係に関する情報を生成することを特徴とする逆光画像補正装置。
(A) a histogram data generation unit that generates histogram data for each color representing the distribution of the number of pixels with respect to the density value of each color of the pixels based on data of pixels constituting the image;
(B) Based on the histogram data for each color generated by the histogram data generation unit, the area represented by the histogram for each color is divided into two or more small areas for each density value. An attribute information acquisition unit that selects at least one small area from the two or more small areas and acquires attribute information about the small area for each color;
(C) a correction information generation unit that generates correction information for performing backlight correction processing on the image based on the attribute information for each color acquired by the attribute information acquisition unit;
(D) a backlight correction processing unit that performs the backlight correction processing on the image based on the correction information generated by the correction information generation unit;
(E)
(F) As the histogram data for each color, histogram data for each color of red, green, and blue is generated by the histogram data generation unit,
(G) The two or more small regions include two or more small regions in which at least one of the number and area of the pixels is equal to each other, and the attribute information acquisition unit Obtaining the attribute information from two or more small regions in which at least one of the number and the area is equal to each other,
(H) The attribute information acquisition unit acquires, as the attribute information, an average value of the density values for each of the colors for the at least one small region,
(I) The correction information generation unit acquires an average luminance value for each of the at least one small region based on an average value of the density values for each color acquired by the attribute information acquisition unit,
(J) The correction information generation unit is obtained by adding at least one of the average luminance values acquired for each of the at least one small region and the average luminance value of the entire image. Based on the obtained value, the correction information is generated,
(K) When performing the backlight correction processing based on the correction information, the backlight correction processing unit converts a density value of each pixel constituting the image,
(L) The correction information generation unit includes, as the correction information, information related to a correspondence relationship between the density value before being converted by the backlight correction processing unit and the density value after being converted by the backlight correction processing unit. A backlight image correction device, characterized by comprising:

(A)画像を構成する画素のデータに基づき、前記画素の濃度値に対する前記画素の数の分布を表わすヒストグラムのデータを生成するヒストグラムデータ生成部と、
(B)前記ヒストグラムデータ生成部により生成された前記ヒストグラムのデータに基づき、前記ヒストグラムにより表される領域をそれぞれ前記濃度値の大きさ別に2つ以上の小領域に区分して、これら2つ以上の小領域の中から少なくとも1つの小領域を選出して、当該小領域に関する属性情報を取得する属性情報取得部と、
(C)前記属性情報取得部により取得された前記属性情報に基づき、前記画像に対して逆光補正処理を施すための補正情報を生成する補正情報生成部と、
(D)前記補正情報生成部により生成された前記補正情報に基づき、前記画像に対して前記逆光補正処理を施す逆光補正処理部と、
(E)を備えたことを特徴とする逆光画像補正装置。
(A) a histogram data generation unit that generates histogram data representing a distribution of the number of pixels with respect to a density value of the pixels, based on data of pixels constituting the image;
(B) Based on the histogram data generated by the histogram data generation unit, each of the regions represented by the histogram is divided into two or more small regions according to the size of the density value. An attribute information acquisition unit that selects at least one small area from among the small areas and acquires attribute information related to the small area;
(C) a correction information generation unit that generates correction information for performing a backlight correction process on the image based on the attribute information acquired by the attribute information acquisition unit;
(D) a backlight correction processing unit that performs the backlight correction processing on the image based on the correction information generated by the correction information generation unit;
A backlight image correction device comprising (E).

(A)画像を構成する画素のデータに基づき、前記画素の各色の濃度値に対する前記画素の数の分布を表わす各色別のヒストグラムのデータを生成するステップと、
(B)前記ヒストグラムデータ生成部により生成された前記各色別のヒストグラムのデータに基づき、前記各色別のヒストグラムにより表される領域をそれぞれ前記濃度値の大きさ別に2つ以上の小領域に区分するステップと、
(C)前記2つ以上の小領域の中から少なくとも1つの小領域を選出して、当該小領域に関する属性情報を各色別に取得するステップと、
(D)取得した各色別の前記属性情報に基づき、前記画像に対して逆光補正処理を施すための補正情報を生成するステップと、
(E)生成した前記補正情報に基づき、前記画像に対して前記逆光補正処理を施すステップと、
(F)を有することを特徴とする逆光画像補正方法。
(A) generating histogram data for each color representing the distribution of the number of pixels with respect to the density value of each color of the pixel based on the data of the pixels constituting the image;
(B) Based on the histogram data for each color generated by the histogram data generation unit, the area represented by the histogram for each color is divided into two or more small areas according to the size of the density value. Steps,
(C) selecting at least one small area from the two or more small areas, and obtaining attribute information about the small area for each color;
(D) generating correction information for performing backlight correction processing on the image based on the acquired attribute information for each color;
(E) performing the backlight correction process on the image based on the generated correction information;
(F) The backlight image correction method characterized by having.

(A)逆光画像補正装置において実行される逆光画像補正プログラムであって、
(B)画像を構成する画素のデータに基づき、前記画素の各色の濃度値に対する前記画素の数の分布を表わす各色別のヒストグラムのデータを生成するステップと、
(C)前記ヒストグラムデータ生成部により生成された前記各色別のヒストグラムのデータに基づき、前記各色別のヒストグラムにより表される領域をそれぞれ前記濃度値の大きさ別に2つ以上の小領域に区分するステップと、
(D)前記2つ以上の小領域の中から少なくとも1つの小領域を選出して、当該小領域に関する属性情報を各色別に取得するステップと、
(E)取得した各色別の前記属性情報に基づき、前記画像に対して逆光補正処理を施すための補正情報を生成するステップと、
(F)生成した前記補正情報に基づき、前記画像に対して前記逆光補正処理を施すステップと、
(G)を実行することを特徴とする逆光画像補正プログラム。
(A) A backlight image correction program executed in the backlight image correction apparatus,
(B) generating histogram data for each color representing the distribution of the number of pixels with respect to the density value of each color of the pixel based on the data of the pixels constituting the image;
(C) Based on the histogram data for each color generated by the histogram data generation unit, the area represented by the histogram for each color is divided into two or more small areas according to the size of the density value. Steps,
(D) selecting at least one small area from the two or more small areas, and obtaining attribute information about the small area for each color;
(E) generating correction information for performing backlight correction processing on the image based on the acquired attribute information for each color;
(F) performing the backlight correction process on the image based on the generated correction information;
A backlight image correction program characterized by executing (G).

(A)原稿から画像を読み取る画像読み取り部と、
(B)前記画像読み取り部により読み取られた画像を構成する画素のデータに基づき、前記画素の各色の濃度値に対する前記画素の数の分布を表わす各色別のヒストグラムのデータを生成するヒストグラムデータ生成部と、
(C)前記ヒストグラムデータ生成部により生成された前記各色別のヒストグラムのデータに基づき、前記各色別のヒストグラムにより表される領域をそれぞれ前記濃度値の大きさ別に2つ以上の小領域に区分して、これら2つ以上の小領域の中から少なくとも1つの小領域を選出して、当該小領域に関する属性情報を各色別に取得する属性情報取得部と、
(D)前記属性情報取得部により取得された各色別の前記属性情報に基づき、前記画像に対して逆光補正処理を施すための補正情報を生成する補正情報生成部と、
(E)前記補正情報生成部により生成された前記補正情報に基づき、前記画像に対して前記逆光補正処理を施す逆光補正処理部と、
(F)を備えたことを特徴とする画像読み取り装置。
(A) an image reading unit for reading an image from a document;
(B) A histogram data generation unit that generates histogram data for each color representing the distribution of the number of pixels with respect to the density value of each color of the pixel based on the data of the pixels constituting the image read by the image reading unit. When,
(C) Based on the histogram data for each color generated by the histogram data generation unit, the area represented by the histogram for each color is divided into two or more small areas for each density value. An attribute information acquisition unit that selects at least one small area from the two or more small areas and acquires attribute information about the small area for each color;
(D) a correction information generation unit that generates correction information for performing backlight correction processing on the image based on the attribute information for each color acquired by the attribute information acquisition unit;
(E) a backlight correction processing unit that performs the backlight correction processing on the image based on the correction information generated by the correction information generation unit;
An image reading apparatus comprising (F).

(A)原稿から画像を読み取るステップと、
(B)読み取った画像を構成する画素のデータに基づき、前記画素の各色の濃度値に対する前記画素の数の分布を表わす各色別のヒストグラムのデータを生成するステップと、
(C)前記ヒストグラムデータ生成部により生成された前記各色別のヒストグラムのデータに基づき、前記各色別のヒストグラムにより表される領域をそれぞれ前記濃度値の大きさ別に2つ以上の小領域に区分するステップと、
(D)前記2つ以上の小領域の中から少なくとも1つの小領域を選出して、当該小領域に関する属性情報を各色別に取得するステップと、
(E)取得した各色別の前記属性情報に基づき、前記画像に対して逆光補正処理を施すための補正情報を生成するステップと、
(F)生成した前記補正情報に基づき、前記画像に対して前記逆光補正処理を施すステップと、
(G)を有することを特徴とする画像読み取り方法。
(A) a step of reading an image from a document;
(B) generating histogram data for each color representing the distribution of the number of pixels with respect to the density value of each color of the pixel based on the data of the pixels constituting the read image;
(C) Based on the histogram data for each color generated by the histogram data generation unit, the area represented by the histogram for each color is divided into two or more small areas according to the size of the density value. Steps,
(D) selecting at least one small area from the two or more small areas, and obtaining attribute information about the small area for each color;
(E) generating correction information for performing backlight correction processing on the image based on the acquired attribute information for each color;
(F) performing the backlight correction process on the image based on the generated correction information;
An image reading method comprising (G).

(A)画像を媒体に印刷する印刷部と、
(B)前記印刷部により前記画像が印刷される前に、前記画像を構成する画素のデータに基づき、前記画素の各色の濃度値に対する前記画素の数の分布を表わす各色別のヒストグラムのデータを生成するヒストグラムデータ生成部と、
(C)前記ヒストグラムデータ生成部により生成された前記各色別のヒストグラムのデータに基づき、前記各色別のヒストグラムにより表される領域をそれぞれ前記濃度値の大きさ別に2つ以上の小領域に区分して、これら2つ以上の小領域の中から少なくとも1つの小領域を選出して、当該小領域に関する属性情報を各色別に取得する属性情報取得部と、
(D)前記属性情報取得部により取得された各色別の前記属性情報に基づき、前記画像に対して逆光補正処理を施すための補正情報を生成する補正情報生成部と、
(E)前記補正情報生成部により生成された前記補正情報に基づき、前記画像に対して前記逆光補正処理を施す逆光補正処理部と、
(F)を備えたことを特徴とする印刷装置。
(A) a printing unit that prints an image on a medium;
(B) Before the image is printed by the printing unit, based on the data of the pixels constituting the image, histogram data for each color representing the distribution of the number of pixels with respect to the density value of each color of the pixel is obtained. A histogram data generation unit to generate,
(C) Based on the histogram data for each color generated by the histogram data generation unit, the area represented by the histogram for each color is divided into two or more small areas for each density value. An attribute information acquisition unit that selects at least one small area from the two or more small areas and acquires attribute information about the small area for each color;
(D) a correction information generation unit that generates correction information for performing backlight correction processing on the image based on the attribute information for each color acquired by the attribute information acquisition unit;
(E) a backlight correction processing unit that performs the backlight correction processing on the image based on the correction information generated by the correction information generation unit;
A printing apparatus comprising (F).

===画像読み取りシステム等の概要===
以下に本発明に係る逆光画像補正装置について画像読み取りシステムに適用した場合を例にして説明する。図1〜図4は、逆光画像補正装置が適用された画像読み取りシステムの一実施形態について説明したものである。図1は、画像読み取りシステムの一実施形態を説明したものである。図2は、画像読み取り装置の内部構成の一例を説明する図である。図3は、画像読み取り装置のシステム構成の一例を説明する図である。図4は、コンピュータ装置のシステム構成を説明する図である。
=== Overview of Image Reading System etc. ===
Hereinafter, a case where the backlight image correction apparatus according to the present invention is applied to an image reading system will be described as an example. 1 to 4 illustrate an embodiment of an image reading system to which a backlight image correction apparatus is applied. FIG. 1 illustrates an embodiment of an image reading system. FIG. 2 is a diagram illustrating an example of the internal configuration of the image reading apparatus. FIG. 3 is a diagram illustrating an example of a system configuration of the image reading apparatus. FIG. 4 is a diagram illustrating the system configuration of the computer apparatus.

この画像読み取りシステム2は、図1に示すように、画像読み取り装置10と、この画像読み取り装置10に有線または無線等により通信可能に接続されたコンピュータ装置20とを有している。画像読み取り装置10は、図1に示すように、一般にイメージスキャナと呼ばれる装置であり、原稿台12と、この原稿台12の上面部を開閉する原稿台カバー14とを備えている。原稿台12には、画像が読み取られる原稿15がセットされる。また、原稿台カバー14は、原稿台12の後端部にヒンジ部18を介して開閉自在に設けられている。   As shown in FIG. 1, the image reading system 2 includes an image reading device 10 and a computer device 20 connected to the image reading device 10 so as to be communicable by wire or wireless. As shown in FIG. 1, the image reading device 10 is a device generally called an image scanner, and includes a document table 12 and a document table cover 14 that opens and closes the upper surface of the document table 12. A document 15 from which an image is read is set on the document table 12. The document table cover 14 is provided at the rear end portion of the document table 12 through a hinge portion 18 so as to be freely opened and closed.

一方、コンピュータ装置20は、例えば、図1に示すように、コンピュータ本体22と、表示装置24と、入力装置26とを備えている。コンピュータ本体22は、パーソナルコンピュータなどをはじめとする各種コンピュータにより構成されている。ここでは、コンピュータ本体22は、FDドライブ装置28やCD−ROMドライブ装置30などの読み取り装置32を内部に備えている。この他に、コンピュータ本体22は、例えば、MO(Magnet Optical)ディスクドライブ装置やDVDドライブ装置などを備えても良い。また、表示装置24は、CRTディスプレイやプラズマディスプレイ、液晶ディスプレイ等など、各種表示装置により構成される。入力装置26は、キーボード34やマウス36などにより構成される。   On the other hand, as shown in FIG. 1, for example, the computer device 20 includes a computer main body 22, a display device 24, and an input device 26. The computer main body 22 includes various computers such as a personal computer. Here, the computer main body 22 includes a reading device 32 such as an FD drive device 28 or a CD-ROM drive device 30 therein. In addition, the computer main body 22 may include, for example, an MO (Magnet Optical) disk drive device or a DVD drive device. The display device 24 includes various display devices such as a CRT display, a plasma display, and a liquid crystal display. The input device 26 includes a keyboard 34, a mouse 36, and the like.

<画像読み取り装置>
画像読み取り装置10の原稿台12の内部には、図2に示すように、キャリッジ40と、このキャリッジ40を原稿台12に対して所定の間隔を保ちつつ図中矢印A方向に沿って平行に移動させる駆動機構42と、このキャリッジ40を支持しつつその移動を案内するガイド44とが設けられている。
<Image reading device>
As shown in FIG. 2, inside the document table 12 of the image reading apparatus 10, a carriage 40 and the carriage 40 are parallel to each other along the direction of arrow A in FIG. A driving mechanism 42 for moving the guide 40 and a guide 44 for guiding the movement while supporting the carriage 40 are provided.

キャリッジ40には、原稿台12を介して原稿15に対し光を照射する光源としての露光ランプ46と、原稿15により反射された反射光が入射するレンズ48と、このレンズ48を通じてキャリッジ40の内部に取り込まれた反射光を受光するイメージセンサ50とが設けられている。イメージセンサ50は、光信号を電気信号に変換するフォトダイオード等の光電変換素子が列状に配置されたリニアCCDセンサ等により構成されている。イメージセンサ50により読み取られた画像のデータは、制御部52に出力される。   The carriage 40 has an exposure lamp 46 as a light source for irradiating light to the document 15 via the document table 12, a lens 48 on which reflected light reflected by the document 15 is incident, and the inside of the carriage 40 through the lens 48. And an image sensor 50 for receiving the reflected light taken in. The image sensor 50 includes a linear CCD sensor or the like in which photoelectric conversion elements such as photodiodes that convert optical signals into electric signals are arranged in a line. The image data read by the image sensor 50 is output to the control unit 52.

また、駆動機構42は、キャリッジ40に接続されたタイミングベルト54と、このタイミングベルト54が掛け渡された一対のプーリ55、56と、一方のプーリ55を回転駆動する駆動モータ58とを備えている。駆動モータ58は、制御部52からの制御信号によって駆動制御される。   The drive mechanism 42 includes a timing belt 54 connected to the carriage 40, a pair of pulleys 55, 56 around which the timing belt 54 is stretched, and a drive motor 58 that rotationally drives one pulley 55. Yes. The drive motor 58 is driven and controlled by a control signal from the control unit 52.

制御部52は、図3に示すように、コントローラ60と、モータ制御部62と、ランプ制御部64と、センサ制御部66と、AFE(Analog Front End)部68と、デジタル処理回路70と、インターフェイス回路72とを備えている。さらに、AFE(Analog Front End)部68は、アナログ信号処理回路74と、A/D変換回路76とを備えている。   As shown in FIG. 3, the control unit 52 includes a controller 60, a motor control unit 62, a lamp control unit 64, a sensor control unit 66, an AFE (Analog Front End) unit 68, a digital processing circuit 70, And an interface circuit 72. Further, the AFE (Analog Front End) unit 68 includes an analog signal processing circuit 74 and an A / D conversion circuit 76.

コントローラ60は、コンピュータ本体22からの命令等に基づき、モータ制御部62やランプ制御部64、センサ制御部66、AFE(Analog Front End)部68、デジタル処理回路70、インターフェイス回路72を制御する。モータ制御部62は、コントローラ60からの命令により、キャリッジ40を移動させるための駆動モータ58の駆動制御を行う。また、ランプ制御部64は、露光ランプ46の発光を制御する。また、センサ制御部66は、イメージセンサ50の制御を行う。   The controller 60 controls the motor control unit 62, the lamp control unit 64, the sensor control unit 66, the AFE (Analog Front End) unit 68, the digital processing circuit 70, and the interface circuit 72 based on commands from the computer main body 22. The motor control unit 62 performs drive control of the drive motor 58 for moving the carriage 40 according to a command from the controller 60. The lamp control unit 64 controls the light emission of the exposure lamp 46. The sensor control unit 66 controls the image sensor 50.

また、AFE(Analog Front End)部68のアナログ信号処理回路74は、イメージセンサ50により読み取られた画像のアナログ信号に対して信号処理を行う。また、AFE(Analog Front End)部68のA/D変換回路76は、アナログ信号処理回路74により信号処理された画像の信号をデジタル信号へとA/D変換する。   An analog signal processing circuit 74 of an AFE (Analog Front End) unit 68 performs signal processing on an analog signal of an image read by the image sensor 50. An A / D conversion circuit 76 of an AFE (Analog Front End) unit 68 performs A / D conversion on the image signal processed by the analog signal processing circuit 74 into a digital signal.

デジタル処理回路70は、AFE(Analog Front End)部68のA/D変換回路76から送られてきたデジタル信号に対してデジタル信号処理を施す。ここでは、具体的にシェーディング補正等の補正処理をはじめ、各種画像処理などが施される。デジタル信号処理が施されたデジタル信号は、原稿15から読み取られた画像のデータ(画像データ)としてインターフェイス回路72により外部、即ちここでは当該画像読み取り装置10が接続されたコンピュータ本体22へと出力される。インターフェイス回路72は、この他に、コンピュータ本体22から画像読み取り装置10への命令(コマンド)等を受信するようになっている。   The digital processing circuit 70 performs digital signal processing on the digital signal sent from the A / D conversion circuit 76 of the AFE (Analog Front End) unit 68. Here, specifically, various image processing and the like are performed, including correction processing such as shading correction. The digital signal subjected to the digital signal processing is output as image data (image data) read from the document 15 to the outside, that is, to the computer main body 22 to which the image reading apparatus 10 is connected in this case. The In addition to this, the interface circuit 72 receives commands (commands) and the like from the computer main body 22 to the image reading apparatus 10.

<コンピュータ本体>
コンピュータ本体22は、図4に示すように、CPU80と、メモリ82と、HDD(ハードディスクドライブ装置)84と、操作入力部86と、表示制御部88と、外部通信部90と、バス92とを備えている。この他に、コンピュータ本体22は、先に説明したCD−ROMドライブ装置30とFDドライブ装置28を備えている。CPU80と、メモリ82と、HDD(ハードディスクドライブ装置)84と、CD−ROMドライブ装置30と、FDドライブ装置28と、操作入力部86と、表示制御部88と、外部通信部90とは、バス92を介して相互に通信可能に接続されている。
<Computer body>
As shown in FIG. 4, the computer main body 22 includes a CPU 80, a memory 82, an HDD (Hard Disk Drive Device) 84, an operation input unit 86, a display control unit 88, an external communication unit 90, and a bus 92. I have. In addition, the computer main body 22 includes the CD-ROM drive device 30 and the FD drive device 28 described above. The CPU 80, the memory 82, the HDD (Hard Disk Drive Device) 84, the CD-ROM drive device 30, the FD drive device 28, the operation input unit 86, the display control unit 88, and the external communication unit 90 are buses. 92 to be communicable with each other.

CPU80は、コンピュータ本体22の全体の制御を行う。メモリ82は、CPU80により実行されるプログラムや、当該プログラムが使用する作業データ等の各種データを記憶するためのものである。HDD(ハードディスクドライブ装置)84は、CPU80にて実行されるオペレーティングシステム(Operating System:OS)をはじめ、各種アプリケーションプログラムやドライバ等の各種プログラム、その他、画像データなどの各種データが格納されている。操作入力部86は、キーボード34やマウス36等の入力装置26に接続されて、これら入力装置26を通じてユーザにより入力された情報を取得する。また、表示制御部88は、CPU80からの命令に基づき、表示装置24の画面に表示される画像等を制御する。また、外部通信部90は、コンピュータ本体22の外部に接続された画像読み取り装置10をはじめとする各種周辺機器との間で通信を行う。   The CPU 80 performs overall control of the computer main body 22. The memory 82 is for storing various data such as a program executed by the CPU 80 and work data used by the program. The HDD (Hard Disk Drive Device) 84 stores an operating system (OS) executed by the CPU 80, various programs such as various application programs and drivers, and various data such as image data. The operation input unit 86 is connected to the input device 26 such as the keyboard 34 and the mouse 36, and acquires information input by the user through the input device 26. Further, the display control unit 88 controls an image displayed on the screen of the display device 24 based on a command from the CPU 80. The external communication unit 90 communicates with various peripheral devices such as the image reading apparatus 10 connected to the outside of the computer main body 22.

CPU80は、HDD(ハードディスクドライブ装置)84からプログラムを読み出して、オペレーティングシステム(Operating System:OS)の下にて各種プログラムを実行する。ここで実行されるプログラムには、各種アプリケーションプログラムをはじめ、画像読み取り装置10や操作入力部86、表示制御部88等を制御するための各種ドライバが含まれている。   The CPU 80 reads out a program from an HDD (Hard Disk Drive Device) 84 and executes various programs under an operating system (OS). The programs executed here include various applications programs and various drivers for controlling the image reading device 10, the operation input unit 86, the display control unit 88, and the like.

画像読み取り装置10を制御するためのドライバは、スキャナドライバと一般的に呼ばれている。このスキャナドライバは、インターネット等の各種通信回線をはじめ、CD−ROM、フロッピーディスク(FD)などの各種記憶媒体等を通じて、コンピュータ本体22にインストールされたプログラムである。このスキャナドライバがコンピュータ本体22にインストールされることによって、コンピュータ本体22は、画像読み取り装置10を制御する制御装置として機能する。   A driver for controlling the image reading apparatus 10 is generally called a scanner driver. The scanner driver is a program installed in the computer main body 22 through various communication lines such as the Internet and various storage media such as a CD-ROM and a floppy disk (FD). When the scanner driver is installed in the computer main body 22, the computer main body 22 functions as a control device that controls the image reading apparatus 10.

===スキャナドライバ===
次にスキャナドライバのユーザインターフェイスの一例について説明する。図5は、このユーザインターフェイスのメインのダイアログボックス100を示したものである。このユーザインターフェイスは、コンピュータ本体22のCPU80が表示制御部88を通じて表示装置24の表示画面に表示する。ユーザは、表示装置24の表示画面に表示されたユーザインターフェイスのダイアログボックス100を見ながら、キーボード34やマウス36等の入力装置26を通じて、スキャナドライバの各種の設定を行うことができる。
=== Scanner Driver ===
Next, an example of the user interface of the scanner driver will be described. FIG. 5 shows the main dialog box 100 of this user interface. This user interface is displayed on the display screen of the display device 24 by the CPU 80 of the computer main body 22 through the display control unit 88. The user can make various settings of the scanner driver through the input device 26 such as the keyboard 34 and the mouse 36 while looking at the dialog box 100 of the user interface displayed on the display screen of the display device 24.

このメインのダイアログボックス100には、『モード選択欄』102と、『設定保存欄』104と、『原稿設定欄』106と、『出力設定欄』108と、『調整欄』110とが設けられている。『モード選択欄』102では、ユーザは、複数種類のモードの中から1つのモードを選択することができるようになっている。ここでは、「プロフェッショナルモード」が選択されている。また、『設定保存欄』104では、ユーザは、「保存ボタン」または「削除ボタン」をクリックすることで、現在の設定を保存したり削除したりすることができる。   The main dialog box 100 is provided with a “mode selection field” 102, a “setting storage field” 104, an “original setting field” 106, an “output setting field” 108, and an “adjustment field” 110. ing. In the “mode selection field” 102, the user can select one mode from a plurality of modes. Here, “professional mode” is selected. In the “setting storage field” 104, the user can save or delete the current setting by clicking the “save button” or “delete button”.

また、『原稿設定欄』106では、ユーザは、「原稿種」112や「読み込み装置」114、「自動露出」116の各設定を行うことができる。「原稿種」112では、セットした原稿の種類を選択することができる。例えば、「反射原稿」や「フィルム」等の選択が可能である。また、「読込装置」114では、例えば、「原稿台」等の選択が可能である。また、「自動露出」116では、読み取る原稿の種類に適した露出設定を行うことができる。例えば、「写真向き」や「書類向き」等の選択が可能である。   Further, in the “original setting field” 106, the user can set each of “original type” 112, “reading device” 114, and “automatic exposure” 116. In the “original type” 112, the type of original set can be selected. For example, “reflection original”, “film”, or the like can be selected. In the “reading device” 114, for example, “original table” can be selected. In the “automatic exposure” 116, an exposure setting suitable for the type of document to be read can be performed. For example, “photo orientation”, “document orientation”, and the like can be selected.

また、『出力設定欄』108では、ユーザは、画像出力に関する種々の設定を行うことができる。具体的には、この『出力設定欄』108では、出力画像の「イメージタイプ」118や、読み込み時の「解像度」120、読み込み時の「原稿サイズ」122、「出力サイズ」124の各設定が可能である。「イメージタイプ」118では、読み込み画像の色数を、カラー、グレースケール、およびモノクロの3種類の中から選択することができる。「解像度」120では、読み込み画像の解像度を設定することができる。「原稿サイズ」122では、読み込み画像のサイズを設定することができる。   In the “output setting field” 108, the user can make various settings related to image output. Specifically, in the “output setting field” 108, the “image type” 118 of the output image, “resolution” 120 at the time of reading, “original size” 122 at the time of reading, and “output size” 124 are set. Is possible. In “image type” 118, the number of colors of the read image can be selected from three types of color, gray scale, and monochrome. In “Resolution” 120, the resolution of the read image can be set. In “Original Size” 122, the size of the read image can be set.

スキャナドライバは、このダイアログボックス100の下部の「スキャンボタン」126がユーザによりクリックされると、このダイアログボックス100を通じてユーザにより設定された情報に基づき、外部の画像読み取り装置10を制御して、画像読み取り装置10にセットされた原稿から画像を読み込む。これにより読み込まれた画像のデータは、コンピュータ本体へと送られてくる。そして、このダイアログボックス100の下部の「プレビューボタン」127がユーザによりクリックされると、スキャナドライバは、画像読み取り装置10により読み取った画像を表示するプレビューウィンドウを表示装置24の表示画面に表示する。   When the “scan button” 126 at the bottom of the dialog box 100 is clicked by the user, the scanner driver controls the external image reading device 10 based on information set by the user through the dialog box 100 to An image is read from a document set on the reading device 10. The image data thus read is sent to the computer main body. When the “preview button” 127 at the bottom of the dialog box 100 is clicked by the user, the scanner driver displays a preview window for displaying the image read by the image reading device 10 on the display screen of the display device 24.

この他に、このスキャナドライバには、画像読み取り装置10により読み取った画像を調整する機能を有している。読み取った画像の調整は、メインのダイアログボックス100の『調整欄』110を通じて行う。この『調整欄』110には、画像読み取り装置10により読み取った画像を調整するために、5つのボタンと、4つのチェックボックスとが設けられている。5つのボタン128A、128B、128C、128D、128Eはそれぞれ、自動露出のボタン128Aと、ヒストグラム調整のボタン128Bと、濃度補正のボタン128Cと、イメージ調整のボタン128Dと、カラーパレット調整のボタン128Eである。また、4つのチェックボックス130A、130B、130C、130Dはそれぞれ、アンシャープマスクフィルタのチェックボックス130Aと、モアレ除去フィルタのチェックボックス130Bと、退色復元のチェックボックス130Cと、ホコリ除去のチェックボックス130Dと、逆光補正のチェックボックス130Eとである。   In addition, this scanner driver has a function of adjusting an image read by the image reading device 10. The read image is adjusted through the “adjustment column” 110 of the main dialog box 100. The “adjustment column” 110 is provided with five buttons and four check boxes for adjusting an image read by the image reading apparatus 10. The five buttons 128A, 128B, 128C, 128D, and 128E are an automatic exposure button 128A, a histogram adjustment button 128B, a density correction button 128C, an image adjustment button 128D, and a color palette adjustment button 128E, respectively. is there. The four check boxes 130A, 130B, 130C, and 130D include an unsharp mask filter check box 130A, a moire removal filter check box 130B, a fading restoration check box 130C, and a dust removal check box 130D, respectively. And a backlight correction check box 130E.

自動露出のボタン128Aは、露出を自動調整したいときにクリックされるボタンである。また、ヒストグラム調整のボタン128Bは、画像の明暗を調整したりしたい場合にクリックされるボタンである。このヒストグラム調整のボタン128Bがクリックされると、ヒストグラム調整のダイアログボックスが呼び出される。また、濃度補正のボタン128Cは、画像の濃度のバランスを補正したい場合にクリックされるボタンである。この濃度補正のボタン128Cがクリックされると、濃度補正のダイアログボックスが呼び出される。また、イメージ調整のボタン128Dは、画像の明るさ・コントラスト・彩度や、カラーバランスを調整したい場合にクリックされるボタンである。このイメージ調整のボタン128Dがクリックされると、イメージ調整のダイアログボックスが呼び出される。 一方、アンシャープマスクフィルタのチェックボックス130Aは、アンシャープマスクフィルタの使用可否を指示するためのチェックボックスであり、画像をシャープにしたい場合にチェックする。また、モアレ除去フィルタのチェックボックス130Bは、印刷物のスキャンで発生するモアレ(網目状の陰影)を除去するフィルタの使用可否を指示するためのチェックボックスであり、モアレが目立つ場合にチェックする。また、退色復元のチェックボックス130Cは、色あせた写真の色を復元するときにチェックする。また、ホコリ除去のチェックボックス130Dは、フィルムスキャン時にフィルム上のホコリを軽減するときにチェックする。また、逆光補正のチェックボックス130Eは、読み取った画像に対して逆光補正を施したいときにチェックする。この逆光補正については後で詳しく説明する。   The automatic exposure button 128A is clicked when it is desired to automatically adjust the exposure. The histogram adjustment button 128B is a button that is clicked when it is desired to adjust the contrast of an image. When the histogram adjustment button 128B is clicked, a histogram adjustment dialog box is called up. The density correction button 128C is a button that is clicked when it is desired to correct the density balance of the image. When the density correction button 128C is clicked, a dialog box for density correction is called. The image adjustment button 128D is a button that is clicked when it is desired to adjust the brightness, contrast, saturation, and color balance of the image. When this image adjustment button 128D is clicked, an image adjustment dialog box is called up. On the other hand, the unsharp mask filter check box 130A is a check box for instructing whether or not the unsharp mask filter can be used, and is checked when it is desired to sharpen the image. The moire removal filter check box 130B is a check box for instructing whether or not to use a filter that removes moire (mesh shading) generated in the scanning of a printed matter, and is checked when moire is conspicuous. The color fading restoration check box 130C is checked when restoring the color of the faded photograph. The dust removal check box 130D is checked to reduce dust on the film during film scanning. The backlight correction check box 130E is checked when it is desired to perform backlight correction on the read image. This backlight correction will be described in detail later.

===画像調整===
次に画像調整を行うヒストグラム調整、濃度補正、およびイメージ調整について説明する。図6〜図9は、ヒストグラム調整、濃度補正、およびイメージ調整についてそれぞれ説明したものである。図6は、ヒストグラム調整のダイアログボックスを示したものである。図7は、ヒストグラム調整の具体的な調整概要について説明したものである。図8は、濃度補正のダイアログボックスを示したものである。図9は、イメージ調整のダイアログボックスを示したものである。
=== Image adjustment ===
Next, histogram adjustment, density correction, and image adjustment for performing image adjustment will be described. 6 to 9 illustrate histogram adjustment, density correction, and image adjustment, respectively. FIG. 6 shows a histogram adjustment dialog box. FIG. 7 explains a specific adjustment outline of the histogram adjustment. FIG. 8 shows a density correction dialog box. FIG. 9 shows an image adjustment dialog box.

<ヒストグラム調整>
「ヒストグラム調整」では、画像の明暗等を調整することによって、読み取った画像の見栄えの向上を図る。ヒストグラム調整のダイアログボックス131には、図6に示すように、編集対象となる画像のヒストグラムが表示されるヒストグラム表示欄132と、ヒストグラムにより調整をした結果を表わすトーンカーブが表示されるトーンカーブ表示欄134と、色かぶりを取り除くためのグレーバランスを調整するためのグレーバランス調整欄136とが設けられている。ここで、「ヒストグラム」とは、画像全体の明るさと色の分布を示したものであり、画像の黒から白までのデータ分布(ピクセル数)をグラフで表したものである。
<Histogram adjustment>
In “histogram adjustment”, the brightness of the image is adjusted to improve the appearance of the read image. In the histogram adjustment dialog box 131, as shown in FIG. 6, a histogram display field 132 in which a histogram of an image to be edited is displayed, and a tone curve display in which a tone curve indicating the result of adjustment by the histogram is displayed. A column 134 and a gray balance adjustment column 136 for adjusting the gray balance for removing the color cast are provided. Here, the “histogram” represents the brightness and color distribution of the entire image, and is a graph representing the data distribution (number of pixels) from black to white of the image.

ヒストグラム表示欄132には、表示するヒストグラムの種類(チャンネル(色))を選択するためのチャンネル欄138が設けられている。このチャンネル欄138では、RGB(レッド、グリーン、ブルー)全色、R(レッド)のみ、G(グリーン)のみ、B(ブルー)のみの4種類から選択することができる。RGB(レッド、グリーン、ブルー)全色を調整したい場合には、このチャンネル欄138の1番上のスイッチを選択すると、右側にRGB(レッド、グリーン、ブルー)全色のヒストグラムが表示される。また、R(レッド)のみを調整したい場合には、このチャンネル欄138の上から2番目のスイッチを選択すると、右側にR(レッド)のみのヒストグラムが表示される。また、G(グリーン)のみを調整したい場合には、このチャンネル欄138の上から3番目のスイッチを選択すると、右側にG(グリーン)のみのヒストグラムが表示される。また、B(ブルー)のみを調整したい場合には、このチャンネル欄138の上から4番目のスイッチを選択すると、右側にB(ブルー)のみのヒストグラムが表示される。   The histogram display column 132 is provided with a channel column 138 for selecting the type (channel (color)) of the histogram to be displayed. In this channel column 138, it is possible to select from four types of RGB (red, green, blue) all colors, only R (red), only G (green), and only B (blue). If you want to adjust all RGB (red, green, blue) colors, select the top switch in this channel column 138, and a histogram of all RGB (red, green, blue) colors will be displayed on the right. If only the R (red) is to be adjusted, the second switch from the top of the channel field 138 is selected, and a histogram of only R (red) is displayed on the right side. When only G (green) is to be adjusted, when the third switch from the top of the channel field 138 is selected, a histogram of only G (green) is displayed on the right side. If it is desired to adjust only B (blue), selecting the fourth switch from the top of the channel field 138 displays a histogram of only B (blue) on the right side.

そして、表示されたヒストグラムを調整する場合には、表示されたヒストグラムの下側に設けられた3つのスライダー140A、140B、140Cを使って調整を行う。3つのスライダー140A、140B、140Cは、それぞれシャドウを調整するスライダー140Aと、ガンマを調整するスライダー140Bと、ハイライトを調整するスライダー140Cとである。シャドウを調整するスライダー140Aは、黒色の三角印『▲』で表されている。ガンマを調整するスライダー140Bは、灰色の三角印で表されている。ハイライトを調整するスライダー140Cは、白色の三角印『△』で表されている。これら3つのスライダー140A、140B、140Cを使って調整を行う場合には、これら3つのスライダー140A、140B、140Cをそれぞれ個別に左右方向に移動させる。具体的には、シャドウを調整するスライダー140Aについては、ヒストグラムの山の左端よりもやや右側に位置するように移動させる。また、ハイライトを調整するスライダー140Cについては、ヒストグラムの山の右端よりもやや左側に位置するように移動させる。ガンマを調整するスライダー140Bについては、シャドウを調整するスライダー140Aと、ハイライトを調整するスライダー140Cとの間にて左右に移動させて中間部分の明暗が適切になるように調整をする。すると、編集対象となる画像の全体の明暗のバランスが良くなり、画像の見栄えの向上を図ることができる。   When the displayed histogram is adjusted, the adjustment is performed using the three sliders 140A, 140B, and 140C provided below the displayed histogram. The three sliders 140A, 140B, and 140C are a slider 140A that adjusts shadows, a slider 140B that adjusts gamma, and a slider 140C that adjusts highlights. The slider 140A for adjusting the shadow is represented by a black triangle mark “▲”. The slider 140B for adjusting gamma is represented by a gray triangle mark. The slider 140C for adjusting the highlight is represented by a white triangle “Δ”. When adjustment is performed using these three sliders 140A, 140B, and 140C, the three sliders 140A, 140B, and 140C are individually moved in the left-right direction. Specifically, the slider 140A for adjusting the shadow is moved so as to be located slightly to the right of the left end of the histogram peak. Further, the slider 140C for adjusting the highlight is moved so as to be located slightly to the left of the right end of the histogram peak. The slider 140B for adjusting the gamma is adjusted so that the brightness of the intermediate portion is appropriate by moving it to the left and right between the slider 140A for adjusting the shadow and the slider 140C for adjusting the highlight. As a result, the overall light / dark balance of the image to be edited is improved, and the appearance of the image can be improved.

この他に、ヒストグラム表示欄132には、3つのスライダー140A、140B、140Cの位置をそれぞれ個別に直接、数値にて特定するための数値入力欄142A、142B、142Cが設けられている。数値入力欄142Aには、シャドウ入力値が入力される。また、数値入力欄142Bには、ガンマ値が入力される。また、数値入力欄142Cには、ハイライト入力値が入力される。これにより、各数値入力欄142A、142B、142Cに直接、数値を入力して、シャドウ入力値、ハイライト入力値およびガンマ値を簡単に特定することができる。   In addition, the histogram display field 132 is provided with numerical value input fields 142A, 142B, and 142C for directly and directly specifying the positions of the three sliders 140A, 140B, and 140C. A shadow input value is input to the numerical value input field 142A. In addition, the gamma value is input to the numerical value input field 142B. In addition, a highlight input value is input to the numerical value input field 142C. Thereby, it is possible to easily specify the shadow input value, the highlight input value, and the gamma value by directly inputting the numerical value into each numerical value input field 142A, 142B, 142C.

また、これら3つの数値入力欄142A、142B、142Cの右隣りには、それぞれスポイトボタン143A、143B、143Cが設けられている。これらスポイトボタン143A、143B、143Cは、当該ヒストグラム調整のダイアログボックスとは別に表示されるプレビュー画面にて表示された編集対象の画像上から直接ポイントを指示するためのボタンである。3つの数値入力欄142A、142B、142Cには、これらスポイトボタン143A、143B、143Cを利用してプレビュー画面の編集対象の画像上から指示されたポイント(画素)に対応する数値が直接入力される。   Further, dropper buttons 143A, 143B, and 143C are provided on the right of these three numerical value input fields 142A, 142B, and 142C, respectively. The dropper buttons 143A, 143B, and 143C are buttons for directly instructing points from the image to be edited displayed on the preview screen displayed separately from the dialog box for adjusting the histogram. In the three numerical value input fields 142A, 142B, and 142C, numerical values corresponding to points (pixels) designated from the image to be edited on the preview screen are directly input using the dropper buttons 143A, 143B, and 143C. .

さらに、これらシャドウ入力値およびハイライト入力値が入力される2つの数値入力欄142A、142Cの下には、それぞれ2つの数値入力欄142D、142Eが設けられている。左側の数値入力欄142Dには、シャドウ入力値に対応するシャドウ出力値が入力される。また、右側の数値入力欄142Eには、ハイライト入力値に対応するハイライト出力値が入力される。   Further, two numerical value input fields 142D and 142E are provided below the two numerical value input fields 142A and 142C to which the shadow input value and the highlight input value are input, respectively. A shadow output value corresponding to the shadow input value is input to the left numeric input field 142D. Further, a highlight output value corresponding to the highlight input value is input to the numerical value input field 142E on the right side.

なお、これらスライダー140A、140B、140Cや、数値入力欄142A、142B、142C、142D、142Eを用いた調整については、RGB(レッド、グリーン、ブルー)全色、R(レッド)のみ、G(グリーン)のみ、B(ブルー)のみの4種類についてそれぞれ可能である。   For adjustment using these sliders 140A, 140B, and 140C and numerical value input fields 142A, 142B, 142C, 142D, and 142E, RGB (red, green, blue) all colors, R (red) only, G (green) ) And B (blue) only.

図7は、このヒストグラム調整について詳しく説明したものである。このヒストグラム調整では、スライダー140A、140B、140Cまたは数値入力欄142A、142B、142C、142D、142Eを通じて設定されたシャドウ入力値α01、シャドウ出力値α03、ハイライト入力値α02、ハイライト出力値α04、およびガンマ値α05に基づき、同図に示すような入力データと出力データとの対応関係を表すトーンカーブが規定される。すなわち、ここで規定されるトーンカーブは、設定されたシャドウ入力値α01およびシャドウ出力値α03により規定するポイントT1(シャドウ点ともいう)と、設定されたハイライト入力値α02およびハイライト出力値α04により規定されるポイントT2(ハイライト点ともいう)とを通過するように形成される。さらに、トーンカーブは、設定されたガンマ値α05に応じて、これらポイントT1及びT2の間を結ぶ直線のどちらか一方の側に膨らむように形成される。このようにして設定されたシャドウ入力値α01、シャドウ出力値α03、ハイライト入力値α02、ハイライト出力値α04、およびガンマ値α05に基づき、入力データと出力データとの対応関係を表すトーンカーブが規定される。なお、トーンカーブは、R(レッド)、G(グリーン)およびB(ブルー)の各色についてそれぞれ規定される。   FIG. 7 explains this histogram adjustment in detail. In this histogram adjustment, the shadow input value α01, the shadow output value α03, the highlight input value α02, the highlight output value α04, which are set through the sliders 140A, 140B, 140C or the numerical value input fields 142A, 142B, 142C, 142D, 142E, Based on the gamma value α05, a tone curve representing the correspondence between input data and output data as shown in the figure is defined. That is, the tone curve defined here includes a point T1 (also referred to as a shadow point) defined by the set shadow input value α01 and shadow output value α03, and a set highlight input value α02 and highlight output value α04. It is formed so as to pass through a point T2 (also referred to as a highlight point) defined by. Further, the tone curve is formed so as to swell toward one of the straight lines connecting the points T1 and T2 in accordance with the set gamma value α05. Based on the shadow input value α01, the shadow output value α03, the highlight input value α02, the highlight output value α04, and the gamma value α05 set in this way, a tone curve representing the correspondence between the input data and the output data is obtained. It is prescribed. The tone curve is defined for each color of R (red), G (green), and B (blue).

このようにして規定されたトーンカーブは、図6に示すように、トーンカーブ表示欄134に表示される。トーンカーブ表示欄134には、ヒストグラム表示欄132にて行われた調整結果に応じたトーンカーブが表示される。さらに、このトーンカーブ表示欄134では、トーンカーブについてより細かな調整が行えるように、ポイントT1(シャドウ点)またはポイントT2(ハイライト点)よりも外側の階調を調整することができる。具体的には、トーンカーブの左側下部と右側上部とにそれぞれ設けられた端部カーブ形状変更ボタン144A、144Bをクリックして、表示されるプルダウンメニューから希望する端部カーブ形状を選択するようになっている。ここでは、例えば、「ブースト」、「ノーマル」および「ソフト」の3種類から端部カーブ形状を選択することができるようになっている。ここで、「ブースト」は、白地の部分を真っ白にしたり、黒地の部分を真っ黒にしたりしてムラを除去したい場合に選択する。また、「ノーマル」は、ハイライト部分やシャドウ部分をそのまま表現する場合に選択する。また、「ソフト」は、真っ白の部分を本来の白地に戻したり、真っ黒の部分を本来の黒地に戻したりする場合に選択する。   The tone curve thus defined is displayed in the tone curve display field 134 as shown in FIG. In the tone curve display field 134, a tone curve corresponding to the adjustment result performed in the histogram display field 132 is displayed. Further, in the tone curve display field 134, the gradation outside the point T1 (shadow point) or the point T2 (highlight point) can be adjusted so that the tone curve can be finely adjusted. Specifically, the end curve shape change buttons 144A and 144B provided on the lower left portion and the upper right portion of the tone curve are clicked, and the desired end curve shape is selected from the displayed pull-down menu. It has become. Here, for example, the end curve shape can be selected from three types of “boost”, “normal”, and “soft”. Here, “boost” is selected when it is desired to remove unevenness by making the white background part white or making the black part black. “Normal” is selected when the highlight part and the shadow part are expressed as they are. “Soft” is selected when returning a pure white part to an original white background or returning a pure black part to an original black background.

また、グレーバランス調整欄136においては、グレーバランスを調整するためのスライダー145が設けられている。このスライダー145を左右に移動させることによって、グレーバランスを調整して、色かぶりを除去することができる。   In the gray balance adjustment column 136, a slider 145 for adjusting the gray balance is provided. By moving the slider 145 left and right, the gray balance can be adjusted and the color cast can be removed.

<濃度補正>
「濃度補正」は、画像の濃淡の表現を部分的に変更する際に用いる調整である。具体的には、この「濃度補正」では、トーンカーブを調整することによって、読み取った画像の見栄えの向上を図る。つまり、シャドウ(最暗部)、ミッドトーン(中間調)、ハイライト(最明部)へと変化していく濃度の曲線(トーンカーブ)を調整することで、画像全体の明るさとコントラストをバランスよく仕上げることができる。このために、濃度補正のダイアログボックス150には、図8に示すように、トーンカーブ表示部152と、このトーンカーブ表示部152に表示するトーンカーブの種類(チャンネル(色))を選択するためのチャンネル欄154が設けられている。
<Density correction>
“Density correction” is an adjustment used when the expression of the shading of an image is partially changed. Specifically, in this “density correction”, the tone curve is adjusted to improve the appearance of the read image. In other words, by adjusting the density curve (tone curve) that changes to shadow (darkest part), midtone (halftone), and highlight (brightest part), the brightness and contrast of the entire image are balanced. Can be finished. For this purpose, in the density correction dialog box 150, as shown in FIG. 8, a tone curve display unit 152 and a type of tone curve (channel (color)) to be displayed on the tone curve display unit 152 are selected. Channel column 154 is provided.

このチャンネル欄154では、RGB(レッド、グリーン、ブルー)全色、R(レッド)のみ、G(グリーン)のみ、B(ブルー)のみの4種類から選択することができる。RGB(レッド、グリーン、ブルー)全色を調整したい場合には、このチャンネル欄154の1番上のスイッチを選択すると、右側にRGB(レッド、グリーン、ブルー)全色のトーンカーブが表示される。また、R(レッド)のみを調整したい場合には、このチャンネル欄154の上から2番目のスイッチを選択すると、右側にR(レッド)のみのトーンカーブが表示される。また、G(グリーン)のみを調整したい場合には、このチャンネル欄154の上から3番目のスイッチを選択すると、右側にG(グリーン)のみのトーンカーブが表示される。また、B(ブルー)のみを調整したい場合には、このチャンネル欄154の上から4番目のスイッチを選択すると、右側にB(ブルー)のみのトーンカーブが表示される。   In this channel column 154, it is possible to select from all four colors of RGB (red, green, blue), only R (red), only G (green), and only B (blue). If you want to adjust all RGB (red, green, blue) colors, select the top switch in this channel field 154, and the tone curves for all RGB (red, green, blue) colors will be displayed on the right. . If only the R (red) is to be adjusted, the tone curve of only the R (red) is displayed on the right side when the second switch from the top of the channel field 154 is selected. If it is desired to adjust only G (green), selecting the third switch from the top of this channel field 154 displays a tone curve of only G (green) on the right side. If it is desired to adjust only B (blue), when the fourth switch from the top of the channel field 154 is selected, a tone curve of only B (blue) is displayed on the right side.

トーンカーブ表示部152には、横軸を入力値とし、縦軸を出力値としたトーンカーブが表示される。入力値に対して出力値が変化しないように設定した場合には、トーンカーブは、図中、ラインL1として示すように直線となる。   The tone curve display unit 152 displays a tone curve having the horizontal axis as an input value and the vertical axis as an output value. When the output value is set so as not to change with respect to the input value, the tone curve becomes a straight line as indicated by a line L1 in the figure.

そして、トーンカーブを調整する場合には、トーンカーブ表示部152に表示されたトーンカーブ上に任意のポイントを設定し、このポイントを上下左右の各方向にずらしながら、トーンカーブを調整する。本実施形態では、トーンカーブ表示部152に表示されたトーンカーブ上に3つのポイントP1、P2、P3を任意に設定し、これら3つのポイントP1、P2、P3をそれぞれ基準線L1より上下左右の各方向に移動させてずらす。これによって、トーンカーブ表示部152上に、ユーザが所望するトーンカーブを形成するようになっている。なお、3つのポイントP1、P2、P3の各座標については、それぞれトーンカーブ表示部152の左側に設けられた2つの数値入力欄156A、156Bを通じて設定することもできる。ここでは、上方の数値入力欄156Aに入力値を入力し、下方の数値入力欄156Bに出力値を入力することで、各ポイントP1、P2、P3の各座標について設定することができる。   When adjusting the tone curve, an arbitrary point is set on the tone curve displayed on the tone curve display unit 152, and the tone curve is adjusted while shifting this point in the vertical and horizontal directions. In the present embodiment, three points P1, P2, and P3 are arbitrarily set on the tone curve displayed on the tone curve display unit 152, and these three points P1, P2, and P3 are respectively set up, down, left, and right from the reference line L1. Move and move in each direction. As a result, a tone curve desired by the user is formed on the tone curve display portion 152. The coordinates of the three points P1, P2, and P3 can also be set through two numerical value input fields 156A and 156B provided on the left side of the tone curve display unit 152, respectively. Here, by inputting an input value in the upper numerical value input field 156A and inputting an output value in the lower numerical value input field 156B, the coordinates of each point P1, P2, and P3 can be set.

このようなトーンカーブの調整については、RGB(レッド、グリーン、ブルー)全色、R(レッド)のみ、G(グリーン)のみ、B(ブルー)のみの4種類についてそれぞれ可能である。トーンカーブの設定については、濃度補正のダイアログボックス150の上部に設けられた濃度補正設定保存欄158を通じて保存しておくことができる。   Such adjustment of the tone curve is possible for each of four types of RGB (red, green, blue), R (red) only, G (green) only, and B (blue) only. The tone curve setting can be stored through a density correction setting storage field 158 provided at the top of the density correction dialog box 150.

<イメージ調整>
「イメージ調整」には、図9のイメージ調整のダイアログボックス160に示すように、(1)明るさの調整と、(2)コントラストの調整と、(3)彩度の調整と、(4)カラーバランスの調整との4種類の調整がある。さらに、『(4)カラーバランスの調整』には、「シアン(C)−レッド(R)」の間の調整と、「マゼンダ(M)−グリーン(G)」の間の調整と、「イエロー(Y)−ブルー(B)」の間の調整との3種類の調整がある。
<Image adjustment>
As shown in the image adjustment dialog box 160 in FIG. 9, the “image adjustment” includes (1) brightness adjustment, (2) contrast adjustment, (3) saturation adjustment, and (4). There are four types of adjustments: color balance adjustments. Further, “(4) Color balance adjustment” includes an adjustment between “cyan (C) -red (R)”, an adjustment between “magenta (M) -green (G)”, and “yellow”. There are three types of adjustments, with adjustments between (Y)-Blue (B) ".

(1)明るさの調整
『(1)明るさの調整』は、画像が明る過ぎたり暗すぎたりした場合に行う。『(1)明るさの調整』は、スライダー162Aを左右に移動させたり、また、スライダー162Aの右側に設けられた数値入力欄164Aに直接、数値を入力することにより行うことができる。
(1) Brightness adjustment “(1) Brightness adjustment” is performed when an image is too bright or too dark. “(1) Brightness adjustment” can be performed by moving the slider 162A to the left or right, or by directly inputting a numerical value into the numerical value input field 164A provided on the right side of the slider 162A.

(2)コントラストの調整
『(2)コントラストの調整』は、明暗をはっきりさせたり、逆に明暗の差を小さくする場合に行う。『(2)コントラストの調整』は、スライダー162Bを左右に移動させたり、また、スライダー162Bの右側に設けられた数値入力欄164Bに直接、数値を入力することにより行うことができる。
(2) Contrast adjustment “(2) Contrast adjustment” is performed when the contrast is made clear or, on the contrary, the difference between light and dark is reduced. "(2) Contrast adjustment" can be performed by moving the slider 162B to the left or right, or by directly inputting a numerical value into the numerical value input field 164B provided on the right side of the slider 162B.

(3)彩度の調整
『(3)彩度の調整』は、色味を鮮やかにしたい場合に行う。『(3)彩度の調整』は、スライダー162Cを左右に移動させたり、また、スライダー162Cの右側に設けられた数値入力欄164Cに直接、数値を入力することにより行うことができる。
(3) Saturation adjustment “(3) Saturation adjustment” is performed when it is desired to make the color vivid. “(3) Saturation adjustment” can be performed by moving the slider 162C to the left or right, or by directly inputting a numerical value into the numerical value input field 164C provided on the right side of the slider 162C.

(4)カラーバランスの調整
『(4)カラーバランスの調整』は、画像が赤みや青み等を帯びている場合に行う。『(4)カラーバランスの調整』は、各スライダー162D、162E、162Fを左右に移動させたり、また、各スライダー162D、162E、162Fの右側にそれぞれ設けられた数値入力欄164D、164E、164Fに直接、数値を入力することにより行うことができる。これによって、画像を適切な色合いに調整することができる。具体的には、「シアン(C)−レッド(R)」の間の調整用のスライダー162Dを左右に移動させることにより、シアンおよびレッド(R)の強弱を調整することができる。また、「マゼンダ(M)−グリーン(G)」の間の調整用のスライダー162Eを左右に移動させることにより、マゼンダ(M)およびグリーン(G)の強弱を調整することができる。また、「イエロー(Y)−ブルー(B)」の間の調整用のスライダー162Fを左右に移動させることにより、イエロー(Y)およびブルー(B)の強弱を調整することができる。
(4) Color balance adjustment “(4) Color balance adjustment” is performed when the image is reddish or bluish. “(4) Color balance adjustment” is performed by moving the sliders 162D, 162E, and 162F to the left and right, and in numerical value input fields 164D, 164E, and 164F provided on the right side of the sliders 162D, 162E, and 162F, respectively. This can be done by directly entering a numerical value. As a result, the image can be adjusted to an appropriate hue. Specifically, the strength of cyan and red (R) can be adjusted by moving the adjustment slider 162D between “cyan (C) and red (R)” to the left and right. Further, the strength of magenta (M) and green (G) can be adjusted by moving the adjustment slider 162E between “magenta (M) and green (G)” to the left and right. Further, the strength of yellow (Y) and blue (B) can be adjusted by moving the adjustment slider 162F between “yellow (Y) and blue (B)” to the left and right.

ここで、『(1)明るさの調整』および『(4)カラーバランスの調整』は、レッド(R)、グリーン(G)およびブルー(B)の3色全てまたは各色について濃淡を全体的にシフトさせる変換を行う処理である。また、『(2)コントラストの調整』は、レッド(R)、グリーン(G)およびブルー(B)の3色全てについて濃淡の変化を強めたり弱めたりする変換を行う処理である。   Here, “(1) Brightness adjustment” and “(4) Color balance adjustment” are all three colors of red (R), green (G), and blue (B) or shades of each color as a whole. This is a process of performing conversion to shift. In addition, “(2) Contrast adjustment” is a process for performing conversion to increase or decrease the change in shading for all three colors of red (R), green (G), and blue (B).

一方、『(3)彩度の調整』は、例えば、次のような変換式(1)〜(3)を利用して、レッド(R)、グリーン(G)およびブルー(B)の各色のデータをそれぞれ変換する処理である。ここでは、レッド(R)、グリーン(G)およびブルー(B)の各色の入力データをそれぞれ『R』、『G』、『B』にて示している。また、レッド(R)、グリーン(G)およびブルー(B)の各色の出力データをそれぞれ『R’』、『G’』、『B’』にて示している。
R’=S11×R+S12×G+S13×B …………(1)
G’=S21×R+S22×G+S23×B …………(2)
B’=S31×R+S32×G+S33×B …………(3)
ここで、S11、S12、S13、S21、S22、S23、S31、S32、S33は、設定された彩度の値に応じて設定される係数である。そして、彩度を高める場合は、S11、S22、S33に『1』より大きな値が設定され、他方、S12、S13、S21、S23、S31、S32に負の値が設定される。このようにして『(3)彩度の調整』は、実行される。
On the other hand, “(3) Saturation adjustment” uses the following conversion formulas (1) to (3), for example, for each color of red (R), green (G), and blue (B). This is a process of converting data. Here, input data of each color of red (R), green (G), and blue (B) is indicated by “R”, “G”, and “B”, respectively. Further, output data of each color of red (R), green (G), and blue (B) are indicated by “R ′”, “G ′”, and “B ′”, respectively.
R ′ = S11 × R + S12 × G + S13 × B (1)
G ′ = S21 × R + S22 × G + S23 × B (2)
B ′ = S31 × R + S32 × G + S33 × B (3)
Here, S11, S12, S13, S21, S22, S23, S31, S32, and S33 are coefficients set according to the set saturation value. When increasing the saturation, values larger than “1” are set in S11, S22, and S33, and negative values are set in S12, S13, S21, S23, S31, and S32. In this way, “(3) Saturation adjustment” is executed.

<設定データ>
図10A〜図10Cは、これらヒストグラム調整、濃度補正、およびイメージ調整によりそれぞれ設定されたデータについて説明したものである。図10Aは、ヒストグラム調整により設定されるデータについて説明したものである。図10Bは、濃度補正により設定されるデータについて説明したものである。図10Cは、イメージ調整により設定されるデータについて説明したものである。
<Setting data>
FIG. 10A to FIG. 10C illustrate data set by the histogram adjustment, density correction, and image adjustment, respectively. FIG. 10A explains data set by histogram adjustment. FIG. 10B explains data set by density correction. FIG. 10C explains data set by image adjustment.

ヒストグラム調整の場合には、図10Aに示すように、R(レッド)、G(グリーン)およびB(ブルー)の各色のシャドウ入力値α11、α21、α31と、シャドウ出力値α13、α23、α33と、ハイライト入力値α12、α22、α32と、ハイライト出力値α14、α24、α34と、ガンマ値α15、α25、α35とがデータとして設定される。この他に、ここでは、トーンカーブの端部形状として「下端部形状」および「上端部形状」に関するデータα41、α42と、グレーバランス調整おける調整値α51とがデータとして設定される。スキャナドライバは、これらのデータα11、α21、α31、α13、α12、α22、α32、α23、α33、α14、α24、α34、α15、α25、α35、α41、α42、α51を設定データとして記憶する。なお、これらの設定データα11、α21、α31、α13、α23、α33、α12、α22、α32、α14、α24、α34、α15、α25、α35、α41、α42、α51は、例えば、図6にて説明したヒストグラム調整のダイアログボックス131を通じてユーザにより設定される場合の他に、スキャナドライバによって演算等により自動的に設定される場合がある。スキャナドライバは、記憶した設定データα11、α21、α31、α13、α23、α33、α12、α22、α32、α14、α24、α34、α15、α25、α35、α41、α42、α51に基づき、入力画像に対して画像調整を施す。   In the case of histogram adjustment, as shown in FIG. 10A, the shadow input values α11, α21, and α31 and the shadow output values α13, α23, and α33 for each color of R (red), G (green), and B (blue) Highlight input values α12, α22, α32, highlight output values α14, α24, α34, and gamma values α15, α25, α35 are set as data. In addition to this, data α41 and α42 relating to the “lower end shape” and “upper end shape” as the end shape of the tone curve and the adjustment value α51 in gray balance adjustment are set as data. The scanner driver stores these data α11, α21, α31, α13, α12, α22, α32, α23, α33, α14, α24, α34, α15, α25, α35, α41, α42, α51 as setting data. These setting data α11, α21, α31, α13, α23, α33, α12, α22, α32, α14, α24, α34, α15, α25, α35, α41, α42, α51 will be described with reference to FIG. 6, for example. In addition to being set by the user through the histogram adjustment dialog box 131, the scanner driver may be automatically set by calculation or the like. The scanner driver uses the stored setting data α11, α21, α31, α13, α23, α33, α12, α22, α32, α14, α24, α34, α15, α25, α35, α41, α42, α51 based on the input image. To adjust the image.

また、濃度補正の場合には、図10Bに示すように、R(レッド)、G(グリーン)およびB(ブルー)の各色についてそれぞれトーンカーブ上に設定された複数のポイントP1、P2、P3…………の入力座標β11、β13、β21、β23、β31、β33…………および出力座標β12、β14、β22、β24、β32、β34…………がデータとして設定される。スキャナドライバは、これらポイントP1、P2、P3…………の入力座標β11、β13、β21、β23、β31、β33…………および出力座標β12、β14、β22、β24、β32、β34…………を設定データとして記憶する。なお、これらの設定データβ11、β13、β21、β23、β31、β33…………、β12、β14、β22、β24、β32、β34…………は、例えば、図8にて説明した濃度補正のダイアログボックス150を通じてユーザにより設定される場合の他に、スキャナドライバによって演算等により自動的に設定される場合がある。スキャナドライバは、記憶した設定データβ11、β13、β21、β23、β31、β33…………、β12、β14、β22、β24、β32、β34…………に基づき、濃度補正を実行する。   In the case of density correction, as shown in FIG. 10B, a plurality of points P1, P2, P3,... Set on the tone curve for each color of R (red), G (green), and B (blue). The input coordinates β11, β13, β21, β23, β31, β33,... And the output coordinates β12, β14, β22, β24, β32, β34,. The scanner driver inputs the input coordinates β11, β13, β21, β23, β31, β33... And the output coordinates β12, β14, β22, β24, β32, β34... Of these points P1, P2, P3. Is stored as setting data. These setting data β11, β13, β21, β23, β31, β33,..., Β12, β14, β22, β24, β32, β34,. In addition to being set by the user through the dialog box 150, it may be set automatically by calculation or the like by the scanner driver. The scanner driver executes density correction based on the stored setting data β11, β13, β21, β23, β31, β33..., Β12, β14, β22, β24, β32, β34.

また、イメージ調整の場合には、図10Cに示すように、『(1)明るさの調整』の設定値γ1と、『(2)コントラストの調整』の設定値γ2と、『(3)彩度の調整』の設定値γ3と、『(4)カラーバランスの調整』の設定値γ4、γ5、γ6とが設定される。『(4)カラーバランスの調整』の設定としては、「シアン(C)−レッド(R)」の間の設定値γ4と、「マゼンダ(M)−グリーン(G)」の間の設定値γ5と、「イエロー(Y)−ブルー(B)」の間の設定値γ6との3種類ある。スキャナドライバは、これらの設定値γ1、γ2、γ3、γ4、γ5、γ6を設定データとして記憶する。なお、これらの設定データγ1、γ2、γ3、γ4、γ5、γ6は、例えば、図9にて説明したイメージ調整のダイアログボックス160を通じてユーザにより設定される場合の他に、スキャナドライバによって演算等により自動的に設定される場合がある。スキャナドライバは、記憶した設定データγ1、γ2、γ3、γ4、γ5、γ6に基づき、イメージ調整を実行する。   In the case of image adjustment, as shown in FIG. 10C, the setting value γ1 of “(1) Brightness adjustment”, the setting value γ2 of “(2) Contrast adjustment”, and “(3) Color” Setting value γ3 of “degree adjustment” and setting values γ4, γ5, and γ6 of “(4) Color balance adjustment” are set. “(4) Color balance adjustment” includes a setting value γ4 between “cyan (C) -red (R)” and a setting value γ5 between “magenta (M) -green (G)”. And a set value γ6 between “yellow (Y) -blue (B)”. The scanner driver stores these setting values γ1, γ2, γ3, γ4, γ5, and γ6 as setting data. These setting data γ1, γ2, γ3, γ4, γ5, and γ6 are set by the user through the image adjustment dialog box 160 described with reference to FIG. May be set automatically. The scanner driver performs image adjustment based on the stored setting data γ1, γ2, γ3, γ4, γ5, and γ6.

===調整手順===
これらヒストグラム調整、濃度補正およびイメージ調整により設定されたデータに基づき、入力画像、即ちここでは、画像読み取り装置10により読み取られた画像を調整する手順の一例について説明する。図11は、この手順の一例について示したものである。
=== Adjustment procedure ===
An example of a procedure for adjusting an input image, that is, an image read by the image reading apparatus 10 based on data set by the histogram adjustment, density correction, and image adjustment will be described. FIG. 11 shows an example of this procedure.

スキャナドライバは、入力画像、即ちここでは、画像読み取り装置10により読み取られた画像に対して、ヒストグラム調整を施す(S002)。このヒストグラム調整では、スキャナドライバは、R(レッド)、G(グリーン)およびB(ブルー)の各色についてそれぞれ規定されたトーンカーブに基づき、R(レッド)、G(グリーン)およびB(ブルー)の各色についてそれぞれ入力画像の各画素のデータRin、Gin、Binを変換して出力する。ここで、スキャナドライバは、図6にて説明したヒストグラム調整のダイアログボックス131を通じてユーザにより設定されたり、また自ら自動的に設定したR(レッド)、G(グリーン)およびB(ブルー)の各色のシャドウ入力値α11、α21、α31やシャドウ出力値α13、α23、α33、ハイライト入力値α12、α22、α32、ハイライト出力値α14、α24、α34、ガンマ値α15、α25、α35、またこの他にトーンカーブの端部形状のデータα41、α42、グレーバランス調整の調整値α51などを参照してこれらのデータに基づきヒストグラム調整を実行する。これにより、スキャナドライバは、入力画像の各画素のデータRin、Gin、Bin(入力データ)を出力データRout1、Gout1、Bout1に変換して出力する。   The scanner driver performs histogram adjustment on the input image, that is, the image read by the image reading device 10 here (S002). In this histogram adjustment, the scanner driver adjusts R (red), G (green), and B (blue) based on tone curves defined for R (red), G (green), and B (blue), respectively. Data Rin, Gin, Bin of each pixel of the input image is converted and output for each color. Here, the scanner driver is set by the user through the histogram adjustment dialog box 131 described with reference to FIG. 6 or automatically set for each color of R (red), G (green), and B (blue). Shadow input values α11, α21, α31, shadow output values α13, α23, α33, highlight input values α12, α22, α32, highlight output values α14, α24, α34, gamma values α15, α25, α35, and others The histogram adjustment is executed based on these data with reference to the data α41 and α42 of the end shape of the tone curve and the adjustment value α51 of the gray balance adjustment. Thus, the scanner driver converts the data Rin, Gin, Bin (input data) of each pixel of the input image into output data Rout1, Gout1, Bout1, and outputs the converted data.

このようにしてヒストグラム調整を行った後、スキャナドライバは、次にステップS004へと進み、ヒストグラム調整が施された画像のデータに対してイメージ調整を施す(S004)。ここでは、スキャナドライバは、イメージ調整として、(1)明るさの調整と、(2)コントラストの調整と、(3)カラーバランスの調整とを施す。すなわち、スキャナドライバは、『(1)明るさの調整』の設定値γ1と、『(2)コントラストの調整』の設定値γ2と、『(4)カラーバランスの調整』の設定値γ4、γ5、γ6とに基づいて、それぞれ調整を施す。これにより、スキャナドライバは、ヒストグラム調整による出力データRout1、Gout1、Bout1を出力データRout2、Gout2、Bout2に変換して出力する。   After performing the histogram adjustment in this way, the scanner driver proceeds to step S004, and performs image adjustment on the image data on which the histogram adjustment has been performed (S004). Here, the scanner driver performs (1) brightness adjustment, (2) contrast adjustment, and (3) color balance adjustment as image adjustment. That is, the scanner driver sets the setting value γ1 of “(1) Brightness adjustment”, the setting value γ2 of “(2) Contrast adjustment”, and the setting values γ4, γ5 of “(4) Color balance adjustment”. , And γ6 are adjusted respectively. As a result, the scanner driver converts the output data Rout1, Gout1, and Bout1 resulting from the histogram adjustment into output data Rout2, Gout2, and Bout2, and outputs them.

そして、このようにイメージ調整((3)彩度の調整を除く)を行った後、次に、スキャナドライバは、ステップS006へと進み、イメージ調整が施された画像のデータに対して濃度補正を施す(S006)。この濃度補正では、スキャナドライバは、R(レッド)、G(グリーン)およびB(ブルー)の各色についてそれぞれ調整されたトーンカーブに基づき、R(レッド)、G(グリーン)およびB(ブルー)の各色についてそれぞれ入力画像の各画素のデータを変換して出力する。すなわち、ここでは、スキャナドライバは、R(レッド)、G(グリーン)およびB(ブルー)の各色についてトーンカーブ上に設定された複数のポイントP1、P2、P3…………の入力座標β11、β13、β21、β23、β31、β33…………および出力座標β12、β14、β22、β24、β32、β34…………の設定データを参照して、これらの設定データに基づき形成されるトーンカーブに基づき、濃度補正を実行する。これにより、スキャナドライバは、イメージ調整((3)彩度の調整を除く)による出力データRout2、Gout2、Bout2を出力データRout3、Gout3、Bout3に変換して出力する。   Then, after performing image adjustment (excluding (3) saturation adjustment) in this way, the scanner driver proceeds to step S006, and density correction is performed on the image data subjected to image adjustment. (S006). In this density correction, the scanner driver adjusts R (red), G (green), and B (blue) based on tone curves adjusted for the respective colors R (red), G (green), and B (blue). Data of each pixel of the input image is converted and output for each color. That is, here, the scanner driver inputs the input coordinates β11 of a plurality of points P1, P2, P3,... Set on the tone curve for each color of R (red), G (green), and B (blue). Referring to the setting data of β13, β21, β23, β31, β33 ………… and output coordinates β12, β14, β22, β24, β32, β34 …………, the tone curve formed based on these setting data Based on the above, density correction is executed. As a result, the scanner driver converts the output data Rout2, Gout2, and Bout2 resulting from image adjustment (excluding (3) saturation adjustment) into output data Rout3, Gout3, and Bout3 and outputs them.

このようにして濃度補正を行った後、スキャナドライバは、次にステップS008へと進み、濃度補正が施された画像のデータに対してイメージ調整として『(3)彩度の調整』を施す(S008)。ここで、スキャナドライバは、『(3)彩度の調整』の設定値γ3に基づき、調整を施す。これにより、スキャナドライバは、濃度補正による出力データRout3、Gout3、Bout3を出力データRout4、Gout4、Bout4に変換して出力する。   After performing the density correction in this manner, the scanner driver proceeds to step S008, and performs “(3) Saturation adjustment” as image adjustment on the image data subjected to density correction ( S008). Here, the scanner driver performs adjustment based on the set value γ3 of “(3) Saturation adjustment”. As a result, the scanner driver converts the output data Rout3, Gout3, and Bout3 resulting from the density correction into output data Rout4, Gout4, and Bout4 and outputs them.

このようにしてイメージ調整として『(3)彩度の調整』を行った後、次に、スキャナドライバは、『(3)彩度の調整』が施された画像のデータに対して、色変換処理を施す(S010)。この色変換処理とは、各種出力機器(ここでは、表示装置をはじめ、各種プリンタ等)で扱う上で適切なデータに変換するための処理である。具体的には、例えば、次のような変換式(4)〜(6)により実施する。
R’=A11×R+A12×G+A13×B …………(4)
G’=A21×R+A22×G+A23×B …………(5)
B’=A31×R+A32×G+A33×B …………(6)
ここで、変換前のレッド(R)、グリーン(G)およびブルー(B)の各色の入力データをそれぞれ『R』、『G』、『B』により示している。また、変換後のレッド(R)、グリーン(G)およびブルー(B)の各色の出力データをそれぞれ『R’』、『G’』、『B’』により示している。また、A11、A12、A13、A21、A22、A23、A31、A32、A33は、各種出力機器(表示装置24やプリンタ等)の特性に応じて適宜設定される係数である。
After performing “(3) saturation adjustment” as image adjustment in this way, the scanner driver then performs color conversion on the image data that has been subjected to “(3) saturation adjustment”. Processing is performed (S010). The color conversion process is a process for converting data into data suitable for handling by various output devices (here, display devices, various printers, etc.). Specifically, for example, the following conversion formulas (4) to (6) are used.
R ′ = A11 × R + A12 × G + A13 × B (4)
G ′ = A21 × R + A22 × G + A23 × B (5)
B ′ = A31 × R + A32 × G + A33 × B (6)
Here, input data of red (R), green (G), and blue (B) before conversion are indicated by “R”, “G”, and “B”, respectively. Further, output data of each color of red (R), green (G), and blue (B) after conversion is indicated by “R ′”, “G ′”, and “B ′”, respectively. A11, A12, A13, A21, A22, A23, A31, A32, and A33 are coefficients that are appropriately set according to the characteristics of various output devices (display device 24, printer, etc.).

このようにしてスキャナドライバは、『(3)彩度の調整』が施された画像のデータに対して各種出力機器の特性に応じた色変換処理を施す。これにより、スキャナドライバは、イメージ調整((3)彩度の調整)による出力データRout4、Gout4、Bout4を出力データRout5、Gout5、Bout5に変換して出力する。そして、スキャナドライバは、このようにして色変換処理を実行した後、色変換処理が施された画像を出力画像として出力する。   In this way, the scanner driver performs color conversion processing according to the characteristics of various output devices on the image data on which “(3) saturation adjustment” has been performed. As a result, the scanner driver converts the output data Rout4, Gout4, and Bout4 by image adjustment ((3) saturation adjustment) into output data Rout5, Gout5, and Bout5 and outputs them. Then, after performing the color conversion process in this manner, the scanner driver outputs the image subjected to the color conversion process as an output image.

なお、ここでは、最終段階にて色変換処理を実行する場合を例にして説明したが、この色変換処理については必要に応じて実行するものとする。   Although the case where the color conversion process is executed at the final stage has been described as an example here, the color conversion process is executed as necessary.

===プレスキャン===
図12は、画像読み取り装置10による画像読み取り手順の一例について説明したものである。画像読み取り装置10により画像を読み取る際に、プレスキャンを実行する場合がある。このプレスキャンとは、例えば、高解像度にて画像を読み取る場合等において、最初から高解像度にて画像を読み取る動作を実行するのではなく、高解像度にて画像を読み取る動作(本スキャン)を実行する前、一度、例えば、低解像度にて画像を読み取ることをいう。
=== Pre-scan ===
FIG. 12 illustrates an example of an image reading procedure performed by the image reading apparatus 10. When an image is read by the image reading device 10, a pre-scan may be executed. For example, in the case of reading an image at a high resolution, this pre-scan does not execute an operation for reading an image at a high resolution from the beginning, but an operation for reading an image at a high resolution (main scan). For example, reading an image at a low resolution once.

プレスキャンは、同図に示すように、最初に実行される(S050)。スキャナドライバは、このプレスキャン動作によってプレスキャン画像(プレ画像)を取得する(S052)。次にスキャナドライバは、取得したプレスキャン画像(プレ画像)に対して自動調整等を施す。ここで、スキャナドライバは、取得したプレスキャン画像(プレ画像)に対して、ヒストグラム調整や濃度補正、イメージ調整等における適切な調整値等を求めて、自動的に補正する(S054)。ここで自動的に補正された画像は、例えば、表示装置24等に表示される。   As shown in the figure, the pre-scan is first executed (S050). The scanner driver acquires a pre-scan image (pre-image) by this pre-scan operation (S052). Next, the scanner driver performs automatic adjustment or the like on the acquired pre-scan image (pre-image). Here, the scanner driver obtains an appropriate adjustment value in histogram adjustment, density correction, image adjustment, and the like for the acquired pre-scan image (pre-image) and automatically corrects it (S054). The automatically corrected image is displayed on the display device 24, for example.

ユーザは、このようにして表示装置24等に表示されたプレスキャン画像(プレ画像)を見ながら、各種調整(補正)を実行する(S056)。ここでは、ユーザは、図6のヒストグラム調整のダイアログボックス131や、図8の濃度補正のダイアログボックス150、図9のイメージ調整のダイアログボックス160等を通じて各種調整(補正)を実行する。   The user performs various adjustments (corrections) while viewing the pre-scan image (pre-image) displayed on the display device 24 or the like in this way (S056). Here, the user performs various adjustments (corrections) through the histogram adjustment dialog box 131 in FIG. 6, the density correction dialog box 150 in FIG. 8, the image adjustment dialog box 160 in FIG.

このようにしてユーザにより各種調整(補正)が行われた後、本スキャンを実行する。この本スキャンでは、画像読み取り装置10によって原稿15から画像が高解像度にて読み取られる(S058)。そして、スキャナドライバは、このようにして本スキャンにより取得された高解像度の画像に対してユーザ等により設定されたデータに基づき、ヒストグラム調整や濃度補正、イメージ調整等の各種調整(補正)を実行する。これにより、各種調整(補正)が施された本画像を取得する(S060)。   After various adjustments (corrections) are made by the user in this way, the main scan is executed. In this main scan, the image is read from the document 15 with high resolution by the image reading device 10 (S058). The scanner driver performs various adjustments (corrections) such as histogram adjustment, density correction, and image adjustment based on the data set by the user or the like for the high-resolution image acquired by the main scan in this way. To do. Thereby, the main image subjected to various adjustments (corrections) is acquired (S060).

===従来の問題点及び解決方法===
<従来の問題点>
これらヒストグラム調整や濃度補正、イメージ調整等によって、画像読み取り装置により読み取った画像に対して各種調整(補正)が自動的に行われた場合であっても、逆光画像を十分に調整(補正)することはきわめて難しかった。このため、逆光画像に対して十分な改善を施すことができなかった。また、これらヒストグラム調整や濃度補正、イメージ調整等を通じてユーザが逆光画像に対して調整(補正)を施すのはきわめて難しかった。このようなことから、逆光画像に対しても十分な調整(補正)を施すことができるようにするために、逆光画像の補正機能を備える必要がある。
=== Conventional Problems and Solutions ===
<Conventional problems>
Even when various adjustments (corrections) are automatically performed on the image read by the image reading device by histogram adjustment, density correction, image adjustment, etc., the backlight image is sufficiently adjusted (corrected). It was very difficult. For this reason, it was not possible to sufficiently improve the backlight image. Further, it has been extremely difficult for the user to adjust (correct) the backlight image through histogram adjustment, density correction, image adjustment, and the like. For this reason, it is necessary to provide a backlight image correction function so that sufficient adjustment (correction) can be performed on the backlight image.

しかし、逆光画像の補正機能を実行する場合には、判定対象となる画像が逆光画像であるか否かを判定することが行われている。従来から行われている逆光画像か否かの判定方法には、対象となる画像について逆光画像であるか否かを適切に判定することができない場合があった。このため、逆光画像ではない画像に対して逆光補正処理を施してしまう虞があった。   However, when the backlight image correction function is executed, it is determined whether or not the image to be determined is a backlight image. Conventional methods for determining whether or not the image is a backlight image sometimes cannot appropriately determine whether or not the target image is a backlight image. For this reason, there is a possibility that the backlight correction process may be performed on an image that is not a backlight image.

<解決方法>
そこで、本実施形態では、対象となる画像について逆光画像であるか否かを判定せずに、その画像に対して逆光補正処理を施す方法を提案する。ここでは、次のようにして逆光補正処理を実行する。以下にここで行われる逆光補正処理について詳しく説明する。
<Solution>
Therefore, in the present embodiment, a method is proposed in which backlight correction processing is performed on an image to be processed without determining whether the image is a backlight image. Here, the backlight correction process is executed as follows. The backlight correction process performed here will be described in detail below.

===逆光補正処理手順===
本実施形態では、図5にて説明したユーザインターフェイスのメインのダイアログボックス100において「逆光補正のチェックボックス130E」がユーザによりチェックされたときに、スキャナドライバは、画像読み取り装置10により読み取った画像に対して逆光補正処理を施す。なお、ここで、スキャナドライバが逆光補正処理を施す画像は、前述したヒストグラム調整や濃度補正、イメージ調整等によって自動的にまたはユーザにより調整(補正)が行われた画像である。本実施形態では、スキャナドライバは、画像読み取り装置10により読み取った画像が逆光画像か否かに関わらず、画像読み取り装置10により読み取った画像に対して逆光補正処理を施す。このように画像読み取り装置10により読み取った画像に対して逆光補正処理を施すスキャナドライバが実行されるコンピュータ装置20は、「逆光画像補正装置」に相当する。
=== Backlight Correction Processing Procedure ===
In the present embodiment, when the “backlight correction check box 130 </ b> E” is checked by the user in the main dialog box 100 of the user interface described with reference to FIG. 5, the scanner driver displays an image read by the image reading device 10. On the other hand, backlight correction processing is performed. Here, the image on which the scanner driver performs the backlight correction processing is an image that has been adjusted (corrected) automatically or by the user by the above-described histogram adjustment, density correction, image adjustment, or the like. In the present embodiment, the scanner driver performs backlight correction processing on the image read by the image reading device 10 regardless of whether the image read by the image reading device 10 is a backlight image or not. The computer device 20 in which the scanner driver that performs the backlight correction process on the image read by the image reading device 10 is executed corresponds to a “backlight image correction device”.

図13は、ここで実施される逆光画像の補正方法について説明したものである。この補正方法において、スキャナドライバは、まず、画像読み取り装置10により読み取った画像のデータに基づき、ヒストグラムのデータを生成する(S102)。なお、このことから、スキャナドライバは、「ヒストグラムデータ生成部」に相当する。ここで生成されるヒストグラムとは、画像読み取り装置10により読み取った画像を構成する各画素の濃度値に対する画素の数の分布を表したグラフである。ヒストグラムの横軸には、画素の濃度値が設定され、またヒストグラムの縦軸には、画素の数が設定される。このヒストグラムには、グラフの横軸の濃度値ごとにそれぞれ画素の数を表す長方形状の棒グラフ等が形成される。ここで形成される棒グラフ等が横方向に相互につなぎ合わされて、全体がある形状を持つ領域を有するグラフを形成している。   FIG. 13 illustrates a backlight image correction method performed here. In this correction method, the scanner driver first generates histogram data based on image data read by the image reading device 10 (S102). From this, the scanner driver corresponds to a “histogram data generation unit”. The histogram generated here is a graph representing the distribution of the number of pixels with respect to the density value of each pixel constituting the image read by the image reading device 10. On the horizontal axis of the histogram, the density value of the pixel is set, and on the vertical axis of the histogram, the number of pixels is set. In this histogram, a rectangular bar graph representing the number of pixels for each density value on the horizontal axis of the graph is formed. The bar graphs and the like formed here are connected to each other in the horizontal direction to form a graph having an area having a certain shape as a whole.

スキャナドライバは、このようにしてヒストグラムのデータを生成した後、次に、生成したヒストグラムのデータに基づき、ヒストグラムにより表される領域を画素の濃度値の大きさ別に2つ以上の小領域に区分する(S104)。ここで区分される小領域の個数は、3つであっても良く、もちろん4つ以上であっても構わない。また、ここで区分される小領域の面積は、相互にほぼ等しくなるように設定されていても良く、また相互に等しくないように設定されていても良い。また、区分された2つ以上の小領域の中の一部の小領域が、面積が相互にほぼ等しくなるように設定されていても良い。また、ここで区分される小領域における画素の数は、相互にほぼ等しくなるように設定されていても良く、また相互に等しくならないように設定されていても良い。また、区分された2つ以上の小領域の中の一部の小領域が、画素の数が相互にほぼ等しくなるように設定されていても良い。   After generating the histogram data in this manner, the scanner driver then divides the area represented by the histogram into two or more small areas according to the density value of the pixel based on the generated histogram data. (S104). Here, the number of small areas to be divided may be three, or may be four or more. Further, the areas of the small regions divided here may be set to be substantially equal to each other, or may be set to be not equal to each other. Further, some of the two or more divided small regions may be set so that their areas are substantially equal to each other. In addition, the number of pixels in the small area divided here may be set to be substantially equal to each other, or may be set to be not equal to each other. Further, some of the two or more divided small regions may be set so that the number of pixels is substantially equal to each other.

スキャナドライバは、このようにしてヒストグラムにより表される領域を2つ以上の小領域に区分した後、次に、区分した2つ以上の小領域の中から少なくとも1つの小領域を選出する(S106)。ここでスキャナドライバが選出する小領域は、2つであってもよく、また3つ以上であっても構わない。もちろん、ここでスキャナドライバは、全ての小領域を選出しても構わない。なお、ここでスキャナドライバにより選出される小領域としては、画像読み取り装置10により読み取った画像に対してスキャナドライバが逆光補正処理を施すにあたって必要な情報を取り出すことができる小領域が望ましい。   The scanner driver divides the area represented by the histogram into two or more small areas in this way, and then selects at least one small area from the divided two or more small areas (S106). ). Here, the small area selected by the scanner driver may be two, or may be three or more. Of course, the scanner driver may select all the small areas here. Here, the small area selected by the scanner driver is preferably a small area from which information necessary for the scanner driver to perform backlight correction processing on the image read by the image reading apparatus 10 can be extracted.

このようにしてヒストグラムにより表される領域を区分して得られた2つ以上の小領域の中から少なくとも1つの小領域を選出した後、スキャナドライバは、次に、選出した小領域から属性情報を取得する(S108)。なお、ここでスキャナドライバは、「属性情報取得部」に相当する。   After selecting at least one small area from the two or more small areas obtained by dividing the area represented by the histogram in this way, the scanner driver then selects attribute information from the selected small area. Is acquired (S108). Here, the scanner driver corresponds to an “attribute information acquisition unit”.

ここでスキャナドライバが取得する属性情報とは、スキャナドライバが選出した小領域が持っている性質や特徴に関する情報のことである。ここでスキャナドライバが取得する属性情報としては、例えば、スキャナドライバが選出した小領域を占める画素の濃度値の平均値や、スキャナドライバが選出した小領域を占める画素の濃度値の上限値または下限値、さらに、スキャナドライバが選出した小領域に隣接する小領域との間の境界線に対応する濃度値、この他に、スキャナドライバが選出した小領域の面積の大きさ等、様々な属性情報がある。スキャナドライバは、これらの各種属性情報の中から少なくとも1種類の属性情報を取得する。すなわち、スキャナドライバは、これらの各種属性情報の中から1種類の属性情報を取得しても良く、また複数種類の属性情報を取得しても良い。   Here, the attribute information acquired by the scanner driver is information on the properties and characteristics of the small area selected by the scanner driver. Here, as the attribute information acquired by the scanner driver, for example, the average value of the density values of the pixels occupying the small area selected by the scanner driver, or the upper limit value or the lower limit of the density value of the pixels occupying the small area selected by the scanner driver. In addition, various attribute information such as the density value corresponding to the boundary line between the small area adjacent to the small area selected by the scanner driver and the area size of the small area selected by the scanner driver. There is. The scanner driver acquires at least one type of attribute information from these various attribute information. That is, the scanner driver may acquire one type of attribute information from these various types of attribute information, or may acquire a plurality of types of attribute information.

スキャナドライバは、ヒストグラムにより表される領域を区分して得られた2つ以上の小領域の中から選出した小領域についてそれぞれ個別に属性情報を取得してもよく、また選出した小領域の中の2つ以上の小領域に関する属性情報を取得してもよい。このようにしてスキャナドライバは、画像読み取り装置10により読み取った画像に対してスキャナドライバが逆光補正処理を施すために必要な情報を取得する。   The scanner driver may individually acquire attribute information for each of the small areas selected from the two or more small areas obtained by dividing the area represented by the histogram. Attribute information regarding two or more small regions may be acquired. In this way, the scanner driver acquires information necessary for the scanner driver to perform backlight correction processing on the image read by the image reading device 10.

このようにしてヒストグラムにより表される領域を区分して得られた2つ以上の小領域の中から選出した小領域について属性情報を取得した後、スキャナドライバは、次に、取得した属性情報に基づき、対象となる画像に対して逆光補正処理を施すための補正情報を生成する(S110)。なお、ここでスキャナドライバは、「補正情報生成部」に相当する。この補正情報とは、スキャナドライバが、画像読み取り装置10により読み取った画像に対して逆光補正処理を施す際に基礎となる情報である。スキャナドライバは、この補正情報に基づき、画像読み取り装置10により読み取った画像に対して逆光補正処理を施す。つまり、この補正情報は、スキャナドライバが、画像読み取り装置10により読み取った画像に対して施す逆光補正処理の設定データとなる。   After acquiring the attribute information for the small area selected from the two or more small areas obtained by dividing the area represented by the histogram in this way, the scanner driver next displays the acquired attribute information. Based on this, the correction information for performing the backlight correction process on the target image is generated (S110). Here, the scanner driver corresponds to a “correction information generation unit”. The correction information is information that is fundamental when the scanner driver performs a backlight correction process on an image read by the image reading device 10. Based on the correction information, the scanner driver performs backlight correction processing on the image read by the image reading device 10. That is, this correction information becomes setting data for backlight correction processing that the scanner driver performs on the image read by the image reading device 10.

ここで、スキャナドライバは、画像読み取り装置10により読み取った画像に対して施す逆光補正処理に応じた補正情報を生成する。具体的には、例えば、スキャナドライバが実行する逆光補正処理が、前述した「濃度補正」である場合には、「濃度補正」におけるトーンカーブを調整するために任意のポイントを設定するための設定情報を補正情報として生成する。   Here, the scanner driver generates correction information corresponding to the backlight correction process performed on the image read by the image reading device 10. Specifically, for example, when the backlight correction process executed by the scanner driver is the above-described “density correction”, a setting for setting an arbitrary point to adjust the tone curve in “density correction” Information is generated as correction information.

また、スキャナドライバが取得した属性情報に基づき補正情報を生成する方法としては、様々な方法がある。具体的には、例えば、スキャナドライバが補正情報を生成するにあたっては、選出した小領域から輝度に関する情報を取得して、その輝度に関する情報に基づき、補正情報を生成する方法がある。このように選出した小領域から輝度に関する情報を取得すれば、より適切な逆光補正処理を施すことができる。この輝度に関する情報を取得する方法としては、レッド(R)、グリーン(G)およびブルー(B)の各色の濃度値から簡単に取得することができる。   There are various methods for generating correction information based on attribute information acquired by the scanner driver. Specifically, for example, when the correction information is generated by the scanner driver, there is a method of acquiring correction information from a selected small area and generating correction information based on the information regarding the luminance. If information on luminance is acquired from the selected small area in this way, more appropriate backlight correction processing can be performed. As a method for acquiring information on the luminance, it is possible to easily acquire from the density values of the colors of red (R), green (G), and blue (B).

そして、スキャナドライバは、このようにして逆光補正処理を施すための補正情報を生成した後、次に、生成した補正情報に基づき逆光補正処理を実行する(S112)。なお、ここでスキャナドライバは、「逆光補正処理部」に相当する。ここでスキャナドライバが実行する逆光補正処理としては、前述した「濃度補正」をはじめ、様々な補正処理を採用することができる。ここで行われる逆光補正処理にあっては、既にヒストグラム調整や濃度補正、イメージ調整等の各種調整(補正)が施された画像に対して施されてもよく、また、画像読み取り装置10により読み取られた画像に対して直接施してもよい。また、画像読み取り装置10により読み取られた画像に対して既に実施されている各種調整(補正)のパラメータを変更することによって逆光補正処理を行っても良い。   The scanner driver generates the correction information for performing the backlight correction process in this manner, and then executes the backlight correction process based on the generated correction information (S112). Here, the scanner driver corresponds to a “backlight correction processing unit”. Here, as the backlight correction process executed by the scanner driver, various correction processes such as the above-described “density correction” can be employed. The backlight correction processing performed here may be performed on an image that has already been subjected to various adjustments (correction) such as histogram adjustment, density correction, and image adjustment, and may be read by the image reading device 10. The image may be directly applied to the obtained image. Further, the backlight correction process may be performed by changing parameters of various adjustments (corrections) already performed on the image read by the image reading apparatus 10.

このようにしてスキャナドライバは、画像読み取り装置10により読み取られた画像に対して逆光補正処理を施す。そして、その後、速やかに処理を終了する。   In this manner, the scanner driver performs backlight correction processing on the image read by the image reading device 10. Then, the process is immediately terminated.

なお、これらのことから、このスキャナドライバは、「逆光画像補正プログラム」に相当する。   From these facts, this scanner driver corresponds to a “backlight image correction program”.

===実際の逆光画像の補正===
<ヒストグラムの生成>
図14は、スキャナドライバにより生成されるヒストグラムの一例について説明したものである。このヒストグラムは、その横軸に画素の濃度値が設定され、またその縦軸に画素の数が設定されている。そして、このヒストグラムでは、グラフの横軸の濃度値ごとにそれぞれ画素の数を表す長方形状の棒グラフが形成され、これら棒グラフが横方向に相互につなぎ合わされて、全体がある形状を持つ領域を有するグラフを形成している。このヒストグラムから、濃度値別に画素の分布状況が把握することができる。
=== Correction of actual backlight image ===
<Generation of histogram>
FIG. 14 illustrates an example of a histogram generated by the scanner driver. In the histogram, the density value of the pixel is set on the horizontal axis, and the number of pixels is set on the vertical axis. In this histogram, a rectangular bar graph representing the number of pixels is formed for each density value on the horizontal axis of the graph, and these bar graphs are connected to each other in the horizontal direction to have a region having a certain shape as a whole. A graph is formed. From this histogram, the distribution status of the pixels can be grasped for each density value.

本実施形態では、画像読み取り装置10により読み取られた画像を構成する各画素のデータが、レッド(R)、グリーン(G)およびブルー(B)の3色の濃度値のデータにより構成されている。このため、本実施形態では、ヒストグラムがレッド(R)、グリーン(G)およびブルー(B)の各色別に生成される。すなわち、画像を構成する各画素のレッド(R)の濃度値に基づき生成されたヒストグラムと、画像を構成する各画素のグリーン(G)の濃度値に基づき生成されたヒストグラムと、画像を構成する各画素のブルー(B)の濃度値に基づき生成されたヒストグラムとの3種類のヒストグラムが生成される。スキャナドライバは、このようにして生成したレッド(R)、グリーン(G)およびブルー(B)の3色のヒストグラムのデータに基づき、画像読み取り装置10により読み取られた画像に対して逆光補正処理を施す。   In the present embodiment, the data of each pixel constituting the image read by the image reading device 10 is constituted by data of density values of three colors of red (R), green (G), and blue (B). . Therefore, in this embodiment, a histogram is generated for each color of red (R), green (G), and blue (B). That is, an image is formed with a histogram generated based on the red (R) density value of each pixel constituting the image, and a histogram generated based on the green (G) density value of each pixel constituting the image. Three types of histograms are generated: a histogram generated based on the blue (B) density value of each pixel. The scanner driver performs backlight correction processing on the image read by the image reading device 10 based on the histogram data of the three colors red (R), green (G), and blue (B) generated in this way. Apply.

<小領域への区分>
このようにしてレッド(R)、グリーン(G)およびブルー(B)の3色のヒストグラムのデータを生成した後、スキャナドライバは、次に、これら3色のヒストグラムのデータに基づき、各色のヒストグラムにより表される領域をそれぞれ2つ以上の小領域に区分する処理を実行する。ここで、スキャナドライバは、各色のヒストグラムにより表される領域を濃度値の大きさ別に区分する。これにより、2つ以上の小領域は、例えば、図14に示すように、各色のヒストグラムの縦軸の方向に沿ってある濃度値に対応して設けられた境界ラインによって区分され、各色のヒストグラムの横軸の方向に沿って並んで配置される。ここでは、3色のヒストグラムにより表される領域をそれぞれ4つの小領域Ry1、Ry2、Ry3、Ry4に区分した場合を例にして説明する。
<Division into small areas>
After generating the histogram data of the three colors of red (R), green (G), and blue (B) in this way, the scanner driver next generates the histogram of each color based on the data of the histogram of these three colors. A process for dividing each area represented by the above into two or more small areas is executed. Here, the scanner driver classifies the region represented by the histogram of each color according to the density value. Accordingly, two or more small regions are divided by boundary lines provided corresponding to certain density values along the direction of the vertical axis of the histogram of each color, as shown in FIG. 14, for example. Are arranged side by side along the direction of the horizontal axis. Here, an example will be described in which a region represented by a three-color histogram is divided into four small regions Ry1, Ry2, Ry3, and Ry4.

本実施形態では、スキャナドライバは、レッド(R)、グリーン(G)およびブルー(B)の3色のヒストグラムにより表される領域を、図14に示すように、それぞれ4つの小領域Ry1、Ry2、Ry3、Ry4に区分する。ここで、小領域Ry1を『第1小領域』という。また、小領域Ry2を『第2小領域』という。また、小領域Ry3を『第3小領域』という。また、小領域Ry4を『第4小領域』という。ここで区分された4つの小領域、即ち第1〜第4小領域Ry1、Ry2、Ry3、Ry4のうち、第1〜第3小領域Ry1、Ry2、Ry3は、相互に面積がほぼ等しくなるように設定されている。つまり、これら第1〜第3小領域Ry1、Ry2、Ry3は、相互に画素の数がほぼ等しくなっている。   In this embodiment, the scanner driver divides the regions represented by the histograms of three colors of red (R), green (G), and blue (B) into four small regions Ry1 and Ry2 as shown in FIG. , Ry3 and Ry4. Here, the small area Ry1 is referred to as a “first small area”. The small area Ry2 is referred to as a “second small area”. The small area Ry3 is referred to as a “third small area”. The small area Ry4 is referred to as a “fourth small area”. Of the four subregions divided here, that is, the first to fourth subregions Ry1, Ry2, Ry3, and Ry4, the first to third subregions Ry1, Ry2, and Ry3 have substantially the same area. Is set to That is, the first to third small regions Ry1, Ry2, and Ry3 have substantially the same number of pixels.

ここでは、これら第1〜第3小領域Ry1、Ry2、Ry3の面積がそれぞれ画像を構成する画素の総数に対してほぼ33%ずつ占めるようになっている。すなわち、第1小領域Ry1は、濃度値が最も小さい側に位置しているから、判定対象となる画像を構成する画素のうち、濃度値が小さい画素から順に、「0〜33%」分の画素により形成されている。また、第2小領域Ry2は、第1小領域Ry1に次いで2番目に濃度値が小さい側に位置しているから、判定対象となる画像を構成する画素のうち、第1小領域Ry1に含まれる画素の次の画素から順に、「34〜66%」分の画素により形成されている。また、第3小領域Ry3は、第2小領域Ry2に次いで3番目に濃度値が小さい側に位置しているから、判定対象となる画像を構成する画素のうち、第2小領域Ry2に含まれる画素の次の画素から順に、「67〜99%」分の画素により形成されている。   Here, the areas of the first to third small regions Ry1, Ry2, and Ry3 each occupy approximately 33% of the total number of pixels constituting the image. That is, since the first small region Ry1 is located on the side where the density value is the smallest, among the pixels constituting the image to be determined, the pixels corresponding to “0 to 33%” in order from the pixel having the smallest density value. It is formed of pixels. Further, since the second small region Ry2 is located on the side having the second smallest density value after the first small region Ry1, the second small region Ry2 is included in the first small region Ry1 among the pixels constituting the image to be determined. The pixels are formed from “34 to 66%” pixels in order from the next pixel to the next pixel. Further, since the third small region Ry3 is located on the side having the third smallest density value after the second small region Ry2, the third small region Ry3 is included in the second small region Ry2 among the pixels constituting the image to be determined. The pixels are formed by “67 to 99%” pixels in order from the next pixel to the next pixel.

一方、第4小領域Ry4は、第1〜第3小領域Ry1、Ry2、Ry3とは、占める面積(画素数)が異なるように設定されている。ここでは、第4小領域Ry4は、第3小領域Ry3に次いで4番目に濃度値が小さい側に位置し、かつ濃度値が最も大きい側に位置している。   On the other hand, the fourth small region Ry4 is set to have a different area (number of pixels) from the first to third small regions Ry1, Ry2, and Ry3. Here, the fourth small region Ry4 is located on the side with the fourth smallest density value next to the third small region Ry3 and on the side with the largest density value.

<小領域の選出>
このようにしてレッド(R)、グリーン(G)およびブルー(B)の3色のヒストグラムにより表される領域をそれぞれ4つの小領域、即ち第1〜第4小領域Ry1、Ry2、Ry3、Ry4に区分した後、スキャナドライバは、次に、これら4つの小領域、即ち第1〜第4小領域Ry1、Ry2、Ry3、Ry4の中から少なくとも1つの小領域を属性情報を取得するために選出する。本実施形態では、第1〜第4小領域Ry1、Ry2、Ry3、Ry4の中から3つの小領域(第1〜第3小領域)Ry1、Ry2、Ry3を選出する。ここで、3つの小領域(第1〜第3小領域)Ry1、Ry2、Ry3の選出は、各色別に行われる。すなわち、レッド(R)、グリーン(G)およびブルー(B)の各色のヒストグラムからそれぞれ第1〜第3小領域Ry1、Ry2、Ry3を選出する。
<Selection of small areas>
In this way, the regions represented by the three color histograms of red (R), green (G), and blue (B) are each divided into four small regions, that is, the first to fourth small regions Ry1, Ry2, Ry3, Ry4. Then, the scanner driver selects at least one of the four subregions, that is, the first to fourth subregions Ry1, Ry2, Ry3, and Ry4, in order to obtain attribute information. To do. In the present embodiment, three small regions (first to third small regions) Ry1, Ry2, Ry3 are selected from the first to fourth small regions Ry1, Ry2, Ry3, Ry4. Here, the selection of the three small regions (first to third small regions) Ry1, Ry2, and Ry3 is performed for each color. That is, the first to third small regions Ry1, Ry2, and Ry3 are selected from the histograms of red (R), green (G), and blue (B) colors, respectively.

<属性情報の取得>
このようにして第1〜第4小領域Ry1、Ry2、Ry3、Ry4の中から3つの小領域、即ち第1〜第3小領域Ry1、Ry2、Ry3を属性情報を取得するために各色別に選出した後、スキャナドライバは、次に、これら選出した第1〜第3小領域Ry1、Ry2、Ry3についてそれぞれ属性情報を取得する。ここで、スキャナドライバは、選出した第1〜第3小領域Ry1、Ry2、Ry3についてそれぞれ各色別に属性情報を取得する。なお、属性情報とは、選出された第1〜第3小領域Ry1、Ry2、Ry3がそれぞれ持っている性質や特徴に関する情報のことである。具体的には、選出された第1〜第3小領域Ry1、Ry2、Ry3を占める画素の濃度値の平均値や、選出された第1〜第3小領域Ry1、Ry2、Ry3を占める画素の濃度値の上限値または下限値、さらに、選出された第1〜第3小領域Ry1、Ry2、Ry3に隣接する小領域との間の境界線に対応する濃度値、この他に、選出された第1〜第3小領域Ry1、Ry2、Ry3の面積の大きさ等がある。
<Acquisition of attribute information>
In this way, three small areas, ie, the first to third small areas Ry1, Ry2, and Ry3 are selected from the first to fourth small areas Ry1, Ry2, Ry3, and Ry4 for each color in order to obtain attribute information. After that, the scanner driver next acquires attribute information for each of the selected first to third small regions Ry1, Ry2, and Ry3. Here, the scanner driver acquires attribute information for each of the selected first to third small areas Ry1, Ry2, and Ry3. The attribute information is information on the properties and characteristics of the selected first to third small regions Ry1, Ry2, and Ry3. Specifically, the average value of the density values of the pixels occupying the selected first to third small regions Ry1, Ry2, Ry3, and the pixels occupying the selected first to third small regions Ry1, Ry2, Ry3. In addition to the upper limit value or lower limit value of the density value, the density value corresponding to the boundary line between the selected first to third small areas Ry1, Ry2, and Ry3 and other small areas is selected. For example, the first to third small regions Ry1, Ry2, and Ry3 have an area size.

本実施形態では、選出した第1〜第3小領域Ry1、Ry2、Ry3に関する属性情報として、これら第1〜第3小領域Ry1、Ry2、Ry3を占める画素の濃度値の平均値AV1、AV2、AV3を各色につき取得する。なお、第1小領域Ry1を占める画素の濃度値の平均値を『AV1』とする。また、第2小領域Ry2を占める画素の濃度値の平均値を『AV2』とする。また、第3小領域Ry3を占める画素の濃度値の平均値を『AV3』とする。これら平均値AV1、AV2、AV3は、その小領域を占める画素の濃度値の合計値をその小領域を占める画素の数にて除算することにより求めることができる。   In the present embodiment, as attribute information regarding the selected first to third small regions Ry1, Ry2, and Ry3, average values AV1, AV2, and the average values AV1, AV2, and the like of the pixel values that occupy these first to third small regions Ry1, Ry2, Ry3, Acquire AV3 for each color. The average value of the density values of the pixels occupying the first small area Ry1 is “AV1”. Further, the average value of the density values of the pixels occupying the second small area Ry2 is “AV2”. The average value of the density values of the pixels occupying the third small region Ry3 is “AV3”. These average values AV1, AV2, and AV3 can be obtained by dividing the total value of the density values of the pixels that occupy the small area by the number of pixels that occupy the small area.

ここで、レッド(R)のヒストグラムの第1〜第3小領域Ry1、Ry2、Ry3を占める画素の濃度値の平均値をそれぞれ『AVr1』、『AVr2』、『AVr3』とする。また、グリーン(G)のヒストグラムの第1〜第3小領域Ry1、Ry2、Ry3を占める画素の濃度値の平均値をそれぞれ『AVg1』、『AVg2』、『AVg3』とする。また、ブルー(B)のヒストグラムの第1〜第3小領域Ry1、Ry2、Ry3を占める画素の濃度値の平均値をそれぞれ『AVb1』、『AVb2』、『AVb3』とする。   Here, the average values of the density values of the pixels occupying the first to third small regions Ry1, Ry2, and Ry3 of the red (R) histogram are “AVr1”, “AVr2”, and “AVr3”, respectively. Also, the average values of the density values of the pixels occupying the first to third small regions Ry1, Ry2, and Ry3 of the green (G) histogram are “AVg1”, “AVg2”, and “AVg3”, respectively. The average values of the density values of the pixels occupying the first to third small regions Ry1, Ry2, and Ry3 of the blue (B) histogram are “AVb1,” “AVb2,” and “AVb3,” respectively.

<補正情報の生成>
このようにしてレッド(R)、グリーン(G)およびブルー(B)の3色のヒストグラムにより表される領域をそれぞれ4つの小領域、即ち第1〜第4小領域Ry1、Ry2、Ry3、Ry4に区分して、その中から3つの小領域、即ち第1〜第3小領域Ry1、Ry2、Ry3を選出して、これら第1〜第3小領域Ry1、Ry2、Ry3について属性情報として、これら第1〜第3小領域Ry1、Ry2、Ry3を占める画素の濃度値の平均値AVr1、AVr2、AVr3、AVg1、AVg2、AVg3、AVb1、AVb2、AVb3を取得した後、スキャナドライバは、次に、ここで取得した第1〜第3小領域Ry1、Ry2、Ry3の各色の平均値AVr1、AVr2、AVr3、AVg1、AVg2、AVg3、AVb1、AVb2、AVb3に基づき、画像読み取り装置10により読み取った画像に対して逆光補正処理を施すための補正情報を生成する。以下に本実施形態における補正情報の生成方法について説明する。
<Generation of correction information>
In this way, the regions represented by the three color histograms of red (R), green (G), and blue (B) are each divided into four small regions, that is, the first to fourth small regions Ry1, Ry2, Ry3, Ry4. The three subregions, that is, the first to third subregions Ry1, Ry2, and Ry3 are selected from them, and these first to third subregions Ry1, Ry2, and Ry3 are used as attribute information. After obtaining the average value AVr1, AVr2, AVr3, AVg1, AVg2, AVg3, AVb1, AVb2, AVb3 of the density values of the pixels occupying the first to third small regions Ry1, Ry2, Ry3, Based on the average values AVr1, AVr2, AVr3, AVg1, AVg2, AVg3, AVb1, AVb2, AVb3 of the respective colors of the first to third small regions Ry1, Ry2, Ry3 obtained here, the image reading device 1 Correction information for performing a backlight correction process on the image read by 0 is generated. Hereinafter, a correction information generation method according to the present embodiment will be described.

(1)輝度に関する情報の取得
本実施形態では、レッド(R)、グリーン(G)およびブルー(B)の3色のヒストグラムから得られた第1〜第3小領域Ry1、Ry2、Ry3を占める画素の各色別の濃度値の平均値AVr1、AVr2、AVr3、AVg1、AVg2、AVg3、AVb1、AVb2、AVb3に基づき、スキャナドライバは、第1〜第3小領域Ry1、Ry2、Ry3についてそれぞれ各領域Ry1、Ry2、Ry3を占める画素の輝度の平均値Yav1、Yav2、Yav3を取得する。ここで、スキャナドライバは、例えば、次の式(7)〜(9)等を用いることによって、第1〜第3小領域Ry1、Ry2、Ry3を占める画素の輝度の平均値Yav1、Yav2、Yav3を取得する。
Yav1=1/5×AVr1+3/5×AVg1+1/5×AVb1 ………(7)
Yav2=1/5×AVr2+3/5×AVg2+1/5×AVb2 ………(8)
Yav3=1/5×AVr3+3/5×AVg3+1/5×AVb3 ………(9)
なお、ここでは、式(7)〜(9)について、レッド(R)、グリーン(G)およびブルー(B)の各色の比率が、「1:3:1」の場合を例にして示したが、これ以外の比率に設定されても良い。
スキャナドライバは、これらの式(7)〜(9)等を利用して、第1〜第3小領域Ry1、Ry2、Ry3を占める画素の輝度の平均値Yav1、Yav2、Yav3を取得する。
(1) Acquisition of information about luminance In this embodiment, the first to third small regions Ry1, Ry2, and Ry3 obtained from the histograms of three colors of red (R), green (G), and blue (B) are occupied. Based on the average value AVr1, AVr2, AVr3, AVg1, AVg2, AVg3, AVb1, AVb2, AVb3 of the density value for each color of the pixel, the scanner driver performs each of the first to third small regions Ry1, Ry2, Ry3. Average values Yav1, Yav2, and Yav3 of the luminance of the pixels occupying Ry1, Ry2, and Ry3 are acquired. Here, the scanner driver uses, for example, the following formulas (7) to (9), and the like, thereby calculating average luminance values Yav1, Yav2, and Yav3 of the pixels that occupy the first to third small regions Ry1, Ry2, and Ry3 To get.
Yav1 = 1/5 × AVr1 + 3/5 × AVg1 + 1/5 × AVb1 (7)
Yav2 = 1/5 × AVr 2 + 3/5 × AVg 2 + 1/5 × AVb 2 (8)
Yav3 = 1/5 × AVr3 + 3/5 × AVg3 + 1/5 × AVb3 (9)
Here, in the formulas (7) to (9), the ratio of each color of red (R), green (G) and blue (B) is “1: 3: 1” as an example. However, other ratios may be set.
The scanner driver obtains average values Yav1, Yav2, and Yav3 of the luminance of the pixels that occupy the first to third small regions Ry1, Ry2, and Ry3 using these equations (7) to (9).

そして、さらに、スキャナドライバは、このようにして取得した第1〜第3小領域Ry1、Ry2、Ry3を占める画素の輝度の平均値Yav1、Yav2、Yav3から、画像読み取り装置10により読み取った画像の全体の輝度の平均値Yav0を求める。本実施形態では、第1〜第3小領域Ry1、Ry2、Ry3が、画像全体の99%を占めていることから、第1〜第3小領域Ry1、Ry2、Ry3にそれぞれ対応する輝度の平均値Yav1、Yav2、Yav3の平均値を画像の全体の輝度の平均値Yav0とする。したがって、本実施形態では、画像読み取り装置10により読み取った画像の全体の輝度の平均値Yav0は、例えば、次の式(10)により求めることができる。
Yav0=(Yav1+Yav2+Yav3)/3 …………(10)
このようにしてスキャナドライバは、画像読み取り装置10により読み取った画像の全体の輝度の平均値Yav0を取得する。
Further, the scanner driver uses the average luminance values Yav1, Yav2, and Yav3 of the pixels that occupy the first to third small regions Ry1, Ry2, and Ry3 acquired in this way, and reads the image read by the image reading device 10. An average value Yav0 of the overall luminance is obtained. In the present embodiment, since the first to third small regions Ry1, Ry2, and Ry3 occupy 99% of the entire image, the average luminance corresponding to the first to third small regions Ry1, Ry2, and Ry3, respectively. An average value of the values Yav1, Yav2, and Yav3 is set as an average value Yav0 of the luminance of the entire image. Therefore, in the present embodiment, the average value Yav0 of the overall luminance of the image read by the image reading device 10 can be obtained by the following equation (10), for example.
Yav0 = (Yav1 + Yav2 + Yav3) / 3 (10)
In this way, the scanner driver obtains the average value Yav0 of the overall luminance of the image read by the image reading device 10.

(2)目標値の取得
スキャナドライバは、このように第1〜第3小領域Ry1、Ry2、Ry3を占める画素の輝度の平均値Yav1、Yav2、Yav3を取得し、さらに画像読み取り装置10により読み取った画像の全体の輝度の平均値Yav0を取得した後、目標値を取得する。この目標値は、画像読み取り装置10により読み取られた画像に対して逆光補正処理を施すために取得される値であり、その逆光補正処理の概要を決定する上で目標となる値となる。本実施形態では、この目標値として、2つの目標値Ym1、Ym2が取得される。1つの目標値Ym1は、第1小領域Ry1に対応して取得されるもので、第1小領域Ry1を占める画素の輝度の平均値の目標値を示す。また、もう1つの目標値Ym2は、第2小領域Ry2に対応して取得されるもので、第2小領域Ry2を占める画素の輝度の平均値の目標値を示す。なお、この他に、第3小領域Ry3に対応する目標値Ym3が取得される。この第3小領域Ry3に対応する目標値Ym3については、後で詳しく説明する。
(2) Acquisition of Target Value The scanner driver acquires the average luminance values Yav1, Yav2, and Yav3 of the pixels that occupy the first to third small regions Ry1, Ry2, and Ry3 as described above, and further reads them by the image reading device 10. After obtaining the average brightness Yav0 of the entire image, the target value is obtained. This target value is a value acquired for performing the backlight correction process on the image read by the image reading device 10, and is a target value for determining the outline of the backlight correction process. In the present embodiment, two target values Ym1 and Ym2 are acquired as the target values. One target value Ym1 is acquired corresponding to the first small region Ry1, and indicates the target value of the average value of the luminance of the pixels occupying the first small region Ry1. The other target value Ym2 is acquired corresponding to the second small region Ry2, and indicates the target value of the average value of the luminance of the pixels occupying the second small region Ry2. In addition, the target value Ym3 corresponding to the third small region Ry3 is acquired. The target value Ym3 corresponding to the third small region Ry3 will be described in detail later.

次に、これら2つの目標値Ym1、Ym2を取得する方法について説明する。図15は、2つの目標値Ym1、Ym2を取得する方法の一例について説明したものである。   Next, a method for obtaining these two target values Ym1 and Ym2 will be described. FIG. 15 illustrates an example of a method for obtaining two target values Ym1 and Ym2.

本実施形態では、スキャナドライバは、これら2つの目標値Ym1、Ym2を、第1小領域Ry1を占める画素の輝度の平均値Yav1と、画像の全体の輝度の平均値Yav0とに基づき取得する。詳しくは、スキャナドライバは、第1小領域Ry1を占める画素の輝度の平均値Yav1と、画像の全体の輝度の平均値Yav0とを加算して、これにより得られた加算値Saddに基づき、2つの目標値Ym1、Ym2を取得する。加算値Saddから2つの目標値Ym1、Ym2を取得するにあたっては、同図に示すような2つの関係式(A)、(B)を用いる。   In the present embodiment, the scanner driver acquires these two target values Ym1 and Ym2 based on the average luminance value Yav1 of the pixels occupying the first small region Ry1 and the average luminance value Yav0 of the entire image. Specifically, the scanner driver adds the average luminance value Yav1 of the pixels occupying the first small area Ry1 and the average luminance value Yav0 of the entire luminance of the image, and based on the addition value Sadd obtained thereby, 2 Two target values Ym1 and Ym2 are acquired. In obtaining the two target values Ym1 and Ym2 from the added value Sadd, two relational expressions (A) and (B) as shown in the figure are used.

これら同図に示す2つの関係式(A)、(B)は、横軸を加算値とし、縦軸を目標値として形成されたグラフ上に表現されたものである。関係式(A)は、第1小領域Ry1に対応する目標値Ym1を取得するためのものである。また、関係式(B)は、第2小領域Ry2に対応する目標値Ym2を取得するためのものである。   These two relational expressions (A) and (B) shown in the figure are expressed on a graph formed with the horizontal axis as an addition value and the vertical axis as a target value. The relational expression (A) is for obtaining the target value Ym1 corresponding to the first small region Ry1. The relational expression (B) is for obtaining the target value Ym2 corresponding to the second small region Ry2.

スキャナドライバが、第1小領域Ry1を占める画素の輝度の平均値Yav1と、画像の全体の輝度の平均値Yav0とを加算して、加算値Saddを取得したとする。すると、スキャナドライバは、この加算値Saddに基づき、関係式(A)からこの加算値Saddに対応する目標値Ym1を取得する。また、スキャナドライバは、この加算値Saddに基づき、関係式(B)からこの加算値Saddに対応する目標値Ym2を取得する。このようにスキャナドライバは、第1小領域Ry1を占める画素の輝度の平均値Yav1と、画像の全体の輝度の平均値Yav0とを加算して得られた加算値Saddから、2つの目標値、即ち、第1小領域Ry1を占める画素の輝度の平均値の目標値Ym1と、第2小領域Ry2を占める画素の輝度の平均値の目標値Ym2とを簡単に取得することができる。   Assume that the scanner driver adds the average luminance value Yav1 of the pixels occupying the first small region Ry1 and the average luminance value Yav0 of the entire luminance of the image to obtain the added value Sadd. Then, the scanner driver acquires the target value Ym1 corresponding to the addition value Sadd from the relational expression (A) based on the addition value Sadd. Also, the scanner driver obtains the target value Ym2 corresponding to the addition value Sadd from the relational expression (B) based on the addition value Sadd. In this way, the scanner driver calculates two target values from the addition value Sadd obtained by adding the average value Yav1 of the luminance of the pixels occupying the first small region Ry1 and the average value Yav0 of the overall luminance of the image. That is, it is possible to easily obtain the target value Ym1 of the average brightness of the pixels occupying the first small area Ry1 and the target value Ym2 of the average brightness of the pixels occupying the second small area Ry2.

なお、ここで、スキャナドライバが、第1小領域Ry1を占める画素の輝度の平均値Yav1と、画像の全体の輝度の平均値Yav0とを加算して得られた加算値Saddに基づき、2つの目標値、即ち、第1小領域Ry1を占める画素の輝度の平均値の目標値Ym1と、第2小領域Ry2を占める画素の輝度の平均値の目標値Ym2とを取得した理由について説明する。すなわち、平均値Yav1が取得される第1小領域Ry1は、各色別に生成したヒストグラムを区分して得られた4つの小領域、即ち第1〜第4小領域の中で最も濃度値が小さい小領域である。このため、この第1小領域Ry1から取得される平均値Yav1の大きさは、画像の逆光度合いに応じて大きく変化することになる。しかしながら、第1小領域Ry1から取得される平均値Yav1だけでは、逆光画像か否か判断することはできない。それは、画像全体が暗い画像であっても、第1小領域Ry1から取得される平均値Yav1が小さいからである。この場合には、画像全体の輝度を高める必要がある。逆光画像のように一部の画素の輝度だけを高めるだけでは十分な補正効果が得られないからである。   Here, based on the addition value Sadd obtained by the scanner driver adding the average value Yav1 of the luminance of the pixels occupying the first small area Ry1 and the average value Yav0 of the overall luminance of the image, The reason why the target value, that is, the target value Ym1 of the average value of the pixels occupying the first small region Ry1 and the target value Ym2 of the average value of the pixels occupying the second small region Ry2 will be described. That is, the first small region Ry1 from which the average value Yav1 is acquired is the small one having the smallest density value among the four small regions obtained by dividing the histogram generated for each color, that is, the first to fourth small regions. It is an area. For this reason, the magnitude of the average value Yav1 acquired from the first small region Ry1 varies greatly depending on the degree of backlight of the image. However, whether or not the image is a backlight image cannot be determined only by the average value Yav1 acquired from the first small region Ry1. This is because even if the entire image is a dark image, the average value Yav1 acquired from the first small region Ry1 is small. In this case, it is necessary to increase the brightness of the entire image. This is because a sufficient correction effect cannot be obtained only by increasing the luminance of some pixels as in a backlight image.

そこで、画像の全体の輝度の平均値Yav0も考慮に入れるべく、第1小領域Ry1を占める画素の輝度の平均値Yav1に、画像の全体の輝度の平均値Yav0を加算して加算値Saddを取得するのである。この加算値Saddは、画像の逆光度合いを調べる上で、非常に適切な値となる。つまり、この加算値Saddが非常に小さい場合には、第1小領域Ry1を占める画素の輝度の平均値Yav1だけが小さいのではなく、画像の全体の輝度の平均値Yav0も小さく、全体が暗い画像であると判断することができる。これによって、画像全体の輝度を高めるように補正をすることができる。   Therefore, in order to take into consideration the average value Yav0 of the entire luminance of the image, the average value Yav0 of the entire luminance of the image is added to the average value Yav0 of the pixels occupying the first small region Ry1, and the added value Sadd is obtained. Get it. This added value Sadd is a very appropriate value in examining the degree of backlighting of the image. That is, when the added value Sadd is very small, not only the average luminance value Yav1 of the pixels occupying the first small area Ry1 but also the average luminance value Yav0 of the entire image is small, and the entire image is dark. It can be determined that it is an image. As a result, correction can be performed to increase the brightness of the entire image.

一方、この加算値Saddがそれほど小さくない場合には、画像の全体の輝度の平均値Yav0はそれほど小さくなく、第1小領域Ry1を占める画素の輝度の平均値Yav1が小さいことから、逆光画像であると判断することができる。これによって、画像全体の輝度ではなく一部の画素の輝度を高めるように補正をすることができる。   On the other hand, when the addition value Sadd is not so small, the average value Yav0 of the overall luminance of the image is not so small and the average value Yav1 of the pixels occupying the first small region Ry1 is small. It can be judged that there is. Accordingly, it is possible to perform correction so as to increase the luminance of some pixels, not the luminance of the entire image.

前述した2つの関係式(A)、(B)は、このような加算値Saddの大きさに応じて2つの目標値Ym1、Ym2が規定されるように、それぞれ設定される。すなわち、2つの関係式(A)、(B)は、加算値Saddが非常に小さい場合、即ち画像全体の輝度が低く、暗い画像であると判断される場合には、画像全体の輝度を高めるように補正をすべく、第1小領域Ry1を占める画素の輝度の平均値の目標値Ym1と、第2小領域Ry2を占める画素の輝度の平均値の目標値Ym2とがそれぞれ非常に大きな値になるように設定される。また、加算値Saddがそれほど小さくない場合、即ち画像が逆光画像であると判断される場合には、2つの関係式(A)、(B)は、第1小領域Ry1を占める画素の輝度の平均値の目標値Ym1と、第2小領域Ry2を占める画素の輝度の平均値の目標値Ym2とがそれぞれあまり大きな値にならないように設定される。これによって、本実施形態では、画像読み取り装置10により読み取られた画像が逆光画像ではなく、全体的に輝度が低く暗い画像であった場合についても、適切な補正を実行することができる。   The two relational expressions (A) and (B) described above are set so that the two target values Ym1 and Ym2 are defined according to the magnitude of the added value Sadd. That is, the two relational expressions (A) and (B) increase the luminance of the entire image when the addition value Sadd is very small, that is, when the luminance of the entire image is low and it is determined that the image is a dark image. Thus, the target value Ym1 of the average value of the luminance of the pixels occupying the first small region Ry1 and the target value Ym2 of the average value of the luminance of the pixels occupying the second small region Ry2 are very large values. Is set to be When the addition value Sadd is not so small, that is, when it is determined that the image is a backlight image, the two relational expressions (A) and (B) represent the luminance of the pixel occupying the first small region Ry1. The target value Ym1 of the average value and the target value Ym2 of the average value of the luminance of the pixels occupying the second small area Ry2 are set so as not to be too large. Accordingly, in the present embodiment, appropriate correction can be executed even when the image read by the image reading device 10 is not a backlight image but is a dark image with low overall brightness.

これら2つの関係式(A)、(B)は、例えば、次のように設定することができる。すなわち、加算値Saddが取り得る最小値を『Smin』とし、加算値Saddが取り得る最大値を『Smax』とすると、これら最小値『Smin』および最大値『Smax』にそれぞれ対応する最大目標値および最小目標値を設定する。ここで、関係式(A)に対応する最大目標値を『Ymax1』とし、最小目標値を『Ymin1』とする。また、関係式(B)に対応する最大目標値を『Ymax2』とし、最小目標値を『Ymin2』とする。なお、これら加算値Saddの最小値『Smin』および最大値『Smax』、関係式(A)の最大目標値『Ymax1』および最小目標値『Ymin1』、並びに関係式(B)の最大目標値『Ymax2』および最小目標値『Ymin2』は、経験則等により適宜設定される。   These two relational expressions (A) and (B) can be set as follows, for example. That is, assuming that the minimum value that the addition value Sadd can take is “Smin” and the maximum value that the addition value Sadd can take is “Smax”, the maximum target value corresponding to each of the minimum value “Smin” and the maximum value “Smax”. Set the minimum target value. Here, the maximum target value corresponding to the relational expression (A) is “Ymax1”, and the minimum target value is “Ymin1”. The maximum target value corresponding to the relational expression (B) is “Ymax2”, and the minimum target value is “Ymin2”. The minimum value “Smin” and the maximum value “Smax” of the added value Sadd, the maximum target value “Ymax1” and the minimum target value “Ymin1” of the relational expression (A), and the maximum target value “of the relational expression (B)” Ymax2 ”and the minimum target value“ Ymin2 ”are appropriately set based on empirical rules and the like.

このことから、関係式(A)は、例えば、同図に示すように、加算値Saddの最小値『Smin』と、関係式(A)の最大目標値『Ymax1』とにより規定されるポイントPm1と、加算値Saddの最大値『Smax』と、関係式(A)の最小目標値『Ymin1』とにより規定されるポイントPm3とを結ぶ直線として簡単に設定することができる。また、関係式(B)は、例えば、同図に示すように、加算値Saddの最小値『Smin』と、関係式(B)の最大目標値『Ymax2』とにより規定されるポイントPm2と、加算値Saddの最大値『Smax』と、関係式(B)の最小目標値『Ymin2』とにより規定されるポイントPm4とを結ぶ直線として簡単に設定することができる。   From this, the relational expression (A) is, for example, the point Pm1 defined by the minimum value “Smin” of the addition value Sadd and the maximum target value “Ymax1” of the relational expression (A) as shown in FIG. And a straight line connecting the maximum value “Smax” of the addition value Sadd and the point Pm3 defined by the minimum target value “Ymin1” of the relational expression (A). Further, the relational expression (B) is, for example, as shown in the figure, a point Pm2 defined by the minimum value “Smin” of the addition value Sadd and the maximum target value “Ymax2” of the relational expression (B), It can be easily set as a straight line connecting the maximum value “Smax” of the addition value Sadd and the point Pm4 defined by the minimum target value “Ymin2” of the relational expression (B).

ここで、加算値Saddの最大値『Smax』に対応する関係式(A)の最小目標値『Ymin1』および関係式(B)の最小目標値『Ymin2』がそれぞれ非常に小さい値に設定されている。このことから、加算値Saddが大きすぎる場合には、第1小領域Ry1を占める画素の輝度の平均値の目標値Ym1と、第2小領域Ry2を占める画素の輝度の平均値の目標値Ym2とを標準的な値よりも十分に小さい値に設定することができる。これによって、画像全体の輝度が高い場合、即ち画像全体が明るい場合などについても、その画像に対して補正を施すことができる。つまり、本実施形態では、画像が逆光画像か否かを判定しなくても、即ち画像が逆光画像か否かに関わらず、画像に対して適宜な逆光補正処理を実行することができる。   Here, the minimum target value “Ymin1” of the relational expression (A) corresponding to the maximum value “Smax” of the addition value Sadd and the minimum target value “Ymin2” of the relational expression (B) are respectively set to very small values. Yes. From this, when the addition value Sadd is too large, the target value Ym1 of the average value of the luminance of the pixels occupying the first small region Ry1 and the target value Ym2 of the average value of the luminance of the pixels occupying the second small region Ry2 Can be set to a value sufficiently smaller than the standard value. As a result, even when the brightness of the entire image is high, that is, when the entire image is bright, the image can be corrected. That is, in the present embodiment, an appropriate backlight correction process can be performed on an image without determining whether the image is a backlight image, that is, regardless of whether the image is a backlight image.

このようにしてスキャナドライバは、第1小領域Ry1を占める画素の輝度の平均値Yav1と、画像の全体の輝度の平均値Yav0とに基づき、関係式(A)、(B)から、第1小領域Ry1を占める画素の輝度の平均値の目標値Ym1と、第2小領域Ry2を占める画素の輝度の平均値の目標値Ym2とを簡単に取得することができる。   In this way, the scanner driver calculates the first value from the relational expressions (A) and (B) based on the average luminance value Yav1 of the pixels occupying the first small region Ry1 and the average luminance value Yav0 of the entire image. The target value Ym1 of the average value of the luminance of the pixels occupying the small region Ry1 and the target value Ym2 of the average value of the luminance of the pixels occupying the second small region Ry2 can be easily obtained.

なお、本実施形態では、第1小領域Ry1を占める画素の輝度の平均値Yav1と、画像の全体の輝度の平均値Yav0とを加算して得られた加算値Saddに基づき、2つの目標値Ym1、Ym2を簡単に取得するために、関係式(A)および(B)には、直線、即ち線形関数が用いられていたが、ここで用いられる関係式(A)および(B)にあっては、必ずしもこのような線形関数が用いられる必要はない。すなわち、関係式(A)および(B)には、非線形関数が用いられても良い。   In the present embodiment, two target values are obtained based on the addition value Sadd obtained by adding the average luminance value Yav1 of the pixels occupying the first small region Ry1 and the average luminance value Yav0 of the entire luminance of the image. In order to easily obtain Ym1 and Ym2, a straight line, that is, a linear function, was used in the relational expressions (A) and (B). However, the relational expressions (A) and (B) used here are different from each other. Thus, such a linear function is not necessarily used. That is, a nonlinear function may be used in relational expressions (A) and (B).

また、本実施形態では、第1小領域Ry1を占める画素の輝度の平均値Yav1と、画像の全体の輝度の平均値Yav0とを加算して、これにより得られた加算値Saddに基づき、目標値Ym1、Ym2を取得していたが、目標値Ym1、Ym2を取得するのにあたっては、必ずしもこのような加算値Saddを求める必要はない。すなわち、第1小領域Ry1を占める画素の輝度の平均値Yav1のみに基づき、目標値を取得しても良く、また、第2小領域Ry2を占める画素の輝度の平均値Yav2に基づき、目標値を取得しても良い。   In the present embodiment, the average luminance value Yav1 of the pixels occupying the first small region Ry1 and the average luminance value Yav0 of the entire luminance of the image are added, and based on the added value Sadd obtained thereby, the target value Sadd is obtained. Although the values Ym1 and Ym2 have been acquired, it is not always necessary to obtain such an added value Sadd when acquiring the target values Ym1 and Ym2. That is, the target value may be acquired based only on the average luminance value Yav1 of the pixels occupying the first small region Ry1, and the target value is calculated based on the average luminance value Yav2 of the pixels occupying the second small region Ry2. You may get

また、本実施形態では、加算値Saddに基づき、2つの目標値Ym1、Ym2を取得していたが、必ずしもこのように2つの目標値Ym1、Ym2を取得する必要はなく、目標値の数は、1つであっても良く、また3つ以上であっても良い。   In this embodiment, the two target values Ym1 and Ym2 are acquired based on the addition value Sadd. However, it is not always necessary to acquire the two target values Ym1 and Ym2, and the number of target values is as follows. There may be one, or three or more.

(3)補正情報の生成
スキャナドライバは、このようにして取得した2つの目標値Ym1、Ym2に基づき、補正情報を生成する。この補正情報は、画像読み取り装置10により読み取られた画像に対してスキャナドライバが逆光補正処理を施すための情報である。本実施形態では、スキャナドライバが逆光補正処理として前述した「濃度補正」を実行する。このことから、本実施形態では、スキャナドライバが、補正情報として、「濃度補正」における設定情報を生成する。以下に「濃度補正」における設定情報の生成方法について詳しく説明する。
(3) Generation of correction information The scanner driver generates correction information based on the two target values Ym1 and Ym2 acquired in this way. This correction information is information for the scanner driver to perform backlight correction processing on the image read by the image reading device 10. In the present embodiment, the scanner driver executes the above-described “density correction” as the backlight correction process. Therefore, in this embodiment, the scanner driver generates setting information for “density correction” as correction information. A method for generating setting information in “density correction” will be described in detail below.

図16は、補正情報として、「濃度補正」における設定情報の生成方法について説明したものである。ここでは、「濃度補正」のトーンカーブTcを調整することによって、画像読み取り装置10により読み取られた画像に対してスキャナドライバが逆光補正処理を施す。   FIG. 16 illustrates a method for generating setting information in “density correction” as correction information. Here, the scanner driver performs a backlight correction process on the image read by the image reading device 10 by adjusting the tone curve Tc of “density correction”.

なお、本実施形態では、「濃度補正」のトーンカーブTcとして、図8にて説明した、RGB(レッド、グリーン、ブルー)全色に対応するトーンカーブTcを調整するものとする。   In this embodiment, the tone curve Tc corresponding to all RGB (red, green, blue) colors described with reference to FIG. 8 is adjusted as the tone curve Tc for “density correction”.

このため、スキャナドライバは、補正情報として、同図に示すように、2つの目標値Ym1、Ym2に基づき、そのトーンカーブTc上に任意のポイントとして、3つのポイントPs1、Ps2、Ps3を設定する。そして、スキャナドライバは、これら3つのポイントPs1、Ps2、Ps3を通過するようにトーンカーブTcを調整する。なお、本実施形態では、ポイントPs1は、第1小領域Ry1に対応して設定される。また、ポイントPs2は、第2小領域Ry2に対応して設定される。また、ポイントPs3は、第3小領域Ry3に対応して設定される。また、本実施形態では、ポイントPs1の入力値を『X1』とし、その出力値を『Y1』とする。また、ポイントPs2の入力値を『X2』とし、その出力値を『Y2』とする。また、ポイントPs3の入力値を『X3』とし、その出力値を『Y3』とする。   Therefore, the scanner driver sets three points Ps1, Ps2, and Ps3 as arbitrary points on the tone curve Tc based on the two target values Ym1 and Ym2 as correction information, as shown in FIG. . Then, the scanner driver adjusts the tone curve Tc so as to pass through these three points Ps1, Ps2, and Ps3. In the present embodiment, the point Ps1 is set corresponding to the first small region Ry1. The point Ps2 is set corresponding to the second small area Ry2. The point Ps3 is set corresponding to the third small region Ry3. In this embodiment, the input value of the point Ps1 is “X1”, and the output value is “Y1”. The input value of the point Ps2 is “X2”, and the output value is “Y2”. The input value of the point Ps3 is “X3”, and the output value is “Y3”.

ここで、3つのポイントPs1、Ps2、Ps3の入力値『X1』、『X2』、『X3』については、入力値が取り得る値、即ち本実施形態では、『0』〜『255』の範囲内の適宜な値に設定されれば良い。しかし、バランスが良いトーンカーブTcを形成するためには、次のように設定するのが好ましい。すなわち、これら3つのポイントPs1、Ps2、Ps3が均等にバランス良く配置されるために、入力値が取り得る値の範囲、即ち『0』〜『255』を3つに区分して各区分の内にそれぞれ、入力値『X1』、『X2』、『X3』が配置されるようにする。すなわち、入力値『X1』は、『0』〜『84』の範囲内に設定する。また、入力値『X2』は、『85』〜『169』の範囲内に設定する。また、入力値『X3』は、『170』〜『255』の範囲内に設定する。   Here, the input values “X1”, “X2”, and “X3” of the three points Ps1, Ps2, and Ps3 are values that the input value can take, that is, in the present embodiment, a range of “0” to “255”. Any suitable value may be set. However, in order to form a well-balanced tone curve Tc, it is preferable to set as follows. That is, since these three points Ps1, Ps2, and Ps3 are arranged equally in a balanced manner, the range of values that the input value can take, that is, “0” to “255” is divided into three, The input values “X1”, “X2”, and “X3” are arranged respectively. That is, the input value “X1” is set within the range of “0” to “84”. The input value “X2” is set within the range of “85” to “169”. Further, the input value “X3” is set within the range of “170” to “255”.

さらに、例えば、入力値『X1』、『X2』、『X3』を各区分内のほぼ中央に位置するように設定すると好ましい。具体的には、本実施形態では、ポイントPs1の入力値『X1』を『42』に設定する。また、ポイントPs2の入力値『X2』を『127』に設定する。また、ポイントPs3の入力値『X3』を『212』に設定する。   Furthermore, for example, it is preferable to set the input values “X1”, “X2”, and “X3” so as to be positioned at the approximate center in each section. Specifically, in this embodiment, the input value “X1” of the point Ps1 is set to “42”. Further, the input value “X2” of the point Ps2 is set to “127”. Further, the input value “X3” of the point Ps3 is set to “212”.

一方、これら3つのポイントPs1、Ps2、Ps3の出力値『Y1』、『Y2』、『Y3』については、本実施形態では、次にように設定する。すなわち、ポイントPs1の出力値『Y1』およびポイントPs2の出力値『Y2』は、2つの目標値Ym1、Ym2に基づき設定される。一方、ポイントPs3の出力値『Y3』は、ポイントPs2と、ポイントPs0とに基づき設定される。ここで、ポイントPs0は、入力値を『255』とし、出力値を『255』として設定されたポイントである。ポイントPs3は、これらポイントPs2と、ポイントPs0との間を結んで設定される直線のほぼ真上に位置するように設定される。すなわち、ポイントPs3の入力値として『X3』が得られると、この入力値『X3』からこれに対応するポイントを、ポイントPs2とポイントPs0とを結ぶ直線上から探し出してポイントPs3として設定することができる。ポイントPs3の出力値『Y3』は、入力値『X3』に対応する出力値として、ポイントPs2とポイントPs0とを結ぶ直線から求めることができる。   On the other hand, the output values “Y1”, “Y2”, and “Y3” of these three points Ps1, Ps2, and Ps3 are set as follows in this embodiment. That is, the output value “Y1” of the point Ps1 and the output value “Y2” of the point Ps2 are set based on the two target values Ym1 and Ym2. On the other hand, the output value “Y3” of the point Ps3 is set based on the point Ps2 and the point Ps0. Here, the point Ps0 is a point set with an input value “255” and an output value “255”. The point Ps3 is set so as to be positioned almost directly above the straight line set between the point Ps2 and the point Ps0. That is, when “X3” is obtained as the input value of the point Ps3, a point corresponding to the input value “X3” is searched for on the straight line connecting the point Ps2 and the point Ps0 and set as the point Ps3. it can. The output value “Y3” of the point Ps3 can be obtained from the straight line connecting the point Ps2 and the point Ps0 as the output value corresponding to the input value “X3”.

ここで、ポイントPs1およびポイントPs2の出力値『Y1』、『Y2』の求め方について説明する。まず、ポイントPs1の出力値『Y1』の求め方について説明する。ポイントPs1は、第1小領域Ry1に対応して設定されるものである。補正後のヒストグラムの第1小領域Ry1を占める画素の輝度の平均値Yav1が目標値Ym1になるように、ポイントPs1の出力値『Y1』を設定する。具体的には、次のようにして行う。すなわち、入力値『X1』に対して「濃度補正」を施さなかった場合に得られる出力値を『Yt1』とする。つまり、この出力値『Yt1』は、入力値『X1』と同じ値となる。なお、図16においては、入力値『X1』に対して「濃度補正」を施さなかった場合のポイントを「Pt1」として示している。この出力値『Yt1』に対するポイントPs1の出力値『Y1』の差分ΔYp1を求める。この差分ΔYp1は、次のようにして求めることができる。   Here, how to obtain the output values “Y1” and “Y2” of the points Ps1 and Ps2 will be described. First, how to obtain the output value “Y1” of the point Ps1 will be described. The point Ps1 is set corresponding to the first small region Ry1. The output value “Y1” of the point Ps1 is set so that the average value Yav1 of the luminance of the pixels occupying the first small region Ry1 of the corrected histogram becomes the target value Ym1. Specifically, this is performed as follows. That is, an output value obtained when “density correction” is not performed on the input value “X1” is “Yt1”. That is, the output value “Yt1” is the same value as the input value “X1”. In FIG. 16, the point when “density correction” is not performed on the input value “X1” is shown as “Pt1”. A difference ΔYp1 between the output value “Y1” of the point Ps1 and the output value “Yt1” is obtained. This difference ΔYp1 can be obtained as follows.

図17Aは、本実施形態にかかる差分ΔYp1の求める方法について説明したものである。この差分ΔYp1は、本実施形態では、スキャナドライバが求める。スキャナドライバは、まず、同図に示すように、入力値『X1』からこれに対応する出力値『Yt1』を取得する(S202)。なお、この出力値『Yt1』は、ここでは、入力値『X1』と同じ値である。次に、スキャナドライバは、差分ΔYp1を初期値、ここでは『0』に設定する(S204)。そして、スキャナドライバは、差分ΔYp1に対して『1』だけ加算した値を、新たなΔYp1として設定する(S206)。すなわち、ΔYp1が『42』であった場合には、新たなΔYp1は、『1』だけ加算されて『43』となる。   FIG. 17A illustrates a method for obtaining the difference ΔYp1 according to the present embodiment. In the present embodiment, the difference ΔYp1 is obtained by the scanner driver. First, as shown in the figure, the scanner driver obtains an output value “Yt1” corresponding to the input value “X1” (S202). The output value “Yt1” is the same value as the input value “X1” here. Next, the scanner driver sets the difference ΔYp1 to an initial value, here “0” (S204). Then, the scanner driver sets a value obtained by adding “1” to the difference ΔYp1 as a new ΔYp1 (S206). That is, when ΔYp1 is “42”, new ΔYp1 is added by “1” to become “43”.

そして次に、スキャナドライバは、先に取得した出力値『Yt1』にΔYp1を加算した値をポイントPs1の出力値『Y1』として設定する(S208)。そして、このポイントPs1により設定されるトーンカーブTcに基づき「濃度補正」を実行した場合の補正後の画像のデータを取得する(S210)。なお、ここでは、このときに、図11にて説明したように、「濃度補正」の他に、「ヒストグラム調整」や「イメージ調整」等の各種調整(補正)の内容についても反映されるものとする。   Next, the scanner driver sets a value obtained by adding ΔYp1 to the previously acquired output value “Yt1” as the output value “Y1” of the point Ps1 (S208). Then, image data after correction when “density correction” is executed based on the tone curve Tc set by the point Ps1 is acquired (S210). Here, as described with reference to FIG. 11, the contents of various adjustments (corrections) such as “histogram adjustment” and “image adjustment” are also reflected in addition to “density correction”. And

このようにして補正を行った後、スキャナドライバは、この補正によって得られた画像のデータに基づき、ヒストグラムを生成する(S212)。なお、ここでは、スキャナドライバは、レッド(R)、グリーン(G)およびブルー(B)の3色のヒストグラムの作成を行う。次に、スキャナドライバは、このようにして作成したヒストグラムについて小領域への区分を行う(S214)。すなわち、スキャナドライバは、ここでは、前述したように、ヒストグラムにより表される領域を4つの小領域、即ち第1〜第4小領域Ry1、Ry2、Ry3、Ry4に区分する。   After performing the correction in this manner, the scanner driver generates a histogram based on the image data obtained by the correction (S212). Here, the scanner driver creates a histogram of three colors of red (R), green (G), and blue (B). Next, the scanner driver classifies the histogram created in this way into small regions (S214). In other words, as described above, the scanner driver divides the region represented by the histogram into four small regions, that is, the first to fourth small regions Ry1, Ry2, Ry3, and Ry4.

そして、スキャナドライバは、このようにして区分により得られた4つの領域Ry1、Ry2、Ry3、Ry4の中から、第1小領域Ry1に関する属性情報を取得する。なお、ここで、スキャナドライバは、第1小領域Ry1に関する属性情報として、レッド(R)、グリーン(G)及びブルー(B)の各色の濃度値の平均値AVr1、AVg1、AVb1を取得する。そして、スキャナドライバは、取得した各色の濃度値の平均値AVr1、AVg1、AVb1に基づき、第1小領域Ry1を占める画素の輝度の平均値Yav1を求める(S216)。ここで、スキャナドライバは、例えば、式(7)等により、平均値Yav1を求める。   Then, the scanner driver acquires attribute information related to the first small region Ry1 from the four regions Ry1, Ry2, Ry3, and Ry4 obtained in this way. Here, the scanner driver acquires the average values AVr1, AVg1, and AVb1 of the density values of each color of red (R), green (G), and blue (B) as the attribute information related to the first small region Ry1. Then, the scanner driver obtains the average value Yav1 of the luminance of the pixels occupying the first small area Ry1 based on the acquired average values AVr1, AVg1, and AVb1 of the density values of the respective colors (S216). Here, the scanner driver obtains the average value Yav1 by, for example, Expression (7).

その後、スキャナドライバは、求めた平均値Yav1と、先に取得した目標値Ym1とを比較する(S218)。ここでは、スキャナドライバは、求めた平均値Yav1が、目標値Ym1以上となったか否かをチェックする。そして、求めた平均値Yav1が目標値Ym1以上となっていなかった場合には、スキャナドライバは、ステップS206へと戻り、再び、差分ΔYp1に対して『1』だけ加算して新たなΔYp1を取得する(S206)。そして、再度、ポイントPs1の出力値『Y1』を取得して(S208)、これに基づき画像の補正を行った後(S210)、ヒストグラムを生成して(S212)、小領域に区分し(S214)、第1小領域Ry1を占める画素の輝度の平均値Yav1を求める(S216)。その後、求めた平均値Yav1と、目標値Ym1とを比較し、再び、求めた平均値Yav1が目標値Ym1に達しているか否かをチェックする(S218)。スキャナドライバは、求めた平均値Yav1が目標値Ym1に達するまで、このような処理(S206〜S218)を繰り返し行う。すなわち、差分ΔYp1は、求めた平均値Yav1が目標値Ym1に達するまで、順次『1』ずつ加算されて増えることになる。   Thereafter, the scanner driver compares the obtained average value Yav1 with the previously acquired target value Ym1 (S218). Here, the scanner driver checks whether or not the obtained average value Yav1 is equal to or greater than the target value Ym1. If the calculated average value Yav1 is not equal to or greater than the target value Ym1, the scanner driver returns to step S206 and again adds “1” to the difference ΔYp1 to obtain a new ΔYp1. (S206). Then, the output value “Y1” of the point Ps1 is acquired again (S208), the image is corrected based on this (S210), a histogram is generated (S212), and divided into small regions (S214). ), The average value Yav1 of the luminance of the pixels occupying the first small region Ry1 is obtained (S216). Thereafter, the obtained average value Yav1 is compared with the target value Ym1, and it is checked again whether or not the obtained average value Yav1 has reached the target value Ym1 (S218). The scanner driver repeats such processing (S206 to S218) until the obtained average value Yav1 reaches the target value Ym1. That is, the difference ΔYp1 is incremented by “1” sequentially until the calculated average value Yav1 reaches the target value Ym1.

そして、求めた平均値Yav1が目標値Ym1に達した場合には、スキャナドライバは、ここで得られた差分ΔYp1に基づき、ポイントPs1の出力値『Y1』を設定する(S220)。すなわち、ここでスキャナドライバは、出力値『Yt1』に差分ΔYp1を加算して得られた値をポイントPs1の出力値『Y1』として設定する。   When the obtained average value Yav1 reaches the target value Ym1, the scanner driver sets the output value “Y1” of the point Ps1 based on the difference ΔYp1 obtained here (S220). In other words, the scanner driver sets the value obtained by adding the difference ΔYp1 to the output value “Yt1” as the output value “Y1” of the point Ps1.

このようにしてスキャナドライバは、補正後のヒストグラムの第1小領域Ry1を占める画素の輝度の平均値Yav1が目標値Ym1になるようなポイントPs1の出力値『Y1』を設定する。なお、ポイントPs1の出力値『Y1』が出力値『Yt1』よりも小さい値に設定される場合には、スキャナドライバは、ステップS218において、平均値Yav1が目標値Ym1よりも下回ったか否かをチェックすると良い。   In this way, the scanner driver sets the output value “Y1” of the point Ps1 such that the average value Yav1 of the luminance of the pixels occupying the first small region Ry1 of the corrected histogram becomes the target value Ym1. When the output value “Y1” of the point Ps1 is set to a value smaller than the output value “Yt1”, the scanner driver determines whether or not the average value Yav1 is lower than the target value Ym1 in step S218. It is good to check.

一方、ポイントPs2の出力値『Y2』についても、ポイントPs1の出力値『Y1』の場合と同様に設定する。つまり、ポイントPs2は、第2小領域Ry2に対応して設定されるものである。ポイントPs1の場合と同様に、補正後のヒストグラムの第2小領域Ry2を占める画素の輝度の平均値Yav2が目標値Ym2になるように、ポイントPs2の出力値『Y2』を設定する。要するに、入力値『X2』に対して「濃度補正」を施さなかった場合に得られる出力値を『Yt2』とすると、この出力値『Yt2』に対するポイントPs2の出力値『Y2』の差分ΔYp2を求める。なお、図16においては、入力値『X2』に対して「濃度補正」を施さなかった場合のポイントを「Pt2」として示している。   On the other hand, the output value “Y2” of the point Ps2 is set similarly to the output value “Y1” of the point Ps1. That is, the point Ps2 is set corresponding to the second small region Ry2. Similarly to the case of the point Ps1, the output value “Y2” of the point Ps2 is set so that the average value Yav2 of the luminance of the pixels occupying the second small region Ry2 of the corrected histogram becomes the target value Ym2. In short, if the output value obtained when “density correction” is not applied to the input value “X2” is “Yt2”, the difference ΔYp2 of the output value “Y2” of the point Ps2 with respect to this output value “Yt2” is obtained. Ask. In FIG. 16, the point when “density correction” is not performed on the input value “X2” is indicated as “Pt2”.

図17Bは、本実施形態にかかる差分ΔYp1の求める方法について説明したものである。なお、この差分ΔYp2についても、ポイントPs1の場合と同様に、スキャナドライバが求める。スキャナドライバは、まず、同図に示すように、入力値『X2』からこれに対応する出力値『Yt2』を取得する(S252)。なお、この出力値『Yt2』は、ここでは、入力値『X2』と同じ値となる。次に、スキャナドライバは、差分ΔYp2を初期値、ここでは『0』に設定する(S254)。そして、スキャナドライバは、差分ΔYp2に対して『1』だけ加算した値を、新たなΔYp2として設定する(S256)。   FIG. 17B illustrates a method for obtaining the difference ΔYp1 according to the present embodiment. The difference ΔYp2 is also obtained by the scanner driver as in the case of the point Ps1. The scanner driver first obtains the output value “Yt2” corresponding to the input value “X2” as shown in FIG. The output value “Yt2” is the same value as the input value “X2” here. Next, the scanner driver sets the difference ΔYp2 to an initial value, here “0” (S254). Then, the scanner driver sets a value obtained by adding “1” to the difference ΔYp2 as a new ΔYp2 (S256).

そして次に、スキャナドライバは、先に取得した出力値『Yt2』にΔYp2を加算した値をポイントPs2の出力値『Y2』として設定する(S258)。そして、このポイントPs2により設定されるトーンカーブTcに基づき「濃度補正」を実行した場合の補正後の画像のデータを取得する(S260)。なお、ここでは、このときに、図11にて説明したように、「濃度補正」の他に、「ヒストグラム調整」や「イメージ調整」等の各種調整(補正)の内容についても反映されるものとする。また、ここでは、スキャナドライバは、ポイントPs1の設定内容を反映させても反映させなくてもどちらでも構わない。   Next, the scanner driver sets a value obtained by adding ΔYp2 to the previously obtained output value “Yt2” as the output value “Y2” of the point Ps2 (S258). Then, image data after correction when “density correction” is executed based on the tone curve Tc set by the point Ps2 is acquired (S260). Here, as described with reference to FIG. 11, the contents of various adjustments (corrections) such as “histogram adjustment” and “image adjustment” are also reflected in addition to “density correction”. And Here, the scanner driver may or may not reflect the setting content of the point Ps1.

このようにして補正を行った後、スキャナドライバは、この補正によって得られた画像のデータに基づき、ヒストグラムを生成する(S262)。なお、ここでスキャナドライバは、レッド(R)、グリーン(G)およびブルー(B)の3色のヒストグラムの作成を行う。次に、スキャナドライバは、このようにして作成したヒストグラムについて4つの小領域Ry1、Ry2、Ry3、Ry4に区分する(S264)。   After performing the correction in this manner, the scanner driver generates a histogram based on the image data obtained by the correction (S262). Here, the scanner driver creates a histogram of three colors of red (R), green (G), and blue (B). Next, the scanner driver divides the histogram created in this way into four small regions Ry1, Ry2, Ry3, and Ry4 (S264).

そして、スキャナドライバは、このようにして区分により得られた4つの領域Ry1、Ry2、Ry3、Ry4の中から、第2小領域Ry2に関する属性情報を取得する。なお、ここで、スキャナドライバは、第2小領域Ry2に関する属性情報として、レッド(R)、グリーン(G)及びブルー(B)の各色の濃度値の平均値AVr2、AVg2、AVb2を取得する。そして、スキャナドライバは、取得した各色の濃度値の平均値AVr2、AVg2、AVb2に基づき、第2小領域Ry2を占める画素の輝度の平均値Yav2を求める(S266)。ここで、スキャナドライバは、例えば、式(8)等により、平均値Yav2を求める。   Then, the scanner driver acquires attribute information related to the second small region Ry2 from the four regions Ry1, Ry2, Ry3, and Ry4 obtained in this way. Here, the scanner driver obtains the average values AVr2, AVg2, and AVb2 of the density values of each color of red (R), green (G), and blue (B) as attribute information related to the second small region Ry2. Then, the scanner driver obtains the average value Yav2 of the luminance of the pixels occupying the second small area Ry2 based on the acquired average values AVr2, AVg2, and AVb2 of the density values of the respective colors (S266). Here, the scanner driver obtains the average value Yav2 by, for example, Equation (8).

その後、スキャナドライバは、求めた平均値Yav2と、先に取得した目標値Ym2とを比較する(S268)。ここで、求めた平均値Yav2が目標値Ym2に達していなかった場合には、スキャナドライバは、ステップS256へと戻り、再び、『1』加算して新たなΔYp1を取得して(S256)、ポイントPs2の出力値『Y2』を取得して(S258)、これに基づき画像の補正を行う(S260)。そして、スキャナドライバは、補正後の画像のヒストグラムを生成して(S262)、4つの小領域に区分し(S264)、平均値Yav2を再び取得する(S266)。その後、取得した平均値Yav2と、目標値Ym2とを比較し、再び、求めた平均値Yav2が目標値Ym2に達しているか否かをチェックする(S268)。スキャナドライバは、求めた平均値Yav2が目標値Ym2に達するまで、このような処理(S256〜S268)を繰り返し行う。すなわち、差分ΔYp2は、求めた平均値Yav2が目標値Ym2に達するまで、順次『1』ずつ加算されて増えることになる。   Thereafter, the scanner driver compares the obtained average value Yav2 with the previously acquired target value Ym2 (S268). Here, if the obtained average value Yav2 has not reached the target value Ym2, the scanner driver returns to step S256, and again adds “1” to obtain a new ΔYp1 (S256). The output value “Y2” of the point Ps2 is acquired (S258), and based on this, the image is corrected (S260). Then, the scanner driver generates a histogram of the corrected image (S262), divides it into four small regions (S264), and obtains the average value Yav2 again (S266). Thereafter, the acquired average value Yav2 is compared with the target value Ym2, and it is checked again whether or not the obtained average value Yav2 has reached the target value Ym2 (S268). The scanner driver repeats such processing (S256 to S268) until the obtained average value Yav2 reaches the target value Ym2. That is, the difference ΔYp2 is incremented by “1” sequentially until the obtained average value Yav2 reaches the target value Ym2.

そして、スキャナドライバは、求めた平均値Yav2が目標値Ym2に達した場合には、ここで得られた差分ΔYp2に基づき、ポイントPs2の出力値『Y2』を設定する(S270)。すなわち、ここでスキャナドライバは、出力値『Yt2』に差分ΔYp2を加算して得られた値をポイントPs2の出力値『Y2』として設定する。   When the calculated average value Yav2 reaches the target value Ym2, the scanner driver sets the output value “Y2” of the point Ps2 based on the difference ΔYp2 obtained here (S270). In other words, the scanner driver sets the value obtained by adding the difference ΔYp2 to the output value “Yt2” as the output value “Y2” of the point Ps2.

このようにしてスキャナドライバは、補正後のヒストグラムの第2小領域Ry2を占める画素の輝度の平均値Yav2が目標値Ym2になるようなポイントPs2の出力値『Y2』を設定する。なお、ポイントPs2の出力値『Y2』が出力値『Yt2』よりも小さい値に設定される場合には、スキャナドライバは、ステップS268において、平均値Yav2が目標値Ym2以下となったか否かをチェックすると良い。   In this manner, the scanner driver sets the output value “Y2” of the point Ps2 such that the average value Yav2 of the pixels occupying the second small area Ry2 of the corrected histogram becomes the target value Ym2. When the output value “Y2” of the point Ps2 is set to a value smaller than the output value “Yt2”, the scanner driver determines in step S268 whether or not the average value Yav2 has become equal to or less than the target value Ym2. It is good to check.

なお、ポイントPs3の出力値『Y3』は、先に説明したように、入力値『X3』に対応する出力値として、ポイントPs2とポイントPs0とを結ぶ直線から求めることができる。   Note that the output value “Y3” of the point Ps3 can be obtained from the straight line connecting the point Ps2 and the point Ps0 as the output value corresponding to the input value “X3” as described above.

(4)入力値X1、X2、X3の他の設定方法
前述した3つのポイントPs1、Ps2、Ps3の各入力値『X1』、『X2』、『X3』の他の設定方法としては、次のような方法がある。すなわち、例えば、第1〜第3小領域Ry1、Ry2、Ry3を占める画素の輝度の平均値Yav1、Yav2、Yav3を考慮して設定しても良い。つまり、これら3つのポイントPs1、Ps2、Ps3の入力値『X1』、『X2』、『X3』を第1〜第3小領域Ry1、Ry2、Ry3を占める画素の輝度の平均値Yav1、Yav2、Yav3に反映させる。具体的には、次のような設定方法がある。
(4) Other setting methods of the input values X1, X2, and X3 Other setting methods of the input values “X1”, “X2”, and “X3” of the three points Ps1, Ps2, and Ps3 described above are as follows: There are methods. That is, for example, the average luminance values Yav1, Yav2, and Yav3 of the pixels that occupy the first to third small regions Ry1, Ry2, and Ry3 may be set. In other words, the input values “X1”, “X2”, “X3” of these three points Ps1, Ps2, Ps3 are average values Yav1, Yav2, Reflect in Yav3. Specifically, there are the following setting methods.

図18A〜図18Cは、第1〜第3小領域Ry1、Ry2、Ry3を占める画素の輝度の平均値Yav1、Yav2、Yav3を反映して、3つの入力値『X1』、『X2』、『X3』を設定する場合の一例を説明したものである。図18Aは、ポイントPs1の入力値『X1』の設定方法を説明したものである。図18Bは、ポイントPs2の入力値『X2』の設定方法を説明したものである。図18Cは、ポイントPs3の入力値『X3』の設定方法を説明したものである。   FIGS. 18A to 18C reflect the average values Yav1, Yav2, and Yav3 of the pixels that occupy the first to third small regions Ry1, Ry2, and Ry3, and the three input values “X1”, “X2”, “ An example of setting “X3” will be described. FIG. 18A illustrates a method for setting the input value “X1” of the point Ps1. FIG. 18B illustrates a method for setting the input value “X2” of the point Ps2. FIG. 18C illustrates a method for setting the input value “X3” of the point Ps3.

ポイントPs1の入力値『X1』を設定する場合には、図18Aに示すように、入力値『X1』が設定される『0』〜『84』の範囲内に、所定の対象範囲『a1』〜『b1』を設定する。この所定の対象範囲『a1』〜『b1』は、『0』〜『84』の間のほぼ中央に設定される。『a1』および『b1』は、それぞれ『0』〜『84』の間の適当な値に設定される。このようにして設定された所定の対象範囲『a1』〜『b1』を256等分して、『0』〜『255』の値を割り振り、第1小領域Ry1を占める画素の輝度の平均値Yav1が対応するポイントPk1を特定する。そして、このポイントPk1に対応する、『0』〜『84』の間の値を求める。この求めた値をポイントPs1の入力値『X1』として設定する。   When the input value “X1” of the point Ps1 is set, as shown in FIG. 18A, the predetermined target range “a1” is within the range of “0” to “84” where the input value “X1” is set. ~ “B1” is set. The predetermined target ranges “a1” to “b1” are set to approximately the center between “0” to “84”. “A1” and “b1” are set to appropriate values between “0” and “84”, respectively. The predetermined target ranges “a1” to “b1” set in this way are divided into 256 equal parts, and values “0” to “255” are allocated, and the average value of the luminance of the pixels occupying the first small area Ry1 The point Pk1 to which Yav1 corresponds is specified. Then, a value between “0” and “84” corresponding to the point Pk1 is obtained. The obtained value is set as the input value “X1” of the point Ps1.

また、ポイントPs2の入力値『X2』を設定する場合には、図18Bに示すように、入力値『X2』が設定される『85』〜『169』の範囲内に、所定の対象範囲『a2』〜『b2』を設定する。この所定の対象範囲『a2』〜『b2』は、『85』〜『169』の間のほぼ中央に設定される。『a2』および『b2』は、それぞれ『85』〜『169』の間の適当な値に設定される。このようにして設定された所定の対象範囲『a2』〜『b2』を256等分して、『0』〜『255』の値を割り振り、第2小領域Ry2を占める画素の輝度の平均値Yav2が対応するポイントPk2を特定する。そして、このポイントPk2に対応する、『85』〜『169』の間の値を求める。この求めた値をポイントPs2の入力値『X2』として設定する。   When the input value “X2” of the point Ps2 is set, as shown in FIG. 18B, the predetermined target range “8” is set within the range of “85” to “169” where the input value “X2” is set. “a2” to “b2” are set. The predetermined target ranges “a2” to “b2” are set to approximately the center between “85” to “169”. “A2” and “b2” are set to appropriate values between “85” and “169”, respectively. The predetermined target ranges “a2” to “b2” set in this way are divided into 256 equal parts, and values of “0” to “255” are allocated, and the average value of the luminance of the pixels occupying the second small area Ry2 The point Pk2 to which Yav2 corresponds is specified. Then, a value between “85” and “169” corresponding to the point Pk2 is obtained. The obtained value is set as the input value “X2” of the point Ps2.

また、ポイントPs3の入力値『X3』を設定する場合には、図18Cに示すように、入力値『X3』が設定される『170』〜『255』の範囲内に、所定の対象範囲『a3』〜『b3』を設定する。この所定の対象範囲『a3』〜『b3』は、『170』〜『255』の間のほぼ中央に設定される。『a3』および『b3』は、それぞれ『170』〜『255』の間の適当な値に設定される。このようにして設定された所定の対象範囲『a3』〜『b3』を256等分して、『0』〜『255』の値を割り振り、第3小領域Ry3を占める画素の輝度の平均値Yav3が対応するポイントPk3を特定する。そして、このポイントPk3に対応する、『170』〜『255』の間の値を求める。この求めた値をポイントPs3の入力値『X3』として設定する。   When the input value “X3” of the point Ps3 is set, as shown in FIG. 18C, a predetermined target range “in the range of“ 170 ”to“ 255 ”where the input value“ X3 ”is set. “a3” to “b3” are set. The predetermined target ranges “a3” to “b3” are set to approximately the center between “170” to “255”. “A3” and “b3” are set to appropriate values between “170” and “255”, respectively. The predetermined target ranges “a3” to “b3” set in this way are divided into 256 equal parts, and values “0” to “255” are allocated, and the average value of the luminance of the pixels occupying the third small region Ry3 The point Pk3 to which Yav3 corresponds is specified. Then, a value between “170” and “255” corresponding to the point Pk3 is obtained. The obtained value is set as the input value “X3” of the point Ps3.

このように第1〜第3小領域Ry1、Ry2、Ry3を占める画素の輝度の平均値Yav1、Yav2、Yav3を反映して、3つのポイントPs1、Ps2、Ps3の各入力値『X1』、『X2』、『X3』を設定する際に、所定の対象範囲『a1』〜『b1』、『a2』〜『b2』、『a3』〜『b3』を設定するのは、次の理由からである。すなわち、第1〜第3小領域Ry1、Ry2、Ry3を占める画素の輝度の平均値Yav1、Yav2、Yav3をそのまま、入力値『X1』、『X2』、『X3』として設定した場合には、入力値『X1』、『X2』、『X3』が取り得る値の範囲が広くなり、このため、調整されるトーンカーブTcに大きな影響を与えてしまう虞があるからである。   As described above, the input values “X1”, “X1”, “X1” and “Ps3” of the three points Ps1, Ps2, and Ps3 reflect the average luminance values Yav1, Yav2, and Yav3 of the pixels that occupy the first to third small regions Ry1, Ry2, and Ry3. When setting “X2” and “X3”, the predetermined target ranges “a1” to “b1”, “a2” to “b2”, and “a3” to “b3” are set for the following reason. is there. That is, when the average values Yav1, Yav2, and Yav3 of the pixels that occupy the first to third small regions Ry1, Ry2, and Ry3 are set as input values “X1”, “X2”, and “X3” as they are, This is because the range of values that can be taken by the input values “X1”, “X2”, and “X3” is widened, and thus there is a possibility that the tone curve Tc to be adjusted will be greatly affected.

つまり、例えば、第1小領域Ry1を占める画素の輝度の平均値Yav1が非常に小さかったとする。当該平均値Yav1をそのままポイントPs1の入力値『X1』として設定して、図16上のトーンカーブTcにおいてポイントPs1を設定した場合、ポイントPs1の位置が図中左側へと移動して縦軸に接近するため、トーンカーブTcの立上りが非常に急峻となってしまう。また、第1小領域Ry1を占める画素の輝度の平均値Yav1が非常に大きかった場合には、ポイントPs1の位置が図中右側へと移動してポイントPs2に接近するため、トーンカーブTcの形状が歪んでしまう虞がある。この点に関しては、ポイントPs2、Ps3の場合についても同様である。   In other words, for example, it is assumed that the average luminance value Yav1 of the pixels occupying the first small region Ry1 is very small. When the average value Yav1 is set as it is as the input value “X1” of the point Ps1, and the point Ps1 is set in the tone curve Tc in FIG. 16, the position of the point Ps1 moves to the left side in the figure and moves to the vertical axis. Because of the approach, the rise of the tone curve Tc becomes very steep. Further, when the average value Yav1 of the luminance of the pixels occupying the first small region Ry1 is very large, the position of the point Ps1 moves to the right side in the drawing and approaches the point Ps2, so that the shape of the tone curve Tc May be distorted. The same applies to points Ps2 and Ps3.

そこで、ポイントPs1、Ps2、Ps3の位置が相互に接近し過ぎないようにするために、所定の対象範囲を規定する各値、即ち『a1』、『b1』、『a2』、『b2』、『a3』、『b3』をそれぞれ適宜な値に設定することで、トーンカーブTcの形状が歪にならないようにすることができる。   Therefore, in order to prevent the positions of the points Ps1, Ps2, and Ps3 from being too close to each other, each value that defines a predetermined target range, that is, “a1”, “b1”, “a2”, “b2”, By setting “a3” and “b3” to appropriate values, the shape of the tone curve Tc can be prevented from being distorted.

このようにしてスキャナドライバは、取得した2つの目標値Ym1、Ym2に基づき、補正情報として、「濃度補正」におけるトーンカーブTcを調整するための3つのポイントPs1、Ps2、Ps3を設定するための情報を生成する。   In this way, the scanner driver sets three points Ps1, Ps2, and Ps3 for adjusting the tone curve Tc in “density correction” as correction information based on the two target values Ym1 and Ym2 acquired. Generate information.

なお、本実施形態では、補正情報として3つのポイントPs1、Ps2、Ps3が設定されていたが、必ずしもこのように補正情報として3つのポイントPs1、Ps2、Ps3が設定されなくても良い。すなわち、補正情報として設定されるポイントの数としては、1つまたは2つであってもよく、さらに、4つ以上であっても構わない。設定されるポイントの数としては、レッド(R)、グリーン(G)およびブルー(B)の3色のヒストグラムにより表される領域を区分して得られる小領域の数に応じて適宜設定しても良く、また、属性情報を取得するために選出される小領域の数に応じて適宜設定しても良い。   In the present embodiment, the three points Ps1, Ps2, and Ps3 are set as the correction information. However, the three points Ps1, Ps2, and Ps3 are not necessarily set as the correction information. That is, the number of points set as correction information may be one or two, and may be four or more. The number of points to be set is appropriately set according to the number of small regions obtained by dividing the region represented by the three-color histogram of red (R), green (G), and blue (B). Alternatively, it may be set as appropriate according to the number of small areas selected to acquire the attribute information.

また、補正情報として設定される3つのポイントPs1、Ps2、Ps3にあっては、入力値が取り得る値の範囲、即ち本実施形態では『0』〜『255』を3つに区分して各区分の内にそれぞれ配置されるようにしなくても良い。   In addition, for the three points Ps1, Ps2, and Ps3 set as correction information, ranges of values that can be taken by the input value, that is, “0” to “255” in this embodiment are divided into three. It does not have to be arranged in each section.

また、本実施形態では、逆光補正処理として「濃度補正」が実行される関係により、補正情報として、「濃度補正」におけるトーンカーブTcを調整する3つのポイントPs1、Ps2、Ps3の設定情報を生成していたが、必ずしもこのような設定情報を補正情報として生成する必要はない。すなわち、逆光補正処理として実行される処理に応じて適切な情報を補正情報として生成すれば良い。   In the present embodiment, setting information of three points Ps1, Ps2, and Ps3 for adjusting the tone curve Tc in “density correction” is generated as correction information because of the relationship in which “density correction” is executed as the backlight correction processing. However, it is not always necessary to generate such setting information as correction information. That is, appropriate information may be generated as correction information in accordance with processing executed as backlight correction processing.

<逆光補正処理>
そして、スキャナドライバは、このようにして補正情報として生成した、「濃度補正」におけるトーンカーブTcを調整するための3つのポイントPs1、Ps2、Ps3に関する情報に基づき、画像読み取り装置10により読み取られた画像に対して逆光補正処理を施す。なお、本実施形態では、スキャナドライバは、「逆光補正処理部」に相当する。具体的には、図11にて説明した調整手順における「濃度補正」において、補正情報として生成された3つのポイントPs1、Ps2、Ps3に関する情報に基づき調整されたトーンカーブTcに基づき、画像読み取り装置10により読み取られた画像を構成する各画素のデータの各色の濃度値を変換する。これによって、スキャナドライバは、画像読み取り装置10により読み取られた画像に対して逆光補正処理を施す。
<Backlight correction processing>
The scanner driver is read by the image reading device 10 based on the information regarding the three points Ps1, Ps2, and Ps3 for adjusting the tone curve Tc in the “density correction” generated as correction information in this way. Backlight correction processing is performed on the image. In the present embodiment, the scanner driver corresponds to a “backlight correction processing unit”. Specifically, in the “density correction” in the adjustment procedure described with reference to FIG. 11, the image reading device is based on the tone curve Tc adjusted based on the information about the three points Ps1, Ps2, and Ps3 generated as the correction information. The density value of each color of the data of each pixel constituting the image read by 10 is converted. As a result, the scanner driver performs backlight correction processing on the image read by the image reading device 10.

なお、ここで逆光補正処理が施される画像は、図11に示す調整手順に従って、既にヒストグラム調整やイメージ調整((3)彩度の調整を除く)等が施された画像である。スキャナドライバは、このようにして既にヒストグラム調整やイメージ調整((3)彩度の調整を除く)等が施された画像に対して「濃度補正」により逆光補正処理を施す。   Here, the image subjected to the backlight correction processing is an image that has already been subjected to histogram adjustment, image adjustment (excluding (3) saturation adjustment), and the like according to the adjustment procedure shown in FIG. The scanner driver performs backlight correction processing by “density correction” on an image that has already been subjected to histogram adjustment, image adjustment (excluding (3) saturation adjustment), and the like in this way.

===その他応用例===
前述した判定方法では、レッド(R)、グリーン(G)およびブルー(B)の3色のヒストグラムにより表される領域をそれぞれ4つの小領域、即ち第1〜第4小領域Ry1、Ry2、Ry3、Ry4に区分していたが、必ずしもこのように4つの小領域Ry1、Ry2、Ry3、Ry4に区分する必要はない。つまり、レッド(R)、グリーン(G)およびブルー(B)の3色のヒストグラムにより表される領域は、少なくとも2つ以上の小領域に区分されれば良く、3つの小領域に区分されても良く、また5つ以上の小領域に区分されても良い。
=== Other application examples ===
In the determination method described above, regions represented by the histograms of three colors of red (R), green (G), and blue (B) are each divided into four small regions, that is, first to fourth small regions Ry1, Ry2, and Ry3. However, it is not always necessary to divide into four small regions Ry1, Ry2, Ry3, and Ry4. That is, the region represented by the histogram of three colors of red (R), green (G), and blue (B) may be divided into at least two or more small regions. It may also be divided into five or more small areas.

また、前述した判定方法では、レッド(R)、グリーン(G)およびブルー(B)の3色のヒストグラムにより表される領域を区分して得られた4つの小領域Ry1、Ry2、Ry3、Ry4に、相互に面積がほぼ等しく、また相互に画素数がほぼ等しい3つの小領域Ry1、Ry2、Ry3が含まれていたが、必ずしもこのように面積や画素数が相互にほぼ等しい小領域が設けられる必要はない。また、必ずしもこのように面積または画素数が相互にほぼ等しい小領域が3つ設けられる場合には限られず、2つであっても良く、また4つ以上であっても良い。   In the determination method described above, four small regions Ry1, Ry2, Ry3, and Ry4 obtained by dividing the region represented by the histogram of three colors of red (R), green (G), and blue (B). In addition, three small regions Ry1, Ry2, and Ry3 having substantially the same area and the same number of pixels are included. However, the small regions having the substantially same area and the same number of pixels are provided as described above. There is no need to be done. In addition, the present invention is not necessarily limited to the case where three small regions having substantially the same area or number of pixels are provided as described above, and may be two or four or more.

また、前述した判定方法では、レッド(R)、グリーン(G)およびブルー(B)の3色のヒストグラムにより表される領域を区分して得られた第1〜第4小領域Ry1、Ry2、Ry3、Ry4の中から第1〜第3小領域Ry1、Ry2、Ry3が選出されていたが、必ずしもこのように選出される場合には限られない。つまり、レッド(R)、グリーン(G)およびブルー(B)の3色のヒストグラムにより表される領域を区分して得られた2つ以上の小領域の中からは、少なくとも1つの小領域を選出すれば良く、第1〜第3小領域Ry1、Ry2、Ry3のうちのいずれか1つのみを選出しても良い。また、ここで説明した方法以外の方法により小領域が区分された場合には、他の手法により小領域を選出しても良い。   In the above-described determination method, the first to fourth small regions Ry1, Ry2, obtained by dividing the region represented by the histogram of three colors of red (R), green (G), and blue (B), The first to third small regions Ry1, Ry2, and Ry3 are selected from Ry3 and Ry4. However, the selection is not necessarily limited to this. That is, at least one small region is selected from two or more small regions obtained by dividing the region represented by the histogram of three colors of red (R), green (G), and blue (B). It suffices to select one, and only one of the first to third small regions Ry1, Ry2, Ry3 may be selected. In addition, when the small area is divided by a method other than the method described here, the small area may be selected by another method.

また、前述した判定方法では、選出した小領域、即ちここでは、第1〜第3小領域Ry1、Ry2、Ry3からそれぞれ属性情報として、各色別に第1〜第3小領域Ry1、Ry2、Ry3を占める画素の濃度値の平均値AVr1、AVr2、AVr3、AVg1、AVg2、AVg3、AVb1、AVb2、AVb3を取得していたが、必ずしもこのような属性情報を取得しなくても良い。すなわち、選出した小領域から取得する属性情報としては、どのような属性情報であっても良く、例えば、選出した第1〜第3小領域Ry1、Ry2、Ry3を占める画素の濃度値の上限値または下限値や、選出された第1〜第3小領域Ry1、Ry2、Ry3の面積の大きさ等であっても良い。なお、選出した小領域から取得する属性情報としては、逆光補正処理を実行する上で有力となる情報が望ましい。   In the above-described determination method, the first to third small regions Ry1, Ry2, and Ry3 are assigned to each color as attribute information from the selected small regions, that is, the first to third small regions Ry1, Ry2, and Ry3. The average values AVr1, AVr2, AVr3, AVg1, AVg2, AVg3, AVb1, AVb2, and AVb3 of the density values of the occupied pixels are acquired, but such attribute information is not necessarily acquired. That is, any attribute information may be used as attribute information acquired from the selected small area. For example, the upper limit value of the density value of the pixels occupying the selected first to third small areas Ry1, Ry2, and Ry3. Alternatively, it may be the lower limit value, the size of the area of the selected first to third small regions Ry1, Ry2, and Ry3. In addition, as attribute information acquired from the selected small area, information that is influential in executing the backlight correction processing is desirable.

また、前述した判定方法では、選出した第1〜第3小領域Ry1、Ry2、Ry3からそれぞれ属性情報として取得した、各色別に第1〜第3小領域Ry1、Ry2、Ry3を占める画素の濃度値の平均値AVr1、AVr2、AVr3、AVg1、AVg2、AVg3、AVb1、AVb2、AVb3に基づき、輝度に関する情報を取得し、さらにその輝度に関する情報に基づき目標値を取得して、その目標値に基づき補正情報を生成していたが、逆光補正処理を実行するための補正情報としては、必ずしもこのような方法により生成されなくても構わない。つまり、選出した第1〜第3小領域Ry1、Ry2、Ry3から取得した属性情報に基づき、他の方法により補正情報を生成しても良い。   In the above-described determination method, the density values of the pixels occupying the first to third small regions Ry1, Ry2, and Ry3 for each color obtained as attribute information from the selected first to third small regions Ry1, Ry2, and Ry3, respectively. Based on the average value AVr1, AVr2, AVr3, AVg1, AVg2, AVg3, AVb1, AVb2, and AVb3, and obtains a target value based on the information on the luminance, and corrects based on the target value. Although the information is generated, the correction information for executing the backlight correction process does not necessarily have to be generated by such a method. That is, the correction information may be generated by another method based on the attribute information acquired from the selected first to third small regions Ry1, Ry2, and Ry3.

また、前述した判定方法では、逆光補正処理として、「濃度補正」においてトーンカーブTcを調整することにより実施していたが、必ずしもこのような方法により逆光補正処理が施される必要はない。すなわち、逆光画像に対して補正処理を施すことができる逆光補正処理であれば、どのような逆光補正処理が実行されても構わない。   In the above-described determination method, the backlight correction process is performed by adjusting the tone curve Tc in “density correction”. However, the backlight correction process is not necessarily performed by such a method. That is, any backlight correction process may be executed as long as it is a backlight correction process capable of performing a correction process on the backlight image.

===まとめ===
以上、本実施形態にあっては、画像読み取り装置10により読み取られた画像を構成する各画素のデータに基づき、レッド(R)、グリーン(G)およびブルー(B)の3色のヒストグラムを生成して、これらのヒストグラムにより表される領域をそれぞれ4つの小領域、即ち第1〜第4小領域Ry1、Ry2、Ry3、Ry4に区分して、これら4つの小領域Ry1、Ry2、Ry3、Ry4の中から3つの小領域、即ち第1〜第3小領域Ry1、Ry2、Ry3を各色別に選出して、これら第1〜第3小領域Ry1、Ry2、Ry3からそれぞれ属性情報を取得して、これらの属性情報に基づき、逆光補正処理を施すための補正情報を生成して、この補正情報に基づき、画像読み取り装置10により読み取られた画像に対して逆光補正処理を施すから、画像読み取り装置10により読み取られた画像に対して適切な逆光補正処理を施すことができる。
=== Summary ===
As described above, in the present embodiment, a histogram of three colors of red (R), green (G), and blue (B) is generated based on the data of each pixel constituting the image read by the image reading device 10. The regions represented by these histograms are divided into four small regions, that is, first to fourth small regions Ry1, Ry2, Ry3, Ry4, and these four small regions Ry1, Ry2, Ry3, Ry4 are divided. Three sub-regions, that is, first to third sub-regions Ry1, Ry2, Ry3 are selected for each color, and attribute information is obtained from each of the first to third sub-regions Ry1, Ry2, Ry3, Based on these attribute information, correction information for performing the backlight correction process is generated, and the backlight correction process is performed on the image read by the image reading device 10 based on the correction information. It can be provided with suitable backlight enhancement process on read by looking up device 10 images.

また、レッド(R)、グリーン(G)およびブルー(B)の各色のヒストグラムにより表される領域をそれぞれ区分して得られた第1〜第4小領域Ry1、Ry2、Ry3、Ry4の中に、相互に面積および画素数がほぼ等しい第1〜第3小領域Ry1、Ry2、Ry3が設けられ、これら第1〜第3小領域Ry1、Ry2、Ry3からそれぞれ属性情報を取得することで、画像読み取り装置10により読み取られた画像に対してより適切な逆光補正処理を施すことができる。   Further, among the first to fourth small regions Ry1, Ry2, Ry3, and Ry4 obtained by dividing the regions represented by the histograms of red (R), green (G), and blue (B), respectively. The first to third small regions Ry1, Ry2, and Ry3 having substantially the same area and the same number of pixels are provided, and attribute information is acquired from each of the first to third small regions Ry1, Ry2, and Ry3 to obtain an image. More appropriate backlight correction processing can be performed on the image read by the reading device 10.

また、属性情報として、選出された第1〜第3小領域Ry1、Ry2、Ry3を占める画素の各色の濃度値の平均値AVr1、AVr2、AVr3、AVg1、AVg2、AVg3、AVb1、AVb2、AVb3を取得することで、より適切な補正情報を生成して、画像読み取り装置10により読み取られた画像に対してより適切な逆光補正処理を施すことができる。   As attribute information, average values AVr1, AVr2, AVr3, AVg1, AVg2, AVg3, AVb1, AVb2, AVb3 of the density values of the colors of the pixels occupying the selected first to third small regions Ry1, Ry2, Ry3 are used. By acquiring, more appropriate correction information can be generated, and more appropriate backlight correction processing can be performed on the image read by the image reading device 10.

また、選出された第1〜第3小領域Ry1、Ry2、Ry3を占める画素の各色の濃度値の平均値AVr1、AVr2、AVr3、AVg1、AVg2、AVg3、AVb1、AVb2、AVb3に基づき、第1〜第3小領域Ry1、Ry2、Ry3を占める画素の輝度の平均値Yav1、Yav2、Yav3を取得することで、より適切な補正情報を生成して、画像読み取り装置10により読み取られた画像に対してより適切な逆光補正処理を施すことができる。   Further, based on the average values AVr1, AVr2, AVr3, AVg1, AVg2, AVg3, AVb1, AVb2, AVb3 of the density values of the colors of the pixels occupying the selected first to third small regions Ry1, Ry2, Ry3, the first ~ By obtaining the average values Yav1, Yav2, and Yav3 of the luminance of the pixels that occupy the third small regions Ry1, Ry2, and Ry3, more appropriate correction information is generated, and the image read by the image reading device 10 is obtained. Thus, a more appropriate backlight correction process can be performed.

また、取得した第1小領域Ry1を占める画素の輝度の平均値Yav1と、画像の全体の輝度の平均値Yav0とを加算して加算値Saddを取得することで、より適切な補正情報を生成して、画像読み取り装置10により読み取られた画像に対してより適切な逆光補正処理を施すことができる。   Further, by adding the acquired average luminance value Yav1 of the pixels occupying the first small region Ry1 and the average luminance value Yav0 of the entire image, the addition value Sadd is acquired to generate more appropriate correction information. Thus, a more appropriate backlight correction process can be performed on the image read by the image reading device 10.

また、逆光補正処理として「濃度補正」を実行することで、画像読み取り装置10により読み取られた画像に対して簡単に逆光補正処理を施すことができる。   Further, by executing “density correction” as the backlight correction process, the backlight correction process can be easily performed on the image read by the image reading device 10.

===印刷装置への適用===
このような画像読み取り装置10にあっては、印刷装置に搭載されても良い。図19は、このような画像読み取り装置10を備えた印刷装置220の構成例を説明したものである。この印刷装置220は、原稿から画像を読み取って画像データを生成するスキャナ機能と、ホストコンピュータ248から送られてきた印刷データに基づき印刷用紙等の各種媒体に印刷を施すプリンタ機能と、原稿から読み取った画像を媒体に印刷して複写するローカルコピー機能とを備えた複合装置である。この印刷装置220は、原稿から画像を読み取るスキャナ部222(スキャナ制御部238を含め、ここでいう「画像読み取り装置10」に相当する)と、印刷用紙等の媒体Sに印刷を施すプリンタ部224とを備えている。
=== Application to printing apparatus ===
Such an image reading apparatus 10 may be mounted on a printing apparatus. FIG. 19 illustrates a configuration example of a printing apparatus 220 including such an image reading apparatus 10. The printing apparatus 220 includes a scanner function for reading an image from a document and generating image data, a printer function for printing on various media such as printing paper based on print data sent from the host computer 248, and a reading function from the document. And a local copy function for copying a printed image on a medium. The printing apparatus 220 includes a scanner unit 222 that reads an image from a document (including the scanner control unit 238 and corresponds to the “image reading apparatus 10” herein), and a printer unit 224 that performs printing on a medium S such as printing paper. And.

さらにこの印刷装置220の制御部226には、同図に示すように、CPU228と、メモリ230と、外部通信インターフェイス232と、操作入力インターフェイス234と、表示制御部236と、スキャナ制御部238と、画像処理部240と、プリンタ制御部242と、カードインターフェイス244と、これらを相互に接続するバス246とを備えている。   Further, the control unit 226 of the printing apparatus 220 includes a CPU 228, a memory 230, an external communication interface 232, an operation input interface 234, a display control unit 236, a scanner control unit 238, as shown in FIG. An image processing unit 240, a printer control unit 242, a card interface 244, and a bus 246 for connecting them to each other are provided.

CPU228は、この印刷装置220全体の制御を司る。メモリ230は、CPU228により実行されるプログラムやそのプログラムで使用されるデータ等が格納される。外部通信インターフェイス232は、ホストコンピュータ248との間で有線または無線等により通信を行う。操作入力インターフェイス234は、操作ボタン250等を通じてユーザから操作入力を受け付ける。表示制御部236は、液晶ディスプレイ252等の表示部を制御する。   The CPU 228 controls the entire printing apparatus 220. The memory 230 stores a program executed by the CPU 228, data used in the program, and the like. The external communication interface 232 communicates with the host computer 248 by wire or wireless. The operation input interface 234 receives an operation input from the user through the operation button 250 or the like. The display control unit 236 controls a display unit such as the liquid crystal display 252.

一方、スキャナ制御部238は、スキャナ部222を制御して原稿から画像を読み取る読み取り動作を実行する。画像処理部240は、スキャナ部222により原稿から読み取られた画像をプリンタ部224にて媒体に印刷するために、スキャナ部222から出力された画像のデータをプリンタ部224にて印刷処理を実行するためのデータに変換する役割を果たす。プリンタ制御部242は、プリンタ部224を制御する。また、カードインターフェイス244は、カードリーダー部254にセットされた各種メモリカードから、当該メモリカードに格納された画像データを読み込む処理等を行う。   On the other hand, the scanner control unit 238 controls the scanner unit 222 to execute a reading operation for reading an image from a document. The image processing unit 240 executes print processing on the image data output from the scanner unit 222 by using the printer unit 224 in order to print an image read from the document by the scanner unit 222 on a medium by the printer unit 224. To play a role in converting data. The printer control unit 242 controls the printer unit 224. The card interface 244 performs processing for reading image data stored in the memory card from various memory cards set in the card reader unit 254.

そして、この印刷装置220は、スキャナ機能時には、スキャナ部222により原稿から読み取った画像のデータをホストコンピュータ248に出力する。また、プリンタ機能時には、この印刷装置220は、ホストコンピュータ248から送られてきた印刷データに基づき、プリンタ部224によって各種媒体に印刷を施す。また、ローカルコピー機能時には、この印刷装置220は、スキャナ部222により原稿から読み取った画像をプリンタ部224によって各種媒体に印刷して複写する。   In the scanner function, the printing apparatus 220 outputs image data read from the document by the scanner unit 222 to the host computer 248. In the printer function, the printing apparatus 220 performs printing on various media by the printer unit 224 based on the print data sent from the host computer 248. In the local copy function, the printing apparatus 220 prints an image read from a document by the scanner unit 222 on various media by the printer unit 224 and copies it.

===その他の実施の形態===
以上、本発明について画像読み取りシステムの一実施形態を例にして説明したが、上記の実施の形態は、本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。本発明は、その趣旨を逸脱することなく、変更または改良され得るとともに、本発明には、その等価物が含まれることは言うまでもない。特に、以下に述べる実施形態であっても、本発明に含まれるものである。
=== Other Embodiments ===
The present invention has been described above by taking an embodiment of an image reading system as an example. However, the above embodiment is for facilitating the understanding of the present invention, and is intended to limit the present invention. Is not. The present invention can be changed or improved without departing from the gist thereof, and needless to say, the present invention includes equivalents thereof. In particular, the embodiments described below are also included in the present invention.

<画像について>
前述した実施の形態では、逆光補正処理が施される画像として、画像読み取り装置10により読み取られた画像を例にして説明したが、ここでいう「画像」としては、どのような画像であっても良い。例えば、具体的には、デジタルカメラ等により撮影された画像などであっても良い。また、画像の形式としては、どのようなタイプであっても良く、例えば、JPEG形式やビットマップ形式、YUV形式等の各種形式により表現される画像であっても良い。
<About images>
In the above-described embodiment, the image read by the image reading device 10 is described as an example of the image subjected to the backlight correction process. However, the “image” referred to here is any image. Also good. For example, specifically, an image taken by a digital camera or the like may be used. The image format may be any type, for example, an image expressed in various formats such as a JPEG format, a bitmap format, and a YUV format.

<濃度値について>
前述した実施の形態では、「濃度値」として、256階調にて表現される濃度値、即ち例えば「0」〜「255」の値を取り得る濃度値を例にして説明したが、ここでいう「濃度値」にあっては、このような濃度値には限らない。すなわち、ここでいう「濃度値」にあっては、画像を構成する各画素の濃淡を表現するためのデータであればどのような濃度値であっても良い。なお、この「濃度値」には、YUV形式等により表される輝度の濃度値も含まれる。
<About concentration values>
In the above-described embodiment, the density value expressed in 256 gradations, that is, the density value that can take values of “0” to “255”, for example, has been described as an example. The “density value” is not limited to such a density value. In other words, the “density value” here may be any density value as long as it is data for expressing the density of each pixel constituting the image. The “density value” includes a brightness density value expressed in a YUV format or the like.

<ヒストグラムについて>
前述した実施の形態では、「ヒストグラムのデータ」として、レッド(R)、グリーン(G)およびブルー(B)の3色のヒストグラムのデータが生成されていたが、ここでいう「ヒストグラムのデータ」にあっては、必ずしもこれらレッド(R)、グリーン(G)およびブルー(B)の3色のヒストグラムのデータが生成される場合には限られない。つまり、少なくとも2種類以上の異なる色のヒストグラムのデータが「ヒストグラムのデータ」として生成されても良く、また、1種類の色のヒストグラムのデータ、例えばブラック(『黒』)のヒストグラムのデータが、「ヒストグラムのデータ」として生成されても良い。
<About the histogram>
In the embodiment described above, histogram data of three colors of red (R), green (G), and blue (B) is generated as “histogram data”. In this case, it is not always the case that the histogram data of these three colors of red (R), green (G) and blue (B) is generated. That is, at least two or more types of different color histogram data may be generated as “histogram data”, and one type of color histogram data, for example, black (“black”) histogram data, It may be generated as “histogram data”.

<ヒストグラムデータ生成部について>
前述した実施の形態では、「ヒストグラムデータ生成部」として、スキャナドライバが、判定対象となる画像、即ちここでは画像読み取り装置10により読み取られた画像を構成する画素のデータに基づき、ヒストグラムのデータを生成していたが、ここでいう「ヒストグラムデータ生成部」にあっては、必ずしもこのようなスキャナドライバである必要はない。つまり、ここでいう「ヒストグラムデータ生成部」にあっては、判定対象となる画像を構成する画素のデータに基づき、ヒストグラムのデータを生成するのであれば、どのようなタイプの「ヒストグラムデータ生成部」であっても構わない。
<About the histogram data generator>
In the above-described embodiment, as the “histogram data generation unit”, the scanner driver calculates the histogram data based on the data of the pixels constituting the image to be determined, that is, the image read by the image reading device 10 here. However, the “histogram data generation unit” here does not necessarily need to be such a scanner driver. In other words, in the “histogram data generation unit” here, any type of “histogram data generation unit” can be used as long as histogram data is generated based on the data of the pixels constituting the image to be determined. It does not matter.

<属性情報取得部について>
前述した実施の形態では、「属性情報取得部」として、スキャナドライバが、レッド(R)、グリーン(G)およびブルー(B)の各色のヒストグラムにより表される領域を濃度値の大きさ別に2つ以上の小領域に区分して、これら2つ以上の小領域の中から少なくとも1つの小領域を選出して、この選出した小領域から属性情報を取得していたが、ここでいう「属性情報取得部」にあっては、必ずしもこのようなスキャナドライバである必要はない。つまり、ここでいう「属性情報取得部」にあっては、前述したような手法により属性情報を取得するのであれば、どのようなタイプの「属性情報取得部」であっても構わない。
<About the attribute information acquisition unit>
In the above-described embodiment, as the “attribute information acquisition unit”, the scanner driver determines that the region represented by the histogram of each color of red (R), green (G), and blue (B) is divided into two values according to the density value. It was divided into two or more small areas, and at least one small area was selected from these two or more small areas, and attribute information was acquired from the selected small areas. The “information acquisition unit” does not necessarily need to be such a scanner driver. In other words, the “attribute information acquisition unit” here may be any type of “attribute information acquisition unit” as long as the attribute information is acquired by the method described above.

<補正情報について>
前述した実施の形態では、逆光補正処理として、「濃度補正」が実行される関係により、補正情報として、「濃度補正」におけるトーンカーブTcを調整するための任意のポイントに関する設定情報を生成していたが、必ずしもこのような設定情報が補正情報として生成される場合には限られない。つまり、画像に対して逆光補正処理を施すための補正情報であれば、どのようなタイプの補正情報が生成されても構わない。
<About correction information>
In the above-described embodiment, as the backlight correction process, setting information related to an arbitrary point for adjusting the tone curve Tc in the “density correction” is generated as the correction information because of the relationship in which “density correction” is executed. However, the setting information is not necessarily generated as correction information. That is, any type of correction information may be generated as long as it is correction information for performing backlight correction processing on an image.

<補正情報生成部について>
前述した実施の形態では、「補正情報生成部」として、スキャナドライバが、補正情報として、「濃度補正」におけるトーンカーブTcを調整するための任意のポイントに関する設定情報を生成していたが、ここでいう「補正情報生成部」にあっては、必ずしもこのようなスキャナドライバである必要はない。つまり、ここでいう「補正情報生成部」にあっては、画像に対して逆光補正処理を施すための補正情報を取得するのであれば、どのようなタイプの「補正情報生成部」であっても構わない。
<About the correction information generation unit>
In the above-described embodiment, as the “correction information generation unit”, the scanner driver generates setting information regarding an arbitrary point for adjusting the tone curve Tc in “density correction” as correction information. In the “correction information generation unit”, it is not always necessary to use such a scanner driver. In other words, the “correction information generation unit” here is any type of “correction information generation unit” as long as the correction information for performing the backlight correction process on the image is acquired. It doesn't matter.

<逆光補正処理部について>
前述した実施の形態では、「逆光補正処理部」として、スキャナドライバが、画像読み取り装置により読み取られた画像に対して逆光補正処理を施していたが、ここでいう「逆光補正処理部」にあっては、必ずしもこのようなスキャナドライバである必要はない。つまり、ここでいう「逆光補正処理部」にあっては、画像に対して逆光補正処理を施すのであれば、どのようなタイプの「逆光補正処理部」であっても構わない。
<Backlight correction processing unit>
In the above-described embodiment, the scanner driver performs the backlight correction processing on the image read by the image reading device as the “backlight correction processing unit”. Therefore, it is not always necessary to use such a scanner driver. In other words, the “backlight correction processing section” here may be any type of “backlight correction processing section” as long as the backlight correction processing is performed on the image.

<画像読み取り装置について>
前述した実施の形態では、「画像読み取り装置」として、画像を読み取るイメージセンサ50が、原稿台12にセットされた原稿15に対して相対的に移動するキャリッジ40に設けられた画像読み取り装置を例にして説明したが、ここでいう「画像読み取り装置」にあっては、必ずしもこのようなタイプの「画像読み取り装置」には限られない。つまり、原稿から画像を読み取る装置であれば、どのようなタイプの装置もここでいう「画像読み取り装置」に含まれる。すなわち、ここでいう「画像読み取り装置」にあっては、原稿15が画像を読み取るイメージセンサ50に対して相対的に移動して原稿15から画像を読み取るような画像読み取り装置も含まれる。
<About image reader>
In the above-described embodiment, the “image reading device” is an image reading device in which the image sensor 50 that reads an image is provided on the carriage 40 that moves relative to the document 15 set on the document table 12. As described above, the “image reading apparatus” here is not necessarily limited to this type of “image reading apparatus”. In other words, any type of apparatus is included in the “image reading apparatus” as long as the apparatus reads an image from a document. That is, the “image reading device” here includes an image reading device in which the document 15 moves relative to the image sensor 50 that reads an image and reads an image from the document 15.

<印刷装置について>
前述した実施の形態では、「印刷装置」として、原稿15から画像を読み取って画像データを生成する画像読み取り部(スキャナ部222)と、媒体に対して印刷を施す印刷部(プリンタ部224)とを備えた「複合装置」の場合を例にして説明したが、ここでいう「印刷装置」にあっては、必ずしもこのように画像読み取り部(スキャナ部222(スキャナ制御部238や画像処理部240等も含む))を備えている必要はない。すなわち、ここでいう「印刷装置」としては、媒体に対して印刷を施す印刷部を少なくとも備えていれば良い。
<About printing devices>
In the above-described embodiment, as the “printing device”, an image reading unit (scanner unit 222) that reads an image from the document 15 and generates image data, and a printing unit (printer unit 224) that performs printing on a medium. However, the “printing apparatus” described here is not necessarily limited to the image reading unit (scanner unit 222 (scanner control unit 238 or image processing unit 240). Etc.))) is not necessary. In other words, the “printing apparatus” here may include at least a printing unit that performs printing on a medium.

画像読み取りシステムの一実施形態の説明図。1 is an explanatory diagram of an embodiment of an image reading system. FIG. 画像読み取り装置の内部構成の一例の説明図。FIG. 3 is an explanatory diagram illustrating an example of an internal configuration of an image reading apparatus. 画像読み取り装置のシステム構成の一例の説明図。1 is an explanatory diagram illustrating an example of a system configuration of an image reading apparatus. FIG. コンピュータ本体のシステム構成の一例の説明図。Explanatory drawing of an example of the system configuration | structure of a computer main body. スキャナドライバのメインのダイアログボックスの一例の説明図。FIG. 3 is an explanatory diagram illustrating an example of a main dialog box of a scanner driver. ヒストグラム調整のダイアログボックスの一例の説明図。FIG. 6 is an explanatory diagram illustrating an example of a dialog box for adjusting a histogram. トーンカーブの規定方法についての説明図。Explanatory drawing about the definition method of a tone curve. 濃度補正のダイアログボックスの一例の説明図。FIG. 4 is an explanatory diagram of an example of a density correction dialog box. イメージ調整のダイアログボックスの一例の説明図。Explanatory drawing of an example of the dialog box of an image adjustment. ヒストグラム調整により設定されるデータの説明図。Explanatory drawing of the data set by histogram adjustment. 濃度補正により設定されるデータの説明図。Explanatory drawing of the data set by density correction. イメージ調整により設定されるデータの説明図。Explanatory drawing of the data set by image adjustment. 画像の調整手順の一例の説明図。Explanatory drawing of an example of the adjustment procedure of an image. 画像読み取り手順の一例の説明図。Explanatory drawing of an example of an image reading procedure. 逆光画像の補正方法を説明するフローチャート。The flowchart explaining the correction method of a backlight image. ヒストグラムの一例の説明図。An explanatory view of an example of a histogram. 目標値の取得方法の一例の説明図。Explanatory drawing of an example of the acquisition method of target value. 補正情報の生成方法の一例の説明図。Explanatory drawing of an example of the production | generation method of correction information. ポイントPs1の設定方法の一例の説明図。Explanatory drawing of an example of the setting method of point Ps1. ポイントPs2の設定方法の一例の説明図。Explanatory drawing of an example of the setting method of point Ps2. ポイントPs1の入力値『X1』の他の設定方法の一例の説明図。Explanatory drawing of an example of the other setting method of input value "X1" of point Ps1. ポイントPs2の入力値『X2』の他の設定方法の一例の説明図。Explanatory drawing of an example of the other setting method of input value "X2" of point Ps2. ポイントPs3の入力値『X3』の他の設定方法の一例の説明図。Explanatory drawing of an example of the other setting method of input value "X3" of point Ps3. 印刷装置の一実施形態を示した説明図。FIG. 3 is an explanatory diagram illustrating an embodiment of a printing apparatus.

符号の説明Explanation of symbols

2 画像読み取りシステム、10 画像読み取り装置、12 原稿台、
14 原稿台カバー、15 原稿、18 ヒンジ部、20 コンピュータ装置、
22 コンピュータ本体、24 表示装置、26 入力装置、
28 FDドライブ装置、30 CD−ROMドライブ装置、32 読み取り装置、
34 キーボード、36 マウス、40 キャリッジ、42 駆動機構、
44 ガイド、46 露光ランプ、48 レンズ、50 イメージセンサ、
52 制御部、54 タイミングベルト、55 プーリ、56 プーリ、
58 駆動モータ、60 コントローラ、62 モータ制御部、64 ランプ制御部、
66 センサ制御部、68 AFE(Analog Front End)部、
70 デジタル処理回路、72 インターフェイス回路、
74 アナログ信号処理回路、76 A/D変換回路、
80 CPU、82 メモリ、84 HDD(ハードディスクドライブ装置)、
86 操作入力部、88 表示制御部、90 外部通信部、92 バス、
100 ダイアログボックス、102 『モード選択欄』、104 『設定保存』、
106 『原稿設定欄』、108 『出力設定欄』、110 『調整欄』、
112 「原稿種」、114 「読み込み装置」、116 「自動露出」、
118 「イメージタイプ」、120 「解像度」、122 「原稿サイズ」、
124 「出力サイズ」、126 「スキャンボタン」、
127 「プレビューボタン」、128A ボタン、128B ボタン、
128C ボタン、128D ボタン、128E ボタン、
130A チェックボックス、130B チェックボックス、
130C チェックボックス、130D チェックボックス、
130E チェックボックス、131 ダイアログボックス、
132 ヒストグラム表示欄、134 トーンカーブ表示欄、
136 グレーバランス調整欄、138 チャンネル欄、
140A スライダー、140B スライダー、140C スライダー、
142A 数値入力欄、142B 数値入力欄、142C 数値入力欄、
142D 数値入力欄、142E 数値入力欄、143A スポイトボタン、
143B スポイトボタン、143C スポイトボタン、
144A 端部カーブ形状変更ボタン、144B 端部カーブ形状変更ボタン、
145 スライダー、150 ダイアログボックス、152 トーンカーブ表示部、
154 チャンネル欄、156A 数値入力欄、156B 数値入力欄、
158 濃度補正設定保存欄、160 ダイアログボックス、
162A スライダー、162B スライダー、162C スライダー、
162D スライダー、162E スライダー、162F スライダー、
164A 数値入力欄、164B 数値入力欄、164C 数値入力欄、
164D 数値入力欄、164E 数値入力欄、164F 数値入力欄、
220 印刷装置、222 スキャナ部、
224 プリンタ部、226 制御部、228 CPU、230 メモリ、
232 外部通信インターフェイス、234 操作入力インターフェイス、
236 表示制御部、238 スキャナ制御部、240 画像処理部、
242 プリンタ制御部、244 カードインターフェイス、
246 バス、248 ホストコンピュータ、250 操作ボタン、
252 液晶ディスプレイ、254 カードリーダー部
2 image reading system, 10 image reading device, 12 document table,
14 Document cover, 15 Document, 18 Hinge, 20 Computer device,
22 computer body, 24 display device, 26 input device,
28 FD drive device, 30 CD-ROM drive device, 32 reading device,
34 keyboard, 36 mouse, 40 carriage, 42 drive mechanism,
44 guide, 46 exposure lamp, 48 lens, 50 image sensor,
52 control unit, 54 timing belt, 55 pulley, 56 pulley,
58 drive motor, 60 controller, 62 motor controller, 64 lamp controller,
66 sensor control unit, 68 AFE (Analog Front End) unit,
70 digital processing circuit, 72 interface circuit,
74 analog signal processing circuit, 76 A / D conversion circuit,
80 CPU, 82 memory, 84 HDD (hard disk drive),
86 operation input unit, 88 display control unit, 90 external communication unit, 92 bus,
100 dialog box, 102 “mode selection field”, 104 “save setting”,
106 “Original setting field”, 108 “Output setting field”, 110 “Adjustment field”,
112 “Document Type”, 114 “Scanning Device”, 116 “Auto Exposure”,
118 “Image type”, 120 “Resolution”, 122 “Original size”,
124 “Output Size”, 126 “Scan Button”,
127 “Preview button”, 128A button, 128B button,
128C button, 128D button, 128E button,
130A check box, 130B check box,
130C check box, 130D check box,
130E check box, 131 dialog box,
132 Histogram display field, 134 Tone curve display field,
136 Gray balance adjustment field, 138 channel field,
140A slider, 140B slider, 140C slider,
142A Numerical input field, 142B Numerical input field, 142C Numerical input field,
142D numeric input field, 142E numeric input field, 143A syringe button,
143B syringe button, 143C syringe button,
144A End curve shape change button, 144B End curve shape change button,
145 slider, 150 dialog box, 152 tone curve display,
154 Channel field, 156A Numerical value input field, 156B Numerical value input field,
158 Density correction setting save field, 160 dialog box,
162A slider, 162B slider, 162C slider,
162D slider, 162E slider, 162F slider,
164A Numerical input field, 164B Numerical input field, 164C Numerical input field,
164D numeric input field, 164E numeric input field, 164F numeric input field,
220 printing device, 222 scanner unit,
224 printer unit, 226 control unit, 228 CPU, 230 memory,
232 External communication interface, 234 operation input interface,
236 Display control unit, 238 Scanner control unit, 240 Image processing unit,
242 Printer control unit, 244 card interface,
246 bus, 248 host computer, 250 operation buttons,
252 LCD display, 254 card reader

Claims (18)

(A)画像を構成する画素のデータに基づき、前記画素の各色の濃度値に対する前記画素の数の分布を表わす各色別のヒストグラムのデータを生成するヒストグラムデータ生成部と、
(B)前記ヒストグラムデータ生成部により生成された前記各色別のヒストグラムのデータに基づき、前記各色別のヒストグラムにより表される領域をそれぞれ前記濃度値の大きさ別に2つ以上の小領域に区分して、これら2つ以上の小領域の中から少なくとも1つの小領域を選出して、当該小領域に関する属性情報を各色別に取得する属性情報取得部と、
(C)前記属性情報取得部により取得された各色別の前記属性情報に基づき、前記画像に対して逆光補正処理を施すための補正情報を生成する補正情報生成部と、
(D)前記補正情報生成部により生成された前記補正情報に基づき、前記画像に対して前記逆光補正処理を施す逆光補正処理部と、
(E)を備えたことを特徴とする逆光画像補正装置。
(A) a histogram data generation unit that generates histogram data for each color representing the distribution of the number of pixels with respect to the density value of each color of the pixels based on data of pixels constituting the image;
(B) Based on the histogram data for each color generated by the histogram data generation unit, the area represented by the histogram for each color is divided into two or more small areas for each density value. An attribute information acquisition unit that selects at least one small area from the two or more small areas and acquires attribute information about the small area for each color;
(C) a correction information generation unit that generates correction information for performing backlight correction processing on the image based on the attribute information for each color acquired by the attribute information acquisition unit;
(D) a backlight correction processing unit that performs the backlight correction processing on the image based on the correction information generated by the correction information generation unit;
A backlight image correction device comprising (E).
前記各色別のヒストグラムのデータとして、レッド、グリーンおよびブルーの各色のヒストグラムデータが前記ヒストグラムデータ生成部により生成されることを特徴とする請求項1に記載の逆光画像補正装置。   2. The backlight image correction apparatus according to claim 1, wherein the histogram data generation unit generates histogram data for each color of red, green, and blue as the histogram data for each color. 前記2つ以上の小領域には、相互に面積の等しい2つ以上の小領域が含まれることを特徴とする請求項1または2に記載の逆光画像補正装置。   The backlight image correction apparatus according to claim 1, wherein the two or more small regions include two or more small regions having the same area. 前記2つ以上の小領域には、前記画素の数が相互に等しい2つ以上の小領域が含まれることを特徴とする請求項1〜3のいずれか1項に記載の逆光画像補正装置。   The backlight image correction apparatus according to any one of claims 1 to 3, wherein the two or more small regions include two or more small regions having the same number of pixels. 前記2つ以上の小領域には、前記画素の数および面積のうちの少なくともいずれか一方が相互に等しい2つ以上の小領域が含まれ、
前記属性情報取得部は、前記画素の数および面積のうちの少なくともいずれか一方が相互に等しい2つ以上の小領域からそれぞれ前記属性情報を取得することを特徴とする請求項1〜4のいずれか1項に記載の逆光画像補正装置。
The two or more small regions include two or more small regions in which at least one of the number and area of the pixels is equal to each other,
The attribute information acquisition unit acquires the attribute information from two or more small regions in which at least one of the number and area of the pixels is equal to each other. The backlight image correction device according to claim 1.
前記属性情報取得部は、前記属性情報として、前記少なくとも1つの小領域についてそれぞれ前記濃度値の平均値を各色別に取得することを特徴とする請求項1〜5のいずれか1項に記載の逆光画像補正装置。   The backlight according to claim 1, wherein the attribute information acquisition unit acquires, as the attribute information, an average value of the density values for each color for each of the at least one small region. Image correction device. 前記補正情報生成部は、前記属性情報取得部により取得された各色別の前記濃度値の平均値に基づき、前記少なくとも1つの小領域についてそれぞれ輝度に関する情報を取得して、当該輝度に関する情報に基づき前記補正情報を生成することを特徴とする請求項6に記載の逆光画像補正装置。   The correction information generation unit acquires information on luminance for each of the at least one small region based on the average value of the density values for each color acquired by the attribute information acquisition unit, and based on the information on the luminance The backlight image correction apparatus according to claim 6, wherein the correction information is generated. 前記補正情報生成部は、前記輝度に関する情報として、前記少なくとも1つの小領域についてそれぞれ画素の輝度の平均値を取得することを特徴とする請求項7に記載の逆光画像補正装置。   The backlight image correction apparatus according to claim 7, wherein the correction information generation unit acquires an average value of luminance of pixels for each of the at least one small region as information on the luminance. 前記補正情報生成部は、前記少なくとも1つの小領域についてそれぞれ取得した前記輝度の平均値のうちのすくなくともいずれか1つと、前記画像の全体の輝度の平均値とを加算して得られた値に基づき、前記補正情報を生成することを特徴とする請求項8に記載の逆光画像補正装置。   The correction information generation unit adds a value obtained by adding at least one of the average luminance values acquired for each of the at least one small region and the average luminance value of the entire image. 9. The backlight image correction apparatus according to claim 8, wherein the correction information is generated based on the correction information. 前記逆光補正処理部は、前記補正情報に基づき前記逆光補正処理を施す際に、前記画像を構成する各画素の濃度値を変換することを特徴とする請求項1〜9のいずれか1項に記載の逆光画像補正装置。   The said backlight correction process part converts the density value of each pixel which comprises the said image, when performing the said backlight correction process based on the said correction information, The any one of Claims 1-9 characterized by the above-mentioned. The backlight image correction apparatus described. 前記補正情報生成部は、前記補正情報として、前記逆光補正処理部により変換される前の濃度値と、前記逆光補正処理部により変換された後の濃度値との対応関係に関する情報を生成することを特徴とする請求項10に記載の逆光画像補正装置。   The correction information generation unit generates, as the correction information, information related to a correspondence relationship between a density value before being converted by the backlight correction processing unit and a density value after being converted by the backlight correction processing unit. The backlight image correction apparatus according to claim 10. (A)画像を構成する画素のデータに基づき、前記画素の各色の濃度値に対する前記画素の数の分布を表わす各色別のヒストグラムのデータを生成するヒストグラムデータ生成部と、
(B)前記ヒストグラムデータ生成部により生成された前記各色別のヒストグラムのデータに基づき、前記各色別のヒストグラムにより表される領域をそれぞれ前記濃度値の大きさ別に2つ以上の小領域に区分して、これら2つ以上の小領域の中から少なくとも1つの小領域を選出して、当該小領域に関する属性情報を各色別に取得する属性情報取得部と、
(C)前記属性情報取得部により取得された各色別の前記属性情報に基づき、前記画像に対して逆光補正処理を施すための補正情報を生成する補正情報生成部と、
(D)前記補正情報生成部により生成された前記補正情報に基づき、前記画像に対して前記逆光補正処理を施す逆光補正処理部と、
(E)を備え、
(F)前記各色別のヒストグラムのデータとして、レッド、グリーンおよびブルーの各色のヒストグラムデータが前記ヒストグラムデータ生成部により生成され、
(G)前記2つ以上の小領域には、前記画素の数および面積のうちの少なくともいずれか一方が相互に等しい2つ以上の小領域が含まれ、前記属性情報取得部は、前記画素の数および面積のうちの少なくともいずれか一方が相互に等しい2つ以上の小領域からそれぞれ前記属性情報を取得し、
(H)前記属性情報取得部は、前記属性情報として、前記少なくとも1つの小領域についてそれぞれ前記濃度値の平均値を各色別に取得し、
(I)前記補正情報生成部は、前記属性情報取得部により取得された各色別の前記濃度値の平均値に基づき、前記少なくとも1つの小領域についてそれぞれ輝度の平均値を取得し、
(J)前記補正情報生成部は、前記少なくとも1つの小領域についてそれぞれ取得した前記輝度の平均値のうちのすくなくともいずれか1つと、前記画像の全体の輝度の平均値とを加算して得られた値に基づき、前記補正情報を生成し、
(K)前記逆光補正処理部は、前記補正情報に基づき前記逆光補正処理を施す際に、前記画像を構成する各画素の濃度値を変換し、
(L)前記補正情報生成部は、前記補正情報として、前記逆光補正処理部により変換される前の濃度値と、前記逆光補正処理部により変換された後の濃度値との対応関係に関する情報を生成することを特徴とする逆光画像補正装置。
(A) a histogram data generation unit that generates histogram data for each color representing the distribution of the number of pixels with respect to the density value of each color of the pixels based on data of pixels constituting the image;
(B) Based on the histogram data for each color generated by the histogram data generation unit, the area represented by the histogram for each color is divided into two or more small areas for each density value. An attribute information acquisition unit that selects at least one small area from the two or more small areas and acquires attribute information about the small area for each color;
(C) a correction information generation unit that generates correction information for performing backlight correction processing on the image based on the attribute information for each color acquired by the attribute information acquisition unit;
(D) a backlight correction processing unit that performs the backlight correction processing on the image based on the correction information generated by the correction information generation unit;
(E)
(F) As the histogram data for each color, histogram data for each color of red, green, and blue is generated by the histogram data generation unit,
(G) The two or more small regions include two or more small regions in which at least one of the number and area of the pixels is equal to each other, and the attribute information acquisition unit Obtaining the attribute information from two or more small regions in which at least one of the number and the area is equal to each other,
(H) The attribute information acquisition unit acquires, as the attribute information, an average value of the density values for each of the colors for the at least one small region,
(I) The correction information generation unit acquires an average luminance value for each of the at least one small region based on an average value of the density values for each color acquired by the attribute information acquisition unit,
(J) The correction information generation unit is obtained by adding at least one of the average luminance values acquired for each of the at least one small region and the average luminance value of the entire image. Based on the obtained value, the correction information is generated,
(K) When performing the backlight correction processing based on the correction information, the backlight correction processing unit converts a density value of each pixel constituting the image,
(L) The correction information generation unit includes, as the correction information, information related to a correspondence relationship between the density value before being converted by the backlight correction processing unit and the density value after being converted by the backlight correction processing unit. A backlight image correction device, characterized by comprising:
(A)画像を構成する画素のデータに基づき、前記画素の濃度値に対する前記画素の数の分布を表わすヒストグラムのデータを生成するヒストグラムデータ生成部と、
(B)前記ヒストグラムデータ生成部により生成された前記ヒストグラムのデータに基づき、前記ヒストグラムにより表される領域をそれぞれ前記濃度値の大きさ別に2つ以上の小領域に区分して、これら2つ以上の小領域の中から少なくとも1つの小領域を選出して、当該小領域に関する属性情報を取得する属性情報取得部と、
(C)前記属性情報取得部により取得された前記属性情報に基づき、前記画像に対して逆光補正処理を施すための補正情報を生成する補正情報生成部と、
(D)前記補正情報生成部により生成された前記補正情報に基づき、前記画像に対して前記逆光補正処理を施す逆光補正処理部と、
(E)を備えたことを特徴とする逆光画像補正装置。
(A) a histogram data generation unit that generates histogram data representing a distribution of the number of pixels with respect to a density value of the pixels, based on data of pixels constituting the image;
(B) Based on the histogram data generated by the histogram data generation unit, each of the regions represented by the histogram is divided into two or more small regions according to the size of the density value. An attribute information acquisition unit that selects at least one small area from among the small areas and acquires attribute information related to the small area;
(C) a correction information generation unit that generates correction information for performing a backlight correction process on the image based on the attribute information acquired by the attribute information acquisition unit;
(D) a backlight correction processing unit that performs the backlight correction processing on the image based on the correction information generated by the correction information generation unit;
A backlight image correction device comprising (E).
(A)画像を構成する画素のデータに基づき、前記画素の各色の濃度値に対する前記画素の数の分布を表わす各色別のヒストグラムのデータを生成するステップと、
(B)前記ヒストグラムデータ生成部により生成された前記各色別のヒストグラムのデータに基づき、前記各色別のヒストグラムにより表される領域をそれぞれ前記濃度値の大きさ別に2つ以上の小領域に区分するステップと、
(C)前記2つ以上の小領域の中から少なくとも1つの小領域を選出して、当該小領域に関する属性情報を各色別に取得するステップと、
(D)取得した各色別の前記属性情報に基づき、前記画像に対して逆光補正処理を施すための補正情報を生成するステップと、
(E)生成した前記補正情報に基づき、前記画像に対して前記逆光補正処理を施すステップと、
(F)を有することを特徴とする逆光画像補正方法。
(A) generating histogram data for each color representing the distribution of the number of pixels with respect to the density value of each color of the pixel based on the data of the pixels constituting the image;
(B) Based on the histogram data for each color generated by the histogram data generation unit, the area represented by the histogram for each color is divided into two or more small areas according to the size of the density value. Steps,
(C) selecting at least one small area from the two or more small areas, and obtaining attribute information about the small area for each color;
(D) generating correction information for performing backlight correction processing on the image based on the acquired attribute information for each color;
(E) performing the backlight correction process on the image based on the generated correction information;
(F) The backlight image correction method characterized by having.
(A)逆光画像補正装置において実行される逆光画像補正プログラムであって、
(B)画像を構成する画素のデータに基づき、前記画素の各色の濃度値に対する前記画素の数の分布を表わす各色別のヒストグラムのデータを生成するステップと、
(C)前記ヒストグラムデータ生成部により生成された前記各色別のヒストグラムのデータに基づき、前記各色別のヒストグラムにより表される領域をそれぞれ前記濃度値の大きさ別に2つ以上の小領域に区分するステップと、
(D)前記2つ以上の小領域の中から少なくとも1つの小領域を選出して、当該小領域に関する属性情報を各色別に取得するステップと、
(E)取得した各色別の前記属性情報に基づき、前記画像に対して逆光補正処理を施すための補正情報を生成するステップと、
(F)生成した前記補正情報に基づき、前記画像に対して前記逆光補正処理を施すステップと、
(G)を実行することを特徴とする逆光画像補正プログラム。
(A) A backlight image correction program executed in the backlight image correction apparatus,
(B) generating histogram data for each color representing the distribution of the number of pixels with respect to the density value of each color of the pixel based on the data of the pixels constituting the image;
(C) Based on the histogram data for each color generated by the histogram data generation unit, the area represented by the histogram for each color is divided into two or more small areas according to the size of the density value. Steps,
(D) selecting at least one small area from the two or more small areas, and obtaining attribute information about the small area for each color;
(E) generating correction information for performing backlight correction processing on the image based on the acquired attribute information for each color;
(F) performing the backlight correction process on the image based on the generated correction information;
A backlight image correction program characterized by executing (G).
(A)原稿から画像を読み取る画像読み取り部と、
(B)前記画像読み取り部により読み取られた画像を構成する画素のデータに基づき、前記画素の各色の濃度値に対する前記画素の数の分布を表わす各色別のヒストグラムのデータを生成するヒストグラムデータ生成部と、
(C)前記ヒストグラムデータ生成部により生成された前記各色別のヒストグラムのデータに基づき、前記各色別のヒストグラムにより表される領域をそれぞれ前記濃度値の大きさ別に2つ以上の小領域に区分して、これら2つ以上の小領域の中から少なくとも1つの小領域を選出して、当該小領域に関する属性情報を各色別に取得する属性情報取得部と、
(D)前記属性情報取得部により取得された各色別の前記属性情報に基づき、前記画像に対して逆光補正処理を施すための補正情報を生成する補正情報生成部と、
(E)前記補正情報生成部により生成された前記補正情報に基づき、前記画像に対して前記逆光補正処理を施す逆光補正処理部と、
(F)を備えたことを特徴とする画像読み取り装置。
(A) an image reading unit for reading an image from a document;
(B) A histogram data generation unit that generates histogram data for each color representing the distribution of the number of pixels with respect to the density value of each color of the pixel based on the data of the pixels constituting the image read by the image reading unit. When,
(C) Based on the histogram data for each color generated by the histogram data generation unit, the area represented by the histogram for each color is divided into two or more small areas for each density value. An attribute information acquisition unit that selects at least one small area from the two or more small areas and acquires attribute information about the small area for each color;
(D) a correction information generation unit that generates correction information for performing backlight correction processing on the image based on the attribute information for each color acquired by the attribute information acquisition unit;
(E) a backlight correction processing unit that performs the backlight correction processing on the image based on the correction information generated by the correction information generation unit;
An image reading apparatus comprising (F).
(A)原稿から画像を読み取るステップと、
(B)読み取った画像を構成する画素のデータに基づき、前記画素の各色の濃度値に対する前記画素の数の分布を表わす各色別のヒストグラムのデータを生成するステップと、
(C)前記ヒストグラムデータ生成部により生成された前記各色別のヒストグラムのデータに基づき、前記各色別のヒストグラムにより表される領域をそれぞれ前記濃度値の大きさ別に2つ以上の小領域に区分するステップと、
(D)前記2つ以上の小領域の中から少なくとも1つの小領域を選出して、当該小領域に関する属性情報を各色別に取得するステップと、
(E)取得した各色別の前記属性情報に基づき、前記画像に対して逆光補正処理を施すための補正情報を生成するステップと、
(F)生成した前記補正情報に基づき、前記画像に対して前記逆光補正処理を施すステップと、
(G)を有することを特徴とする画像読み取り方法。
(A) a step of reading an image from a document;
(B) generating histogram data for each color representing the distribution of the number of pixels with respect to the density value of each color of the pixel based on the data of the pixels constituting the read image;
(C) Based on the histogram data for each color generated by the histogram data generation unit, the area represented by the histogram for each color is divided into two or more small areas according to the size of the density value. Steps,
(D) selecting at least one small area from the two or more small areas, and obtaining attribute information about the small area for each color;
(E) generating correction information for performing backlight correction processing on the image based on the acquired attribute information for each color;
(F) performing the backlight correction process on the image based on the generated correction information;
An image reading method comprising (G).
(A)画像を媒体に印刷する印刷部と、
(B)前記印刷部により前記画像が印刷される前に、前記画像を構成する画素のデータに基づき、前記画素の各色の濃度値に対する前記画素の数の分布を表わす各色別のヒストグラムのデータを生成するヒストグラムデータ生成部と、
(C)前記ヒストグラムデータ生成部により生成された前記各色別のヒストグラムのデータに基づき、前記各色別のヒストグラムにより表される領域をそれぞれ前記濃度値の大きさ別に2つ以上の小領域に区分して、これら2つ以上の小領域の中から少なくとも1つの小領域を選出して、当該小領域に関する属性情報を各色別に取得する属性情報取得部と、
(D)前記属性情報取得部により取得された各色別の前記属性情報に基づき、前記画像に対して逆光補正処理を施すための補正情報を生成する補正情報生成部と、
(E)前記補正情報生成部により生成された前記補正情報に基づき、前記画像に対して前記逆光補正処理を施す逆光補正処理部と、
(F)を備えたことを特徴とする印刷装置。
(A) a printing unit that prints an image on a medium;
(B) Before the image is printed by the printing unit, based on the data of the pixels constituting the image, histogram data for each color representing the distribution of the number of pixels with respect to the density value of each color of the pixel is obtained. A histogram data generation unit to generate,
(C) Based on the histogram data for each color generated by the histogram data generation unit, the area represented by the histogram for each color is divided into two or more small areas for each density value. An attribute information acquisition unit that selects at least one small area from the two or more small areas and acquires attribute information about the small area for each color;
(D) a correction information generation unit that generates correction information for performing backlight correction processing on the image based on the attribute information for each color acquired by the attribute information acquisition unit;
(E) a backlight correction processing unit that performs the backlight correction processing on the image based on the correction information generated by the correction information generation unit;
A printing apparatus comprising (F).
JP2006128440A 2006-03-29 2006-05-02 Backlight image correction apparatus, backlight image correction method, backlight image correction program, image reading apparatus, image reading method, and printing apparatus Expired - Fee Related JP4158811B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2006128440A JP4158811B2 (en) 2006-05-02 2006-05-02 Backlight image correction apparatus, backlight image correction method, backlight image correction program, image reading apparatus, image reading method, and printing apparatus
US11/731,844 US8014602B2 (en) 2006-03-29 2007-03-29 Backlight image determining apparatus, backlight image determining method, backlight image correction apparatus, and backlight image correction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006128440A JP4158811B2 (en) 2006-05-02 2006-05-02 Backlight image correction apparatus, backlight image correction method, backlight image correction program, image reading apparatus, image reading method, and printing apparatus

Publications (2)

Publication Number Publication Date
JP2007299317A true JP2007299317A (en) 2007-11-15
JP4158811B2 JP4158811B2 (en) 2008-10-01

Family

ID=38768741

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006128440A Expired - Fee Related JP4158811B2 (en) 2006-03-29 2006-05-02 Backlight image correction apparatus, backlight image correction method, backlight image correction program, image reading apparatus, image reading method, and printing apparatus

Country Status (1)

Country Link
JP (1) JP4158811B2 (en)

Also Published As

Publication number Publication date
JP4158811B2 (en) 2008-10-01

Similar Documents

Publication Publication Date Title
US7715047B2 (en) Image editing device
JP4926568B2 (en) Image processing apparatus, image processing method, and image processing program
US7916943B2 (en) Image determining apparatus, image determining method, image enhancement apparatus, and image enhancement method
US8014602B2 (en) Backlight image determining apparatus, backlight image determining method, backlight image correction apparatus, and backlight image correction method
JP6031286B2 (en) Image processing apparatus and image processing method
JP4883789B2 (en) Image processing apparatus and image processing method
JPH10150558A (en) Area-selectable exposure adjustment method and device therefor
US7916942B1 (en) Image determining apparatus, image enhancement apparatus, backlight image enhancement apparatus, and backlight image enhancement method
JP4238881B2 (en) Image correction apparatus, image correction method, image correction program, image reading apparatus, image reading method, and printing apparatus
JP4277866B2 (en) Backlight image determination apparatus, backlight image determination method, backlight image determination program, backlight image correction apparatus, backlight image correction method, image reading apparatus, image reading method, and printing apparatus
JP4222385B2 (en) Backlight image determination apparatus, backlight image determination method, backlight image determination program, image reading apparatus, image reading method, and printing apparatus
JP4345759B2 (en) Image editing apparatus, image editing method, image editing program, image reading system, and image reading method
JP4179342B2 (en) Image determination apparatus, image determination method, image determination program, image correction apparatus, image correction method, image reading apparatus, image reading method, and printing apparatus
JP4254813B2 (en) Image correction apparatus, image correction method, image correction program, image reading apparatus, image reading method, and printing apparatus
JP4158811B2 (en) Backlight image correction apparatus, backlight image correction method, backlight image correction program, image reading apparatus, image reading method, and printing apparatus
JP4345756B2 (en) Image editing apparatus, image editing method, image editing program, image reading system, and image reading method
JP4179343B2 (en) Image determination apparatus, image determination method, image determination program, image correction apparatus, image correction method, image reading apparatus, image reading method, and printing apparatus
JP2004531097A (en) How to emphasize color
JP2007221591A (en) Image editing apparatus, image editing method, image editing program, image reading system and image reading method
JP2005045433A (en) Image forming apparatus and method for image formation
JP2019103093A (en) Information processing device, information processing method, and program
JP4176656B2 (en) Image processing apparatus, image processing method, image forming apparatus, image processing program, and recording medium recording the program
JP7490447B2 (en) Image processing device, control method thereof, and program
JP2006163557A (en) Apparatus, method and program for image processing, and apparatus, method and program for print control
JP4605004B2 (en) Printing apparatus, method, and computer program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080411

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080415

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080605

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080707

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110725

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110725

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120725

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120725

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130725

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees