JP6003574B2 - Image processing apparatus and image processing program - Google Patents

Image processing apparatus and image processing program Download PDF

Info

Publication number
JP6003574B2
JP6003574B2 JP2012256307A JP2012256307A JP6003574B2 JP 6003574 B2 JP6003574 B2 JP 6003574B2 JP 2012256307 A JP2012256307 A JP 2012256307A JP 2012256307 A JP2012256307 A JP 2012256307A JP 6003574 B2 JP6003574 B2 JP 6003574B2
Authority
JP
Japan
Prior art keywords
correction
image
module
fog
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.)
Expired - Fee Related
Application number
JP2012256307A
Other languages
Japanese (ja)
Other versions
JP2014103636A (en
Inventor
正和 福永
正和 福永
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation 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 Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2012256307A priority Critical patent/JP6003574B2/en
Publication of JP2014103636A publication Critical patent/JP2014103636A/en
Application granted granted Critical
Publication of JP6003574B2 publication Critical patent/JP6003574B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像処理装置及び画像処理プログラムに関する。   The present invention relates to an image processing apparatus and an image processing program.

特許文献1には、入力された画像を所定の大きさからなる画素群に分割するステップと、分割された前記画素群における画素群濃度を算出するステップと、前記画素群のうち前記画像における注目画素の属する画素群の画素群濃度と当該注目画素の属する画素群に隣接する画素群の画素群濃度とに基づいて算出した当該注目画素に対する相対濃度と、当該注目画素の絶対濃度とに基づいて当該注目画素の出力値を算出するステップとを含むことを特徴とする画像処理方法によって、多値画像内で背景より相対的に暗いペンなどで書かれた文字等を高速に切り出し、文字認識等の前処理に使い、文字図形などのオブジェクトを強調し、理解し易さを損なわずに画像サイズを圧縮することが可能となることが開示されている。   Patent Document 1 discloses a step of dividing an input image into pixel groups having a predetermined size, a step of calculating a pixel group density in the divided pixel group, and an attention in the image among the pixel groups. Based on the relative density of the pixel of interest calculated based on the pixel group density of the pixel group to which the pixel belongs and the pixel group density of the pixel group adjacent to the pixel group to which the pixel of interest belongs, and the absolute density of the pixel of interest A step of calculating an output value of the pixel of interest, and character recognition, etc. at high speed by cutting out characters written with a pen or the like relatively darker than the background in the multi-valued image It is disclosed that an object such as a character graphic can be emphasized and the image size can be compressed without impairing the ease of understanding.

特許文献2には、コンタクトガラス上に載置されたブック原稿を画像読取手段により読み取ったスキャン画像の輝度を補正する画像輝度補正装置において、前記スキャン画像を複数のブロックに分割するブロック分割手段と、前記ブロック分割手段により分割された複数の各ブロックに含まれる画素の中で最も輝度値の高い画素をそれぞれ選択し、その最も輝度値の高い画素の輝度値を当該各ブロックの地肌値とみなして検出する地肌値検出手段と、前記地肌値検出手段により検出された各ブロックの前記地肌値を各ブロック間で平滑化した地肌値に基づいて、前記スキャン画像に対して輝度補正処理を施す輝度補正手段と、を備えることを特徴とする画像輝度補正装置によって、画像読取手段の照明が均一でない場合やブック原稿のコンタクトガラスへの載せ方が不均一な場合(ページの上端と下端とでコンタクトガラスからの浮き上がり方が異なる場合)であっても、スキャン画像の一部分の地肌値に基づいてスキャン画像を帯状に輝度補正する場合に比べて局所的な範囲で地肌値を検出して輝度補正するので、輝度補正後の画像に黒い筋や薄い影が生じてしまうのを防止することができ、また、ノイズの影響を抑制することが可能になることが開示されている。基本的にはかぶり具合をブロック分割した各ブロックの最大輝度値を利用して、各ピクセル単位の補正式が、「補正結果=実測値×指定輝度値÷代表輝度値」で実現されている。   Japanese Patent Application Laid-Open No. 2004-228561 discloses an image luminance correction apparatus for correcting the luminance of a scanned image obtained by reading a book document placed on a contact glass by an image reading unit, and a block dividing unit that divides the scanned image into a plurality of blocks. The pixel having the highest luminance value among the pixels included in each of the blocks divided by the block dividing means is selected, and the luminance value of the pixel having the highest luminance value is regarded as the background value of each block. A luminance value to be subjected to luminance correction processing on the scanned image based on a background value obtained by smoothing the background value of each block detected by the background value detecting unit and the background value detected by the background value detecting unit. And an image brightness correction device characterized by comprising: a correction means; Even when the placement on the glass is uneven (when the top and bottom of the page are different from the contact glass), the brightness of the scanned image is corrected to a band based on the background value of a portion of the scanned image. Since the background value is detected in the local range and the brightness is corrected compared to the case where the image is corrected, it is possible to prevent black streaks and light shadows from appearing in the image after the brightness correction, and to reduce the influence of noise. It is disclosed that it becomes possible to suppress. Basically, a correction formula for each pixel is realized by “correction result = actual measurement value × designated luminance value ÷ representative luminance value” by using the maximum luminance value of each block obtained by dividing the fog condition into blocks.

特許文献3には、画像階調補正技術を逆光補正に適用した場合には、明るい領域又は暗い領域内の局所的なコントラストを改善するのに限界があったことを課題とし、ブロックタイミング発生部は、1画面内を複数のブロックに分割し、平均輝度算出部は、ブロックタイミング発生部で指定されたブロック単位での平均輝度レベルを算出し、ブロック単位補正量算出部は、ブロック単位での平均輝度レベルから、補正の方向及び補正量を算出し、画素単位補正量算出部は、ブロック単位の補正量を当該ブロック内の各画素単位での補正量に補間し、階調変換部は、画素単位の補正量とメモリから読み出した当該画素の輝度データとをアドレスとして、最終的な補正量を階調変換テーブルから読み出して、階調変換を行うことが開示されている。   In Patent Document 3, when the image gradation correction technique is applied to backlight correction, there is a limit to improving local contrast in a bright region or a dark region. Divides one screen into a plurality of blocks, the average luminance calculation unit calculates the average luminance level in block units designated by the block timing generation unit, and the block unit correction amount calculation unit calculates in block units. From the average luminance level, the correction direction and the correction amount are calculated, the pixel unit correction amount calculation unit interpolates the correction amount in block units into the correction amount in each pixel unit in the block, and the gradation conversion unit It is disclosed that gradation conversion is performed by reading the final correction amount from the gradation conversion table using the correction amount in pixel units and the luminance data of the pixel read from the memory as addresses.

特許文献4には、逆光補正を行うと画像中の明るい部分の色味が飛んでしまっており、また画像全体の色のバランスを適切に整えることが困難であったことを課題とし、入力画像内における特定画像の少なくとも一部を含む領域を検出する特定画像検出部と、上記検出された領域に属する画素に基づいて特定画像を代表する代表色を算出する代表色算出部と、代表色の明るさに基づいて階調補正のための第一補正曲線を取得する第一補正曲線取得部と、代表色を第一補正曲線によって補正し、補正後の代表色を構成する要素色毎の階調値に基づいて要素色毎の階調補正のための第二補正曲線を取得する第二補正曲線取得部と、入力画像を構成する画素のうち暗部を定義した色域に属する画素の階調値を第一補正曲線を用いて補正する第一補正部と、入力画像を構成する画素の要素色毎の階調値を第二補正曲線を用いて補正する第二補正部とを備える構成としたことが開示されている。   Patent Document 4 has a problem that, when the backlight correction is performed, the color of the bright portion in the image is lost, and it is difficult to properly adjust the color balance of the entire image. A specific image detecting unit for detecting a region including at least a part of the specific image, a representative color calculating unit for calculating a representative color representing the specific image based on the pixels belonging to the detected region, a representative color A first correction curve acquisition unit that acquires a first correction curve for gradation correction based on brightness, and the representative color is corrected by the first correction curve, and the level for each element color that constitutes the corrected representative color A second correction curve acquisition unit that acquires a second correction curve for gradation correction for each element color based on a tone value; and gradations of pixels that belong to a color gamut that defines a dark part among pixels constituting the input image First correction to correct the value using the first correction curve When, it was configured to include a second correction unit that corrects using the second correction curve the tone values of element colors of the pixels constituting the input image is disclosed.

特許文献5には、逆光補正を行うと画像中の明るい部分の色味が飛んでしまっていたことを課題とし、入力画像内における特定画像の少なくとも一部を含む領域を検出する特定画像検出部と、上記特定画像検出部によって検出された領域における明るさと上記入力画像内における背景領域の明るさとの差を取得する差取得部と、上記差に基づいて階調補正のための補正曲線を取得する補正曲線取得部と、上記入力画像を構成する画素のうち暗部を定義した色域に属する画素の階調値を上記補正曲線を用いて補正する補正部とを備える構成としたことが開示されている。   Patent Document 5 discloses a specific image detection unit that detects a region including at least a part of a specific image in an input image, with the problem that a bright portion in the image has lost color when backlight correction is performed. A difference acquisition unit that acquires the difference between the brightness in the area detected by the specific image detection unit and the brightness of the background area in the input image, and acquires a correction curve for tone correction based on the difference And a correction unit that corrects a gradation value of a pixel that belongs to a color gamut that defines a dark portion among the pixels that constitute the input image using the correction curve. ing.

特許文献6には、撮影した原稿の種類や背景色に応じて適切な画像補正を行うことを課題とし、デジタルカメラは、撮影対象物として白板上の原稿(文字、図、写真など)を撮影した画像から輝度ヒストグラムと色相ヒストグラムを取得し、取得した輝度ヒストグラムにおける最大値、最小値、ピーク値を示す輝度ヒストグラムパラメタと、色相ヒストグラムにおける最大値、最小値、ピーク値、平均値、及び、色差分散値を示す色相ヒストグラムパラメタを抽出し、抽出した輝度ヒストグラムパラメタと色相ヒストグラムパラメタを用いて、撮影された原稿の種類と背景色を判別し、判別した原稿の種類と背景色とに応じて、原稿の視認性を向上させるための画像処理を最適化することが開示されている。   Japanese Patent Laid-Open No. 2004-133867 has a problem of performing appropriate image correction according to the type of photographed document and the background color, and a digital camera photographs a document (characters, drawings, photographs, etc.) on a white plate as a photographing object. Luminance histogram and hue histogram from the acquired image, luminance histogram parameters indicating the maximum, minimum, and peak values in the acquired luminance histogram, and maximum, minimum, peak, average, and color differences in the hue histogram A hue histogram parameter indicating a variance value is extracted, and using the extracted luminance histogram parameter and hue histogram parameter, the type and background color of the photographed document are determined, and according to the determined document type and background color, It is disclosed that image processing for improving the visibility of a document is optimized.

特許文献7には、入力画像の明るさが不均一な場合や、背景濃度が場所により変化している場合等であっても、正確に2値化を行うことが可能な2値化処理装置を提供することを課題とし、前記入力画像をブロック化回路において所定の領域毎にブロック化し、エッジ領域抽出回路において図形領域のエッジ領域を抽出し、エッジの抽出結果からエッジ領域画素の濃度ヒストグラムを算出することにより、2値化閾値算出回路においてブロック毎の2値化閾値を算出し、背景領域抽出回路においてブロック毎の背景領域を抽出し、2値化閾値補間データ算出回路において、前記背景領域の画素濃度値の平均値と前記2値化閾値とに基づき2値化閾値補間データを算出し、図形領域を含むブロックは前記2値化閾値に基づき入力画像の2値化を行い、背景領域からなるブロックは前記2値化閾値補間データに基づき2値化を行うこととしたことが開示されている。   Patent Document 7 discloses a binarization processing apparatus capable of performing binarization accurately even when the brightness of an input image is uneven or the background density varies depending on the location. The input image is blocked for each predetermined area in the block forming circuit, the edge area of the graphic area is extracted in the edge area extracting circuit, and the density histogram of the edge area pixels is obtained from the edge extraction result. By calculating, the binarization threshold value calculation circuit calculates a binarization threshold value for each block, the background region extraction circuit extracts the background region for each block, and the binarization threshold value interpolation data calculation circuit calculates the background region. Binarization threshold interpolation data is calculated based on the average value of the pixel density values and the binarization threshold, and the block including the graphic region binarizes the input image based on the binarization threshold. There, the block of the background region that was performing the binarization based on the binarization threshold interpolation data is disclosed.

特許文献8には、中綴じ部の近傍に位置する文字を消去することなく陰影部を除去することを課題とし、見開き原稿を読み取った画像データにおいて、地肌部分の色相を特定し、特定した色相に近い色相とみなせる画素を抽出し、そして、Y軸方向に沿う1ラインの画素データ列についての明度値を積分した明度積分値を全てのX座標値に対して求めるとヒストグラムH1が得られ、そして、文字が形成されていることにより得られるピークの幅(例えば5mm)より広い幅を有するピークを抽出すると、ヒストグラムH2が得られ、さらに明度積分値を反転させて平滑化処理を行うと、ヒストグラムH3が得られ、その後、ヒストグラムH3のピークを中綴じ陰影部として、Y軸方向に沿う1ラインの画素データ列のそれぞれについて、中綴じ陰影部を除去するための補正を行うことが開示されている。   In Patent Document 8, it is an object to remove a shadow portion without erasing characters located in the vicinity of the saddle stitch portion, and the hue of a background portion is specified in image data obtained by reading a spread original, and the specified hue is determined. When a pixel that can be regarded as a hue close to is extracted, and the lightness integral value obtained by integrating the lightness values for one line of pixel data strings along the Y-axis direction is obtained for all X coordinate values, a histogram H1 is obtained. Then, when a peak having a width wider than the peak width (for example, 5 mm) obtained by the formation of characters is extracted, a histogram H2 is obtained. Further, when smoothing processing is performed by inverting the brightness integral value, A histogram H3 is obtained, and then, for each of the pixel data strings of one line along the Y-axis direction, the peak of the histogram H3 is used as a saddle stitched shade portion. Flip be corrected to remove the shadow portion is disclosed.

特許文献9には、影がかかっている画像や広い図の領域又は広い地の領域を含む画像について安定した二値化処理を行うことを課題とし、この画像処理装置は、原画像を予め決められた手順にしたがって複数の部分領域に分割し各部分領域毎に原画像の背景の明度として用いる明度値の候補を検出する背景明度候補検出部と、検出された候補を用いて原画像の背景明度分布を推定する背景明度分布推定部と、推定された背景明度分布に基づいて原画像の二値化処理のためのしきい値を算出するしきい値算出部と、算出されたしきい値により原画像を二値化する二値化部とを備えることが開示されている。   In Patent Document 9, it is an object to perform a stable binarization process on a shadowed image, an image including a wide figure region, or an image including a wide ground region. This image processing apparatus determines an original image in advance. A background lightness candidate detection unit that detects a lightness value candidate to be used as the lightness of the background of the original image for each partial region by dividing into a plurality of partial regions in accordance with the determined procedure, and the background of the original image using the detected candidates A background lightness distribution estimation unit that estimates lightness distribution, a threshold value calculation unit that calculates a threshold value for binarization processing of the original image based on the estimated background lightness distribution, and a calculated threshold value And a binarization unit that binarizes the original image.

特許文献10には、光と影の境界にまたがった対象物を高精度に検知できる対象物検知装置を提供することを課題とし、背景画像を分析した背景側輝度分布が双峰性分布であると判定された場合、画像補正手段は、高輝度域に分布する画素群の輝度分布範囲を拡大する輝度変換を入力画像の各画素に施して高輝度側補正画像を生成するとともに、低輝度域に分布する画素群の輝度分布範囲を拡大する輝度変換を入力画像の各画素に施して低輝度側補正画像を生成し、高輝度側補正画像と低輝度側補正画像の平均画像を生成し、エッジ抽出手段は平均画像からエッジ情報を抽出し、対象物検出手段はエッジ情報に基づき対象物を検出し、対象物の輪郭エッジを強調しつつ、光と影の境界エッジを抑圧することができ、検知精度が向上することが開示されている。   Patent Document 10 aims to provide an object detection device capable of detecting an object straddling the boundary between light and shadow with high accuracy, and the background side luminance distribution obtained by analyzing the background image is a bimodal distribution. When it is determined that, the image correction unit performs a luminance conversion for expanding the luminance distribution range of the pixel group distributed in the high luminance region to each pixel of the input image to generate a high luminance side corrected image, and A luminance conversion that expands the luminance distribution range of the pixel group distributed to each pixel of the input image to generate a low-luminance correction image, an average image of the high-luminance correction image and the low-luminance correction image, The edge extraction means extracts edge information from the average image, and the object detection means can detect the object based on the edge information and suppress the boundary edge between light and shadow while enhancing the contour edge of the object. , The detection accuracy can be improved It is shown.

特許第3426189号公報Japanese Patent No. 3426189 特許第4111697号公報Japanese Patent No. 4111697 特開2005−341527号公報JP 2005-341527 A 特開2009−290660号公報JP 2009-290660 A 特開2009−290661号公報JP 2009-290661 A 特開2005−260657号公報JP 2005-260657 A 特開2005−165925号公報JP 2005-165925 A 特開2005−115768号公報JP 2005-115768 A 特開2007−249836号公報JP 2007-249836 A 特開2011−028686号公報JP 2011-028686 A

本発明は、画像内のかぶりを除去する場合にあって、そのかぶりに類似する原稿内のデザインを除去してしまうことを防止するようにした画像処理装置及び画像処理プログラムを提供することを目的としている。   It is an object of the present invention to provide an image processing apparatus and an image processing program that prevent the removal of a design in a document similar to the fog when removing the fog in the image. It is said.

かかる目的を達成するための本発明の要旨とするところは、次の各項の発明に存する。
請求項1の発明は、画像を受け付ける受付手段と、前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、前記受付手段によって受け付けられた画像から撮影されている原稿画像の領域を抽出する抽出手段と、前記抽出手段によって抽出された領域内と領域外の画像を比較することによって、かぶりが発生しているのは、該領域内だけであるか否かを判断する判断手段と、前記判断手段によってかぶりが発生しているのは前記領域内だけであると判断された場合は、かぶり量を除去することをしないように制御する制御手段と、前記受付手段によって受け付けられた画像内の画素の彩度値を測定する測定手段と、前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する補正手段を具備することを特徴とする画像処理装置である。
The gist of the present invention for achieving the object lies in the inventions of the following items.
The invention according to claim 1 estimates the fogging amount, which is a difference between the luminance value of the original pixel and the luminance value of the pixel of the image, based on the receiving unit that receives the image and the image received by the receiving unit. By comparing the estimation means, the extraction means for extracting the area of the document image taken from the image received by the reception means, and the images inside and outside the area extracted by the extraction means, Judgment means for judging whether or not it is only in the area, and if the judgment means judges that fog is occurring only in the area, the amount of fogging Control means for controlling so as not to remove, measuring means for measuring the saturation value of the pixels in the image received by the receiving means, and received by the receiving means Determining means for determining a correction target value of a luminance value in the background in the image; the fog amount estimated by the estimating means; the correction target value determined by the determining means; and the saturation value measured by the measuring means An image processing apparatus comprising correction means for correcting the saturation value based on a distance from the chromatic color.

請求項2の発明は、前記抽出手段が抽出する領域は4角形であり、前記判断手段は、前記4角形の辺の外側と内側の画像を比較し、該内側の画像は、該4角形の辺から内側に予め定められた距離内にあって、前記推定手段によってかぶり量が推定された領域を含むことを特徴とする請求項1に記載の画像処理装置である。   According to a second aspect of the present invention, the region extracted by the extraction unit is a quadrangle, the determination unit compares the outside and inside images of the sides of the quadrangle, and the inside image is the rectangle. The image processing apparatus according to claim 1, wherein the image processing apparatus includes a region within a predetermined distance from the side and having a fog amount estimated by the estimation unit.

請求項3の発明は、前記補正手段は、前記測定手段によって測定された彩度値が無彩色に近くなるほど、彩度値の補正量を少なくするように補正することを特徴とする請求項1又は2に記載の画像処理装置である。   The invention according to claim 3 is characterized in that the correction means corrects the saturation value to be reduced as the saturation value measured by the measurement means becomes closer to an achromatic color. Alternatively, the image processing apparatus according to 2.

請求項4の発明は、前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値との差分に基づいて、前記補正手段による補正を行うか否かを判断する判断手段をさらに具備し、前記補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行うことを特徴とする請求項1から3のいずれか一項に記載の画像処理装置である。   According to a fourth aspect of the present invention, there is provided judging means for judging whether or not to perform correction by the correcting means based on a difference between the fogging amount estimated by the estimating means and the correction target value determined by the determining means. 4. The image processing apparatus according to claim 1, wherein the correction unit performs correction when it is determined that the correction is performed by the determination unit. 5.

請求項5の発明は、前記受付手段によって受け付けられた画像内の各画素における前記推定手段によって推定されたかぶり量同士の差分に基づいて、前記補正手段による補正を行うか否かを判断する判断手段をさらに具備し、前記補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行うことを特徴とする請求項1から3のいずれか一項に記載の画像処理装置である。   According to a fifth aspect of the present invention, determination means for determining whether to perform correction by the correction means based on a difference between the fog amounts estimated by the estimation means in each pixel in the image received by the reception means. 4. The image processing apparatus according to claim 1, further comprising a correction unit configured to correct the correction unit when the determination unit determines to perform correction. 5. .

請求項6の発明は、画像を受け付ける受付手段と、前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、前記受付手段によって受け付けられた画像から撮影されている原稿画像の領域を抽出する抽出手段と、前記抽出手段によって抽出された領域内と領域外の画像を比較することによって、かぶりが発生しているのは、該領域内だけであるか否かを判断する判断手段と、前記判断手段によってかぶりが発生しているのは前記領域内だけであると判断された場合は、かぶり量を除去することをしないように制御する制御手段と、前記受付手段によって受け付けられた画像内の画素の輝度値と彩度値を測定する測定手段と、前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段を具備することを特徴とする画像処理装置である。   The invention according to claim 6 estimates the fogging amount which is a difference between the luminance value of the original pixel and the luminance value of the pixel of the image based on the receiving unit which receives the image and the image received by the receiving unit. By comparing the estimation means, the extraction means for extracting the area of the document image taken from the image received by the reception means, and the images inside and outside the area extracted by the extraction means, Judgment means for judging whether or not it is only in the area, and if the judgment means judges that fog is occurring only in the area, the amount of fogging Control means for controlling so as not to remove, measuring means for measuring the luminance value and saturation value of the pixels in the image received by the receiving means, and receiving by the receiving means Determining means for determining a correction target value of the luminance value in the background in the obtained image; the fog amount estimated by the estimating means; the correction target value determined by the determining means; and the saturation value measured by the measuring means First correction means for correcting the saturation value based on the distance from the achromatic color, and the measurement means based on the fog amount estimated by the estimation means and the correction target value determined by the determination means An image processing apparatus comprising: a second correction unit that corrects the luminance value measured by the method.

請求項7の発明は、前記抽出手段が抽出する領域は4角形であり、前記判断手段は、前記4角形の辺の外側と内側の画像を比較し、該内側の画像は、該4角形の辺から内側に予め定められた距離内にあって、前記推定手段によってかぶり量が推定された領域を含むことを特徴とする請求項6に記載の画像処理装置である。   According to a seventh aspect of the present invention, the area extracted by the extracting means is a quadrangular shape, and the determining means compares the images inside and outside the sides of the quadrangular shape, and the inside image is the rectangular shape. The image processing apparatus according to claim 6, wherein the image processing apparatus includes a region within a predetermined distance from the side and having a fog amount estimated by the estimation unit.

請求項8の発明は、前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値との差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段をさらに具備し、前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行うことを特徴とする請求項6又は7に記載の画像処理装置である。   The invention according to claim 8 performs correction by the first correction unit and the second correction unit based on a difference between the fog amount estimated by the estimation unit and the correction target value determined by the determination unit. And determining means for determining whether or not the first correction means and the second correction means perform correction when the determination means determines that correction is to be performed. An image processing apparatus according to claim 6 or 7.

請求項9の発明は、前記受付手段によって受け付けられた画像内の各画素における前記推定手段によって推定されたかぶり量同士の差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段をさらに具備し、前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行うことを特徴とする請求項6又は7に記載の画像処理装置である。   The invention according to claim 9 is a correction by the first correction unit and the second correction unit based on a difference between the fog amounts estimated by the estimation unit in each pixel in the image received by the reception unit. The first correction unit and the second correction unit perform correction when it is determined by the determination unit that correction is to be performed. An image processing apparatus according to claim 6 or 7.

請求項10の発明は、画像を受け付ける受付手段と、前記受付手段によって受け付けられた画像から領域を抽出する第1の抽出手段と、前記第1の抽出手段によって抽出された領域を予め定めた規則に基づいて選択する選択手段と、前記選択手段によって選択された領域内の画素の輝度値と彩度値を測定する測定手段と、前記測定手段によって測定された輝度値から、前記受付手段によって受け付けられた画像におけるかぶりの度合いを示す関数を推定する推定手段と、前記受付手段によって受け付けられた画像から撮影されている原稿画像の領域を抽出する第2の抽出手段と、前記第2の抽出手段によって抽出された領域内と領域外の画像を比較することによって、かぶりが発生しているのは、該領域内だけであるか否かを判断する判断手段と、前記判断手段によってかぶりが発生しているのは前記領域内だけであると判断された場合は、かぶり量を除去することをしないように制御する制御手段と、前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段を具備することを特徴とする画像処理装置である。 Rules invention of claim 10, in which the receiving means for receiving image, first extracting means for extracting an area from the image received by said receiving means, and preset the region extracted by the first extracting means Selection means for selecting based on the measurement means, measurement means for measuring the luminance value and saturation value of the pixels in the region selected by the selection means, and the reception means receiving from the luminance values measured by the measurement means Estimating means for estimating a function indicating the degree of fogging in the received image, second extracting means for extracting a region of a document image taken from the image received by the receiving means, and the second extracting means A judgment method for determining whether or not the fog is generated only in the area by comparing the image inside the area extracted by the above and the image outside the area. When the determination means determines that the fog is occurring only in the area, the control means for controlling so as not to remove the fogging amount, and the reception means A determining unit that determines a correction target value of a luminance value in a background in the image; a fog amount is calculated based on the function estimated by the estimating unit; the fog amount and a correction target value determined by the determining unit; Based on the distance from the achromatic color of the saturation value measured by the measurement means, a first correction means for correcting the saturation value and a fog amount based on the function estimated by the estimation means are calculated. And a second correcting means for correcting the brightness value measured by the measuring means based on the fogging amount and the correction target value determined by the determining means. That is an image processing apparatus.

請求項11の発明は、前記第2の抽出手段が抽出する領域は4角形であり、前記判断手段は、前記4角形の辺の外側と内側の画像を比較し、該内側の画像は、該4角形の辺から内側に予め定められた距離内にあって、前記推定手段によってかぶり量が推定された領域を含むことを特徴とする請求項10に記載の画像処理装置である。 According to an eleventh aspect of the present invention, the region extracted by the second extracting means is a quadrangular shape, and the determining means compares the outside and inside images of the sides of the square, and the inside image is the The image processing apparatus according to claim 10, wherein the image processing apparatus includes an area that is within a predetermined distance inward from a side of the quadrangle and whose fogging amount is estimated by the estimation unit.

請求項12の発明は、前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値との差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段をさらに具備し、前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行うことを特徴とする請求項10又は11に記載の画像処理装置である。   According to a twelfth aspect of the present invention, a fog amount is calculated based on the function estimated by the estimation unit, and the first correction is performed based on a difference between the fog amount and a correction target value determined by the determination unit. And a determination means for determining whether or not to perform correction by the second correction means. The first correction means and the second correction means are determined to be corrected by the determination means. The image processing apparatus according to claim 10, wherein correction is performed when the image processing is performed.

請求項13の発明は、前記推定手段によって推定された関数に基づいてかぶり量を算出し、前記受付手段によって受け付けられた画像内の各画素における該かぶり量同士の差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段をさらに具備し、前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行うことを特徴とする請求項10又は11に記載の画像処理装置である。   According to a thirteenth aspect of the present invention, a fog amount is calculated based on the function estimated by the estimating means, and the first amount is calculated based on a difference between the fog amounts in each pixel in the image received by the receiving means. And determining means for determining whether to perform correction by the second correcting means, and the first correcting means and the second correcting means perform correction by the determining means. The image processing apparatus according to claim 10, wherein correction is performed when the determination is made.

請求項14の発明は、コンピュータを、画像を受け付ける受付手段と、前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、前記受付手段によって受け付けられた画像から撮影されている原稿画像の領域を抽出する抽出手段と、前記抽出手段によって抽出された領域内と領域外の画像を比較することによって、かぶりが発生しているのは、該領域内だけであるか否かを判断する判断手段と、前記判断手段によってかぶりが発生しているのは前記領域内だけであると判断された場合は、かぶり量を除去することをしないように制御する制御手段と、前記受付手段によって受け付けられた画像内の画素の彩度値を測定する測定手段と、前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する補正手段として機能させることを特徴とする画像処理プログラムである。   According to the invention of claim 14, the computer is configured to receive the image, and based on the image received by the receiving unit, the fogging amount that is the difference between the luminance value of the original pixel and the luminance value of the pixel of the image By comparing the estimation means for estimating the image, the extraction means for extracting the area of the document image taken from the image received by the reception means, and the images inside and outside the area extracted by the extraction means A determination means for determining whether or not the fog is generated only in the area; and when the determination means determines that the fog is generated only in the area A control means for controlling so as not to remove the fogging amount, a measuring means for measuring a saturation value of a pixel in the image received by the receiving means, and the receiving means. Determining means for determining the correction target value of the luminance value in the background in the received image, the fog amount estimated by the estimating means, the correction target value determined by the determining means, and the saturation measured by the measuring means An image processing program that functions as a correction unit that corrects a saturation value based on a distance from the achromatic color.

請求項15の発明は、コンピュータを、画像を受け付ける受付手段と、前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、前記受付手段によって受け付けられた画像から撮影されている原稿画像の領域を抽出する抽出手段と、前記抽出手段によって抽出された領域内と領域外の画像を比較することによって、かぶりが発生しているのは、該領域内だけであるか否かを判断する判断手段と、前記判断手段によってかぶりが発生しているのは前記領域内だけであると判断された場合は、かぶり量を除去することをしないように制御する制御手段と、前記受付手段によって受け付けられた画像内の画素の輝度値と彩度値を測定する測定手段と、前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段として機能させることを特徴とする画像処理プログラムである。   According to the fifteenth aspect of the present invention, the amount of fogging that is the difference between the luminance value of the original pixel and the luminance value of the pixel of the image is determined based on the image received by the receiving unit and the receiving unit. By comparing the estimation means for estimating the image, the extraction means for extracting the area of the document image taken from the image received by the reception means, and the images inside and outside the area extracted by the extraction means A determination means for determining whether or not the fog is generated only in the area; and when the determination means determines that the fog is generated only in the area Control means for controlling not to remove the fogging amount, measuring means for measuring the luminance value and saturation value of the pixels in the image received by the receiving means, and the receiving A determination means for determining a correction target value of the luminance value in the background in the image received by the stage; a fog amount estimated by the estimation means; a correction target value determined by the determination means; and the measurement means Based on the first correction means for correcting the saturation value based on the distance of the saturation value from the achromatic color, the fog amount estimated by the estimation means and the correction target value determined by the determination means, An image processing program that functions as a second correction unit that corrects a luminance value measured by the measurement unit.

請求項16の発明は、コンピュータを、画像を受け付ける受付手段と、前記受付手段によって受け付けられた画像から領域を抽出する第1の抽出手段と、前記第1の抽出手段によって抽出された領域を予め定めた規則に基づいて選択する選択手段と、前記選択手段によって選択された領域内の画素の輝度値と彩度値を測定する測定手段と、前記測定手段によって測定された輝度値から、前記受付手段によって受け付けられた画像におけるかぶりの度合いを示す関数を推定する推定手段と、前記受付手段によって受け付けられた画像から撮影されている原稿画像の領域を抽出する第2の抽出手段と、前記第2の抽出手段によって抽出された領域内と領域外の画像を比較することによって、かぶりが発生しているのは、該領域内だけであるか否かを判断する判断手段と、前記判断手段によってかぶりが発生しているのは前記領域内だけであると判断された場合は、かぶり量を除去することをしないように制御する制御手段と、前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段として機能させることを特徴とする画像処理プログラムである。 The invention of claim 16 causes a computer, and receiving means for receiving image, first extracting means for extracting an area from the image received by the receiving unit, the area extracted by said first extraction means previously From the selection means for selecting based on a predetermined rule, the measurement means for measuring the luminance value and the saturation value of the pixels in the area selected by the selection means, and the reception value from the luminance value measured by the measurement means Estimation means for estimating a function indicating the degree of fogging in the image received by the means, second extraction means for extracting a region of the document image taken from the image received by the reception means, and the second by comparing the images of the outside and within the extraction area region by the extracting means, the head has occurred, whether it is only within that region Determining means for determining, control means for controlling so as not to remove the fogging amount when the determining means determines that the fog is occurring only in the area; and the receiving means And determining means for determining a correction target value of the luminance value of the background in the image received by the calculation means, calculating the fog amount based on the function estimated by the estimation means, and determining the fog amount and the determination means First correction means for correcting the saturation value based on the correction target value and the distance from the achromatic color of the saturation value measured by the measurement means, and fogging based on the function estimated by the estimation means As a second correction unit that calculates the amount and corrects the luminance value measured by the measurement unit based on the fogging amount and the correction target value determined by the determination unit An image processing program for causing the performance.

請求項1の画像処理装置によれば、画像内のかぶりを除去する場合にあって、そのかぶりに類似する原稿内のデザインを除去してしまうことを防止することができる。   According to the image processing apparatus of the first aspect, in the case of removing the fog in the image, it is possible to prevent the removal of the design in the document similar to the fog.

請求項2の画像処理装置によれば、本構成を有していない場合に比較して、かぶりの発生が領域内だけであるか否かの判断を正確に行うことができる。   According to the image processing apparatus of the second aspect, it is possible to accurately determine whether or not the fog is generated only in the region as compared with the case where the present configuration is not provided.

請求項3の画像処理装置によれば、無彩色部分に対して彩度を強調しすぎることを防止することができる。   According to the image processing apparatus of the third aspect, it is possible to prevent the saturation from being excessively emphasized with respect to the achromatic color portion.

請求項4の画像処理装置によれば、かぶり量と補正目標値との差分に基づいて、補正を行うか否かを判断することができる。   According to the image processing apparatus of the fourth aspect, it is possible to determine whether or not to perform correction based on the difference between the fogging amount and the correction target value.

請求項5の画像処理装置によれば、各画素におけるかぶり量同士の差分に基づいて、補正を行うか否かを判断することができる。   According to the image processing apparatus of the fifth aspect, it is possible to determine whether or not to perform correction based on the difference between the fogging amounts in each pixel.

請求項6の画像処理装置によれば、画像内のかぶりを除去する場合にあって、そのかぶりに類似する原稿内のデザインを除去してしまうことを防止することができ、そして、画像内のかぶりを除去するために輝度値を補正する場合にあって、下地以外の部分に対して輝度値が明るくなりすぎてしまうことを防止することができる。   According to the image processing apparatus of the sixth aspect, in the case of removing the fog in the image, it is possible to prevent the removal of the design in the document similar to the fog, and in the image In the case of correcting the luminance value in order to remove the fog, it is possible to prevent the luminance value from becoming too bright with respect to a portion other than the background.

請求項7の画像処理装置によれば、本構成を有していない場合に比較して、かぶりの発生が領域内だけであるか否かの判断を正確に行うことができる。   According to the image processing apparatus of the seventh aspect, it is possible to accurately determine whether or not the fog is generated only in the region as compared with the case where the present configuration is not provided.

請求項8の画像処理装置によれば、かぶり量と補正目標値との差分に基づいて、補正を行うか否かを判断することができる。   According to the image processing apparatus of the eighth aspect, it is possible to determine whether or not to perform correction based on the difference between the fogging amount and the correction target value.

請求項9の画像処理装置によれば、各画素におけるかぶり量同士の差分に基づいて、補正を行うか否かを判断することができる。   According to the image processing apparatus of the ninth aspect, it is possible to determine whether or not to perform correction based on the difference between the fogging amounts in each pixel.

請求項10の画像処理装置によれば、画像内のかぶりを除去する場合にあって、そのかぶりに類似する原稿内のデザインを除去してしまうことを防止することができ、そして、対象とする画像内に有彩色領域が存在する場合に、画像全体に、原稿色に対応したかぶりを除去するときに生じる輝度値が明るくなりすぎてしまうことを防止することができる。   According to the image processing apparatus of the tenth aspect, in the case of removing the fog in the image, it is possible to prevent the design in the original similar to the fog from being removed and to be a target. When a chromatic color region exists in the image, it is possible to prevent the luminance value generated when removing the fog corresponding to the document color from becoming too bright in the entire image.

請求項11の画像処理装置によれば、本構成を有していない場合に比較して、かぶりの発生が領域内だけであるか否かの判断を正確に行うことができる。   According to the image processing apparatus of the eleventh aspect, it is possible to accurately determine whether or not the occurrence of the fog is only in the region as compared with the case where the present configuration is not provided.

請求項12の画像処理装置によれば、かぶり量と補正目標値との差分に基づいて、補正を行うか否かを判断することができる。   According to the image processing apparatus of the twelfth aspect, it is possible to determine whether or not to perform correction based on the difference between the fogging amount and the correction target value.

請求項13の画像処理装置によれば、各画素におけるかぶり量同士の差分に基づいて、補正を行うか否かを判断することができる。   According to the image processing apparatus of the thirteenth aspect, it is possible to determine whether or not to perform correction based on the difference between the fogging amounts in each pixel.

請求項14の画像処理プログラムによれば、画像内のかぶりを除去する場合にあって、そのかぶりに類似する原稿内のデザインを除去してしまうことを防止することができる。   According to the image processing program of the fourteenth aspect, when the fog in the image is removed, it is possible to prevent the design in the document similar to the fog from being removed.

請求項15の画像処理プログラムによれば、画像内のかぶりを除去する場合にあって、そのかぶりに類似する原稿内のデザインを除去してしまうことを防止することができ、そして、画像内のかぶりを除去するために輝度値を補正する場合にあって、下地以外の部分に対して輝度値が明るくなりすぎてしまうことを防止することができる。   According to the image processing program of the fifteenth aspect, in the case of removing the fog in the image, it is possible to prevent the design in the document similar to the fog from being removed, and in the image In the case of correcting the luminance value in order to remove the fog, it is possible to prevent the luminance value from becoming too bright with respect to a portion other than the background.

請求項16の画像処理プログラムによれば、画像内のかぶりを除去する場合にあって、そのかぶりに類似する原稿内のデザインを除去してしまうことを防止することができ、そして、対象とする画像内に有彩色領域が存在する場合に、画像全体に、原稿色に対応したかぶりを除去するときに生じる輝度値が明るくなりすぎてしまうことを防止することができる。   According to the image processing program of the sixteenth aspect, in the case of removing the fog in the image, it is possible to prevent the removal of the design in the document similar to the fog, and to be the target. When a chromatic color region exists in the image, it is possible to prevent the luminance value generated when removing the fog corresponding to the document color from becoming too bright in the entire image.

第1の実施の形態の構成例についての概念的なモジュール構成図である。It is a conceptual module block diagram about the structural example of 1st Embodiment. 第1の実施の形態による処理例を示すフローチャートである。It is a flowchart which shows the process example by 1st Embodiment. 画像受付モジュールによる処理例を示す説明図である。It is explanatory drawing which shows the process example by an image reception module. かぶり量推定モジュール、画素値測定モジュール、補正目標値決定モジュールによる処理例を示す説明図である。It is explanatory drawing which shows the process example by a fog amount estimation module, a pixel value measurement module, and a correction target value determination module. 彩度補正モジュールによる処理例を示す説明図である。It is explanatory drawing which shows the example of a process by a saturation correction module. 第2の実施の形態の構成例についての概念的なモジュール構成図である。It is a conceptual module block diagram about the structural example of 2nd Embodiment. 第2の実施の形態による処理例を示すフローチャートである。It is a flowchart which shows the process example by 2nd Embodiment. 彩度補正可否モジュールによる処理例を示す説明図である。It is explanatory drawing which shows the example of a process by the saturation correction | amendment propriety module. 第3の実施の形態の構成例についての概念的なモジュール構成図である。It is a conceptual module block diagram about the structural example of 3rd Embodiment. 第3の実施の形態による処理例を示すフローチャートである。It is a flowchart which shows the process example by 3rd Embodiment. 画像受付モジュールによる処理例を示す説明図である。It is explanatory drawing which shows the process example by an image reception module. かぶり量推定モジュール、画素値測定モジュール、補正目標値決定モジュールによる処理例を示す説明図である。It is explanatory drawing which shows the process example by a fog amount estimation module, a pixel value measurement module, and a correction target value determination module. 輝度補正モジュールによる処理例を示す説明図である。It is explanatory drawing which shows the process example by a brightness correction module. 第4の実施の形態の構成例についての概念的なモジュール構成図である。It is a notional module block diagram about the structural example of 4th Embodiment. 第4の実施の形態による処理例を示すフローチャートである。It is a flowchart which shows the process example by 4th Embodiment. 第5の実施の形態の構成例についての概念的なモジュール構成図である。It is a notional module block diagram about the structural example of 5th Embodiment. 第5の実施の形態による処理例を示すフローチャートである。It is a flowchart which shows the process example by 5th Embodiment. 画像受付モジュールによる処理例を示す説明図である。It is explanatory drawing which shows the process example by an image reception module. 非エッジ領域抽出モジュールによる処理例を示す説明図である。It is explanatory drawing which shows the process example by a non-edge area | region extraction module. 非エッジ領域抽出モジュールによる処理例を示す説明図である。It is explanatory drawing which shows the process example by a non-edge area | region extraction module. 検査領域選択モジュールによる処理例を示す説明図である。It is explanatory drawing which shows the process example by a test | inspection area | region selection module. 画素値測定モジュールによる処理例を示す説明図である。It is explanatory drawing which shows the example of a process by a pixel value measurement module. 画素値測定モジュールによる処理例を示す説明図である。It is explanatory drawing which shows the example of a process by a pixel value measurement module. 画素値分布推定モジュールによる処理例を示す説明図である。It is explanatory drawing which shows the process example by a pixel value distribution estimation module. 画素値分布推定モジュールによる処理例を示す説明図である。It is explanatory drawing which shows the process example by a pixel value distribution estimation module. 輝度補正モジュールによる処理例を示す説明図である。It is explanatory drawing which shows the process example by a brightness correction module. 輝度補正モジュールによる処理例を示す説明図である。It is explanatory drawing which shows the process example by a brightness correction module. 輝度補正モジュールによる処理例を示す説明図である。It is explanatory drawing which shows the process example by a brightness correction module. 第6の実施の形態の構成例についての概念的なモジュール構成図である。It is a notional module block diagram about the structural example of 6th Embodiment. 第6の実施の形態による処理例を示すフローチャートである。It is a flowchart which shows the process example by 6th Embodiment. 第7の実施の形態の構成例についての概念的なモジュール構成図である。It is a notional module block diagram about the structural example of 7th Embodiment. 第7の実施の形態による処理例を示すフローチャートである。It is a flowchart which shows the process example by 7th Embodiment. 画像の走査線とライン・関数対応テーブルとの関係例を示す説明図である。It is explanatory drawing which shows the example of a relationship between the scanning line of an image, and a line and function correspondence table. ライン・関数対応テーブル内における差分ノルムの例を示す説明図である。It is explanatory drawing which shows the example of the difference norm in a line and function correspondence table. 第8の実施の形態の構成例についての概念的なモジュール構成図である。It is a notional module block diagram about the structural example of 8th Embodiment. 第8の実施の形態が対象とする画像の例を示す説明図である。It is explanatory drawing which shows the example of the image made into object by 8th Embodiment. 第8の実施の形態が対象とする画像の走査線における例を示す説明図である。It is explanatory drawing which shows the example in the scanning line of the image made into object by 8th Embodiment. 第8の実施の形態による処理例を示す説明図である。It is explanatory drawing which shows the example of a process by 8th Embodiment. ライン・関数対応テーブル内における差分ノルムの例を示す説明図である。It is explanatory drawing which shows the example of the difference norm in a line and function correspondence table. 第8の実施の形態による処理例を示す説明図である。It is explanatory drawing which shows the example of a process by 8th Embodiment. 第8の実施の形態による処理例を示す説明図である。It is explanatory drawing which shows the example of a process by 8th Embodiment. 第8の実施の形態による処理例を示す説明図である。It is explanatory drawing which shows the example of a process by 8th Embodiment. 第9の実施の形態の構成例についての概念的なモジュール構成図である。It is a notional module block diagram about the structural example of 9th Embodiment. 第9の実施の形態が対象とする画像の例を示す説明図である。It is explanatory drawing which shows the example of the image made into object by 9th Embodiment. 第9の実施の形態による処理例を示す説明図である。It is explanatory drawing which shows the process example by 9th Embodiment. 第9の実施の形態による処理例を示す説明図である。It is explanatory drawing which shows the process example by 9th Embodiment. 第9の実施の形態による処理例を示す説明図である。It is explanatory drawing which shows the process example by 9th Embodiment. 第9の実施の形態による処理例を示す説明図である。It is explanatory drawing which shows the process example by 9th Embodiment. 第9の実施の形態による処理例を示す説明図である。It is explanatory drawing which shows the process example by 9th Embodiment. 第9の実施の形態による処理例を示す説明図である。It is explanatory drawing which shows the process example by 9th Embodiment. 本実施の形態の前提となる技術例を示す説明図である。It is explanatory drawing which shows the technical example used as the premise of this Embodiment. 本実施の形態の前提となる技術例を示す説明図である。It is explanatory drawing which shows the technical example used as the premise of this Embodiment. 本実施の形態の前提となる技術例を示す説明図である。It is explanatory drawing which shows the technical example used as the premise of this Embodiment. 本実施の形態を実現するコンピュータのハードウェア構成例を示すブロック図である。It is a block diagram which shows the hardware structural example of the computer which implement | achieves this Embodiment.

まず、本実施の形態を説明する前に、その前提となる技術について説明する。なお、この説明は、本実施の形態の理解を容易にすることを目的とするものである。
図51(a)の例に示す撮影対象文書5100は名刺であり、白黒のみではなく、有彩色の領域もある。具体的には、撮影対象文書5100内の右上にある図形は赤色のマーク(ロゴ)である。この撮影対象文書5100を、例えばデジタルカメラで撮影し、図51(c)の例に示す撮影画像5130を得る。この場合、撮影した画像には図51(b)の例に示すかぶり画像5120が重複されて撮影されている。このかぶり画像5120は、照明のかたより、逆光、撮影対象文書5100の設置等(つまり、撮影対象文書5100と照明と撮影装置の位置関係)又はデジタルカメラ内のレンズの構成(例えば、画像の中央部分は明るく、周辺部分は暗くなる)等によって、発生するものである。図51(b)の例に示すようにかぶり画像5120では、右側が濃い黒であり、左側が白となるようなグラデーション画像(濃淡が段階的に変化している画像)となっている。したがって、図51(c)の例に示すように撮影画像5130でも、右側は黒くなるが、左側は元の撮影対象文書5100の画像に近いものとなる。なお、このかぶりとは、影、黒かぶり等ともいわれている。
First, before explaining the present embodiment, a technique that is a premise thereof will be described. This description is intended to facilitate understanding of the present embodiment.
The photographing target document 5100 shown in the example of FIG. 51A is a business card and includes not only black and white but also a chromatic region. Specifically, the figure on the upper right in the photographing target document 5100 is a red mark (logo). The photographing target document 5100 is photographed by, for example, a digital camera, and a photographed image 5130 shown in the example of FIG. In this case, the fogged image 5120 shown in the example of FIG. This fogging image 5120 depends on the lighting, backlight, setting of the shooting target document 5100 (that is, the positional relationship between the shooting target document 5100 and the lighting and the shooting device), or the configuration of the lens in the digital camera (for example, the central portion of the image). Is bright and the surrounding part is dark). As shown in the example of FIG. 51 (b), the fogging image 5120 is a gradation image (an image whose gradation changes in steps) in which the right side is dark black and the left side is white. Therefore, as shown in the example of FIG. 51C, even in the captured image 5130, the right side is black, but the left side is close to the original image 5100. In addition, this fog is also called a shadow, a black fog, etc.

また、デジタルカメラで撮影する場合のみでなく、スキャナ等においても、このかぶり画像は発生することがある。例えば、スキャナ(いわゆるフラッドベットスキャナ)では、コンタクトガラス上に開閉自在の圧板を設け、コンタクトガラス上に原稿を設置した後に圧板を閉じて原稿をスキャンするようにしている。しかし、原稿としてはシート状のものに限られず、ブック原稿(本、冊子等)も原稿として扱われることがあり、そのような場合にもコンタクトガラス上にブック原稿を設置し、原稿をスキャンすることになる。ところが、原稿としてブック原稿を用いた場合には、ブック原稿のページ綴じ部がコンタクトガラスから浮き上がってしまう。このようにブック原稿のページ綴じ部がコンタクトガラスから浮き上がってしまった場合には、ページ綴じ部が焦点面から離れてしまうため、浮き上がった部分のスキャン画像には、かぶりという画像劣化が発生する。   Further, this fogging image may occur not only when shooting with a digital camera but also with a scanner or the like. For example, in a scanner (a so-called flood bed scanner), a pressure plate that can be freely opened and closed is provided on a contact glass, and after placing a document on the contact glass, the pressure plate is closed to scan the document. However, the original is not limited to a sheet, and a book original (book, booklet, etc.) may be handled as an original. In such a case, the book original is placed on the contact glass and the original is scanned. It will be. However, when a book document is used as a document, the page binding portion of the book document is lifted from the contact glass. In this way, when the page binding portion of the book document is lifted from the contact glass, the page binding portion is separated from the focal plane, so that image degradation called fog occurs in the scanned image of the lifted portion.

以下、図面に基づき本発明を実現するにあたっての好適な各種の実施の形態の例を説明する。
<第1の実施の形態>
図1は、第1の実施の形態の構成例についての概念的なモジュール構成図を示している。
なお、モジュールとは、一般的に論理的に分離可能なソフトウェア(コンピュータ・プログラム)、ハードウェア等の部品を指す。したがって、本実施の形態におけるモジュールはコンピュータ・プログラムにおけるモジュールのことだけでなく、ハードウェア構成におけるモジュールも指す。それゆえ、本実施の形態は、それらのモジュールとして機能させるためのコンピュータ・プログラム(コンピュータにそれぞれの手順を実行させるためのプログラム、コンピュータをそれぞれの手段として機能させるためのプログラム、コンピュータにそれぞれの機能を実現させるためのプログラム)、システム及び方法の説明をも兼ねている。ただし、説明の都合上、「記憶する」、「記憶させる」、これらと同等の文言を用いるが、これらの文言は、実施の形態がコンピュータ・プログラムの場合は、記憶装置に記憶させる、又は記憶装置に記憶させるように制御するの意である。また、モジュールは機能に一対一に対応していてもよいが、実装においては、1モジュールを1プログラムで構成してもよいし、複数モジュールを1プログラムで構成してもよく、逆に1モジュールを複数プログラムで構成してもよい。また、複数モジュールは1コンピュータによって実行されてもよいし、分散又は並列環境におけるコンピュータによって1モジュールが複数コンピュータで実行されてもよい。なお、1つのモジュールに他のモジュールが含まれていてもよい。また、以下、「接続」とは物理的な接続の他、論理的な接続(データの授受、指示、データ間の参照関係等)の場合にも用いる。「予め定められた」とは、対象としている処理の前に定まっていることをいい、本実施の形態による処理が始まる前はもちろんのこと、本実施の形態による処理が始まった後であっても、対象としている処理の前であれば、そのときの状況・状態に応じて、又はそれまでの状況・状態に応じて定まることの意を含めて用いる。「予め定められた値」が複数ある場合は、それぞれ異なった値であってもよいし、2以上の値(もちろんのことながら、全ての値も含む)が同じであってもよい。また、「Aである場合、Bをする」という意味を有する記載は、「Aであるか否かを判断し、Aであると判断した場合はBをする」の意味で用いる。ただし、Aであるか否かの判断が不要である場合を除く。
また、システム又は装置とは、複数のコンピュータ、ハードウェア、装置等がネットワーク(一対一対応の通信接続を含む)等の通信手段で接続されて構成されるほか、1つのコンピュータ、ハードウェア、装置等によって実現される場合も含まれる。「装置」と「システム」とは、互いに同義の用語として用いる。もちろんのことながら、「システム」には、人為的な取り決めである社会的な「仕組み」(社会システム)にすぎないものは含まない。
また、各モジュールによる処理毎に又はモジュール内で複数の処理を行う場合はその処理毎に、対象となる情報を記憶装置から読み込み、その処理を行った後に、処理結果を記憶装置に書き出すものである。したがって、処理前の記憶装置からの読み込み、処理後の記憶装置への書き出しについては、説明を省略する場合がある。なお、ここでの記憶装置としては、ハードディスク、RAM(Random Access Memory)、外部記憶媒体、通信回線を介した記憶装置、CPU(Central Processing Unit)内のレジスタ等を含んでいてもよい。
Hereinafter, examples of various preferred embodiments for realizing the present invention will be described with reference to the drawings.
<First Embodiment>
FIG. 1 is a conceptual module configuration diagram of a configuration example according to the first embodiment.
The module generally refers to components such as software (computer program) and hardware that can be logically separated. Therefore, the module in the present embodiment indicates not only a module in a computer program but also a module in a hardware configuration. Therefore, the present embodiment is a computer program for causing these modules to function (a program for causing a computer to execute each procedure, a program for causing a computer to function as each means, and a function for each computer. This also serves as an explanation of the program and system and method for realizing the above. However, for the sake of explanation, the words “store”, “store”, and equivalents thereof are used. However, when the embodiment is a computer program, these words are stored in a storage device or stored in memory. It is the control to be stored in the device. Modules may correspond to functions one-to-one, but in mounting, one module may be configured by one program, or a plurality of modules may be configured by one program, and conversely, one module May be composed of a plurality of programs. The plurality of modules may be executed by one computer, or one module may be executed by a plurality of computers in a distributed or parallel environment. Note that one module may include other modules. Hereinafter, “connection” is used not only for physical connection but also for logical connection (data exchange, instruction, reference relationship between data, etc.). “Predetermined” means that the process is determined before the target process, and not only before the process according to this embodiment starts but also after the process according to this embodiment starts. In addition, if it is before the target processing, it is used in accordance with the situation / state at that time or with the intention to be decided according to the situation / state up to that point. When there are a plurality of “predetermined values”, they may be different values, or two or more values (of course, including all values) may be the same. In addition, the description having the meaning of “do B when it is A” is used in the meaning of “determine whether or not it is A and do B when it is judged as A”. However, the case where it is not necessary to determine whether or not A is excluded.
In addition, the system or device is configured by connecting a plurality of computers, hardware, devices, and the like by communication means such as a network (including one-to-one correspondence communication connection), etc., and one computer, hardware, device. The case where it implement | achieves by etc. is also included. “Apparatus” and “system” are used as synonymous terms. Of course, the “system” does not include a social “mechanism” (social system) that is an artificial arrangement.
In addition, when performing a plurality of processes in each module or in each module, the target information is read from the storage device for each process, and the processing result is written to the storage device after performing the processing. is there. Therefore, description of reading from the storage device before processing and writing to the storage device after processing may be omitted. Here, the storage device may include a hard disk, a RAM (Random Access Memory), an external storage medium, a storage device via a communication line, a register in a CPU (Central Processing Unit), and the like.

第1の実施の形態である画像処理装置は、画像からかぶりを除去するものであって、図1の例に示すように、画像受付モジュール110、かぶり量推定モジュール120、画素値測定モジュール130、補正目標値決定モジュール140、彩度補正モジュール150、出力モジュール160を有している。   The image processing apparatus according to the first embodiment removes fog from an image. As shown in the example of FIG. 1, the image receiving module 110, the fog amount estimation module 120, the pixel value measurement module 130, A correction target value determination module 140, a saturation correction module 150, and an output module 160 are provided.

画像受付モジュール110は、かぶり量推定モジュール120と接続されており、画像を受け付けて、その画像をかぶり量推定モジュール120へ渡す。画像を受け付けるとは、例えば、スキャナ、カメラ等で画像を読み込むこと、ファックス等で通信回線を介して外部機器から画像を受信すること、ハードディスク(コンピュータに内蔵されているものの他に、ネットワークを介して接続されているもの等を含む)等に記憶されている画像を読み出すこと等が含まれる。画像は、多値画像(カラー画像を含む)である。受け付ける画像は、1枚であってもよいし、複数枚であってもよい。また、画像の内容として、ビジネスに用いられる文書(例えば、前述の名刺等)、広告宣伝用のパンフレット、ホワイトボードに書かれたもの等であってもよい。また、画像受付モジュール110は、デジタルフィルタ処理等によって補正をするようにしてもよい。例えば、手ぶれ補正等がある。画像受付モジュール110の処理例については、図3を用いて後述する。   The image reception module 110 is connected to the fog amount estimation module 120, receives an image, and passes the image to the fog amount estimation module 120. Accepting an image means, for example, reading an image with a scanner, a camera, etc., receiving an image from an external device via a communication line by fax, etc., a hard disk (in addition to what is built in a computer, via a network) And the like, and the like read out the images stored in the device etc.). The image is a multivalued image (including a color image). One image may be received or a plurality of images may be received. Further, the content of the image may be a document used for business (for example, the above-mentioned business card or the like), a pamphlet for advertisement, or written on a whiteboard. Further, the image receiving module 110 may perform correction by digital filter processing or the like. For example, there is camera shake correction. A processing example of the image reception module 110 will be described later with reference to FIG.

かぶり量推定モジュール120は、画像受付モジュール110、画素値測定モジュール130と接続されており、画像受付モジュール110によって受け付けられた画像に基づいて、本来の画素の輝度値とその画像の画素の輝度値との差であるかぶり量を推定する。そして、推定したかぶり量を補正目標値決定モジュール140、彩度補正モジュール150に渡す。かぶり量推定モジュール120は、例えば、撮影対象文書の下地色の分布から各座標でのかぶりの量と傾斜の強さを推定する。具体例として、前述の特許文献2に記載の技術を用いてもよく、画像の予め定めた量子化点での輝度代表値を生成し、周囲の輝度代表値から各座標の推定輝度値を算出するようにしてもよい。   The fog amount estimation module 120 is connected to the image reception module 110 and the pixel value measurement module 130, and based on the image received by the image reception module 110, the luminance value of the original pixel and the luminance value of the pixel of the image. Estimate the amount of fog that is the difference. Then, the estimated fog amount is passed to the correction target value determination module 140 and the saturation correction module 150. The fog amount estimation module 120 estimates, for example, the fog amount and inclination strength at each coordinate from the background color distribution of the photographing target document. As a specific example, the technique described in Patent Document 2 described above may be used. A luminance representative value at a predetermined quantization point of an image is generated, and an estimated luminance value of each coordinate is calculated from the surrounding luminance representative values. You may make it do.

画素値測定モジュール130は、かぶり量推定モジュール120、補正目標値決定モジュール140と接続されており、画像受付モジュール110によって受け付けられた画像内の画素の彩度値を測定する。そして、測定した彩度値を補正目標値決定モジュール140に渡す。また、画素値測定モジュール130は、画像を走査して、各画素における彩度値を測定するようにしてもよい。走査方向については、後述する第5の実施の形態の画素値測定モジュール1640と同等の走査を行うようにしてもよい。また、画素の彩度値を測定するだけでなく、各画素の輝度値を測定するようにしてもよい。なお、画素値という場合は、彩度値、輝度値を含む。   The pixel value measurement module 130 is connected to the fog amount estimation module 120 and the correction target value determination module 140, and measures the saturation value of the pixel in the image received by the image reception module 110. Then, the measured saturation value is passed to the correction target value determination module 140. Further, the pixel value measurement module 130 may scan the image and measure the saturation value at each pixel. For the scanning direction, scanning equivalent to that of the pixel value measurement module 1640 of the fifth embodiment to be described later may be performed. In addition to measuring the saturation value of the pixel, the luminance value of each pixel may be measured. Note that the pixel value includes a saturation value and a luminance value.

補正目標値決定モジュール140は、画素値測定モジュール130、彩度補正モジュール150と接続されており、画像受付モジュール110によって受け付けられた画像内の下地における輝度値の補正目標値を決定する。そして、決定した補正目標値を彩度補正モジュール150に渡す。補正目標値決定モジュール140は、かぶり量推定モジュール120によって推定されたかぶり量から、例えば、全面が原稿下地であると仮定した場合の輝度値の補正目標値を決定する。また、補正目標値決定モジュール140は、予め定めた固定の補正目標値、又はかぶりの輝度分布から予め定めた条件を満たすものを算出して決定するようにしてもよい。より具体的には、例えば(1)画像内の画素の輝度値を集計して輝度値ヒストグラムを生成して、予め定めた条件を満たす画素(例えば、明るい方から上位10%にある画素)の輝度値としてもよいし、(2)操作者が輝度値を設定するようにしてもよい。   The correction target value determination module 140 is connected to the pixel value measurement module 130 and the saturation correction module 150, and determines the correction target value of the luminance value in the background in the image received by the image reception module 110. Then, the determined correction target value is passed to the saturation correction module 150. The correction target value determination module 140 determines the correction target value of the luminance value when it is assumed that the entire surface is the document background, for example, from the fog amount estimated by the fog amount estimation module 120. The correction target value determination module 140 may calculate and determine a predetermined correction target value or a condition that satisfies a predetermined condition from the fog luminance distribution. More specifically, for example, (1) the luminance values of the pixels in the image are totaled to generate a luminance value histogram, and the pixels satisfying a predetermined condition (for example, pixels in the upper 10% from the brighter one) The brightness value may be used, or (2) the operator may set the brightness value.

彩度補正モジュール150は、補正目標値決定モジュール140、出力モジュール160と接続されており、かぶり量推定モジュール120によって推定されたかぶり量(以下、推定輝度値ともいう)と補正目標値決定モジュール140によって決定された補正目標値と画素値測定モジュール130によって測定された彩度値の無彩色からの距離に基づいて、その彩度値を補正する。そして、彩度値を補正した画像を出力モジュール160に渡す。彩度値を補正した画像とは、かぶりを除去した画像である。
また、彩度補正モジュール150は、画素値測定モジュール130によって測定された彩度値が無彩色に近くなるほど、彩度値の補正量を少なくするように補正するようにしてもよい。例えば、色空間上で無彩色となる軸から対象としている彩度までの距離に対して、軸上で抑制率(彩度の補正を少なくする方向へ向かわせるパラメタ)が最小値をとるような関係から抑制率を算出するようにしてもよい。
また、彩度補正モジュール150は、補正目標値とかぶり量との差分に基づいて、彩度値を補正するようにしてもよい。具体的には、補正目標値とかぶり量との差分の大きさに連動して、彩度の補正量を多くしてもよい。より具体的には、差分に対して、1次以上の単調増加な多項式関数によって増加させるようにしてもよい。
彩度補正モジュール150の処理については、(1)式、(2)式、(3)式を用いて後述する。
The saturation correction module 150 is connected to the correction target value determination module 140 and the output module 160, and the fog amount estimated by the fog amount estimation module 120 (hereinafter also referred to as an estimated luminance value) and the correction target value determination module 140. Based on the determined correction target value and the distance of the saturation value measured by the pixel value measurement module 130 from the achromatic color, the saturation value is corrected. Then, the image with the saturation value corrected is passed to the output module 160. The image with the saturation value corrected is an image from which the fog is removed.
Further, the saturation correction module 150 may perform correction so that the saturation value correction amount decreases as the saturation value measured by the pixel value measurement module 130 becomes closer to an achromatic color. For example, with respect to the distance from the axis that is an achromatic color in the color space to the target saturation, the suppression rate (a parameter that reduces the saturation correction) on the axis takes a minimum value. The suppression rate may be calculated from the relationship.
Further, the saturation correction module 150 may correct the saturation value based on the difference between the correction target value and the fogging amount. Specifically, the saturation correction amount may be increased in conjunction with the magnitude of the difference between the correction target value and the fogging amount. More specifically, the difference may be increased by a first-order or higher monotonically increasing polynomial function.
The processing of the saturation correction module 150 will be described later using Equations (1), (2), and (3).

出力モジュール160は、彩度補正モジュール150と接続されており、彩度補正モジュール150によって彩度が補正された画像を受け取り、その画像を出力する。画像を出力するとは、例えば、プリンタ等の印刷装置で印刷すること、ディスプレイ等の表示装置に表示すること、ファックス等の画像送信装置で画像を送信すること、画像データベース等の画像記憶装置へ画像を書き込むこと、メモリーカード等の記憶媒体に記憶すること、他の情報処理装置へ渡すこと等が含まれる。また、画像受付モジュール110によって受け付けられた画像と対応付けて出力するようにしてもよい。   The output module 160 is connected to the saturation correction module 150, receives an image whose saturation has been corrected by the saturation correction module 150, and outputs the image. To output an image is, for example, printing on a printing device such as a printer, displaying on a display device such as a display, transmitting an image on an image transmission device such as a fax, or image to an image storage device such as an image database. , Storing in a storage medium such as a memory card, passing to another information processing apparatus, and the like. Further, the image may be output in association with the image received by the image receiving module 110.

図2は、第1の実施の形態による処理例を示すフローチャートである。
ステップS202では、画像受付モジュール110が、対象画像を受け付ける。
図3は、画像受付モジュール110による処理例を示す説明図である。撮影対象文書320は、図51の例で示した撮影対象文書5100と同等のものである。これを撮影装置310で撮影した場合、撮影画像330のようにかぶりが発生した画像を得る。例えば、名刺交換した後に、机の上に撮影対象文書320を置き、撮影装置310で撮影するような状況である。撮影装置310は、デジタルカメラであってもよいし、携帯情報端末装置(例えば、スマートフォンを含む携帯電話等)に内蔵されているデジタルカメラであってもよいし、スキャナ等であってもよい。
FIG. 2 is a flowchart illustrating a processing example according to the first exemplary embodiment.
In step S202, the image reception module 110 receives a target image.
FIG. 3 is an explanatory diagram illustrating an example of processing performed by the image reception module 110. The photographing target document 320 is equivalent to the photographing target document 5100 shown in the example of FIG. When this is photographed by the photographing apparatus 310, an image with fogging like a photographed image 330 is obtained. For example, after exchanging business cards, the photographing target document 320 is placed on a desk and photographed by the photographing device 310. The imaging device 310 may be a digital camera, a digital camera built in a portable information terminal device (for example, a mobile phone including a smartphone), a scanner, or the like.

ステップS204では、かぶり量推定モジュール120が、かぶり量を推定する。
ステップS206では、画素値測定モジュール130が、画像内の画素値を測定する。
ステップS208では、補正目標値決定モジュール140が、補正目標値を決定する。
図4は、かぶり量を除去する様子を3次元的に表現したものであり、かぶり量推定モジュール120、画素値測定モジュール130、補正目標値決定モジュール140による処理例を示す説明図である。x軸、y軸は画像内における位置を示し、z軸は輝度値を示す空間である。z軸において下にある灰色の面がかぶりの画像であり、画像全体を覆っているように位置している。そして、x軸方向にいくにしたがって、z軸において下に下がっているのは、かぶり画像が右側にいくほど濃くなっていることを示している。そして、z軸において上にある薄い格子模様の面が補正した後の画像の輝度を示している。pは、図4の例に示すように、ステップS208で決定された補正目標値であり、例えば、前述のように画像における明るい方から上位10%にある画素の輝度値である。次のステップS210で輝度を補正する場合は、この補正目標値に合わせるように、各点における輝度を上げる(明るくする、z軸上で上にあげる)ようにしてかぶりを除去している。図4では、交点412、414、416、418に囲まれている交点418を補正後中間点422まで輝度を引き上げていることを示している。なお、交点412、414は、ライン432上にあり、交点416、418は、ライン434上にあり、交点412、416は、ライン436上にあり、交点414、418は、ライン438上にある。そして、下地以外の部分である文字部(図4内では「あ」の文字)は、画素値測定モジュール130によって下地部分よりも暗い輝度値が測定されることになる。
In step S204, the fog amount estimation module 120 estimates the fog amount.
In step S206, the pixel value measurement module 130 measures the pixel value in the image.
In step S208, the correction target value determination module 140 determines a correction target value.
FIG. 4 is a three-dimensional representation of how the fogging amount is removed, and is an explanatory diagram showing a processing example by the fogging amount estimation module 120, the pixel value measurement module 130, and the correction target value determination module 140. The x-axis and y-axis indicate positions in the image, and the z-axis is a space indicating luminance values. The gray surface below the z-axis is a fogged image and is positioned so as to cover the entire image. Then, as it goes in the x-axis direction, the downward movement in the z-axis indicates that the fogging image becomes darker toward the right side. And the brightness | luminance of the image after correction | amendment of the surface of the thin lattice pattern on the upper side in az axis has shown. As shown in the example of FIG. 4, p * is the correction target value determined in step S <b > 208, for example, the luminance value of the pixels in the upper 10% from the brightest in the image as described above. In the case where the brightness is corrected in the next step S210, the fog is removed by increasing the brightness at each point (brightening, raising it on the z axis) so as to match the correction target value. In FIG. 4, the luminance is raised to the corrected intermediate point 422 at the intersection point 418 surrounded by the intersection points 412, 414, 416, and 418. The intersection points 412, 414 are on the line 432, the intersection points 416, 418 are on the line 434, the intersection points 412, 416 are on the line 436, and the intersection points 414, 418 are on the line 438. A luminance value darker than the background portion is measured by the pixel value measurement module 130 for the character portion (the character “A” in FIG. 4) that is a portion other than the background portion.

ステップS210では、彩度補正モジュール150が、画像の彩度を補正する。彩度補正モジュール150は、かぶり量推定モジュール120によって推定されたかぶり量の大小により、彩度を強めるようにする。Lab空間では、次のような(1)式、(2)式、(3)式等で彩度成分(a、b)を強める。ここで、Cはかぶり量とする。また、Cは、第3の実施の形態で説明する(8)式の輝度の補正量Cである。これらの式では、有彩色部分は輝度補正分相当の彩度向上が適用され、無彩色部分に対しては補正処理を行わないようになっている。なお、彩度成分(a、b)が128である場合は無彩色であるとする。

Figure 0006003574
Figure 0006003574
Figure 0006003574
また、(3)式において、文書の読み易さを保つために、無彩色(例えば、白背景、黒文字等)の彩度は強調しすぎないようにしている。つまり、彩度が無彩色に近くなるほどcolorRが0に近くなるようにしている。
彩度補正モジュール150は、補正目標値とかぶり量の差分が大きくなると、彩度値の補正量を多くするように補正している。これは後述の(8)式のC((8)式の2段目の式参照)が大きくなることである。より具体的には、差分に対して、(8)式の3段目の式のような1次以上の単調増加な多項式関数によって増加させるようにしてもよい。
なお、ステップS210において、彩度補正モジュール150は輝度値を補正するようにしてもよい。なお、輝度値の補正については、第3の実施の形態で用いられている輝度値の補正方法を用いるようにしてもよい。 In step S210, the saturation correction module 150 corrects the saturation of the image. The saturation correction module 150 increases the saturation according to the amount of fog estimated by the fog amount estimation module 120. In the L * ab space, the saturation components (a, b) are strengthened by the following equations (1), (2), (3), and the like. Here, C is the fogging amount. Further, C is the luminance correction amount C in the equation (8) described in the third embodiment. In these equations, saturation improvement corresponding to the luminance correction is applied to the chromatic color portion, and correction processing is not performed on the achromatic color portion. When the saturation component (a, b) is 128, it is assumed that the color is achromatic.
Figure 0006003574
Figure 0006003574
Figure 0006003574
In the equation (3), the saturation of achromatic colors (for example, white background, black characters, etc.) is not excessively emphasized in order to maintain readability of the document. That is, colorR is made closer to 0 as the saturation is closer to an achromatic color.
The saturation correction module 150 corrects the saturation value correction amount to increase as the difference between the correction target value and the fogging amount increases. This is because C of the following formula (8) (see the second stage formula of formula (8)) becomes large. More specifically, the difference may be increased by a first-order or higher monotonically increasing polynomial function such as the expression in the third stage of Expression (8).
In step S210, the saturation correction module 150 may correct the luminance value. As for the correction of the luminance value, the luminance value correction method used in the third embodiment may be used.

図5は、彩度補正モジュールによる処理例(実験例)を示す説明図である。ステップS202で画像受付モジュール110が撮影画像330を受け付けた場合に、ステップS210で輝度と彩度を補正した画像が、本実施形態の処理画像540である。そして、輝度のみを補正した画像が、単なるかぶり除去処理画像550である。このように、本実施形態の処理画像540の有彩色部分は単なるかぶり除去処理画像550よりもくっきりと再現されていることがわかる。   FIG. 5 is an explanatory diagram showing a processing example (experimental example) by the saturation correction module. When the image receiving module 110 receives the captured image 330 in step S202, the image in which the luminance and saturation are corrected in step S210 is the processed image 540 of the present embodiment. An image with only luminance corrected is a simple fog removal processed image 550. Thus, it can be seen that the chromatic portion of the processed image 540 of the present embodiment is reproduced more clearly than the simple fog removal processed image 550.

ステップS212では、出力モジュール160が、彩度を補正した画像を出力する。例えば、プリンタでかぶりを除去した画像を印刷する。   In step S212, the output module 160 outputs an image with corrected saturation. For example, an image from which fog is removed by a printer is printed.

<第2の実施の形態>
図6は、第2の実施の形態の構成例についての概念的なモジュール構成図である。
第2の実施の形態である画像処理装置は、画像からかぶりを除去するものであって、図6の例に示すように、画像受付モジュール110、かぶり量推定モジュール120、画素値測定モジュール130、補正目標値決定モジュール140、彩度補正可否判断モジュール145、彩度補正モジュール150、出力モジュール160を有している。なお、前述の実施の形態と同種の部位には同一符号を付し重複した説明を省略する。ただし、同一符号を付した部位であっても、前述の実施の形態と異なるところは説明を付加する。説明を付加した場合であっても、重複している部分の説明は省略する(以下、実施の形態の説明においても同様)。
<Second Embodiment>
FIG. 6 is a conceptual module configuration diagram of a configuration example according to the second embodiment.
The image processing apparatus according to the second embodiment removes the fog from the image. As shown in the example of FIG. 6, the image reception module 110, the fog amount estimation module 120, the pixel value measurement module 130, A correction target value determination module 140, a saturation correction availability determination module 145, a saturation correction module 150, and an output module 160 are provided. In addition, the same code | symbol is attached | subjected to the site | part of the same kind as above-mentioned embodiment, and the overlapping description is abbreviate | omitted. However, even if it is the site | part which attached | subjected the same code | symbol, a different part from the above-mentioned embodiment adds description. Even when the description is added, the description of the overlapping part is omitted (the same applies to the description of the embodiment below).

補正目標値決定モジュール140は、画素値測定モジュール130、彩度補正可否判断モジュール145と接続されている。第1の実施の形態の補正目標値決定モジュール140と同等であるが、決定した補正目標値を彩度補正可否判断モジュール145に渡す。   The correction target value determination module 140 is connected to the pixel value measurement module 130 and the saturation correction availability determination module 145. Although it is equivalent to the correction target value determination module 140 of the first embodiment, the determined correction target value is passed to the saturation correction availability determination module 145.

彩度補正可否判断モジュール145は、補正目標値決定モジュール140、彩度補正モジュール150と接続されている。彩度補正可否判断モジュール145は、推定輝度値の傾き、推定輝度値と目標輝度値の差分が大きい場合、下地以外の文字部等がつぶれすぎている場合があるので補正処理を常に実施することはしないようにしている。
彩度補正可否判断モジュール145は、かぶり量推定モジュール120によって推定されたかぶり量と補正目標値決定モジュール140によって決定された補正目標値との差分に基づいて、彩度補正モジュール150による補正を行うか否かを判断する。この判断処理については、(4)式を用いて後述する。
また、彩度補正可否判断モジュール145は、画像受付モジュール110によって受け付けられた画像内の各画素におけるかぶり量推定モジュール120によって推定されたかぶり量同士の差分に基づいて、彩度補正モジュール150による補正を行うか否かを判断するようにしてもよい。この判断処理については、(5)式、(6)式を用いて後述する。
The saturation correction availability determination module 145 is connected to the correction target value determination module 140 and the saturation correction module 150. The saturation correction possibility determination module 145 always performs the correction process because the character portion other than the background may be too crushed when the gradient of the estimated luminance value and the difference between the estimated luminance value and the target luminance value are large. I don't want to.
Whether the saturation correction possibility determination module 145 performs correction by the saturation correction module 150 based on the difference between the fog amount estimated by the fog amount estimation module 120 and the correction target value determined by the correction target value determination module 140. Judge whether or not. This determination process will be described later using equation (4).
Further, the saturation correction availability determination module 145 performs correction by the saturation correction module 150 based on the difference between the fog amounts estimated by the fog amount estimation module 120 at each pixel in the image received by the image reception module 110. You may make it judge whether it performs. This determination process will be described later using equations (5) and (6).

彩度補正モジュール150は、彩度補正可否判断モジュール145、出力モジュール160と接続されている。第1の実施の形態の彩度補正モジュール150と同等であるが、彩度補正可否判断モジュール145によって補正を行うと判断された場合に、補正を行う。   The saturation correction module 150 is connected to the saturation correction availability determination module 145 and the output module 160. Although it is equivalent to the saturation correction module 150 of the first embodiment, the correction is performed when it is determined by the saturation correction availability determination module 145 that the correction is made.

図7は、第2の実施の形態による処理例を示すフローチャートである。ステップS702からステップS708まで、ステップS712以降の処理は、図2に例示したフローチャートと同等の処理を行う。
ステップS702では、画像受付モジュール110が、対象画像を受け付ける。
ステップS704では、かぶり量推定モジュール120が、かぶり量を推定する。
ステップS706では、画素値測定モジュール130が、画像内の画素値を測定する。
ステップS708では、補正目標値決定モジュール140が、補正目標値を決定する。
FIG. 7 is a flowchart illustrating a processing example according to the second exemplary embodiment. From step S702 to step S708, the processing after step S712 is equivalent to the flowchart illustrated in FIG.
In step S702, the image reception module 110 receives a target image.
In step S704, the fog amount estimation module 120 estimates the fog amount.
In step S706, the pixel value measurement module 130 measures the pixel value in the image.
In step S708, the correction target value determination module 140 determines a correction target value.

ステップS710では、彩度補正可否判断モジュール145が、彩度補正処理を行うか否かを判断し、行う場合はステップS712へ進み、それ以外の場合はステップS714へ進む。
例えば、以下の(4)式、(5)式、(6)式のいずれかにおける計算値Eが予め定めた値を超えている場合は補正を実施しないようにする。

Figure 0006003574
なお、eijは、座標(x,y)における推定輝度値であり、p ijは、座標(x,y)における補正目標値を表している。
この(4)式は、推定輝度値と補正目標値の差分を利用するものである。図8は、彩度補正可否モジュール145による処理例を示す説明図である。図8の例で示すと、目標輝度(点線)と推定輝度(一点鎖線)との間隔の最大値である。
Figure 0006003574
この(5)式は、各画素間における推定輝度値の差分を利用するものである。図8の例で示すと、推定輝度(一点鎖線)における最大値と最小値との間隔である。
Figure 0006003574
この(6)式は、各画素間における推定輝度値の差分を距離で正規化して傾き量として利用するものである。図8の例で示すと、推定輝度(一点鎖線)の傾きである。 In step S710, the saturation correction availability determination module 145 determines whether to perform saturation correction processing. If so, the process proceeds to step S712. Otherwise, the process proceeds to step S714.
For example, when the calculated value E in any of the following formulas (4), (5), and (6) exceeds a predetermined value, correction is not performed.
Figure 0006003574
Note that e ij is an estimated luminance value at coordinates (x i , y j ), and p * ij represents a correction target value at coordinates (x i , y j ).
This equation (4) uses the difference between the estimated luminance value and the correction target value. FIG. 8 is an explanatory diagram illustrating an example of processing performed by the saturation correction availability module 145. In the example of FIG. 8, it is the maximum value of the interval between the target luminance (dotted line) and the estimated luminance (dashed line).
Figure 0006003574
This equation (5) uses the difference of the estimated luminance value between each pixel. In the example of FIG. 8, it is the interval between the maximum value and the minimum value in the estimated luminance (one-dot chain line).
Figure 0006003574
This equation (6) is used as the amount of inclination by normalizing the difference of the estimated luminance value between the pixels with the distance. In the example of FIG. 8, it is the inclination of the estimated luminance (dashed line).

ステップS712では、彩度補正モジュール150が、画像の彩度を補正する。
ステップS714では、出力モジュール160が、彩度を補正した画像を出力する。
In step S712, the saturation correction module 150 corrects the saturation of the image.
In step S714, the output module 160 outputs an image with corrected saturation.

前述の図51(a)から(c)の説明において、前述の第1の実施の形態、第2の実施の形態との比較について、図51(c)から(g)の例を用いて説明する。
仮にかぶり量を正しく算出できたとしても、右上にある赤色の図形は彩度が落ちてしまう。
このことについて、図51(c)から(g)の例を用いて説明する。図51(c)の例に示すように撮影画像5130内をライン5132で走査した場合の輝度値をグラフ(縦軸は輝度値を示し、横軸は走査におけるx座標)に示すと、図51(d)の例に示すようにようなる。つまり、かぶり画像5120は右方向に向かうほど濃くなるため、輝度値は右下がりとなるが、元の画像におけるもともとの輝度値があるので、図51(d)のグラフの例のように、輝度分布5142〜5158で段階的な輝度の分布を示すことになる。また、ライン5132で走査した場合の彩度値をグラフに示すと、図51(e)の例に示すようにようなる。つまり、彩度の減衰率は右下がりとなる。
ここで、かぶり量に基づいて輝度だけを補正すると、その結果の画像は、図51(f)の例に示すような補正画像5160となる。つまり、補正画像5160の右側部分は、黒い文字部分であっても薄い灰色となってしまう。そのうえ、右上にある赤色の図形は彩度が落ちてしまう。
元原稿である撮影対象文書5100のように復元するためには、図51(g)の例に示すように、輝度値の補正量に対して比例して彩度を増やす必要がある。第1の実施の形態、第2の実施の形態では、彩度値を補正することによって、有彩色の部分に対しても再現性を低下させることを防止している。
In the description of FIGS. 51A to 51C described above, a comparison with the first embodiment and the second embodiment will be described using the examples of FIGS. 51C to 51G. To do.
Even if the fog amount can be calculated correctly, the red figure on the upper right side loses saturation.
This will be described with reference to FIGS. 51C to 51G. As shown in the example of FIG. 51C, the luminance value when the captured image 5130 is scanned with the line 5132 is shown in a graph (the vertical axis indicates the luminance value, and the horizontal axis indicates the x coordinate in the scanning). As shown in the example of (d). That is, since the fogging image 5120 becomes darker toward the right, the luminance value decreases to the right. However, since there is the original luminance value in the original image, the luminance is as shown in the example of the graph of FIG. Distributions 5142 to 5158 indicate a stepwise luminance distribution. In addition, when the saturation value in the case of scanning with the line 5132 is shown in the graph, it is as shown in the example of FIG. That is, the saturation decay rate decreases to the right.
Here, when only the luminance is corrected based on the fogging amount, the resulting image becomes a corrected image 5160 as shown in the example of FIG. That is, the right portion of the corrected image 5160 is light gray even if it is a black character portion. In addition, the red figure in the upper right will lose saturation.
In order to restore the original document 5100 that is the original document, it is necessary to increase the saturation in proportion to the correction value of the luminance value, as shown in the example of FIG. In the first embodiment and the second embodiment, by correcting the saturation value, it is possible to prevent the reproducibility of the chromatic color portion from being lowered.

<第3の実施の形態>
次に、第3の実施の形態を説明する。
まず、第3の実施の形態、第4の実施の形態を説明する前に、その前提となる技術について説明する。なお、この説明は、第3の実施の形態、第4の実施の形態の理解を容易にすることを目的とするものである。
図52(a)の例に示す撮影対象文書5200は名刺であり、白黒のみで印刷されている。
この撮影対象文書5200を、例えばデジタルカメラで撮影し、図52(c)の例に示す撮影画像5230を得る。この場合、撮影した画像には図52(b)の例に示すかぶり画像5220が重複されて撮影されている。図52(b)の例に示すようにかぶり画像5220では、右側が濃い黒であり、左側が薄い黒となるようなグラデーション画像となっている。したがって、図52(c)の例に示すように撮影画像5230でも、右側は黒くなるが、左側は元の撮影対象文書5210の画像に近いものとなる。
また、デジタルカメラで撮影する場合のみでなく、スキャナ等においても、このかぶり画像は発生することがあることは、前述した通りである。
<Third Embodiment>
Next, a third embodiment will be described.
First, before explaining the third embodiment and the fourth embodiment, the technology that is the premise thereof will be explained. This description is intended to facilitate understanding of the third embodiment and the fourth embodiment.
The photographing target document 5200 shown in the example of FIG. 52A is a business card and is printed only in black and white.
The photographing target document 5200 is photographed by, for example, a digital camera, and a photographed image 5230 shown in the example of FIG. In this case, the fogged image 5220 shown in the example of FIG. As shown in the example of FIG. 52B, the fogging image 5220 is a gradation image in which the right side is dark black and the left side is light black. Therefore, as shown in the example of FIG. 52C, even in the captured image 5230, the right side is black, but the left side is close to the image of the original shooting target document 5210.
Further, as described above, this fogging image may occur not only when shooting with a digital camera but also with a scanner or the like.

第3の実施の形態である画像処理装置は、画像からかぶりを除去するものであって、図9の例に示すように、画像受付モジュール110、かぶり量推定モジュール120、画素値測定モジュール130、補正目標値決定モジュール140、補正モジュール910、出力モジュール160を有している。補正モジュール910は、彩度補正モジュール150、輝度補正モジュール950を有している。   The image processing apparatus according to the third embodiment removes the fog from the image. As shown in the example of FIG. 9, the image reception module 110, the fog estimation module 120, the pixel value measurement module 130, A correction target value determination module 140, a correction module 910, and an output module 160 are provided. The correction module 910 includes a saturation correction module 150 and a luminance correction module 950.

画素値測定モジュール130は、かぶり量推定モジュール120、補正目標値決定モジュール140と接続されており、画像受付モジュール110によって受け付けられた画像内の画素の画素値を測定する。そして、測定した画素値を補正目標値決定モジュール140に渡す。また、画素値測定モジュール130は、画像を走査して、各画素における画素値を測定する。   The pixel value measurement module 130 is connected to the fogging amount estimation module 120 and the correction target value determination module 140, and measures the pixel value of the pixel in the image received by the image reception module 110. Then, the measured pixel value is passed to the correction target value determination module 140. The pixel value measurement module 130 scans the image and measures the pixel value in each pixel.

補正目標値決定モジュール140は、画素値測定モジュール130、補正モジュール910と接続されており、画像受付モジュール110によって受け付けられた画像内の下地における輝度値の補正目標値を決定する。そして、決定した補正目標値を補正モジュール910に渡す。   The correction target value determination module 140 is connected to the pixel value measurement module 130 and the correction module 910, and determines the correction target value of the luminance value of the background in the image received by the image reception module 110. Then, the determined correction target value is passed to the correction module 910.

輝度補正モジュール950は、補正目標値決定モジュール140、出力モジュール160と接続されている補正モジュール910内にあり、かぶり量推定モジュール120によって推定されたかぶり量と補正目標値決定モジュール140によって決定された補正目標値に基づいて、画素値測定モジュール130によって測定された輝度値を補正する。そして、輝度値を補正した画像を彩度補正モジュール150又は出力モジュール160に渡す。輝度値を補正した画像とは、かぶりを除去した画像である。
また、輝度補正モジュール950は、かぶり量推定モジュール120によって推定されたかぶり量と補正目標値決定モジュール140によって決定された補正目標値との差分を基本補正量とし、その基本補正量を画素値測定モジュール130によって測定された輝度値とそのかぶり量との差分に基づいた係数によって変更し、その変更した基本補正量に基づいて、その輝度値を補正するようにしてもよい。この処理については、(7)式、(8)式を用いて後述する。
The brightness correction module 950 is in the correction module 910 connected to the correction target value determination module 140 and the output module 160, and the fog amount estimated by the fog amount estimation module 120 and the correction determined by the correction target value determination module 140. Based on the target value, the luminance value measured by the pixel value measurement module 130 is corrected. Then, the image whose luminance value is corrected is passed to the saturation correction module 150 or the output module 160. The image whose luminance value is corrected is an image from which the fog is removed.
Further, the luminance correction module 950 uses a difference between the fog amount estimated by the fog amount estimation module 120 and the correction target value determined by the correction target value determination module 140 as a basic correction amount, and uses the basic correction amount as a pixel value measurement module. The brightness value may be changed based on the coefficient based on the difference between the brightness value measured by 130 and the fogging amount, and the brightness value may be corrected based on the changed basic correction amount. This process will be described later using equations (7) and (8).

さらに、輝度補正モジュール950は、画素値測定モジュール130によって測定された輝度値とかぶり量との差分が大きくなると、基本補正量を小さくするような係数とするようにしてもよい。「基本補正量を小さくする」とは、「基本補正量の修正量を大きくする」ことであり、下地部分における補正量と比較して、測定された輝度値の補正量は少ないことを意味する。例えば、黒色の文字等に対してかぶり量の除去は少なくすることになる。この処理については、(8)式を用いて後述する。
さらに、輝度補正モジュール950は、画素値測定モジュール130によって測定された輝度値とかぶり量との差分が予め定めた閾値以上又は大きい場合は、その輝度値の補正を行わないようにしてもよい。この処理については、(8)式を用いて後述する。
また、輝度補正モジュール950は、基本補正量を画素値測定モジュール130によって測定された輝度値とかぶり量との差分と基本補正量に基づいた係数によって変更するようにしてもよい。この処理については、(9)式を用いて後述する。
Further, the luminance correction module 950 may be a coefficient that decreases the basic correction amount when the difference between the luminance value measured by the pixel value measurement module 130 and the fogging amount increases. “Reducing the basic correction amount” means “increasing the correction amount of the basic correction amount” and means that the correction amount of the measured luminance value is smaller than the correction amount in the background portion. . For example, the removal of the fogging amount is reduced for black characters and the like. This process will be described later using equation (8).
Further, the luminance correction module 950 may not correct the luminance value when the difference between the luminance value measured by the pixel value measuring module 130 and the fogging amount is greater than or equal to a predetermined threshold value. This process will be described later using equation (8).
Further, the luminance correction module 950 may change the basic correction amount by a coefficient based on the difference between the luminance value measured by the pixel value measurement module 130 and the fogging amount and the basic correction amount. This process will be described later using equation (9).

彩度補正モジュール150は、補正目標値決定モジュール140、出力モジュール160と接続されている補正モジュール910内にある。
彩度補正モジュール150と輝度補正モジュール950の処理は、いずれが先にやってもよいし(彩度補正モジュール150が先に処理する場合は、その処理結果の画像を輝度補正モジュール950が処理し、輝度補正モジュール950が先に処理する場合は、その処理結果の画像を彩度補正モジュール150が処理する)、並列して処理を行うようにしてもよい。
The saturation correction module 150 is in the correction module 910 connected to the correction target value determination module 140 and the output module 160.
Either the saturation correction module 150 or the luminance correction module 950 may be processed first (if the saturation correction module 150 processes first, the luminance correction module 950 processes the image of the processing result). When the luminance correction module 950 processes first, the saturation correction module 150 processes the image of the processing result), and the processing may be performed in parallel.

出力モジュール160は、補正モジュール910と接続されており、彩度補正モジュール150と輝度補正モジュール950によって補正された画像を受け取り、その画像を出力する。   The output module 160 is connected to the correction module 910, receives an image corrected by the saturation correction module 150 and the luminance correction module 950, and outputs the image.

図10は、第3の実施の形態による処理例を示すフローチャートである。
ステップS1002では、画像受付モジュール110が、対象画像を受け付ける。
図11は、画像受付モジュール110による処理例を示す説明図である。撮影対象文書1120は、図52の例で示した撮影対象文書5200と同等のものである。これを撮影装置310で撮影した場合、撮影画像1130のようにかぶりが発生した画像を得る。例えば、名刺交換した後に、机の上に撮影対象文書1120を置き、撮影装置310で撮影するような状況である。撮影装置310は、デジタルカメラであってもよいし、携帯情報端末装置(例えば、スマートフォンを含む携帯電話等)に内蔵されているデジタルカメラであってもよいし、スキャナ等であってもよい。
FIG. 10 is a flowchart illustrating a processing example according to the third exemplary embodiment.
In step S1002, the image receiving module 110 receives a target image.
FIG. 11 is an explanatory diagram illustrating an example of processing performed by the image reception module 110. The shooting target document 1120 is equivalent to the shooting target document 5200 shown in the example of FIG. When this is photographed by the photographing apparatus 310, an image with fogging like a photographed image 1130 is obtained. For example, after the business card is exchanged, the photographing target document 1120 is placed on the desk, and the photographing apparatus 310 shoots. The imaging device 310 may be a digital camera, a digital camera built in a portable information terminal device (for example, a mobile phone including a smartphone), a scanner, or the like.

ステップS1004では、かぶり量推定モジュール120が、かぶり量を推定する。
ステップS1006では、画素値測定モジュール130が、画像内の画素値を測定する。
ステップS1008では、補正目標値決定モジュール140が、補正目標値を決定する。
図12は、かぶり量を除去する様子を3次元的に表現したものであり、かぶり量推定モジュール120、画素値測定モジュール130、補正目標値決定モジュール140による処理例を示す説明図である。x軸、y軸は画像内における位置を示し、z軸は輝度値を示す空間である。z軸において下にある灰色の面がかぶりの画像であり、画像全体を覆っているように位置している。そして、x軸方向にいくにしたがって、z軸において下に下がっているのは、かぶり画像が右側にいくほど濃くなっていることを示している。そして、z軸において上にある薄い格子模様の面が補正した後の画像の輝度を示している。pは、図12の例に示すように、ステップS1008で決定された補正目標値であり、例えば、前述のように画像における明るい方から上位10%にある画素の輝度値である。次のステップS1012ではこれに合わせるように、各点における輝度を上げる(明るくする、z軸上で上にあげる)ようにしてかぶりを除去している。図12では、交点1212、1214、1216、1218に囲まれている交点1218を補正後中間点1222まで輝度を引き上げていることを示している。なお、交点1212、1214は、ライン1232上にあり、交点1216、1218は、ライン1234上にあり、交点1212、1216は、ライン1236上にあり、交点1214、1218は、ライン1238上にある。そして、下地以外の部分である文字部(図12内では「あ」の文字)は、画素値測定モジュール130によって下地部分よりも暗い輝度値が測定されることになる。
In step S1004, the fog amount estimation module 120 estimates the fog amount.
In step S1006, the pixel value measurement module 130 measures the pixel value in the image.
In step S1008, the correction target value determination module 140 determines a correction target value.
FIG. 12 is a three-dimensional representation of how the fogging amount is removed, and is an explanatory diagram showing a processing example by the fogging amount estimation module 120, the pixel value measurement module 130, and the correction target value determination module 140. The x-axis and y-axis indicate positions in the image, and the z-axis is a space indicating luminance values. The gray surface below the z-axis is a fogged image and is positioned so as to cover the entire image. Then, as it goes in the x-axis direction, the downward movement in the z-axis indicates that the fogging image becomes darker toward the right side. And the brightness | luminance of the image after correction | amendment of the surface of the thin lattice pattern on the upper side in az axis has shown. As shown in the example of FIG. 12, p * is the correction target value determined in step S1008, for example, the luminance value of the pixels in the upper 10% from the brighter side in the image as described above. In the next step S1012, the fog is removed by increasing the brightness at each point (increasing the brightness on the z axis) so as to match this. FIG. 12 shows that the brightness of the intersection 1218 surrounded by the intersections 1212, 1214, 1216, and 1218 is raised to the corrected intermediate point 1222. The intersection points 1212 and 1214 are on the line 1232, the intersection points 1216 and 1218 are on the line 1234, the intersection points 1212 and 1216 are on the line 1236, and the intersection points 1214 and 1218 are on the line 1238. The pixel value measurement module 130 measures a luminance value darker than the background portion of the character portion (the character “A” in FIG. 12) other than the background portion.

ステップS1010では、彩度補正モジュール150が、画像の彩度を補正する。
ステップS1012では、輝度補正モジュール950が、画像の輝度を補正する。輝度補正モジュール950は、推定輝度値と測定輝度値の差分をチェックする。そして、差分が暗い側にあれば(推定輝度から測定輝度値を減算した結果が正の値となれば)、補正量を下地部分と比べてより抑制する。つまり、文字等の部分については、必要以上に輝度値を上げないことになる。
図13は、輝度補正モジュール950による処理例を示す説明図である。図13(a)は、輝度補正モジュール950による補正前の画像の様子を示すグラフの例であり、図13(b)は、輝度補正モジュール950による補正後の画像の様子を示すグラフの例である。図13(a)(b)の例に示すグラフでは、補正目標値決定モジュール140が決定した補正目標値を水平線の点線で表している。図13(a)の例に示すグラフでは、画素値測定モジュール130が測定した輝度を実線で示しており、かぶり量推定モジュール120が推定したかぶり量(推定輝度値)は一点鎖線で示している。図13(b)の例に示すグラフでは、画素値測定モジュール130が測定した輝度を灰色の実線で示しており、輝度補正モジュール950が補正した輝度値は黒色の実線で示している。つまり、下地部分は補正目標値にまで輝度を上げており(輝度を高める、薄くする)、下地以外の部分は輝度を上げているが、下地部分において高めている量よりも少ない量である。したがって、下地以外の部分は、必要以上に薄くなっていないことを示している。
In step S1010, the saturation correction module 150 corrects the saturation of the image.
In step S1012, the luminance correction module 950 corrects the luminance of the image. The brightness correction module 950 checks the difference between the estimated brightness value and the measured brightness value. If the difference is on the dark side (if the result of subtracting the measured luminance value from the estimated luminance is a positive value), the correction amount is further suppressed as compared with the background portion. In other words, the luminance value is not increased more than necessary for portions such as characters.
FIG. 13 is an explanatory diagram illustrating an example of processing performed by the luminance correction module 950. FIG. 13A is an example of a graph showing the state of an image before correction by the luminance correction module 950, and FIG. 13B is an example of a graph showing the state of an image after correction by the luminance correction module 950. is there. 13A and 13B, the correction target value determined by the correction target value determination module 140 is represented by a horizontal dotted line. In the graph shown in the example of FIG. 13A, the luminance measured by the pixel value measurement module 130 is indicated by a solid line, and the fog amount (estimated luminance value) estimated by the fog amount estimation module 120 is indicated by a one-dot chain line. . In the graph shown in the example of FIG. 13B, the luminance measured by the pixel value measurement module 130 is indicated by a gray solid line, and the luminance value corrected by the luminance correction module 950 is indicated by a black solid line. In other words, the luminance of the background portion is increased to the correction target value (increasing or decreasing the luminance), and the portion other than the background is increased in luminance, but the amount is smaller than the amount increased in the background portion. Therefore, the portions other than the base are not thinner than necessary.

下地部分か下地以外の部分であるかについては、
(推定輝度値−測定輝度値)<閾値th ならば、下地部分であると判断し、
(推定輝度値−測定輝度値)≧閾値th ならば、下地以外の部分であると判断する。なお、ここでの閾値thは、人間の目で見て下地以外の部分(例えば、文字)であると判明できる程度の値となり、予め定めた値である。
そして、下地部分であると判断された部分については、
補正量=(補正目標値−推定輝度値)
を計算し(この補正量は基本補正量となる)、下地以外の部分であると判断された部分については、
補正量=(補正目標値−推定輝度値)×補正レートR
を計算する。そして、補正量を測定輝度値に加算する。補正レートRは、1以下の値であり、次の(7)式のように計算される。測定輝度値(v)と推定輝度値(e)の差分が大きいほど係数である補正レート(R)が0に近い値となる。さらに、(7)式の外側のmax()式によって0が下限となり、差分が予め定めた値を超えると補正しないことになる。つまり、補正レート(R)は0となり、補正しないこと(測定輝度値そのままにしておくこと)となる。なお、補正強度パラメタρは予め定めた値とする。

Figure 0006003574
したがって、補正後の輝度値new_vは、次の(8)式のように計算される。
Figure 0006003574
なお、(8)式内のCは、前述の補正量のことである。 Whether it is a ground part or a part other than the ground part,
If (estimated luminance value−measured luminance value) <threshold th, it is determined to be a background portion,
If (estimated luminance value−measured luminance value) ≧ threshold th, it is determined that the portion is other than the background. Here, the threshold th is a value that can be determined to be a portion (for example, a character) other than the background when viewed by human eyes, and is a predetermined value.
And about the part judged to be the ground part,
Correction amount = (correction target value−estimated luminance value)
(This correction amount is the basic correction amount), and for the parts that are determined to be other than the background,
Correction amount = (correction target value−estimated luminance value) × correction rate R
Calculate Then, the correction amount is added to the measured luminance value. The correction rate R is a value of 1 or less, and is calculated as in the following equation (7). The greater the difference between the measured luminance value (v) and the estimated luminance value (e), the closer the correction rate (R), which is a coefficient, to a value of zero. Further, 0 becomes the lower limit by the max () expression outside the expression (7), and no correction is made when the difference exceeds a predetermined value. That is, the correction rate (R) is 0, and no correction is performed (the measured luminance value is left as it is). The correction strength parameter ρ is a predetermined value.
Figure 0006003574
Therefore, the corrected luminance value new_v is calculated as in the following equation (8).
Figure 0006003574
Note that C in the equation (8) is the above-described correction amount.

また、輝度補正モジュール950は、(7)式の代わりに次の(9)式を採用してもよい。

Figure 0006003574
(9)式は、補正目標値である輝度値と推定輝度値の差分である(p−e)が大きい場合には、推定輝度値と測定輝度値の差が小さくても補正抑制を大きくするような式となっている。なお、τは倍率補正である。例えば、中間輝度値の128などを採用してもよい。 Further, the brightness correction module 950 may adopt the following equation (9) instead of the equation (7).
Figure 0006003574
When the difference between the luminance value that is the correction target value and the estimated luminance value (p * −e) is large, the expression (9) increases correction suppression even if the difference between the estimated luminance value and the measured luminance value is small. It is a formula to do. Note that τ is a magnification correction. For example, an intermediate luminance value of 128 may be employed.

ステップS1014では、出力モジュール160が、補正した画像を出力する。例えば、プリンタでかぶりを除去した画像を印刷する。   In step S1014, the output module 160 outputs the corrected image. For example, an image from which fog is removed by a printer is printed.

<第4の実施の形態>
図14は、第4の実施の形態の構成例についての概念的なモジュール構成図である。
第4の実施の形態である画像処理装置は、画像からかぶりを除去するものであって、図14の例に示すように、画像受付モジュール110、かぶり量推定モジュール120、画素値測定モジュール130、補正目標値決定モジュール140、補正可否判断モジュール1445、補正モジュール910、出力モジュール160を有している。補正モジュール910は、彩度補正モジュール150、輝度補正モジュール950を有している。
補正目標値決定モジュール140は、画素値測定モジュール130、補正可否判断モジュール1445と接続されている。第1の実施の形態の補正目標値決定モジュール140と同等であるが、決定した補正目標値を補正可否判断モジュール1445に渡す。
<Fourth embodiment>
FIG. 14 is a conceptual module configuration diagram of a configuration example according to the fourth embodiment.
The image processing apparatus according to the fourth embodiment removes the fog from the image. As shown in the example of FIG. 14, the image receiving module 110, the fog amount estimating module 120, the pixel value measuring module 130, A correction target value determination module 140, a correction availability determination module 1445, a correction module 910, and an output module 160 are included. The correction module 910 includes a saturation correction module 150 and a luminance correction module 950.
The correction target value determination module 140 is connected to the pixel value measurement module 130 and the correction possibility determination module 1445. Although it is equivalent to the correction target value determination module 140 of the first embodiment, the determined correction target value is passed to the correction possibility determination module 1445.

補正可否判断モジュール1445は、補正目標値決定モジュール140、補正モジュール910と接続されている。補正可否判断モジュール1445は、推定輝度値の傾き、推定輝度値と目標輝度値の差分が大きい場合、下地以外の文字部等がつぶれすぎている場合があるので補正処理を常に実施することはしないようにしている。
補正可否判断モジュール1445は、かぶり量推定モジュール120によって推定されたかぶり量と補正目標値決定モジュール140によって決定された補正目標値との差分に基づいて、彩度補正モジュール150と輝度補正モジュール950による補正を行うか否かを判断する。この判断処理については、前述の彩度補正可否判断モジュール145による(4)式を用いた判断処理と同等である。
また、補正可否判断モジュール1445は、画像受付モジュール110によって受け付けられた画像内の各画素におけるかぶり量推定モジュール120によって推定されたかぶり量同士の差分に基づいて、彩度補正モジュール150と輝度補正モジュール950による補正を行うか否かを判断するようにしてもよい。この判断処理については、前述の彩度補正可否判断モジュール145による(5)式、(6)式を用いた判断処理と同等である。
The correction possibility determination module 1445 is connected to the correction target value determination module 140 and the correction module 910. The correction possibility determination module 1445 does not always perform correction processing when the slope of the estimated luminance value or the difference between the estimated luminance value and the target luminance value is large, because the character portion other than the background may be too crushed. I am doing so.
Based on the difference between the fog amount estimated by the fog amount estimation module 120 and the correction target value determined by the correction target value determination module 140, the correction possibility determination module 1445 performs correction by the saturation correction module 150 and the luminance correction module 950. It is determined whether or not to perform. This determination process is equivalent to the determination process using the equation (4) by the saturation correction availability determination module 145 described above.
The correction possibility determination module 1445 also determines the saturation correction module 150 and the luminance correction module 950 based on the difference between the fog amounts estimated by the fog amount estimation module 120 at each pixel in the image received by the image reception module 110. It may be determined whether or not correction is performed. This determination process is the same as the determination process using the equations (5) and (6) by the saturation correction availability determination module 145 described above.

補正モジュール910内の彩度補正モジュール150は、第3の実施の形態の彩度補正モジュール150と同等であるが、補正可否判断モジュール1445によって補正を行うと判断された場合に、補正を行う。
補正モジュール910内の輝度補正モジュール950は、第3の実施の形態の輝度補正モジュール950と同等であるが、補正可否判断モジュール1445によって補正を行うと判断された場合に、補正を行う。
The saturation correction module 150 in the correction module 910 is equivalent to the saturation correction module 150 of the third embodiment, but performs correction when it is determined by the correction availability determination module 1445 that correction is performed.
The luminance correction module 950 in the correction module 910 is equivalent to the luminance correction module 950 of the third embodiment, but performs correction when it is determined by the correction availability determination module 1445 that correction is performed.

図15は、第4の実施の形態による処理例を示すフローチャートである。ステップS1502からステップS1508まで、ステップS1512以降の処理は、図10に例示したフローチャートと同等の処理を行う。
ステップS1502では、画像受付モジュール110が、対象画像を受け付ける。
ステップS1504では、かぶり量推定モジュール120が、かぶり量を推定する。
ステップS1506では、画素値測定モジュール130が、画像内の画素値を測定する。
ステップS1508では、補正目標値決定モジュール140が、補正目標値を決定する。
FIG. 15 is a flowchart illustrating a processing example according to the fourth exemplary embodiment. From step S1502 to step S1508, the processing after step S1512 performs the same processing as the flowchart illustrated in FIG.
In step S1502, the image reception module 110 receives a target image.
In step S1504, the fog amount estimation module 120 estimates the fog amount.
In step S1506, the pixel value measurement module 130 measures a pixel value in the image.
In step S1508, the correction target value determination module 140 determines a correction target value.

ステップS1510では、補正可否判断モジュール1445が、補正処理を行うか否かを判断し、行う場合はステップS1512へ進み、それ以外の場合はステップS1516へ進む。
例えば、前述の(4)式、(5)式、(6)式のいずれかにおける計算値Eが予め定めた値を超えている場合は補正を実施しないようにすることは、図7の例に示すフローチャート内のステップS710と同等である。
In step S1510, the correction possibility determination module 1445 determines whether or not correction processing is to be performed. If so, the process proceeds to step S1512. Otherwise, the process proceeds to step S1516.
For example, when the calculated value E in any one of the above-mentioned formulas (4), (5), and (6) exceeds a predetermined value, the correction is not performed in the example of FIG. This is equivalent to step S710 in the flowchart shown in FIG.

ステップS1512では、彩度補正モジュール150が、画像の彩度を補正する。
ステップS1514では、輝度補正モジュール950が、画像の輝度を補正する。
ステップS1516では、出力モジュール160が、補正した画像を出力する。
In step S1512, the saturation correction module 150 corrects the saturation of the image.
In step S1514, the luminance correction module 950 corrects the luminance of the image.
In step S1516, the output module 160 outputs the corrected image.

前述の図52(a)から(c)の説明において、第3の実施の形態、第4の実施の形態との比較について、図52(c)から(f)の例を用いて説明する。
仮にかぶり量を正しく算出できたとしても、文字部は輝度0付近になっている(黒となっている)ため、下地部分と文字部分との差分が小さくなってしまう。ここで、下地部分と同じ量だけ輝度値を上げてしまうと、文字部分も必要以上に明るい方向へ補正されてしまう。
このことについて、図52(c)から(f)の例を用いて説明する。図52(c)の例に示すように撮影画像5230内をライン5232で走査した場合の輝度値をグラフに示すと、図52(d)の例に示すようにようなる。つまり、かぶり画像5220は右方向に向かうほど濃くなるため、輝度値は右下がりとなるが、元の画像におけるもともとの輝度値があるので、図52(d)のグラフの例のように、輝度分布5242〜5258で段階的な輝度の分布を示すことになる。ここで、図52(f)の例のように、下地部分(輝度分布5244、5248、5252、5256)の輝度値を目標輝度になるように各輝度を補正すると、下地以外の部分(輝度分布5246、5250、5254)も補正輝度分布5274〜5280の実線のように補正されることになる。その結果は図52(e)の例に示すような補正画像5260となる。つまり、補正画像5260の右側部分は、黒い文字部分であっても薄い灰色となってしまう。これは、下地以外の部分に対しても、下地の部分と同等のかぶり除去の補正を行ってしまうことから生じてしまうことである。
一方、第3の実施の形態、第4の実施の形態では、図52(f)の例の本来の補正輝度分布5282〜5288の点線のように、下地以外の部分に対しては補正量を少なくし、再現性を低下させることを防止している。
In the description of FIGS. 52A to 52C described above, the comparison with the third embodiment and the fourth embodiment will be described using the examples of FIGS. 52C to 52F.
Even if the fog amount can be calculated correctly, the difference between the background portion and the character portion becomes small because the character portion has a luminance of around 0 (black). Here, if the luminance value is increased by the same amount as that of the background portion, the character portion is also corrected in a brighter direction than necessary.
This will be described with reference to FIGS. 52C to 52F. As shown in the example of FIG. 52C, the luminance value when the captured image 5230 is scanned with the line 5232 is shown in the graph as shown in the example of FIG. That is, since the fog image 5220 becomes darker toward the right, the luminance value decreases to the right. However, since there is the original luminance value in the original image, as shown in the example of the graph in FIG. The distributions 5242 to 5258 indicate a stepwise luminance distribution. Here, as shown in the example of FIG. 52F, when each luminance is corrected so that the luminance value of the background portion (luminance distributions 5244, 5248, 5252, 5256) becomes the target luminance, the portion other than the background (luminance distribution) 5246, 5250, and 5254) are also corrected as indicated by the solid lines of the corrected luminance distributions 5274 to 5280. The result is a corrected image 5260 as shown in the example of FIG. That is, the right portion of the corrected image 5260 is light gray even if it is a black character portion. This is because the fog removal correction equivalent to that of the background portion is performed on the portion other than the background portion.
On the other hand, in the third embodiment and the fourth embodiment, a correction amount is applied to a portion other than the background, as indicated by the dotted line in the original corrected luminance distribution 5282 to 5288 in the example of FIG. The number is reduced and the reproducibility is prevented from being lowered.

<第5の実施の形態>
次に、第5の実施の形態を説明する。
まず、第5の実施の形態、第6の実施の形態を説明する前に、その前提となる技術について説明する。なお、この説明は、第5の実施の形態、第6の実施の形態の理解を容易にすることを目的とするものである。
図53(a)の例に示す撮影対象文書5310は名刺であり、白黒のみではなく、有彩色の領域もある。具体的には、撮影対象文書5310内の領域5312は赤色を背景としており、領域5314は白色を背景としており、図形5316は赤色のマーク(図形)である。この撮影対象文書5310を、例えばデジタルカメラで撮影し、図53(c)の例に示す撮影画像5330を得る。この場合、撮影した画像には図53(b)の例に示すかぶり画像5320が重複されて撮影されている。このかぶり画像5320の発生原因は前述した通りである。図53(b)の例に示すようにかぶり画像5320では、右上が濃い黒であり、左下が白となるようなグラデーション画像となっている。したがって、図53(c)の例に示すように撮影画像5330でも、右上は黒くなるが、左下は元の撮影対象文書5310の画像に近いものとなる。
また、デジタルカメラで撮影する場合のみでなく、スキャナ等においても、このかぶり画像は発生することがあることは、前述した通りである。
<Fifth embodiment>
Next, a fifth embodiment will be described.
First, before explaining the fifth embodiment and the sixth embodiment, the technology that is the premise thereof will be explained. This description is intended to facilitate understanding of the fifth embodiment and the sixth embodiment.
The photographing target document 5310 shown in the example of FIG. 53A is a business card, and includes not only black and white but also chromatic areas. Specifically, a region 5312 in the photographing target document 5310 has a red background, a region 5314 has a white background, and a graphic 5316 is a red mark (graphic). This photographing target document 5310 is photographed by, for example, a digital camera, and a photographed image 5330 shown in the example of FIG. 53 (c) is obtained. In this case, the fogged image 5320 shown in the example of FIG. The cause of generation of the fog image 5320 is as described above. As shown in the example of FIG. 53B, the fogging image 5320 is a gradation image in which the upper right is dark black and the lower left is white. Therefore, as shown in the example of FIG. 53C, even in the captured image 5330, the upper right is black, but the lower left is close to the image of the original document 5310.
Further, as described above, this fogging image may occur not only when shooting with a digital camera but also with a scanner or the like.

図16は、第5の実施の形態の構成例についての概念的なモジュール構成図である。
第5の実施の形態である画像処理装置は、画像からかぶりを除去するものであって、図16の例に示すように、画像受付モジュール110、非エッジ領域抽出モジュール1620、検査領域選択モジュール1630、画素値測定モジュール1640、画素値分布推定モジュール1650、補正目標値決定モジュール140、補正モジュール910、出力モジュール160を有している。補正モジュール910は、彩度補正モジュール150、輝度補正モジュール950を有している。
FIG. 16 is a conceptual module configuration diagram of a configuration example according to the fifth embodiment.
The image processing apparatus according to the fifth embodiment removes fog from an image. As shown in the example of FIG. 16, the image reception module 110, the non-edge area extraction module 1620, and the inspection area selection module 1630 are used. A pixel value measurement module 1640, a pixel value distribution estimation module 1650, a correction target value determination module 140, a correction module 910, and an output module 160. The correction module 910 includes a saturation correction module 150 and a luminance correction module 950.

画像受付モジュール110は、非エッジ領域抽出モジュール1620と接続されており、画像を受け付けて、その画像を非エッジ領域抽出モジュール1620へ渡す。画像受付モジュール110のここでの処理例については、図18を用いて後述する。   The image reception module 110 is connected to the non-edge region extraction module 1620, receives an image, and passes the image to the non-edge region extraction module 1620. An example of processing performed by the image receiving module 110 will be described later with reference to FIG.

非エッジ領域抽出モジュール1620は、画像受付モジュール110、検査領域選択モジュール1630と接続されている。非エッジ領域抽出モジュール1620は、画像受付モジュール110によって受け付けられた画像から領域を抽出し、その抽出した領域を検査領域選択モジュール1630に渡す。
また、非エッジ領域抽出モジュール1620は、予め定めた大きさ以上又はより大きい領域を抽出し、その領域を抽出できなかった場合は、検査領域選択モジュール1630、画素値測定モジュール1640、画素値分布推定モジュール1650、補正目標値決定モジュール140、補正モジュール910、出力モジュール160の処理を行わないようにしてもよい。また、この場合、領域を抽出できなかった旨(つまり、かぶりの除去ができなかったこと)を出力するようにしてもよい。
ここで、抽出対象の領域とは、色値がなだらかで連続した領域である。言い換えると、エッジのない領域、又はエッジに囲まれた領域である。
非エッジ領域抽出モジュール1620の処理例については、図19、図20を用いて後述する。
The non-edge area extraction module 1620 is connected to the image reception module 110 and the inspection area selection module 1630. The non-edge area extraction module 1620 extracts an area from the image received by the image reception module 110 and passes the extracted area to the inspection area selection module 1630.
Further, the non-edge region extraction module 1620 extracts a region having a size greater than or equal to a predetermined size, and if the region cannot be extracted, the inspection region selection module 1630, the pixel value measurement module 1640, the pixel value distribution estimation Processing of the module 1650, the correction target value determination module 140, the correction module 910, and the output module 160 may not be performed. In this case, a message indicating that the region could not be extracted (that is, the fog could not be removed) may be output.
Here, the extraction target area is an area where color values are gentle and continuous. In other words, it is a region without edges or a region surrounded by edges.
A processing example of the non-edge region extraction module 1620 will be described later with reference to FIGS.

検査領域選択モジュール1630は、非エッジ領域抽出モジュール1620、画素値測定モジュール1640と接続されている。検査領域選択モジュール1630は、非エッジ領域抽出モジュール1620によって抽出された領域を予め定めた規則に基づいて選択し、その選択した領域を画素値測定モジュール1640に渡す。
また、検査領域選択モジュール1630における予め定めた規則は、非エッジ領域抽出モジュール1620によって抽出された領域の大きさによって定められているようにしてもよい。検査領域選択モジュール1630は、予め定めた規則として、さらに非エッジ領域抽出モジュール1620によって抽出された領域の輝度又は彩度によって定められているようにしてもよい。検査領域選択モジュール1630は、予め定めた規則として、さらに非エッジ領域抽出モジュール1620によって抽出された領域の彩度の分散値、画像における位置、外周の大きさのいずれか一つ以上によって定められているようにしてもよい。
検査領域選択モジュール1630の処理例については、図21を用いて後述する。
The inspection area selection module 1630 is connected to the non-edge area extraction module 1620 and the pixel value measurement module 1640. The inspection area selection module 1630 selects an area extracted by the non-edge area extraction module 1620 based on a predetermined rule, and passes the selected area to the pixel value measurement module 1640.
Further, the predetermined rule in the inspection region selection module 1630 may be determined by the size of the region extracted by the non-edge region extraction module 1620. The inspection area selection module 1630 may be further determined by the brightness or saturation of the area extracted by the non-edge area extraction module 1620 as a predetermined rule. The inspection area selection module 1630 is further determined as a predetermined rule by one or more of the variance value of the saturation of the area extracted by the non-edge area extraction module 1620, the position in the image, and the size of the outer periphery. You may make it.
A processing example of the inspection area selection module 1630 will be described later with reference to FIG.

画素値測定モジュール1640は、検査領域選択モジュール1630、画素値分布推定モジュール1650と接続されている。画素値測定モジュール1640は、検査領域選択モジュール1630によって選択された領域内の画素の画素値(輝度、彩度)を測定し、測定結果を画素値分布推定モジュール1650に渡す。画素値の測定には、予め定めた方向に画像内を走査しながら画素値(輝度、彩度)を測定する。
また、画素値測定モジュール1640が行う処理では、画素値を測定する走査方向として水平方向、垂直方向、斜め方向、楕円状のいずれか一つ以上であるようにしてもよい。水平方向と垂直方向の組み合わせ、右上斜め方向と右下斜め方向の組み合わせのように2種類の走査方向であってもよいし、楕円状に走査するように1種類の走査方向であってもよいし、3種類以上の走査方向の組み合わせであってもよい。
画素値測定モジュール1640の処理例については、図22、図23を用いて後述する。
The pixel value measurement module 1640 is connected to the inspection region selection module 1630 and the pixel value distribution estimation module 1650. The pixel value measurement module 1640 measures the pixel values (luminance, saturation) of the pixels in the area selected by the inspection area selection module 1630 and passes the measurement results to the pixel value distribution estimation module 1650. In the measurement of the pixel value, the pixel value (luminance, saturation) is measured while scanning the image in a predetermined direction.
In the processing performed by the pixel value measurement module 1640, the scanning direction in which the pixel value is measured may be any one or more of a horizontal direction, a vertical direction, an oblique direction, and an elliptical shape. There may be two types of scanning directions such as a combination of horizontal and vertical directions, a combination of upper right diagonal direction and lower right diagonal direction, or one type of scanning direction so as to scan in an elliptical shape. Further, it may be a combination of three or more scanning directions.
A processing example of the pixel value measurement module 1640 will be described later with reference to FIGS.

画素値分布推定モジュール1650は、画素値測定モジュール1640、補正目標値決定モジュール140と接続されている。画素値分布推定モジュール1650は、画素値測定モジュール1640によって測定された画素値から、画像受付モジュール110によって受け付けられた画像におけるかぶりの度合いを示す関数を推定し、その推定した関数を補正モジュール910に渡す。かぶりの度合いを示す関数としては、1次関数であってもよいし、2次以上の関数であってもよい。
また、画素値分布推定モジュール1650は、検査領域選択モジュール1630によって選択された領域内の画素の画素値(輝度値)を通る関数を推定するようにしてもよい。
画素値分布推定モジュール1650の処理例については、図24、図25を用いて後述する。
The pixel value distribution estimation module 1650 is connected to the pixel value measurement module 1640 and the correction target value determination module 140. The pixel value distribution estimation module 1650 estimates a function indicating the degree of fogging in the image received by the image receiving module 110 from the pixel value measured by the pixel value measuring module 1640, and sends the estimated function to the correction module 910. hand over. The function indicating the degree of fogging may be a linear function or a function of second or higher order.
Further, the pixel value distribution estimation module 1650 may estimate a function that passes through pixel values (luminance values) of pixels in the region selected by the inspection region selection module 1630.
A processing example of the pixel value distribution estimation module 1650 will be described later with reference to FIGS.

補正目標値決定モジュール140は、画素値分布推定モジュール1650、補正モジュール910と接続されており、画像受付モジュール110によって受け付けられた画像内の下地における輝度値の補正目標値を決定し、その決定した補正目標値を補正モジュール910に渡す。   The correction target value determination module 140 is connected to the pixel value distribution estimation module 1650 and the correction module 910, determines the correction target value of the luminance value in the background in the image received by the image reception module 110, and determines the determination. The correction target value is passed to the correction module 910.

補正モジュール910内の輝度補正モジュール950は、画素値分布推定モジュール1650によって推定された関数に基づいて、画像受付モジュール110によって受け付けられた画像からかぶりを除去し、そのかぶりを除去した画像を出力モジュール160に渡す。つまり、画素値分布推定モジュール1650によって推定された関数に基づいてかぶり量を算出し、そのかぶり量と補正目標値決定モジュール140によって決定された補正目標値に基づいて、画素値測定モジュール1640によって測定された輝度値を補正する。
また、輝度補正モジュール950は、画素値測定モジュール1640による走査方向が複数方向あり、その走査方向が交差する位置におけるかぶりの値は、その走査に対して画素値分布推定モジュール1650によって推定された複数の関数によって求められた値に基づいて算出するようにしてもよい。走査線上にない画素にあっては、走査線上の画素におけるかぶりの値を用いて、その画素からの距離に応じてかぶりの値を算出すればよい。なお、かぶりの値とは、受け付けた画像の画素値と本来の地肌値(かぶりがない状態で撮影した画像の画素値)との差である。
輝度補正モジュール950の処理例については、図26、図27、図28を用いて後述する。
The luminance correction module 950 in the correction module 910 removes the fog from the image received by the image reception module 110 based on the function estimated by the pixel value distribution estimation module 1650, and outputs an image from which the fog has been removed. To 160. That is, the fog amount is calculated based on the function estimated by the pixel value distribution estimation module 1650, and measured by the pixel value measurement module 1640 based on the fog amount and the correction target value determined by the correction target value determination module 140. Correct the brightness value.
Also, the luminance correction module 950 has a plurality of scanning directions by the pixel value measurement module 1640, and the fog value at a position where the scanning directions intersect is estimated by the pixel value distribution estimation module 1650 for the scanning. It may be calculated on the basis of a value obtained by the function. For pixels that are not on the scan line, the fog value may be calculated according to the distance from the pixel using the fog value at the pixel on the scan line. Note that the fogging value is the difference between the pixel value of the received image and the original background value (pixel value of the image taken without fogging).
A processing example of the luminance correction module 950 will be described later with reference to FIGS. 26, 27, and 28.

補正モジュール910内の彩度補正モジュール150は、画素値分布推定モジュール1650によって推定された関数に基づいてかぶり量を算出し、そのかぶり量と補正目標値決定モジュール140によって決定された補正目標値と画素値測定モジュール1640によって測定された彩度値の無彩色からの距離に基づいて、その彩度値を補正する。前述の実施の形態における彩度補正モジュール150と同等の処理を行う。また、画素値分布推定モジュール1650によって推定された関数に基づいてかぶり量を算出することについては、輝度補正モジュール950と同等の処理を行う。また、輝度補正モジュール950の処理結果を流用してもよい。逆に、彩度補正モジュール150による処理結果を輝度補正モジュール950が流用するようにしてもよい。   The saturation correction module 150 in the correction module 910 calculates the fog amount based on the function estimated by the pixel value distribution estimation module 1650, the correction amount and the correction target value determined by the correction target value determination module 140. The saturation value is corrected based on the distance from the achromatic color of the saturation value measured by the pixel value measurement module 1640. A process equivalent to the saturation correction module 150 in the above-described embodiment is performed. Further, the calculation equivalent to the brightness correction module 950 is performed for calculating the fogging amount based on the function estimated by the pixel value distribution estimation module 1650. Further, the processing result of the luminance correction module 950 may be used. Conversely, the luminance correction module 950 may divert the processing result obtained by the saturation correction module 150.

出力モジュール160は、補正モジュール910と接続されており、彩度補正モジュール150と輝度補正モジュール950によって補正(かぶり除去)された画像を受け取り、その画像を出力する。   The output module 160 is connected to the correction module 910, receives the image corrected (fog removal) by the saturation correction module 150 and the luminance correction module 950, and outputs the image.

図17は、第5の実施の形態による処理例を示すフローチャートである。
ステップS1702では、画像受付モジュール110が、対象画像を受け付ける。
図18は、画像受付モジュール110による処理例を示す説明図である。撮影対象文書1820は、図53の例で示した撮影対象文書5310と同等のものである。撮影対象文書1820には、左側の赤色を背景とした領域、右側の白色を背景とした領域、右上にある赤色のマークの領域がある。これを撮影装置310で撮影した場合、撮影画像1830のようにかぶりが発生した画像を得る。例えば、名刺交換した後に、机の上に撮影対象文書1820を置き、撮影装置310で撮影するような状況である。撮影装置310は、デジタルカメラであってもよいし、携帯情報端末装置(例えば、スマートフォンを含む携帯電話等)に内蔵されているデジタルカメラであってもよいし、スキャナ等であってもよい。
FIG. 17 is a flowchart illustrating a processing example according to the fifth exemplary embodiment.
In step S1702, the image reception module 110 receives the target image.
FIG. 18 is an explanatory diagram illustrating an example of processing performed by the image reception module 110. The shooting target document 1820 is equivalent to the shooting target document 5310 shown in the example of FIG. The shooting target document 1820 includes an area with a red background on the left side, an area with a white background on the right side, and a red mark area on the upper right. When this is photographed by the photographing apparatus 310, an image with fogging is obtained as a photographed image 1830. For example, after the business card is exchanged, the photographing target document 1820 is placed on the desk and the photographing apparatus 310 shoots. The imaging device 310 may be a digital camera, a digital camera built in a portable information terminal device (for example, a mobile phone including a smartphone), a scanner, or the like.

ステップS1704では、非エッジ領域抽出モジュール1620が、色値の変化がなだらかで連続した領域を抽出する。
図19、図20は、非エッジ領域抽出モジュール1620による処理例を示す説明図である。例えば、非エッジ領域抽出モジュール1620は、ソーベルフィルターモジュール1910、2値化モジュール1920、白黒反転モジュール1930、ラベリングモジュール1940、小サイズ除去モジュール1950を有している。
ソーベルフィルターモジュール1910は、2値化モジュール1920と接続されており、ステップS1702で受け付けられた撮影画像1830に対して、ソーベルフィルター(Sobel Filter)処理を行って、その結果の画像を2値化モジュール1920に渡す。ソーベルフィルター処理とは、例えば、縦線や横線のエッジを検出する処理であり、フィルタを用いて行うものである。もちろんのことながら、フィルタの設計によっては、縦線、横線以外の線を検出することもできる。
In step S1704, the non-edge region extraction module 1620 extracts a continuous region where the color value changes gently.
19 and 20 are explanatory diagrams illustrating an example of processing performed by the non-edge region extraction module 1620. For example, the non-edge region extraction module 1620 includes a Sobel filter module 1910, a binarization module 1920, a black / white reversal module 1930, a labeling module 1940, and a small size removal module 1950.
The Sobel filter module 1910 is connected to the binarization module 1920. The Sobel filter module 1910 performs a Sobel filter process on the captured image 1830 received in step S1702, and binarizes the resulting image. To the conversion module 1920. The Sobel filter process is, for example, a process for detecting edges of vertical lines or horizontal lines, and is performed using a filter. Of course, lines other than vertical lines and horizontal lines can be detected depending on the design of the filter.

2値化モジュール1920は、ソーベルフィルターモジュール1910、白黒反転モジュール1930と接続されており、ソーベルフィルターモジュール1910によってエッジが検出された画像を受け取り、それに対して2値化処理を行って、その2値化処理の結果画像を白黒反転モジュール1930に渡す。ここでの2値化処理は、知られている2値化処理を採用すればよい。この処理によってエッジ部分は黒となり、他の部分は白となる。
白黒反転モジュール1930は、2値化モジュール1920、ラベリングモジュール1940と接続されており、2値化モジュール1920によって2値化された画像を受け取り、それに対して白黒反転処理を行って、その白黒反転処理の結果画像をラベリングモジュール1940に渡す。この処理によってエッジ部分は白となり、他の部分は黒となる。
The binarization module 1920 is connected to the Sobel filter module 1910 and the black and white inversion module 1930. The binarization module 1920 receives an image in which an edge is detected by the Sobel filter module 1910, performs binarization processing on the image, The resulting binarization result image is passed to the black and white reversal module 1930. The binarization process here may adopt a known binarization process. By this processing, the edge portion becomes black and the other portions become white.
The black / white reversal module 1930 is connected to the binarization module 1920 and the labeling module 1940, receives the image binarized by the binarization module 1920, performs black / white reversal processing on the image, and performs the black / white reversal processing. The result image is passed to the labeling module 1940. By this processing, the edge portion becomes white and the other portions become black.

ラベリングモジュール1940は、白黒反転モジュール1930、小サイズ除去モジュール1950と接続されており、白黒反転モジュール1930によって白黒反転された画像を受け取り、それに対してラベリング処理を行って、そのラベリング処理の結果画像を小サイズ除去モジュール1950に渡す。この処理によって、連続している黒領域は同じラベルが付されることになる。したがって、同じラベルが付されている領域を抽出することによって、エッジではない領域を抽出することができる。
小サイズ除去モジュール1950は、ラベリングモジュール1940と接続されており、ラベリングモジュール1940によってラベリングされた画像を受け取り、それに対して予め定めた大きさ以下又はより小さい領域であるノイズを除去する。この処理は、結果的に、予め定めた大きさ以上又はより大きい領域を抽出することになる。同じラベルが付されている領域の面積は、そのラベルが付された画素数を計数すること、又はその領域の外接矩形の面積を算出することによって求めてもよい。
図19の例に示した撮影画像1830に対して、以上の処理を施した結果の画像の例を図20に示す。領域画像2010は撮影画像1830の左側の赤色を背景とした領域であり、領域画像2020は撮影画像1830の右側の白色を背景とした領域であり、領域画像2030は撮影画像1830の右上にある赤色のマークの領域である。ただし、これらの画像は2値画像である。また、これらの画像は、撮影画像1830とのAND処理(論理積処理)を施すことによって、撮影画像1830からその領域を抽出することができるというマスク画像としての役割を有する。
なお、非エッジ領域抽出モジュール1620は、図19の例に示したモジュール構成による処理ではなく、他の処理によって領域を抽出するようにしてもよい。例えば、同じ色の領域を統合する処理を行うようにしてもよい。なお、同じ色とは完全同一の色のみならず、予め定めた関係にある色を含めてもよい。具体的には、画像内から画素を選択し、その選択した画素に接触している画素であって、選択した画素の色と予め定めた関係(例えば、色空間において、その2つの色の間の距離が予め定めた値以下又は未満である関係)にある色の画素を統合し、次にその統合した画素に対して同様の統合処理を繰り返して行うことによって領域を抽出するようにしてもよい。
The labeling module 1940 is connected to the black-and-white reversal module 1930 and the small size removal module 1950. The labeling module 1940 receives an image that has been black-and-white reversed by the black-and-white reversal module 1930, performs a labeling process on the image, and outputs a result of the labeling process. Pass to small size removal module 1950. By this process, the same label is attached to the continuous black areas. Therefore, a region that is not an edge can be extracted by extracting a region having the same label.
The small size removal module 1950 is connected to the labeling module 1940, receives the image labeled by the labeling module 1940, and removes noise that is an area below or smaller than a predetermined size. As a result, this process extracts an area that is larger than or larger than a predetermined size. The area of the region to which the same label is attached may be obtained by counting the number of pixels to which the label is attached or by calculating the area of the circumscribed rectangle of the region.
FIG. 20 shows an example of an image obtained as a result of performing the above processing on the captured image 1830 shown in the example of FIG. The area image 2010 is an area with a red background on the left side of the captured image 1830, the area image 2020 is an area with a white background on the right side of the captured image 1830, and the area image 2030 is a red color on the upper right of the captured image 1830. This is the mark area. However, these images are binary images. In addition, these images have a role as a mask image in which an area can be extracted from the photographed image 1830 by performing an AND process (logical product process) with the photographed image 1830.
Note that the non-edge region extraction module 1620 may extract regions by other processing instead of the processing by the module configuration shown in the example of FIG. For example, processing for integrating regions of the same color may be performed. Note that the same color may include not only a completely identical color but also a color having a predetermined relationship. Specifically, a pixel is selected from the image and is in contact with the selected pixel, and a predetermined relationship with the color of the selected pixel (for example, between the two colors in the color space) The pixels of a color having a distance of less than or less than a predetermined value) are integrated, and then the same integration process is repeatedly performed on the integrated pixels to extract a region. Good.

ステップS1706では、検査領域選択モジュール1630が、かぶりの傾斜を推定するのに適している領域を抽出する。
検査領域選択モジュール1630は、ステップS1704で抽出した領域の特徴量を抽出する。そして、(10)式の識別関数にしたがって、各領域の(10)式の値を算出し、その値によって領域(ここでは前述のマスク画像)を選択する。例えば、ステップS1704で抽出した領域内で最大値を有する領域を選択する。

Figure 0006003574
ここで、(10)式の右辺のwは重みであり、正の数の他に、0、負の数であってもよい。0の場合は、その特徴量を採用しないことを意味する。負の数の場合は、特徴量が逆の方向に作用することになる。この重みwは、予め定めた値である。予め定めた値として、操作者が設定した値であってもよいし、正解の選択肢が決まっている教師データを用いて予め学習を行った結果の値であってもよい。
(10)式の右辺のxijは特徴量である。検査領域選択モジュール1630が、これらの特徴量を各領域(i)から抽出する。
i0は、領域の幅若しくは高さのいずれか、又は幅×高さ(いわゆる外接矩形の面積)であってもよい。
i1は、領域の面積である。
i2は、領域の画素密度である。
i3は、領域内の画素の輝度(例えば、Lab色空間の場合はLの値)の平均値である。
i4は、領域内の画素の彩度(例えば、Lab色空間の場合はa,bの値)の平均値である。
i5は、領域内の画素の彩度の分散値である。
i6は、領域(マスク画像)の重心とステップS1702で受け付けた画像の中心との距離である。
i7は、領域の外周輪郭の長さ/外接矩形の周囲長である。 In step S1706, the examination region selection module 1630 extracts a region suitable for estimating the fog inclination.
The inspection area selection module 1630 extracts the feature amount of the area extracted in step S1704. Then, according to the discriminant function of equation (10), the value of equation (10) is calculated for each region, and the region (here, the aforementioned mask image) is selected based on the value. For example, the area having the maximum value is selected from the areas extracted in step S1704.
Figure 0006003574
Here, w j on the right side of the equation (10) is a weight, and may be 0 or a negative number in addition to a positive number. In the case of 0, it means that the feature value is not adopted. In the case of a negative number, the feature amount acts in the opposite direction. This weight w j is a predetermined value. The predetermined value may be a value set by the operator, or may be a value obtained as a result of learning in advance using teacher data in which correct answer options are determined.
X ij on the right side of the equation (10) is a feature quantity. The inspection area selection module 1630 extracts these feature amounts from each area (i).
x i0 may be either the width or height of the region, or width × height (the area of a so-called circumscribed rectangle).
x i1 is the area of the region.
x i2 is the pixel density of the region.
x i3, the luminance of the pixels in the area (e.g., in the case of L * ab color space value of L *) is an average value of.
x i4 is an average value of the saturations of the pixels in the region (for example, values of a and b in the case of the L * ab color space).
x i5 is the variance value of the saturation of the pixels in the region.
x i6 is the distance between the center of gravity of the region (mask image) and the center of the image received in step S1702.
x i7 is the length of the outer peripheral contour of the region / the perimeter of the circumscribed rectangle.

なお、ここにあげた特徴量は例示であって、他の特徴量を用いてもよい。また、平均値としたものは、その領域を代表する値であればよく、例えば、最頻値、中央値等であってもよい。
また、ここに例示した特徴量は全て使用する必要はなく、このうちのいずれかを選択して用いるようにしてもよい。例えば、xi0、xi1、xi2のいずれかだけを用いた識別関数としてもよい。これはかぶりの度合いを示す関数を推定するのに、大きな領域が適しているからである。
さらに、原稿の背景領域を選択するために、xi3、xi4を加えるようにしてもよい。かぶりの度合いを示す関数を推定するのに、背景領域が適しているからである。背景領域は、一般的には白いので、高輝度、低彩度の領域となるためである。なお、彩度(xi4)の重み(w)は負の数である。
Note that the feature amounts listed here are examples, and other feature amounts may be used. The average value may be a value that represents the region, and may be a mode value, a median value, or the like.
Further, it is not necessary to use all the feature amounts exemplified here, and any one of them may be selected and used. For example, an identification function using only one of x i0 , x i1 , and x i2 may be used. This is because a large region is suitable for estimating a function indicating the degree of fogging.
Further, x i3 and x i4 may be added to select the background area of the document. This is because the background region is suitable for estimating a function indicating the degree of fogging. This is because the background area is generally white and thus becomes an area of high luminance and low saturation. The weight (w 4 ) of saturation (x i4 ) is a negative number.

以上の特徴量によって、白背景となっている名刺、文書、ホワイトボード等には対応可能であるが、例えば、名刺の半分の領域に風景画が張り付けられているような原稿を撮影した画像の場合(白背景の面積がやや狭い)、逆光の状態でのホワイトボードを撮影した画像の場合(画像の周囲の方が高輝度になっている場合)については、不十分である可能性がある。
そこで、xi5以下の特徴量を追加するようにしてもよい。
風景画は背景部よりも概ね彩度のばらつきが高い。したがって、風景画を選択しないように彩度の分散値が小さい領域を選択できるように、xi5を採用してもよい。なお、彩度の分散値(xi5)の重み(w)は負の数である。
撮影時に目的とする領域は意図的に画像中央になるようにしているのが一般的である。したがって、領域の重心(領域の中心であってもよい)は画像の中央寄りである領域を選択できるように、xi6を採用してもよい。なお、この距離(xi6)の重み(w)は負の数である。
風景画の領域の外周は外接矩形の外周と比較して凹凸が多い。また、名刺の背景部等は矩形であり、その外周は直線状であることが多い。したがって、風景画を選択しないように外周輪郭が短い領域を選択できるように、xi7を採用してもよい。なお、この外周輪郭(xi7)の重み(w)は負の数である。
The above feature quantities can be used for business cards, documents, whiteboards, etc. that have a white background. For example, an image of a document with a landscape image pasted on half the area of a business card. In some cases (the area of the white background is slightly narrow), or in the case of an image taken of a whiteboard in backlight (when the surrounding area of the image is brighter), it may be insufficient .
Therefore, a feature amount of x i5 or less may be added.
Landscape paintings generally have more variation in saturation than the background. Therefore, x i5 may be adopted so that an area having a small saturation variance value can be selected so as not to select a landscape image. The weight (w 5 ) of the saturation dispersion value (x i5 ) is a negative number.
In general, the target area at the time of photographing is intentionally set at the center of the image. Accordingly, x i6 may be adopted so that a region whose center of gravity (which may be the center of the region) is closer to the center of the image can be selected. The weight (w 6 ) of this distance (x i6 ) is a negative number.
The outer periphery of the landscape image area is more uneven than the outer periphery of the circumscribed rectangle. Moreover, the background part of a business card is rectangular, and its outer periphery is often linear. Therefore, x i7 may be adopted so that a region having a short outer peripheral contour can be selected so as not to select a landscape image. Note that the weight (w 7 ) of the outer peripheral contour (x i7 ) is a negative number.

図21は、検査領域選択モジュール1630による処理例を示す説明図である。領域画像2010に対して識別関数の計算結果は、(11)式のように1.5である。

Figure 0006003574
領域画像2020に対して識別関数の計算結果は、(12)式のように2.0である。
Figure 0006003574
領域画像2030に対して識別関数の計算結果は、(13)式のように0.2である。
Figure 0006003574
そして、(14)式に示すように、識別関数の算出値が最大値となるものを選択する。
Figure 0006003574
この場合、(15)式に示すように、領域画像2020の領域が選択されることになる。
Figure 0006003574
FIG. 21 is an explanatory diagram illustrating an example of processing performed by the inspection region selection module 1630. The calculation result of the discriminant function for the region image 2010 is 1.5 as shown in the equation (11).
Figure 0006003574
The calculation result of the discriminant function for the region image 2020 is 2.0 as shown in the equation (12).
Figure 0006003574
The calculation result of the discriminant function for the region image 2030 is 0.2 as shown in equation (13).
Figure 0006003574
Then, as shown in the equation (14), the one having the maximum discriminant function calculated value is selected.
Figure 0006003574
In this case, as shown in the equation (15), the region of the region image 2020 is selected.
Figure 0006003574

ステップS1708では、画素値測定モジュール1640が、予め定められた規則にしたがってラインを走査して、画素値を測定する。
図22、図23は、画素値測定モジュール1640による処理例を示す説明図である。
図22(a)の例に示す領域抽出画像2200は、ステップS1702で受け付けられた撮影画像1830とステップS1706で選択された領域画像2020とのAND処理による画像である。つまり、撮影画像1830から右側にある背景が白い領域を抽出したものである。この領域抽出画像2200に対して横と縦に予め定めた間隔(例えば、均等間隔)で走査する。例えば、横方向にライン2202〜2218、縦方向にライン2222〜2242で走査する。そして、その走査の結果、各画素の輝度値をグラフにして表すと、ライン2202の走査においては図22(b)の例のようなグラフになる。つまり、選択された領域内を走査していないでの、無効なデータのみからなるグラフとなる。そして、ライン2212の走査においては図22(c)の例のようなグラフになる。つまり、選択された領域内を一部走査しているので、有効なデータを含むグラフとなり、その輝度の値は右下がりのグラフとなる。ここでのかぶりが全体的に右上方向ほど濃くなるからである。
なお、有効なデータであるか、無効なデータであるかの判別は、検査領域選択モジュール1630が選択した領域の画像(マスク画像、図21の例に示した領域画像2020)を走査することによって行うことができる。領域画像2020内の黒部分の位置が領域抽出画像2200内において有効なデータがある位置であり、領域画像2020内の白部分の位置は領域抽出画像2200内において無効なデータがある位置として取り扱う。また、ここでは無効なデータは輝度値を0として扱っている。
In step S1708, the pixel value measurement module 1640 measures the pixel value by scanning the line according to a predetermined rule.
22 and 23 are explanatory diagrams illustrating an example of processing performed by the pixel value measurement module 1640.
A region extraction image 2200 shown in the example of FIG. 22A is an image obtained by AND processing of the captured image 1830 received in step S1702 and the region image 2020 selected in step S1706. That is, a region with a white background on the right side is extracted from the captured image 1830. The region extraction image 2200 is scanned at predetermined intervals (for example, equal intervals) horizontally and vertically. For example, scanning is performed with the lines 2202 to 2218 in the horizontal direction and the lines 2222 to 2242 in the vertical direction. As a result of the scanning, if the luminance value of each pixel is represented in a graph, the scanning of the line 2202 results in a graph as in the example of FIG. That is, the graph is composed of only invalid data without scanning the selected area. In the scanning of the line 2212, a graph like the example of FIG. That is, since a part of the selected area is scanned, the graph includes valid data, and the luminance value is a graph with a lower right. This is because the fogging here is generally darker in the upper right direction.
Whether the data is valid or invalid is determined by scanning an image of the area selected by the inspection area selection module 1630 (mask image, area image 2020 shown in the example of FIG. 21). It can be carried out. The position of the black part in the area image 2020 is a position where there is valid data in the area extraction image 2200, and the position of the white part in the area image 2020 is handled as a position where there is invalid data in the area extraction image 2200. Also, here, invalid data is treated with a luminance value of zero.

また、走査における予め定められた規則として、図22(a)に例示のような走査だけでなく、図23(a)の例に示すような左上から右下への斜め方向の走査と右上から左下への斜め方向の走査を予め定めた間隔で行うようにしてもよい。また、図23(b)の例に示すような楕円状の走査を予め定めた間隔で行うようにしてもよい。なお、ここで楕円状には円を含んでいてもよい。この走査方向は、かぶりの輝度の傾斜に応じて、操作者が選択するようにしてもよいし、撮影装置に応じて予め定めた走査であってもよい。   Further, as a predetermined rule in scanning, not only scanning as illustrated in FIG. 22A but also scanning in an oblique direction from upper left to lower right and from upper right as illustrated in the example of FIG. You may make it perform the scanning of the diagonal direction to a lower left at a predetermined space | interval. Further, elliptical scanning as shown in the example of FIG. 23B may be performed at predetermined intervals. Here, the ellipse may include a circle. This scanning direction may be selected by the operator according to the inclination of the brightness of the fog, or may be a scanning that is predetermined according to the photographing apparatus.

ステップS1710では、画素値分布推定モジュール1650が、測定した画素値の集合から、かぶりの傾斜度合い(かぶりの度合いを示す関数)を推定する。なお、ここでの関数は1次関数を例示して説明する。
図24、図25は、画素値分布推定モジュール1650による処理例を示す説明図である。
図24(a)の例に示すように、縦方向の走査におけるかぶりの度合いを示す関数を(16)式で、横方向の走査におけるかぶりの度合いを示す関数を(17)式とする。

Figure 0006003574
Figure 0006003574
In step S1710, the pixel value distribution estimation module 1650 estimates the degree of fog inclination (a function indicating the degree of fog) from the measured set of pixel values. The function here will be described by taking a linear function as an example.
24 and 25 are explanatory diagrams illustrating processing examples performed by the pixel value distribution estimation module 1650.
As shown in the example of FIG. 24A, a function indicating the degree of fogging in the vertical scanning is represented by Expression (16), and a function indicating the degree of fogging in the horizontal scanning is represented by Expression (17).
Figure 0006003574
Figure 0006003574

図24(b)の例は、有効なデータがあるラインを実線で示し、有効なデータがないライン(無効なデータだけのライン)を点線で示したものである。有効なデータがあるラインとしては、ライン2204〜2216、ライン2232〜2240があり、有効なデータがないラインとしては、ライン2202、2218、ライン2222〜2230、2242がある。
図25(a)の例は、有効なデータがあるラインにおけるグラフを示している。ライン2204〜2216のそれぞれにおいて、同様のグラフで示すことができる。これらに対して最小二乗法等を用いて、輝度値を通る関数を推定する。例えば、横方向のラインでの関数は(18)式のように表すことができる。なお、各ラインにおいて、有効なデータ数が予め定めた数よりも少ない場合は、そのデータは用いないで関数を推定する。図25(b)の例において、(18)式は一点鎖線で表している。

Figure 0006003574
そして、有効なデータがないラインにおいても、その関数を適用すればよい。したがって、例えば、図24(c)の例に示すようにライン2202上の推定点2432〜2440における輝度値を、図25(c)の例に示すように関数を適用して、推定点2432〜2440における輝度値とすればよい。このことは、推定した関数を画像全体に適用していることになる。
縦方向のラインを用いた関数の推定も、前述した横方向のラインを用いた関数の推定と同等に行う。 In the example of FIG. 24B, lines with valid data are indicated by solid lines, and lines without valid data (lines with only invalid data) are indicated by dotted lines. Lines having valid data include lines 2204 to 2216 and lines 2232 to 2240, and lines having no valid data include lines 2202 and 2218 and lines 2222 to 2230 and 2242.
The example of FIG. 25A shows a graph in a line with valid data. A similar graph can be shown for each of the lines 2204 to 2216. For these, a function that passes the luminance value is estimated using a least square method or the like. For example, the function in the horizontal line can be expressed as in equation (18). When the number of effective data is less than a predetermined number in each line, the function is estimated without using the data. In the example of FIG. 25B, the formula (18) is represented by a one-dot chain line.
Figure 0006003574
The function may be applied even to a line that does not have valid data. Therefore, for example, the luminance values at the estimated points 2432 to 2440 on the line 2202 as shown in the example of FIG. 24C are applied, and the function is applied as shown in the example of FIG. The luminance value at 2440 may be used. This means that the estimated function is applied to the entire image.
The function estimation using the vertical line is performed in the same manner as the function estimation using the horizontal line described above.

ステップS1712では、補正目標値決定モジュール140が、補正目標値を決定する。前述の実施の形態における補正目標値決定モジュール140と同等の処理を行う。補正目標値の決定は、前述の決定方法の他に、例えば、複数の交点(例えば、検査領域選択モジュール1630が選択した領域内における交点であってもよい)の輝度ヒストグラムを集計して、予め定めた交点(例えば、明るい方から上位10%にある交点)の輝度値としてもよい。   In step S1712, the correction target value determination module 140 determines a correction target value. Processing equivalent to that of the correction target value determination module 140 in the above-described embodiment is performed. In addition to the above-described determination method, the correction target value is determined by, for example, totaling luminance histograms of a plurality of intersection points (for example, intersection points in the region selected by the inspection region selection module 1630). It is good also as a luminance value of the defined intersection (for example, intersection in the upper 10% from the brighter one).

ステップS1714では、彩度補正モジュール150が、画像の彩度を補正する。ステップS1710で推定された関数に基づいてかぶり量を算出し、そのかぶり量とステップS1712で決定された補正目標値とステップS1708で測定された彩度値の無彩色からの距離に基づいて、その彩度値を補正する。前述の実施の形態における彩度補正モジュール150と同等の処理を行う。また、画素値分布推定モジュール1650によって推定された関数に基づいてかぶり量を算出することについては、ステップS1716と同等の処理を行う。   In step S1714, the saturation correction module 150 corrects the saturation of the image. A fog amount is calculated based on the function estimated in step S1710, and based on the fog amount, the correction target value determined in step S1712, and the distance from the achromatic color of the saturation value measured in step S1708, Correct the saturation value. A process equivalent to the saturation correction module 150 in the above-described embodiment is performed. In addition, regarding the calculation of the fogging amount based on the function estimated by the pixel value distribution estimation module 1650, processing equivalent to step S1716 is performed.

ステップS1716では、輝度補正モジュール950が、画像の輝度を補正する。つまり、かぶりの傾斜度合い(ステップS1710で推定した関数)を用いて、かぶり除去量を算出し、各座標における画素値を補正する。ここでの補正とは、画像からかぶりを除去して、地肌(本来の画像)を生成することになる。
図26、図27、図28は、輝度補正モジュール950による処理例を示す説明図である。
図26の例において、領域2610内の4つの交点(つまり交点2612はライン2206とライン2226の交点であり、交点2614はライン2206とライン2228の交点であり、交点2616はライン2208とライン2226の交点であり、交点2618はライン2208とライン2228の交点である)のかぶり量の計算について、図27を用いて説明する。なお、これらの交点は、無効データとして扱われていた領域にある交点である。
交点2612における輝度値は、(19)式を用いて算出する。

Figure 0006003574
(19)式は、ライン2206における関数rとライン2226における関数cの交点2612(x,y)における値の平均値である。交点2614における輝度値も、ライン2206における関数rとライン2228における関数cj+1の交点2614(xi+1,y)における値の平均値である。交点2616における輝度値も、ライン2208における関数ri+1とライン2226における関数cの交点2616(x,yj+1)における値の平均値である。交点2618における輝度値も、ライン2208における関数ri+1とライン2228における関数cj+1の交点2618(xi+1,yj+1)における値の平均値である。このように、ラインの交点にある画素の輝度値は、横方向の関数値と縦方向の関数値の平均値とする。 In step S1716, the brightness correction module 950 corrects the brightness of the image. In other words, the fog removal amount is calculated using the degree of inclination of the fog (the function estimated in step S1710), and the pixel value at each coordinate is corrected. The correction here is to remove the fog from the image and generate the background (original image).
26, 27, and 28 are explanatory diagrams illustrating processing examples performed by the luminance correction module 950.
In the example of FIG. 26, four intersections in the region 2610 (that is, the intersection 2612 is an intersection of the line 2206 and the line 2226, the intersection 2614 is an intersection of the line 2206 and the line 2228, and the intersection 2616 is an intersection of the line 2208 and the line 2226. The calculation of the fogging amount at an intersection point (intersection point 2618 is an intersection point of line 2208 and line 2228) will be described with reference to FIG. Note that these intersections are intersections in the area treated as invalid data.
The luminance value at the intersection point 2612 is calculated using equation (19).
Figure 0006003574
Expression (19) is an average value of values at the intersection 2612 (x i , y i ) of the function r i in the line 2206 and the function c j in the line 2226. The luminance value at the intersection point 2614 is also an average value of values at the intersection point 2614 (x i + 1 , y j ) of the function r i in the line 2206 and the function c j + 1 in the line 2228. The luminance value at the intersection 2616 is also an average value of the values at the intersection 2616 (x i , y j + 1 ) of the function r i + 1 in the line 2208 and the function c j in the line 2226. The luminance value at the intersection 2618 is also an average value of values at the intersection 2618 (x i + 1 , y j + 1 ) of the function r i + 1 in the line 2208 and the function c j + 1 in the line 2228. As described above, the luminance value of the pixel at the intersection of the lines is an average value of the horizontal function value and the vertical function value.

そして、このような交点ではない画素、例えば図27に示す中間点2722における輝度は、(20)式を用いて算出する。(20)式は、中間点2722における輝度を周囲の4つの交点の輝度によって算出するものである。したがって、交点以外の画素における(20)式による算出は、交点における輝度値を算出した後に行う。

Figure 0006003574
中間点2722の位置を(x,y)としている。なお、(20)式の右辺のW((x,y),(x,y))は距離重みを表している。つまり、中間点2722からの交点(交点2612、2614、2616、2618)までの距離による重みであり、4つの交点の重みの合計が1となる値であり、例えば、距離の逆数を用いた値である。したがって、各交点から等距離にある場合は、各交点における輝度の1/4を加えた値となる。 And the brightness | luminance in the pixel which is not such an intersection, for example, the intermediate point 2722 shown in FIG. Expression (20) is for calculating the luminance at the intermediate point 2722 by the luminance of the four surrounding intersections. Therefore, the calculation by the expression (20) in the pixels other than the intersection is performed after the luminance value at the intersection is calculated.
Figure 0006003574
The position of the intermediate point 2722 is (x, y). Note that W ((x, y), (x i , y i )) on the right side of the equation (20) represents a distance weight. That is, it is a weight based on the distance from the intermediate point 2722 to the intersection (intersection points 2612, 2614, 2616, and 2618), and the sum of the weights of the four intersections is 1. For example, a value using the reciprocal of the distance It is. Therefore, when equidistant from each intersection, the value is obtained by adding 1/4 of the luminance at each intersection.

そして、(21)式によりかぶり量を算出する。

Figure 0006003574
なお、pは、補正目標値となる輝度値である。
図28は、かぶり量を除去した様子を3次元的に表現したものである。x軸、y軸は画像の位置を示し、z軸は輝度値を示す空間である。灰色の面がかぶりの画像であり、画像全体を覆っているように位置している。そして、薄い格子模様の面が補正した後の画像の輝度を示している。pは、図28の例に示すように、前述(1)に示した画像における明るい輝度値である。これに合わせるように、各点における輝度を上げるようにしてかぶりを除去している。図28では、中間点2722の輝度を引き上げていることを示している。 Then, the fogging amount is calculated by the equation (21).
Figure 0006003574
Note that p * is a luminance value that is a correction target value.
FIG. 28 is a three-dimensional representation of how the fogging amount is removed. The x-axis and y-axis indicate the position of the image, and the z-axis is a space indicating the luminance value. The gray surface is a fogged image and is positioned so as to cover the entire image. And the brightness | luminance of the image after the surface of a thin grid | pattern pattern corrected is shown. As shown in the example of FIG. 28, p * is a bright luminance value in the image shown in (1) above. In accordance with this, the fog is removed by increasing the luminance at each point. FIG. 28 shows that the brightness of the intermediate point 2722 is raised.

ステップS1718では、出力モジュール160が、補正した画像を出力する。例えば、プリンタでかぶりを除去した画像を印刷する。   In step S1718, the output module 160 outputs the corrected image. For example, an image from which fog is removed by a printer is printed.

<第6の実施の形態>
図29は、第6の実施の形態の構成例についての概念的なモジュール構成図である。
第6の実施の形態である画像処理装置は、画像からかぶりを除去するものであって、図29の例に示すように、画像受付モジュール110、非エッジ領域抽出モジュール1620、検査領域選択モジュール1630、画素値測定モジュール1640、画素値分布推定モジュール1650、補正目標値決定モジュール140、補正可否判断モジュール1445、補正モジュール910、出力モジュール160を有している。補正モジュール910は、彩度補正モジュール150、輝度補正モジュール950を有している。
<Sixth Embodiment>
FIG. 29 is a conceptual module configuration diagram illustrating an exemplary configuration according to the sixth embodiment.
The image processing apparatus according to the sixth embodiment removes the fog from the image. As shown in the example of FIG. 29, the image reception module 110, the non-edge area extraction module 1620, and the inspection area selection module 1630 A pixel value measurement module 1640, a pixel value distribution estimation module 1650, a correction target value determination module 140, a correction availability determination module 1445, a correction module 910, and an output module 160. The correction module 910 includes a saturation correction module 150 and a luminance correction module 950.

補正可否判断モジュール1445は、補正目標値決定モジュール140、補正モジュール910と接続されており、画素値分布推定モジュール1650によって推定された関数に基づいてかぶり量を算出し、そのかぶり量と補正目標値決定モジュール140によって決定された補正目標値との差分に基づいて、彩度補正モジュール150と輝度補正モジュール950による補正を行うか否かを判断する。
また、補正可否判断モジュール1445は、画素値分布推定モジュール1650によって推定された関数に基づいてかぶり量を算出し、画像受付モジュール110によって受け付けられた画像内の各画素におけるかぶり量同士の差分に基づいて、彩度補正モジュール150と輝度補正モジュール950による補正を行うか否かを判断するようにしてもよい。
補正モジュール910内の彩度補正モジュール150は、第5の実施の形態の彩度補正モジュール150と同等であるが、補正可否判断モジュール1445によって補正を行うと判断された場合に、補正を行う。
補正モジュール910内の輝度補正モジュール950は、第5の実施の形態の輝度補正モジュール950と同等であるが、補正可否判断モジュール1445によって補正を行うと判断された場合に、補正を行う。
The correction possibility determination module 1445 is connected to the correction target value determination module 140 and the correction module 910, calculates the fog amount based on the function estimated by the pixel value distribution estimation module 1650, and the fog amount and the correction target value. Based on the difference from the correction target value determined by the determination module 140, it is determined whether or not correction by the saturation correction module 150 and the luminance correction module 950 is to be performed.
Further, the correction possibility determination module 1445 calculates the fog amount based on the function estimated by the pixel value distribution estimation module 1650, and based on the difference between the fog amounts in each pixel in the image received by the image reception module 110. Thus, it may be determined whether or not correction by the saturation correction module 150 and the luminance correction module 950 is performed.
The saturation correction module 150 in the correction module 910 is equivalent to the saturation correction module 150 of the fifth embodiment, but performs correction when it is determined by the correction availability determination module 1445 that correction is performed.
The luminance correction module 950 in the correction module 910 is equivalent to the luminance correction module 950 of the fifth embodiment, but performs correction when it is determined by the correction availability determination module 1445 that correction is performed.

図30は、第6の実施の形態による処理例を示すフローチャートである。
ステップS3002では、画像受付モジュール110が、対象画像を受け付ける。
ステップS3004では、非エッジ領域抽出モジュール1620が、色値の変化がなだらかで連続した領域を抽出する。
ステップS3006では、検査領域選択モジュール1630が、かぶりの傾斜を推定するのに適している領域を抽出する。
ステップS3008では、画素値測定モジュール1640が、予め定められた規則にしたがってラインを走査して、画素値を測定する。
ステップS3010では、画素値分布推定モジュール1650が、測定した画素値の集合から、かぶりの傾斜度合いを推定する。
ステップS3012では、補正目標値決定モジュール140が、補正目標値を決定する。
ステップS3014では、補正可否判断モジュール1445が、補正処理を行うか否かを判断し、行う場合はステップS3016へ進み、それ以外の場合はステップS3020へ進む。
ステップS3016では、彩度補正モジュール150が、画像の彩度を補正する。
ステップS3018では、輝度補正モジュール950が、画像の輝度を補正する。
ステップS3020では、出力モジュール160が、補正した画像を出力する。
FIG. 30 is a flowchart illustrating a processing example according to the sixth exemplary embodiment.
In step S3002, the image reception module 110 receives a target image.
In step S3004, the non-edge region extraction module 1620 extracts a continuous region where the color value changes gently.
In step S3006, the inspection region selection module 1630 extracts a region suitable for estimating the fog inclination.
In step S3008, the pixel value measurement module 1640 measures the pixel value by scanning the line according to a predetermined rule.
In step S3010, the pixel value distribution estimation module 1650 estimates the degree of fog inclination from the measured set of pixel values.
In step S3012, the correction target value determination module 140 determines a correction target value.
In step S3014, the correction possibility determination module 1445 determines whether or not to perform correction processing. If so, the process proceeds to step S3016. Otherwise, the process proceeds to step S3020.
In step S3016, the saturation correction module 150 corrects the saturation of the image.
In step S3018, the brightness correction module 950 corrects the brightness of the image.
In step S3020, the output module 160 outputs the corrected image.

前述の図53(a)から(c)の説明において、第5の実施の形態、第6の実施の形態との比較について、図53(c)から(f)の例を用いて説明する。図53(c)の例に示すように撮影画像5330内をライン5332で走査した場合の輝度値をグラフに示すと、図53(d)の例に示すようになる。つまり、かぶり画像5320は右方向に向かうほど濃くなるため、輝度値は右下がりとなるが、元の画像におけるもともとの輝度値があるので、図53(d)のグラフの例のように、輝度分布5342、輝度分布5344、輝度分布5346、輝度分布5348で段階的な輝度の分布を示すことになる。ここで、図53(f)の例のように、目標輝度になるように各輝度を補正すると、その結果は図53(e)の例に示すような補正画像5340となる。背景が白ではない領域5312のような部分は、輝度が明るくなりすぎてしまい、赤色も飛んでしまった画像になってしまう。これは、有彩色の部分は白背景より低い輝度値となるにもかかわらず、「一面全体が白い紙原稿」を対象としていることから生じてしまうことである。
一方、第5の実施の形態、第6の実施の形態では、領域5314を選択し、その領域5314に基づいてかぶり除去量を算出し、画像を補正している。背景が白ではない領域5312のような部分は、図53(e)の例に示すような補正画像5340と比べて、輝度が明るくなりすぎてしまうことを抑制している。
In the description of FIGS. 53A to 53C described above, comparison with the fifth embodiment and the sixth embodiment will be described using the examples of FIGS. 53C to 53F. As shown in the example of FIG. 53C, when the brightness value when the photographed image 5330 is scanned with the line 5332 is shown in the graph, it is as shown in the example of FIG. 53D. That is, since the fogged image 5320 becomes darker toward the right, the luminance value decreases to the right. However, since there is the original luminance value in the original image, the luminance is as shown in the example of the graph in FIG. A distribution 5342, a luminance distribution 5344, a luminance distribution 5346, and a luminance distribution 5348 indicate stepwise luminance distributions. Here, as in the example of FIG. 53 (f), when each luminance is corrected to the target luminance, the result is a corrected image 5340 as shown in the example of FIG. 53 (e). A portion such as a region 5312 where the background is not white becomes too bright and an image in which red is also lost is obtained. This is because the chromatic portion has a luminance value lower than that of the white background, but “a whole sheet of white paper document” is targeted.
On the other hand, in the fifth embodiment and the sixth embodiment, the area 5314 is selected, the fog removal amount is calculated based on the area 5314, and the image is corrected. A portion such as a region 5312 whose background is not white suppresses the brightness from becoming too bright compared to the corrected image 5340 shown in the example of FIG. 53 (e).

<第7の実施の形態>
図31は、第7の実施の形態の構成例についての概念的なモジュール構成図である。
第7の実施の形態である画像処理装置は、画像からかぶりを除去するものであって、図31の例に示すように、準平坦領域抽出モジュール3110、サンプリング領域選択モジュール3120、かぶり量推定モジュール3130、輝度かぶり補正モジュール3140を有している。
<Seventh embodiment>
FIG. 31 is a conceptual module configuration diagram of a configuration example according to the seventh embodiment.
The image processing apparatus according to the seventh embodiment removes the fog from the image. As shown in the example of FIG. 31, the quasi-flat area extraction module 3110, the sampling area selection module 3120, and the fog amount estimation module. 3130. A luminance fog correction module 3140 is provided.

準平坦領域抽出モジュール3110は、エッジ強調モジュール3112、2値化モジュール3114、反転モジュール3116、ラベリングモジュール3118を有しており、サンプリング領域選択モジュール3120と接続されている。準平坦領域抽出モジュール3110は、対象とする画像から背景となる準平坦領域を抽出する。ここで準平坦領域とは、非エッジ領域をいう。エッジ強調モジュール3112は、対象とする画像に対してエッジ強調を行う。既存のエッジ強調技術を用いればよい。2値化モジュール3114は、エッジ強調が行われた画像に対して2値化を行う。反転モジュール3116は、2値化された画像を白黒反転する。ラベリングモジュール3118は、白黒反転された2値画像をラベリングする。これによって、複数の非エッジ領域を抽出することになる。なお、エッジ強調モジュール3112は前述の第5の実施の形態のソーベルフィルターモジュール1910に該当し、2値化モジュール3114は前述の第5の実施の形態の2値化モジュール1920に該当し、反転モジュール3116は前述の第5の実施の形態の白黒反転モジュール1930に該当し、ラベリングモジュール3118は前述の第5の実施の形態のラベリングモジュール1940に該当し、さらに、小サイズ除去モジュール1950を付加してもよい。   The quasi-flat region extraction module 3110 includes an edge enhancement module 3112, a binarization module 3114, an inversion module 3116, and a labeling module 3118, and is connected to the sampling region selection module 3120. The quasi-flat area extraction module 3110 extracts a quasi-flat area as a background from the target image. Here, the quasi-flat region refers to a non-edge region. The edge enhancement module 3112 performs edge enhancement on the target image. Existing edge enhancement techniques may be used. The binarization module 3114 binarizes the image on which edge enhancement has been performed. The inversion module 3116 inverts the binarized image into black and white. The labeling module 3118 labels the binary image that has been reversed in black and white. As a result, a plurality of non-edge regions are extracted. Note that the edge enhancement module 3112 corresponds to the Sobel filter module 1910 of the fifth embodiment described above, and the binarization module 3114 corresponds to the binarization module 1920 of the fifth embodiment described above. The module 3116 corresponds to the monochrome inversion module 1930 of the fifth embodiment, the labeling module 3118 corresponds to the labeling module 1940 of the fifth embodiment, and a small size removal module 1950 is added. May be.

サンプリング領域選択モジュール3120は、色解析モジュール3122、識別関数モジュール3124、領域選択モジュール3126を有しており、準平坦領域抽出モジュール3110、かぶり量推定モジュール3130と接続されている。サンプリング領域選択モジュール3120は、準平坦領域抽出モジュール3110によって抽出された複数の非エッジ領域からかぶり量推定に適した非エッジ領域を選択する。つまり、背景領域を選択する。色解析モジュール3122は、非エッジ領域の色を解析する。つまり、非エッジ領域の座標から、対象としている元の画像内のその座標の画素値を抽出し、その非エッジ領域の色を解析する。識別関数モジュール3124は、非エッジ領域の色に識別関数を適用して、背景領域を示す値を算出する。領域選択モジュール3126は、識別関数モジュール3124によって算出された値を用いて、かぶり量推定に適した非エッジ領域を選択する。   The sampling area selection module 3120 includes a color analysis module 3122, an identification function module 3124, and an area selection module 3126, and is connected to the quasi-flat area extraction module 3110 and the fogging amount estimation module 3130. The sampling area selection module 3120 selects a non-edge area suitable for fog amount estimation from a plurality of non-edge areas extracted by the quasi-flat area extraction module 3110. That is, the background area is selected. The color analysis module 3122 analyzes the color of the non-edge region. That is, from the coordinates of the non-edge region, the pixel value of that coordinate in the original image of interest is extracted, and the color of the non-edge region is analyzed. The discriminant function module 3124 applies a discriminant function to the color of the non-edge region to calculate a value indicating the background region. The area selection module 3126 selects a non-edge area suitable for fogging amount estimation using the value calculated by the discrimination function module 3124.

かぶり量推定モジュール3130は、ラインサンプリングモジュール3132、多モデル関数推定モジュール3134、平面輝度推定モジュール3136を有しており、サンプリング領域選択モジュール3120、輝度かぶり補正モジュール3140と接続されている。かぶり量推定モジュール3130は、前述の実施の形態における「かぶり量の推定処理」に該当するものである。ラインサンプリングモジュール3132は、予め定められた走査線(ライン)を複数設定し、領域選択モジュール3126で選択した領域内外の色値(輝度値)を取得する。
多モデル関数推定モジュール3134は、対象としている画像内の走査線毎にかぶり量を推定する複数の関数の情報量を算出し、その情報量に基づいてその走査線毎に適用すべき関数を選択する。そして、選択された走査線毎の関数の情報量と複数の関数間の差分ノルムに基づいて、関数の組み合わせを選択する。また、関数を選択するにあたって、走査線毎の画素の輝度値の分布に基づいて、選択すべきでない関数を除外し、残った関数内から関数を選択するようにしてもよい。「かぶり量を推定する複数の関数」、「関数の情報量」、「関数の選択」、「関数の組み合わせを選択」等については後述する。平面輝度推定モジュール3136は、多モデル関数推定モジュール3134によって選択された関数の組み合わせを走査線毎に適用することによって、かぶり量を推定する。
The fog amount estimation module 3130 includes a line sampling module 3132, a multi-model function estimation module 3134, and a planar luminance estimation module 3136, and is connected to the sampling area selection module 3120 and the luminance fog correction module 3140. The fog amount estimation module 3130 corresponds to the “fogging amount estimation process” in the above-described embodiment. The line sampling module 3132 sets a plurality of predetermined scanning lines (lines) and acquires color values (luminance values) inside and outside the area selected by the area selection module 3126.
The multi-model function estimation module 3134 calculates information amounts of a plurality of functions for estimating the fog amount for each scanning line in the target image, and selects a function to be applied to each scanning line based on the information amount. To do. Then, a combination of functions is selected based on the information amount of the function for each selected scanning line and the difference norm between the plurality of functions. In selecting a function, a function that should not be selected may be excluded based on the distribution of luminance values of pixels for each scanning line, and a function may be selected from the remaining functions. “A plurality of functions for estimating the fogging amount”, “information amount of function”, “selecting a function”, “selecting a combination of functions” and the like will be described later. The planar luminance estimation module 3136 estimates the fogging amount by applying the combination of functions selected by the multi-model function estimation module 3134 for each scanning line.

輝度かぶり補正モジュール3140は、座標毎補正量計算モジュール3142、輝度補正モジュール3144、彩度補正モジュール3146を有しており、かぶり量推定モジュール3130と接続されている。輝度かぶり補正モジュール3140は、対象としている画像からかぶり量を除去する。座標毎補正量計算モジュール3142は、対象としている画像内の各画素の補正量を算出する。輝度補正モジュール3144は、座標毎補正量計算モジュール3142によって算出された補正量に基づいて、対象としている画像の輝度を補正する。彩度補正モジュール3146は、座標毎補正量計算モジュール3142によって算出された補正量に基づいて、対象としている画像の彩度を補正する。
なお、前述の実施の形態における「かぶり量の推定処理」を、第7の実施の形態におけるかぶり量推定モジュール3130による処理に置換してもよい。
The luminance fog correction module 3140 includes a coordinate-by-coordinate correction amount calculation module 3142, a luminance correction module 3144, and a saturation correction module 3146, and is connected to the fog amount estimation module 3130. The luminance fog correction module 3140 removes the fog amount from the target image. The correction amount calculation module 3142 for each coordinate calculates the correction amount of each pixel in the target image. The luminance correction module 3144 corrects the luminance of the target image based on the correction amount calculated by the coordinate-specific correction amount calculation module 3142. The saturation correction module 3146 corrects the saturation of the target image based on the correction amount calculated by the correction amount calculation module 3142 for each coordinate.
Note that the “fogging amount estimation processing” in the above-described embodiment may be replaced with the processing by the fogging amount estimation module 3130 in the seventh embodiment.

図32は、第7の実施の形態による処理例を示すフローチャートである。
ステップS3202では、準平坦領域抽出モジュール3110が前述のエッジ強調モジュール3112、2値化モジュール3114、反転モジュール3116、ラベリングモジュール3118を制御して、対象とする画像から準平坦領域を抽出する。
ステップS3204では、色解析モジュール3122が、準平坦領域の色を解析する。
ステップS3206では、識別関数モジュール3124が、準平坦領域に対して識別関数を適用する。
ステップS3208では、領域選択モジュール3126が、対象とする領域を選択する。
ステップS3210では、ラインサンプリングモジュール3132が、画像に対して走査ラインによるサンプリングを行う。
ステップS3212では、多モデル関数推定モジュール3134が、多モデル関数による推定を行う。
ステップS3214では、平面輝度推定モジュール3136が、モデル関数による輝度の推定を行う。
ステップS3216では、輝度かぶり補正モジュール3140が前述の座標毎補正量計算モジュール3142、輝度補正モジュール3144、彩度補正モジュール3146を制御して、推定したかぶり量を用いて画像に対して補正を行う。
FIG. 32 is a flowchart illustrating a processing example according to the seventh exemplary embodiment.
In step S3202, the quasi-flat region extraction module 3110 controls the edge enhancement module 3112, the binarization module 3114, the inversion module 3116, and the labeling module 3118 to extract a quasi-flat region from the target image.
In step S3204, the color analysis module 3122 analyzes the color of the quasi-flat region.
In step S3206, the discriminant function module 3124 applies the discriminant function to the quasi-flat region.
In step S3208, the region selection module 3126 selects a target region.
In step S <b> 3210, the line sampling module 3132 samples the image using scan lines.
In step S3212, the multi-model function estimation module 3134 performs estimation using a multi-model function.
In step S3214, the planar brightness estimation module 3136 performs brightness estimation using a model function.
In step S3216, the luminance fog correction module 3140 controls the correction amount calculation module 3142, the luminance correction module 3144, and the saturation correction module 3146 described above to correct the image using the estimated fog amount.

以下に、かぶり量推定モジュール3130による処理を説明する。図33は、画像の走査線とライン・関数対応テーブル3350との関係例を示す説明図である。
ラインサンプリングモジュール3132は、対象としている画像3300を走査する。つまり、予め定められた走査線を設定し、その走査線上の画素値を取得する。そして、かぶり量を推定するが、前述の実施の形態(第1の実施の形態から第6の実施の形態)では、(16)式、(17)式に示したように、1次式による推定を行っている。そして、明度の補正目標値hは、(22)式のように算出している。

Figure 0006003574
r、cの関数((16)式、(17)式)の形式から、明度分布hとして正しく推定できる上限は(23)式のようになる。
Figure 0006003574
つまり、x、yに関する2次形式以上の多項式分布や、当然ながら指数関数族などの非多項式分布も使われていない。平面(2次元)のかぶりは、非線形な分布と考えられる。そこで、第7の実施の形態では、かぶり量を推定するのに、より高次元な関数モデルで対応する。 Hereinafter, processing by the fog amount estimation module 3130 will be described. FIG. 33 is an explanatory diagram showing an example of the relationship between an image scanning line and a line / function correspondence table 3350.
The line sampling module 3132 scans the target image 3300. That is, a predetermined scanning line is set, and a pixel value on the scanning line is acquired. Then, the fogging amount is estimated. In the above-described embodiments (from the first embodiment to the sixth embodiment), as shown in the equations (16) and (17), the linear equation is used. Estimating. The lightness correction target value h is calculated as shown in equation (22).
Figure 0006003574
From the format of the functions of r and c (equations (16) and (17)), the upper limit that can be correctly estimated as the brightness distribution h * is as shown in equation (23).
Figure 0006003574
That is, a polynomial distribution of a quadratic or higher-order form regarding x and y and a non-polynomial distribution such as an exponential family are naturally not used. Planar (two-dimensional) fogging is considered a non-linear distribution. Therefore, in the seventh embodiment, a higher-dimensional function model is used to estimate the fogging amount.

走査によって取得した画素値から、予め定められた関数セットから選択を行って、かぶり量の推定を行う。つまり、水平・垂直方向の関数r,cの関数モデル(前述の実施の形態では、(16)式、(17)式)を拡張する。
パラメタα,βに関して、(24)式、(25)式のような線形なモデルを設定する。これは、解析的に解が求められるようにするためである。

Figure 0006003574
Figure 0006003574
このモデルで真の関数との誤差がガウス分布にしたがうとして、最尤推定解を計算すると(26)式、(27)式、(28)式のようになる。
Figure 0006003574
Figure 0006003574
Figure 0006003574
第7の実施の形態では、多項式、非線形関数の線形和とする。(29)式は多項式であり、(30)式はシグモイド関数であり、(31)式はガウシアン関数であり、(30)式、(31)式は非線形の式である。
Figure 0006003574
Figure 0006003574
Figure 0006003574
それぞれの関数集合を(32)式、(33)式、(34)式で表現する。ただし、非線形の式である(30)式、(31)式には、φ(x)=255も加える((33)式、(34)式)。
Figure 0006003574
Figure 0006003574
Figure 0006003574
The fogging amount is estimated by selecting from a predetermined function set from the pixel values obtained by scanning. That is, the function models of the functions r and c in the horizontal and vertical directions (formulas (16) and (17) in the above embodiment) are expanded.
With respect to the parameters α and β, linear models such as the equations (24) and (25) are set. This is in order to obtain a solution analytically.
Figure 0006003574
Figure 0006003574
Assuming that the error from the true function in this model follows a Gaussian distribution, the maximum likelihood estimation solution is calculated as shown in equations (26), (27), and (28).
Figure 0006003574
Figure 0006003574
Figure 0006003574
In the seventh embodiment, a linear sum of a polynomial and a nonlinear function is used. Equation (29) is a polynomial, Equation (30) is a sigmoid function, Equation (31) is a Gaussian function, and Equations (30) and (31) are nonlinear equations.
Figure 0006003574
Figure 0006003574
Figure 0006003574
Each function set is expressed by Expression (32), Expression (33), and Expression (34). However, φ 0 (x) = 255 is also added to the equations (30) and (31), which are nonlinear equations (the equations (33) and (34)).
Figure 0006003574
Figure 0006003574
Figure 0006003574

これによって、各モデル毎に最尤推定解が求まった。次に、どの関数を選択すべきかについて説明する。
ここでは、AIC(赤池情報量規準:Akaike Information Criteria)を用いて選択する例を説明する。AICとは、カルバックライブラ情報量のモデル依存部分の期待値を統計的な漸近理論(関数のテーラー展開類似の処理)で、1/nオーダー(n:標本数)の項まで残した状態に変形したものを標本平均で近似したものである。特徴として、1/nオーダー項の近似部が「パラメタ数が多いほどペナルティが付与される」意味をなすので、複雑なモデルにしすぎない効用がある。
このAICを用いて、(24)式、(26)式、(28)式から(35)式、(36)式を算出する。

Figure 0006003574
Figure 0006003574
Figure 0006003574
Figure 0006003574
Figure 0006003574
なお、(35)式のAIC値が小さいほどモデルとして適した関数であることを示している。 Thus, a maximum likelihood estimation solution was obtained for each model. Next, which function should be selected will be described.
Here, an example will be described in which selection is performed using AIC (Akaike Information Criterion). AIC is the model-dependent portion of the expected amount of information on the amount of information in the Cullback library, transformed into a state in which up to 1 / n order (n: number of samples) terms are left in statistical asymptotic theory (processing similar to Taylor expansion of functions). Is approximated by a sample average. As a feature, the approximation part of the 1 / n-order term means that “the more the number of parameters, the more penalty is given”.
Using this AIC, the expressions (35) and (36) are calculated from the expressions (24), (26), and (28).
Figure 0006003574
Figure 0006003574
Figure 0006003574
Figure 0006003574
Figure 0006003574
Note that the smaller the AIC value in the equation (35), the more suitable the model is.

図33(b)の例に示すライン・関数対応テーブル3350は、画像3300内の各走査線(図33(a)の例では矢印付の線分)を示しており、列としてその走査線上の画素群に対して適用する関数集合(関数モデル)を並べたものである。そして、各セルには、AIC値が記憶される。つまり、各走査線の画素群に対して、各関数のAIC値を算出し、そのAIC値を記憶させている。ライン・関数対応テーブル3350内の丸印(○)は、走査ライン毎のAIC最小値を示している。つまり、AICを利用して各走査線で最もよい関数モデルを決定している。
ただし、ここでは、各走査線の推定を独立に行いすぎている。つまり、単純に、走査ライン毎のAIC最小値を示す関数モデルを選択しただけでは、かぶり量の推定には適していない。実際のところ、想定している影かぶりはくっきりとしておらず、ぼんやりとしたものである。
A line / function correspondence table 3350 shown in the example of FIG. 33B shows each scanning line in the image 3300 (in the example of FIG. 33A, a line segment with an arrow), and is arranged on the scanning line as a column. A function set (function model) to be applied to a pixel group is arranged. Each cell stores an AIC value. That is, the AIC value of each function is calculated for the pixel group of each scanning line, and the AIC value is stored. A circle (◯) in the line / function correspondence table 3350 indicates the AIC minimum value for each scanning line. That is, the best function model is determined for each scanning line using AIC.
However, here, each scanning line is estimated too much independently. That is, simply selecting a function model indicating the AIC minimum value for each scanning line is not suitable for estimating the fogging amount. As a matter of fact, the assumed shadow cast is not clear and is vague.

そこで、次のように関数モデル選択の手法を系列的に行えるようにする。
図34は、ライン・関数対応テーブル3350内における差分ノルムの例を示す説明図である。
「想定している影かぶりはくっきりとしておらず、ぼんやりとしたものである」ことから、「近い走査線の関数は比較的形状が似ている」ことになる。そこで、形状の類似性を、「関数の差分ノルム」で定義する。ここで、ri+1とrにおける「関数の差分ノルム」は(37)式である。

Figure 0006003574
つまり、図34(b)のライン・関数対応テーブル3350では、走査線rと隣接している走査線毎の関数の差分ノルム3452を算出する。
そして、2つの走査線分の評価値(J)を、「隣接走査線のAIC値2つと関数の差分ノルム値の和」で定義し、(38)式のように表現する。(38)式は、各走査線のAIC値と関数の差分ノルムによって定義されている。
Figure 0006003574
これをN個の走査線に拡張した次の規準値を最小にする組み合わせを採用する((39)式、(40)式参照)。
Figure 0006003574
Figure 0006003574
関数ノルムは例えば(41)式で定める。
Figure 0006003574
このように、近傍する走査線同士で各走査線の関数モデル同士の近似度(ここでは、「関数の差分ノルム」)を全て算出し、全ての走査線、又は近傍の複数区間内の走査線で最も有効な組み合わせを選択する。 Therefore, the function model selection method can be performed in series as follows.
FIG. 34 is an explanatory diagram showing an example of the difference norm in the line / function correspondence table 3350.
“The assumed shadow cast is not clear and is blurry”, so “the function of the near scanning line is relatively similar in shape”. Therefore, the similarity of shape is defined by “the difference norm of the function”. Here, “the difference norm of the function” in r i + 1 and r i is the expression (37).
Figure 0006003574
That is, in the line function correspondence table 3350 of FIG. 34 (b), calculates the difference norm 3452 functions for each scan line that is adjacent to the scanning line r 0.
Then, the evaluation value (J) of two scanning lines is defined by “the sum of two AIC values of adjacent scanning lines and the difference norm value of the function”, and is expressed as in equation (38). Equation (38) is defined by the AIC value of each scanning line and the difference norm of the function.
Figure 0006003574
A combination that minimizes the next reference value, which is expanded to N scanning lines, is employed (see equations (39) and (40)).
Figure 0006003574
Figure 0006003574
The function norm is determined by, for example, equation (41).
Figure 0006003574
In this way, the degree of approximation between the function models of each scanning line (here, “function difference norm”) is calculated among the neighboring scanning lines, and all the scanning lines or scanning lines in a plurality of neighboring sections are calculated. Select the most effective combination.

次に、有効領域が狭いときに高次元関数を使うと発散すると予想できるが、その対策について説明する。
走査線毎の画素の輝度値の分布に基づいて、選択すべきでない関数モデルを除外し、残った関数内から関数モデルを選択すればよい。具体的には、領域選択モジュール3126によって選択された領域を通過していない走査線の関数モデルを除外するようにしてもよい。また、その領域が含まれている率を走査線毎に算出し、予め定められた閾値よりも小又は以下である場合は、その走査線の関数モデルを除外するようにしてもよい。また、関数モデル毎にその関数モデルが発散する値群を予め算出し、その発散する値群が走査線に含まれている場合は、その走査線において発散する関数モデルを除外するようにしてもよい。
Next, it can be expected that a high-dimensional function diverges when the effective area is narrow.
Based on the distribution of luminance values of pixels for each scanning line, function models that should not be selected may be excluded and function models may be selected from the remaining functions. Specifically, the function model of the scanning line that does not pass through the region selected by the region selection module 3126 may be excluded. In addition, the rate at which the region is included is calculated for each scanning line, and if it is smaller or smaller than a predetermined threshold value, the function model of the scanning line may be excluded. Further, for each function model, a value group that the function model diverges is calculated in advance, and when the divergence value group is included in the scan line, the function model that diverges in the scan line may be excluded. Good.

<第8の実施の形態>
図35は、第8の実施の形態の構成例についての概念的なモジュール構成図である。
第8の実施の形態である画像処理装置は、画像からかぶりを除去するものであって、図35の例に示すように、準平坦領域抽出モジュール3110、サンプリング領域選択モジュール3120、かぶり量推定モジュール3530、輝度かぶり補正モジュール3140を有している。つまり、前述の第7の実施の形態のかぶり量推定モジュール3130をかぶり量推定モジュール3530に変更したものである。特に、複数の背景色で構成された画像を対象とする場合に適している。第8の実施の形態は、対象としている画像から背景らしい領域を複数抽出して、その複数領域を通過する予め定められた方向のサンプリングライン(走査線)を複数用意する。複数領域の背景色が異なる場合でもその隣接画素との差分値を入力としたデータの微分関数近似を実施してから、個々の領域の背景色を積分形から算出するものである。
<Eighth Embodiment>
FIG. 35 is a conceptual module configuration diagram illustrating an exemplary configuration according to the eighth embodiment.
The image processing apparatus according to the eighth embodiment removes fog from an image, and as shown in the example of FIG. 35, a quasi-flat area extraction module 3110, a sampling area selection module 3120, and a fog amount estimation module. 3530 and a luminance fog correction module 3140. That is, the fog amount estimation module 3130 of the seventh embodiment is changed to a fog amount estimation module 3530. In particular, it is suitable when an image composed of a plurality of background colors is targeted. In the eighth embodiment, a plurality of background-like regions are extracted from a target image, and a plurality of sampling lines (scanning lines) in a predetermined direction passing through the plurality of regions are prepared. Even when the background colors of a plurality of regions are different, after performing differential function approximation of data using a difference value from adjacent pixels as an input, the background color of each region is calculated from the integral form.

準平坦領域抽出モジュール3110は、エッジ強調モジュール3112、2値化モジュール3114、反転モジュール3116、ラベリングモジュール3118を有しており、サンプリング領域選択モジュール3120と接続されている。
サンプリング領域選択モジュール3120は、色解析モジュール3122、識別関数モジュール3124、領域選択モジュール3126を有しており、準平坦領域抽出モジュール3110、かぶり量推定モジュール3530と接続されている。
The quasi-flat region extraction module 3110 includes an edge enhancement module 3112, a binarization module 3114, an inversion module 3116, and a labeling module 3118, and is connected to the sampling region selection module 3120.
The sampling area selection module 3120 includes a color analysis module 3122, an identification function module 3124, and an area selection module 3126, and is connected to the quasi-flat area extraction module 3110 and the fog amount estimation module 3530.

かぶり量推定モジュール3530は、ライフサンプリングモジュール3532、多モデル大域微分関数推定モジュール3534、局所域定数推定モジュール3536、平面輝度推定モジュール3538を有しており、サンプリング領域選択モジュール3120、輝度かぶり補正モジュール3140と接続されている。前述の実施の形態における「かぶり量の推定処理」に該当するものである。ラインサンプリングモジュール3532は、予め定められた走査線(ライン)を複数設定し、領域選択モジュール3126で選択した領域内外の色値(輝度値)を取得する。そして、その走査線毎に隣の画素との差分を算出する。差分は、もちろんのことながら、対象としている画素の色値とその隣(走査線上における隣)の画素の色値との差分である。
多モデル大域微分関数推定モジュール3534は、ライフサンプリングモジュール3532によって算出された画素の差分に適用する複数の関数であって、対象としている画像内の走査線毎にかぶり量を推定するその複数の関数の情報量を算出し、その情報量に基づいてその走査線毎に適用すべき関数を選択する。そして、選択された走査線毎の関数の情報量と複数の関数間の差分ノルムに基づいて、関数の組み合わせを選択する。つまり、差分を入力とする複数の関数モデル内から適した関数(回帰関数)を推定することになる。これらの処理は、領域選択モジュール3126によって選択された領域毎に行う。
局所域定数推定モジュール3536は、多モデル大域微分関数推定モジュール3534によって選択された関数の積分関数を算出し、その積分関数の定数項を推定する。この定数項は、領域選択モジュール3126によって選択された領域全体のかぶり量の定数とその領域の背景色の固有量の和である。つまり、選択領域毎に推定した関数の線分関数を算出し、その定数項を推定する。
平面輝度推定モジュール3538は、多モデル大域微分関数推定モジュール3534によって選択された関数の組み合わせと局所域定数推定モジュール3536によって推定された定数項を領域内の走査線毎に適用することによって、かぶり量を推定する。これによって、複数領域の差分に関して回帰を実行するので、対象としている画像全体に広がるかぶりを定数項で推定可能となる。
The fog amount estimation module 3530 includes a life sampling module 3532, a multi-model global differential function estimation module 3534, a local area constant estimation module 3536, and a planar luminance estimation module 3538. A sampling area selection module 3120 and a luminance fog correction module 3140. Connected with. This corresponds to the “fogging amount estimation process” in the above-described embodiment. The line sampling module 3532 sets a plurality of predetermined scanning lines (lines) and acquires color values (luminance values) inside and outside the area selected by the area selection module 3126. Then, the difference from the adjacent pixel is calculated for each scanning line. The difference is, of course, the difference between the color value of the target pixel and the color value of the adjacent pixel (adjacent on the scanning line).
The multi-model global differential function estimation module 3534 is a plurality of functions applied to the pixel difference calculated by the life sampling module 3532, and the plurality of functions for estimating the fogging amount for each scanning line in the target image. The information amount is calculated, and a function to be applied to each scanning line is selected based on the information amount. Then, a combination of functions is selected based on the information amount of the function for each selected scanning line and the difference norm between the plurality of functions. That is, a suitable function (regression function) is estimated from among a plurality of function models having differences as inputs. These processes are performed for each area selected by the area selection module 3126.
The local domain constant estimation module 3536 calculates an integral function of the function selected by the multi-model global differential function estimation module 3534 and estimates a constant term of the integral function. This constant term is the sum of the constant of the fog amount of the entire area selected by the area selection module 3126 and the specific amount of the background color of the area. That is, the line function of the function estimated for each selected region is calculated, and the constant term is estimated.
The planar luminance estimation module 3538 applies the combination of the function selected by the multi-model global differential function estimation module 3534 and the constant term estimated by the local area constant estimation module 3536 for each scanning line in the area, thereby applying the fog amount. Is estimated. As a result, the regression is executed with respect to the difference between the plurality of regions, so that the fog spreading over the entire target image can be estimated by the constant term.

輝度かぶり補正モジュール3140は、座標毎補正量計算モジュール3142、輝度補正モジュール3144、彩度補正モジュール3146を有しており、かぶり量推定モジュール3530と接続されている。   The luminance fog correction module 3140 includes a coordinate-by-coordinate correction amount calculation module 3142, a luminance correction module 3144, and a saturation correction module 3146, and is connected to the fog amount estimation module 3530.

図36は、第8の実施の形態が対象とする画像の例を示す説明図である。
図36(a)の例に示す画像3610は、対象としている画像であって、5つの互いに異なる色の背景を持つ領域(オレンジ色の背景の領域S、薄緑色の背景の領域S、薄青色の背景の領域S、ピンク色の背景の領域S、白色の背景の領域SNSNS)がある。ここで、座標x、yにおける本来の画素値は、(42)式のようになる。

Figure 0006003574
図36(b)の例に示すかぶり画像3620は、画像3610を撮影した際に発生したかぶりを示す像である。かぶり量は、(43)式のようになる。
Figure 0006003574
図36(c)の例に示す撮影画像(観測画像)3630は、画像3610を実際に撮影した撮影画像(観測画像)3630である。つまり、画像3610とかぶり画像3620が合成された画像である。つまり、ここでの画素値は、(44)式のようになる。
Figure 0006003574
第8の実施の形態は、観測値(撮影画像(観測画像)3630)から非線形なかぶり(かぶり画像3620)を平坦にするための除去量を推定する。 FIG. 36 is an explanatory diagram illustrating an example of an image targeted by the eighth embodiment.
An image 3610 shown in the example of FIG. 36A is a target image, and has five regions with different backgrounds (an orange background region S 0 c 0 , a light green background region S). 1 c 1 , a light blue background region S 2 c 2 , a pink background region S 3 c 3 , and a white background region S NS c NS ). Here, the original pixel value at the coordinates x and y is as shown in equation (42).
Figure 0006003574
A fogging image 3620 shown in the example of FIG. 36B is an image showing the fogging that occurs when the image 3610 is captured. The fogging amount is as shown in equation (43).
Figure 0006003574
A captured image (observed image) 3630 shown in the example of FIG. 36C is a captured image (observed image) 3630 obtained by actually capturing the image 3610. That is, the image 3610 and the cover image 3620 are combined. That is, the pixel value here is as shown in Equation (44).
Figure 0006003574
In the eighth embodiment, the removal amount for flattening the non-linear fog (the fog image 3620) is estimated from the observed value (the photographed image (observed image) 3630).

図37は、第8の実施の形態が対象とする画像の走査線における例を示す説明図である。図37(a)、(b)、(c)の例に示すものは、図36(a)、(b)、(c)の例に示す画像にそれぞれ走査線3710、3720、3730を示したものである。それぞれの走査線上における画素値は、(45)式、(46)式、(47)式のようになる。

Figure 0006003574
Figure 0006003574
Figure 0006003574
FIG. 37 is an explanatory diagram illustrating an example of scanning lines of an image targeted by the eighth embodiment. In the examples shown in FIGS. 37 (a), (b), and (c), scanning lines 3710, 3720, and 3730 are shown in the images shown in the examples of FIGS. 36 (a), (b), and (c), respectively. Is. The pixel values on each scanning line are as shown in Equations (45), (46), and (47).
Figure 0006003574
Figure 0006003574
Figure 0006003574

図38は、第8の実施の形態による処理例を示す説明図である。
第8の実施の形態では、(47)式の増減に関わる成分が影側(かぶり画像)にのみ存在することを利用する。
そのために、まず図38(a)の例に示す非エッジ領域マスク3810を利用する。非エッジ領域マスク3810は、反転モジュール3116によって生成された画像である。ここでの画素値は、(48)式のようになる。

Figure 0006003574
図38(b)の例に示す撮影画像(観測画像)3630の輝度差分値データを取得する。撮影画像(観測画像)3630の走査線3720における輝度差分値データは、(49)式のようになる。なお、(49)式の最右辺にある2つの式のうち、上の式はエッジ部分を示しており、下の式はエッジ部分以外を示している。
Figure 0006003574
非エッジ領域マスク3810((48)式)と非エッジ領域マスク3810((49)式)との論理積(AND)画像を生成して、図38(c)の例に示す差分値データ3840を生成する。これは、微分不可であるエッジを除外した後の差分値データである。そして、差分値データ3840の走査線3850上における輝度差分値データは、(50)式のようになる。
Figure 0006003574
FIG. 38 is an explanatory diagram illustrating a processing example according to the eighth exemplary embodiment.
In the eighth embodiment, the fact that the component related to the increase / decrease in equation (47) exists only on the shadow side (cover image) is used.
For this purpose, first, the non-edge region mask 3810 shown in the example of FIG. Non-edge region mask 3810 is an image generated by inversion module 3116. The pixel value here is given by equation (48).
Figure 0006003574
The luminance difference value data of the captured image (observed image) 3630 shown in the example of FIG. The luminance difference value data on the scanning line 3720 of the photographed image (observed image) 3630 is expressed by equation (49). Of the two expressions on the rightmost side of the expression (49), the upper expression indicates the edge part, and the lower expression indicates other than the edge part.
Figure 0006003574
A logical product (AND) image of the non-edge region mask 3810 (expression (48)) and the non-edge region mask 3810 (expression (49)) is generated, and the difference value data 3840 shown in the example of FIG. Generate. This is difference value data after excluding an edge that cannot be differentiated. Then, the luminance difference value data on the scanning line 3850 of the difference value data 3840 is expressed by the equation (50).
Figure 0006003574

前述の第7の実施の形態で用いた(29)式、(30)式、(31)式の各関数群の偏微分項は、次の(51)式、(52)式、(53)式のようになる。

Figure 0006003574
Figure 0006003574
Figure 0006003574
Figure 0006003574
Figure 0006003574
Figure 0006003574
(29)式、(30)式、(31)式、(51)式、(52)式、(53)式のそれぞれの関数集合を、以下の(32)式、(33)式、(34)式、(54)式、(55)式、(56)式で表現する。
Figure 0006003574
Figure 0006003574
Figure 0006003574
Figure 0006003574
Figure 0006003574
Figure 0006003574
つまり、第7の実施の形態における関数集合を(54)式、(55)式、(56)式で置き換える。 The partial differential terms of each function group of the equations (29), (30), and (31) used in the seventh embodiment are the following equations (51), (52), and (53). It becomes like the formula.
Figure 0006003574
Figure 0006003574
Figure 0006003574
Figure 0006003574
Figure 0006003574
Figure 0006003574
Equations (29), (30), (31), (51), (52), and (53) are expressed as the following function sets (32), (33), and (34), respectively. ), (54), (55), and (56).
Figure 0006003574
Figure 0006003574
Figure 0006003574
Figure 0006003574
Figure 0006003574
Figure 0006003574
That is, the function set in the seventh embodiment is replaced with the formulas (54), (55), and (56).

図39は、ライン・関数対応テーブル内における差分ノルムの例を示す説明図である。つまり、第7の実施の形態で説明した図34と同等のものである。ただし、ライン・関数対応テーブル3950の行として走査線における差分データを示しており、列としてその走査線上における差分データを適用する微分関数を並べたものである。そして、各セルには、AIC値が記憶される。つまり、関数モデルを1次微分の空間で定義して、モデル選択方法は、第7の実施の形態と同等である。そして、(57)式が選択される。(57)式を積分して導出されたものが(58)式である。

Figure 0006003574
Figure 0006003574
ここまでで、最尤推定結果であるパラメタαを推定できる。ただし、(58)式における定数項部分(α)だけ未知のままである。 FIG. 39 is an explanatory diagram showing an example of the difference norm in the line / function correspondence table. That is, it is equivalent to FIG. 34 described in the seventh embodiment. However, the differential data on the scanning line is shown as a row of the line / function correspondence table 3950, and differential functions to which the differential data on the scanning line is applied are arranged as columns. Each cell stores an AIC value. That is, the function model is defined in a first-order differential space, and the model selection method is equivalent to that of the seventh embodiment. Then, the equation (57) is selected. The equation (58) is derived by integrating the equation (57).
Figure 0006003574
Figure 0006003574
Thus far, the parameter α which is the maximum likelihood estimation result can be estimated. However, only the constant term part (α 0 ) in the equation (58) remains unknown.

図40は、第8の実施の形態による処理例を示す説明図である。
各領域毎に複数ラインの推定結果(関数モデルの組み合わせの選択)から(59)式を用いて定数項を推定する。

Figure 0006003574
全てのラベル領域(図40の例に示す画像4000では5つの領域)で定数項を推定する。この定数項は、影かぶりの定数量と背景色の固有量の和に相当する。この定数項を参照にして、対象としている画像の背景部の領域を探す。
そこで、影かぶりの均等化のための補正量を決める必要がある。図41は、第8の実施の形態による処理例を示す説明図である。
まず、対象としている画像内で一番明度の高い領域(一般的には白色の背景部)の定数項(c^l)を全面で採用するという仮定をする。その上で、影かぶりの分布の予め定められたレベル(中央値、平均値、最頻値、高明度側から予め定められた率に位置する点など)を基準にして差分量を決める。(60)式の左辺は、領域固有色を白部分に合わせた状態に相当する。
Figure 0006003574
図41(b)の例では、走査線毎のかぶり量を示している。 FIG. 40 is an explanatory diagram illustrating a processing example according to the eighth exemplary embodiment.
A constant term is estimated using the equation (59) from the estimation results of multiple lines (selection of a combination of function models) for each region.
Figure 0006003574
Constant terms are estimated in all label regions (five regions in the image 4000 shown in the example of FIG. 40). This constant term corresponds to the sum of the constant amount of shadow cast and the inherent amount of background color. By referring to this constant term, the background area of the target image is searched.
Therefore, it is necessary to determine a correction amount for equalizing shadow fog. FIG. 41 is an explanatory diagram of a processing example according to the eighth embodiment.
First, it is assumed that the constant term (c ^ l) of the region with the highest brightness (generally a white background portion) in the target image is adopted over the entire surface. Then, a difference amount is determined based on a predetermined level (median value, average value, mode value, point located at a predetermined rate from the high brightness side) of the shadow fog distribution. The left side of the equation (60) corresponds to a state in which the region specific color is matched with the white portion.
Figure 0006003574
In the example of FIG. 41B, the fogging amount for each scanning line is shown.

図42は、第8の実施の形態による処理例を示す説明図である。前述の第5の実施の形態で説明した図21と同等のものである。
(10)式に示すように複数の特徴量の重み付き線形和の識別関数を利用して、最も傾斜かぶりを推定するに十分な領域で条件を満たすもの全てを選択する。
領域画像4210に対して識別関数の計算結果は、(61)式のように1.5である。

Figure 0006003574
領域画像4220に対して識別関数の計算結果は、(62)式のように2.0である。
Figure 0006003574
領域画像4230に対して識別関数の計算結果は、(63)式のように0.2である。
Figure 0006003574
そして、(64)式に示すように、識別関数の算出値が閾値TH以上となるマスク画像を選択する。この例の場合は、(65)式のようになり、領域画像4210、領域画像4220が選択される。これによって、傾斜かぶりを推定するのに十分な領域が選択されることとなる。なお、重みwは、予め定められた値に設定したり、正解の選択肢が決まっている教師データから学習させるようにしてもよい。
Figure 0006003574
Figure 0006003574
FIG. 42 is an explanatory diagram of an example of processing according to the eighth embodiment. This is equivalent to FIG. 21 described in the fifth embodiment.
As shown in the equation (10), by using a discriminant function of weighted linear sums of a plurality of feature amounts, all those satisfying the conditions in the region sufficient for estimating the most inclined fog are selected.
The calculation result of the discriminant function for the area image 4210 is 1.5 as shown in the equation (61).
Figure 0006003574
The calculation result of the discriminant function for the region image 4220 is 2.0 as shown in Equation (62).
Figure 0006003574
The calculation result of the discriminant function for the area image 4230 is 0.2 as shown in the equation (63).
Figure 0006003574
Then, as shown in the equation (64), a mask image in which the calculated value of the discrimination function is equal to or greater than the threshold value TH is selected. In this example, the equation (65) is obtained, and the region image 4210 and the region image 4220 are selected. As a result, a region sufficient to estimate the tilt fog is selected. The weight w may be set to a predetermined value or may be learned from teacher data in which correct answer options are determined.
Figure 0006003574
Figure 0006003574

<第9の実施の形態>
図43は、第9の実施の形態の構成例についての概念的なモジュール構成図である。
第9の実施の形態である画像処理装置は、画像からかぶりを除去するものであって、図43の例に示すように、準平坦領域抽出モジュール3110、サンプリング領域選択モジュール3120、かぶり量推定モジュール3530、かぶり有無処理モジュール4310、輝度かぶり補正モジュール3140を有している。つまり、前述の第8の実施の形態のかぶり量推定モジュール3530と輝度かぶり補正モジュール3140の間にかぶり有無処理モジュール4310を挿入したものである。なお、図43の例に示すモジュール構成の他に、前述の第8の実施の形態までの実施の形態における「かぶり量の除去処理」の前(直前だけでなく、例えば、かぶり量を推定する処理の前であってもよい)に、かぶり有無処理モジュール4310による処理を行うようにしてもよい。
第9の実施の形態は、特に、原稿内にデザインとしてのかぶりに類似しているグラデーション等が含まれている可能性がある場合に適している。対象としている画像内の原稿(名刺等)には、例えば、デザインとして、グレーのグラデーションが施されている場合がある。前述の実施の形態では、かぶりとデザインとしてのグラデーションとの区別が困難である。
<Ninth embodiment>
FIG. 43 is a conceptual module configuration diagram illustrating an exemplary configuration according to the ninth embodiment.
The image processing apparatus according to the ninth embodiment removes the fog from the image. As shown in the example of FIG. 43, the quasi-flat area extraction module 3110, the sampling area selection module 3120, and the fog amount estimation module. 3530, a fogging presence / absence processing module 4310, and a luminance fogging correction module 3140. That is, the fogging presence / absence processing module 4310 is inserted between the fogging amount estimation module 3530 and the luminance fogging correction module 3140 of the eighth embodiment described above. 43, in addition to the module configuration shown in the example of FIG. 43, before the “fogging amount removal process” in the embodiments up to the eighth embodiment described above (not only immediately before, for example, the fogging amount is estimated. The processing by the fogging presence / absence processing module 4310 may be performed before the processing.
The ninth embodiment is particularly suitable when there is a possibility that gradation or the like similar to a fog as a design is included in a document. For example, the original (such as a business card) in the target image may have a gray gradation as a design. In the above-described embodiment, it is difficult to distinguish the fog from the gradation as the design.

そもそもかぶりが起こると自然現象として、例えば、かぶりは机に置いた原稿に対して、上側から見下ろす状態でカメラを向けて撮影する際に、カメラや手による光の遮断が影響する場合が多い。その場合、かぶりは撮影対象である原稿周囲に対しても原稿と同様のかぶりが発生することとなる。このような現象が発生しているか否かによって、第9の実施の形態は、原稿内のデザインであるのか、かぶりであるのかの判断を行う。
図44の例を用いて説明する。図44は、第9の実施の形態が対象とする画像の例を示す説明図である。
図44(a)の例は、デザインとしてのグラデーション等が施されていない原稿4420(白で均一な原稿)を撮影する場合を示しており、撮影対象4410内には、原稿4420と背景となる机の表面等がある。図44(b)の例は、その状態で撮影した場合のかぶり画像4430を示している。
そして、実際に撮影した場合、図44(c)の例に示すような撮影画像4440となる。つまり、元の原稿4420は白で均一なものであるが、原稿4420を撮影した原稿画像4450にはかぶりが発生しており、その背景にもかぶりが発生している。
一方、図44(d)の例に示す撮影画像4460は、かぶりは発生していないのであるが、原稿にデザインとしてのグラデーションがあり、原稿画像4470内にはかぶりと類似しているグラデーションがある。この場合、原稿画像4470の背景にはかぶりは発生していない。
In the first place, when fogging occurs, as a natural phenomenon, for example, when a photograph placed on a desk is photographed with the camera looking down from above, light blocking by the camera or hand often affects. In this case, the same fog as the original is generated around the original to be photographed. According to whether or not such a phenomenon has occurred, the ninth embodiment determines whether it is a design in a document or a cover.
This will be described with reference to the example of FIG. FIG. 44 is an explanatory diagram illustrating an example of an image targeted by the ninth embodiment.
The example in FIG. 44A shows a case where a document 4420 (white uniform document) that has not been subjected to gradation or the like as a design is photographed. There are desk surfaces. The example in FIG. 44 (b) shows a fogging image 4430 in the case of shooting in that state.
And when it actually image | photographs, it becomes the picked-up image 4440 as shown in the example of FIG.44 (c). In other words, the original document 4420 is white and uniform, but the document image 4450 obtained by photographing the document 4420 has fog, and the background also has fog.
On the other hand, the photographed image 4460 shown in the example of FIG. 44D has no fog, but the document has a gradation as a design, and the document image 4470 has a gradation similar to the fog. . In this case, no fog occurs on the background of the document image 4470.

準平坦領域抽出モジュール3110は、エッジ強調モジュール3112、2値化モジュール3114、反転モジュール3116、ラベリングモジュール3118を有しており、サンプリング領域選択モジュール3120と接続されている。
サンプリング領域選択モジュール3120は、色解析モジュール3122、識別関数モジュール3124、領域選択モジュール3126を有しており、準平坦領域抽出モジュール3110、かぶり量推定モジュール3530と接続されている。
かぶり量推定モジュール3530は、ライフサンプリングモジュール3532、多モデル大域微分関数推定モジュール3534、局所域定数推定モジュール3536、平面輝度推定モジュール3538を有しており、サンプリング領域選択モジュール3120、かぶり有無処理モジュール4310と接続されている。
The quasi-flat region extraction module 3110 includes an edge enhancement module 3112, a binarization module 3114, an inversion module 3116, and a labeling module 3118, and is connected to the sampling region selection module 3120.
The sampling area selection module 3120 includes a color analysis module 3122, an identification function module 3124, and an area selection module 3126, and is connected to the quasi-flat area extraction module 3110 and the fog amount estimation module 3530.
The fog amount estimation module 3530 includes a life sampling module 3532, a multi-model global differential function estimation module 3534, a local area constant estimation module 3536, and a planar luminance estimation module 3538. A sampling area selection module 3120 and a fogging presence / absence processing module 4310 Connected with.

かぶり有無処理モジュール4310は、原稿領域抽出モジュール4312、かぶり有無判断モジュール4314、制御モジュール4316を有しており、かぶり量推定モジュール3530、輝度かぶり補正モジュール3140と接続されている。かぶり有無処理モジュール4310は、対象としている画像内にかぶりが発生しているか否か(原稿内にグラデーション等があるか否か)を判断して、かぶりの除去処理(かぶり量の推定処理を含めてもよい)を行わせるか否かの制御を行う。
原稿領域抽出モジュール4312は、対象とする画像から撮影されている原稿画像の領域を抽出する。原稿領域抽出モジュール4312が抽出する領域は4角形であってもよい。原稿領域抽出モジュール4312による処理については、図45を用いて後述する。
The fogging presence / absence processing module 4310 includes a document area extraction module 4312, a fogging presence / absence determination module 4314, and a control module 4316, and is connected to a fogging amount estimation module 3530 and a luminance fogging correction module 3140. The fogging presence / absence processing module 4310 determines whether fogging has occurred in the target image (whether there is a gradation or the like in the document), and includes a fog removal process (including a fogging amount estimation process). Control may be performed.
The document area extraction module 4312 extracts a document image area captured from a target image. The area extracted by the document area extraction module 4312 may be a quadrangle. The processing by the document area extraction module 4312 will be described later with reference to FIG.

かぶり有無判断モジュール4314は、原稿領域抽出モジュール4312によって抽出された領域内と領域外の画像を比較することによって、かぶりが発生しているのは、その領域内だけであるか否かを判断する。「領域内と領域外の画像を比較する」とは、領域内の明度の分布と領域外の明度の分布の類似性を算出することである。なお、明度の分布ではなく、彩度の分布であってもよい。また、分布の類似性とは、X座標又はY座標の位置における明度又は彩度の値からなるグラフの形状における類似性をいい、具体的には、予め定められた範囲のX座標又はY座標の位置において、明度又は彩度の差分が予め定められた範囲に収まっている場合は、類似していると判断してもよい。領域内だけにかぶりが発生している場合とは、撮影対象である原稿内にグラデーションとしてのデザインが施されている場合である。つまり、そのグラデーションがかぶりと判断されてしまい、かぶり除去処理が行われ、原稿のデザインが損なわれることを防止する。
また、かぶり有無判断モジュール4314は、領域としての4角形の辺の外側と内側の画像を比較し、その内側の画像は、その4角形の辺から内側に予め定められた距離内にあって、かぶり量推定モジュール3530によってかぶり量が推定された領域を含むようにしてもよい。ここで、「かぶり量が推定された領域」とは、かぶりの補正が必要な領域であり、かぶり量が0より大である領域をいう。4角形の辺から予め定められた距離内に、かぶり量が推定された領域がない場合(その距離内にかぶりが発生していない場合)は、比較対象とならない(図48等の例では「不問」とされている辺)。
The fogging presence / absence determination module 4314 compares the image extracted by the document area extraction module 4312 with the image outside the area, and determines whether or not the fogging has occurred only in that area. . “Comparing images inside and outside the region” means calculating the similarity between the lightness distribution inside the region and the lightness distribution outside the region. Note that the distribution of saturation may be used instead of the distribution of brightness. The distribution similarity refers to the similarity in the shape of the graph composed of the values of lightness or saturation at the position of the X coordinate or the Y coordinate, and specifically, the X coordinate or the Y coordinate in a predetermined range. If the difference in brightness or saturation is within a predetermined range at the position, it may be determined that they are similar. The case where the fog is generated only in the area is a case where a gradation design is applied to the document to be photographed. That is, the gradation is determined to be fogging, and fog removal processing is performed to prevent the original design from being damaged.
Further, the fogging presence / absence determination module 4314 compares the outside and inside images of the quadrangular side as the region, and the inside image is within a predetermined distance from the quadrangular side to the inside. An area in which the fog amount is estimated by the fog amount estimation module 3530 may be included. Here, the “region where the fogging amount is estimated” is a region where the fogging correction is necessary and the fogging amount is larger than zero. When there is no area where the fogging amount is estimated within a predetermined distance from the sides of the quadrangular (when no fogging has occurred within that distance), it is not a comparison target (in the example of FIG. 48, “ Side that is said to be "unquestioned").

制御モジュール4316は、かぶり有無判断モジュール4314によってかぶりが発生しているのは領域内だけであると判断された場合は、かぶり量を除去することをしないように制御する。つまり、輝度かぶり補正モジュール3140による処理を行わせない。それ例外の場合(かぶり有無判断モジュール4314によってかぶりが発生しているのは領域内だけでなく、領域外にも発生していると判断された場合)は、かぶり量を除去するように制御する。つまり、輝度かぶり補正モジュール3140による処理を行わせる。   When the fogging presence / absence judgment module 4314 determines that the fog is generated only in the area, the control module 4316 performs control so as not to remove the fogging amount. That is, the process by the luminance fog correction module 3140 is not performed. In the case of an exception (when it is determined by the fogging presence / absence determination module 4314 that fogging has occurred not only within the area but also outside the area), control is performed to remove the fogging amount. . That is, the processing by the luminance fog correction module 3140 is performed.

輝度かぶり補正モジュール3140は、座標毎補正量計算モジュール3142、輝度補正モジュール3144、彩度補正モジュール3146を有しており、かぶり有無処理モジュール4310と接続されている。   The luminance fog correction module 3140 includes a coordinate-by-coordinate correction amount calculation module 3142, a luminance correction module 3144, and a saturation correction module 3146, and is connected to the fogging presence / absence processing module 4310.

図45は、第9の実施の形態(原稿領域抽出モジュール4312)による処理例を示す説明図である。
原稿領域抽出モジュール4312が行う原稿領域の抽出処理の1例として、「ハフ変換で直線検知をして4角形をなす4頂点のうち最大面積をなすものを検出する」手法を説明する。
図45(a)の例に示す画像は、撮影画像であり、全体にかぶりが発生している。
図45(b)の例に示す画像は、図45(a)の画像をエッジ強調し、2値化した後、白黒を反転した画像である。
図45(c)の例に示す画像は、図45(b)の画像に対してハフ変換処理で予め定められた長さ以上の直線を抽出した結果の画像である。
図45(d)の例に示す画像は、図45(c)の画像内の直線で4角形をなす4頂点のうち最大面積となる4角形の頂点を抽出した結果の画像である。図内の丸印が抽出した4頂点である。
図45(e)の例に示す画像は、図45(d)の画像のように抽出した4頂点からなる領域を示している。
図45(f)の例に示す画像は、図45(a)の画像から図45(e)の領域を抽出した画像である。原稿(名刺)の画像部分だけが抽出されている。
FIG. 45 is an explanatory diagram showing a processing example according to the ninth exemplary embodiment (document area extraction module 4312).
As an example of document area extraction processing performed by the document area extraction module 4312, a technique of “detecting a straight line by Hough transform and detecting the one having the largest area among four vertices forming a quadrilateral” will be described.
The image shown in the example of FIG. 45A is a photographed image, and fogging has occurred throughout.
The image shown in the example of FIG. 45B is an image in which the image of FIG. 45A is edge-enhanced and binarized, and then black and white are reversed.
The image shown in the example of FIG. 45C is an image obtained as a result of extracting a straight line having a predetermined length or more from the image of FIG. 45B by the Hough transform process.
The image shown in the example of FIG. 45D is an image obtained as a result of extracting the vertices of the quadrangle having the maximum area among the four vertices forming a quadrangle with the straight lines in the image of FIG. The circles in the figure are the four vertices extracted.
The image shown in the example of FIG. 45 (e) shows a region composed of four vertices extracted as in the image of FIG. 45 (d).
The image shown in the example of FIG. 45 (f) is an image obtained by extracting the region of FIG. 45 (e) from the image of FIG. 45 (a). Only the image portion of the document (business card) is extracted.

図46、47は、第9の実施の形態による処理例を示す説明図である。図46(a)の例に示す撮影画像4460は、原稿内にグラデーションがある場合であって(原稿画像4470)、かぶりは発生していないときの画像を示している。この場合、背景部との境目で明度値の分布の形状は相違する。具体的には、原稿画像4470内を走査する走査線4612における濃度値の分布は、図46(b)の例に示すグラフ4622のようになり、背景部(原稿外)だけを走査する走査線4614における濃度値の分布は、図46(b)の例に示すグラフ4624のようになる。
図47(a)の例に示す撮影画像4440は、原稿内にグラデーションはない場合であって(原稿画像4450)、かぶりが発生しているときの画像を示している。この場合、背景部との境目では、明度値のズレはあるもののその分布の形状は同形である。具体的には、原稿画像4450内を走査する走査線4712における濃度値の分布は、図47(b)の例に示すグラフ4722のようになり、背景部(原稿外)だけを走査する走査線4714における濃度値の分布は、図47(b)の例に示すグラフ4724のようになる。
46 and 47 are explanatory diagrams illustrating a processing example according to the ninth embodiment. The photographed image 4460 shown in the example of FIG. 46A shows an image when there is gradation in the document (original image 4470) and no fogging has occurred. In this case, the shape of the brightness value distribution is different at the boundary with the background portion. Specifically, the distribution of density values in the scanning line 4612 that scans the inside of the document image 4470 is as shown by a graph 4622 shown in the example of FIG. The distribution of density values in 4614 is as shown by a graph 4624 in the example of FIG.
A photographed image 4440 shown in the example of FIG. 47A shows an image when there is no gradation in the document (original image 4450) and fogging occurs. In this case, at the boundary with the background portion, although the brightness value is shifted, the shape of the distribution is the same. Specifically, the distribution of density values in the scanning line 4712 that scans within the document image 4450 is as shown by a graph 4722 in the example of FIG. The distribution of density values in 4714 is like a graph 4724 shown in the example of FIG.

かぶり有無判断モジュール4314が行う処理例について説明する。
前提として、カメラ等を用いて机(オフィス机等)等に原稿を設置して撮影する。なお、背景となる机等は、濃度の均一なものが望ましい。
(1) 原稿内部の明度分布を測定する。既存の手法を利用すればよい。
(2) かぶりを除去すべき領域(つまり、かぶり量が特定された領域)を特定する。その特定には、前述の実施の形態による手法を利用すればよい。
(3) (2)においてかぶり量が特定された領域を通る走査線A上の濃度値を取得する。この走査線Aが通る領域は、原稿領域抽出モジュール4312によって抽出された4角形の辺から内側に予め定められた距離内にあって、かぶり量推定モジュール3530によってかぶり量が推定された領域を含む。図48(a)の例に示す走査線4612がある。走査線Aと隣接する4角形の辺の外側を通る走査線B上の濃度値を取得する。図48(a)の例に示す走査線4614がある。そして、濃度分布の形状を比較する。例えば、互いの走査線上の各位置における各濃度値の差が予め定められた範囲内にある場合は、濃度分布の形状は類似している(全体にかぶりが発生している)と判断する。互いの走査線上の各位置における各濃度値の差が予め定められた範囲内にない場合は、濃度分布の形状は類似していない(原稿内にはかぶりと類似しているデザインが施されている)と判断する。
また、分布の類似性の評価は、例えば、原稿内部と外部の走査線上の分布関数f,gの定数項のズレを補正した差分関数のノルムの値の大きさを利用するようにしてもよい。

Figure 0006003574
なお、c(f,g)は、関数f、gの定数項のズレ量である。例えば、第8の実施の形態の領域毎の定数成分の推定量同士の差分を採用すればよい。 An example of processing performed by the fogging presence / absence determination module 4314 will be described.
As a premise, a manuscript is placed on a desk (office desk or the like) using a camera or the like and photographed. It is desirable that the background desk or the like has a uniform density.
(1) Measure the brightness distribution inside the document. Existing methods may be used.
(2) The area where the fog is to be removed (that is, the area where the fog amount is specified) is specified. For the identification, the method according to the above-described embodiment may be used.
(3) The density value on the scanning line A that passes through the area where the fogging amount is specified in (2) is acquired. The region through which the scanning line A passes is a region that is within a predetermined distance from the side of the quadrilateral extracted by the document region extraction module 4312 and includes the region in which the fog amount is estimated by the fog amount estimation module 3530. . There is a scanning line 4612 shown in the example of FIG. The density value on the scanning line B passing outside the quadrangular side adjacent to the scanning line A is acquired. There is a scanning line 4614 shown in the example of FIG. Then, the shape of the density distribution is compared. For example, when the difference between the density values at the respective positions on the scanning lines is within a predetermined range, it is determined that the shapes of the density distributions are similar (overall fog occurs). If the difference between the density values at each position on the scanning line is not within a predetermined range, the shape of the density distribution is not similar (a design similar to fogging is applied in the document). Judgment)
For example, the similarity of distributions may be evaluated by using the norm value of the difference function obtained by correcting the deviation of the constant terms of the distribution functions f and g on the scanning lines inside and outside the document. .
Figure 0006003574
Note that c (f, g) is a deviation amount of the constant terms of the functions f and g. For example, what is necessary is just to employ | adopt the difference of the estimation amount of the constant component for every area | region of 8th Embodiment.

図48、49を用いて、第9の実施の形態(かぶり有無判断モジュール4314)による処理例を説明する。図48の例は図46の例と同等であり(原稿内にかぶりと類似のデザインがある場合)、図49の例は図47の例と同等である(かぶりが発生している場合)。
図48(a)の例では、太線で囲まれた領域4850が原稿画像4470内の補正候補領域(原稿領域抽出モジュール4312が抽出した4角形内のかぶり量が特定された領域)である。
領域外比較対象線分4812、4816、4818が濃度分布形状の一致性確認対象であり、領域外比較対象線分4814がドントケア辺である。領域外比較対象線分4812、4816、4818は、原稿領域抽出モジュール4312によって抽出された4角形である原稿画像4470の辺から、内側に予め定められた距離内に領域4850があり、領域外比較対象線分4814は、予め定められた距離内に領域4850がないからである。
そして、領域外比較対象線分4812、4816、4818を通る走査線と、その走査線と平行であって、領域4850を通る走査線における濃度値を抽出する。
ここでは、ドントケア辺以外の領域外比較対象線分4812、4816、4818では、濃度値の形状は、全て不一致である。つまり、背景の推定結果は傾き無し(かぶりが発生していない)の平面である。なお、ドントケア辺である領域外比較対象線分4814は一致しているが、この辺は対象としない。したがって、この撮影画像4460には、かぶり除去の処理を行わない(実質何もしない)。
一方、図49(a)の例では、太線で囲まれた領域4950が原稿画像4450内の補正候補領域(原稿領域抽出モジュール4312が抽出した4角形内のかぶり量が特定された領域)である。
領域外比較対象線分4912、4916、4918が濃度分布形状の一致性確認対象であり、領域外比較対象線分4914がドントケア辺である。図48(a)の例と同等である。
そして、領域外比較対象線分4912、4916、4918を通る走査線と、その走査線と平行であって、領域4950を通る走査線における濃度値を抽出する。
ここでは、ドントケア辺以外の領域外比較対象線分4912、4916、4918では、濃度値の形状は、全て一致である。つまり、背景の推定結果は傾きあり(かぶりが発生している)の平面である。なお、ドントケア辺である領域外比較対象線分4914も一致しているが、この辺は対象としない。したがって、この撮影画像4440には、かぶり除去の処理を行う。この場合、領域4950内(つまり、背景を含まず原稿画像4450内でかぶり量が特定された領域内)のかぶり量を用いて、撮影画像4440のかぶり量を除去してもよい。
A processing example according to the ninth embodiment (a fogging presence / absence determination module 4314) will be described with reference to FIGS. The example of FIG. 48 is equivalent to the example of FIG. 46 (when there is a design similar to the fog in the document), and the example of FIG. 49 is equivalent to the example of FIG. 47 (when the fog occurs).
In the example of FIG. 48A, a region 4850 surrounded by a thick line is a correction candidate region in the document image 4470 (a region in which the fogging amount in the quadrilateral extracted by the document region extraction module 4312 is specified).
Out-of-region comparison target line segments 4812, 4816, and 4818 are density distribution shape match confirmation targets, and an out-of-region comparison target line segment 4814 is a don't care side. The out-of-region comparison target line segments 4812, 4816, and 4818 have a region 4850 within a predetermined distance on the inner side from the side of the quadrangular original image 4470 extracted by the original region extraction module 4312. This is because the target line segment 4814 has no area 4850 within a predetermined distance.
Then, the scanning line passing through the out-of-region comparison target line segments 4812, 4816 and 4818 and the density value in the scanning line parallel to the scanning line and passing through the region 4850 are extracted.
Here, in the out-of-region comparison target line segments 4812, 4816, and 4818 other than the don't care side, the shape of the density value is all inconsistent. In other words, the background estimation result is a flat surface with no inclination (no fogging). The out-of-region comparison target line segment 4814 that is a don't care side matches, but this side is not the target. Accordingly, the photographed image 4460 is not subjected to the fog removal process (substantially nothing).
On the other hand, in the example of FIG. 49A, a region 4950 surrounded by a thick line is a correction candidate region in the document image 4450 (a region in which the fogging amount in the rectangle extracted by the document region extraction module 4312 is specified). .
Out-of-region comparison target line segments 4912, 4916, and 4918 are density distribution shape matching confirmation targets, and an out-of-region comparison target line segment 4914 is a don't care side. This is equivalent to the example of FIG.
Then, the scanning line passing through the out-of-region comparison target line segments 4912, 4916, and 4918 and the density value in the scanning line that is parallel to the scanning line and passes through the region 4950 are extracted.
Here, the shape of the density value is the same in the non-region comparison line segments 4912, 4916, and 4918 other than the don't care side. That is, the estimation result of the background is a plane with inclination (where fogging occurs). The non-region comparison target line segment 4914 that is a don't care side also matches, but this side is not the target. Therefore, the photographed image 4440 is subjected to fog removal processing. In this case, the fogging amount of the captured image 4440 may be removed using the fogging amount in the region 4950 (that is, the region in which the fogging amount is specified in the document image 4450 without including the background).

なお、ドントケア辺以外で一致、不一致の両方がある場合は、一致が1つでもあれば一致(かぶりが発生)であると判断してもよい。図50の例を用いて説明する。
例えば、机上に置いた名刺や紙文書を携帯カメラで撮影したときに、手とカメラ本体によって領域5060のようなかぶりが部分的に発生したとする。この場合は、辺5012、5014、5018は、ドントケア辺となるが、辺5016で濃度の形状が一致となる。つまり、背景の推定結果は傾きあり(かぶりが発生している)の平面である。したがって、この撮影画像5040には、かぶり除去の処理を行う。
In addition, when there is both a match and a disagreement other than in the don't care area, it may be determined that there is a match (the occurrence of fogging) if there is only one match. This will be described with reference to the example of FIG.
For example, it is assumed that when a business card or paper document placed on a desk is photographed with a portable camera, a cover such as an area 5060 is partially generated by the hand and the camera body. In this case, the sides 5012, 5014, and 5018 are don't care sides, but the sides 5016 have the same density shape. That is, the estimation result of the background is a plane with inclination (where fogging occurs). Therefore, the photographed image 5040 is subjected to fog removal processing.

図54を参照して、前述の実施の形態の画像処理装置のハードウェア構成例について説明する。図54に示す構成は、例えばパーソナルコンピュータ(PC)などによって構成されるものであり、スキャナ等のデータ読み取り部5417と、プリンタなどのデータ出力部5418を備えたハードウェア構成例を示している。   With reference to FIG. 54, a hardware configuration example of the image processing apparatus according to the above-described embodiment will be described. The configuration shown in FIG. 54 is configured by a personal computer (PC), for example, and shows a hardware configuration example including a data reading unit 5417 such as a scanner and a data output unit 5418 such as a printer.

CPU(Central Processing Unit)5401は、前述の実施の形態において説明した各種のモジュール、すなわち、かぶり量推定モジュール120、画素値測定モジュール130、補正目標値決定モジュール140、彩度補正可否判断モジュール145、彩度補正モジュール150、輝度補正モジュール950、補正可否判断モジュール1445、非エッジ領域抽出モジュール1620、検査領域選択モジュール1630、画素値測定モジュール1640、画素値分布推定モジュール1650、ソーベルフィルターモジュール1910、2値化モジュール1920、白黒反転モジュール1930、ラベリングモジュール1940、小サイズ除去モジュール1950、準平坦領域抽出モジュール3110、エッジ強調モジュール3112、2値化モジュール3114、反転モジュール3116、ラベリングモジュール3118、サンプリング領域選択モジュール3120、色解析モジュール3122、識別関数モジュール3124、領域選択モジュール3126、かぶり量推定モジュール3130、ラインサンプリングモジュール3132、多モデル関数推定モジュール3134、平面輝度推定モジュール3136、輝度かぶり補正モジュール3140、座標毎補正量計算モジュール3142、輝度補正モジュール3144、彩度補正モジュール3146、かぶり量推定モジュール3530、ライフサンプリングモジュール3532、多モデル大域微分関数推定モジュール3534、局所域定数推定モジュール3536、平面輝度推定モジュール3538、かぶり有無処理モジュール4310、原稿領域抽出モジュール4312、かぶり有無判断モジュール4314、制御モジュール4316等の各モジュールの実行シーケンスを記述したコンピュータ・プログラムにしたがった処理を実行する制御部である。   The CPU (Central Processing Unit) 5401 includes various modules described in the above-described embodiments, that is, the fog estimation module 120, the pixel value measurement module 130, the correction target value determination module 140, the saturation correction availability determination module 145, Saturation correction module 150, luminance correction module 950, correction availability determination module 1445, non-edge area extraction module 1620, inspection area selection module 1630, pixel value measurement module 1640, pixel value distribution estimation module 1650, Sobel filter module 1910, 2 Value conversion module 1920, monochrome inversion module 1930, labeling module 1940, small size removal module 1950, quasi-flat area extraction module 3110, edge enhancement module Module 3112, binarization module 3114, inversion module 3116, labeling module 3118, sampling area selection module 3120, color analysis module 3122, discrimination function module 3124, area selection module 3126, fogging amount estimation module 3130, line sampling module 3132, multi Model function estimation module 3134, plane luminance estimation module 3136, luminance fog correction module 3140, coordinate-by-coordinate correction amount calculation module 3142, luminance correction module 3144, saturation correction module 3146, fog amount estimation module 3530, life sampling module 3532, multi-model Global differential function estimation module 3534, local domain constant estimation module 3536, planar luminance estimation module 3538, or Ri determination processing module 4310, the original region extraction module 4312, head state determining module 4314, a control unit for executing processing in accordance with the computer program describing the execution sequence of the modules such as the control module 4316.

ROM(Read Only Memory)5402は、CPU5401が使用するプログラムや演算パラメタ等を格納する。RAM(Random Access Memory)5403は、CPU5401の実行において使用するプログラムや、その実行において適宜変化するパラメタ等を格納する。これらはCPUバスなどから構成されるホストバス5404により相互に接続されている。   A ROM (Read Only Memory) 5402 stores programs used by the CPU 5401, operation parameters, and the like. A RAM (Random Access Memory) 5403 stores programs used in the execution of the CPU 5401, parameters that change as appropriate in the execution, and the like. These are connected to each other by a host bus 5404 including a CPU bus.

ホストバス5404は、ブリッジ5405を介して、PCI(Peripheral Component Interconnect/Interface)バスなどの外部バス5406に接続されている。   The host bus 5404 is connected to an external bus 5406 such as a PCI (Peripheral Component Interconnect / Interface) bus via a bridge 5405.

キーボード5408、マウス等のポインティングデバイス5409は、操作者により操作される入力デバイスである。ディスプレイ5410は、液晶表示装置又はCRT(Cathode Ray Tube)などがあり、各種情報をテキストやイメージ情報として表示する。   A keyboard 5408 and a pointing device 5409 such as a mouse are input devices operated by an operator. The display 5410 includes a liquid crystal display device or a CRT (Cathode Ray Tube), and displays various types of information as text or image information.

HDD(Hard Disk Drive)5411は、ハードディスクを内蔵し、ハードディスクを駆動し、CPU5401によって実行するプログラムや情報を記録又は再生させる。ハードディスクには、受け付けた画像、推定したかぶり量、測定した画素値(輝度値と彩度値)、決定した補正目標値、抽出した領域の画像、推定した関数などが格納される。さらに、その他の各種のデータ処理プログラム等、各種コンピュータ・プログラムが格納される。   An HDD (Hard Disk Drive) 5411 has a built-in hard disk, drives the hard disk, and records or reproduces a program executed by the CPU 5401 and information. The hard disk stores the received image, the estimated fog amount, the measured pixel value (luminance value and saturation value), the determined correction target value, the image of the extracted area, the estimated function, and the like. Further, various computer programs such as various other data processing programs are stored.

ドライブ5412は、装着されている磁気ディスク、光ディスク、光磁気ディスク、又は半導体メモリ等のリムーバブル記録媒体5413に記録されているデータ又はプログラムを読み出して、そのデータ又はプログラムを、インタフェース5407、外部バス5406、ブリッジ5405、及びホストバス5404を介して接続されているRAM5403に供給する。リムーバブル記録媒体5413も、ハードディスクと同様のデータ記録領域として利用可能である。   The drive 5412 reads out data or a program recorded on a removable recording medium 5413 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, and reads the data or program into an interface 5407 and an external bus 5406. , The bridge 5405, and the RAM 5403 connected via the host bus 5404. The removable recording medium 5413 can also be used as a data recording area similar to the hard disk.

接続ポート5414は、外部接続機器5415を接続するポートであり、USB、IEEE1394等の接続部を持つ。接続ポート5414は、インタフェース5407、及び外部バス5406、ブリッジ5405、ホストバス5404等を介してCPU5401等に接続されている。通信部5416は、ネットワークに接続され、外部とのデータ通信処理を実行する。データ読み取り部5417は、例えばスキャナであり、ドキュメントの読み取り処理を実行する。データ出力部5418は、例えばプリンタであり、ドキュメントデータの出力処理を実行する。   The connection port 5414 is a port for connecting the external connection device 5415 and has a connection unit such as USB, IEEE1394. The connection port 5414 is connected to the CPU 5401 and the like via the interface 5407, the external bus 5406, the bridge 5405, the host bus 5404, and the like. A communication unit 5416 is connected to the network and executes data communication processing with the outside. The data reading unit 5417 is a scanner, for example, and executes document reading processing. The data output unit 5418 is a printer, for example, and executes document data output processing.

なお、図54に示す画像処理装置のハードウェア構成は、1つの構成例を示すものであり、本実施の形態は、図54に示す構成に限らず、本実施の形態において説明したモジュールを実行可能な構成であればよい。例えば、一部のモジュールを専用のハードウェア(例えば特定用途向け集積回路(Application Specific Integrated Circuit:ASIC)等)で構成してもよく、一部のモジュールは外部のシステム内にあり通信回線で接続しているような形態でもよく、さらに図54に示すシステムが複数互いに通信回線によって接続されていて互いに協調動作するようにしてもよい。また、複写機、ファックス、スキャナ、プリンタ、複合機(スキャナ、プリンタ、複写機、ファックス等のいずれか2つ以上の機能を有している画像処理装置)などに組み込まれていてもよい。   Note that the hardware configuration of the image processing apparatus shown in FIG. 54 shows one configuration example, and the present embodiment is not limited to the configuration shown in FIG. 54, and the modules described in the present embodiment are executed. Any configuration is possible. For example, some modules may be configured with dedicated hardware (for example, Application Specific Integrated Circuit (ASIC), etc.), and some modules are in an external system and connected via a communication line In addition, a plurality of systems shown in FIG. 54 may be connected to each other through communication lines so as to cooperate with each other. Further, it may be incorporated in a copying machine, a fax machine, a scanner, a printer, a multifunction machine (an image processing apparatus having any two or more functions of a scanner, a printer, a copying machine, a fax machine, etc.).

なお、前述の各種の実施の形態を組み合わせてもよく(例えば、ある実施の形態内のモジュールを他の実施の形態内に追加する、入れ替えをする等も含む)、また、各モジュールの処理内容として背景技術で説明した技術を採用してもよい。   Note that the above-described various embodiments may be combined (for example, adding or replacing a module in one embodiment in another embodiment), and processing contents of each module The technique described in the background art may be employed.

なお、説明したプログラムについては、記録媒体に格納して提供してもよく、また、そのプログラムを通信手段によって提供してもよい。その場合、例えば、前記説明したプログラムについて、「プログラムを記録したコンピュータ読み取り可能な記録媒体」の発明として捉えてもよい。
「プログラムを記録したコンピュータ読み取り可能な記録媒体」とは、プログラムのインストール、実行、プログラムの流通などのために用いられる、プログラムが記録されたコンピュータで読み取り可能な記録媒体をいう。
なお、記録媒体としては、例えば、デジタル・バーサタイル・ディスク(DVD)であって、DVDフォーラムで策定された規格である「DVD−R、DVD−RW、DVD−RAM等」、DVD+RWで策定された規格である「DVD+R、DVD+RW等」、コンパクトディスク(CD)であって、読出し専用メモリ(CD−ROM)、CDレコーダブル(CD−R)、CDリライタブル(CD−RW)等、ブルーレイ・ディスク(Blu−ray Disc(登録商標))、光磁気ディスク(MO)、フレキシブルディスク(FD)、磁気テープ、ハードディスク、読出し専用メモリ(ROM)、電気的消去及び書換可能な読出し専用メモリ(EEPROM(登録商標))、フラッシュ・メモリ、ランダム・アクセス・メモリ(RAM)等が含まれる。
そして、前記のプログラム又はその一部は、前記記録媒体に記録して保存や流通等させてもよい。また、通信によって、例えば、ローカル・エリア・ネットワーク(LAN)、メトロポリタン・エリア・ネットワーク(MAN)、ワイド・エリア・ネットワーク(WAN)、インターネット、イントラネット、エクストラネット等に用いられる有線ネットワーク、あるいは無線通信ネットワーク、さらにこれらの組み合わせ等の伝送媒体を用いて伝送させてもよく、また、搬送波に乗せて搬送させてもよい。
さらに、前記のプログラムは、他のプログラムの一部分であってもよく、あるいは別個のプログラムと共に記録媒体に記録されていてもよい。また、複数の記録媒体に分割して
記録されていてもよい。また、圧縮や暗号化など、復元可能であればどのような態様で記録されていてもよい。
The program described above may be provided by being stored in a recording medium, or the program may be provided by communication means. In that case, for example, the above-described program may be regarded as an invention of a “computer-readable recording medium recording the program”.
The “computer-readable recording medium on which a program is recorded” refers to a computer-readable recording medium on which a program is recorded, which is used for program installation, execution, program distribution, and the like.
The recording medium is, for example, a digital versatile disc (DVD), which is a standard established by the DVD Forum, such as “DVD-R, DVD-RW, DVD-RAM,” and DVD + RW. Standard “DVD + R, DVD + RW, etc.”, compact disc (CD), read-only memory (CD-ROM), CD recordable (CD-R), CD rewritable (CD-RW), Blu-ray disc ( Blu-ray Disc (registered trademark), magneto-optical disk (MO), flexible disk (FD), magnetic tape, hard disk, read-only memory (ROM), electrically erasable and rewritable read-only memory (EEPROM (registered trademark)) )), Flash memory, Random access memory (RAM) Etc. are included.
The program or a part of the program may be recorded on the recording medium for storage or distribution. Also, by communication, for example, a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a wired network used for the Internet, an intranet, an extranet, etc., or wireless communication It may be transmitted using a transmission medium such as a network or a combination of these, or may be carried on a carrier wave.
Furthermore, the program may be a part of another program, or may be recorded on a recording medium together with a separate program. Moreover, it may be divided and recorded on a plurality of recording media. Further, it may be recorded in any manner as long as it can be restored, such as compression or encryption.

前述の実施の形態は、以下のように捉えることもできる。
[A1]
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像から領域を抽出する抽出手段と、
前記抽出手段によって抽出された領域を予め定めた規則に基づいて選択する選択手段と、
前記選択手段によって選択された領域内の画素の輝度値を測定する測定手段と、
前記測定手段によって測定された画素値から、前記受付手段によって受け付けられた画像におけるかぶりの度合いを示す関数を推定する推定手段と、
前記推定手段によって推定された関数に基づいて、前記受付手段によって受け付けられた画像からかぶりを除去する除去手段
を具備することを特徴とする画像処理装置。
[A2]
前記抽出手段は、予め定めた大きさ以上又はより大きい領域を抽出し、該領域を抽出できなかった場合は、前記選択手段以降の処理を行わない
ことを特徴とする[A1]に記載の画像処理装置。
[A3]
前記選択手段における予め定めた規則は、前記抽出手段によって抽出された領域の大きさによって定められている
ことを特徴とする[A1]又は[A2]に記載の画像処理装置。
[A4]
前記選択手段は、予め定めた規則として、さらに前記抽出手段によって抽出された領域の輝度又は彩度によって定められている
ことを特徴とする[A3]に記載の画像処理装置。
[A5]
前記選択手段は、予め定めた規則として、さらに前記抽出手段によって抽出された領域の彩度の分散値、前記画像における位置、外周の大きさのいずれか一つ以上によって定められている
ことを特徴とする[A3]又は[A4]に記載の画像処理装置。
[A6]
前記測定手段は、画素値を測定する走査方向として水平方向、垂直方向、斜め方向、楕円状のいずれか一つ以上である
ことを特徴とする[A1]から[A5]のいずれか一項に記載の画像処理装置。
[A7]
前記推定手段は、前記選択手段によって選択された領域内の画素の輝度値を通る関数を推定する
ことを特徴とする[A1]から[A6]のいずれか一項に記載の画像処理装置。
[A8]
前記除去手段は、前記測定手段による走査方向が複数方向あり、該走査方向が交差する位置におけるかぶりの値は、該走査に対して前記推定手段によって推定された複数の関数によって求められた値に基づいて算出する
ことを特徴とする[A7]に記載の画像処理装置。
[A9]
コンピュータを、
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像から領域を抽出する抽出手段と、
前記抽出手段によって抽出された領域を予め定めた規則に基づいて選択する選択手段と、
前記選択手段によって選択された領域内の画素の輝度値を測定する測定手段と、
前記測定手段によって測定された画素値から、前記受付手段によって受け付けられた画像におけるかぶりの度合いを示す関数を推定する推定手段と、
前記推定手段によって推定された関数に基づいて、前記受付手段によって受け付けられた画像からかぶりを除去する除去手段
として機能させるための画像処理プログラム。
The above-described embodiment can also be understood as follows.
[A1]
Receiving means for receiving images;
Extracting means for extracting a region from the image received by the receiving means;
Selecting means for selecting the region extracted by the extracting means based on a predetermined rule;
Measuring means for measuring the luminance value of the pixels in the area selected by the selecting means;
Estimating means for estimating a function indicating the degree of fogging in the image received by the receiving means from the pixel value measured by the measuring means;
An image processing apparatus comprising: a removing unit that removes the fog from the image received by the receiving unit based on the function estimated by the estimating unit.
[A2]
The image according to [A1], wherein the extraction unit extracts an area larger than or larger than a predetermined size, and if the area cannot be extracted, the processing after the selection unit is not performed. Processing equipment.
[A3]
The image processing apparatus according to [A1] or [A2], wherein the predetermined rule in the selection unit is determined by a size of an area extracted by the extraction unit.
[A4]
The image processing apparatus according to [A3], wherein the selection unit is further determined as a predetermined rule by brightness or saturation of a region extracted by the extraction unit.
[A5]
The selection means is further defined as a predetermined rule by one or more of a variance value of saturation of the region extracted by the extraction means, a position in the image, and a size of the outer periphery. The image processing apparatus according to [A3] or [A4].
[A6]
The measurement means has at least one of a horizontal direction, a vertical direction, an oblique direction, and an elliptical shape as a scanning direction for measuring a pixel value. Any one of [A1] to [A5] The image processing apparatus described.
[A7]
The image processing apparatus according to any one of [A1] to [A6], wherein the estimation unit estimates a function that passes through a luminance value of a pixel in the region selected by the selection unit.
[A8]
The removing means has a plurality of scanning directions by the measuring means, and a fog value at a position where the scanning directions intersect is a value obtained by a plurality of functions estimated by the estimating means for the scanning. The image processing device according to [A7], wherein the image processing device is calculated on the basis of [A7].
[A9]
Computer
Receiving means for receiving images;
Extracting means for extracting a region from the image received by the receiving means;
Selecting means for selecting the region extracted by the extracting means based on a predetermined rule;
Measuring means for measuring the luminance value of the pixels in the area selected by the selecting means;
Estimating means for estimating a function indicating the degree of fogging in the image received by the receiving means from the pixel value measured by the measuring means;
An image processing program for functioning as a removing unit for removing fog from an image received by the receiving unit based on the function estimated by the estimating unit.

[B1]
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、
前記受付手段によって受け付けられた画像内の画素の輝度値を測定する測定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する補正手段
を具備することを特徴とする画像処理装置。
[B2]
前記補正手段は、前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値との差分を基本補正量とし、該基本補正量を前記測定手段によって測定された輝度値と該かぶり量との差分に基づいた係数によって変更し、該変更した基本補正量に基づいて、該輝度値を補正する
ことを特徴とする[B1]に記載の画像処理装置。
[B3]
前記補正手段は、前記測定手段によって測定された輝度値と前記かぶり量との差分が大きくなると、前記基本補正量を小さくするような係数とする
ことを特徴とする[B2]に記載の画像処理装置。
[B4]
前記補正手段は、前記測定手段によって測定された輝度値と前記かぶり量との差分が予め定めた閾値以上又は大きい場合は、該輝度値の補正を行わない
ことを特徴とする[B2]又は[B3]に記載の画像処理装置。
[B5]
前記補正手段は、前記基本補正量を前記測定手段によって測定された輝度値と前記かぶり量との差分と前記基本補正量に基づいた係数によって変更する
ことを特徴とする[B2]から[B4]のいずれか一項に記載の画像処理装置。
[B6]
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値との差分に基づいて、前記補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[B1]から[B5]のいずれか一項に記載の画像処理装置。
[B7]
前記受付手段によって受け付けられた画像内の各画素における前記推定手段によって推定されたかぶり量同士の差分に基づいて、前記補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[B1]から[B5]のいずれか一項に記載の画像処理装置。
[B8]
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像から領域を抽出する抽出手段と、
前記抽出手段によって抽出された領域を予め定めた規則に基づいて選択する選択手段と、
前記選択手段によって選択された領域内の画素の輝度値を測定する測定手段と、
前記測定手段によって測定された画素値から、前記受付手段によって受け付けられた画像におけるかぶりの度合いを示す関数を推定する推定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する補正手段
を具備することを特徴とする画像処理装置。
[B9]
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値との差分に基づいて、前記補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[B8]に記載の画像処理装置。
[B10]
前記推定手段によって推定された関数に基づいてかぶり量を算出し、前記受付手段によって受け付けられた画像内の各画素における該かぶり量同士の差分に基づいて、前記補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[B8]に記載の画像処理装置。
[B11]
コンピュータを、
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、
前記受付手段によって受け付けられた画像内の画素の輝度値を測定する測定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する補正手段
として機能させるための画像処理プログラム。
[B12]
コンピュータを、
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像から領域を抽出する抽出手段と、
前記抽出手段によって抽出された領域を予め定めた規則に基づいて選択する選択手段と、
前記選択手段によって選択された領域内の画素の輝度値を測定する測定手段と、
前記測定手段によって測定された画素値から、前記受付手段によって受け付けられた画像におけるかぶりの度合いを示す関数を推定する推定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する補正手段
として機能させるための画像処理プログラム。
[B1]
Receiving means for receiving images;
Estimating means for estimating a fog amount that is a difference between a luminance value of an original pixel and a luminance value of a pixel of the image based on the image received by the receiving means;
Measuring means for measuring a luminance value of a pixel in the image received by the receiving means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
An image processing apparatus comprising: a correction unit that corrects the brightness value measured by the measurement unit based on the fog amount estimated by the estimation unit and the correction target value determined by the determination unit.
[B2]
The correction means uses a difference between the fog amount estimated by the estimation means and the correction target value determined by the determination means as a basic correction amount, and uses the basic correction amount as a luminance value measured by the measurement means and the fogging The image processing apparatus according to [B1], wherein the brightness value is corrected based on the changed basic correction amount by changing a coefficient based on a difference from the amount.
[B3]
The image processing according to [B2], wherein the correction unit uses a coefficient that decreases the basic correction amount when a difference between the luminance value measured by the measurement unit and the fogging amount increases. apparatus.
[B4]
The correction means does not correct the brightness value when the difference between the brightness value measured by the measurement means and the fogging amount is greater than or equal to a predetermined threshold value [B2] or [ B3].
[B5]
The correction means changes the basic correction amount according to a difference between a luminance value measured by the measurement means and the fogging amount and a coefficient based on the basic correction amount. [B2] to [B4] The image processing apparatus according to any one of the above.
[B6]
A judgment means for judging whether to perform correction by the correction means based on a difference between the fogging amount estimated by the estimation means and the correction target value determined by the determination means;
The image processing apparatus according to any one of [B1] to [B5], wherein the correction unit performs correction when the determination unit determines that correction is performed.
[B7]
A judgment means for judging whether to perform correction by the correction means based on a difference between the fog amounts estimated by the estimation means in each pixel in the image received by the reception means;
The image processing apparatus according to any one of [B1] to [B5], wherein the correction unit performs correction when the determination unit determines that correction is performed.
[B8]
Receiving means for receiving images;
Extracting means for extracting a region from the image received by the receiving means;
Selecting means for selecting the region extracted by the extracting means based on a predetermined rule;
Measuring means for measuring the luminance value of the pixels in the area selected by the selecting means;
Estimating means for estimating a function indicating the degree of fogging in the image received by the receiving means from the pixel value measured by the measuring means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
A correction unit that calculates the fog amount based on the function estimated by the estimation unit, and corrects the luminance value measured by the measurement unit based on the fog amount and the correction target value determined by the determination unit. An image processing apparatus comprising:
[B9]
A fog amount is calculated based on the function estimated by the estimating means, and it is determined whether or not to perform correction by the correcting means based on a difference between the fog amount and a correction target value determined by the determining means. A judgment means for
The image processing apparatus according to [B8], wherein the correction unit performs correction when it is determined by the determination unit that correction is performed.
[B10]
Whether to calculate the fog amount based on the function estimated by the estimation unit, and to perform correction by the correction unit based on the difference between the fog amounts at each pixel in the image received by the reception unit Further comprising a judging means for judging
The image processing apparatus according to [B8], wherein the correction unit performs correction when it is determined by the determination unit that correction is performed.
[B11]
Computer
Receiving means for receiving images;
Estimating means for estimating a fog amount that is a difference between a luminance value of an original pixel and a luminance value of a pixel of the image based on the image received by the receiving means;
Measuring means for measuring a luminance value of a pixel in the image received by the receiving means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
An image processing program for functioning as a correction unit that corrects the luminance value measured by the measurement unit based on the fog amount estimated by the estimation unit and the correction target value determined by the determination unit.
[B12]
Computer
Receiving means for receiving images;
Extracting means for extracting a region from the image received by the receiving means;
Selecting means for selecting the region extracted by the extracting means based on a predetermined rule;
Measuring means for measuring the luminance value of the pixels in the area selected by the selecting means;
Estimating means for estimating a function indicating the degree of fogging in the image received by the receiving means from the pixel value measured by the measuring means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
A correction unit that calculates the fog amount based on the function estimated by the estimation unit, and corrects the luminance value measured by the measurement unit based on the fog amount and the correction target value determined by the determination unit. Image processing program to make it function.

[C1]
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、
前記受付手段によって受け付けられた画像内の画素の彩度値を測定する測定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する補正手段
を具備することを特徴とする画像処理装置。
[C2]
前記補正手段は、前記測定手段によって測定された彩度値が無彩色に近くなるほど、彩度値の補正量を少なくするように補正する
ことを特徴とする[C1]に記載の画像処理装置。
[C3]
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値との差分に基づいて、前記補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[C1]又は[C2]に記載の画像処理装置。
[C4]
前記受付手段によって受け付けられた画像内の各画素における前記推定手段によって推定されたかぶり量同士の差分に基づいて、前記補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[C1]又は[C2]に記載の画像処理装置。
[C5]
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、
前記受付手段によって受け付けられた画像内の画素の輝度値と彩度値を測定する測定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段
を具備することを特徴とする画像処理装置。
[C6]
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値との差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[C5]に記載の画像処理装置。
[C7]
前記受付手段によって受け付けられた画像内の各画素における前記推定手段によって推定されたかぶり量同士の差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[C5]に記載の画像処理装置。
[C8]
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像から領域を抽出する抽出手段と、
前記抽出手段によって抽出された領域を予め定めた規則に基づいて選択する選択手段と、
前記選択手段によって選択された領域内の画素の輝度値と彩度値を測定する測定手段と、
前記測定手段によって測定された輝度値から、前記受付手段によって受け付けられた画像におけるかぶりの度合いを示す関数を推定する推定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段
を具備することを特徴とする画像処理装置。
[C9]
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値との差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[C8]に記載の画像処理装置。
[C10]
前記推定手段によって推定された関数に基づいてかぶり量を算出し、前記受付手段によって受け付けられた画像内の各画素における該かぶり量同士の差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[C8]に記載の画像処理装置。
[C11]
コンピュータを、
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、
前記受付手段によって受け付けられた画像内の画素の彩度値を測定する測定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する補正手段
として機能させるための画像処理プログラム。
[C12]
コンピュータを、
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、
前記受付手段によって受け付けられた画像内の画素の輝度値と彩度値を測定する測定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段
として機能させるための画像処理プログラム。
[C13]
コンピュータを、
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像から領域を抽出する抽出手段と、
前記抽出手段によって抽出された領域を予め定めた規則に基づいて選択する選択手段と、
前記選択手段によって選択された領域内の画素の輝度値と彩度値を測定する測定手段と、
前記測定手段によって測定された輝度値から、前記受付手段によって受け付けられた画像におけるかぶりの度合いを示す関数を推定する推定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段
として機能させるための画像処理プログラム。
[C1]
Receiving means for receiving images;
Estimating means for estimating a fog amount that is a difference between a luminance value of an original pixel and a luminance value of a pixel of the image based on the image received by the receiving means;
Measuring means for measuring a saturation value of a pixel in the image received by the receiving means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
Correction means for correcting the saturation value based on the fog amount estimated by the estimation means, the correction target value determined by the determination means, and the distance from the achromatic color of the saturation value measured by the measurement means; An image processing apparatus comprising:
[C2]
The image processing apparatus according to [C1], wherein the correction unit corrects the saturation value to be reduced as the saturation value measured by the measurement unit becomes closer to an achromatic color.
[C3]
A judgment means for judging whether to perform correction by the correction means based on a difference between the fogging amount estimated by the estimation means and the correction target value determined by the determination means;
The image processing apparatus according to [C1] or [C2], wherein the correction unit performs correction when the determination unit determines to perform correction.
[C4]
A judgment means for judging whether to perform correction by the correction means based on a difference between the fog amounts estimated by the estimation means in each pixel in the image received by the reception means;
The image processing apparatus according to [C1] or [C2], wherein the correction unit performs correction when the determination unit determines to perform correction.
[C5]
Receiving means for receiving images;
Estimating means for estimating a fog amount that is a difference between a luminance value of an original pixel and a luminance value of a pixel of the image based on the image received by the receiving means;
Measuring means for measuring the luminance value and saturation value of the pixels in the image received by the receiving means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
The first saturation value is corrected based on the fog amount estimated by the estimation means, the correction target value determined by the determination means, and the distance from the achromatic color of the saturation value measured by the measurement means. Correction means;
Image processing comprising: second correction means for correcting the brightness value measured by the measurement means based on the fog amount estimated by the estimation means and the correction target value determined by the determination means. apparatus.
[C6]
Judgment whether or not to perform correction by the first correction unit and the second correction unit based on the difference between the fog amount estimated by the estimation unit and the correction target value determined by the determination unit Further comprising means,
The image processing apparatus according to [C5], wherein the first correction unit and the second correction unit perform correction when the determination unit determines to perform correction.
[C7]
Based on the difference between the fog amounts estimated by the estimation unit in each pixel in the image received by the reception unit, it is determined whether or not the correction by the first correction unit and the second correction unit is to be performed. A judgment means for
The image processing apparatus according to [C5], wherein the first correction unit and the second correction unit perform correction when the determination unit determines to perform correction.
[C8]
Receiving means for receiving images;
Extracting means for extracting a region from the image received by the receiving means;
Selecting means for selecting the region extracted by the extracting means based on a predetermined rule;
Measuring means for measuring the luminance value and saturation value of the pixels in the region selected by the selecting means;
Estimating means for estimating a function indicating the degree of fogging in the image received by the receiving means from the luminance value measured by the measuring means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
A fog amount is calculated based on the function estimated by the estimating means, and based on a distance from the achromatic color of the fog amount, a correction target value determined by the determining means, and a saturation value measured by the measuring means. First correcting means for correcting the saturation value;
A fog amount is calculated based on the function estimated by the estimating means, and a brightness value measured by the measuring means is corrected based on the fog amount and a correction target value determined by the determining means. An image processing apparatus comprising a correction unit.
[C9]
A fog amount is calculated based on the function estimated by the estimation means, and the first correction means and the second correction are calculated based on a difference between the fog amount and a correction target value determined by the determination means. A judgment means for judging whether or not to perform correction by means;
The image processing apparatus according to [C8], wherein the first correction unit and the second correction unit perform correction when the determination unit determines to perform correction.
[C10]
A fog amount is calculated based on the function estimated by the estimation unit, and the first correction unit and the second correction unit are calculated based on a difference between the fog amounts at each pixel in the image received by the reception unit. A judgment means for judging whether or not correction by the correction means is performed,
The image processing apparatus according to [C8], wherein the first correction unit and the second correction unit perform correction when the determination unit determines to perform correction.
[C11]
Computer
Receiving means for receiving images;
Estimating means for estimating a fog amount that is a difference between a luminance value of an original pixel and a luminance value of a pixel of the image based on the image received by the receiving means;
Measuring means for measuring a saturation value of a pixel in the image received by the receiving means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
Correction means for correcting the saturation value based on the fog amount estimated by the estimation means, the correction target value determined by the determination means, and the distance from the achromatic color of the saturation value measured by the measurement means Image processing program to make it function.
[C12]
Computer
Receiving means for receiving images;
Estimating means for estimating a fog amount that is a difference between a luminance value of an original pixel and a luminance value of a pixel of the image based on the image received by the receiving means;
Measuring means for measuring the luminance value and saturation value of the pixels in the image received by the receiving means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
The first saturation value is corrected based on the fog amount estimated by the estimation means, the correction target value determined by the determination means, and the distance from the achromatic color of the saturation value measured by the measurement means. Correction means;
An image processing program for functioning as a second correction unit that corrects the brightness value measured by the measurement unit based on the fog amount estimated by the estimation unit and the correction target value determined by the determination unit.
[C13]
Computer
Receiving means for receiving images;
Extracting means for extracting a region from the image received by the receiving means;
Selecting means for selecting the region extracted by the extracting means based on a predetermined rule;
Measuring means for measuring the luminance value and saturation value of the pixels in the region selected by the selecting means;
Estimating means for estimating a function indicating the degree of fogging in the image received by the receiving means from the luminance value measured by the measuring means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
A fog amount is calculated based on the function estimated by the estimating means, and based on a distance from the achromatic color of the fog amount, a correction target value determined by the determining means, and a saturation value measured by the measuring means. First correcting means for correcting the saturation value;
A fog amount is calculated based on the function estimated by the estimating means, and a brightness value measured by the measuring means is corrected based on the fog amount and a correction target value determined by the determining means. An image processing program for functioning as a correction means.

[D1]
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、
前記受付手段によって受け付けられた画像内の画素の彩度値を測定する測定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する補正手段
を具備し、
前記推定手段は、
前記受付手段によって受け付けられた画像内の走査線毎にかぶり量を推定する複数の関数の情報量を算出し、該情報量に基づいて該走査線毎に適用すべき関数を選択する関数選択手段と、
前記関数選択手段によって選択された前記走査線毎の関数の情報量と複数の関数間の差分ノルムに基づいて、関数の組み合わせを選択する関数組選択手段と、
前記関数組選択手段によって選択された関数の組み合わせを前記走査線毎に適用することによって、かぶり量を推定するかぶり量推定手段
を有することを特徴とする画像処理装置。
[D2]
前記関数選択手段は、前記走査線毎の画素の輝度値の分布に基づいて、選択すべきでない関数を除外し、残った関数内から関数を選択する
ことを特徴とする[D1]に記載の画像処理装置。
[D3]
前記補正手段は、前記測定手段によって測定された彩度値が無彩色に近くなるほど、彩度値の補正量を少なくするように補正する
ことを特徴とする[D1]又は[D2]に記載の画像処理装置。
[D4]
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値との差分に基づいて、前記補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[D1]から[D3]のいずれか一項に記載の画像処理装置。
[D5]
前記受付手段によって受け付けられた画像内の各画素における前記推定手段によって推定されたかぶり量同士の差分に基づいて、前記補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[D1]から[D3]のいずれか一項に記載の画像処理装置。
[D6]
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、
前記受付手段によって受け付けられた画像内の画素の輝度値と彩度値を測定する測定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段
を具備し、
前記推定手段は、
前記受付手段によって受け付けられた画像内の走査線毎にかぶり量を推定する複数の関数の情報量を算出し、該情報量に基づいて該走査線毎に適用すべき関数を選択する関数選択手段と、
前記関数選択手段によって選択された前記走査線毎の関数の情報量と複数の関数間の差分ノルムに基づいて、関数の組み合わせを選択する関数組選択手段と、
前記関数組選択手段によって選択された関数の組み合わせを前記走査線毎に適用することによって、かぶり量を推定するかぶり量推定手段
を有することを特徴とする画像処理装置。
[D7]
前記関数選択手段は、前記走査線毎の画素の輝度値の分布に基づいて、選択すべきでない関数を除外し、残った関数内から関数を選択する
ことを特徴とする[D6]に記載の画像処理装置。
[D8]
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値との差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[D6]又は[D7]に記載の画像処理装置。
[D9]
前記受付手段によって受け付けられた画像内の各画素における前記推定手段によって推定されたかぶり量同士の差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[D6]又は[D7]に記載の画像処理装置。
[D10]
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像から領域を抽出する抽出手段と、
前記抽出手段によって抽出された領域を予め定めた規則に基づいて選択する選択手段と、
前記選択手段によって選択された領域内の画素の輝度値と彩度値を測定する測定手段と、
前記測定手段によって測定された輝度値から、前記受付手段によって受け付けられた画像におけるかぶりの度合いを示す関数を推定する推定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段
を具備し、
前記推定手段は、
前記受付手段によって受け付けられた画像内の走査線毎にかぶり量を推定する複数の関数の情報量を算出し、該情報量に基づいて該走査線毎に適用すべき関数を選択する関数選択手段と、
前記関数選択手段によって選択された前記走査線毎の関数の情報量と複数の関数間の差分ノルムに基づいて、関数の組み合わせを選択する関数組選択手段と、
前記関数組選択手段によって選択された関数の組み合わせを前記走査線毎に適用することによって、かぶり量を推定するかぶり量推定手段
を有することを特徴とする画像処理装置。
[D11]
前記関数選択手段は、前記走査線毎の画素の輝度値の分布に基づいて、選択すべきでない関数を除外し、残った関数内から関数を選択する
ことを特徴とする[D10]に記載の画像処理装置。
[D12]
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値との差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[D10]又は[D11]に記載の画像処理装置。
[D13]
前記推定手段によって推定された関数に基づいてかぶり量を算出し、前記受付手段によって受け付けられた画像内の各画素における該かぶり量同士の差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[D10]又は[D11]に記載の画像処理装置。
[D14]
コンピュータを、
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、
前記受付手段によって受け付けられた画像内の画素の彩度値を測定する測定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する補正手段
として機能させ、
前記推定手段は、
前記受付手段によって受け付けられた画像内の走査線毎にかぶり量を推定する複数の関数の情報量を算出し、該情報量に基づいて該走査線毎に適用すべき関数を選択する関数選択手段と、
前記関数選択手段によって選択された前記走査線毎の関数の情報量と複数の関数間の差分ノルムに基づいて、関数の組み合わせを選択する関数組選択手段と、
前記関数組選択手段によって選択された関数の組み合わせを前記走査線毎に適用することによって、かぶり量を推定するかぶり量推定手段
を有することを特徴とする画像処理プログラム。
[D15]
コンピュータを、
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、
前記受付手段によって受け付けられた画像内の画素の輝度値と彩度値を測定する測定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段
として機能させ、
前記推定手段は、
前記受付手段によって受け付けられた画像内の走査線毎にかぶり量を推定する複数の関数の情報量を算出し、該情報量に基づいて該走査線毎に適用すべき関数を選択する関数選択手段と、
前記関数選択手段によって選択された前記走査線毎の関数の情報量と複数の関数間の差分ノルムに基づいて、関数の組み合わせを選択する関数組選択手段と、
前記関数組選択手段によって選択された関数の組み合わせを前記走査線毎に適用することによって、かぶり量を推定するかぶり量推定手段
を有することを特徴とする画像処理プログラム。
[D16]
コンピュータを、
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像から領域を抽出する抽出手段と、
前記抽出手段によって抽出された領域を予め定めた規則に基づいて選択する選択手段と、
前記選択手段によって選択された領域内の画素の輝度値と彩度値を測定する測定手段と、
前記測定手段によって測定された輝度値から、前記受付手段によって受け付けられた画像におけるかぶりの度合いを示す関数を推定する推定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段
として機能させ、
前記推定手段は、
前記受付手段によって受け付けられた画像内の走査線毎にかぶり量を推定する複数の関数の情報量を算出し、該情報量に基づいて該走査線毎に適用すべき関数を選択する関数選択手段と、
前記関数選択手段によって選択された前記走査線毎の関数の情報量と複数の関数間の差分ノルムに基づいて、関数の組み合わせを選択する関数組選択手段と、
前記関数組選択手段によって選択された関数の組み合わせを前記走査線毎に適用することによって、かぶり量を推定するかぶり量推定手段
を有することを特徴とする画像処理プログラム。
[D1]
Receiving means for receiving images;
Estimating means for estimating a fog amount that is a difference between a luminance value of an original pixel and a luminance value of a pixel of the image based on the image received by the receiving means;
Measuring means for measuring a saturation value of a pixel in the image received by the receiving means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
Correction means for correcting the saturation value based on the fog amount estimated by the estimation means, the correction target value determined by the determination means, and the distance from the achromatic color of the saturation value measured by the measurement means; Equipped,
The estimation means includes
Function selection means for calculating the information amount of a plurality of functions for estimating the fog amount for each scanning line in the image received by the receiving means, and selecting a function to be applied for each scanning line based on the information amount When,
A function set selection unit that selects a combination of functions based on the information amount of the function for each scanning line selected by the function selection unit and a difference norm between a plurality of functions;
An image processing apparatus comprising: a fog amount estimation unit that estimates a fog amount by applying a combination of functions selected by the function group selection unit for each scanning line.
[D2]
The function selection unit excludes a function that should not be selected based on a distribution of luminance values of pixels for each scanning line, and selects a function from the remaining functions. [D1] Image processing device.
[D3]
The correction unit corrects the saturation value so that the amount of correction of the saturation value decreases as the saturation value measured by the measurement unit becomes closer to an achromatic color. [D1] or [D2] Image processing device.
[D4]
A judgment means for judging whether to perform correction by the correction means based on a difference between the fogging amount estimated by the estimation means and the correction target value determined by the determination means;
The image processing apparatus according to any one of [D1] to [D3], wherein the correction unit performs correction when the determination unit determines that correction is performed.
[D5]
A judgment means for judging whether to perform correction by the correction means based on a difference between the fog amounts estimated by the estimation means in each pixel in the image received by the reception means;
The image processing apparatus according to any one of [D1] to [D3], wherein the correction unit performs correction when the determination unit determines that correction is performed.
[D6]
Receiving means for receiving images;
Estimating means for estimating a fog amount that is a difference between a luminance value of an original pixel and a luminance value of a pixel of the image based on the image received by the receiving means;
Measuring means for measuring the luminance value and saturation value of the pixels in the image received by the receiving means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
The first saturation value is corrected based on the fog amount estimated by the estimation means, the correction target value determined by the determination means, and the distance from the achromatic color of the saturation value measured by the measurement means. Correction means;
Second correction means for correcting the brightness value measured by the measurement means based on the fog amount estimated by the estimation means and the correction target value determined by the determination means;
The estimation means includes
Function selection means for calculating the information amount of a plurality of functions for estimating the fog amount for each scanning line in the image received by the receiving means, and selecting a function to be applied for each scanning line based on the information amount When,
A function set selection unit that selects a combination of functions based on the information amount of the function for each scanning line selected by the function selection unit and a difference norm between a plurality of functions;
An image processing apparatus comprising: a fog amount estimation unit that estimates a fog amount by applying a combination of functions selected by the function group selection unit for each scanning line.
[D7]
The function selecting unit excludes a function that should not be selected based on a distribution of luminance values of pixels for each scanning line, and selects a function from the remaining functions. [D6] Image processing device.
[D8]
Judgment whether or not to perform correction by the first correction unit and the second correction unit based on the difference between the fog amount estimated by the estimation unit and the correction target value determined by the determination unit Further comprising means,
The image processing apparatus according to [D6] or [D7], wherein the first correction unit and the second correction unit perform correction when it is determined that the correction is performed by the determination unit. .
[D9]
Based on the difference between the fog amounts estimated by the estimation unit in each pixel in the image received by the reception unit, it is determined whether or not the correction by the first correction unit and the second correction unit is to be performed. A judgment means for
The image processing apparatus according to [D6] or [D7], wherein the first correction unit and the second correction unit perform correction when it is determined that the correction is performed by the determination unit. .
[D10]
Receiving means for receiving images;
Extracting means for extracting a region from the image received by the receiving means;
Selecting means for selecting the region extracted by the extracting means based on a predetermined rule;
Measuring means for measuring the luminance value and saturation value of the pixels in the region selected by the selecting means;
Estimating means for estimating a function indicating the degree of fogging in the image received by the receiving means from the luminance value measured by the measuring means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
A fog amount is calculated based on the function estimated by the estimating means, and based on a distance from the achromatic color of the fog amount, a correction target value determined by the determining means, and a saturation value measured by the measuring means. First correcting means for correcting the saturation value;
A fog amount is calculated based on the function estimated by the estimating means, and a brightness value measured by the measuring means is corrected based on the fog amount and a correction target value determined by the determining means. A correction means,
The estimation means includes
Function selection means for calculating the information amount of a plurality of functions for estimating the fog amount for each scanning line in the image received by the receiving means, and selecting a function to be applied for each scanning line based on the information amount When,
A function set selection unit that selects a combination of functions based on the information amount of the function for each scanning line selected by the function selection unit and a difference norm between a plurality of functions;
An image processing apparatus comprising: a fog amount estimation unit that estimates a fog amount by applying a combination of functions selected by the function group selection unit for each scanning line.
[D11]
The function selecting unit excludes a function that should not be selected based on a distribution of luminance values of pixels for each scanning line, and selects a function from the remaining functions. [D10] Image processing device.
[D12]
A fog amount is calculated based on the function estimated by the estimation means, and the first correction means and the second correction are calculated based on a difference between the fog amount and a correction target value determined by the determination means. A judgment means for judging whether or not to perform correction by means;
The image processing apparatus according to [D10] or [D11], wherein the first correction unit and the second correction unit perform correction when the determination unit determines to perform correction. .
[D13]
A fog amount is calculated based on the function estimated by the estimation unit, and the first correction unit and the second correction unit are calculated based on a difference between the fog amounts at each pixel in the image received by the reception unit. A judgment means for judging whether or not correction by the correction means is performed,
The image processing apparatus according to [D10] or [D11], wherein the first correction unit and the second correction unit perform correction when the determination unit determines to perform correction. .
[D14]
Computer
Receiving means for receiving images;
Estimating means for estimating a fog amount that is a difference between a luminance value of an original pixel and a luminance value of a pixel of the image based on the image received by the receiving means;
Measuring means for measuring a saturation value of a pixel in the image received by the receiving means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
Correction means for correcting the saturation value based on the fog amount estimated by the estimation means, the correction target value determined by the determination means, and the distance from the achromatic color of the saturation value measured by the measurement means Make it work
The estimation means includes
Function selection means for calculating the information amount of a plurality of functions for estimating the fog amount for each scanning line in the image received by the receiving means, and selecting a function to be applied for each scanning line based on the information amount When,
A function set selection unit that selects a combination of functions based on the information amount of the function for each scanning line selected by the function selection unit and a difference norm between a plurality of functions;
An image processing program comprising: a fog amount estimation unit that estimates a fog amount by applying a combination of functions selected by the function group selection unit for each scanning line.
[D15]
Computer
Receiving means for receiving images;
Estimating means for estimating a fog amount that is a difference between a luminance value of an original pixel and a luminance value of a pixel of the image based on the image received by the receiving means;
Measuring means for measuring the luminance value and saturation value of the pixels in the image received by the receiving means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
The first saturation value is corrected based on the fog amount estimated by the estimation means, the correction target value determined by the determination means, and the distance from the achromatic color of the saturation value measured by the measurement means. Correction means;
Based on the fog amount estimated by the estimation means and the correction target value determined by the determination means, function as a second correction means for correcting the luminance value measured by the measurement means,
The estimation means includes
Function selection means for calculating the information amount of a plurality of functions for estimating the fog amount for each scanning line in the image received by the receiving means, and selecting a function to be applied for each scanning line based on the information amount When,
A function set selection unit that selects a combination of functions based on the information amount of the function for each scanning line selected by the function selection unit and a difference norm between a plurality of functions;
An image processing program comprising: a fog amount estimation unit that estimates a fog amount by applying a combination of functions selected by the function group selection unit for each scanning line.
[D16]
Computer
Receiving means for receiving images;
Extracting means for extracting a region from the image received by the receiving means;
Selecting means for selecting the region extracted by the extracting means based on a predetermined rule;
Measuring means for measuring the luminance value and saturation value of the pixels in the region selected by the selecting means;
Estimating means for estimating a function indicating the degree of fogging in the image received by the receiving means from the luminance value measured by the measuring means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
A fog amount is calculated based on the function estimated by the estimating means, and based on a distance from the achromatic color of the fog amount, a correction target value determined by the determining means, and a saturation value measured by the measuring means. First correcting means for correcting the saturation value;
A fog amount is calculated based on the function estimated by the estimating means, and a brightness value measured by the measuring means is corrected based on the fog amount and a correction target value determined by the determining means. Function as a correction means,
The estimation means includes
Function selection means for calculating the information amount of a plurality of functions for estimating the fog amount for each scanning line in the image received by the receiving means, and selecting a function to be applied for each scanning line based on the information amount When,
A function set selection unit that selects a combination of functions based on the information amount of the function for each scanning line selected by the function selection unit and a difference norm between a plurality of functions;
An image processing program comprising: a fog amount estimation unit that estimates a fog amount by applying a combination of functions selected by the function group selection unit for each scanning line.

[E1]
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、
前記受付手段によって受け付けられた画像内の画素の彩度値を測定する測定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する補正手段
を具備し、
前記推定手段は、
前記受付手段によって受け付けられた画像内の走査線毎に隣の画素との差分を算出する算出手段と、
前記算出手段によって算出された画素の差分に適用する複数の関数であって、前記受付手段によって受け付けられた画像内の走査線毎にかぶり量を推定する該複数の関数の情報量を算出し、該情報量に基づいて該走査線毎に適用すべき関数を選択する関数選択手段と、
前記関数選択手段によって選択された前記走査線毎の関数の情報量と複数の関数間の差分ノルムに基づいて、関数の組み合わせを選択する関数組選択手段と、
前記関数組選択手段によって選択された関数の組み合わせを前記走査線毎に適用することによって、かぶり量を推定するかぶり量推定手段
を有することを特徴とする画像処理装置。
[E2]
前記関数選択手段は、前記走査線毎の画素の輝度値の分布に基づいて、選択すべきでない関数を除外し、残った関数内から関数を選択する
ことを特徴とする[E1]に記載の画像処理装置。
[E3]
前記補正手段は、前記測定手段によって測定された彩度値が無彩色に近くなるほど、彩度値の補正量を少なくするように補正する
ことを特徴とする[E1]又は[E2]に記載の画像処理装置。
[E4]
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値との差分に基づいて、前記補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[E1]から[E3]のいずれか一項に記載の画像処理装置。
[E5]
前記受付手段によって受け付けられた画像内の各画素における前記推定手段によって推定されたかぶり量同士の差分に基づいて、前記補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[E1]から[E3]のいずれか一項に記載の画像処理装置。
[E6]
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、
前記受付手段によって受け付けられた画像内の画素の輝度値と彩度値を測定する測定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段
を具備し、
前記推定手段は、
前記受付手段によって受け付けられた画像内の走査線毎に隣の画素との差分を算出する算出手段と、
前記算出手段によって算出された画素の差分に適用する複数の関数であって、前記受付手段によって受け付けられた画像内の走査線毎にかぶり量を推定する該複数の関数の情報量を算出し、該情報量に基づいて該走査線毎に適用すべき関数を選択する関数選択手段と、
前記関数選択手段によって選択された前記走査線毎の関数の情報量と複数の関数間の差分ノルムに基づいて、関数の組み合わせを選択する関数組選択手段と、
前記関数組選択手段によって選択された関数の組み合わせを前記走査線毎に適用することによって、かぶり量を推定するかぶり量推定手段
を有することを特徴とする画像処理装置。
[E7]
前記関数選択手段は、前記走査線毎の画素の輝度値の分布に基づいて、選択すべきでない関数を除外し、残った関数内から関数を選択する
ことを特徴とする[E6]に記載の画像処理装置。
[E8]
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値との差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[E6]又は[E7]に記載の画像処理装置。
[E9]
前記受付手段によって受け付けられた画像内の各画素における前記推定手段によって推定されたかぶり量同士の差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[E6]又は[E7]に記載の画像処理装置。
[E10]
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像から領域を抽出する抽出手段と、
前記抽出手段によって抽出された領域を予め定めた規則に基づいて選択する選択手段と、
前記選択手段によって選択された領域内の画素の輝度値と彩度値を測定する測定手段と、
前記測定手段によって測定された輝度値から、前記受付手段によって受け付けられた画像におけるかぶりの度合いを示す関数を推定する推定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段
を具備し、
前記推定手段は、
前記受付手段によって受け付けられた画像内の走査線毎に隣の画素との差分を算出する算出手段と、
前記算出手段によって算出された画素の差分に適用する複数の関数であって、前記受付手段によって受け付けられた画像内の走査線毎にかぶり量を推定する該複数の関数の情報量を算出し、該情報量に基づいて該走査線毎に適用すべき関数を選択する関数選択手段と、
前記関数選択手段によって選択された前記走査線毎の関数の情報量と複数の関数間の差分ノルムに基づいて、関数の組み合わせを選択する関数組選択手段と、
前記関数組選択手段によって選択された関数の組み合わせを前記走査線毎に適用することによって、かぶり量を推定するかぶり量推定手段
を有することを特徴とする画像処理装置。
[E11]
前記算出手段、前記関数選択手段、前記関数組選択手段、前記かぶり量推定手段は、前記抽出手段によって抽出された領域毎に処理を行い、
前記推定手段は、
前記関数組選択手段によって選択された関数の積分関数を算出し、該積分関数の定数項を推定する領域定数推定手段
をさらに有し、
前記かぶり量推定手段は、前記領域定数推定手段によって推定された前記領域毎の定数項は、該領域全体のかぶり量の定数と該領域の背景色の固有量の和である定数項として推定する
ことを特徴とする[E10]に記載の画像処理装置。
[E12]
前記関数選択手段は、前記走査線毎の画素の輝度値の分布に基づいて、選択すべきでない関数を除外し、残った関数内から関数を選択する
ことを特徴とする[E10]又は[E11]に記載の画像処理装置。
[E13]
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値との差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[E10]から[E12]のいずれか一項に記載の画像処理装置。
[E14]
前記推定手段によって推定された関数に基づいてかぶり量を算出し、前記受付手段によって受け付けられた画像内の各画素における該かぶり量同士の差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする[E10]から[E12]のいずれか一項に記載の画像処理装置。
[E15]
コンピュータを、
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、
前記受付手段によって受け付けられた画像内の画素の彩度値を測定する測定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する補正手段
として機能させ、
前記推定手段は、
前記受付手段によって受け付けられた画像内の走査線毎に隣の画素との差分を算出する算出手段と、
前記算出手段によって算出された画素の差分に適用する複数の関数であって、前記受付手段によって受け付けられた画像内の走査線毎にかぶり量を推定する該複数の関数の情報量を算出し、該情報量に基づいて該走査線毎に適用すべき関数を選択する関数選択手段と、
前記関数選択手段によって選択された前記走査線毎の関数の情報量と複数の関数間の差分ノルムに基づいて、関数の組み合わせを選択する関数組選択手段と、
前記関数組選択手段によって選択された関数の組み合わせを前記走査線毎に適用することによって、かぶり量を推定するかぶり量推定手段
を有することを特徴とする画像処理プログラム。
[E16]
コンピュータを、
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、
前記受付手段によって受け付けられた画像内の画素の輝度値と彩度値を測定する測定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段
として機能させ、
前記推定手段は、
前記受付手段によって受け付けられた画像内の走査線毎に隣の画素との差分を算出する算出手段と、
前記算出手段によって算出された画素の差分に適用する複数の関数であって、前記受付手段によって受け付けられた画像内の走査線毎にかぶり量を推定する該複数の関数の情報量を算出し、該情報量に基づいて該走査線毎に適用すべき関数を選択する関数選択手段と、
前記関数選択手段によって選択された前記走査線毎の関数の情報量と複数の関数間の差分ノルムに基づいて、関数の組み合わせを選択する関数組選択手段と、
前記関数組選択手段によって選択された関数の組み合わせを前記走査線毎に適用することによって、かぶり量を推定するかぶり量推定手段
を有することを特徴とする画像処理プログラム。
[E17]
コンピュータを、
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像から領域を抽出する抽出手段と、
前記抽出手段によって抽出された領域を予め定めた規則に基づいて選択する選択手段と、
前記選択手段によって選択された領域内の画素の輝度値と彩度値を測定する測定手段と、
前記測定手段によって測定された輝度値から、前記受付手段によって受け付けられた画像におけるかぶりの度合いを示す関数を推定する推定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段
として機能させ、
前記推定手段は、
前記受付手段によって受け付けられた画像内の走査線毎に隣の画素との差分を算出する算出手段と、
前記算出手段によって算出された画素の差分に適用する複数の関数であって、前記受付手段によって受け付けられた画像内の走査線毎にかぶり量を推定する該複数の関数の情報量を算出し、該情報量に基づいて該走査線毎に適用すべき関数を選択する関数選択手段と、
前記関数選択手段によって選択された前記走査線毎の関数の情報量と複数の関数間の差分ノルムに基づいて、関数の組み合わせを選択する関数組選択手段と、
前記関数組選択手段によって選択された関数の組み合わせを前記走査線毎に適用することによって、かぶり量を推定するかぶり量推定手段
を有することを特徴とする画像処理プログラム。
[E1]
Receiving means for receiving images;
Estimating means for estimating a fog amount that is a difference between a luminance value of an original pixel and a luminance value of a pixel of the image based on the image received by the receiving means;
Measuring means for measuring a saturation value of a pixel in the image received by the receiving means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
Correction means for correcting the saturation value based on the fog amount estimated by the estimation means, the correction target value determined by the determination means, and the distance from the achromatic color of the saturation value measured by the measurement means; Equipped,
The estimation means includes
Calculating means for calculating a difference with an adjacent pixel for each scanning line in the image received by the receiving means;
A plurality of functions to be applied to the pixel difference calculated by the calculating means, and calculating an information amount of the plurality of functions for estimating a fog amount for each scanning line in the image received by the receiving means; Function selection means for selecting a function to be applied to each scanning line based on the amount of information;
A function set selection unit that selects a combination of functions based on the information amount of the function for each scanning line selected by the function selection unit and a difference norm between a plurality of functions;
An image processing apparatus comprising: a fog amount estimation unit that estimates a fog amount by applying a combination of functions selected by the function group selection unit for each scanning line.
[E2]
The function selecting unit excludes a function that should not be selected based on a distribution of luminance values of pixels for each scanning line, and selects a function from the remaining functions. [E1] Image processing device.
[E3]
The correction unit corrects the correction so that the amount of correction of the saturation value decreases as the saturation value measured by the measurement unit becomes closer to an achromatic color, according to [E1] or [E2] Image processing device.
[E4]
A judgment means for judging whether to perform correction by the correction means based on a difference between the fogging amount estimated by the estimation means and the correction target value determined by the determination means;
The image processing apparatus according to any one of [E1] to [E3], wherein the correction unit performs correction when the determination unit determines that correction is performed.
[E5]
A judgment means for judging whether to perform correction by the correction means based on a difference between the fog amounts estimated by the estimation means in each pixel in the image received by the reception means;
The image processing apparatus according to any one of [E1] to [E3], wherein the correction unit performs correction when the determination unit determines that correction is performed.
[E6]
Receiving means for receiving images;
Estimating means for estimating a fog amount that is a difference between a luminance value of an original pixel and a luminance value of a pixel of the image based on the image received by the receiving means;
Measuring means for measuring the luminance value and saturation value of the pixels in the image received by the receiving means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
The first saturation value is corrected based on the fog amount estimated by the estimation means, the correction target value determined by the determination means, and the distance from the achromatic color of the saturation value measured by the measurement means. Correction means;
Second correction means for correcting the brightness value measured by the measurement means based on the fog amount estimated by the estimation means and the correction target value determined by the determination means;
The estimation means includes
Calculating means for calculating a difference with an adjacent pixel for each scanning line in the image received by the receiving means;
A plurality of functions to be applied to the pixel difference calculated by the calculating means, and calculating an information amount of the plurality of functions for estimating a fog amount for each scanning line in the image received by the receiving means; Function selection means for selecting a function to be applied to each scanning line based on the amount of information;
A function set selection unit that selects a combination of functions based on the information amount of the function for each scanning line selected by the function selection unit and a difference norm between a plurality of functions;
An image processing apparatus comprising: a fog amount estimation unit that estimates a fog amount by applying a combination of functions selected by the function group selection unit for each scanning line.
[E7]
The function selecting unit excludes a function that should not be selected based on a distribution of luminance values of pixels for each scanning line, and selects a function from the remaining functions. [E6] Image processing device.
[E8]
Judgment whether or not to perform correction by the first correction unit and the second correction unit based on the difference between the fog amount estimated by the estimation unit and the correction target value determined by the determination unit Further comprising means,
The image processing apparatus according to [E6] or [E7], wherein the first correction unit and the second correction unit perform correction when the determination unit determines to perform correction. .
[E9]
Based on the difference between the fog amounts estimated by the estimation unit in each pixel in the image received by the reception unit, it is determined whether or not the correction by the first correction unit and the second correction unit is to be performed. A judgment means for
The image processing apparatus according to [E6] or [E7], wherein the first correction unit and the second correction unit perform correction when the determination unit determines to perform correction. .
[E10]
Receiving means for receiving images;
Extracting means for extracting a region from the image received by the receiving means;
Selecting means for selecting the region extracted by the extracting means based on a predetermined rule;
Measuring means for measuring the luminance value and saturation value of the pixels in the region selected by the selecting means;
Estimating means for estimating a function indicating the degree of fogging in the image received by the receiving means from the luminance value measured by the measuring means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
A fog amount is calculated based on the function estimated by the estimating means, and based on a distance from the achromatic color of the fog amount, a correction target value determined by the determining means, and a saturation value measured by the measuring means. First correcting means for correcting the saturation value;
A fog amount is calculated based on the function estimated by the estimating means, and a brightness value measured by the measuring means is corrected based on the fog amount and a correction target value determined by the determining means. A correction means,
The estimation means includes
Calculating means for calculating a difference with an adjacent pixel for each scanning line in the image received by the receiving means;
A plurality of functions to be applied to the pixel difference calculated by the calculating means, and calculating an information amount of the plurality of functions for estimating a fog amount for each scanning line in the image received by the receiving means; Function selection means for selecting a function to be applied to each scanning line based on the amount of information;
A function set selection unit that selects a combination of functions based on the information amount of the function for each scanning line selected by the function selection unit and a difference norm between a plurality of functions;
An image processing apparatus comprising: a fog amount estimation unit that estimates a fog amount by applying a combination of functions selected by the function group selection unit for each scanning line.
[E11]
The calculation means, the function selection means, the function set selection means, and the fog amount estimation means perform processing for each area extracted by the extraction means,
The estimation means includes
An area constant estimating means for calculating an integral function of the function selected by the function set selecting means and estimating a constant term of the integral function;
The fog amount estimation unit estimates the constant term for each region estimated by the region constant estimation unit as a constant term that is a sum of a constant of the fog amount of the entire region and a specific amount of the background color of the region. The image processing apparatus according to [E10], wherein
[E12]
[E10] or [E11], wherein the function selecting means excludes a function that should not be selected based on a distribution of luminance values of pixels for each scanning line, and selects a function from the remaining functions. ] The image processing apparatus as described in.
[E13]
A fog amount is calculated based on the function estimated by the estimation means, and the first correction means and the second correction are calculated based on a difference between the fog amount and a correction target value determined by the determination means. A judgment means for judging whether or not to perform correction by means;
Any one of [E10] to [E12] is characterized in that the first correction unit and the second correction unit perform correction when the determination unit determines that the correction is performed. The image processing apparatus described.
[E14]
A fog amount is calculated based on the function estimated by the estimation unit, and the first correction unit and the second correction unit are calculated based on a difference between the fog amounts at each pixel in the image received by the reception unit. A judgment means for judging whether or not correction by the correction means is performed,
Any one of [E10] to [E12] is characterized in that the first correction unit and the second correction unit perform correction when the determination unit determines that the correction is performed. The image processing apparatus described.
[E15]
Computer
Receiving means for receiving images;
Estimating means for estimating a fog amount that is a difference between a luminance value of an original pixel and a luminance value of a pixel of the image based on the image received by the receiving means;
Measuring means for measuring a saturation value of a pixel in the image received by the receiving means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
Correction means for correcting the saturation value based on the fog amount estimated by the estimation means, the correction target value determined by the determination means, and the distance from the achromatic color of the saturation value measured by the measurement means Make it work
The estimation means includes
Calculating means for calculating a difference with an adjacent pixel for each scanning line in the image received by the receiving means;
A plurality of functions to be applied to the pixel difference calculated by the calculating means, and calculating an information amount of the plurality of functions for estimating a fog amount for each scanning line in the image received by the receiving means; Function selection means for selecting a function to be applied to each scanning line based on the amount of information;
A function set selection unit that selects a combination of functions based on the information amount of the function for each scanning line selected by the function selection unit and a difference norm between a plurality of functions;
An image processing program comprising: a fog amount estimation unit that estimates a fog amount by applying a combination of functions selected by the function group selection unit for each scanning line.
[E16]
Computer
Receiving means for receiving images;
Estimating means for estimating a fog amount that is a difference between a luminance value of an original pixel and a luminance value of a pixel of the image based on the image received by the receiving means;
Measuring means for measuring the luminance value and saturation value of the pixels in the image received by the receiving means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
The first saturation value is corrected based on the fog amount estimated by the estimation means, the correction target value determined by the determination means, and the distance from the achromatic color of the saturation value measured by the measurement means. Correction means;
Based on the fog amount estimated by the estimation means and the correction target value determined by the determination means, function as a second correction means for correcting the luminance value measured by the measurement means,
The estimation means includes
Calculating means for calculating a difference with an adjacent pixel for each scanning line in the image received by the receiving means;
A plurality of functions to be applied to the pixel difference calculated by the calculating means, and calculating an information amount of the plurality of functions for estimating a fog amount for each scanning line in the image received by the receiving means; Function selection means for selecting a function to be applied to each scanning line based on the amount of information;
A function set selection unit that selects a combination of functions based on the information amount of the function for each scanning line selected by the function selection unit and a difference norm between a plurality of functions;
An image processing program comprising: a fog amount estimation unit that estimates a fog amount by applying a combination of functions selected by the function group selection unit for each scanning line.
[E17]
Computer
Receiving means for receiving images;
Extracting means for extracting a region from the image received by the receiving means;
Selecting means for selecting the region extracted by the extracting means based on a predetermined rule;
Measuring means for measuring the luminance value and saturation value of the pixels in the region selected by the selecting means;
Estimating means for estimating a function indicating the degree of fogging in the image received by the receiving means from the luminance value measured by the measuring means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
A fog amount is calculated based on the function estimated by the estimating means, and based on a distance from the achromatic color of the fog amount, a correction target value determined by the determining means, and a saturation value measured by the measuring means. First correcting means for correcting the saturation value;
A fog amount is calculated based on the function estimated by the estimating means, and a brightness value measured by the measuring means is corrected based on the fog amount and a correction target value determined by the determining means. Function as a correction means,
The estimation means includes
Calculating means for calculating a difference with an adjacent pixel for each scanning line in the image received by the receiving means;
A plurality of functions to be applied to the pixel difference calculated by the calculating means, and calculating an information amount of the plurality of functions for estimating a fog amount for each scanning line in the image received by the receiving means; Function selection means for selecting a function to be applied to each scanning line based on the amount of information;
A function set selection unit that selects a combination of functions based on the information amount of the function for each scanning line selected by the function selection unit and a difference norm between a plurality of functions;
An image processing program comprising: a fog amount estimation unit that estimates a fog amount by applying a combination of functions selected by the function group selection unit for each scanning line.

110…画像受付モジュール
120…かぶり量推定モジュール
130…画素値測定モジュール
140…補正目標値決定モジュール
145…彩度補正可否判断モジュール
150…彩度補正モジュール
160…出力モジュール
910…補正モジュール
950…輝度補正モジュール
1445…補正可否判断モジュール
1620…非エッジ領域抽出モジュール
1630…検査領域選択モジュール
1640…画素値測定モジュール
1650…画素値分布推定モジュール
1910…ソーベルフィルターモジュール
1920…2値化モジュール
1930…白黒反転モジュール
1940…ラベリングモジュール
1950…小サイズ除去モジュール
3110…準平坦領域抽出モジュール
3112…エッジ強調モジュール
3114…2値化モジュール
3116…反転モジュール
3118…ラベリングモジュール
3120…サンプリング領域選択モジュール
3122…色解析モジュール
3124…識別関数モジュール
3126…領域選択モジュール
3130…かぶり量推定モジュール
3132…ラインサンプリングモジュール
3134…多モデル関数推定モジュール
3136…平面輝度推定モジュール
3140…輝度かぶり補正モジュール
3142…座標毎補正量計算モジュール
3144…輝度補正モジュール
3146…彩度補正モジュール
3530…かぶり量推定モジュール
3532…ライフサンプリングモジュール
3534…多モデル大域微分関数推定モジュール
3536…局所域定数推定モジュール
3538…平面輝度推定モジュール
4310…かぶり有無処理モジュール
4312…原稿領域抽出モジュール
4314…かぶり有無判断モジュール
4316…制御モジュール


DESCRIPTION OF SYMBOLS 110 ... Image reception module 120 ... Fog amount estimation module 130 ... Pixel value measurement module 140 ... Correction target value determination module 145 ... Saturation correction availability determination module 150 ... Saturation correction module 160 ... Output module 910 ... Correction module 950 ... Luminance correction Module 1445 ... Correctability determination module 1620 ... Non-edge region extraction module 1630 ... Inspection region selection module 1640 ... Pixel value measurement module 1650 ... Pixel value distribution estimation module 1910 ... Sobel filter module 1920 ... Binarization module 1930 ... Monochrome inversion module 1940 ... Labeling module 1950 ... Small size removal module 3110 ... Quasi-flat region extraction module 3112 ... Edge enhancement module 3114 ... Binarization module 3116 ... Inversion module 3118 ... Labeling module 3120 ... Sampling area selection module 3122 ... Color analysis module 3124 ... Discrimination function module 3126 ... Area selection module 3130 ... Fog amount estimation module 3132 ... Line sampling module 3134 ... Multi-model function estimation module 3136 ... Plane Luminance estimation module 3140 ... Luminance fog correction module 3142 ... Coordinate correction amount calculation module 3144 ... Luminance correction module 3146 ... Saturation correction module 3530 ... Fog amount estimation module 3532 ... Life sampling module 3534 ... Multi-model global differential function estimation module 3536 ... Local area constant estimation module 3538 ... Planar luminance estimation module 4310 ... Fog presence / absence processing module 4312 ... Document area extraction module 4314 ... Coverage determination module 4316 ... Control module


Claims (16)

画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、
前記受付手段によって受け付けられた画像から撮影されている原稿画像の領域を抽出する抽出手段と、
前記抽出手段によって抽出された領域内と領域外の画像を比較することによって、かぶりが発生しているのは、該領域内だけであるか否かを判断する判断手段と、
前記判断手段によってかぶりが発生しているのは前記領域内だけであると判断された場合は、かぶり量を除去することをしないように制御する制御手段と、
前記受付手段によって受け付けられた画像内の画素の彩度値を測定する測定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する補正手段
を具備することを特徴とする画像処理装置。
Receiving means for receiving images;
Estimating means for estimating a fog amount that is a difference between a luminance value of an original pixel and a luminance value of a pixel of the image based on the image received by the receiving means;
Extraction means for extracting an area of a document image taken from an image received by the reception means;
A determination means for determining whether or not the fog is occurring only in the area by comparing the image inside the area extracted by the extraction means and the image outside the area;
Control means for controlling so as not to remove the amount of fog when the judgment means judges that the fog is occurring only in the region;
Measuring means for measuring a saturation value of a pixel in the image received by the receiving means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
Correction means for correcting the saturation value based on the fog amount estimated by the estimation means, the correction target value determined by the determination means, and the distance from the achromatic color of the saturation value measured by the measurement means; An image processing apparatus comprising:
前記抽出手段が抽出する領域は4角形であり、
前記判断手段は、前記4角形の辺の外側と内側の画像を比較し、該内側の画像は、該4角形の辺から内側に予め定められた距離内にあって、前記推定手段によってかぶり量が推定された領域を含む
ことを特徴とする請求項1に記載の画像処理装置。
The region extracted by the extracting means is a quadrangle,
The judging means compares the outside and inside images of the sides of the quadrangle, and the inside image is within a predetermined distance from the sides of the quadrangle, and the amount of fogging is estimated by the estimating means. The image processing apparatus according to claim 1, wherein the image processing apparatus includes an estimated area.
前記補正手段は、前記測定手段によって測定された彩度値が無彩色に近くなるほど、彩度値の補正量を少なくするように補正する
ことを特徴とする請求項1又は2に記載の画像処理装置。
3. The image processing according to claim 1, wherein the correction unit corrects the saturation value to be reduced as the saturation value measured by the measurement unit becomes closer to an achromatic color. apparatus.
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値との差分に基づいて、前記補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする請求項1から3のいずれか一項に記載の画像処理装置。
A judgment means for judging whether to perform correction by the correction means based on a difference between the fogging amount estimated by the estimation means and the correction target value determined by the determination means;
The image processing apparatus according to any one of claims 1 to 3, wherein the correction unit performs correction when the determination unit determines that the correction is performed.
前記受付手段によって受け付けられた画像内の各画素における前記推定手段によって推定されたかぶり量同士の差分に基づいて、前記補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする請求項1から3のいずれか一項に記載の画像処理装置。
A judgment means for judging whether to perform correction by the correction means based on a difference between the fog amounts estimated by the estimation means in each pixel in the image received by the reception means;
The image processing apparatus according to any one of claims 1 to 3, wherein the correction unit performs correction when the determination unit determines that the correction is performed.
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、
前記受付手段によって受け付けられた画像から撮影されている原稿画像の領域を抽出する抽出手段と、
前記抽出手段によって抽出された領域内と領域外の画像を比較することによって、かぶりが発生しているのは、該領域内だけであるか否かを判断する判断手段と、
前記判断手段によってかぶりが発生しているのは前記領域内だけであると判断された場合は、かぶり量を除去することをしないように制御する制御手段と、
前記受付手段によって受け付けられた画像内の画素の輝度値と彩度値を測定する測定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段
を具備することを特徴とする画像処理装置。
Receiving means for receiving images;
Estimating means for estimating a fog amount that is a difference between a luminance value of an original pixel and a luminance value of a pixel of the image based on the image received by the receiving means;
Extraction means for extracting an area of a document image taken from an image received by the reception means;
A determination means for determining whether or not the fog is occurring only in the area by comparing the image inside the area extracted by the extraction means and the image outside the area;
Control means for controlling so as not to remove the amount of fog when the judgment means judges that the fog is occurring only in the region;
Measuring means for measuring the luminance value and saturation value of the pixels in the image received by the receiving means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
The first saturation value is corrected based on the fog amount estimated by the estimation means, the correction target value determined by the determination means, and the distance from the achromatic color of the saturation value measured by the measurement means. Correction means;
Image processing comprising: second correction means for correcting the brightness value measured by the measurement means based on the fog amount estimated by the estimation means and the correction target value determined by the determination means. apparatus.
前記抽出手段が抽出する領域は4角形であり、
前記判断手段は、前記4角形の辺の外側と内側の画像を比較し、該内側の画像は、該4角形の辺から内側に予め定められた距離内にあって、前記推定手段によってかぶり量が推定された領域を含む
ことを特徴とする請求項6に記載の画像処理装置。
The region extracted by the extracting means is a quadrangle,
The judging means compares the outside and inside images of the side of the quadrangle, the inside image is within a predetermined distance from the side of the quadrangle, and the amount of fogging by the estimating means The image processing apparatus according to claim 6, wherein the image processing apparatus includes an estimated area.
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値との差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする請求項6又は7に記載の画像処理装置。
Judgment whether or not to perform correction by the first correction unit and the second correction unit based on the difference between the fog amount estimated by the estimation unit and the correction target value determined by the determination unit Further comprising means,
The image processing apparatus according to claim 6, wherein the first correction unit and the second correction unit perform correction when it is determined that the correction is performed by the determination unit.
前記受付手段によって受け付けられた画像内の各画素における前記推定手段によって推定されたかぶり量同士の差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする請求項6又は7に記載の画像処理装置。
Based on the difference between the fog amounts estimated by the estimation unit in each pixel in the image received by the reception unit, it is determined whether or not the correction by the first correction unit and the second correction unit is to be performed. A judgment means for
The image processing apparatus according to claim 6, wherein the first correction unit and the second correction unit perform correction when it is determined that the correction is performed by the determination unit.
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像から領域を抽出する第1の抽出手段と、
前記第1の抽出手段によって抽出された領域を予め定めた規則に基づいて選択する選択手段と、
前記選択手段によって選択された領域内の画素の輝度値と彩度値を測定する測定手段と、
前記測定手段によって測定された輝度値から、前記受付手段によって受け付けられた画像におけるかぶりの度合いを示す関数を推定する推定手段と、
前記受付手段によって受け付けられた画像から撮影されている原稿画像の領域を抽出する第2の抽出手段と、
前記第2の抽出手段によって抽出された領域内と領域外の画像を比較することによって、かぶりが発生しているのは、該領域内だけであるか否かを判断する判断手段と、
前記判断手段によってかぶりが発生しているのは前記領域内だけであると判断された場合は、かぶり量を除去することをしないように制御する制御手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段
を具備することを特徴とする画像処理装置。
Receiving means for receiving images;
First extraction means for extracting a region from the image received by the reception means;
Selecting means for selecting an area extracted by the first extracting means based on a predetermined rule;
Measuring means for measuring the luminance value and saturation value of the pixels in the region selected by the selecting means;
Estimating means for estimating a function indicating the degree of fogging in the image received by the receiving means from the luminance value measured by the measuring means;
Second extraction means for extracting an area of a document image taken from an image received by the reception means;
A determination means for determining whether or not the fog is generated only in the area by comparing the inside and outside of the area extracted by the second extraction means;
Control means for controlling so as not to remove the amount of fog when the judgment means judges that the fog is occurring only in the region;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
A fog amount is calculated based on the function estimated by the estimating means, and based on a distance from the achromatic color of the fog amount, a correction target value determined by the determining means, and a saturation value measured by the measuring means. First correcting means for correcting the saturation value;
A fog amount is calculated based on the function estimated by the estimating means, and a brightness value measured by the measuring means is corrected based on the fog amount and a correction target value determined by the determining means. An image processing apparatus comprising a correction unit.
前記第2の抽出手段が抽出する領域は4角形であり、
前記判断手段は、前記4角形の辺の外側と内側の画像を比較し、該内側の画像は、該4角形の辺から内側に予め定められた距離内にあって、前記推定手段によってかぶり量が推定された領域を含む
ことを特徴とする請求項10に記載の画像処理装置。
The area extracted by the second extraction means is a quadrangle,
The judging means compares the outside and inside images of the sides of the quadrangle, and the inside image is within a predetermined distance from the sides of the quadrangle, and the amount of fogging is estimated by the estimating means. The image processing apparatus according to claim 10, wherein the image processing apparatus includes an estimated area.
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値との差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする請求項10又は11に記載の画像処理装置。
A fog amount is calculated based on the function estimated by the estimation means, and the first correction means and the second correction are calculated based on a difference between the fog amount and a correction target value determined by the determination means. A judgment means for judging whether or not to perform correction by means;
The image processing apparatus according to claim 10, wherein the first correction unit and the second correction unit perform correction when the determination unit determines that correction is performed.
前記推定手段によって推定された関数に基づいてかぶり量を算出し、前記受付手段によって受け付けられた画像内の各画素における該かぶり量同士の差分に基づいて、前記第1の補正手段と前記第2の補正手段による補正を行うか否かを判断する判断手段
をさらに具備し、
前記第1の補正手段と前記第2の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする請求項10又は11に記載の画像処理装置。
A fog amount is calculated based on the function estimated by the estimation unit, and the first correction unit and the second correction unit are calculated based on a difference between the fog amounts at each pixel in the image received by the reception unit. A judgment means for judging whether or not correction by the correction means is performed,
The image processing apparatus according to claim 10, wherein the first correction unit and the second correction unit perform correction when the determination unit determines that correction is performed.
コンピュータを、
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、
前記受付手段によって受け付けられた画像から撮影されている原稿画像の領域を抽出する抽出手段と、
前記抽出手段によって抽出された領域内と領域外の画像を比較することによって、かぶりが発生しているのは、該領域内だけであるか否かを判断する判断手段と、
前記判断手段によってかぶりが発生しているのは前記領域内だけであると判断された場合は、かぶり量を除去することをしないように制御する制御手段と、
前記受付手段によって受け付けられた画像内の画素の彩度値を測定する測定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する補正手段
として機能させることを特徴とする画像処理プログラム。
Computer
Receiving means for receiving images;
Estimating means for estimating a fog amount that is a difference between a luminance value of an original pixel and a luminance value of a pixel of the image based on the image received by the receiving means;
Extraction means for extracting an area of a document image taken from an image received by the reception means;
A determination means for determining whether or not the fog is occurring only in the area by comparing the image inside the area extracted by the extraction means and the image outside the area;
Control means for controlling so as not to remove the amount of fog when the judgment means judges that the fog is occurring only in the region;
Measuring means for measuring a saturation value of a pixel in the image received by the receiving means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
Correction means for correcting the saturation value based on the fog amount estimated by the estimation means, the correction target value determined by the determination means, and the distance from the achromatic color of the saturation value measured by the measurement means An image processing program characterized by causing it to function.
コンピュータを、
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、
前記受付手段によって受け付けられた画像から撮影されている原稿画像の領域を抽出する抽出手段と、
前記抽出手段によって抽出された領域内と領域外の画像を比較することによって、かぶりが発生しているのは、該領域内だけであるか否かを判断する判断手段と、
前記判断手段によってかぶりが発生しているのは前記領域内だけであると判断された場合は、かぶり量を除去することをしないように制御する制御手段と、
前記受付手段によって受け付けられた画像内の画素の輝度値と彩度値を測定する測定手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、
前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段
として機能させることを特徴とする画像処理プログラム。
Computer
Receiving means for receiving images;
Estimating means for estimating a fog amount that is a difference between a luminance value of an original pixel and a luminance value of a pixel of the image based on the image received by the receiving means;
Extraction means for extracting an area of a document image taken from an image received by the reception means;
A determination means for determining whether or not the fog is occurring only in the area by comparing the image inside the area extracted by the extraction means and the image outside the area;
Control means for controlling so as not to remove the amount of fog when the judgment means judges that the fog is occurring only in the region;
Measuring means for measuring the luminance value and saturation value of the pixels in the image received by the receiving means;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
The first saturation value is corrected based on the fog amount estimated by the estimation means, the correction target value determined by the determination means, and the distance from the achromatic color of the saturation value measured by the measurement means. Correction means;
An image processing functioning as a second correction unit that corrects the luminance value measured by the measurement unit based on the fog amount estimated by the estimation unit and the correction target value determined by the determination unit. program.
コンピュータを、
画像を受け付ける受付手段と、
前記受付手段によって受け付けられた画像から領域を抽出する第1の抽出手段と、
前記第1の抽出手段によって抽出された領域を予め定めた規則に基づいて選択する選択手段と、
前記選択手段によって選択された領域内の画素の輝度値と彩度値を測定する測定手段と、
前記測定手段によって測定された輝度値から、前記受付手段によって受け付けられた画像におけるかぶりの度合いを示す関数を推定する推定手段と、
前記受付手段によって受け付けられた画像から撮影されている原稿画像の領域を抽出する第2の抽出手段と、
前記第2の抽出手段によって抽出された領域内と領域外の画像を比較することによって、かぶりが発生しているのは、該領域内だけであるか否かを判断する判断手段と、
前記判断手段によってかぶりが発生しているのは前記領域内だけであると判断された場合は、かぶり量を除去することをしないように制御する制御手段と、
前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、
前記推定手段によって推定された関数に基づいてかぶり量を算出し、該かぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段
として機能させることを特徴とする画像処理プログラム。
Computer
Receiving means for receiving images;
First extraction means for extracting a region from the image received by the reception means;
Selecting means for selecting an area extracted by the first extracting means based on a predetermined rule;
Measuring means for measuring the luminance value and saturation value of the pixels in the region selected by the selecting means;
Estimating means for estimating a function indicating the degree of fogging in the image received by the receiving means from the luminance value measured by the measuring means;
Second extraction means for extracting an area of a document image taken from an image received by the reception means;
A determination means for determining whether or not the fog is generated only in the area by comparing the inside and outside of the area extracted by the second extraction means;
Control means for controlling so as not to remove the amount of fog when the judgment means judges that the fog is occurring only in the region;
Determining means for determining a correction target value of the luminance value in the background in the image received by the receiving means;
A fog amount is calculated based on the function estimated by the estimating means, and based on a distance from the achromatic color of the fog amount, a correction target value determined by the determining means, and a saturation value measured by the measuring means. First correcting means for correcting the saturation value;
A fog amount is calculated based on the function estimated by the estimating means, and a brightness value measured by the measuring means is corrected based on the fog amount and a correction target value determined by the determining means. An image processing program which functions as a correction means.
JP2012256307A 2012-11-22 2012-11-22 Image processing apparatus and image processing program Expired - Fee Related JP6003574B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012256307A JP6003574B2 (en) 2012-11-22 2012-11-22 Image processing apparatus and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012256307A JP6003574B2 (en) 2012-11-22 2012-11-22 Image processing apparatus and image processing program

Publications (2)

Publication Number Publication Date
JP2014103636A JP2014103636A (en) 2014-06-05
JP6003574B2 true JP6003574B2 (en) 2016-10-05

Family

ID=51025743

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012256307A Expired - Fee Related JP6003574B2 (en) 2012-11-22 2012-11-22 Image processing apparatus and image processing program

Country Status (1)

Country Link
JP (1) JP6003574B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6852369B2 (en) * 2016-11-30 2021-03-31 富士ゼロックス株式会社 Image processing equipment and image processing program
JP6874140B2 (en) * 2017-08-18 2021-05-19 富士フイルム株式会社 Document detection device, document detection method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001268326A (en) * 2000-03-23 2001-09-28 Minolta Co Ltd Image processing apparatus and image pickup device
JP4085580B2 (en) * 2001-02-20 2008-05-14 富士ゼロックス株式会社 Image processing device
JP4271085B2 (en) * 2004-06-03 2009-06-03 株式会社リコー Image correction apparatus, image reading apparatus, program, and storage medium
JP2006157155A (en) * 2004-11-25 2006-06-15 Hitachi Omron Terminal Solutions Corp Document camera
JP4600019B2 (en) * 2004-12-07 2010-12-15 カシオ計算機株式会社 Imaging apparatus, image processing method, and program

Also Published As

Publication number Publication date
JP2014103636A (en) 2014-06-05

Similar Documents

Publication Publication Date Title
JP5810628B2 (en) Image processing apparatus and image processing program
JP5488530B2 (en) Image processing apparatus and image processing program
JP5782838B2 (en) Image processing apparatus and image processing program
US8023766B1 (en) Method and system of processing an image containing undesirable pixels
JP5779089B2 (en) Edge detection apparatus, edge detection program, and edge detection method
JP5337563B2 (en) Form recognition method and apparatus
JP5640622B2 (en) Method for classifying red-eye object candidates, computer-readable medium, and image processing apparatus
JP2010286959A (en) Method, device and program for enhancing face image resolution
US11410278B2 (en) Automatic artifact removal in a digital image
JP6003574B2 (en) Image processing apparatus and image processing program
JP4441300B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium storing the program
JP2010074342A (en) Image processing apparatus, image forming apparatus, and program
JP5929282B2 (en) Image processing apparatus and image processing program
JP5887242B2 (en) Image processing apparatus, image processing method, and program
JP5978948B2 (en) Image processing apparatus and image processing program
KR20140099183A (en) Image Processing Apparatus, Image Processing Method, Coumputer Readable Recording Medium and Image Forming Apparatus
JP2014103565A (en) Image processing device and image processing program
US9648208B2 (en) Method and apparatus and using an enlargement operation to reduce visually detected defects in an image
JP5109518B2 (en) Image processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150819

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160628

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160705

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160719

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160822

R150 Certificate of patent or registration of utility model

Ref document number: 6003574

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees