JP2018060324A - Image processing system and image processing method - Google Patents

Image processing system and image processing method Download PDF

Info

Publication number
JP2018060324A
JP2018060324A JP2016196606A JP2016196606A JP2018060324A JP 2018060324 A JP2018060324 A JP 2018060324A JP 2016196606 A JP2016196606 A JP 2016196606A JP 2016196606 A JP2016196606 A JP 2016196606A JP 2018060324 A JP2018060324 A JP 2018060324A
Authority
JP
Japan
Prior art keywords
image
pixel
damaged portion
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.)
Granted
Application number
JP2016196606A
Other languages
Japanese (ja)
Other versions
JP6798229B2 (en
Inventor
侑斗 芳賀
Yuto Haga
侑斗 芳賀
拓章 寒河江
Hiroaki Sakae
拓章 寒河江
宏亘 村井
Hironobu Murai
宏亘 村井
高橋 健太
Kenta Takahashi
健太 高橋
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 Analysis (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

PROBLEM TO BE SOLVED: To prevent a certain pattern included in a background image having a brightness difference similar to that of a breakage part from being misdetected as the breakage part.SOLUTION: A background evaluation image generation section 110 generates a background evaluation image G110 representing an evaluation of a pixel to be a background of each pixel by conducting data smoothing to an original image G100. A flat evaluation image generation section 120 generates a flat evaluation image 120 representing an evaluation of flatness of the original image G100 by conducting edge detection processing and data smoothing to the original image G100. A breakage part detection image [1] generation section 200 generate a breakage part detection image [1] G200 by discriminating a breakage part on the basis of a differential value between the original image G100 and the background evaluation image G110 and a pixel value of the flat evaluation image G120.SELECTED DRAWING: Figure 5

Description

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

油絵具を用いて描かれた絵画は、経年変化により表面にひび割れや亀裂やクラック等の破損部が発生し、絵画の外観を損なっていた。このため、破損部が発生する前の画像を鑑賞したいという要望があった。
そこで、従来、破損部が発生した絵画の画像から破損部を検知しておき、検知された破損部を修復するという画像処理技術が知られている。
特許文献1には、スキャナを介して取得した画像からダストや汚れなどの異常部分を除去する目的で、画像処理技術を用いて背景画像から異常部分を検知しておき、当該異常部分を修復する方法が開示されている。
Paintings drawn with oil paints have been damaged by cracks, cracks, cracks, etc. on the surface due to changes over time, and the appearance of the paintings has been impaired. For this reason, there has been a demand for viewing an image before the damaged portion is generated.
Therefore, conventionally, an image processing technique is known in which a damaged portion is detected from an image of a picture in which the 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 using an image processing technique, and the abnormal part is repaired. A method is disclosed.

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

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

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

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

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

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

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

<情報処理装置>
図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>
With reference to FIG. 2, the hardware configuration of the information processing apparatus 1 according to an embodiment of the present invention will be described. As illustrated in FIG. 2, the information processing apparatus 1 includes a configuration similar to that of a general server or PC. That is, in the information processing apparatus 1, a central processing unit (CPU) 11, a random access memory (RAM) 12, a read only memory (ROM) 13, a hard disk drive (HDD) 14, and an I / F 15 are connected via a bus 18. Has been. 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 overall operation of the information processing apparatus 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 information.
The ROM 13 is a read-only nonvolatile storage medium, and stores programs such as firmware. The HDD 14 is a nonvolatile storage medium that can read and write information, and stores an OS (Operating System), various control programs, application programs, and the like. A 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 and various hardware and networks. The LCD 16 is a visual user interface for the user to check the state of the information processing apparatus 1. The operation unit 17 is a user interface for a user to input information to the information processing apparatus 1 such as a keyboard and a mouse.

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

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

コントローラ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 implements a function for browsing and editing image data, document data, and the like.
The application 22 includes an image processing unit 24, and obtains an image in which the damaged portion is finally repaired from the original image by the image processing unit 24.

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

プリンタドライバ26は、アプリケーション22からの印刷指示を受けて、画像形成装置2が画像形成出力を実行するための情報である描画情報を生成する。この際、プリンタドライバ26は、意図した通りの高精度な画像が形成されるように、画像形成装置2に含まれる画像形成機構の特性に応じた描画情報を生成する。   Upon receiving a print instruction from the application 22, the printer driver 26 generates drawing information that is information for the image forming apparatus 2 to execute image formation output. At this time, the printer driver 26 generates drawing information corresponding 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 illustrated 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 read 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 apparatus>
The image forming apparatus 2 includes an inkjet image forming mechanism, and executes image formation output according to the drawing information input from the information processing apparatus 1.
With reference to FIG. 4, a functional configuration of the image forming apparatus 2 according to the embodiment of the present disclosure will be described. 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 conveyance 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 that ejects ink and a head driver 52 that drives the recording head 54. The carriage 50 is perpendicular to the sub-scanning direction, which is the conveyance direction of the sheet, with respect to the sheet conveyed by the conveyance belt 62. By moving in the main scanning direction, which is a normal direction, ink is ejected to the front surface of the paper to perform image formation output.

主走査モータ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 conveyance belt 62 that conveys a sheet 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 conveyance belt 62 to generate an electrostatic force for attracting the sheet, which is an image output target, to the conveyance 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, a CPU (Central Processing Unit) 201, a ROM (Read Only Memory) 202, a RAM (Random Access Memory) 203, and an 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 nonvolatile 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 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 apparatus 1, and uses an Ethernet (registered trademark) or a USB (Universal Serial Bus) interface. The I / O 90 is a port for inputting detection signals from various sensors such as the 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 data transfer means for driving and controlling the recording head 54 included in the carriage 50, and drive waveform generation means for generating a drive waveform. The motor driving unit 86 drives the main scanning motor 56 and the sub scanning motor 60. The AC bias supply unit 88 supplies an 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 apparatus 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 performs calculation according to the program loaded in the RAM 76 to read and analyze drawing data in the reception buffer included in the host I / F 82 and control the ASIC 80 to perform necessary image processing and data rearrangement processing. Etc. Thereafter, the CPU 72 controls the print control unit 84 to transfer the drawing data processed in 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 drawing data described above to the head driver 52 as serial data, and transmits a transfer clock, a latch signal, a droplet control signal (mask signal), and the like necessary for transferring the drawing data and confirming the transfer. Output to the head driver 52. The print control unit 84 also includes a drive waveform generation unit and a head driver 52 including a D / A converter, a voltage amplifier, and a current amplifier that perform D / A conversion on the drive signal pattern data stored in the ROM 74. A drive waveform selection means including a drive pulse (drive signal) or a plurality of drive pulses (drive signal) is generated and output to the head driver 52.

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

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

<プリンタドライバの動作>
上述したような情報処理装置1及び画像形成装置2が連動することにより、画像形成出力が実行される。即ち、情報処理装置1において動作するアプリケーション22からの印刷指示は、プリンタドライバ26において処理されて画像形成装置2が出力可能な多値の記録ドットパターンが生成され、それがラスタライズされて描画データとして画像形成装置2に転送され、画像形成装置2において画像形成出力が実行される。
<Printer driver operation>
The information processing apparatus 1 and the image forming apparatus 2 as described above work together to execute image formation output. That is, a 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, and is rasterized as drawing data. The image is transferred to the image forming apparatus 2, and image forming output is executed in the image forming apparatus 2.

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

そして、描画データメモリに記憶された命令は、描画情報生成部30に含まれるラスタライザによって解釈され、線の記録命令であれば、指定された位置や太さ等に応じた記録ドットパターンに変換され、また、文字の記録命令であれば情報処理装置1内に保存されているフォントアウトラインデータから対応する文字の輪郭情報を呼びだし指定された位置や大きさに応じた記録ドットパターンに変換され、イメージデータであれば、そのまま記録ドットパターンに変換される。   The command 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 command, it is converted into a recording dot pattern corresponding to the designated position and thickness. If the character recording command is used, the outline information of the corresponding character is called from the font outline data stored in the information processing apparatus 1 and converted into a recording dot pattern corresponding to the designated position and size. If it is data, it is converted into a recording dot pattern as it is.

その後、描画情報生成部30は、これらの記録ドットパターンに対して画像処理を行ってラスタデータメモリに記憶する。このとき、情報処理装置1は、直交格子を基本記録位置として、記録ドットパターンのデータにラスタライズする。画像処理としては、例えば色を調整するためのカラーマネージメント処理やγ補正処理、ディザ法や誤差拡散法などの中間調処理、さらには下地除去処理、インク総量規制処理などがある。そして、ラスタデータメモリに記憶された記録ドットパターンが、描画情報転送部32により、インタフェースを経由してインクジェットプリンタ500へ転送される。   Thereafter, 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 using the orthogonal lattice as the basic recording position. Examples of image processing include color management processing for adjusting colors, γ correction processing, halftone processing such as dithering and error diffusion, further 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による画像形成出力性能における色表現の階調に合わせて変換する処理である。   Of the processes executed in the drawing information generation unit 30 as described above, the halftone process is also called a halftone process. This halftone process is a process of converting the color expression gradation in the image information to be subjected to image formation output according to the color expression gradation in the image formation output performance of the image forming apparatus 2.

上述したように、インクジェット方式の画像形成装置2においては、記録ヘッド54に含まれるノズルからインクを吐出することによって各画素を形成して画像形成出力を実行する。この際、上述したように、吐出させるインク滴を小滴、中滴、大滴に切り替えることにより、1つの画素において、無色も含めて4階調(2bit)程度の濃度表現が可能である。しかしながら、情報処理装置1のようなPC上では、画像データは256階調(8bit)等で処理されることが一般的である。   As described above, in the inkjet image forming apparatus 2, each pixel is formed by ejecting ink from the nozzles 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 one in a single pixel. However, on a PC such as the information processing apparatus 1, the image data is generally processed with 256 gradations (8 bits) or the like.

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

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

上記処理はデータ処理に関するものであるため、あくまで理論上のものである。そもそもデジタルデータは1つ1つの画素が四角形状で扱われるが、ノズルから吐出されたインクが用紙上に定着して形成されるドット(以降、着弾画像とする)の1つ1つは円形状である。そのため隣接画素位置のドットの有無やドット種類によって紙面の埋まり方は異なる。   Since the above processing is related to data processing, it is theoretical. In the first place, each pixel is handled in 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 is circular. It is. For this reason, how to fill the page differs depending on the presence or absence of dots at adjacent pixel positions and the type of dots.

また、インクは機械的な制御によってノズルから吐出される。そのため、圧電素子の応答特性やノズルの微細な形状等、様々な要因によって夫々のノズル毎の着弾画像の特性が異なる。そのため、同一の駆動信号に基づいて駆動された場合でも、着弾画像のドットの大きさが異なっていたり、着弾の位置がずれてしまったり、サテライトが発生し、隣接画素に影響を与えてしまうことがある。なお、ここでサテライトとは、主滴(メインドット)と付随して吐出される微小滴のことである。   Ink is ejected from the nozzles 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 when driven based on the same drive signal, the dot size of the landing image is different, the landing position is shifted, satellites are generated, and adjacent pixels are affected. There is. Here, the satellite is a minute droplet that is discharged along with the main droplet (main dot).

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

描画情報生成部30は、このような課題に対応するため、DBS法による誤差計算によってドットの入れ替え処理を行なう場合において、デジタル値ではなく、ドットの着弾モデルを形成して誤差を計算することでエンジン特性込みの印字データを作成する。   In order to cope with such a problem, the drawing information generation unit 30 calculates an error by forming a dot landing model instead of a digital value 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 image formation output is performed using the image forming apparatus 2, as an advance process, an image patch generated by the dot pattern generation unit 34 is printed, and the patch is generated by reading it with a sensor, a scanner, or the like. The read image acquisition unit 36 acquires image data, and the nozzle characteristic determination unit 38 generates a landing model of dots formed by the nozzles of the image forming apparatus 2 based on the patch image data. Then, in the drawing data generation process in the subsequent 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 image formation output of the image pattern. The read image acquisition unit 36 acquires the image data generated by reading the paper output in this way by a scanner or the like, and the nozzle characteristic determination unit 38 acquires a model of dots formed by the nozzles.

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

ノズルが4行1列に配置されたキャリッジ50を例とし、4行のパターンを形成する場合を例として示している。これは、CMYK各色に対して1つノズルが設けられている最も基本的な例であり、形成される画像パターンは、ライン方式の記録ヘッド等、ノズルの配置によって設定される。   A case where a carriage 50 in which nozzles are arranged in 4 rows and 1 column is taken as an example and 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 color of CMYK, 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 when the dot formation density of the pattern is high, it is combined with surrounding dots and which dot is ejected from which nozzle. Since it becomes difficult to distinguish, it is desirable that the pattern has a sufficient gap so that it can be distinguished which nozzle is ejected from which nozzle even if the size and landing position of the dot fluctuate.

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

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

ここでは、1画素ごとに注目画素の変更や誤差の判定処理をしてもよいし、所定区域内でドットのON/OFFや別種類のドットへの入れ替えの組み合わせを行い、区間内の誤差が小さくなる組み合わせ条件で配置を選択してもよい。また、実際のデータにはドットゲインがあるため、処理の前後関係で隣接画素の影響が誤差に反映されていない場合もある。このため、データを一巡したのち再度誤差の計算や配置の見直しをかける処理をいれてもよく、この際、配置を見直す区間の切り方を変えても良い。   Here, the pixel of interest may be changed for each pixel and error determination processing may be performed, or a combination of ON / OFF of dots and replacement with other types of dots within a predetermined area may be performed, and errors within the section may be reduced. You may select arrangement | positioning on the combination conditions to become small. In addition, since actual data has a dot gain, the influence of adjacent pixels may not be reflected in the error in the context of processing. For this reason, after a round of data, a process of calculating an error or reexamining the arrangement may be entered again. At this time, the method of cutting the section for reviewing the arrangement may be changed.

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

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

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

次に、描画情報生成部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 by comparing the ink adhesion within the area corresponding to the pixel of the input data with the level of the input image. For example, the multi-value level is made based on the ink coverage at a location corresponding to the pixel of the input data. For example, if the input data is a density gradation of 0 to 255 (here, 255 is black), and the coverage of the area of the corresponding pixel is 50%, the output at that location is half of 0 to 255. The difference from the input data is taken 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 coverage 0% to 100% corresponds to the density gradations 0 to 255, and generates multi-value simulation data. By comparing the multi-value simulation data thus generated and the input data, the difference is made an error.

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

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

多値デジタルデータから、中央のハーフトーン後デジタルデータのように、画像形成出力対象の画像の階調を画像形成装置2の記録ヘッド54において表現可能な画素の階調に変換することにより、階調変換後の画像を生成する処理である。即ち、描画情報生成部30が、階調変換部として機能する。   By converting the gradation of the image to be image-formed output into the gradation of pixels that can be expressed by the recording head 54 of the image forming apparatus 2 from the multivalued digital data, like the digital data after halftone at the center, This is processing for generating an image after tone 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 nozzles 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 performs gradation value conversion on the result of the landing simulation and generates 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 that is the original image formation output target.

多値変換データを生成すると、描画情報生成部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 and the input data to calculate a quantization error. The drawing information generation unit 30 that has calculated the error compares the already calculated and recorded quantization error with the newly calculated error, and if the newly calculated error value decreases, The current dot arrangement and the newly calculated error value are recorded on the storage medium.

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

階調変換後の画像を生成する際の階調の変換態様が異なる複数の階調変換後の画像のうちの1つを、算出された誤差の値に基づいて描画情報として決定する処理である。即ち、描画情報生成部30が描画情報決定部として機能する。このような処理により、最も誤差値の少ないドット配置が記録されることになる。   This is a process of determining, as drawing information, one of a plurality of gradation-converted images having different gradation conversion modes when generating a gradation-converted image based on a 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 image formation output is installed, the dot pattern quantized by the DBS method, the original image data, When an optimal dot pattern is selected by calculating the error value of the ink, the error value between the landing simulation based on the landing characteristics of ink ejection by the nozzles 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 formation output in accordance with engine characteristics of image formation output.

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

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

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

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

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

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

また、別の方法として、ノズルのインク被覆量の変動を比較して、これが規定量を外れた際に見直しをかける方法などが考えられる。見直す基準については、絶対値で規定してもよいし、画像パターンを印刷する際に複数回パターンを印刷することで、連続印刷時の繰り返しばらつきを拾っておき、これを超える場合は特性が変わったものとして着弾モデルに更新をかける構成とすればよい。   Further, as another method, a method of comparing fluctuations in the ink covering amount of the nozzle and revising when the amount deviates from a specified amount may be considered. The criteria for reviewing may be specified as absolute values, or by printing the pattern multiple times when printing an image pattern, picking up repeated variations during continuous printing, and if exceeding this, the characteristics change. For example, 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 read image acquisition unit 36 and the nozzle characteristic determination unit 38 are included in the printer driver 26 of the information processing apparatus 1 has been described as an example. Such a configuration may be provided inside 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 a landing model independently, it is possible to perform from creation to output of an image considering engine characteristics alone.

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

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

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

<画像処理部>
図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 obtain an image in which the damaged part is finally repaired from the original image, and further shows 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 image processing unit>
In the present embodiment, referring to FIGS. 17 to 23, the following units perform image processing.
FIG. 17 is a diagram showing an original image G100 acquired from a picture drawn with oil paint using, for example, a scanner or the HDD 14, and a damaged portion is generated in the original image G100.
FIG. 18 shows a background evaluation image G110 generated from the original image G100.
FIG. 19 shows a flatness evaluation image G120 generated from the original image G100.
FIG. 20 is a diagram illustrating a damaged portion detection image [1] G200 generated from the original image G100 and the flatness 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 illustrating 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 portion detection image [1] generation unit 200, and the damaged portion detection image [2]. Unit 210, damaged part repair image [1] generation unit 300, and damaged part repair image [2] generation unit 310.
The original image acquisition unit 100 acquires image data of a painting having a damaged portion as the original image G100 from the outside or the HDD 14 and stores the image data 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 that represents the evaluation of the pixel that is the background of each pixel by performing a smoothing process 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 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 a 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, thereby detecting the damaged portion. Detected image [1] G200 is generated.
The damaged portion detection image [2] generation unit 210 performs pixel expansion processing of the damaged portion detection area from the damaged portion detection image [1] G200, and generates a 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 part repaired image [1] generation unit 300 performs an interpolation process on the damaged part detected in the damaged part detection image [2] G210 using the pixel value of the original image G100, thereby repairing the damaged part. Image [1] G300 is generated.
Note that the damaged portion repaired image [1] generation unit 300 uses the pixel value of the background evaluation image G110 in order to cope with the case where interpolation at the boundary of the image or a pixel to be referred to at the time of interpolation is not found. Then, the damaged portion repair image [1] G300 may be generated by performing the complement processing.
Finally, the damaged portion repaired image [2] generation unit 310 applies a cross to the damaged portion repaired image [1] G300 in order to reduce a specific cross pattern that appears by performing interpolation on the damaged portion repaired image [1] G300. 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 processing>
FIG. 6 is a flowchart for explaining the background evaluation image generation processing 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 process to the original image G100 by applying a smoothing filter to evaluate the pixel value that is the background of each pixel value of the original image G100. 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 minimize the influence of noise such as a damaged portion and can evaluate the background region is used.

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

Figure 2018060324

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

... Formula (1)
Thus, the value of the target pixel is obtained.

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

<平坦評価画像生成処理>
図8は、図5に示す平坦評価画像生成部120による平坦評価画像生成処理について説明するためのフローチャートである。
平坦評価画像生成部120は、RAM12に記憶されている元画像G100に対して処理領域を設定する(S100b)。
まず、対象画素の隣接画素との差分画像を求める。
平坦評価画像生成部120は、RAM12に記憶されている元画像G100のRGB画像(k=r,g,b)のそれぞれに対して、X方向のSobelフィルタ処理(S111)、Y方向のSobelフィルタ処理(S112)を適用する。
<Flatness evaluation image generation processing>
FIG. 8 is a flowchart for explaining flatness evaluation image generation processing by the flatness 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, a difference image between adjacent pixels of the target pixel is obtained.
The flat evaluation image generation unit 120 performs the Sobel filter processing in the X direction (S111) and the 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 square sum of the X-direction Sobel filter pixel (g k, x ) and the Y-direction Sobel filter pixel (g k, y ) (S113), and the RGB of the pixel A difference image (g k ) is assumed.

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

Figure 2018060324

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

... Formula (3)
Next, the flat evaluation image generation unit 120 evaluates the obtained difference image as an index representing the flatness of the peripheral region using the pixel value of the image obtained by smoothing (S115).

次に、平坦評価画像生成部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 pixel values 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 a smoothing filter if importance is attached to the flatness of the pixel of interest. In addition, an averaging filter, a median filter, or the like may be used. It may be used.
On the other hand, when it is desired to uniformly evaluate the flatness of surrounding 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 similarly to the step (S120a) for generating the flatness evaluation image G120 described above.
As for the filter size, it is preferable to select about 5 to 7 times the filter size when the original image G100 is smoothed 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 region for the original image G100 stored in the RAM 12 (S100c).
Next, the damaged part 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 region for the flat evaluation image G120 stored in the RAM 12 (S120b).
Next, the damaged part detection image [1] generation unit 200 designates the start address of the RAM 12 that stores the damaged part detection image [1] G200, and starts loop processing for each pixel (S125).
The damaged portion detection image [1] G200 [1] represents, as a binary value, whether or not a pixel is a damaged portion in each pixel of the original image G100, the background evaluation image G110, and the flat evaluation image G120. I remember the data.

次に、破損部検知画像[1]生成部200は、ある画素が破損部であるか否かの判断の準備として、ある画素が破損部であるか否かの判断が難しい背景模様についての領域は破損部検知処理に用いる閾値を厳しく設定し、誤って背景模様を検知して除去してしまうことを防ぐため、補正値を設定する(S130)。
なお、この補正値は、平坦評価画像G120における画素値によって決定される。この補正値は、任意の閾値を境に2値的に変化させ設定しているが、一般的に平坦評価画像G120の画素値の関数として補正値を計算しても良い。
Next, the damaged part detection image [1] generation unit 200 prepares for determining whether a certain pixel is a damaged part or not as an area for a background pattern in which it is difficult to determine whether a certain pixel is a damaged part. Sets a threshold value used for the damaged portion detection processing strictly, and sets a correction value to prevent the background pattern from being detected and removed by mistake (S130).
This correction value is determined by the pixel value in the flat evaluation image G120. The correction value is set by changing it in a binary manner with an arbitrary threshold as a boundary. However, 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 a damaged portion. As a clue to detect a damaged portion pixel from a picture image, the color difference value (ΔE in the L * a * b * space). *) To determine. Thereby, the accuracy of discrimination from the background pattern can be improved by using L * a * b * that is close to the color difference perceived by humans.
Next, the damaged part detection image [1] generation unit 200 compares the L * a * b * values of the pixels of the original image G100 and the background evaluation image G110 to determine whether the pixel is a part of the damaged part. 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 damaged portion detection threshold. First, the damaged portion detection image [1] generation unit 200 converts the RGB values of each pixel 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 executes the RGB color space as sRGB, the light source as D65, and the conversion destination L * a * b * space as the light source 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 moves to a damaged portion detection process. Judgment is made by narrowing down the damaged part in the painting into two parts, “black damaged part” and “white damaged part” based on the visible features.
The damaged portion detection image [1] generation unit 200 initializes the flag as false (0 value) for 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 a subroutine of black damaged portion detection processing (S160), and when returning from this subroutine, whether or not the pixel is a part of the damaged portion. Is determined (S168). If it is determined in step S168 that the pixel is a part of the damaged part (has a damaged part = 1), the process proceeds to step S180. If the pixel is not a part of the damaged part (no damaged part = 0), the process proceeds to step S170. move on.
In step S170, the damaged portion detection image [1] generation unit 200 calls a subroutine of white broken portion detection processing (S170), and when returning from this subroutine, whether or not the pixel is a part of the damaged portion. Is determined (S178). If it is determined in step S175 that the pixel is a part of the damaged part (there is a damaged part = 1), the process proceeds to step S180. If the pixel is not a part of the damaged part (there is no damaged part = 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 part detection image [1] generation unit 200 determines that the pixel is a part of the damaged part, the damaged part binary value for the pixel is set as true in the RAM 12 (S180). The process proceeds to step S185.
In step S185, the damaged portion detection image [1] generation unit 200 determines whether the address of the target pixel represents the end point position and the loop processing has been completed. If it is determined that the loop process has been completed, the process proceeds to step S200. On the other hand, if it is determined that the loop process has not been 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, the damaged portion detection image [1] generation unit 200 has not finished the loop process, so the address of the pixel of interest is incremented by one to set the next pixel as the pixel of interest, and the process returns to step S130.
In step S <b> 200, 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 subroutine of the black broken part detection process (S160) and the white broken part detection process (S170) will be described later.

<黒破損部検知処理>
図10は、図5に示す破損部検知画像[1]生成部200による黒破損部検知処理のサブルーチンについて説明するためのフローチャートである。
黒破損部の検知処理(S160)のサブルーチンにおいて、識別条件B1〜B4を設定する。
B1:元画像G100の画素値(P)は背景評価画像G110の画素値(Q)より明度(L*)が小さいか否かを判断する(S161)。
<Black breakage detection processing>
FIG. 10 is a flowchart for explaining a subroutine of black breakage detection processing by the breakage detection image [1] generation unit 200 shown in FIG.
Identification conditions B1 to B4 are set in a subroutine of black broken portion detection processing (S160).
B1: It is determined whether the pixel value (P) of the original image G100 has a lightness (L *) 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)
... Formula (4)
Here, the damaged portion detection image [1] generation unit 200 proceeds to step S162 when the equation (4) is satisfied, and proceeds to step S166 when 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
... Formula (5)
Here, the damaged portion detection image [1] generation unit 200 proceeds to step S163 when the equation (5) is satisfied, and proceeds to step S166 when 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 (T2) (S163).

ΔC*(P,Q)<T2
・・・式(6)
ここで、破損部検知画像[1]生成部200は、式(6)が成立する場合にはステップS164に進み、式(6)が成立しない場合にはステップS166に進む。
B4:元画像の画素値(P)の彩度(C*)が設定閾値(T3)より大きいか否かを判断する(S164)。
ΔC * (P, Q) <T2
... Formula (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 (T3) (S164).

C*(P)>T3
・・・式(7)
ここで、破損部検知画像[1]生成部200は、式(7)が成立する場合にはステップS165に進み、式(7)が成立しない場合にはステップS166に進む。
ステップS165では、破損部検知画像[1]生成部200は、破損部ありを表す値としてレジスタに1を設定する。
ステップS166では、破損部検知画像[1]生成部200は、破損部なしを表す値としてレジスタに0を設定する。
C * (P)> T3
... Formula (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 part detection image [1] generation unit 200 sets 1 in the register as a value indicating that there is a damaged part.
In step S166, the damaged portion detection image [1] generation unit 200 sets 0 in the register as a value indicating that there is no damaged portion.

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

Figure 2018060324
・・・式(8)

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

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

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

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

ΔE*(P,Q)>T4
・・・式(11)
ここで、破損部検知画像[1]生成部200は、式(11)が成立する場合にはステップS173に進み、式(11)が成立しない場合にはステップS176に進む。
ΔE * (P, Q)> T4
... Formula (11)
Here, the damaged portion detection image [1] generation unit 200 proceeds to step S173 when the equation (11) is satisfied, and proceeds to step S176 when 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
... Formula (12)
And,
W4: It is determined whether 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
... Formula (13)
Here, the damaged part detection image [1] generation unit 200 proceeds to step S175 when the expressions (12) and (13) are satisfied, and proceeds to step S175 when the expressions (12) and (13) are not satisfied. Proceed 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 (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
... Formula (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 part detection image [1] generation unit 200 sets 1 in the register as a value indicating that there is a damaged part.
In step S176, the damaged portion detection image [1] generation unit 200 sets 0 in the register as a value indicating that there is no damaged portion.

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

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

膨張回数は破損部の解像度に依存して調整可能である。膨張回数をあまり大きい値にすると、修復段階での補間の際に、参照する破損部ではない部分が減少するので、全体的に輪郭のにじみ(ぼやけ)が生じた画像となるので注意が必要である。
具体的には、背景評価画像生成部110は、背景評価画像G110を生成する際に用いる平滑化フィルタのサイズの1/10程度のピクセル数が良い。
また、L*a*b*空間での色差ΔE*を用いた破損部検知処理の応用例として、木材を切り出した表面の木目パターンに対する検知が挙げられる。
木材の木目パターンにおいても、背景と色差ΔE*を元に検知して、適当な修復処理を行うことで、木目パターンを弱めた出力画像や、木目パターンを強めた出力画像を生成することも可能である。
The number of expansions can be adjusted depending on the resolution of the damaged part. If the number of expansions is too large, the non-damaged part to be referred to will be reduced during interpolation at the repair stage, so the image will be blurred (blurred) as a whole, so care must be taken. is there.
Specifically, the background evaluation image generation unit 110 may have a number of pixels that is about 1/10 of the size of the smoothing filter used when generating the background evaluation image G110.
Moreover, the detection with respect to the grain pattern of the surface which cut out the timber is mentioned as an application example of the damage part detection process using color difference (DELTA) E * in L * a * b * space.
It is also possible to generate an output image with a weakened wood pattern or an output image with a stronger wood pattern by detecting the background and color difference ΔE * based on the background and performing appropriate restoration processing. It 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 Processing>
FIG. 14 is a flowchart for explaining the damaged portion repair image [1] generation processing by the damaged portion repair image [1] generation unit 300 shown in FIG.
The damaged portion repaired 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 part repaired image [1] generation unit 300 designates the start address of the RAM 12 that stores the damaged part detection image [2] G210, and starts loop processing for each pixel (S211).
First, the damaged portion repaired image [1] generation unit 300 determines whether or not the target pixel is a damaged portion (S220).
Here, the damaged part repaired image [1] generation unit 300 proceeds to step S240 when the target pixel is a damaged part, and proceeds to step S275 when the target pixel is not a damaged part.

注目画素が破損部である場合に、破損部修復画像[1]生成部300は、注目画素の位置における背景評価画像G110の画素についての画素値、注目画素間の距離などを表す背景評価画素リストを取得する(S240)。
次に、破損部修復画像[1]生成部300は、取得した背景評価画像G110の画素についての背景評価画素リストから注目画素値を補間する(S250)。
次に、破損部修復画像[1]生成部300は、補間された注目画素値に対して明度補正を行う(S260)。
When the pixel of interest is a damaged portion, the damaged portion repaired image [1] generation unit 300 has a background evaluation pixel list that represents a pixel value, a distance between the pixels of interest, and the like regarding the pixel of the background evaluation image G110 at the position of the pixel of interest Is acquired (S240).
Next, the damaged portion repaired image [1] generation unit 300 interpolates the target pixel value from the background evaluation pixel list for the pixels of the acquired background evaluation image G110 (S250).
Next, the damaged portion repaired image [1] generation unit 300 performs brightness correction on 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 repaired image [1] generation unit 300 performs noise addition correction on the target pixel value whose brightness has been corrected (S260).
Next, when the damaged portion repaired image [1] generation unit 300 determines that the target pixel is a damaged portion, the damaged portion repaired image [1] generation unit 300 determines whether or not the loop processing has ended (S275). If it is determined that the loop process has been completed, the process proceeds to step S300a. On the other hand, if it is determined that the loop process has not been completed, the process proceeds to step S230.
In step S230, since the damaged portion repaired image [1] generation unit 300 has not finished the loop process, the address of the target pixel is incremented by one to set the next pixel as the target pixel, 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 illustrating a 10 × 10 image example representing each pixel of the damaged portion detection image [2], and FIG. 15B is a diagram illustrating a background evaluation pixel list.
The background evaluation pixel list (FIG. 15 (b)) is obtained at the pixel (target pixel) of a different color in FIG. 15 (a).
The damaged portion repaired image [1] generation unit 300 scans pixels in the vertical and horizontal directions around the target pixel, 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 target pixels 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. 15A, as shown in FIG. 15B, information about the pixel A and the pixel C is stored in the background evaluation pixel list (L).
In addition, the following two situations are dealt with as exception processing by the damaged portion repaired image [1] generation unit 300.
[1] When a damaged part continues long in one direction and a pixel that is not a damaged part is not 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 portion repaired image [1] generation unit 300 sets a maximum scanning distance in [1], and if a pixel that is not a damaged portion is not found by performing an operation up to that distance, 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, 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 repaired image [1] generating unit 300 scans the pixel value (Value) of the background evaluation image G110 at the position where the pixel reaches the edge pixel and the distance (Distance) between the target pixels. Are stored in the background evaluation pixel list.
In the image example shown in FIG. 15A, 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)を計算する。
Through the above processing, a background evaluation pixel list having four elements each of a value (Value) and a distance (Distance) is acquired.
As the maximum scanning distance, the size of the smoothing filter when generating the background evaluation image G110 is appropriate. The reason is that, if a value larger than that is set, background evaluation pixels of a portion having a different background are brought.
Next, in step S250 described above, the damaged portion repaired image [1] generation unit 300 interpolates the target pixel 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 repaired 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.

Figure 2018060324
・・・式(15)
Figure 2018060324
... Formula (15)

Figure 2018060324
・・・式(16)
Figure 2018060324
... Formula (16)

上述したように、補間処理した画素に対し、修復部分をより自然に見せるため、画素ごとに2種類の補正を行った。
1つ目は、ステップS260において、明度補正を行った。これは補間する際に参照する最も近い画素が破損部の境界に近いため、背景画素より明度がやや低い画素で補間することにより、補間された注目画素の明度が低くなる傾向を補正するためである。破損部修復部分のRGB値を1〜5%程度増加させている。
2つ目は、ステップS270において、ノイズ追加補正を行った。補間された破損部は線形補間なので隣接画素同士の値はなめらかに変化している。一方、破損部ではない真の背景画素は、隣接画素同士の値が多少ランダムに変化している。この違いを補い画素にリアリティを表現させるため、補正する領域にRGBの何れも一律で画素値を変化させている。ノイズの量は、注目画素の隣接画素同士の差分量から計算して決めている。また、極端に大きいノイズとなる場合もあるので、ノイズ量の限度を±5程度に設定している。
As described above, in order to make the repaired portion appear more natural for the interpolated pixel, two types of correction are performed for each pixel.
First, brightness correction was performed in step S260. This is because the closest pixel to be referred to when interpolating is close to the boundary of the damaged part, and therefore, by interpolating with a pixel whose brightness is slightly lower than that of the background pixel, the tendency of the brightness of the interpolated pixel of interest to be corrected is corrected. is there. The RGB value of the damaged portion repaired portion is increased by about 1 to 5%.
Second, noise addition correction was performed in step S270. Since the interpolated damaged portion is linear interpolation, the values of adjacent pixels change smoothly. On the other hand, for true background pixels that are not damaged, the values of adjacent pixels change somewhat randomly. In order to compensate for this difference and to express the reality to the pixels, the pixel values of all of the RGB in the region to be corrected are uniformly changed. The amount of noise is determined by calculating from the amount of difference between adjacent pixels of the target pixel. In addition, since there may be extremely large noise, the noise amount limit 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 because the damaged portion has no difference in saturation from the background portion.
The repair process up to the correction process is applied to all pixels, and the damaged part repair image [1] G300 is generated. Further, a sufficient repaired image can be obtained without performing these two corrections.
In addition, when there is an impression that the repaired portion is darker than the background portion, lack of undulations, no inflection, or less unevenness, brightness correction (S260) and noise addition correction (S270) may be performed.
Further, as a variation of the restoration process, in the two-dimensional linear interpolation, scanning may be performed in an oblique direction in addition to the vertical and horizontal directions, and the interpolation process may be performed from a background evaluation pixel list having eight background evaluation pixel elements.
Alternatively, a damaged portion surrounding the target pixel may be defined, and the interpolation processing may be performed by adding all the pixel values to the background evaluation pixel list because the damaged portion is at the boundary.

他の例として、破損部検知画像[1]G200[1]に膨張処理(S201)を行う際に、膨張処理の前から破損部だった画素と、膨張処理により新たに破損部となった画素に対し、修復処理を自由に変更することもできる。
例えば、前者の画素に対しては通常の二次元線形補間により画素を修復し、後者の画素に対しては背景評価画像G110の画素値を当てはめることで、修復具合が改善されることもある。
As another example, when the expansion processing (S201) is performed on the damaged portion detection image [1] G200 [1], a pixel that has been damaged before the expansion processing and a pixel that has been newly damaged by the expansion processing On the other hand, the repair process can be freely changed.
For example, the restoration condition may be improved by restoring the pixel by normal two-dimensional linear interpolation for the former pixel 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 Unit>
FIG. 16 is a flowchart for explaining the damaged portion repair image [2] generation processing by the damaged portion repair image [2] generation unit 310 shown in FIG.
The damaged portion repaired image [2] generation unit 310 sets a processing area for the damaged portion repaired image [1] G300 stored in the RAM 12 (S300a).
Next, the damaged portion repaired image [2] generation unit 310 performs cross pattern reduction sharpening filter processing as post-processing in order to obtain the final damaged portion repaired image [2] G310 from the damaged portion repaired image [1] G300. I do. As a result, the repair process for obtaining the damaged part repair image [2] G310 is an improved version of the smoothing process in which the repair pixel value is calculated using the peripheral pixel value, so that the image is distorted. Giving to the viewer can be reduced by the sharpening process.

上述したように、上下左右の最も近い画素を参照して線形補間して埋める手法(S240、S250)では、修復画像に十字状の擬似パターンができ易くなる。単純な鮮鋭化処理を行うと、十字パターンが目立ので、不自然な画像となってしまう。
このような十字パターンを軽減するために、ステップS301において、破損部修復画像[2]生成部310は、以下の異方性を持った十字パターン軽減鮮鋭化フィルタ処理を行う。
As described above, with the method of filling by linear interpolation with reference to the closest pixels in the upper, lower, left, and right directions (S240, S250), a cross-shaped pseudo pattern can be easily formed in the repaired 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 repaired image [2] generation unit 310 performs a cross pattern reduction sharpening filter process having the following anisotropy.

Figure 2018060324
・・・(式17)
上下左右方向を弱め、斜め方向を少し加える鮮鋭化処理によって、自然な修復画像が得られる。
フィルタの係数(鮮鋭化度、異方性の強さ)やフィルタサイズは変更しても良い。
また、修復画素の補間計算が、上下左右の最も近い破損部でない画素を参照して埋める方法でない場合は、単純な鮮鋭化フィルタでの処理でも良い。
以上により、破損部修復画像[2]生成部310は、破損部修復画像[2]G310が生成される。
ステップS310bでは、破損部修復画像[2]生成部310は、RAM12上に生成された破損部修復画像[2]をHDD14に記憶する。
Figure 2018060324
... (Formula 17)
A natural restoration image can be obtained by sharpening processing that weakens the vertical and horizontal directions and adds a little oblique direction.
The filter coefficient (sharpness, anisotropic strength) and filter size may be changed.
In addition, when the interpolation calculation of the repaired pixel is not a method of filling by referring to the pixel that is not the closest damaged part in the upper, lower, left, and right 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 S <b> 310 b, the damaged part repair image [2] generation unit 310 stores the damaged part 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 portion repair image [2] G310 generated by the damaged portion repair image [2] generation unit 310 is output to the printer driver 26, and the printer driver 26 receives drawing information from the damaged portion repair image [2] G310. Generated and output to the image forming apparatus 2.
As a result, the damaged portion repair image [2] G310 in which the damaged portion is corrected is generated as the drawing information for the original image G100 having the damaged portion, and the drawing information is printed by the image forming apparatus 2. It is possible to meet the demand for viewing images before they occur.
In the above-described embodiment, the damaged portion repair image [2] G310 is printed using an ink jet printer as the image forming apparatus 2, but an electrophotography having a plurality of drums instead of the ink jet printer. The damaged part repair image [2] G310 may be printed using a 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に補正処理を加えるので、破損部が生じている絵画から破損部を除去し、当時の破損部が生じていない絵画の再現ができる。また、破損部の大きさや修復の度合いなどによって、パラメータによる調整を可能とし、修復具合を試すことが可能である。破損部の検知漏れ、誤検知がある領域に関しては、その領域にのみ別のパラメータを用いたフィルタ処理を行うことで、より良い効果を得ることができる。
<Configuration, operation and effect of exemplary embodiment of the present invention>
<First aspect>
The image processing apparatus according to this aspect is an image processing apparatus that detects a damaged portion that exists in the original image G100, and performs background processing that represents the evaluation of pixels that are the background of each pixel by performing smoothing processing on the original image G100. A background evaluation image generation unit 110 that generates an image G110, and a flat evaluation image generation that generates a flat evaluation image G120 that represents an evaluation related to flatness of the original image G100 by performing edge detection processing and smoothing processing on the original image G100. The damaged part that identifies the damaged part and generates the damaged part detection image [1] G200 based on the difference value between the part 120, the original image G100 and the background evaluation image G110, and the pixel value of the flat evaluation image G120 And a detected image [1] generation unit 200.
According to this aspect, the background evaluation image generation unit 110 generates a background evaluation image G110 that represents the evaluation of the pixel that is the background of each pixel by performing a smoothing process on the original image G100. The flat evaluation image generation unit 120 generates a flat evaluation image G120 representing the evaluation related to flatness of the original image G100 by performing edge detection processing and smoothing processing on the original image G100. The damaged part detection image [1] generation unit 200 identifies the damaged part 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 detects the damaged part detection image [ 1] G200 is generated.
As described above, by performing smoothing processing on the original image G100 and the original image G100, the difference value between the background evaluation image G110 representing the evaluation of the pixel serving as the background of each pixel, and the edge detection processing 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. It is possible to prevent a specific pattern included in the image having the same brightness difference as the damaged portion from being erroneously detected as a damaged portion.
For example, in order to reduce the erroneous detection of the background pattern by determining 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, the original image G100 Since the criterion for judging the damaged portion is adjusted from the flat evaluation image G120 generated based on the image, and the correction processing is applied to the original image G100 using the generated damaged portion detection image [1] G200, the damaged portion is generated. The damaged part can be removed from the existing painting, and the painting without the damaged part at that time can be reproduced. In addition, it is possible to make adjustments by parameters according to the size of the damaged portion, the degree of repair, and the like, and to try the repair condition. With respect to a region where there is a detection failure or erroneous detection of a damaged portion, a better effect can be obtained by performing filter processing using another parameter only in that region.

<第2態様>
本態様の背景評価画像生成部110は、元画像G100に対してメディアンフィルタを用いて平滑化処理を行うことにより背景評価画像G110を生成することを特徴とする。
本態様によれば、背景評価画像生成部110が、元画像G100に対してメディアンフィルタを用いて平滑化処理を行うことにより背景評価画像G110を生成する。
これにより、元画像G100に対してメディアンフィルタを用いて平滑化処理を行うことにより背景評価画像G110を生成することができる。
<Second aspect>
The background evaluation image generation unit 110 of this aspect generates a background evaluation image G110 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 the median filter.
Thereby, 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 aspect generates an adjacent difference image by performing edge detection processing on the original image G100 using a Sobel filter, and performs a Gaussian filter, an averaging filter, a median on the adjacent difference image. 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 performs Gaussian filtering and averaging on the adjacent difference image. A flatness evaluation image G120 is generated by performing a smoothing process using any one of a filter and a median filter.
Thereby, 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. By performing the smoothing process, the flat evaluation image G120 can be generated.

<第4態様>
本態様の破損部検知画像[1]生成部200は、元画像G100、背景評価画像G110、及び平坦評価画像G120に基づいて、背景画素と破損部画素を区別して、少なくとも2値の情報を有する破損部検知画像[1]G200を生成することを特徴とする。
本態様によれば、破損部検知画像[1]生成部200が、元画像G100、背景評価画像G110、及び平坦評価画像G120に基づいて、背景画素と破損部画素を区別して、少なくとも2値の情報を有する破損部検知画像[1]G200を生成する。
これにより、元画像G100、背景評価画像G110、及び平坦評価画像G120に基づいて、背景画素と破損部画素を区別して、少なくとも2値の情報を有する破損部検知画像[1]G200を生成することができる。
<4th aspect>
The damaged portion detection image [1] generation unit 200 of this aspect distinguishes the background pixel from 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 binary information. Damaged part detection image [1] G200 is generated.
According to this aspect, the damaged part detection image [1] generation unit 200 distinguishes the background pixel from the damaged part pixel based on the original image G100, the background evaluation image G110, and the flat evaluation image G120, and at least binary. A damaged portion detection image [1] G200 having information is generated.
Thereby, 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 do.

<第5態様>
本態様の破損部検知画像[1]生成部200は、画素毎に少なくとも2値の情報を格納した破損部検知画像[1]G200に対して、破損部画素である領域に膨張処理を行うことを特徴とする。
本態様によれば、破損部検知画像[1]生成部200が、画素毎に少なくとも2値の情報を格納した破損部検知画像[1]G200に対して、破損部画素である領域に膨張処理を行う。
これにより、画素毎に少なくとも2値の情報を格納した破損部検知画像[1]G200に対して、破損部画素である領域に膨張処理を行うことができる。
<5th aspect>
The damaged portion detection image [1] generation unit 200 according to the present aspect performs an expansion process on a region that is a damaged portion pixel on the damaged portion detection image [1] G200 that stores at least binary information for each pixel. It is characterized by.
According to this aspect, the damaged portion detection image [1] generation unit 200 performs an expansion process on a region that is a damaged portion pixel with respect to the damaged portion detection image [1] G200 that stores at least binary information for each pixel. I do.
Thereby, the expansion process can be performed on the area that is the damaged part pixel with respect to the damaged part detection image [1] G200 in which at least binary information is stored for each 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 according to this aspect is characterized in that each pixel of the damaged portion detection image [1] G200 is identified as two types of black damaged portion pixels or white damaged portion pixels.
According to this aspect, the damaged portion detection image [1] generation unit 200 identifies each pixel of the damaged portion detection image [1] G200 as two types of black damaged portion pixels or white damaged portion pixels.
Thereby, each pixel of damaged part detection image [1] G200 can be identified as two types, a black damaged part pixel or a white damaged part 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の全てを満たす場合に、ある画素が黒破損部画素であると識別することができる。
<Seventh aspect>
The damaged portion detection image [1] generation unit 200 of this aspect is
As an identification condition used to identify a pixel having a damaged portion detection image [1] G200 as a black damaged portion pixel,
B1: The pixel value (P) of the original image G100 has a lightness (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 pixel.
According to this aspect, the damaged portion detection image [1] generation unit 200
As an identification condition used to identify a pixel having a damaged portion detection image [1] G200 as a black damaged portion pixel,
B1: The pixel value (P) of the original image G100 has a lightness (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 pixel.
As a result, when an identification condition used to identify a pixel in the damaged portion detection image [1] G200 as a black damaged portion pixel is satisfied, all pixels B1 to B4 are satisfied. Can be identified.

<第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を満たす場合に、ある画素が白破損部画素であると識別することができる。
<Eighth aspect>
The damaged portion detection image [1] generation unit 200 of this aspect is
As an identification condition used to identify a pixel having a damaged portion detection image [1] G200 as a white damaged portion pixel,
W1: The pixel value (P) of the original image G100 is lighter (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
If W1 and W2 are satisfied and W3 and W4 are satisfied, or W1 and W2 are satisfied and W. 5 is satisfied, a certain pixel is identified as a white damaged pixel.
According to this aspect, the damaged portion detection image [1] generation unit 200
As an identification condition used to identify a pixel having a damaged portion detection image [1] G200 as a white damaged portion pixel,
W1: The pixel value (P) of the original image G100 is lighter (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
If W1 and W2 are satisfied and W3 and W4 are satisfied, or W1 and W2 are satisfied and W. 5 is satisfied, a certain pixel is identified as a white damaged portion pixel. Thus, the identification condition used to identify a certain pixel in the damaged portion detection image [1] G200 as a white damaged portion pixel is described above. Satisfy W1 and W2 and satisfy W3 and W4, or satisfy W1 and W2 and When 5 is satisfied, a certain pixel can be identified as a white damaged pixel.

<第9態様>
本態様の破損部検知画像[1]生成部200は、背景評価画像G110の明度、及び平坦評価画像G120の画素値に基づいて、各識別条件に係る各設定閾値を補正することを特徴とする。
本態様によれば、破損部検知画像[1]生成部200が、背景評価画像G110の明度、及び平坦評価画像G120の画素値に基づいて、各識別条件に係る各設定閾値を補正する。
これにより、背景評価画像G110の明度、及び平坦評価画像G120の画素値に基づいて、各識別条件に係る各設定閾値を補正することができる。
<Ninth aspect>
The damaged part detection image [1] generation unit 200 according to the present aspect corrects each setting threshold 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. .
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>
The damaged portion detection image [1] generation unit 200 of this aspect 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 for a pixel in the damaged portion detected image [1] G200. In some cases, a certain pixel is used as a background pixel.
According to this aspect, the damaged part detection image [1] generation unit 200 corresponds to the identification condition related to the black damaged part pixel or the identification condition related to the white damaged part pixel in which the damaged part detected image [1] G200 is located. If not, a certain pixel is set as a background pixel.
As a result, when a pixel in 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 is set 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態様と同様であるので、その説明を省略する。
<Eleventh aspect>
The image processing method according to this aspect is an image processing method by an image processing apparatus that detects a damaged portion in the original image G100, and performs smoothing processing on the original image to evaluate the pixel that is the background of each pixel. A background evaluation image generation step (S100a to S110a) for generating a background evaluation image G110 to be expressed, and a flat evaluation image G120 that represents an evaluation related to flatness of the original image G100 by performing edge detection processing and smoothing processing on the original image G100. The damaged portion region is identified and damaged based on the flat evaluation image generation step (S100b to S120a) for generating the image, the difference value between the original image G100 and the background evaluation image G110, and the pixel value of the flat evaluation image G120. A damaged portion detection image generation step (S100c to S200) for generating a portion detection image [1] G200; That.
Since the operation and effect of the eleventh aspect are the same as those of the first aspect, 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 part, 210 ... Damaged part detection image [2] Generation unit 300 ... Damaged part repair image [1] generation unit 310 ... Damaged part repair image [2] generation unit

特許3877916号公報Japanese Patent No. 3877916

Claims (11)

元画像に存在する破損部を検知する画像処理装置であって、
前記元画像に平滑化処理を行うことにより各画素の背景となる画素の評価を表す背景評価画像を生成する背景評価画像生成手段と、
前記元画像にエッジ検知処理と平滑化処理を行うことにより前記元画像の平坦性に係る評価を表す平坦評価画像を生成する平坦評価画像生成手段と、
前記元画像と前記背景評価画像との間の差分値、及び前記平坦評価画像の画素値に基づいて、破損部を識別して破損部検知画像を生成する破損部検知画像生成手段と、
を備えることを特徴とする画像処理装置。
An image processing apparatus for detecting a damaged portion existing in an original image,
Background evaluation image generation means for generating a background evaluation image representing an evaluation of a pixel as a background of each pixel by performing a smoothing process on the original image;
Flat evaluation image generation means for generating a flat evaluation image representing evaluation relating to flatness of the original image by performing edge detection processing and smoothing processing on the original image;
Damaged part detection image generating means for identifying a damaged part and generating a damaged part 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 apparatus comprising:
前記背景評価画像生成手段は、前記元画像に対してメディアンフィルタを用いて平滑化処理を行うことにより前記背景評価画像を生成することを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the background evaluation image generation unit 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 applies a Gaussian filter, an averaging filter, and a median filter to the adjacent difference image. The image processing apparatus according to claim 1, wherein the flatness evaluation image is generated by performing a smoothing process using any one of them. 前記破損部検知画像生成手段は、前記元画像、前記背景評価画像、及び前記平坦評価画像に基づいて、背景画素と破損部画素を区別して、少なくとも2値の情報を有する破損部検知画像を生成することを特徴とする請求項1に記載の画像処理装置。   The damaged portion detection image generating means distinguishes a background pixel and a damaged portion pixel based on the original image, the background evaluation image, and the flatness evaluation image, and generates a damaged portion detection image having at least binary information. The image processing apparatus according to claim 1, wherein: 前記破損部検知画像生成手段は、画素毎に少なくとも2値の情報を格納した前記破損部検知画像に対して、破損部画素である領域に膨張処理を行うことを特徴とする請求項1に記載の画像処理装置。   2. The damaged part detection image generation unit performs expansion processing on an area that is a damaged part pixel on the damaged part detection image that stores at least binary information for each pixel. Image processing apparatus. 前記破損部検知画像生成手段は、前記破損部検知画像の各画素を黒破損部画素又は白破損部画素の2種類に識別することを特徴とする請求項5に記載の画像処理装置。   The image processing apparatus according to claim 5, wherein the damaged portion detection image generation unit identifies each pixel of the damaged portion detection image into two types of black damaged portion pixels and white damaged portion pixels. 前記破損部検知画像生成手段は、
前記破損部検知画像のある画素が黒破損部画素であると識別するのに用いる識別条件として、
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 portion detection image generating means is
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 has a lightness (L *) smaller 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 greater 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 the pixel is identified as a black damaged pixel when all of the B1 to B4 are satisfied.
前記破損部検知画像生成手段は、
前記破損部検知画像のある画素が白破損部画素であると識別するのに用いる識別条件として、
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 portion detection image generating means is
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 is lighter (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 lightness 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 W1 and W2 are satisfied and W3 and W4 are satisfied, or when W1 and W2 are satisfied and W. 7. The image processing apparatus according to claim 6, wherein when the condition 5 is satisfied, the certain pixel is identified as a white damaged pixel.
前記破損部検知画像生成手段は、前記背景評価画像の明度、及び前記平坦評価画像の画素値に基づいて、前記各識別条件に係る各設定閾値を補正することを特徴とする請求項7又は8に記載の画像処理装置。   The said damaged part detection image generation means correct | amends each setting threshold value which concerns on each said identification condition based on the brightness of the said background evaluation image, and the pixel value of the said flat evaluation image, The said threshold value is characterized by the above-mentioned. An image processing apparatus according to 1. 前記破損部検知画像生成手段は、前記破損部検知画像のある画素が前記黒破損部画素に係る識別条件、又は前記白破損部画素に係る識別条件に該当しなかった場合に、前記ある画素を背景画素とすることを特徴とする請求項7又は8に記載の画像処理装置。   The damaged portion detection image generation means is configured to detect the pixel when the pixel of the damaged portion detection image does not satisfy the identification condition related to the black damaged portion pixel or the identification condition related to the white damaged portion pixel. The image processing apparatus according to claim 7, wherein the image processing apparatus is a background pixel. 元画像に存在する破損部を検知する画像処理装置による画像処理方法であって、
前記元画像に平滑化処理を行うことにより各画素の背景となる画素の評価を表す背景評価画像を生成する背景評価画像生成ステップと、
前記元画像にエッジ検知処理と平滑化処理を行うことにより前記元画像の平坦性に係る評価を表す平坦評価画像を生成する平坦評価画像生成ステップと、
前記元画像と前記背景評価画像との間の差分値、及び前記平坦評価画像の画素値に基づいて、破損部領域を識別して破損部検知画像を生成する破損部検知画像生成ステップと、
を実行することを特徴とする画像処理方法。
An image processing method by an image processing apparatus for detecting a damaged portion existing in an original image,
A background evaluation image generating step for generating a background evaluation image representing an evaluation of a pixel as a background of each pixel by performing a smoothing process on the original image;
A flat evaluation image generating step for generating a flat evaluation image representing evaluation relating to flatness of the original image by performing edge detection processing and smoothing processing on the original image;
A damaged part detection image generation step for identifying a damaged part region and generating a damaged part 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;
The image processing method characterized by performing.
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 true JP2018060324A (en) 2018-04-12
JP6798229B2 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
JP6798229B2 (en) 2020-12-09

Similar Documents

Publication Publication Date Title
JP6566052B2 (en) Dynamic printing system compensation mechanism
JP4487894B2 (en) Printing device
US9649839B2 (en) Image processing apparatus and image processing method
US11233921B2 (en) Image processing apparatus that specifies edge pixel in target image using single-component image data
JP4428362B2 (en) Printing apparatus, printing program, printing method and printing control apparatus, printing control program, printing control method, and recording medium recording the program
JP2006289947A (en) Printing device, printing device control program and method of controlling printing device, and data formation device for printing, data formation program for printing and method of forming data for printing
JP2007083704A (en) Printing device, printing program, printing method and image processing device, image processing program, image processing method, and recording medium on which program is recorded
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
JP2017013378A (en) Image processing device and image processing method
JP4434112B2 (en) Printing apparatus, printing apparatus control program, and printing apparatus control method
JP6048099B2 (en) Image processing method, image processing program, and information processing apparatus
JP2006224419A (en) Printing device, printing program, printing method, image processor, image processing program, image processing method, and recording medium having program recorded therein
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
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
JP2008018632A (en) Printer, printer controlling program, storage medium storing the program and printer controlling method, image processing apparatus, image processing program, storage medium storing the program and image processing method, and compensation region information forming apparatus, compensation region information forming program, storage medium storing the program, and compensation region information forming method
JP6755739B2 (en) Image processing equipment, image processing methods and programs
JP7242272B2 (en) Dither matrix generation device, generation method, image processing device using dither matrix, image processing method, and 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
JP6671861B2 (en) Correction data generation method for recording apparatus and data processing apparatus
JP6798229B2 (en) Image processing device and image processing method
JP2019107880A (en) Image processing device, image processing method and program
US11057528B2 (en) Information processing apparatus, method and storage medium
JP6094278B2 (en) Image processing apparatus, image forming 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