JP2006279441A - Image processing method, apparatus, and program - Google Patents
Image processing method, apparatus, and program Download PDFInfo
- Publication number
- JP2006279441A JP2006279441A JP2005094568A JP2005094568A JP2006279441A JP 2006279441 A JP2006279441 A JP 2006279441A JP 2005094568 A JP2005094568 A JP 2005094568A JP 2005094568 A JP2005094568 A JP 2005094568A JP 2006279441 A JP2006279441 A JP 2006279441A
- Authority
- JP
- Japan
- Prior art keywords
- image
- area
- priority
- repair
- pixel
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 12
- 230000008439 repair process Effects 0.000 claims abstract description 85
- 230000007547 defect Effects 0.000 claims abstract description 54
- 230000002950 deficient Effects 0.000 claims abstract description 22
- 239000000126 substance Substances 0.000 claims abstract description 6
- 238000006243 chemical reaction Methods 0.000 claims abstract description 5
- 238000000034 method Methods 0.000 claims description 52
- 230000008569 process Effects 0.000 claims description 43
- 238000001514 detection method Methods 0.000 claims description 19
- 230000000877 morphologic effect Effects 0.000 claims description 18
- 238000004364 calculation method Methods 0.000 description 110
- 239000000428 dust Substances 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 239000002699 waste material Substances 0.000 description 3
- 230000032683 aging Effects 0.000 description 2
- 239000006185 dispersion Substances 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000007373 indentation Methods 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 230000002411 adverse Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000005065 mining Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000003909 pattern recognition Methods 0.000 description 1
Images
Abstract
Description
本発明は画像処理、具体的に画像の修復などに用いられる画像処理方法および装置並びにそのためのプログラムに関するものである。 The present invention relates to an image processing method and apparatus used for image processing, specifically image restoration, and a program therefor.
近年、大容量記録媒体の低価格化に伴い個人が多量のデータを保存できるようになり、電子アルバムのような多量の画像データの保存、管理を行うシステムが個人が所有することが可能になっている。また、ユーザの代わりにユーザの写真画像データを電子アルバムのように管理するサービスも提供されている。これらの管理システムに求められる機能としては、デジタルカメラで撮像されたデジタル画像だけを管理するのではなく、写真フィルムや、写真プリント、紙などの媒体に形成された既存の写真画像をデジタル化して保存、管理すること(フォトマイニング)がある。 In recent years, with the cost reduction of large-capacity recording media, individuals can store a large amount of data, and it becomes possible for individuals to own a system for storing and managing a large amount of image data such as an electronic album. ing. In addition, a service for managing user photo image data like an electronic album instead of the user is also provided. The functions required of these management systems include digitizing existing photographic images formed on media such as photographic film, photographic prints, and paper, rather than managing only digital images captured by digital cameras. There is storage and management (photo mining).
フォトマイニングのサービスを提供するシステムは、媒体に形成された画像をスキャナなどの読取装置で読み取ってデジタル化するが、媒体の保管年数、保管環境によって、媒体上に糸屑が付着したり、カビが発生したりするなどのことがあるため、デジタル化して得た画像には、本来無い糸屑、カビなどが欠陥領域として現れてしまい、画質に悪い影響を与えてしまうという問題がある。 A system that provides a photomining service reads an image formed on a medium with a reading device such as a scanner and digitizes the image. However, depending on the storage age of the medium and the storage environment, lint may adhere to the medium. Therefore, there is a problem that in the image obtained by digitization, yarn waste, mold, and the like that are originally present appear as a defective area, and the image quality is adversely affected.
特許文献1には、媒体を読み取って得たデジタル画像から、本来無い欠陥領域の部分を修復する方法として、複数の媒体を読み取って得たデジタル画像を比較することによって、読取装置のCCDの欠陥場所やレンズ上のゴミの付着場所を見つけ、画像の該当する場所の部分に対して修復を行う方法が記載されている。
In
また、非特許文献1には、オペレータにより欠陥領域を指定し、指定された欠陥領域に対して修復を行う方法が記載されている。
しかしながら、特許文献1記載の方法は、読取装置のCCDの欠陥やレンズに付着したゴミなどにより、該読取装置により得られた画像の固定した位置に生じる欠陥領域を見つけて修復することができるが、媒体上の任意の場所に付着した糸屑などのゴミや、カビなどにより生じた欠陥領域を有する画像の修復に適用することができない。
However, the method described in
また、非特許文献1に記載の方法は、オペレータに負担をかける上に、熟練した技術者ではなければ、正確に指定することができないという問題がある。
In addition, the method described in
本発明は、上記事情に鑑み、媒体上に形成された画像を光電変換によって読み取って得たデジタル画像に対して、画像に本来無い微小物質が前記媒体上に付着したことに起因する欠陥領域を効率良く修復することができる画像処理方法および装置並びにそのためのプログラムを提供することを目的とするものである。 In view of the above circumstances, the present invention provides a digital image obtained by reading an image formed on a medium by photoelectric conversion. An object of the present invention is to provide an image processing method and apparatus that can be efficiently restored, and a program therefor.
本発明の画像処理方法は、媒体上に形成された画像を光電変換によって読み取って得たデジタル画像に対して、前記画像に本来無い微小物質が前記媒体上に付着したことに起因する欠陥領域を修復する画像処理方法において、
糸状で、かつ背景とのコントラストが強い微小領域を検出するための第1のモルフォロジーフィルタ、および/または背景とのコントラストが強く、かつ近接して存在する点状領域を検出するための第2のモルフォロジーフィルタを用いて前記欠陥領域を検出し、
検出された前記欠陥領域を修復対象領域とし、該修復対象領域の画像を該修復対象領域以外の画像に置き換えることによって前記欠陥領域を修復することを特徴とするものである。
According to the image processing method of the present invention, a defective area caused by a minute substance that is not originally included in the image is attached to the medium with respect to a digital image obtained by photoelectrically converting an image formed on the medium. In the image processing method to be restored,
A first morphological filter for detecting a microscopic region that is filamentous and has a strong contrast with the background; and / or a second filter for detecting a point-like region that has a strong contrast with the background and that is close to the background. Detecting the defect area using a morphological filter,
The detected defect area is set as a repair target area, and the defect area is repaired by replacing an image of the repair target area with an image other than the repair target area.
ここで、前記欠陥領域を修復する際に、検出された前記欠陥領域を膨張させて得た領域を前記修復対象領域とすることが好ましい。 Here, when the defect area is repaired, it is preferable that an area obtained by expanding the detected defect area is the repair target area.
本発明の画像処理装置は、媒体上に形成された画像を光電変換によって読み取って得たデジタル画像に対して、前記画像に本来無い微小物質が前記媒体上に付着したことに起因する欠陥領域を修復する画像処理装置において、
糸状で、かつ背景とのコントラストが強い微小領域を検出するための第1のモルフォロジーフィルタ、および/または背景とのコントラストが強く、かつ近接して存在する点状領域を検出するための第2のモルフォロジーフィルタを用いて前記欠陥領域を検出する欠陥領域検出手段と、
検出された前記欠陥領域を修復対象領域とし、該修復対象領域の画像を該修復対象領域以外の画像に置き換えることによって前記欠陥領域を修復する修復実行手段とを有してなることを特徴とするものである。
The image processing apparatus according to the present invention has a defect area caused by a minute substance that is not originally included in the image attached to the medium with respect to a digital image obtained by reading an image formed on the medium by photoelectric conversion. In the image processing apparatus to be restored,
A first morphological filter for detecting a microscopic region that is filamentous and has a strong contrast with the background; A defect area detecting means for detecting the defect area using a morphological filter;
And a repair execution means for repairing the defective area by replacing the detected defective area with a repair target area and replacing an image of the repair target area with an image other than the repair target area. Is.
本発明の画像処理装置は、前記欠陥領域検出手段により検出された前記欠陥領域を膨張させる膨張手段を有し、
前記修復実行手段が、前記膨張手段により膨張させられた前記欠陥領域を前記修復対象領域とするものであることが好ましい。
The image processing apparatus of the present invention has expansion means for expanding the defective area detected by the defective area detection means,
It is preferable that the repair execution unit sets the defect area expanded by the expansion unit as the repair target area.
また、本発明の画像処理装置は、前記欠陥領域検出手段により検出された前記欠陥領域以外の領域における欠陥領域をユーザに指定させるための欠陥領域指定手段をさらに備え、前記修復実行手段が、前記欠陥領域指定手段により指定された欠陥領域も前記修復対象領域とするものであることがより好ましい。 The image processing apparatus of the present invention further includes a defect area designating unit for allowing a user to designate a defect area in an area other than the defect area detected by the defect area detection unit, and the repair executing unit includes the repair execution unit, More preferably, the defect area designated by the defect area designation means is also the repair target area.
本発明の画像処理方法を、コンピュータに実行させるプログラムとして提供してもよい。 You may provide the image processing method of this invention as a program which makes a computer perform.
本発明の画像処理方法および装置によれば、写真プリントや紙などの印刷媒体、写真フィルムなどは経年保管により付着されたゴミのほとんどが糸屑またはカビであることに着目し、このようなゴミの特徴に応じて、媒体を読み取って得た画像から、糸状で、かつ背景とのコントラストが強い微小領域を検出するための第1のモルフォロジーフィルタ、および/または背景とのコントラストが強く、かつ近接して存在する点状領域を検出するための第2のモルフォロジーフィルタを用いて欠陥領域を検出して修復を行うようにしているので、オペレータに負担をかけずに画像の修復を実現している。 According to the image processing method and apparatus of the present invention, attention is paid to the fact that most of dust attached to a print medium such as a photographic print or paper, a photographic film, or the like as a result of aging storage is yarn waste or mold. Depending on the characteristics of the first morphological filter for detecting a microscopic region having a filamentous shape and a strong contrast with the background and / or a strong contrast with the background from the image obtained by reading the medium. Since the defect area is detected and repaired by using the second morphological filter for detecting the point-like area that exists, the image is restored without imposing a burden on the operator. .
また、検出された欠陥領域を膨張させて得た領域を修復対象領域として修復を行うことによって、欠陥領域の辺縁部の修復漏れを防ぐことができる。 In addition, by repairing a region obtained by expanding the detected defect region as a region to be repaired, it is possible to prevent a repair leak at the edge of the defect region.
また、欠陥領域指定手段を備え、前述した検出により検出できなかった欠陥領域(例えば大きいカビや、ゴミ)をユーザに指定させるようにしてもよく、こうすることによってより確実に欠陥領域を取得することができると共に、オペレータによる指定の前に、殆どの欠陥領域が既に検出されたため、オペレータの負担が小さい。 Further, a defect area designating unit may be provided so that a user can designate a defect area (for example, large mold or dust) that could not be detected by the above-described detection. In addition, most of the defect area has already been detected before the designation by the operator, so the burden on the operator is small.
以下、図面を参照して、本発明の実施形態について説明する。 Embodiments of the present invention will be described below with reference to the drawings.
図1は、本発明の実施形態となる画像処理装置の構成を示すブロック図である。なお、本実施形態の画像処理装置は、入力された画像に対して修復処理を行うものであり、補助記憶装置に読み込まれた処理プログラムをコンピュータ(たとえばパーソナルコンピュータ等)上で実行することにより実現される。また、この処理プログラムは、CD−ROM等の情報記憶媒体に記憶され、もしくはインターネット等のネットワークを介して配布され、コンピュータにインストールされることになる。 FIG. 1 is a block diagram showing a configuration of an image processing apparatus according to an embodiment of the present invention. Note that the image processing apparatus according to the present embodiment performs a restoration process on an input image, and is realized by executing a processing program read into an auxiliary storage device on a computer (for example, a personal computer). Is done. Further, this processing program is stored in an information storage medium such as a CD-ROM, or distributed via a network such as the Internet and installed in a computer.
また、画像データは画像を表すものであり、以下、特に画像と画像データの区別をせずに説明を行う。 The image data represents an image, and the following description will be given without particularly distinguishing the image from the image data.
図1に示すように、本実施形態の画像処理装置は、画像を入力する画像入力手段1と、入力された画像における欠陥領域(以下修復領域という)を取得する修復領域取得手段10と、修復領域取得手段10により取得された修復領域に画素値を付与することによって修復領域を修復する修復手段100とを有してなる。
As shown in FIG. 1, the image processing apparatus according to the present embodiment includes an
画像入力手段1は、本実施形態の画像処理装置の処理対象となる画像を入力するためのものであり、写真フィルムや、紙、プリント用紙などの媒体上に形成された画像を光電変換によって読み取ってデジタル画像を得るスキャナなどとすることができる。 The image input means 1 is for inputting an image to be processed by the image processing apparatus of the present embodiment, and reads an image formed on a medium such as photographic film, paper, or print paper by photoelectric conversion. Thus, a scanner for obtaining a digital image can be used.
修復領域取得手段10は、画像入力手段1により得られたデジタル画像(以下単に画像という)から修復領域を取得するものであり、図1に示すように、検出手段10aと膨張手段10bとを備えてなる。 The repair area acquisition means 10 acquires a repair area from a digital image (hereinafter simply referred to as an image) obtained by the image input means 1, and includes a detection means 10a and an expansion means 10b as shown in FIG. It becomes.
検出手段10aは、第1のモルフォロジーフィルタを用いて、糸状で、かつ背景とのコントラストが強い微小領域を検出すると共に、第2のモルフォロジーフィルタを用いて背景とのコントラストが強く、かつ近接して存在する点状領域を検出するものである。ここで、第1のモルフォロジーフィルタによる処理と第2のモルフォロジーフィルタによる処理を夫々第1の検出処理と第2の検出処理として、具体的に説明する。 The detection means 10a uses the first morphological filter to detect a minute region that is thread-like and has a strong contrast with the background, and uses the second morphological filter to have a strong and close contrast with the background. An existing point-like region is detected. Here, the process by the first morphological filter and the process by the second morphological filter will be specifically described as a first detection process and a second detection process, respectively.
第1の検出処理は、目的の領域、すなわち糸状で、かつ背景とのコントラストが強い微小領域として、輝度値が90(画像の輝度値の範囲は0〜255とする)より大きく、かつ背景とのコントラストが30より大きく、かつ幅が3画素未満の領域を検出するものである。このような領域を検出するために、まず、画像入力手段1により得られた画像における輝度値が90より大きい画素に対して3×3の正方形構造要素を用いたオープニング処理を施して画像Aを得る。そして、画像入力手段1により得られた画像から画像Aを減算して画像Bを得る。画像Bは、閾値30で2値化する2値化処理、すなわち輝度値が30より大きい画素の2値化輝度値を1とし、輝度値が30以下の画素の2値化輝度値を0とする処理が施されて2値化画像となり、この2値化画像における明るい領域(すなわち2値化輝度値が1である領域)は目的の領域として検出される。
The first detection processing is a target area, that is, a fine area having a string shape and a strong contrast with the background. The brightness value is larger than 90 (the range of the brightness value of the image is 0 to 255), and the background and In this case, an area having a contrast greater than 30 and a width of less than 3 pixels is detected. In order to detect such an area, first, an image A is obtained by performing an opening process using a 3 × 3 square structure element on a pixel having a luminance value greater than 90 in the image obtained by the image input means 1. obtain. Then, the image B is obtained by subtracting the image A from the image obtained by the image input means 1. In the image B, binarization processing for binarizing with a
第2の検出処理は、目的の領域、すなわち背景とのコントラストが強く、かつ近接して存在する点状領域として、輝度値が220より大きく、かつ背景とのコントラストが30より大きく、かつその短辺の長さが6画素未満の領域を検出するものである。このような領域を検出するために、まず、画像入力手段1により得られた画像における輝度値が220より大きい画素に対して6×6の正方形構造要素を用いたオープニング処理を施して画像Cを得る。そして、画像入力手段1により得られた画像から画像Cを減算して画像Dを得る。画像Dは、閾値30で2値化する2値化処理、すなわち輝度値が30より大きい画素の2値化輝度値を1とし、輝度値が30以下の画素の2値化輝度値を0とする処理が施されて2値化画像となり、この2値化画像における明るい領域(すなわち2値化輝度値が1である領域)は目的の領域として検出される。 The second detection process is a point-like region having a strong contrast with the target region, that is, the background, and a luminance value greater than 220 and a contrast with the background greater than 30, and a short point thereof. An area having a side length of less than 6 pixels is detected. In order to detect such a region, first, an image C is obtained by performing an opening process using a 6 × 6 square structure element on a pixel having a luminance value greater than 220 in the image obtained by the image input means 1. obtain. Then, the image D is obtained by subtracting the image C from the image obtained by the image input means 1. The image D is binarized by thresholding 30, that is, a binarized luminance value of a pixel having a luminance value greater than 30 is set to 1, and a binarized luminance value of a pixel having a luminance value of 30 or less is set to 0. Thus, a binarized image is obtained, and a bright area (that is, an area having a binarized luminance value of 1) in the binarized image is detected as a target area.
膨張手段10bは、検出手段10aにより検出された各領域を膨張させるものであり、本実施形態においては、各領域の辺縁を外に向かって数画素例えば2画素分拡張させ、拡張させられた各領域を修復領域として取得する。すなわち、検出手段10aにより検出された領域と、該領域の近傍の領域とが修復領域とされる。 The expansion means 10b expands each area detected by the detection means 10a. In this embodiment, the edge of each area is expanded by several pixels, for example, two pixels outward. Each area is acquired as a repair area. That is, the area detected by the detection means 10a and the area in the vicinity of the area are set as the repair area.
修復領域取得手段10により、媒体上に付着した糸屑などのゴミ、カビの数だけ修復領域が取得され、修復手段100は、これらの全ての修復領域に対して修復を行うが、各修復領域に対する修復手法が同じであるので、以下修復領域が1つのみである場合を例にして説明を行う。図3に示す画像D0は、修復領域が取得された画像の例であり、その中央部分の白い空白は修復領域を示し、陰影部分は画素値が既知の画素により構成された既知領域である。 The repair area acquisition means 10 acquires repair areas as many as dust and mold attached to the medium, and the repair means 100 repairs all of these repair areas. Since the repair method is the same, the case where there is only one repair region will be described below as an example. An image D0 shown in FIG. 3 is an example of an image from which a repair area has been acquired. The white space at the center of the image D0 indicates the repair area, and the shaded area is a known area composed of pixels with known pixel values.
図2は、修復手段100の構成を示すブロック図である。
FIG. 2 is a block diagram showing a configuration of the
図2に示すように、修復手段100は、多重解像度画像作成手段105と、優先度算出手段110と、埋め込み元画像取得手段115と、埋め込み手段120と、縁辺修整手段130とを備えてなるものである。以下、これらの各構成の詳細について説明する。
As shown in FIG. 2, the
多重解像度画像作成手段105は、画像D0から複数の解像度の異なる画像Diを作成するものであり、各画像Diは、iの大きい順から、解像度が低くなっている。本実施形態において、多重解像度画像作成手段105は、まず、画像D0をD1とし、画像D0を1/2、1/4、1/8の縮小率で夫々縮小して得た画像をD2、D3、D4として作成する。図3は、多重解像度画像作成手段105により得られた画像D1、D2、D3、D4を示している。
The multi-resolution image creating means 105 creates a plurality of images Di having different resolutions from the image D0, and the resolution of each image Di is decreased in descending order of i. In the present embodiment, multi-resolution
優先度算出手段110は、画像D0、すなわち解像度が最も高い画像D1における修復領域の縁辺上の各画素の位置の埋め込み優先度βを算出するものである。本実施形態において、優先度算出手段110は、4つの画像Di(i=1〜4)を、解像度の低い画像からの順(すなわち、D4からの順)を夫々用いて優先度βを算出する。ここで、まず、画像Di(i>1)(すなわちD4、D3、D2)を用いて優先度βを算出する処理について説明する。
<画像Di(i>1)を用いた優先度βの算出>
画像Di(i>1)を用いて優先度βを算出するのに当たり、優先度算出手段110は、優先度を算出するためのパッチ(本実施形態において9画素×9画素のパッチ。以下優先度算出用パッチFyという)を図4に示すように、その中心が画像Diにおける修復領域の縁辺上の画素(図中画素A)に位置するように配置し、この位置の埋め込み優先度βを求める。
<Calculation of Priority β Using Image Di (i>1)>
In calculating the priority β using the image Di (i> 1), the priority calculation means 110 is a patch for calculating the priority (a patch of 9 pixels × 9 pixels in the present embodiment. As shown in FIG. 4, the calculation patch Fy is arranged so that its center is located at a pixel (pixel A in the figure) on the edge of the repair area in the image Di, and the embedding priority β at this position is obtained. .
画素Aの埋め込み優先度βを求めるのに当たり、優先度算出手段110は、まず、優先度算出用パッチFy内の既知領域の画素数を確認する。優先度算出用パッチFy内の既知領域の画素数が、図7に示すように少なく、所定の閾値K1以下となる場合において、画素Aの優先度を0として設定する。
In obtaining the embedding priority β of the pixel A, the
一方、画素Aに配置された優先度算出用パッチFy内の既知領域の画素数が、閾値K1より大きい場合において、優先度算出手段110は、画素Aにおいて、修復領域を埋め込む方向(以下埋め込み方向)を決定する。本実施形態において、図5に示すような4つの方向を埋め込む方向とする。図5において、黒い領域と白い領域は夫々既知領域と修復領域とを示し、修復領域を埋め込む方向は、左から右(方向d1)、上から下(方向d2)、右から左(方向d3)、下から上(方向d4)の4つとなっている。優先度算出手段110は、画素Aにおける、既知領域から修復領域に向かう法線の方向hに基づいて埋め込み方向を決定するものであり、具体的には、この法線方向hが上記4つの方向のうちのいずれか1つの方向と一致する場合には、法線方向hを埋め込み方向に決定して埋め込み優先度βを求める一方、法線方向hが上記4つの方向のうちの2つの方向の間に位置する場合には、この2つの方向を埋め込み方向候補とし、2つの埋め込み方向候補について夫々埋め込み優先度を求め、求められた埋め込み優先度が高い方の方向を埋め込み方向に決定すると共に、この方向について既に求められた埋め込み優先度をこの位置の埋め込み優先度βとする。
On the other hand, when the number of pixels in the known area in the priority calculation patch Fy arranged in the pixel A is larger than the threshold value K1, the
図4に示す画素Aの位置の場合、その法線方向hが図6(a)に示すように上から下の方向、図5(b)に示す方向d2と一致するため、優先度算出手段110は、この方向h(d2)を画素Aにおける埋め込み方向として決定する。一方、図6(b)に示すような場合、画素Bにおける法線方向hが、埋め込み方向d1と埋め込み方向d4との間にあるため、優先度算出手段110は、画素Bに対して、埋め込み方向d1と埋め込み方向d2を埋め込み方向候補とし、2つの方向について埋め込み優先度を算出する。
In the case of the position of the pixel A shown in FIG. 4, the normal direction h coincides with the direction from top to bottom as shown in FIG. 6A and the direction d2 shown in FIG. 110 determines the direction h (d2) as the embedding direction in the pixel A. On the other hand, in the case shown in FIG. 6B, since the normal direction h in the pixel B is between the embedding direction d1 and the embedding direction d4, the
埋め込み優先度算出手段110は、埋め込み方向(または埋め込み方向候補)を決定した後、優先度算出用パッチFy内の既知領域において境界線の検出を行って、優先度を算出する。
After determining the embedding direction (or embedding direction candidate), the embedding
優先度算出手段110は、まず、優先度算出用パッチFy内の既知領域の画素値(例えば輝度値)の分散値を計算し、この分散値が所定の閾値K2以下であれば、優先度算出用パッチFy内の既知領域が均一な1つの領域であり、領域と領域との間の境界線が無いとして優先度を0に設定する。
The
なお、既知領域内の画素値の分散値σは、例えば下記の式(1)に従って算出すればよい。
一方、優先度算出用パッチFy内の既知領域の画素値の分散値が閾値K2より大きい場合において、優先度算出手段110は、優先度算出用パッチFy内の既知領域についてその境界線を検出して、優先度を設定する。 On the other hand, when the variance value of the pixel values of the known area in the priority calculation patch Fy is larger than the threshold value K2, the priority calculation means 110 detects the boundary line of the known area in the priority calculation patch Fy. To set the priority.
本実施形態において、優先度算出手段110は、レベルセット(Level Set)領域分割手法を用いて境界線の検出を行う。具体的には、まず、優先度算出用パッチFy内の既知領域上において、枠を配置する。ここで、枠を配置するのに当たり、大きい枠を用いると、演算時間を短縮することができるが、領域分割の精度が良くないため、本実施形態において、優先度算出手段110は、図8(b)に示すように、複数(図の例示では3つ)の小さい枠Wを、既知領域上の離れた位置に夫々配置する。そして、優先度算出手段110は、各枠Wに対して変形処理を行って、既知領域を2つの領域に分割する。
In the present embodiment, the
変形処理は、下記の式(2)に示す、枠内の画素値の分散値σaと、枠外の画素値の分散値σbとの総和Qが、最も小さくなるように各枠Wを変形させるものであり、具体的に、枠Wを内凹させる内凹処理と、枠Wを外凸させる外凸処理とを繰り返す処理である。内凹処理は、当該枠Wの内縁の画素のうちの、該画素を枠Wの外に出すことによって総和Qが小さくなる画素を内凹処理の対象とし、該画素の位置において枠Wを内凹させる処理であり、外凸処理は、当該枠Wの外縁の画素のうちの、該画素を枠Wの中に入れることによって総和Qが小さくなる画素を外凸処理の対象とし、該画素の位置において枠Wを外凸させる外凸処理である。なお、図9(a)に示すように、枠W上の画素A2を枠Wの外縁の画素とすれば、画素A2と隣接する枠W内の画素A1が内縁の画素となり、図9(b)に示すように、枠W上の画素A2を内縁の画素とすれば、画素A2と隣接する枠W外の画素A3が外縁の画素となる。また、枠上に画素が無ければ、枠を挟んで隣接する2つの画素が夫々内縁の画素と外縁の画素となる。本実施形態においては、図9(b)に示すように、枠W上の画素を当該枠Wの内縁の画素とし、この画素と隣接する枠W外の画素を外縁の画素とする。図9(c)は、枠Wの内縁の画素A2を枠Wの外に出すことによって、前述した分散値の総和Qが小さくなる場合に枠Wを内凹させた例を示しており、図9(d)は、枠Wの外縁の画素A3を枠Wの中に入れることによって、前述した分散値の総和Qが小さくなる場合に枠Wを外凸させた例を示している。
優先度算出手段110は、このような内凹処理と外凸処理を繰り返し、枠Wの変形(および変形に起因する枠の結合)を経て、既知領域を1つの枠の中と外との2つの領域に分割する。そして、分割の結果として、この2つの領域の境界線を得る。 The priority calculation means 110 repeats such inward and outward convex processing, and after the deformation of the frame W (and the combination of the frames resulting from the deformation), the known area is divided into 2 inside and outside of one frame. Divide into two areas. As a result of the division, a boundary line between these two areas is obtained.
優先度算出手段110は、検出された境界線について、まず、この境界線が、優先度算出用パッチFyの既知領域側の輪郭線から、優先度算出用パッチFy内の修復領域の縁辺まで延びる境界線であるか否かを確認する。具体的には、この境界線の両端は、境界線と、優先度算出用パッチFyの既知領域側の輪郭線と優先度算出用パッチ内の修復領域の縁辺との夫々の接点であるか否かを確認し、夫々の接点であれば、言い変えれば、境界線が優先度算出用パッチFyの輪郭線から修復領域の縁辺まで延びるものであればさらに境界線の態様および埋め込み方向(埋め込み方向候補を含む)に基づいて0より大きい優先度を設定するが、接点ではなければ、画素Aの優先度βを0に設定する。
For the detected boundary line, the
図10は、境界線が優先度算出用パッチFy内の修復領域の縁辺まで延びる境界線であるか場合において、優先度算出手段110による優先度の設定を説明するための図であり、左から右へ、優先度の高い順を示している。図示のように、優先度は、下記のルールに従って設定される。 FIG. 10 is a diagram for explaining setting of priority by the priority calculation means 110 when the boundary line is a boundary line extending to the edge of the restoration area in the priority calculation patch Fy. To the right, the order of priority is shown. As illustrated, the priority is set according to the following rules.
ルール1:境界線と修復領域の縁辺との接点の位置が、優先度算出用パッチFyの中心点に近いほど、優先度が高い。 Rule 1: The priority is higher as the position of the contact point between the boundary line and the edge of the repair area is closer to the center point of the priority calculation patch Fy.
なお、境界線は、図10に示す例(b)、例(c)のように2本ある場合には、この接点の位置を、2本の境界線と修復領域の縁辺との夫々の接点の位置の平均位置とする。 When there are two boundary lines as in the example (b) and example (c) shown in FIG. 10, the positions of the contact points are the contact points between the two boundary lines and the edge of the repair region. The average position of the positions.
ルール2:ルール1を前提とした上で、境界線が2本ある場合より、境界線が1本しかない場合のほうが、優先度が高い。
Rule 2: On the premise of
ルール3:境界線が2本の場合、2本の境界線により囲まれた領域の面積が大きいほど優先度が高い。 Rule 3: When there are two boundary lines, the priority is higher as the area of the region surrounded by the two boundary lines is larger.
ルール4:ルール1、2、3を前提とした上で、境界線の延びる方向が埋め込み方向に近いほど優先度が高い。
Rule 4: On the premise of
優先度算出手段110は、このようにして優先度算出用パッチFyが配置された位置の画素の優先度を設定する。なお、図6(b)に示すように、埋め込み候補方向が2つある場合において、優先度算出手段110は、2つの埋め込み候補について優先度を夫々算出し、大きいほうの優先度が算出された埋め込み方向候補を埋め込み方向として決定すると共に、該方向について算出された優先度を該画素の優先度とする。
The priority calculation means 110 sets the priority of the pixel at the position where the priority calculation patch Fy is arranged in this way. As shown in FIG. 6B, when there are two embedding candidate directions, the
優先度算出手段110は、優先度算出用パッチFyを最初に配置した位置の画素について上述の処理を行って該画素の優先度βを算出する。そして、優先度算出用パッチFyを、その中心点が修復領域の縁辺上において1画素ずらして配置し、新たなに配置された位置の画素の優先度βを算出する。 The priority calculation means 110 performs the above-described processing on the pixel at the position where the priority calculation patch Fy is first arranged to calculate the priority β of the pixel. Then, the priority calculation patch Fy is arranged with its center point shifted by one pixel on the edge of the restoration area, and the priority β of the pixel at the newly arranged position is calculated.
優先度算出手段110は、優先度算出用パッチFyの配置、優先度の算出、優先度算出用パッチFyの移動、優先度の算出・・・を繰り返し、画像Diにおける修復領域の縁辺上の各画素の優先度βを得る。 The priority calculation means 110 repeats the arrangement of the priority calculation patch Fy, the calculation of the priority, the movement of the priority calculation patch Fy, the calculation of the priority,... The pixel priority β is obtained.
ここで、埋め込み元画像取得手段115は、優先度算出手段110により算出された優先度βに基づいて、優先度βが0より大きい画素のうち、優先度βが最も高い画素からの順にこの画素の位置における埋め込み元画像を取得する。ここで、埋め込み元画像取得手段115により埋め込み元画像を取得する処理について説明する。
Here, based on the priority β calculated by the
<埋め込み元画像を取得する処理>
埋め込み元画像取得手段115は、優先度算出手段110により、画像Di(i>1)を用いて得られた優先度βを確認し、優先度βが0より大きい画素が無ければ、埋め込み元画像を取得する処理を行わないが(この場合の後の処理について後述する)、優先度βが0より大きい画素があれば、まず、優先度算出手段110により優先度を算出した際に用いた画像と同じ画像Di(i>1)において、優先度βが最も高い画素の位置における埋め込み元画像を取得する。具体的には、埋め込み元画像取得手段115は、画像Diにおける修復領域の縁辺上の画素のうちの対象画素(ここでは優先度βが0より大きい画素のうち、最も高い優先度βを有する画素)に対して、まず、優先度算出用パッチFyよりも小さい埋め込み用パッチFu1(本実施形態においては5画素×5画素のパッチ)を、その中心点が対象画素(図11に示す画素A)に位置するように配置する。そして、配置された埋め込み用パッチFu1内において、既知領域の部分をマッチング領域として設定して、図11下部に示す、画素Aに対する埋め込み元画像取得用パッチFu2を得る。なお、分かりやすくするために、図11下部の埋め込み元画像取得用パッチFu2を拡大して表示しているが、埋め込み元画像取得用パッチFu2の大きさは、埋め込み用パッチFu1と同じく5画素×5画素である。そして、埋め込み元画像取得手段115は、埋め込み元画像取得用パッチFu2を、対象画素Aの近傍の既知領域上を移動しつつ、移動された各位置において、埋め込み元画像取得用パッチFu2内におけるマッチング領域の画像と、埋め込み用パッチFu1内の既知領域の画像との相似度を求める。そして、この相似度が最も高い位置に配置された埋め込み元画像取得用パッチFu2内の画像を埋め込み元画像として取得する。
<Process to acquire embedded image>
The embedding source
なお、相似度については、例えば埋め込み元画像取得用パッチFu2内のマッチング領域の画像と、埋め込み用パッチFu1内の既知領域の画像との輝度値のユークリッド(Euclid)距離を求め、この距離が小さいほど相似度が高いように求めることができる。 For the similarity, for example, the Euclidean distance of the luminance value between the image of the matching area in the embedding source image acquisition patch Fu2 and the image of the known area in the embedding patch Fu1 is obtained, and this distance is small. It can be calculated that the degree of similarity is higher.
埋め込み元画像取得手段115は、このようにして埋め込み元画像を取得する。
The embedding source
一方、その詳細については後述するが、修復手段100の埋め込み手段120は、解像度が最も高い画像D1において、優先度βが高い画素の位置からの順で修復領域の埋め込みを行うものである。それに対して、ここで、優先度算出手段110により算出された優先度βは、算出する際に用いられた画像Di(i>1)における修復領域の縁辺上の画素のものであり、埋め込み元画像取得手段115により得られた埋め込み元画像は、優先度算出時に用いられた画像Di(i>1)における画像である。そのため、埋め込み手段120に供するために、このように算出された優先度βを有する画素が対応する画像D1における画素の位置、および埋め込み元画像が対応する画像D1上の画像の位置を確定する必要がある。以下、この位置を確定する処理を回帰処理という。なお、ここで、回帰処理について説明する。
On the other hand, although details will be described later, the embedding
<回帰処理>
上述したように、回帰処理は、画像Di(i>1)を用いて算出した優先度βが0より大きい画素、および該画素に対して取得された埋め込み元画像に対して行われる。
<Regression processing>
As described above, the regression process is performed on the pixel having the priority β calculated using the image Di (i> 1) greater than 0 and the embedding source image acquired for the pixel.
まず、最も解像度の低い画像、優先度βの算出および埋め込み元画像の取得に画像D4を用いた場合を例にして回帰処理について説明する。 First, the lowest resolution image, the priority β calculated and embedded original image acquired for regression process as an example the case of using the image D 4 will be described.
回帰処理を行うのに当たって、まず、優先度算出手段110は、優先度を算出した際に用いられた画像(ここでは画像D4)より解像度が1つ高い画像、ここでは画像D3において、画像D4を用いて算出された優先度βが0より大きい画素の位置を確定する。画像D4は、画像D3を1/2縮小したものであるため、画像D4における1つの画素の位置が、画像D3上における2つの画素の位置に対応する。優先度算出手段110は、画像D4において算出された、優先度βが0より大きい画素の位置に夫々対応する、画像D3上の画素の位置において、優先度算出用パッチFyの配置および優先度の算出を行う。なお、ここで、優先度算出用パッチFyおよび優先度の算出は、画像D4において算出された、優先度βが0以上の画素の位置に夫々対応する、画像D3上の位置の画素(その数は、画像D4において算出された、優先度βが0より大きい画素の数の2倍)に対してのみ行われるため、短時間でできる。そして、埋め込み元画像取得手段115は、画像D4において取得された埋め込み元画像の、画像D3における位置を、優先度算出手段110により得られた画像D3上の位置に応じて調整し、画像D3上の埋め込み元画像の位置を得る。
In performing the regression process, first, the priority calculation means 110 uses an image having a resolution one higher than that of the image (here, the image D 4 ) used when calculating the priority, in this case, the image D 3 . calculated priority β is to determine the position of greater than 0 pixels with D 4. Since the image D 4 is obtained by reducing the image D 3 by 1/2, the position of one pixel in the image D 4 corresponds to the position of two pixels on the image D 3 . The
そして、埋め込み優先度算出手段110と埋め込み元画像取得手段115は、このように低解像度画像上における位置を、1つ高い解像度上の画像上の対応する位置に確定する処理をD3からD2、D2からD1に繰り返し、解像度が最も高い画像D1における、埋め込み優先度βが0より大きい画素の位置、およびこれらの各画素の位置における埋め込み元画像の位置を確定できたことをもって、回帰処理を終了する。
Then, the embedding
なお、ここで、画像D4を用いて優先度の算出および埋め込み元画像の取得を行った場合の回帰処理について説明したが、画像D3を用いて優先度の算出および埋め込み元画像の取得を行った場合には、回帰処理として、画像D3より解像度が1つ高い画像、すなわち画像D2において、画像D3において算出された優先度βが0より大きい画素の位置および相対応する埋め込み元画像の位置が確定され、その後、画像D2より解像度が1つ高い画像、すなわち画像D1において、画像D2において算出された優先度βが0より大きい画素の位置および相対応する埋め込み元画像の位置が確定される。また、画像D2を用いて優先度の算出および埋め込み元画像の取得を行った場合には、回帰処理としては、画像D2より解像度が1つ高い画像、すなわち画像D1において、画像D2において算出された優先度βが0より大きい画素の位置および相対応する埋め込み元画像の位置が確定される。 Note that here, the regression processing when the calculation of the priority and the acquisition of the embedding source image are performed using the image D 4 has been described, but the calculation of the priority and the acquisition of the embedding source image are performed using the image D 3. If it is performed, as a regression process, an image whose resolution is one higher than that of the image D 3 , that is, in the image D 2 , the position of the pixel whose priority β calculated in the image D 3 is greater than 0 and the corresponding embedding source After the position of the image is determined, an image having a resolution one higher than that of the image D 2 , that is, in the image D 1 , the position of the pixel whose priority β calculated in the image D 2 is greater than 0 and the corresponding embedded original image The position of is fixed. Also, when performing acquisition priority calculation and embedded original image by using the image D 2, as the regression process, high image has one resolution than image D 2, i.e. in the image D 1, image D 2 The position of the pixel whose priority β calculated in step S is greater than 0 and the position of the corresponding embedding source image are determined.
次に、優先度算出手段110が画像D1を用いて優先度βを算出する処理について説明する。
Next, the
<画像D1を用いた優先度βの算出>
優先度算出手段110は、画像D1を用いて優先度βを算出するのに当たり、他の画像を用いて優先度βを算出する際と同じように、まず、図4に示す優先度算出用パッチFyを、その中心点が画像D1における修復領域の縁辺上の画素に位置するように配置し、配置された優先度算出用パッチFy内の既知領域の画素数を確認する。優先度算出用パッチFy内の既知領域の画素数が閾値K1以下となる場合において、優先度算出手段110は、その画素の優先度を0として設定する。
<Calculation of priority β using the image D 1>
In calculating the priority β using the image D 1 , the
一方、優先度算出用パッチFy内の既知領域の画素数が、閾値K1より大きい場合において、優先度算出手段110は、優先度算出用パッチFyが配置された画素の位置における埋め込み方向を決定する。この埋め込み方向を決定する処理は、他の画像Di(i>1)を用いて優先度βを算出する際の埋め込み方向の決定と同じであるので、ここで詳細な説明を省略する。なお、ここでも、図6(a)に示すように埋め込み方向が2つの可能性がある場合において、この2つの方向を埋め込み方向候補にして夫々について優先度を求め、優先度が大きい埋め込み方向候補を埋め込み方向として決定すると共に、該方向について算出された優先度を該画素の優先度とする。
On the other hand, when the number of pixels in the known area in the priority calculation patch Fy is larger than the threshold value K1, the
埋め込み方向(埋め込み方向候補を含む)を決定した後、優先度算出手段110は、優先度算出用パッチFyの中心点においてエッジの検出を行い、該中心点においてエッジが検出されなかった場合には、該中心点に位置する画素の優先度βを1に設定する一方、エッジが検出された場合には、エッジの強度が強いほど高い優先度となるように、優先度算出用パッチFyの中心点の画素の優先度βを1より大きい値に設定する。
After determining the embedding direction (including embedding direction candidates), the
なお、この場合は、優先度βは画像D1において算出されているので、回帰処理が行われない。 In this case, since the priority β is calculated in the image D 1, it is not performed regression process.
次いで、本実施形態の画像処理全体の処理についてさらに説明する。 Next, the overall image processing of the present embodiment will be further described.
図12は、本実施形態の画像処理装置全体の処理を示すフローチャートである。図示のように、画像入力手段1により得られた処理対象の画像は、修復領域取得手段10により修復領域が取得されて画像D0となって、修復手段100に入力される(S10)。修復手段100において、多重解像度画像作成手段105は、まず、iを4として、i個(すなわち4つ)の解像度の異なる画像D1(D0)、D2、D3、D4を作成する(S15、S20)。そして、優先度算出手段110は、最も解像度の低い画像Di(ここでD4)を用いて優先度の算出を行い、画像D4における修復領域の縁辺上の各画素の優先度β、およびこれらの画素における埋め込み方向を得る(S30)
埋め込み元画像取得手段115は、優先度βが0より大きい画素の有無を確認し、優先度βが0より大きい画素があれば(S110:Yes、S111:Yes)、これらの画素のうちの、優先度βが最も高い画素の位置において埋め込み元画像を取得する(S112)。そして、優先度算出手段110と埋め込み元画像取得手段115は、画像D4において算出された0より大きい優先度βを有する画素の位置および相対応する埋め込み元画像の位置を、画像D1において確定する回帰処理を行って、画像D1において、修復領域の縁辺上の画素のうちの、優先度βが0より大きい画素、およびこれらの画素の埋め込み方向と埋め込み元画像を得る(S113)。そして、埋め込み手段120は、画像D1において、優先度の高い画素からの順に、該画素に対して取得された埋め込み元画像を用いて該埋め込み元画像を取得する際に用いられた埋め込み元画像取得用パッチFu2が対応する埋め込み用パッチFu1内の画像を置き換えることによって埋め込みを実行する。ここで、埋め込み用パッチFu1および埋め込み元画像取得用パッチFu2のサイズは、画像D4における5画素×5画素であるので、画像D1に対応する大きさは40画素×40画素となる。
FIG. 12 is a flowchart showing processing of the entire image processing apparatus of the present embodiment. As shown in the figure, the image to be processed obtained by the image input means 1 is acquired by the repair area acquisition means 10 to obtain a repair area as an image D0 and input to the repair means 100 (S10). In the restoration means 100, the multi-resolution image creation means 105 first creates i (ie, 4) images D 1 (D0), D 2 , D 3 , and D 4 having different resolutions with i being 4 ( S15, S20). Then, the
The embedding source
埋め込み手段120は、まず、優先度βが最も高い画素において埋め込みを行い、優先度が最も高い画素における埋め込みが終了すれば、次に高い優先度βを有する画素において埋め込みを行う。このように優先度βが高い順から、優先度βが0より大きい画素の埋め込みを行う(S1S125:Yes、S118、S120)。優先度βが0より大きい画素の埋め込みが全て終了すれば、画像Di(ここではD4)を用いて算出した優先度βに基づいた埋め込みを終了し、この埋め込みによって得られた新たな画像D1(元の画像D1が、優先度βが0より大きい画素において埋め込みが行われた画像)を多重解像度画像作成手段105に出力する。多重解像度画像作成手段105は、新たな画像D1を用いて、優先度βを求める際に既に用いられた画像(ここではD4)の解像度より1つ高い解像度までの複数の新たな画像(ここでは新たな画像D1、D2、D3)を作成し、優先度算出手段110は、新たな画像のうちの、最も低い解像度を有する画像(ここでは新たな画像D3)を用いて優先度βを算出し、ステップS30からの処理が繰り返される((S125:No、S128、S20、S30〜)。
First, the embedding
一方、ステップS111において、優先度βが0より大きい画素がなければ(S111:No)、埋め込み元画像取得手段115は、埋め込み元画像を取得する処理行わず、優先度算出手段110は、前回、優先度βを求める際に既に用いられた画像(ここではD4)より1つ解像度が高い画像(ここではD3)を用いて優先度βを算出し、ステップS30からの処理が繰り返される(S114、S30〜)。
On the other hand, in step S111, if there is no pixel whose priority β is greater than 0 (S111: No), the embedding source
このような処理は、解像度が原画像より1つのみ低い画像(そのときの画像D2)を用いて算出された優先度βに基づいた埋め込みが終了するまで行われる(S20〜S128)。 Such processing is performed until embedding is completed based on the priority β calculated using an image whose resolution is only one lower than the original image (image D 2 at that time) (S20 to S128).
解像度が原画像より1つのみ低い画像を用いて算出された優先度βに基づいた埋め込みが終了すると、埋め込みがなされた画像が新たな画像D1として得られる。この場合、優先度を算出する処理から、算出された優先度に基づいた埋め込みまでの処理は、原画像より解像度が低い画像について全部行われたので、優先度算出手段110は、原画像と同じ解像度を有する新たな画像D1を用いて優先度βを算出する(S30、S110:Yes)。埋め込み元画像取得手段115と埋め込み手段120は、優先度βが最も高い画素から埋め込みを行い、優先度βが最も低い0となる画素の位置における埋め込みが終了することをもって、処理を終了する(S130〜S136)。
When resolution is based on the β priority calculated using only one lower image than the original image embedded is completed, image embedding has been performed is obtained as a new image D 1. In this case, since the processing from the priority calculation to the embedding based on the calculated priority is performed for all images having a resolution lower than that of the original image, the priority calculation means 110 is the same as the original image. calculating a priority β using the new image D 1 with a resolution (S30, S110: Yes). The embedding source
埋め込みが終了した画像(原画像と同じ解像度)に対して、縁辺修整手段130は、埋め込みによって、不平滑な縁辺などの修整を行い、修復処理を終了する。 With respect to the image that has been embedded (the same resolution as the original image), the edge correction means 130 corrects an unsmoothed edge by the embedding and ends the repair process.
図13は、優先度算出手段110による優先度βを算出する処理(すなわち図12におけるステップS30の処理P)を示すフローチャートである。図示のように、優先度算出手段110は、画像Diを用いて優先度βの算出に当たり、まず、画像Diにおいて優先度算出用パッチFyを、その中心点が画像Diにおける修復領域の縁辺上の画素に位置するように配置する(S32)。そして、優先度算出用パッチFy内の既知領域の画素数が閾値K1以下であれば、優先度算出用パッチFyの中心点の画素の優先度βを0に設定する(S34:No、S55)一方、優先度算出用パッチFy内の既知領域の画素数が閾値K1より大きければ、埋め込み方向を図5示すいずれかの方向に決定する(S36)。そして、解像度が原画像より低い画像Di(i>1)に対して、優先度算出手段110は、優先度算出用パッチFy内の既知領域の画素値の分散値σを求め(S40:Yes、S42)、分散値σが閾値K2以下であれば、優先度算出用パッチFyの中心点の画素の優先度βを0に設定する(S44:No、S55)一方、分散値σが閾値K2より大きければ、優先度算出用パッチFy内の既知領域において領域の分割を行うことによって境界線を検出する(S44:Yes、S46)。検出された境界線が、優先度算出用パッチFyの既知領域側の輪郭線から優先度算出用パッチFy内の修復領域の縁辺まで延びる境界線ではなければ、優先度算出手段110は、優先度算出用パッチFyの中心点の画素の優先度βを0に設定する(S48:No、S55)一方、検出された境界線が、優先度算出用パッチFyの既知領域側の輪郭線から優先度算出用パッチFy内の修復領域の縁辺まで延びる境界線であれば、その境界線の態様および優先度算出用パッチFyの中心点の画素における埋め込み方向に基づいて、該画素の優先度βを0以上の値に設定する(S48:Yes、S50)。優先度算出手段110は、画像Diにおける修復領域の縁辺上の各画素において優先度算出用パッチFyの配置および優先度算出用パッチFyが配置された位置の画素(優先度算出用パッチFyの中心点の画素)に対して優先度β求め(S60:No、S82、S34〜)、求められた各々の画素の優先度βと、埋め込み方向と共に埋め込み元画像取得手段115に出力する(S60:Yes、S100)。
FIG. 13 is a flowchart showing a process for calculating the priority β by the priority calculating means 110 (that is, the process P in step S30 in FIG. 12). As shown in the figure, when calculating the priority β using the image Di, the
一方、解像度が原画像と同じ画像D1を用いて優先度βを算出する際に(S40:No)、優先度算出手段110は、優先度算出用パッチFyの中心点においてエッジの検出を行い、該中心点においてエッジが検出されなかった場合には、該中心点に位置する画素の優先度βを1に設定する一方、エッジが検出された場合には、エッジの強度が強いほど高い優先度となるように、優先度算出用パッチFyの中心点の画素の優先度βを1より大きい値に設定すると共に、各画素に対して設定された優先度βをその埋め込み方向と共に埋め込み元画像取得手段115に出力する(S72〜S110)。
On the other hand, when the resolution is calculated priorities β using the same image D 1 and the original image (S40: No), the
なお、図13に示していないが、優先度算出手段110は、優先度算出用パッチFyの中心点の画素における埋め込み方向を決定する際に、図6(a)に示すように埋め込み方向が2つの可能性がある場合において、この2つの方向を埋め込み方向候補にして夫々について優先度を求め、優先度が大きい埋め込み方向候補を埋め込み方向として決定すると共に、該方向について算出された優先度を該画素の優先度とする。
Although not shown in FIG. 13, when the
このように、本実施形態の画像処理装置によれば、写真プリントや紙などの印刷媒体、写真フィルムなどは経年保管により付着されたゴミのほとんどが糸屑またはカビであることに着目し、このようなゴミの特徴に応じて、媒体を読み取って得た画像から、糸状で、かつ背景とのコントラストが強い微小領域を検出するための第1のモルフォロジーフィルタと、背景とのコントラストが強く、かつ近接して存在する点状領域を検出するための第2のモルフォロジーフィルタを用いて欠陥領域を検出して修復を行うようにしているので、オペレータに負担をかけずに画像の修復を実現している。 As described above, according to the image processing apparatus of the present embodiment, attention is paid to the fact that most of the dust attached by aging storage on print media such as photographic prints and paper, photographic films, etc. is yarn waste or mold. In accordance with such dust characteristics, the first morphological filter for detecting a microscopic region having a filamentous shape and a strong contrast with the background from an image obtained by reading the medium has a strong contrast with the background, and Since the defect area is detected and repaired by using the second morphological filter for detecting the point-like area that exists in the vicinity, the image can be restored without imposing a burden on the operator. Yes.
また、検出された欠陥領域を膨張させて得た領域を修復対象領域として修復を行うことによって、欠陥領域の辺縁部の修復漏れを防ぐことができる。 In addition, by repairing a region obtained by expanding the detected defect region as a region to be repaired, it is possible to prevent a repair leak at the edge of the defect region.
以上、本発明の望ましい実施形態について説明したが、本発明の画像処理方法および装置並びにそのためのプログラムは、上述した実施形態に限られることがなく、本発明の主旨を逸脱しない限り、埋め込みの手法、各々のパッチのサイズ、多重解像度画素の個数など、様々な増減、変化を加えることができる。 The preferred embodiment of the present invention has been described above. However, the image processing method and apparatus of the present invention and the program therefor are not limited to the above-described embodiment, and an embedding method is used without departing from the gist of the present invention. Various changes, such as the size of each patch and the number of multi-resolution pixels, can be added.
例えば、本実施形態の画像処理装置は、修復領域取得手段10における検出手段10aにより自動的に検出された修復領域を修復するようにしているが、修復領域取得手段10に、オペレータにより修復領域を指定させるための欠陥領域指定手段を備え、検出手段10aにより検出できなかった欠陥領域(例えば大きいカビや、ゴミ)を取得することができるようにしてもよい。こうすることによってより確実に欠陥領域を取得することができると共に、オペレータによる指定の前に、殆どの欠陥領域が既に検出手段10aにより検出されたため、オペレータの負担が小さい。
For example, the image processing apparatus according to the present embodiment repairs the repair area automatically detected by the
例えば、本実施形態の画像処理装置は、埋め込み用パッチよりサイズが大きい優先度算出用パッチを、その中心点が画像中における修復領域の縁辺上の画素に位置するように配置し、この優先度算出用パッチ内の既知領域内において、優先度算出用パッチの輪郭線から、優先度算出用パッチ内の修復領域の縁辺まで延びる境界線を検出し、この境界線が検出された優先度算出用パッチの中心点の画素の埋め込み優先度を、境界線が検出された優先度算出用パッチの中心点の画素の埋め込み優先度より高く設定する。そして、埋め込むのに際し、埋め込み優先度の高い画素からの順に、修復領域の縁辺上の画素に埋め込み用パッチを配置して埋め込みを行うようにし、画像中に領域を分ける境界線が存在しても良い修復効果を得ることができるようにしているが、例えば、特許文献1に記載されたように、修復領域の辺縁上に所定のサイズ(例えば3画素×3画素)のパッチを配置し、配置されたパッチ内における既知領域の画素の画素値の平均値を求めて、同じパッチ内における修復領域の画素の新たな画素値とするようにして修復を行うようにしてもよい。また、平均値の代わりに、パッチ内における既知領域の画素の画素値に対して補間処理を行うことによって、同じパッチ内における修復領域の画素の新たな画素値を求めるようにしてもよい。この方法は、修復領域が大きいときは、修復領域の中心部に近くなるほど、周波数成分がなくなるため、埋め込まれた修復領域のボケが目立ち、処理後の画像は違和感が大きいが、修復領域が小さいときは、簡単かつ迅速に修復を行うことができる。
For example, the image processing apparatus according to the present embodiment arranges a priority calculation patch having a size larger than that of the embedding patch so that the center point thereof is located at a pixel on the edge of the repair area in the image. In the known area in the calculation patch, a boundary line that extends from the contour line of the priority calculation patch to the edge of the restoration area in the priority calculation patch is detected, and the priority calculation for detecting the boundary line is performed. The embedding priority of the pixel at the center point of the patch is set higher than the embedding priority of the pixel at the center point of the priority calculation patch where the boundary line is detected. When embedding, the embedding patches are arranged on the pixels on the edge of the restoration area in order from the pixel with the highest embedding priority, and there is a boundary line dividing the area in the image. Although a good repair effect can be obtained, for example, as described in
また、本実施形態の画像処理装置は、良い修復効果と早い処理速度を図るために、埋め込み優先度の算出や、埋め込み元画像の取得などの処理を、複数の解像度において行うようにしているが、カビなどのゴミのサイズが小さいため、複数の解像度に分けて行わずにオリジナルの解像度の画像のみにおいて行うようにしてもよい。勿論、オペレータにより指定された欠陥領域のサイズが大きい場合においては、その大きい欠陥領域に対してのみ複数の解像度に分けて処理を行うことが好ましい。 The image processing apparatus according to the present embodiment performs processing such as calculation of embedding priority and acquisition of an embedding source image at a plurality of resolutions in order to achieve a good restoration effect and a high processing speed. Since the size of dust such as mold is small, it may be performed only on the original resolution image without dividing the image into a plurality of resolutions. Of course, when the size of the defect area designated by the operator is large, it is preferable to perform the processing by dividing the large defect area into a plurality of resolutions.
1 画像入力手段
10 修復領域取得手段
100 修復手段
105 多重解像度画像作成手段
110 優先度算出手段
115 埋め込み元画像取得用手段
120 埋め込み手段
130 縁辺修整手段
β 埋め込み優先度
DESCRIPTION OF
Claims (7)
糸状で、かつ背景とのコントラストが強い微小領域を検出するための第1のモルフォロジーフィルタ、および/または背景とのコントラストが強く、かつ近接して存在する点状領域を検出するための第2のモルフォロジーフィルタを用いて前記欠陥領域を検出し、
検出された前記欠陥領域を修復対象領域とし、該修復対象領域の画像を該修復対象領域以外の画像に置き換えることによって前記欠陥領域を修復することを特徴とする画像処理方法。 In a digital image obtained by photoelectrically reading an image formed on a medium, in an image processing method for repairing a defective area caused by a minute substance that is not originally included in the image attached on the medium,
A first morphological filter for detecting a microscopic region that is filamentous and has a strong contrast with the background; and / or a second filter for detecting a point-like region that has a strong contrast with the background and that is close to the background. Detecting the defect area using a morphological filter,
An image processing method, wherein the detected defect area is set as a repair target area, and the defect area is repaired by replacing an image of the repair target area with an image other than the repair target area.
糸状で、かつ背景とのコントラストが強い微小領域を検出するための第1のモルフォロジーフィルタ、および/または背景とのコントラストが強く、かつ近接して存在する点状領域を検出するための第2のモルフォロジーフィルタを用いて前記欠陥領域を検出する欠陥領域検出手段と、
検出された前記欠陥領域を修復対象領域とし、該修復対象領域の画像を該修復対象領域以外の画像に置き換えることによって前記欠陥領域を修復する修復実行手段とを有してなることを特徴とする画像処理装置。 In an image processing apparatus for repairing a defective area caused by a minute substance that is not originally included in the image attached to the medium with respect to a digital image obtained by photoelectrically converting an image formed on the medium,
A first morphological filter for detecting a microscopic region that is filamentous and has a strong contrast with the background; and / or a second filter for detecting a point-like region that has a strong contrast with the background and that is close to the background. A defect area detecting means for detecting the defect area using a morphological filter;
And a repair execution means for repairing the defective area by replacing the detected defective area as a repair target area and replacing an image of the repair target area with an image other than the repair target area. Image processing device.
前記修復実行手段が、前記膨張手段により膨張させられた前記欠陥領域を前記修復対象領域とするものであることを特徴とする請求項3記載の画像処理装置。 Having expansion means for expanding the defect area detected by the defect area detection means;
4. The image processing apparatus according to claim 3, wherein the repair execution unit sets the defect area expanded by the expansion unit as the repair target area.
前記修復実行手段が、前記欠陥領域指定手段により指定された欠陥領域も前記修復対象領域とするものであることを特徴とする請求項3または4記載の画像処理装置。 A defect area specifying means for allowing a user to specify a defect area in an area other than the defect area detected by the defect area detecting means;
5. The image processing apparatus according to claim 3, wherein the repair execution unit also sets the defect area designated by the defect area designation unit as the repair target area.
前記画像処理が、糸状で、かつ背景とのコントラストが強い微小領域を検出するための第1のモルフォロジーフィルタ、および/または背景とのコントラストが強く、かつ近接して存在する点状領域を検出するための第2のモルフォロジーフィルタを用いて前記欠陥領域を検出する欠陥領域検出処理と、
検出された前記欠陥領域を修復対象領域とし、該修復対象領域の画像を該修復対象領域以外の画像に置き換えることによって前記欠陥領域を修復する修復実行処理とからなることを特徴とするプログラム。 For a digital image obtained by reading an image formed on a medium by photoelectric conversion, the computer performs image processing to repair a defective area caused by a minute substance that is not originally present on the medium. A program to
The image processing detects a first morphological filter for detecting a minute region having a string shape and a strong contrast with the background, and / or a dot-like region having a strong contrast with the background and existing in the vicinity. A defect area detection process for detecting the defect area using a second morphological filter for
A program comprising: a repair execution process for repairing the defective area by replacing the detected defective area with a repair target area and replacing an image of the repair target area with an image other than the repair target area.
前記修復実行処理が、前記膨張処理により膨張させられた前記欠陥領域を前記修復対象領域とすることを特徴とする請求項6記載のプログラム。 Causing the computer to further perform an expansion process for expanding the defective area detected by the defective area detection process;
The program according to claim 6, wherein the repair execution process sets the defective area expanded by the expansion process as the repair target area.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005094568A JP4315349B2 (en) | 2005-03-29 | 2005-03-29 | Image processing method, apparatus, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005094568A JP4315349B2 (en) | 2005-03-29 | 2005-03-29 | Image processing method, apparatus, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2006279441A true JP2006279441A (en) | 2006-10-12 |
JP4315349B2 JP4315349B2 (en) | 2009-08-19 |
Family
ID=37213729
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005094568A Expired - Fee Related JP4315349B2 (en) | 2005-03-29 | 2005-03-29 | Image processing method, apparatus, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4315349B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014155913A1 (en) * | 2013-03-25 | 2014-10-02 | パナソニック株式会社 | Image interpolation device, image processing device, and image interpolation method |
CN108986093A (en) * | 2018-07-19 | 2018-12-11 | 常州宏大智能装备产业发展研究院有限公司 | Cylinder or flat screen printing machine network blocking defect detection method based on machine vision |
-
2005
- 2005-03-29 JP JP2005094568A patent/JP4315349B2/en not_active Expired - Fee Related
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014155913A1 (en) * | 2013-03-25 | 2014-10-02 | パナソニック株式会社 | Image interpolation device, image processing device, and image interpolation method |
US9361673B2 (en) | 2013-03-25 | 2016-06-07 | Panasonic Intellectual Property Management Co., Ltd. | Image interpolation device, image processing device, and image interpolation method |
JPWO2014155913A1 (en) * | 2013-03-25 | 2017-02-16 | パナソニックIpマネジメント株式会社 | Image interpolation device, image processing device, and image interpolation method |
CN108986093A (en) * | 2018-07-19 | 2018-12-11 | 常州宏大智能装备产业发展研究院有限公司 | Cylinder or flat screen printing machine network blocking defect detection method based on machine vision |
Also Published As
Publication number | Publication date |
---|---|
JP4315349B2 (en) | 2009-08-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7868922B2 (en) | Foreground/background segmentation in digital images | |
JP5566811B2 (en) | Deblurring and surveillance adaptive thresholding for image evaluation of printed and scanned documents | |
JP3834041B2 (en) | Learning type classification apparatus and learning type classification method | |
US8023766B1 (en) | Method and system of processing an image containing undesirable pixels | |
KR101597739B1 (en) | Image processing apparatus, image processing method, and computer readable medium | |
JP2007285754A (en) | Flaw detection method and flaw detector | |
US20060088218A1 (en) | Image processing method and image processing apparatus | |
WO2014129018A1 (en) | Character recognition device, character recognition method, and recording medium | |
JP2012050013A (en) | Imaging apparatus, image processing device, image processing method, and image processing program | |
JP2006279442A (en) | Image processing method, apparatus, and program | |
KR101377910B1 (en) | Image processing method and image processing apparatus | |
JP6542230B2 (en) | Method and system for correcting projected distortion | |
JP5539488B2 (en) | Judgment of transparent fill based on reference background color | |
JP6771134B2 (en) | Image correction method and image correction device | |
JP3814353B2 (en) | Image segmentation method and image segmentation apparatus | |
JP2009151759A (en) | Image processing method and image processor | |
JP4315349B2 (en) | Image processing method, apparatus, and program | |
JP2006266943A (en) | Apparatus and method for inspecting defect | |
JP2006279443A (en) | Image processing method, apparatus, and program | |
US8494272B2 (en) | Image processing device, image processing method, and computer readable medium for judging if images are matched | |
JP4587698B2 (en) | Character component extractor | |
US10380463B2 (en) | Image processing device, setting support method, and non-transitory computer-readable media | |
JP2009098867A (en) | Character string recognition method, computer program and storage medium | |
JP4774200B2 (en) | Character string area extractor | |
JP5077809B2 (en) | Image processing apparatus, image processing system, and image processing program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20061208 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070713 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090130 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090210 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090410 |
|
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: 20090512 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20090514 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4315349 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120529 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130529 Year of fee payment: 4 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140529 Year of fee payment: 5 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |