JP2004132743A - Emulsion scratch determination method, device, and program, and recording medium stored with emulsion scratch determination program - Google Patents

Emulsion scratch determination method, device, and program, and recording medium stored with emulsion scratch determination program Download PDF

Info

Publication number
JP2004132743A
JP2004132743A JP2002295330A JP2002295330A JP2004132743A JP 2004132743 A JP2004132743 A JP 2004132743A JP 2002295330 A JP2002295330 A JP 2002295330A JP 2002295330 A JP2002295330 A JP 2002295330A JP 2004132743 A JP2004132743 A JP 2004132743A
Authority
JP
Japan
Prior art keywords
pixel
value
emulsion
pixels
image data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2002295330A
Other languages
Japanese (ja)
Other versions
JP3823910B2 (en
Inventor
Keiji Sakaimoto
堺本 啓嗣
Koji Kita
北 耕次
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.)
Noritsu Koki Co Ltd
Original Assignee
Noritsu Koki 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 Noritsu Koki Co Ltd filed Critical Noritsu Koki Co Ltd
Priority to JP2002295330A priority Critical patent/JP3823910B2/en
Publication of JP2004132743A publication Critical patent/JP2004132743A/en
Application granted granted Critical
Publication of JP3823910B2 publication Critical patent/JP3823910B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To detect a pixel influenced by an emulsion scratch. <P>SOLUTION: Normal pixels positioned in a peripheral prescribed range are searched for, relative to each center pixel by using each pixel in digital image data as the center pixel concerning the digital image data acquired from an image recorded in a picture film (S6b). The mean value of each pixel value of the normal pixels corresponding to the center pixel is determined by some single color component (S6c), and when the pixel value of the center pixel is higher than the mean value as much as a prescribed quantity, the center pixel is determined to be an emulsion scratch pixel (S6i). <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、写真フィルムに記録された画像をスキャナ等の画像読取装置によって読み取ったデジタル画像データに対し、画像処理を行う方法に関するものである。具体的には、本発明は、上記デジタル画像データを用いて、上記写真フィルムの乳剤面に付された傷(以下、「乳剤傷」とする)の影響を除去する処理を行う方法に関するものである。
【0002】
【従来の技術】
ネガフィルム、ポジフィルム等の写真フィルムに記録された画像を印画紙へ出力するプリンタには、写真フィルムの画像を透過した光を用いて印画紙を露光するアナログ方式のプリンタと、写真フィルムの画像を透過した光がCCD(Charge Coupled Device)などで光電変換され、さらにデジタル化されてデジタル画像データを作成し、このデジタル画像データに基づいて変調した光を用いて印画紙を露光するデジタル方式のプリンタとがある。
【0003】
両方式とも、写真フィルムに傷やほこりが付いていると、印画紙に焼き付けられた画像に濃度の変動や欠落などの不具合が生じる場合がある。このため、従来は、このような不具合を緩和するために、写真フィルムを透過させる光として拡散光が両方式ともに利用されている。
【0004】
デジタル方式のプリンタの場合は、さらに、デジタル画像データに画像処理を施すことにより、傷の影響を効果的に除去することが可能である(特許文献1〜4参照)。
【0005】
デジタル画像データに画像処理を施す傷除去処理では、写真フィルムに赤外光を透過させている。写真フィルムを透過する赤外光は、写真フィルムに付いた傷により散乱されるが、写真フィルムの画像を形成する色素によって基本的に影響を受けない。したがって、写真フィルムを透過した赤外光により形成される赤外画像データにおいては、傷の情報のみが含まれることになり、傷の影響を受けている画素のみ、その画素値が低下する傾向にある。また、同一の写真フィルムに可視光線を透過させて形成される可視光画像データ(赤色成分、緑色成分、青色成分のデジタル画像データ)においても、基本的には赤外画像データと同程度に傷の影響を受けている画素の画素値の低下が生じると考えられる。よって、赤外画像データにおいて、画素値が低下している画素を傷による影響を受けている画素(以下、「傷画素」とする)と判断することができ、可視光画像データにおいて対応する画素の色成分ごとの画素値に、赤外画像データの画素値低下量を加算することにより、傷による影響を除去する傷除去処理を行うことができるものと考えられる。
【0006】
【特許文献1】
特開平6−28468号公報(公開日:平成6年2月4日(1994.2.4))
【0007】
【特許文献2】
特開2000−341473号公報(公開日:平成12年12月8日(2000.12.8))
【0008】
【特許文献3】
特開2000−349968号公報(公開日:平成12年12月15日(2000.12.15))
【0009】
【特許文献4】
特開2001−157003号公報(公開日:平成13年6月8日(2001.6.8))
【0010】
【発明が解決しようとする課題】
しかしながら、上記傷除去処理によれば、写真フィルムのベース面に付されている傷(以下、「ベース傷」とする)の影響を受けている画素に対しては有効であるが、乳剤傷の影響を受けている画素に対してはその影響を除去することができない。その理由を以下説明する。
【0011】
写真フィルムの乳剤面に傷が付されている状態とは、写真フィルムの画像を形成する色素が削られている状態である。さらに、フィルムの乳剤面には、図11に示すように、青感光層(イエロー色素),緑感光層(マゼンタ色素),赤感光層(マゼンタ色素)が順に積層している。したがって、上記乳剤面に傷が付されると、青感光層から順に各層が削られると共に、各層の欠落量は異なるものとなる。これにより、乳剤傷により影響を受けた画素の画素値は、傷がない状態に比べて、色成分ごとに異なる量で増加する。したがって、乳剤傷により影響を受けている画素(以下、「乳剤傷画素」とする)に関して、可視光画像データの色成分ごとの画素値に赤外画像データの画素値低下量をそれぞれ加算する上記傷除去処理を行っても、その影響を除去することができないのである。
【0012】
つまり、可視光画像データにおいて、上記乳剤傷による影響を除去するためには、上記傷除去処理とは異なる補正処理が必要になる。ここで、乳剤傷による影響を除去するための補正処理としては、乳剤傷画素の周囲に位置する正常画素の画素値から、傷がない状態の画素値を作り出す処理がある。しかし、この処理は、乳剤傷画素と異なる画素から、乳剤傷画素の画素値を作り出す処理であるため、出力画像に不自然さを発生させることもある。よって、上記補正処理は、乳剤傷画素のみに対して施すことにより、できるだけ出力画像に不自然さを発生させないようにしなければならない。
【0013】
ところが、赤外画像データに基いた傷画素を検出する手順では、傷による影響を受けていない画素と傷画素との判別は可能であるものの、判別された傷画素のうちから乳剤傷画素のみを検出することは困難であるという問題が生じていた。
【0014】
本発明は、上記の問題点を解決するためになされたもので、その目的は、デジタル画像データの各画素に関して、乳剤傷により影響を受けている画素のみを精度よく検出できる乳剤傷判定方法、乳剤傷判定装置を提供することにある。
【0015】
【課題を解決するための手段】
本発明の乳剤傷判定方法は、上記課題を解決するために、写真フィルムに記録されている画像から取得されるデジタル画像データについて、上記写真フィルムの乳剤傷による影響を受けている画素を乳剤傷画素として判定する乳剤傷判定方法であって、上記デジタル画像データの各画素を中心画素として、中心画素ごとに、周辺の所定範囲に位置する正常画素を探索するステップと、いずれか1つの色成分で、上記中心画素に対応する上記正常画素の各画素値の平均値を求めるステップと、上記いずれか1つの色成分における中心画素の画素値が、上記平均値より所定量高い場合、該中心画素を乳剤傷画素と判定するステップとを備えることを特徴とする。
【0016】
本発明の乳剤傷判定装置は、上記課題を解決するために、写真フィルムに記録されている画像から取得されるデジタル画像データについて、上記写真フィルムの乳剤傷による影響を受けている画素を乳剤傷画素として判定する乳剤傷判定装置であって、上記デジタル画像データの各画素を中心画素として、中心画素ごとに、周辺の所定範囲に位置する正常画素を探索する正常画素探索部と、いずれか1つの色成分で、上記中心画素に対応する上記各正常画素の各画素値の平均値を求める画素値算出部と、上記いずれか1つの色成分における中心画素の画素値が、上記平均値より所定量高い場合、その中心画素を乳剤傷画素と判定する判定部とを備えることを特徴とする。
【0017】
乳剤傷とは、写真フィルムの乳剤面に構成される各色成分の発色層である色素が欠落している現象をいう。したがって、上記写真フィルムの乳剤傷に光を照射しても、欠落している部分が光を吸収せずに透過光が増加し、乳剤傷画素における少なくともいずれか1つの色成分の画素値は、傷がない状態に比べて上昇する。
【0018】
ここで、写真フィルムに記録されている画像情報がデジタル画像データに変換される場合、標本化される。したがって、デジタル画像データにおいては、大多数の画素からなる画素群が、同一絵柄の情報を共有することが通常であり、ある画素を中心とした一定領域内の画素群では、各画素間で、色成分ごとの画素値がほぼ均一であると考えることができる。よって、ある乳剤傷画素を中心とした一定領域内にある正常画素の各画素値の平均値は、該乳剤傷画素の傷がない状態の画素値と考えられる。したがって、乳剤傷画素の画素値は、少なくともいずれか1つの色成分で、上記各正常画素の画素値の平均値より所定量高いと考えられる。
【0019】
そこで、上記手順によれば、上記デジタル画像データの各画素を中心画素として、中心画素ごとに、周辺の所定範囲に位置する正常画素を探索している。すなわち、各中心画素について、その中心画素と同じ絵柄の情報を共有する正常画素を探索している。つぎに、少なくともいずれか1つの色成分で、上記中心画素に対応する上記各正常画素の画素値の平均値を求めている。ここで、該平均値は、該中心画素の傷がない状態の画素値と考えられる。また、乳剤傷による影響を受けている画素の画素値は、傷がない状態に比べて上昇する。よって、少なくともいずれか1つの色成分で、上記中心画素の画素値が上記平均値より所定量高い場合、その中心画素を乳剤傷画素と判定できる。
【0020】
本発明の乳剤傷判定方法は、上記課題を解決するために、写真フィルムに記録されている画像から取得されるデジタル画像データについて、上記写真フィルムの乳剤傷による影響を受けている画素を乳剤傷画素として判定する乳剤傷判定方法であって、上記デジタル画像データの各画素を中心画素として、中心画素ごとに、周辺の所定範囲に位置する正常画素を探索して、上記中心画素に対応する上記正常画素の各画素値の平均値を色成分ごとに求め、赤色成分の上記平均値をRavem,n、緑色成分の上記平均値をGavem,n、青色成分の上記平均値をBavem,nとして、Ravem,n,Gavem,n,Bavem,nの平均値をDavem,nとして、上記中心画素の赤色成分の画素値と、緑色成分の画素値と、青色成分の画素値との平均値をDdatm,nとする場合、Davem,nに第1所定値を加算した値を第1閾値として、Ddatm,nが第1閾値より高い場合、該中心画素を乳剤傷画素と判定することを特徴とする。
【0021】
上述通り、写真フィルムの乳剤傷に光を照射しても、欠落している部分が光を吸収せずに透過光の量が増加し、乳剤傷画素における少なくとも1つの色成分の画素値は、傷がない状態に比べて上昇する。
【0022】
ここで、写真フィルムに記録されている画像情報がデジタル画像データに変換される場合、標本化される。したがって、デジタル画像データにおいては、大多数の画素からなる画素群が、同一絵柄の情報を共有することが通常であり、ある画素を中心とした一定領域内の画素群では、各画素間で、色成分ごとの画素値がほぼ均一であると考えることができる。よって、ある乳剤傷画素を中心とした一定領域内にある各正常画素の画素値の平均値は、該乳剤傷画素の傷がない状態の画素値と考えられる。したがって、乳剤傷画素の画素値は、少なくとも1つの色成分で、上記各正常画素の画素値の平均値より所定量高いと考えられる。
【0023】
そこで、上記手順によれば、上記デジタル画像データの各画素を中心画素として、中心画素ごとに、周辺の所定範囲に位置する正常画素を探索している。すなわち、各中心画素について、その中心画素と同じ絵柄の情報を共有する正常画素を探索している。
【0024】
つぎに、上記中心画素に対応する上記各正常画素の画素値の平均値を色成分ごとに求め、赤色成分の上記平均値をRavem,n、緑色成分の上記平均値をGavem,n、青色成分の上記平均値をBavem,nとしている。さらに、Ravem,n,Gavem,n,Bavem,nの平均値をDavem,nとしている。また、上記中心画素の赤色成分の画素値と、緑色成分の画素値と、青色成分の画素値との平均値をDdatm,nとしている。ここで、Ravem,n,Gavem,n,Bavem,nは、該中心画素の傷がない状態の色成分ごとの画素値と考えられる。したがって、Davem,nは、該中心画素の傷がない状態の、赤色画素値と緑色画素値と青色画素値の平均値と考えることができる。また、少なくともいずれか1の色成分で、乳剤傷による影響を受けている画素の画素値は、傷がない状態に比べて上昇するので、中心画素が乳剤傷画素の場合、Ddatm,n(中心画素の赤色画素値と緑色画素値と青色画素値の平均値)は、傷がない状態に比べて高い。よって、第1所定値を、傷がない状態からの画素値上昇分と考えると、Ddatm,nが、第1閾値より高い場合、該中心画素を乳剤傷画素と判定できる。
【0025】
本発明の乳剤傷判定方法は、上記の手順に加えて、さらに、上記写真フィルムから取得される赤外画像データに関して、上記中心画素に対応する上記所定範囲内の正常画素の各画素値の平均値に、第2所定値を減算した値を第2閾値として、上記中心画素の画素値が、第2閾値よりも低い場合、該中心画素を乳剤傷画素と判定することを特徴としてもよい。
【0026】
赤外画像データとは、上記写真フィルムに赤外光を照射して、照射光をスキャナ等により取り込んで得られるデジタル画像データをいう。
【0027】
赤外光は、写真フィルムのベース面の傷によって大きく散乱されるものの、乳剤面の傷によっては大きく影響を受けない。しかし、乳剤面の傷であっても、ベース面および乳剤面に全く傷のない状態と比較すると、赤外光は若干散乱される。したがって、赤外画像データに関して、乳剤傷画素の画素値は、傷がない状態の画素値と比較して低い傾向にある。そこで、上記中心画素に対応する上記所定範囲内の正常画素の各画素値の平均値は、該中心画素の傷がない状態の画素値と考えることができるので、第3所定値を傷がない状態からの画素値低下分と考えると、赤外画像データに関して、中心画素の画素値が第3閾値より低い場合、乳剤傷画素と判定できる。
【0028】
なお、Ddatm,nが、第1閾値より高い場合、該中心画素を乳剤傷画素と判定できる。しかし、この条件のみでは、上記所定範囲内に互いに異なる絵柄が存在する場合、互いに異なる絵柄の各正常画素の画素値から第1閾値が算出されることもあり得る。この場合、適正な第1閾値を算出することができない。すなわち、本来、乳剤傷画素でない画素が、乳剤傷画素と判定されるという弊害も起こりえる。しかし、赤外画像データを利用した第2閾値を併用することによって、このような弊害を防止することができる。
【0029】
本発明の乳剤傷判定方法は、上記の手順に加えて、さらに、各中心画素に関して、色成分ごとに、中心画素の画素値と、該中心画素に対応する上記所定範囲内の正常画素の各画素値の平均値との差分を求め、緑色成分の差分に第3所定値を加算した値を第3閾値、赤色成分の差分に第4所定値を加算した値を第4閾値として、青色成分の差分が第3閾値かつ第4閾値より高い中心画素を乳剤傷画素と判定することを特徴としてもよい。
【0030】
フィルムの乳剤面における各色素は、フィルムの表面からベース面に向けて青感光層,緑感光層,赤感光層の順に構成されている。したがって、フィルムの乳剤面に傷が付くと、青感光層,緑感光層,赤感光層の順に削られる傾向にある。よって、乳剤傷画素にあっては、傷がない状態からの青色成分の画素値の上昇度が、他の色成分の画素値の上昇度に比べて大きい傾向にある。つまり、傷がない状態と比べた場合の乳剤傷画素の画素値増加量は、青>緑>赤となる傾向にある。
【0031】
そこで、上記手順によれば、各中心画素に関して、色成分ごとに、中心画素の画素値と、該中心画素に対応する上記所定範囲内の正常画素の各画素値の平均値との差分を求め、緑色成分の差分に第3所定値を加算した値を第3閾値、赤色成分の差分に第4所定値を加算した値を第4閾値としている。ここで、各中心画素に関し、上記青色成分の差分が、上記緑色成分の差分より第3所定値だけ高く、上記赤色成分の差分より第4所定値だけ高ければ、その中心画素は、乳剤傷の影響により青色成分の画素値が大幅に増加しているものと考えることができる。したがって、上記青色成分の差分が、第3閾値,第4閾値よりも高い場合、該中心画素を乳剤傷画素と判定する条件をさらに加えると、より高精度な乳剤傷判定を実現することができる。
【0032】
なお、写真フィルムに大きな乳剤傷が付いていると、赤外光はダイレクトに透過するので、このような乳剤傷画素の赤外画像データの画素値は、逆に上昇することがある。このような乳剤傷によって影響を受けている画素は、第2閾値に基づいて乳剤傷画素と判定されないこともあり得る。しかし、第3閾値および第4閾値は赤外画像データと無関係であるので、第2閾値の代わりに第3閾値および第4閾値を併用することで、このような弊害を防止できる。
【0033】
本発明の乳剤傷判定方法は、上記の手順に加えて、上記中心画素の青色成分の画素値が第5所定値以上で、緑色成分の画素値が第6所定値以上の場合、該中心画素を乳剤傷画素と判定することを特徴としてもよい。
【0034】
上述通り、フィルムの乳剤面において各色素は、フィルムの表面からベース面に向けて青感光層,緑感光層,赤感光層の順に構成されている。したがって、フィルムの乳剤面に傷が付くと、青感光層,緑感光層,赤感光層の順に削られる傾向にある。よって、赤感光層まで削られているような乳剤傷にあっては、青色感光層および緑色感光層が全く存在しない状態であるから、このような乳剤傷による影響をうけている画素の青色成分の画素値は、第5所定値以上になり、緑色成分の画素値は、第6所定値以上になると考えられる。したがって、上記条件をさらに併用することで、より高精度な乳剤傷判定を実現することができる。
【0035】
本発明の乳剤傷判定方法は、上記の手順に加えて、上記中心画素の外周において、環状に連なった最内周の画素群を第1の画素群とすると共に、第nの画素群(n=1,2,…,N)の外周において、環状に連なった最内周の画素群を第n+1の画素群として、上記所定範囲の最外周が、第N+1の画素群となるようにして、中心画素に近い画素群から上記正常画素を画素群ごとに探索していき、探索された正常画素の累計が所定数以上になれば、上記探索を終了することを特徴としてもよい。
【0036】
上記手順によれば、上記中心画素の外周において、環状に連なった最内周の画素群を第1の画素群とすると共に、第nの画素群(n=1,2,…,N)の外周において、環状に連なった最内周の画素群を第n+1の画素群として、上記所定範囲の最外周が、第N+1の画素群となるようにしている。これにより、上記所定範囲内の画素を中心画素からの距離に応じて、各画素群に分類できる。さらに、中心画素に近い画素群から上記正常画素を画素群ごとに探索していき、探索された正常画素の累計が所定数以上になれば、上記探索を終了することとしている。これにより、中心画素に近い位置にある正常画素から優先して探索することができ、所定数以上の正常画素を探索できた時点で、それ以上中心画素から離れた位置にある正常画素を探索しないように設定できる。また、中心画素に近い位置に存在する画素ほど、中心画素に近似した画像情報を有している。したがって、上記手順によれば、できるだけ中心画素に近似した画像情報を持つ正常画素を優先して探索できる。
【0037】
本発明の乳剤傷判定方法は、上記の手順に加えて、上記デジタル画像データの各画素のうち、対応する赤外画像データの画素値がCF値より低い画素を上記中心画素とすることを特徴としてもよい。
【0038】
CF値とは、あらゆる傷の影響を受けていない画素における赤外画像データの画素値をいう。よって、赤外画像データの画素値が上記CF値より低い画素は、何らかの傷による影響を受けているものと考えることができる。
【0039】
したがって、上記デジタル画像データの各画素のうち、対応する赤外画像データの画素値がCF値より低い画素を上記中心画素とすれば、全画素について乳剤傷を判定する必要がなくなり、処理速度の向上を図ることができる。
【0040】
本発明の乳剤傷判定方法は、上記の手順に加えて、上記所定範囲内の各画素のうち、赤外画像データの画素値がCF値以上の画素を探索して、該画素を正常画素とすることを特徴としてもよい。
【0041】
上述通り、赤外画像データの画素値が上記CF値より低い画素は、何らかの傷による影響を受けているものと考えることができる。したがって、上記所定範囲内の各画素のうち、赤外画像データの画素値がCF値以上の画素は、乳剤傷やフィルムのベース面の傷により影響を受けていない正常画素と判定することができるので、上記手順によれば正常画素の検出が容易となる。
【0042】
本発明の乳剤傷判定方法は、上記の手順に加えて、赤外画像データに関してCF値以上の画素値である画素が上記所定範囲内に存在しない場合であって、上記所定範囲内の各画素に関し、赤色成分の画素値と、緑色成分の画素値と、青色成分の画素値との平均値であるRdatm+i,n+jが、すでに乳剤傷画素と判定された画素の赤色成分の画素値と、緑色成分の画素値と、青色成分の画素値との平均値RdatM,Nよりも、第7所定値分低い場合、その画素を正常画素とすることを特徴としてもよい。
【0043】
上述通り、乳剤傷画素は、傷がない状態と比べて画素値の上昇が生じている。また、乳剤傷以外の傷の影響を受けている画素で、傷による影響の少ない場合、フィルムの色素が削られていない。したがって、このような傷による影響の少ない画素は、傷のない状態と比べて画素値の上昇が生じていない。よって、赤色成分の画素値と、緑色成分の画素値と、青色成分の画素値との平均値が、すでに乳剤傷画素と判定された画素よりも所定値分低い画素は、比較的傷の浅い画素と判断することができる。
【0044】
一方、赤外画像データに関してCF値以上の画素値である画素が、上記所定範囲内に存在しない場合、上記所定範囲内の全ての画素は、何らかの傷の影響を受けているものと考えられる。このような場合、上記CF値に基づいて正常画素を探索していれば、正常画素を1画素も探索できないので、乳剤傷判定を行うことができない。
【0045】
そこで、上記手順によれば、上記所定範囲内の各画素に関し、赤色成分の画素値と、緑色成分の画素値と、青色成分の画素値との平均値であるRdatm+i,n+jが、すでに乳剤傷画素と判定された画素の赤色成分の画素値と、緑色成分の画素値と、青色成分の画素値との平均値RdatM,Nよりも、第7所定値分低い場合、その画素を正常画素としている。すなわち、乳剤傷による影響を受けておらず、比較的傷の浅い画素を正常画素とみなしている。したがって、上記所定範囲内に、傷による影響を全く受けていない画素が存在しない場合であっても、上記乳剤傷判定を行うことが可能である。
【0046】
本発明の乳剤傷判定方法は、上記の手順に加えて、上記デジタル画像データの各画素に、α×β画素を領域とするフィルタを配置して、上記フィルタ領域内に、乳剤傷画素と判定された画素が所定数以上存在する場合、上記フィルタ領域内の乳剤傷画素以外の全ての画素を補正対象画素とすることを特徴としてもよい。
【0047】
乳剤傷画素の周囲には、「光学的傷消し効果」や「平均化効果」により、乳剤傷による影響を受けていながら、乳剤傷画素と判定されない画素も存在する。
【0048】
そこで、上記手順によれば、α×β画素のフィルタ領域内に、乳剤傷画素と判定された画素が所定数以上存在する場合、上記フィルタ領域内において、乳剤傷画素以外の全ての画素を補正対象画素としている。これにより、乳剤傷画素のみならず、乳剤傷による影響を受けていながらも乳剤傷画素と判定されなかった画素も、乳剤傷除去処理の対象に含めることができる。なお、上記αとβとは自然数であるものとする。また、αとβとは同じ自然数であっても構わない。
【0049】
また、上記乳剤傷判定方法による処理は、コンピュータに実行させるためのプログラムであることを特徴としてもよい。さらに、上記乳剤傷判定プログラムは、記録媒体に、コンピュータにて読み取り可能に記録してなることを特徴としてもよい。
【0050】
【発明の実施の形態】
本発明は、写真フィルムから取り込んだデジタル画像データについて、写真フィルムの乳剤傷により影響を受けている画素(以下、「乳剤傷画素」とする)を精度よく検出する乳剤傷判定方法および乳剤傷判定装置に関するものである。ここで、本実施の形態は、まず、上記デジタル画像データについて、写真フィルムのベース面の傷(以下、「ベース傷」とする)による影響を受けている画素(以下、「ベース傷画素」とする)に対し、ベース傷除去処理によってベース傷による影響を除去する。そして、上記デジタル画像データから乳剤傷画素を検出して、乳剤傷除去処理によって乳剤傷による影響を除去している。
【0051】
そこで、以下では、ベース傷除去処理,乳剤傷検出処理,乳剤傷除去処理が実行されるシステム、これら処理の前処理の手順、ベース傷除去処理の手順、乳剤傷検出処理の手順、乳剤傷除去処理の手順を説明する。
【0052】
本発明の実施の一形態について図に基づいて説明すれば、以下のとおりである。図2は、本実施形態の画像出力システムの概略構成を示すブロック図である。該画像出力システムは、フィルムスキャナ1と、画像処理装置2と、写真焼付装置3とを備えた構成となっている。
【0053】
フィルムスキャナ1は、例えば、光源からの光を、写真フィルムであるネガフィルムに照射し、その透過光をCCDなどで受光することにより、ネガフィルムに記録された画像を読み取るものである。フィルムスキャナ1は、読み取ったデジタル画像データを赤色成分、緑色成分、および青色成分ごとに画像処理装置2に出力する。なお、以下では、可視光から読み取った赤色成分、緑色成分、および青色成分のデジタル画像データをまとめて指す場合を可視光画像データと適宜称することとする。
【0054】
さらに、フィルムスキャナ1は、上記ネガフィルムに赤外光を照射し、赤外領域の透過光をCCDなどで受光することにより、上記ネガフィルムのデジタル画像データを読み取る。なお、以下では、赤外光から読み取られたデジタル画像データを赤外画像データとする。
【0055】
画像処理装置2は、フィルムスキャナ1から送られてきた可視光画像データおよび赤外画像データを用いて、ベース傷除去処理、乳剤傷検出処理、乳剤傷除去処理を実行するものである。なお、画像処理装置2は、例えばPC(Personal Computer)ベースの装置によって構成され、図示はしないが、PC本体、モニターなどの表示手段、キーボード、マウスなどの入力手段などによって構成されている。この画像処理装置2については、後に詳細に説明する。
【0056】
写真焼付装置3は、画像処理装置2によって処理がなされた可視光画像データに基づいて感光材料である印画紙を露光することにより、印画紙上に画像を焼き付けるものである。可視光画像データに応じた光を印画紙に照射するヘッドとしては、可視光画像データに応じて画素ごとに印画紙への照射光を変調できる光変調素子が用いられる。このような光変調素子としては、例えばPLZT露光ヘッド、DMD(デジタル・マイクロミラー・デバイス)、LCD(液晶表示装置)、LED(Light Emitting Diode)パネル、レーザー、FOCRT(Fiber Optic Cathode Ray Tube)、CRT(Cathode Ray Tube)等が挙げられる。
【0057】
なお、写真焼付装置3は、ネガフィルムのスキャニングと印画紙の露光とを両方行うことができるオートプリンタとして構成してもよい。この場合、画像出力システムを、画像の読み取りから焼付けまでを行うオートプリンタと、PC(Personal Computer)などによって構成される画像処理装置2とを接続した構成とすることにより、システムの簡素化を図ることができる。
【0058】
つぎに、画像処理装置2について詳細に説明する。画像処理装置2は、前処理部4と、ベース傷除去部5と、乳剤傷判定部(乳剤傷判定装置)6と、乳剤傷除去部7とから構成されている。
【0059】
前処理部4は、ベース傷除去処理、および乳剤傷検出処理の前段階となる処理を実行するブロックである。具体的に、前処理部4は、傷による影響を受けていない画素(以下、「正常画素」とする)の赤外画像データの画素値である本CF値(CF値,クリアフィルム値)を算出するブロックである。なお、「傷」とは上記ベース傷と乳剤傷との両方を意味することとする。
【0060】
同一写真フィルムから得られた赤外画像データと可視光画像データとでは互いに画素が対応関係にある。一方、フィルムを透過する赤外光は、フィルムのベース傷により影響を受けるものの、フィルムの色素により影響を受けることがない。すなわち、赤外画像データにはベース傷の情報が含まれるものの、フィルムに形成されている画像情報が含まれることはなく、ベース傷の影響を受けている画素(以下、「傷画素」とする)は、傷のない状態から画素値が低下する傾向にある。よって、本CF値は、正常画素とベース傷画素とを区別するための閾値として用いることができ、赤外画像データの画素値が本CF値以下の画素をベース傷画素と判断することができる。
【0061】
しかし、このようにしてベース傷画素を検出できたとしても、このような方法では、乳剤傷画素のみを検出するのは困難である。したがって、乳剤傷画素のみを精度よく検出するためには、別の検出手順が必要となるのである。
【0062】
ベース傷除去部5は、上述したベース傷除去処理を実行するブロックである。具体的に、ベース傷除去部5は、ベース傷画素に関して、上記本CF値から赤外画像データの画素値を引くことにより、該ベース傷画素における傷のない状態からの画素値低下量を算出すると共に、可視光画像データにおける赤色成分,緑色成分,青色成分の各画素値に、上記画素値低下量を加算する処理を実行するブロックである。
【0063】
ここで、図11に示すように、ベース傷は、写真フィルム上のベース面に傷が付されているものの、基本的に色素が欠落しているものではないので、ベース傷画素における傷のない状態からの画素値低下量は、赤色成分,緑色成分,青色成分でほぼ等しいと考えられる。したがって、各ベース傷画素に関して、本CF値と赤外画像データの画素値との差である画素値低下量を、赤色成分,緑色成分,青色成分の各画素値に加算すれば、上記ベース傷による影響をベース傷画素から除去することができる。
【0064】
ところが、乳剤傷は、写真フィルムの各色成分の色素が欠落しているものである。したがって、乳剤傷画素における可視光画像データの画素値は、乳剤傷がない状態から上昇する。さらに、色素の欠落量は、色成分ごとに異なるものとなる。したがって、乳剤傷画素における可視光画像データの傷がない状態からの画素値上昇量は、赤色成分,緑色成分,青色成分のそれぞれで異なるものである。したがって、乳剤傷による影響を乳剤傷画素から除去するためには、上記ベース傷除去処理とは異なる処理が必要になり、後述する乳剤傷除去処理が必要になるのである。
【0065】
乳剤傷判定部6は、前処理部4により処理された赤外画像データと、可視光画像データとを用いて、乳剤傷画素を検出すると共に、検出された乳剤傷画素およびその周辺における所定の画素である補正対象画素の位置を示した乳剤傷マップを作成するブロックである。なお、乳剤傷判定部6は、図4に示すように、第1判定部6a,正常画素探索部6b,画素値算出部6c,閾値設定部6d,第2判定部(判定部)6e,乳剤傷マップ作成部6fから構成されているが、これら各ブロックの処理手順については、後に詳述する。
【0066】
乳剤傷除去部7は、上記乳剤傷マップで示されている乳剤傷画素および補正対象画素について、周辺領域の画像を参照して、可視光画像データの色成分ごとの画素値を作り出す乳剤傷除去処理を実行するためのブロックである。
【0067】
つぎに、画像処理装置2における処理の流れについて、図3に示すフローチャートに基づいて説明する。まず、ステップ1(以下、「S1」のように称する)において、前処理部4は、フィルムスキャナ1によって写真フィルムから取り込まれ、フィルムスキャナ1から送られてきた可視光画像データおよび赤外画像データを取得する。
【0068】
そして、前処理部4は、仮のCF値(以下、「仮CF値」とする)を算出する(S2)。ここで、仮CF値とは、正常画素の赤外画像データの画素値と考え得る値である点で上記本CF値と同様であるが、後述する第2の回帰式に必要な閾値である点で、上記本CF値と相違する。
【0069】
ここで、仮CF値の算出は、以下の演算により実行される。前処理部4は、赤色成分の可視光画像データ(適宜、「赤画像データ」とする)および赤外画像データの互いに対応する各画素に関して、
第1の変数X=(赤画像データの画素値)−(赤外画像データの画素値)+(赤外画像データの画素値の平均値)
第2の変数Y=(赤画像データの画素値)を求め、
第1の回帰式Y=aX+bの係数a,bを求める回帰計算を行う。
【0070】
ここで、赤外画像データは、写真フィルムに記録されている画像情報によって基本的に影響を受けない。したがって、写真フィルムを透過した赤外光により形成される赤外画像データにおいては、ベース傷の情報が含まれるものの、フィルム上の色素に関する情報は基本的に含まれない。よって、赤外画像データにあっては、ベース傷画素の画素値が、傷のない状態から低下する傾向にある。
【0071】
ここで、赤外画像データの各画素の画素値の平均値を、正常画素における赤外画像データの画素値と仮定すると、−(赤外画像データの画素値)+(赤外画像データの画素値の平均値)をベース傷による画素値低下量と仮定でき、上述した第1の回帰式から算出される切片bは、ベース傷による画素値低下量と考えることができる。
【0072】
なお、第1の変数Xが第2の変数Y以下である画素のみを第1の回帰式の対象とする。これは、第2の変数Yが第1の変数Xよりも小さい場合、対応する画素はベース傷画素である可能性が著しく高く、このような画素を回帰計算から除外することで、算出される仮CF値の精度を向上させるためである。
【0073】
つぎに、仮CF値=(赤外画像データの画素値の平均値)+bより、仮CF値を算出できる。これは、赤外画像データの画素値の平均値はベース傷により低下するので、仮CF値と赤外画像データの画素値の平均値との差は、ベース傷による画素値低下量と考えることができるからである。
【0074】
また、仮CF値は、(赤外画像データの画素値の平均値+b)の約96%で設定することが好ましい。これは、CCDから生じるノイズ等によって、算出された(赤外画像データの画素値の平均値+b)に多少変動があることから、明らかにベース傷画素と判断できる値が、(赤外画像データの画素値の平均値+b)の約96%であるからである。なお、仮CF値は対数であることから、
仮CF値=(赤外画像データの画素値の平均値)+b+log(γ)
(但し、γ=0.96)
で仮CF値を算出することができる。但し、上述した割合(96%)およびγ(0.96)は、96%および0.96に限定されるものではなく、本手順が用いられるデバイスに応じて適宜変更可能な値である。
【0075】
さらに、前処理部4は、赤外画像データから赤色リーケージを除去することで、補正された赤外画像データを出力する処理を行う(S3)。ここで、赤色リーケージとは、赤外光の波長領域とフィルムが吸収する赤色成分光の波長領域とに重なりが生じ、赤外画像データと赤画像データとの互いに対応する各画素において、赤外画像データの各画素値に赤画像データの各画素値が含まれてしまう現象をいう。この赤色リーケージが混在したままの赤外画像データを用いて本CF値を求めても、高精度の値を得ることはできない。したがって、本CF値を算出するに先立って、S3の処理を行うこととしたものである。
【0076】
ここで、赤外画像データから赤色リーケージを除去する処理は、以下の演算により行われる。前処理部4は、赤外画像データの画素値が仮CF値以上である画素を対象にして、
第3の変数e=(赤画像データの画素値)
第4の変数f=(赤外画像データの画素値)を求め、
第2の回帰式f=ceの係数cを求める。
赤画像データの画素値が赤外画像データの画素値に混入していると、赤画像データの画素値と赤外画像データの画素値とで相関関係が生じているので、算出されたc値は、赤画像データの画素値に含まれている赤色リーケージの割合とすることができる。また、第2の回帰式において、赤外画像データの画素値が仮CF値以上の画素のみを対象としているのは、明らかにベース傷画素と考えられる画素を第2の回帰式の対象から除外して、精度よく上記赤色リーケージの割合を求めるためである。
【0077】
そして、前処理部4は、各画素に関して、
IR=(赤外画像データの画素値)
R=(赤画像データの画素値)
IR´=(IR−c×R)/(1−c)
を演算する。ここで、(IR−c×R)は、赤外画像データの画素値から、赤色リーケージを示すc×Rを引くことにより、赤外画素データの画素値から赤色リーケージを除去したものである。さらに、(IR−c×R)を(1−c)で割っているのは、赤色リーケージを除去した後の赤外画像データの画素値について正規化を行うためである。そして、IR´から構成される赤外画像データは、赤色リーケージが除去され、補正された赤外画像データとなる。なお、赤色リーケージが除去された赤外画像データを補正赤外画像データとする。
【0078】
つぎに、前処理部4は、本CF値を算出する(S4)。ここで、本CF値は、上記補正赤外画像データと赤画像データとから、S2と同様の手順で求められる。すなわち、前処理部4は、赤画像データおよび補正赤外画像データの互いに対応する各画素に関して、
第5の変数p=(赤画像データの画素値)−(補正赤外画像データの画素値)+(補正赤外画像データの画素値の平均値)
第6の変数q=(赤画像データの画素値)を求め、
第3の回帰式q=gp+hの係数hを求める回帰計算を行う。
【0079】
なお、第5の変数pが第6の変数q以下である画素のみを第3の回帰式の対象とする。そして、本CF値=(補正赤外画像データの画素値の平均値)+hの演算式により、本CF値を算出する。
【0080】
また、本CF値は、(補正赤外画像データの画素値の平均値+h)の約96%で設定することが好ましい。これは、CCDから生じるノイズ等によって、算出された(補正赤外画像データの画素値の平均値+h)に多少変動があることから、明らかにベース傷画素と判断できる値が、(赤外画像データの画素値の平均値+h)の約96%であるからである。なお、本CF値は対数であることから、
本CF値=(補正赤外画像データの画素値の平均値)+b+log(δ)
(但し、δ=0.96)
で本CF値を算出することができる。但し、上述した割合(96%)およびδ(0.96)は、96%および0.96に限定されるものではなく、本手順が用いられるデバイスに応じて適宜変更可能な値である。
【0081】
つまり、S2〜S4の処理において、前処理部4は、本CF値を求めるに先立って、まず、仮CF値を算出して、この仮CF値を閾値として、正常画素と考えうる画素のみを検出する。そして、該正常画素と考えうる画素のみを赤色リーケージ算出の第2の回帰式に使用することで、高精度の赤色リーケージを算出できるようにしたものである。これにより、赤外画像データから赤色リーケージを除去した補正赤外画像データを得ることが可能になる。つまり、赤色リーケージが除かれた補正赤外画像データは、赤外画像データよりも、べース傷に関する高精度の情報を含むデータである。
【0082】
そして、この補正赤外画像データに基づいて、本CF値を求めているので、本CF値は、仮CF値よりも、正常画素の赤外画像データの画素値に近い値となる。その後、前処理部4は、補正赤外画像データおよび可視光画像データをベース傷除去部5へ出力する。
【0083】
さらに、ベース傷除去部5が、本CF値に基づき、可視光画像データに対して、ベース傷除去処理を実行する(S5)。ここで、ベース傷除去処理は、以下の手順により行われる。
【0084】
ベース傷除去部5は、補正赤外画像データの画素値が本CF値より低い画素をベース傷画素と判断する。さらに、ベース傷除去部5は、各ベース傷画素に関し、
(補正量)=(本CF値)−(補正赤外画像データの画素値)
を算出する。そして、ベース傷除去部5は、各ベース傷画素に関して、可視光画像データにおける各色成分の画素値に上記補正量を加算して、ベース傷除去後の可視光画像データを出力する。これにより、ベース傷除去処理が完了する。
【0085】
つぎに、乳剤傷判定部6における各ブロックが、S5で得られた可視光画像データと補正赤外画像データに基づいて、乳剤傷画素を検出する(S6)。ここでの処理は、図1に基づいて詳細に説明する。
【0086】
まず、第1判定部6aが、本CF値を閾値として傷画素(正常画素以外の画素)を検出する(S6a)。なお、S4において、
本CF値=(補正赤外画像データの平均画素値+h)+logδ…(1)
(但し、δ=0.96)
により、本CF値を設定しているが、S6においては、δ=0.97で本CF値を設定することが好ましい。これは、乳剤傷画素における赤外画像データの画素値が、ベース傷画素における赤外画像データの画素値よりも若干高い傾向にあることが経験的に認められているからである。そして、第1判定部6aは、S5で得られた可視光画像データと補正赤外画像データとにおける互いに対応する各画素に関して、
IRdatx,y<本CF値…(2)
IRdatx,y:各画素の赤外画像データの画素値
を満たす画素を傷画素として検出する。
【0087】
つぎに、正常画素探索部6bが、第1判定部6aにより検出された各傷画素を中心画素〔m,n〕として、これを中心とした7×7画素の周辺領域内(以下、この領域を「探索範囲」とする)に存在する正常画素を探索する(S6b)。ここで、探索範囲の画素数は適宜変更可能である。したがって、正常画素探索部6bは、中心画素の周辺の所定範囲に位置する正常画素を探索する。この処理を以下詳細に説明する。
【0088】
なお、正常画素は、
IRdatm+i,n+j≧本CF値…(3)
IRdatm+i,n+j:各中心画素〔m,n〕に対応する探索範囲内の各画素〔m+i,n+j〕の赤外画像データの画素値
を満たす画素とする。すなわち、正常画素は、上記傷画素以外の画素が該当する。
【0089】
まず、正常画素探索部6bは、上記各中心画素の座標を〔m,n〕として、探索範囲内において、中心画素に近い位置に存在する画素群から順に正常画素を探索する。
【0090】
具体的には、図5に示すように、正常画素探索部6bは、まず、中心画素を囲っている第1画素群において、正常画素を探索する。すなわち、正常画素探索部6bは、中心画素を囲う8個の画素のなかから、(3)を満たす画素を正常画素として探索する。
【0091】
つぎに、正常画素探索部6bは、第1画素群を囲っている第2画素群において、正常画素を探索する。すなわち、正常画素探索部6bは、第1画素群を囲っている16個の画素から、(3)を満たす画素を正常画素として探索する。この時点で、探索された正常画素の累計が10画素以上であれば、正常画素探索部6bは探索処理を終了して、S6dの処理へ移行する(S6b YES)。
【0092】
正常画素の累計が10画素に満たない場合、正常画素探索部6bは、第2画素群を囲っている第3画素群において、正常画素を探索する。すなわち、正常画素探索部6bは、第2画素群を囲っている24個の画素から、(3)を満たす画素を正常画素として探索する。この時点で、探索された正常画素の累計が10画素以上であれば、正常画素探索部6bは探索処理を終了して、S6dの処理へ移行する(S6b YES)。
【0093】
正常画素探索部6bは、このような処理を第7画素群まで繰り返す。すなわち、第7画素群は、探索範囲の最外周に位置する画素群である。ここで、第7画素群における探索が終了した時点で、正常画素が1画素でも累計されていれば、S6dの処理へ移行する(S6b YES)。一方、正常画素が1画素も累計されていない場合、S6cの処理へ移行する(S6b NO)。
【0094】
また、S6bの処理では、各画素群を探索する度に、正常画素が10画素以上累計されると、その時点でS6bの処理を終了している。これは、中心画素とできるだけ同一の画像情報を示す正常画素を探索するために、中心画素に近い位置にある正常画素から優先して探索しているのであって、ある程度の数の正常画素を探索できた時点で、それ以上離れた位置にある正常画素は累計しないようにするためである。
【0095】
なお、S6bの処理では、正常画素を探索する所定の範囲として、7×7画素の範囲にすると共に、10画素以上探索した時点で探索処理を終了しているが、これに限定されない。すなわち、上記中心画素の外周において、環状に連なった最内周の画素群を第1の画素群とすると共に、第nの画素群(n=1,2,…,N)の外周において、環状に連なった最内周の画素群を第n+1の画素群として、上記所定範囲の最外周が、第N+1の画素群となるようにして、中心画素に近い画素群から上記正常画素を画素群ごとに探索していき、探索された正常画素の累計が所定数以上になれば、上記探索を終了する手順であってもよい。また、中心画素ごとに、周辺の所定範囲に位置する正常画素を探索できる手順であれば、S6bの手順に限定されるものではない。
【0096】
ここで、上記正常画素の探索処理の具体例を図6に基づいて説明する。図6(a)に示すように、中心画素(黒塗り画素)の周辺に正常画素(○印が付された画素)が29個存在しているものとする。この場合、まず、正常画素探索部6bは、図6(b)に示すように、中心画素を囲う第1画素群に属する3つの正常画素を探索する。つぎに、正常画素探索部6bは、図6(c)に示すように、第1画素群を囲う第2画素群に属する4つの正常画素を探索する。この結果、累計される正常画素数は7個となり、探索された正常画素の累計が10画素未満であるので、正常画素探索部6bは正常画素の探索処理を続行する。さらに、正常画素探索部6bは、図6(d)に示すように、第2画素群を囲う第3画素群に属する7つの正常画素を探索する。この結果、累計される正常画素数は14個となり、探索された正常画素の累計が10画素以上となるので、正常画素探索部6bは、探索処理を終了する。なお、S6bの手順をコンピュータに実行させるためのプログラムとして表した具体例を図10に示す。
【0097】
つぎに、S6bの処理において、正常画素が1画素も検出されなかった場合(S6b NO)について説明する。この場合、正常画素探索部6bは、正常画素を探索するための条件である(3)の変更を行い、探索処理を再度行う(S6c)。
【0098】
この場合、正常画素探索部6bは、中心画素〔m,n〕が第1判定部6aによって検出される直前に第2判定部6eによって乳剤傷と判断された画素〔M,N〕の色成分ごとの画素値の平均値を、正常画素を探索するための条件として利用する。この手順を、以下詳細に説明する。
【0099】
ある中心画素〔m,n〕に対応する探索範囲において、正常画素が1画素も検出されなかったということは、その中心画素〔m,n〕における探索範囲内の全ての画素は傷画素ということになる。一方で、傷画素のなかでも、ベース傷のように比較的傷の浅い画素は、可視光画像データの画素値の上昇が生じていないものの、乳剤傷画素は、上述したように、傷がない状態よりも、可視光画像データの画素値が上昇している。
【0100】
そこで、S6cにおいては、このような傷の浅い画素を正常画素とみなすことで、この正常画素を探索して、以降の処理を続行することとしている。したがって、S6cは、正常画素を探索する条件を緩和することとし、(3)の条件を(3)´に変更して、再度正常画素を探索する手順である。
【0101】
ここで、正常画素探索部6bは、上記乳剤傷と判断された画素について、赤色成分の画素値と緑色成分の画素値と青色成分の画素値との平均値をDdatM,Nを求める。さらに、正常画素探索部6bは、上記探索範囲内の画素ごとに、赤色成分の画素値と緑色成分の画素値と青色成分の画素値との平均値Ddatm+i,n+ を算出する。そして、正常画素探索部6bは、以下に示す(3)´の条件を設定する。
Ddatm+i,n+j<DdatM,N+ε…(3)´
(ε=0〜0.1)
を設定する。なお、εは第7所定値とする。
【0102】
すなわち、該中心画素が検出される直前に、第2判定部6eによって、乳剤傷画素と判断された画素を、(3)´の条件として利用している。そして、赤色成分の画素値と緑色成分の画素値と青色成分の画素値との平均値が、該乳剤傷画素よりも第7所定値分低い画素は、傷の浅い画素と判断して、これを正常画素とみなすものである。但し、〔M,N〕が存在しない場合は、S6cの処理を実行せずに、該中心画素〔m,n〕に関して乳剤傷判定を行わずに終了する。また、この手順では、〔m,n〕が検出される直前に乳剤傷と判定された画素を用いて、(3)´の条件を設定しているが、第2判定部6eによって乳剤傷画素と判定された画素であれば、直前に乳剤傷と判定された画素でなくても構わない。
【0103】
また、本手順において、第7所定値としてのεを0から0.1の間で設定している。これは、本手順が実行されるデバイス,システムが異なれば、それに応じてεの値を適宜変更するためである。
【0104】
そして、正常画素探索部6bは、該中心画素〔m,n〕に対応する探索範囲内において、(3)´の条件を満たす画素を探索し、この条件を満たす画素を正常画素として累計する。なお、S6cにおいては、図5に示す第7画素群のみを探索対象とすることが好ましい。この理由を以下説明する。ここでの処理は、S6bの手順において探索範囲に正常画素が1画素も存在しない中心画素について、S6cでは条件を緩和して再度探索処理を行うものである。したがって、該中心画素の近燐には傷の深い画素が存在する可能性が高いと考えられる。よって、中心画素からある程度離れた位置の周辺画素を探索することによって、できるだけ傷の浅い画素のみを探索対象とするためである。ただし、第7画素群のみが探索対象でなくてもよく、探索範囲内の全画素群を探索対象としてもよいし、いずれかの画素群のみ指定して、指定した画素群のみを探索対象としても構わない。
【0105】
そして、正常画素探索部6bは、(3)´の条件を満たす正常画素を少なくとも1画素以上探索できれば、S6cの探索処理を終了して、S6dへ移行する(S6c YES)。一方、正常画素探索部6bは、(3)´の条件を満たす正常画素を探索できなかった場合は、その中心画素について乳剤傷画素の判定を行うことなく処理を終了する(S6b NO)。
【0106】
つぎに、画素値算出部6cは、各中心画素〔m,n〕に関して、S6bまたはS6cで探索された各正常画素に関して、画素値の平均値Ravem,n,Gavem,n,Bavem,n,IRavem,nを算出すると共に、Ravem,n,Gavem,n,Bavem,nの平均値であるDavem,nを算出する(S6d)。なお、Ravem,nは、正常画素の赤色成分の各画素値の平均値、Gavem,nは、正常画素の緑色成分の各画素値の平均値、Bavem,nは、正常画素の青色成分の各画素値の平均値、IRavem,nは、正常画素の補正赤外画像データの各画素値の平均値を示す。つまり、ある中心画素〔m,n〕について、S6bまたはS6cで探索された各正常画素の各画素値の平均値を色成分ごとに求め、補正赤外画像データの各画素値の平均値を算出している。
【0107】
ここで、Ravem,n,Gavem,n,Bavem,n,IRavem,nの算出には、上記探索処理終了時において累計されている正常画素を全て使用する。すなわち、探索処理終了時点における正常画素の累計が、例えば14画素の場合、各色成分の平均画素値の算出に使用される周辺正常画素はあくまで14画素全部であって、10画素ではない。
【0108】
また、Davem,nは、各中心画素〔m,n〕に対応する探索範囲から検出された各正常画素におけるRavem,n,Gavem,n,Bavem,nから算出する。
【0109】
【数1】

Figure 2004132743
【0110】
すなわち、各中心画素〔m,n〕についてのDavem,nとは、Ravem,n,Gavem,n,Bavem,nの平均値をいう。
【0111】
つぎに、閾値設定部6dが、各中心画素〔m,n〕に関して、画素値算出部6cが算出したDavem,nに基づいて、第1閾値を算出する(S6e)。
【0112】
【数2】
Figure 2004132743
【0113】
ここで、第1閾値を設定している理由を説明する。中心画素の周辺の一定領域に属する画素群は、通常、中心画素と同一の被写体を示す画素と考えることができる。したがって、中心画素の周辺領域に位置する各正常画素の各画素値の平均値であるRavem,n,Gavem,n,Bavem,nは、該中心画素の傷がない状態の色成分ごとの画素値Rdatm,n,Gdatm,n,Bdatm,nとみなすことができる。
【0114】
一方、乳剤傷では、フィルム上の色素が欠落しているために、乳剤傷画素の可視光画像データにおける各色成分のうち、少なくとも1色の画素値は、傷がない状態より所定量だけ上昇する傾向にある。したがって、中心画素〔m,n〕の可視光画像データの各色成分の画素値の平均値をDdatm,nとすると、Ddatm,nは、Davem,nよりも第1所定値ζだけ大きくなると考えられるからである。また、本手順において、第1所定値としてのζを0〜0.1の間に設定している。これは、本手順が実行されるデバイス,システムが異なれば、それに応じてζの値を適宜変更するためである。なお、Ddatm,nは、以下の演算により算出される。
【0115】
【数3】
Figure 2004132743
【0116】
つぎに、閾値設定部6dは、各中心画素〔m,n〕に関して、画素値算出部6cが算出したIRavem,nに基づいて、第2閾値を算出する(S6f)。
【0117】
【数4】
Figure 2004132743
【0118】
ここで、第2閾値を設定している理由を説明する。補正赤外画像データに関しても、中心画素の周辺領域に位置する各正常画素の各画素値の平均値であるIRavem,nは、該中心画素の傷がない状態の画素値とみなすことができる。また、上述したように、乳剤傷画素は、ベース傷画素よりも赤外画像データの画素値が若干高い傾向にあるものの、正常画素に比べると低い傾向にある。したがって、各中心画素における補正赤外画像データの画素値をIRdatm,nとすると、その中心画素が乳剤傷画素である場合、IRdatm,nは、IRavem,nより第2所定値分低くなると考えられるからである。なお、本手順において、第2所定値としてのηを0〜1の間に設定している。これは、本手順が実行されるデバイス,システムが異なれば、それに応じてηの値を適宜変更するためである。
【0119】
また、S6cの処理を経た中心画素に関しては、S6bの処理を経た中心画素よりも、第2所定値を低く設定する(0.05程度低く設定)のが好ましい。S6cの手順を経た中心画素においては、その探索範囲内の画素は全て傷画素であり、そのIRavem,nは、実際の正常画素から得られる画素値よりも低い。したがって、S6cの手順を経た中心画素については、第2閾値を少し高めに設定することで、乳剤傷判定の適正化を図っているのである。
【0120】
さらに、閾値設定部6dは、可視光画像データについて、色成分ごとに、中心画素の画素値と、該中心画素に対応する探索範囲内の各正常画素の画素値の平均値との差分を算出する(S6g)。
【0121】
【数5】
Figure 2004132743
【0122】
その後、閾値設定部6dは、各中心画素に関して、Gdif,Rdifに基づいて、第3閾値および第4閾値を算出する(S6h)。
【0123】
【数6】
Figure 2004132743
【0124】
ここで、第3閾値および第4閾値が設定されている理由を説明する。乳剤傷とは、図7に示すように、フィルムの乳剤面が削られている傷をいうが、フィルム表面からベース面に向けて、青感光層、緑感光層、赤感光層の順で構成されているため、青感光層、緑感光層、赤感光層の順で削られている傾向が高い。したがって、乳剤傷画素にあっては、傷がない状態からの青色成分の画素値の増加量が他の色成分の画素値の増加量よりも大きい傾向にある。したがって、中心画素が乳剤傷画素である場合、Bdifm,nは、Gdifm,nより第3所定値分高くなり、Rdifm,nよりも第4所定値分高くなると考えられるからである。なお、本手順において、第3所定値としてのιと第4所定値としてのκとは、0〜0.4の間に設定されている。これは、本手順が実行されるデバイス,システムが異なれば、それに応じてιとκとを適宜変更するためである。
【0125】
また、画素が乳剤傷により影響を受けている場合、緑色成分の画素値の増加量のほうが、赤色成分の画素値の増加量より大きいので、κ>ιの関係となるように、第3閾値および第4閾値を設定するのが好ましい。
【0126】
つぎに、第2判定部6eは、各中心画素について、乳剤傷画素か否かの判定を行う(S6i)。まず、第2判定部6eは、▲1▼Ddatm,n>第1閾値,▲2▼IRdatm,n<第2閾値,▲3▼Bdifm,n>第3閾値,▲4▼Bdifm,n>第4閾値,の4つの条件を設定する。
【0127】
そして、第2判定部6eは、▲1▼+▲2▼の条件を満たす上記中心画素と、▲1▼+▲3▼+▲4▼の条件を満たす中心画素とを乳剤傷画素と判断する(すなわち、▲1▼+▲2▼+▲3▼+▲4▼の条件を満たす中心画素も乳剤傷画素と判断されることとなる。)。このような判断が行われる理由を、以下説明する。
【0128】
上述通り、乳剤傷とは、フィルムの色素が削り取られるものであり、乳剤傷画素のいずれか1の色成分において、画素値の平均値は、傷が無い状態よりも必ず高い値を示す。したがって、乳剤傷の判定において、▲1▼は必須の条件となる。
【0129】
なお、本実施の形態では、▲1▼の条件として、Ddatm,n>第1閾値を設定しているが、▲1▼の条件は、少なくともいずれか1の色成分で、上記中心画素の画素値(Rdatm,n,Gdatm,n,Bdatm,n)が、該中心画素に対応する上記探索範囲内の正常画素の各画素値の平均値(Ravem,n,Gavem,n,Bavem,n)より所定量高い場合、該中心画素を乳剤傷画素と判断する条件であっても構わない。
【0130】
一方、乳剤傷に赤外光を照射すると、ベース傷同様、赤外光が散乱される。したがって、乳剤傷画素は、赤外画像データに関して、傷がない状態における画素値より低い値を示す。したがって、▲2▼の条件も乳剤傷の判定に用いることができる。
【0131】
しかし、乳剤傷が大きすぎると、その部分で赤外光が散乱されずにダイレクトで透過することも起こりえる。このような場合、乳剤傷画素の赤外画像データの画素値は逆に上昇する。このような点を考慮すれば、▲2▼の条件のみをもって乳剤傷の判定を行うことができないので、▲2▼の条件は必須の条件となりえず、▲2▼に代わる条件が必要となる。
【0132】
また、上述したとおり、乳剤傷画素にあっては、傷がない状態からの青色成分の画素値の増加量が他の色成分の画素値の増加量よりも高い傾向にある。したがって、▲3▼▲4▼の条件も乳剤傷の判定に用いることができる。
【0133】
しかし、図7に示すように、ベース面にある深い傷によって、乳剤面が削られている場合は、赤感光層の削除量が最も大きい。この場合の乳剤傷は、傷がない状態からの赤色画素値の増加量が他の色成分の画素値の増加量よりも高い傾向にある。このような点を考慮すれば、▲3▼▲4▼の条件のみをもって必須の条件となりえず、▲3▼▲4▼に代わる条件が必要となる。
【0134】
以上のことから、S6iにおいては、▲1▼+▲2▼を満たす画素、▲1▼+▲3▼+▲4▼を満たす画素を乳剤傷画素の条件としている。ただし、▲1▼〜▲4▼の全ての条件を満たす画素のみを乳剤傷画素と判定するように設定しても構わない。
【0135】
特に、対象となる可視光画像データがポジフィルムから得られた場合は、▲1▼〜▲4▼の全ての条件を満たす画素のみを乳剤傷画素と判定するようにするのが好ましい。これは、現像後のポジフィルムは、乳剤面が剥がされているのが通常であり、ポジフィルムにあっては、乳剤傷が原因で各色成分の画素値増加量に差が生じることが考えられず、▲3▼と▲4▼との条件の信頼性が低いからである。
【0136】
さらに、第2判定部6eは、▲2▼+▲5▼の条件、または▲3▼+▲4▼+▲5▼の条件を満たす中心画素も乳剤傷画素と判定しても構わない。
【0137】
Ddatm,n>第5閾値…▲5▼
第5閾値=Davem,n−μ (μ=0〜0.1)
ここで、▲5▼の条件について、以下説明する。S5のベース傷除去処理において、補正不足が生じた画素の色成分ごとの画素値は、傷のない状態よりも低い。したがって、中心画素にベース傷による影響が残存していれば、その周囲の正常画素の色成分ごとの画素値は、中心画素の色成分ごとの画素値よりも低い。よって、▲5▼の条件を設定することによって、S5で適正に補正されなかったベース傷画素を乳剤傷画素と判定することにより、ベース傷による影響を除去することができるからである。
【0138】
また、第2判定部6eは、以下に示す▲6▼かつ▲7▼の条件を満たす場合、該中心画素を乳剤傷画素と判断することとしても構わない。
Bdatm,n>8.294(第5所定値)…▲6▼
Gdatm,n>8.294(第6所定値)…▲7▼
ここで、▲6▼▲7▼の条件が設定される理由を説明する。上述したとおり、乳剤傷はフィルムの色素が削られているものであり、その影響を受けている画素は、可視光画像データの画素値が大幅に上昇する(特に、青色成分の画素値および緑色成分の画素値)。したがって、青色成分の画素値および赤色成分の画素値が一定以上の値を示す中心画素については、乳剤傷画素と判断でき、▲6▼▲7▼の条件を設定したものである。
【0139】
以上のような手順により、乳剤傷判定部6の各ブロックによる、乳剤傷画素か否かの判断が終了する。なお、S6の手順においては、前処理部4によって補正された赤外画像データを用いているが、これに限定されるものではなく、フィルムスキャナ1が取り込んだ赤外画像データをそのまま用いても構わない。また、S6の手順においては、(2)(3)に用いるCF値として、本CF値が用いられているが、仮CF値であっても構わないし、予め定められているCF値を用いても構わない。
【0140】
また、以上の手順では、(2)の条件を満たす画素を傷画素としての中心画素として、この画素のみを対象に乳剤傷判定を行っているが、これに限定されるものではなく、上記デジタルの全画素を中心画素として、全画素に対して乳剤傷判定を行っても構わない。
【0141】
つぎに、乳剤傷マップ作成部6fが、乳剤傷マップを作成する(S7)。なお、乳剤傷マップとは、第2判定部6eにより検出された乳剤傷画素の周辺に存在する所定の画素を補正対象画素として、上記乳剤傷画素および補正対象画素の位置を示したデジタルデータをいう。
【0142】
通常、フィルムスキャナ1の光源として拡散光源が用いられ、フィルム上の乳剤傷を照射する光を散乱させると、直線光よりも傷による影響が低減した光がCCD等により取り込まれることになる。したがって、本来、乳剤傷画素として第2判定部6eにより判定されるべき画素が、乳剤傷画素として判定されないことも起こりえる。このような場合、傷の深い乳剤傷画素のみが第2判定部6eにより判定されることになるので、図8(a)に示すように、乳剤傷の中央付近のみが乳剤傷画素と判定され、比較的傷の浅い外周部分は乳剤傷と判定されないことも起こりえる。以下、このような現象を「光学的傷消し効果」という。
【0143】
また、フィルム上の傷の形状を正確にデジタル画像データに取り込むためには細かくサンプリングする必要があるが、フィルムスキャナ1で取り込む画像データの解像度には限界がある。ここで、例えば、図8(b)に示すように、フィルムスキャナ1は、1画素単位で傷に係る部分とそうでない部分とを取り込むことになるが、各傷画素において、1画素に占める傷の面積の割合だけしか傷の情報を取り込むことができない。例えば、1画素に占める傷の面積の割合が、50%だとしたら、フィルムスキャナ1は、その画素の傷情報を50%だけしか取り込むことができない。したがって、第2判定部6eにおいて、乳剤傷の中央付近のみが乳剤傷画素と判定され、比較的傷の浅い外周部分は乳剤傷と判定されないことも起こりえる。以下、このような現象を「平均化効果」という。
【0144】
したがって、光学的傷消し効果や平均化効果により乳剤傷画素と判定されなかった画素に対しても、乳剤傷除去処理を行う必要がある。そこで、第2判定部6eにより判定された乳剤傷の周辺に存在する所定の画素を補正対象画素として、乳剤傷画素および上記補正対象画素に対して、乳剤傷除去処理を実行すべく、上記乳剤傷マップを作成することとしたものである。以下、乳剤傷マップの作成手順を説明する。
【0145】
乳剤傷マップ作成部6fは、図9(a)に示すように、乳剤傷の位置を示したデジタル画像データの各画素に関して、3×3画素のフィルタを配置する。なお、フィルタサイズは3×3画素に限定されず、オペレータの任意で設定変更が可能である。
【0146】
そして、乳剤傷マップ作成部6fは、図9(b)に示すように、上記フィルタ領域内に乳剤傷画素が3画素以上含まれている場合に、その領域内の乳剤傷画素以外の全ての画素を補正対象画素と判定する。
【0147】
その後、乳剤傷マップ作成部6fは、図9(c)に示すように、上記フィルタを主走査方向または副走査方向に1画素分シフトさせる。ここで、図9(c)に示すデジタル画像データにおいても、フィルタ領域内に乳剤傷画素が3画素存在するので、図9(d)に示すように、乳剤傷マップ作成部6fは、その領域内の乳剤傷画素以外の全ての画素を補正対象画素として判定する。
【0148】
さらに、乳剤傷マップ作成部6fは、図9(e)に示すように、上記フィルタを主走査方向または副走査方向に1画素分シフトさせる。ここで、図9(e)に示すデジタル画像データにおいては、フィルタ領域内に乳剤傷画素が2画素しか存在しないので、乳剤傷判定部は、その領域内の乳剤傷画素以外の画素について、補正対象画素と判定しない。
【0149】
乳剤傷マップ作成部6fは、デジタル画像データの全画素に対して、以上の処理を施す。これにより、乳剤傷画素および補正対象画素の位置を示したデジタルデータとしての乳剤傷マップが作成される。
【0150】
そして、乳剤傷除去部7は、上記乳剤傷マップに示されている乳剤傷画素および補正対象画素に関して、その周辺領域の画素を参照して、乳剤傷画素および補正対象画素における可視光画像データの画素値を作り出す乳剤傷除去処理を実行する(S8)。以上のようなS1〜S8の手順により、画像処理装置2の一連の処理が実行される。
【0151】
なお、上述した画像処理においての画素値は、階調を自然対数で表したものである。したがって、上述した第1所定値(ζ=0〜0.1)、第2所定値(η=0〜1)、第3所定値(ι=0〜0.4)、第4所定値(κ=0〜0.4)、第5所定値(8.294)、第6所定値(8.294)、第7所定値(ε=0〜0.1)は、デジタル画像データにおける分解能(白から黒までの濃度差を表現する段階数、または白から黒までの階調数)が異なればそれぞれ異なる値となる。なお、上記画像処理においては、12ビットのデジタル画像データが用いられている。
【0152】
ところで、以上の実施の形態で説明した処理は、プログラムで実現することが可能である。このプログラムはコンピュータで読み取り可能な記録媒体に格納されている。本発明では、この記録媒体として、画像処理部2で処理が行われるために必要な図示していないメモリー(例えばROMそのもの)であってもよいし、また図示していないが外部記憶装置としてプログラム読み取り装置が設けられ、そこに記録媒体を挿入することで読み取り可能なプログラムメディアであっても構わない。
【0153】
上記いずれの場合においても、格納されているプログラムはマイクロプロセッサ(図示せず)のアクセスにより実行される構成であってもよいし、格納されているプログラムを読み出し、読み出したプログラムを図示されていないプログラム記憶エリアにダウンロードすることにより、そのプログラムが実行される構成であってもよい。この場合、ダウンロード用のプログラムは予め本体装置に格納されているものとする。
【0154】
ここで、上記プログラムメディアは、本体と分離可能に構成される記録媒体であり、磁気テープやカセットテープ等のテープ系、フロッピー(登録商標)ディスクやハードディスク等の磁気ディスクやCD−ROM/MO/MD/DVD等の光ディスクのディスク系、ICカード(メモリーカードを含む)/光カードのカード系、あるいはマスクROM、EPROM、フラッシュROM等による半導体メモリーを含めた固定的にプログラムを担持する媒体であってもよい。
【0155】
最後に、上述した実施の形態は、本発明の範囲を限定するものではなく、本発明の範囲内で種々の変更が可能である。
【0156】
【発明の効果】
本発明の乳剤傷判定方法は、以上のように、写真フィルムに記録されている画像から取得されるデジタル画像データについて、上記写真フィルムの乳剤傷による影響を受けている画素を乳剤傷画素として判定する乳剤傷判定方法であって、上記デジタル画像データの各画素を中心画素として、中心画素ごとに、周辺の所定範囲に位置する正常画素を探索するステップと、いずれか1つの色成分で、上記中心画素に対応する上記正常画素の各画素値の平均値を求めるステップと、上記いずれか1つの色成分における中心画素の画素値が、上記平均値より所定量高い場合、該中心画素を乳剤傷画素と判定するステップとを備えることを特徴とする。
【0157】
本発明の乳剤傷判定装置は、以上のように、写真フィルムに記録されている画像から取得されるデジタル画像データについて、上記写真フィルムの乳剤傷による影響を受けている画素を乳剤傷画素として判定する乳剤傷判定装置であって、上記デジタル画像データの各画素を中心画素として、中心画素ごとに、周辺の所定範囲に位置する正常画素を探索する正常画素探索部と、いずれか1つの色成分で、上記中心画素に対応する上記各正常画素の各画素値の平均値を求める画素値算出部と、上記いずれか1つの色成分における中心画素の画素値が、上記平均値より所定量高い場合、その中心画素を乳剤傷画素と判定する判定部とを備えることを特徴とする。
【0158】
これにより、少なくともいずれか1つの色成分で、上記中心画素の画素値が上記平均値より所定量高い場合、その中心画素を乳剤傷画素と判定できるという効果を奏する。
【0159】
本発明の乳剤傷判定方法は、以上のように、写真フィルムに記録されている画像から取得されるデジタル画像データについて、上記写真フィルムの乳剤傷による影響を受けている画素を乳剤傷画素として判定する乳剤傷判定方法であって、上記デジタル画像データの各画素を中心画素として、中心画素ごとに、周辺の所定範囲に位置する正常画素を探索して、上記中心画素に対応する上記正常画素の各画素値の平均値を色成分ごとに求め、赤色成分の上記平均値をRavem,n、緑色成分の上記平均値をGavem,n、青色成分の上記平均値をBavem,nとして、Ravem,n,Gavem,n,Bavem,nの平均値をDavem,nとして、上記中心画素の赤色成分の画素値と、緑色成分の画素値と、青色成分の画素値との平均値をDdatm,nとする場合、Davem,nに第1所定値を加算した値を第1閾値として、Ddatm,nが第1閾値より高い場合、該中心画素を乳剤傷画素と判定することを特徴とする。
【0160】
これにより、第1所定値を、傷がない状態からの画素値上昇分と考えると、Ddatm,nが、第1閾値より高い場合、該中心画素を乳剤傷画素と判定できるという効果を奏する。
【0161】
本発明の乳剤傷判定方法は、以上のように、上記手順に加えて、さらに、上記写真フィルムから取得される赤外画像データに関して、上記中心画素に対応する上記所定範囲内の正常画素の各画素値の平均値に、第2所定値を減算した値を第2閾値として、上記中心画素の画素値が、第2閾値よりも低い場合、該中心画素を乳剤傷画素と判定することを特徴としてもよい。
【0162】
これにより、上記中心画素に対応する上記所定範囲内の正常画素の各画素値の平均値は、該中心画素の傷がない状態の画素値と考えることができるので、第3所定値を傷がない状態からの画素値低下分と考えると、赤外画像データに関して、中心画素の画素値が第3閾値より低い場合、乳剤傷画素と判定できるという効果を奏する。
【0163】
本発明の乳剤傷判定方法は、以上のように、上記手順に加えて、さらに、各中心画素に関して、色成分ごとに、中心画素の画素値と、該中心画素に対応する上記所定範囲内の正常画素の各画素値の平均値との差分を求め、緑色成分の差分に第3所定値を加算した値を第3閾値、赤色成分の差分に第4所定値を加算した値を第4閾値として、青色成分の差分が第3閾値かつ第4閾値より高い中心画素を乳剤傷画素と判定することを特徴としてもよい。
【0164】
これにより、上記青色成分の差分が、第3閾値,第4閾値よりも高い場合、該中心画素を乳剤傷画素と判定する条件をさらに加えると、より高精度な乳剤傷判定を実現することができるという効果を奏する。
【0165】
本発明の乳剤傷判定方法は、以上のように、上記手順に加えて、上記中心画素の青色成分の画素値が第5所定値以上で、緑色成分の画素値が第6所定値以上の場合、該中心画素を乳剤傷画素と判定することを特徴としてもよい。
【0166】
これにより、さらに高精度な乳剤傷判定を実現することができるという効果を奏する。
【0167】
本発明の乳剤傷判定方法は、以上のように、上記手順に加えて、上記中心画素の外周において、環状に連なった最内周の画素群を第1の画素群とすると共に、第nの画素群(n=1,2,…,N)の外周において、環状に連なった最内周の画素群を第n+1の画素群として、上記所定範囲の最外周が、第N+1の画素群となるようにして、中心画素に近い画素群から上記正常画素を画素群ごとに探索していき、探索された正常画素の累計が所定数以上になれば、上記探索を終了することを特徴としてもよい。
【0168】
これにより、できるだけ中心画素に近似した画像情報を持つ正常画素を優先して探索できるという効果を奏する。
【0169】
本発明の乳剤傷判定方法は、以上のように、上記の手順に加えて、上記デジタル画像データの各画素のうち、対応する赤外画像データの画素値がCF値より低い画素を上記中心画素とすることを特徴としてもよい。
【0170】
これにより、全画素について乳剤傷を判定する必要がなくなり、処理速度の向上を図ることができるという効果を奏する。
【0171】
本発明の乳剤傷判定方法は、以上のように、上記の手順に加えて、上記所定範囲内の各画素のうち、赤外画像データの画素値がCF値以上の画素を探索して、該画素を正常画素とすることを特徴としてもよい。
【0172】
これにより、上記所定範囲内の各画素のうち、赤外画像データの画素値がCF値以上の画素は、乳剤傷やフィルムのベース面の傷により影響を受けていない正常画素と判定することができるので、上記手順によれば正常画素の検出が容易となるという効果を奏する。
【0173】
本発明の乳剤傷判定方法は、以上のように、上記の手順に加えて、赤外画像データに関してCF値以上の画素値である画素が上記所定範囲内に存在しない場合であって、上記所定範囲内の各画素に関し、赤色成分の画素値と、緑色成分の画素値と、青色成分の画素値との平均値であるRdatm+i,n+jが、すでに乳剤傷画素と判定された画素の赤色成分の画素値と、緑色成分の画素値と、青色成分の画素値との平均値RdatM,Nよりも、第7所定値分低い場合、その画素を正常画素とすることを特徴としてもよい。
【0174】
これにより、上記所定範囲内に、傷による影響を全く受けていない画素が存在しない場合であっても、上記乳剤傷判定を行うことが可能になるという効果を奏する。
【0175】
本発明の乳剤傷判定方法は、以上のように、上記の手順に加えて、上記デジタル画像データの各画素に、α×β画素を領域とするフィルタを配置して、上記フィルタ領域内に、乳剤傷画素と判定された画素が所定数以上存在する場合、上記フィルタ領域内の乳剤傷画素以外の全ての画素を補正対象画素とすることを特徴としてもよい。
【0176】
これにより、乳剤傷画素のみならず、乳剤傷による影響を受けていながらも乳剤傷画素と判定されなかった画素も、乳剤傷除去処理の対象に含めることができるという効果を奏する。
【0177】
また、上記乳剤傷判定方法による処理は、コンピュータに実行させるためのプログラムであることを特徴としてもよい。さらに、上記乳剤傷判定プログラムは、記録媒体に、コンピュータにて読み取り可能に記録してなることを特徴としてもよい。
【図面の簡単な説明】
【図1】本実施形態に係る乳剤傷判定の処理手順を示したフローチャートである。
【図2】本実施形態に係る画像処理が実現される画像出力システムの概略構成を示したブロック図である。
【図3】上記画像出力システムにおいて実行される画像処理の一連の流れを示したフローチャートである。
【図4】上記画像出力システムに構成されている乳剤傷判定部の概略構成を示したブロック図である。
【図5】正常画素探索処理における、探索する画素群を示したイメージ図である。
【図6】正常画素探索処理を示したイメージ図であって、図6(a)は所定範囲内に位置する全ての正常画素を示したイメージ図であって、図6(b)は第1画素群における正常画素が探索されるイメージ図であって、図6(c)は第2画素群における正常画素が探索されるイメージ図であって、図6(d)は第3画素群における正常画素が探索されるイメージ図である。
【図7】写真フィルムのベース面において、乳剤面が削られるほどの大きな傷がついている様子を示した断面図である。
【図8】図8(a)は、写真フィルムに記録されている画像をデジタル化した場合に生じる「光学的傷消し効果」を示したイメージ図であって、図8(b)は、写真フィルムに記録されている画像をデジタル化した場合に生じる「平均化効果」を示したイメージ図である。
【図9】図9(a)〜図9(e)は、乳剤傷マップの作成手順を示したイメージ図である。
【図10】正常画素探索処理の手順をコンピュータに実行させるためのプログラムを示した説明図である。
【図11】写真フィルムの乳剤面およびベース面において、傷がついている様子を示した断面図である。
【符号の説明】
1  フィルムスキャナ
2  画像処理装置
3  写真焼付装置
4  前処理部
5  ベース傷除去部
6  乳剤傷判定部(乳剤傷判定装置)
6a 第1判定部
6b 正常画素探索部
6c 画素値算出部
6d 閾値設定部
6e 第2判定部(判定部)
6f 乳剤傷マップ作成部
7  乳剤傷除去部[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a method for performing image processing on digital image data obtained by reading an image recorded on a photographic film by an image reading device such as a scanner. Specifically, the present invention relates to a method for performing a process of removing the influence of a scratch (hereinafter referred to as an “emulsion scratch”) on an emulsion surface of the photographic film using the digital image data. is there.
[0002]
[Prior art]
Printers that output images recorded on photographic films such as negative films and positive films to photographic paper include analog printers that expose photographic paper using light transmitted through the photographic film images, and photographic film images. The light transmitted through the CCD is photoelectrically converted by a CCD (Charge Coupled Device) or the like, and is further digitized to create digital image data, and photographic paper is exposed using light modulated based on the digital image data. There is a printer.
[0003]
In both cases, if the photographic film is scratched or dusty, problems such as density fluctuations or dropouts may occur in the image printed on the photographic paper. Therefore, in order to alleviate such a problem, both types of diffused light are conventionally used as light transmitted through a photographic film.
[0004]
In the case of a digital printer, it is possible to effectively remove the influence of scratches by performing image processing on digital image data (see Patent Documents 1 to 4).
[0005]
In the flaw removal processing for performing image processing on digital image data, infrared light is transmitted through a photographic film. Infrared light transmitted through the photographic film is scattered by scratches on the photographic film, but is essentially unaffected by the dyes that form the image on the photographic film. Therefore, in the infrared image data formed by the infrared light transmitted through the photographic film, only the information of the flaw is included, and only the pixel affected by the flaw tends to have a reduced pixel value. is there. Also, visible light image data (digital image data of red component, green component, and blue component) formed by transmitting visible light through the same photographic film is basically damaged to the same extent as infrared image data. It is considered that the pixel value of the pixel affected by the pixel value decreases. Therefore, in the infrared image data, a pixel having a reduced pixel value can be determined as a pixel affected by the scratch (hereinafter, referred to as a “scratch pixel”), and a corresponding pixel in the visible light image data can be determined. It is considered that by adding the pixel value reduction amount of the infrared image data to the pixel value of each color component, the flaw removal processing for removing the influence of the flaw can be performed.
[0006]
[Patent Document 1]
JP-A-6-28468 (publication date: February 4, 1994 (1994.2.4))
[0007]
[Patent Document 2]
JP 2000-341473 A (publication date: December 8, 2000 (2000.12.8))
[0008]
[Patent Document 3]
JP 2000-349968 A (Publication date: December 15, 2000 (2000.12.15))
[0009]
[Patent Document 4]
JP 2001-157003 A (publication date: June 8, 2001 (2001.6.8))
[0010]
[Problems to be solved by the invention]
However, according to the above-described flaw removal processing, although it is effective for pixels affected by flaws (hereinafter referred to as “base flaws”) applied to the base surface of a photographic film, it is effective for emulsion flaws. The effect cannot be removed for affected pixels. The reason will be described below.
[0011]
The state in which the emulsion surface of the photographic film is scratched is the state in which the dye forming the image of the photographic film has been removed. Further, as shown in FIG. 11, a blue photosensitive layer (yellow dye), a green photosensitive layer (magenta dye), and a red photosensitive layer (magenta dye) are sequentially laminated on the emulsion surface of the film. Therefore, when the emulsion surface is scratched, each layer is scraped in order from the blue photosensitive layer, and the amount of missing of each layer is different. As a result, the pixel value of the pixel affected by the emulsion scratch increases by a different amount for each color component as compared with a state where there is no scratch. Therefore, for pixels affected by emulsion scratches (hereinafter referred to as “emulsion scratch pixels”), the pixel value reduction amount of infrared image data is added to the pixel value of each color component of visible light image data. Even if a flaw removal process is performed, the effect cannot be removed.
[0012]
That is, in the visible light image data, in order to remove the influence of the emulsion scratch, a correction process different from the scratch removal process is required. Here, as a correction process for removing the influence of the emulsion scratch, there is a process of generating a pixel value in a state where there is no scratch from a pixel value of a normal pixel located around the emulsion scratch pixel. However, since this process is a process for generating the pixel value of the emulsion scratch pixel from a pixel different from the emulsion scratch pixel, the output image may cause unnaturalness. Therefore, the above-mentioned correction processing must be performed only on the emulsion scratched pixels so that the output image is made as unnatural as possible.
[0013]
However, in the procedure for detecting a flaw pixel based on infrared image data, it is possible to discriminate between a pixel not affected by the flaw and a flaw pixel, but only the emulsion flaw pixel from the discriminated flaw pixels. There has been a problem that it is difficult to detect.
[0014]
The present invention has been made in order to solve the above-mentioned problems, and an object thereof is to provide, for each pixel of digital image data, an emulsion scratch determination method capable of accurately detecting only pixels affected by an emulsion scratch, An object of the present invention is to provide an emulsion scratch judging device.
[0015]
[Means for Solving the Problems]
In order to solve the above-mentioned problem, the method for judging an emulsion scratch of the present invention comprises, for digital image data obtained from an image recorded on a photographic film, extracting pixels affected by the emulsion scratch on the photographic film. An emulsion scratch determination method for determining a pixel as a pixel, wherein each pixel of the digital image data is set as a center pixel, and for each center pixel, a search is made for a normal pixel located in a peripheral predetermined range; Calculating an average value of the pixel values of the normal pixels corresponding to the central pixel; and, when the pixel value of the central pixel in any one of the color components is higher than the average value by a predetermined amount, the central pixel Is determined as an emulsion scratch pixel.
[0016]
In order to solve the above-mentioned problem, an emulsion scratch determination apparatus of the present invention uses, for digital image data obtained from an image recorded on a photographic film, a pixel affected by the emulsion scratch of the photographic film. A normal pixel search unit that searches for a normal pixel located in a peripheral predetermined range for each center pixel, with each pixel of the digital image data as a center pixel. A pixel value calculation unit that calculates an average value of the pixel values of the normal pixels corresponding to the center pixel in one color component; and a pixel value of the center pixel in one of the color components is calculated from the average value. When the quantitative value is high, a determination unit for determining the center pixel as an emulsion scratch pixel is provided.
[0017]
The term "emulsion scratch" refers to a phenomenon in which a dye which is a color forming layer of each color component formed on the emulsion surface of a photographic film is missing. Therefore, even if light is applied to the emulsion scratches of the photographic film, the missing portion does not absorb the light and the transmitted light increases, and the pixel value of at least one color component in the emulsion scratch pixels is: It rises compared to the state without scratches.
[0018]
Here, when image information recorded on a photographic film is converted into digital image data, it is sampled. Therefore, in digital image data, it is normal that a pixel group composed of a large number of pixels shares information of the same pattern, and in a pixel group within a certain region centered on a certain pixel, between pixels, It can be considered that the pixel values for each color component are substantially uniform. Therefore, the average value of the pixel values of the normal pixels within a certain area around a certain emulsion scratched pixel is considered to be a pixel value in a state where the emulsion scratched pixel has no scratch. Therefore, it is considered that the pixel value of the emulsion scratch pixel is higher than the average of the pixel values of the normal pixels by a predetermined amount in at least one of the color components.
[0019]
Therefore, according to the above procedure, each pixel of the digital image data is set as a central pixel, and a normal pixel located in a predetermined peripheral range is searched for each central pixel. That is, for each central pixel, a normal pixel sharing the same picture information as the central pixel is searched for. Next, the average value of the pixel values of the normal pixels corresponding to the central pixel is obtained for at least one of the color components. Here, the average value is considered to be a pixel value in a state where the center pixel has no flaw. In addition, the pixel value of the pixel affected by the emulsion scratch increases as compared with the case where there is no scratch. Therefore, when the pixel value of the central pixel is higher than the average value by a predetermined amount in at least one of the color components, the central pixel can be determined as an emulsion scratch pixel.
[0020]
In order to solve the above-mentioned problem, the method for judging an emulsion scratch of the present invention comprises, for digital image data obtained from an image recorded on a photographic film, extracting pixels affected by the emulsion scratch on the photographic film. An emulsion scratch determination method for determining as a pixel, wherein each pixel of the digital image data is a central pixel, and for each central pixel, a normal pixel located in a predetermined range around the pixel is searched for, and The average value of each pixel value of the normal pixel is obtained for each color component, and the average value of the red component is Rave.m, nGave the above average value of the green componentm, n, The average value of the blue component is Bavem, nAs Ravem, n, Gavem, n, Bavem, nThe average value of Davem, nThe average value of the pixel value of the red component, the pixel value of the green component, and the pixel value of the blue component of the center pixel is Ddatm, nDavem, nDdat is a value obtained by adding a first predetermined value tom, nIs higher than the first threshold value, the central pixel is determined to be an emulsion scratch pixel.
[0021]
As described above, even when light is applied to an emulsion scratch on a photographic film, the missing portion does not absorb the light and the amount of transmitted light increases, and the pixel value of at least one color component in the emulsion scratch pixel is: It rises compared to the state without scratches.
[0022]
Here, when image information recorded on a photographic film is converted into digital image data, it is sampled. Therefore, in digital image data, it is normal that a pixel group composed of a large number of pixels shares information of the same pattern, and in a pixel group within a certain region centered on a certain pixel, between pixels, It can be considered that the pixel values for each color component are substantially uniform. Therefore, the average value of the pixel values of each normal pixel within a certain area around a certain emulsion scratched pixel is considered to be a pixel value in a state where the emulsion scratched pixel has no scratch. Therefore, it is considered that the pixel value of the emulsion scratch pixel is higher by at least one color component than the average value of the pixel values of the normal pixels by a predetermined amount.
[0023]
Therefore, according to the above procedure, each pixel of the digital image data is set as a central pixel, and a normal pixel located in a predetermined peripheral range is searched for each central pixel. That is, for each central pixel, a normal pixel sharing the same picture information as the central pixel is searched for.
[0024]
Next, an average value of the pixel values of the normal pixels corresponding to the center pixel is obtained for each color component, and the average value of the red component is Rave.m, nGave the above average value of the green componentm, n, The average value of the blue component is Bavem, nAnd In addition, Ravem, n, Gavem, n, Bavem, nThe average value of Davem, nAnd The average value of the pixel value of the red component, the pixel value of the green component, and the pixel value of the blue component of the center pixel is Ddat.m, nAnd Here, Ravem, n, Gavem, n, Bavem, nIs considered to be a pixel value for each color component in a state where the center pixel is not damaged. Therefore, Davem, nCan be considered as an average value of the red pixel value, the green pixel value, and the blue pixel value in a state where the center pixel is not damaged. In addition, the pixel value of a pixel that is affected by emulsion scratches in at least one of the color components increases as compared with a state in which there is no scratch.m, n(The average value of the red pixel value, the green pixel value, and the blue pixel value of the center pixel) is higher than that in the case where there is no flaw. Therefore, when the first predetermined value is considered to be a pixel value increase from a state where there is no flaw, Ddatm, nIs higher than the first threshold value, the center pixel can be determined to be an emulsion scratch pixel.
[0025]
In addition to the above-described procedure, the emulsion scratch determination method of the present invention further includes, for infrared image data obtained from the photographic film, an average of pixel values of normal pixels within the predetermined range corresponding to the center pixel. A value obtained by subtracting a second predetermined value from the value is set as a second threshold, and when the pixel value of the center pixel is lower than the second threshold, the center pixel may be determined as an emulsion scratch pixel.
[0026]
The infrared image data is digital image data obtained by irradiating the photographic film with infrared light and capturing the irradiated light with a scanner or the like.
[0027]
Although infrared light is greatly scattered by scratches on the base surface of the photographic film, it is not significantly affected by scratches on the emulsion surface. However, even if there is a scratch on the emulsion surface, the infrared light is slightly scattered as compared with a state in which the base surface and the emulsion surface are not damaged at all. Therefore, with respect to the infrared image data, the pixel value of the emulsion scratch pixel tends to be lower than the pixel value of the scratch-free state. Therefore, since the average value of the pixel values of the normal pixels within the predetermined range corresponding to the center pixel can be considered as a pixel value in a state where the center pixel is not damaged, the third predetermined value is determined as having no damage. Considering the pixel value decrease from the state, regarding the infrared image data, if the pixel value of the central pixel is lower than the third threshold value, it can be determined that the pixel is an emulsion scratch pixel.
[0028]
Note that Ddatm, nIs higher than the first threshold value, the center pixel can be determined to be an emulsion scratch pixel. However, if only different conditions exist in the predetermined range, the first threshold value may be calculated from the pixel values of the respective normal pixels having the different patterns. In this case, an appropriate first threshold cannot be calculated. That is, there is a possibility that a pixel that is not originally an emulsion damaged pixel is determined as an emulsion damaged pixel. However, such a problem can be prevented by using the second threshold value using infrared image data.
[0029]
In addition to the above procedure, the emulsion scratch determination method of the present invention further includes, for each central pixel, a pixel value of the central pixel for each color component and a normal pixel within the predetermined range corresponding to the central pixel. A difference between the pixel value and the average value is obtained, and a value obtained by adding a third predetermined value to the difference of the green component is set as a third threshold, and a value obtained by adding a fourth predetermined value to the difference of the red component is set as a fourth threshold. The center pixel whose difference is higher than the third threshold value and the fourth threshold value may be determined as an emulsion scratch pixel.
[0030]
Each dye on the emulsion side of the film is composed of a blue light-sensitive layer, a green light-sensitive layer, and a red light-sensitive layer in order from the film surface to the base surface. Therefore, when the emulsion surface of the film is damaged, the blue photosensitive layer, the green photosensitive layer, and the red photosensitive layer tend to be cut in this order. Therefore, in the emulsion scratched pixel, the degree of increase in the pixel value of the blue component from a state where there is no scratch tends to be larger than the degree of increase in the pixel values of the other color components. That is, the amount of increase in the pixel value of the emulsion scratched pixel as compared with the state where there is no scratch tends to be blue> green> red.
[0031]
Therefore, according to the above procedure, for each central pixel, the difference between the pixel value of the central pixel and the average value of the pixel values of the normal pixels within the predetermined range corresponding to the central pixel is calculated. The value obtained by adding the third predetermined value to the difference between the green components is set as the third threshold value, and the value obtained by adding the fourth predetermined value to the difference between the red components is set as the fourth threshold value. Here, for each center pixel, if the difference of the blue component is higher than the difference of the green component by a third predetermined value and higher than the difference of the red component by a fourth predetermined value, the center pixel is determined to have an emulsion scratch. It can be considered that the pixel value of the blue component is greatly increased due to the influence. Therefore, when the difference of the blue component is higher than the third threshold value and the fourth threshold value, by further adding a condition for determining the center pixel as an emulsion scratch pixel, it is possible to realize more accurate emulsion scratch determination. .
[0032]
If a photographic film has a large emulsion flaw, infrared light is directly transmitted, and the pixel value of the infrared image data of such an emulsion flaw pixel may increase on the contrary. Pixels affected by such emulsion flaws may not be determined as emulsion flaw pixels based on the second threshold. However, since the third threshold value and the fourth threshold value are irrelevant to the infrared image data, such an adverse effect can be prevented by using the third threshold value and the fourth threshold value instead of the second threshold value.
[0033]
In addition to the above procedure, the emulsion scratch determination method of the present invention further comprises the step of, when the pixel value of the blue component of the central pixel is equal to or greater than a fifth predetermined value and the pixel value of the green component is equal to or greater than a sixth predetermined value. May be determined as an emulsion scratch pixel.
[0034]
As described above, on the emulsion side of the film, each dye is composed of a blue photosensitive layer, a green photosensitive layer, and a red photosensitive layer in order from the film surface to the base surface. Therefore, when the emulsion surface of the film is damaged, the blue photosensitive layer, the green photosensitive layer, and the red photosensitive layer tend to be cut in this order. Therefore, in the case of an emulsion scratch which has been cut down to the red photosensitive layer, since the blue photosensitive layer and the green photosensitive layer are not present at all, the blue component of the pixel affected by such an emulsion scratch is present. Is considered to be equal to or greater than the fifth predetermined value, and the pixel value of the green component is considered to be equal to or greater than the sixth predetermined value. Therefore, by further using the above conditions, it is possible to realize more accurate emulsion flaw determination.
[0035]
In addition to the above-described procedure, the emulsion scratch determination method of the present invention includes, as the first pixel group, an innermost pixel group connected in a ring around the center pixel, and an n-th pixel group (n = 1, 2,..., N), the innermost pixel group connected in a ring is defined as the (n + 1) th pixel group, and the outermost circumference in the above-mentioned predetermined range becomes the (N + 1) th pixel group. The method may be characterized in that the normal pixels are searched from the pixel group close to the central pixel for each pixel group, and the search is terminated when the total number of searched normal pixels is equal to or more than a predetermined number.
[0036]
According to the above procedure, at the outer periphery of the center pixel, the innermost peripheral pixel group connected in a ring shape is set as the first pixel group, and the n-th pixel group (n = 1, 2,..., N) On the outer periphery, the innermost peripheral pixel group connected in a ring is defined as the (n + 1) th pixel group, and the outermost periphery of the predetermined range is set to be the (N + 1) th pixel group. Thereby, the pixels within the predetermined range can be classified into each pixel group according to the distance from the center pixel. Further, the normal pixels are searched from the pixel group close to the central pixel for each pixel group, and the search is terminated when the total number of the searched normal pixels is equal to or more than a predetermined number. Thereby, it is possible to preferentially search for normal pixels located at a position closer to the center pixel, and when a predetermined number or more of normal pixels can be searched, a normal pixel further away from the center pixel is not searched. Can be set as follows. Further, a pixel located closer to the center pixel has image information closer to the center pixel. Therefore, according to the above procedure, it is possible to preferentially search for a normal pixel having image information as close as possible to the center pixel.
[0037]
The emulsion scratch determination method of the present invention is characterized in that, in addition to the above-described procedure, among the pixels of the digital image data, a pixel whose corresponding infrared image data has a pixel value lower than the CF value is set as the central pixel. It may be.
[0038]
The CF value refers to a pixel value of infrared image data in a pixel that is not affected by any flaws. Therefore, a pixel having a pixel value of the infrared image data lower than the CF value can be considered to be affected by some kind of flaw.
[0039]
Therefore, if the pixel whose pixel value of the corresponding infrared image data is lower than the CF value among the pixels of the digital image data is set as the central pixel, it is not necessary to determine the emulsion scratch for all the pixels, and the processing speed is reduced. Improvement can be achieved.
[0040]
In addition to the above-described procedure, the emulsion scratch determination method of the present invention searches for a pixel having a pixel value of the infrared image data having a CF value or more among the pixels within the predetermined range, and regards the pixel as a normal pixel. May be a feature.
[0041]
As described above, a pixel whose pixel value of the infrared image data is lower than the CF value can be considered to be affected by some kind of flaw. Therefore, among the pixels within the above-mentioned predetermined range, a pixel whose pixel value of the infrared image data is not less than the CF value can be determined as a normal pixel which is not affected by the emulsion scratch or the scratch on the base surface of the film. Therefore, according to the above procedure, detection of a normal pixel becomes easy.
[0042]
The emulsion scratch determination method of the present invention, in addition to the above-described procedure, includes a case where a pixel having a pixel value equal to or more than a CF value with respect to infrared image data does not exist within the predetermined range, and each pixel within the predetermined range. Rdat, which is the average of the pixel values of the red, green, and blue componentsm + i, n + jIs the average value Rdat of the pixel value of the red component, the pixel value of the green component, and the pixel value of the blue component of the pixel that has already been determined to be an emulsion scratch pixel.M, NIf the pixel is lower than the seventh predetermined value, the pixel may be set as a normal pixel.
[0043]
As described above, the pixel value of the emulsion scratched pixel is increased as compared with the case where there is no scratch. In the case of pixels affected by scratches other than emulsion scratches, if the effects of the scratches are small, the pigments on the film are not removed. Therefore, the pixel value of the pixel less affected by the flaw does not increase in the pixel value as compared with the state without the flaw. Therefore, a pixel in which the average value of the pixel value of the red component, the pixel value of the green component, and the pixel value of the blue component is lower by a predetermined value than the pixel already determined to be an emulsion scratch pixel is relatively shallow. It can be determined as a pixel.
[0044]
On the other hand, when there is no pixel having a pixel value equal to or larger than the CF value in the infrared image data within the predetermined range, all the pixels within the predetermined range are considered to be affected by some kind of flaw. In such a case, if a normal pixel is searched for based on the CF value, no normal pixel can be searched for, so that the emulsion scratch determination cannot be performed.
[0045]
Therefore, according to the above procedure, for each pixel within the predetermined range, Rdat which is the average value of the red component pixel value, the green component pixel value, and the blue component pixel value.m + i, n + jIs the average value Rdat of the pixel value of the red component, the pixel value of the green component, and the pixel value of the blue component of the pixel that has already been determined to be an emulsion scratch pixel.M, NIf the pixel is lower than the seventh predetermined value, the pixel is determined to be a normal pixel. That is, pixels which are not affected by emulsion scratches and have relatively shallow scratches are regarded as normal pixels. Therefore, even when there is no pixel which is not affected by the scratch at all in the above-mentioned predetermined range, it is possible to perform the emulsion scratch determination.
[0046]
In addition to the above-described procedure, the emulsion scratch determination method of the present invention includes, for each pixel of the digital image data, a filter having an area of α × β pixels, and determining that the pixel is an emulsion scratch pixel in the filter area. When a predetermined number or more pixels are present, all pixels other than the emulsion scratch pixels in the filter area may be set as correction target pixels.
[0047]
Around the emulsion scratched pixel, there is a pixel which is affected by the emulsion scratched due to the "optical scratch erasing effect" or the "averaging effect" but is not determined to be an emulsion scratched pixel.
[0048]
Therefore, according to the above procedure, if a predetermined number or more of pixels determined to be emulsion scratch pixels exist in the filter region of α × β pixels, all pixels other than the emulsion scratch pixels are corrected in the filter region. It is the target pixel. As a result, not only the emulsion scratch pixel but also a pixel which is affected by the emulsion scratch but is not determined as the emulsion scratch pixel can be included in the target of the emulsion scratch removal processing. Note that α and β are natural numbers. Α and β may be the same natural number.
[0049]
Further, the processing according to the emulsion scratch determination method may be a program to be executed by a computer. Further, the above-mentioned emulsion scratch judging program may be recorded on a recording medium so as to be readable by a computer.
[0050]
BEST MODE FOR CARRYING OUT THE INVENTION
The present invention relates to an emulsion flaw determination method and an emulsion flaw determination method for accurately detecting pixels (hereinafter, referred to as "emulsion flaw pixels") affected by emulsion flaws of a photographic film in digital image data taken from a photographic film. It concerns the device. Here, in the present embodiment, first, pixels (hereinafter, referred to as “base flaw pixels”) affected by flaws on the base surface of the photographic film (hereinafter, referred to as “base flaws”) are included in the digital image data. The effect of the base flaw is removed by the base flaw removal processing. Then, emulsion scratch pixels are detected from the digital image data, and the effects of emulsion scratches are removed by emulsion scratch removal processing.
[0051]
Therefore, in the following, a system in which the base flaw removal processing, the emulsion flaw detection processing, and the emulsion flaw removal processing are executed, the preprocessing procedure of these processing, the base flaw removal processing procedure, the emulsion flaw detection processing procedure, and the emulsion flaw removal processing The procedure of the process will be described.
[0052]
An embodiment of the present invention will be described below with reference to the drawings. FIG. 2 is a block diagram illustrating a schematic configuration of the image output system according to the present embodiment. The image output system includes a film scanner 1, an image processing device 2, and a photographic printing device 3.
[0053]
The film scanner 1 irradiates, for example, light from a light source onto a negative film, which is a photographic film, and receives the transmitted light with a CCD or the like, thereby reading an image recorded on the negative film. The film scanner 1 outputs the read digital image data to the image processing device 2 for each of a red component, a green component, and a blue component. Hereinafter, a case where digital image data of a red component, a green component, and a blue component read from visible light are collectively referred to as visible light image data is referred to as appropriate.
[0054]
Further, the film scanner 1 reads digital image data of the negative film by irradiating the negative film with infrared light and receiving transmitted light in the infrared region by a CCD or the like. In the following, digital image data read from infrared light is referred to as infrared image data.
[0055]
The image processing device 2 executes a base flaw removal processing, an emulsion flaw detection processing, and an emulsion flaw removal processing using the visible light image data and the infrared image data sent from the film scanner 1. Note that the image processing apparatus 2 is configured by, for example, a PC (Personal Computer) -based apparatus, and although not shown, is configured by a PC main body, display means such as a monitor, input means such as a keyboard, a mouse, and the like. The image processing device 2 will be described later in detail.
[0056]
The photographic printing device 3 prints an image on photographic paper by exposing photographic paper, which is a photosensitive material, based on the visible light image data processed by the image processing device 2. As a head for irradiating the photographic paper with light corresponding to the visible light image data, a light modulation element capable of modulating the irradiating light to the photographic paper for each pixel according to the visible light image data is used. Examples of such a light modulation element include a PLZT exposure head, a DMD (digital micromirror device), an LCD (liquid crystal display), an LED (Light Emitting Diode) panel, a laser, a FOCRT (Fiber Optic Cathode Ray Tube), CRT (Cathode Ray Tube) and the like.
[0057]
The photographic printing apparatus 3 may be configured as an auto printer capable of performing both scanning of a negative film and exposure of photographic paper. In this case, by simplifying the system, the image output system is configured by connecting an auto printer that performs image reading to printing to the image processing apparatus 2 including a PC (Personal Computer) or the like. be able to.
[0058]
Next, the image processing device 2 will be described in detail. The image processing device 2 includes a pre-processing unit 4, a base flaw removing unit 5, an emulsion flaw determining unit (emulsion flaw determining unit) 6, and an emulsion flaw removing unit 7.
[0059]
The pre-processing unit 4 is a block that executes processing that is a stage before the base flaw removal processing and the emulsion flaw detection processing. Specifically, the pre-processing unit 4 calculates the true CF value (CF value, clear film value) which is the pixel value of the infrared image data of the pixel not affected by the flaw (hereinafter referred to as “normal pixel”). This is the block to be calculated. The term "scratch" means both the base scratch and the emulsion scratch.
[0060]
Pixels correspond to each other in infrared image data and visible light image data obtained from the same photographic film. On the other hand, the infrared light transmitted through the film is affected by the base flaw of the film, but is not affected by the pigment of the film. That is, although the infrared image data includes the information of the base flaw, it does not include the image information formed on the film, and the pixels affected by the base flaw (hereinafter, referred to as “flaw pixels”) In the case of ()), the pixel value tends to decrease from the state without scratches. Therefore, the true CF value can be used as a threshold for distinguishing a normal pixel from a base flaw pixel, and a pixel having a pixel value of infrared image data equal to or less than the real CF value can be determined as a base flaw pixel. .
[0061]
However, even if base flaw pixels can be detected in this way, it is difficult to detect only emulsion flaw pixels by such a method. Therefore, another detection procedure is required to accurately detect only the emulsion scratched pixels.
[0062]
The base flaw removal unit 5 is a block that executes the above-described base flaw removal processing. Specifically, the base flaw removing unit 5 calculates the pixel value reduction amount of the base flaw pixel from the state without the flaw by subtracting the pixel value of the infrared image data from the main CF value for the base flaw pixel. In addition, the block executes a process of adding the pixel value reduction amount to each pixel value of the red component, the green component, and the blue component in the visible light image data.
[0063]
Here, as shown in FIG. 11, although the base flaw has a flaw on the base surface on the photographic film, the base flaw is basically not missing, so that there is no flaw on the base flaw pixel. It is considered that the pixel value reduction amount from the state is substantially equal for the red component, the green component, and the blue component. Therefore, for each base flaw pixel, the pixel value reduction amount, which is the difference between the actual CF value and the pixel value of the infrared image data, is added to the pixel values of the red, green, and blue components to obtain the base flaw. Can be removed from the base scratched pixel.
[0064]
However, emulsion scratches are those in which the dyes of each color component of the photographic film are missing. Therefore, the pixel value of the visible light image data at the emulsion scratch pixel increases from the state without the emulsion scratch. Further, the amount of missing pigment differs for each color component. Therefore, the amount of increase in the pixel value of the emulsion scratch pixel from the state where there is no scratch on the visible light image data differs for each of the red component, the green component, and the blue component. Therefore, in order to remove the influence of the emulsion scratch from the emulsion scratch pixel, a process different from the above-described base scratch removal process is required, and the emulsion scratch removal process described later is required.
[0065]
The emulsion flaw determining section 6 detects the emulsion flaw pixel using the infrared image data and the visible light image data processed by the pre-processing section 4, and detects a predetermined pixel in the detected emulsion flaw pixel and its surroundings. This is a block for creating an emulsion scratch map indicating the position of a pixel to be corrected, which is a pixel. As shown in FIG. 4, the emulsion flaw determining unit 6 includes a first determining unit 6a, a normal pixel searching unit 6b, a pixel value calculating unit 6c, a threshold setting unit 6d, a second determining unit (determining unit) 6e, The processing procedure of each block is described in detail later.
[0066]
The emulsion scratch removal unit 7 refers to the peripheral region image for the emulsion scratch pixel and the correction target pixel shown in the emulsion scratch map, and creates a pixel value for each color component of the visible light image data. This is a block for executing processing.
[0067]
Next, the flow of processing in the image processing apparatus 2 will be described based on the flowchart shown in FIG. First, in step 1 (hereinafter referred to as “S1”), the pre-processing unit 4 reads the visible light image data and the infrared image data which are taken in from the photographic film by the film scanner 1 and sent from the film scanner 1. To get.
[0068]
Then, the preprocessing unit 4 calculates a temporary CF value (hereinafter, referred to as a “temporary CF value”) (S2). Here, the temporary CF value is similar to the main CF value in that it is a value that can be considered as a pixel value of the infrared image data of a normal pixel, but is a threshold necessary for a second regression equation described later. This is different from the above-mentioned actual CF value.
[0069]
Here, the calculation of the temporary CF value is executed by the following calculation. The pre-processing unit 4 performs, for each pixel of the visible light image data of the red component (hereinafter, appropriately referred to as “red image data”) and the infrared image data corresponding to each other,
First variable X = (pixel value of red image data) − (pixel value of infrared image data) + (average value of pixel values of infrared image data)
Find a second variable Y = (pixel value of red image data),
A regression calculation for obtaining the coefficients a and b of the first regression equation Y = aX + b is performed.
[0070]
Here, the infrared image data is basically not affected by the image information recorded on the photographic film. Therefore, although the infrared image data formed by the infrared light transmitted through the photographic film includes the information on the base flaw, the information on the dye on the film is basically not included. Therefore, in the infrared image data, the pixel value of the base flaw pixel tends to decrease from the state without flaw.
[0071]
Here, assuming that the average value of the pixel values of each pixel of the infrared image data is the pixel value of the infrared image data in the normal pixel,-(pixel value of the infrared image data) + (pixel value of the infrared image data) (Average of the values) can be assumed as the pixel value reduction amount due to the base flaw, and the intercept b calculated from the above-described first regression equation can be considered as the pixel value reduction amount due to the base flaw.
[0072]
It should be noted that only pixels for which the first variable X is equal to or less than the second variable Y are set as targets of the first regression equation. This is calculated if the second variable Y is smaller than the first variable X, the corresponding pixel is very likely to be a base flaw pixel, and such pixels are excluded from the regression calculation. This is to improve the accuracy of the temporary CF value.
[0073]
Next, the temporary CF value can be calculated from the temporary CF value = (average pixel value of infrared image data) + b. This is because the average value of the pixel values of the infrared image data decreases due to the base flaw. Therefore, the difference between the provisional CF value and the average value of the pixel values of the infrared image data is considered to be the pixel value reduction amount due to the base flaw. Because it can be.
[0074]
Further, it is preferable that the provisional CF value is set at about 96% of (the average value of the pixel values of the infrared image data + b). This is because the calculated value (the average value of the pixel values of the infrared image data + b) slightly fluctuates due to noise generated from the CCD, etc. This is because it is about 96% of the average value of the pixel values + b). Since the provisional CF value is logarithmic,
Temporary CF value = (average pixel value of infrared image data) + b + log (γ)
(However, γ = 0.96)
Can be used to calculate the temporary CF value. However, the above-mentioned ratio (96%) and γ (0.96) are not limited to 96% and 0.96, but are values that can be appropriately changed according to the device in which this procedure is used.
[0075]
Further, the preprocessing unit 4 performs processing of outputting corrected infrared image data by removing red leakage from the infrared image data (S3). Here, the red leakage means that the wavelength region of the infrared light overlaps with the wavelength region of the red component light absorbed by the film, and the infrared image data and the red image data correspond to each other in the infrared light. This is a phenomenon in which each pixel value of the image data includes each pixel value of the red image data. Even if the actual CF value is determined using the infrared image data in which the red leakage remains mixed, a highly accurate value cannot be obtained. Therefore, prior to calculating the actual CF value, the processing of S3 is performed.
[0076]
Here, the process of removing the red leakage from the infrared image data is performed by the following calculation. The preprocessing unit 4 targets pixels whose pixel values of the infrared image data are equal to or greater than the provisional CF value,
Third variable e = (pixel value of red image data)
A fourth variable f = (pixel value of infrared image data) is obtained,
The coefficient c of the second regression equation f = ce is obtained.
If the pixel value of the red image data is mixed with the pixel value of the infrared image data, there is a correlation between the pixel value of the red image data and the pixel value of the infrared image data. May be the ratio of the red leakage included in the pixel value of the red image data. Also, in the second regression equation, only pixels whose pixel values of the infrared image data are equal to or greater than the provisional CF value are excluded because pixels considered to be base flaw pixels are excluded from the targets of the second regression equation. Then, the ratio of the red leakage is accurately obtained.
[0077]
Then, the preprocessing unit 4 calculates, for each pixel,
IR = (pixel value of infrared image data)
R = (pixel value of red image data)
IR ′ = (IR−c × R) / (1−c)
Is calculated. Here, (IR-c × R) is obtained by removing red leakage from the pixel value of the infrared pixel data by subtracting c × R indicating the red leakage from the pixel value of the infrared image data. Further, the reason why (IR−c × R) is divided by (1−c) is to normalize the pixel values of the infrared image data after removing the red leakage. Then, the infrared image data composed of IR ′ is corrected infrared image data from which red leakage has been removed. The infrared image data from which the red leakage has been removed is referred to as corrected infrared image data.
[0078]
Next, the preprocessing unit 4 calculates the actual CF value (S4). Here, the actual CF value is obtained from the corrected infrared image data and the red image data in the same procedure as in S2. That is, the pre-processing unit 4 determines, for each pixel of the red image data and the corrected infrared image
Fifth variable p = (pixel value of red image data) − (pixel value of corrected infrared image data) + (average value of pixel values of corrected infrared image data)
A sixth variable q = (pixel value of red image data) is obtained,
A regression calculation for obtaining a coefficient h of a third regression equation q = gp + h is performed.
[0079]
Note that only the pixels in which the fifth variable p is equal to or less than the sixth variable q are set as targets of the third regression equation. Then, the actual CF value is calculated by an arithmetic expression of actual CF value = (average pixel value of corrected infrared image data) + h.
[0080]
Further, it is preferable that the actual CF value is set at about 96% of (the average value of the pixel values of the corrected infrared image data + h). This is because the calculated value (the average value of the pixel values of the corrected infrared image data + h) slightly fluctuates due to noise or the like generated from the CCD. This is because it is about 96% of the average of the pixel values of the data + h). Since the CF value is logarithmic,
Main CF value = (average pixel value of corrected infrared image data) + b + log (δ)
(However, δ = 0.96)
Can be used to calculate the actual CF value. However, the above-mentioned ratio (96%) and δ (0.96) are not limited to 96% and 0.96, but are values that can be appropriately changed according to the device in which this procedure is used.
[0081]
That is, in the processing of S2 to S4, the preprocessing unit 4 first calculates a temporary CF value before obtaining the main CF value, and uses this temporary CF value as a threshold to determine only pixels that can be considered normal pixels. To detect. Then, only the pixels that can be considered normal pixels are used in the second regression equation for calculating the red leakage, so that highly accurate red leakage can be calculated. This makes it possible to obtain corrected infrared image data in which red leakage has been removed from the infrared image data. In other words, the corrected infrared image data from which the red leakage has been removed is data that includes more accurate information on base flaws than the infrared image data.
[0082]
Since the actual CF value is obtained based on the corrected infrared image data, the actual CF value is closer to the pixel value of the infrared image data of the normal pixel than the temporary CF value. Thereafter, the preprocessing unit 4 outputs the corrected infrared image data and the visible light image data to the base flaw removing unit 5.
[0083]
Further, the base flaw removing unit 5 performs base flaw removal processing on the visible light image data based on the actual CF value (S5). Here, the base flaw removal processing is performed according to the following procedure.
[0084]
The base flaw removing unit 5 determines a pixel whose pixel value of the corrected infrared image data is lower than the main CF value as a base flaw pixel. Further, the base flaw removing section 5 is provided for each base flaw pixel.
(Correction amount) = (main CF value) − (pixel value of corrected infrared image data)
Is calculated. Then, for each base flaw pixel, the base flaw removing unit 5 adds the above correction amount to the pixel value of each color component in the visible light image data, and outputs the visible light image data after the base flaw removal. Thereby, the base flaw removal processing is completed.
[0085]
Next, each block in the emulsion flaw determining unit 6 detects an emulsion flaw pixel based on the visible light image data and the corrected infrared image data obtained in S5 (S6). This process will be described in detail with reference to FIG.
[0086]
First, the first determination unit 6a detects a damaged pixel (a pixel other than a normal pixel) using the main CF value as a threshold (S6a). In S4,
Main CF value = (average pixel value of corrected infrared image data + h) + log δ (1)
(However, δ = 0.96)
, The actual CF value is preferably set at δ = 0.97 in S6. This is because it has been empirically recognized that the pixel value of the infrared image data in the emulsion scratch pixel tends to be slightly higher than the pixel value of the infrared image data in the base scratch pixel. Then, the first determination unit 6a determines, for each pixel corresponding to each other in the visible light image data and the corrected infrared image data obtained in S5,
IRdatx, y<Main CF value ... (2)
IRdatx, y: Pixel value of infrared image data of each pixel
Pixels satisfying the above are detected as flawed pixels.
[0087]
Next, the normal pixel search unit 6b sets each of the defective pixels detected by the first determination unit 6a as a central pixel [m, n] in a peripheral region of 7 × 7 pixels around the central pixel [hereinafter, this region]. Is set as a "search range") to search for normal pixels (S6b). Here, the number of pixels in the search range can be changed as appropriate. Therefore, the normal pixel search unit 6b searches for normal pixels located in a predetermined range around the center pixel. This processing will be described in detail below.
[0088]
The normal pixel is
IRdatm + i, n + j≧ this CF value ... (3)
IRdatm + i, n + j: Pixel value of infrared image data of each pixel [m + i, n + j] in the search range corresponding to each central pixel [m, n]
Pixels satisfying the following conditions. That is, the normal pixel corresponds to a pixel other than the damaged pixel.
[0089]
First, the normal pixel search unit 6b sets the coordinates of each of the center pixels to [m, n], and searches for a normal pixel in the search range in order from a pixel group existing at a position closer to the center pixel.
[0090]
Specifically, as shown in FIG. 5, the normal pixel search unit 6b first searches for a normal pixel in the first pixel group surrounding the central pixel. That is, the normal pixel search unit 6b searches the eight pixels surrounding the center pixel for a pixel that satisfies (3) as a normal pixel.
[0091]
Next, the normal pixel search unit 6b searches for a normal pixel in the second pixel group surrounding the first pixel group. That is, the normal pixel search unit 6b searches the 16 pixels surrounding the first pixel group for a pixel satisfying (3) as a normal pixel. At this point, if the total number of searched normal pixels is 10 or more, the normal pixel search unit 6b ends the search processing and shifts to the processing of S6d (S6b YES).
[0092]
If the total number of normal pixels is less than 10, the normal pixel search unit 6b searches for normal pixels in the third pixel group surrounding the second pixel group. That is, the normal pixel search unit 6b searches the 24 pixels surrounding the second pixel group for a pixel satisfying (3) as a normal pixel. At this point, if the total number of searched normal pixels is 10 or more, the normal pixel search unit 6b ends the search processing and shifts to the processing of S6d (S6b YES).
[0093]
The normal pixel search unit 6b repeats such processing up to the seventh pixel group. That is, the seventh pixel group is a pixel group located at the outermost periphery of the search range. Here, at the point in time when the search in the seventh pixel group is completed, if at least one normal pixel has been accumulated, the process proceeds to S6d (YES in S6b). On the other hand, if no normal pixels have been added, the process proceeds to S6c (S6b NO).
[0094]
In addition, in the process of S6b, every time each pixel group is searched, if 10 or more normal pixels are accumulated, the process of S6b ends at that point. This is because, in order to search for a normal pixel showing the same image information as the center pixel as much as possible, priority is given to searching for a normal pixel located at a position close to the center pixel. This is to prevent the normal pixels located further away from being accumulated at the time of completion.
[0095]
In the process of S6b, the predetermined range for searching for a normal pixel is set to a range of 7 × 7 pixels, and the search process ends when 10 or more pixels are searched, but the present invention is not limited to this. That is, on the outer periphery of the center pixel, the innermost peripheral pixel group connected in a ring is defined as the first pixel group, and on the outer periphery of the n-th pixel group (n = 1, 2,..., N), The innermost pixel group connected to the pixel group is the (n + 1) th pixel group, and the outermost circumference of the predetermined range is the (N + 1) th pixel group. , And if the total number of searched normal pixels is equal to or greater than a predetermined number, the search may be terminated. Further, the procedure is not limited to the procedure of S6b as long as the procedure can search for a normal pixel located in a predetermined range around the central pixel.
[0096]
Here, a specific example of the normal pixel search process will be described with reference to FIG. As shown in FIG. 6A, it is assumed that there are 29 normal pixels (pixels marked with ○) around the center pixel (black pixel). In this case, first, as illustrated in FIG. 6B, the normal pixel search unit 6b searches for three normal pixels belonging to the first pixel group surrounding the center pixel. Next, as shown in FIG. 6C, the normal pixel searching unit 6b searches for four normal pixels belonging to the second pixel group surrounding the first pixel group. As a result, the number of normal pixels to be accumulated is seven, and since the total number of searched normal pixels is less than 10, the normal pixel search unit 6b continues the normal pixel search process. Further, as shown in FIG. 6D, the normal pixel search unit 6b searches for seven normal pixels belonging to a third pixel group surrounding the second pixel group. As a result, the cumulative number of normal pixels is 14, and the cumulative number of searched normal pixels is 10 or more, so the normal pixel search unit 6b ends the search processing. FIG. 10 shows a specific example in which the procedure of S6b is represented as a program for causing a computer to execute the procedure.
[0097]
Next, a case where no normal pixel is detected in the process of S6b (S6b NO) will be described. In this case, the normal pixel search unit 6b changes the condition (3), which is a condition for searching for a normal pixel, and performs the search process again (S6c).
[0098]
In this case, the normal pixel search unit 6b determines the color component of the pixel [M, N] determined by the second determination unit 6e to be an emulsion scratch immediately before the center pixel [m, n] is detected by the first determination unit 6a. The average value of the pixel values for each pixel is used as a condition for searching for a normal pixel. This procedure will be described in detail below.
[0099]
In the search range corresponding to a certain central pixel [m, n], the fact that no normal pixel was detected means that all the pixels in the search range for that central pixel [m, n] are flawed pixels. become. On the other hand, among the flawed pixels, pixels having relatively shallow flaws such as base flaws have no increase in the pixel value of visible light image data, but emulsion flawed pixels have no flaws as described above. The pixel value of the visible light image data is higher than the state.
[0100]
Therefore, in S6c, such a shallow pixel is regarded as a normal pixel, so that the normal pixel is searched for and the subsequent processing is continued. Therefore, S6c is a procedure in which the condition for searching for a normal pixel is relaxed, the condition of (3) is changed to (3) ', and the search for a normal pixel is performed again.
[0101]
Here, the normal pixel search unit 6b calculates the average value of the pixel value of the red component, the pixel value of the green component, and the pixel value of the blue component for the pixel determined to be the emulsion scratch by Ddat.M, NAsk for. Further, the normal pixel search unit 6b calculates, for each pixel within the search range, the average value Ddat of the red component pixel value, the green component pixel value, and the blue component pixel value.m + i, n + jIs calculated. Then, the normal pixel search unit 6b sets the following condition (3) ′.
Ddatm + i, n + j<DdatM, N+ Ε ... (3) '
(Ε = 0 to 0.1)
Set. Note that ε is a seventh predetermined value.
[0102]
That is, immediately before the center pixel is detected, the pixel determined by the second determination unit 6e to be an emulsion scratch pixel is used as the condition (3) '. A pixel whose average value of the pixel value of the red component, the pixel value of the green component, and the pixel value of the blue component is lower than the emulsion scratch pixel by a seventh predetermined value is determined to be a pixel having a shallow scratch. Is regarded as a normal pixel. However, when [M, N] does not exist, the process is terminated without executing the process of S6c and performing emulsion scratch determination for the center pixel [m, n]. In this procedure, the condition (3) 'is set using the pixel determined to be an emulsion scratch immediately before [m, n] is detected. It is not necessary that the pixel is determined to be an emulsion scratch immediately before.
[0103]
In this procedure, ε as the seventh predetermined value is set between 0 and 0.1. This is because the value of ε is appropriately changed according to the device or system in which this procedure is executed.
[0104]
Then, the normal pixel search unit 6b searches for a pixel satisfying the condition (3) ′ in the search range corresponding to the center pixel [m, n], and accumulates the pixels satisfying this condition as normal pixels. In S6c, it is preferable that only the seventh pixel group shown in FIG. 5 is set as a search target. The reason will be described below. In this process, in step S6c, the search process is performed again for the central pixel in which no normal pixel exists in the search range in the procedure of S6b while relaxing the conditions. Therefore, it is considered that there is a high possibility that a deeply damaged pixel exists in the near phosphorus of the center pixel. Therefore, by searching for peripheral pixels at a position distant from the center pixel to some extent, only pixels with as few scratches as possible are to be searched. However, only the seventh pixel group may not be the search target, all the pixel groups within the search range may be the search target, or only one of the pixel groups is designated, and only the designated pixel group is the search target. No problem.
[0105]
Then, if at least one normal pixel that satisfies the condition (3) ′ can be searched, the normal pixel search unit 6b ends the search processing of S6c and shifts to S6d (S6c YES). On the other hand, when a normal pixel that satisfies the condition of (3) ′ cannot be searched, the normal pixel search unit 6b ends the process without determining an emulsion scratch pixel for the center pixel (S6b NO).
[0106]
Next, for each central pixel [m, n], the pixel value calculation unit 6c calculates an average value Rave of pixel values for each normal pixel searched in S6b or S6c.m, n, Gavem, n, Bavem, n, IRavem, nAnd calculate Ravem, n, Gavem, n, Bavem, nDave which is the average value ofm, nIs calculated (S6d). In addition, Ravem, nIs the average value of each pixel value of the red component of the normal pixel, Gavem, nIs the average value of each pixel value of the green component of the normal pixel, Bavem, nIs the average value of each pixel value of the blue component of the normal pixel, IRavem, nIndicates the average value of each pixel value of the corrected infrared image data of the normal pixel. That is, for a certain central pixel [m, n], the average value of the pixel values of the normal pixels searched in S6b or S6c is determined for each color component, and the average value of the pixel values of the corrected infrared image data is calculated. are doing.
[0107]
Here, Ravem, n, Gavem, n, Bavem, n, IRavem, nIs used to calculate all the normal pixels accumulated at the end of the search processing. That is, when the total number of normal pixels at the end of the search processing is, for example, 14 pixels, the peripheral normal pixels used for calculating the average pixel value of each color component are all 14 pixels, not 10 pixels.
[0108]
Also, Davem, nIs Rave in each normal pixel detected from the search range corresponding to each central pixel [m, n].m, n, Gavem, n, Bavem, nCalculated from
[0109]
(Equation 1)
Figure 2004132743
[0110]
That is, Dave for each central pixel [m, n]m, nIs Ravem, n, Gavem, n, Bavem, nMean.
[0111]
Next, the threshold setting unit 6d calculates the Dave calculated by the pixel value calculation unit 6c for each central pixel [m, n].m, nIs calculated based on the first threshold value (S6e).
[0112]
(Equation 2)
Figure 2004132743
[0113]
Here, the reason why the first threshold is set will be described. A group of pixels belonging to a certain area around the center pixel can be generally considered as a pixel indicating the same subject as the center pixel. Therefore, Rave, which is the average value of the pixel values of the normal pixels located in the peripheral region of the center pixel,m, n, Gavem, n, Bavem, nIs a pixel value Rdat for each color component in a state where the center pixel is not damaged.m, n, Gdatm, n, Bdatm, nCan be considered.
[0114]
On the other hand, in the emulsion scratch, since the dye on the film is missing, the pixel value of at least one of the color components in the visible light image data of the emulsion scratch pixel is increased by a predetermined amount from the state without the scratch. There is a tendency. Therefore, the average value of the pixel values of each color component of the visible light image data of the central pixel [m, n] is calculated as Ddat.m, nThen Ddatm, nIs Davem, nThis is because it is considered to be larger than the first predetermined value よ り. In this procedure, ζ as the first predetermined value is set between 0 and 0.1. This is because the value of , is appropriately changed according to the device or system in which this procedure is executed. Note that Ddatm, nIs calculated by the following calculation.
[0115]
(Equation 3)
Figure 2004132743
[0116]
Next, the threshold setting unit 6d calculates the IRave calculated by the pixel value calculation unit 6c for each central pixel [m, n].m, nThe second threshold value is calculated based on (S6f).
[0117]
(Equation 4)
Figure 2004132743
[0118]
Here, the reason for setting the second threshold will be described. Regarding the corrected infrared image data, IRave which is the average value of the pixel values of the normal pixels located in the peripheral area of the central pixel is also used.m, nCan be regarded as a pixel value in a state where there is no flaw in the center pixel. Further, as described above, although the pixel value of the infrared image data tends to be slightly higher in the emulsion scratch pixel than in the base scratch pixel, it tends to be lower than the normal pixel. Therefore, the pixel value of the corrected infrared image data at each central pixel is set to IRdatm, nWhen the center pixel is an emulsion scratch pixel, IRdatm, nIs IRavem, nThis is because it is considered to be lower by the second predetermined value. In this procedure, η as the second predetermined value is set between 0 and 1. This is because the value of η is appropriately changed according to the device or system in which this procedure is executed.
[0119]
Further, it is preferable that the second predetermined value is set to be lower (set to about 0.05 lower) for the central pixel that has undergone the processing of S6c than for the central pixel that has undergone the processing of S6b. In the center pixel that has gone through the procedure of S6c, all pixels within the search range are flawed pixels, and the IRavem, nIs lower than a pixel value obtained from an actual normal pixel. Therefore, with respect to the center pixel that has gone through the procedure of S6c, the second threshold value is set slightly higher, thereby making the determination of emulsion scratching appropriate.
[0120]
Further, the threshold value setting unit 6d calculates, for each color component, the difference between the pixel value of the central pixel and the average value of the pixel values of each normal pixel within the search range corresponding to the central pixel for the visible light image data. (S6g).
[0121]
(Equation 5)
Figure 2004132743
[0122]
Thereafter, the threshold setting unit 6d determines Gdif for each central pixel.m,n, Rdifm,nThe third threshold value and the fourth threshold value are calculated based on (S6h).
[0123]
(Equation 6)
Figure 2004132743
[0124]
Here, the reason why the third threshold value and the fourth threshold value are set will be described. As shown in FIG. 7, the emulsion scratch refers to a scratch in which the emulsion surface of the film has been removed. Therefore, there is a high tendency that the blue photosensitive layer, the green photosensitive layer, and the red photosensitive layer are removed in this order. Therefore, in the emulsion scratched pixel, the amount of increase in the pixel value of the blue component from the state without scratches tends to be larger than the amount of increase in the pixel value of the other color components. Therefore, when the center pixel is an emulsion scratch pixel, Bdifm, nIs Gdifm, nHigher than the third predetermined value, Rdifm, nThis is because it is supposed to be higher by the fourth predetermined value. In this procedure, ι as the third predetermined value and κ as the fourth predetermined value are set between 0 and 0.4. This is because if the device or system in which this procedure is executed is different, ι and κ are appropriately changed accordingly.
[0125]
Further, when the pixel is affected by the emulsion scratch, the increase amount of the pixel value of the green component is larger than the increase amount of the pixel value of the red component. And setting a fourth threshold value.
[0126]
Next, the second determination unit 6e determines whether or not each central pixel is an emulsion scratch pixel (S6i). First, the second determination unit 6e determines (1) Ddatm, n> First threshold, (2) IRdatm, n<Second threshold, (3) Bdifm, n> Third threshold, (4) Bdifm, n> Fourth threshold is set.
[0127]
Then, the second determination unit 6e determines that the center pixel satisfying the conditions (1) + (2) and the center pixel satisfying the conditions (1) + (3) + (4) are emulsion scratch pixels. (That is, the center pixel that satisfies the conditions of (1) + (2) + (3) + (4) is also determined to be an emulsion scratch pixel.) The reason why such a determination is made will be described below.
[0128]
As described above, the emulsion scratches are those in which the pigment of the film is scraped off, and in any one color component of the emulsion scratch pixels, the average value of the pixel values always shows a higher value than the state without scratches. Therefore, (1) is an essential condition in judging an emulsion flaw.
[0129]
In this embodiment, Ddat is set as the condition (1).m, nAlthough the first threshold is set, the condition of (1) is that the pixel value of the center pixel (Rdatm, n, Gdatm, n, Bdatm, n) Is the average value (Rave) of the pixel values of the normal pixels within the search range corresponding to the center pixel.m, n, Gavem, n, Bavem, nIf the center pixel is higher than the predetermined pixel by a predetermined amount, the condition may be such that the center pixel is determined to be an emulsion scratch pixel.
[0130]
On the other hand, when infrared light is irradiated on the emulsion scratch, the infrared light is scattered similarly to the base scratch. Therefore, the emulsion scratch pixel shows a value lower than the pixel value in the state where there is no scratch in the infrared image data. Therefore, the condition (2) can also be used for judging emulsion flaws.
[0131]
However, if the emulsion flaw is too large, infrared light may be directly transmitted without scattering at that portion. In such a case, the pixel value of the infrared image data of the emulsion flaw pixel increases in reverse. Considering such points, it is impossible to judge an emulsion scratch only by the condition (2), so that the condition (2) cannot be an indispensable condition, and a condition instead of the condition (2) is required. .
[0132]
Further, as described above, in the emulsion scratched pixel, the amount of increase in the pixel value of the blue component from the state where there is no scratch tends to be higher than the amount of increase in the pixel values of the other color components. Therefore, the conditions (3) and (4) can also be used for judging emulsion flaws.
[0133]
However, as shown in FIG. 7, when the emulsion surface is shaved by deep scratches on the base surface, the amount of the red photosensitive layer removed is the largest. In the emulsion scratches in this case, the amount of increase in the red pixel value from the state without scratches tends to be higher than the amount of increase in the pixel values of other color components. In consideration of such a point, only the condition of (3) and (4) cannot be an indispensable condition, and a condition replacing (3) and (4) is required.
[0134]
From the above, in S6i, the pixel satisfying (1) + (2) and the pixel satisfying (1) + (3) + (4) are the conditions of the emulsion scratch pixel. However, it may be set so that only pixels satisfying all of the conditions (1) to (4) are determined as emulsion scratch pixels.
[0135]
In particular, when the target visible light image data is obtained from a positive film, it is preferable that only the pixels satisfying all of the conditions (1) to (4) are determined as emulsion scratch pixels. This is because the emulsion side of a positive film after development is usually peeled off, and in the case of a positive film, the difference in the pixel value increase of each color component may be caused by emulsion scratches. This is because the reliability of the conditions of (3) and (4) is low.
[0136]
Further, the second determination unit 6e may determine that the center pixel satisfying the condition of (2) + (5) or the condition of (3) + (4) + (5) is also an emulsion scratch pixel.
[0137]
Ddatm, n> Fifth threshold value ... ▲ 5 ▼
Fifth threshold = Davem, n−μ (μ = 0 to 0.1)
Here, the condition (5) will be described below. In the base flaw removal processing in S5, the pixel value for each color component of the pixel for which undercorrection has occurred is lower than in the state without flaws. Therefore, if the influence of the base flaw remains in the central pixel, the pixel value of each color component of the surrounding normal pixels is lower than the pixel value of each color component of the central pixel. Therefore, by setting the condition (5), the influence of the base flaw can be removed by determining the base flaw pixel not properly corrected in S5 as the emulsion flaw pixel.
[0138]
When the following conditions (6) and (7) are satisfied, the second determination unit 6e may determine the center pixel as an emulsion scratch pixel.
Bdatm, n> 8.294 (fifth predetermined value) ... (6)
Gdatm, n> 8.294 (sixth predetermined value) ... {7}
Here, the reason why the conditions (6) and (7) are set will be described. As described above, the emulsion scratches are those in which the pigment of the film has been removed, and the pixels affected by the emulsion scratches have significantly increased pixel values of the visible light image data (particularly, the pixel values of the blue component and the green component). Component pixel value). Therefore, the center pixel in which the pixel value of the blue component and the pixel value of the red component show a value equal to or greater than a certain value can be determined as an emulsion scratch pixel, and the conditions (6) and (7) are set.
[0139]
With the above-described procedure, the determination of whether or not the pixel is an emulsion scratch pixel by each block of the emulsion scratch determination section 6 is completed. In the procedure of S6, the infrared image data corrected by the pre-processing unit 4 is used. However, the present invention is not limited to this, and the infrared image data captured by the film scanner 1 may be used as it is. I do not care. Further, in the procedure of S6, the actual CF value is used as the CF value used in (2) and (3), but a temporary CF value may be used, or a predetermined CF value may be used. No problem.
[0140]
In the above procedure, the pixel satisfying the condition (2) is set as the center pixel as a scratch pixel, and the emulsion scratch determination is performed only on this pixel. However, the present invention is not limited to this. The emulsion scratch determination may be performed on all the pixels with all the pixels as the center pixel.
[0141]
Next, the emulsion scratch map creating section 6f creates an emulsion scratch map (S7). The emulsion scratch map is a digital data indicating the positions of the above-mentioned emulsion scratch pixel and the correction target pixel, with a predetermined pixel existing around the emulsion scratch pixel detected by the second determination unit 6e as a correction target pixel. Say.
[0142]
Normally, a diffused light source is used as the light source of the film scanner 1 to scatter light for irradiating emulsion scratches on the film, so that light less affected by scratches than linear light is captured by a CCD or the like. Therefore, a pixel which should be originally determined by the second determination unit 6e as an emulsion-damaged pixel may not be determined as an emulsion-damaged pixel. In such a case, since only the emulsion scratch pixel having a deep scratch is determined by the second determination unit 6e, as shown in FIG. 8A, only the vicinity of the center of the emulsion scratch is determined as the emulsion scratch pixel. On the other hand, a relatively shallow outer peripheral portion may not be judged as an emulsion scratch. Hereinafter, such a phenomenon is referred to as an “optical scrubbing effect”.
[0143]
Further, in order to accurately capture the shape of the scratch on the film into digital image data, it is necessary to perform fine sampling, but the resolution of the image data captured by the film scanner 1 is limited. Here, for example, as shown in FIG. 8B, the film scanner 1 captures a portion related to a scratch and a portion that is not in a unit of one pixel. Only the ratio of the area can capture the information of the flaw. For example, if the ratio of the area of the flaw to one pixel is 50%, the film scanner 1 can capture only the flaw information of that pixel by 50%. Therefore, in the second determination unit 6e, only the vicinity of the center of the emulsion scratch may be determined as an emulsion scratch pixel, and the outer peripheral portion having a relatively shallow scratch may not be determined as an emulsion scratch. Hereinafter, such a phenomenon is referred to as an “averaging effect”.
[0144]
Therefore, it is necessary to perform the emulsion flaw removal processing on a pixel which is not determined as an emulsion flaw pixel due to the optical flaw erasing effect or the averaging effect. Accordingly, the predetermined pixel existing around the emulsion scratch determined by the second determination unit 6e is set as a correction target pixel, and the emulsion scratch removal processing is performed on the emulsion scratch pixel and the correction target pixel. This is to create a scratch map. Hereinafter, a procedure for creating the emulsion scratch map will be described.
[0145]
As shown in FIG. 9A, the emulsion scratch map creating section 6f arranges a filter of 3 × 3 pixels for each pixel of the digital image data indicating the position of the emulsion scratch. Note that the filter size is not limited to 3 × 3 pixels, and the setting can be arbitrarily changed by the operator.
[0146]
Then, as shown in FIG. 9 (b), when three or more emulsion scratch pixels are included in the above-described filter area, the emulsion scratch map creating unit 6f outputs all the pixels except the emulsion scratch pixels in that area. The pixel is determined as a pixel to be corrected.
[0147]
Thereafter, the emulsion flaw map creating section 6f shifts the filter by one pixel in the main scanning direction or the sub-scanning direction, as shown in FIG. 9C. Here, also in the digital image data shown in FIG. 9C, since there are three emulsion scratch pixels in the filter area, as shown in FIG. All the pixels other than the emulsion scratched pixels are determined as correction target pixels.
[0148]
Further, the emulsion scratch map creating section 6f shifts the filter by one pixel in the main scanning direction or the sub-scanning direction, as shown in FIG. Here, in the digital image data shown in FIG. 9E, since only two emulsion scratch pixels exist in the filter area, the emulsion scratch determination unit corrects the pixels other than the emulsion scratch pixels in the area. It is not determined as a target pixel.
[0149]
The emulsion scratch map creating section 6f performs the above processing on all the pixels of the digital image data. As a result, an emulsion scratch map is created as digital data indicating the positions of the emulsion scratch pixels and the correction target pixels.
[0150]
Then, the emulsion scratch removing unit 7 refers to the pixels in the peripheral region with respect to the emulsion scratch pixel and the correction target pixel shown in the emulsion scratch map, and refers to the visible light image data of the emulsion scratch pixel and the correction target pixel. An emulsion flaw removal process for creating a pixel value is executed (S8). A series of processes of the image processing apparatus 2 are executed by the above-described procedures of S1 to S8.
[0151]
Note that the pixel value in the above-described image processing represents a gray scale by a natural logarithm. Therefore, the first predetermined value (ζ = 0 to 0.1), the second predetermined value (η = 0 to 1), the third predetermined value (ι = 0 to 0.4), and the fourth predetermined value (κ) = 0 to 0.4), the fifth predetermined value (8.294), the sixth predetermined value (8.294), and the seventh predetermined value (ε = 0 to 0.1) are determined by the resolution (white) in the digital image data. If the number of steps expressing the density difference from black to black or the number of gray levels from white to black) is different, the values will be different. In the image processing, 12-bit digital image data is used.
[0152]
By the way, the processing described in the above embodiment can be realized by a program. This program is stored in a computer-readable recording medium. In the present invention, the recording medium may be a memory (not shown) (not shown) necessary for the image processing unit 2 to perform processing, or a program (not shown) may be used as an external storage device. It may be a program medium provided with a reading device and readable by inserting a recording medium into the reading device.
[0153]
In any of the above cases, the stored program may be configured to be executed by accessing a microprocessor (not shown), or the stored program may be read and the read program may not be shown. The program may be executed by downloading the program to the program storage area. In this case, it is assumed that the download program is stored in the main device in advance.
[0154]
Here, the program medium is a recording medium configured to be separable from the main body, such as a tape system such as a magnetic tape or a cassette tape, a magnetic disk such as a floppy (registered trademark) disk or a hard disk, or a CD-ROM / MO / It is a disk system of an optical disk such as an MD / DVD, a card system of an IC card (including a memory card) / optical card, or a medium that carries a fixed program including a semiconductor memory such as a mask ROM, EPROM, flash ROM, or the like. You may.
[0155]
Lastly, the embodiments described above do not limit the scope of the present invention, and various changes can be made within the scope of the present invention.
[0156]
【The invention's effect】
As described above, the emulsion scratch determination method of the present invention determines, as digital emulsion data obtained from an image recorded on a photographic film, pixels affected by emulsion scratches of the photographic film as emulsion scratch pixels. A step of searching for a normal pixel located in a peripheral predetermined range for each central pixel, with each pixel of the digital image data as a central pixel; Calculating an average value of the respective pixel values of the normal pixels corresponding to the central pixel; and, if the pixel value of the central pixel in any one of the color components is higher than the average value by a predetermined amount, the central pixel is subjected to emulsion scratching. Determining a pixel.
[0157]
As described above, the emulsion scratch determining apparatus of the present invention determines, as digital emulsion data obtained from an image recorded on a photographic film, a pixel affected by an emulsion scratch on the photographic film as an emulsion scratch pixel. A normal pixel search unit for searching for a normal pixel located in a peripheral predetermined range for each center pixel, with each pixel of the digital image data as a center pixel; A pixel value calculation unit that calculates an average value of the pixel values of the normal pixels corresponding to the center pixel, and a case where the pixel value of the center pixel in any one of the color components is higher than the average value by a predetermined amount. And a determination unit for determining the center pixel as an emulsion scratch pixel.
[0158]
Thus, when the pixel value of the central pixel is higher than the average value by a predetermined amount in at least one of the color components, the central pixel can be determined as an emulsion scratch pixel.
[0159]
As described above, the emulsion scratch determination method of the present invention determines, as digital emulsion data obtained from an image recorded on a photographic film, pixels affected by emulsion scratches of the photographic film as emulsion scratch pixels. An emulsion scratch determination method, wherein each pixel of the digital image data is set as a central pixel, and for each central pixel, a normal pixel located in a predetermined peripheral area is searched for, and the normal pixel corresponding to the central pixel is searched for. The average value of each pixel value is obtained for each color component, and the average value of the red component is Rave.m, nGave the above average value of the green componentm, n, The average value of the blue component is Bavem, nAs Ravem, n, Gavem, n, Bavem, nThe average value of Davem, nThe average value of the pixel value of the red component, the pixel value of the green component, and the pixel value of the blue component of the center pixel is Ddatm, nDavem, nDdat is a value obtained by adding a first predetermined value tom, nIs higher than the first threshold value, the central pixel is determined to be an emulsion scratch pixel.
[0160]
Accordingly, when the first predetermined value is considered to be a pixel value increase from a state where there is no flaw, Ddatm, nIs higher than the first threshold value, there is an effect that the center pixel can be determined as an emulsion scratch pixel.
[0161]
Emulsion scratch determination method of the present invention, as described above, in addition to the above procedure, further, regarding the infrared image data obtained from the photographic film, each of the normal pixels within the predetermined range corresponding to the center pixel When a pixel value of the central pixel is lower than the second threshold value, a value obtained by subtracting a second predetermined value from the average pixel value is used as a second threshold value, the central pixel is determined to be an emulsion scratch pixel. It may be.
[0162]
Accordingly, the average value of the pixel values of the normal pixels within the predetermined range corresponding to the center pixel can be considered as a pixel value in a state where the center pixel is not damaged. If the pixel value of the central pixel is lower than the third threshold value with respect to the infrared image data, it is possible to determine that the pixel is an emulsion scratched pixel.
[0163]
As described above, in addition to the above-described procedure, the emulsion scratch determination method of the present invention further includes, for each central pixel, a pixel value of the central pixel for each color component and a value within the predetermined range corresponding to the central pixel. The difference between the average value of the pixel values of the normal pixels and the average value of the pixel values of the normal pixels is calculated. It may be characterized in that a central pixel having a difference in blue component higher than the third threshold value and the fourth threshold value is determined as an emulsion scratch pixel.
[0164]
Accordingly, when the difference of the blue component is higher than the third threshold value and the fourth threshold value, by further adding a condition for determining the center pixel as an emulsion scratch pixel, it is possible to realize more accurate emulsion scratch determination. It has the effect of being able to.
[0165]
As described above, the emulsion flaw determination method of the present invention includes, in addition to the above procedure, a case where the pixel value of the blue component of the center pixel is equal to or greater than a fifth predetermined value and the pixel value of the green component is equal to or greater than a sixth predetermined value. The center pixel may be determined as an emulsion scratch pixel.
[0166]
As a result, there is an effect that it is possible to realize more accurate emulsion flaw determination.
[0167]
As described above, the emulsion scratch determination method of the present invention includes, in addition to the above-described procedure, an innermost peripheral pixel group connected in a ring on the outer periphery of the center pixel as a first pixel group, and an n-th pixel group. In the outer periphery of the pixel group (n = 1, 2,..., N), the innermost pixel group connected in a ring is defined as the (n + 1) th pixel group, and the outermost periphery of the predetermined range is the (N + 1) th pixel group. In this manner, the normal pixels may be searched for from the pixel group close to the center pixel for each pixel group, and the search may be terminated when the total number of searched normal pixels is equal to or more than a predetermined number. .
[0168]
As a result, there is an effect that a normal pixel having image information as close as possible to the center pixel can be preferentially searched.
[0169]
As described above, the emulsion scratch determination method of the present invention includes, in addition to the above-described procedure, among the pixels of the digital image data, a pixel in which the pixel value of the corresponding infrared image data is lower than the CF value. It may be characterized by the following.
[0170]
As a result, there is no need to judge emulsion scratches for all the pixels, and the processing speed can be improved.
[0171]
As described above, in addition to the above procedure, the emulsion scratch determination method of the present invention searches for a pixel whose infrared image data has a pixel value equal to or larger than the CF value among the pixels within the predetermined range. It may be characterized that the pixel is a normal pixel.
[0172]
As a result, among the pixels within the predetermined range, a pixel having a pixel value of the infrared image data equal to or larger than the CF value can be determined as a normal pixel which is not affected by the emulsion scratch or the scratch on the base surface of the film. Therefore, according to the above-described procedure, there is an effect that detection of a normal pixel becomes easy.
[0173]
As described above, the emulsion flaw determination method of the present invention includes, in addition to the above-described procedure, a case where a pixel having a pixel value equal to or larger than the CF value with respect to infrared image data does not exist within the predetermined range. For each pixel in the range, Rdat which is an average value of the pixel value of the red component, the pixel value of the green component, and the pixel value of the blue componentm + i, n + jIs the average value Rdat of the pixel value of the red component, the pixel value of the green component, and the pixel value of the blue component of the pixel that has already been determined to be an emulsion scratch pixel.M, NIf the pixel is lower than the seventh predetermined value, the pixel may be set as a normal pixel.
[0174]
As a result, even when there is no pixel which is not affected at all by the flaw within the predetermined range, it is possible to perform the emulsion flaw determination.
[0175]
Emulsion scratch determination method of the present invention, as described above, in addition to the above procedure, in each pixel of the digital image data, a filter having an area of α × β pixels is arranged, in the filter area, When a predetermined number or more of pixels are determined to be emulsion scratch pixels, all pixels other than the emulsion scratch pixels in the filter area may be set as correction target pixels.
[0176]
As a result, there is an effect that not only the emulsion scratch pixel but also the pixel which is affected by the emulsion scratch but is not determined as the emulsion scratch pixel can be included in the target of the emulsion scratch removal processing.
[0177]
Further, the processing according to the emulsion scratch determination method may be a program to be executed by a computer. Further, the above-mentioned emulsion scratch judging program may be recorded on a recording medium so as to be readable by a computer.
[Brief description of the drawings]
FIG. 1 is a flowchart showing a processing procedure for emulsion scratch determination according to the present embodiment.
FIG. 2 is a block diagram illustrating a schematic configuration of an image output system that implements image processing according to the embodiment.
FIG. 3 is a flowchart showing a series of flows of image processing executed in the image output system.
FIG. 4 is a block diagram showing a schematic configuration of an emulsion flaw determining unit included in the image output system.
FIG. 5 is an image diagram showing a pixel group to be searched in a normal pixel search process.
FIG. 6 is an image diagram showing a normal pixel search process, FIG. 6 (a) is an image diagram showing all normal pixels located within a predetermined range, and FIG. 6 (b) is a first pixel group; 6C is an image diagram in which a normal pixel in the second pixel group is searched, and FIG. 6D is an image diagram in which a normal pixel in the third pixel group is searched. FIG.
FIG. 7 is a cross-sectional view showing a state in which a large scratch is formed on the base surface of the photographic film so that the emulsion surface is scraped.
FIG. 8A is an image diagram showing an “optical scuffing effect” that occurs when an image recorded on a photographic film is digitized, and FIG. 8B is a photographic film. FIG. 7 is an image diagram showing an “averaging effect” that occurs when an image recorded in the image is digitized.
FIGS. 9 (a) to 9 (e) are image diagrams showing a procedure for creating an emulsion scratch map.
FIG. 10 is an explanatory diagram showing a program for causing a computer to execute a normal pixel search process.
FIG. 11 is a cross-sectional view showing that the emulsion surface and the base surface of the photographic film are scratched.
[Explanation of symbols]
1 Film scanner
2) Image processing device
3 Photo printing equipment
4 Pre-processing unit
5 Base scratch removal part
6 Emulsion scratch judgment unit (emulsion scratch judgment device)
6a First judgment unit
6b Normal pixel search unit
6c pixel value calculation unit
6d threshold setting unit
6e 2nd judgment unit (judgment unit)
6f @ Emulsion scratch map creation unit
7 Emulsion scratch removal section

Claims (13)

写真フィルムに記録されている画像から取得されるデジタル画像データについて、上記写真フィルムの乳剤傷による影響を受けている画素を乳剤傷画素として判定する乳剤傷判定方法であって、
上記デジタル画像データの各画素を中心画素として、中心画素ごとに、周辺の所定範囲に位置する正常画素を探索するステップと、
いずれか1つの色成分で、上記中心画素に対応する上記正常画素の各画素値の平均値を求めるステップと、
上記いずれか1つの色成分における中心画素の画素値が、上記平均値より所定量高い場合、その中心画素を乳剤傷画素と判定するステップとを備えることを特徴とする乳剤傷判定方法。
For digital image data obtained from an image recorded on a photographic film, an emulsion scratch determination method for determining pixels affected by emulsion scratches of the photographic film as emulsion scratch pixels,
With each pixel of the digital image data as a central pixel, for each central pixel, searching for a normal pixel located in a predetermined range around the;
Obtaining an average value of pixel values of the normal pixels corresponding to the central pixel in any one color component;
Determining, when the pixel value of the center pixel in any one of the color components is higher than the average value by a predetermined amount, the center pixel as an emulsion scratch pixel.
写真フィルムに記録されている画像から取得されるデジタル画像データについて、上記写真フィルムの乳剤傷による影響を受けている画素を乳剤傷画素として判定する乳剤傷判定方法であって、
上記デジタル画像データの各画素を中心画素として、中心画素ごとに、周辺の所定範囲に位置する正常画素を探索して、
上記中心画素に対応する上記各正常画素の画素値の平均値を色成分ごとに求め、赤色成分の上記平均値をRavem,n、緑色成分の上記平均値をGavem,n、青色成分の上記平均値をBavem,nとして、Ravem,n,Gavem,n,Bavem,nの平均値をDavem,nとして、
上記中心画素の赤色成分の画素値と、緑色成分の画素値と、青色成分の画素値との平均値をDdatm,nとする場合、
Davem,nに第1所定値を加算した値を第1閾値として、Ddatm,nが第1閾値より高い場合、該中心画素を乳剤傷画素と判定することを特徴とする乳剤傷判定方法。
For digital image data obtained from an image recorded on a photographic film, an emulsion scratch determination method for determining pixels affected by emulsion scratches of the photographic film as emulsion scratch pixels,
With each pixel of the digital image data as a central pixel, for each central pixel, search for a normal pixel located in a peripheral predetermined range,
The average value of the pixel values of the normal pixels corresponding to the center pixel is obtained for each color component, the average value of the red component is Rave m, n , the average value of the green component is Gave m, n , and the average value of the blue component is The above average value is set as Bave m, n , and the average value of Rave m, n , Gave m, n , and Bave m, n is set as Dave m, n .
When the average value of the pixel value of the red component, the pixel value of the green component, and the pixel value of the blue component of the center pixel is Ddatm , n ,
An emulsion flaw determining method, wherein a value obtained by adding a first predetermined value to Dave m, n is used as a first threshold, and when Ddatm , n is higher than the first threshold, the center pixel is determined as an emulsion flaw pixel. .
さらに、上記写真フィルムから取得される赤外画像データに関して、上記中心画素に対応する上記所定範囲内の正常画素の各画素値の平均値に、第2所定値を減算した値を第2閾値として、上記中心画素の画素値が、第2閾値よりも低い場合、該中心画素を乳剤傷画素と判定することを特徴とする請求項1または2に記載の乳剤傷判定方法。Further, with respect to the infrared image data obtained from the photographic film, a value obtained by subtracting a second predetermined value from an average value of pixel values of normal pixels within the predetermined range corresponding to the center pixel is set as a second threshold value. 3. The method according to claim 1, wherein when the pixel value of the center pixel is lower than a second threshold value, the center pixel is determined as an emulsion scratch pixel. さらに、各中心画素に関して、色成分ごとに、中心画素の画素値と、該中心画素に対応する上記所定範囲内の正常画素の各画素値の平均値との差分を求め、緑色成分の差分に第3所定値を加算した値を第3閾値、赤色成分の差分に第4所定値を加算した値を第4閾値として、青色成分の差分が第3閾値かつ第4閾値より高い中心画素を乳剤傷画素と判定することを特徴とする請求項1ないし3のいずれか1項に記載の乳剤傷判定方法。Further, for each central pixel, for each color component, the difference between the pixel value of the central pixel and the average value of each pixel value of normal pixels within the above-described predetermined range corresponding to the central pixel is determined, and the difference between the green component and The value obtained by adding the third predetermined value to the third threshold value is defined as a third threshold value, and the value obtained by adding the fourth predetermined value to the difference of the red component is defined as the fourth threshold value. 4. The method according to claim 1, wherein the pixel is determined as a defective pixel. 上記中心画素の青色成分の画素値が第5所定値以上で、緑色成分の画素値が第6所定値以上の場合、該中心画素を乳剤傷画素と判定することを特徴とする請求項1ないし4のいずれか1項に記載の乳剤傷判定方法。4. The method according to claim 1, wherein when the pixel value of the blue component of the center pixel is equal to or greater than a fifth predetermined value and the pixel value of the green component is equal to or greater than a sixth predetermined value, the center pixel is determined to be an emulsion scratch pixel. 5. The method for judging an emulsion flaw according to any one of 4. 上記中心画素の外周において、環状に連なった最内周の画素群を第1の画素群とすると共に、
第nの画素群(n=1,2,…,N)の外周において、環状に連なった最内周の画素群を第n+1の画素群として、
上記所定範囲の最外周が、第N+1の画素群となるようにして、
中心画素に近い画素群から上記正常画素を画素群ごとに探索していき、探索された正常画素の累計が所定数以上になれば、上記探索を終了することを特徴とする請求項1ないし5のいずれか1項に記載の乳剤傷判定方法。
On the outer periphery of the center pixel, the innermost peripheral pixel group connected in a ring is defined as a first pixel group,
On the outer periphery of the n-th pixel group (n = 1, 2,..., N), the innermost pixel group connected in a ring is defined as the (n + 1) -th pixel group.
The outermost periphery of the predetermined range is the (N + 1) th pixel group,
6. The method according to claim 1, wherein the normal pixels are searched from a pixel group close to the center pixel for each pixel group, and the search is terminated when the total number of the searched normal pixels is equal to or more than a predetermined number. The method for judging emulsion flaws according to any one of the above items.
上記デジタル画像データの各画素のうち、対応する赤外画像データの画素値がCF値より低い画素を上記中心画素とすることを特徴とする請求項1ないし6のいずれか1項に記載の乳剤傷判定方法。The emulsion according to any one of claims 1 to 6, wherein, among the pixels of the digital image data, a pixel whose pixel value of the corresponding infrared image data is lower than the CF value is set as the central pixel. Scratch judgment method. 上記所定範囲内の各画素のうち、赤外画像データの画素値がCF値以上の画素を探索して、該画素を正常画素とすることを特徴とする請求項1ないし7のいずれか1項に記載の乳剤傷判定方法。8. A pixel according to claim 1, wherein a pixel having a pixel value of the infrared image data equal to or larger than the CF value is searched for among the pixels within the predetermined range, and the pixel is set as a normal pixel. 3. A method for judging an emulsion scratch described in 1. 赤外画像データに関してCF値以上の画素値である画素が上記所定範囲内に存在しない場合であって、
上記所定範囲内の各画素に関し、赤色成分の画素値と、緑色成分の画素値と、青色成分の画素値との平均値であるRdatm+i,n+jが、すでに乳剤傷画素と判定された画素の赤色成分の画素値と、緑色成分の画素値と、青色成分の画素値との平均値RdatM,Nよりも、第7所定値分低い場合、その画素を正常画素とすることを特徴とする請求項8に記載の乳剤傷判定方法。
Pixels having a pixel value equal to or greater than the CF value with respect to the infrared image data are not present in the predetermined range,
For each pixel within the predetermined range, Rdat m + i, n + j, which is the average of the red component pixel value, the green component pixel value, and the blue component pixel value, is the value of the pixel that has already been determined to be an emulsion scratch pixel. When the average value Rdat M, N of the pixel value of the red component, the pixel value of the green component, and the pixel value of the blue component is lower by a seventh predetermined value, the pixel is determined as a normal pixel. The method for judging an emulsion scratch according to claim 8.
上記デジタル画像データの各画素に、α×β画素を領域とするフィルタを配置して、上記フィルタ領域内に、乳剤傷画素と判定された画素が所定数以上存在する場合、上記フィルタ領域内の乳剤傷画素以外の全ての画素を補正対象画素とすることを特徴とする請求項1ないし9のいずれか1項に記載の乳剤傷判定方法。In each pixel of the digital image data, a filter having an area of α × β pixels is arranged, and when a predetermined number or more of pixels determined as emulsion scratch pixels are present in the filter area, The method according to claim 1, wherein all pixels other than the emulsion scratch pixel are set as correction target pixels. 写真フィルムに記録されている画像から取得されるデジタル画像データについて、上記写真フィルムの乳剤傷による影響を受けている画素を乳剤傷画素として判定する乳剤傷判定装置であって、
上記デジタル画像データの各画素を中心画素として、中心画素ごとに、周辺の所定範囲に位置する正常画素を探索する正常画素探索部と、
いずれか1つの色成分で、上記中心画素に対応する上記各正常画素の各画素値の平均値を求める画素値算出部と、
上記いずれか1つの色成分における中心画素の画素値が、上記平均値より所定量高い場合、その中心画素を乳剤傷画素と判定する判定部とを備えることを特徴とする乳剤傷判定装置。
For digital image data obtained from an image recorded on a photographic film, an emulsion scratch determination device that determines pixels affected by emulsion scratches of the photographic film as emulsion scratch pixels,
With each pixel of the digital image data as a central pixel, for each central pixel, a normal pixel search unit that searches for normal pixels located in a predetermined range around the;
A pixel value calculation unit that calculates an average value of pixel values of the normal pixels corresponding to the center pixel in any one color component;
An emulsion flaw determining apparatus, comprising: a determination unit that, when a pixel value of a central pixel in any one of the color components is higher than the average value by a predetermined amount, determines the central pixel as an emulsion flaw pixel.
請求項1ないし10のいずれか1項に記載の乳剤傷判定方法による処理をコンピュータに実行させるためのプログラムであることを特徴とする乳剤傷判定プログラム。An emulsion flaw determination program, which is a program for causing a computer to execute the process according to the emulsion flaw determination method according to any one of claims 1 to 10. 請求項12に記載の乳剤傷判定プログラムをコンピュータにて読み取り可能に記録してなることを特徴とする乳剤傷判定プログラムを記録した記録媒体。A recording medium on which the emulsion scratch judgment program according to claim 12 is recorded so as to be readable by a computer.
JP2002295330A 2002-10-08 2002-10-08 Emulsion scratch determination method, emulsion scratch determination device, emulsion scratch determination program, and recording medium recording emulsion scratch determination program Expired - Lifetime JP3823910B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002295330A JP3823910B2 (en) 2002-10-08 2002-10-08 Emulsion scratch determination method, emulsion scratch determination device, emulsion scratch determination program, and recording medium recording emulsion scratch determination program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002295330A JP3823910B2 (en) 2002-10-08 2002-10-08 Emulsion scratch determination method, emulsion scratch determination device, emulsion scratch determination program, and recording medium recording emulsion scratch determination program

Publications (2)

Publication Number Publication Date
JP2004132743A true JP2004132743A (en) 2004-04-30
JP3823910B2 JP3823910B2 (en) 2006-09-20

Family

ID=32285621

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002295330A Expired - Lifetime JP3823910B2 (en) 2002-10-08 2002-10-08 Emulsion scratch determination method, emulsion scratch determination device, emulsion scratch determination program, and recording medium recording emulsion scratch determination program

Country Status (1)

Country Link
JP (1) JP3823910B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006145226A (en) * 2004-11-16 2006-06-08 Noritsu Koki Co Ltd Emulsion damage determining method and emulsion damage determining system
JP2006170942A (en) * 2004-12-20 2006-06-29 Noritsu Koki Co Ltd Emulsion scratch determination method and emulsion scratch determination system
CN111614917A (en) * 2019-02-22 2020-09-01 半导体元件工业有限责任公司 Imaging system with weathering detection pixels
JP2020144032A (en) * 2019-03-07 2020-09-10 コニカミノルタ株式会社 Image inspection device and image forming system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006145226A (en) * 2004-11-16 2006-06-08 Noritsu Koki Co Ltd Emulsion damage determining method and emulsion damage determining system
JP4560720B2 (en) * 2004-11-16 2010-10-13 ノーリツ鋼機株式会社 Emulsion scratch determination method and emulsion scratch determination system
JP2006170942A (en) * 2004-12-20 2006-06-29 Noritsu Koki Co Ltd Emulsion scratch determination method and emulsion scratch determination system
JP4513006B2 (en) * 2004-12-20 2010-07-28 ノーリツ鋼機株式会社 Emulsion scratch determination method and emulsion scratch determination system
CN111614917A (en) * 2019-02-22 2020-09-01 半导体元件工业有限责任公司 Imaging system with weathering detection pixels
JP2020144032A (en) * 2019-03-07 2020-09-10 コニカミノルタ株式会社 Image inspection device and image forming system
JP7211169B2 (en) 2019-03-07 2023-01-24 コニカミノルタ株式会社 Image inspection device and image forming system

Also Published As

Publication number Publication date
JP3823910B2 (en) 2006-09-20

Similar Documents

Publication Publication Date Title
JP4056670B2 (en) Image processing method
JP4005277B2 (en) Image processing apparatus, method, and recording medium
US20030161506A1 (en) Face detection computer program product for redeye correction
US7167595B2 (en) Image processing apparatus and recording medium, and image processing apparatus
JP4244018B2 (en) Defective pixel correction method, program, and defective pixel correction system for implementing the method
JP2010091470A (en) System and method of measuring gas concentration by electronic image colorimetric method
JP4035688B2 (en) False color removal apparatus, false color removal program, false color removal method, and digital camera
JP2001358928A (en) Image correction device
JP3516786B2 (en) Face area extraction method and copy condition determination method
JP3823910B2 (en) Emulsion scratch determination method, emulsion scratch determination device, emulsion scratch determination program, and recording medium recording emulsion scratch determination program
JP2007011970A (en) Image processor, image processing method and program
JP3951939B2 (en) Image processing method, image processing apparatus, image processing program, and recording medium recording image processing program
JP2004061500A (en) Method of detecting image defect
JP2005063022A (en) Noise pixel map producing method, device performing the same, program, and photograph printing device
JP3775312B2 (en) Image processing method, image processing program, and computer-readable recording medium recording the program
JP3939466B2 (en) Image processing apparatus, method, and recording medium
JP4513006B2 (en) Emulsion scratch determination method and emulsion scratch determination system
JP4400481B2 (en) Image processing device
JP3772812B2 (en) Image processing method, image processing program, and recording medium on which image processing program is recorded
JP4207124B2 (en) Bright line drawing processing method and bright line drawing processing program
JP3714282B2 (en) Image processing method, image processing program, and computer-readable recording medium on which image processing program is recorded
JP4560720B2 (en) Emulsion scratch determination method and emulsion scratch determination system
JP2008079196A (en) Image correcting method, image correcting program and image correcting module
JP4470172B2 (en) Image processing device
JP2004318425A (en) Image processing method, image processor, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040304

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050829

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051206

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060202

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060307

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060420

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060606

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060619

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100707

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100707

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110707

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110707

Year of fee payment: 5

S801 Written request for registration of abandonment of right

Free format text: JAPANESE INTERMEDIATE CODE: R311801

ABAN Cancellation of abandonment
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110707

Year of fee payment: 5

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350