JP2000074846A - Picture image processing device and its method - Google Patents

Picture image processing device and its method

Info

Publication number
JP2000074846A
JP2000074846A JP10245952A JP24595298A JP2000074846A JP 2000074846 A JP2000074846 A JP 2000074846A JP 10245952 A JP10245952 A JP 10245952A JP 24595298 A JP24595298 A JP 24595298A JP 2000074846 A JP2000074846 A JP 2000074846A
Authority
JP
Japan
Prior art keywords
image
flaw
filter
detecting
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP10245952A
Other languages
Japanese (ja)
Inventor
Taiji Morimoto
泰司 森本
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP10245952A priority Critical patent/JP2000074846A/en
Publication of JP2000074846A publication Critical patent/JP2000074846A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To detect and modify, accurately in a short time, a defective picture image included in plural sheets of picture images. SOLUTION: In this step S204, a filter treatment for detecting a straight line in a picture image region including a defective picture image is executed, and a filter treatment result is accumulated in a corresponding data table, corresponding to whether the value shows a positive or a negative, and Hough transform is executed by using the data table to thereby detect two line segments having the same gradient, and pixels interposed between detected two line segments are recognized as a pixel composing the defective picture image. And then, in the step S207, radii of necessary median filters are obtained relative to each pixel composing the defective picture image, and the filter treatment is executed to each corresponding pixel by the median filter having the obtained radius.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は画像処理装置および
その方法に関し、例えば、傷画像を検出または修正する
ための画像処理装置およびその方法に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus and method, and more particularly, to an image processing apparatus and method for detecting or correcting a flaw image.

【0002】[0002]

【従来の技術】画像を記録するフィルムなどの傷付き易
い媒体は、カメラや現像器の搬送系に混入した異物や機
器内に生じた欠損による突起物により、複数コマに亘っ
て直線状に傷付けられてしまうことが希にある。傷付い
たフィルムから読み取られたディジタル画像には傷に対
応する傷画像が含まれることになる。
2. Description of the Related Art A fragile medium such as a film for recording an image is scratched linearly over a plurality of frames by a foreign matter mixed into a transport system of a camera or a developing device or a protrusion caused by a defect generated in a device. It is rarely done. The digital image read from the damaged film will include a flaw image corresponding to the flaw.

【0003】[0003]

【発明が解決しようとする課題】このような傷画像をコ
ンピュータを用いて修正する場合、画像修正ソフトウェ
アなどを使い、オペレータが手作業で、傷画像領域をそ
の周囲から埋めるといった修正作業が必要になる。この
修正作業は手間がかかり、複数枚の画像に含まれる傷画
像を短時間で正確に検出し修正するのは困難である。
When such a flaw image is corrected using a computer, it is necessary for the operator to manually fill the flaw image area from the surroundings using image correction software or the like. Become. This correction operation is troublesome, and it is difficult to accurately detect and correct a flaw image included in a plurality of images in a short time.

【0004】本発明は、上述の問題を解決するためのも
のであり、画像に含まれる傷画像を短時間に正確に検出
することができる画像処理装置およびその方法を提供す
ることを目的とする。
An object of the present invention is to solve the above-mentioned problem, and an object of the present invention is to provide an image processing apparatus and a method thereof capable of accurately detecting a flaw image included in an image in a short time. .

【0005】また、画像に含まれる傷画像を短時間に容
易に修正することができる画像処理装置およびその方法
を提供することを目的とする。
It is another object of the present invention to provide an image processing apparatus and method capable of easily correcting a flaw image included in an image in a short time.

【0006】[0006]

【課題を解決するための手段】本発明は、前記の目的を
達成する一手段として、以下の構成を備える。
The present invention has the following configuration as one means for achieving the above object.

【0007】本発明にかかる画像処理方法は、画像に含
まれる傷画像を検出する画像処理方法であって、前記傷
画像が含まれる画像領域に略直線を検出するためのフィ
ルタ処理を施し、その値が正を示すか負を示すかに応じ
て、前記フィルタ処理結果を対応するデータテーブルに
蓄積し、前記データテーブルを使用してハフ変換を行
い、所定の傾きをもつ二本の線分を検出し、検出された
二本の線分に挟まれる画素を前記傷画像を構成する画素
とすることを特徴とする。
An image processing method according to the present invention is an image processing method for detecting a flaw image included in an image. The image processing method performs a filter process for detecting a substantially straight line in an image area including the flaw image, Depending on whether the value indicates positive or negative, the filter processing result is stored in a corresponding data table, Hough transform is performed using the data table, and two line segments having a predetermined slope are calculated. A pixel sandwiched between the detected and detected two line segments is set as a pixel constituting the flaw image.

【0008】また、画像に含まれる傷画像を修正する画
像処理方法であって、前記傷画像が含まれる画像領域に
略直線を検出するためのフィルタ処理を施し、その値が
正を示すか負を示すかに応じて、前記フィルタ処理結果
を対応するデータテーブルに蓄積し、前記データテーブ
ルを使用してハフ変換を行い、所定の傾きをもつ二本の
線分を検出し、検出された二本の線分に挟まれる画素を
前記傷画像を構成する画素とし、前記傷画像を構成する
画素ごとに必要なメディアンフィルタの半径を求め、得
られた半径のメディアンフィルタにより対応する画素に
フィルタ処理を施すことを特徴とする。
An image processing method for correcting a flaw image included in an image, wherein a filter processing for detecting a substantially straight line is applied to an image area including the flaw image, and the value indicates positive or negative. , The filter processing result is stored in a corresponding data table, Hough transform is performed using the data table, and two line segments having a predetermined inclination are detected. The pixels sandwiched between the line segments are the pixels constituting the flaw image, the radius of the median filter required for each pixel constituting the flaw image is obtained, and the median filter of the obtained radius filters the corresponding pixels. Is performed.

【0009】本発明にかかる画像処理装置は、画像に含
まれる傷画像を検出する画像処理装置であって、前記傷
画像が含まれる画像領域に略直線を検出するためのフィ
ルタ処理を施す処理手段と、その値が正を示すか負を示
すかに応じて、前記フィルタ処理結果を対応するデータ
テーブルに蓄積する蓄積手段と、前記データテーブルを
使用してハフ変換を行い、所定の傾きをもつ二本の線分
を検出し、検出された二本の線分に挟まれる画素を前記
傷画像を構成する画素として検出する検出手段とを有す
ることを特徴とする。
An image processing apparatus according to the present invention is an image processing apparatus for detecting a flaw image included in an image, wherein the processing means performs a filtering process for detecting a substantially straight line in an image area including the flaw image. And a storage means for storing the filter processing result in a corresponding data table according to whether the value indicates positive or negative, and performing a Hough transform using the data table to have a predetermined slope. Detecting means for detecting two line segments and detecting a pixel sandwiched between the detected two line segments as a pixel constituting the flaw image.

【0010】また、画像に含まれる傷画像を修正する画
像処理装置であって、前記傷画像が含まれる画像領域に
略直線を検出するためのフィルタ処理を施す処理手段
と、その値が正を示すか負を示すかに応じて、前記フィ
ルタ処理結果を対応するデータテーブルに蓄積する蓄積
手段と、前記データテーブルを使用してハフ変換を行
い、所定の傾きをもつ二本の線分を検出し、検出された
二本の線分に挟まれる画素を前記傷画像を構成する画素
として検出する検出手段と、前記傷画像を構成する画素
ごとに必要なメディアンフィルタの半径を求め、得られ
た半径のメディアンフィルタにより対応する画素にフィ
ルタ処理を施す修正手段とを有することを特徴とする。
An image processing apparatus for correcting a flaw image included in an image, a processing means for performing a filtering process for detecting a substantially straight line in an image area including the flaw image, Storage means for storing the filter processing result in a corresponding data table according to whether the data processing is performed, and performing a Hough transform using the data table to detect two line segments having a predetermined inclination. Then, detection means for detecting a pixel sandwiched between the two detected line segments as pixels constituting the flaw image, and a radius of a median filter required for each pixel constituting the flaw image were obtained and obtained. Correction means for performing filter processing on a corresponding pixel with a median filter having a radius.

【0011】[0011]

【発明の実施の形態】以下、本発明にかかる一実施形態
の画像処理装置を図面を参照して詳細に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, an image processing apparatus according to an embodiment of the present invention will be described in detail with reference to the drawings.

【0012】[構成]図1は本発明にかかるディジタル
画像処理装置の概略構成を示すブロック図である。
[Configuration] FIG. 1 is a block diagram showing a schematic configuration of a digital image processing apparatus according to the present invention.

【0013】同図において、コンピュータ装置108は、
内部バス106により相互に接続されるCPU101、ROM102、R
AM103およびハードディスクなどの記憶装置104を備えて
いる。CPU101は、ROM103に格納されたBIOSなどに従い、
記憶装置104に格納されたプログラムをRAM103にコピー
し、RAM103にコピーされたプログラムに従って画像処理
などの処理を実行する。また、CPU101は、インタフェイ
ス105を介して、外部バス109に接続された機器との間で
通信を行う。
In FIG. 1, a computer device 108 includes:
CPU 101, ROM 102, R interconnected by internal bus 106
A storage device 104 such as an AM 103 and a hard disk is provided. CPU 101 follows the BIOS stored in ROM 103, etc.
The program stored in the storage device 104 is copied to the RAM 103, and processing such as image processing is executed according to the program copied to the RAM 103. In addition, the CPU 101 communicates with a device connected to the external bus 109 via the interface 105.

【0014】キーボードやポインティングデバイスなど
の操作部115には、本装置のオペレータから画像処理を
指示する命令をはじめとする各種の指示や、データが入
力され、それらの指示やデータは外部バス109および内
部バス106を介してCPU101へ送られる。例えば、操作部1
15から入力された指示が原稿画像の読み取りを指示する
ものであった場合、CPU101は、フィルムスキャナやイメ
ージリーダなどの読取装置114を制御して原稿画像を読
み取らせ、得られた画像データおよびその原稿の種類を
記憶装置104またはRAM103に記憶させる。また、画像の
印刷を指示された場合、CPU101は、RAM103や記憶装置10
4に記憶されている画像データを印刷装置117へ送り、そ
の画像データに基づく画像を記録紙に記録させる。
Various instructions and data including an instruction to instruct image processing from the operator of the apparatus are input to an operation unit 115 such as a keyboard and a pointing device. The data is sent to the CPU 101 via the internal bus 106. For example, operation unit 1
If the instruction input from 15 is an instruction to read the original image, the CPU 101 controls the reading device 114 such as a film scanner or an image reader to read the original image, and obtains the obtained image data and its image data. The type of the document is stored in the storage device 104 or the RAM 103. When an instruction to print an image is given, the CPU 101
The image data stored in 4 is sent to the printing device 117, and an image based on the image data is recorded on recording paper.

【0015】CPU101は、処理の結果や処理の進行状況
を、CRTやLCDなどからなる表示装置116に表示してオペ
レータに示す。表示装置116に表示される情報として
は、入力された指示やデータ、読み取った画像などの画
像処理の結果などであり、勿論、オペレータからの指示
に従い、未処理画像および処理画像を表示することもで
きる。
The CPU 101 displays the result of the processing and the progress of the processing on a display device 116 such as a CRT or an LCD to show the operator. The information displayed on the display device 116 includes input instructions and data, results of image processing of read images, and the like. Of course, according to instructions from the operator, unprocessed images and processed images may be displayed. it can.

【0016】[傷画像の修正処理]図2は本発明にかか
る一実施形態の略直線状の傷画像を検出し、修正する処
理の一例を示すフローチャートで、操作部115から傷画
像の修正が指示された場合に、CPU101によって実行され
る処理である。
FIG. 2 is a flowchart showing an example of a process for detecting and correcting a substantially linear flaw image according to an embodiment of the present invention. This is a process executed by the CPU 101 when instructed.

【0017】ステップS201で、処理対象の画像に関する
記録媒体の種類(例えば、ネガフィルムやポジフィルム
など)に応じて、傷の種類を初期設定する。例えば、修
正対象を、ネガフィルムの場合は明度の高い傷画像に設
定し、ポジフィルムの場合は明度の低い傷画像に初期設
定する。
In step S201, the type of scratch is initially set according to the type of recording medium (eg, a negative film or a positive film) related to the image to be processed. For example, the correction target is set to a scratch image having a high brightness in the case of a negative film, and is initially set to a scratch image having a low brightness in the case of a positive film.

【0018】次に、ステップS202で、表示装置116上
に、ステップS201で初期設定された傷画像の種類を表示
する。表示された傷画像の種類が正しくない場合、オペ
レータは操作部115により傷画像の種類を入力し修正す
る。
Next, in step S202, the type of the flaw image initially set in step S201 is displayed on the display device 116. If the type of the displayed flaw image is not correct, the operator inputs and corrects the type of the flaw image using the operation unit 115.

【0019】次に、ステップS203で、表示装置116上に
処理対象画像を表示する。表示された処理対象画像に基
づき、オペレータは操作部115により修正したい傷画像
の位置を入力し指定する。傷画像の位置の指定は、例え
ばマウスなどのポインティングデバイスを用いて傷画像
の長手方向の両端近傍を指定することによって行う。
Next, in step S203, an image to be processed is displayed on the display device 116. Based on the displayed processing target image, the operator inputs and specifies the position of the wound image to be corrected using the operation unit 115. The position of the flaw image is specified by, for example, using a pointing device such as a mouse to specify the vicinity of both ends in the longitudinal direction of the flaw image.

【0020】次に、ステップS204で、指定された傷画像
の位置近傍にある、傷画像を構成する画素を検出する。
詳細は後述するが、指定された傷画像を検出し修正する
ための検出/修正用画像データを作成し(ステップS20
5)、得られた検出/修正用画像データにハフ変換を施す
(ステップS206)ことにより、傷画素を検出する。
Next, in step S204, pixels constituting the flaw image near the position of the specified flaw image are detected.
Although details will be described later, detection / correction image data for detecting and correcting the designated flaw image is created (step S20).
5) A Huff transform is performed on the obtained image data for detection / correction (step S206), thereby detecting a flaw pixel.

【0021】次に、ステップS207で傷画素の修正を行
う。詳細は後述するが、傷画像を構成するとして検出さ
れた画素ごとに、傷画像を修正するのに必要な最小のメ
ディアンフィルタの半径を求め(ステップS208)、得ら
れた半径のメディアンフィルタを用いたフィルタ処理を
対応する画素に施す(ステップS209)。
Next, in step S207, a damaged pixel is corrected. As will be described in detail later, the minimum median filter radius required to correct the flaw image is determined for each pixel detected as constituting the flaw image (step S208), and the median filter having the obtained radius is used. The applied filter processing is performed on the corresponding pixel (step S209).

【0022】次に、ステップS210で、修正結果、つまり
傷画像の修正処理が施された画像を表示装置116に表示
し、望む修正結果が得られたか否かをオペレータに判断
させる。続いて、ステップS211で、オペレータから可を
示す指示が入力された場合は処理を終了し、不可を示す
指示が入力された場合はステップS212で修正処理を施し
た画素(傷画像を構成するとして検出された画素)の値
を修正前の値に戻した後、ステップS202に処理を戻す。
従って、ステップS211でオペレータから可を示す指示が
入力されるまで、ステップS212からS210の処理が繰り返
される。
Next, in step S210, the correction result, that is, the image on which the flaw image has been subjected to the correction processing is displayed on the display device 116, and the operator determines whether or not the desired correction result has been obtained. Subsequently, in step S211, if an instruction indicating “possible” is input from the operator, the process is terminated. After returning the value of the (detected pixel) to the value before correction, the process returns to step S202.
Therefore, the processing of steps S212 to S210 is repeated until an instruction indicating yes is input from the operator in step S211.

【0023】[傷画像の検出/修正用画像データの作
成]図3は傷画像を検出し修正するのための検出/修正用
画像データの作成を説明するための図である。
FIG. 3 is a diagram for explaining the creation of detection / correction image data for detecting and correcting a flaw image.

【0024】オペレータによって指定された傷画像の位
置が、x軸と角度θをなす線分Lであるとする。この線分
Lの長さを両方向にeずつ拡大し、線分Lに直交する方向
に長さdずつ拡大した矩形領域に含まれる画像データを
検出/修正用画像データIdにする。この画像データIdを
作成することにより検出しようとする傷画像の角度は、
画像データId内ではほぼ零度になる。
It is assumed that the position of the flaw image specified by the operator is a line segment L forming an angle θ with the x axis. This line segment
The length of L is expanded by e in both directions, and image data included in a rectangular area expanded by length d in a direction orthogonal to the line segment L is used as detection / correction image data Id. The angle of the scratch image to be detected by creating this image data Id is
It becomes almost zero degree in the image data Id.

【0025】[傷画像の検出]図4はハフ変換(S206)の
詳細な手順例を示すフローチャートである。
[Detection of Flaw Image] FIG. 4 is a flowchart showing a detailed procedure example of the Hough transform (S206).

【0026】まず、ステップS501で、図5に示される水
平方向の直線を検出するためのフィルタによるフィルタ
処理を、画像データIdの明度成分(例えばL*a*b*データ
のL*成分)Ioに施し、その出力画素値を画像データIoと
同じサイズの画像データIfに記録する。なお、ステップ
S201およびS202を経て設定された傷画像の種類が、明度
の高い傷画像の場合は図5に示すフィルタ401を用い、明
度の低い傷画像の場合は、フィルタ401とは係数の符号
が反対であるフィルタ402を用いる。
First, in step S501, a filtering process by a filter for detecting a horizontal straight line shown in FIG. 5 is performed by a lightness component (for example, an L * component of L * a * b * data) Io of the image data Id. And the output pixel value is recorded in image data If having the same size as the image data Io. Note that step
The type of the flaw image set through S201 and S202 uses the filter 401 shown in FIG. 5 when the flaw image has a high brightness, and when the flaw image has a low brightness, the sign of the coefficient is opposite to that of the filter 401. A certain filter 402 is used.

【0027】次に、ステップS502で、画像データIf内の
すべての画素値(Xi,Yi)から式(5.1)によって図6に示す
ような軌跡を求め、その軌跡に沿って画素値(Xi,Yi)が
正の場合はA-B平面のデータテーブルTdpに、負の場合は
Tdpとは別のA-B平面のデータテーブルTdmに、画素値(X
i,Yi)を加算していく。 B = -Xi・A + Yi …(5.1) 上式はA-B平面における傾き-Xi、切片Yiの直線を表す
Next, in step S502, a locus as shown in FIG. 6 is obtained from all the pixel values (Xi, Yi) in the image data If by equation (5.1), and the pixel values (Xi, If Yi) is positive, it is stored in the AB plane data table Tdp.
In the data table Tdm of the AB plane different from Tdp, the pixel value (X
i, Yi). B = -Xi · A + Yi… (5.1) The above equation represents a straight line with slope -Xi and intercept Yi in AB plane

【0028】ここで、画像データId内の傷画像に対応す
る線分Lは、画像データId内におけるX軸となす角がほぼ
零度であるため、傾きAが無限大まで大きくなることは
ない。
Here, since the angle between the line segment L corresponding to the flaw image in the image data Id and the X axis in the image data Id is substantially zero, the inclination A does not increase to infinity.

【0029】次に、ステップS503で、各傾きAjについ
て、その切片Bの上下の候補BUおよびBLを求める。ま
ず、傷画像の指定位置から求まるAoおよびBoの近傍領域
(式(5.2)および(5.3)によって示される)内の各傾きAj
について、Tdmに格納された画素値(Aj,B)の中で最も小
さい値をもつ傾きおよび切片を(Aj,Bmin)とする。 Ao - ΔA < A < Ao + ΔA …(5.2) Bo - ΔB < B < Bo + ΔB …(5.3)
Next, in step S503, candidates BU and BL above and below the intercept B are obtained for each slope Aj. First, each inclination Aj in the area near Ao and Bo (shown by equations (5.2) and (5.3)) obtained from the designated position of the flaw image
, Let the slope and intercept having the smallest value among the pixel values (Aj, B) stored in Tdm be (Aj, Bmin). Ao-ΔA <A <Ao + ΔA… (5.2) Bo-ΔB <B <Bo + ΔB… (5.3)

【0030】次に、Tdp内で、座標(Aj,Bmin)からB軸の
正方向および負方向にデータを調べ、各方向でTdpに格
納された画素値(Aj,B)が最大を示すBをそれぞれBUおよ
びBLとする。
Next, within Tdp, data is examined in the positive and negative directions of the B axis from the coordinates (Aj, Bmin), and in each direction, the pixel value (Aj, B) stored in Tdp indicates the maximum value. Are BU and BL, respectively.

【0031】次に、ステップS504で、式(5.4)により評
価値SAjを設定する。 SAj = {Tdm(Aj,BU) + Tdm(Aj,BL)}/2 - Tdp(Aj,Bmin) …(5.4)
Next, in step S504, an evaluation value SAj is set by equation (5.4). SAj = {Tdm (Aj, BU) + Tdm (Aj, BL)} / 2-Tdp (Aj, Bmin)… (5.4)

【0032】次に、ステップS505で、得られた評価値SA
jと、それまでのSAjの最大値Smaxとを比較して、SAj>Sm
axの場合はSmaxにSAjを代入する。また、そのときのA
j、BUおよびBLをそれぞれAmax、BUmaxおよびBLmaxに代
入する。
Next, in step S505, the obtained evaluation value SA
j and the maximum value Smax of SAj so far, SAj> Sm
In the case of ax, SAj is substituted for Smax. Also, A at that time
Substitute j, BU, and BL for Amax, BUmax, and BLmax, respectively.

【0033】次に、ステップS507で、式(5.2)および(5.
3)で示される領域におけるすべての傾きAについて、ス
テップS503からS506までの処理が完了したかどうかを判
定し、完了した場合はステップS508に進み、未了の場合
はステップS503に処理を戻す。
Next, in step S507, equations (5.2) and (5.
It is determined whether or not the processing from steps S503 to S506 has been completed for all the inclinations A in the area indicated by 3). If the processing has been completed, the process proceeds to step S508; otherwise, the process returns to step S503.

【0034】次に、ステップS508で、得られたAmax、BU
maxおよびBLmaxを傷画像を表す直線パラメータにする。
続いて、ステップS509で、画像データIdの長辺の画素数
Psが特定の画素数Pfより多いかどうかを判断し、Ps≦Pf
の場合はステップS511にジャンプし、そうでない場合は
ステップS510に進んで、画素数Psに比例したマージンを
BUmaxとBLmaxに加える。 BUmax = BUmax + C(Ps - Pf) …(5.5) BLmax = BLmax - C(Ps - Pf) …(5.6) ただし、Cは比例係数
Next, in step S508, the obtained Amax, BU
Let max and BLmax be the linear parameters representing the wound image.
Subsequently, in step S509, the number of pixels on the long side of the image data Id
Determine whether Ps is greater than a specific number of pixels Pf, Ps ≤ Pf
In step S511, the process jumps to step S511; otherwise, the process proceeds to step S510, where a margin proportional to the pixel number Ps is set.
Add to BUmax and BLmax. BUmax = BUmax + C (Ps-Pf)… (5.5) BLmax = BLmax-C (Ps-Pf)… (5.6) where C is a proportional coefficient

【0035】最後に、ステップS511で、画像データId内
で傾きAmax、切片BUmaxおよび切片BLmaxをもつ二本の線
分に挟まれた画素を傷画像を構成する画素とする。
Finally, in step S511, a pixel sandwiched between two line segments having the inclination Amax, the intercept BUmax, and the intercept BLmax in the image data Id is set as a pixel constituting the flaw image.

【0036】[傷画像の修正]図7は傷画像の修正(S20
7)の詳細な手順例を示すフローチャートである。なお、
ステップS601からS606までがステップS208に相当し、ス
テップS607がステップS209に相当する。
[Correction of Scratch Image] FIG. 7 shows the modification of the scratch image (S20).
It is a flowchart which shows the detailed example of a procedure of 7). In addition,
Steps S601 to S606 correspond to step S208, and step S607 corresponds to step S209.

【0037】ステップS601でメディアンフィルタの半径
rを1に設定する。なお、半径1のメディアンフィルタと
は、図8に示す注目画素および係数1が記入されている画
素を含む領域を使うメディアンフィルタのことである。
In step S601, the radius of the median filter
Set r to 1. Note that the median filter having a radius of 1 is a median filter that uses an area including a pixel of interest and a pixel in which a coefficient 1 is entered as shown in FIG.

【0038】次に、ステップS602で傷画像を構成する画
素を「1」、それ以外の画素を「0」とする画像データIb
を作り、画像データIbにステップS603で半径rのメディ
アンフィルタによるフィルタ処理を施す。続いて、ステ
ップS604で、直前のフィルタ処理により画素値が新たに
「0」になった画像データIbの画素位置に対応する画像
データImの画素位置に、ステップS603で使用したメディ
アンフィルタの半径rを書き込む。なお、画像データIm
および画像データIbは同サイズである。
Next, in step S602, the image data Ib in which the pixel constituting the flaw image is "1" and the other pixels are "0"
And the image data Ib is subjected to a filtering process using a median filter with a radius r in step S603. Subsequently, in step S604, the radius r of the median filter used in step S603 is added to the pixel position of the image data Im corresponding to the pixel position of the image data Ib whose pixel value has newly become “0” by the immediately preceding filtering process. Write. The image data Im
And the image data Ib have the same size.

【0039】次に、ステップS605で、フィルタ処理後の
画像データIbの画素値を調べ、すべて「0」であればス
テップS607に進み、そうでなければステップS606に進ん
で、メディアンフィルタの半径rを「1」増やした後、処
理をステップS602に戻す。
Next, in step S605, the pixel value of the filtered image data Ib is checked. If all are "0", the process proceeds to step S607; otherwise, the process proceeds to step S606 to determine the radius r of the median filter. Is increased by “1”, and the process returns to step S602.

【0040】最後に、ステップS607で、画像データImに
記録された半径rをもつメディアンフィルタによるフィ
ルタ処理を、対応する画像データIdの画素に施し、ステ
ップS608で、修正された画像データIdをθ度回転させた
画像を原画像に反映することによって傷画素を修正す
る。
Finally, in step S607, a filtering process using a median filter having a radius r recorded in the image data Im is performed on the pixels of the corresponding image data Id, and in step S608, the corrected image data Id is set to θ The damaged pixel is corrected by reflecting the rotated image in the original image.

【0041】以上説明したように、本実施形態によれ
ば、次の効果を得ることができる。 (1)直線状の傷画像を検出し、検出された傷画像だけを
修正することができる。 (2)指定された傷画像周辺の画像を抽出し、抽出された
画像部分についてのみ処理を行うので、傷画像の検出範
囲を限定し、検出時間の短縮および検出精度の向上する
ことができる。 (3)傷画像の明度の高低により傷画像検出用のフィルタ
の係数値の符号を変化させるので、傷画像の明度の高低
にかかわらず、傷画像を検出できる。 (4)傷画像として検出される線分の幅を、原画像の画素
数に比例させて大きくすることにより、検出誤差を補償
することができる。 (5)メディアンフィルタによるフィルタ処理を画素ごと
施して傷画像を修正することにより、原画像のエッジを
保存しつつ、画像の乱れを少なく抑えて、傷画像を修正
することができる。 (6)傷画像を構成する画素ごとに必要なメディアンフィ
ルタの半径を求めるので、傷画像を構成する画素ごとに
必要なメディアンフィルタの半径を正確に設定すること
ができる。
As described above, according to the present embodiment, the following effects can be obtained. (1) A linear scratch image can be detected, and only the detected scratch image can be corrected. (2) Since the image around the designated flaw image is extracted and the processing is performed only on the extracted image part, the detection range of the flaw image can be limited, the detection time can be shortened, and the detection accuracy can be improved. (3) Since the sign of the coefficient value of the filter for detecting a flaw image is changed depending on the level of the brightness of the flaw image, the flaw image can be detected regardless of the level of the brightness of the flaw image. (4) The detection error can be compensated by increasing the width of the line segment detected as the flaw image in proportion to the number of pixels of the original image. (5) By applying the filtering process by the median filter for each pixel to correct the flaw image, it is possible to correct the flaw image while preserving the edge of the original image and suppressing disturbance of the image. (6) Since the radius of the median filter required for each pixel forming the flaw image is determined, the radius of the median filter required for each pixel forming the flaw image can be set accurately.

【0042】[0042]

【他の実施形態】なお、本発明は、複数の機器(例えば
ホストコンピュータ、インタフェイス機器、リーダ、プ
リンタなど)から構成されるシステムに適用しても、一
つの機器からなる装置(例えば、複写機、ファクシミリ
装置など)に適用してもよい。
[Other Embodiments] Even if the present invention is applied to a system including a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.), an apparatus (for example, a copying machine) Machine, facsimile machine, etc.).

【0043】また、本発明の目的は、前述した実施形態
の機能を実現するソフトウェアのプログラムコードを記
録した記憶媒体を、システムあるいは装置に供給し、そ
のシステムあるいは装置のコンピュータ(またはCPUやM
PU)が記憶媒体に格納されたプログラムコードを読出し
実行することによっても、達成されることは言うまでも
ない。この場合、記憶媒体から読出されたプログラムコ
ード自体が前述した実施形態の機能を実現することにな
り、そのプログラムコードを記憶した記憶媒体は本発明
を構成することになる。また、コンピュータが読出した
プログラムコードを実行することにより、前述した実施
形態の機能が実現されるだけでなく、そのプログラムコ
ードの指示に基づき、コンピュータ上で稼働しているOS
(オペレーティングシステム)などが実際の処理の一部
または全部を行い、その処理によって前述した実施形態
の機能が実現される場合も含まれることは言うまでもな
い。
Another object of the present invention is to provide a storage medium storing a program code of software for realizing the functions of the above-described embodiments to a system or an apparatus, and to provide a computer (or a CPU or MPU) of the system or the apparatus.
Needless to say, this can also be achieved by the PU) reading and executing the program code stored in the storage medium. In this case, the program code itself read from the storage medium implements the functions of the above-described embodiment, and the storage medium storing the program code constitutes the present invention. When the computer executes the readout program code, not only the functions of the above-described embodiments are realized, but also the OS running on the computer based on the instructions of the program code.
It goes without saying that an (operating system) performs a part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.

【0044】さらに、記憶媒体から読出されたプログラ
ムコードが、コンピュータに挿入された機能拡張カード
やコンピュータに接続された機能拡張ユニットに備わる
メモリに書込まれた後、そのプログラムコードの指示に
基づき、その機能拡張カードや機能拡張ユニットに備わ
るCPUなどが実際の処理の一部または全部を行い、その
処理によって前述した実施形態の機能が実現される場合
も含まれることは言うまでもない。
Further, after the program code read from the storage medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer, based on the instructions of the program code, It goes without saying that the CPU included in the function expansion card or the function expansion unit performs part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.

【0045】[0045]

【発明の効果】以上説明したように、本発明によれば、
画像に含まれる傷画像を短時間に正確に検出する画像処
理装置およびその方法を提供することができる。
As described above, according to the present invention,
An image processing apparatus and a method for accurately detecting a flaw image included in an image in a short time can be provided.

【0046】また、画像に含まれる傷画像を短時間に容
易に修正する画像処理装置およびその方法を提供するこ
とができる。
Further, it is possible to provide an image processing apparatus and method for easily correcting a flaw image included in an image in a short time.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明にかかるディジタル画像処理装置の概略
構成を示すブロック図、
FIG. 1 is a block diagram showing a schematic configuration of a digital image processing apparatus according to the present invention;

【図2】直線状の傷画像を検出し、修正する処理の一例
を示すフローチャート、
FIG. 2 is a flowchart illustrating an example of a process of detecting and correcting a linear scratch image,

【図3】傷画像を検出し修正するのための検出/修正用
画像データの作成を説明するための図、
FIG. 3 is a diagram for explaining creation of detection / correction image data for detecting and correcting a flaw image;

【図4】図2に示すハフ変換の詳細な手順例を示すフロ
ーチャート、
FIG. 4 is a flowchart showing a detailed procedure example of the Hough transform shown in FIG. 2,

【図5】直線を検出するためのフィルタ例を示す図、FIG. 5 is a diagram showing an example of a filter for detecting a straight line;

【図6】ハフ変換を説明するための図、FIG. 6 is a diagram for explaining Hough transform.

【図7】図2に示す傷画像の修正の詳細な手順例を示す
フローチャート、
7 is a flowchart showing a detailed procedure example of the correction of the flaw image shown in FIG. 2,

【図8】メディアンフィルタの半径を説明するための図
である。
FIG. 8 is a diagram for explaining a radius of a median filter.

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 2G051 AA41 AA90 AB02 AC04 EA11 EA12 EA14 EA16 EB01 EC01 EC10 ED01 ED08 ED09 ED21 ED30 5B057 AA20 BA02 BA24 CC03 CE01 CE06 DA03 DA08 DC13 5C077 LL02 LL19 PP05 PP58 5L096 BA08 CA02 CA24 EA05 FA03 FA17 FA24 GA55 MA03  ──────────────────────────────────────────────────続 き Continued on the front page F-term (reference) 2G051 AA41 AA90 AB02 AC04 EA11 EA12 EA14 EA16 EB01 EC01 EC10 ED01 ED08 ED09 ED21 ED30 5B057 AA20 BA02 BA24 CC03 CE01 CE06 DA03 DA08 DC13 5C077 LL02 5 LL19 CA05 PP05 FA17 FA24 GA55 MA03

Claims (13)

【特許請求の範囲】[Claims] 【請求項1】 画像に含まれる傷画像を検出する画像処
理方法であって、 前記傷画像が含まれる画像領域に略直線を検出するため
のフィルタ処理を施し、 その値が正を示すか負を示すかに応じて、前記フィルタ
処理結果を対応するデータテーブルに蓄積し、 前記データテーブルを使用してハフ変換を行い、所定の
傾きをもつ二本の線分を検出し、 検出された二本の線分に挟まれる画素を前記傷画像を構
成する画素とすることを特徴とする画像処理方法。
1. An image processing method for detecting a flaw image included in an image, comprising: performing a filtering process for detecting a substantially straight line in an image area including the flaw image; , The filter processing result is stored in a corresponding data table, Hough transform is performed using the data table, and two line segments having a predetermined inclination are detected. An image processing method, wherein pixels sandwiched between book segments are pixels constituting the flaw image.
【請求項2】 前記傷画像が含まれる領域はマニュアル
指定されることを特徴とする請求項1に記載された画像
処理方法。
2. The image processing method according to claim 1, wherein an area including the flaw image is manually designated.
【請求項3】 前記フィルタ処理に使用されるフィルタ
の係数値の符号は、検出対象の傷画像の明度の高低によ
り変更されることを特徴とする請求項1または請求項2に
記載された画像処理方法。
3. The image according to claim 1, wherein a sign of a coefficient value of a filter used in the filtering process is changed according to a level of brightness of a flaw image to be detected. Processing method.
【請求項4】 前記検出された二本の線分の幅は、原画
像の画素数に比例して増加されることを特徴とする請求
項1から請求項3の何れかに記載された画像処理方法。
4. The image according to claim 1, wherein the width of the two detected line segments is increased in proportion to the number of pixels of the original image. Processing method.
【請求項5】 画像に含まれる傷画像を修正する画像処
理方法であって、 前記傷画像が含まれる画像領域に略直線を検出するため
のフィルタ処理を施し、 その値が正を示すか負を示すかに応じて、前記フィルタ
処理結果を対応するデータテーブルに蓄積し、 前記データテーブルを使用してハフ変換を行い、所定の
傾きをもつ二本の線分を検出し、 検出された二本の線分に挟まれる画素を前記傷画像を構
成する画素とし、 前記傷画像を構成する画素ごとに必要なメディアンフィ
ルタの半径を求め、 得られた半径のメディアンフィルタにより対応する画素
にフィルタ処理を施すことを特徴とする画像処理方法。
5. An image processing method for correcting a flaw image included in an image, wherein a filter processing for detecting a substantially straight line is performed on an image area including the flaw image, and the value indicates positive or negative. , The filter processing result is stored in a corresponding data table, Hough transform is performed using the data table, and two line segments having a predetermined inclination are detected. The pixels sandwiched between the line segments are pixels constituting the flaw image, the radius of the median filter required for each pixel constituting the flaw image is obtained, and the median filter of the obtained radius filters the corresponding pixels. Image processing method.
【請求項6】 前記傷画像を構成する画素の値を1、そ
れ以外の画素の値を0とした画像データに、その半径を
順次増加させながらメディアンフィルタ処理を施すこと
により、前記傷画像を修正するのに必要な画素ごとのメ
ディアンフィルタの半径を求めることを特徴とする請求
項5に記載された画像処理方法。
6. A median filter process is performed on image data in which the value of the pixels constituting the flaw image is 1 and the values of the other pixels are 0 while sequentially increasing the radius of the image data. 6. The image processing method according to claim 5, wherein a radius of a median filter for each pixel required for correction is obtained.
【請求項7】 前記傷画像が含まれる領域はマニュアル
指定されることを特徴とする請求項5または請求項6に記
載された画像処理方法。
7. The image processing method according to claim 5, wherein an area including the flaw image is manually designated.
【請求項8】 前記フィルタ処理に使用されるフィルタ
の係数値の符号は、検出対象の傷画像の明度の高低によ
り変更されることを特徴とする請求項5から請求項7の何
れかに記載された画像処理方法。
8. The filter according to claim 5, wherein a sign of a coefficient value of a filter used in the filtering process is changed according to a level of brightness of a flaw image to be detected. Image processing method.
【請求項9】 前記検出された二本の線分の幅は、原画
像の画素数に比例して増加されることを特徴とする請求
項5から請求項8の何れかに記載された画像処理方法。
9. The image according to claim 5, wherein the width of the two detected line segments is increased in proportion to the number of pixels of the original image. Processing method.
【請求項10】 画像に含まれる傷画像を検出する画像
処理装置であって、 前記傷画像が含まれる画像領域に略直線を検出するため
のフィルタ処理を施す処理手段と、 その値が正を示すか負を示すかに応じて、前記フィルタ
処理結果を対応するデータテーブルに蓄積する蓄積手段
と、 前記データテーブルを使用してハフ変換を行い、所定の
傾きをもつ二本の線分を検出し、検出された二本の線分
に挟まれる画素を前記傷画像を構成する画素として検出
する検出手段とを有することを特徴とする画像処理装
置。
10. An image processing apparatus for detecting a flaw image included in an image, a processing means for performing filter processing for detecting a substantially straight line in an image area including the flaw image, Accumulating means for accumulating the filter processing result in a corresponding data table in accordance with whether the line processing is negative or positive, and performing a Hough transform using the data table to detect two line segments having a predetermined inclination An image processing apparatus comprising: a detection unit configured to detect a pixel sandwiched between the two detected line segments as a pixel constituting the flaw image.
【請求項11】 画像に含まれる傷画像を修正する画像
処理装置であって、 前記傷画像が含まれる画像領域に略直線を検出するため
のフィルタ処理を施す処理手段と、 その値が正を示すか負を示すかに応じて、前記フィルタ
処理結果を対応するデータテーブルに蓄積する蓄積手段
と、 前記データテーブルを使用してハフ変換を行い、所定の
傾きをもつ二本の線分を検出し、検出された二本の線分
に挟まれる画素を前記傷画像を構成する画素として検出
する検出手段と、 前記傷画像を構成する画素ごとに必要なメディアンフィ
ルタの半径を求め、得られた半径のメディアンフィルタ
により対応する画素にフィルタ処理を施す修正手段とを
有することを特徴とする画像処理装置。
11. An image processing device for correcting a flaw image included in an image, a processing means for performing a filter process for detecting a substantially straight line in an image area including the flaw image, Accumulating means for accumulating the filter processing result in a corresponding data table in accordance with whether the line processing is negative or positive, and performing a Hough transform using the data table to detect two line segments having a predetermined inclination Then, detection means for detecting a pixel sandwiched between the two detected line segments as pixels constituting the flaw image, and a radius of a median filter required for each pixel constituting the flaw image are obtained and obtained. Correction means for performing filter processing on a corresponding pixel with a median filter having a radius.
【請求項12】 画像に含まれる傷画像を検出する画像
処理のプログラムコードが記録された記録媒体であっ
て、前記プログラムコードは少なくとも、 前記傷画像が含まれる画像領域に略直線を検出するため
のフィルタ処理を施すステップのコードと、 その値が正を示すか負を示すかに応じて、前記フィルタ
処理結果を対応するデータテーブルに蓄積するステップ
のコードと、 前記データテーブルを使用してハフ変換を行い、所定の
傾きをもつ二本の線分を検出するステップのコードと、 検出された二本の線分に挟まれる画素を前記傷画像を構
成する画素として検出するステップのコードとを有する
ことを特徴とする記録媒体。
12. A recording medium on which is recorded a program code for image processing for detecting a flaw image included in an image, wherein the program code is used to detect a substantially straight line at least in an image area including the flaw image. And a code for storing the filtering result in a corresponding data table in accordance with whether the value indicates positive or negative, and A code of a step of performing conversion and detecting two line segments having a predetermined inclination, and a code of a step of detecting a pixel sandwiched between the detected two line segments as a pixel constituting the flaw image. A recording medium comprising:
【請求項13】 画像に含まれる傷画像を修正する画像
処理のプログラムコードが記録された記録媒体であっ
て、前記プログラムコードは少なくとも、 前記傷画像が含まれる画像領域に略直線を検出するため
のフィルタ処理を施すステップのコードと、 その値が正を示すか負を示すかに応じて、前記フィルタ
処理結果を対応するデータテーブルに蓄積するステップ
のコードと、 前記データテーブルを使用してハフ変換を行い、所定の
傾きをもつ二本の線分を検出するステップのコードと、 検出された二本の線分に挟まれる画素を前記傷画像を構
成する画素として検出するステップのコードと、 前記傷画像を構成する画素ごとに必要なメディアンフィ
ルタの半径を求めるステップのコードと、 得られた半径のメディアンフィルタにより対応する画素
にフィルタ処理を施すステップのコードとを有すること
を特徴とする記録媒体。
13. A recording medium on which a program code for image processing for correcting a flaw image included in an image is recorded, wherein the program code is used to detect a substantially straight line at least in an image area including the flaw image. And a code for storing the filtering result in a corresponding data table in accordance with whether the value indicates positive or negative, and A code of a step of performing conversion and detecting two line segments having a predetermined inclination, and a code of a step of detecting a pixel sandwiched between the detected two line segments as a pixel constituting the flaw image, The code of the step of obtaining the radius of the median filter required for each pixel constituting the flaw image and the median filter of the obtained radius correspond. And a code for performing a filtering process on the pixels.
JP10245952A 1998-08-31 1998-08-31 Picture image processing device and its method Withdrawn JP2000074846A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10245952A JP2000074846A (en) 1998-08-31 1998-08-31 Picture image processing device and its method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10245952A JP2000074846A (en) 1998-08-31 1998-08-31 Picture image processing device and its method

Publications (1)

Publication Number Publication Date
JP2000074846A true JP2000074846A (en) 2000-03-14

Family

ID=17141303

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10245952A Withdrawn JP2000074846A (en) 1998-08-31 1998-08-31 Picture image processing device and its method

Country Status (1)

Country Link
JP (1) JP2000074846A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7001265B2 (en) 2018-03-05 2022-01-19 国立大学法人 鹿児島大学 Video restoration system, video restoration method and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7001265B2 (en) 2018-03-05 2022-01-19 国立大学法人 鹿児島大学 Video restoration system, video restoration method and program

Similar Documents

Publication Publication Date Title
US9477898B2 (en) Straightening out distorted perspective on images
US5497236A (en) Method and apparatus for distortion correction of scanned images
US8023743B2 (en) Image processing apparatus and image processing method
US8270044B2 (en) Scanning apparatus having image correction function
EP1517536B1 (en) Image processing apparatus, image processing method and program
US20070053586A1 (en) Image processing apparatus and image processing method
US8120810B2 (en) Method and system for adjusting scanned images
US20200288030A1 (en) Image inspection apparatus, image inspection method, and image inspection program
JP2003344021A (en) Method for calculating dimension of human face in image and method for detecting face
US9667833B2 (en) History generating apparatus and history generating method
US8760735B2 (en) Image combining device and image combining method
JP4200419B2 (en) PHOTO EXTRACTION METHOD, DEVICE, PROGRAM, AND RECORDING MEDIUM
JPH096914A (en) Method and processor for image processing
JP4239091B2 (en) Image processing apparatus, method, and program
JPH1127574A (en) Camera-blur parameter detection method and information recording medium
JP3554130B2 (en) Image processing method
US10834281B2 (en) Document size detecting by matching between image of entire document and read size image
US20110110604A1 (en) Cropping scanned pages to remove artifacts
US20050152616A1 (en) Method and apparatus for automatic scanner defect detection
JP2000074846A (en) Picture image processing device and its method
JP4168957B2 (en) Image processing program and apparatus
JP4956282B2 (en) Image processing device
JP2004054898A (en) Printing data generating device, printing data generating method and program
JP2000127549A (en) Apparatus, method for controlling printing and recording medium
JP4400481B2 (en) Image processing device

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20051101