JP6003574B2 - Image processing apparatus and image processing program - Google Patents
Image processing apparatus and image processing program Download PDFInfo
- 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
Links
Images
Description
本発明は、画像処理装置及び画像処理プログラムに関する。 The present invention relates to an image processing apparatus and an image processing program.
特許文献1には、入力された画像を所定の大きさからなる画素群に分割するステップと、分割された前記画素群における画素群濃度を算出するステップと、前記画素群のうち前記画像における注目画素の属する画素群の画素群濃度と当該注目画素の属する画素群に隣接する画素群の画素群濃度とに基づいて算出した当該注目画素に対する相対濃度と、当該注目画素の絶対濃度とに基づいて当該注目画素の出力値を算出するステップとを含むことを特徴とする画像処理方法によって、多値画像内で背景より相対的に暗いペンなどで書かれた文字等を高速に切り出し、文字認識等の前処理に使い、文字図形などのオブジェクトを強調し、理解し易さを損なわずに画像サイズを圧縮することが可能となることが開示されている。
特許文献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には、逆光補正を行うと画像中の明るい部分の色味が飛んでしまっており、また画像全体の色のバランスを適切に整えることが困難であったことを課題とし、入力画像内における特定画像の少なくとも一部を含む領域を検出する特定画像検出部と、上記検出された領域に属する画素に基づいて特定画像を代表する代表色を算出する代表色算出部と、代表色の明るさに基づいて階調補正のための第一補正曲線を取得する第一補正曲線取得部と、代表色を第一補正曲線によって補正し、補正後の代表色を構成する要素色毎の階調値に基づいて要素色毎の階調補正のための第二補正曲線を取得する第二補正曲線取得部と、入力画像を構成する画素のうち暗部を定義した色域に属する画素の階調値を第一補正曲線を用いて補正する第一補正部と、入力画像を構成する画素の要素色毎の階調値を第二補正曲線を用いて補正する第二補正部とを備える構成としたことが開示されている。
特許文献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値化を行うこととしたことが開示されている。
特許文献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.
本発明は、画像内のかぶりを除去する場合にあって、そのかぶりに類似する原稿内のデザインを除去してしまうことを防止するようにした画像処理装置及び画像処理プログラムを提供することを目的としている。 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
請求項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
請求項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
請求項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
請求項6の発明は、画像を受け付ける受付手段と、前記受付手段によって受け付けられた画像に基づいて、本来の画素の輝度値と該画像の画素の輝度値との差であるかぶり量を推定する推定手段と、前記受付手段によって受け付けられた画像から撮影されている原稿画像の領域を抽出する抽出手段と、前記抽出手段によって抽出された領域内と領域外の画像を比較することによって、かぶりが発生しているのは、該領域内だけであるか否かを判断する判断手段と、前記判断手段によってかぶりが発生しているのは前記領域内だけであると判断された場合は、かぶり量を除去することをしないように制御する制御手段と、前記受付手段によって受け付けられた画像内の画素の輝度値と彩度値を測定する測定手段と、前記受付手段によって受け付けられた画像内の下地における輝度値の補正目標値を決定する決定手段と、前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値と前記測定手段によって測定された彩度値の無彩色からの距離に基づいて、該彩度値を補正する第1の補正手段と、前記推定手段によって推定されたかぶり量と前記決定手段によって決定された補正目標値に基づいて、前記測定手段によって測定された輝度値を補正する第2の補正手段を具備することを特徴とする画像処理装置である。
The invention according to
請求項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
請求項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
請求項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
請求項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.
まず、本実施の形態を説明する前に、その前提となる技術について説明する。なお、この説明は、本実施の形態の理解を容易にすることを目的とするものである。
図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
また、デジタルカメラで撮影する場合のみでなく、スキャナ等においても、このかぶり画像は発生することがある。例えば、スキャナ(いわゆるフラッドベットスキャナ)では、コンタクトガラス上に開閉自在の圧板を設け、コンタクトガラス上に原稿を設置した後に圧板を閉じて原稿をスキャンするようにしている。しかし、原稿としてはシート状のものに限られず、ブック原稿(本、冊子等)も原稿として扱われることがあり、そのような場合にもコンタクトガラス上にブック原稿を設置し、原稿をスキャンすることになる。ところが、原稿としてブック原稿を用いた場合には、ブック原稿のページ綴じ部がコンタクトガラスから浮き上がってしまう。このようにブック原稿のページ綴じ部がコンタクトガラスから浮き上がってしまった場合には、ページ綴じ部が焦点面から離れてしまうため、浮き上がった部分のスキャン画像には、かぶりという画像劣化が発生する。 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
画像受付モジュール110は、かぶり量推定モジュール120と接続されており、画像を受け付けて、その画像をかぶり量推定モジュール120へ渡す。画像を受け付けるとは、例えば、スキャナ、カメラ等で画像を読み込むこと、ファックス等で通信回線を介して外部機器から画像を受信すること、ハードディスク(コンピュータに内蔵されているものの他に、ネットワークを介して接続されているもの等を含む)等に記憶されている画像を読み出すこと等が含まれる。画像は、多値画像(カラー画像を含む)である。受け付ける画像は、1枚であってもよいし、複数枚であってもよい。また、画像の内容として、ビジネスに用いられる文書(例えば、前述の名刺等)、広告宣伝用のパンフレット、ホワイトボードに書かれたもの等であってもよい。また、画像受付モジュール110は、デジタルフィルタ処理等によって補正をするようにしてもよい。例えば、手ぶれ補正等がある。画像受付モジュール110の処理例については、図3を用いて後述する。
The
かぶり量推定モジュール120は、画像受付モジュール110、画素値測定モジュール130と接続されており、画像受付モジュール110によって受け付けられた画像に基づいて、本来の画素の輝度値とその画像の画素の輝度値との差であるかぶり量を推定する。そして、推定したかぶり量を補正目標値決定モジュール140、彩度補正モジュール150に渡す。かぶり量推定モジュール120は、例えば、撮影対象文書の下地色の分布から各座標でのかぶりの量と傾斜の強さを推定する。具体例として、前述の特許文献2に記載の技術を用いてもよく、画像の予め定めた量子化点での輝度代表値を生成し、周囲の輝度代表値から各座標の推定輝度値を算出するようにしてもよい。
The fog
画素値測定モジュール130は、かぶり量推定モジュール120、補正目標値決定モジュール140と接続されており、画像受付モジュール110によって受け付けられた画像内の画素の彩度値を測定する。そして、測定した彩度値を補正目標値決定モジュール140に渡す。また、画素値測定モジュール130は、画像を走査して、各画素における彩度値を測定するようにしてもよい。走査方向については、後述する第5の実施の形態の画素値測定モジュール1640と同等の走査を行うようにしてもよい。また、画素の彩度値を測定するだけでなく、各画素の輝度値を測定するようにしてもよい。なお、画素値という場合は、彩度値、輝度値を含む。
The pixel
補正目標値決定モジュール140は、画素値測定モジュール130、彩度補正モジュール150と接続されており、画像受付モジュール110によって受け付けられた画像内の下地における輝度値の補正目標値を決定する。そして、決定した補正目標値を彩度補正モジュール150に渡す。補正目標値決定モジュール140は、かぶり量推定モジュール120によって推定されたかぶり量から、例えば、全面が原稿下地であると仮定した場合の輝度値の補正目標値を決定する。また、補正目標値決定モジュール140は、予め定めた固定の補正目標値、又はかぶりの輝度分布から予め定めた条件を満たすものを算出して決定するようにしてもよい。より具体的には、例えば(1)画像内の画素の輝度値を集計して輝度値ヒストグラムを生成して、予め定めた条件を満たす画素(例えば、明るい方から上位10%にある画素)の輝度値としてもよいし、(2)操作者が輝度値を設定するようにしてもよい。
The correction target
彩度補正モジュール150は、補正目標値決定モジュール140、出力モジュール160と接続されており、かぶり量推定モジュール120によって推定されたかぶり量(以下、推定輝度値ともいう)と補正目標値決定モジュール140によって決定された補正目標値と画素値測定モジュール130によって測定された彩度値の無彩色からの距離に基づいて、その彩度値を補正する。そして、彩度値を補正した画像を出力モジュール160に渡す。彩度値を補正した画像とは、かぶりを除去した画像である。
また、彩度補正モジュール150は、画素値測定モジュール130によって測定された彩度値が無彩色に近くなるほど、彩度値の補正量を少なくするように補正するようにしてもよい。例えば、色空間上で無彩色となる軸から対象としている彩度までの距離に対して、軸上で抑制率(彩度の補正を少なくする方向へ向かわせるパラメタ)が最小値をとるような関係から抑制率を算出するようにしてもよい。
また、彩度補正モジュール150は、補正目標値とかぶり量との差分に基づいて、彩度値を補正するようにしてもよい。具体的には、補正目標値とかぶり量との差分の大きさに連動して、彩度の補正量を多くしてもよい。より具体的には、差分に対して、1次以上の単調増加な多項式関数によって増加させるようにしてもよい。
彩度補正モジュール150の処理については、(1)式、(2)式、(3)式を用いて後述する。
The
Further, the
Further, the
The processing of the
出力モジュール160は、彩度補正モジュール150と接続されており、彩度補正モジュール150によって彩度が補正された画像を受け取り、その画像を出力する。画像を出力するとは、例えば、プリンタ等の印刷装置で印刷すること、ディスプレイ等の表示装置に表示すること、ファックス等の画像送信装置で画像を送信すること、画像データベース等の画像記憶装置へ画像を書き込むこと、メモリーカード等の記憶媒体に記憶すること、他の情報処理装置へ渡すこと等が含まれる。また、画像受付モジュール110によって受け付けられた画像と対応付けて出力するようにしてもよい。
The
図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
FIG. 3 is an explanatory diagram illustrating an example of processing performed by the
ステップ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
In step S206, the pixel
In step S208, the correction target
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
ステップS210では、彩度補正モジュール150が、画像の彩度を補正する。彩度補正モジュール150は、かぶり量推定モジュール120によって推定されたかぶり量の大小により、彩度を強めるようにする。L*ab空間では、次のような(1)式、(2)式、(3)式等で彩度成分(a、b)を強める。ここで、Cはかぶり量とする。また、Cは、第3の実施の形態で説明する(8)式の輝度の補正量Cである。これらの式では、有彩色部分は輝度補正分相当の彩度向上が適用され、無彩色部分に対しては補正処理を行わないようになっている。なお、彩度成分(a、b)が128である場合は無彩色であるとする。
彩度補正モジュール150は、補正目標値とかぶり量の差分が大きくなると、彩度値の補正量を多くするように補正している。これは後述の(8)式のC((8)式の2段目の式参照)が大きくなることである。より具体的には、差分に対して、(8)式の3段目の式のような1次以上の単調増加な多項式関数によって増加させるようにしてもよい。
なお、ステップS210において、彩度補正モジュール150は輝度値を補正するようにしてもよい。なお、輝度値の補正については、第3の実施の形態で用いられている輝度値の補正方法を用いるようにしてもよい。
In step S210, the
The
In step S210, the
図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
ステップS212では、出力モジュール160が、彩度を補正した画像を出力する。例えば、プリンタでかぶりを除去した画像を印刷する。
In step S212, the
<第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
補正目標値決定モジュール140は、画素値測定モジュール130、彩度補正可否判断モジュール145と接続されている。第1の実施の形態の補正目標値決定モジュール140と同等であるが、決定した補正目標値を彩度補正可否判断モジュール145に渡す。
The correction target
彩度補正可否判断モジュール145は、補正目標値決定モジュール140、彩度補正モジュール150と接続されている。彩度補正可否判断モジュール145は、推定輝度値の傾き、推定輝度値と目標輝度値の差分が大きい場合、下地以外の文字部等がつぶれすぎている場合があるので補正処理を常に実施することはしないようにしている。
彩度補正可否判断モジュール145は、かぶり量推定モジュール120によって推定されたかぶり量と補正目標値決定モジュール140によって決定された補正目標値との差分に基づいて、彩度補正モジュール150による補正を行うか否かを判断する。この判断処理については、(4)式を用いて後述する。
また、彩度補正可否判断モジュール145は、画像受付モジュール110によって受け付けられた画像内の各画素におけるかぶり量推定モジュール120によって推定されたかぶり量同士の差分に基づいて、彩度補正モジュール150による補正を行うか否かを判断するようにしてもよい。この判断処理については、(5)式、(6)式を用いて後述する。
The saturation correction
Whether the saturation correction
Further, the saturation correction
彩度補正モジュール150は、彩度補正可否判断モジュール145、出力モジュール160と接続されている。第1の実施の形態の彩度補正モジュール150と同等であるが、彩度補正可否判断モジュール145によって補正を行うと判断された場合に、補正を行う。
The
図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
In step S704, the fog
In step S706, the pixel
In step S708, the correction target
ステップS710では、彩度補正可否判断モジュール145が、彩度補正処理を行うか否かを判断し、行う場合はステップS712へ進み、それ以外の場合はステップS714へ進む。
例えば、以下の(4)式、(5)式、(6)式のいずれかにおける計算値Eが予め定めた値を超えている場合は補正を実施しないようにする。
この(4)式は、推定輝度値と補正目標値の差分を利用するものである。図8は、彩度補正可否モジュール145による処理例を示す説明図である。図8の例で示すと、目標輝度(点線)と推定輝度(一点鎖線)との間隔の最大値である。
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.
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
ステップS712では、彩度補正モジュール150が、画像の彩度を補正する。
ステップS714では、出力モジュール160が、彩度を補正した画像を出力する。
In step S712, the
In step S714, the
前述の図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
Here, when only the luminance is corrected based on the fogging amount, the resulting image becomes a corrected
In order to restore the
<第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
The photographing
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
画素値測定モジュール130は、かぶり量推定モジュール120、補正目標値決定モジュール140と接続されており、画像受付モジュール110によって受け付けられた画像内の画素の画素値を測定する。そして、測定した画素値を補正目標値決定モジュール140に渡す。また、画素値測定モジュール130は、画像を走査して、各画素における画素値を測定する。
The pixel
補正目標値決定モジュール140は、画素値測定モジュール130、補正モジュール910と接続されており、画像受付モジュール110によって受け付けられた画像内の下地における輝度値の補正目標値を決定する。そして、決定した補正目標値を補正モジュール910に渡す。
The correction target
輝度補正モジュール950は、補正目標値決定モジュール140、出力モジュール160と接続されている補正モジュール910内にあり、かぶり量推定モジュール120によって推定されたかぶり量と補正目標値決定モジュール140によって決定された補正目標値に基づいて、画素値測定モジュール130によって測定された輝度値を補正する。そして、輝度値を補正した画像を彩度補正モジュール150又は出力モジュール160に渡す。輝度値を補正した画像とは、かぶりを除去した画像である。
また、輝度補正モジュール950は、かぶり量推定モジュール120によって推定されたかぶり量と補正目標値決定モジュール140によって決定された補正目標値との差分を基本補正量とし、その基本補正量を画素値測定モジュール130によって測定された輝度値とそのかぶり量との差分に基づいた係数によって変更し、その変更した基本補正量に基づいて、その輝度値を補正するようにしてもよい。この処理については、(7)式、(8)式を用いて後述する。
The
Further, the
さらに、輝度補正モジュール950は、画素値測定モジュール130によって測定された輝度値とかぶり量との差分が大きくなると、基本補正量を小さくするような係数とするようにしてもよい。「基本補正量を小さくする」とは、「基本補正量の修正量を大きくする」ことであり、下地部分における補正量と比較して、測定された輝度値の補正量は少ないことを意味する。例えば、黒色の文字等に対してかぶり量の除去は少なくすることになる。この処理については、(8)式を用いて後述する。
さらに、輝度補正モジュール950は、画素値測定モジュール130によって測定された輝度値とかぶり量との差分が予め定めた閾値以上又は大きい場合は、その輝度値の補正を行わないようにしてもよい。この処理については、(8)式を用いて後述する。
また、輝度補正モジュール950は、基本補正量を画素値測定モジュール130によって測定された輝度値とかぶり量との差分と基本補正量に基づいた係数によって変更するようにしてもよい。この処理については、(9)式を用いて後述する。
Further, the
Further, the
Further, the
彩度補正モジュール150は、補正目標値決定モジュール140、出力モジュール160と接続されている補正モジュール910内にある。
彩度補正モジュール150と輝度補正モジュール950の処理は、いずれが先にやってもよいし(彩度補正モジュール150が先に処理する場合は、その処理結果の画像を輝度補正モジュール950が処理し、輝度補正モジュール950が先に処理する場合は、その処理結果の画像を彩度補正モジュール150が処理する)、並列して処理を行うようにしてもよい。
The
Either the
出力モジュール160は、補正モジュール910と接続されており、彩度補正モジュール150と輝度補正モジュール950によって補正された画像を受け取り、その画像を出力する。
The
図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
FIG. 11 is an explanatory diagram illustrating an example of processing performed by the
ステップ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
In step S1006, the pixel
In step S1008, the correction target
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
ステップ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
In step S1012, the
FIG. 13 is an explanatory diagram illustrating an example of processing performed by the
下地部分か下地以外の部分であるかについては、
(推定輝度値−測定輝度値)<閾値th ならば、下地部分であると判断し、
(推定輝度値−測定輝度値)≧閾値th ならば、下地以外の部分であると判断する。なお、ここでの閾値thは、人間の目で見て下地以外の部分(例えば、文字)であると判明できる程度の値となり、予め定めた値である。
そして、下地部分であると判断された部分については、
補正量=(補正目標値−推定輝度値)
を計算し(この補正量は基本補正量となる)、下地以外の部分であると判断された部分については、
補正量=(補正目標値−推定輝度値)×補正レートR
を計算する。そして、補正量を測定輝度値に加算する。補正レートRは、1以下の値であり、次の(7)式のように計算される。測定輝度値(v)と推定輝度値(e)の差分が大きいほど係数である補正レート(R)が0に近い値となる。さらに、(7)式の外側のmax()式によって0が下限となり、差分が予め定めた値を超えると補正しないことになる。つまり、補正レート(R)は0となり、補正しないこと(測定輝度値そのままにしておくこと)となる。なお、補正強度パラメタρは予め定めた値とする。
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.
また、輝度補正モジュール950は、(7)式の代わりに次の(9)式を採用してもよい。
ステップS1014では、出力モジュール160が、補正した画像を出力する。例えば、プリンタでかぶりを除去した画像を印刷する。
In step S1014, the
<第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
The correction target
補正可否判断モジュール1445は、補正目標値決定モジュール140、補正モジュール910と接続されている。補正可否判断モジュール1445は、推定輝度値の傾き、推定輝度値と目標輝度値の差分が大きい場合、下地以外の文字部等がつぶれすぎている場合があるので補正処理を常に実施することはしないようにしている。
補正可否判断モジュール1445は、かぶり量推定モジュール120によって推定されたかぶり量と補正目標値決定モジュール140によって決定された補正目標値との差分に基づいて、彩度補正モジュール150と輝度補正モジュール950による補正を行うか否かを判断する。この判断処理については、前述の彩度補正可否判断モジュール145による(4)式を用いた判断処理と同等である。
また、補正可否判断モジュール1445は、画像受付モジュール110によって受け付けられた画像内の各画素におけるかぶり量推定モジュール120によって推定されたかぶり量同士の差分に基づいて、彩度補正モジュール150と輝度補正モジュール950による補正を行うか否かを判断するようにしてもよい。この判断処理については、前述の彩度補正可否判断モジュール145による(5)式、(6)式を用いた判断処理と同等である。
The correction
Based on the difference between the fog amount estimated by the fog
The correction
補正モジュール910内の彩度補正モジュール150は、第3の実施の形態の彩度補正モジュール150と同等であるが、補正可否判断モジュール1445によって補正を行うと判断された場合に、補正を行う。
補正モジュール910内の輝度補正モジュール950は、第3の実施の形態の輝度補正モジュール950と同等であるが、補正可否判断モジュール1445によって補正を行うと判断された場合に、補正を行う。
The
The
図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
In step S1504, the fog
In step S1506, the pixel
In step S1508, the correction target
ステップS1510では、補正可否判断モジュール1445が、補正処理を行うか否かを判断し、行う場合はステップS1512へ進み、それ以外の場合はステップS1516へ進む。
例えば、前述の(4)式、(5)式、(6)式のいずれかにおける計算値Eが予め定めた値を超えている場合は補正を実施しないようにすることは、図7の例に示すフローチャート内のステップS710と同等である。
In step S1510, the correction
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
In step S1514, the
In step S1516, the
前述の図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
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
<第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
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
画像受付モジュール110は、非エッジ領域抽出モジュール1620と接続されており、画像を受け付けて、その画像を非エッジ領域抽出モジュール1620へ渡す。画像受付モジュール110のここでの処理例については、図18を用いて後述する。
The
非エッジ領域抽出モジュール1620は、画像受付モジュール110、検査領域選択モジュール1630と接続されている。非エッジ領域抽出モジュール1620は、画像受付モジュール110によって受け付けられた画像から領域を抽出し、その抽出した領域を検査領域選択モジュール1630に渡す。
また、非エッジ領域抽出モジュール1620は、予め定めた大きさ以上又はより大きい領域を抽出し、その領域を抽出できなかった場合は、検査領域選択モジュール1630、画素値測定モジュール1640、画素値分布推定モジュール1650、補正目標値決定モジュール140、補正モジュール910、出力モジュール160の処理を行わないようにしてもよい。また、この場合、領域を抽出できなかった旨(つまり、かぶりの除去ができなかったこと)を出力するようにしてもよい。
ここで、抽出対象の領域とは、色値がなだらかで連続した領域である。言い換えると、エッジのない領域、又はエッジに囲まれた領域である。
非エッジ領域抽出モジュール1620の処理例については、図19、図20を用いて後述する。
The non-edge
Further, the non-edge
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
検査領域選択モジュール1630は、非エッジ領域抽出モジュール1620、画素値測定モジュール1640と接続されている。検査領域選択モジュール1630は、非エッジ領域抽出モジュール1620によって抽出された領域を予め定めた規則に基づいて選択し、その選択した領域を画素値測定モジュール1640に渡す。
また、検査領域選択モジュール1630における予め定めた規則は、非エッジ領域抽出モジュール1620によって抽出された領域の大きさによって定められているようにしてもよい。検査領域選択モジュール1630は、予め定めた規則として、さらに非エッジ領域抽出モジュール1620によって抽出された領域の輝度又は彩度によって定められているようにしてもよい。検査領域選択モジュール1630は、予め定めた規則として、さらに非エッジ領域抽出モジュール1620によって抽出された領域の彩度の分散値、画像における位置、外周の大きさのいずれか一つ以上によって定められているようにしてもよい。
検査領域選択モジュール1630の処理例については、図21を用いて後述する。
The inspection
Further, the predetermined rule in the inspection
A processing example of the inspection
画素値測定モジュール1640は、検査領域選択モジュール1630、画素値分布推定モジュール1650と接続されている。画素値測定モジュール1640は、検査領域選択モジュール1630によって選択された領域内の画素の画素値(輝度、彩度)を測定し、測定結果を画素値分布推定モジュール1650に渡す。画素値の測定には、予め定めた方向に画像内を走査しながら画素値(輝度、彩度)を測定する。
また、画素値測定モジュール1640が行う処理では、画素値を測定する走査方向として水平方向、垂直方向、斜め方向、楕円状のいずれか一つ以上であるようにしてもよい。水平方向と垂直方向の組み合わせ、右上斜め方向と右下斜め方向の組み合わせのように2種類の走査方向であってもよいし、楕円状に走査するように1種類の走査方向であってもよいし、3種類以上の走査方向の組み合わせであってもよい。
画素値測定モジュール1640の処理例については、図22、図23を用いて後述する。
The pixel
In the processing performed by the pixel
A processing example of the pixel
画素値分布推定モジュール1650は、画素値測定モジュール1640、補正目標値決定モジュール140と接続されている。画素値分布推定モジュール1650は、画素値測定モジュール1640によって測定された画素値から、画像受付モジュール110によって受け付けられた画像におけるかぶりの度合いを示す関数を推定し、その推定した関数を補正モジュール910に渡す。かぶりの度合いを示す関数としては、1次関数であってもよいし、2次以上の関数であってもよい。
また、画素値分布推定モジュール1650は、検査領域選択モジュール1630によって選択された領域内の画素の画素値(輝度値)を通る関数を推定するようにしてもよい。
画素値分布推定モジュール1650の処理例については、図24、図25を用いて後述する。
The pixel value
Further, the pixel value
A processing example of the pixel value
補正目標値決定モジュール140は、画素値分布推定モジュール1650、補正モジュール910と接続されており、画像受付モジュール110によって受け付けられた画像内の下地における輝度値の補正目標値を決定し、その決定した補正目標値を補正モジュール910に渡す。
The correction target
補正モジュール910内の輝度補正モジュール950は、画素値分布推定モジュール1650によって推定された関数に基づいて、画像受付モジュール110によって受け付けられた画像からかぶりを除去し、そのかぶりを除去した画像を出力モジュール160に渡す。つまり、画素値分布推定モジュール1650によって推定された関数に基づいてかぶり量を算出し、そのかぶり量と補正目標値決定モジュール140によって決定された補正目標値に基づいて、画素値測定モジュール1640によって測定された輝度値を補正する。
また、輝度補正モジュール950は、画素値測定モジュール1640による走査方向が複数方向あり、その走査方向が交差する位置におけるかぶりの値は、その走査に対して画素値分布推定モジュール1650によって推定された複数の関数によって求められた値に基づいて算出するようにしてもよい。走査線上にない画素にあっては、走査線上の画素におけるかぶりの値を用いて、その画素からの距離に応じてかぶりの値を算出すればよい。なお、かぶりの値とは、受け付けた画像の画素値と本来の地肌値(かぶりがない状態で撮影した画像の画素値)との差である。
輝度補正モジュール950の処理例については、図26、図27、図28を用いて後述する。
The
Also, the
A processing example of the
補正モジュール910内の彩度補正モジュール150は、画素値分布推定モジュール1650によって推定された関数に基づいてかぶり量を算出し、そのかぶり量と補正目標値決定モジュール140によって決定された補正目標値と画素値測定モジュール1640によって測定された彩度値の無彩色からの距離に基づいて、その彩度値を補正する。前述の実施の形態における彩度補正モジュール150と同等の処理を行う。また、画素値分布推定モジュール1650によって推定された関数に基づいてかぶり量を算出することについては、輝度補正モジュール950と同等の処理を行う。また、輝度補正モジュール950の処理結果を流用してもよい。逆に、彩度補正モジュール150による処理結果を輝度補正モジュール950が流用するようにしてもよい。
The
出力モジュール160は、補正モジュール910と接続されており、彩度補正モジュール150と輝度補正モジュール950によって補正(かぶり除去)された画像を受け取り、その画像を出力する。
The
図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
FIG. 18 is an explanatory diagram illustrating an example of processing performed by the
ステップ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
19 and 20 are explanatory diagrams illustrating an example of processing performed by the non-edge
The
2値化モジュール1920は、ソーベルフィルターモジュール1910、白黒反転モジュール1930と接続されており、ソーベルフィルターモジュール1910によってエッジが検出された画像を受け取り、それに対して2値化処理を行って、その2値化処理の結果画像を白黒反転モジュール1930に渡す。ここでの2値化処理は、知られている2値化処理を採用すればよい。この処理によってエッジ部分は黒となり、他の部分は白となる。
白黒反転モジュール1930は、2値化モジュール1920、ラベリングモジュール1940と接続されており、2値化モジュール1920によって2値化された画像を受け取り、それに対して白黒反転処理を行って、その白黒反転処理の結果画像をラベリングモジュール1940に渡す。この処理によってエッジ部分は白となり、他の部分は黒となる。
The
The 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
The small
FIG. 20 shows an example of an image obtained as a result of performing the above processing on the captured
Note that the non-edge
ステップS1706では、検査領域選択モジュール1630が、かぶりの傾斜を推定するのに適している領域を抽出する。
検査領域選択モジュール1630は、ステップS1704で抽出した領域の特徴量を抽出する。そして、(10)式の識別関数にしたがって、各領域の(10)式の値を算出し、その値によって領域(ここでは前述のマスク画像)を選択する。例えば、ステップS1704で抽出した領域内で最大値を有する領域を選択する。
(10)式の右辺のxijは特徴量である。検査領域選択モジュール1630が、これらの特徴量を各領域(i)から抽出する。
xi0は、領域の幅若しくは高さのいずれか、又は幅×高さ(いわゆる外接矩形の面積)であってもよい。
xi1は、領域の面積である。
xi2は、領域の画素密度である。
xi3は、領域内の画素の輝度(例えば、L*ab色空間の場合はL*の値)の平均値である。
xi4は、領域内の画素の彩度(例えば、L*ab色空間の場合はa,bの値)の平均値である。
xi5は、領域内の画素の彩度の分散値である。
xi6は、領域(マスク画像)の重心とステップS1702で受け付けた画像の中心との距離である。
xi7は、領域の外周輪郭の長さ/外接矩形の周囲長である。
In step S1706, the examination
The inspection
X ij on the right side of the equation (10) is a feature quantity. The inspection
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)の重み(w4)は負の数である。
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)の重み(w5)は負の数である。
撮影時に目的とする領域は意図的に画像中央になるようにしているのが一般的である。したがって、領域の重心(領域の中心であってもよい)は画像の中央寄りである領域を選択できるように、xi6を採用してもよい。なお、この距離(xi6)の重み(w6)は負の数である。
風景画の領域の外周は外接矩形の外周と比較して凹凸が多い。また、名刺の背景部等は矩形であり、その外周は直線状であることが多い。したがって、風景画を選択しないように外周輪郭が短い領域を選択できるように、xi7を採用してもよい。なお、この外周輪郭(xi7)の重み(w7)は負の数である。
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である。
ステップ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
22 and 23 are explanatory diagrams illustrating an example of processing performed by the pixel
A
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,
また、走査における予め定められた規則として、図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)式とする。
24 and 25 are explanatory diagrams illustrating processing examples performed by the pixel value
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).
図24(b)の例は、有効なデータがあるラインを実線で示し、有効なデータがないライン(無効なデータだけのライン)を点線で示したものである。有効なデータがあるラインとしては、ライン2204〜2216、ライン2232〜2240があり、有効なデータがないラインとしては、ライン2202、2218、ライン2222〜2230、2242がある。
図25(a)の例は、有効なデータがあるラインにおけるグラフを示している。ライン2204〜2216のそれぞれにおいて、同様のグラフで示すことができる。これらに対して最小二乗法等を用いて、輝度値を通る関数を推定する。例えば、横方向のラインでの関数は(18)式のように表すことができる。なお、各ラインにおいて、有効なデータ数が予め定めた数よりも少ない場合は、そのデータは用いないで関数を推定する。図25(b)の例において、(18)式は一点鎖線で表している。
縦方向のラインを用いた関数の推定も、前述した横方向のラインを用いた関数の推定と同等に行う。
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
The example of FIG. 25A shows a graph in a line with valid data. A similar graph can be shown for each of the
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
ステップS1714では、彩度補正モジュール150が、画像の彩度を補正する。ステップS1710で推定された関数に基づいてかぶり量を算出し、そのかぶり量とステップS1712で決定された補正目標値とステップS1708で測定された彩度値の無彩色からの距離に基づいて、その彩度値を補正する。前述の実施の形態における彩度補正モジュール150と同等の処理を行う。また、画素値分布推定モジュール1650によって推定された関数に基づいてかぶり量を算出することについては、ステップS1716と同等の処理を行う。
In step S1714, the
ステップ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)式を用いて算出する。
26, 27, and 28 are explanatory diagrams illustrating processing examples performed by the
In the example of FIG. 26, four intersections in the region 2610 (that is, the
The luminance value at the
そして、このような交点ではない画素、例えば図27に示す中間点2722における輝度は、(20)式を用いて算出する。(20)式は、中間点2722における輝度を周囲の4つの交点の輝度によって算出するものである。したがって、交点以外の画素における(20)式による算出は、交点における輝度値を算出した後に行う。
そして、(21)式によりかぶり量を算出する。
図28は、かぶり量を除去した様子を3次元的に表現したものである。x軸、y軸は画像の位置を示し、z軸は輝度値を示す空間である。灰色の面がかぶりの画像であり、画像全体を覆っているように位置している。そして、薄い格子模様の面が補正した後の画像の輝度を示している。p*は、図28の例に示すように、前述(1)に示した画像における明るい輝度値である。これに合わせるように、各点における輝度を上げるようにしてかぶりを除去している。図28では、中間点2722の輝度を引き上げていることを示している。
Then, the fogging amount is calculated by the equation (21).
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
ステップS1718では、出力モジュール160が、補正した画像を出力する。例えば、プリンタでかぶりを除去した画像を印刷する。
In step S1718, the
<第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
補正可否判断モジュール1445は、補正目標値決定モジュール140、補正モジュール910と接続されており、画素値分布推定モジュール1650によって推定された関数に基づいてかぶり量を算出し、そのかぶり量と補正目標値決定モジュール140によって決定された補正目標値との差分に基づいて、彩度補正モジュール150と輝度補正モジュール950による補正を行うか否かを判断する。
また、補正可否判断モジュール1445は、画素値分布推定モジュール1650によって推定された関数に基づいてかぶり量を算出し、画像受付モジュール110によって受け付けられた画像内の各画素におけるかぶり量同士の差分に基づいて、彩度補正モジュール150と輝度補正モジュール950による補正を行うか否かを判断するようにしてもよい。
補正モジュール910内の彩度補正モジュール150は、第5の実施の形態の彩度補正モジュール150と同等であるが、補正可否判断モジュール1445によって補正を行うと判断された場合に、補正を行う。
補正モジュール910内の輝度補正モジュール950は、第5の実施の形態の輝度補正モジュール950と同等であるが、補正可否判断モジュール1445によって補正を行うと判断された場合に、補正を行う。
The correction
Further, the correction
The
The
図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
In step S3004, the non-edge
In step S3006, the inspection
In step S3008, the pixel
In step S3010, the pixel value
In step S3012, the correction target
In step S3014, the correction
In step S3016, the
In step S3018, the
In step S3020, the
前述の図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
On the other hand, in the fifth embodiment and the sixth embodiment, the
<第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
準平坦領域抽出モジュール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
サンプリング領域選択モジュール3120は、色解析モジュール3122、識別関数モジュール3124、領域選択モジュール3126を有しており、準平坦領域抽出モジュール3110、かぶり量推定モジュール3130と接続されている。サンプリング領域選択モジュール3120は、準平坦領域抽出モジュール3110によって抽出された複数の非エッジ領域からかぶり量推定に適した非エッジ領域を選択する。つまり、背景領域を選択する。色解析モジュール3122は、非エッジ領域の色を解析する。つまり、非エッジ領域の座標から、対象としている元の画像内のその座標の画素値を抽出し、その非エッジ領域の色を解析する。識別関数モジュール3124は、非エッジ領域の色に識別関数を適用して、背景領域を示す値を算出する。領域選択モジュール3126は、識別関数モジュール3124によって算出された値を用いて、かぶり量推定に適した非エッジ領域を選択する。
The sampling
かぶり量推定モジュール3130は、ラインサンプリングモジュール3132、多モデル関数推定モジュール3134、平面輝度推定モジュール3136を有しており、サンプリング領域選択モジュール3120、輝度かぶり補正モジュール3140と接続されている。かぶり量推定モジュール3130は、前述の実施の形態における「かぶり量の推定処理」に該当するものである。ラインサンプリングモジュール3132は、予め定められた走査線(ライン)を複数設定し、領域選択モジュール3126で選択した領域内外の色値(輝度値)を取得する。
多モデル関数推定モジュール3134は、対象としている画像内の走査線毎にかぶり量を推定する複数の関数の情報量を算出し、その情報量に基づいてその走査線毎に適用すべき関数を選択する。そして、選択された走査線毎の関数の情報量と複数の関数間の差分ノルムに基づいて、関数の組み合わせを選択する。また、関数を選択するにあたって、走査線毎の画素の輝度値の分布に基づいて、選択すべきでない関数を除外し、残った関数内から関数を選択するようにしてもよい。「かぶり量を推定する複数の関数」、「関数の情報量」、「関数の選択」、「関数の組み合わせを選択」等については後述する。平面輝度推定モジュール3136は、多モデル関数推定モジュール3134によって選択された関数の組み合わせを走査線毎に適用することによって、かぶり量を推定する。
The fog
The multi-model
輝度かぶり補正モジュール3140は、座標毎補正量計算モジュール3142、輝度補正モジュール3144、彩度補正モジュール3146を有しており、かぶり量推定モジュール3130と接続されている。輝度かぶり補正モジュール3140は、対象としている画像からかぶり量を除去する。座標毎補正量計算モジュール3142は、対象としている画像内の各画素の補正量を算出する。輝度補正モジュール3144は、座標毎補正量計算モジュール3142によって算出された補正量に基づいて、対象としている画像の輝度を補正する。彩度補正モジュール3146は、座標毎補正量計算モジュール3142によって算出された補正量に基づいて、対象としている画像の彩度を補正する。
なお、前述の実施の形態における「かぶり量の推定処理」を、第7の実施の形態におけるかぶり量推定モジュール3130による処理に置換してもよい。
The luminance
Note that the “fogging amount estimation processing” in the above-described embodiment may be replaced with the processing by the fogging
図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
In step S3204, the
In step S3206, the
In step S3208, the
In step S <b> 3210, the
In step S3212, the multi-model
In step S3214, the planar
In step S3216, the luminance
以下に、かぶり量推定モジュール3130による処理を説明する。図33は、画像の走査線とライン・関数対応テーブル3350との関係例を示す説明図である。
ラインサンプリングモジュール3132は、対象としている画像3300を走査する。つまり、予め定められた走査線を設定し、その走査線上の画素値を取得する。そして、かぶり量を推定するが、前述の実施の形態(第1の実施の形態から第6の実施の形態)では、(16)式、(17)式に示したように、1次式による推定を行っている。そして、明度の補正目標値hは、(22)式のように算出している。
The
走査によって取得した画素値から、予め定められた関数セットから選択を行って、かぶり量の推定を行う。つまり、水平・垂直方向の関数r,cの関数モデル(前述の実施の形態では、(16)式、(17)式)を拡張する。
パラメタα,βに関して、(24)式、(25)式のような線形なモデルを設定する。これは、解析的に解が求められるようにするためである。
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.
これによって、各モデル毎に最尤推定解が求まった。次に、どの関数を選択すべきかについて説明する。
ここでは、AIC(赤池情報量規準:Akaike Information Criteria)を用いて選択する例を説明する。AICとは、カルバックライブラ情報量のモデル依存部分の期待値を統計的な漸近理論(関数のテーラー展開類似の処理)で、1/nオーダー(n:標本数)の項まで残した状態に変形したものを標本平均で近似したものである。特徴として、1/nオーダー項の近似部が「パラメタ数が多いほどペナルティが付与される」意味をなすので、複雑なモデルにしすぎない効用がある。
このAICを用いて、(24)式、(26)式、(28)式から(35)式、(36)式を算出する。
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).
図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とriにおける「関数の差分ノルム」は(37)式である。
そして、2つの走査線分の評価値(J)を、「隣接走査線のAIC値2つと関数の差分ノルム値の和」で定義し、(38)式のように表現する。(38)式は、各走査線のAIC値と関数の差分ノルムによって定義されている。
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).
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.
次に、有効領域が狭いときに高次元関数を使うと発散すると予想できるが、その対策について説明する。
走査線毎の画素の輝度値の分布に基づいて、選択すべきでない関数モデルを除外し、残った関数内から関数モデルを選択すればよい。具体的には、領域選択モジュール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
<第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
準平坦領域抽出モジュール3110は、エッジ強調モジュール3112、2値化モジュール3114、反転モジュール3116、ラベリングモジュール3118を有しており、サンプリング領域選択モジュール3120と接続されている。
サンプリング領域選択モジュール3120は、色解析モジュール3122、識別関数モジュール3124、領域選択モジュール3126を有しており、準平坦領域抽出モジュール3110、かぶり量推定モジュール3530と接続されている。
The quasi-flat
The sampling
かぶり量推定モジュール3530は、ライフサンプリングモジュール3532、多モデル大域微分関数推定モジュール3534、局所域定数推定モジュール3536、平面輝度推定モジュール3538を有しており、サンプリング領域選択モジュール3120、輝度かぶり補正モジュール3140と接続されている。前述の実施の形態における「かぶり量の推定処理」に該当するものである。ラインサンプリングモジュール3532は、予め定められた走査線(ライン)を複数設定し、領域選択モジュール3126で選択した領域内外の色値(輝度値)を取得する。そして、その走査線毎に隣の画素との差分を算出する。差分は、もちろんのことながら、対象としている画素の色値とその隣(走査線上における隣)の画素の色値との差分である。
多モデル大域微分関数推定モジュール3534は、ライフサンプリングモジュール3532によって算出された画素の差分に適用する複数の関数であって、対象としている画像内の走査線毎にかぶり量を推定するその複数の関数の情報量を算出し、その情報量に基づいてその走査線毎に適用すべき関数を選択する。そして、選択された走査線毎の関数の情報量と複数の関数間の差分ノルムに基づいて、関数の組み合わせを選択する。つまり、差分を入力とする複数の関数モデル内から適した関数(回帰関数)を推定することになる。これらの処理は、領域選択モジュール3126によって選択された領域毎に行う。
局所域定数推定モジュール3536は、多モデル大域微分関数推定モジュール3534によって選択された関数の積分関数を算出し、その積分関数の定数項を推定する。この定数項は、領域選択モジュール3126によって選択された領域全体のかぶり量の定数とその領域の背景色の固有量の和である。つまり、選択領域毎に推定した関数の線分関数を算出し、その定数項を推定する。
平面輝度推定モジュール3538は、多モデル大域微分関数推定モジュール3534によって選択された関数の組み合わせと局所域定数推定モジュール3536によって推定された定数項を領域内の走査線毎に適用することによって、かぶり量を推定する。これによって、複数領域の差分に関して回帰を実行するので、対象としている画像全体に広がるかぶりを定数項で推定可能となる。
The fog
The multi-model global differential
The local domain
The planar
輝度かぶり補正モジュール3140は、座標毎補正量計算モジュール3142、輝度補正モジュール3144、彩度補正モジュール3146を有しており、かぶり量推定モジュール3530と接続されている。
The luminance
図36は、第8の実施の形態が対象とする画像の例を示す説明図である。
図36(a)の例に示す画像3610は、対象としている画像であって、5つの互いに異なる色の背景を持つ領域(オレンジ色の背景の領域S0c0、薄緑色の背景の領域S1c1、薄青色の背景の領域S2c2、ピンク色の背景の領域S3c3、白色の背景の領域SNScNS)がある。ここで、座標x、yにおける本来の画素値は、(42)式のようになる。
An
図37は、第8の実施の形態が対象とする画像の走査線における例を示す説明図である。図37(a)、(b)、(c)の例に示すものは、図36(a)、(b)、(c)の例に示す画像にそれぞれ走査線3710、3720、3730を示したものである。それぞれの走査線上における画素値は、(45)式、(46)式、(47)式のようになる。
図38は、第8の実施の形態による処理例を示す説明図である。
第8の実施の形態では、(47)式の増減に関わる成分が影側(かぶり画像)にのみ存在することを利用する。
そのために、まず図38(a)の例に示す非エッジ領域マスク3810を利用する。非エッジ領域マスク3810は、反転モジュール3116によって生成された画像である。ここでの画素値は、(48)式のようになる。
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
前述の第7の実施の形態で用いた(29)式、(30)式、(31)式の各関数群の偏微分項は、次の(51)式、(52)式、(53)式のようになる。
図39は、ライン・関数対応テーブル内における差分ノルムの例を示す説明図である。つまり、第7の実施の形態で説明した図34と同等のものである。ただし、ライン・関数対応テーブル3950の行として走査線における差分データを示しており、列としてその走査線上における差分データを適用する微分関数を並べたものである。そして、各セルには、AIC値が記憶される。つまり、関数モデルを1次微分の空間で定義して、モデル選択方法は、第7の実施の形態と同等である。そして、(57)式が選択される。(57)式を積分して導出されたものが(58)式である。
図40は、第8の実施の形態による処理例を示す説明図である。
各領域毎に複数ラインの推定結果(関数モデルの組み合わせの選択)から(59)式を用いて定数項を推定する。
そこで、影かぶりの均等化のための補正量を決める必要がある。図41は、第8の実施の形態による処理例を示す説明図である。
まず、対象としている画像内で一番明度の高い領域(一般的には白色の背景部)の定数項(c^l)を全面で採用するという仮定をする。その上で、影かぶりの分布の予め定められたレベル(中央値、平均値、最頻値、高明度側から予め定められた率に位置する点など)を基準にして差分量を決める。(60)式の左辺は、領域固有色を白部分に合わせた状態に相当する。
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.
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.
図42は、第8の実施の形態による処理例を示す説明図である。前述の第5の実施の形態で説明した図21と同等のものである。
(10)式に示すように複数の特徴量の重み付き線形和の識別関数を利用して、最も傾斜かぶりを推定するに十分な領域で条件を満たすもの全てを選択する。
領域画像4210に対して識別関数の計算結果は、(61)式のように1.5である。
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
<第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
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
And when it actually image | photographs, it becomes the picked-up
On the other hand, the photographed
準平坦領域抽出モジュール3110は、エッジ強調モジュール3112、2値化モジュール3114、反転モジュール3116、ラベリングモジュール3118を有しており、サンプリング領域選択モジュール3120と接続されている。
サンプリング領域選択モジュール3120は、色解析モジュール3122、識別関数モジュール3124、領域選択モジュール3126を有しており、準平坦領域抽出モジュール3110、かぶり量推定モジュール3530と接続されている。
かぶり量推定モジュール3530は、ライフサンプリングモジュール3532、多モデル大域微分関数推定モジュール3534、局所域定数推定モジュール3536、平面輝度推定モジュール3538を有しており、サンプリング領域選択モジュール3120、かぶり有無処理モジュール4310と接続されている。
The quasi-flat
The sampling
The fog
かぶり有無処理モジュール4310は、原稿領域抽出モジュール4312、かぶり有無判断モジュール4314、制御モジュール4316を有しており、かぶり量推定モジュール3530、輝度かぶり補正モジュール3140と接続されている。かぶり有無処理モジュール4310は、対象としている画像内にかぶりが発生しているか否か(原稿内にグラデーション等があるか否か)を判断して、かぶりの除去処理(かぶり量の推定処理を含めてもよい)を行わせるか否かの制御を行う。
原稿領域抽出モジュール4312は、対象とする画像から撮影されている原稿画像の領域を抽出する。原稿領域抽出モジュール4312が抽出する領域は4角形であってもよい。原稿領域抽出モジュール4312による処理については、図45を用いて後述する。
The fogging presence /
The document
かぶり有無判断モジュール4314は、原稿領域抽出モジュール4312によって抽出された領域内と領域外の画像を比較することによって、かぶりが発生しているのは、その領域内だけであるか否かを判断する。「領域内と領域外の画像を比較する」とは、領域内の明度の分布と領域外の明度の分布の類似性を算出することである。なお、明度の分布ではなく、彩度の分布であってもよい。また、分布の類似性とは、X座標又はY座標の位置における明度又は彩度の値からなるグラフの形状における類似性をいい、具体的には、予め定められた範囲のX座標又はY座標の位置において、明度又は彩度の差分が予め定められた範囲に収まっている場合は、類似していると判断してもよい。領域内だけにかぶりが発生している場合とは、撮影対象である原稿内にグラデーションとしてのデザインが施されている場合である。つまり、そのグラデーションがかぶりと判断されてしまい、かぶり除去処理が行われ、原稿のデザインが損なわれることを防止する。
また、かぶり有無判断モジュール4314は、領域としての4角形の辺の外側と内側の画像を比較し、その内側の画像は、その4角形の辺から内側に予め定められた距離内にあって、かぶり量推定モジュール3530によってかぶり量が推定された領域を含むようにしてもよい。ここで、「かぶり量が推定された領域」とは、かぶりの補正が必要な領域であり、かぶり量が0より大である領域をいう。4角形の辺から予め定められた距離内に、かぶり量が推定された領域がない場合(その距離内にかぶりが発生していない場合)は、比較対象とならない(図48等の例では「不問」とされている辺)。
The fogging presence /
Further, the fogging presence /
制御モジュール4316は、かぶり有無判断モジュール4314によってかぶりが発生しているのは領域内だけであると判断された場合は、かぶり量を除去することをしないように制御する。つまり、輝度かぶり補正モジュール3140による処理を行わせない。それ例外の場合(かぶり有無判断モジュール4314によってかぶりが発生しているのは領域内だけでなく、領域外にも発生していると判断された場合)は、かぶり量を除去するように制御する。つまり、輝度かぶり補正モジュール3140による処理を行わせる。
When the fogging presence /
輝度かぶり補正モジュール3140は、座標毎補正量計算モジュール3142、輝度補正モジュール3144、彩度補正モジュール3146を有しており、かぶり有無処理モジュール4310と接続されている。
The luminance
図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
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
A photographed
かぶり有無判断モジュール4314が行う処理例について説明する。
前提として、カメラ等を用いて机(オフィス机等)等に原稿を設置して撮影する。なお、背景となる机等は、濃度の均一なものが望ましい。
(1) 原稿内部の明度分布を測定する。既存の手法を利用すればよい。
(2) かぶりを除去すべき領域(つまり、かぶり量が特定された領域)を特定する。その特定には、前述の実施の形態による手法を利用すればよい。
(3) (2)においてかぶり量が特定された領域を通る走査線A上の濃度値を取得する。この走査線Aが通る領域は、原稿領域抽出モジュール4312によって抽出された4角形の辺から内側に予め定められた距離内にあって、かぶり量推定モジュール3530によってかぶり量が推定された領域を含む。図48(a)の例に示す走査線4612がある。走査線Aと隣接する4角形の辺の外側を通る走査線B上の濃度値を取得する。図48(a)の例に示す走査線4614がある。そして、濃度分布の形状を比較する。例えば、互いの走査線上の各位置における各濃度値の差が予め定められた範囲内にある場合は、濃度分布の形状は類似している(全体にかぶりが発生している)と判断する。互いの走査線上の各位置における各濃度値の差が予め定められた範囲内にない場合は、濃度分布の形状は類似していない(原稿内にはかぶりと類似しているデザインが施されている)と判断する。
また、分布の類似性の評価は、例えば、原稿内部と外部の走査線上の分布関数f,gの定数項のズレを補正した差分関数のノルムの値の大きさを利用するようにしてもよい。
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
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. .
図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
Out-of-region comparison
Then, the scanning line passing through the out-of-region comparison
Here, in the out-of-region comparison
On the other hand, in the example of FIG. 49A, a
Out-of-region comparison
Then, the scanning line passing through the out-of-region comparison
Here, the shape of the density value is the same in the non-region
なお、ドントケア辺以外で一致、不一致の両方がある場合は、一致が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
図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
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
ホストバス5404は、ブリッジ5405を介して、PCI(Peripheral Component Interconnect/Interface)バスなどの外部バス5406に接続されている。
The
キーボード5408、マウス等のポインティングデバイス5409は、操作者により操作される入力デバイスである。ディスプレイ5410は、液晶表示装置又はCRT(Cathode Ray Tube)などがあり、各種情報をテキストやイメージ情報として表示する。
A
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
ドライブ5412は、装着されている磁気ディスク、光ディスク、光磁気ディスク、又は半導体メモリ等のリムーバブル記録媒体5413に記録されているデータ又はプログラムを読み出して、そのデータ又はプログラムを、インタフェース5407、外部バス5406、ブリッジ5405、及びホストバス5404を介して接続されているRAM5403に供給する。リムーバブル記録媒体5413も、ハードディスクと同様のデータ記録領域として利用可能である。
The
接続ポート5414は、外部接続機器5415を接続するポートであり、USB、IEEE1394等の接続部を持つ。接続ポート5414は、インタフェース5407、及び外部バス5406、ブリッジ5405、ホストバス5404等を介してCPU5401等に接続されている。通信部5416は、ネットワークに接続され、外部とのデータ通信処理を実行する。データ読み取り部5417は、例えばスキャナであり、ドキュメントの読み取り処理を実行する。データ出力部5418は、例えばプリンタであり、ドキュメントデータの出力処理を実行する。
The
なお、図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
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角形の辺から内側に予め定められた距離内にあって、前記推定手段によってかぶり量が推定された領域を含む
ことを特徴とする請求項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角形の辺から内側に予め定められた距離内にあって、前記推定手段によってかぶり量が推定された領域を含む
ことを特徴とする請求項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の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする請求項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の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする請求項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.
前記判断手段は、前記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の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする請求項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の補正手段は、前記判断手段によって補正を行うと判断された場合に、補正を行う
ことを特徴とする請求項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.
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)
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)
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 |
-
2012
- 2012-11-22 JP JP2012256307A patent/JP6003574B2/en not_active Expired - Fee Related
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 |