JPH10150570A - Method, device for specifying defective pixel in digital image and recording medium - Google Patents

Method, device for specifying defective pixel in digital image and recording medium

Info

Publication number
JPH10150570A
JPH10150570A JP9202928A JP20292897A JPH10150570A JP H10150570 A JPH10150570 A JP H10150570A JP 9202928 A JP9202928 A JP 9202928A JP 20292897 A JP20292897 A JP 20292897A JP H10150570 A JPH10150570 A JP H10150570A
Authority
JP
Japan
Prior art keywords
pixel
defective pixel
defective
pixels
area
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.)
Pending
Application number
JP9202928A
Other languages
Japanese (ja)
Inventor
Shigeo Murakami
繁男 村上
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.)
Dainippon Screen Manufacturing Co Ltd
Original Assignee
Dainippon Screen Manufacturing 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 Dainippon Screen Manufacturing Co Ltd filed Critical Dainippon Screen Manufacturing Co Ltd
Priority to JP9202928A priority Critical patent/JPH10150570A/en
Publication of JPH10150570A publication Critical patent/JPH10150570A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To specify a defective pixel while minimizing the labor of operator by determining a threshold value, based on the average value of pixel values inside a rectangular frame further limiting an evaluation area, and defining only the group of pixels in the limited rectangular frame as an object. SOLUTION: The operator displays the desired image from an image storage part 1 onto a monitor 5 and instructs pixels near the defective pixel through a mouse or the like. While referring to the size of area in an area-setting part 17, an evaluation area-setting part 19 sets an area near the group of these instructed pixels as the evaluation area and transfers it to a memory 21 for processing. A defective pixel candidate setting part 23 sets pixels having darkest pixel value in that area as defective pixel candidates. An average line value calculating part 25 calculates average values on the upper, lower, left and right sides of defective pixel candidates. An area-limiting part 27 further limits the evaluation area from the average values. A defective pixel discriminating part 31 compares the defective pixel candidates with the threshold value calculated by a threshold value calculating part 29 and discriminates dark defective pixels. At a defective pixel correction processing part 33, the defective pixels are corrected and replaced with data in the memory 21 for processing.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、リバーサルフィル
ムやプリントなどの原画をスキャナーなどの読み取り手
段によってデジタル画像に変換した際に、ゴミや埃など
に起因して正常に変換されなかった画素(以下、欠陥画
素と称する)を特定するためのデジタル画像の欠陥画素
特定方法及びその装置及び記録媒体に係り、特に少ない
労力でデジタル画像中の欠陥画素を特定するための技術
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a pixel (hereinafter referred to as a pixel) which is not normally converted due to dust or dust when an original image such as a reversal film or print is converted into a digital image by a reading means such as a scanner. The present invention relates to a method and an apparatus for specifying a defective pixel of a digital image for specifying a defective pixel, and a recording medium, and more particularly to a technique for specifying a defective pixel in a digital image with little effort.

【0002】[0002]

【従来の技術】リバーサルフィルムやカラープリントな
どの原画をスキャナーなどの画像読み取り手段によって
デジタル画像に変換した際に、原画あるいは読み取り手
段にゴミや埃などが付着していた場合には、その部分の
原画あるいはその位置に対応する原画が正常にデジタル
画像に変換されずに不要な欠陥画素となる。つまり、上
記のような状態で変換されたデジタル画像は、不要な欠
陥画素と、原画が正常に変換された正常画素とを含むも
のとなる。このように不要な欠陥画素を含むデジタル画
像は、そのままでは品質が悪いものであるので、通常は
品質向上のために欠陥画素の除去が行われる。
2. Description of the Related Art When an original image such as a reversal film or a color print is converted into a digital image by an image reading means such as a scanner, if dust or dust adheres to the original image or the reading means, the portion of the original image or the reading means is removed. The original image or the original image corresponding to the position is not normally converted into a digital image and becomes an unnecessary defective pixel. That is, the digital image converted in the above state includes unnecessary defective pixels and normal pixels in which the original image has been normally converted. Since a digital image including unnecessary defective pixels as described above has poor quality as it is, defective pixels are usually removed to improve the quality.

【0003】このような欠陥画素の除去作業は、人手の
介在なしに完全に自動的に欠陥画素が除去されることが
理想的であるが、現在ではそのような技術水準にまで達
していないのが現実である。したがって、オペレータの
労力が少なくて済み、かつ、欠陥画素を除去した後のデ
ジタル画像が視覚的に違和感のないものであることの2
点が技術的な課題として問われている。
[0003] Ideally, such a defective pixel removing operation should completely remove the defective pixel automatically without human intervention, but at present, such a technical level has not been reached. Is reality. Therefore, the operator's labor is small, and the digital image after removing the defective pixels is visually uncomfortable.
This is a technical issue.

【0004】欠陥画素の除去作業は、欠陥画素の特定
や、特定された欠陥画素の補正などを含む複数個の工程
からなるものであるが、これらの中でオペレータに負担
がかかるのは、デジタル画像に存在する欠陥画素を特定
する工程である。この欠陥画素の特定方法としては種々
のものが実用化されているが、オペレータに対する負担
が大きな順に記載すると以下のようになる。なお、以下
の作業は、例えば、ディスプレイに表示されているデジ
タル画像を見ながらオペレータがマウスにより行うもの
である。
The operation of removing a defective pixel includes a plurality of steps including identification of a defective pixel, correction of the identified defective pixel, and the like. This is a step of specifying a defective pixel existing in the image. Various methods have been put into practical use as a method for specifying the defective pixel. The following operation is performed by an operator using a mouse, for example, while watching a digital image displayed on a display.

【0005】(1)欠陥画素を1つずつ指示する。 (2)欠陥画素を囲うように、その外周を自由曲線によ
って指示する。 (3)欠陥画素を内部に含むように2点を指示し、矩形
や円形の領域によって指示する。また、実用化されては
いないが、オペレータの負担を小さくする方法として、 (4)欠陥画素あるいはその付近を1箇所だけ指示する
というものが提案されている。
(1) Specify defective pixels one by one. (2) The outer periphery is designated by a free curve so as to surround the defective pixel. (3) Two points are specified so as to include a defective pixel inside, and a rectangular or circular area is specified. Although not put to practical use, there has been proposed a method of reducing the burden on the operator by (4) designating only one defective pixel or its vicinity.

【0006】[0006]

【発明が解決しようとする課題】上記の各方法のうち、
1度の指示で済む(4)の方法が最もオペレータの負担
が小さいことは明白であるが、この提案されている方法
の実現には以下のような問題点がある。
SUMMARY OF THE INVENTION In each of the above methods,
It is clear that the method (4), which requires only one instruction, has the least burden on the operator, but the realization of the proposed method has the following problems.

【0007】すなわち、図10に示すように指示された
1箇所の欠陥画素DP1を中心とした一定領域を評価領
域ERとして設定し、この評価領域ER内の画素を一律
に欠陥画素として特定すると、その領域内にある〔指示
していない〕欠陥画素DP2を欠陥画素として自動的に
特定することができるが、評価領域ER内にある正常画
素NPをも欠陥画素として特定することになる。したが
って、特定された欠陥画素(正常画素NPと欠陥画素D
P1,DP2とを含む)の画素値を、評価領域ERの周
囲に位置する正常画素の画素値を用いて補間などにより
補正すると、補正する必要のない正常画素NPまでもが
補正されるので、原画の質感(テキスチャとも呼ばれ
る)がデジタル画像から失われ易い。そこで、上記のよ
うに評価領域ER内に存在する画素を全て一律に欠陥画
素として特定するのではなく、ある閾値に基づいて評価
領域ER内の欠陥画素を特定することが考えられる。し
かしながら、単純に閾値を設定して、この閾値に基づい
て欠陥画素を判別すると、図10に示すように評価領域
ER内に影や黒い壁などの画素値が暗い正常画素NP’
が存在する場合には、これらの正常画素NP’までもが
欠陥画素として特定されることになる。したがって、同
様に原画の質感が失われ易い。このような問題点がある
ために、上記のように提案されている(4)の方法を実
用化することが困難となっている。
That is, as shown in FIG. 10, a fixed area centered on a designated one defective pixel DP1 is set as an evaluation area ER, and the pixels in this evaluation area ER are uniformly specified as defective pixels. The defective pixel DP2 [not indicated] in that area can be automatically specified as a defective pixel, but the normal pixel NP in the evaluation area ER is also specified as a defective pixel. Therefore, the specified defective pixels (the normal pixel NP and the defective pixel D)
P1 and DP2) are corrected by interpolation or the like using the pixel values of the normal pixels located around the evaluation area ER, so that even the normal pixels NP that do not need to be corrected are corrected. The texture (also called texture) of the original image is easily lost from the digital image. Therefore, it is conceivable to specify a defective pixel in the evaluation area ER based on a certain threshold instead of uniformly specifying all the pixels existing in the evaluation area ER as defective pixels as described above. However, when a threshold value is simply set and a defective pixel is determined based on the threshold value, a normal pixel NP ′ having a dark pixel value such as a shadow or a black wall in the evaluation area ER as shown in FIG.
Exists, even the normal pixels NP ′ are specified as defective pixels. Therefore, the texture of the original image is also likely to be lost. Because of these problems, it is difficult to put the proposed method (4) into practical use.

【0008】本発明は、このような事情に鑑みてなされ
たものであって、評価領域をさらに限定した矩形枠の画
素値に基づき閾値を決定することにより、オペレータの
労力を最小限にしながらも欠陥画素を特定することがで
きるデジタル画像の欠陥画素特定方法及びその装置及び
記録媒体を提供することを目的とする。
The present invention has been made in view of such circumstances, and determines the threshold value based on the pixel value of a rectangular frame further limiting the evaluation area, thereby minimizing the operator's labor. It is an object of the present invention to provide a method, a device, and a recording medium for specifying a defective pixel of a digital image capable of specifying a defective pixel.

【0009】[0009]

【課題を解決するための手段】本発明は、このような目
的を達成するために、次のような構成をとる。すなわ
ち、請求項1に記載のデジタル画像の欠陥画素特定方法
は、原画を読み取り手段によりデジタル画像に変換した
際に、正常に前記原画から変換された正常画素と、ゴミ
や埃などに起因して生じている欠陥画素とを含む画素群
からなるデジタル画像のうち前記欠陥画素を特定する方
法において、(a)デジタル画像内の欠陥画素付近を指
示する過程と、(b)前記指示された画素を中心にして
予め設定された大きさの領域に含まれている画素群を評
価領域として設定する過程と、(c)前記評価領域の中
心付近にある画素のうち、最も暗い画素値のものを欠陥
画素候補として設定する過程と、(d)前記評価領域内
にある画素群のうち、前記欠陥画素候補の周囲にある画
素群を対象にして、前記欠陥画素候補の上側にある画素
の左右方向に沿う各画素により構成されている上ライン
と、前記欠陥画素候補の下側にある画素の左右方向に沿
う各画素により構成されている下ラインと、前記欠陥画
素候補の左側にある画素の上下方向に沿う各画素により
構成されている左ラインと、前記欠陥画素候補の右側に
ある画素の上下方向に沿う各画素により構成されている
右ラインとからなる各ラインごとに画素値の平均値をラ
イン平均値として算出する過程と、(e)前記上下左右
の各ライン平均値のうち上下左右の各ラインごとに最も
明るいものを1つずつ選択して前記評価領域をさらに限
定する過程と、(f)選択された上下左右の各1つずつ
のラインにより形成されている矩形枠の画素値の平均値
に基づいて、欠陥画素と判断するための画素値の閾値を
算出する過程と、(g)前記矩形枠内にある全画素の画
素値と前記閾値とを比較して、前記閾値よりも暗いもの
を欠陥画素として判別する過程と、を含むことを特徴と
するものである。
The present invention has the following configuration in order to achieve the above object. That is, the method for identifying defective pixels in a digital image according to claim 1 is characterized in that when an original image is converted into a digital image by a reading means, normal pixels normally converted from the original image and dust and dust are generated. A method for identifying a defective pixel in a digital image including a pixel group including a defective pixel that has occurred, comprising: (a) designating a vicinity of a defective pixel in the digital image; Setting a pixel group included in an area of a predetermined size with the center as an evaluation area; and (c) determining a pixel having the darkest pixel value among pixels near the center of the evaluation area as a defect. Setting a pixel candidate as a pixel candidate; and (d) in a horizontal direction of a pixel above the defective pixel candidate with respect to a pixel group around the defective pixel candidate among the pixel groups in the evaluation area. The upper line formed by each pixel along, the lower line formed by each pixel along the horizontal direction of the pixel below the defective pixel candidate, and the vertical direction of the pixel on the left side of the defective pixel candidate The average value of the pixel values is calculated for each line consisting of a left line composed of pixels along the line and a right line composed of pixels along the vertical direction of the pixel on the right side of the defective pixel candidate. (E) calculating the average value of each of the upper, lower, left, and right lines and selecting the brightest one for each of the upper, lower, left, and right lines to further limit the evaluation area; (G) calculating a threshold value of a pixel value for determining a defective pixel based on an average value of pixel values of a rectangular frame formed by each of the selected upper, lower, left, and right lines; Said Compared pixel values of all pixels in the form frame and with said threshold value and is characterized in that it comprises the steps of determining a defective pixel darker than the threshold value.

【0010】また、請求項2に記載のデジタル画像の欠
陥画素特定方法は、請求項1に記載のデジタル画像の欠
陥画素特定方法において、前記過程(a)の前に、前記
領域の大きさを設定する過程を含むことを特徴とするも
のである。
According to a second aspect of the present invention, in the method for identifying defective pixels of a digital image according to the first aspect, the size of the area is determined before the step (a). It is characterized by including a setting process.

【0011】また、請求項3に記載のデジタル画像の欠
陥画素特定装置は、原画を読み取り手段によりデジタル
画像に変換した際に、正常に前記原画から変換された正
常画素と、ゴミや埃などに起因して生じている欠陥画素
とを含む画素群からなるデジタル画像のうち前記欠陥画
素を特定する装置において、前記デジタル画像を記憶す
る記憶手段と、前記デジタル画像を表示する表示手段
と、前記表示手段に表示されたデジタル画像の欠陥画素
付近を指示する指示手段と、前記指示された画素を中心
にして、予め設定された大きさの領域に含まれている画
素群を評価領域として設定する評価領域設定手段と、前
記評価領域の中心付近にある画素のうち、最も暗い画素
値のものを欠陥画素候補として設定する欠陥画素候補設
定手段と、前記評価領域内にある画素群のうち、前記欠
陥画素候補の周囲にある画素群を対象にして、前記欠陥
画素候補の上側にある画素の左右方向に沿う各画素によ
り構成されている上ラインと、前記欠陥画素候補の下側
にある画素の左右方向に沿う各画素により構成されてい
る下ラインと、前記欠陥画素候補の左側にある画素の上
下方向に沿う各画素により構成されている左ラインと、
前記欠陥画素候補の右側にある画素の上下方向に沿う各
画素により構成されている右ラインとからなる各ライン
ごとに画素値の平均値をライン平均値として算出する平
均値算出手段と、前記上下左右の各ライン平均値のうち
上下左右の各ラインごとに最も明るいものを1つずつ選
択して、前記評価領域をさらに限定する領域限定手段
と、選択された上下左右の各1つずつのラインにより形
成されている矩形枠の画素値の平均値に基づいて、欠陥
画素と判断するための画素値の閾値を算出する閾値算出
手段と、前記矩形枠内にある全画素の画素値と前記閾値
とを比較して、前記閾値よりも暗いものを欠陥画素とし
て判別する欠陥画素判別手段と、を備えていることを特
徴とするものである。
According to a third aspect of the present invention, there is provided an apparatus for identifying defective pixels in a digital image, wherein when an original image is converted into a digital image by a reading means, normal pixels normally converted from the original image and dust and dirt are removed. In a device for identifying the defective pixel in a digital image including a pixel group including a defective pixel caused by the cause, a storage unit for storing the digital image, a display unit for displaying the digital image, and the display Means for instructing the vicinity of a defective pixel of the digital image displayed on the means, and an evaluation for setting a group of pixels included in a region of a predetermined size around the designated pixel as an evaluation region Area setting means; defective pixel candidate setting means for setting a pixel having the darkest pixel value among defective pixels near the center of the evaluation area as a defective pixel candidate; Among the pixel groups in the area, the upper line constituted by the pixels along the left and right direction of the pixel above the defective pixel candidate with respect to the pixel group around the defective pixel candidate, A lower line composed of pixels along the left and right direction of the pixel below the pixel candidate, and a left line composed of pixels along the vertical direction of the pixel on the left side of the defective pixel candidate,
An average value calculating unit that calculates an average value of pixel values as a line average value for each line including a right line formed by pixels along a vertical direction of a pixel on the right side of the defective pixel candidate; An area limiter for further selecting the brightest one for each of the upper, lower, left and right lines from the average values of the left and right lines, to further limit the evaluation area; and a line for each of the selected upper, lower, left, and right lines Threshold calculating means for calculating a threshold of a pixel value for determining a defective pixel based on an average value of pixel values of a rectangular frame formed by: And a defective pixel determining unit that determines a pixel darker than the threshold value as a defective pixel.

【0012】また、請求項4に記載のデジタル画像の欠
陥画素特定装置は、請求項3に記載のデジタル画像の欠
陥画素特定装置において、前記各手段に加えて、前記領
域の大きさを設定する領域設定手段を備えていることを
特徴とするものである。
According to a fourth aspect of the present invention, there is provided the digital image defective pixel specifying device, wherein the size of the area is set in addition to the means. It is characterized by having an area setting means.

【0013】また、請求項5に記載の記録媒体は、原画
を読み取り手段によりデジタル画像に変換した際に、正
常に前記原画から変換された正常画素と、ゴミや埃など
に起因して生じている欠陥画素とを含む画素群からなる
デジタル画像のうち前記欠陥画素を特定するためのプロ
グラムであって、(a)デジタル画像内の欠陥画素付近
を指示する処理と、(b)前記指示された画素を中心に
して予め設定された大きさの領域に含まれている画素群
を評価領域として設定する処理と、(c)前記評価領域
の中心付近にある画素のうち、最も暗い画素値のものを
欠陥画素候補として設定する処理と、(d)前記評価領
域内にある画素群のうち、前記欠陥画素候補の周囲にあ
る画素群を対象にして、前記欠陥画素候補の上側にある
画素の左右方向に沿う各画素により構成されている上ラ
インと、前記欠陥画素候補の下側にある画素の左右方向
に沿う各画素により構成されている下ラインと、前記欠
陥画素候補の左側にある画素の上下方向に沿う各画素に
より構成されている左ラインと、前記欠陥画素候補の右
側にある画素の上下方向に沿う各画素により構成されて
いる右ラインとからなる各ラインごとに画素値の平均値
をライン平均値として算出する処理と、(e)前記上下
左右の各ライン平均値のうち上下左右の各ラインごとに
最も明るいものを1つずつ選択して前記評価領域をさら
に限定する処理と、(f)選択された上下左右の各1つ
ずつのラインにより形成されている矩形枠の画素値の平
均値に基づいて、欠陥画素と判断するための画素値の閾
値を算出する処理と、(g)前記矩形枠内にある全画素
の画素値と前記閾値とを比較して、前記閾値よりも暗い
ものを欠陥画素として判別する処理と、を行わせるよう
にコンピュータを制御するためのプログラムを格納した
ものである。
Further, in the recording medium according to the present invention, when the original image is converted into a digital image by the reading means, a normal pixel normally converted from the original image and a normal image are generated due to dust and the like. A program for specifying the defective pixel in a digital image composed of a pixel group including a defective pixel including: (a) a process for specifying a vicinity of a defective pixel in the digital image; A process of setting, as an evaluation region, a group of pixels included in a region of a predetermined size centering on the pixel; and (c) a pixel having a darkest pixel value among pixels near the center of the evaluation region. And (d) selecting a pixel group around the defective pixel candidate from among the pixel groups in the evaluation area, and setting the left and right of the pixel above the defective pixel candidate. In the direction An upper line formed by each pixel, a lower line formed by each pixel along the left and right direction of a pixel below the defective pixel candidate, and a vertical direction of a pixel on the left side of the defective pixel candidate. The average value of the pixel values is calculated for each line consisting of a left line composed of pixels along the line and a right line composed of pixels along the vertical direction of the pixel on the right side of the defective pixel candidate. (E) a process of calculating as an average value, (e) a process of selecting the brightest one for each of the upper, lower, left, and right lines from among the average values of the upper, lower, left, and right lines one by one to further limit the evaluation area; (G) calculating a threshold value of a pixel value for determining a defective pixel based on an average value of pixel values of a rectangular frame formed by each of the selected upper, lower, left, and right lines; The rectangle A process for comparing the pixel values of all the pixels in the frame with the threshold value, and determining a pixel darker than the threshold value as a defective pixel, and a program for controlling a computer to perform the process. is there.

【0014】[0014]

【作用】請求項1に記載の発明方法の作用は次のとおり
である。オペレータはデジタル画像内に存在する欠陥画
素を認識し、着目した欠陥画素あるいはその欠陥画素付
近を指示する(過程(a))。この指示された画素を中
心にして予め設定されている大きさの領域に含まれる画
素群を評価領域として設定する(過程(b))。オペレ
ータは欠陥画素に着目してデジタル画像内の画素を指示
しているので、設定された評価領域内の中心付近には必
ず欠陥画素が存在する。そこで、この評価領域の中心付
近の画素の中から最も画素値の暗いものを判別して、こ
れを欠陥画素候補として設定する(過程(c))。
The operation of the method according to the present invention is as follows. The operator recognizes a defective pixel existing in the digital image and gives an instruction on the defective pixel or the vicinity of the defective pixel (step (a)). A pixel group included in a region of a predetermined size centering on the designated pixel is set as an evaluation region (step (b)). Since the operator points to a pixel in the digital image by focusing on the defective pixel, the defective pixel always exists near the center of the set evaluation area. Therefore, the pixel having the darkest pixel value is determined from the pixels in the vicinity of the center of the evaluation area, and is set as a defective pixel candidate (step (c)).

【0015】次いで、設定した評価領域内にある画素群
を対象にして、欠陥画素候補の上側にある各画素の左右
方向に沿う各画素により構成されている上ラインをそれ
ぞれ求め、これらの各上ラインごとの画素値の平均値を
ライン平均値として算出する。つまり、欠陥画素候補の
上側に位置する評価領域内の各画素行の画素値について
平均値を算出し、これらをライン平均値とする。同様に
して、欠陥画素候補の下側に位置する下ラインごとの画
素値の平均値をライン平均値として算出する。さらに、
欠陥画素の候補の左側にある各画素値の上下方向に沿う
各画素値により構成されている左ラインをそれぞれ求
め、これらの各左ラインごとの画素値の平均値をライン
平均値として算出する。つまり、欠陥画素候補の左側に
位置する評価領域内の各画素列の画素値について平均値
を算出し、これらをライン平均値とする。同様にして、
欠陥画素候補の右側に位置する右ラインごとの画素値の
平均値をライン平均値として算出する(過程(d))。
Next, an upper line composed of pixels along the left-right direction of each pixel above the defective pixel candidate is determined for the pixel group within the set evaluation area, and each of these upper lines is determined. The average value of the pixel values for each line is calculated as the line average value. That is, an average value is calculated for the pixel values of each pixel row in the evaluation area located above the defective pixel candidate, and these are set as a line average value. Similarly, the average value of the pixel values for each lower line located below the defective pixel candidate is calculated as the line average value. further,
A left line composed of each pixel value along the vertical direction of each pixel value on the left side of the defective pixel candidate is obtained, and an average value of the pixel values of each of these left lines is calculated as a line average value. That is, an average value is calculated for the pixel values of each pixel row in the evaluation area located on the left side of the defective pixel candidate, and these are set as a line average value. Similarly,
The average value of the pixel values for each right line located on the right side of the defective pixel candidate is calculated as a line average value (step (d)).

【0016】次いで、上下左右の各方向の各ライン平均
値の中から、各方向ごとに最も明るいものを求めて評価
領域をさらに限定する(過程(e))。換言すると、評
価領域内において欠陥画素候補の上下に位置する各画素
行と、欠陥画素候補の左右に位置する各画素列の中から
最も明るいものを選択して予め設定されている大きさの
評価領域をさらに絞り込む。このように評価領域を画素
値に基づいてさらに限定することにより、欠陥画素候補
からは離れているが評価領域内に存在する正常画素を後
の処理対象から除外することができる。
Next, the brightest one is obtained for each direction from among the average values of the lines in the upper, lower, left and right directions, and the evaluation area is further limited (step (e)). In other words, in the evaluation area, the brightest pixel is selected from each pixel row located above and below the defective pixel candidate and each pixel column located left and right of the defective pixel candidate, and the predetermined size is evaluated. Further narrow the area. By further limiting the evaluation area based on the pixel value in this way, normal pixels that are far from the defective pixel candidates but are present in the evaluation area can be excluded from the subsequent processing targets.

【0017】評価領域を限定した上下左右の各1つずつ
のラインによって構成されている矩形枠の画素値の平均
値に基づいて、欠陥画素として判別するための基準であ
る閾値を算出する(過程(f))。閾値を算出するため
に各ラインによって囲われている領域ではなく、その内
部を除いた矩形枠状の画素群を採用するのは次の理由に
よる。つまり、各ラインによって限定された領域内に
は、欠陥画素候補を含む欠陥画素と正常画素とが混在し
ているので、限定された領域内に存在する画素群の画素
値を基づき閾値を算出しても、欠陥画素と正常画素とを
正確に判別することができない。そこで、欠陥画素より
も明るい画素値を有する正常画素をだけを含んでいる矩
形枠(最も明るい画素行および画素列により構成されて
いる)の画素値の平均値に基づき閾値を算出する。
On the basis of the average value of the pixel values of the rectangular frame formed by each of the upper, lower, left and right lines defining the evaluation area, a threshold value as a reference for determining a defective pixel is calculated (process). (F)). The reason for adopting a rectangular frame-shaped pixel group excluding the area surrounded by each line for calculating the threshold value, instead of the area surrounded by each line, is as follows. In other words, since the defective pixel including the defective pixel candidate and the normal pixel are mixed in the area defined by each line, the threshold value is calculated based on the pixel value of the pixel group existing in the limited area. However, a defective pixel and a normal pixel cannot be accurately distinguished. Therefore, a threshold value is calculated based on the average value of the pixel values of a rectangular frame (consisting of the brightest pixel row and pixel column) including only normal pixels having a pixel value brighter than the defective pixel.

【0018】上記のようにして算出された閾値と矩形枠
内の全ての画素の画素値とを比較し、閾値よりも暗い画
素値を有する画素を欠陥画素として判別する(過程
(g))。このように正常画素だけを含む矩形枠の画素
値の平均値に基づいて閾値を算出し、評価領域をさらに
限定した矩形枠内の画素群だけを対象にして欠陥画素を
特定するので、正確に欠陥画素だけを特定することがで
きる。また、オペレータは最初に欠陥画素付近を指示す
るだけでよいので、労力を最小限にすることができる。
The threshold value calculated as described above is compared with the pixel values of all the pixels in the rectangular frame, and a pixel having a pixel value darker than the threshold value is determined as a defective pixel (step (g)). As described above, the threshold value is calculated based on the average value of the pixel values of the rectangular frame including only the normal pixels, and the defective pixel is specified only for the pixel group in the rectangular frame further limiting the evaluation area, so that the pixel is accurately determined. Only defective pixels can be specified. Further, since the operator only has to first designate the vicinity of the defective pixel, the labor can be minimized.

【0019】また、請求項2に記載の発明方法によれ
ば、評価領域を決定付ける領域の大きさを設定するの
で、欠陥画素群が評価領域を超える場合や、欠陥画素群
が複数箇所に分散している場合などの欠陥画素の態様に
応じて評価領域の大きさを変えることができる。したが
って、種々の大きさの欠陥画素や種々の態様の欠陥画素
をも適切に特定することができる。
According to the second aspect of the present invention, since the size of the area that determines the evaluation area is set, the case where the defective pixel group exceeds the evaluation area or the defective pixel group is distributed to a plurality of locations is determined. The size of the evaluation area can be changed in accordance with the mode of the defective pixel, such as the case where the error occurs. Therefore, defective pixels of various sizes and defective pixels of various modes can be appropriately specified.

【0020】また、請求項3に記載の発明装置の作用は
次のとおりである。記憶手段に記憶されているデジタル
画像を表示手段に表示した状態で、オペレータは着目し
た欠陥画素あるいはその付近を指示手段により指示す
る。評価領域設定手段は、オペレータにより指示された
画素を中心に、予め設定された大きさの領域に含まれて
いる画素群を評価領域として設定する。評価領域の中心
付近は、オペレータが欠陥画素に着目して指示した場所
である関係上、その近辺には必ず欠陥画素が存在する。
そこで、欠陥画素候補設定手段が中心付近から最も暗い
画素値のものを欠陥画素候補として設定する。
The operation of the device according to the third aspect of the present invention is as follows. In a state where the digital image stored in the storage means is displayed on the display means, the operator indicates the defective pixel or the vicinity thereof by the instruction means. The evaluation area setting means sets, as an evaluation area, a group of pixels included in an area of a preset size, centering on a pixel designated by the operator. Since the vicinity of the center of the evaluation area is a place where the operator pays attention to and designates the defective pixel, the defective pixel always exists near the center.
Therefore, the defective pixel candidate setting means sets a pixel having the darkest pixel value from the vicinity of the center as a defective pixel candidate.

【0021】平均値算出手段は、設定した評価領域内に
ある画素群を対象にして、欠陥画素候補の上側にある各
画素の左右方向に沿う各画素により構成されている上ラ
インをそれぞれ求め、これらの各上ラインごとの画素値
の平均値をライン平均値として算出する。つまり、欠陥
画素候補の上側に位置する評価領域内の各画素行の画素
値について平均値を算出し、これらをライン平均値とす
る。同様にして、欠陥画素候補の下側に位置する下ライ
ンごとの画素値の平均値をライン平均値として算出す
る。さらに、欠陥画素の候補の左側にある各画素値の上
下方向に沿う各画素値により構成されている左ラインを
それぞれ求め、これらの各左ラインごとの画素値の平均
値をライン平均値として算出する。つまり、欠陥画素候
補の左側に位置する評価領域内の各画素列の画素値につ
いて平均値を算出し、これらをライン平均値とする。同
様にして、欠陥画素候補の右側に位置する右ラインごと
の画素値の平均値をライン平均値として算出する。
The average value calculating means obtains an upper line composed of pixels along the left-right direction of each pixel located above the defective pixel candidate with respect to the pixel group within the set evaluation area. The average value of the pixel values for each of these upper lines is calculated as a line average value. That is, an average value is calculated for the pixel values of each pixel row in the evaluation area located above the defective pixel candidate, and these are set as a line average value. Similarly, the average value of the pixel values for each lower line located below the defective pixel candidate is calculated as the line average value. Further, a left line constituted by each pixel value along the vertical direction of each pixel value on the left side of the defective pixel candidate is obtained, and an average value of the pixel values of each of these left lines is calculated as a line average value. I do. That is, an average value is calculated for the pixel values of each pixel row in the evaluation area located on the left side of the defective pixel candidate, and these are set as a line average value. Similarly, the average value of the pixel values for each right line located on the right side of the defective pixel candidate is calculated as the line average value.

【0022】領域限定手段は、平均値算出手段によって
算出された上下左右の各方向の各ライン平均値の中か
ら、各方向ごとに最も明るいものを求めて評価領域をさ
らに限定する。これにより予め設定されている大きさの
評価領域をさらに絞り込む。このように評価領域を画素
値に基づいてさらに限定することにより、欠陥画素候補
からは離れているが評価領域内に存在する正常画素を後
の処理対象から除外することができる。
The area limiter further limits the evaluation area by finding the brightest one for each direction from among the line averages in the up, down, left, and right directions calculated by the average value calculator. This further narrows down the evaluation area of a preset size. By further limiting the evaluation area based on the pixel value in this way, normal pixels that are far from the defective pixel candidates but are present in the evaluation area can be excluded from the subsequent processing targets.

【0023】閾値算出手段は、矩形枠の画素値の平均値
に基づいて、欠陥画素として判別するための基準である
閾値を算出する。この算出された閾値により欠陥画素判
別手段が矩形枠内の全ての画素の画素値を比較し、閾値
よりも暗い画素値を有する画素を欠陥画素として判別す
る。このように正常画素だけを含む矩形枠の画素値の平
均値に基づいて閾値を算出し、評価領域をさらに限定し
た矩形枠内の画素群だけを対象にして欠陥画素を特定す
るので、正確に欠陥画素だけを特定することができる。
また、オペレータは最初に指示手段により欠陥画素付近
を指示するだけでよいので、労力を最小限にすることが
できる。
The threshold value calculating means calculates a threshold value, which is a reference for determining a defective pixel, based on the average value of the pixel values of the rectangular frame. The defective pixel determining means compares the pixel values of all the pixels in the rectangular frame with the calculated threshold value, and determines a pixel having a pixel value darker than the threshold value as a defective pixel. As described above, the threshold value is calculated based on the average value of the pixel values of the rectangular frame including only the normal pixels, and the defective pixel is specified only for the pixel group in the rectangular frame further limiting the evaluation area, so that the pixel is accurately determined. Only defective pixels can be specified.
Further, since the operator only has to first instruct the vicinity of the defective pixel by the instructing means, the labor can be minimized.

【0024】また、請求項4に記載の発明装置によれ
ば、評価領域を決定付ける領域の大きさを領域設定手段
により設定するので、欠陥画素群が評価領域を超える場
合や、欠陥画素群が複数箇所に分散している場合などの
欠陥画素の態様に応じて評価領域の大きさを変えること
ができる。したがって、種々の大きさの欠陥画素や種々
の態様の欠陥画素をも適切に特定することができる。
According to the fourth aspect of the present invention, the size of the area for determining the evaluation area is set by the area setting means. The size of the evaluation area can be changed according to the mode of the defective pixel, such as when the evaluation area is dispersed at a plurality of locations. Therefore, defective pixels of various sizes and defective pixels of various modes can be appropriately specified.

【0025】また、請求項5に記載の記録媒体に格納さ
れているプログラムをコンピュータに実行させることに
より、オペレータが認識したデジタル画像内に存在する
欠陥画素あるいはその欠陥画素付近を指示する処理を行
わせる。そして、この指示された画素を中心にして予め
設定されている大きさの領域に含まれる画素群を評価領
域として設定させる。オペレータは欠陥画素に着目して
デジタル画像内の画素を指示しているので、設定された
評価領域内の中心付近には必ず欠陥画素が存在する。そ
こで、この評価領域の中心付近の画素の中から最も画素
値の暗いものを判別して、これを欠陥画素候補として設
定させる。
Further, by causing a computer to execute the program stored in the recording medium according to the present invention, a process for designating a defective pixel existing in the digital image recognized by the operator or the vicinity of the defective pixel is performed. Let Then, a pixel group included in a region of a predetermined size centering on the designated pixel is set as an evaluation region. Since the operator points to a pixel in the digital image by focusing on the defective pixel, the defective pixel always exists near the center of the set evaluation area. Therefore, the pixel having the darkest pixel value is determined from the pixels near the center of the evaluation area, and this is set as a defective pixel candidate.

【0026】次いで、設定した評価領域内にある画素群
を対象にして、欠陥画素候補の上側にある各画素の左右
方向に沿う各画素により構成されている上ラインをそれ
ぞれ求め、これらの各上ラインごとの画素値の平均値を
ライン平均値として算出させる。同様に、欠陥画素候補
の下側に位置する下ラインごとの画素値の平均値をライ
ン平均値として算出させる。さらに、欠陥画素の候補の
左側にある各画素値の上下方向に沿う各画素値により構
成されている左ラインをそれぞれ求め、これらの各左ラ
インごとの画素値の平均値をライン平均値として算出さ
せる。同様にして、欠陥画素候補の右側に位置する右ラ
インごとの画素値の平均値をライン平均値として算出さ
せる。
Next, an upper line composed of pixels along the left-right direction of the pixels above the defective pixel candidate is determined for the pixel group in the set evaluation area, and each of these upper lines is determined. The average value of the pixel values for each line is calculated as a line average value. Similarly, an average value of pixel values for each lower line located below the defective pixel candidate is calculated as a line average value. Further, a left line constituted by each pixel value along the vertical direction of each pixel value on the left side of the defective pixel candidate is obtained, and an average value of the pixel values of each of these left lines is calculated as a line average value. Let it. Similarly, an average value of pixel values for each right line located on the right side of the defective pixel candidate is calculated as a line average value.

【0027】次いで、上下左右の各方向の各ライン平均
値の中から、各方向ごとに最も明るいものを求めて評価
領域をさらに限定させる。このように評価領域を画素値
に基づいてさらに限定させることにより、欠陥画素候補
からは離れているが評価領域内に存在する正常画素を後
の処理対象から除外させることができる。評価領域を限
定した上下左右の各1つずつのラインによって構成され
ている矩形枠の画素値の平均値に基づいて、欠陥画素と
して判別するための基準である閾値を算出させる。
Next, from the average values of the lines in the upper, lower, left, and right directions, the brightest one in each direction is obtained to further limit the evaluation area. By further limiting the evaluation area based on the pixel value in this way, normal pixels that are far from the defective pixel candidate but exist in the evaluation area can be excluded from the subsequent processing targets. On the basis of the average value of the pixel values of the rectangular frame formed by each of the upper, lower, left, and right lines defining the evaluation area, a threshold that is a reference for determining a defective pixel is calculated.

【0028】上記のようにして算出させた閾値と矩形枠
内の全ての画素の画素値とを比較させ、閾値よりも暗い
画素値を有する画素を欠陥画素として判別させる。この
ように正常画素だけを含む矩形枠の画素値の平均値に基
づいて閾値を算出させ、評価領域をさらに限定した矩形
枠内の画素群だけを対象にして欠陥画素を特定させるの
で、正確に欠陥画素だけを特定させることができる。ま
た、オペレータはコンピュータに対して欠陥画素付近を
指示するだけでよいので、労力を最小限にすることがで
きる。
The threshold value calculated as described above is compared with the pixel values of all the pixels in the rectangular frame, and a pixel having a pixel value darker than the threshold value is determined as a defective pixel. As described above, the threshold value is calculated based on the average value of the pixel values of the rectangular frame including only the normal pixels, and the defective pixel is specified only for the pixel group within the rectangular frame further limiting the evaluation area. Only defective pixels can be specified. Further, since the operator only needs to instruct the computer near the defective pixel, labor can be minimized.

【0029】[0029]

【発明の実施の形態】以下、図面を参照して本発明の一
実施例を説明する。図1は、本発明に係るデジタル画像
の欠陥画素特定方法を含む画像処理を行う画像処理装置
の概略構成を示すブロック図である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram illustrating a schematic configuration of an image processing apparatus that performs image processing including a method for identifying defective pixels in a digital image according to the present invention.

【0030】図中、符号1は、複数個のデジタル画像を
記憶している画像記憶部であり、記憶容量が大きなハー
ドディスク装置や光磁気ディスク装置などにより構成さ
れている。この画像記憶部1は、本発明における記憶手
段に相当する。デジタル画像は、カラーリバーサルフィ
ルムやカラープリントなどの原画を、図示しないスキャ
ナー(読み取り手段)によってデジタルデータに変換し
て得られるものであり、読み取り時に原画やスキャナー
の読取部にゴミや埃などが付着していた場合にはその部
分が正常に変換されずに欠陥画素となる。ここでは画像
記憶部1に記憶されているデジタル画像が、上記欠陥画
素と、埃などの影響を受けることなく正常に原画から変
換された正常画素とを含むものとして説明する。なお、
一般的に原画がカラーである場合には、デジタル画像が
R・G・Bの三色のそれぞれの情報を含むものである
が、以下においては理解を容易にするために白黒で階調
表現されたデジタル画像を例に採って説明する。なお、
例えば、8ビットで量子化を行って階調表現した場合、
各画素の画素値は0〜255の値をもつことになるが、
以下の説明においては『0』に近い画素値を暗いと表現
し、『255』に近い画素値を明るいものとして表現す
る。
In FIG. 1, reference numeral 1 denotes an image storage unit for storing a plurality of digital images, which is constituted by a hard disk device or a magneto-optical disk device having a large storage capacity. This image storage unit 1 corresponds to a storage unit in the present invention. A digital image is obtained by converting an original image such as a color reversal film or a color print into digital data using a scanner (reading means) (not shown). At the time of reading, dust and dirt adhere to the original image and the reading unit of the scanner. If so, that part is not converted normally and becomes a defective pixel. Here, a description will be given assuming that the digital image stored in the image storage unit 1 includes the defective pixel and a normal pixel normally converted from the original image without being affected by dust or the like. In addition,
In general, when the original image is in color, the digital image includes information of each of the three colors of R, G, and B. In the following, for ease of understanding, a digital image expressed in grayscale in black and white will be described. This will be described using an image as an example. In addition,
For example, when gradation is expressed by performing quantization with 8 bits,
Although the pixel value of each pixel will have a value of 0 to 255,
In the following description, a pixel value near “0” is expressed as dark, and a pixel value near “255” is expressed as bright.

【0031】画像記憶部1に記憶されている複数個のデ
ジタル画像のうち、所望のものをオペレータが選択する
と、その画像が制御部3を介して表示手段に相当するモ
ニタ5に表示される。所望のデジタル画像を選択するに
は、指示手段であるキーボード7あるいはマウス9を利
用して行う。上記の制御部3は、CPUやRAM,RO
Mなどにより構成されている。この画像処理装置は、制
御部3に後述する処理を行わせるためのプログラムを記
憶装置11に予め記憶している形態のものや、フロッピ
ーディスク、光磁気ディスク、ICカードなどの記録媒
体Mに格納されているそのプログラムを、駆動装置15
から読み込む形態のものがある。この例では、記録媒体
Mから駆動装置15を介して制御部3がプログラムを読
み込み、それに基づいて制御部3が後に詳述する処理を
実行するようになっている。プログラムの読み込み動作
は装置を起動する際に1度だけ実行すればよい。なお、
以下の説明においては、理解の容易のために上記プログ
ラムによる各処理を機能的にブロック図にも示してい
る。
When an operator selects a desired one of a plurality of digital images stored in the image storage unit 1, the image is displayed on a monitor 5 corresponding to a display unit via the control unit 3. The selection of a desired digital image is performed using the keyboard 7 or the mouse 9 as the instruction means. The control unit 3 includes a CPU, a RAM, and a RO.
M and the like. This image processing apparatus stores a program for causing the control unit 3 to perform processing described later in the storage device 11 or stores the program in a recording medium M such as a floppy disk, a magneto-optical disk, or an IC card. The program that has been
There is a form of reading from. In this example, the control unit 3 reads a program from the recording medium M via the driving device 15, and the control unit 3 executes processing described later in detail based on the program. The operation of reading the program need only be executed once when the apparatus is started. In addition,
In the following description, each process according to the above program is also shown in a functional block diagram for easy understanding.

【0032】領域記憶部17は、予め設定されている領
域の大きさを記憶しているものである。この領域の大き
さは、オペレータの判断によりキーボード7から直接的
に数値(例えば、ドット数など)を入力したり、マウス
9により間接的に数値を選択入力して変えることが可能
である。なお、以下の説明では、この大きさとして15
×15ドットが予め設定されているものとする。評価領
域設定部19は、領域記憶部17に記憶されている領域
の大きさを参照し、オペレータが指示した点を中心にし
てその領域に含まれている画素群を評価領域として設定
するとともに、評価領域内に含まれている画素群を処理
用メモリ21に転送する。なお、上記の領域記憶部17
は本発明の領域設定手段に相当し、上記の評価領域設定
部19は本発明の評価領域設定手段に相当するものであ
る。
The area storage section 17 stores a preset area size. The size of this area can be changed by directly inputting a numerical value (for example, the number of dots) from the keyboard 7 or indirectly selecting and inputting a numerical value using the mouse 9 according to the judgment of the operator. In the following description, this size is 15
It is assumed that × 15 dots are set in advance. The evaluation area setting unit 19 refers to the size of the area stored in the area storage unit 17, sets a pixel group included in the area around the point designated by the operator as an evaluation area, The pixel group included in the evaluation area is transferred to the processing memory 21. The area storage unit 17
Corresponds to the area setting means of the present invention, and the above-described evaluation area setting section 19 corresponds to the evaluation area setting means of the present invention.

【0033】欠陥画素候補設定部23は、処理用メモリ
21に転送された評価領域内の画素群を対象にして、そ
の中心付近にある画素群の中から最も暗い画素値を有す
るものを『欠陥画素候補』として設定する。ライン平均
値算出部25は、処理用メモリ21内の画素群のうち、
欠陥画素候補の上側にある画素の左右方向に沿う各画素
により構成されている上ライン、つまり、各画素行の画
素値の平均値を各上ラインごとに算出する。同様にし
て、欠陥画素候補の下側にある下ラインについても、そ
の画素値の平均値を各下ラインごとに算出する。また、
欠陥画素候補の左側にある画素の上下方向に沿う各画素
により構成されている左ライン、つまり、各画素列の画
素値の平均値を各左ラインごとに算出し、同様にして欠
陥画素候補の右側にある右ラインについても、その画素
値の平均値を各右ラインごとに算出する。なお、上記の
欠陥画素候補設定部23およびライン平均値算出部25
は、それぞれ本発明における欠陥画素候補設定手段およ
び平均値算出手段に相当するものである。
The defective pixel candidate setting unit 23 targets the pixel group in the evaluation area transferred to the processing memory 21 and selects the pixel group having the darkest pixel value from the pixel group near the center of the pixel group. Pixel candidate ". The line average value calculation unit 25 outputs
An upper line composed of pixels along the left-right direction of pixels above the defective pixel candidate, that is, an average value of pixel values of each pixel row is calculated for each upper line. Similarly, for the lower line below the defective pixel candidate, the average value of the pixel values is calculated for each lower line. Also,
The left line composed of pixels along the vertical direction of the pixel on the left side of the defective pixel candidate, that is, the average value of the pixel values of each pixel column is calculated for each left line, and similarly, the defective pixel candidate is calculated. As for the right line on the right side, the average value of the pixel values is calculated for each right line. The defective pixel candidate setting unit 23 and the line average value calculation unit 25
Respectively correspond to a defective pixel candidate setting unit and an average value calculating unit in the present invention.

【0034】領域限定手段に相当する領域限定部27
は、ライン平均値算出部25が算出した各ラインの画素
値の平均値から、各方向ごとに最も明るいラインを1つ
ずつ選択して評価領域をさらに絞り込んで限定するもの
である。閾値算出部29は、領域限定部27が選択した
上下左右の各ラインにより形成される矩形枠の画素値の
平均値を算出するとともに、その分散を算出する。さら
に、詳細については後述するが、それらに基づいて欠陥
画素と判断するための閾値を算出する。このようにして
算出された閾値は、欠陥画素判別部31により参照さ
れ、処理用メモリ21に記憶されている画素群のうち矩
形枠によって限定された領域内の各画素の画素値と比較
される。比較の結果、閾値よりも暗い画素値を有する画
素が欠陥画素として判別されることになる。なお、上記
閾値算出部29が本発明における閾値算出手段に相当
し、上記欠陥画素判別部31が本発明における欠陥画素
判別手段に相当する。
An area limiting section 27 corresponding to area limiting means
Is to select the brightest line for each direction one by one from the average value of the pixel values of each line calculated by the line average value calculation unit 25, and further narrow down the evaluation area to limit. The threshold calculator 29 calculates the average value of the pixel values of the rectangular frame formed by the upper, lower, left, and right lines selected by the region limiting unit 27, and calculates the variance thereof. Further, although details will be described later, a threshold value for determining a defective pixel is calculated based on the details. The threshold value calculated in this way is referred to by the defective pixel determination unit 31, and is compared with the pixel value of each pixel in the area defined by the rectangular frame in the pixel group stored in the processing memory 21. . As a result of the comparison, a pixel having a pixel value darker than the threshold value is determined as a defective pixel. The threshold calculator 29 corresponds to a threshold calculator in the present invention, and the defective pixel determiner 31 corresponds to a defective pixel determiner in the present invention.

【0035】上述したようにして欠陥画素と判別されて
欠陥画素特定処理が完了した後は、それらの画素の画素
値とともに座標値や位置データが欠陥画素補正処理部3
3に転送され、欠陥画素の周囲に位置する正常画素の画
素値に基づいて補間などの処理により処理用メモリ21
内の画素値が補正される。補正後は、例えば、処理用メ
モリ21の画素群が画像記憶部1内の、対応するデジタ
ル画像のデータと置換されるようになっている。
After the defective pixel identification processing is completed by determining the defective pixel as described above, the coordinate value and the position data together with the pixel values of those pixels are stored in the defective pixel correction processing unit 3.
3 and is processed by interpolation or the like based on the pixel value of a normal pixel located around the defective pixel.
Are corrected. After the correction, for example, the pixel group of the processing memory 21 is replaced with the corresponding digital image data in the image storage unit 1.

【0036】次に、図2のフローチャートおよび図3な
いし図8のデジタル画像の模式図を参照して装置の動作
について詳細に説明する。
Next, the operation of the apparatus will be described in detail with reference to the flowchart of FIG. 2 and the schematic diagrams of digital images of FIGS.

【0037】ステップS1(デジタル画像の表示) オペレータは、キーボード7あるいはマウス9により画
像記憶部1に記憶されている多数のデジタル画像の中か
ら所望のデジタル画像を選択する。選択されたデジタル
画像は、制御部3を介してモニタ5に出力されて表示さ
れる。この例では、説明の簡易化のために一例として、
図3に示すような19ドット×19ドットで表されたデ
ジタル画像Fがモニタ5に表示されたものとして説明す
る。なお、図3中、上下方向に沿って付した符号L1〜
L19は、左右方向に沿って存在する画素群により構成
される画素行を示すものであり、左右方向に沿って付し
た符号C1〜C19は、上下方向に沿って存在する画素
群により構成される画素列を示すものである。また、デ
ジタル画像Fの中には、左側に比較的暗い画素値を有す
る正常画素の集まりである正常画素群NP’が存在し、
中央部付近には暗い画素値を有する欠陥画素の集まりで
ある欠陥画素群DPが存在している。それら以外の画素
は、明るい画素値を有する画素の集まりである正常画素
群NPである。以下の説明では、その過程で画素が欠陥
画素か正常画素であるかが不明である場合は、単に画素
Pと称するとともに、その位置を明瞭にする必要がある
場合には、上記の画素行を表すL1〜L19および画素
列を表すC1〜C19を用いて括弧書きで表す。つま
り、図3中の正常画素群NPの左上隅に位置する画素
を、P(L19,C1)のように表すことにする。
Step S1 (Display of Digital Image) The operator selects a desired digital image from a large number of digital images stored in the image storage unit 1 by using the keyboard 7 or the mouse 9. The selected digital image is output to the monitor 5 via the control unit 3 and displayed. In this example, for simplicity of explanation,
A description will be given assuming that a digital image F represented by 19 dots × 19 dots as shown in FIG. In addition, in FIG. 3, the code | symbol L1 attached along the up-down direction
L19 indicates a pixel row constituted by a pixel group existing along the left-right direction, and reference numerals C1 to C19 attached along the left-right direction are constituted by pixel groups existing along the vertical direction. 3 shows a pixel column. Also, in the digital image F, there is a normal pixel group NP ′ which is a group of normal pixels having relatively dark pixel values on the left side,
Near the center, there is a defective pixel group DP, which is a group of defective pixels having dark pixel values. The other pixels are a normal pixel group NP which is a group of pixels having bright pixel values. In the following description, when it is not clear whether a pixel is a defective pixel or a normal pixel in the process, it is simply referred to as a pixel P, and when it is necessary to clarify the position, the above pixel row is referred to as a pixel P. L1 to L19, and C1 to C19, each representing a pixel row, are shown in parentheses. That is, the pixel located at the upper left corner of the normal pixel group NP in FIG. 3 is represented as P (L19, C1).

【0038】ステップS2(欠陥画素を指示) オペレータは、モニタ5に表示されているデジタル画像
Fを見つつ周囲の画素の画素値との関係などに基づき欠
陥画素群DPを認識し、画素P(L9,C11),画素
P(L10,C9),画素P(L10,C10),画素
P(L10,C11),画素P(L10,C12),画
素P(L11,C10),画素P(L11,C11),
画素P(L11,C12)のうちのいずれかの画素をマ
ウス9により指示する。ここでは、画像の中央に存在す
る画素P(L10,C10)が指示されたものとし、適
宜この画素をPIと称する。なお、後述する説明から容
易に判るように、必ずしも欠陥画素を指示する必要はな
く、欠陥画素近くの正常画素を指示してもよい。また、
このステップS2は、本発明における過程(a)および
処理(a)に相当するものである。
Step S2 (instruction of defective pixel) The operator recognizes the defective pixel group DP based on the relationship with the pixel values of the surrounding pixels while watching the digital image F displayed on the monitor 5, and the pixel P ( L9, C11), pixel P (L10, C9), pixel P (L10, C10), pixel P (L10, C11), pixel P (L10, C12), pixel P (L11, C10), pixel P (L11, C11),
One of the pixels P (L11, C12) is designated by the mouse 9. Here, it is assumed that the pixel P (L10, C10) existing at the center of the image is designated, and this pixel is appropriately referred to as PI. As will be easily understood from the following description, it is not always necessary to designate a defective pixel, and a normal pixel near the defective pixel may be designated. Also,
This step S2 corresponds to the process (a) and the process (a) in the present invention.

【0039】ステップS3(評価領域を表示) 評価領域設定部19は、領域記憶部17に記憶されてい
る領域の大きさ(15×15ドット)を参照してこの情
報を制御部3に出力する。図4に示すように制御部3
は、指示された画素PIを中心にしてその大きさの枠を
評価領域ERとしてモニタ5のデジタル画像F上に重ね
合わせ表示する。さらに、評価領域設定部19は、デジ
タル画像Fの画素群のうちその領域内に含まれている画
素群(画素P(L3,C3)と画素P(L17,C1
7)とを対角の頂点とする矩形内の画素群)を評価領域
ERとして設定し、評価領域ER内に含まれている画素
群を処理用メモリ21に転送する。この場合、転送され
るのは、比較的暗い画素値を有する正常画素群NP’の
右側部分と、欠陥画素群DPと、正常画素群NPの一部
である。なお、このステップS3は、本発明の過程
(b)および処理(b)に相当する。
Step S3 (Display Evaluation Area) The evaluation area setting section 19 refers to the area size (15 × 15 dots) stored in the area storage section 17 and outputs this information to the control section 3. . As shown in FIG.
Displays a frame having the size of the designated pixel PI as a center on the digital image F of the monitor 5 as an evaluation area ER. Further, the evaluation area setting unit 19 outputs a pixel group (pixel P (L3, C3) and pixel P (L17, C1) included in the digital image F in the pixel group.
7) is set as an evaluation area ER, and the pixels included in the evaluation area ER are transferred to the processing memory 21. In this case, the right part of the normal pixel group NP ′ having a relatively dark pixel value, the defective pixel group DP, and a part of the normal pixel group NP are transferred. Step S3 corresponds to the process (b) and the process (b) of the present invention.

【0040】ステップS4(欠陥画素候補を設定) 欠陥画素候補設定部23は、図5に示すように処理用メ
モリ21内の画素群、つまり評価領域ER内にある画素
群のうち、中心付近から最も暗い画素値を有する画素を
欠陥画素候補PAとして設定する。中心付近とは、例え
ば、指示された画素PIを中心とした2ドット×2ドッ
トの矩形範囲である。なお、この例の場合、中心付近に
存在する複数個の〔欠陥〕画素の画素値はほぼ同一であ
るとし、このような場合にはいずれの画素を欠陥画素候
補としてもよいが、ここではオペレータが指示した画素
PIを優先して欠陥画素候補PAとして設定する。通
常、オペレータは、欠陥画素を認識してそれを指示する
ので、このように設定しても何ら不都合は生じ得ない。
なお、このステップS4が本発明の過程(c)および処
理(c)に相当する。
Step S4 (Defective Pixel Candidate Setting) As shown in FIG. 5, the defective pixel candidate setting section 23 sets the pixel group in the processing memory 21, that is, the pixel group in the evaluation area ER from the vicinity of the center. The pixel having the darkest pixel value is set as a defective pixel candidate PA. The vicinity of the center is, for example, a rectangular area of 2 dots × 2 dots around the designated pixel PI. In this example, it is assumed that the pixel values of a plurality of [defective] pixels near the center are substantially the same, and in such a case, any of the pixels may be a defective pixel candidate. Is set as the defective pixel candidate PA with priority given to the pixel PI designated by the user. Normally, the operator recognizes a defective pixel and gives an instruction for it, so that no inconvenience can occur even with this setting.
This step S4 corresponds to the process (c) and the process (c) of the present invention.

【0041】ステップS5(ライン平均値を算出) ライン平均値算出部25は、評価領域ER内に存在する
画素群を対象にして、欠陥画素候補PAの上側にある画
素の左右方向に沿う各画素により構成されている上ライ
ン、つまり、図5に示すように欠陥画素候補PAから評
価領域ERの上辺の間に位置する7つの上ラインUL1
〜UL7のそれぞれの画素値の平均をライン平均値とし
て算出する。この場合、上ラインUL1は、その中間付
近に3つの暗い画素値の欠陥画素が存在し、その左端に
比較的暗い画素値を有する正常画素群NP’の正常画素
が存在しているので最も平均値が小さい。また、上ライ
ンUL7は、その左端に比較的暗い画素値を有する正常
画素群NP’の正常画素が2つあるので上ラインUL1
に次いで平均値が小さい。また、上ラインUL2〜UL
6は、それぞれ左端に比較的暗い画素値を有する正常画
素群NP’の正常画素が1つ存在しているだけであるの
で最も平均値が大きい。次いで、図6に示すように、欠
陥画素候補PAの下側にある画素の左右方向に沿う各画
素により構成されている下ラインDL1〜DL7のそれ
ぞれの画素値の平均値をライン平均値として算出する。
この場合、下ラインDL1が最も平均値が小さく、下ラ
インDL2〜DL7が下ラインDL1よりも大きな平均
値になる。同様にして、欠陥画素候補PAの左右に位置
する画素の上下方向に沿う各画素により構成されている
左ラインLL1〜LL7,右ラインRL1〜RL7のそ
れぞれの画素値の平均値をライン平均値として算出す
る。この場合、左ラインLL7が最も小さな平均値とな
り、左ラインLL1がそれに次いで小さな平均値とな
り、左ラインLL6が左ラインLL1に次いで小さくな
り、左ラインLL2〜LL5が最も大きな平均値とな
る。また、各右ラインについては、右ラインRL1、右
ラインRL2、右ラインRL3〜RL7の順に平均値が
大きくなる。
Step S5 (Calculate Line Average Value) The line average value calculation unit 25 targets each pixel along the left and right direction of the pixel above the defective pixel candidate PA for the pixel group existing in the evaluation area ER. , Ie, seven upper lines UL1 located between the defective pixel candidate PA and the upper side of the evaluation area ER as shown in FIG.
The average of the pixel values of UL7 to UL7 is calculated as a line average value. In this case, since the upper line UL1 has three dark pixel value defective pixels near the middle thereof and the normal pixel of the normal pixel group NP ′ having a relatively dark pixel value at the left end, the average is the highest. Value is small. Also, the upper line UL7 has two normal pixels in the normal pixel group NP 'having a relatively dark pixel value at the left end thereof, so that the upper line UL1
The average value is the second smallest. Also, the upper lines UL2 to UL
No. 6 has the largest average value because there is only one normal pixel of the normal pixel group NP 'having a relatively dark pixel value at the left end. Next, as shown in FIG. 6, the average value of the pixel values of the lower lines DL1 to DL7 formed by the pixels along the left-right direction of the pixels below the defective pixel candidate PA is calculated as the line average value. I do.
In this case, the lower line DL1 has the smallest average value, and the lower lines DL2 to DL7 have larger average values than the lower line DL1. Similarly, the average value of the pixel values of the left line LL1 to LL7 and the right line RL1 to RL7 formed by the pixels along the vertical direction of the pixels located on the left and right of the defective pixel candidate PA is defined as the line average value. calculate. In this case, the left line LL7 has the smallest average value, the left line LL1 has the next smallest average value, the left line LL6 has the smallest average value after the left line LL1, and the left lines LL2 to LL5 have the largest average value. Further, for each right line, the average value increases in the order of the right line RL1, the right line RL2, and the right lines RL3 to RL7.

【0042】なお、上記のステップS5は、本発明にお
ける過程(d)および処理(d)に相当する。
Step S5 corresponds to the process (d) and the process (d) in the present invention.

【0043】ステップS6(評価領域を限定) 領域限定部27は、ライン平均値算出部25の上下左右
の各方向ごとの各ライン平均値を参照し、各方向ごとに
最も明るいライン平均値を有するラインを選択する。最
も明るいとは、上述した明暗と画素値との関係からライ
ン平均値が最も大きなものである。つまり、この例で
は、5つの上ラインUL2〜UL6と、6つの下ライン
DL2〜DL7と、4つの左ラインLL2〜LL5と、
5つの右ラインRL3〜RL7とが各方向の中でライン
平均値が最も大きくなっている。このような場合には、
後述する理由により各方向ごとに欠陥画素候補PAから
最も離れているラインを選択する。つまり、上方向から
は上ラインUL6を選択し、下方向からは下ラインDL
7を、左方向からは左ラインLL5と、右方向からは右
ラインRL7を選択する。この処理によって最初に設定
された評価領域ERから欠陥画素候補PAに向ってさら
に領域が絞り込まれることになる(図7を参照)。この
ように評価領域ERを限定することによって、評価領域
ERの左側に存在している正常画素群NP’の一部を以
下の処理の対象から除外することができる。なお、この
ステップS6は、本発明における過程(e)および処理
(e)に相当する。
Step S6 (Limiting Evaluation Area) The area limiting section 27 refers to the line average values in the up, down, left, and right directions of the line average value calculating section 25, and has the brightest line average value in each direction. Select a line. The brightest is the one with the largest line average value from the relationship between the brightness and the pixel value described above. That is, in this example, five upper lines UL2 to UL6, six lower lines DL2 to DL7, four left lines LL2 to LL5,
The line average value of the five right lines RL3 to RL7 is the largest in each direction. In such a case,
The line farthest from the defective pixel candidate PA is selected for each direction for the reason described later. That is, the upper line UL6 is selected from above, and the lower line DL is selected from below.
7, the left line LL5 is selected from the left direction, and the right line RL7 is selected from the right direction. By this processing, the area is further narrowed from the initially set evaluation area ER to the defective pixel candidate PA (see FIG. 7). By limiting the evaluation area ER in this way, a part of the normal pixel group NP ′ existing on the left side of the evaluation area ER can be excluded from the following processing. Step S6 corresponds to the process (e) and the process (e) in the present invention.

【0044】ステップS7(閾値を算出) 閾値算出部29は、図7に示すように上ラインUL6
と、下ラインDL7と、左ラインLL5と、右ラインR
L7とから構成されている矩形枠Rの各画素から閾値を
算出する。この閾値は、矩形枠Rの画素値の平均値をM
とし、矩形枠Rの画素値の分散をSとし、定数をCとし
た場合、閾値T=M−S×Cによって決定される。この
ように矩形枠Rの画素値の平均値Mから分散Sを差し引
くのは、矩形枠R内に存在している正常画素のバラツキ
を考慮することによって正常画素を欠陥画素として認識
することを防止するためである。また、分散Sに定数C
を乗じるのは経験的なものであり、この定数Cとしては
2〜3の値が好ましい。なお、このステップS7が本発
明の過程(f)および処理(f)に相当する。上記のよ
うに閾値Tを算出するために各ラインUL6,DL7,
LL5,RL7によって囲われている領域ではなく、そ
の内部を除いた矩形枠Rの画素群を採用するのは次のよ
うな理由による。つまり、上記各ラインによって限定さ
れた領域内には、欠陥画素候補PAを含む欠陥画素DP
と正常画素NPとが混在しているので、矩形枠R内に存
在する画素群の画素値を基づき閾値Tを算出しても、欠
陥画素DPと正常画素NPとを正確に判別することがで
きない。そこで、欠陥画素DPよりも明るい画素値を有
する正常画素NPをだけを含んでいる矩形枠R(最も明
るい画素行および画素列により構成されている)の画素
値の平均値Mに基づき閾値Tを算出するのである。
Step S7 (Calculate Threshold) As shown in FIG.
, Lower line DL7, left line LL5, and right line R
A threshold value is calculated from each pixel of the rectangular frame R composed of L7. This threshold value is obtained by calculating the average value of the pixel values of the rectangular frame R by M
When the variance of the pixel values of the rectangular frame R is S and the constant is C, the threshold T is determined by T = MS × C. The reason why the variance S is subtracted from the average value M of the pixel values of the rectangular frame R in this way is to prevent the recognition of a normal pixel as a defective pixel by considering the variation of the normal pixel existing in the rectangular frame R. To do that. The variance S is a constant C
Is empirical, and the constant C is preferably a value of 2 to 3. Step S7 corresponds to the process (f) and the process (f) of the present invention. To calculate the threshold T as described above, each line UL6, DL7,
The reason for adopting the pixel group of the rectangular frame R excluding the region surrounded by LL5 and RL7 instead of the region is as follows. In other words, the defective pixel DP including the defective pixel candidate PA is located within the area defined by the lines.
And the normal pixel NP are mixed, so that even if the threshold value T is calculated based on the pixel value of the pixel group existing in the rectangular frame R, the defective pixel DP and the normal pixel NP cannot be accurately determined. . Therefore, the threshold value T is set based on the average value M of the pixel values of the rectangular frame R (consisting of the brightest pixel rows and pixel columns) including only the normal pixels NP having the pixel values brighter than the defective pixel DP. It is calculated.

【0045】ステップS8(欠陥画素を判別) 欠陥画素判別部31は、閾値Tと矩形枠R内に存在する
全ての画素の画素値とを比較し、閾値Tよりも暗い(小
さい)画素値を有する画素を全て欠陥画素として判別す
る。つまり、図7中において、矩形枠Rの内部である画
素P(L4,C6)と画素P(L15,C16)との対
角を頂点とする矩形を形成している全ての画素の画素値
と閾値Tとを比較する。このステップS8は、本発明に
おける過程(g)および処理(g)に相当する。
Step S8 (Determine Defective Pixel) The defective pixel determination unit 31 compares the threshold value T with the pixel values of all the pixels present in the rectangular frame R, and determines a pixel value darker (smaller) than the threshold value T. All the pixels having the pixel are determined as defective pixels. That is, in FIG. 7, the pixel values of all the pixels forming the rectangle having the vertexes at the diagonal of the pixels P (L4, C6) and the pixels P (L15, C16) inside the rectangular frame R are Compare with threshold value T. Step S8 corresponds to the process (g) and the process (g) in the present invention.

【0046】このように正常画素だけを含む矩形枠Rの
画素値の平均値Mに基づいて閾値Tを決定し、評価領域
ERをさらに限定した矩形枠R内の画素群だけを対象に
して欠陥画素を特定するので、評価領域ER内に暗い画
素値を有する正常画素NP’が含まれている場合であっ
てもオペレータが指示した画素PIから離れていれば欠
陥画素として誤認識することなく正確に欠陥画素だけを
特定することができる。また、オペレータは最初に1箇
所だけ欠陥画素付近を指示するだけでよく、労力を最小
限にすることができる。これによりオペレータの労力を
最小限にしつつも欠陥画素を特定することができる。
As described above, the threshold value T is determined on the basis of the average value M of the pixel values of the rectangular frame R including only normal pixels, and the defect T is determined only for the pixel group within the rectangular frame R in which the evaluation area ER is further limited. Since the pixel is specified, even if the evaluation area ER includes a normal pixel NP ′ having a dark pixel value, if the pixel is apart from the pixel PI specified by the operator, the pixel is correctly identified without being erroneously recognized as a defective pixel. Only the defective pixel can be specified. In addition, the operator only needs to first specify the vicinity of the defective pixel in one place, so that the labor can be minimized. Thus, a defective pixel can be specified while minimizing the operator's labor.

【0047】ステップS9(欠陥画素を補正) 欠陥画素補正処理部33は、欠陥画素判別部31によっ
て特定された欠陥画素のそれぞれに補正を施す。例え
ば、欠陥画素DP(L10,C9)の画素値を、正常画
素NP(L11,C9)と正常画素NP(L9,C9)
との直線補間によって算出し、この画素値と置換する。
同様にして全ての欠陥画素DPについても補正を行って
処理用メモリ21内のデータを書き換える。そして、こ
の処理用メモリ21内のデータに基づいて、画像記憶部
1に記憶されている元のデジタル画像を補正する。上述
したように欠陥画素を正確に特定しているので、この補
正によってデジタル画像の質感を低下させることなく品
質良く補正することができる。
Step S9 (Correct defective pixels) The defective pixel correction processing section 33 corrects each of the defective pixels specified by the defective pixel determining section 31. For example, the pixel value of the defective pixel DP (L10, C9) is changed to the normal pixel NP (L11, C9) and the normal pixel NP (L9, C9).
, And is replaced with this pixel value.
Similarly, the correction is performed for all the defective pixels DP, and the data in the processing memory 21 is rewritten. Then, the original digital image stored in the image storage unit 1 is corrected based on the data in the processing memory 21. Since the defective pixel is accurately specified as described above, the correction can be performed with high quality without deteriorating the texture of the digital image.

【0048】ここで、上述したステップS6の補足説明
を行う。上述したようにステップS6では、図5から図
7に至る評価領域ERの限定処理を行うが、このとき最
も明るいラインが各方向において複数個存在した場合に
どのラインを選択するかが問題となる。つまり、評価領
域ERをより限定するためには、欠陥画素候補PAに最
も近いラインを選択したほうがより領域が限定できるの
で好ましいように思われる。ここで図8に示すように、
欠陥画素が欠陥画素群DP1と欠陥画素群DP2のよう
に評価領域ER内で分散して存在した場合を想定してみ
る。このような場合に、最も明るいラインの中から欠陥
画素候補PAに最も近いラインを各方向ごとに1つずつ
選択すると、各方向ごとに上ラインUL2と、下ライン
DL2と、左ラインLL2と、右ラインRL3とが選択
されることになる。しかしながら、図8から明らかなよ
うに、限定した領域から欠陥画素群DP2が漏れている
ことが判る。このような不都合が生じることを防止する
ために、欠陥画素候補PAから最も遠いラインを選択よ
うにしているのである。
Here, a supplementary explanation of step S6 will be given. As described above, in step S6, the process of limiting the evaluation area ER from FIG. 5 to FIG. 7 is performed. At this time, when there are a plurality of brightest lines in each direction, which line is selected becomes a problem. . That is, in order to further limit the evaluation area ER, it seems preferable to select the line closest to the defective pixel candidate PA because the area can be further limited. Here, as shown in FIG.
It is assumed that defective pixels are dispersed in the evaluation area ER like the defective pixel groups DP1 and DP2. In such a case, when the line closest to the defective pixel candidate PA is selected from the brightest lines one by one in each direction, the upper line UL2, the lower line DL2, the left line LL2, The right line RL3 will be selected. However, as is clear from FIG. 8, it can be seen that the defective pixel group DP2 is leaking from the limited area. In order to prevent such an inconvenience from occurring, a line farthest from the defective pixel candidate PA is selected.

【0049】なお、領域記憶部17には評価領域ERの
大きさを決定付ける領域の大きさが予め記憶されている
が、これを変えた方が好ましい例について図9を参照し
て説明する。デジタル画像F中には、その中央部付近に
欠陥画素群DP1が存在し、この右方向の離れた位置に
欠陥画素群DP2が存在している。このような場合に、
上述した画素PIと同じものをオペレータが指示した場
合には、評価領域ERから欠陥画素群DP2が外れるこ
とになる。このような場合には上述した処理をもう一
度、すなわち、欠陥画素群DP2付近を指示することに
よっても処理可能であるが、キーボード7あるいはマウ
ス9により領域記憶部17の値を変更するほうが、1度
の指示で2つの欠陥画素群DP1,DP2を特定できて
効率がよい。この例では、予め領域記憶部17に記憶さ
れている領域の大きさ15×15ドットを、16×16
ドット以上の値に変えればよい。また、極めて大きな欠
陥画素群が存在、例えば、領域の大きさを超えるような
場合にも、領域の大きさを変えることが好ましい。その
逆に、小さな欠陥画素群が存在し、それを指示すると周
囲の正常画素群が多く評価範囲内に含まれるような場合
には、上記領域の大きさを小さく設定すればよい。な
お、通常オペレータは、欠陥画素の大きさによって評価
領域ER内に欠陥画素が納まるかどうかほぼ判るもので
あるので、上述したステップS2(欠陥画素の指示)の
前、つまりステップS1(デジタル画像の表示)におい
てデジタル画像をモニタ5に表示して欠陥画素の大きさ
を認識した時点で、欠陥画素の形態に応じて領域の大き
さを変えるようにすることが好ましい。これにより種々
の形態の欠陥画素をも特定でき、的確に補正を施すこと
ができる。また、領域の大きさを変えるのは、ステップ
S1の時点に限定されるものではなく、ステップS2に
おいて欠陥画素を指示する時点において変えるようにし
てもよい。さらに、ステップS3(評価領域を表示)の
時点でデジタル画像に評価領域が重ね合わせ表示された
時点において、評価領域と欠陥画素との位置関係を確認
した後に変えるようにしてもよい。
Although the size of the area for determining the size of the evaluation area ER is stored in the area storage section 17 in advance, an example in which it is preferable to change the size will be described with reference to FIG. In the digital image F, a defective pixel group DP1 exists near the center of the digital image F, and a defective pixel group DP2 exists at a position distant in the right direction. In such a case,
If the operator instructs the same pixel PI as described above, the defective pixel group DP2 will be out of the evaluation area ER. In such a case, the above-described processing can be performed once again, that is, by instructing the vicinity of the defective pixel group DP2. However, changing the value of the area storage unit 17 using the keyboard 7 or the mouse 9 is one time. With this instruction, the two defective pixel groups DP1 and DP2 can be specified, which is efficient. In this example, the size of 15 × 15 dots of the area previously stored in the area storage unit 17 is changed to 16 × 16 dots.
What is necessary is just to change it to a value larger than a dot. Further, even when an extremely large defective pixel group exists, for example, when the size of the region exceeds the size of the region, it is preferable to change the size of the region. Conversely, if there is a small defective pixel group, and if this indicates a large number of surrounding normal pixel groups are included in the evaluation range, the size of the area may be set small. Note that the operator generally knows whether or not the defective pixel fits within the evaluation area ER according to the size of the defective pixel. Therefore, before the above-described step S2 (instruction of the defective pixel), that is, step S1 (the digital image It is preferable to change the size of the area according to the form of the defective pixel when the digital image is displayed on the monitor 5 and the size of the defective pixel is recognized. As a result, various types of defective pixels can be specified, and correction can be accurately performed. Further, changing the size of the region is not limited to the time of step S1, but may be changed at the time of specifying a defective pixel in step S2. Further, when the evaluation area is superimposed and displayed on the digital image at the time of step S3 (displaying the evaluation area), the position may be changed after confirming the positional relationship between the evaluation area and the defective pixel.

【0050】なお、上述した例では、理解を容易にする
ために白黒の階調表現されたデジタル画像を対象にして
説明したが、一般的にはカラーのデジタル画像が処理対
象となることが多い。このようにカラー画像が処理対象
である場合には、例えば、グレースケール情報=(R+
G+B)/3のように一端グレースケールに変換して上
述したように処理を実行すればよい。事実、欠陥画素は
ゴミや埃に起因して生じている関係上、彩度の高いもの
は極めて稀であるので、このようにしても何ら不都合が
生じることがない。
In the above-described example, a digital image expressed in black-and-white gradation has been described for the purpose of easy understanding. However, in general, a color digital image is often processed. . When a color image is to be processed as described above, for example, grayscale information = (R +
(G + B) / 3, and the process may be executed as described above after converting to gray scale. In fact, since defective pixels are extremely rare due to dust and dust, they do not cause any inconvenience.

【0051】なお、上記図2のフローチャートで示した
ステップS2〜S8までは、本発明に係る欠陥画素特定
方法のプログラムに相当するものであり、記録媒体Mに
格納されているものである。したがって、図1に示すブ
ロック図に示すような構成を備えていないコンピュータ
であっても、上記プログラムを格納した記録媒体Mを読
み込ませて実行させることにより、上記構成の装置と同
様の作用効果を得ることができる。
Steps S2 to S8 shown in the flowchart of FIG. 2 correspond to the program of the defective pixel specifying method according to the present invention, and are stored in the recording medium M. Therefore, even if the computer does not have the configuration as shown in the block diagram shown in FIG. 1, the same operation and effect as those of the device having the above configuration can be obtained by reading and executing the recording medium M storing the above program. Obtainable.

【0052】[0052]

【発明の効果】以上の説明から明らかなように、請求項
1に記載の発明方法によれば、正常画素だけを含む矩形
枠の画素値の平均値に基づいて閾値を決定し、評価領域
をさらに限定した矩形枠内の画素群だけを対象にして欠
陥画素を特定するので、評価領域内に暗い画素値を有す
る正常画素が含まれている場合であってもオペレータが
指示した画素から離れていれば欠陥画素として誤認識す
ることなく正確に欠陥画素だけを特定することができ
る。また、オペレータは最初に1箇所だけ欠陥画素付近
を指示するだけでよいので、労力を最小限にすることが
できる。したがって、オペレータの労力を最小限にしつ
つも欠陥画素を特定することができる方法を実用化する
ことができる。このようにデジタル画像に含まれている
欠陥画素を特定した後に補間などの手法により画素値を
補正する処理を行うことにより、質感を低下させること
なく品質を向上させることができる。
As is apparent from the above description, according to the method of the present invention, the threshold value is determined based on the average value of the pixel values of the rectangular frame including only normal pixels, and the evaluation area is determined. Further, since the defective pixel is specified only for the pixel group within the limited rectangular frame, even if the evaluation area includes a normal pixel having a dark pixel value, the defective pixel is separated from the pixel specified by the operator. Then, only the defective pixel can be specified accurately without erroneous recognition as a defective pixel. Further, since the operator only needs to first specify the vicinity of the defective pixel in one place, the labor can be minimized. Therefore, a method capable of specifying a defective pixel while minimizing the labor of the operator can be put to practical use. As described above, by performing processing of correcting a pixel value by a method such as interpolation after specifying a defective pixel included in a digital image, quality can be improved without lowering the texture.

【0053】また、請求項2に記載の発明方法によれ
ば、欠陥画素群が評価領域を超える大きさを有する場合
や欠陥画素群が複数箇所に分散している場合など、欠陥
画素の種々の態様に応じて評価領域の大きさを適切に設
定することにより、柔軟に欠陥画素の特定を行うことが
できる。
According to the second aspect of the present invention, there are various defective pixel groups such as a case where the defective pixel group has a size exceeding the evaluation area and a case where the defective pixel group is dispersed at a plurality of locations. By appropriately setting the size of the evaluation area according to the mode, the defective pixel can be specified flexibly.

【0054】また、請求項3に記載の発明装置によれ
ば、請求項1に記載の発明方法を好適に実施可能であ
る。
According to the third aspect of the present invention, the method of the first aspect can be suitably implemented.

【0055】また、請求項4に記載の発明装置によれ
ば、請求項2に記載の発明方法を好適に実施することが
できる。
Further, according to the invention apparatus described in claim 4, the invention method described in claim 2 can be suitably implemented.

【0056】また、請求項5に記載の発明によれば、記
録媒体に格納したプログラムをコンピュータに実行させ
ることにより、請求項1に記載の発明方法を実行させる
ことができる。
According to the fifth aspect of the present invention, by causing a computer to execute a program stored in a recording medium, the method according to the first aspect of the present invention can be executed.

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

【図1】実施例に係る画像処理装置の概略構成を示すブ
ロック図である。
FIG. 1 is a block diagram illustrating a schematic configuration of an image processing apparatus according to an embodiment.

【図2】画像処理装置の動作を示すフローチャートであ
る。
FIG. 2 is a flowchart illustrating an operation of the image processing apparatus.

【図3】デジタル画像を示す模式図である。FIG. 3 is a schematic diagram showing a digital image.

【図4】デジタル画像とともに評価領域を示した模式図
である。
FIG. 4 is a schematic diagram showing an evaluation area together with a digital image.

【図5】評価領域を限定する過程の説明に供する模式図
である。
FIG. 5 is a schematic diagram for explaining a process of limiting an evaluation area.

【図6】評価領域を限定する過程の説明に供する模式図
である。
FIG. 6 is a schematic diagram for explaining a process of limiting an evaluation area.

【図7】評価領域をさらに限定した状態を示す模式図で
ある。
FIG. 7 is a schematic diagram showing a state in which an evaluation area is further limited.

【図8】評価領域を限定する際に生じる恐れのある不都
合を説明する模式図である。
FIG. 8 is a schematic diagram illustrating a problem that may occur when the evaluation area is limited.

【図9】評価領域の大きさを変えたほうが好ましい例の
説明に供する模式図である。
FIG. 9 is a schematic diagram for explaining an example in which it is preferable to change the size of the evaluation area.

【図10】従来例の説明図である。FIG. 10 is an explanatory diagram of a conventional example.

【符号の説明】[Explanation of symbols]

1 … 画像記憶部(記憶手段) 3 … 制御部 5 … モニタ(表示手段) 7 … キーボード(指示手段) 9 … マウス(指示手段) 11 … 記憶装置 15 … 駆動装置 M … 記録媒体 17 … 領域記憶部(領域設定手段) 19 … 評価領域設定部(評価領域設定手段) 23 … 欠陥画素候補設定部(欠陥画素候補設定手
段) 25 … ライン平均値算出部(平均値算出手段) 27 … 領域限定部(領域限定手段) 29 … 閾値算出部(閾値算出手段) 31 … 欠陥画素判別部(欠陥画素判別手段) 33 … 欠陥画素補正処理部 F … デジタル画像 PA … 欠陥画素候補 ER … 評価領域 NP … 正常画素群 NP’ … 暗い正常画素群 DP … 欠陥画素群 R … 矩形枠
DESCRIPTION OF SYMBOLS 1 ... Image storage part (storage means) 3 ... Control part 5 ... Monitor (display means) 7 ... Keyboard (instruction means) 9 ... Mouse (instruction means) 11 ... Storage device 15 ... Driving device M ... Recording medium 17 ... Area storage Section (area setting means) 19 ... evaluation area setting section (evaluation area setting means) 23 ... defective pixel candidate setting section (defective pixel candidate setting means) 25 ... line average value calculation section (average value calculation means) 27 ... area limiting section (Area Limiting Means) 29 Threshold Value Calculation Unit (Threshold Calculation Means) 31 Defective Pixel Determination Unit (Defective Pixel Determination Means) 33 Defective Pixel Correction Processing Unit F Digital Image PA Defective Pixel Candidate ER Evaluation Area NP Normal Pixel group NP ': dark normal pixel group DP: defective pixel group R: rectangular frame

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 原画を読み取り手段によりデジタル画像
に変換した際に、正常に前記原画から変換された正常画
素と、ゴミや埃などに起因して生じている欠陥画素とを
含む画素群からなるデジタル画像のうち前記欠陥画素を
特定する方法において、 (a)デジタル画像内の欠陥画素付近を指示する過程
と、 (b)前記指示された画素を中心にして予め設定された
大きさの領域に含まれている画素群を評価領域として設
定する過程と、 (c)前記評価領域の中心付近にある画素のうち、最も
暗い画素値のものを欠陥画素候補として設定する過程
と、 (d)前記評価領域内にある画素群のうち、前記欠陥画
素候補の周囲にある画素群を対象にして、前記欠陥画素
候補の上側にある画素の左右方向に沿う各画素により構
成されている上ラインと、前記欠陥画素候補の下側にあ
る画素の左右方向に沿う各画素により構成されている下
ラインと、前記欠陥画素候補の左側にある画素の上下方
向に沿う各画素により構成されている左ラインと、前記
欠陥画素候補の右側にある画素の上下方向に沿う各画素
により構成されている右ラインとからなる各ラインごと
に画素値の平均値をライン平均値として算出する過程
と、 (e)前記上下左右の各ライン平均値のうち上下左右の
各ラインごとに最も明るいものを1つずつ選択して前記
評価領域をさらに限定する過程と、 (f)選択された上下左右の各1つずつのラインにより
形成されている矩形枠の画素値の平均値に基づいて、欠
陥画素と判断するための画素値の閾値を算出する過程
と、 (g)前記矩形枠内にある全画素の画素値と前記閾値と
を比較して、前記閾値よりも暗いものを欠陥画素として
判別する過程と、 を含むことを特徴とするデジタル画像の欠陥画素特定方
法。
1. A pixel group comprising a normal pixel normally converted from an original image and a defective pixel caused by dust or the like when the original image is converted to a digital image by a reading unit. A method for identifying the defective pixel in the digital image, comprising: (a) indicating the vicinity of the defective pixel in the digital image; and (b) setting an area of a predetermined size around the specified pixel. (C) setting a pixel group having a darkest pixel value among pixels near the center of the evaluation area as a defective pixel candidate; Of the pixel groups in the evaluation area, for the pixel group around the defective pixel candidate, an upper line composed of pixels along the left and right direction of the pixel above the defective pixel candidate, A lower line composed of pixels along the left and right direction of the pixel below the defective pixel candidate, and a left line composed of pixels along the vertical direction of the pixel on the left side of the defective pixel candidate Calculating an average value of pixel values as a line average value for each line consisting of a right line constituted by pixels along a vertical direction of a pixel on the right side of the defective pixel candidate; and (e) Selecting the brightest one for each of the upper, lower, left, and right lines from among the average values of the upper, lower, left, and right lines to further limit the evaluation area; and (f) selecting each of the selected upper, lower, left, and right lines Calculating a threshold value of a pixel value for determining a defective pixel based on an average value of pixel values of the rectangular frame formed by the lines; and (g) calculating pixel values of all pixels within the rectangular frame. Ratio with the threshold And determining a pixel darker than the threshold value as a defective pixel.
【請求項2】 請求項1に記載のデジタル画像の欠陥画
素特定方法において、前記過程(a)の前に、前記領域
の大きさを設定する過程を含むことを特徴とするデジタ
ル画像の欠陥画素特定方法。
2. The method according to claim 1, further comprising the step of setting a size of the area before the step (a). Identification method.
【請求項3】 原画を読み取り手段によりデジタル画像
に変換した際に、正常に前記原画から変換された正常画
素と、ゴミや埃などに起因して生じている欠陥画素とを
含む画素群からなるデジタル画像のうち前記欠陥画素を
特定する装置において、 前記デジタル画像を記憶する記憶手段と、 前記デジタル画像を表示する表示手段と、 前記表示手段に表示されたデジタル画像の欠陥画素付近
を指示する指示手段と、 前記指示された画素を中心にして、予め設定された大き
さの領域に含まれている画素群を評価領域として設定す
る評価領域設定手段と、 前記評価領域の中心付近にある画素のうち、最も暗い画
素値のものを欠陥画素候補として設定する欠陥画素候補
設定手段と、 前記評価領域内にある画素群のうち、前記欠陥画素候補
の周囲にある画素群を対象にして、前記欠陥画素候補の
上側にある画素の左右方向に沿う各画素により構成され
ている上ラインと、前記欠陥画素候補の下側にある画素
の左右方向に沿う各画素により構成されている下ライン
と、前記欠陥画素候補の左側にある画素の上下方向に沿
う各画素により構成されている左ラインと、前記欠陥画
素候補の右側にある画素の上下方向に沿う各画素により
構成されている右ラインとからなる各ラインごとに画素
値の平均値をライン平均値として算出する平均値算出手
段と、 前記上下左右の各ライン平均値のうち上下左右の各ライ
ンごとに最も明るいものを1つずつ選択して、前記評価
領域をさらに限定する領域限定手段と、 選択された上下左右の各1つずつのラインにより形成さ
れている矩形枠の画素値の平均値に基づいて、欠陥画素
と判断するための画素値の閾値を算出する閾値算出手段
と、 前記矩形枠内にある全画素の画素値と前記閾値とを比較
して、前記閾値よりも暗いものを欠陥画素として判別す
る欠陥画素判別手段と、 を備えていることを特徴とするデジタル画像の欠陥画素
特定装置。
3. A pixel group including a normal pixel normally converted from an original image when the original image is converted into a digital image by a reading unit, and a defective pixel generated due to dust or dust. In the device for identifying the defective pixel in the digital image, a storage unit for storing the digital image, a display unit for displaying the digital image, and an instruction for indicating the vicinity of the defective pixel of the digital image displayed on the display unit Means, an evaluation area setting means for setting a pixel group included in an area of a predetermined size as an evaluation area, with the designated pixel as a center, and a pixel located near the center of the evaluation area. A defective pixel candidate setting means for setting a pixel having the darkest pixel value as a defective pixel candidate; and a defective pixel candidate around a defective pixel among a group of pixels in the evaluation area. Target pixel group, an upper line composed of pixels along the left and right direction of the pixel above the defective pixel candidate, and each pixel along the left and right direction of the pixel below the defective pixel candidate And a left line composed of pixels along the vertical direction of a pixel on the left side of the defective pixel candidate, and a pixel along the vertical direction of a pixel on the right side of the defective pixel candidate Average value calculation means for calculating an average value of pixel values as a line average value for each line composed of a right line and a line composed of: An area limiting means for further selecting the bright areas one by one to further limit the evaluation area; and an average value of the pixel values of the rectangular frame formed by each of the selected upper, lower, left and right lines. A threshold value calculating means for calculating a threshold value of a pixel value for determining a defective pixel; comparing the pixel values of all the pixels within the rectangular frame with the threshold value; A defective pixel specifying device for a digital image, comprising: a defective pixel determining unit that determines a pixel as a pixel.
【請求項4】 請求項3に記載のデジタル画像の欠陥画
素特定装置において、前記各手段に加えて、前記領域の
大きさを設定する領域設定手段を備えていることを特徴
とするデジタル画像の欠陥画素特定装置。
4. The digital image defective pixel identifying apparatus according to claim 3, further comprising an area setting means for setting a size of the area in addition to each of the means. Defective pixel identification device.
【請求項5】 原画を読み取り手段によりデジタル画像
に変換した際に、正常に前記原画から変換された正常画
素と、ゴミや埃などに起因して生じている欠陥画素とを
含む画素群からなるデジタル画像のうち前記欠陥画素を
特定するためのプログラムを格納した記録媒体であっ
て、 (a)デジタル画像内の欠陥画素付近を指示する処理
と、 (b)前記指示された画素を中心にして予め設定された
大きさの領域に含まれている画素群を評価領域として設
定する処理と、 (c)前記評価領域の中心付近にある画素のうち、最も
暗い画素値のものを欠陥画素候補として設定する処理
と、 (d)前記評価領域内にある画素群のうち、前記欠陥画
素候補の周囲にある画素群を対象にして、前記欠陥画素
候補の上側にある画素の左右方向に沿う各画素により構
成されている上ラインと、前記欠陥画素候補の下側にあ
る画素の左右方向に沿う各画素により構成されている下
ラインと、前記欠陥画素候補の左側にある画素の上下方
向に沿う各画素により構成されている左ラインと、前記
欠陥画素候補の右側にある画素の上下方向に沿う各画素
により構成されている右ラインとからなる各ラインごと
に画素値の平均値をライン平均値として算出する処理
と、 (e)前記上下左右の各ライン平均値のうち上下左右の
各ラインごとに最も明るいものを1つずつ選択して前記
評価領域をさらに限定する処理と、 (f)選択された上下左右の各1つずつのラインにより
形成されている矩形枠の画素値の平均値に基づいて、欠
陥画素と判断するための画素値の閾値を算出する処理
と、 (g)前記矩形枠内にある全画素の画素値と前記閾値と
を比較して、前記閾値よりも暗いものを欠陥画素として
判別する処理と、 を行わせるようにコンピュータを制御するためのプログ
ラムを格納した記録媒体。
5. A pixel group including a normal pixel normally converted from an original image when the original image is converted into a digital image by a reading unit, and a defective pixel generated due to dust or dust. A recording medium storing a program for identifying the defective pixel in the digital image, comprising: (a) a process of designating a vicinity of the defective pixel in the digital image; and (b) a process of focusing on the designated pixel. A process of setting a pixel group included in an area of a predetermined size as an evaluation area; and (c) among pixels near the center of the evaluation area, a pixel having the darkest pixel value as a defective pixel candidate. (D) among the pixel groups in the evaluation area, with respect to the pixel groups around the defective pixel candidate, each pixel along the left-right direction of the pixel above the defective pixel candidate To And a lower line formed by pixels along the left and right direction of a pixel below the defective pixel candidate, and a lower line formed by pixels along the left and right direction of the defective pixel candidate. The average value of pixel values for each line consisting of a left line composed of pixels and a right line composed of pixels along the vertical direction of pixels on the right side of the defective pixel candidate is defined as a line average value. (F) selecting one of the brightest lines for each of the upper, lower, left, and right lines from the average values of the upper, lower, left, and right lines to further limit the evaluation area; (G) calculating a threshold of a pixel value for determining a defective pixel based on an average value of pixel values of a rectangular frame formed by each of the upper, lower, left, and right lines; In A storage medium storing a program for controlling a computer to perform a process of comparing pixel values of all pixels with the threshold value and determining a pixel darker than the threshold value as a defective pixel.
JP9202928A 1996-09-20 1997-07-29 Method, device for specifying defective pixel in digital image and recording medium Pending JPH10150570A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9202928A JPH10150570A (en) 1996-09-20 1997-07-29 Method, device for specifying defective pixel in digital image and recording medium

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP25013896 1996-09-20
JP8-250138 1996-09-20
JP9202928A JPH10150570A (en) 1996-09-20 1997-07-29 Method, device for specifying defective pixel in digital image and recording medium

Publications (1)

Publication Number Publication Date
JPH10150570A true JPH10150570A (en) 1998-06-02

Family

ID=26513643

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9202928A Pending JPH10150570A (en) 1996-09-20 1997-07-29 Method, device for specifying defective pixel in digital image and recording medium

Country Status (1)

Country Link
JP (1) JPH10150570A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5982946A (en) * 1996-09-20 1999-11-09 Dainippon Screen Mfg. Co., Ltd. Method of identifying defective pixels in digital images, and method of correcting the defective pixels, and apparatus and recording media therefor
US6768512B1 (en) * 2000-07-12 2004-07-27 Vanguard International Semiconductor Corp. Method of bad pixel correction
US6940549B2 (en) * 2000-06-23 2005-09-06 Koninklijke Philips Electronics N.V. Image sensor signal defect correction

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5982946A (en) * 1996-09-20 1999-11-09 Dainippon Screen Mfg. Co., Ltd. Method of identifying defective pixels in digital images, and method of correcting the defective pixels, and apparatus and recording media therefor
US6940549B2 (en) * 2000-06-23 2005-09-06 Koninklijke Philips Electronics N.V. Image sensor signal defect correction
US6768512B1 (en) * 2000-07-12 2004-07-27 Vanguard International Semiconductor Corp. Method of bad pixel correction

Similar Documents

Publication Publication Date Title
US5982946A (en) Method of identifying defective pixels in digital images, and method of correcting the defective pixels, and apparatus and recording media therefor
US7356202B2 (en) Image processing apparatus, an image processing method, and a computer readable medium having recorded thereon a processing program for permitting a computer to perform image processing routines
JP3881439B2 (en) Image processing device
JP3046107B2 (en) Method and apparatus for forming contours in a color image
US6535221B1 (en) Image enhancement method and apparatus for internet printing
US4992955A (en) Apparatus for representing continuous tone and high contrast images on a bilevel display
WO2019153731A1 (en) Image processing method and system
JP3142550B2 (en) Graphic processing unit
EP3958550B1 (en) Image processing method, image processing apparatus, image forming apparatus, and storage medium
JP4214480B2 (en) Image processing apparatus and method, and program
JPH10150570A (en) Method, device for specifying defective pixel in digital image and recording medium
JP2007042033A (en) Color correction apparatus and image display device
JPH08255240A (en) Device and method for correcting image
CN110992328A (en) Dark spot detection method and device
US10218880B2 (en) Method for assisted image improvement
JPH10232915A (en) Image processor and its method
JP4247621B2 (en) Image processing apparatus, image processing method, and medium on which image processing control program is recorded
JPH10150571A (en) Method, device for correcting defective pixel in digital image and recording medium
JPH10320557A (en) Telop character display frame detection method and device therefor
JP6852618B2 (en) Computer programs and image processing equipment
US20030103671A1 (en) Image processing apparatus and method
JP4560845B2 (en) Image processing apparatus, image processing method, and medium on which image processing control program is recorded
JP3937710B2 (en) Image processing apparatus, image processing method, and medium on which image processing control program is recorded
JP2000187721A (en) Method for recognizing color
JP2009230557A (en) Object detection device, object detection method, object detection program, and printer