JP2006279441A - Image processing method, apparatus, and program - Google Patents

Image processing method, apparatus, and program Download PDF

Info

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
Application number
JP2005094568A
Other languages
Japanese (ja)
Other versions
JP4315349B2 (en
Inventor
Yuanzhong Li
元中 李
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Holdings Corp
Original Assignee
Fuji Photo Film Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Photo Film Co Ltd filed Critical Fuji Photo Film Co Ltd
Priority to JP2005094568A priority Critical patent/JP4315349B2/en
Publication of JP2006279441A publication Critical patent/JP2006279441A/en
Application granted granted Critical
Publication of JP4315349B2 publication Critical patent/JP4315349B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing method, apparatus, and program capable of automatically repairing a defect region caused by attachment of a very small substance onto a medium from a digital signal obtained by reading an image formed on the medium. <P>SOLUTION: The image processing apparatus uses a first morphology filter that detects a filamentous very small region with a strong contrast to a background from a digital image obtained by reading an image formed on the medium by photoelectric conversion and/or a second morphology filter that detects dotted regions with a strong contrast to the background and existing closely to each other to detect a defective region, and the image processing apparatus repairs the defective region by replacing the image in the detected defective region with an image in other regions than the defective region. <P>COPYRIGHT: (C)2007,JPO&INPIT

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 Patent Document 1, as a method of repairing a part of an originally defective area from a digital image obtained by reading a medium, a defect of a CCD of a reading device is compared by comparing digital images obtained by reading a plurality of media. A method is described in which a place or a place where dust adheres to the lens is found, and a portion corresponding to the image is repaired.

また、非特許文献1には、オペレータにより欠陥領域を指定し、指定された欠陥領域に対して修復を行う方法が記載されている。
特開平7−114639号公報 A.Criminisi,P.Perez,and K.Toyama, Object Removal by Exemplar−based Inpaiting, Conf.on Computer Vision and Pattern Recognition,CVPR, Madison,Wisconsin,2003
Non-Patent Document 1 describes a method in which a defect area is designated by an operator and the designated defect area is repaired.
Japanese Patent Laid-Open No. 7-114639 A. Crimini, P.A. Perez, and K.K. Toyama, Object Removable by Exemplar-based Imposing, Conf. on Computer Vision and Pattern Recognition, CVPR, Madison, Wisconsin, 2003

しかしながら、特許文献1記載の方法は、読取装置のCCDの欠陥やレンズに付着したゴミなどにより、該読取装置により得られた画像の固定した位置に生じる欠陥領域を見つけて修復することができるが、媒体上の任意の場所に付着した糸屑などのゴミや、カビなどにより生じた欠陥領域を有する画像の修復に適用することができない。   However, the method described in Patent Document 1 can find and repair a defect area generated at a fixed position of an image obtained by the reading device due to a CCD defect of the reading device or dust attached to the lens. In addition, it cannot be applied to restoration of an image having a defective area caused by dust such as lint attached to an arbitrary place on the medium or mold.

また、非特許文献1に記載の方法は、オペレータに負担をかける上に、熟練した技術者ではなければ、正確に指定することができないという問題がある。   In addition, the method described in Non-Patent Document 1 has a problem in that it is impossible to specify the information accurately unless it is a skilled engineer in addition to placing a burden on the operator.

本発明は、上記事情に鑑み、媒体上に形成された画像を光電変換によって読み取って得たデジタル画像に対して、画像に本来無い微小物質が前記媒体上に付着したことに起因する欠陥領域を効率良く修復することができる画像処理方法および装置並びにそのためのプログラムを提供することを目的とするものである。   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 image input unit 1 that inputs an image, a repair region acquisition unit 10 that acquires a defect region (hereinafter referred to as a repair region) in the input image, and a repair. The repair unit 100 repairs the repair region by assigning a pixel value to the repair region acquired by the region acquisition unit 10.

画像入力手段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 threshold 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.

第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 repair unit 100.

図2に示すように、修復手段100は、多重解像度画像作成手段105と、優先度算出手段110と、埋め込み元画像取得手段115と、埋め込み手段120と、縁辺修整手段130とを備えてなるものである。以下、これらの各構成の詳細について説明する。   As shown in FIG. 2, the restoration unit 100 includes a multi-resolution image creation unit 105, a priority calculation unit 110, an embedding source image acquisition unit 115, an embedding unit 120, and an edge correction unit 130. It is. The details of each of these components will be described below.

多重解像度画像作成手段105は、画像D0から複数の解像度の異なる画像Diを作成するものであり、各画像Diは、iの大きい順から、解像度が低くなっている。本実施形態において、多重解像度画像作成手段105は、まず、画像D0をDとし、画像D0を1/2、1/4、1/8の縮小率で夫々縮小して得た画像をD、D、Dとして作成する。図3は、多重解像度画像作成手段105により得られた画像D、D、D、Dを示している。 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 image creating device 105, first, an image D0 and D 1, the image obtained by respectively reducing the image D0 in reduction ratio of 1 / 2,1 / 4,1 / 8 D 2 , D 3 and D 4 . FIG. 3 shows images D 1 , D 2 , D 3 , and D 4 obtained by the multi-resolution image creating means 105.

優先度算出手段110は、画像D0、すなわち解像度が最も高い画像Dにおける修復領域の縁辺上の各画素の位置の埋め込み優先度βを算出するものである。本実施形態において、優先度算出手段110は、4つの画像Di(i=1〜4)を、解像度の低い画像からの順(すなわち、Dからの順)を夫々用いて優先度βを算出する。ここで、まず、画像Di(i>1)(すなわちD、D、D)を用いて優先度βを算出する処理について説明する。 Priority calculation unit 110, image D0, that is, calculates a buried priority β position of each pixel on the edge of the repair area in the highest image D 1 resolution. In the present embodiment, the priority calculation unit 110, calculates the four images Di (i = 1 to 4), the order from the low resolution image (i.e., the order from D 4) the priority β respectively using To do. Here, first, a process for calculating the priority β using the image Di (i> 1) (that is, D 4 , D 3 , D 2 ) will be described.

<画像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 priority calculation unit 110 first checks the number of pixels in the known area in the priority calculation patch Fy. When the number of pixels in the known area in the priority calculation patch Fy is small as shown in FIG. 7 and is equal to or less than the predetermined threshold value K1, the priority of the pixel A is set to zero.

一方、画素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 priority calculation unit 110 embeds a repair area in the pixel A (hereinafter referred to as an embedding direction). ). In the present embodiment, the four directions as shown in FIG. In FIG. 5, a black area and a white area indicate a known area and a repair area, respectively, and the embedding direction of the repair area is left to right (direction d1), top to bottom (direction d2), and right to left (direction d3). , From the bottom to the top (direction d4). The priority calculating means 110 determines the embedding direction based on the normal direction h from the known area to the repair area in the pixel A. Specifically, the normal direction h is the above four directions. , The normal direction h is determined as the embedding direction and the embedding priority β is obtained, while the normal direction h is equal to two of the four directions. In the case of being located in between, these two directions are set as the embedding direction candidates, the embedding priority is obtained for each of the two embedding direction candidates, and the direction with the higher embedding priority obtained is determined as the embedding direction, The embedding priority already obtained for this direction is set as the embedding priority β at this position.

図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 priority calculation unit 110 embeds the pixel B in the embedding direction. Using the direction d1 and the embedding direction d2 as candidates for embedding directions, embedding priorities are calculated for the two directions.

埋め込み優先度算出手段110は、埋め込み方向(または埋め込み方向候補)を決定した後、優先度算出用パッチFy内の既知領域において境界線の検出を行って、優先度を算出する。   After determining the embedding direction (or embedding direction candidate), the embedding priority calculating unit 110 detects a boundary line in a known area in the priority calculating patch Fy and calculates the priority.

優先度算出手段110は、まず、優先度算出用パッチFy内の既知領域の画素値(例えば輝度値)の分散値を計算し、この分散値が所定の閾値K2以下であれば、優先度算出用パッチFy内の既知領域が均一な1つの領域であり、領域と領域との間の境界線が無いとして優先度を0に設定する。   The priority calculation unit 110 first calculates a variance value of pixel values (for example, luminance values) of a known area in the priority calculation patch Fy, and if the variance value is equal to or less than a predetermined threshold K2, the priority calculation unit 110 calculates the priority. The priority is set to 0 on the assumption that the known area in the patch Fy is a uniform area and there is no boundary line between the areas.

なお、既知領域内の画素値の分散値σは、例えば下記の式(1)に従って算出すればよい。

Figure 2006279441
Note that the variance value σ of the pixel values in the known area may be calculated according to the following equation (1), for example.
Figure 2006279441

一方、優先度算出用パッチ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 priority calculation unit 110 detects a boundary line using a level set (Level Set) region division method. Specifically, first, a frame is arranged on a known area in the priority calculation patch Fy. Here, if a large frame is used for arranging the frames, the calculation time can be shortened. However, since the accuracy of area division is not good, the priority calculation unit 110 in FIG. As shown in b), a plurality (three in the illustrated example) of small frames W are arranged at positions separated from each other in the known area. Then, the priority calculation unit 110 performs a deformation process on each frame W to divide the known area into two areas.

変形処理は、下記の式(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を外凸させた例を示している。

Figure 2006279441
In the transformation process, each frame W is transformed so that the total sum Q of the variance value σa of the pixel value in the frame and the variance value σb of the pixel value outside the frame shown in the following equation (2) becomes the smallest. Specifically, it is a process of repeating an inward concave process for indenting the frame W and an external convex process for projecting the frame W outward. In the indentation process, among the pixels at the inner edge of the frame W, pixels whose sum Q is reduced by taking the pixel out of the frame W are subjected to the indentation process, and the frame W is set at the position of the pixel. In the convex processing, out of the pixels at the outer edge of the frame W, a pixel whose total sum Q is reduced by placing the pixel in the frame W is set as the target of the convex processing. This is an outward convex process for projecting the frame W outward at the position. As shown in FIG. 9A, if the pixel A2 on the frame W is the pixel on the outer edge of the frame W, the pixel A1 in the frame W adjacent to the pixel A2 becomes the inner edge pixel. ), If the pixel A2 on the frame W is the inner edge pixel, the pixel A3 outside the frame W adjacent to the pixel A2 is the outer edge pixel. If there are no pixels on the frame, the two adjacent pixels across the frame become the inner edge pixel and the outer edge pixel, respectively. In the present embodiment, as shown in FIG. 9B, pixels on the frame W are pixels on the inner edge of the frame W, and pixels outside the frame W adjacent to the pixels are pixels on the outer edge. FIG. 9C shows an example in which the frame W is indented when the pixel A2 at the inner edge of the frame W is moved out of the frame W to reduce the above-described total sum Q of the dispersion values. 9 (d) shows an example in which the frame W is protruded outward when the pixel A3 at the outer edge of the frame W is placed in the frame W to reduce the above-described total sum Q of the dispersion values.
Figure 2006279441

優先度算出手段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 priority calculation unit 110 first extends from the contour line on the known area side of the priority calculation patch Fy to the edge of the restoration area in the priority calculation patch Fy. Check if it is a boundary line. Specifically, both ends of the boundary line are contact points of the boundary line, the contour line on the known area side of the priority calculation patch Fy, and the edge of the restoration area in the priority calculation patch. In other words, in other words, if the boundary line extends from the contour of the priority calculation patch Fy to the edge of the repair area, the boundary line mode and embedding direction (embedding direction) The priority higher than 0 is set based on the candidate), but if it is not a contact, the priority β of the pixel A is set to 0.

図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 Rule 1, the priority is higher when there is only one boundary line than when there are two boundary lines.

ルール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 rules 1, 2, and 3, the priority is higher as the extending direction of the boundary line is closer to the embedding direction.

優先度算出手段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 priority calculation unit 110 calculates the priorities for the two embedding candidates, and the larger priority is calculated. The embedding direction candidate is determined as the embedding direction, and the priority calculated for the direction is set as the priority of the pixel.

優先度算出手段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 priority calculation unit 110, the embedding source image acquisition unit 115 selects the pixels in order from the pixel with the highest priority β among the pixels with the priority β higher than 0. The embedding source image at the position of is acquired. Here, a process of acquiring an embedded source image by the embedded source image acquiring unit 115 will be described.

<埋め込み元画像を取得する処理>
埋め込み元画像取得手段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 image acquisition unit 115 checks the priority β obtained by using the image Di (i> 1) by the priority calculation unit 110, and if there is no pixel with the priority β greater than 0, the embedding source image If there is a pixel with a priority β greater than 0, the image used when the priority is calculated by the priority calculation unit 110 is first used. In the same image Di (i> 1), an embedding source image at the pixel position having the highest priority β is acquired. Specifically, the embedding source image acquisition unit 115 is a target pixel (a pixel having the highest priority β among the pixels having a priority β larger than 0 in the pixels on the edge of the restoration region in the image Di. ), An embedding patch Fu1 (a patch of 5 pixels × 5 pixels in this embodiment) that is smaller than the priority calculation patch Fy, and the center point thereof is the target pixel (pixel A shown in FIG. 11). Place it so that it is located in Then, in the arranged embedding patch Fu1, a known area portion is set as a matching area, and an embedding source image acquisition patch Fu2 for the pixel A shown in the lower part of FIG. 11 is obtained. For ease of understanding, the embedded source image acquisition patch Fu2 in the lower part of FIG. 11 is enlarged and displayed, but the size of the embedded source image acquisition patch Fu2 is 5 pixels × the size of the embedded patch Fu1. 5 pixels. Then, the embedding source image acquisition unit 115 performs matching in the embedding source image acquisition patch Fu2 at each moved position while moving the embedding source image acquisition patch Fu2 on the known area near the target pixel A. The similarity between the image of the area and the image of the known area in the embedding patch Fu1 is obtained. Then, an image in the embedding source image acquisition patch Fu2 arranged at a position having the highest similarity is acquired as an embedding source image.

なお、相似度については、例えば埋め込み元画像取得用パッチ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 image acquisition unit 115 acquires the embedding source image in this way.

一方、その詳細については後述するが、修復手段100の埋め込み手段120は、解像度が最も高い画像Dにおいて、優先度βが高い画素の位置からの順で修復領域の埋め込みを行うものである。それに対して、ここで、優先度算出手段110により算出された優先度βは、算出する際に用いられた画像Di(i>1)における修復領域の縁辺上の画素のものであり、埋め込み元画像取得手段115により得られた埋め込み元画像は、優先度算出時に用いられた画像Di(i>1)における画像である。そのため、埋め込み手段120に供するために、このように算出された優先度βを有する画素が対応する画像Dにおける画素の位置、および埋め込み元画像が対応する画像D上の画像の位置を確定する必要がある。以下、この位置を確定する処理を回帰処理という。なお、ここで、回帰処理について説明する。 On the other hand, although details will be described later, the embedding unit 120 of the restoration unit 100 embeds the restoration region in the order from the pixel position having the highest priority β in the image D 1 having the highest resolution. On the other hand, the priority β calculated by the priority calculation unit 110 is a pixel on the edge of the restoration area in the image Di (i> 1) used for the calculation, and the embedding source The embedding source image obtained by the image acquisition unit 115 is an image in the image Di (i> 1) used when calculating the priority. Therefore, in order to provide the embedding means 120, determine the position of the thus calculated priority β position of pixels in the image D 1 of the pixel corresponding with, and embedded original image on the image D 1 corresponding image There is a need to. Hereinafter, the process for determining the position is referred to as a regression process. Here, the regression process will be described.

<回帰処理>
上述したように、回帰処理は、画像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.

まず、最も解像度の低い画像、優先度βの算出および埋め込み元画像の取得に画像Dを用いた場合を例にして回帰処理について説明する。 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は、優先度を算出した際に用いられた画像(ここでは画像D)より解像度が1つ高い画像、ここでは画像Dにおいて、画像Dを用いて算出された優先度βが0より大きい画素の位置を確定する。画像Dは、画像Dを1/2縮小したものであるため、画像Dにおける1つの画素の位置が、画像D上における2つの画素の位置に対応する。優先度算出手段110は、画像Dにおいて算出された、優先度βが0より大きい画素の位置に夫々対応する、画像D上の画素の位置において、優先度算出用パッチFyの配置および優先度の算出を行う。なお、ここで、優先度算出用パッチFyおよび優先度の算出は、画像Dにおいて算出された、優先度βが0以上の画素の位置に夫々対応する、画像D上の位置の画素(その数は、画像Dにおいて算出された、優先度βが0より大きい画素の数の2倍)に対してのみ行われるため、短時間でできる。そして、埋め込み元画像取得手段115は、画像Dにおいて取得された埋め込み元画像の、画像Dにおける位置を、優先度算出手段110により得られた画像D上の位置に応じて調整し、画像D上の埋め込み元画像の位置を得る。 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 priority calculation unit 110 arranges and calculates the priority calculation patch Fy at the pixel position on the image D 3 corresponding to the pixel position where the priority β calculated in the image D 4 is greater than 0. Calculate the degree. Here, the priority calculation patch Fy and the priority are calculated by calculating the pixel at the position on the image D 3 corresponding to the position of the pixel having the priority β of 0 or more calculated in the image D 4 ( Since the number is calculated only for twice the number of pixels having a priority β greater than 0 calculated in the image D 4 , it can be done in a short time. The embedded original image obtaining unit 115, the obtained embedded original image in the image D 4, the position in the image D 3, adjusted in accordance with the position of the image D 3 obtained by the priority calculation unit 110, obtaining a position of the embedded original image on the image D 3.

そして、埋め込み優先度算出手段110と埋め込み元画像取得手段115は、このように低解像度画像上における位置を、1つ高い解像度上の画像上の対応する位置に確定する処理をDからD、DからDに繰り返し、解像度が最も高い画像Dにおける、埋め込み優先度βが0より大きい画素の位置、およびこれらの各画素の位置における埋め込み元画像の位置を確定できたことをもって、回帰処理を終了する。 Then, the embedding priority calculating unit 110 and the embedding source image obtaining unit 115 perform processing for determining the position on the low-resolution image as the corresponding position on the image on the one higher resolution in this way from D 3 to D 2. , D 2 to D 1 , and having determined the position of the pixel whose embedding priority β is greater than 0 in the image D 1 having the highest resolution, and the position of the embedding source image at the position of each of these pixels, End the regression process.

なお、ここで、画像Dを用いて優先度の算出および埋め込み元画像の取得を行った場合の回帰処理について説明したが、画像Dを用いて優先度の算出および埋め込み元画像の取得を行った場合には、回帰処理として、画像Dより解像度が1つ高い画像、すなわち画像Dにおいて、画像Dにおいて算出された優先度βが0より大きい画素の位置および相対応する埋め込み元画像の位置が確定され、その後、画像Dより解像度が1つ高い画像、すなわち画像Dにおいて、画像Dにおいて算出された優先度βが0より大きい画素の位置および相対応する埋め込み元画像の位置が確定される。また、画像Dを用いて優先度の算出および埋め込み元画像の取得を行った場合には、回帰処理としては、画像Dより解像度が1つ高い画像、すなわち画像Dにおいて、画像Dにおいて算出された優先度βが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が画像Dを用いて優先度βを算出する処理について説明する。 Next, the priority calculation unit 110 is processing for calculating the priority β will be described with reference to the image D 1.

<画像Dを用いた優先度βの算出>
優先度算出手段110は、画像Dを用いて優先度βを算出するのに当たり、他の画像を用いて優先度βを算出する際と同じように、まず、図4に示す優先度算出用パッチFyを、その中心点が画像Dにおける修復領域の縁辺上の画素に位置するように配置し、配置された優先度算出用パッチFy内の既知領域の画素数を確認する。優先度算出用パッチFy内の既知領域の画素数が閾値K1以下となる場合において、優先度算出手段110は、その画素の優先度を0として設定する。
<Calculation of priority β using the image D 1>
In calculating the priority β using the image D 1 , the priority calculating unit 110 first calculates the priority β shown in FIG. 4 in the same manner as when calculating the priority β using another image. the patch Fy, the central point is arranged so as to be located to the pixels on edge of repair area in the image D 1, to confirm the number of pixels known region within arranged priority calculating patch Fy. When the number of pixels in the known area in the priority calculation patch Fy is equal to or less than the threshold value K1, the priority calculation unit 110 sets the priority of the pixel as 0.

一方、優先度算出用パッチ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 priority calculation unit 110 determines the embedding direction at the pixel position where the priority calculation patch Fy is arranged. . Since the process of determining the embedding direction is the same as the determination of the embedding direction when calculating the priority β using another image Di (i> 1), detailed description thereof is omitted here. Also in this case, as shown in FIG. 6A, when there are two possibilities of embedding directions, the two directions are determined as embedding direction candidates, the priority is obtained for each, and the embedding direction candidate having a higher priority is obtained. Is determined as the embedding direction, and the priority calculated for the direction is set as the priority of the pixel.

埋め込み方向(埋め込み方向候補を含む)を決定した後、優先度算出手段110は、優先度算出用パッチFyの中心点においてエッジの検出を行い、該中心点においてエッジが検出されなかった場合には、該中心点に位置する画素の優先度βを1に設定する一方、エッジが検出された場合には、エッジの強度が強いほど高い優先度となるように、優先度算出用パッチFyの中心点の画素の優先度βを1より大きい値に設定する。   After determining the embedding direction (including embedding direction candidates), the priority calculation unit 110 detects an edge at the center point of the priority calculation patch Fy, and when no edge is detected at the center point. The priority β of the pixel located at the center point is set to 1, and when the edge is detected, the priority of the priority calculation patch Fy is set so that the higher the edge strength, the higher the priority. The priority β of the pixel at the point is set to a value larger than 1.

なお、この場合は、優先度βは画像Dにおいて算出されているので、回帰処理が行われない。 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つ)の解像度の異なる画像D(D0)、D、D、Dを作成する(S15、S20)。そして、優先度算出手段110は、最も解像度の低い画像Di(ここでD)を用いて優先度の算出を行い、画像Dにおける修復領域の縁辺上の各画素の優先度β、およびこれらの画素における埋め込み方向を得る(S30)
埋め込み元画像取得手段115は、優先度βが0より大きい画素の有無を確認し、優先度βが0より大きい画素があれば(S110:Yes、S111:Yes)、これらの画素のうちの、優先度βが最も高い画素の位置において埋め込み元画像を取得する(S112)。そして、優先度算出手段110と埋め込み元画像取得手段115は、画像Dにおいて算出された0より大きい優先度βを有する画素の位置および相対応する埋め込み元画像の位置を、画像Dにおいて確定する回帰処理を行って、画像D1において、修復領域の縁辺上の画素のうちの、優先度βが0より大きい画素、およびこれらの画素の埋め込み方向と埋め込み元画像を得る(S113)。そして、埋め込み手段120は、画像D1において、優先度の高い画素からの順に、該画素に対して取得された埋め込み元画像を用いて該埋め込み元画像を取得する際に用いられた埋め込み元画像取得用パッチFu2が対応する埋め込み用パッチFu1内の画像を置き換えることによって埋め込みを実行する。ここで、埋め込み用パッチFu1および埋め込み元画像取得用パッチFu2のサイズは、画像Dにおける5画素×5画素であるので、画像Dに対応する大きさは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 priority calculation unit 110 calculates the priority using the image Di having the lowest resolution (here, D 4 ), the priority β of each pixel on the edge of the restoration region in the image D 4 , and these To obtain the embedding direction in the pixel (S30).
The embedding source image acquisition unit 115 checks whether or not there is a pixel with a priority β greater than 0. If there is a pixel with a priority β greater than 0 (S110: Yes, S111: Yes), among these pixels, An embedding source image is acquired at the position of the pixel having the highest priority β (S112). Then, the priority calculation unit 110 and the embedding source image acquisition unit 115 determine the position of the pixel having the priority β greater than 0 calculated in the image D 4 and the position of the corresponding embedding source image in the image D 1 . In the image D1, the pixel having the priority β larger than 0 and the embedding direction of these pixels and the embedding source image are obtained in the image D1 (S113). Then, the embedding unit 120 obtains the embedding source image used when acquiring the embedding source image using the embedding source image obtained for the pixel in order from the pixel having the highest priority in the image D1. Embedding is executed by replacing the image in the embedding patch Fu1 corresponding to the patch Fu2. Here, the size of the embedded patch Fu1 and embedded original image acquisition patch Fu2 is because it is 5 × 5 pixels in the image D 4, the size corresponding to the image D 1 is 40 pixels × 40 pixels.

埋め込み手段120は、まず、優先度βが最も高い画素において埋め込みを行い、優先度が最も高い画素における埋め込みが終了すれば、次に高い優先度βを有する画素において埋め込みを行う。このように優先度βが高い順から、優先度βが0より大きい画素の埋め込みを行う(S1S125:Yes、S118、S120)。優先度βが0より大きい画素の埋め込みが全て終了すれば、画像Di(ここではD)を用いて算出した優先度βに基づいた埋め込みを終了し、この埋め込みによって得られた新たな画像D(元の画像Dが、優先度βが0より大きい画素において埋め込みが行われた画像)を多重解像度画像作成手段105に出力する。多重解像度画像作成手段105は、新たな画像Dを用いて、優先度βを求める際に既に用いられた画像(ここではD)の解像度より1つ高い解像度までの複数の新たな画像(ここでは新たな画像D、D、D)を作成し、優先度算出手段110は、新たな画像のうちの、最も低い解像度を有する画像(ここでは新たな画像D)を用いて優先度βを算出し、ステップS30からの処理が繰り返される((S125:No、S128、S20、S30〜)。 First, the embedding unit 120 performs embedding in a pixel having the highest priority β, and when embedding in a pixel having the highest priority is completed, embedding is performed in a pixel having the next highest priority β. In this order, pixels with a priority β higher than 0 are embedded in descending order of the priority β (S1S125: Yes, S118, S120). If all the embedding of pixels with the priority β greater than 0 is completed, the embedding based on the priority β calculated using the image Di (D 4 in this case) is terminated, and a new image D obtained by this embedding is completed. 1 (an image in which the original image D 1 is embedded in a pixel having a priority β greater than 0) is output to the multi-resolution image creating unit 105. The multi-resolution image creating means 105 uses a new image D 1 to create a plurality of new images (up to a resolution one higher than the resolution of the image already used when obtaining the priority β (here, D 4 )). Here, new images D 1 , D 2 , D 3 ) are created, and the priority calculation means 110 uses an image having the lowest resolution among the new images (here, new image D 3 ). The priority β is calculated, and the processing from step S30 is repeated ((S125: No, S128, S20, S30-).

一方、ステップS111において、優先度βが0より大きい画素がなければ(S111:No)、埋め込み元画像取得手段115は、埋め込み元画像を取得する処理行わず、優先度算出手段110は、前回、優先度βを求める際に既に用いられた画像(ここではD)より1つ解像度が高い画像(ここではD)を用いて優先度βを算出し、ステップ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 image acquisition unit 115 does not perform the process of acquiring the embedding source image, and the priority calculation unit 110 The priority β is calculated using an image (D 3 here) that has one higher resolution than the image (D 4 here) that has already been used to determine the priority β, and the processing from step S30 is repeated ( S114, S30 ~).

このような処理は、解像度が原画像より1つのみ低い画像(そのときの画像D)を用いて算出された優先度βに基づいた埋め込みが終了するまで行われる(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つのみ低い画像を用いて算出された優先度βに基づいた埋め込みが終了すると、埋め込みがなされた画像が新たな画像Dとして得られる。この場合、優先度を算出する処理から、算出された優先度に基づいた埋め込みまでの処理は、原画像より解像度が低い画像について全部行われたので、優先度算出手段110は、原画像と同じ解像度を有する新たな画像Dを用いて優先度βを算出する(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 image acquisition unit 115 and the embedding unit 120 perform embedding from the pixel having the highest priority β, and the process ends when the embedding at the pixel position where the priority β is the lowest is 0 (S130). ~ S136).

埋め込みが終了した画像(原画像と同じ解像度)に対して、縁辺修整手段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 priority calculation unit 110 first selects the priority calculation patch Fy in the image Di, and the center point thereof is on the edge of the restoration area in the image Di. It arrange | positions so that it may be located in a pixel (S32). If the number of pixels in the known area in the priority calculation patch Fy is equal to or less than the threshold value K1, the priority β of the pixel at the center point of the priority calculation patch Fy is set to 0 (S34: No, S55). On the other hand, if the number of pixels in the known area in the priority calculation patch Fy is larger than the threshold value K1, the embedding direction is determined as one of the directions shown in FIG. 5 (S36). Then, for the image Di (i> 1) whose resolution is lower than that of the original image, the priority calculation means 110 obtains the variance value σ of the pixel values of the known area in the priority calculation patch Fy (S40: Yes, S42) If the variance value σ is equal to or smaller than the threshold value K2, the priority β of the pixel at the center point of the priority calculation patch Fy is set to 0 (S44: No, S55), while the variance value σ is greater than the threshold value K2. If it is larger, the boundary line is detected by dividing the area in the known area in the priority calculation patch Fy (S44: Yes, S46). If the detected boundary line is not a boundary line extending from the contour line on the known area side of the priority calculation patch Fy to the edge of the restoration area in the priority calculation patch Fy, the priority calculation unit 110 calculates the priority. The priority β of the pixel at the center point of the calculation patch Fy is set to 0 (S48: No, S55). On the other hand, the detected boundary line is prioritized from the contour line on the known area side of the priority calculation patch Fy. If the boundary line extends to the edge of the repair area in the calculation patch Fy, the priority β of the pixel is set to 0 based on the mode of the boundary line and the embedding direction of the pixel at the center point of the priority calculation patch Fy. The above value is set (S48: Yes, S50). The priority calculation means 110 is configured to arrange the priority calculation patch Fy and the pixel at the position where the priority calculation patch Fy is arranged (center of the priority calculation patch Fy) in each pixel on the edge of the restoration area in the image Di. The priority β is obtained for the pixel of the point (S60: No, S82, S34˜), and the obtained priority β of each pixel and the embedding direction are output to the embedding source image acquisition unit 115 (S60: Yes). , S100).

一方、解像度が原画像と同じ画像Dを用いて優先度βを算出する際に(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 priority calculation unit 110 performs the detection of the edge at the center point of the priority calculation patch Fy When the edge is not detected at the center point, the priority β of the pixel located at the center point is set to 1, while when the edge is detected, the higher the edge strength, the higher the priority. The priority β of the pixel at the center point of the priority calculation patch Fy is set to a value larger than 1, and the priority β set for each pixel is embedded along with its embedding direction. It outputs to the acquisition means 115 (S72-S110).

なお、図13に示していないが、優先度算出手段110は、優先度算出用パッチFyの中心点の画素における埋め込み方向を決定する際に、図6(a)に示すように埋め込み方向が2つの可能性がある場合において、この2つの方向を埋め込み方向候補にして夫々について優先度を求め、優先度が大きい埋め込み方向候補を埋め込み方向として決定すると共に、該方向について算出された優先度を該画素の優先度とする。   Although not shown in FIG. 13, when the priority calculation unit 110 determines the embedding direction of the pixel at the center point of the priority calculation patch Fy, the embedding direction is 2 as shown in FIG. In the case where there are two possibilities, the priority is obtained for each of these two directions as embedding direction candidates, the embedding direction candidate having a higher priority is determined as the embedding direction, and the priority calculated for the direction is determined as the embedding direction candidate. The pixel priority.

このように、本実施形態の画像処理装置によれば、写真プリントや紙などの印刷媒体、写真フィルムなどは経年保管により付着されたゴミのほとんどが糸屑またはカビであることに着目し、このようなゴミの特徴に応じて、媒体を読み取って得た画像から、糸状で、かつ背景とのコントラストが強い微小領域を検出するための第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 detection unit 10a in the repair area acquisition unit 10, but the repair area is acquired by the operator in the repair area acquisition unit 10. A defect area designating unit for designating may be provided so that a defect area (for example, large mold or dust) that could not be detected by the detection unit 10a can be acquired. In this way, the defect area can be acquired more reliably, and most of the defect area has already been detected by the detection means 10a before the designation by the operator, so the burden on the operator is small.

例えば、本実施形態の画像処理装置は、埋め込み用パッチよりサイズが大きい優先度算出用パッチを、その中心点が画像中における修復領域の縁辺上の画素に位置するように配置し、この優先度算出用パッチ内の既知領域内において、優先度算出用パッチの輪郭線から、優先度算出用パッチ内の修復領域の縁辺まで延びる境界線を検出し、この境界線が検出された優先度算出用パッチの中心点の画素の埋め込み優先度を、境界線が検出された優先度算出用パッチの中心点の画素の埋め込み優先度より高く設定する。そして、埋め込むのに際し、埋め込み優先度の高い画素からの順に、修復領域の縁辺上の画素に埋め込み用パッチを配置して埋め込みを行うようにし、画像中に領域を分ける境界線が存在しても良い修復効果を得ることができるようにしているが、例えば、特許文献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 Patent Document 1, a patch of a predetermined size (for example, 3 pixels × 3 pixels) is arranged on the edge of the repair region, The average value of the pixel values of the pixels in the known area in the arranged patch may be obtained, and the repair may be performed by using the new pixel value of the pixel in the repair area in the same patch. Further, instead of the average value, a new pixel value of the pixel in the restoration area in the same patch may be obtained by performing interpolation processing on the pixel value of the pixel in the known area in the patch. In this method, when the repair area is large, the closer to the center of the repair area, the more the frequency component disappears. Therefore, the blur of the embedded repair area is noticeable, and the processed image has a sense of incongruity, but the repair area is small. When it can be done easily and quickly.

また、本実施形態の画像処理装置は、良い修復効果と早い処理速度を図るために、埋め込み優先度の算出や、埋め込み元画像の取得などの処理を、複数の解像度において行うようにしているが、カビなどのゴミのサイズが小さいため、複数の解像度に分けて行わずにオリジナルの解像度の画像のみにおいて行うようにしてもよい。勿論、オペレータにより指定された欠陥領域のサイズが大きい場合においては、その大きい欠陥領域に対してのみ複数の解像度に分けて処理を行うことが好ましい。   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 is a block diagram showing a configuration of an image processing apparatus according to an embodiment of the present invention. 図1に示す実施形態の画像処理装置における修復手段100の構成を示すブロック図1 is a block diagram showing a configuration of a restoration unit 100 in the image processing apparatus according to the embodiment shown in FIG. 多重解像度画像の例を示す図Diagram showing an example of a multi-resolution image 優先度算出用パッチFyの配置を説明するための図The figure for demonstrating arrangement | positioning of the patch Fy for priority calculation 埋め込み方向を示す図Diagram showing embedding direction 埋め込み方向の決定方法を説明するための図Diagram for explaining how to determine the embedding direction 優先度算出用パッチFy内の既知領域の画素数が少ない例を示す図The figure which shows the example with few pixels of the known area | region in the patch Fy for priority calculation 境界線の検出を説明するための図Diagram for explaining boundary detection 枠の変形処理を説明するための図The figure for demonstrating the deformation | transformation process of a frame 境界線が検出された場合の優先度の設定を説明するための図The figure for explaining the setting of the priority when the boundary line is detected 埋め込み元画像取得手段115の処理を説明するための図The figure for demonstrating the process of the embedding original image acquisition means 115 図1に示す画像処理装置全体の処理を示すフローチャートThe flowchart which shows the process of the whole image processing apparatus shown in FIG. 優先度算出手段110により優先度を算出する処理を示すフローチャートA flowchart showing processing for calculating priority by the priority calculation means 110

符号の説明Explanation of symbols

1 画像入力手段
10 修復領域取得手段
100 修復手段
105 多重解像度画像作成手段
110 優先度算出手段
115 埋め込み元画像取得用手段
120 埋め込み手段
130 縁辺修整手段
β 埋め込み優先度
DESCRIPTION OF SYMBOLS 1 Image input means 10 Restoration area | region acquisition means 100 Restoration means 105 Multi-resolution image creation means 110 Priority calculation means 115 Embedding source image acquisition means 120 Embedding means 130 Edge modification means β Embedding priority

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記載の画像処理方法。   The image processing method according to claim 1, wherein an area obtained by expanding the detected defect area is set as the area to be repaired. 媒体上に形成された画像を光電変換によって読み取って得たデジタル画像に対して、前記画像に本来無い微小物質が前記媒体上に付着したことに起因する欠陥領域を修復する画像処理装置において、
糸状で、かつ背景とのコントラストが強い微小領域を検出するための第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.
JP2005094568A 2005-03-29 2005-03-29 Image processing method, apparatus, and program Expired - Fee Related JP4315349B2 (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (4)

* Cited by examiner, † Cited by third party
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