JP6798229B2 - Image processing device and image processing method - Google Patents

Image processing device and image processing method Download PDF

Info

Publication number
JP6798229B2
JP6798229B2 JP2016196606A JP2016196606A JP6798229B2 JP 6798229 B2 JP6798229 B2 JP 6798229B2 JP 2016196606 A JP2016196606 A JP 2016196606A JP 2016196606 A JP2016196606 A JP 2016196606A JP 6798229 B2 JP6798229 B2 JP 6798229B2
Authority
JP
Japan
Prior art keywords
image
damaged portion
pixel
evaluation
background
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2016196606A
Other languages
Japanese (ja)
Other versions
JP2018060324A (en
Inventor
侑斗 芳賀
侑斗 芳賀
拓章 寒河江
拓章 寒河江
宏亘 村井
宏亘 村井
高橋 健太
健太 高橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2016196606A priority Critical patent/JP6798229B2/en
Publication of JP2018060324A publication Critical patent/JP2018060324A/en
Application granted granted Critical
Publication of JP6798229B2 publication Critical patent/JP6798229B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Analysis (AREA)

Description

本発明は、画像処理装置、及び画像処理方法に関する。 The present invention relates to an image processing apparatus and an image processing method.

油絵具を用いて描かれた絵画は、経年変化により表面にひび割れや亀裂やクラック等の破損部が発生し、絵画の外観を損なっていた。このため、破損部が発生する前の画像を鑑賞したいという要望があった。
そこで、従来、破損部が発生した絵画の画像から破損部を検知しておき、検知された破損部を修復するという画像処理技術が知られている。
特許文献1には、スキャナを介して取得した画像からダストや汚れなどの異常部分を除去する目的で、画像処理技術を用いて背景画像から異常部分を検知しておき、当該異常部分を修復する方法が開示されている。
Paintings drawn with oil paints had cracks, cracks, cracks, and other damaged parts on the surface due to aging, which spoiled the appearance of the paintings. For this reason, there has been a request to appreciate the image before the damaged portion is generated.
Therefore, conventionally, there is known an image processing technique in which a damaged portion is detected from an image of a painting in which a damaged portion is generated and the detected damaged portion is repaired.
In Patent Document 1, for the purpose of removing abnormal parts such as dust and dirt from an image acquired via a scanner, an abnormal part is detected from a background image by using an image processing technique, and the abnormal part is repaired. The method is disclosed.

しかし、従来の画像処理技術では、隣接する画素間での変化値が周辺の画素集合の平均値と比べて、極端に大きくなっている画素を異常部分であると決定している。
そのため、例えば破損部が生じている人物絵画の画像において、人物の服装を背景にしてレース素材が付けられている箇所では、レース素材が形成した特定のパターンを破損部として誤検知するといった問題があった。
特許文献1にあっては、画像処理を用いて破損部のようなノイズを除去する点が開示されている。しかし、背景画像に含まれる、破損部と同様な明度の差異を有する特定のパターンを破損部として誤検知するといった問題は解消できていない。
本発明は、上記に鑑みてなされたもので、その目的は、背景画像に含まれる、破損部と同様な明度の差異を有する特定のパターンを破損部として誤検知することを防止することにある。
However, in the conventional image processing technique, it is determined that a pixel in which the change value between adjacent pixels is extremely large compared to the average value of the peripheral pixel set is an abnormal portion.
Therefore, for example, in an image of a person's painting in which a damaged part is generated, there is a problem that a specific pattern formed by the lace material is erroneously detected as a damaged part in a place where a lace material is attached against the background of the person's clothes. there were.
Patent Document 1 discloses that noise such as a damaged portion is removed by using image processing. However, the problem of erroneously detecting a specific pattern included in the background image having a difference in brightness similar to that of the damaged portion as the damaged portion has not been solved.
The present invention has been made in view of the above, and an object of the present invention is to prevent erroneous detection of a specific pattern included in a background image having a difference in brightness similar to that of a damaged portion as a damaged portion. ..

請求項1記載の発明は、上記課題を解決するため、元画像に存在する破損部を検知する画像処理装置であって、前記元画像に平滑化処理を行うことにより各画素の背景となる画素の評価を表す背景評価画像を生成する背景評価画像生成手段と、前記元画像にエッジ検知処理と平滑化処理を行うことにより前記元画像の平坦性に係る評価を表す平坦評価画像を生成する平坦評価画像生成手段と、前記元画像と前記背景評価画像との間の差分値、及び前記平坦評価画像の画素値に基づいて、破損部を識別して破損部検知画像を生成する破損部検知画像生成手段と、を備えることを特徴とする。 The invention according to claim 1 is an image processing device that detects a damaged portion existing in the original image in order to solve the above problem, and is a pixel that becomes a background of each pixel by performing smoothing processing on the original image. A background evaluation image generating means for generating a background evaluation image representing the evaluation of the above, and a flatness that generates a flatness evaluation image representing the evaluation related to the flatness of the original image by performing edge detection processing and smoothing processing on the original image. A damaged portion detection image that identifies a damaged portion and generates a damaged portion detection image based on the difference value between the evaluation image generating means, the original image and the background evaluation image, and the pixel value of the flat evaluation image. It is characterized by comprising a generation means.

本発明によれば、背景画像に含まれる、破損部と同様な明度の差異を有する特定のパターンを破損部として誤検知することを防止することができる。 According to the present invention, it is possible to prevent erroneous detection of a specific pattern included in a background image having a difference in brightness similar to that of a damaged portion as a damaged portion.

本発明の一実施形態に係る情報処理装置、及び画像形成装置を示す図である。It is a figure which shows the information processing apparatus which concerns on one Embodiment of this invention, and the image forming apparatus. 本発明の一実施形態に係る情報処理装置のハードウェア構成を示す図である。It is a figure which shows the hardware configuration of the information processing apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る情報処理装置の機能構成を示す図である。It is a figure which shows the functional structure of the information processing apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る画像形成装置の機能構成を示す図である。It is a figure which shows the functional structure of the image forming apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る画像処理部の機能構成を示す機能ブロック図である。It is a functional block diagram which shows the functional structure of the image processing part which concerns on one Embodiment of this invention. 図5に示す背景評価画像生成部による背景評価画像生成処理について説明するためのフローチャートである。It is a flowchart for demonstrating the background evaluation image generation processing by the background evaluation image generation part shown in FIG. (a)はメディアンフィルタの構成を示す図であり、(b)はガウシアンフィルタの構成を示す図である。(A) is a diagram showing the configuration of a median filter, and (b) is a diagram showing the configuration of a Gaussian filter. 図5に示す平坦評価画像生成部による平坦評価画像生成処理について説明するためのフローチャートである。It is a flowchart for demonstrating the flat evaluation image generation processing by the flat evaluation image generation part shown in FIG. 図5に示す破損部検知画像[1]生成部による破損部検知画像[1]生成処理について説明するためのフローチャートである。It is a flowchart for demonstrating the damage part detection image [1] generation process by the damage part detection image [1] generation part shown in FIG. 図5に示す破損部検知画像[1]生成部による黒破損部検知処理のサブルーチンについて説明するためのフローチャートである。It is a flowchart for demonstrating the subroutine of the black break part detection processing by the damage part detection image [1] generation part shown in FIG. 図5に示す破損部検知画像[1]生成部による白破損部検知処理のサブルーチンについて説明するためのフローチャートである。It is a flowchart for demonstrating the subroutine of the white damage part detection processing by the damage part detection image [1] generation part shown in FIG. 図5に示す破損部検知画像[2]生成部による破損部検知画像[2]生成処理について説明するためのフローチャートである。It is a flowchart for demonstrating the damage part detection image [2] generation process by the damage part detection image [2] generation part shown in FIG. 図5に示す破損部検知画像[2]生成部による膨張処理について説明するためのグラフ図である。FIG. 5 is a graph for explaining the expansion process by the damaged portion detection image [2] generation portion shown in FIG. 図5に示す破損部修復画像[1]生成部による破損部修復画像[1]生成処理について説明するためのフローチャートである。It is a flowchart for demonstrating the damage part repair image [1] generation process by the damage part repair image [1] generation part shown in FIG. (a)は破損部検知画像[2]の各画素を表す画像例を示す図であり、(b)は背景評価画素リストを示す図である。(A) is a diagram showing an image example showing each pixel of the damaged portion detection image [2], and (b) is a diagram showing a background evaluation pixel list. 図5に示す破損部修復画像[2]生成部による破損部修復画像[2]生成処理について説明するためのフローチャートである。It is a flowchart for demonstrating the damage part repair image [2] generation process by the damage part repair image [2] generation part shown in FIG. 元画像を示す図である。It is a figure which shows the original image. 元画像から生成された背景評価画像を示す図である。It is a figure which shows the background evaluation image generated from the original image. 元画像から生成された平坦評価画像を示す図である。It is a figure which shows the flat evaluation image generated from the original image. 元画像及び平坦評価画像から生成された破損部検知画像[1]を示す図である。It is a figure which shows the damaged part detection image [1] generated from the original image and the flatness evaluation image. 破損部検知画像[1]から生成された破損部検知画像[2]を示す図である。It is a figure which shows the broken part detection image [2] generated from the broken part detection image [1]. 元画像及び破損部検知画像[2]から生成された破損部修復画像[1]を示す図である。It is a figure which shows the damaged part repair image [1] generated from the original image and the damaged part detection image [2]. 破損部修復画像[1]から生成された破損部修復画像[2]を示す図である。It is a figure which shows the broken part repair image [2] generated from the broken part repair image [1].

以下、本発明を図面に示した実施の形態により詳細に説明する。
本発明は背景画像に含まれる、破損部と同様な明度の差異を有する特定のパターンを破損部として誤検知することを防止するために、以下の構成を有する。
すなわち、本発明の画像処理装置は、元画像に存在する破損部を検知する画像処理装置であって、元画像に平滑化処理を行うことにより各画素の背景となる画素の評価を表す背景評価画像を生成する背景評価画像生成手段と、元画像にエッジ検知処理と平滑化処理を行うことにより元画像の平坦性に係る評価を表す平坦評価画像を生成する平坦評価画像生成手段と、元画像と背景評価画像との間の差分値、及び平坦評価画像の画素値に基づいて、破損部を識別して破損部検知画像を生成する破損部検知画像生成手段と、を備えることを特徴とする。
以上の構成を備えることにより、背景画像に含まれる、破損部と同様な明度の差異を有する特定のパターンを破損部として誤検知することを防止することができる。
上記の本発明の特徴に関して、以下、図面を用いて詳細に説明する。
Hereinafter, the present invention will be described in detail with reference to the embodiments shown in the drawings.
The present invention has the following configuration in order to prevent erroneous detection of a specific pattern included in the background image having a difference in brightness similar to that of the damaged portion as the damaged portion.
That is, the image processing device of the present invention is an image processing device that detects a damaged portion existing in the original image, and is a background evaluation that represents the evaluation of the pixels that are the background of each pixel by performing smoothing processing on the original image. A background evaluation image generation means for generating an image, a flat evaluation image generation means for generating a flat evaluation image representing an evaluation related to the flatness of the original image by performing edge detection processing and smoothing processing on the original image, and an original image. It is characterized by comprising a damaged portion detection image generation means for identifying a damaged portion and generating a damaged portion detection image based on a difference value between the image and the background evaluation image and a pixel value of the flat evaluation image. ..
By providing the above configuration, it is possible to prevent erroneous detection of a specific pattern included in the background image having a difference in brightness similar to that of the damaged portion as the damaged portion.
The above-mentioned features of the present invention will be described in detail below with reference to the drawings.

本発明の実施形態について、図面を参照して説明する。
<情報処理装置、及び画像形成装置>
図1は、本発明の一実施形態に係る情報処理装置1、及び画像形成装置2を示す図である。
図1に示すように、情報処理装置1と画像形成装置2とは、ネットワークを介して接続されている。情報処理装置1及び画像形成装置2の具体的な例としては、情報処理装置1がPC(Personal Computer)等の一般的な情報処理端末であり、画像形成装置2が家庭等で使用されるインクジェットプリンタである場合の他、画像形成装置2が業務用印刷において用いられる印刷機であり、情報処理装置1が、そのような業務用の印刷機を制御するための制御用の情報処理端末である場合等が考えられる。
An embodiment of the present invention will be described with reference to the drawings.
<Information processing device and image forming device>
FIG. 1 is a diagram showing an information processing device 1 and an image forming device 2 according to an embodiment of the present invention.
As shown in FIG. 1, the information processing device 1 and the image forming device 2 are connected via a network. As a specific example of the information processing device 1 and the image forming device 2, the information processing device 1 is a general information processing terminal such as a PC (Personal Computer), and the image forming device 2 is an inkjet used at home or the like. In addition to the case of a printer, the image forming apparatus 2 is a printing machine used in commercial printing, and the information processing apparatus 1 is a control information processing terminal for controlling such a commercial printing machine. There are cases.

情報処理装置1は、PC等の汎用的な情報処理装置である。情報処理装置1には、画像形成装置2に画像形成出力を実行させるための機能を実現するプリンタドライバを構成するためのソフトウェア・プログラムがインストールされている。 The information processing device 1 is a general-purpose information processing device such as a PC. A software program for configuring a printer driver that realizes a function for causing the image forming apparatus 2 to execute an image forming output is installed in the information processing apparatus 1.

<情報処理装置>
図2を参照して、本発明の一実施形態に係る情報処理装置1のハードウェア構成について説明する。図2に示すように、情報処理装置1は、一般的なサーバやPC等と同様の構成を含む。即ち、情報処理装置1は、CPU(Central Processing Unit)11、RAM(Random Access Memory)12、ROM(Read Only Memory)13、HDD(Hard Disk Drive)14及びI/F15がバス18を介して接続されている。また、I/F15にはLCD(Liquid Crystal Display)16及び操作部17が接続されている。
<Information processing device>
The hardware configuration of the information processing apparatus 1 according to the embodiment of the present invention will be described with reference to FIG. As shown in FIG. 2, the information processing device 1 includes a configuration similar to that of a general server, PC, or the like. That is, in the information processing device 1, the CPU (Central Processing Unit) 11, the RAM (Random Access Memory) 12, the ROM (Read Only Memory) 13, the HDD (Hard Disk Drive) 14, and the I / F 15 are connected via the bus 18. Has been done. Further, an LCD (Liquid Crystal Display) 16 and an operation unit 17 are connected to the I / F 15.

CPU11は、情報処理装置1全体の動作を制御する。RAM12は、情報の高速な読み書きが可能な揮発性の記憶媒体であり、CPU11が情報を処理する際の作業領域として用いられる。
ROM13は、読み出し専用の不揮発性記憶媒体であり、ファームウェア等のプログラムが格納されている。HDD14は、情報の読み書きが可能な不揮発性の記憶媒体であり、OS(Operating System)や各種の制御プログラム、アプリケーション・プログラム等が格納される。上述したプリンタドライバを構成するためのソフトウェア・プログラムも、HDD14に格納されている。
The CPU 11 controls the operation of the entire information processing device 1. The RAM 12 is a volatile storage medium capable of reading and writing information at high speed, and is used as a work area when the CPU 11 processes the information.
The ROM 13 is a read-only non-volatile storage medium, and stores programs such as firmware. The HDD 14 is a non-volatile storage medium capable of reading and writing information, and stores an OS (Operating System), various control programs, application programs, and the like. The software program for configuring the printer driver described above is also stored in the HDD 14.

I/F15は、バス18と各種のハードウェアやネットワーク等を接続し制御する。LCD16は、ユーザが情報処理装置1の状態を確認するための視覚的ユーザインタフェースである。操作部17は、キーボードやマウス等、ユーザが情報処理装置1に情報を入力するためのユーザインタフェースである。 The I / F 15 connects and controls the bus 18 with various hardware, networks, and the like. The LCD 16 is a visual user interface for the user to confirm the state of the information processing device 1. The operation unit 17 is a user interface such as a keyboard and a mouse for the user to input information to the information processing device 1.

このようなハードウェア構成において、ROM13やHDD14若しくは光学ディスク等の記憶媒体に格納されたプログラムを読み出してRAM12に書き込み、CPU11がRAM12から読み込んだそれらのプログラムに従って演算を行うことにより、ソフトウェア制御部が構成される。このようにして構成されたソフトウェア制御部と、ハードウェアとの組み合わせによって、情報処理装置1の機能が実現される。 In such a hardware configuration, the software control unit reads a program stored in a storage medium such as a ROM 13, an HDD 14, or an optical disk, writes it to the RAM 12, and performs an operation according to the program read from the RAM 12 by the CPU 11. It is composed. The function of the information processing apparatus 1 is realized by the combination of the software control unit configured in this way and the hardware.

<情報処理装置の機能構成>
次に、本発明の一実施形態に係る情報処理装置1の機能構成について説明する。
図3に示すように、情報処理装置1は、コントローラ20、及び外部I/F42を含む。外部I/F42は、情報処理装置1が画像形成装置2との間で情報をやり取りするためのインタフェースであり、Ethernet(登録商標)やUSB(Universal Serial Bus)インタフェースが用いられる。
<Functional configuration of information processing device>
Next, the functional configuration of the information processing apparatus 1 according to the embodiment of the present invention will be described.
As shown in FIG. 3, the information processing device 1 includes a controller 20 and an external I / F 42. The external I / F 42 is an interface for the information processing device 1 to exchange information with the image forming device 2, and an Ethernet (registered trademark) or USB (Universal Serial Bus) interface is used.

コントローラ20は、上述したように構成されるソフトウェア制御部であり、アプリケーション22、通信制御部40及びプリンタドライバ26を含む。
アプリケーション22は、画像データや文書データ等を閲覧、編集するための機能を実現するソフトウェアである。
アプリケーション22は、画像処理部24を有し、画像処理部24により元画像から最終的に破損部が修復された画像を得る。
The controller 20 is a software control unit configured as described above, and includes an application 22, a communication control unit 40, and a printer driver 26.
The application 22 is software that realizes a function for viewing and editing image data, document data, and the like.
The application 22 has an image processing unit 24, and the image processing unit 24 obtains an image in which the damaged portion is finally repaired from the original image.

アプリケーション22は、ユーザの操作に従って閲覧または編集中の画像データや文書データ等の印刷指示を出力する。通信制御部40は、コントローラ20が外部I/F42を介して画像形成装置2との間で情報をやり取りするための処理を行う。 The application 22 outputs a print instruction such as image data or document data being viewed or edited according to the user's operation. The communication control unit 40 performs a process for the controller 20 to exchange information with the image forming apparatus 2 via the external I / F 42.

プリンタドライバ26は、アプリケーション22からの印刷指示を受けて、画像形成装置2が画像形成出力を実行するための情報である描画情報を生成する。この際、プリンタドライバ26は、意図した通りの高精度な画像が形成されるように、画像形成装置2に含まれる画像形成機構の特性に応じた描画情報を生成する。 The printer driver 26 receives a print instruction from the application 22 and generates drawing information which is information for the image forming apparatus 2 to execute the image forming output. At this time, the printer driver 26 generates drawing information according to the characteristics of the image forming mechanism included in the image forming apparatus 2 so that a highly accurate image as intended is formed.

<プリンタドライバ>
図3に示すように、プリンタドライバ26は、印刷指示取得部28、描画情報生成部30、描画情報転送部32、ドットパターン生成部34、読取画像取得部36、ノズル特性判断部38を含む。プリンタドライバ26の機能については後に詳述する。
<Printer driver>
As shown in FIG. 3, the printer driver 26 includes a print instruction acquisition unit 28, a drawing information generation unit 30, a drawing information transfer unit 32, a dot pattern generation unit 34, a scanned image acquisition unit 36, and a nozzle characteristic determination unit 38. The function of the printer driver 26 will be described in detail later.

<画像形成装置>
画像形成装置2は、インクジェット方式の画像形成機構を含み、情報処理装置1から入力された描画情報に従って画像形成出力を実行する。
図4を参照して、本発明の一実施形態に係る画像形成装置2の機能構成について説明する。図4に示すように、画像形成装置2は、コントローラ70、操作パネル30、キャリッジ50、主走査モータ56、副走査モータ60、搬送ベルト62、及び帯電ローラ66を含む。
<Image forming device>
The image forming apparatus 2 includes an inkjet type image forming mechanism, and executes an image forming output according to drawing information input from the information processing apparatus 1.
The functional configuration of the image forming apparatus 2 according to the embodiment of the present invention will be described with reference to FIG. As shown in FIG. 4, the image forming apparatus 2 includes a controller 70, an operation panel 30, a carriage 50, a main scanning motor 56, a sub scanning motor 60, a conveyor belt 62, and a charging roller 66.

操作パネル30は、画像形成装置1に必要な情報の入力及び表示を行なうための操作部及び表示部として機能するユーザインタフェースである。キャリッジ50は、インクを吐出する記録ヘッド54及び記録ヘッド54を駆動するヘッドドライバ52が搭載されており、搬送ベルト62によって搬送される用紙に対して、用紙の搬送方向である副走査方向と直角な方向である主走査方向に動かされることにより、用紙の前面に対してインクを吐出して画像形成出力を行う。 The operation panel 30 is a user interface that functions as an operation unit and a display unit for inputting and displaying information necessary for the image forming apparatus 1. The carriage 50 is equipped with a recording head 54 for ejecting ink and a head driver 52 for driving the recording head 54, and is perpendicular to the sub-scanning direction, which is the paper conveying direction, with respect to the paper conveyed by the conveying belt 62. Ink is ejected to the front surface of the paper to output an image by being moved in the main scanning direction.

主走査モータ56は、キャリッジ50を主走査方向に動かすための動力を供給するモータである。副走査モータ60は、画像の出力対象である用紙を搬送する搬送ベルト62に動力を供給するモータである。主走査モータ56及び副走査モータ60の回転は、夫々エンコーダセンサ58及びエンコーダセンサ64によって検知され、その検知信号がコントローラ70に入力される。帯電ローラ66は、搬送ベルト62を帯電させることにより、画像の出力対象である用紙を搬送ベルト62に吸着させるための静電力を発生させる。 The main scanning motor 56 is a motor that supplies power for moving the carriage 50 in the main scanning direction. The sub-scanning motor 60 is a motor that supplies power to a transport belt 62 that conveys paper that is an image output target. The rotations of the main scanning motor 56 and the sub scanning motor 60 are detected by the encoder sensor 58 and the encoder sensor 64, respectively, and the detection signals are input to the controller 70. The charging roller 66 charges the transport belt 62 to generate an electrostatic force for attracting the paper to be output of the image to the transport belt 62.

コントローラ20は、画像形成装置1の動作を制御する制御部であり、図2に示すように、CPU(Central Processing Unit)201、ROM(Read Only Memory)202、RAM(Random Access Memory)203、NVRAM(Non Volatile RAM)204、ASIC(Application Specific Integrated Circuit)205、ホストI/F82、印刷制御部84、モータ駆動部86、ACバイアス供給部88及びI/O90を含む。 The controller 20 is a control unit that controls the operation of the image forming apparatus 1, and as shown in FIG. 2, the CPU (Central Processing Unit) 201, the ROM (Read Only Memory) 202, the RAM (Random Access Memory) 203, and the NVRAM. (Non Volatile RAM) 204, ASIC (Application Specific Integrated Circuit) 205, host I / F 82, print control unit 84, motor drive unit 86, AC bias supply unit 88 and I / O 90 are included.

CPU72は、コントローラ70各部の動作を制御する。ROM74は、読み出し専用の不揮発性記憶媒体であり、ファームウェア等のプログラムが格納されている。RAM76は、情報の高速な読み書きが可能な揮発性の記憶媒体であり、CPU72が情報を処理する際の作業領域として用いられる。NVRAM78は、情報の読み書きが可能な不揮発性の記憶媒体であり、制御プログラムや制御用のパラメータが格納される。 The CPU 72 controls the operation of each part of the controller 70. The ROM 74 is a read-only non-volatile storage medium, and stores programs such as firmware. The RAM 76 is a volatile storage medium capable of reading and writing information at high speed, and is used as a work area when the CPU 72 processes the information. The NVRAM 78 is a non-volatile storage medium capable of reading and writing information, and stores a control program and control parameters.

ASIC80は、画像形成出力に際して必要な画像処理を実行するハードウェア回路である。ホストI/F82は、情報処理装置1から描画データを受信するためのインタフェースであり、Ethernet(登録商標)やUSB(Universal Serial Bus)インタフェースが用いられる。I/O90は、エンコーダセンサ58、28等の各種センサからの検知信号をコントローラ70に入力するためのポートである。 The ASIC 80 is a hardware circuit that executes image processing necessary for image formation output. The host I / F 82 is an interface for receiving drawing data from the information processing device 1, and an Ethernet (registered trademark) or USB (Universal Serial Bus) interface is used. The I / O 90 is a port for inputting detection signals from various sensors such as encoder sensors 58 and 28 to the controller 70.

印刷制御部84は、キャリッジ50に含まれる記録ヘッド54を駆動制御するためのデータ転送手段、駆動波形を生成する駆動波形生成手段を含む。モータ駆動部86は、主走査モータ56及び副走査モータ60を駆動する。ACバイアス供給部88は、帯電ローラ66にACバイアスを供給する。 The print control unit 84 includes a data transfer means for driving and controlling the recording head 54 included in the carriage 50, and a driving waveform generating means for generating a driving waveform. The motor drive unit 86 drives the main scanning motor 56 and the sub-scanning motor 60. The AC bias supply unit 88 supplies the AC bias to the charging roller 66.

情報処理装置1から入力される描画データは、上述したように、コントローラ70においてホストI/F82に入力され、ホストI/F内の受信バッファに格納される。CPU72は、RAM76にロードされたプログラムに従って演算を行うことにより、ホストI/F82に含まれる受信バッファ内の描画データを読み出して解析し、ASIC80を制御して必要な画像処理、データの並び替え処理等を行なう。その後、CPU72は、印刷制御部84を制御することにより、ASIC80において処理された描画データを、ヘッドドライバ52に転送する。 As described above, the drawing data input from the information processing device 1 is input to the host I / F 82 in the controller 70 and stored in the reception buffer in the host I / F. The CPU 72 reads and analyzes the drawing data in the receive buffer included in the host I / F 82 by performing an operation according to the program loaded in the RAM 76, and controls the ASIC 80 to perform necessary image processing and data sorting processing. And so on. After that, the CPU 72 controls the print control unit 84 to transfer the drawing data processed by the ASIC 80 to the head driver 52.

印刷制御部84は、上述した描画データをシリアルデータでヘッドドライバ52に転送するとともに、この描画データの転送及び転送の確定などに必要な転送クロックやラッチ信号、滴制御信号(マスク信号)などをヘッドドライバ52に出力する。また、印刷制御部84は、ROM74に格納されている駆動信号のパターンデータをD/A変換するD/A変換器及び電圧増幅器、電流増幅器等で構成される駆動波形生成部及びヘッドドライバ52に与える駆動波形選択手段を含み、1の駆動パルス(駆動信号)或いは複数の駆動パルス(駆動信号)で構成される駆動波形を生成してヘッドドライバ52に対して出力する。 The print control unit 84 transfers the above-mentioned drawing data as serial data to the head driver 52, and also transfers a transfer clock, a latch signal, a drop control signal (mask signal), and the like necessary for transferring the drawing data and confirming the transfer. Output to the head driver 52. Further, the print control unit 84 is used as a drive waveform generator and a head driver 52 composed of a D / A converter that D / A-converts the pattern data of the drive signal stored in the ROM 74, a voltage amplifier, a current amplifier, and the like. The drive waveform selection means to be given is included, and a drive waveform composed of one drive pulse (drive signal) or a plurality of drive pulses (drive signals) is generated and output to the head driver 52.

ヘッドドライバ52は、シリアルに入力される1行分の描画データに基づき、印刷制御部84から与えられる駆動波形を構成する駆動信号を、記録ヘッド54から液滴を吐出させるためのエネルギーを発生する駆動素子に対して選択的に印加することで記録ヘッド54を駆動する。このとき、ヘッドドライバ52は、駆動波形を構成する駆動パルスを選択することによって、例えば、大滴(大ドット)、中滴(中ドット)、小滴(小ドット)など、大きさの異なるドットを打ち分けることができる。 The head driver 52 generates energy for ejecting droplets from the recording head 54 as a drive signal constituting a drive waveform given from the print control unit 84 based on the drawing data for one line continuously input. The recording head 54 is driven by selectively applying it to the driving element. At this time, the head driver 52 selects dots that form a drive waveform, so that dots having different sizes, such as large droplets (large dots), medium droplets (medium dots), and small droplets (small dots), are used. Can be separated.

また、CPU72は、リニアエンコーダを構成するエンコーダセンサ58、からの検知パルスをサンプリングして得られる速度検知値及び位置検知値と、予め格納した速度・位置プロファイルから得られる速度目標値及び位置目標値とに基づいて主走査モータ56に対する駆動出力値(制御値)を算出してモータ駆動部86を介して主走査モータ56を駆動する。同様に、CPU72は、ロータリエンコーダを構成するエンコーダセンサ64からの検知パルスをサンプリングして得られる速度検知値及び位置検知値と、予め格納した速度・位置プロファイルから得られる速度目標値及び位置目標値とに基づいて副走査モータ60に対する駆動出力値(制御値)を算出してモータ駆動部86を介しモータドライバを介して副走査モータ60を駆動する。 Further, the CPU 72 has a speed detection value and a position detection value obtained by sampling detection pulses from an encoder sensor 58 constituting a linear encoder, and a speed target value and a position target value obtained from a speed / position profile stored in advance. The drive output value (control value) for the main scanning motor 56 is calculated based on the above, and the main scanning motor 56 is driven via the motor drive unit 86. Similarly, the CPU 72 has a speed detection value and a position detection value obtained by sampling a detection pulse from an encoder sensor 64 constituting a rotary encoder, and a speed target value and a position target value obtained from a speed / position profile stored in advance. The drive output value (control value) for the sub-scanning motor 60 is calculated based on the above, and the sub-scanning motor 60 is driven via the motor drive unit 86 and the motor driver.

<プリンタドライバの動作>
上述したような情報処理装置1及び画像形成装置2が連動することにより、画像形成出力が実行される。即ち、情報処理装置1において動作するアプリケーション22からの印刷指示は、プリンタドライバ26において処理されて画像形成装置2が出力可能な多値の記録ドットパターンが生成され、それがラスタライズされて描画データとして画像形成装置2に転送され、画像形成装置2において画像形成出力が実行される。
<Printer driver operation>
The image formation output is executed by interlocking the information processing device 1 and the image forming device 2 as described above. That is, the print instruction from the application 22 operating in the information processing apparatus 1 is processed by the printer driver 26 to generate a multi-valued recording dot pattern that can be output by the image forming apparatus 2, which is rasterized and used as drawing data. It is transferred to the image forming apparatus 2, and the image forming output is executed in the image forming apparatus 2.

具体的には、情報処理装置1内では、アプリケーション22やオペレーティングシステムからの画像の描画又は文字の記録命令(例えば記録する線の位置と太さと形などを記述したものや、記録する文字の書体と大きさと位置などを記述したもの)は、印刷指示取得部28によって取得され、描画データメモリに一時的に保存される。なお、これらの命令は、特定のプリント言語で記述されたものである。 Specifically, in the information processing device 1, an image drawing or character recording command from the application 22 or the operating system (for example, a description of the position, thickness, and shape of a line to be recorded, or a typeface of characters to be recorded) The size and position are described) is acquired by the print instruction acquisition unit 28, and is temporarily stored in the drawing data memory. It should be noted that these instructions are written in a specific print language.

そして、描画データメモリに記憶された命令は、描画情報生成部30に含まれるラスタライザによって解釈され、線の記録命令であれば、指定された位置や太さ等に応じた記録ドットパターンに変換され、また、文字の記録命令であれば情報処理装置1内に保存されているフォントアウトラインデータから対応する文字の輪郭情報を呼びだし指定された位置や大きさに応じた記録ドットパターンに変換され、イメージデータであれば、そのまま記録ドットパターンに変換される。 Then, the instruction stored in the drawing data memory is interpreted by the rasterizer included in the drawing information generation unit 30, and if it is a line recording instruction, it is converted into a recording dot pattern according to a designated position, thickness, and the like. If it is a character recording command, the outline information of the corresponding character is called from the font outline data stored in the information processing device 1 and converted into a recording dot pattern according to the specified position and size, and the image is displayed. If it is data, it is directly converted into a recording dot pattern.

その後、描画情報生成部30は、これらの記録ドットパターンに対して画像処理を行ってラスタデータメモリに記憶する。このとき、情報処理装置1は、直交格子を基本記録位置として、記録ドットパターンのデータにラスタライズする。画像処理としては、例えば色を調整するためのカラーマネージメント処理やγ補正処理、ディザ法や誤差拡散法などの中間調処理、さらには下地除去処理、インク総量規制処理などがある。そして、ラスタデータメモリに記憶された記録ドットパターンが、描画情報転送部32により、インタフェースを経由してインクジェットプリンタ500へ転送される。 After that, the drawing information generation unit 30 performs image processing on these recorded dot patterns and stores them in the raster data memory. At this time, the information processing apparatus 1 rasterizes the data of the recording dot pattern with the orthogonal grid as the basic recording position. Image processing includes, for example, color management processing and γ correction processing for adjusting colors, halftone processing such as dither method and error diffusion method, background removal processing, and total ink amount regulation processing. Then, the recording dot pattern stored in the raster data memory is transferred to the inkjet printer 500 by the drawing information transfer unit 32 via the interface.

上述したように描画情報生成部30において実行される処理のうち、中間調処理は、ハーフトーン処理とも呼ばれるものである。このハーフトーン処理とは、画像形成出力を行う対象の画像情報における色表現の階調を、画像形成装置2による画像形成出力性能における色表現の階調に合わせて変換する処理である。 Among the processes executed by the drawing information generation unit 30 as described above, the halftone process is also called a halftone process. This halftone processing is a process of converting the gradation of color expression in the image information of the target to be output for image formation according to the gradation of color expression in the image formation output performance by the image forming apparatus 2.

上述したように、インクジェット方式の画像形成装置2においては、記録ヘッド54に含まれるノズルからインクを吐出することによって各画素を形成して画像形成出力を実行する。この際、上述したように、吐出させるインク滴を小滴、中滴、大滴に切り替えることにより、1つの画素において、無色も含めて4階調(2bit)程度の濃度表現が可能である。しかしながら、情報処理装置1のようなPC上では、画像データは256階調(8bit)等で処理されることが一般的である。 As described above, in the inkjet type image forming apparatus 2, each pixel is formed by ejecting ink from a nozzle included in the recording head 54, and image forming output is executed. At this time, as described above, by switching the ink droplets to be ejected to small droplets, medium droplets, and large droplets, it is possible to express the density of about 4 gradations (2 bits) including colorless in one pixel. However, on a PC such as the information processing device 1, the image data is generally processed with 256 gradations (8 bits) or the like.

従って、ハーフトーン処理においては、例えば8bitによって表現された画像データを、2bitによって表現された画像データに、人の目視によって認識される画質を劣化させることなく変換する。変換前と変換後の画像データを夫々の画素毎に比較すると、濃度階調が少なくなっているため明らかに異なる。そのため、ハーフトーン処理においては、複数の画素を含む所定の面積単位毎に画像を比較した場合に人の目視によって同様の画像として認識されるように、面積階調法によって画像の変換を行う。その結果、ハーフトーン処理においては、面積階調法に起因する量子化誤差が生じる。 Therefore, in the halftone processing, for example, the image data represented by 8 bits is converted into the image data represented by 2 bits without deteriorating the image quality perceived by human eyes. Comparing the image data before and after conversion for each pixel, it is clearly different because the density gradation is small. Therefore, in the halftone processing, the image is converted by the area gradation method so that when the images are compared for each predetermined area unit including a plurality of pixels, the images are recognized as similar images by human eyes. As a result, in the halftone processing, a quantization error due to the area gradation method occurs.

量子化誤差を考慮したハーフトーン処理としては誤差拡散法やDBS(Direct Binary Search)法などが知られる。誤差拡散法は、各画素で発生した量子化誤差に重み付けをして蓄積し、周辺の画素に拡散する方法で、ディザ法などのように規定の繰り返しパターンとの比較で量子化を行なう方法に比べ、テクスチャやモアレなどが生じにくい。しかし、処理の方向に起因するワーム上のドット連なりが生じやすいという特徴もある。DBSは、ドット配置を仮決めし、ドット配置を画素ごとあるいは区間ごとにドットのON/OFFや種類の入れ替えをして入力との量子化誤差を計算し、誤差が低減する場合ドット配置を更新することをくり返すことで誤差を低減するもので、画像の先鋭性に優れ、誤差拡散で生じるワームのような規則的な模様も発生しにくい。 The error diffusion method and the DBS (Direct Binary Search) method are known as halftone processing in consideration of the quantization error. The error diffusion method is a method in which the quantization error generated in each pixel is weighted and accumulated, and then diffused to surrounding pixels.It is a method of performing quantization by comparing with a specified repeating pattern such as the dither method. In comparison, texture and moire are less likely to occur. However, there is also a feature that a series of dots on the worm is likely to occur due to the direction of processing. DBS tentatively determines the dot arrangement, calculates the quantization error with the input by turning the dot ON / OFF and switching the type for each pixel or section, and updates the dot arrangement when the error is reduced. The error is reduced by repeating the process, and the sharpness of the image is excellent, and regular patterns such as worms caused by error diffusion are unlikely to occur.

上記処理はデータ処理に関するものであるため、あくまで理論上のものである。そもそもデジタルデータは1つ1つの画素が四角形状で扱われるが、ノズルから吐出されたインクが用紙上に定着して形成されるドット(以降、着弾画像とする)の1つ1つは円形状である。そのため隣接画素位置のドットの有無やドット種類によって紙面の埋まり方は異なる。 Since the above processing is related to data processing, it is only theoretical. In the first place, each pixel of digital data is treated as a square shape, but each dot (hereinafter referred to as a landing image) formed by fixing the ink ejected from the nozzle on the paper has a circular shape. Is. Therefore, how to fill the paper surface differs depending on the presence or absence of dots at adjacent pixel positions and the type of dots.

また、インクは機械的な制御によってノズルから吐出される。そのため、圧電素子の応答特性やノズルの微細な形状等、様々な要因によって夫々のノズル毎の着弾画像の特性が異なる。そのため、同一の駆動信号に基づいて駆動された場合でも、着弾画像のドットの大きさが異なっていたり、着弾の位置がずれてしまったり、サテライトが発生し、隣接画素に影響を与えてしまうことがある。なお、ここでサテライトとは、主滴(メインドット)と付随して吐出される微小滴のことである。 Ink is ejected from the nozzle by mechanical control. Therefore, the characteristics of the landing image for each nozzle differ depending on various factors such as the response characteristics of the piezoelectric element and the fine shape of the nozzle. Therefore, even if they are driven based on the same drive signal, the dot size of the landing image may be different, the landing position may shift, satellites may occur, and adjacent pixels may be affected. There is. Here, the satellite is a minute drop that is ejected in association with the main drop (main dot).

その結果、均一なデータを印刷しているつもりでも個々のヘッド、ノズルの特性によって、インクの付着量やドットの重なり方に差が出るため、これが色味の違いやスジやバンディングといった画像不具合として、人による目視において認識されてしまう場合もある。 As a result, even if you intend to print uniform data, the amount of ink adhered and the way dots overlap will differ depending on the characteristics of each head and nozzle, and this is an image defect such as a difference in color and streaks and banding. , It may be recognized visually by humans.

描画情報生成部30は、このような課題に対応するため、DBS法による誤差計算によってドットの入れ替え処理を行なう場合において、デジタル値ではなく、ドットの着弾モデルを形成して誤差を計算することでエンジン特性込みの印字データを作成する。 In order to deal with such a problem, the drawing information generation unit 30 forms a dot landing model instead of a digital value and calculates an error when performing dot replacement processing by error calculation by the DBS method. Create print data including engine characteristics.

そのため、画像形成装置2を用いて画像形成出力を行う場合、事前の処理として、ドットパターン生成部34によって生成された画像パッチを印刷し、それをセンサやスキャナ等によって読み取ることにより生成されたパッチ画像データを読取画像取得部36が取得し、ノズル特性判断部38がパッチ画像データに基づいて、画像形成装置2のノズルが形成するドットの着弾モデルを生成する。そして、以降の画像形成出力における描画データの生成処理において、描画情報生成部30は、各ノズルが吐出するドットを、この着弾モデルを用いてシミュレートする。 Therefore, when performing image formation output using the image forming apparatus 2, as a preliminary process, a patch generated by printing an image patch generated by the dot pattern generation unit 34 and reading it with a sensor, a scanner, or the like. The image data is acquired by the scanned image acquisition unit 36, and the nozzle characteristic determination unit 38 generates a landing model of dots formed by the nozzle of the image forming apparatus 2 based on the patch image data. Then, in the subsequent drawing data generation processing in the image formation output, the drawing information generation unit 30 simulates the dots ejected by each nozzle using this landing model.

まず、ドットパターン生成部34が生成する画像パターンの例について説明する。ドットパターン生成部34は、画像パターンを生成し、印刷指示取得部28に入力することによって画像形成装置2に画像パターンの画像形成出力を実行させる。このようにして出力された用紙をスキャナ等によって読み込むことにより生成された画像データを読取画像取得部36が取得し、ノズル特性判断部38がノズルによって形成されるドットのモデルを取得する。 First, an example of an image pattern generated by the dot pattern generation unit 34 will be described. The dot pattern generation unit 34 generates an image pattern and inputs it to the print instruction acquisition unit 28 to cause the image forming apparatus 2 to execute an image forming output of the image pattern. The scanned image acquisition unit 36 acquires the image data generated by reading the paper output in this manner with a scanner or the like, and the nozzle characteristic determination unit 38 acquires a dot model formed by the nozzle.

ノズル特性判断部38は、ドットパターン生成部34が生成したドットパターンと、読み取り画像情報取得部115が取得したドットパターンを読み取った画像情報、即ちドットパターン画像情報とを比較する。これにより、ノズル特性判断部38は、画像形成装置2に含まれる複数のノズル夫々によって吐出されたインクが画像形成出力対象の媒体である用紙において付着する位置、付着するインクの大きさ、付着するインクの形状及びサテライト(付着するインクの分布)の情報を含むノズル特性情報を生成する。 The nozzle characteristic determination unit 38 compares the dot pattern generated by the dot pattern generation unit 34 with the image information obtained by reading the dot pattern acquired by the read image information acquisition unit 115, that is, the dot pattern image information. As a result, the nozzle characteristic determination unit 38 adheres to the position where the ink ejected by each of the plurality of nozzles included in the image forming apparatus 2 adheres to the paper which is the medium for image formation output, the size of the adhered ink, and the adhesion. Generates nozzle characteristic information including information on ink shape and satellite (distribution of adhered ink).

ノズルが4行1列に配置されたキャリッジ50を例とし、4行のパターンを形成する場合を例として示している。これは、CMYK各色に対して1つノズルが設けられている最も基本的な例であり、形成される画像パターンは、ライン方式の記録ヘッド等、ノズルの配置によって設定される。 Taking the carriage 50 in which the nozzles are arranged in 4 rows and 1 column as an example, a case where a pattern of 4 rows is formed is shown as an example. This is the most basic example in which one nozzle is provided for each CMYK color, and the image pattern to be formed is set by the arrangement of nozzles such as a line type recording head.

ドットパターン生成部34によって生成される画像パターンのレイアウトについては特に限定するものではないが、パターンのドット形成密度が高いと、周囲のドットと結合し、どのドットがどのノズルから吐出したものかの区別が困難となるため、ドットの大きさや着弾位置が変動しても、どのドットがどのノズルから吐出したものかを区別できるように十分な隙間を持ったパターンであることが望ましい。 The layout of the image pattern generated by the dot pattern generation unit 34 is not particularly limited, but if the dot formation density of the pattern is high, it is combined with the surrounding dots and which dot is ejected from which nozzle. Since it is difficult to distinguish them, it is desirable that the pattern has a sufficient gap so that it can be distinguished which dot is ejected from which nozzle even if the dot size and the landing position fluctuate.

また、複数サイズのドットを扱えるプリンタの場合は、滴種によってそもそもの基準となるドットの大きさが異なる。また、大滴は狙いどおりに着弾するが、中滴は曲がりやすい等、滴種によって着弾の特性が異なる場合もある。このため、滴種ごとに画像パターンを印刷、読み込みを行なって着弾モデルを取得しておくことが望ましい。 Further, in the case of a printer capable of handling dots of a plurality of sizes, the standard dot size differs depending on the drop type. In addition, large drops land as intended, but medium drops tend to bend, and the characteristics of landing may differ depending on the type of drop. Therefore, it is desirable to print and read the image pattern for each drop type to obtain the landing model.

次に、描画情報生成部30によるハーフトーン処理について説明する。描画情報生成部30は、DBS法を用いる。具体的には、注目領域のドットを、ドットのON/OFFや種類の変更、即ち画像形成装置2が対応している階調内での濃度の変更を行いながら入力画像との誤差を求め、誤差が変更前より小さくなる場合、変更内容に配置を更新していくことで量子化誤差を低減する。 Next, the halftone processing by the drawing information generation unit 30 will be described. The drawing information generation unit 30 uses the DBS method. Specifically, the error between the dots in the region of interest and the input image is obtained while changing the dot ON / OFF and the type, that is, changing the density within the gradation supported by the image forming apparatus 2. If the error is smaller than before the change, the quantization error is reduced by updating the arrangement according to the changed content.

ここでは、1画素ごとに注目画素の変更や誤差の判定処理をしてもよいし、所定区域内でドットのON/OFFや別種類のドットへの入れ替えの組み合わせを行い、区間内の誤差が小さくなる組み合わせ条件で配置を選択してもよい。また、実際のデータにはドットゲインがあるため、処理の前後関係で隣接画素の影響が誤差に反映されていない場合もある。このため、データを一巡したのち再度誤差の計算や配置の見直しをかける処理をいれてもよく、この際、配置を見直す区間の切り方を変えても良い。 Here, the pixel of interest may be changed or the error may be determined for each pixel, or the dot may be turned ON / OFF or replaced with another type of dot within a predetermined area, and the error in the section may be reduced. The arrangement may be selected according to the combination condition that becomes smaller. Further, since the actual data has a dot gain, the influence of adjacent pixels may not be reflected in the error due to the context of the processing. For this reason, it is possible to add a process of calculating the error and reviewing the arrangement again after going through the data, and at this time, the method of cutting the section for reviewing the arrangement may be changed.

処理の終了条件としては、処理回数で終了する場合や、前回の処理に対して誤差が低減しなくなった時点で終了する構成をとることが可能である。また、初回は予めディザや誤差拡散処理などでハーフトーン処理を行って、その配置をスタートとして処理をしてもよい。その他、誤差比較後の入れ替え処理の判定を都度、誤差が最小となる場合で決めるのではなく、シミュレーテッドアニーリング法などを利用して決めていく場合なども利用可能である。 As the end condition of the process, it is possible to adopt a configuration in which the process ends with the number of processes or when the error is no longer reduced with respect to the previous process. Further, at the first time, halftone processing may be performed in advance by dither or error diffusion processing, and the processing may be performed starting from the arrangement. In addition, it is also possible to use a simulated annealing method or the like to determine the replacement process after error comparison, instead of determining the case where the error is minimized each time.

この誤差計算を行なう際に、単純なデジタルのデータではなく、取得したドットモデルを打つものとして誤差の評価を進める。そのため、描画情報生成部30は、ノズル特性判断部38が取得したノズル特性に基づき、注目画素のドット配置、即ち、出力対象の画像データを画像形成装置2の階調に合わせて変換した画像のドット配置を、各ノズルのドットモデルに置き換えて着弾後の画像をシミュレートする。 When performing this error calculation, the error is evaluated assuming that the acquired dot model is hit instead of simple digital data. Therefore, the drawing information generation unit 30 is based on the nozzle characteristics acquired by the nozzle characteristic determination unit 38, and the dot arrangement of the pixel of interest, that is, the image data to be output is converted according to the gradation of the image forming apparatus 2. The dot arrangement is replaced with the dot model of each nozzle to simulate the image after landing.

例えば、描画情報生成部30はまず、各ノズルに入力データ、即ち出力対象の元の画像データをハーフトーン処理することにより、量子化する。更に、描画情報生成部30は、ノズル特性判断部38によって取得されたノズル特性に基づき、各ノズルがインクを吐出した場合の着弾状態、即ちインクの分布を推測したデータを生成する。 For example, the drawing information generation unit 30 first quantizes the input data, that is, the original image data to be output, by performing halftone processing on each nozzle. Further, the drawing information generation unit 30 generates data in which the landing state when each nozzle ejects ink, that is, the ink distribution is estimated, based on the nozzle characteristics acquired by the nozzle characteristic determination unit 38.

次に、描画情報生成部30は、着弾後の画像と、入力データとの誤差を算出する。この際、描画情報生成部30は、入力データの画素に対応する面積内のインク付着と入力画像のレベルとを比較することで求める。例えば、入力データの画素に対応する場所のインク被覆量を元に多値レベル化する。例えば、入力データが0〜255の濃度階調(ここでは255が黒とする)だったとして、該当画素における面積の被覆量が50%であった場合、その場所の出力は0〜255の半分に当たる127とし、入力データとの差分を誤差とする。 Next, the drawing information generation unit 30 calculates an error between the image after landing and the input data. At this time, the drawing information generation unit 30 obtains the ink adhesion in the area corresponding to the pixels of the input data by comparing the level of the input image. For example, the multi-value level is increased based on the ink coating amount at the location corresponding to the pixel of the input data. For example, if the input data has a density gradation of 0 to 255 (here, 255 is black) and the area coverage of the corresponding pixel is 50%, the output at that location is half of 0 to 255. 127, which corresponds to, and the difference from the input data is used as an error.

描画情報生成部30は、入力データをインク被覆量0%から100%がそれぞれ濃度階調0〜255に対応するように多値データ化して、多値化シミュレートデータを生成する。そのようにして生成した多値化シミュレートデータと入力データとを比較することでその差分を誤差とする。 The drawing information generation unit 30 converts the input data into multi-value data so that the ink coating amount of 0% to 100% corresponds to the density gradations 0 to 255, respectively, and generates multi-value simulation data. By comparing the multi-valued simulated data generated in this way with the input data, the difference is used as an error.

描画情報生成部30は、被覆量ではなく、輝度や濃度を元にして行なってもよい(例えば最大濃度が255に、最低濃度=紙面濃度が0に対応するように変換する)。このように、描画情報生成部30は、ノズル特性を加味した上で、量子化の条件を変えながら誤差の算出/比較を繰り返すことで、エンジン特性を含めた条件化で入力との誤差が少なくなる量子化条件を決めていく。 The drawing information generation unit 30 may perform the operation based on the brightness and the density instead of the covering amount (for example, the maximum density is converted to 255, and the minimum density = the paper surface density is converted to 0). In this way, the drawing information generation unit 30 repeats the calculation / comparison of the error while changing the quantization condition after adding the nozzle characteristics, so that the error with the input is small due to the conditions including the engine characteristics. The quantization condition is determined.

<描画情報生成部30の動作例>
出力対象の画像の全画素数が“M”、無色、小滴、中滴、大滴等の画像形成装置2の濃度階調が“A”の場合を例として説明する。先ず、描画情報生成部30は、M画素の全てについてドット配置を仮決めする。
<Operation example of drawing information generation unit 30>
The case where the total number of pixels of the image to be output is "M", the density gradation of the image forming apparatus 2 such as colorless, small droplets, medium droplets, and large droplets is "A" will be described as an example. First, the drawing information generation unit 30 tentatively determines the dot arrangement for all the M pixels.

多値デジタルデータから、中央のハーフトーン後デジタルデータのように、画像形成出力対象の画像の階調を画像形成装置2の記録ヘッド54において表現可能な画素の階調に変換することにより、階調変換後の画像を生成する処理である。即ち、描画情報生成部30が、階調変換部として機能する。 By converting the gradation of the image to be output for image formation from the multi-valued digital data to the gradation of the pixels that can be expressed by the recording head 54 of the image forming apparatus 2, such as the digital data after the halftone in the center, the floor This is a process for generating an image after key conversion. That is, the drawing information generation unit 30 functions as a gradation conversion unit.

次に、描画情報生成部30は、仮決めしたドット配置に着弾モデルを適用して、着弾シミュレーションのデータを生成する。この処理は、換言すると、画像形成装置2の記録ヘッド54に含まれるノズルの特性を示す情報と階調変換後の画像とに基づいて画像形成出力結果のシミュレーション情報を生成する処理である。即ち、描画情報生成部30が出力結果シミュレーション部として機能する。 Next, the drawing information generation unit 30 applies the landing model to the tentatively determined dot arrangement to generate landing simulation data. In other words, this process is a process of generating simulation information of the image formation output result based on the information indicating the characteristics of the nozzle included in the recording head 54 of the image forming apparatus 2 and the image after gradation conversion. That is, the drawing information generation unit 30 functions as an output result simulation unit.

そして、描画情報生成部30は、着弾シミュレーションの結果を階調値変換して、多値変換データを生成する。この処理は、画像形成出力結果のシミュレーション情報を、元の画像である画像形成出力対象の画像を構成する画素の階調に変換する処理である。 Then, the drawing information generation unit 30 converts the result of the landing simulation into a gradation value to generate multi-value conversion data. This process is a process of converting the simulation information of the image formation output result into the gradation of the pixels constituting the image of the image formation output target which is the original image.

多値変換データを生成すると、描画情報生成部30は、多値変換データと入力データとの画素を比較して量子化誤差を算出する。誤差を算出した描画情報生成部30は、既に算出して記録されている量子化誤差と新たに算出した誤差との比較を行い、新たに算出した方が、誤差値が減少していれば、現在のドット配置及び新たに算出した誤差値を記憶媒体に記録する。 When the multi-value conversion data is generated, the drawing information generation unit 30 compares the pixels of the multi-value conversion data with the input data and calculates the quantization error. The drawing information generation unit 30 that has calculated the error compares the quantization error that has already been calculated and recorded with the newly calculated error, and if the error value is reduced by the newly calculated error, The current dot arrangement and the newly calculated error value are recorded in the storage medium.

他方、誤差値が減少していなければ、描画情報生成部30は、誤差値を破棄する。描画情報生成部30は、上述した処理を、ドット配置の全ての組み合わせが完了するまで繰り返し、全ての組み合わせが完了したら、処理を終了する。 On the other hand, if the error value is not reduced, the drawing information generation unit 30 discards the error value. The drawing information generation unit 30 repeats the above-described processing until all the combinations of dot arrangements are completed, and ends the processing when all the combinations are completed.

階調変換後の画像を生成する際の階調の変換態様が異なる複数の階調変換後の画像のうちの1つを、算出された誤差の値に基づいて描画情報として決定する処理である。即ち、描画情報生成部30が描画情報決定部として機能する。このような処理により、最も誤差値の少ないドット配置が記録されることになる。 This is a process of determining one of a plurality of images after gradation conversion having different gradation conversion modes when generating an image after gradation conversion as drawing information based on the calculated error value. .. That is, the drawing information generation unit 30 functions as a drawing information determination unit. By such processing, the dot arrangement with the smallest error value is recorded.

以上、説明したように、画像形成装置2に画像形成出力を実行させるためのプリンタドライバ26がインストールされた情報処理装置1によれば、DBS法により量子化されたドットパターンと元の画像データとの誤差値を算出して最適なドットパターンを選択する際に、画像形成装置2に含まれる記録ヘッド54のノズルによるインク吐出の着弾特性に基づく着弾シミュレーションと元の画像データとの誤差値を算出するため、画像形成出力のエンジンの特性に応じた画像形成出力を可能とすることができる。 As described above, according to the information processing apparatus 1 in which the printer driver 26 for causing the image forming apparatus 2 to execute the image forming output is installed, the dot pattern quantized by the DBS method and the original image data When calculating the error value of and selecting the optimum dot pattern, the error value between the landing simulation based on the landing characteristics of ink ejection by the nozzle of the recording head 54 included in the image forming apparatus 2 and the original image data is calculated. Therefore, it is possible to enable image forming output according to the characteristics of the image forming output engine.

なお、ドットの着弾モデルは装置の運用条件によって変わり得る。装置の運用条件とは、例えば、印刷に使う紙種やモード、温度や湿度などの印刷環境である。紙種が違えば同じドットを吐出していても紙面での濡れ広がり方が異なるからである。更に、モードや印刷環境が変わる場合、そもそもの印字に使用するヘッドの駆動条件や用紙の搬送速度、湿度や温度に応じて定まるインク粘度が異なるため、ヘッドの吐出特性そのものも変わりうる。 The dot landing model may change depending on the operating conditions of the device. The operating conditions of the device are, for example, a printing environment such as a paper type and mode used for printing, temperature and humidity. This is because different paper types have different ways of getting wet and spreading on the paper surface even if the same dots are ejected. Furthermore, when the mode or printing environment changes, the ink viscosity determined according to the driving conditions of the head used for printing, the paper transport speed, the humidity and the temperature differs, so that the ejection characteristics of the head itself may change.

このため、着弾モデルの取得や反映は、これら紙種や印刷モード、印刷環境ごとに設定/適用可能なことが好ましい。これによって印刷条件に最適な条件で画像形成を行なうことができる。 Therefore, it is preferable that the acquisition and reflection of the landing model can be set / applied for each of these paper types, printing modes, and printing environments. As a result, the image can be formed under the optimum conditions for the printing conditions.

着弾モデルを取得するタイミングとしては、装置の立ち上げ時、ヘッド交換時の他、装置の運用期間における所定時間経過毎、所定印刷枚数カウント毎、湿度や温度等の装置の運用環境が所定以上変動した場合、紙種やモードの変更時、ユーザ指定時等、様々な要因をトリガとすることができる。これは装置の構成や使用環境、経時変化など着弾特性が変わりやすい条件だからである。 The timing for acquiring the landing model is when the device is started up, when the head is replaced, every predetermined time elapses during the operation period of the device, every predetermined number of prints is counted, and the operating environment of the device such as humidity and temperature fluctuates by a predetermined value or more. If this is the case, various factors can be used as triggers, such as when the paper type or mode is changed, or when the user is specified. This is because the landing characteristics are likely to change, such as the configuration of the device, the usage environment, and changes over time.

ヘッド交換を行なう場合については、着弾特性が変動しうるのは交換ヘッド部である。そして、通常、ヘッドはCMYK等の色毎に交換されるため、交換されたヘッドに限定して着弾モデルの取得を行なうことで、工数の省略をおこなってもよい。 When the head is replaced, it is the replacement head that can change the impact characteristics. Since the heads are usually replaced for each color such as CMYK, the man-hours may be omitted by acquiring the landing model only for the replaced heads.

これらは、画像パターンの印刷から着弾モデルの取得、見直しまでの一連の処理を全て通しで実施してもよいし、一部のみを実施する構成としてもよい。例えば、画像情報取得部115によるパッチ画像データの取得及びノズル特性判断部38による着弾モデルの生成までを行い、新たに生成された着弾モデルと前回生成されて適用中の着弾モデルとの差異が所定の閾値を超えた場合に、着弾モデルの更新を行うようにすることで、処理工数を抑えてもよい。 These may be carried out through a series of processes from printing the image pattern to acquiring the landing model and reviewing, or may be performed only partially. For example, the image information acquisition unit 115 acquires the patch image data and the nozzle characteristic determination unit 38 generates the impact model, and the difference between the newly generated impact model and the previously generated and applied impact model is determined. The processing man-hours may be reduced by updating the landing model when the threshold value of is exceeded.

このような処理は、例えば、画像パターンを印刷する際に、階調や色パッチも印刷して、特性を拾っておき、この特性が所定以上変わった場合に着弾モデルを見直すことによって実現することができる。特性としてはセンサやスキャナで取得した情報の輝度や濃度、RGB値などを用いて、特性が所定以上変化した場合に着弾モデルを更新する構成とすればよい。 Such processing can be realized, for example, by printing gradations and color patches when printing an image pattern, picking up characteristics, and reviewing the landing model when these characteristics change more than a predetermined value. Can be done. As the characteristic, the brightness and density of the information acquired by the sensor or the scanner, the RGB value, and the like may be used to update the landing model when the characteristic changes by a predetermined value or more.

また、別の方法として、ノズルのインク被覆量の変動を比較して、これが規定量を外れた際に見直しをかける方法などが考えられる。見直す基準については、絶対値で規定してもよいし、画像パターンを印刷する際に複数回パターンを印刷することで、連続印刷時の繰り返しばらつきを拾っておき、これを超える場合は特性が変わったものとして着弾モデルに更新をかける構成とすればよい。 Further, as another method, it is conceivable to compare the fluctuation of the ink coating amount of the nozzle and review it when it deviates from the specified amount. The criteria for review may be specified by an absolute value, or by printing the pattern multiple times when printing the image pattern, repeated variations during continuous printing are picked up, and if this is exceeded, the characteristics change. As a matter of fact, the landing model may be updated.

なお、上記実施形態においては、図3に示すように、情報処理装置1のプリンタドライバ26に読取画像取得部36及びノズル特性判断部38が含まれる場合を例として説明したが、画像形成装置2内部にそのような構成を設け、画像形成装置2から情報処理装置1に着弾モデルをダウンロードするようにしても良い。このように画像形成装置2が単独で、着弾モデルの生成を行える構成にしておけば、単独でエンジン特性を考慮した画像の作成から出力までを行なうことが可能になる。 In the above embodiment, as shown in FIG. 3, the case where the printer driver 26 of the information processing apparatus 1 includes the read image acquisition unit 36 and the nozzle characteristic determination unit 38 has been described as an example, but the image forming apparatus 2 Such a configuration may be provided internally, and the landing model may be downloaded from the image forming apparatus 2 to the information processing apparatus 1. In this way, if the image forming apparatus 2 is configured to be able to generate the landing model independently, it is possible to independently create and output an image in consideration of the engine characteristics.

情報処理装置1と画像形成装置2との具体的な態様として、業務用印刷機と制御装置の例の場合、印刷分野で使われる装置では、RIP(ラスターイメージプロセッサー)と呼ばれる専用装置あるいはソフトを介してハーフトーン画像を作成し、それを画像形成装置に入力して画像を印刷するケースも多く、画像処理用の高度な機能や演算機構を持っているものも多い。 As a specific embodiment of the information processing device 1 and the image forming device 2, in the case of a commercial printing machine and a control device, in the device used in the printing field, a dedicated device or software called RIP (raster image processor) is used. In many cases, a halftone image is created through the image, and the image is input to an image forming apparatus to print the image, and many of them have advanced functions and calculation mechanisms for image processing.

よって、チャートの出力や着弾モデルの取得、画像データの作成のいずれかあるいは全てをRIP側、即ち情報処理装置1側で実現することも可能である。この場合は、RIPでエンジン特性を含めたデータ処理を行い、装置側に流すことが可能になるため、画像形成装置に特にエンジン特性を補正する機能がついていなくとも、RIPさえ対応していればエンジン特性を補正することが可能になる。
そして、ノズル特性判断部38は、読み取り画像取得部115によって取得されたパッチ画像データに基づいて着弾モデルを生成する際に、上記打ち分け情報に基づき、ヘッドA及びヘッドB夫々毎に着弾モデルを生成する。
Therefore, any or all of the output of the chart, the acquisition of the landing model, and the creation of the image data can be realized on the RIP side, that is, on the information processing device 1 side. In this case, data processing including engine characteristics can be performed by RIP and sent to the device side, so even if the image forming device does not have a function to correct engine characteristics, even RIP should be supported. If so, it becomes possible to correct the engine characteristics.
Then, when the nozzle characteristic determination unit 38 generates the landing model based on the patch image data acquired by the read image acquisition unit 115, the nozzle characteristic determination unit 38 creates a landing model for each of the head A and the head B based on the above-mentioned sorting information. Generate.

そして、描画情報生成部30は、着弾モデルを適用して着弾シミュレーションを生成する際に、上記打ち分け情報に基づいて着弾シミュレーションを生成する。このような処理により、オーバーラップ処理を用いる画像形成装置においても、着弾モデルの処理を適用して、上記と同様の効果を得ることが可能となる。 Then, when the drawing information generation unit 30 applies the landing model to generate the landing simulation, the drawing information generation unit 30 generates the landing simulation based on the above-mentioned hitting information. By such a process, it is possible to apply the process of the landing model to the image forming apparatus using the overlap process and obtain the same effect as described above.

<画像処理部>
図5は、本発明の一実施形態に係る画像処理部24の機能構成を示す機能ブロック図である。
図5は、画像処理部24により元画像から最終的に破損部が修復された画像を得ることが可能な構成を示しており、更に中間画像の遷移も示している。
<Image processing unit>
FIG. 5 is a functional block diagram showing a functional configuration of the image processing unit 24 according to the embodiment of the present invention.
FIG. 5 shows a configuration in which the image processing unit 24 can finally obtain an image in which the damaged portion is repaired from the original image, and further shows the transition of the intermediate image.

<画像処理部が処理対象とする画像>
本実施形態では、図17〜図23を参照して、以下の各部が画像処理を行うこととする。
図17は油絵具で描かれた絵画から例えばスキャナ又はHDD14を用いて取得した元画像G100を示す図であり、元画像G100には破損部が生じている。
図18は元画像G100から生成された背景評価画像G110を示す図である。
図19は元画像G100から生成された平坦評価画像G120を示す図である。
図20は元画像G100及び平坦評価画像G120から生成された破損部検知画像[1]G200を示す図である。
図21は破損部検知画像[1]G200から生成された破損部検知画像[2]G210を示す図である。
図22は元画像G100及び破損部検知画像[2]G210から生成された破損部修復画像[1]G300を示す図である。
図23は破損部修復画像[1]G300から生成された破損部修復画像[2]G310を示す図である。
<Image to be processed by the image processing unit>
In the present embodiment, referring to FIGS. 17 to 23, the following parts perform image processing.
FIG. 17 is a diagram showing an original image G100 acquired from a painting drawn with oil paint using, for example, a scanner or HDD 14, and the original image G100 has a damaged portion.
FIG. 18 is a diagram showing a background evaluation image G110 generated from the original image G100.
FIG. 19 is a diagram showing a flat evaluation image G120 generated from the original image G100.
FIG. 20 is a diagram showing a damaged portion detection image [1] G200 generated from the original image G100 and the flat evaluation image G120.
FIG. 21 is a diagram showing a damaged portion detection image [2] G210 generated from the damaged portion detection image [1] G200.
FIG. 22 is a diagram showing a damaged portion repair image [1] G300 generated from the original image G100 and the damaged portion detection image [2] G210.
FIG. 23 is a diagram showing a damaged portion repair image [2] G310 generated from the damaged portion repair image [1] G300.

<画像処理部の機能構成>
図5に戻り、画像処理部24は、元画像取得部100、背景評価画像生成部110、平坦評価画像生成部120、破損部検知画像[1]生成部200、破損部検知画像[2]生成部210、破損部修復画像[1]生成部300、破損部修復画像[2]生成部310を備えている。
元画像取得部100は、外部又はHDD14から元画像G100として破損部が生じている絵画の画像データを取得し、RAM12に記憶する。
背景評価画像生成部110は、元画像G100から背景評価画像G110を生成する。詳しくは、背景評価画像生成部110は、元画像G100に平滑化処理を行うことにより各画素の背景となる画素の評価を表す背景評価画像G110を生成する。
平坦評価画像生成部120は、元画像G100から平坦評価画像G120を生成する。詳しくは、平坦評価画像生成部120は、元画像G100にエッジ検知処理と平滑化処理を行うことにより元画像G100の平坦性に係る評価を表す平坦評価画像G120を生成する。
破損部検知画像[1]生成部200は、元画像G100、背景評価画像G110、平坦評価画像G120から各画素において破損部の有無を判断し、破損部検知画像[1]G200を生成する。詳しくは、破損部検知画像[1]生成部200が、元画像G100と背景評価画像G110との間の差分値、及び平坦評価画像G120の画素値に基づいて、破損部を識別して破損部検知画像[1]G200を生成する。
破損部検知画像[2]生成部210は、破損部検知画像[1]G200から破損部検知領域のピクセル膨張処理を行い、破損部検知画像[2]G210を生成する。
<Functional configuration of image processing unit>
Returning to FIG. 5, the image processing unit 24 generates the original image acquisition unit 100, the background evaluation image generation unit 110, the flat evaluation image generation unit 120, the damaged part detection image [1] generation unit 200, and the damaged part detection image [2]. A unit 210, a damaged portion repair image [1] generation unit 300, and a damaged portion repair image [2] generation unit 310 are provided.
The original image acquisition unit 100 acquires the image data of the painting in which the damaged portion is generated as the original image G100 from the outside or the HDD 14, and stores it in the RAM 12.
The background evaluation image generation unit 110 generates a background evaluation image G110 from the original image G100. Specifically, the background evaluation image generation unit 110 generates a background evaluation image G110 representing the evaluation of pixels that are the background of each pixel by performing smoothing processing on the original image G100.
The flat evaluation image generation unit 120 generates a flat evaluation image G120 from the original image G100. Specifically, the flat evaluation image generation unit 120 generates a flat evaluation image G120 representing an evaluation related to the flatness of the original image G100 by performing edge detection processing and smoothing processing on the original image G100.
The damaged portion detection image [1] generation unit 200 determines the presence or absence of a damaged portion in each pixel from the original image G100, the background evaluation image G110, and the flat evaluation image G120, and generates the damaged portion detection image [1] G200. Specifically, the damaged portion detection image [1] generation unit 200 identifies the damaged portion based on the difference value between the original image G100 and the background evaluation image G110 and the pixel value of the flat evaluation image G120, and identifies the damaged portion. Detection image [1] G200 is generated.
The damaged portion detection image [2] generation unit 210 performs pixel expansion processing of the damaged portion detection region from the damaged portion detection image [1] G200 to generate the damaged portion detection image [2] G210.

次に、破損部修復画像[1]生成部300は、破損部検知画像[2]G210において検知した破損部に対して、元画像G100の画素値を用いて補間処理を行って、破損部修復画像[1]G300を生成する。
なお、破損部修復画像[1]生成部300は、画像の境界での補間や、補間する際の参照すべき画素が見つからないなどの場合に対処するため、背景評価画像G110の画素値を用いて補完処理を行って、破損部修復画像[1]G300を生成してもよい。
最後に、破損部修復画像[2]生成部310は、破損部修復画像[1]G300に補間処理を行うことにより現れる特有の十字パターンを軽減するため、破損部修復画像[1]G300に十字パターン軽減鮮鋭化フィルタ処理を行って、破損部修復画像[2]G310を生成する。
Next, the damaged portion repair image [1] generation unit 300 performs interpolation processing on the damaged portion detected in the damaged portion detection image [2] G210 using the pixel values of the original image G100 to repair the damaged portion. Image [1] G300 is generated.
The damaged portion repair image [1] generation unit 300 uses the pixel value of the background evaluation image G110 in order to deal with the case where interpolation is performed at the boundary of the image or a pixel to be referred to is not found when interpolating. The completion process may be performed to generate the damaged portion repair image [1] G300.
Finally, the damaged portion repair image [2] generation unit 310 crosses the damaged portion repair image [1] G300 in order to reduce the peculiar cross pattern that appears by performing the interpolation processing on the damaged portion repair image [1] G300. The pattern reduction sharpening filter processing is performed to generate a damaged portion repair image [2] G310.

<背景評価画像生成処理>
図6は、図5に示す背景評価画像生成部110による背景評価画像生成処理について説明するためのフローチャートである。
背景評価画像生成部110は、RAM12に記憶されている元画像G100に対して処理領域(RAMのアドレス空間)を設定する(S100a)。
背景評価画像生成部110は、元画像G100の各画素値の背景となる画素値を評価するため、元画像G100に対して平滑化フィルタを適用して平滑化処理を行い、背景評価画像G110をRAM12上に生成する(S101)。
背景評価画像生成部110は、生成された背景評価画像G110をHDD14に記憶する(S110a)。
平滑化フィルタには、破損部のようなノイズの影響を最小限に抑え、背景領域を評価できるメディアンフィルタ、ガウシアンフィルタを用いる。
<Background evaluation image generation process>
FIG. 6 is a flowchart for explaining the background evaluation image generation process by the background evaluation image generation unit 110 shown in FIG.
The background evaluation image generation unit 110 sets a processing area (RAM address space) for the original image G100 stored in the RAM 12 (S100a).
The background evaluation image generation unit 110 applies a smoothing filter to the original image G100 to perform smoothing processing in order to evaluate the pixel values that are the background of each pixel value of the original image G100, and the background evaluation image G110 is generated. It is generated on the RAM 12 (S101).
The background evaluation image generation unit 110 stores the generated background evaluation image G110 in the HDD 14 (S110a).
As the smoothing filter, a median filter or a Gaussian filter that can evaluate the background area while minimizing the influence of noise such as a damaged part is used.

図7(a)はメディアンフィルタの構成を示す図であり、図7(b)はガウシアンフィルタの構成を示す図である。
ここで、図7(a)(b)を参照して、メディアンフィルタ、ガウシアンフィルタの具体例について説明する。
図7(a)に示すメディアンフィルタは、注目画素(図7(a)に示す画素値45)を中心としたフィルタ内の画素群に対し、画素値を大きさの順に並べたときの中央値を抽出して、注目画素値を置き換える処理を行う。
これにより、スパイク状のノイズを背景の画素を用いて効率よく置き換えることが可能になる。
一方、図7(b)に示すガウシアンフィルタは、注目画素を中心としたフィルタ内の画素群と、ガウシアンフィルタと呼ばれる重み付けした係数を用いて平均値を算出して、注目画素を置き換える処理を行う。ガウシアンフィルタを用いた処理では、例えば式(1)、
FIG. 7A is a diagram showing a configuration of a median filter, and FIG. 7B is a diagram showing a configuration of a Gaussian filter.
Here, specific examples of the median filter and the Gaussian filter will be described with reference to FIGS. 7A and 7B.
The median filter shown in FIG. 7A is the median value when the pixel values are arranged in order of size with respect to the pixel group in the filter centered on the pixel of interest (pixel value 45 shown in FIG. 7A). Is extracted and a process of replacing the pixel value of interest is performed.
This makes it possible to efficiently replace spike-shaped noise with background pixels.
On the other hand, the Gaussian filter shown in FIG. 7B calculates an average value using a group of pixels in the filter centered on the pixel of interest and a weighted coefficient called a Gaussian filter, and performs a process of replacing the pixel of interest. .. In the processing using the Gaussian filter, for example, Eq. (1),

Figure 0006798229

・・・式(1)
により注目画素の値が求められる。
Figure 0006798229

... Equation (1)
The value of the pixel of interest is obtained.

ここで、メディアンフィルタとガウシアンフィルタの特性について説明する。
例えば、ノイズ画像として、背景画像に黒い線でノイズが乗っている場合、この画像にガウシアンフィルタを適用するとノイズは軽減されるが、依然として黒い線が残ってしまい、背景画像の境界部分も輪郭のにじみ(ぼやけ)が生じてしまう。
一方、上記画像にメディアンフィルタを適用すると背景の画素を黒い線が綺麗に除去されていることに加え、境界部分も保持される。
このようにノイズのようなパターンが乗っている画像に対して、背景画素を評価するにはメディアンフィルタを用いることが適している。
平滑化のフィルタサイズに関して、破損部の幅(1〜2mm)の5〜7倍程度(〜10mm)が良い。この理由は、大きすぎると破損部より大きい背景もノイズとして認識していまい、正しく評価できないからである。また、フィルタサイズが小さすぎても破損部を正しくノイズとして評価できないためである。
Here, the characteristics of the median filter and the Gaussian filter will be described.
For example, as a noise image, if the background image has noise with black lines, applying a Gaussian filter to this image will reduce the noise, but the black lines will still remain, and the boundary part of the background image will also be contoured. Bleeding (blurring) occurs.
On the other hand, when a median filter is applied to the above image, black lines are neatly removed from the background pixels, and the boundary portion is also retained.
It is suitable to use a median filter to evaluate the background pixels for an image having a pattern such as noise.
Regarding the smoothing filter size, it is preferable that the width of the damaged portion (1 to 2 mm) is 5 to 7 times (10 mm). The reason for this is that if it is too large, the background larger than the damaged part will be recognized as noise and cannot be evaluated correctly. Further, even if the filter size is too small, the damaged portion cannot be correctly evaluated as noise.

<平坦評価画像生成処理>
図8は、図5に示す平坦評価画像生成部120による平坦評価画像生成処理について説明するためのフローチャートである。
平坦評価画像生成部120は、RAM12に記憶されている元画像G100に対して処理領域を設定する(S100b)。
まず、対象画素の隣接画素との差分画像を求める。
平坦評価画像生成部120は、RAM12に記憶されている元画像G100のRGB画像(k=r,g,b)のそれぞれに対して、X方向のSobelフィルタ処理(S111)、Y方向のSobelフィルタ処理(S112)を適用する。
<Flat evaluation image generation processing>
FIG. 8 is a flowchart for explaining the flat evaluation image generation process by the flat evaluation image generation unit 120 shown in FIG.
The flat evaluation image generation unit 120 sets a processing area for the original image G100 stored in the RAM 12 (S100b).
First, the difference image of the target pixel from the adjacent pixel is obtained.
The flat evaluation image generation unit 120 performs a Sobel filter process (S111) in the X direction and a Sobel filter in the Y direction for each of the RGB images (k = r, g, b) of the original image G100 stored in the RAM 12. The process (S112) is applied.

次に、平坦評価画像生成部120は、X方向Sobelフィルタ画素(gk,x)とY方向Sobelフィルタ画素(gk,y)の自乗和の平方根を計算し(S113)、その画素のRGB差分画像(g)とする。 Next, the flat evaluation image generation unit 120 calculates the square root of the sum of squares of the X-direction Sobel filter pixels (g k, x ) and the Y-direction Sobel filter pixels (g k, y ) (S113), and RGB of the pixels. Let it be a difference image (g k ).

Figure 0006798229
・・・式(2)
また、平坦評価画像生成部120は、RGBを統一した差分画像(g)を求めるのに、各画素のR、G、Bの最大値Maxを計算する(S114)。
Figure 0006798229
... Equation (2)
Further, the flat evaluation image generation unit 120 calculates the maximum value Max of R, G, and B of each pixel in order to obtain the difference image (g) in which RGB is unified (S114).

Figure 0006798229

・・・式(3)
次に、平坦評価画像生成部120は、周辺領域の平坦さを表す指標として、求めた差分画像を平滑化(S115)した画像の画素値で評価する。
Figure 0006798229

... Equation (3)
Next, the flatness evaluation image generation unit 120 evaluates the obtained difference image with the pixel value of the smoothed (S115) image as an index showing the flatness of the peripheral region.

次に、平坦評価画像生成部120は、各画素の周辺の画素値の変化がどの程度の平坦性を有するかを評価するため、平坦評価画像G120を生成する(S120a)。ここで、平坦評価画像生成部120は、元画像G100の隣接した画素同士の差分値を表す画像を平滑化することで平坦評価画像G120を生成する。 Next, the flat evaluation image generation unit 120 generates a flat evaluation image G120 in order to evaluate how flat the change in the pixel value around each pixel has. (S120a). Here, the flat evaluation image generation unit 120 generates a flat evaluation image G120 by smoothing an image representing a difference value between adjacent pixels of the original image G100.

なお、ステップS115において、平坦評価画像生成部120は、平滑化フィルタとして、注目画素の平坦さを重要視するのであればガウシアンフィルタを用いてもよく、これ以外に平均化フィルタ、メディアンフィルタなどを用いてもよい。
一方、周辺画素の平坦さを均一に評価したい場合には、平均化フィルタが妥当である。また、平坦さの代表値として異常値の影響を除きたい場合には、上述した平坦評価画像G120を生成するステップ(S120a)と同様にメディアンフィルタを用いても良い。
また、フィルタサイズに関しては、元画像G100をメディアンフィルタを用いて平滑化した際のフィルタサイズの5倍、7倍程度を選ぶと良い。
In step S115, the flatness evaluation image generation unit 120 may use a Gaussian filter as the smoothing filter if the flatness of the pixel of interest is important, and may also use an averaging filter, a median filter, or the like. You may use it.
On the other hand, when it is desired to uniformly evaluate the flatness of peripheral pixels, an averaging filter is appropriate. Further, when it is desired to remove the influence of an abnormal value as a representative value of flatness, a median filter may be used in the same manner as in the step (S120a) for generating the flatness evaluation image G120 described above.
As for the filter size, it is preferable to select about 5 times or 7 times the filter size when the original image G100 is smoothed by using a median filter.

<破損部検知画像[1]生成処理>
図9は、図5に示す破損部検知画像[1]生成部200による破損部検知画像[1]生成処理について説明するためのフローチャートである。
破損部検知画像[1]生成部200は、RAM12に記憶されている元画像G100に対して処理領域を設定する(S100c)。
次に、破損部検知画像[1]生成部200は、RAM12に記憶されている背景評価画像G110に対して処理領域を設定する(S110b)。
次に、破損部検知画像[1]生成部200は、RAM12に記憶されている平坦評価画像G120に対して処理領域を設定する(S120b)。
次に、破損部検知画像[1]生成部200は、破損部検知画像[1]G200を記憶するRAM12の開始アドレスを指定して、画素毎にループ処理を開始する(S125)。
なお、破損部検知画像[1]G200[1]は、元画像G100、背景評価画像G110及び平坦評価画像G120のそれぞれ画素において、ある画素が破損部であるか否かを2値の値で表すデータを記憶している。
<Damage detection image [1] generation process>
FIG. 9 is a flowchart for explaining the damaged portion detection image [1] generation process by the damaged portion detection image [1] generation unit 200 shown in FIG.
The damaged portion detection image [1] generation unit 200 sets a processing area for the original image G100 stored in the RAM 12 (S100c).
Next, the damaged portion detection image [1] generation unit 200 sets a processing area for the background evaluation image G110 stored in the RAM 12 (S110b).
Next, the damaged portion detection image [1] generation unit 200 sets a processing area for the flat evaluation image G120 stored in the RAM 12 (S120b).
Next, the damaged portion detection image [1] generation unit 200 specifies the start address of the RAM 12 that stores the damaged portion detection image [1] G200, and starts the loop process for each pixel (S125).
The damaged portion detection image [1] G200 [1] represents whether or not a certain pixel is a damaged portion in each pixel of the original image G100, the background evaluation image G110, and the flat evaluation image G120 as a binary value. I remember the data.

次に、破損部検知画像[1]生成部200は、ある画素が破損部であるか否かの判断の準備として、ある画素が破損部であるか否かの判断が難しい背景模様についての領域は破損部検知処理に用いる閾値を厳しく設定し、誤って背景模様を検知して除去してしまうことを防ぐため、補正値を設定する(S130)。
なお、この補正値は、平坦評価画像G120における画素値によって決定される。この補正値は、任意の閾値を境に2値的に変化させ設定しているが、一般的に平坦評価画像G120の画素値の関数として補正値を計算しても良い。
Next, the damaged portion detection image [1] generation unit 200 is an area for a background pattern in which it is difficult to determine whether or not a pixel is a damaged portion in preparation for determining whether or not a pixel is a damaged portion. Strictly sets the threshold value used for the damaged portion detection process, and sets a correction value in order to prevent the background pattern from being mistakenly detected and removed (S130).
The correction value is determined by the pixel value in the flat evaluation image G120. This correction value is set by changing it binaryally with an arbitrary threshold value as a boundary, but in general, the correction value may be calculated as a function of the pixel value of the flat evaluation image G120.

次に、破損部検知画像[1]生成部200は、破損部の判断のステップに入るが、絵画画像から破損部画素を検知する手がかりとして、L*a*b*空間での色差値(ΔE*)を用いて判別する。これにより、人間が感じる色の差に近いL*a*b*を用いることで背景模様との判別の精度を良くすることができる。
次に、破損部検知画像[1]生成部200は、元画像G100と背景評価画像G110の各画素のL*a*b*値を比較することで当該画素が破損部の一部であるか否かを判断する。その際に、ステップS130において前準備として設定した平坦さによる補正値を、破損部検知閾値に作用させている。まず、破損部検知画像[1]生成部200は、元画像G100と背景評価画像G110の各画素のRGB値をL*a*b*値に変換する(S140)。
なお、ステップS140では、破損部検知画像[1]生成部200は、RGBの色空間をsRGBとし、光源をD65とし、変換先のL*a*b*空間の光源をD50として実施する。
Next, the damaged portion detection image [1] generation unit 200 enters the step of determining the damaged portion, but as a clue for detecting the damaged portion pixel from the painting image, the color difference value (ΔE) in the L * a * b * space. *) Is used for discrimination. As a result, the accuracy of discrimination from the background pattern can be improved by using L * a * b *, which is close to the color difference felt by humans.
Next, the damaged portion detection image [1] generation unit 200 compares the L * a * b * values of each pixel of the original image G100 and the background evaluation image G110 to see if the pixel is a part of the damaged portion. Judge whether or not. At that time, the correction value based on the flatness set as the preparation in step S130 is applied to the damage portion detection threshold value. First, the damaged portion detection image [1] generation unit 200 converts the RGB values of the pixels of the original image G100 and the background evaluation image G110 into L * a * b * values (S140).
In step S140, the damaged portion detection image [1] generation unit 200 implements the RGB color space as sRGB, the light source as D65, and the light source in the conversion destination L * a * b * space as D50.

次に、破損部検知の処理に移る。絵画における破損部を目に見える特徴から「黒破損部」「白破損部」の2つに絞って判断を行うことにしている。
破損部検知画像[1]生成部200は、破損部検知画像[1]G200を記憶するためのRAM123上の2値のデータ値に対して、フラグをfalse(0値)として初期化する(S150)。
次に、破損部検知画像[1]生成部200は、黒破損部検知処理(S160)のサブルーチンをコールし、このサブルーチンから復帰した際に、当該画素が破損部の一部であるか否かを判断する(S168)。ステップS168において、当該画素が破損部の一部である場合(破損部あり=1)にステップS180に進み、当該画素が破損部の一部ではない場合(破損部なし=0)にステップS170に進む。
ステップS170では、破損部検知画像[1]生成部200は、白破損部検知処理(S170)のサブルーチンをコールし、このサブルーチンから復帰した際に、当該画素が破損部の一部であるか否かを判断する(S178)。ステップS175において、当該画素が破損部の一部である場合(破損部あり=1)にステップS180に進み、当該画素が破損部の一部ではない場合(破損部なし=0)にステップS185に進む。
Next, the process of detecting the damaged portion is started. Based on the visible characteristics of the damaged part in the painting, the judgment is made by narrowing down to two, "black damaged part" and "white damaged part".
The damaged portion detection image [1] generation unit 200 initializes the flag as false (0 value) with respect to the binary data value on the RAM 123 for storing the damaged portion detection image [1] G200 (S150). ).
Next, the damaged portion detection image [1] generation unit 200 calls the subroutine of the black damaged portion detection process (S160), and when returning from this subroutine, whether or not the pixel is a part of the damaged portion. Is determined (S168). In step S168, if the pixel is a part of the damaged portion (damaged portion = 1), the process proceeds to step S180, and if the pixel is not a part of the damaged portion (no damaged portion = 0), the process proceeds to step S170. move on.
In step S170, the damaged portion detection image [1] generation unit 200 calls the subroutine of the white damaged portion detection process (S170), and when returning from this subroutine, whether or not the pixel is a part of the damaged portion. Is determined (S178). In step S175, if the pixel is a part of the damaged portion (damaged portion = 1), the process proceeds to step S180, and if the pixel is not a part of the damaged portion (no damaged portion = 0), the process proceeds to step S185. move on.

ステップS180では、破損部検知画像[1]生成部200は、当該画素が破損部の一部であると判断した場合に、当該画素についての破損部2値をtrueとしてRAM12に設定し(S180)、ステップS185に進む。
ステップS185では、破損部検知画像[1]生成部200は、注目画素のアドレスが終点位置を表し、ループ処理が終了したか否かを判断する。ループ処理が終了したと判断した場合には、ステップS200に進み、一方、ループ処理が終了していないと判断した場合には、ステップS190に進む。
In step S180, when the damaged portion detection image [1] generation unit 200 determines that the pixel is a part of the damaged portion, the damaged portion binary value for the pixel is set in the RAM 12 as a true (S180). , Step S185.
In step S185, the damaged portion detection image [1] generation unit 200 determines whether or not the loop processing is completed because the address of the pixel of interest represents the end point position. If it is determined that the loop processing is completed, the process proceeds to step S200, while if it is determined that the loop processing is not completed, the process proceeds to step S190.

ステップS190では、破損部検知画像[1]生成部200は、ループ処理が終了していないので、注目画素のアドレスを1つインクリメントして次の画素を注目画素とし、ステップS130に戻る。
ステップS200では、破損部検知画像[1]生成部200は、RAM12上に生成された破損部検知画像[1]G200[1]をHDD14に記憶する。
なお、黒破損部検知処理(S160)、及び白破損部検知処理(S170)のサブルーチンの詳細については後述する。
In step S190, since the loop processing is not completed in the damaged portion detection image [1] generation unit 200, the address of the pixel of interest is incremented by one to make the next pixel the pixel of interest, and the process returns to step S130.
In step S200, the damaged portion detection image [1] generation unit 200 stores the damaged portion detection image [1] G200 [1] generated on the RAM 12 in the HDD 14.
The details of the subroutines of the black damaged portion detection process (S160) and the white damaged portion detection process (S170) will be described later.

<黒破損部検知処理>
図10は、図5に示す破損部検知画像[1]生成部200による黒破損部検知処理のサブルーチンについて説明するためのフローチャートである。
黒破損部の検知処理(S160)のサブルーチンにおいて、識別条件B1〜B4を設定する。
B1:元画像G100の画素値(P)は背景評価画像G110の画素値(Q)より明度(L*)が小さいか否かを判断する(S161)。
<Black damaged part detection processing>
FIG. 10 is a flowchart for explaining a subroutine of black damaged portion detection processing by the damaged portion detection image [1] generation unit 200 shown in FIG.
The identification conditions B1 to B4 are set in the subroutine of the black damaged portion detection process (S160).
B1: The pixel value (P) of the original image G100 determines whether or not the brightness (L *) is smaller than the pixel value (Q) of the background evaluation image G110 (S161).

L*(P)<L*(Q)
・・・式(4)
ここで、破損部検知画像[1]生成部200は、式(4)が成立する場合にはステップS162に進み、式(4)が成立しない場合にはステップS166に進む。
L * (P) <L * (Q)
... Equation (4)
Here, the damaged portion detection image [1] generation unit 200 proceeds to step S162 if the equation (4) is satisfied, and proceeds to step S166 if the equation (4) is not satisfied.

B2:元画像の画素値(P)と背景評価画像G110の画素値(Q)の色差(ΔE*)が設定閾値(T1)より大きいか否かを判断する(S162)。 B2: It is determined whether or not the color difference (ΔE *) between the pixel value (P) of the original image and the pixel value (Q) of the background evaluation image G110 is larger than the set threshold value (T1) (S162).

ΔE*(P,Q)>T1
・・・式(5)
ここで、破損部検知画像[1]生成部200は、式(5)が成立する場合にはステップS163に進み、式(5)が成立しない場合にはステップS166に進む。
ΔE * (P, Q)> T1
... Equation (5)
Here, the damaged portion detection image [1] generation unit 200 proceeds to step S163 if the equation (5) is satisfied, and proceeds to step S166 if the equation (5) is not satisfied.

B3:元画像の画素値(P)と背景評価画像G110の画素値(Q)の彩度差(ΔC*)が設定閾値(T2)より小さいか否かを判断する(S163)。 B3: It is determined whether or not the saturation difference (ΔC *) between the pixel value (P) of the original image and the pixel value (Q) of the background evaluation image G110 is smaller than the set threshold value (T2) (S163).

ΔC*(P,Q)<T2
・・・式(6)
ここで、破損部検知画像[1]生成部200は、式(6)が成立する場合にはステップS164に進み、式(6)が成立しない場合にはステップS166に進む。
B4:元画像の画素値(P)の彩度(C*)が設定閾値(T3)より大きいか否かを判断する(S164)。
ΔC * (P, Q) <T2
... Equation (6)
Here, the damaged portion detection image [1] generation unit 200 proceeds to step S164 when the equation (6) is satisfied, and proceeds to step S166 when the equation (6) is not satisfied.
B4: It is determined whether or not the saturation (C *) of the pixel value (P) of the original image is larger than the set threshold value (T3) (S164).

C*(P)>T3
・・・式(7)
ここで、破損部検知画像[1]生成部200は、式(7)が成立する場合にはステップS165に進み、式(7)が成立しない場合にはステップS166に進む。
ステップS165では、破損部検知画像[1]生成部200は、破損部ありを表す値としてレジスタに1を設定する。
ステップS166では、破損部検知画像[1]生成部200は、破損部なしを表す値としてレジスタに0を設定する。
C * (P)> T3
... Equation (7)
Here, the damaged portion detection image [1] generation unit 200 proceeds to step S165 when the equation (7) is satisfied, and proceeds to step S166 when the equation (7) is not satisfied.
In step S165, the damaged portion detection image [1] generation unit 200 sets 1 in the register as a value indicating the presence of the damaged portion.
In step S166, the damaged portion detection image [1] generation unit 200 sets 0 in the register as a value indicating no damaged portion.

破損部検知画像[1]生成部200は、黒破損部検知処理では、B1〜B4の全てに当てはまるものを黒破損部として検知する。
破損部検知画像[1]生成部200は、識別条件B2の色差(ΔE*)に関して、以下の式で計算される最も一般的なCIE1976色差を用いている。
Damaged portion detection image [1] In the black damaged portion detection process, the generation unit 200 detects a black damaged portion that applies to all of B1 to B4 as a black damaged portion.
The damaged portion detection image [1] generation unit 200 uses the most common CIE1976 color difference calculated by the following formula with respect to the color difference (ΔE *) of the identification condition B2.

Figure 0006798229
・・・式(8)

別の色差表現として、より人間の目の色彩感覚に近いCIE2000色差(ΔE 00)もあり、それを用いても良い。
彩度差ΔC*は以下の式で計算される。
Figure 0006798229
... Equation (8)

As another color difference expression, there is also CIE2000 color difference (ΔE * 00 ), which is closer to the color sensation of the human eye, and it may be used.
The saturation difference ΔC * is calculated by the following formula.

Figure 0006798229
・・・式(9)
黒破損部検知処理における各識別条件の可変閾値は、背景評価画像G110の画素値の明度、および平坦評価画像G120から決定した補正値の関数として設定している。
具体的には、背景評価画像G110の画素値の明度が低い領域、要するに背景が暗い領域に関しては、破損部検知が難しいので検知に用いる閾値を比較的ゆるく設定している。
破損部検知画像[1]生成部200は、黒破損部検知処理(S160)において、破損部であると判断された場合は、破損部検知画像[1]G200の当該画素に対するフラグをtrueに設定(S180)し、次の画素に処理を移す(S190)。一方、検知の識別条件に一つでも当てはまらなかった場合は、白破損部検知処理(S170)に処理を移す。
Figure 0006798229
... Equation (9)
The variable threshold value of each identification condition in the black breakage detection process is set as a function of the brightness of the pixel value of the background evaluation image G110 and the correction value determined from the flat evaluation image G120.
Specifically, in the region where the brightness of the pixel value of the background evaluation image G110 is low, that is, the region where the background is dark, it is difficult to detect the damaged portion, so the threshold value used for detection is set relatively loosely.
When the damaged portion detection image [1] generation unit 200 is determined to be a damaged portion in the black damaged portion detection process (S160), the flag for the pixel of the damaged portion detection image [1] G200 is set to true. (S180), and the process is transferred to the next pixel (S190). On the other hand, if even one of the detection identification conditions is not met, the process is transferred to the white damaged portion detection process (S170).

<白破損部検知処理>
図11は、図5に示す破損部検知画像[1]生成部200による白破損部検知処理のサブルーチンについて説明するためのフローチャートである。
破損部検知画像[1]生成部200は、白破損部の検知処理(S170)のサブルーチンにおいては、識別条件W1〜W5を設定する。
W1:元画像の画素値(P)は背景評価画像G110の画素値(Q)より明度(L*)が大きいか否かを判断する(S171)。
<White damaged part detection processing>
FIG. 11 is a flowchart for explaining a subroutine of the white damaged portion detection process by the damaged portion detection image [1] generation unit 200 shown in FIG.
The damaged portion detection image [1] generation unit 200 sets the identification conditions W1 to W5 in the subroutine of the white damaged portion detection process (S170).
W1: The pixel value (P) of the original image determines whether or not the brightness (L *) is larger than the pixel value (Q) of the background evaluation image G110 (S171).

L*(P)>L*(Q)
・・・式(10)
ここで、破損部検知画像[1]生成部200は、式(10)が成立する場合にはステップS172に進み、式(10)が成立しない場合にはステップS176に進む。
L * (P)> L * (Q)
... Equation (10)
Here, the damaged portion detection image [1] generation unit 200 proceeds to step S172 when the equation (10) is satisfied, and proceeds to step S176 when the equation (10) is not satisfied.

W2:元画像の画素値(P)と背景評価画像G110の画素値(Q)の色差(ΔE*)が設定閾値(T4)より大きいか否かを判断する(S172)。 W2: It is determined whether or not the color difference (ΔE *) between the pixel value (P) of the original image and the pixel value (Q) of the background evaluation image G110 is larger than the set threshold value (T4) (S172).

ΔE*(P,Q)>T4
・・・式(11)
ここで、破損部検知画像[1]生成部200は、式(11)が成立する場合にはステップS173に進み、式(11)が成立しない場合にはステップS176に進む。
ΔE * (P, Q)> T4
... Equation (11)
Here, the damaged portion detection image [1] generation unit 200 proceeds to step S173 if the equation (11) is satisfied, and proceeds to step S176 if the equation (11) is not satisfied.

W3:元画像の画素値(P)と背景評価画像G110の画素値(Q)の彩度差(ΔC*)が設定閾値(T5)より小さいか否かを判断する。 W3: It is determined whether or not the saturation difference (ΔC *) between the pixel value (P) of the original image and the pixel value (Q) of the background evaluation image G110 is smaller than the set threshold value (T5).

ΔC*(P,Q)<T5
・・・式(12)
かつ、
W4:元画像の画素値(P)の彩度(C*)が設定閾値(T6)より小さいか否かを判断する(S173)。
ΔC * (P, Q) <T5
... Equation (12)
And,
W4: It is determined whether or not the saturation (C *) of the pixel value (P) of the original image is smaller than the set threshold value (T6) (S173).

C*(P)<T6
・・・式(13)
ここで、破損部検知画像[1]生成部200は、式(12)かつ式(13)が成立する場合にはステップS175に進み、式(12)かつ式(13)が成立しない場合にはステップS174に進む。
C * (P) <T6
... Equation (13)
Here, the damaged portion detection image [1] generation unit 200 proceeds to step S175 when the equation (12) and the equation (13) are satisfied, and when the equation (12) and the equation (13) are not satisfied, The process proceeds to step S174.

W5:元画像の画素値(P)と背景評価画像G110の画素値(Q)の明度差(ΔL*)が設定閾値(T7)より大きいか否かを判断する(S174)。 W5: It is determined whether or not the brightness difference (ΔL *) between the pixel value (P) of the original image and the pixel value (Q) of the background evaluation image G110 is larger than the set threshold value (T7) (S174).

ΔL*(P,Q)>T7
・・・式(14)
ここで、破損部検知画像[1]生成部200は、式(14)が成立する場合にはステップS175に進み、式(14)が成立しない場合にはステップS176に進む。
ステップS175では、破損部検知画像[1]生成部200は、破損部ありを表す値としてレジスタに1を設定する。
ステップS176では、破損部検知画像[1]生成部200は、破損部なしを表す値としてレジスタに0を設定する。
ΔL * (P, Q)> T7
... Equation (14)
Here, the damaged portion detection image [1] generation unit 200 proceeds to step S175 when the equation (14) is satisfied, and proceeds to step S176 when the equation (14) is not satisfied.
In step S175, the damaged portion detection image [1] generation unit 200 sets 1 in the register as a value indicating the presence of the damaged portion.
In step S176, the damaged portion detection image [1] generation unit 200 sets 0 in the register as a value indicating no damaged portion.

白破損部検知処理は、背景模様の誤検知を避けるため、W1及びW2を必須の識別条件とし、W3及びW4、またはW5に当てはまるものを破損部として検知している。
白破損部は、絵の具の剥がれに起因するものが主であるため、背景評価画像G110の明度および平坦評価画像G120による補正値に依存せず、各識別条件の検知の閾値は全て一定値としている。背景領域の明度によって検知にむらが生じる場合は、黒破損部検知と同様に識別条件ごとの閾値を可変に設定してもよい。
破損部検知画像[1]生成部200は、白破損部検知処理(S170)で破損部画素であると判断された場合は、破損部検知画像[1]G200についての当該画素をtrueに設定(S180)し、次の画素に処理を移す(S190)。一方、破損部検知画像[1]生成部200は、検知の識別条件に当てはまらなかった場合は、そのまま次の画素に処理を移す(S190)。
以上の破損部判断処理を全ての画素に適用することで、破損部検知画像[1]G200が生成される。
In the white damaged portion detection process, in order to avoid erroneous detection of the background pattern, W1 and W2 are set as essential identification conditions, and those corresponding to W3, W4, or W5 are detected as damaged portions.
Since the white damaged portion is mainly caused by the peeling of the paint, the detection threshold value of each identification condition is set to a constant value without depending on the brightness of the background evaluation image G110 and the correction value by the flat evaluation image G120. .. If the detection is uneven due to the brightness of the background area, the threshold value for each identification condition may be set variably as in the case of detecting the black damaged portion.
When the damaged portion detection image [1] generation unit 200 is determined to be a damaged portion pixel by the white damaged portion detection process (S170), the damaged portion detection image [1] G200 is set to true (the pixel is set to true). S180), and the process is transferred to the next pixel (S190). On the other hand, if the damaged portion detection image [1] generation unit 200 does not meet the detection identification conditions, the processing is directly transferred to the next pixel (S190).
By applying the above-mentioned damaged portion determination process to all pixels, the damaged portion detection image [1] G200 is generated.

<破損部検知画像[2]生成処理>
図12は、図5に示す破損部検知画像[2]生成部210による破損部検知画像[2]生成処理について説明するためのフローチャートである。
破損部検知画像[2]生成部210は、RAM12に記憶されている破損部検知画像[1]G210に対して処理領域を設定する(S200a)。
破損部検知画像[2]生成部210は、破損部検知画像[1]G200に対して、最終的に修復過程に渡すため、破損部として検知した領域に膨張処理を行い、破損部検知画像[2]G210を生成する(S201)。
<Damage detection image [2] generation process>
FIG. 12 is a flowchart for explaining the damage portion detection image [2] generation process by the damage portion detection image [2] generation unit 210 shown in FIG.
The damaged portion detection image [2] generation unit 210 sets a processing area for the damaged portion detection image [1] G210 stored in the RAM 12 (S200a).
The damaged part detection image [2] generation unit 210 performs expansion processing on the area detected as the damaged part in order to finally pass the damaged part detection image [1] G200 to the repair process, and the damaged part detection image [1] 2] Generate G210 (S201).

以下、図13に示すグラフ図を参照して、図5に示す破損部検知画像[2]生成部210による膨張処理について説明する。
折れ線L202は画素値の変化を示し、点線L203は破損部検知処理の閾値とする。そうすると、2本の縦線L204で囲まれた領域が破損部として検知され、修復処理段階で横線L205のように補間される。横線205は外側の折れ線と比べて画素値が全体的に高くなり、修復した部分が不自然になってしまう。
これを防ぐため、破損部を少し広げることで、修復処理の際に背景により近い画素値で補間することが可能となる。
Hereinafter, the expansion process by the damaged portion detection image [2] generation unit 210 shown in FIG. 5 will be described with reference to the graph shown in FIG.
The polygonal line L202 indicates the change in the pixel value, and the dotted line L203 is the threshold value for the damaged portion detection process. Then, the area surrounded by the two vertical lines L204 is detected as a damaged portion, and is interpolated like the horizontal line L205 at the repair processing stage. The pixel value of the horizontal line 205 is generally higher than that of the outer polygonal line, and the repaired portion becomes unnatural.
In order to prevent this, by slightly widening the damaged portion, it becomes possible to interpolate with pixel values closer to the background during the repair process.

膨張回数は破損部の解像度に依存して調整可能である。膨張回数をあまり大きい値にすると、修復段階での補間の際に、参照する破損部ではない部分が減少するので、全体的に輪郭のにじみ(ぼやけ)が生じた画像となるので注意が必要である。
具体的には、背景評価画像生成部110は、背景評価画像G110を生成する際に用いる平滑化フィルタのサイズの1/10程度のピクセル数が良い。
また、L*a*b*空間での色差ΔE*を用いた破損部検知処理の応用例として、木材を切り出した表面の木目パターンに対する検知が挙げられる。
木材の木目パターンにおいても、背景と色差ΔE*を元に検知して、適当な修復処理を行うことで、木目パターンを弱めた出力画像や、木目パターンを強めた出力画像を生成することも可能である。
The number of expansions can be adjusted depending on the resolution of the damaged portion. If the number of expansions is set too large, the part that is not the damaged part to be referred to will decrease during interpolation at the repair stage, so the image will have bleeding (blurring) of the outline as a whole, so be careful. is there.
Specifically, the background evaluation image generation unit 110 preferably has a pixel count of about 1/10 of the size of the smoothing filter used when generating the background evaluation image G110.
Further, as an application example of the damaged portion detection process using the color difference ΔE * in the L * a * b * space, the detection of the grain pattern on the surface of the cut out wood can be mentioned.
It is also possible to generate an output image with a weakened wood grain pattern or an output image with a stronger wood grain pattern by detecting the wood grain pattern based on the background and the color difference ΔE * and performing appropriate repair processing. Is.

<破損部修復画像[1]生成処理>
図14は、図5に示す破損部修復画像[1]生成部300による破損部修復画像[1]生成処理について説明するためのフローチャートである。
破損部修復画像[1]生成部300は、RAM12に記憶されている破損部検知画像[2]G210に対して処理領域を設定する(S210b)。
次に、破損部修復画像[1]生成部300は、破損部検知画像[2]G210を記憶するRAM12の開始アドレスを指定して、画素毎にループ処理を開始する(S211)。
まず、破損部修復画像[1]生成部300は、注目画素が破損部であるか否かを判断する(S220)。
ここで、破損部修復画像[1]生成部300は、注目画素が破損部である場合にはステップS240に進み、一方、注目画素が破損部ではない場合にはステップS275に進む。
<Damage repair image [1] generation process>
FIG. 14 is a flowchart for explaining the damaged portion repair image [1] generation process by the damaged portion repair image [1] generation unit 300 shown in FIG.
The damaged portion repair image [1] generation unit 300 sets a processing area for the damaged portion detection image [2] G210 stored in the RAM 12 (S210b).
Next, the damaged portion repair image [1] generation unit 300 specifies the start address of the RAM 12 that stores the damaged portion detection image [2] G210, and starts the loop process for each pixel (S211).
First, the damaged portion repair image [1] generation unit 300 determines whether or not the pixel of interest is the damaged portion (S220).
Here, the damaged portion repair image [1] generation unit 300 proceeds to step S240 when the pixel of interest is a damaged portion, while proceeding to step S275 when the pixel of interest is not a damaged portion.

注目画素が破損部である場合に、破損部修復画像[1]生成部300は、注目画素の位置における背景評価画像G110の画素についての画素値、注目画素間の距離などを表す背景評価画素リストを取得する(S240)。
次に、破損部修復画像[1]生成部300は、取得した背景評価画像G110の画素についての背景評価画素リストから注目画素値を補間する(S250)。
次に、破損部修復画像[1]生成部300は、補間された注目画素値に対して明度補正を行う(S260)。
When the pixel of interest is a damaged portion, the damaged portion repair image [1] generation unit 300 represents a pixel value for the pixel of the background evaluation image G110 at the position of the pixel of interest, a distance between the pixels of interest, and the like. (S240).
Next, the damaged portion repair image [1] generation unit 300 interpolates the attention pixel value from the background evaluation pixel list for the acquired background evaluation image G110 pixels (S250).
Next, the damaged portion repair image [1] generation unit 300 corrects the brightness of the interpolated pixel value of interest (S260).

次に、破損部修復画像[1]生成部300は、明度補正された注目画素値に対してノイズ追加補正を行う(S260)。
次に、破損部修復画像[1]生成部300は、注目画素が破損部であると判断した場合に、ループ処理が終了したか否かを判断する(S275)。ループ処理が終了したと判断した場合には、ステップS300aに進み、一方、ループ処理が終了していないと判断した場合には、ステップS230に進む。
ステップS230では、破損部修復画像[1]生成部300は、ループ処理が終了していないので、注目画素のアドレスを1つインクリメントして次の画素を注目画素とし、ステップS220に戻る。
ステップS300では、破損部修復画像[1]生成部300は、RAM12上に生成された破損部修復画像[1]G300をHDD14に記憶する(S200)。
Next, the damaged portion repair image [1] generation unit 300 performs additional noise correction on the brightness-corrected pixel value of interest (S260).
Next, the damaged portion repair image [1] generation unit 300 determines whether or not the loop processing is completed when it is determined that the pixel of interest is the damaged portion (S275). If it is determined that the loop processing is completed, the process proceeds to step S300a, while if it is determined that the loop processing is not completed, the process proceeds to step S230.
In step S230, since the loop processing is not completed in the damaged portion repair image [1] generation unit 300, the address of the pixel of interest is incremented by one to make the next pixel the pixel of interest, and the process returns to step S220.
In step S300, the damaged portion repair image [1] generation unit 300 stores the damaged portion repair image [1] G300 generated on the RAM 12 in the HDD 14 (S200).

<破損部検知画像[2]>
図15(a)は、破損部検知画像[2]の各画素を表す10×10の画像例を示す図であり、図15(b)は、背景評価画素リストを示す図である。
図15(a)における色の違う画素(注目画素)での背景評価画素リスト(図15(b))の取得を行う。
破損部修復画像[1]生成部300は、注目画素を中心に上下左右方向に画素を走査して、破損部ではない画素(破損部検知画像においてフラグがfalseの画素)に到達したときに、その位置の元画像G100の画素値(Value)および、注目画素間の距離(Distance)を背景評価画素リストに格納する。
<Damage detection image [2]>
FIG. 15A is a diagram showing an example of a 10 × 10 image representing each pixel of the damaged portion detection image [2], and FIG. 15B is a diagram showing a background evaluation pixel list.
The background evaluation pixel list (FIG. 15 (b)) of pixels having different colors (pixels of interest) in FIG. 15 (a) is acquired.
Damaged portion repair image [1] When the generation unit 300 scans pixels in the vertical and horizontal directions centering on the pixel of interest and reaches a pixel that is not a damaged portion (a pixel whose flag is false in the damaged portion detection image), The pixel value (Value) of the original image G100 at that position and the distance (Distance) between the pixels of interest are stored in the background evaluation pixel list.

図15(a)に示す画像例では、図15(b)に示すように、画素A及び画素Cについての情報が背景評価画素リスト(L)に格納されている。
また、破損部修復画像[1]生成部300による例外処理として、以下の2つの状況の対処を示す。
[1]破損部が一方向に長く続き、破損部ではない画素が見つからない場合
[2]画像の端に到達した場合
In the image example shown in FIG. 15 (a), as shown in FIG. 15 (b), information about the pixels A and C is stored in the background evaluation pixel list (L).
In addition, as exception handling by the damaged portion repair image [1] generation unit 300, the following two situations are dealt with.
[1] When the damaged part continues for a long time in one direction and no pixel that is not the damaged part is found [2] When the edge of the image is reached

破損部修復画像[1]生成部300は、[1]においては最大走査距離を設定し、その距離まで操作を行い破損部ではない画素が見つからない場合、その距離(最大走査距離)での背景評価画像G110の画素値(Value)と最大走査距離(Distance)を背景評価画素リストに格納する。
図15(a)に示す画像例では、図15(b)に示すように、画素Bの情報が背景評価画素リスト(L)に格納されている。
破損部修復画像[1]生成部300は、[2]においても同様に、走査して縁端画素に到達した位置の背景評価画像G110の画素値(Value)と注目画素間の距離(Distance)を背景評価画素リストに格納する。
図15(a)に示す画像例では、図15(b)に示すように、画素Dの情報が背景評価画素リスト(L)に格納されている。
The damaged part repair image [1] generation unit 300 sets the maximum scanning distance in [1], operates up to that distance, and if a pixel that is not the damaged part is not found, the background at that distance (maximum scanning distance). The pixel value (Value) and the maximum scanning distance (Distance) of the evaluation image G110 are stored in the background evaluation pixel list.
In the image example shown in FIG. 15A, the information of the pixel B is stored in the background evaluation pixel list (L) as shown in FIG. 15B.
Similarly in [2], the damaged portion repair image [1] generation unit 300 scans and reaches the edge pixel, and the pixel value (Value) of the background evaluation image G110 and the distance between the pixels of interest (Distance). Is stored in the background evaluation pixel list.
In the image example shown in FIG. 15A, the information of the pixel D is stored in the background evaluation pixel list (L) as shown in FIG. 15B.

以上の処理により、値(Value)と距離(Distance)のそれぞれ4つずつの要素を持った背景評価画素リストが取得される。
最大走査距離は、背景評価画像G110を生成する際の平滑化フィルタのサイズが妥当である。理由は、それより大きな値で設定すると、背景が異なる部分の背景評価画素を持ってきてしまうからである。
次に、上述したステップS250では、破損部修復画像[1]生成部300は、取得された背景評価画素リストから注目画素を補間する(S250)。補間処理では距離で重み付けした2次元線形補間を用いれば良い。
破損部修復画像[1]生成部300は、図15(b)に示す背景評価画素リスト(L)に基づいて式(15)(16)に従って補間値(V)を計算する。
By the above processing, a background evaluation pixel list having four elements each of a value (Value) and a distance (Distance) is acquired.
For the maximum scanning distance, the size of the smoothing filter when generating the background evaluation image G110 is appropriate. The reason is that if the value is set larger than that, the background evaluation pixels of the parts having different backgrounds will be brought.
Next, in step S250 described above, the damaged portion repair image [1] generation unit 300 interpolates the pixel of interest from the acquired background evaluation pixel list (S250). In the interpolation process, two-dimensional linear interpolation weighted by distance may be used.
The damaged portion repair image [1] generation unit 300 calculates the interpolation value (V) according to the equations (15) and (16) based on the background evaluation pixel list (L) shown in FIG. 15 (b).

Figure 0006798229
・・・式(15)
Figure 0006798229
... Equation (15)

Figure 0006798229
・・・式(16)
Figure 0006798229
... Equation (16)

上述したように、補間処理した画素に対し、修復部分をより自然に見せるため、画素ごとに2種類の補正を行った。
1つ目は、ステップS260において、明度補正を行った。これは補間する際に参照する最も近い画素が破損部の境界に近いため、背景画素より明度がやや低い画素で補間することにより、補間された注目画素の明度が低くなる傾向を補正するためである。破損部修復部分のRGB値を1〜5%程度増加させている。
2つ目は、ステップS270において、ノイズ追加補正を行った。補間された破損部は線形補間なので隣接画素同士の値はなめらかに変化している。一方、破損部ではない真の背景画素は、隣接画素同士の値が多少ランダムに変化している。この違いを補い画素にリアリティを表現させるため、補正する領域にRGBの何れも一律で画素値を変化させている。ノイズの量は、注目画素の隣接画素同士の差分量から計算して決めている。また、極端に大きいノイズとなる場合もあるので、ノイズ量の限度を±5程度に設定している。
As described above, in order to make the restored portion look more natural for the interpolated pixels, two types of corrections were performed for each pixel.
First, the brightness was corrected in step S260. This is because the closest pixel to be referred to when interpolating is close to the boundary of the damaged part, so by interpolating with a pixel whose brightness is slightly lower than the background pixel, the tendency of the interpolated attention pixel to become low is corrected. is there. The RGB value of the damaged part repaired part is increased by about 1 to 5%.
Second, noise additional correction was performed in step S270. Since the interpolated damaged part is linearly interpolated, the values between adjacent pixels change smoothly. On the other hand, in the true background pixel that is not the damaged portion, the values of the adjacent pixels change somewhat randomly. In order to make up for this difference and let the pixels express reality, the pixel values are uniformly changed in all of RGB in the correction area. The amount of noise is determined by calculating from the amount of difference between adjacent pixels of the pixel of interest. Further, since the noise may be extremely large, the limit of the amount of noise is set to about ± 5.

明度補正(S260)、ノイズ追加補正(S270)ともにRGBの何れも一律である理由は、破損部が背景部分と彩度の差がないことから決めている。
補正処理までの修復処理を全画素に対して適用し、破損部修復画像[1]G300が生成される。また、これら2つの補正を行わなくとも十分な修復画像が得られる。
なお、修復した部分が背景部分と比べて暗い・起伏の乏しい・抑揚のない・凹凸の少ないなどの印象がある場合に、明度補正(S260)、ノイズ追加補正(S270)を行っても良い。
また、修復処理のバリエーションとして、2次元線形補間において、上下左右方向に加えて斜め方向に走査を行い、背景評価画素の8つの要素を持った背景評価画素リストから補間処理を行っても良い。
また、注目画素を取り囲む破損部を定義し、破損部が境界にあるという理由で画素値を全て背景評価画素リストに加えて、補間処理を行っても良い。
The reason why both the brightness correction (S260) and the noise addition correction (S270) are uniform in RGB is determined by the fact that the damaged portion has no difference in saturation from the background portion.
The repair process up to the correction process is applied to all the pixels, and the damaged portion repair image [1] G300 is generated. Further, a sufficient restored image can be obtained without performing these two corrections.
When the repaired portion has an impression that it is darker, has less undulations, has no intonation, and has less unevenness than the background portion, brightness correction (S260) and noise addition correction (S270) may be performed.
Further, as a variation of the restoration processing, in the two-dimensional linear interpolation, scanning may be performed in the diagonal direction in addition to the vertical / horizontal direction, and the interpolation processing may be performed from the background evaluation pixel list having eight elements of the background evaluation pixels.
Further, a damaged portion surrounding the pixel of interest may be defined, and all the pixel values may be added to the background evaluation pixel list because the damaged portion is at the boundary, and interpolation processing may be performed.

他の例として、破損部検知画像[1]G200[1]に膨張処理(S201)を行う際に、膨張処理の前から破損部だった画素と、膨張処理により新たに破損部となった画素に対し、修復処理を自由に変更することもできる。
例えば、前者の画素に対しては通常の二次元線形補間により画素を修復し、後者の画素に対しては背景評価画像G110の画素値を当てはめることで、修復具合が改善されることもある。
As another example, when the damaged part detection image [1] G200 [1] is subjected to the expansion process (S201), the pixels that were damaged before the expansion process and the pixels that were newly damaged by the expansion process. On the other hand, the repair process can be changed freely.
For example, the repair condition may be improved by repairing the former pixel by ordinary two-dimensional linear interpolation and applying the pixel value of the background evaluation image G110 to the latter pixel.

<破損部修復画像[2]生成部>
図16は、図5に示す破損部修復画像[2]生成部310による破損部修復画像[2]生成処理について説明するためのフローチャートである。
破損部修復画像[2]生成部310は、RAM12に記憶されている破損部修復画像[1]G300に対して処理領域を設定する(S300a)。
次に、破損部修復画像[2]生成部310は、破損部修復画像[1]G300から最終的な破損部修復画像[2]G310を得るために、後処理として十字パターン軽減鮮鋭化フィルタ処理を行う。これにより、破損部修復画像[2]G310を得るための修復処理は、周辺画素値を用いて修復画素値を計算するといった平滑化処理の改良版であるため、画像がなまったような印象を鑑賞者に与えることを鮮鋭化処理によって軽減できる。
<Damage repair image [2] Generation>
FIG. 16 is a flowchart for explaining the damaged portion repair image [2] generation process by the damaged portion repair image [2] generation unit 310 shown in FIG.
The damaged portion repair image [2] generation unit 310 sets a processing area for the damaged portion repair image [1] G300 stored in the RAM 12 (S300a).
Next, in order to obtain the final damaged portion repair image [2] G310 from the damaged portion repair image [1] G300, the damaged portion repair image [2] generation unit 310 undergoes a cross pattern reduction sharpening filter process as post-processing. I do. As a result, the repair process for obtaining the damaged portion repair image [2] G310 is an improved version of the smoothing process such as calculating the repair pixel value using the peripheral pixel value, so that the image looks dull. The amount given to the viewer can be reduced by the sharpening process.

上述したように、上下左右の最も近い画素を参照して線形補間して埋める手法(S240、S250)では、修復画像に十字状の擬似パターンができ易くなる。単純な鮮鋭化処理を行うと、十字パターンが目立ので、不自然な画像となってしまう。
このような十字パターンを軽減するために、ステップS301において、破損部修復画像[2]生成部310は、以下の異方性を持った十字パターン軽減鮮鋭化フィルタ処理を行う。
As described above, in the method (S240, S250) of linearly interpolating and filling the restored image with reference to the closest pixels in the vertical and horizontal directions, a cross-shaped pseudo pattern is likely to be formed in the restored image. When a simple sharpening process is performed, the cross pattern is conspicuous, resulting in an unnatural image.
In order to reduce such a cross pattern, in step S301, the damaged portion repair image [2] generation unit 310 performs a cross pattern reduction sharpening filter process having the following anisotropy.

Figure 0006798229
・・・(式17)
上下左右方向を弱め、斜め方向を少し加える鮮鋭化処理によって、自然な修復画像が得られる。
フィルタの係数(鮮鋭化度、異方性の強さ)やフィルタサイズは変更しても良い。
また、修復画素の補間計算が、上下左右の最も近い破損部でない画素を参照して埋める方法でない場合は、単純な鮮鋭化フィルタでの処理でも良い。
以上により、破損部修復画像[2]生成部310は、破損部修復画像[2]G310が生成される。
ステップS310bでは、破損部修復画像[2]生成部310は、RAM12上に生成された破損部修復画像[2]をHDD14に記憶する。
Figure 0006798229
... (Equation 17)
A natural restoration image can be obtained by the sharpening process that weakens the vertical and horizontal directions and adds a little diagonal direction.
The coefficient of the filter (sharpness, strength of anisotropy) and the filter size may be changed.
Further, if the interpolation calculation of the repaired pixels is not a method of filling by referring to the pixels that are not the closest damaged portions in the vertical and horizontal directions, a simple sharpening filter may be used.
As described above, the damaged portion repair image [2] generation unit 310 generates the damaged portion repair image [2] G310.
In step S310b, the damaged portion repair image [2] generation unit 310 stores the damaged portion repair image [2] generated on the RAM 12 in the HDD 14.

本実施形態では、破損部修復画像[2]生成部310が生成した破損部修復画像[2]G310をプリンタドライバ26に出力し、プリンタドライバ26が破損部修復画像[2]G310から描画情報を生成して画像形成装置2に出力する。
これにより、破損部を有する元画像G100に対して、破損部が修正された破損部修復画像[2]G310を描画情報として生成し、描画情報を画像形成装置2により印刷するので、破損部が発生する前の画像を鑑賞したいという要望に応えることができる。
なお、上述した実施形態では、画像形成装置2としてインクジェットプリンタを用いて破損部修復画像[2]G310を印刷するように構成しているが、インクジェットプリンタに代わって、複数のドラムを有する電子写真式プリンタを用いて破損部修復画像[2]G310を印刷するように構成してもよい。
In the present embodiment, the damaged part repair image [2] generated by the generation unit 310 outputs the damaged part repair image [2] G310 to the printer driver 26, and the printer driver 26 outputs drawing information from the damaged part repair image [2] G310. It is generated and output to the image forming apparatus 2.
As a result, with respect to the original image G100 having the damaged portion, the damaged portion repair image [2] G310 in which the damaged portion is corrected is generated as drawing information, and the drawing information is printed by the image forming apparatus 2, so that the damaged portion is formed. It is possible to meet the desire to appreciate the image before it occurs.
In the above-described embodiment, the image forming apparatus 2 is configured to print the damaged portion repair image [2] G310 by using an inkjet printer. However, instead of the inkjet printer, an electrophotographic having a plurality of drums. A damaged portion repair image [2] G310 may be printed using a formula printer.

<本発明の実施態様例の構成、作用、効果>
<第1態様>
本態様の画像処理装置は、元画像G100に存在する破損部を検知する画像処理装置であって、元画像G100に平滑化処理を行うことにより各画素の背景となる画素の評価を表す背景評価画像G110を生成する背景評価画像生成部110と、元画像G100にエッジ検知処理と平滑化処理を行うことにより元画像G100の平坦性に係る評価を表す平坦評価画像G120を生成する平坦評価画像生成部120と、元画像G100と背景評価画像G110との間の差分値、及び平坦評価画像G120の画素値に基づいて、破損部を識別して破損部検知画像[1]G200を生成する破損部検知画像[1]生成部200と、を備えることを特徴とする。
本態様によれば、背景評価画像生成部110が、元画像G100に平滑化処理を行うことにより各画素の背景となる画素の評価を表す背景評価画像G110を生成する。平坦評価画像生成部120が、元画像G100にエッジ検知処理と平滑化処理を行うことにより元画像G100の平坦性に係る評価を表す平坦評価画像G120を生成する。破損部検知画像[1]生成部200が、元画像G100と背景評価画像G110との間の差分値、及び平坦評価画像G120の画素値に基づいて、破損部を識別して破損部検知画像[1]G200を生成する。
このように、元画像G100と元画像G100に平滑化処理を行うことにより各画素の背景となる画素の評価を表す背景評価画像G110との間の差分値、及び元画像G100にエッジ検知処理と平滑化処理を行うことにより元画像G100の平坦性に係る評価を表す平坦評価画像G120の画素値に基づいて、破損部を識別して破損部検知画像[1]G200を生成することで、背景画像に含まれる、破損部と同様な明度の差異を有する特定のパターンを破損部として誤検知することを防止することができる。
例えば、元画像G100と元画像G100を元に生成した背景評価画像G110とのL*a*b*色差を元に破損部画素を判断し、背景模様の誤検知を軽減するため、元画像G100を元に生成した平坦評価画像G120から破損部の判断の基準を調整し、生成される破損部検知画像[1]G200を用いて、元画像G100に補正処理を加えるので、破損部が生じている絵画から破損部を除去し、当時の破損部が生じていない絵画の再現ができる。また、破損部の大きさや修復の度合いなどによって、パラメータによる調整を可能とし、修復具合を試すことが可能である。破損部の検知漏れ、誤検知がある領域に関しては、その領域にのみ別のパラメータを用いたフィルタ処理を行うことで、より良い効果を得ることができる。
<Structure, Action, Effect of Examples of Embodiments of the Present Invention>
<First aspect>
The image processing device of this embodiment is an image processing device that detects a damaged portion existing in the original image G100, and is a background evaluation representing an evaluation of pixels that are the background of each pixel by performing smoothing processing on the original image G100. The background evaluation image generation unit 110 that generates the image G110 and the flatness evaluation image generation that generates the flatness evaluation image G120 that represents the evaluation related to the flatness of the original image G100 by performing edge detection processing and smoothing processing on the original image G100. Based on the difference value between the unit 120, the original image G100 and the background evaluation image G110, and the pixel value of the flat evaluation image G120, the damaged portion is identified and the damaged portion detection image [1] G200 is generated. It is characterized by including a detection image [1] generation unit 200.
According to this aspect, the background evaluation image generation unit 110 generates the background evaluation image G110 representing the evaluation of the pixels that are the background of each pixel by performing the smoothing process on the original image G100. The flat evaluation image generation unit 120 generates a flat evaluation image G120 that represents an evaluation related to the flatness of the original image G100 by performing edge detection processing and smoothing processing on the original image G100. Damaged portion detection image [1] The generation unit 200 identifies the damaged portion based on the difference value between the original image G100 and the background evaluation image G110 and the pixel value of the flat evaluation image G120, and the damaged portion detection image [1] 1] Generate G200.
In this way, the difference value between the original image G100 and the background evaluation image G110 representing the evaluation of the background pixel of each pixel by performing the smoothing process on the original image G100, and the edge detection process on the original image G100. By performing the smoothing process, the damaged portion is identified based on the pixel value of the flat evaluation image G120 representing the evaluation related to the flatness of the original image G100, and the damaged portion detection image [1] G200 is generated to generate the background. It is possible to prevent erroneous detection of a specific pattern included in an image having a difference in brightness similar to that of a damaged portion as a damaged portion.
For example, in order to determine the damaged pixel based on the L * a * b * color difference between the original image G100 and the background evaluation image G110 generated based on the original image G100 and reduce the false detection of the background pattern, the original image G100 The criteria for determining the damaged portion is adjusted from the flat evaluation image G120 generated based on the above, and the generated damaged portion detection image [1] G200 is used to perform correction processing on the original image G100, so that the damaged portion is generated. It is possible to remove the damaged part from the existing painting and reproduce the painting without the damaged part at that time. In addition, it is possible to adjust by parameters according to the size of the damaged part and the degree of repair, and to test the repair condition. A better effect can be obtained by performing a filter process using another parameter only in the area where there is an omission of detection or a false detection of the damaged part.

<第2態様>
本態様の背景評価画像生成部110は、元画像G100に対してメディアンフィルタを用いて平滑化処理を行うことにより背景評価画像G110を生成することを特徴とする。
本態様によれば、背景評価画像生成部110が、元画像G100に対してメディアンフィルタを用いて平滑化処理を行うことにより背景評価画像G110を生成する。
これにより、元画像G100に対してメディアンフィルタを用いて平滑化処理を行うことにより背景評価画像G110を生成することができる。
<Second aspect>
The background evaluation image generation unit 110 of this aspect is characterized in that the background evaluation image G110 is generated by performing a smoothing process on the original image G100 using a median filter.
According to this aspect, the background evaluation image generation unit 110 generates the background evaluation image G110 by performing a smoothing process on the original image G100 using a median filter.
As a result, the background evaluation image G110 can be generated by performing a smoothing process on the original image G100 using a median filter.

<第3態様>
本態様の平坦評価画像生成部120は、元画像G100に対してソベルフィルタを用いてエッジ検知処理を行うことにより隣接差分画像を生成し、隣接差分画像に対してガウシアンフィルタ、平均化フィルタ、メディアンフィルタの何れか1つを用いて平滑化処理を行うことにより平坦評価画像G120を生成することを特徴とする。
本態様によれば、平坦評価画像生成部120が、元画像G100に対してソベルフィルタを用いてエッジ検知処理を行うことにより隣接差分画像を生成し、隣接差分画像に対してガウシアンフィルタ、平均化フィルタ、メディアンフィルタの何れか1つを用いて平滑化処理を行うことにより平坦評価画像G120を生成する。
これにより、元画像G100に対してソベルフィルタを用いてエッジ検知処理を行うことにより隣接差分画像を生成し、隣接差分画像に対してガウシアンフィルタ、平均化フィルタ、メディアンフィルタの何れか1つを用いて平滑化処理を行うことにより平坦評価画像G120を生成することができる。
<Third aspect>
The flat evaluation image generation unit 120 of this embodiment generates an adjacent difference image by performing edge detection processing on the original image G100 using a sobel filter, and the Gaussian filter, the averaging filter, and the median for the adjacent difference image. It is characterized in that a flat evaluation image G120 is generated by performing a smoothing process using any one of the filters.
According to this aspect, the flat evaluation image generation unit 120 generates an adjacent difference image by performing edge detection processing on the original image G100 using a sobel filter, and a Gaussian filter and averaging the adjacent difference image. A flat evaluation image G120 is generated by performing a smoothing process using any one of a filter and a median filter.
As a result, an adjacent difference image is generated by performing edge detection processing on the original image G100 using a Sobel filter, and any one of a Gaussian filter, an averaging filter, and a median filter is used for the adjacent difference image. The flat evaluation image G120 can be generated by performing the smoothing process.

<第4態様>
本態様の破損部検知画像[1]生成部200は、元画像G100、背景評価画像G110、及び平坦評価画像G120に基づいて、背景画素と破損部画素を区別して、少なくとも2値の情報を有する破損部検知画像[1]G200を生成することを特徴とする。
本態様によれば、破損部検知画像[1]生成部200が、元画像G100、背景評価画像G110、及び平坦評価画像G120に基づいて、背景画素と破損部画素を区別して、少なくとも2値の情報を有する破損部検知画像[1]G200を生成する。
これにより、元画像G100、背景評価画像G110、及び平坦評価画像G120に基づいて、背景画素と破損部画素を区別して、少なくとも2値の情報を有する破損部検知画像[1]G200を生成することができる。
<Fourth aspect>
The damaged portion detection image [1] generation unit 200 of this embodiment has at least binary information by distinguishing the background pixel and the damaged portion pixel based on the original image G100, the background evaluation image G110, and the flat evaluation image G120. It is characterized in that a damaged portion detection image [1] G200 is generated.
According to this aspect, the damaged portion detection image [1] generation unit 200 distinguishes between the background pixel and the damaged portion pixel based on the original image G100, the background evaluation image G110, and the flat evaluation image G120, and has at least two values. Damaged portion detection image [1] G200 having information is generated.
As a result, based on the original image G100, the background evaluation image G110, and the flat evaluation image G120, the background pixel and the damaged portion pixel are distinguished, and the damaged portion detection image [1] G200 having at least binary information is generated. Can be done.

<第5態様>
本態様の破損部検知画像[1]生成部200は、画素毎に少なくとも2値の情報を格納した破損部検知画像[1]G200に対して、破損部画素である領域に膨張処理を行うことを特徴とする。
本態様によれば、破損部検知画像[1]生成部200が、画素毎に少なくとも2値の情報を格納した破損部検知画像[1]G200に対して、破損部画素である領域に膨張処理を行う。
これにより、画素毎に少なくとも2値の情報を格納した破損部検知画像[1]G200に対して、破損部画素である領域に膨張処理を行うことができる。
<Fifth aspect>
The damaged portion detection image [1] generation unit 200 of the present embodiment performs expansion processing on the damaged portion detection image [1] G200 in which at least binary information is stored for each pixel in a region that is a damaged portion pixel. It is characterized by.
According to this aspect, the damaged portion detection image [1] generation unit 200 expands the damaged portion detection image [1] G200, which stores at least binary information for each pixel, into a region that is a damaged portion pixel. I do.
As a result, the damaged portion detection image [1] G200, which stores at least binary information for each pixel, can be expanded in the region of the damaged portion pixel.

<第6態様>
本態様の破損部検知画像[1]生成部200は、破損部検知画像[1]G200の各画素を黒破損部画素又は白破損部画素の2種類に識別することを特徴とする。
本態様によれば、破損部検知画像[1]生成部200が、破損部検知画像[1]G200の各画素を黒破損部画素又は白破損部画素の2種類に識別する。
これにより、破損部検知画像[1]G200の各画素を黒破損部画素又は白破損部画素の2種類に識別することができる。
<Sixth aspect>
The damaged portion detection image [1] generation unit 200 of the present embodiment is characterized in that each pixel of the damaged portion detection image [1] G200 is identified into two types, a black damaged portion pixel and a white damaged portion pixel.
According to this aspect, the damaged portion detection image [1] generation unit 200 identifies each pixel of the damaged portion detection image [1] G200 into two types, a black damaged portion pixel and a white damaged portion pixel.
As a result, each pixel of the damaged portion detection image [1] G200 can be identified into two types, a black damaged portion pixel and a white damaged portion pixel.

<第7態様>
本態様の破損部検知画像[1]生成部200は、
破損部検知画像[1]G200のある画素が黒破損部画素であると識別するのに用いる識別条件として、
B1:元画像G100の画素値(P)は背景評価画像G110の画素値(Q)より明度(L*)が小さい
L*(P)<L*(Q)
B2:元画像G100の画素値(P)と背景評価画像G110の画素値(Q)の色差(ΔE*)が設定閾値(T1)より大きい
ΔE*(P,Q)>T1
B3:元画像G100の画素値(P)と背景評価画像G110の画素値(Q)の彩度差(ΔC*)が設定閾値(T2)より小さい
ΔC*(P,Q)<T2
B4:元画像G100の画素値(P)の彩度(C*)が設定閾値(T3)より大きい
C*(P)>T3
を有し、
B1乃至B4の全てを満たす場合に、ある画素が黒破損部画素であると識別することを特徴とする。
本態様によれば、破損部検知画像[1]生成部200が、
破損部検知画像[1]G200のある画素が黒破損部画素であると識別するのに用いる識別条件として、
B1:元画像G100の画素値(P)は背景評価画像G110の画素値(Q)より明度(L*)が小さい
L*(P)<L*(Q)
B2:元画像G100の画素値(P)と背景評価画像G110の画素値(Q)の色差(ΔE*)が設定閾値(T1)より大きい
ΔE*(P,Q)>T1
B3:元画像G100の画素値(P)と背景評価画像G110の画素値(Q)の彩度差(ΔC*)が設定閾値(T2)より小さい
ΔC*(P,Q)<T2
B4:元画像G100の画素値(P)の彩度(C*)が設定閾値(T3)より大きい
C*(P)>T3
を有し、
B1乃至B4の全てを満たす場合に、ある画素が黒破損部画素であると識別する。
これにより、破損部検知画像[1]G200のある画素が黒破損部画素であると識別するのに用いる識別条件として、上述したB1乃至B4の全てを満たす場合に、ある画素が黒破損部画素であると識別することができる。
<7th aspect>
The damaged part detection image [1] generation part 200 of this aspect is
Damaged portion detection image [1] As an identification condition used to identify a pixel of G200 as a black damaged portion pixel.
B1: The pixel value (P) of the original image G100 has a brightness (L *) smaller than the pixel value (Q) of the background evaluation image G110 L * (P) <L * (Q)
B2: The color difference (ΔE *) between the pixel value (P) of the original image G100 and the pixel value (Q) of the background evaluation image G110 is larger than the set threshold value (T1) ΔE * (P, Q)> T1
B3: The saturation difference (ΔC *) between the pixel value (P) of the original image G100 and the pixel value (Q) of the background evaluation image G110 is smaller than the set threshold value (T2) ΔC * (P, Q) <T2
B4: The saturation (C *) of the pixel value (P) of the original image G100 is larger than the set threshold value (T3) C * (P)> T3
Have,
When all of B1 to B4 are satisfied, it is characterized in that a certain pixel is identified as a black damaged portion pixel.
According to this aspect, the damaged portion detection image [1] generation unit 200
Damaged portion detection image [1] As an identification condition used to identify a pixel of G200 as a black damaged portion pixel.
B1: The pixel value (P) of the original image G100 has a brightness (L *) smaller than the pixel value (Q) of the background evaluation image G110 L * (P) <L * (Q)
B2: The color difference (ΔE *) between the pixel value (P) of the original image G100 and the pixel value (Q) of the background evaluation image G110 is larger than the set threshold value (T1) ΔE * (P, Q)> T1
B3: The saturation difference (ΔC *) between the pixel value (P) of the original image G100 and the pixel value (Q) of the background evaluation image G110 is smaller than the set threshold value (T2) ΔC * (P, Q) <T2
B4: The saturation (C *) of the pixel value (P) of the original image G100 is larger than the set threshold value (T3) C * (P)> T3
Have,
When all of B1 to B4 are satisfied, a certain pixel is identified as a black damaged portion pixel.
As a result, when all of the above-mentioned B1 to B4 are satisfied as the identification condition used to identify a pixel of the damaged portion detection image [1] G200 as a black damaged portion pixel, a certain pixel is a black damaged portion pixel. Can be identified as.

<第8態様>
本態様の破損部検知画像[1]生成部200は、
破損部検知画像[1]G200のある画素が白破損部画素であると識別するのに用いる識別条件として、
W1:元画像G100の画素値(P)は背景評価画像G110の画素値(Q)より明度(L*)が大きい
L*(P)>L*(Q)
W2:元画像G100の画素値(P)と背景評価画像G110の画素値(Q)の色差(ΔE*)が設定閾値(T4)より大きい
ΔE*(P,Q)>T4
W3:元画像G100の画素値(P)と背景評価画像G110の画素値(Q)の彩度差(ΔC*)が設定閾値(T5)より小さい
ΔC*(P,Q)<T5
W4:元画像G100の画素値(P)の彩度(C*)が設定閾値(T6)より小さい
C*(P)<T6
W5:元画像G100の画素値(P)と背景評価画像G110の画素値(Q)の明度差(ΔL*)が設定閾値(T7)より大きい
ΔL*(P,Q)>T7
を有し、
W1及びW2を満たし且つW3及びW4を満たす場合、又はW1及びW2を満たし且つW.5を満たす場合に、ある画素が白破損部画素であると識別することを特徴とする。
本態様によれば、破損部検知画像[1]生成部200が、
破損部検知画像[1]G200のある画素が白破損部画素であると識別するのに用いる識別条件として、
W1:元画像G100の画素値(P)は背景評価画像G110の画素値(Q)より明度(L*)が大きい
L*(P)>L*(Q)
W2:元画像G100の画素値(P)と背景評価画像G110の画素値(Q)の色差(ΔE*)が設定閾値(T4)より大きい
ΔE*(P,Q)>T4
W3:元画像G100の画素値(P)と背景評価画像G110の画素値(Q)の彩度差(ΔC*)が設定閾値(T5)より小さい
ΔC*(P,Q)<T5
W4:元画像G100の画素値(P)の彩度(C*)が設定閾値(T6)より小さい
C*(P)<T6
W5:元画像G100の画素値(P)と背景評価画像G110の画素値(Q)の明度差(ΔL*)が設定閾値(T7)より大きい
ΔL*(P,Q)>T7
を有し、
W1及びW2を満たし且つW3及びW4を満たす場合、又はW1及びW2を満たし且つW.5を満たす場合に、ある画素が白破損部画素であると識別する
これにより、破損部検知画像[1]G200のある画素が白破損部画素であると識別するのに用いる識別条件として、上述したW1及びW2を満たし且つW3及びW4を満たす場合、又はW1及びW2を満たし且つW.5を満たす場合に、ある画素が白破損部画素であると識別することができる。
<8th aspect>
The damaged part detection image [1] generation part 200 of this aspect is
Damaged portion detection image [1] As an identification condition used to identify a pixel of G200 as a white damaged portion pixel.
W1: The pixel value (P) of the original image G100 has a higher brightness (L *) than the pixel value (Q) of the background evaluation image G110 L * (P)> L * (Q)
W2: The color difference (ΔE *) between the pixel value (P) of the original image G100 and the pixel value (Q) of the background evaluation image G110 is larger than the set threshold value (T4) ΔE * (P, Q)> T4
W3: The saturation difference (ΔC *) between the pixel value (P) of the original image G100 and the pixel value (Q) of the background evaluation image G110 is smaller than the set threshold value (T5) ΔC * (P, Q) <T5.
W4: The saturation (C *) of the pixel value (P) of the original image G100 is smaller than the set threshold value (T6) C * (P) <T6
W5: The brightness difference (ΔL *) between the pixel value (P) of the original image G100 and the pixel value (Q) of the background evaluation image G110 is larger than the set threshold value (T7) ΔL * (P, Q)> T7
Have,
When W1 and W2 are satisfied and W3 and W4 are satisfied, or W1 and W2 are satisfied and W. When the condition 5 is satisfied, it is characterized in that a certain pixel is identified as a white-damaged portion pixel.
According to this aspect, the damaged portion detection image [1] generation unit 200
Damaged portion detection image [1] As an identification condition used to identify a pixel of G200 as a white damaged portion pixel.
W1: The pixel value (P) of the original image G100 has a higher brightness (L *) than the pixel value (Q) of the background evaluation image G110 L * (P)> L * (Q)
W2: The color difference (ΔE *) between the pixel value (P) of the original image G100 and the pixel value (Q) of the background evaluation image G110 is larger than the set threshold value (T4) ΔE * (P, Q)> T4
W3: The saturation difference (ΔC *) between the pixel value (P) of the original image G100 and the pixel value (Q) of the background evaluation image G110 is smaller than the set threshold value (T5) ΔC * (P, Q) <T5.
W4: The saturation (C *) of the pixel value (P) of the original image G100 is smaller than the set threshold value (T6) C * (P) <T6
W5: The brightness difference (ΔL *) between the pixel value (P) of the original image G100 and the pixel value (Q) of the background evaluation image G110 is larger than the set threshold value (T7) ΔL * (P, Q)> T7
Have,
When W1 and W2 are satisfied and W3 and W4 are satisfied, or W1 and W2 are satisfied and W. When the condition 5 is satisfied, a certain pixel is identified as a white damaged portion pixel. As a result, the above-mentioned identification condition used for identifying a certain pixel of the damaged portion detection image [1] G200 as a white damaged portion pixel is described above. When W1 and W2 are satisfied and W3 and W4 are satisfied, or W1 and W2 are satisfied and W. When 5 is satisfied, it can be identified that a certain pixel is a white-damaged portion pixel.

<第9態様>
本態様の破損部検知画像[1]生成部200は、背景評価画像G110の明度、及び平坦評価画像G120の画素値に基づいて、各識別条件に係る各設定閾値を補正することを特徴とする。
本態様によれば、破損部検知画像[1]生成部200が、背景評価画像G110の明度、及び平坦評価画像G120の画素値に基づいて、各識別条件に係る各設定閾値を補正する。
これにより、背景評価画像G110の明度、及び平坦評価画像G120の画素値に基づいて、各識別条件に係る各設定閾値を補正することができる。
<9th aspect>
The damaged portion detection image [1] generation unit 200 of the present embodiment is characterized in that each setting threshold value related to each identification condition is corrected based on the brightness of the background evaluation image G110 and the pixel value of the flat evaluation image G120. ..
According to this aspect, the damaged portion detection image [1] generation unit 200 corrects each setting threshold value related to each identification condition based on the brightness of the background evaluation image G110 and the pixel value of the flat evaluation image G120.
Thereby, each setting threshold value related to each identification condition can be corrected based on the brightness of the background evaluation image G110 and the pixel value of the flat evaluation image G120.

<第10態様>
本態様の破損部検知画像[1]生成部200は、破損部検知画像[1]G200のある画素が黒破損部画素に係る識別条件、又は白破損部画素に係る識別条件に該当しなかった場合に、ある画素を背景画素とすることを特徴とする。
本態様によれば、破損部検知画像[1]生成部200が、破損部検知画像[1]G200のある画素が黒破損部画素に係る識別条件、又は白破損部画素に係る識別条件に該当しなかった場合に、ある画素を背景画素とする。
これにより、破損部検知画像[1]G200のある画素が黒破損部画素に係る識別条件、又は白破損部画素に係る識別条件に該当しなかった場合に、ある画素を背景画素とすることができる。
<10th aspect>
In the damaged portion detection image [1] generation unit 200 of this aspect, the pixel of the damaged portion detection image [1] G200 does not correspond to the identification condition related to the black damaged portion pixel or the identification condition related to the white damaged portion pixel. In some cases, it is characterized in that a certain pixel is used as a background pixel.
According to this aspect, the damaged portion detection image [1] generation unit 200 corresponds to the identification condition in which a pixel of the damaged portion detection image [1] G200 corresponds to the black damaged portion pixel or the white damaged portion pixel. If not, a certain pixel is used as a background pixel.
As a result, when a certain pixel of the damaged portion detection image [1] G200 does not meet the identification condition related to the black damaged portion pixel or the identification condition related to the white damaged portion pixel, the certain pixel can be used as the background pixel. it can.

<第11態様>
本態様の画像処理方法は、元画像G100に存在する破損部を検知する画像処理装置による画像処理方法であって、元画像に平滑化処理を行うことにより各画素の背景となる画素の評価を表す背景評価画像G110を生成する背景評価画像生成ステップ(S100a〜S110a)と、元画像G100にエッジ検知処理と平滑化処理を行うことにより元画像G100の平坦性に係る評価を表す平坦評価画像G120を生成する平坦評価画像生成ステップ(S100b〜S120a)と、元画像G100と背景評価画像G110との間の差分値、及び平坦評価画像G120の画素値に基づいて、破損部領域を識別して破損部検知画像[1]G200を生成する破損部検知画像生成ステップ(S100c〜S200)と、を実行することを特徴とする。
第11態様の作用、及び効果は第1態様と同様であるので、その説明を省略する。
<11th aspect>
The image processing method of this embodiment is an image processing method using an image processing device that detects a damaged portion existing in the original image G100, and evaluates the background pixel of each pixel by performing smoothing processing on the original image. The flat evaluation image G120 representing the evaluation related to the flatness of the original image G100 by performing the background evaluation image generation steps (S100a to S110a) for generating the background evaluation image G110 to be represented and the edge detection process and the smoothing process on the original image G100. Based on the difference value between the flat evaluation image generation steps (S100b to S120a), the original image G100 and the background evaluation image G110, and the pixel value of the flat evaluation image G120, the damaged portion region is identified and damaged. Part detection image [1] It is characterized in that the damaged part detection image generation step (S100c to S200) for generating G200 is executed.
Since the operation and effect of the eleventh aspect are the same as those of the first aspect, the description thereof will be omitted.

24…画像処理部、100…元画像取得部、110…背景評価画像生成部、120…平坦評価画像生成部、200…破損部検知画像[1]生成部、210…破損部検知画像[2]生成部、300…破損部修復画像[1]生成部、310…破損部修復画像[2]生成部 24 ... Image processing unit, 100 ... Original image acquisition unit, 110 ... Background evaluation image generation unit, 120 ... Flat evaluation image generation unit, 200 ... Damaged part detection image [1] Generation unit, 210 ... Damaged part detection image [2] Generation part, 300 ... Damaged part repair image [1] Generation part, 310 ... Damaged part repair image [2] Generation part

特許3877916号公報Japanese Patent No. 3877916

Claims (11)

元画像に存在する破損部を検知する画像処理装置であって、
前記元画像に平滑化処理を行うことにより各画素の背景となる画素の評価を表す背景評価画像を生成する背景評価画像生成手段と、
前記元画像にエッジ検知処理と平滑化処理を行うことにより前記元画像の平坦性に係る評価を表す平坦評価画像を生成する平坦評価画像生成手段と、
前記元画像と前記背景評価画像との間の差分値、及び前記平坦評価画像の画素値に基づいて、破損部を識別して破損部検知画像を生成する破損部検知画像生成手段と、
を備えることを特徴とする画像処理装置。
An image processing device that detects damaged parts existing in the original image.
A background evaluation image generation means for generating a background evaluation image representing the evaluation of pixels that are the background of each pixel by performing smoothing processing on the original image.
A flat evaluation image generation means for generating a flat evaluation image representing an evaluation related to the flatness of the original image by performing edge detection processing and smoothing processing on the original image.
A damaged portion detection image generating means that identifies a damaged portion and generates a damaged portion detection image based on a difference value between the original image and the background evaluation image and a pixel value of the flat evaluation image.
An image processing device characterized by comprising.
前記背景評価画像生成手段は、前記元画像に対してメディアンフィルタを用いて平滑化処理を行うことにより前記背景評価画像を生成することを特徴とする請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the background evaluation image generation means generates the background evaluation image by performing a smoothing process on the original image using a median filter. 前記平坦評価画像生成手段は、前記元画像に対してソベルフィルタを用いてエッジ検知処理を行うことにより隣接差分画像を生成し、前記隣接差分画像に対してガウシアンフィルタ、平均化フィルタ、メディアンフィルタの何れか1つを用いて平滑化処理を行うことにより前記平坦評価画像を生成することを特徴とする請求項1に記載の画像処理装置。 The flat evaluation image generation means generates an adjacent difference image by performing edge detection processing on the original image using a sobel filter, and the Gaussian filter, the averaging filter, and the median filter on the adjacent difference image. The image processing apparatus according to claim 1, wherein the flat evaluation image is generated by performing a smoothing process using any one of them. 前記破損部検知画像生成手段は、前記元画像、前記背景評価画像、及び前記平坦評価画像に基づいて、背景画素と破損部画素を区別して、少なくとも2値の情報を有する破損部検知画像を生成することを特徴とする請求項1に記載の画像処理装置。 The damaged portion detection image generation means distinguishes between background pixels and damaged portion pixels based on the original image, the background evaluation image, and the flat evaluation image, and generates a damaged portion detection image having at least binary information. The image processing apparatus according to claim 1, wherein the image processing apparatus is used. 前記破損部検知画像生成手段は、画素毎に少なくとも2値の情報を格納した前記破損部検知画像に対して、破損部画素である領域に膨張処理を行うことを特徴とする請求項1に記載の画像処理装置。 The damaged portion detection image generation means according to claim 1, wherein the damaged portion detection image in which at least binary information is stored for each pixel is expanded in a region that is a damaged portion pixel. Image processing equipment. 前記破損部検知画像生成手段は、前記破損部検知画像の各画素を黒破損部画素又は白破損部画素の2種類に識別することを特徴とする請求項5に記載の画像処理装置。 The image processing apparatus according to claim 5, wherein the damaged portion detection image generation means identifies each pixel of the damaged portion detection image into two types, a black damaged portion pixel and a white damaged portion pixel. 前記破損部検知画像生成手段は、
前記破損部検知画像のある画素が黒破損部画素であると識別するのに用いる識別条件として、
B1:元画像の画素値(P)は背景評価画像の画素値(Q)より明度(L*)が小さい
L*(P)<L*(Q)
B2:元画像の画素値(P)と背景評価画像の画素値(Q)の色差(ΔE*)が設定閾値(T1)より大きい
ΔE*(P,Q)>T1
B3:元画像の画素値(P)と背景評価画像の画素値(Q)の彩度差(ΔC*)が設定閾値(T2)より小さい
ΔC*(P,Q)<T2
B4:元画像の画素値(P)の彩度(C*)が設定閾値(T3)より大きい
C*(P)>T3
を有し、
前記B1乃至B4の全てを満たす場合に、前記ある画素が黒破損部画素であると識別することを特徴とする請求項6に記載の画像処理装置。
The damaged part detection image generation means
As an identification condition used to identify a pixel having the damaged portion detection image as a black damaged portion pixel,
B1: The pixel value (P) of the original image is smaller in brightness (L *) than the pixel value (Q) of the background evaluation image L * (P) <L * (Q)
B2: The color difference (ΔE *) between the pixel value (P) of the original image and the pixel value (Q) of the background evaluation image is larger than the set threshold value (T1) ΔE * (P, Q)> T1
B3: The saturation difference (ΔC *) between the pixel value (P) of the original image and the pixel value (Q) of the background evaluation image is smaller than the set threshold value (T2) ΔC * (P, Q) <T2
B4: The saturation (C *) of the pixel value (P) of the original image is larger than the set threshold value (T3) C * (P)> T3
Have,
The image processing apparatus according to claim 6, wherein when all of B1 to B4 are satisfied, the certain pixel is identified as a black damaged portion pixel.
前記破損部検知画像生成手段は、
前記破損部検知画像のある画素が白破損部画素であると識別するのに用いる識別条件として、
W1:元画像の画素値(P)は背景評価画像の画素値(Q)より明度(L*)が大きい
L*(P)>L*(Q)
W2:元画像の画素値(P)と背景評価画像の画素値(Q)の色差(ΔE*)が設定閾値(T4)より大きい
ΔE*(P,Q)>T4
W3:元画像の画素値(P)と背景評価画像の画素値(Q)の彩度差(ΔC*)が設定閾値(T5)より小さい
ΔC*(P,Q)<T5
W4:元画像の画素値(P)の彩度(C*)が設定閾値(T6)より小さい
C*(P)<T6
W5:元画像の画素値(P)と背景評価画像の画素値(Q)の明度差(ΔL*)が設定閾値(T7)より大きい
ΔL*(P,Q)>T7
を有し、
前記W1及び前記W2を満たし且つ前記W3及び前記W4を満たす場合、又は前記W1及びW2を満たし且つ前記W.5を満たす場合に、前記ある画素が白破損部画素であると識別することを特徴とする請求項6に記載の画像処理装置。
The damaged part detection image generation means
As an identification condition used to identify a pixel having the damaged portion detection image as a white damaged portion pixel,
W1: The pixel value (P) of the original image has a higher brightness (L *) than the pixel value (Q) of the background evaluation image L * (P)> L * (Q)
W2: The color difference (ΔE *) between the pixel value (P) of the original image and the pixel value (Q) of the background evaluation image is larger than the set threshold value (T4) ΔE * (P, Q)> T4
W3: The saturation difference (ΔC *) between the pixel value (P) of the original image and the pixel value (Q) of the background evaluation image is smaller than the set threshold value (T5) ΔC * (P, Q) <T5
W4: The saturation (C *) of the pixel value (P) of the original image is smaller than the set threshold value (T6) C * (P) <T6
W5: The brightness difference (ΔL *) between the pixel value (P) of the original image and the pixel value (Q) of the background evaluation image is larger than the set threshold value (T7) ΔL * (P, Q)> T7
Have,
When the W1 and the W2 are satisfied and the W3 and the W4 are satisfied, or when the W1 and W2 are satisfied and the W. The image processing apparatus according to claim 6, wherein when the condition 5 is satisfied, the certain pixel is identified as a white-damaged portion pixel.
前記破損部検知画像生成手段は、前記背景評価画像の明度、及び前記平坦評価画像の画素値に基づいて、前記各識別条件に係る各設定閾値を補正することを特徴とする請求項7又は8に記載の画像処理装置。 Claim 7 or 8 is characterized in that the damaged portion detection image generation means corrects each setting threshold value related to each of the identification conditions based on the brightness of the background evaluation image and the pixel value of the flat evaluation image. The image processing apparatus according to. 前記破損部検知画像生成手段は、前記破損部検知画像のある画素が前記黒破損部画素に係る識別条件、又は前記白破損部画素に係る識別条件に該当しなかった場合に、前記ある画素を背景画素とすることを特徴とする請求項7又は8に記載の画像処理装置。 When the pixel with the damaged portion detection image does not meet the identification condition related to the black damaged portion pixel or the identification condition related to the white damaged portion pixel, the damaged portion detection image generation means obtains the certain pixel. The image processing apparatus according to claim 7 or 8, wherein the background pixel is used. 元画像に存在する破損部を検知する画像処理装置による画像処理方法であって、
前記元画像に平滑化処理を行うことにより各画素の背景となる画素の評価を表す背景評価画像を生成する背景評価画像生成ステップと、
前記元画像にエッジ検知処理と平滑化処理を行うことにより前記元画像の平坦性に係る評価を表す平坦評価画像を生成する平坦評価画像生成ステップと、
前記元画像と前記背景評価画像との間の差分値、及び前記平坦評価画像の画素値に基づいて、破損部領域を識別して破損部検知画像を生成する破損部検知画像生成ステップと、
を実行することを特徴とする画像処理方法。
This is an image processing method using an image processing device that detects damaged parts existing in the original image.
A background evaluation image generation step of generating a background evaluation image representing the evaluation of pixels that are the background of each pixel by performing smoothing processing on the original image, and
A flat evaluation image generation step of generating a flat evaluation image representing an evaluation related to the flatness of the original image by performing edge detection processing and smoothing processing on the original image, and
A damaged portion detection image generation step of identifying a damaged portion region and generating a damaged portion detection image based on a difference value between the original image and the background evaluation image and a pixel value of the flat evaluation image.
An image processing method characterized by executing.
JP2016196606A 2016-10-04 2016-10-04 Image processing device and image processing method Expired - Fee Related JP6798229B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016196606A JP6798229B2 (en) 2016-10-04 2016-10-04 Image processing device and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016196606A JP6798229B2 (en) 2016-10-04 2016-10-04 Image processing device and image processing method

Publications (2)

Publication Number Publication Date
JP2018060324A JP2018060324A (en) 2018-04-12
JP6798229B2 true JP6798229B2 (en) 2020-12-09

Family

ID=61908546

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016196606A Expired - Fee Related JP6798229B2 (en) 2016-10-04 2016-10-04 Image processing device and image processing method

Country Status (1)

Country Link
JP (1) JP6798229B2 (en)

Also Published As

Publication number Publication date
JP2018060324A (en) 2018-04-12

Similar Documents

Publication Publication Date Title
US11233921B2 (en) Image processing apparatus that specifies edge pixel in target image using single-component image data
JP2006289951A (en) Method and apparatus of printing, printing program, computer readable recording medium, printing device control program, method of controlling printing apparatus, data generating apparatus for printing, data generating program for printing and method of generating data for printing
EP2306701B1 (en) Printing apparatus and calibration method
JP2021160200A (en) Image processing device, control method and program thereof
JP2006315411A (en) Printing device, program for controlling printing device, method of controlling printing device, printing data creating device, program for creating printing data and method of creating printing data
JP2007053749A (en) Conversion method for converting digital image acquired by scanner, device, and computer program
JP2008093852A (en) Printer, printer control program, recording medium storing the program, printer control method, image processor, image processing program, recording medium storing the program and image processing method
JP6233142B2 (en) Image processing apparatus and computer program
US9749495B2 (en) Information processing apparatus, image forming apparatus, image processing method, and non-transitory computer-readable medium, configured to convert image data to lower resolution and delete pixel of interest
JP2007151075A (en) Printer, printing method, image processing apparatus, image processing method, printing program, image processing program, and recording medium
JP7242272B2 (en) Dither matrix generation device, generation method, image processing device using dither matrix, image processing method, and program
JP6798229B2 (en) Image processing device and image processing method
JP6601225B2 (en) Control device and computer program
US11057528B2 (en) Information processing apparatus, method and storage medium
JP5263101B2 (en) Print control apparatus and print control program
JP6834559B2 (en) Image processing program and image processing equipment
EP2571244A2 (en) Image processing apparatus, method, image forming apparatus, and storage medium
JP6500638B2 (en) Image processing apparatus and computer program
CN113002177B (en) Method of producing ink jet printer, and ink jet printer
JP7427386B2 (en) Information processing device, method, and program
JP7031763B2 (en) Image processing program and image processing equipment
JP7248944B2 (en) Image processing device and computer program
EP2702758A1 (en) Method for creating a copy image and reproduction system
JP2019025733A (en) Preview device, preview method, and preview program
JP5053215B2 (en) Image processing apparatus, image processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190903

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20201014

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20201102

R151 Written notification of patent or utility model registration

Ref document number: 6798229

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees