JP3869635B2 - Image processing apparatus, image processing method, recording medium, and print system - Google Patents

Image processing apparatus, image processing method, recording medium, and print system Download PDF

Info

Publication number
JP3869635B2
JP3869635B2 JP2000220706A JP2000220706A JP3869635B2 JP 3869635 B2 JP3869635 B2 JP 3869635B2 JP 2000220706 A JP2000220706 A JP 2000220706A JP 2000220706 A JP2000220706 A JP 2000220706A JP 3869635 B2 JP3869635 B2 JP 3869635B2
Authority
JP
Japan
Prior art keywords
head
frame
portrait image
person
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
JP2000220706A
Other languages
Japanese (ja)
Other versions
JP2002042116A (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.)
Seiko Precision Inc
Original Assignee
Seiko Precision Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Precision Inc filed Critical Seiko Precision Inc
Priority to JP2000220706A priority Critical patent/JP3869635B2/en
Publication of JP2002042116A publication Critical patent/JP2002042116A/en
Application granted granted Critical
Publication of JP3869635B2 publication Critical patent/JP3869635B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

【0001】
【発明の技術分野】
本発明は、画像処理装置、画像処理方法、記録媒体およびプリントシステムに関し、特に均一な色の背景上に人物の上半身が撮影された肖像画像を所定の大きさのフレーム内において人物の頭部が所定位置になるように処理する画像処理装置、画像処理方法およびそのような処理をコンピュータに実行させるプログラムを記録した記録媒体、さらには上記のように処理された肖像画像を印刷するプリントシステムに関する。
【0002】
【従来の技術】
従来、例えば社員証用の肖像写真を作成する場合、均一な色の背景上に人物の上半身が撮影された肖像写真を画像データとしてパーソナルコンピュータに入力し、所定のフレーム内で画像データ中の人物が中心にくるようにフレームの位置を調節するとともに不要な部分をトリミングして画像サイズを調整するという作業を人的に行うケースがある。
【0003】
また、均一な色の背景上に人物の上半身が撮影された肖像画像中の人物を自動的に所定フレーム内の中心に配置させる技術が特開2000−36032号公報に開示されている。この開示技術を簡単に説明すると、肖像画像の上端から下方へ走査し背景色と異なる色が存在する箇所を頭頂として検出し、検出した頭頂を中心に肌色でかつ明るい部分を検索して顔面のマスク画像を作成し、この作成したマスク画像からあご部を検出し、これらの検出結果に基づき人物の顔面が所定の位置になるように顔面の位置を決定し、不要な部分をトリミングしサイズを調整するものである。
【0004】
【発明が解決しようとする課題】
しかしながら、前者は画像データとして取り込まれた肖像写真について頭部および顔面が中心になるようにフレーム位置を調整し不要な部分をカットするという煩わしい作業を、処理する肖像写真の数だけ繰り返さなくてはならず、作業者に苦痛を与えるばかりでなく作業時間も膨大なものになってしまう。
【0005】
後者は、色彩の情報によって顔面を認識して顔面のマスク画像を作成し、作成したマスク画像に基づきあごの位置を検出するなどの複雑な処理を必要とするため、肖像画像中の人物を所定フレーム内の中心に位置させて不要な部分をトリミングしサイズを調整するのに多くの時間を必要としていた。また、この処理時間を短くするには高速の処理装置を必要とし、頭頂と顔面部とあご部等の検出を行う際、それぞれ異なった処理を用いて各々を検出している。つまり、頭頂は背景色と異なる色の存在を検出する処理を用いて検出し、顔面部は頭頂を中心に肌色でかつ明るい部分を検索する処理を用いて検出し、あご部は検出した顔面部の最下部を検出する処理を用いて検出している。よって、複数の全く異なる処理を実行させる必要があり、その分処理が複雑になるという問題を有している。また、あご部を検出するため、肌色でかつ明るい部分を検索するという複雑な処理だけでなく、検出した顔面部の最下部を検出する処理も行わなければならなかった。
【0006】
【課題を解決するための手段】
本発明は、人物が撮影された肖像画像を所定の大きさのフレーム内において上記人物の頭部が所定位置になるように処理する画像処理装置であって、上記肖像画像から上記人物の頭頂を検出する頭頂検出手段と、上記肖像画像から上記人物の頭部左端を検出する左側頭部検出手段と、上記肖像画像から上記人物の頭部右端を検出する右側頭部検出手段と、上記フレームの大きさと上記各検出手段の検出結果に基づき、上記人物の頭部が上記フレーム内の所定位置になるように制御する制御手段とを含んでいる。よって、顔面のマスク画像を作成する複雑な処理を行わずに所定の大きさのフレーム内において人物の頭部が所定位置になるように処理可能になり、複雑な処理に伴う処理時間を短縮できる。
【0007】
さらに、上記制御手段が、検出された頭部左端と頭部右端および上記フレームの大きさとに基づき上記フレーム内の上記人物の頭部の水平方向位置を制御する水平方向制御手段と、検出された左端と右端の間隔と上記フレームの水平方向の長さとで求まる背景比率に基づき上記検出した頭頂と上記フレームの上端との間隔を制御する垂直方向制御手段とを含む構成としたので、上記の効果に加え、人物の頭部が存在する領域を含むフレームの水平方向における背景の占める割合に応じて頭頂とフレームの上端との間隔を制御可能になり、フレーム内に人物をバランスよく配置することが可能になる。
【0008】
上記肖像画像を均一な輝度の背景上に人物を撮影したものとし、上記頭頂検出手段を、上記肖像画像の上部から下方に向けて上記肖像画像を走査し上記背景の輝度と異なる輝度の存在の検出に基づき上記頭頂を検出する構成とし、上記左側頭部検出手段を上記肖像画像の左部から右方に向けて上記肖像画像を走査し上記背景の輝度と異なる輝度の存在の検出に基づき上記頭部左端を検出する構成とし、上記右側頭部検出手段を上記肖像画像の右部から左方に向けて上記肖像画像を走査し上記背景の輝度と異なる輝度の存在の検出に基づき上記頭部右端を検出する構成とすれば、上記の効果に加え、背景の輝度と異なる輝度の存在を検出するという処理を頭頂検出、頭部左端検出および頭部右端検出に用いることが可能となり、検出処理の簡素化が可能になる。
【0009】
上記制御手段が、検出された頭部左端と頭部右端の間隔と上記フレームの水平方向の長さに基づき上記フレームの大きさを変更するフレームサイズ補正手段をさらに含めば、顔の大小にかかわらずフレーム内を人物が占める割合を均一化することが可能となる。
【0010】
本発明に係るプリントシステムは、均一な輝度の背景上に人物が撮影された肖像画像を入力する肖像画像入力部と、上記入力された肖像画像を所定の大きさのフレーム内において上記人物の頭部が所定位置になるように処理する上記画像処理装置と、上記フレーム内の上記肖像画像を印刷する印刷部とを含むので、上記のようにフレーム内において人物の頭部が所定位置になるように処理された肖像画像を利用して印刷ができるため画像処理時間の短縮により高速の印刷が可能となる。
【0011】
本発明に係る画像処理方法は、人物が撮影された肖像画像を所定の大きさのフレーム内において上記人物の頭部が所定位置になるように処理する画像処理方法であって、上記肖像画像から上記人物の頭頂を検出する第1の処理と、上記肖像画像から上記人物の頭部左端を検出する第2の処理と、上記肖像画像から上記人物の頭部右端を検出する第3の処理と、上記フレームの大きさと上記各処理により検出された頭頂、頭部左端および頭部右端に基づき、上記人物の頭部が上記フレーム内の所定位置になるよう制御する第4の処理とを含んでいる。よって、顔面のマスク画像を作成する複雑な処理を行わずに所定の大きさのフレーム内において人物の頭部が所定位置になるように処理可能になる。よって、複雑な処理に伴う処理時間を短縮できる。
【0012】
さらに、上記第4の処理を、検出された頭部左端と頭部右端および上記フレームの水平方向の長さに基づき上記人物の頭部の上記フレーム内の水平方向の位置を制御する第5の処理と、検出された頭部左端と頭部右端の間隔と上記フレームの水平方向の長さとで求まる背景比率に基づき上記検出した頭頂と上記フレームの上端との間隔を制御する第6の処理を含むものとしたので、上記の効果に加え、人物の頭部が存在する領域を含むフレームの水平方向における背景の占める割合に応じて頭頂とフレームの上端との間隔を制御可能になり、フレーム内に人物をバランスよく配置可能となる。
【0013】
上記肖像画像は均一な輝度の背景上に人物を撮影したものであり、上記第1の処理を上記肖像画像の上部から下方に向けて上記肖像画像を走査し上記背景の輝度と異なる輝度の存在の検出に基づき上記頭頂を検出する処理とし、上記第2の処理を、上記肖像画像の左部から右方に向けて上記肖像画像を走査し上記背景の輝度と異なる輝度の存在の検出に基づき上記頭部左端を検出する処理とし、上記第3の処理を、上記肖像画像の右部から左方に向けて上記肖像画像を走査し上記背景の輝度と異なる輝度の存在の検出に基づき上記頭部右端を検出する処理とすれば、上記の効果に加え、背景の輝度と異なる輝度の存在を検出するという処理を頭頂検出、頭部左端検出および頭部右端検出に用いることが可能となり、検出処理の簡素化が可能になる。
【0014】
上記第4の処理を、検出された頭部左端と頭部右端の間隔と上記フレームの水平方向の長さに基づき上記フレームの大きさを変更する第7の処理を含むものとすれば、上記の効果に加え、顔の大小にかかわらずフレーム内を人物が占める割合を均一化することが可能となる。
【0015】
また、本発明の記録媒体によれば、その記録内容であるプログラムをコンピュータに読み取らせることによって上述のような装置を容易に実現することが可能になる。
【0016】
【発明の実施の形態】
以下、本発明の実施の一形態を図面に示す実施例に基づいて説明する。
【0017】
図1において、1はCPU、2はRAM、3はROMである。4はリムーバブル記録媒体読取装置で、後述する画像処理を行うためのコンピュータプログラムPGが記録された記録媒体5(例えばフレキシブルディスクやCD−ROM、MO等)からコンピュータプログラムPGを読み取ったり、所望の記録媒体に対して所望のデータの書込みや読取りを行う。6はハードディスク(以下「HDD」という。)で、均一な輝度の背景上に人物の上半身が撮影された肖像画像および後述する画像処理により生成される肖像画像の条件としてフレームの大きさ等が記憶されるとともに、記録媒体5から読み取ったコンピュータプログラムPGを記憶する。7はポインティングデバイスで、例えばマウス等を用い、入力部としても機能する。8はキーボードで入力部として機能するだけでなくポインティングデバイスとしても機能する。9はデジタルカメラで、均一な色の背景上に人物の上半身を写した肖像画像を撮影する。10は表示部で、HDD6に記憶されている肖像画像や処理中および処理後の肖像画像等を表示する。11は印刷部で、画像処理された肖像画像を例えば社員カードや名刺等に印刷する。ポインティングデバイス7とキーボード8とデジタルカメラ9と表示部10と印刷部11はインタフェイス(以下「I/O」という。)12を介してCPU1に接続される。
【0018】
図2は、図1の構成の要部を機能別に分けて示した機能ブロック図である。
【0019】
同図において、記憶部100は図1のHDD6に対応するもので、画像データ記憶部101とフレーム条件記憶部102を備えている。画像データ記憶回路101には均一な輝度の背景上に人物の上半身が撮影された肖像画像が記憶される。肖像画像は、例えば予めデジタルカメラ9等で撮影された画像データであり、肖像画像入力部としてのI/O12を介して入力され、画像データ記憶部101に記憶される。フレーム条件記憶回路102には、後述する画像処理により生成される所望の肖像画像の条件としてフレームの大きさ等が記憶される。なお、このフレームの大きさは図1に示したポインティングデバイス7やキーボード8により適宜設定される。
【0020】
演算部200は図1のCPU1、RAM2、ROM3、HDD6に対応するもので、HDD6に記憶されたコンピュータプログラムPGに基づきソフトウェアで実現される左側頭部検出手段201、右側頭部検出手段202、頭頂検出手段203および制御手段204とを備え、制御手段204は水平方向制御手段204aと垂直方向制御手段204bとを備えている。
【0021】
次に、記録媒体5に記録されているコンピュータプログラムPGの内容を具体的に説明する。コンピュータプログラムPGは、肖像画像から人物の頭部左端を検出するプログラムコード(PC1)、肖像画像から人物の頭部右端を検出するプログラムコード(PC2)、肖像画像から人物の頭頂を検出するプログラムコード(PC3)、検出された頭部左端と頭部右端およびフレームの水平方向の長さに基づき人物の頭部のフレーム内の水平方向の位置を制御するプログラムコード(PC4)、検出された頭部左端と頭部右端およびフレームの水平方向の長さに基づき検出した頭頂とフレームの上端との間隔を制御するプログラムコード(PC5)を備える。
【0022】
このようなコンピュータプログラムPGが記録された記録媒体5がリムーバブル記憶媒体読取装置4に装入された場合、それに記録されている各プログラムコードが一旦HDD6に記憶される。そして、必要に応じてHDD6から各プログラムコードが読み出されてRAM2に記憶され、それぞれがCPU1により順次実行される。その際の動作は図3のフローチャートに示すようになる。
【0023】
つぎに、図3および図4を参照して動作を説明する。なお、本例では、複数の社員それぞれに対して顔写真入りカードを発行する例を用いて説明する。
【0024】
均一な輝度の背景上に人物の上半身がほぼ中央に存在する肖像画像を複数の社員それぞれについてデジタルカメラ9で撮影し、撮影した複数の社員分の肖像画像をI/O12を介して画像データとしてHDD6(画像データ記憶部101)に記憶する。但し、撮影される人物の身体的特徴や立ち位置または座り位置や人物を撮影するデジタルカメラの位置等によりHDD6(画像データ記憶部101)に記憶された肖像画像中の人物の位置が中央位置より上下左右にシフトしている場合が多い。このため、後述する画像処理を用いることにより人物の位置を肖像画像の所定の位置(例えば中央位置)に配置するとともに不必要なデータを削除するためのトリミングを行う。
【0025】
オペレータが処理開始の指示をポインティングデバイス7またはキーボード8の操作により与えると、CPU1は、HDD6(画像データ記憶部101)に記憶されている複数の肖像画像から1枚の肖像画像を読み込み、読み込んだ肖像画像Aを表示部10に表示させる(ステップ3a)。
【0026】
肖像画像Aが表示部10に表示されると、オペレータは表示された肖像画像Aを見ながらポインティングデバイス7またはキーボード8を操作して所望の大きさのフレームBを肖像画像A上に設定する(ステップ3b)(図4(a)参照)。このフレームBは、顔写真入りカードに印刷される顔写真部分の大きさ、特に顔写真部分の縦横比に対応した大きさになっている。肖像画像A上におけるフレームBの設定は、フレームB内に人物の頭部Cが収まっており、かつ頭部Cの上と左右に背景Dが存在していればよい程度の簡単な操作により行える。
【0027】
続いて、オペレータは設定したフレームBに応じた肖像画像Aの頭頂からフレームBの上端までの間隔を補正するための基準補正値Xを設定する(ステップ3b)。なお、基準補正値Xの設定はこの段階で行わなくてもよく、その場合例えば基準補正値Xの初期値として1が設定されるようにすればよい。
【0028】
肖像画像A上において設定されたフレームBに関し、その設定条件、詳しくはフレームBの大きさを示す縦方向(垂直方向)と横方向(水平方向)の長さ、肖像画像Aに対する相対位置および基準補正値XがHDD6(フレーム条件記憶部102)に記憶される。
【0029】
この記憶されたフレームBの設定条件は、HDD6(画像データ記憶部101)に記憶されている残りの肖像画像Aが表示部10に表示された際にも利用される。具体的には、HDD6(画像データ記憶部101)に記憶されている残りの肖像画像Aが表示部10に表示された際にフレームBがHDD6(フレーム条件記憶部102)に記憶された設定条件に基づき自動的に肖像画像A上に設定される。よって、肖像画像Aに対するフレームBの設定条件を一度設定すれば、その後その設定に基づき肖像画像Aに対してフレームBが自動的に設定される。
【0030】
表示部10に表示された肖像画像Aに対してフレームBが設定されると、フレームB内の肖像画像中から人物の頭部左端を検出する(ステップ3c)。具体的には、フレームB中の肖像画像AをフレームBの垂直方向中央付近の複数の左端から右端に向かって走査を行い、肖像画像A中のピクセルデータの輝度情報が所定の値よりも大きく変化した点、すなわち肖像画像Aの左部から右方に向けて肖像画像Aを走査し背景の輝度と異なる輝度の存在を検出した所を左側の側頭部として位置を記憶する。この処理を複数回繰り返し得られた位置の平均値を人物の頭部左端として検出する(図4(b)参照)。
【0031】
続いて、フレームB内の肖像画像中から人物の頭部右端を検出する(ステップ3d)。具体的には、フレームB中の肖像画像AをフレームBの垂直方向中央付近の複数の右端から左端に向かって走査を行い、肖像画像A中のピクセルデータの輝度情報が所定の値よりも大きく変化した点、すなわち肖像画像Aの右部から左方に向けて肖像画像Aを走査し背景の輝度と異なる輝度の存在を検出した所を右側の側頭部として位置を記憶する。この処理を複数回繰り返し得られた位置の平均値を人物の頭部右端として検出する(図4(b)参照)。
【0032】
続いて、フレームB内の肖像画像中から人物の頭頂を検出する(ステップ3e)。具体的には、フレームB中の肖像画像AをフレームBの最上段中央部分の複数点から下端に向かって走査を行い、肖像画像A中のピクセルデータの輝度情報が所定の値よりも大きく変化した点、すなわち肖像画像Aの上部から下方に向けて肖像画像Aを走査し背景の輝度と異なる輝度の存在を検出した所を頭頂部として位置を記憶する。この処理を複数回繰り返し得られた位置の平均値を人物の頭頂として検出する(図4(b)参照)。
【0033】
続いて、検出した頭部左端と頭部右端に基づきその中央値を頭部中央の位置として算出し、この中央値がフレームBの水平方向の中心位置となるよう肖像画像Aに対するフレームBの相対位置を補正し、その補正後の状態を表示部10に表示する(ステップ3f)(図4(c)参照)。
【0034】
続いて、検出した頭部左端と頭部右端に基づき頭部Cの横方向の長さを算出し、この算出した頭部Cの長さとフレームBの水平方向の長さに基づきフレームB内において頭部Cが存在する部分の水平方向における背景の占める割合(以下「背景比率」という。)を求める。
【0035】
次にその求めた背景比率を1/2にした値にフレームBの垂直方向の長さおよびHDD6(フレーム条件記憶部102)に記憶されている基準補正値Xを乗算し、その乗算結果がステップ3cで検出した頭頂とフレームBの上端との間隔の値となるよう肖像画像Aに対するフレームBの相対位置を補正し、その補正後の状態を表示部10に表示する(ステップ3g)(図4(d)参照)。
【0036】
このとき基準補正値Xとして1が設定されていると、フレームB内の人物の頭部を含む肖像画像Aにおいて水平方向の背景比率と垂直方向の背景比率が同じになる。よって、バランスのとれた肖像画像を得ることができ、特に例えばフレームBが正方形であった場合、非常にバランスの取れた肖像画像を得ることができる。
【0037】
ステップ3e終了後に表示される肖像画像AとフレームBとの垂直方向の位置関係を修正したい場合は、基準補正値Xを変更することによって行える。具体的に説明すると、基準補正値Xの値を1より大きくすることで肖像画像A中の頭頂とフレームBの上端との間隔を長くでき、基準補正値Xの値を1より小さくすることで肖像画像A中の頭頂とフレームBの上端との間隔を短くできる。なお、この基準補正値Xの設定は、ほとんど同じ条件で撮影された複数の肖像画像Aを同じフレームBを用いて同じような背景バランスを有する肖像画像を作成しようとする場合には変更する必要がない。換言すると、同じ条件で撮影された複数の肖像画像Aを同じフレームBを用いて同じような背景バランスを有する肖像画像を作成しようとする場合には基準補正値Xを所定の値に固定すればよいということになる。
【0038】
ステップ3gが終了すると、フレームBの外側の画像を削除するためのトリミングを行い、トリミングが終了した肖像画像Aを表示部10に表示するとともに(図4(e)参照)、RAM2に格納する。
【0039】
続いて、HDD6(画像データ記憶部101)に記憶されている残りの肖像画像Aについても1枚ずつ上記と同様の画像処理を行っていく(ステップ3h)。なお、このときのフレームBの設定条件は、上述したように先の動作により設定されたものと同じ条件を使用する。つまり、上記画像処理が施される2枚目以降の肖像画像Aについては、オペレータの手を煩わせることなく自動的に画像処理が実行される。また、2枚目以降の肖像画像Aに対する画像処理の流れについては表示部10に表示させてもよいし表示させなくてもよい。なお、2枚目以降の肖像画像Aに対する画像処理の流れを表示させると、オペレータの目視により画像処理をチェックでき、処理の不具合を見つけることが可能となる。また、2枚目以降の肖像画像Aに対する画像処理の流れを表示させない場合、表示に伴う処理がなくなるので、処理時間を短くできる。
【0040】
HDD6(画像データ記憶部101)に記憶されている残りの肖像画像Aに対する上記画像処理が終了すると(ステップ3h)、RAM2に記憶されている画像処理された肖像画像をI/O12を介して印刷部11に送り、印刷部11は例えば社員証や名刺などのカードの所定の領域に送られた肖像画像を印刷する(ステップ3i)。
【0041】
このように、色彩の情報によって顔面を認識して顔面のマスク画像を作成し、作成したマスク画像に基づきあごの位置を検出するなどの複雑な処理を必要とすることなく、所定の大きさのフレーム内において人物の頭部が所定位置になるように処理可能になる。よって、複雑な処理に伴う処理時間を短縮できる。
【0042】
また、背景の輝度と異なる輝度の存在を検出するという処理を頭頂検出、頭部左端検出および頭部右端検出に用いているので、検出処理の簡素化が可能になる。
【0043】
また、検出された頭部左端と頭部右端およびフレームの水平方向の長さに基づきフレームの水平方向における背景の占める割合を求め、この求めた割合に応じて検出した頭頂とフレームの上端との間隔を制御するので、フレーム内に人物をバランスよく配置することが可能になる。
【0044】
上記では、フレームBの大きさを固定にした例を示したが、背景比率に応じてフレームの大きさを補正する例を次に説明する。なお、本例の構成は、図1に示したものと同様であり、HDD6に記憶されているコンピュータプログラムに基づき動作を実行する。
【0045】
図5は、本例の要部を機能別に分けて示した機能ブロック図である。なお、同図において、図2と同一構成のものには同一符号を附してある。図5において、103はフレームサイズ補正条件記憶部で、背景比率に応じたフレームBのサイズ調整量を記憶する。本例では、背景比率に応じたフレームBのサイズ調整量として表1に示す補正条件を記憶する。
【0046】
【表1】

Figure 0003869635
【0047】
なお、フレームサイズ補正条件は表1に示したものに限るものでなく適宜変更可能なものである。204cは背景比率計算手段、204dはフレームサイズ補正手段である。
【0048】
次に、図6を参照して動作を説明する。なお、画像データ記憶部101には既に肖像画像Aが記憶されてあり、フレーム条件記憶部102には既にフレーム条件が設定されているものとする。
【0049】
上記の例と同様に、オペレータによるポインティングデバイス7またはキーボード8の操作により処理開始の指示を与えると、HDD6(画像データ記憶部101)に記憶されている肖像画像Aが表示部10に表示され、その表示上にフレームBがHDD6(フレーム条件記憶部102)に設定されているフレーム条件に応じて設定され、上記の例と同様にフレームB内の肖像画像中から人物の頭部左端、頭部右端および頭頂が検出される(ステップ6a、6b、6c、6d、6e)。
【0050】
続いて、検出した頭部左端と頭部右端に基づき頭部の横方向の長さを算出し、この算出した頭部の長さとフレームBの水平方向の長さに基づきフレームB内において頭部が存在する部分の水平方向における背景の占める割合(背景比率)を計算する(ステップ6f)。
【0051】
続いて、検出した頭部左端と頭部右端に基づき頭部の水平方向の中心を求め、この頭部の水平方向の中心がフレームBの水平方向の中心位置となるよう肖像画像Aに対するフレームBの相対位置を補正し、その補正後の状態を表示部10に表示する(ステップ6g)。
【0052】
続いて、求めた背景比率を1/2にした値にフレームBの縦幅およびHDD6(フレーム条件記憶部102)に記憶されている基準補正値Xを乗算し、その乗算結果が検出した頭頂とフレームBの上端との間隔の値となるよう肖像画像Aに対するフレームBの相対位置を補正し、その補正後の状態を表示部10に表示する(ステップ6h)。
【0053】
続いて、求めた背景比率に対応するフレームBのサイズ調整量をHDD6(フレームサイズ補正条件記憶部103)に記憶したある表1から読み取り、読み取ったサイズ調整量に応じてフレームBの大きさを補正する(ステップ6i)。表1からわかるように、本例では背景比率が10%〜20%の状態を基準とし、背景比率が10%より小さい場合にはフレームBのサイズを縦方向および横方向にそれぞれ10%ずつ大きくして背景比率を大きくし、背景比率が20%より大きい場合にはフレームBのサイズを縦方向および横方向にそれぞれ10%ずつ小さくして背景比率を小さくする。よって、画像処理後の肖像画像における背景比率のバラツキを小さくすることが可能となり、例えば頭部の大小にかかわらずフレーム内を人物が占める割合を均一化することが可能となる。
【0054】
図7はフレームサイズ補正の一例で、図7(a)は背景比率が大きくフレームサイズを縮小する例であり、図7(b)は背景比率が小さくフレームサイズを拡大する例である。なお、フレームサイズの補正を行う際には、フレームの縦横比を維持した状態で補正を行うことが望ましい。
【0055】
続いて、HDD6(画像データ記憶部101)に記憶されている残りの肖像画像Aについても1枚ずつ上記と同様の画像処理を行っていく(ステップ6j)。
【0056】
HDD6(画像データ記憶部101)に記憶されている残りの肖像画像Aに対する上記画像処理が終了すると(ステップ6j)、RAM2に記憶されている画像処理された肖像画像をI/O12を介して印刷部11に送り、印刷部11は例えば社員証や名刺などのカードの所定の領域に送られた肖像画像を印刷する(ステップ6k)。
【0057】
このように画像処理された肖像画像を印刷部11により印刷するので、例えば顔の大小にかかわらず印刷した肖像画において人物が占める割合のバラツキを小さくすることができ、バランスのよい肖像画が得られる。
【0058】
なお、上記ではソフトウェアにて上述した画像処理を行う例を示したが、これに限らず、例えば図2や図5の構成をハードウェアにて実現してもよい。
【0059】
【発明の効果】
本発明の画像処理装置および画像処理方法によれば、頭頂、頭部左端および頭部右端を検出し、その検出結果とフレームの大きさに基づき所定の大きさのフレーム内において人物の頭部が所定位置になるように処理可能なので、顔面のマスク画像の作成やあごの位置の検出という従来必要とされていた複雑な処理を省略可能となり、処理時間を短縮できる。
【0060】
また、本発明のプリントシステムによれば、上記のように画像処理された肖像画像を印刷するので、プリント印刷処理を高速化できる。
【0061】
また、本発明の記録媒体によれば、本発明の特徴的な画像処理形態を汎用のコンピュータによって容易に実現可能となる。
【図面の簡単な説明】
【図1】本発明の一実施例を示すハードウエア構成図。
【図2】本発明の一実施例を示す機能ブロック図。
【図3】本発明の記録媒体に記録されているコンピュータプログラムの内部構成を示すブロック図。
【図4】図1の動作説明のためのフローチャート。
【図5】図1の動作説明のための模式図。
【図6】本発明の他の実施例を示す機能ブロック図。
【図7】図6の動作説明のためのフローチャート。
【符号の説明】
5 記録媒体
11 印刷部
12 肖像画像入力部
201 左側頭部検出手段
202 右側頭部検出手段
203 頭頂検出手段
204 制御手段
204a 水平方向制御手段
204b 垂直方向制御手段
204d フレームサイズ補正手段[0001]
TECHNICAL FIELD OF THE INVENTION
  The present invention relates to an image processing apparatus and an image processing method.,recoding mediaIn particular, an image processing apparatus and image processing for processing a portrait image in which the upper body of a person is photographed on a uniform color background so that the head of the person is in a predetermined position in a frame of a predetermined size Method and program causing a computer to execute such processingRecording media on whichFurthermore, the present invention relates to a printing system for printing a portrait image processed as described above.
[0002]
[Prior art]
Conventionally, for example, when creating a portrait photograph for an employee ID card, a portrait photograph in which the upper body of a person is photographed on a background of uniform color is input as image data to a personal computer, and the person in the image data within a predetermined frame There is a case where the work of adjusting the image size by adjusting the position of the frame so that the image is centered and trimming unnecessary portions is performed manually.
[0003]
Japanese Patent Laid-Open No. 2000-36032 discloses a technique in which a person in a portrait image in which the upper body of a person is photographed on a uniform color background is automatically arranged at the center in a predetermined frame. Briefly describing this disclosed technique, a portion where a color different from the background color exists is detected as a head by scanning downward from the upper end of the portrait image, and a skin-colored and bright part is searched around the detected head to search for a facial image. Create a mask image, detect the chin part from the created mask image, determine the position of the face so that the face of the person is at a predetermined position based on these detection results, trim the unnecessary part and size To be adjusted.
[0004]
[Problems to be solved by the invention]
However, the former has to repeat the troublesome work of adjusting the frame position so that the head and face are centered on the portrait photograph taken as image data and cutting unnecessary parts as many times as the number of portrait photographs to be processed. In addition, not only is it painful for the operator, but the work time is enormous.
[0005]
The latter requires complicated processing such as recognizing the face by color information to create a mask image of the face and detecting the position of the chin based on the created mask image. It took a lot of time to adjust the size by trimming an unnecessary part at the center of the frame. Moreover, in order to shorten this processing time, a high-speed processing device is required, and when detecting the top, face, chin, etc., each is detected using different processing. In other words, the top of the head is detected using a process that detects the presence of a color different from the background color, the face is detected using a process that searches for a skin-colored and bright part around the top of the head, and the chin is the detected face. Is detected using a process for detecting the lowermost part. Therefore, it is necessary to execute a plurality of completely different processes, and the process is complicated accordingly. Further, in order to detect the chin part, not only a complicated process of searching for a skin-colored and bright part but also a process of detecting the lowest part of the detected face part has to be performed.
[0006]
[Means for Solving the Problems]
The present invention is an image processing apparatus that processes a portrait image in which a person is photographed so that the head of the person is in a predetermined position within a frame of a predetermined size, and the head of the person is detected from the portrait image. A head detection means for detecting; a left head detection means for detecting a left edge of the person's head from the portrait image; a right head detection means for detecting a right edge of the person's head from the portrait image; Control means for controlling the head of the person to be at a predetermined position in the frame based on the size and the detection results of the detection means. Therefore, it is possible to perform processing so that the head of a person is in a predetermined position within a frame of a predetermined size without performing complicated processing for creating a facial mask image, and the processing time associated with the complicated processing can be reduced. .
[0007]
Further, the control means detects a horizontal direction control means for controlling a horizontal position of the head of the person in the frame based on the detected left end of the head, right end of the head and the size of the frame. Since the vertical direction control means for controlling the distance between the detected vertex and the upper end of the frame based on the background ratio obtained by the distance between the left end and the right end and the horizontal length of the frame is used, the above effect is achieved. In addition, the distance between the top of the head and the top of the frame can be controlled according to the proportion of the background in the horizontal direction of the frame including the area where the person's head exists, and the person can be arranged in a balanced manner in the frame. It becomes possible.
[0008]
The portrait image is taken of a person on a background of uniform brightness, and the head top detection means scans the portrait image from the top to the bottom of the portrait image and has a brightness different from the brightness of the background. Based on the detection, the head is detected, and the left head detection means scans the portrait image from the left to the right of the portrait image, and detects the presence of luminance different from the luminance of the background. The head is configured to detect the left end of the head, and the right head detection means scans the portrait image from the right part to the left of the portrait image, and detects the presence of brightness different from the brightness of the background. If the configuration detects the right edge, in addition to the above effect, the process of detecting the presence of a luminance different from the luminance of the background can be used for the head top detection, the head left end detection, and the head right end detection. The simplicity of It becomes possible.
[0009]
If the control means further includes a frame size correction means for changing the size of the frame based on the detected distance between the left end of the head and the right end of the head and the horizontal length of the frame, the size of the face is affected. Therefore, it is possible to make the ratio of the person in the frame uniform.
[0010]
A printing system according to the present invention includes a portrait image input unit that inputs a portrait image in which a person is photographed on a background of uniform brightness, and the head of the person within the frame having a predetermined size. Since the image processing apparatus that processes the image to be in a predetermined position and the printing unit that prints the portrait image in the frame, the human head is positioned in the frame as described above. Since the portrait image processed in this way can be used for printing, the image processing time can be shortened to enable high-speed printing.
[0011]
An image processing method according to the present invention is an image processing method for processing a portrait image in which a person is photographed so that the head of the person is in a predetermined position within a frame of a predetermined size. A first process for detecting the top of the person, a second process for detecting the left end of the person's head from the portrait image, and a third process for detecting the right end of the person's head from the portrait image; A fourth process for controlling the head of the person to be at a predetermined position in the frame based on the size of the frame and the top of the head, the left end of the head and the right end of the head detected by each of the processes. Yes. Therefore, it is possible to perform processing so that a person's head is in a predetermined position within a frame having a predetermined size without performing complicated processing for creating a facial mask image. Therefore, the processing time accompanying complicated processing can be shortened.
[0012]
Furthermore, the fourth process is a fifth process for controlling the horizontal position of the human head in the frame based on the detected left and right head ends and the horizontal length of the frame. And a sixth process for controlling the distance between the detected top and the top of the frame based on the background ratio obtained from the processing and the detected distance between the left end of the head and the right end of the head and the horizontal length of the frame. In addition to the above effects, the distance between the top of the frame and the top of the frame can be controlled according to the ratio of the background in the horizontal direction of the frame including the area where the human head exists. The person can be arranged in a balanced manner.
[0013]
The portrait image is a photograph of a person on a background of uniform brightness, and the first image is scanned from the top to the bottom of the portrait image, and the portrait image has a brightness different from the brightness of the background. And the second processing is based on detection of the presence of a luminance different from the luminance of the background by scanning the portrait image from the left to the right of the portrait image. The head left end is detected, and the third process is performed based on detection of presence of brightness different from the background brightness by scanning the portrait image from the right part to the left of the portrait image. In addition to the effects described above, the process of detecting the presence of a luminance different from the luminance of the background can be used for the detection of the top of the head, the left edge of the head, and the right edge of the head. Simplify processing That.
[0014]
If the fourth process includes a seventh process for changing the size of the frame based on the detected distance between the left end of the head and the right end of the head and the horizontal length of the frame, In addition to the above effect, it is possible to make the ratio of the person in the frame uniform regardless of the size of the face.
[0015]
  In addition, the present inventionrecoding mediaAccording toHave the computer read the program that is the recorded contentThis makes it possible to easily realize the apparatus as described above.
[0016]
DETAILED DESCRIPTION OF THE INVENTION
DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, an embodiment of the invention will be described based on examples shown in the drawings.
[0017]
In FIG. 1, 1 is a CPU, 2 is a RAM, and 3 is a ROM. A removable recording medium reader 4 reads the computer program PG from a recording medium 5 (for example, a flexible disk, CD-ROM, MO, etc.) on which a computer program PG for performing image processing to be described later is recorded, or performs desired recording. Write or read desired data on the medium. A hard disk (hereinafter referred to as “HDD”) 6 stores a portrait image obtained by photographing the upper body of a person on a background of uniform brightness and a frame size as a condition of a portrait image generated by image processing described later. At the same time, the computer program PG read from the recording medium 5 is stored. Reference numeral 7 denotes a pointing device that uses, for example, a mouse and functions as an input unit. 8 is a keyboard that functions not only as an input unit but also as a pointing device. A digital camera 9 shoots a portrait image of the upper body of a person on a uniform color background. A display unit 10 displays portrait images stored in the HDD 6, portrait images during and after processing, and the like. A printing unit 11 prints the image-processed portrait image on, for example, an employee card or a business card. The pointing device 7, the keyboard 8, the digital camera 9, the display unit 10, and the printing unit 11 are connected to the CPU 1 via an interface (hereinafter referred to as “I / O”) 12.
[0018]
FIG. 2 is a functional block diagram showing the main part of the configuration of FIG.
[0019]
In the figure, a storage unit 100 corresponds to the HDD 6 in FIG. 1 and includes an image data storage unit 101 and a frame condition storage unit 102. The image data storage circuit 101 stores a portrait image in which the upper body of a person is photographed on a background of uniform brightness. The portrait image is, for example, image data previously captured by the digital camera 9 or the like, is input via the I / O 12 as a portrait image input unit, and is stored in the image data storage unit 101. The frame condition storage circuit 102 stores a frame size and the like as conditions for a desired portrait image generated by image processing to be described later. Note that the size of the frame is appropriately set by the pointing device 7 or the keyboard 8 shown in FIG.
[0020]
The arithmetic unit 200 corresponds to the CPU 1, RAM 2, ROM 3 and HDD 6 of FIG. The control unit 204 includes a horizontal direction control unit 204a and a vertical direction control unit 204b.
[0021]
Next, the contents of the computer program PG recorded on the recording medium 5 will be specifically described. The computer program PG includes a program code (PC1) for detecting the left end of the person's head from the portrait image, a program code (PC2) for detecting the right end of the person's head from the portrait image, and a program code for detecting the top of the person from the portrait image. (PC3), program code (PC4) for controlling the horizontal position of the human head in the frame based on the detected left and right head ends and the horizontal length of the frame, and the detected head A program code (PC5) for controlling the distance between the top of the head and the top of the frame detected based on the left end, the right end of the head, and the horizontal length of the frame is provided.
[0022]
When the recording medium 5 on which such a computer program PG is recorded is inserted into the removable storage medium reader 4, each program code recorded on the recording medium 5 is temporarily stored in the HDD 6. Then, each program code is read from the HDD 6 as necessary and stored in the RAM 2, and each is sequentially executed by the CPU 1. The operation at that time is as shown in the flowchart of FIG.
[0023]
Next, the operation will be described with reference to FIGS. In this example, an example of issuing a card with a face photo to each of a plurality of employees will be described.
[0024]
A portrait image in which the upper body of a person is located in the center on a background of uniform brightness is photographed with a digital camera 9 for each of a plurality of employees, and the photographed portrait images for the plurality of employees are taken as image data via the I / O 12. The data is stored in the HDD 6 (image data storage unit 101). However, the position of the person in the portrait image stored in the HDD 6 (image data storage unit 101) is determined from the center position by the physical characteristics of the person to be photographed, the standing position or the sitting position, the position of the digital camera for photographing the person, and the like. It is often shifted up, down, left and right. For this reason, by using image processing to be described later, the position of the person is arranged at a predetermined position (for example, the center position) of the portrait image, and trimming for deleting unnecessary data is performed.
[0025]
When the operator gives an instruction to start processing by operating the pointing device 7 or the keyboard 8, the CPU 1 reads and reads one portrait image from a plurality of portrait images stored in the HDD 6 (image data storage unit 101). The portrait image A is displayed on the display unit 10 (step 3a).
[0026]
When the portrait image A is displayed on the display unit 10, the operator operates the pointing device 7 or the keyboard 8 while viewing the displayed portrait image A to set a frame B having a desired size on the portrait image A ( Step 3b) (see FIG. 4A). The frame B has a size corresponding to the size of the face photo portion printed on the face photo card, particularly the aspect ratio of the face photo portion. The setting of the frame B on the portrait image A can be performed by a simple operation as long as the head C of the person is within the frame B and the background D is present on the head C and on the left and right. .
[0027]
Subsequently, the operator sets a reference correction value X for correcting the interval from the top of the portrait image A to the upper end of the frame B corresponding to the set frame B (step 3b). The reference correction value X need not be set at this stage. In this case, for example, 1 may be set as the initial value of the reference correction value X.
[0028]
With respect to the frame B set on the portrait image A, the setting conditions, more specifically, the length (vertical direction) and horizontal (horizontal direction) length indicating the size of the frame B, the relative position with respect to the portrait image A and the reference The correction value X is stored in the HDD 6 (frame condition storage unit 102).
[0029]
The stored setting condition of the frame B is also used when the remaining portrait image A stored in the HDD 6 (image data storage unit 101) is displayed on the display unit 10. Specifically, when the remaining portrait image A stored in the HDD 6 (image data storage unit 101) is displayed on the display unit 10, the frame B is stored in the HDD 6 (frame condition storage unit 102). Is automatically set on the portrait image A. Therefore, once the setting condition of the frame B for the portrait image A is set, the frame B is automatically set for the portrait image A based on the setting.
[0030]
When the frame B is set for the portrait image A displayed on the display unit 10, the left end of the person's head is detected from the portrait image in the frame B (step 3c). Specifically, the portrait image A in the frame B is scanned from the left end to the right end near the center in the vertical direction of the frame B, and the luminance information of the pixel data in the portrait image A is larger than a predetermined value. The position is stored with the changed point, that is, the position where the portrait image A is scanned from the left to the right of the portrait image A and the presence of brightness different from the brightness of the background is detected. The average value of the positions obtained by repeating this process a plurality of times is detected as the left end of the person's head (see FIG. 4B).
[0031]
Subsequently, the right end of the head of the person is detected from the portrait image in the frame B (step 3d). Specifically, the portrait image A in the frame B is scanned from the plurality of right ends near the center in the vertical direction of the frame B toward the left end, and the luminance information of the pixel data in the portrait image A is larger than a predetermined value. The position is stored with the changed point, that is, the position where the portrait image A is scanned from the right part to the left of the portrait image A and the presence of brightness different from the brightness of the background is detected. The average value of the positions obtained by repeating this process a plurality of times is detected as the right end of the person's head (see FIG. 4B).
[0032]
Subsequently, the top of the person is detected from the portrait image in the frame B (step 3e). Specifically, the portrait image A in the frame B is scanned from a plurality of points at the center of the uppermost stage of the frame B toward the lower end, and the luminance information of the pixel data in the portrait image A changes more than a predetermined value. That is, the position is stored with the top of the portrait image A being scanned from the top to the bottom of the portrait image A and detecting the presence of brightness different from the brightness of the background. The average value of the positions obtained by repeating this process a plurality of times is detected as the top of the person (see FIG. 4B).
[0033]
Subsequently, the median value is calculated as the position of the center of the head based on the detected left end of the head and the right end of the head, and the relative value of the frame B to the portrait image A so that the median is the horizontal center position of the frame B. The position is corrected, and the corrected state is displayed on the display unit 10 (step 3f) (see FIG. 4C).
[0034]
Subsequently, the lateral length of the head C is calculated based on the detected left end of the head and the right end of the head, and in the frame B based on the calculated length of the head C and the horizontal length of the frame B. The ratio of the background in the horizontal direction of the portion where the head C exists (hereinafter referred to as “background ratio”) is obtained.
[0035]
Next, a value obtained by halving the obtained background ratio is multiplied by the vertical length of the frame B and the reference correction value X stored in the HDD 6 (frame condition storage unit 102). The relative position of the frame B with respect to the portrait image A is corrected so as to be the value of the interval between the top of the head detected in 3c and the upper end of the frame B, and the corrected state is displayed on the display unit 10 (step 3g) (FIG. 4). (See (d)).
[0036]
If 1 is set as the reference correction value X at this time, the background ratio in the horizontal direction and the background ratio in the vertical direction are the same in the portrait image A including the head of the person in the frame B. Therefore, a balanced portrait image can be obtained. In particular, for example, when the frame B is a square, a very balanced portrait image can be obtained.
[0037]
If the vertical positional relationship between the portrait image A and the frame B displayed after step 3e is to be corrected, this can be done by changing the reference correction value X. Specifically, by increasing the value of the reference correction value X above 1, the interval between the top of the portrait image A and the upper end of the frame B can be increased, and by reducing the value of the reference correction value X below 1. The interval between the top of the portrait image A and the upper end of the frame B can be shortened. The setting of the reference correction value X needs to be changed when a plurality of portrait images A photographed under almost the same conditions are used to create portrait images having the same background balance using the same frame B. There is no. In other words, if a plurality of portrait images A photographed under the same conditions are to be used to create portrait images having the same background balance using the same frame B, the reference correction value X should be fixed to a predetermined value. It will be good.
[0038]
When step 3g ends, trimming is performed to delete the image outside the frame B, and the portrait image A after trimming is displayed on the display unit 10 (see FIG. 4E) and stored in the RAM 2.
[0039]
Subsequently, the remaining portrait images A stored in the HDD 6 (image data storage unit 101) are also subjected to image processing similar to the above one by one (step 3h). Note that the setting conditions for the frame B at this time are the same as those set by the previous operation as described above. That is, for the second and subsequent portrait images A subjected to the image processing, the image processing is automatically executed without bothering the operator. The flow of image processing for the second and subsequent portrait images A may be displayed on the display unit 10 or may not be displayed. If the flow of image processing for the second and subsequent portrait images A is displayed, the image processing can be checked by the operator's visual observation, and it is possible to find processing defects. Further, when the flow of image processing for the second and subsequent portrait images A is not displayed, processing associated with the display is eliminated, so that the processing time can be shortened.
[0040]
When the image processing for the remaining portrait image A stored in the HDD 6 (image data storage unit 101) is completed (step 3h), the image-processed portrait image stored in the RAM 2 is printed via the I / O 12. The printing unit 11 prints the portrait image sent to a predetermined area of a card such as an employee card or a business card (step 3i).
[0041]
In this way, a facial mask image is created by recognizing the face based on color information, and a predetermined size is not required without requiring complicated processing such as detecting the position of the jaw based on the created mask image. Processing can be performed so that the head of the person is in a predetermined position within the frame. Thus, the processing time associated with complicated processing can be shortened.
[0042]
In addition, since the process of detecting the presence of brightness different from the brightness of the background is used for the top detection, the head left end detection, and the head right end detection, the detection process can be simplified.
[0043]
Further, the ratio of the background in the horizontal direction of the frame is determined based on the detected left and right head ends and the horizontal length of the frame, and the detected top and the top of the frame are determined according to the calculated ratio. Since the interval is controlled, it becomes possible to arrange the persons in the frame in a balanced manner.
[0044]
In the above, an example in which the size of the frame B is fixed has been described, but an example in which the size of the frame is corrected according to the background ratio will be described below. The configuration of this example is the same as that shown in FIG. 1, and the operation is executed based on a computer program stored in the HDD 6.
[0045]
FIG. 5 is a functional block diagram showing the main part of this example divided by function. In the figure, the same components as those in FIG. In FIG. 5, reference numeral 103 denotes a frame size correction condition storage unit, which stores the size adjustment amount of the frame B according to the background ratio. In this example, the correction conditions shown in Table 1 are stored as the size adjustment amount of the frame B according to the background ratio.
[0046]
[Table 1]
Figure 0003869635
[0047]
The frame size correction conditions are not limited to those shown in Table 1, but can be changed as appropriate. 204c is a background ratio calculation means, and 204d is a frame size correction means.
[0048]
Next, the operation will be described with reference to FIG. Assume that the portrait image A has already been stored in the image data storage unit 101 and the frame condition has already been set in the frame condition storage unit 102.
[0049]
Similar to the above example, when an instruction to start processing is given by the operator operating the pointing device 7 or the keyboard 8, the portrait image A stored in the HDD 6 (image data storage unit 101) is displayed on the display unit 10, On the display, frame B is set according to the frame conditions set in HDD 6 (frame condition storage unit 102), and the head left end of the person's head from the portrait image in frame B as in the above example. The right edge and the crown are detected (steps 6a, 6b, 6c, 6d, 6e).
[0050]
Subsequently, the lateral length of the head is calculated based on the detected left end of the head and the right end of the head, and the head in the frame B is calculated based on the calculated length of the head and the horizontal length of the frame B. The ratio (background ratio) occupied by the background in the horizontal direction of the portion where the image exists is calculated (step 6f).
[0051]
Subsequently, the horizontal center of the head is obtained based on the detected left end of the head and the right end of the head, and the frame B for the portrait image A is set such that the horizontal center of the head is the horizontal center position of the frame B. Is corrected, and the corrected state is displayed on the display unit 10 (step 6g).
[0052]
Subsequently, the value obtained by halving the obtained background ratio is multiplied by the vertical width of the frame B and the reference correction value X stored in the HDD 6 (frame condition storage unit 102), and the top detected by the multiplication result is detected. The relative position of the frame B with respect to the portrait image A is corrected so as to be the value of the interval with the upper end of the frame B, and the corrected state is displayed on the display unit 10 (step 6h).
[0053]
Subsequently, the size adjustment amount of the frame B corresponding to the obtained background ratio is read from a certain table 1 stored in the HDD 6 (frame size correction condition storage unit 103), and the size of the frame B is determined according to the read size adjustment amount. Correction is performed (step 6i). As can be seen from Table 1, in this example, the background ratio is 10% to 20% as a reference, and when the background ratio is smaller than 10%, the size of the frame B is increased by 10% in the vertical and horizontal directions, respectively. Then, the background ratio is increased, and when the background ratio is greater than 20%, the size of the frame B is decreased by 10% in the vertical direction and the horizontal direction to decrease the background ratio. Therefore, the variation in the background ratio in the portrait image after image processing can be reduced, and for example, the ratio of the person in the frame can be made uniform regardless of the size of the head.
[0054]
FIG. 7 shows an example of frame size correction. FIG. 7A shows an example in which the background ratio is large and the frame size is reduced. FIG. 7B shows an example in which the background ratio is small and the frame size is enlarged. When correcting the frame size, it is desirable to perform the correction while maintaining the aspect ratio of the frame.
[0055]
Subsequently, image processing similar to that described above is performed on the remaining portrait images A stored in the HDD 6 (image data storage unit 101) one by one (step 6j).
[0056]
When the image processing on the remaining portrait image A stored in the HDD 6 (image data storage unit 101) is completed (step 6j), the image-processed portrait image stored in the RAM 2 is printed via the I / O 12. The printing unit 11 prints the portrait image sent to a predetermined area of a card such as an employee card or a business card (step 6k).
[0057]
Since the portrait image subjected to the image processing is printed by the printing unit 11, for example, the variation of the proportion of the person in the printed portrait can be reduced regardless of the size of the face, and a well-balanced portrait can be obtained.
[0058]
In addition, although the example which performs the image processing mentioned above with software was shown above, it is not restricted to this, For example, you may implement | achieve the structure of FIG.2 and FIG.5 with hardware.
[0059]
【The invention's effect】
According to the image processing device and the image processing method of the present invention, the top of the head, the left end of the head, and the right end of the head are detected, and the head of the person is detected within the frame of a predetermined size based on the detection result and the size of the frame. Since processing can be performed so as to be in a predetermined position, it is possible to omit complicated processing conventionally required such as creation of a facial mask image and detection of the position of the chin, thereby shortening the processing time.
[0060]
Further, according to the printing system of the present invention, the portrait image subjected to the image processing as described above is printed, so that the print printing process can be speeded up.
[0061]
  In addition, the present inventionrecoding mediaAccordingly, the characteristic image processing mode of the present invention can be easily realized by a general-purpose computer.
[Brief description of the drawings]
FIG. 1 is a hardware configuration diagram showing an embodiment of the present invention.
FIG. 2 is a functional block diagram showing an embodiment of the present invention.
FIG. 3 is a block diagram showing an internal configuration of a computer program recorded on the recording medium of the present invention.
FIG. 4 is a flowchart for explaining the operation of FIG. 1;
FIG. 5 is a schematic diagram for explaining the operation of FIG. 1;
FIG. 6 is a functional block diagram showing another embodiment of the present invention.
7 is a flowchart for explaining the operation of FIG. 6;
[Explanation of symbols]
5 recording media
11 Printing department
12 Portrait image input section
201 Left head detection means
202 Right side head detecting means
203 Head detection means
204 Control means
204a Horizontal direction control means
204b Vertical control means
204d Frame size correction means

Claims (8)

人物が撮影された肖像画像を所定の大きさのフレーム内において上記人物の頭部が所定位置になるように処理する画像処理装置であって、上記肖像画像から上記人物の頭頂を検出する頭頂検出手段と、上記肖像画像から上記人物の頭部左端を検出する左側頭部検出手段と、上記肖像画像から上記人物の頭部右端を検出する右側頭部検出手段と、上記フレームの大きさと上記各検出手段の検出結果に基づき、上記人物の頭部が上記フレーム内の所定位置になるように制御する制御手段とを含むみ、
上記制御手段は、検出された頭部左端と頭部右端および上記フレームの大きさに基づき上記フレーム内の上記人物の頭部の水平方向位置を制御する水平方向制御手段と、検出された頭部左端と頭部右端の間隔と上記フレームの水平方向の長さとで求まる背景比率に基づき上記検出した頭頂と上記フレームの上端との間隔を制御する垂直方向制御手段とを備えた
ことを特徴とする画像処理装置。
An image processing apparatus for processing a portrait image in which a person is photographed so that the head of the person is in a predetermined position in a frame of a predetermined size, and detecting the top of the person from the portrait image Means, left-side head detecting means for detecting the left end of the head of the person from the portrait image, right-side head detecting means for detecting the right end of the head of the person from the portrait image, the size of the frame, and each of the above Control means for controlling the head of the person at a predetermined position in the frame based on the detection result of the detection means,
The control means includes a horizontal direction control means for controlling a horizontal position of the head of the person in the frame based on the detected left and right head ends and the size of the frame, and the detected head Vertical direction control means for controlling the distance between the detected top of the head and the upper end of the frame based on the background ratio determined by the distance between the left end and the right end of the head and the horizontal length of the frame. Image processing device.
請求項1において、上記肖像画像は均一な輝度の背景上に人物を撮影したものであり、上記頭頂検出手段は、上記肖像画像の上部から下方に向けて上記肖像画像を走査し、上記背景の輝度と異なる輝度の存在の検出に基づき上記頭頂を検出するものであり、上記左側頭部検出手段は、上記肖像画像の左部から右方に向けて上記肖像画像を走査し、上記背景の輝度と異なる輝度の存在の検出に基づき上記頭部左端を検出するものであり、上記右側頭部検出手段は、上記肖像画像の右部から左方に向けて上記肖像画像を走査し、上記背景の輝度と異なる輝度の存在の検出に基づき上記頭部右端を検出するものであることを特徴とする画像処理装置。  2. The portrait image according to claim 1, wherein the portrait image is obtained by photographing a person on a background having a uniform luminance, and the head top detecting means scans the portrait image from the top to the bottom of the portrait image, and The top of the head is detected based on the detection of the presence of a brightness different from the brightness, and the left-side head detection means scans the portrait image from the left to the right of the portrait image, and the brightness of the background The right side head detection means scans the portrait image from the right part of the portrait image to the left, and detects the background of the background. An image processing apparatus for detecting the right end of the head based on the detection of the presence of brightness different from brightness. 請求項1又は2において、上記制御手段は、検出された頭部左端と頭部右端の間隔と上記フレームの水平方向の長さとに基づき上記フレームの大きさを変更するフレームサイズ補正手段をさらに含むことを特徴とする画像処理装置。  3. The control means according to claim 1, wherein the control means further includes frame size correction means for changing the size of the frame based on the detected distance between the left end of the head and the right end of the head and the horizontal length of the frame. An image processing apparatus. 均一な色の背景上に人物が撮影された肖像画像を入力する肖像画像入力部と、上記入力された肖像画像を所定の大きさのフレーム内において上記人物の頭部が所定位置になるように処理する請求項1乃至3のいずれかに記載の画像処理装置と、上記フレーム内の上記肖像画像を印刷する印刷部とを含むことを特徴とするプリントシステム。  A portrait image input unit that inputs a portrait image in which a person is photographed on a background of uniform color, and the head of the person is positioned in a predetermined position within a frame of a predetermined size. A printing system comprising: the image processing apparatus according to claim 1, and a printing unit that prints the portrait image in the frame. 人物が撮影された肖像画像を所定の大きさのフレーム内において上記人物の頭部が所定位置になるように処理する画像処理方法であって、上記肖像画像から上記人物の頭頂を検出する第1の処理と、上記肖像画像から上記人物の頭部左端を検出する第2の処理と、上記肖像画像から上記人物の頭部右端を検出する第3の処理と、上記フレームの大きさと上記各処理により検出された頭頂、頭部左端および頭部右端とに基づき、上記人物の頭部が上記フレーム内の所定位置になるよう制御する第4の処理とを含むみ、
上記第4の処理は、検出された頭部左端と頭部右端および上記フレームの水平方向の長さに基づき上記人物の頭部の上記フレーム内の水平方向の位置を制御する第5の処理と、検出された頭部左端と頭部右端の間隔と上記フレームの水平方向の長さとで求まる背景比率に基づき上記検出した頭頂と上記フレームの上端との間隔を制御する第6の処理を含む
ことを特徴とする画像処理方法。
An image processing method for processing a portrait image in which a person is photographed so that the head of the person is located in a predetermined position in a frame of a predetermined size, wherein the first image detecting the head of the person from the portrait image A second process for detecting the left end of the person's head from the portrait image, a third process for detecting the right end of the person's head from the portrait image, the size of the frame, and the processes. And a fourth process for controlling the head of the person to be in a predetermined position in the frame based on the top, the left end of the head and the right end of the head detected by
The fourth process is a fifth process for controlling the horizontal position of the person's head in the frame based on the detected left and right head ends and the horizontal length of the frame. A sixth process for controlling a distance between the detected top and the top of the frame based on a background ratio obtained from a distance between the detected left and right heads and a horizontal length of the frame. An image processing method characterized by the above.
請求項5において、上記肖像画像は均一な輝度の背景上に人物を撮影したものであり、上記第1の処理は、上記肖像画像の上部から下方に向けて上記肖像画像を走査し、上記背景の輝度と異なる輝度の存在の検出に基づき上記頭頂を検出する処理であり、上記第2の処理は、上記肖像画像の左部から右方に向けて上記肖像画像を走査し、上記背景の輝度と異なる輝度の存在の検出に基づき上記頭部左端を検出する処理であり、上記第3の処理は、上記肖像画像の右部から左方に向けて上記肖像画像を走査し、上記背景の輝度と異なる輝度の存在の検出に基づき上記頭部右端を検出する処理であることを特徴とする画像処理方法。  6. The portrait image according to claim 5, wherein the portrait image is obtained by photographing a person on a background having a uniform brightness, and the first process scans the portrait image from the top to the bottom of the portrait image, and the background. Is a process for detecting the top of the head based on the detection of the presence of a brightness different from the brightness of the image. The second process scans the portrait image from the left to the right of the portrait image, and the background brightness And detecting the left end of the head based on the detection of the presence of brightness different from the above, and the third process scans the portrait image from the right part to the left of the portrait image, and the background brightness An image processing method, wherein the right end of the head is detected based on the detection of the presence of a different luminance. 請求項5又は6において、上記第4の処理は、検出された頭部左端と頭部右端の間隔と上記フレームの水平方向の長さに基づき上記フレームの大きさを変更する第7の処理を含んでいることを特徴とする画像処理方法。  7. The fourth process according to claim 5, wherein the fourth process is a seventh process of changing the size of the frame based on the detected distance between the left end of the head and the right end of the head and the horizontal length of the frame. An image processing method comprising: 請求項5乃至7のいずれかに記載された画像処理方法をコンピュータに実行させるプログラムを記録してあることを特徴とするコンピュータ読み取り可能な記録媒体 A computer-readable recording medium on which a program for causing a computer to execute the image processing method according to claim 5 is recorded .
JP2000220706A 2000-07-21 2000-07-21 Image processing apparatus, image processing method, recording medium, and print system Expired - Fee Related JP3869635B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000220706A JP3869635B2 (en) 2000-07-21 2000-07-21 Image processing apparatus, image processing method, recording medium, and print system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000220706A JP3869635B2 (en) 2000-07-21 2000-07-21 Image processing apparatus, image processing method, recording medium, and print system

Publications (2)

Publication Number Publication Date
JP2002042116A JP2002042116A (en) 2002-02-08
JP3869635B2 true JP3869635B2 (en) 2007-01-17

Family

ID=18715264

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000220706A Expired - Fee Related JP3869635B2 (en) 2000-07-21 2000-07-21 Image processing apparatus, image processing method, recording medium, and print system

Country Status (1)

Country Link
JP (1) JP3869635B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4446983B2 (en) 2006-07-07 2010-04-07 富士フイルム株式会社 Image processing apparatus and image processing program
JP5447183B2 (en) * 2010-05-21 2014-03-19 フリュー株式会社 Photo sticker creation apparatus and method, and program
CN102592260B (en) * 2011-12-26 2013-09-25 广州商景网络科技有限公司 Certificate image cutting method and system
CN111832269B (en) * 2020-09-21 2020-12-08 湖南惟楚有才教育科技有限公司 Self-adaptive user head portrait filling method and system

Also Published As

Publication number Publication date
JP2002042116A (en) 2002-02-08

Similar Documents

Publication Publication Date Title
US10127436B2 (en) Apparatus, image processing method and storage medium storing program
JP3983469B2 (en) Image processing apparatus, method, and recording medium
US8265423B2 (en) Image processing for arranging images based on size ratio
JP6012309B2 (en) Information processing apparatus, information processing method, and program
JP4539318B2 (en) Image information evaluation method, image information evaluation program, and image information evaluation apparatus
JP4625356B2 (en) Image trimming with reduced user burden
US20070071319A1 (en) Method, apparatus, and program for dividing images
JP6031278B2 (en) Information processing apparatus, control method thereof, and program
JP6222900B2 (en) Image processing apparatus, image processing method, and program
JP2007094623A (en) Image correcting method and device, and program
KR101098754B1 (en) Image processing apparatus and image processing method
JP2009237977A (en) Image output control device, image output control method, image output control program, and printer
JP3869635B2 (en) Image processing apparatus, image processing method, recording medium, and print system
JP4513369B2 (en) Image trimming apparatus and method
JP4625525B2 (en) Image trimming with reduced user burden
JP2004274428A (en) Image processing method, image processor, recording medium and program
JP2004289706A (en) Image processing method, image processing apparatus and program
JP2000270198A (en) Image processing method and method for processing photo print
JP4605345B2 (en) Image processing method and apparatus
JP5484038B2 (en) Image processing apparatus and control method thereof
JP2000270199A (en) Processing method for photo print
JP6647039B2 (en) Image processing apparatus, image processing method, and computer program
JPH0969165A (en) Picture processor
JP3480370B2 (en) Automatic face image processing device
JP2003187257A (en) Image creation system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060317

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060413

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060612

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060817

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060821

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061013

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20101020

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111020

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20111020

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121020

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20131020

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees