JP3743397B2 - Image processing method, image processing program, and recording medium on which image processing program is recorded - Google Patents

Image processing method, image processing program, and recording medium on which image processing program is recorded Download PDF

Info

Publication number
JP3743397B2
JP3743397B2 JP2002169143A JP2002169143A JP3743397B2 JP 3743397 B2 JP3743397 B2 JP 3743397B2 JP 2002169143 A JP2002169143 A JP 2002169143A JP 2002169143 A JP2002169143 A JP 2002169143A JP 3743397 B2 JP3743397 B2 JP 3743397B2
Authority
JP
Japan
Prior art keywords
film
image processing
piece
pixel value
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2002169143A
Other languages
Japanese (ja)
Other versions
JP2004015664A (en
Inventor
宏 鳥羽
耕次 北
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2002169143A priority Critical patent/JP3743397B2/en
Publication of JP2004015664A publication Critical patent/JP2004015664A/en
Application granted granted Critical
Publication of JP3743397B2 publication Critical patent/JP3743397B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Color Image Communication Systems (AREA)
  • Projection-Type Copiers In General (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、写真処理の分野において、現像済みフィルムから得られたデジタル画像データに基づいてベタ焼きプリントを作成する方法に関するものである。
【0002】
【従来の技術】
従来から、写真フィルム上に記録されているコマ画像を一覧、検索したり、写真の出来の良否を調べることを目的として、複数のコマの画像を構成するピースフィルム(以下、「ピース」という)が一列に密着焼付けされている「ベタ焼きプリント(コンタクトプリント)」と称するものが写真の分野で利用されている。
【0003】
ベタ焼きプリントとは、例えば、一本の写真フィルムを、数コマからなる複数のピースに分割して、各ピースをフレームごと一枚の印画紙に焼き付けをして、写真フィルム上のコマ画像を再現したものである。すなわち、ベタ焼きプリントでは、各コマ画像のみならず、各コマに対応したパーフォレーションおよびDXコードが明確になっている。これにより、ユーザや写真店等は、1本の写真フィルムに記録されている各コマ画像のIDナンバー等を容易に知ることができ、例えば、焼き増し時の写真フィルムでの各コマの検索が容易になる。
【0004】
このようなベタ焼きプリントを作成する方法として、アナログ方式のプリンタで画像を焼き付ける方法がある。この方法は、ベタ焼き専用露光ユニットを用いて行われる。上記ベタ焼き専用露光ユニットとは、印画紙上に写真フィルムを載せ、写真フィルムのサイズにあわせたベタ焼き用プレート(マスク)で写真フィルムを固定し、写真フィルムごと印画紙を露光するものである。ところが、上記方法によれば、写真フィルムを直接露光しなければならないことから、ピースごとの写真フィルムを一旦フィルムホルダーから取り出さなければならないという手間が生じる。
【0005】
ところで、このようなアナログ方式による焼き付け方法における濃度補正は、光源からの露光量を調整することにより行われる。しかし、上記アナログ方式では、一枚の印画紙上に再現される各ピースおよび各ピースを構成する各コマが、同一の光源からの光によって同時かつ一体に焼き付けられるので、コマ画像ごとに画像濃度を調整することができない。したがって、オペレータが、光源の露光量を調整しつつ何度も焼き付けを繰り返し、印画紙上に再現される全コマの濃度について、全体観察を行いながら、適正なプリントとなるような露光タイムを設定しなければならないという手間が生じる。
【0006】
一方、上述した手間を解消する手段として、デジタル方式によるベタ焼きプリントを作成する方法が、例えば、特開平7−250217号公報に開示されている。この方法によれば、写真フィルム(各ピース)をフィルムホルダーに入れたまま、スキャナに画像を読み込ませることができ、デジタル画像データに基づいて印画紙を露光することで、上記ベタ焼きプリントを得ることができる。
【0007】
【発明が解決しようとする課題】
ところで、上記フィルムホルダーにおいて、ピース単位の写真フィルムをそれぞれ収納するポケット幅は、フィルム幅よりも広く構成されている。したがって、各ポケットに収納されている各写真フィルム(ピース)は、それぞれが異なる方向で傾くことがあり、このような状態でスキャナに画像を読み込ませると、印画紙上に再現される各写真フィルムの方向、傾きが印画紙の長手方向または幅方向に一致しないという問題が生じる。
【0008】
本発明は、上記問題を解決するためになされたものであり、その目的は、デジタル方式によって、フィルムホルダーに収納された写真フィルムからベタ焼きプリントを作成する場合に、印画紙上に再現される写真フィルムの傾き、方向を印画紙の長手方向または幅方向と一致させることができる画像処理方法を提供することにある。
【0009】
【課題を解決するための手段】
本発明の画像処理方法は、上記の課題を解決するために、1枚の写真フィルムを複数に分割した各ピースを、フレームごと、1つの画像に取り込んだデジタル画像データを取得し、ベタ焼きプリントを作成するための画像処理方法であって、上記デジタル画像データから得られる画像が示す各画素値に対しての含有画素数を示したヒストグラムを作成するステップと、上記ヒストグラムから上記写真フィルムの非画像領域であるフレームの画素値を検出すると共に、上記写真フィルムのフレームの画素値を基に、上記ピースにおけるいずれか1つの辺を第1辺として特定し、第1辺と基準方向との傾き角θを取得するステップと、上記写真フィルムに対し、傾き角θ分回転処理を行うことにより、ピースの第1辺と基準方向とを一致させるステップとを備え、すべての上記各ピースについて上記3つのステップ行うことを特徴とする。
【0010】
ベタ焼きプリントとは、例えば、一本のフィルムを、数コマからなる複数のピースに分割して、各ピースフィルムをフレームごと一枚の印画紙に焼き付けをして、フィルム上のコマ画像を再現したものである。ここで、上記手順にいう「写真フィルム」は、少なくとも1片以上のフィルムであればよい。また、基準方向は、主走査方向または副走査方向とする。
【0011】
上記手順によれば、写真フィルムからフレームごと、デジタル画像データを取得する。そして、上記デジタル画像データから得られる画像が示す各画素値に対しての含有画素数を示したヒストグラムを作成する。ここで、写真フィルムにおいて、コマ画像に係る画素の取り得る画素値の範囲は広範である一方、フレームに係る画素の取り得る画素値はほぼ一定であるので、上記ヒストグラムにおいて、画素値の偏りの傾向から写真フィルムのフレームに係る画素値を予測することができる。すなわち、上記ヒストグラムから、写真フィルムのフレーム(最端部)の画素値を検出することができる。
【0012】
上記写真フィルムのフレームの画素値を検出できると、該画素値を手がかりとして画像を構成する各画素を探索することにより、上記写真フィルムにおけるいずれか1つの辺を第1辺として特定することができる。これにより、第1辺の方向も明確になるので、上記写真フィルムの第1辺と、基準方向との傾き角θを取得することができる。
【0013】
さらに、上記写真フィルムに対し、傾き角θ分回転処理を行うことにより、上記ピースの第1辺の方向と、基準方向とを一致させることができる。これにより、本発明に係る画像処理方法により得られた画像データに基づいて、ベタ焼きプリントを作成すると、印画紙上に配列される各写真フィルムの方向を基準方向に揃えることが可能になる。ここで、基準方向は主走査方向または副走査方向であるので、印画紙上に配列される各写真フィルムの長手方向または幅方向を、印画紙の長手方向または幅方向と一致させることが可能になる。
【0014】
また、上記手順によれば、写真フィルムを複数のピースに分割し、各ピースを一括して1つの画像に取り込む場合であっても、各ピースに対して上述した処理を実行することで、印画紙上に配列される各ピースの方向を基準方向に揃えることが可能になる。すなわち、印画紙上に配列される各ピースの長手方向または幅方向を、印画紙の長手方向または幅方向と一致させることが可能になる。
【0015】
本発明の画像処理方法は、上記の手順に加えて、上記ピース全体の頂点であって、上記第1辺における一方の頂点から基準方向へ第1の引き出し線を設定すると共に、他方の頂点から、基準方向と直交する方向へ第2の引き出し線を設定し、上記一方の頂点と、第1の引き出し線および第2の引き出し線の交点との間に占める基準方向の画素数から、上記一方の頂点と上記交点との距離nを取得すると共に、上記他方の頂点と、上記交点との間に占める基準方向と直交する方向の画素数から、上記他方の頂点と、上記交点との距離mを取得し、
θ=tan- (m/n)
により、上記第1辺と、基準方向との傾き角θを取得することを特徴としてもよい。
【0016】
上記手順によれば、第1の引き出し線は基準方向と平行になると共に、第2の引き出し線は、基準方向と直交する方向と平行になる。したがって、このような引き出し線を設定することで、第1の引き出し線と第2の引き出し線との交点が直角を形成すると共に、上記2つの引き出し線を底辺にし、上記第1辺を斜辺とした直角三角形を構成することができる。
【0017】
一方、上記第1辺の一方の頂点と、上記交点との間に占める基準方向の画素数から、上記距離nを取得できる。また、上記第1辺の他方の頂点と、上記交点との間に占める基準方向と直交する方向の画素数から、上記距離mを取得できる。
【0018】
さらに、θ=tan- (m/n)より、上記第1辺と第1の引き出し線との傾き角θを求めることができる。ここで、第1の引き出し線は基準方向と平行であるので、θは上記第1辺と基準方向との傾きを示す。
【0019】
本発明の画像処理方法は、上記の手順に加えて、上記ピースの第1辺のサイズHおよび、第1辺と直交する第2辺のサイズWを取得した後、基準方向と平行かつサイズがHである2つの辺と、基準方向と直交する方向と平行かつサイズがWの2つの辺とから構成され、上記ピースと中心が重複する回転後写真フィルムの各座標を設定し、
上記ピースの各座標を(x,y)、回転後写真フィルムの各画素の座標を(x´,y´)とすると、
【0020】
【数2】

Figure 0003743397
【0021】
により、回転後ピースの各画素の座標に対応する上記ピースの各座標位置を算出した後、線形補間により、上記ピースの各座標位置の画素値を算出し、
算出した上記ピースの各座標位置の画素値を、対応する回転後ピースの各画素の座標にはめ込むことにより、上記ピースの回転処理を行うことを特徴としてもよい。
【0022】
上記手順によれば、上記ピースの第1辺のサイズおよび、第1辺と直交する第2辺のサイズWを取得する。これにより、上記ピースと中心を同一にすると共に、基準方向と平行かつサイズがHである2つの辺と、基準方向と直交する方向と平行かつサイズがWである2つの辺とを構成することにより、回転後ピースの各座標を設定することができる。
【0023】
そして、上記ピースの各座標を(x,y)、回転後ピースの各座標を(x´,y´)として、
【0024】
【数3】
Figure 0003743397
【0025】
に上記回転後ピースの各画素の座標値を代入すると、回転後ピースの各画素の座標に対応する、上記ピースの各座標位置を算出することができる。さらに、線形補間処理を行うことで、上記ピースの各座標位置について適切な画素値を算出できる。
【0026】
さらに、算出した上記ピースの各座標位置の画素値を、対応する回転後ピースの各画素の座標にはめ込むことにより、上記ピースの回転処理を行うことができる。ここで、上記手順によれば、まず、回転後ピースの各画素の座標を設定し、これに対応する上記ピースの座標位置を求め、上記座標位置の画素値を線形補間により決定しているので、回転後の各画素の座標を整数に設定することができ、適切な画像処理を行うことができる。
【0027】
本発明の画像処理方法は、上記の手順に加えて、上記第1辺のサイズHは、
H=n/cosθ
により算出することを特徴としてもよい。
【0028】
上記手順によれば、第1の引き出し線と第2の引き出し線との交点が直角を形成すると共に、上記2つの引き出し線を底辺にし、第1辺を斜辺とした直角三角形が構成されている。また、上記傾斜角θは、第1辺と第1の引き出し線とから形成される角であるので、第1辺の一方の頂点と上記交点との基準方向の距離をnとすると、第1辺のサイズHは、H=n/cosθにより算出することができる。
【0029】
本発明の画像処理方法は、上記の手順に加えて、第2辺のサイズWは、基準方向と直交する方向からθ傾いた方向について、第1辺と、第1辺と平行な辺との間の画素数を検出することにより得られることを特徴としてもよい。
【0030】
第1辺は、基準方向から角度θだけ傾いているので、第1辺と直交する辺を第2辺とすると、第2辺は、基準方向と直交する方向から角度θだけ傾いていることになる。したがって、基準方向と直交する方向からθ傾いた方向について、第1辺と、第1辺と平行な辺との画素数を検出することにより、第2辺のサイズW(すなわち、第1辺と、第1辺と平行な辺との間隔)を取得することができる。
【0031】
本発明の画像処理方法は、上記の手順に加えて、上記各ピースは、複数のピースを収納できるフィルムホルダーに収納されていて、フィルムホルダーごと上記写真フィルムからデジタル画像データを取得することを特徴としてもよい。
【0032】
通常、ベタ焼きプリントを作成するために用いられるフィルムホルダーにおいて、ピースをそれぞれ収納するためのポケット幅は、フィルム幅よりも広く構成されている。したがって、各ポケットに収納されている各ピースは、それぞれが異なる方向で傾くことがあり、このような状態でスキャナに画像を読み込ませると、印画紙上に再現される各ピースフィルムの方向、傾きがそれぞれ一致しない。ところが、上記手順によれば、デジタル画像データを取得するときの各ピースの方向がバラバラであっても、印画紙上に配列される各ピースの長手方向または幅方向を、印画紙の長手方向または幅方向と一致させることができるので、フィルムホルダーごと上記写真フィルムからデジタル画像データを取得しても、上述した問題は起こらない。
【0033】
本発明の画像処理方法は、上記の手順に加えて、写真フィルムのコマ画像を構成する各画素における色成分ごとの画素値を対象に、グレー濃度を示す画素値をバランス値として、
補正後画素値=(平均画素値)−(補正前画素値)+バランス値
により、画素値の補正を行うことを特徴としてもよい。
【0034】
ここで、平均画素値とは、写真フィルムのコマ画像を構成する全画素の画素値の平均値である。
【0035】
フィルムホルダーごと写真フィルムからデジタル画像データを取得した場合、各画素の画素値には、フィルムホルダーに相当する画素値も含まれている。この場合、各画素の画素値のうち、写真フィルムのコマ画像に相当する画素値は画素ごとに異なるが、フィルムホルダーに相当する画素値は画素ごとで一定である。
【0036】
したがって、写真フィルムのコマ画像を構成する各画素における色成分ごとの画素値を対象に、平均画素値から補正前各画素値を減算すると、写真フィルムを構成する各画素において、フィルムホルダーに相当する画素値を補正できる。
【0037】
一方、上記減算により得られた値は、各画素のコマ画像に相当する画素値の平均値を0としたときの、各画素における画素値の高低を示すものである。したがって、写真フィルムのコマ画像を構成する各画素において、上記減算値に、グレー濃度を示す上記バランス値を加算すると、グレーを画像平均濃度とした色調の整った画像、すなわちエバンスの定理に従った画像を得ることができる。
【0038】
本発明の画像処理方法は、上記の手順に加えて、上記写真フィルムには、各コマに対して、コマを識別するための情報を示した読み取り記号が付されていることを特徴としてもよい。
【0039】
上記手順によれば、上記写真フィルムからデジタル画像データを取得すると共に上記読み取り記号を認識することができる。これにより、写真フィルム(各ピース)の配置において、順番/表裏/上下方向等を解析することができる。したがって、上記順番/表裏/上下方向等が正確でない場合、これらを正すようにピース単位でのソート処理、鏡像反転、回転処理を行うことが可能となる。なお、各コマを識別するための情報として、例えば、DXコードが挙げられる。
【0040】
本発明の画像処理方法は、上記の手順に加えて、フィルムの長手方向と直交する方向に、少なくとも1列以上の複数のフィルムを配列すると共に、焼き付け時における各フィルムの縮小率が最も小さくなるように、上記配列数および縮小率を決定することを特徴としてもよい。
【0041】
本発明の画像処理プログラムは、上記の課題を解決するために、上記画像処理方法をコンピュータに実行させるための画像処理プログラムであってもよい。
【0042】
本発明の画像処理プログラムを記録した記録媒体は、上記の課題を解決するために、上記画像処理プログラムをコンピュータに読み取り可能に記録してなることを特徴としてもよい。
【0043】
【発明の実施の形態】
〔実施の形態1〕
本実施の形態は、図2に示すような複数の保存ポケットから構成されるフィルムホルダー5に収納された、複数の写真フィルム(以下、単に「フィルム」とする)6…から、フィルムホルダーごとスキャンすることにより、デジタル画像データを取得し、該デジタル画像データに画像処理を施した後、該デジタル画像データに基づいて、ベタ焼きプリントを作成するものである。したがって、該デジタル画像データの取得および処理、上記ベタ焼きプリントを作成する露光ユニットの構成について説明し、後に該デジタル画像データの画像処理およびベタ焼きプリントの作成手順について図に基づき説明する。なお、上記複数の写真フィルムとは、1枚の写真フィルムを複数のピースに分割することにより得られるものとする。
【0044】
本発明の実施の一形態について図に基づいて説明すれば、以下のとおりである。図3は、本実施形態の画像出力システムの概略構成を示すブロック図である。上記画像出力システムは、スキャナユニット(以下、「スキャナ」とする)1、画像処理装置2、写真焼付装置3、モニター4を備えた構成となっている。
【0045】
スキャナ1は、図4に示すように、複数のフィルムをコンタクトグラス1a上に設置することで、画像データを読み取るためのいわゆる透過型フラットベットスキャナである。なお、本実施の形態において、複数のフィルムは、上述したフィルムホルダーに収納されたままコンタクトグラス1a上に設置されることとするが、各フィルムをそのままコンタクトグラス1a上に設置してもよい。また、上記フィルムホルダーは、透明材料または半色透明材料からなるポリエチレンで作成されている。これは、上記複数のフィルムをフィルムホルダーに入れたままスキャニングを行えるようにするためである。なお、図2の参照付Cに示すように、フィルムホルダーに付されるメーカーのロゴマークや商標等は、これらによってフィルム6…が隠されないような位置に付されていなければならない。
【0046】
スキャナ1には、カバー1bに光源が備えられていると共に、コンタクトグラス1aの下部にCCD(CCDラインセンサ)1cが備えられている。すなわち、スキャナ1は、コンタクトグラス1a上に設置された複数ピースに、上部から光を照射すると共に、CCD1cが副走査方向に移動しながら複数のピースとコンタクトグラス1aとを透過した光を読み取ることにより、各ピースから色成分(赤、緑、青)ごとのデジタル画像データ(以下、「画像データ」とする)を取得できる。そして、スキャナ1は、読み取った画像データを画像処理装置2に出力する。
【0047】
画像処理装置2は、PC(Personal Computer)などによって構成されており、スキャナ1から送られた画像データに、種々の画像処理を施し、良質な画像データを写真焼付装置3に供給するブロックである。なお、本実施の形態に係るベタ焼きプリントを作成するための画像処理は、画像処理装置2によって実行されるものであるが、この処理の手順は後に詳述する。
【0048】
プリンタとしての写真焼付装置3は、画像処理装置2によって処理がなされた画像データに基づいて感光材料である印画紙を露光することにより、印画紙上に画像を焼き付けるためのブロックである。すなわち、本実施の形態においては、写真焼付装置3が、スキャナ1によって読み込まれた複数のピースに係る画像データに基づいて、印画紙を焼き付けることでいわゆるベタ焼きプリントを作成する。なお、画像データに応じた光を印画紙に照射するヘッドとしては、画像データに応じて画素ごとに印画紙への照射光を変調できる光変調素子が用いられる。このような光変調素子としては、例えばPLZT露光ヘッド、DMD(デジタル・マイクロミラー・デバイス)、LCD(液晶表示装置)、LED(Light Emitting Diode)パネル、レーザー、FOCRT(Fiber Optic Cathode Ray Tube)、CRT(Cathode Ray Tube)等が挙げられる。
【0049】
なお、写真焼付装置3は、スキャニングと印画紙の露光とを両方行うことができるオートプリンタとして構成してもよい。この場合、画像出力システムを、画像の読み取りから焼付けまでを行うオートプリンタと、画像処理装置2とを接続した構成とすることにより、システムの簡素化を図ることができる。
【0050】
モニター4は、スキャナ1から読み取られた画像、画像処理中の画像、画像処理がなされた画像、システムの動作状況等をオペレータに表示するためのものであり、オペレータがシステム操作を行うためのポインティングデバイス(図示せず)が構成されていてもよい。
【0051】
つぎに、画像処理装置2によって実行される本実施の形態の画像処理について図1に示すフローチャートに基づいて説明する。なお、以下の処理は、各色成分の画像データに対して、それぞれ同様に行われる。
【0052】
まず、スキャナ1が、フィルムホルダーに収納されている状態の複数のピースをスキャニングし、スキャニングした画像データを画像処理装置へ出力する(S1)。ここで、スキャナ1により、図5に示すような画像が得られたとする。
【0053】
つぎに、画像処理装置2は、得られた画像データについて、図6に示すようなヒストグラムを色成分ごとに作成する(S2)。上記ヒストグラムは、画像が示す各画素値を横軸に、画素数を縦軸に示したものである。さらに、画像処理装置2は、上記ヒストグラムから、フィルムと、フィルムホルダーのみの部分との境目の画素値(以下、「境界画素値」とする)を色成分ごとに検出する。これは、上記ヒストグラムに示す如く、フィルムホルダーのみの部分の画素値および、フィルムのフレーム(非画像領域)の画素値は画素ごとで一定であるので、分布の偏りから上記2つの画素値を予測できると共に、これらの画素値の中間値を境界画素値として検出するものである。なお、ここでは、フィルムと、フィルムホルダーのみの部分との境目の画素値を上記境界画素値としているが、フィルムホルダーを用いずにフィルムから画像データを取得した場合は、フレームを示す画素値を上記境界画素値とする。
【0054】
さらに、画像処理装置2は、フィルムの切り出し処理(S3)を行う。この切り出し処理とは、図7(a)に示すように各フィルムについて、主走査方向(基準方向)と平行な2辺と副走査方向と平行な2辺から構成されると共に、各頂点を通過するような枠を設定し、この枠を構成する辺とフィルム辺との傾きを求め、フィルム幅、フィルム長さを求める処理をいう。この切り出し処理の手順を図1(b)に基づいて説明すると以下の通りである。
【0055】
まず、画像処理装置2は、画像を構成する各画素の画素値を探索していき、図7(a)に示すように、フィルムの左上の画素(一方の頂点)を特定する(S3a)。なお、この探索は、S1において検出した境界画素値に基づいて行われる。また、この特定は、図7(a)に示すように、(1)(2)の方向にフィルムに該当する画素が存在せず、(3)の方向にフィルムに該当する画素が存在する場合の、上記境目画素値を示す画素を特定することにより行われる。
【0056】
つぎに、画像処理装置2は、フィルムの左下の画素(他方の頂点)を特定する(S3b)。この特定は、上記境界画素値に基づいて、図7(b)に示すように、副走査方向に向けて、フィルム左上からフィルムの左辺の画素を順に検出していき、境界画素値が途切れた部分を特定することにより行われる。これにより、上記フィルムの左辺(第1辺)を特定することができる。
【0057】
さらに、画像処理装置2は、図7(c)に示すように、フィルム左上の画素から主走査方向へ第1の引き出し線を設定するとともに、左下の画素から副走査方向へ第2の引き出し線を設定する。そして、上記左上の画素と、第1の引き出し線および第2の引き出し線の交点との間に占める画素数から、上記左上の画素と上記交点との距離nを取得できる。また、上記左下の画素と、上記交点との間に占める副走査方向の画素数から、上記左下の画素と上記交点との距離mを取得することができる。これにより、画像処理装置2は、
θ=tan- (m/n)
により、主走査方向に対するフィルムの傾きθを求めることができる(S3c)。
【0058】
また、画像処理装置2は、副走査方向に対してθ傾いた方向における、フィルム左辺から右辺の距離(画素数)、すなわち上辺(第2辺)のサイズWを探索できる。これは、フィルム幅方向のサイズW(以下、フィルム幅Wとする)を算出したものといえる(S3d)。また、画像処理装置2は、H=n/cosθの演算により、フィルムの長手方向の長さ、すなわち左辺のサイズH(以下、「フィルム長さ」とする)を求めることができる(S3e)。以上のような処理を行い、傾きθ、フィルム幅W、フィルム長さHを求めることにより、図1(a)のS2の切り出し処理は完了する。
【0059】
そして、画像処理装置2は、アフィン変換により、フィルムをθだけ回転させ、フィルムの幅方向(第2辺の方向)と副走査方向とを一致させ、フィルムの長手方向(第1辺の方向)と主走査方向とを一致させる回転処理を行う(S4)。この処理を図1(c)に基づいて、以下に説明する。
【0060】
まず、画像処理装置2は、フィルム長さHおよびフィルム幅Wから、フィルムの中心に該当する画素を検出し、フィルム中心を原点にすると共に、主走査方向と平行な方向をy軸とし、副走査方向と平行な方向をx軸としたxy座標系を設定する(S4a)。
【0061】
つぎに、画像処理装置2は、原点をフィルムの中心、主走査方向をフィルム長手方向、副走査方向をフィルム幅方向とし、フィルム長さH、幅Wとしたフィルムを回転後フィルムの各画素の座標を設定する(図8中破線)。これにより、画像処理装置2は、回転後フィルムの各画素の座標を特定することができる(S4b)。
【0062】
ここで、画像処理装置2は、アフィン変換により、回転後フィルムの各画素の座標に対応する回転前フィルムの各座標位置を求める(S4c)。回転後フィルムの各画素の座標を(x´,y´)、回転前フィルムの各座標を(x,y)とすると、フィルムをθ回転させるから、以下の式が成立する。
【0063】
【数4】
Figure 0003743397
【0064】
これにより、回転後フィルムの各画素の座標に対応する回転前フィルムの各座標位置(x,y)を求めることができる。
【0065】
さらに、画像処理装置2は、線形補間により、回転前フィルムの上記各座標位置の画素値を算出する(S4d)。ここで、線形補間を行う理由を以下に説明する。回転後フィルムの各画素の座標から回転前フィルムの座標位置を求めた場合、得られる座標位置は小数となる場合が多い。したがって、この値から最適な画素値を求める必要があり、線形補間により、求めた回転前座標位置に係る周囲の画素の画素値に重みを持たせて、最適な画素値を取得するようにしたものである。
【0066】
そして、画像処理装置2は、フィルムの回転を行う(S4e)。この処理は、上記線形補間により求めた回転前フィルムの各座標位置の画素値を、回転後フィルムにおいて対応する各画素の座標に当てはめることによって行われる。以上のような処理を行うことにより、フィルムをθだけ回転させることができる。
【0067】
さらに、画像処理装置2は、スキャナ1から得られた画像データから構成される画像内に含まれる全てのフィルム(ピースフィルム)について、S2〜S4と同様の処理を実行する(S5)。これにより、全てのフィルムの長手方向を主走査方向、フィルムの幅方向を副走査方向に揃えることができる。
【0068】
さらに、各フィルムの方向を揃える処理が完了した後、画像処理装置2は、フィルムのコマ画像を構成する各画素に関して、以下の演算式により画素値の補正を施す。
【0069】
【数5】
Figure 0003743397
【0070】
ここで、平均画素値とは、写真フィルムのコマ画像を構成する全画素の画素値の平均値である。なお、バランス値とは、グレーを示す画素値をいい、上式は、最大出力階調が255の場合のものである。また、ネガフィルムにおいては、画素値の濃淡をそろえなければならないことから、対数変換を行っている。
【0071】
ここで、上記補正においては、ガンマ値をかけることによるガンマ補正を行っていると同時に、フィルムホルダーの色成分を除去する処理も行われている。上記演算によって、フィルムホルダーの色成分を除去する処理がなされる理由を以下に示す。
【0072】
スキャナ1から取り込んだ画像においては、フィルムおよびフィルムを覆うフィルムホルダーも取り込まれている。この場合、フィルムのコマ画像を構成する各画素の画素値は、フィルムに相当する画素値は画素ごとに異なるが、フィルムホルダーに相当する画素値は画素ごとで一定である。したがって、図9に示すように、フィルムのコマ画像を構成する各画素の画素値を対象に、平均画素値から各画素値を減算すると、フィルムホルダーに相当する画素値を補正できる。そして、上記減算により得られた値は、フィルムのコマ画像に相当する画素値の平均値を0としたときの、フィルムのコマ画像に相当する画素値の高低を示すものである。したがって、上記減算により得られた値に上記バランス値を加算すると、グレーを画像平均濃度とした色調の整った画像、すなわちエバンスの定理に従った画像を得ることができる。なお、上記ガンマ値の除算は行わなくても構わない。
【0073】
その後、画像処理装置2は、処理後の画像データをプリンタ3へ出力すると共に、プリンタ3は、上記画像データに基づいて印画紙を露光することにより、各フィルムの方向が整ったベタ焼きプリントを作成することができる。
【0074】
なお、本実施の形態では、ピース単位の複数のフィルムからフレームごと画像を取り込んでいるが、取り込むフィルムの数は少なくとも1つあれば足りる。また、「主走査方向」を副走査方向とすると共に、「副走査方向」を主走査方向とすることも可能である。
【0075】
〔実施の形態2〕
また、画像処理装置2によれば、印画紙のサイズに応じて、印画紙に焼き付けられる各フィルムの焼き付け位置や焼き付けサイズをユーザー設定により変更することが可能である。以下、この処理について説明する。
【0076】
まず、フィルムサイズを等倍率で焼き付ける手順を説明する。この場合、S2の切り出し処理によって、各フィルムの幅Wおよびフィルム長さHは、既に算出されているから、印画紙上の余白部分のサイズさえわかればよい。例えば、図10に示すように、複数のフィルムのうち、2ピースのフィルムのみを等倍率で印画紙に焼き付ける場合について説明する。図中、Pは印画紙を示し、Fはフィルムを示すものとする。なお、別のピースについては他の印画紙に焼き付けることが可能である。
【0077】
図10のようなベタ焼きプリントを作成する場合の余白部分のサイズは以下のようにして求めることができる。
余白X=〔(印画紙幅)−(各フィルムの幅Wの合計)〕/(フィルムの数+1)
余白Y=〔(印画紙長さ)−(MAXフィルムの長さH)〕/2
なお、(MAXフィルムの長さH)は、各フィルムの長さのうち、最も高い値とする。すなわち、各フィルム長さは異なることがあるので、余白Yは最も高い値のフィルムの長さから算出することとし、一方の端部の余白長さを、各フィルムで揃えることしたものである。このようにして余白部分のサイズが定まると、各フィルムの焼き付け位置も必然的に定まることになる。
【0078】
つぎに、複数のフィルムを拡大/縮小して、1枚の印画紙上に収める手順について説明する。この場合は、原画像および印画紙のサイズから拡大/縮小率を算出する。そして、この拡大/縮小率から、焼き付けるフィルムサイズおよび印画紙上の余白部分のサイズを算出することで、上記拡大/縮小を行うことができる。例えば、図11(a)に示す4ピースのフィルムを、図11(b)に示す印画紙へ、フィルムおよび印画紙の幅方向の倍率を基準に、縮小焼き付けを行う場合は、以下の計算手順でフィルムサイズおよび余白部分のサイズを算出する。
(1)幅方向の拡大/縮小
倍率=(印画紙幅)/(原画像幅)
原画像の各フィルム幅×倍率=処理後のフィルム幅
原画像の各フィルム高さ×倍率=処理後のフィルム高さ
原画像の各余白幅×倍率=処理後の余白幅
図11(a)に示す画像について、幅方向の拡大/縮小を行うと、図11(b)の画像を得ることができる。
【0079】
さらに、図11(a)に示す幅方向に並んだ各フィルムを、図11(c)に示すように,フィルム長手方向に並べ替えることも可能である。この場合、フィルムの長さおよび印画紙の長さの倍率を基準にして、縮小焼き付けを行うが、この場合以下の演算により求めることができる。
(2)長手方向の拡大/縮小
倍率=(印画紙長さ)/{[(MAXフィルム長さH)+(原画像の余白長さ)]×(処理後長手方向のフィルムの数)}
原画像の各フィルム長さ×倍率=処理後のフィルム長さ
原画像の各フィルム幅×倍率=処理後のフィルム幅
印画紙長さ−[(処理後フィルムの長さH)×(処理後長さ方向のフィルムの数)]/(処理後長さ方向のフィルムの数+1)=処理後の余白長さ
このような処理を行うことにより、図11(a)に示す原画像から図11(c)に示すようなベタ焼きプリントを得ることが可能になる。
【0080】
ここで、(2)の長手方向の拡大/縮小においては、フィルム数を長手方向に2段としているが、何段であっても構わない。また、(1)(2)の手順を組み合わせて、上記倍率が等倍付近になるように、倍率および、長手方向におけるフィルムの配列数を決定することが好ましい。すなわち、上記の手順によれば、フィルムの長手方向と直交する方向に、少なくとも1列以上の複数のフィルムを配列すると共に、焼き付け時における各フィルムの縮小率が最も小さくなるように、上記配列数および縮小率を決定することが可能となる。
【0081】
〔実施の形態3〕
また、画像処理装置2は、図12に示すように、フィルムの各コマに付されているDXコードによって、原画像におけるフィルムの順番/表裏/上下方向を自動判別できる。さらに、画像処理装置2は、この判別結果に基づき、フィルムの順番/表裏/上下方向が正確でない場合は、ソート、鏡像反転、回転処理により補正することが可能である。以下、この補正処理について図14に基づいて説明する。
【0082】
まず、画像処理装置2は、スキャナ1が取り込んだ画像データから各フィルムの各コマに付されているDXコードを読み取る(S50)。ここで、DXコードを解析できないフィルムについては、表裏逆で画像が読み取られたものと判断することができる(S51,No)。したがって、画像処理装置2は、このようなフィルムを構成する画素に対して、鏡像反転処理を行い(S52)、フィルムを構成する画像の表裏を反転させることができる。
【0083】
つぎに、全てのフィルムのDXコードを解析できた場合(S51,Yes)、またはS52の処理後、画像処理装置2は、DXコードから各フィルムの方向を解析し、逆方向で読み込まれたフィルムについては回転処理(180度)を施すことにより(S53,No)(S54)、各フィルムの方向を整えることができる。
【0084】
さらに、全てのフィルムの方向が整っている場合(S53,Yes)、またはS54の処理後、画像処理装置2は、DXコードから各コマの番号を解析する。そして、画像処理装置2は、ピース単位でフィルムの順序が整っていない場合は(S55,No)、フィルムの順序をピース単位でソートする(S56)。
【0085】
フィルムの順序が整っている場合(S55,Yes)、またはS56の処理後、補正処理を完了する。このような処理を実行することで、各フィルム片が、表裏または上下逆、若しくは番号の若い順にフィルム片が並べられていない状態でフィルムホルダーに収納されていたとしても、画像処理によって、各フィルムの表裏/上下方向/順序をソートすることができる。また、画像処理装置2は、図15に示すように、オペレータの設定に応じて各コマのそばに対応するコマ番号を付する処理を実行したり、DXコードを記述して、画像を出力することもできる。
【0086】
ところで、以上の実施の形態で説明した処理は、プログラムで実現することが可能である。このプログラムはコンピュータで読み取り可能な記録媒体に格納されている。本発明では、この記録媒体として、画像処理装置2で処理が行われるために必要な図示していないメモリ(例えばROMそのもの)であってもよいし、また図示していないが外部記憶装置としてプログラム読み取り装置が設けられ、そこに記録媒体を挿入することで読み取り可能なプログラムメディアであっても構わない。
【0087】
上記いずれの場合においても、格納されているプログラムはマイクロプロセッサ(図示せず)のアクセスにより実行される構成であってもよいし、格納されているプログラムを読み出し、読み出したプログラムを図示されていないプログラム記憶エリアにダウンロードすることにより、そのプログラムが実行される構成であってもよい。この場合、ダウンロード用のプログラムは予め本体装置に格納されているものとする。
【0088】
ここで、上記プログラムメディアは、本体と分離可能に構成される記録媒体であり、磁気テープやカセットテープ等のテープ系、フロッピーディスクやハードディスク等の磁気ディスクやCD−ROM/MO/MD/DVD等の光ディスクのディスク系、ICカード(メモリーカードを含む)/光カードのカード系、あるいはマスクROM、EPROM、フラッシュROM等による半導体メモリを含めた固定的にプログラムを担持する媒体であってもよい。
【0089】
最後に、上述した実施の形態は、本発明の範囲を限定するものではなく、本発明の範囲内で種々の変更が可能である。
【0090】
【発明の効果】
本発明の画像処理方法は、以上のように、1枚の写真フィルムを複数に分割した各ピースを、フレームごと、1つの画像に取り込んだデジタル画像データを取得し、ベタ焼きプリントを作成するための画像処理方法であって、上記デジタル画像データから得られる画像が示す各画素値に対しての含有画素数を示したヒストグラムを作成するステップと、上記ヒストグラムから上記写真フィルムの非画像領域であるフレームの画素値を検出すると共に、上記写真フィルムのフレームの画素値を基に、上記ピースにおけるいずれか1つの辺を第1辺として特定し、第1辺と基準方向との傾き角θを取得するステップと、上記写真フィルムに対し、傾き角θ分回転処理を行うことにより、ピースの第1辺と基準方向とを一致させるステップとを備え、すべての上記各ピースについて上記3つのステップ行うことを特徴とする。
【0091】
それゆえ、印画紙上に配列される各ピースの長手方向または幅方向を、印画紙の長手方向または幅方向と一致させることが可能になる。
【0092】
本発明の画像処理方法は、上記の手順に加えて、上記第1辺における一方の頂点から基準方向へ第1の引き出し線を設定すると共に、他方の頂点から、基準方向と直交する方向へ第2の引き出し線を設定し、上記一方の頂点と、第1の引き出し線および第2の引き出し線の交点との間に占める基準方向の画素数から、上記一方の頂点と上記交点との距離nを取得すると共に、上記他方の頂点と、上記交点との間に占める基準方向と直交する方向の画素数から、上記他方の頂点と、上記交点との距離mを取得し、
θ=tan- (m/n)
により、上記第1辺と、基準方向との傾き角θを取得することを特徴としてもよい。
【0093】
それゆえ、θ=tan- (m/n)より、上記第1辺と第1の引き出し線との傾き角θを求めることができる。ここで、第1の引き出し線は基準方向と平行であるので、θは上記第1辺と基準方向との傾きを示す。
【0094】
本発明の画像処理方法は、以上のように、上記ピースの第1辺のサイズHおよび、第1辺と直交する第2辺のサイズWを取得した後、基準方向と平行かつサイズがHである2つの辺と、基準方向と直交する方向と平行かつサイズがWの2つの辺とから構成され、上記ピースと中心が重複する回転後ピースの各座標を設定し、
上記ピースの各座標を(x,y)、回転後ピースの各画素の座標を(x´,y´)とすると、
【0095】
【数6】
Figure 0003743397
【0096】
により、回転後ピースの各画素の座標に対応する上記ピースの各座標位置を算出した後、線形補間により、上記ピースの各座標位置の画素値を算出し、
算出した上記ピースの各座標位置の画素値を、対応する回転後ピースの各画素の座標にはめ込むことにより、上記ピースの回転処理を行うことを特徴としてもよい。
【0097】
それゆえ、回転後の各画素の座標を整数に設定することができ、適切な画像処理を行うことができる。
【0098】
本発明の画像処理方法は、上記の手順に加えて、上記第1辺のサイズHは、
H=n/cosθ
により算出することを特徴としてもよい。
【0099】
それゆえ、上記傾斜角θは、第1辺と第1の引き出し線とから形成される角であるので、第1辺の一方の頂点と上記交点との基準方向の距離をnとすると、第1辺のサイズHは、H=n/cosθにより算出することができる。
【0100】
本発明の画像処理方法は、上記の手順に加えて、第2辺のサイズWは、基準方向と直交する方向からθ傾いた方向について、第1辺と、第1辺と平行な辺との間の画素数を検出することにより得られることを特徴としてもよい。
【0101】
それゆえ、基準方向と直交する方向からθ傾いた方向について、第1辺と、第1辺と平行な辺との画素数を検出することにより、第2辺のサイズW(すなわち、第1辺と、第1辺と平行な辺との間隔)を取得することができる。
【0102】
本発明の画像処理方法は、上記の手順に加えて、上記各ピースは、複数のピースを収納できるフィルムホルダーに収納されていて、フィルムホルダーごと上記写真フィルムからデジタル画像データを取得することを特徴としてもよい。
【0103】
それゆえ、デジタル画像データを取得するときの各ピースの方向がバラバラであっても、印画紙上に配列される各ピースの長手方向または幅方向を、印画紙の長手方向または幅方向と一致させることができる。
【0104】
本発明の画像処理方法は、上記の手順に加えて、写真フィルムのコマ画像を構成する各画素における色成分ごとの画素値を対象に、グレー濃度を示す画素値をバランス値として、
補正後画素値=(平均画素値)−(補正前各画素値)+バランス値
により、画素値の補正を行うことを特徴としてもよい。
【0105】
それゆえ、グレーを画像平均濃度とした色調の整った画像、すなわちエバンスの定理に従った画像を得ることができる。
【0106】
本発明の画像処理方法は、上記の手順に加えて、上記写真フィルムには、各コマに対して、コマを識別するための情報を示した読み取り記号が付されていることを特徴としてもよい。
【0107】
それゆえ、上記順番/表裏/上下方向等が正確でない場合、これらを正すようにピース単位でのソート処理、鏡像反転、回転処理を行うことが可能となる。
【0108】
本発明の画像処理方法は、上記の手順に加えて、フィルムの長手方向と直交する方向に、少なくとも1列以上の複数のフィルムを配列すると共に、焼き付け時における各フィルムの縮小率が最も小さくなるように、上記配列数および縮小率を決定することを特徴としてもよい。
【0109】
本発明の画像処理プログラムは、上記の課題を解決するために、上記画像処理方法をコンピュータに実行させるための画像処理プログラムであってもよい。
【0110】
本発明の画像処理プログラムを記録した記録媒体は、上記の課題を解決するために、上記画像処理プログラムをコンピュータに読み取り可能に記録してなることを特徴としてもよい。
【図面の簡単な説明】
【図1】 (a)は、本発明の実施の一形態に係る画像処理の手順を示したフローチャートであり、(b)は、上記画像処理にて実行されるフィルムの切り出し処理の詳細な手順を示したフローチャートであり、(c)は、上記画像処理にて実行されるフィルムの回転処理を示したフローチャートである。
【図2】 本発明の実施の一形態に係る複数のフィルムおよびフィルムホルダーを示した説明図である。
【図3】 上記画像処理が実行される画像処理システムを示したブロック図である。
【図4】 上記画像処理システムの構成要素であるスキャナ(フラットべットスキャナ)を示した斜視図である。
【図5】 上記スキャナが、複数のフィルムおよびフィルムホルダーをデジタル画像データとして取り込んだ場合に、上記デジタル画像データから再現される画像を示した説明図である。
【図6】 上記デジタル画像データから色成分ごとに作成されるヒストグラムであって、縦軸は画素数を示し、横軸は画素値を示す。
【図7】 上記フィルムの切り出し処理を示した説明図であり、(a)はフィルムの左上を特定する処理を示し、(b)はフィルムの左下を特定する処理を示し、(c)は、引き出し線の距離から傾き角を算出する処理を示し、(d)は、フィルム長さおよびフィルム幅Wを取得する処理を示す。
【図8】 上記フィルムの回転処理を示した説明図である。
【図9】 上記画像処理にてなされる、フィルムに係る画像を構成する各画素の画素値の補正処理を示した説明図である。
【図10】 他の実施の形態に係る画像処理にて、2ピースのフィルムを等倍率で印画紙上に焼き付けるイメージを示した説明図である。
【図11】 上記画像処理にて、フィルムの縮小焼き付けを行うイメージを示した説明図であり、(a)は原画像を示し、(b)は印画紙幅と原画像幅とから倍率を求めて縮小焼き付けを行うイメージを示し、(c)は印画紙高さと原画像高さとから倍率を求めて縮小焼き付けを行うイメージを示したものである。
【図12】 上記フィルムに付されているDXコードを示した説明図である。
【図13】 さらに他の実施の形態に係る画像処理にて実行される、180°回転、鏡像反転、ソートを示した説明図である。
【図14】 上記画像処理にて実行される手順を示したフローチャートである。
【図15】 上記画像処理後の画像データから得られるベタ焼きプリントを示した説明図である。
【符号の説明】
1 スキャナ
2 画像処理装置
3 写真焼付装置
4 モニター[0001]
BACKGROUND OF THE INVENTION
  The present invention relates to a method for creating a solid print based on digital image data obtained from a developed film in the field of photographic processing.
[0002]
[Prior art]
  Conventionally, a piece film (hereinafter referred to as “piece”) that constitutes a plurality of frames for the purpose of listing and searching for frame images recorded on photographic film, and examining the quality of a photograph. The so-called “solid print (contact print)” in which the images are closely printed in a line is used in the field of photography.
[0003]
  A solid print is, for example, a piece of photographic film divided into a number of frames, each piece is printed on a piece of photographic paper with a frame, and a frame image on the photographic film is printed. It is a reproduction. That is, in the solid print, not only each frame image but also perforation and DX code corresponding to each frame are clear. As a result, a user, a photo shop, etc. can easily know the ID number of each frame image recorded on one photographic film. For example, it is easy to search for each frame on the photographic film at the time of reprinting. become.
[0004]
  As a method of creating such a solid print, there is a method of printing an image with an analog printer. This method is performed using an exposure unit dedicated to solid printing. The solid printing dedicated exposure unit is a unit for placing a photographic film on photographic paper, fixing the photographic film with a solid printing plate (mask) that matches the size of the photographic film, and exposing the photographic paper together with the photographic film. However, according to the above method, since the photographic film must be directly exposed, there is a trouble that the photographic film for each piece must be once taken out from the film holder.
[0005]
  Incidentally, density correction in such an analog printing method is performed by adjusting the exposure amount from the light source. However, in the above analog method, each piece reproduced on one photographic paper and each frame constituting each piece are simultaneously and integrally burned by light from the same light source, so that the image density for each frame image is increased. It cannot be adjusted. Therefore, the operator repeats printing many times while adjusting the exposure amount of the light source, and sets the exposure time so as to obtain an appropriate print while observing the entire density of all frames reproduced on the photographic paper. The trouble of having to do arises.
[0006]
  On the other hand, as a means for eliminating the above-described labor, a method of creating a solid print by a digital method is disclosed in, for example, Japanese Patent Laid-Open No. 7-250217. According to this method, the image can be read by the scanner while the photographic film (each piece) is placed in the film holder, and the above-described solid print is obtained by exposing the photographic paper based on the digital image data. be able to.
[0007]
[Problems to be solved by the invention]
  By the way, in the said film holder, the pocket width which each accommodates the photographic film of a piece unit is comprised wider than the film width. Therefore, each photographic film (piece) stored in each pocket may be inclined in a different direction. When the scanner reads an image in such a state, each photographic film reproduced on the photographic paper There arises a problem that the direction and the inclination do not coincide with the longitudinal direction or the width direction of the photographic paper.
[0008]
  The present invention has been made to solve the above-mentioned problems, and the object thereof is a photograph reproduced on a photographic paper when a solid print is created from a photographic film stored in a film holder by a digital method. An object of the present invention is to provide an image processing method capable of making the inclination and direction of a film coincide with the longitudinal direction or the width direction of photographic paper.
[0009]
[Means for Solving the Problems]
  In order to solve the above problems, the image processing method of the present invention providesEach piece of one photographic film divided into multiple piecesEvery frame,Captured into one imageAn image processing method for acquiring digital image data and creating a solid print, the step of creating a histogram indicating the number of pixels contained for each pixel value indicated by an image obtained from the digital image data And from the above histogramIt is a non-image area of the photographic filmWhile detecting the pixel value of the frame, based on the pixel value of the frame of the photographic film,pieceIdentifying one of the sides as the first side, obtaining the tilt angle θ between the first side and the reference direction, and performing a rotation process for the tilt angle θ on the photographic film,pieceAnd a step of matching the first side of the reference line with the reference directionDo the above 3 steps for every piece aboveIt is characterized by.
[0010]
  Solid-printing prints, for example, by dividing a piece of film into multiple pieces consisting of several frames, and printing each piece film on a piece of photographic paper frame by frame to reproduce the frame image on the film It is a thing. Here, the “photographic film” referred to in the above procedure may be at least one film. The reference direction is the main scanning direction or the sub-scanning direction.
[0011]
  According to the above procedure, digital image data is obtained frame by frame from photographic film. Then, a histogram indicating the number of contained pixels for each pixel value indicated by the image obtained from the digital image data is created. Here, in the photographic film, the range of pixel values that can be taken by the pixels related to the frame image is wide, while the pixel value that can be taken by the pixels related to the frame is almost constant. The pixel value related to the frame of the photographic film can be predicted from the tendency. That is, the pixel value of the photographic film frame (endmost part) can be detected from the histogram.
[0012]
  When the pixel value of the frame of the photographic film can be detected, any one side of the photographic film can be specified as the first side by searching each pixel constituting the image using the pixel value as a clue. . Thereby, since the direction of the first side is also clarified, the inclination angle θ between the first side of the photographic film and the reference direction can be acquired.
[0013]
  Furthermore, the above photographic film is subjected to a rotation process by an inclination angle θ, therebypieceThe first side direction and the reference direction can coincide with each other. Accordingly, when a solid print is created based on the image data obtained by the image processing method according to the present invention, the directions of the photographic films arranged on the photographic paper can be aligned with the reference direction. Here, since the reference direction is the main scanning direction or the sub-scanning direction, the longitudinal direction or the width direction of each photographic film arranged on the photographic paper can be matched with the longitudinal direction or the width direction of the photographic paper. .
[0014]
  In addition, according to the above procedure, even if the photographic film is divided into a plurality of pieces and each piece is captured in one image at a time, the above-described processing is performed on each piece, so that printing is performed. It becomes possible to align the direction of each piece arranged on the paper with the reference direction. That is, it becomes possible to make the longitudinal direction or the width direction of each piece arranged on the photographic paper coincide with the longitudinal direction or the width direction of the photographic paper.
[0015]
  In addition to the above procedure, the image processing method of the present invention includes:The top of the whole piece,A first lead line is set from one vertex in the first side to the reference direction, and a second lead line is set from the other vertex in a direction orthogonal to the reference direction. The distance n between the one vertex and the intersection is obtained from the number of pixels in the reference direction occupied between the intersection of the one lead line and the second lead line, and the distance between the other vertex and the intersection From the number of pixels in the direction orthogonal to the reference direction in between, obtain the distance m between the other vertex and the intersection,
θ = tan- 1(M / n)
Thus, the inclination angle θ between the first side and the reference direction may be acquired.
[0016]
  According to the above procedure, the first lead line is parallel to the reference direction, and the second lead line is parallel to a direction orthogonal to the reference direction. Therefore, by setting such a lead line, the intersection of the first lead line and the second lead line forms a right angle, the two lead lines are the bottom, and the first side is the hypotenuse. Right triangles can be constructed.
[0017]
  On the other hand, the distance n can be obtained from the number of pixels in the reference direction occupying between one vertex of the first side and the intersection. Further, the distance m can be obtained from the number of pixels in a direction orthogonal to the reference direction occupying between the other vertex of the first side and the intersection.
[0018]
  Furthermore, θ = tan- 1From (m / n), the inclination angle θ between the first side and the first lead line can be obtained. Here, since the first lead line is parallel to the reference direction, θ represents the inclination between the first side and the reference direction.
[0019]
  In addition to the above procedure, the image processing method of the present invention ispieceAfter obtaining the size H of the first side and the size W of the second side orthogonal to the first side, the two sides parallel to the reference direction and having a size H are parallel to the direction orthogonal to the reference direction and Consists of two sides of size WpieceSet the coordinates of the rotated photographic film where the center overlaps with
  the abovepiece(X, y) and (x ', y') are the coordinates of each pixel of the rotated photographic film.
[0020]
[Expression 2]
Figure 0003743397
[0021]
After rotationpieceCorresponding to the coordinates of each pixelpieceAfter calculating each coordinate position ofpieceCalculate the pixel value of each coordinate position of
  Calculated abovepieceThe pixel value at each coordinate position ofpieceBy fitting it to the coordinates of each pixelpieceThe rotation processing may be performed.
[0022]
  According to the above procedure,pieceThe size of the first side and the size W of the second side orthogonal to the first side are acquired. This makes the abovepieceThe two sides having the same center and parallel to the reference direction and having a size H, and two sides having a size W and being parallel to the direction orthogonal to the reference direction, after rotation.pieceEach coordinate can be set.
[0023]
  And abovepieceEach coordinate of (x, y) after rotationpieceEach coordinate of (x ′, y ′) is
[0024]
[Equation 3]
Figure 0003743397
[0025]
After the above rotationpieceSubstituting the coordinate value of each pixel ofpieceCorresponding to the coordinates of each pixelpieceEach coordinate position of can be calculated. Furthermore, by performing linear interpolation processing,pieceAn appropriate pixel value can be calculated for each coordinate position.
[0026]
  Furthermore, the calculated abovepieceThe pixel value at each coordinate position ofpieceBy fitting it to the coordinates of each pixelpieceCan be rotated. Here, according to the above procedure, first after rotationpieceSet the coordinates of each pixel ofpieceSince the pixel position at the coordinate position is determined by linear interpolation, the coordinates of each pixel after rotation can be set to an integer, and appropriate image processing can be performed.
[0027]
  In the image processing method of the present invention, in addition to the above procedure, the size H of the first side is
H = n / cos θ
It is good also as a characteristic to calculate by.
[0028]
  According to the above procedure, the intersection of the first lead line and the second lead line forms a right angle, and the right triangle is configured with the two lead lines as the base and the first side as the hypotenuse. . Further, the inclination angle θ is an angle formed from the first side and the first lead line. Therefore, when the distance in the reference direction between one vertex of the first side and the intersection is n, the first angle The size H of the side can be calculated by H = n / cos θ.
[0029]
  In the image processing method of the present invention, in addition to the above-described procedure, the size W of the second side is the first side and a side parallel to the first side in a direction inclined by θ from the direction orthogonal to the reference direction. It may be obtained by detecting the number of pixels in between.
[0030]
  Since the first side is inclined by an angle θ from the reference direction, if the side orthogonal to the first side is the second side, the second side is inclined by the angle θ from the direction orthogonal to the reference direction. Become. Therefore, by detecting the number of pixels of the first side and the side parallel to the first side in the direction inclined by θ from the direction orthogonal to the reference direction, the size W of the second side (that is, the first side and , The distance between the first side and the side parallel to the first side).
[0031]
  In the image processing method of the present invention, in addition to the above procedure, each piece is stored in a film holder that can store a plurality of pieces, and the digital image data is obtained from the photographic film together with the film holder. It is good.
[0032]
  Usually, in a film holder used to create a solid print, the pocket width for storing each piece is wider than the film width. Therefore, each piece stored in each pocket may be inclined in different directions. When the scanner reads an image in such a state, the direction and inclination of each piece film reproduced on the photographic paper is different. They do not match each other. However, according to the above procedure, the longitudinal direction or width direction of each piece arranged on the photographic paper is set to the longitudinal direction or width of the photographic paper even if the direction of each piece when acquiring digital image data is different. Since the direction can be matched, even if the digital image data is obtained from the photographic film together with the film holder, the above-mentioned problem does not occur.
[0033]
  In addition to the above procedure, the image processing method of the present invention targets the pixel value for each color component in each pixel constituting the frame image of the photographic film, the pixel value indicating the gray density as a balance value,
Pixel value after correction = (Average pixel value) − (Pixel value before correction) + Balance value
Thus, the pixel value may be corrected.
[0034]
  Here, the average pixel value is an average value of the pixel values of all the pixels constituting the frame image of the photographic film.
[0035]
  When digital image data is acquired from a photographic film for each film holder, the pixel value of each pixel includes a pixel value corresponding to the film holder. In this case, among the pixel values of each pixel, the pixel value corresponding to the frame image of the photographic film differs for each pixel, but the pixel value corresponding to the film holder is constant for each pixel.
[0036]
  Therefore, subtracting each pixel value before correction from the average pixel value for the pixel value of each color component in each pixel constituting the frame image of the photographic film corresponds to a film holder in each pixel constituting the photographic film. Pixel value can be corrected.
[0037]
  On the other hand, the value obtained by the subtraction indicates the level of the pixel value in each pixel when the average value of the pixel values corresponding to the frame image of each pixel is 0. Therefore, in each pixel constituting the frame image of the photographic film, when the balance value indicating the gray density is added to the subtraction value, an image having a gray tone with an average density of gray, that is, the Evans theorem is followed. An image can be obtained.
[0038]
  In addition to the above-described procedure, the image processing method of the present invention may be characterized in that a reading symbol indicating information for identifying a frame is attached to each photographic film. .
[0039]
  According to the above procedure, it is possible to acquire digital image data from the photographic film and recognize the reading symbol. Thereby, in arrangement | positioning of a photographic film (each piece), order / front / back / up-down direction etc. can be analyzed. Therefore, when the order / front / back / up / down direction and the like are not accurate, it is possible to perform sort processing, mirror image inversion, and rotation processing for each piece so as to correct them. An example of information for identifying each frame is a DX code.
[0040]
  In addition to the above-described procedure, the image processing method of the present invention arranges a plurality of films in at least one row in a direction orthogonal to the longitudinal direction of the film, and the reduction ratio of each film at the time of printing is minimized. As described above, the arrangement number and the reduction ratio may be determined.
[0041]
  The image processing program of the present invention may be an image processing program for causing a computer to execute the image processing method in order to solve the above-described problems.
[0042]
  In order to solve the above problems, a recording medium on which the image processing program of the present invention is recorded may be characterized in that the image processing program is recorded in a computer-readable manner.
[0043]
DETAILED DESCRIPTION OF THE INVENTION
  [Embodiment 1]
  In this embodiment, the entire film holder is scanned from a plurality of photographic films (hereinafter simply referred to as “films”) 6 accommodated in a film holder 5 composed of a plurality of storage pockets as shown in FIG. As a result, the digital image data is acquired, the image processing is performed on the digital image data, and then a solid print is created based on the digital image data. Therefore, the acquisition and processing of the digital image data and the configuration of the exposure unit for creating the solid print will be described, and the image processing of the digital image data and the procedure for creating the solid print will be described later with reference to the drawings. The plurality of photographic films are obtained by dividing one photographic film into a plurality of pieces.
[0044]
  An embodiment of the present invention will be described below with reference to the drawings. FIG. 3 is a block diagram showing a schematic configuration of the image output system of the present embodiment. The image output system includes a scanner unit (hereinafter referred to as “scanner”) 1, an image processing device 2, a photo printing device 3, and a monitor 4.
[0045]
  The scanner 1FIG.As shown in FIG. 2, the so-called transmissive flatbed scanner for reading image data by installing a plurality of films on the contact glass 1a. In the present embodiment, the plurality of films are installed on the contact glass 1a while being stored in the above-described film holder, but each film may be installed on the contact glass 1a as it is. The film holder is made of polyethylene made of a transparent material or a semi-colored transparent material. This is to enable scanning while the plurality of films are placed in the film holder. 2, the manufacturer's logo mark, trademark, etc. attached to the film holder must be placed in such a position that the films 6 are not hidden by them.
[0046]
  In the scanner 1, a cover 1b is provided with a light source, and a CCD (CCD line sensor) 1c is provided below the contact glass 1a. That is, the scanner 1 irradiates a plurality of pieces installed on the contact glass 1a with light from above, and reads the light transmitted through the plurality of pieces and the contact glass 1a while the CCD 1c moves in the sub-scanning direction. Thus, digital image data (hereinafter referred to as “image data”) for each color component (red, green, blue) can be acquired from each piece. Then, the scanner 1 outputs the read image data to the image processing device 2.
[0047]
  The image processing apparatus 2 is configured by a PC (Personal Computer) or the like, and is a block that performs various image processing on the image data sent from the scanner 1 and supplies high-quality image data to the photographic printing apparatus 3. . Note that the image processing for creating a solid print according to the present embodiment is executed by the image processing apparatus 2, and the procedure of this processing will be described in detail later.
[0048]
  The photographic printing apparatus 3 as a printer is a block for printing an image on photographic paper by exposing the photographic paper, which is a photosensitive material, based on the image data processed by the image processing apparatus 2. That is, in the present embodiment, the photographic printing apparatus 3 creates a so-called solid print by printing photographic paper based on the image data relating to a plurality of pieces read by the scanner 1. As the head for irradiating the printing paper with light corresponding to the image data, a light modulation element that can modulate the irradiation light to the printing paper for each pixel according to the image data is used. Examples of such a light modulation element include a PLZT exposure head, DMD (digital micromirror device), LCD (liquid crystal display), LED (light emitting diode) panel, laser, FOCRT (Fiber Optic Cathode Ray Tube), CRT (Cathode Ray Tube) etc. are mentioned.
[0049]
  The photographic printing apparatus 3 may be configured as an auto printer that can perform both scanning and photographic paper exposure. In this case, the system can be simplified by configuring the image output system to connect the image processing apparatus 2 and an auto printer that performs image reading to printing.
[0050]
  The monitor 4 is for displaying an image read from the scanner 1, an image being processed, an image subjected to image processing, an operation status of the system, and the like to the operator, and pointing for the operator to perform system operations. A device (not shown) may be configured.
[0051]
  Next, the image processing of the present embodiment executed by the image processing apparatus 2 will be described based on the flowchart shown in FIG. The following processing is performed in the same manner for each color component image data.
[0052]
  First, the scanner 1 scans a plurality of pieces stored in the film holder, and outputs the scanned image data to the image processing apparatus (S1). Here, it is assumed that an image as shown in FIG. 5 is obtained by the scanner 1.
[0053]
  Next, the image processing apparatus 2 creates a histogram for each color component as shown in FIG. 6 for the obtained image data (S2). The histogram shows each pixel value indicated by an image on the horizontal axis and the number of pixels on the vertical axis. Furthermore, the image processing apparatus 2 detects, for each color component, a pixel value (hereinafter referred to as “boundary pixel value”) at the boundary between the film and the film holder alone from the histogram. This is because, as shown in the histogram, the pixel value of the film holder only and the pixel value of the film frame (non-image area) are constant for each pixel, so the above two pixel values are predicted from the distribution bias. In addition, an intermediate value between these pixel values is detected as a boundary pixel value. Here, the pixel value at the boundary between the film and only the film holder is the boundary pixel value. However, when image data is acquired from the film without using the film holder, the pixel value indicating the frame is used. The boundary pixel value is used.
[0054]
  Furthermore, the image processing apparatus 2 performs a film cutting process (S3). As shown in FIG. 7A, this cut-out process is composed of two sides parallel to the main scanning direction (reference direction) and two sides parallel to the sub-scanning direction for each film, and passes through each vertex. This is a process for setting a frame to determine the inclination of the side and the film side constituting the frame, and determining the film width and the film length. The procedure of this cut-out process is described below with reference to FIG.
[0055]
  First, the image processing device 2 searches the pixel value of each pixel constituting the image, and specifies the upper left pixel (one vertex) of the film as shown in FIG. 7A (S3a). This search is performed based on the boundary pixel value detected in S1. In addition, as shown in FIG.(1) (2)There is no pixel corresponding to the film in the direction of(3)This is done by specifying a pixel indicating the boundary pixel value when there is a pixel corresponding to the film in the direction of.
[0056]
  Next, the image processing device 2 specifies the lower left pixel (the other vertex) of the film (S3b). This specification is based on the boundary pixel value, and as shown in FIG. 7B, the pixels on the left side of the film are detected in order from the upper left of the film toward the sub-scanning direction, and the boundary pixel value is interrupted. This is done by specifying the part. Thereby, the left side (first side) of the film can be specified.
[0057]
  Further, as shown in FIG. 7C, the image processing apparatus 2 sets a first lead line in the main scanning direction from the upper left pixel of the film, and a second lead line in the sub scanning direction from the lower left pixel. Set. The distance n between the upper left pixel and the intersection can be obtained from the number of pixels occupied between the upper left pixel and the intersection of the first lead line and the second lead line. The distance m between the lower left pixel and the intersection can be obtained from the number of pixels in the sub-scanning direction between the lower left pixel and the intersection. As a result, the image processing apparatus 2
θ = tan- 1(M / n)
Thus, the inclination θ of the film with respect to the main scanning direction can be obtained (S3c).
[0058]
  Further, the image processing apparatus 2 can search for the distance (number of pixels) from the left side of the film to the right side, that is, the size W of the upper side (second side) in the direction inclined by θ with respect to the sub-scanning direction. This can be said to have calculated the size W in the film width direction (hereinafter referred to as film width W) (S3d). Further, the image processing apparatus 2 can obtain the length in the longitudinal direction of the film, that is, the size H of the left side (hereinafter referred to as “film length”) by calculating H = n / cos θ (S3e). By performing the above-described processing and obtaining the inclination θ, the film width W, and the film length H, the cut-out processing of S2 in FIG.
[0059]
  Then, the image processing apparatus 2 rotates the film by θ by affine transformation, matches the width direction of the film (the direction of the second side) and the sub-scanning direction, and the longitudinal direction of the film (the direction of the first side). And a rotation process for matching the main scanning direction (S4). This process will be described below with reference to FIG.
[0060]
  First, the image processing apparatus 2 detects a pixel corresponding to the center of the film from the film length H and the film width W, sets the film center as the origin, and sets the direction parallel to the main scanning direction as the y-axis. An xy coordinate system with the direction parallel to the scanning direction as the x-axis is set (S4a).
[0061]
  Next, the image processing apparatus 2 rotates the film with the origin as the center of the film, the main scanning direction as the film longitudinal direction, the sub-scanning direction as the film width direction, the film length H and the width W as the respective pixels of the film after rotation. Coordinates are set (broken line in FIG. 8). Thereby, the image processing apparatus 2 can specify the coordinates of each pixel of the post-rotation film (S4b).
[0062]
  Here, the image processing apparatus 2 obtains each coordinate position of the film before rotation corresponding to the coordinates of each pixel of the film after rotation by affine transformation (S4c). If the coordinates of each pixel of the post-rotation film are (x ′, y ′) and each coordinate of the pre-rotation film is (x, y), the film is rotated by θ, so the following equation is established.
[0063]
[Expression 4]
Figure 0003743397
[0064]
Thereby, each coordinate position (x, y) of the film before rotation corresponding to the coordinate of each pixel of the film after rotation can be obtained.
[0065]
  Furthermore, the image processing apparatus 2 calculates the pixel value of each coordinate position of the pre-rotation film by linear interpolation (S4d). Here, the reason why linear interpolation is performed will be described below. When the coordinate position of the film before rotation is obtained from the coordinates of each pixel of the film after rotation, the obtained coordinate position isDecimalIn many cases. Therefore, it is necessary to obtain an optimum pixel value from this value, and the optimum pixel value is obtained by weighting the pixel values of surrounding pixels related to the obtained pre-rotation coordinate position by linear interpolation. Is.
[0066]
  Then, the image processing apparatus 2 rotates the film (S4e). This process is performed by applying the pixel value at each coordinate position of the pre-rotation film obtained by the linear interpolation to the coordinates of each corresponding pixel in the post-rotation film. By performing the above processing, the film can be rotated by θ.
[0067]
  Further, the image processing apparatus 2 executes the same processing as S2 to S4 for all films (piece films) included in the image composed of the image data obtained from the scanner 1 (S5). Thereby, the longitudinal direction of all the films can be aligned in the main scanning direction, and the width direction of the films can be aligned in the sub-scanning direction.
[0068]
  Further, after the processing for aligning the directions of the respective films is completed, the image processing apparatus 2 corrects the pixel values by the following arithmetic expression for each pixel constituting the frame image of the film.
[0069]
[Equation 5]
Figure 0003743397
[0070]
Here, the average pixel value is an average value of the pixel values of all the pixels constituting the frame image of the photographic film. The balance value refers to a pixel value indicating gray, and the above equation is for a maximum output gradation of 255. In the negative film, logarithmic conversion is performed because the pixel values have to be arranged in shades.
[0071]
  Here, in the above correction, a gamma correction by applying a gamma value is performed, and at the same time, a process for removing the color component of the film holder is also performed. The reason why the processing for removing the color component of the film holder is performed by the above calculation will be described below.
[0072]
  In the image captured from the scanner 1, a film and a film holder that covers the film are also captured. In this case, the pixel value of each pixel constituting the frame image of the film is different for each pixel, but the pixel value corresponding to the film holder is constant for each pixel. Therefore, as shown in FIG. 9, by subtracting each pixel value from the average pixel value for the pixel value of each pixel constituting the frame image of the film, the pixel value corresponding to the film holder can be corrected. The value obtained by the subtraction indicates the level of the pixel value corresponding to the frame image of the film when the average value of the pixel values corresponding to the frame image of the film is 0. Therefore, when the balance value is added to the value obtained by the subtraction, an image having a well-tuned tone with gray as the average image density, that is, an image according to Evans's theorem can be obtained. The gamma value division may not be performed.
[0073]
  Thereafter, the image processing apparatus 2 outputs the processed image data to the printer 3, and the printer 3 exposes the photographic paper based on the image data, thereby performing a solid print in which the directions of the respective films are aligned. Can be created.
[0074]
  In the present embodiment, images are captured for each frame from a plurality of pieces of film, but at least one film is sufficient. Further, it is possible to set the “main scanning direction” as the sub-scanning direction and the “sub-scanning direction” as the main scanning direction.
[0075]
  [Embodiment 2]
  Further, according to the image processing apparatus 2, it is possible to change the printing position and the printing size of each film to be printed on the photographic paper according to the size of the photographic paper by user setting. Hereinafter, this process will be described.
[0076]
  First, a procedure for baking the film size at an equal magnification will be described. In this case, since the width W and the film length H of each film have already been calculated by the cut-out process in S2, it is only necessary to know the size of the margin part on the photographic paper. For example, as shown in FIG. 10, a case will be described in which only two pieces of a plurality of films are baked on a photographic paper at an equal magnification. In the figure, P indicates photographic paper and F indicates a film. Another piece can be printed on another photographic paper.
[0077]
  The size of the margin when creating a solid print as shown in FIG. 10 can be obtained as follows.
Margin X = [(printing paper width) − (total width W of each film)] / (number of films + 1)
Margin Y = [(printing paper length) − (MAX film length H)] / 2
In addition, let (MAX film length H) be the highest value among the lengths of each film. That is, since the length of each film may be different, the margin Y is calculated from the length of the film with the highest value, and the margin length of one end is made uniform for each film. When the size of the margin portion is determined in this way, the printing position of each film is inevitably determined.
[0078]
  Next, a procedure for enlarging / reducing a plurality of films and storing them on one photographic paper will be described. In this case, the enlargement / reduction ratio is calculated from the size of the original image and the photographic paper. Then, from the enlargement / reduction ratio, the enlargement / reduction can be performed by calculating the size of the film to be printed and the size of the margin on the photographic paper. For example, in the case of performing reduction printing on the four-piece film shown in FIG. 11A to the photographic paper shown in FIG. 11B on the basis of the magnification in the width direction of the film and the photographic paper, the following calculation procedure is performed. To calculate the film size and the size of the margin.
(1)Expansion / reduction in the width direction
Magnification = (Printing paper width) / (Original image width)
Original film width x magnification = processed film width
Original film height x magnification = processed film height
Original image margin width x magnification = margin width after processing
  When the image shown in FIG. 11A is enlarged / reduced in the width direction, the image shown in FIG. 11B can be obtained.
[0079]
  Further, the films arranged in the width direction shown in FIG. 11 (a) can be rearranged in the film longitudinal direction as shown in FIG. 11 (c). In this case, reduction printing is performed based on the magnification of the length of the film and the length of the photographic paper. In this case, it can be obtained by the following calculation.
(2)Longitudinal enlargement / reduction
Magnification = (printing paper length) / {[(MAX film length H) + (original image margin length)] × (number of longitudinal films after processing)}
Original film length x magnification = processed film length
Original film width x magnification = processed film width
Length of photographic paper − [(length H of processed film) × (number of films in length direction after processing)] / (number of films in length direction after processing + 1) = margin length after processing
By performing such processing, it is possible to obtain a solid print as shown in FIG. 11C from the original image shown in FIG.
[0080]
  here,(2)In the enlargement / reduction in the longitudinal direction, the number of films is two in the longitudinal direction, but it may be any number. Also,(1) (2)It is preferable to determine the magnification and the number of films arranged in the longitudinal direction so that the above magnification is close to the same magnification by combining these procedures. That is, according to the above procedure, at least one row of a plurality of films are arranged in a direction perpendicular to the longitudinal direction of the films, and the number of arrangements is set so that the reduction ratio of each film during baking is minimized. It is possible to determine the reduction ratio.
[0081]
  [Embodiment 3]
  Further, as shown in FIG. 12, the image processing apparatus 2 can automatically determine the order / front / back / up / down direction of the film in the original image by the DX code attached to each frame of the film. Further, based on the determination result, the image processing apparatus 2 can correct the film order / front / back / up / down direction by sorting, mirror image inversion, and rotation processing when the film order / front / back / up / down directions are not accurate. Hereinafter, this correction process will be described with reference to FIG.
[0082]
  First, the image processing apparatus 2 reads the DX code attached to each frame of each film from the image data captured by the scanner 1 (S50). Here, it can be determined that the film whose DX code cannot be analyzed has been read in reverse (S51, No). Therefore, the image processing apparatus 2 can perform mirror image reversal processing on the pixels constituting such a film (S52) and reverse the front and back of the image constituting the film.
[0083]
  Next, when the DX codes of all the films can be analyzed (S51, Yes), or after the processing of S52, the image processing apparatus 2 analyzes the direction of each film from the DX code and reads the film in the reverse direction. As for, the direction of each film can be adjusted by applying a rotation process (180 degrees) (S53, No) (S54).
[0084]
  Furthermore, when all the film directions are aligned (S53, Yes), or after the processing of S54, the image processing apparatus 2 analyzes the number of each frame from the DX code. Then, when the order of the films is not arranged in pieces (S55, No), the image processing apparatus 2 sorts the order of the films in pieces (S56).
[0085]
  When the film order is in order (S55, Yes), or after the process of S56, the correction process is completed. By performing such a process, even if each film piece is stored in the film holder in a state where the film pieces are not arranged in order from the front or back or upside down, or from the smallest number, The front / back / up / down / order can be sorted. Further, as shown in FIG. 15, the image processing apparatus 2 executes a process of assigning a frame number corresponding to each frame according to an operator setting, or describes a DX code and outputs an image. You can also.
[0086]
  Incidentally, the processing described in the above embodiments 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) required for processing by the image processing apparatus 2 (for example, a ROM itself), or a program as an external storage device (not shown). It may be a program medium provided with a reading device and readable by inserting a recording medium therein.
[0087]
  In any of the above cases, the stored program may be executed by accessing a microprocessor (not shown), or the stored program is read and the read program is not shown. The program may be executed by downloading to the program storage area. In this case, it is assumed that the download program is stored in the main device in advance.
[0088]
  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 disk or a hard disk, a CD-ROM / MO / MD / DVD, or the like. It may be a medium carrying a fixed program including a semiconductor memory such as a disk system of an optical disk, an IC card (including a memory card) / optical card system, or a mask ROM, EPROM, flash ROM or the like.
[0089]
  Finally, the embodiment described above does not limit the scope of the present invention, and various modifications can be made within the scope of the present invention.
[0090]
【The invention's effect】
  The image processing method of the present invention is as described above.Each piece of one photographic film divided into multiple piecesEvery frame,Captured into one imageAn image processing method for acquiring digital image data and creating a solid print, the step of creating a histogram indicating the number of pixels contained for each pixel value indicated by an image obtained from the digital image data And from the above histogramIt is a non-image area of the photographic filmWhile detecting the pixel value of the frame, based on the pixel value of the frame of the photographic film,pieceIdentifying one of the sides as the first side, obtaining the tilt angle θ between the first side and the reference direction, and performing a rotation process for the tilt angle θ on the photographic film,pieceAnd a step of matching the first side of the reference line with the reference directionDo the above 3 steps for every piece aboveIt is characterized by.
[0091]
Therefore, the longitudinal direction or the width direction of each piece arranged on the photographic paper can be matched with the longitudinal direction or the width direction of the photographic paper.
[0092]
  In addition to the above procedure, the image processing method of the present invention sets a first lead line from one vertex on the first side in the reference direction, and sets the first lead line from the other vertex in a direction orthogonal to the reference direction. Two lead lines are set, and the distance n between the one vertex and the intersection point is determined from the number of pixels in the reference direction between the one vertex and the intersection point of the first and second lead lines. And obtaining the distance m between the other vertex and the intersection from the number of pixels in the direction perpendicular to the reference direction between the other vertex and the intersection,
θ = tan- 1(M / n)
Thus, the inclination angle θ between the first side and the reference direction may be acquired.
[0093]
  Therefore, θ = tan- 1From (m / n), the inclination angle θ between the first side and the first lead line can be obtained. Here, since the first lead line is parallel to the reference direction, θ represents the inclination between the first side and the reference direction.
[0094]
  As described above, the image processing method of the present invention is as described above.pieceAfter obtaining the size H of the first side and the size W of the second side orthogonal to the first side, the two sides parallel to the reference direction and having a size H are parallel to the direction orthogonal to the reference direction and Consists of two sides of size WpieceAfter rotation with overlapping centerpieceSet each coordinate of
  the abovepieceEach coordinate of (x, y) after rotationpieceIf the coordinates of each pixel are (x ′, y ′),
[0095]
[Formula 6]
Figure 0003743397
[0096]
After rotationpieceCorresponding to the coordinates of each pixelpieceAfter calculating each coordinate position ofpieceCalculate the pixel value of each coordinate position of
  Calculated abovepieceThe pixel value at each coordinate position ofpieceBy fitting it to the coordinates of each pixelpieceThe rotation processing may be performed.
[0097]
  Therefore, the coordinates of each pixel after rotation can be set to an integer, and appropriate image processing can be performed.
[0098]
  In the image processing method of the present invention, in addition to the above procedure, the size H of the first side is
H = n / cos θ
It is good also as a characteristic to calculate by.
[0099]
  Therefore, since the inclination angle θ is an angle formed from the first side and the first lead line, if the distance in the reference direction between one vertex of the first side and the intersection is n, The size H of one side can be calculated by H = n / cos θ.
[0100]
  In the image processing method of the present invention, in addition to the above-described procedure, the size W of the second side is the first side and a side parallel to the first side in a direction inclined by θ from the direction orthogonal to the reference direction. It may be obtained by detecting the number of pixels in between.
[0101]
  Therefore, by detecting the number of pixels of the first side and the side parallel to the first side in the direction inclined by θ from the direction orthogonal to the reference direction, the size W of the second side (that is, the first side) And the interval between the first side and the side parallel to the first side).
[0102]
  In the image processing method of the present invention, in addition to the above procedure, each piece is stored in a film holder that can store a plurality of pieces, and the digital image data is obtained from the photographic film together with the film holder. It is good.
[0103]
  Therefore, even if the direction of each piece when acquiring digital image data is different, the longitudinal direction or the width direction of each piece arranged on the photographic paper should match the longitudinal direction or the width direction of the photographic paper. Can do.
[0104]
  In addition to the above procedure, the image processing method of the present invention targets the pixel value for each color component in each pixel constituting the frame image of the photographic film, the pixel value indicating the gray density as a balance value,
Pixel value after correction = (average pixel value)-(each pixel value before correction) + balance value
Thus, the pixel value may be corrected.
[0105]
  Therefore, it is possible to obtain an image having a good color tone with gray as an average image density, that is, an image according to Evans' theorem.
[0106]
  In addition to the above-described procedure, the image processing method of the present invention may be characterized in that a reading symbol indicating information for identifying a frame is attached to each photographic film. .
[0107]
  Therefore, if the order / front / back / up / down directions are not accurate, it is possible to perform sort processing, mirror image inversion, and rotation processing in pieces so as to correct them.
[0108]
  In addition to the above-described procedure, the image processing method of the present invention arranges a plurality of films in at least one row in a direction orthogonal to the longitudinal direction of the film, and the reduction ratio of each film at the time of printing is minimized. As described above, the arrangement number and the reduction ratio may be determined.
[0109]
  The image processing program of the present invention may be an image processing program for causing a computer to execute the image processing method in order to solve the above-described problems.
[0110]
  In order to solve the above problems, a recording medium on which the image processing program of the present invention is recorded may be characterized in that the image processing program is recorded in a computer-readable manner.
[Brief description of the drawings]
FIG. 1A is a flowchart showing a procedure of image processing according to an embodiment of the present invention, and FIG. 1B is a detailed procedure of film cutting processing executed in the image processing. (C) is a flowchart showing a film rotation process executed in the image processing.
FIG. 2 is an explanatory view showing a plurality of films and a film holder according to an embodiment of the present invention.
FIG. 3 is a block diagram showing an image processing system in which the image processing is executed.
FIG. 4 is a perspective view showing a scanner (flatbed scanner) which is a component of the image processing system.
FIG. 5 is an explanatory diagram showing an image reproduced from the digital image data when the scanner captures a plurality of films and film holders as digital image data.
FIG. 6 is a histogram created for each color component from the digital image data, wherein the vertical axis indicates the number of pixels and the horizontal axis indicates the pixel value.
FIGS. 7A and 7B are explanatory views showing the film cut-out process, where FIG. 7A shows the process of specifying the upper left of the film, FIG. 7B shows the process of specifying the lower left of the film, and FIG. The process which calculates an inclination angle from the distance of a leader line is shown, (d) shows the process which acquires film length and film width W. FIG.
FIG. 8 is an explanatory view showing a rotation process of the film.
FIG. 9 is an explanatory diagram showing correction processing of pixel values of each pixel constituting an image related to a film, which is performed by the image processing.
FIG. 10 is an explanatory diagram showing an image of printing two pieces of film on photographic paper at an equal magnification by image processing according to another embodiment.
FIGS. 11A and 11B are explanatory diagrams showing an image for performing reduction printing of a film in the image processing. FIG. 11A shows an original image, and FIG. 11B shows a magnification obtained from a photographic paper width and an original image width. An image for performing reduction printing is shown, and (c) shows an image for performing reduction printing by obtaining a magnification from the photographic paper height and the original image height.
FIG. 12 is an explanatory diagram showing a DX code attached to the film.
FIG. 13 is an explanatory diagram showing 180 ° rotation, mirror image inversion, and sorting, which are executed in image processing according to another embodiment.
FIG. 14 is a flowchart showing a procedure executed in the image processing.
FIG. 15 is an explanatory diagram showing a solid print obtained from the image data after the image processing.
[Explanation of symbols]
  1 Scanner
  2 Image processing device
  3 Photo printing device
  4 Monitor

Claims (11)

1枚の写真フィルムを複数に分割した各ピースを、フレームごと、1つの画像に取り込んだデジタル画像データを取得し、ベタ焼きプリントを作成するための画像処理方法であって、
上記デジタル画像データから得られる画像が示す各画素値に対しての含有画素数を示したヒストグラムを作成するステップと、
上記ヒストグラムから上記写真フィルムの非画像領域であるフレームの画素値を検出すると共に、上記写真フィルムのフレームの画素値を基に、上記ピースにおけるいずれか1つの辺を第1辺として特定し、第1辺と基準方向との傾き角θを取得するステップと、
上記写真フィルムに対し、傾き角θ分回転処理を行うことにより、ピースの第1辺と基準方向とを一致させるステップとを備え、すべての上記各ピースについて上記3つのステップを行うことを特徴とする画像処理方法。
An image processing method for obtaining digital image data obtained by capturing each piece obtained by dividing a piece of photographic film into a plurality of frames and a single image, and creating a solid print,
Creating a histogram indicating the number of contained pixels for each pixel value indicated by an image obtained from the digital image data;
A pixel value of a frame that is a non-image area of the photographic film is detected from the histogram, and any one side of the piece is specified as a first side based on the pixel value of the frame of the photographic film, Obtaining an inclination angle θ between one side and a reference direction;
A step of rotating the photographic film by an inclination angle θ to match the first side of the piece with a reference direction, and performing the above three steps for all the pieces. Image processing method.
上記ピース全体の頂点であって、上記第1辺における一方の頂点から基準方向へ第1の引き出し線を設定すると共に、他方の頂点から、基準方向と直交する方向へ第2の引き出し線を設定し、
上記一方の頂点と、第1の引き出し線および第2の引き出し線の交点との間に占める基準方向の画素数から、上記一方の頂点と上記交点との距離nを取得すると共に、上記他方の頂点と、上記交点との間に占める基準方向と直交する方向の画素数から、上記他方の頂点と、上記交点との距離mを取得し、
θ=tan- (m/n)
により、上記第1辺と、基準方向との傾き角θを取得することを特徴とする請求項1に記載の画像処理方法。
A vertex of the entire piece, setting sets the one of the first lead wire from the apex to the reference direction in the first side, the other vertex, a direction perpendicular to the reference direction of the second lead wire And
The distance n between the one vertex and the intersection is obtained from the number of pixels in the reference direction between the one vertex and the intersection of the first lead line and the second lead line, and the other The distance m between the other vertex and the intersection is obtained from the number of pixels in the direction perpendicular to the reference direction between the vertex and the intersection,
θ = tan - 1 (m / n)
2. The image processing method according to claim 1, wherein an inclination angle θ between the first side and a reference direction is acquired.
上記ピースの第1辺のサイズHおよび、第1辺と直交する第2辺のサイズWを取得した後、
基準方向と平行かつサイズがHである2つの辺と、基準方向と直交する方向と平行かつサイズがWの2つの辺とから構成され、上記ピースと中心が重複する回転後ピースの各座標を設定し、
上記ピースの各座標を(x,y)、回転後ピースの各画素の座標を(x´,y´)とすると、
Figure 0003743397
により、回転後ピースの各画素の座標に対応する上記ピースの各座標位置を算出した後、線形補間により、上記ピースの各座標位置の画素値を算出し、
算出した上記ピースの各座標位置の画素値を、対応する回転後ピースの各画素の座標にはめ込むことにより、上記ピースの回転処理を行うことを特徴とする請求項2に記載の画像処理方法。
After obtaining the size H of the first side of the piece and the size W of the second side orthogonal to the first side,
Two sides reference direction parallel and size is H, parallel and size and direction orthogonal to the reference direction is composed of two sides of is W, the coordinates of the rotated piece the piece and the center overlap Set,
If the coordinates of the piece are (x, y) and the coordinates of the pixels of the rotated piece are (x ′, y ′),
Figure 0003743397
By calculating each coordinate position of the piece corresponding to the coordinates of each pixel of the piece after rotation, by linear interpolation, to calculate the pixel value of each coordinate position of the piece ,
The image processing method according to claim 2, wherein the piece is rotated by fitting the calculated pixel value at each coordinate position of the piece into the coordinates of each pixel of the corresponding post-rotation piece .
上記第1辺のサイズHは、
H=n/cosθ
により算出することを特徴とする請求項3に記載の画像処理方法。
The size H of the first side is
H = n / cos θ
The image processing method according to claim 3, wherein the image processing method is calculated by:
第2辺のサイズWは、基準方向と直交する方向からθ傾いた方向について、第1辺と、第1辺と平行な辺との間の画素数を検出することにより得られることを特徴とする請求項3または4に記載の画像処理方法。  The size W of the second side is obtained by detecting the number of pixels between the first side and a side parallel to the first side in a direction inclined by θ from a direction orthogonal to the reference direction. The image processing method according to claim 3 or 4. 上記各ピースは、複数のピースを収納できるフィルムホルダーに収納されていて、フィルムホルダーごと上記写真フィルムからデジタル画像データを取得することを特徴とする請求項1ないし5のいずれか1項に記載の画像処理方法。The said each piece is accommodated in the film holder which can accommodate a several piece, Digital image data is acquired from the said photographic film with every film holder, The one of Claim 1 thru | or 5 characterized by the above-mentioned. Image processing method. 写真フィルムのコマ画像を構成する各画素における色成分ごとの画素値を対象に、グレー濃度を示す画素値をバランス値として、For the pixel value of each color component in each pixel constituting the frame image of the photographic film, the pixel value indicating the gray density as a balance value,
補正後画素値=(平均画素値)−(補正前画素値)+バランス値Pixel value after correction = (Average pixel value) − (Pixel value before correction) + Balance value
により、画素値の補正を行うことを特徴とする請求項1ないし6のいずれか1項に記載の画像処理方法。The image processing method according to claim 1, wherein the pixel value is corrected by:
フィルムの長手方向と直交する方向に、少なくとも1列以上の複数のフィルムを配列すると共に、While arranging a plurality of films of at least one row in a direction perpendicular to the longitudinal direction of the film,
焼き付け時における各フィルムの縮小率が最も小さくなるように、上記配列数および縮小率を決定することを特徴とする請求項1ないし7のいずれか1項に記載の画像処理方法。  The image processing method according to claim 1, wherein the number of arrangements and the reduction ratio are determined so that the reduction ratio of each film during printing is minimized.
上記写真フィルムには、各コマに対して、コマを識別するための情報を示した読み取り記号が付されていることを特徴とする請求項1ないし8のいずれか1項に記載の画像処理方法。9. The image processing method according to claim 1, wherein a reading symbol indicating information for identifying a frame is attached to each frame on the photographic film. . 請求項1ないし9のいずれか1項に記載の画像処理方法をコンピュータに実行させるための画像処理プログラム。An image processing program for causing a computer to execute the image processing method according to claim 1. 請求項10に記載の画像処理プログラムをコンピュータに読み取り可能に記録してなることを特徴とする画像処理プログラムを記録した記録媒体。11. A recording medium recorded with an image processing program, wherein the image processing program according to claim 10 is recorded in a computer-readable manner.
JP2002169143A 2002-06-10 2002-06-10 Image processing method, image processing program, and recording medium on which image processing program is recorded Expired - Fee Related JP3743397B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002169143A JP3743397B2 (en) 2002-06-10 2002-06-10 Image processing method, image processing program, and recording medium on which image processing program is recorded

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002169143A JP3743397B2 (en) 2002-06-10 2002-06-10 Image processing method, image processing program, and recording medium on which image processing program is recorded

Publications (2)

Publication Number Publication Date
JP2004015664A JP2004015664A (en) 2004-01-15
JP3743397B2 true JP3743397B2 (en) 2006-02-08

Family

ID=30435840

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002169143A Expired - Fee Related JP3743397B2 (en) 2002-06-10 2002-06-10 Image processing method, image processing program, and recording medium on which image processing program is recorded

Country Status (1)

Country Link
JP (1) JP3743397B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109493419B (en) * 2018-11-09 2022-11-22 吉奥时空信息技术股份有限公司 Method and device for acquiring digital surface model from oblique photography data

Also Published As

Publication number Publication date
JP2004015664A (en) 2004-01-15

Similar Documents

Publication Publication Date Title
US7072526B2 (en) Image processing apparatus, image processing method and recording medium
JP2006338584A (en) Image processing apparatus, image processing method, image processing program, image processing system and imaging apparatus
US20020030797A1 (en) Image processing method and apparatus
JP3913604B2 (en) How to create ID photo
US7164496B2 (en) Image correction apparatus
US7013052B1 (en) Image processing apparatus
JPH10200693A (en) Digital printing method
JP3743397B2 (en) Image processing method, image processing program, and recording medium on which image processing program is recorded
JPH10155091A (en) Image recorder
EP1046948A1 (en) Digital exposure type photo processing apparatus
US5050007A (en) Image-scanning apparatus and method therefor
JP2002359776A (en) Image scanner
JP3862198B2 (en) ID photo photographing apparatus, image processing apparatus and ID photo creating system
JP2000004391A (en) Aberration correction quantity setting method, position adjusting device and image processor
JP3908216B2 (en) Printing system
US7099048B2 (en) Image reproducing method and image reproducing apparatus
JP2636442B2 (en) Trimming print making system
US6633650B1 (en) Image processing apparatus
JP2003187257A (en) Image creation system
JP3576812B2 (en) Image processing apparatus and image processing method
JP3764526B2 (en) Digital printing method and apparatus
US6480258B2 (en) Photo printing apparatus
JPH11352601A (en) Image processing method and device
JP2000092326A (en) Density characteristic correcting method and color correcting method
JPH0675305A (en) Camera and photograph printing device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050622

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050712

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050909

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051107

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees