JP2010061646A - Image processing apparatus, image output device, image processing method, and computer program - Google Patents

Image processing apparatus, image output device, image processing method, and computer program Download PDF

Info

Publication number
JP2010061646A
JP2010061646A JP2009174681A JP2009174681A JP2010061646A JP 2010061646 A JP2010061646 A JP 2010061646A JP 2009174681 A JP2009174681 A JP 2009174681A JP 2009174681 A JP2009174681 A JP 2009174681A JP 2010061646 A JP2010061646 A JP 2010061646A
Authority
JP
Japan
Prior art keywords
face
processing
image
area
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2009174681A
Other languages
Japanese (ja)
Other versions
JP5229910B2 (en
Inventor
Hiroyuki Ishida
裕之 石田
Takeshi Uchida
健 内田
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.)
Make Software Co Ltd
Original Assignee
Make Software 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 Make Software Co Ltd filed Critical Make Software Co Ltd
Priority to JP2009174681A priority Critical patent/JP5229910B2/en
Publication of JP2010061646A publication Critical patent/JP2010061646A/en
Application granted granted Critical
Publication of JP5229910B2 publication Critical patent/JP5229910B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus for effectively performing processing for allowing the faces of persons to appear smaller in size on a photographed image, even when a plurality of persons pose with motions, and to provide an image output device, an image processing method and a computer program. <P>SOLUTION: When the face to be detected from the image is processed, it is determined whether a processing contour line is crossed with another processing contour line, concerning the respective detected faces (S73). When the processing contour line is crossed with another processing contour line (S73: YES), the face is removed from processing objects (S75). Thus, distortions will not be generated by the processings in the neighborhood of the contour. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、画像中の人物の顔を加工する画像処理装置に関する。特に、複数の人物が動きのあるポーズをとる場合でも、画像に対し各人物の顔を小顔に見せる加工処理を有効に行なうことができる画像処理装置、該画像処理装置を用いた画像出力装置、画像処理方法及びコンピュータプログラムに関する。   The present invention relates to an image processing apparatus that processes a human face in an image. In particular, even when a plurality of persons take a moving pose, an image processing apparatus capable of effectively performing an image processing process that makes each person's face appear as a small face on an image, and an image output apparatus using the image processing apparatus The present invention relates to an image processing method and a computer program.

画像処理技術の進歩により、カメラでの撮影により得られる画像に種々の加工を加える画像処理が即時的に行なわれるようになった。   Due to advances in image processing technology, image processing for applying various processing to an image obtained by photographing with a camera has been immediately performed.

特許文献1には、ユーザ自身を撮影した写真画像が簡易に印刷出力され、ユーザが写真画像を得ることができる自動写真撮影装置に関し、撮像画像に対して画像の一部を拡大又は縮小することによって変形させ、面白味のある印刷出力を得ることができる自動写真撮影装置の技術が開示されている。   Patent Document 1 relates to an automatic photography apparatus in which a photographic image obtained by photographing a user himself / herself can be easily printed out and a user can obtain a photographic image, and a part of the image is enlarged or reduced with respect to a captured image. The technique of the automatic photography apparatus which can be deformed and can obtain an interesting print output is disclosed.

また特許文献2には、証明写真等の写真画像を出力するに際し、人物を撮影した撮像画像から顔領域を抽出し、更に顔の特徴点を検出し、検出した顔の特徴点の位置に基づいて顔がほっそりするように顔の輪郭を加工することにより、従来の写真スタジオでの撮影技術又はノウハウによらずに、見栄えの良い画像を得ることができる画像補正装置の技術が開示されている。   Further, in Patent Document 2, when outputting a photographic image such as an ID photo, a face region is extracted from a captured image obtained by photographing a person, a face feature point is further detected, and the detected face feature point position is used. Thus, there has been disclosed a technique of an image correction apparatus that can obtain a good-looking image by processing the contour of the face so that the face is slender, without relying on conventional photography techniques or know-how in a photo studio. .

特開2000−267156号公報JP 2000-267156 A 特開2004−318204号公報JP 2004-318204 A

特許文献2に開示された技術により、人物を撮影した画像から顔の輪郭を抽出し、顔がほっそりするように輪郭を加工することができる。しかしながら、特許文献2に開示されている技術で想定されている加工対象の画像は、カメラに正面を向けた1人の人物を撮像する肖像写真又は証明写真等の画像である。   With the technique disclosed in Patent Document 2, it is possible to extract the outline of a face from an image obtained by photographing a person and process the outline so that the face is slender. However, an image to be processed that is assumed in the technology disclosed in Patent Document 2 is an image such as a portrait photograph or an ID photograph that captures a person with the front facing the camera.

肖像写真又は証明写真を撮るなどの特定の場合以外では、被写体となる人物は、カメラの撮影範囲の垂直方向に対して平行に写るような直立した姿勢で写されるとは限らない。特に、ユーザ自身をカメラで写真撮影し、撮影した画像に対し合成する画像の編集を受け付け、編集された画像と撮影した画像とを合成して所定の用紙に印刷し、写真シールとして提供する画像出力装置、所謂プリクラ(登録商標)では、被写体となる人物は一人とは限らず、更に各人物は様々な動きのあるポーズで写ることが多い。   Except for a specific case such as taking a portrait photograph or an identification photograph, the person who is the subject is not always photographed in an upright posture so as to be photographed parallel to the vertical direction of the photographing range of the camera. In particular, the user himself takes a photograph with a camera, accepts editing of the image to be combined with the photographed image, combines the edited image with the photographed image, prints the image on a predetermined sheet, and provides the image as a photo sticker In an output device, so-called “Purikura” (registered trademark), the subject is not limited to one person, and each person is often photographed in various poses.

複数の人物が重なって写る場合、各人物の輪郭に対しても加工を行なう構成とすると、輪郭に歪みが出るなどの不具合が生じる可能性がある。例えば特許文献2に開示されている技術では、顔領域を顔の両側から幅を狭めるように対称に縮小している。人物が重なっているにも拘わらず一方の人物の顔領域を縮小させた場合、縮小される輪郭付近の他方の人物の顔領域における画像情報が欠落するなど歪みが生じる可能性がある。   When a plurality of persons are photographed in an overlapping manner, if the configuration is such that the contour of each person is processed, there is a possibility that problems such as distortion of the contour may occur. For example, in the technique disclosed in Patent Document 2, the face area is reduced symmetrically so as to narrow the width from both sides of the face. When the face area of one person is reduced in spite of overlapping persons, there is a possibility that distortion occurs, for example, image information in the face area of the other person near the reduced outline is missing.

また、各人物が夫々、顔を斜めに傾けて写る、又は顔を斜めに向けて写るなどした場合がある。この場合に認識された顔領域を、正面を向いているという前提で対称に縮小する加工を行なった場合、顔領域内に歪みが生じる可能性も考えられる。   In addition, there are cases where each person is photographed with his / her face tilted or with his / her face tilted. If the face area recognized in this case is processed to be reduced symmetrically on the premise that it is facing the front, there is a possibility that distortion occurs in the face area.

このように、撮像される人物が複数である可能性があり、且つ動きのあるポーズをとることが想定される場合、いずれの人物の顔領域にも同じように加工を施す構成では、本来はすべきでない箇所に無用に加工がされ、人物の顔に歪みが生じるなどの問題が起こる可能性があり、効果的に見栄えを良くすることは困難である。   In this way, when there is a possibility that there are a plurality of persons to be imaged and it is assumed that a pose with movement is assumed, in the configuration in which processing is similarly performed on the face area of any person, It is difficult to improve the appearance effectively because there is a possibility that problems such as distortion of the person's face may occur due to unnecessary processing on the parts that should not be performed.

本発明は斯かる事情に鑑みてなされたものであり、人物が動きのあるポーズをとる場合でも、撮影した画像中の人物の顔を小顔に見せる加工処理を有効に行なうことができる画像処理装置、画像出力装置、画像処理方法及びコンピュータプログラムを提供することを目的とする。   The present invention has been made in view of such circumstances, and even when a person takes a moving pose, image processing that can effectively perform a processing process that makes a face of a person in a photographed image appear as a small face. An object is to provide an apparatus, an image output apparatus, an image processing method, and a computer program.

また本発明の目的は、画像の加工によって輪郭の不自然な歪みが発生することを防止でき、人物の顔を小顔に見せる加工処理を有効に行なうことができる画像処理装置を提供することにある。   It is another object of the present invention to provide an image processing apparatus that can prevent unnatural contour distortion due to image processing and can effectively perform processing that makes a human face look like a small face. is there.

本発明の目的は、顔の目、鼻又は口が写る位置から基準となる位置を特定し、基準に基づき画像の加工処理を行なうことにより、人物が動きのあるポーズをとる場合でも各人物の顔を小顔に見せる加工処理を有効に行なうことができる画像処理装置を提供することにある。   The object of the present invention is to identify a position as a reference from the positions where the eyes, nose or mouth of the face are captured, and to perform image processing based on the reference, so that even when a person takes a moving pose, An object of the present invention is to provide an image processing apparatus capable of effectively performing a processing process of making a face look like a small face.

本発明の目的は、人物の顔の分類別に加工することができ、人物が動きのあるポーズをとる場合でも、各々の顔を小顔に見せる加工処理を有効に行なうことができる画像処理装置を提供することにある。   It is an object of the present invention to provide an image processing apparatus that can be processed according to a person's face classification and that can effectively perform a processing process that makes each face look like a small face even when the person takes a moving pose. It is to provide.

また、本発明の目的は、加工すべきでない箇所に対する無用な加工を防止でき、人物が動きのあるポーズをとる場合でも、各々の顔を小顔に見せる加工処理を有効に行なうことができる画像処理装置を提供することにある。   In addition, an object of the present invention is to prevent unnecessary processing on a portion that should not be processed, and even when a person takes a moving pose, an image that can effectively perform processing that makes each face look like a small face. It is to provide a processing apparatus.

更に本発明の目的は、人物が動きのあるポーズをとる場合でも、各々の人物の写り方及び顔の特性に応じて不自然とならないように、小顔に見せる加工処理を有効に行なうことができる画像処理装置を提供することにある。   Further, an object of the present invention is to effectively perform a processing process shown on a small face so that it does not become unnatural depending on how each person is captured and the characteristics of the face even when the person takes a moving pose. An object of the present invention is to provide an image processing apparatus that can perform such processing.

第1発明に係る画像処理装置は、画像中の人物の顔を検出する検出手段と、検出した顔を加工する加工手段とを備える画像処理装置において、前記検出手段が検出した顔の輪郭に基づき加工処理範囲の境界を特定する処理境界線を設定する処理境界設定手段と、顔の輪郭を含む所定範囲を顔領域として画像から抽出する手段と、前記処理境界設定手段が設定した処理境界線について、他の顔の処理境界線との間の画像内における距離が所定値以下であるか否かを判断する判断手段と、距離が所定値以下と判断された処理境界線に対応する顔の顔領域を加工対象から除外する手段とを備えることを特徴とする。   An image processing apparatus according to a first aspect of the present invention is an image processing apparatus comprising a detecting means for detecting a human face in an image and a processing means for processing the detected face, based on the face contour detected by the detecting means. Processing boundary setting means for setting a processing boundary line for specifying a boundary of the processing processing range, means for extracting a predetermined range including a face outline from the image as a face area, and processing boundary line set by the processing boundary setting means Determining means for determining whether the distance in the image between the processing boundary line of another face is equal to or less than a predetermined value, and the face of the face corresponding to the processing boundary line whose distance is determined to be equal to or less than the predetermined value And a means for excluding the region from the processing target.

第2発明に係る画像処理装置は、前記処理境界設定手段は、前記検出手段が検出した顔の輪郭線を抽出する手段を備え、抽出した輪郭線よりも外側を処理境界線として設定するようにしてあることを特徴とする。   In the image processing apparatus according to the second invention, the processing boundary setting means includes means for extracting a face outline detected by the detecting means, and sets the outside of the extracted outline as a processing boundary. It is characterized by being.

第3発明に係る画像処理装置は、前記検出手段が検出した顔の目、鼻又は口の各領域を特定する手段と、特定した各領域の位置に基づいて顔中心を特定する手段とを備え、前記加工手段は、顔領域内で特定された顔中心へ向け、処理境界線内の領域の画像を縦横夫々所定の比率にて収縮させるようにしてあることを特徴とする。   An image processing apparatus according to a third aspect of the present invention comprises means for specifying each area of the face eye, nose or mouth detected by the detecting means, and means for specifying the face center based on the position of each specified area. The processing means is characterized in that the image in the area within the processing boundary line is contracted at a predetermined ratio both vertically and horizontally toward the face center specified in the face area.

第4発明に係る画像処理装置は、特定した目、鼻又は口の各領域の内、両目の領域を結ぶ第1直線、及び、鼻の領域又は口の領域の中心を顔に対し縦方向に通る第2直線を特定する手段と、第1直線及び第2直線の交点から、第1直線が顔の輪郭と交わる2つの交点までの長さを夫々特定する手段と、第1直線及び第2直線の交点から、第2直線が顔の下部で顔の輪郭と交わる交点までの長さを特定する手段と、特定された夫々の長さに基づき、撮像画像に写っている人物の顔の型を分類する手段と、分類した型に応じて、縦横の収縮率を夫々調整するための前記所定の比率に対する係数を決定する手段とを更に備えることを特徴とする。   The image processing apparatus according to the fourth aspect of the invention is the first straight line connecting the eye regions, the center of the nose region or the mouth region in the vertical direction with respect to the face. Means for specifying the second straight line passing through, means for specifying the length from the intersection of the first straight line and the second straight line to the two intersections where the first straight line intersects the contour of the face, and the first straight line and the second straight line. Means for specifying the length from the intersection of the straight line to the intersection where the second straight line intersects the contour of the face at the lower part of the face, and the type of the face of the person shown in the captured image based on the specified length And a means for determining a coefficient for the predetermined ratio for adjusting the vertical and horizontal shrinkage ratios according to the classified type.

第5発明に係る画像処理装置は、前記加工手段は、顔領域内であって更に処理境界線内の領域の画像を、両目の領域を除いて収縮させるようにしてあることを特徴とする。   The image processing apparatus according to a fifth aspect is characterized in that the processing means contracts an image of a region within the face region and further within the processing boundary line except for both eye regions.

第6発明に係る画像処理装置は、特定した目の領域の、顔領域に対する大きさを求める手段と、求めた大きさと予め与えられた基準の大きさとを比較する手段と、比較結果に応じた目の大きさの拡大率を算出する手段とを備え、前記加工手段は、算出した拡大率に基づき、前記特定した両目の領域の画像を拡大させるようにしてあることを特徴とする。   According to a sixth aspect of the present invention, there is provided an image processing apparatus according to a comparison result obtained by a means for obtaining a size of a specified eye region with respect to a face region, a means for comparing the obtained size with a predetermined reference size. Means for calculating an enlargement ratio of the size of the eyes, and the processing means enlarges the image of the specified region of both eyes based on the calculated enlargement ratio.

第7発明に係る画像出力装置は、撮像手段と、該撮像手段から得られる撮像画像を他の画像と合成する合成手段と、合成された画像を所定の媒体に出力する手段とを備える画像出力装置において、撮像画像中の人物の顔を検出し、検出した顔に加工を行なう画像処理手段を更に備え、該画像処理手段は、検出した顔の輪郭に基づき加工処理範囲の境界を特定する処理境界線を設定する処理境界設定手段と、顔の輪郭を含む所定範囲を顔領域として画像から抽出する手段と、前記処理境界設定手段が設定した処理境界線について、他の顔の処理境界線との間の画像内における距離が所定値以下であるか否かを判断する判断手段と、距離が所定値以下と判断された処理境界線に対応する顔の顔領域を加工対象から除外する手段とを備えることを特徴とする。   An image output apparatus according to a seventh aspect of the present invention is an image output device comprising: an imaging unit; a combining unit that combines a captured image obtained from the imaging unit with another image; and a unit that outputs the combined image to a predetermined medium. The apparatus further includes image processing means for detecting a human face in the captured image and processing the detected face, and the image processing means specifies a boundary of the processing range based on the detected face contour. Processing boundary setting means for setting a boundary line; means for extracting a predetermined range including a face contour from the image as a face area; and processing boundary lines set by the processing boundary setting means for processing boundary lines of other faces Means for judging whether or not the distance in the image between is less than or equal to a predetermined value, and means for excluding the face area of the face corresponding to the processing boundary line determined to be less than or equal to the predetermined value from the processing target Specially equipped with To.

第8発明に係る画像処理方法は、画像中の人物の顔を検出し、検出した顔を加工する画像処理方法において、検出された顔の輪郭に基づき加工処理範囲の境界を特定する処理境界線を設定し、顔の輪郭を含む所定範囲を顔領域として画像から抽出し、設定した処理境界線について、他の顔の処理境界線との間の画像内における距離が所定値以下であるか否かを判断し、距離が所定値以下と判断された処理境界線に対応する顔の顔領域を加工対象から除外することを特徴とする。   According to an eighth aspect of the present invention, there is provided an image processing method for detecting a human face in an image and processing the detected face, wherein a processing boundary line for identifying a boundary of a processing range based on the detected face contour A predetermined range including the face outline is extracted from the image as a face region, and the distance between the set processing boundary line and the processing boundary line of another face in the image is equal to or less than a predetermined value And the facial region of the face corresponding to the processing boundary line for which the distance is determined to be equal to or less than a predetermined value is excluded from the processing target.

第9発明に係るコンピュータプログラムは、コンピュータに、画像に写る人物の顔を検出させ、検出された顔を加工させるコンピュータプログラムにおいて、検出された顔の輪郭に基づき加工処理範囲の境界を特定する処理境界線を設定するステップ、顔の輪郭を含む所定範囲を顔領域として画像から抽出するステップ、設定された処理境界線について、他の顔の処理境界線との間の画像内における距離が所定値以下であるか否かを判断するステップ、及び、所定値以下であると判断された処理境界線に対応する顔の顔領域を加工対象から除外するステップを実行させることを特徴とする。   A computer program according to a ninth aspect of the invention is a computer program for causing a computer to detect a face of a person shown in an image and to process the detected face, and to specify a boundary of a processing range based on the detected face contour A step of setting a boundary line, a step of extracting a predetermined range including the outline of the face from the image as a face area, and a distance between the set processing boundary line and the processing boundary line of another face in the image is a predetermined value It is characterized in that a step of determining whether or not it is below and a step of excluding the face area of the face corresponding to the processing boundary line determined to be below a predetermined value from the processing target are executed.

本発明では、画像から人物の顔が検出され、検出された顔の輪郭に基づいて、加工処理範囲の境界を特定する処理境界線が設定される。また、顔の輪郭を含む所定範囲が顔領域として抽出される。抽出された各人物の顔に設定された処理境界線夫々について、他の処理境界線との間の画像内における距離が所定値以下であって処理境界線間が近接しているか否かが判断される。一の処理境界線に対し、他の処理境界線が近接している場合、夫々の処理境界線に対応する顔の顔領域は、加工の対象から除外され、加工処理は実行されない。   In the present invention, a human face is detected from an image, and a processing boundary line that specifies the boundary of the processing range is set based on the detected face contour. Further, a predetermined range including the face outline is extracted as a face area. For each processing boundary set for each extracted person's face, determine whether the distance between the processing boundary lines in the image is equal to or less than a predetermined value and the processing boundary lines are close to each other Is done. When another processing boundary line is close to one processing boundary line, the face area of the face corresponding to each processing boundary line is excluded from the processing target, and the processing process is not executed.

本発明では、各顔の処理境界線が設定されるに際し、検出された顔の輪郭線が抽出され、輪郭線よりも顔の外側が処理境界線として設定され、処理境界線内の画像に対し加工処理がなされる。抽出された顔の輪郭を境界として輪郭内の画像が加工されるとすると、加工処理が行なわれる領域と行なわれない領域との境界付近、即ち輪郭に歪みが生じる可能性がある。これに対し、輪郭よりも外側を処理境界線とするので、加工処理による顔の輪郭での歪みが防止される。   In the present invention, when the processing boundary line of each face is set, the detected face contour line is extracted, the outside of the face is set as the processing boundary line from the contour line, and the image within the processing boundary line is set. Processing is performed. If an image in the contour is processed using the extracted facial contour as a boundary, there is a possibility that the contour is distorted near the boundary between the region where the processing is performed and the region where the processing is not performed. On the other hand, since the outer side of the contour is used as the processing boundary line, distortion in the face contour due to the processing is prevented.

本発明では、顔の目、鼻又は口が写る領域が特定され、目、鼻又は口の領域の位置に基づき顔中心が特定される。顔中心へ向けて処理境界線内の領域が縦横夫々所定の比率で収縮される加工が行なわれる。これにより、顔が傾いて写っている場合、顔が正面を向いていない場合でも自然な画像となるように加工することが可能となる。   In the present invention, a region where the eyes, nose or mouth of the face is reflected is specified, and the face center is specified based on the position of the region of the eyes, nose or mouth. Processing is performed in which the area within the processing boundary line is shrunk at a predetermined ratio in the vertical and horizontal directions toward the face center. Accordingly, when the face is tilted, it can be processed so that a natural image is obtained even when the face is not facing the front.

本発明では、両目の領域を結ぶ第1直線、鼻又は口の領域の中心を通る第2直線が特定される。第1直線及び第2直線の交点から顔の横方向の両端までの幅、前記交点から顎の先端に当たる部分までの長さに基づいて顔の型が分類され、顔型の分類に基づき、縦横の収縮率を調整するための係数が決定される。これにより、面長顔である場合は縦の収縮率を相対的に大きくし、幅広顔である場合は横の収縮率を相対的に大きくするなど、顔型の分類に応じた効果的な加工が行なわれる。   In the present invention, a first straight line connecting the regions of both eyes and a second straight line passing through the center of the nose or mouth region are specified. Face types are classified based on the width from the intersection of the first straight line and the second straight line to the lateral ends of the face, and the length from the intersection to the portion corresponding to the tip of the chin. A coefficient for adjusting the shrinkage rate is determined. This enables effective processing according to face type classification, such as a relatively large vertical shrinkage for face-length faces and a relatively large horizontal shrinkage for wide faces. Is done.

本発明では、両目の領域が除外されて収縮される。顔領域の両目の領域以外が収縮される補正により、両目が相対的に大きくなるように加工される。   In the present invention, both eye regions are excluded and contracted. By correcting the face area other than both eye areas to be shrunk, both eyes are processed to be relatively large.

本発明では、両目の領域の画像は、顔領域の大きさに対する大きさと、予め与えられた基準となる大きさとの比較判定結果に応じて求められる拡大率により、両目が相対的に大きくなるように加工される。   In the present invention, the image of the area of both eyes is such that both eyes are relatively large due to the enlargement ratio obtained in accordance with the comparison determination result between the size relative to the size of the face region and a predetermined reference size. To be processed.

本発明による場合、画像中で人物の顔が他の人物の顔と近接しているときには、当該顔領域は加工対象から除外されて加工が行なわれない。したがって、人物が動きのあるポーズをとり、例えば複数の人物が密着して写る画像、又は重なって写る画像であっても、不自然な画像となるような無用な加工が行なわれることがなく、顔の画像情報が欠落するなど歪みを生じさせず、有効に加工を行なうことができる。   According to the present invention, when the face of a person is close to the face of another person in the image, the face area is excluded from the processing target and is not processed. Therefore, even if the person takes a pose with movement, for example, an image in which a plurality of people are in close contact, or an image in which images are overlapped, useless processing that results in an unnatural image is not performed. Processing can be performed effectively without causing distortion such as missing face image information.

本発明による場合、顔の輪郭における歪みが防止されるので、小顔にする加工が行なわれることによって輪郭に不自然な歪みが生じることが防止され、人物が重なって写るなど、動きのあるポーズをとることが想定されるときでも、人物の顔を小顔に見せる加工を有効に行なうことができる。   According to the present invention, since the distortion of the face outline is prevented, it is possible to prevent an unnatural distortion from occurring due to the process of making a small face, and a pose with movement such as a person appearing in an overlapping manner. Even when it is assumed that the image is taken, it is possible to effectively perform the process of making the face of a person look like a small face.

本発明による場合、顔領域として抽出される領域の中心を顔中心とするのでなく、眉間に当たる部分が顔中心として特定され、顔中心に向かい収縮されることによって加工が行なわれるので、人物が顔を傾けて写るか、又は正面を向かずに写るかなど、動きのあるポーズをとる画像であっても、人物の顔を小顔に見せる加工を有効に行なうことができる。   According to the present invention, since the center of the region extracted as the face region is not the center of the face, the portion corresponding to the eyebrows is specified as the center of the face, and the processing is performed by contracting toward the center of the face. Even if the image has a moving pose, such as when the image is tilted or the image is taken without facing the front, it is possible to effectively perform the process of making a person's face appear as a small face.

本発明による場合、顔中心を基準に顔型の分類がされ、顔型の分類に応じた加工が行なわれるので、人物が動きのあるポーズをとる画像であっても、顔を小顔に見せる加工を有効に行なうことができる。   According to the present invention, the face type is classified on the basis of the face center, and processing according to the face type classification is performed, so even if the image is a pose with a person moving, the face can be seen as a small face. Processing can be performed effectively.

本発明による場合、人物が動きのあるポーズをとる画像であっても、両目の部分に無用に加工が行なわれることを防止でき、各人物の顔を小顔に見せる加工を有効に行なうことができる。   According to the present invention, even in an image in which a person poses a movement, it is possible to prevent unnecessary processing from being performed on both eyes, and to effectively perform processing that makes each person's face appear as a small face. it can.

本発明による場合、人物が動きのあるポーズをとる画像であっても、各々の人物の顔領域の大きさに、顔領域の大きさに対する両目の領域の大きさの特性に応じた拡大率にて両目の領域の画像が拡大され、顔を小顔に見せ、且つ理想的な顔に近づけさせる加工を有効に行なうことができる。顔の大きさに対する大きさにて拡大率が調整されるので、奥に写る人物と、手前に写る人物とで両目の領域の拡大を適切に調節できる。更に、基準となる大きさとの比較判定結果に応じて拡大率が調整されるので、一律の割合で拡大するよりも、異なる特性の顔に応じて両目の領域を拡大して小顔に見せる加工を有効に行なうことができる。   According to the present invention, even in an image in which a person poses a movement, the enlargement ratio according to the characteristics of the size of the area of both eyes with respect to the size of the face area depends on the size of the face area of each person. As a result, the image of the area of both eyes is enlarged, and the process of making the face look small and close to the ideal face can be performed effectively. Since the enlargement ratio is adjusted according to the size of the face, the enlargement of the area of both eyes can be appropriately adjusted between the person in the back and the person in the foreground. Furthermore, since the enlargement ratio is adjusted according to the result of comparison with the reference size, processing that enlarges the area of both eyes according to the face with different characteristics and makes it appear as a small face rather than enlarging at a uniform ratio Can be performed effectively.

本実施の形態における画像出力装置の外観を示す斜視図である。It is a perspective view which shows the external appearance of the image output device in this Embodiment. 本実施の形態における画像出力装置の外観を示す斜視図である。It is a perspective view which shows the external appearance of the image output device in this Embodiment. 本実施の形態に係る画像出力装置の構成を模式的に示すブロック図である。It is a block diagram which shows typically the structure of the image output device which concerns on this Embodiment. 本実施の形態に係る画像出力装置の構成を模式的に示すブロック図である。It is a block diagram which shows typically the structure of the image output device which concerns on this Embodiment. 実施の形態1におけるCPUが写真撮影、編集、印刷を実行する処理手順を示すフローチャートである。4 is a flowchart illustrating a processing procedure in which the CPU according to the first embodiment executes photography, editing, and printing. 実施の形態1における画像処理部のCPUにより実行される画像処理手順の全体の一例を示すフローチャートである。3 is a flowchart illustrating an example of an entire image processing procedure executed by the CPU of the image processing unit according to the first embodiment. 実施の形態1における画像処理部のCPUにより実行される解析処理の一例を示すフローチャートである。3 is a flowchart illustrating an example of analysis processing executed by a CPU of an image processing unit according to Embodiment 1. 実施の形態1における画像処理部のCPUにより実行される重複輪郭除外処理の一例を示すフローチャートである。5 is a flowchart illustrating an example of an overlapping contour removal process executed by a CPU of the image processing unit according to the first embodiment. 実施の形態1における画像処理部のCPUにより実行される小顔処理の一例を示すフローチャートである。6 is a flowchart illustrating an example of small face processing executed by the CPU of the image processing unit in the first embodiment. 実施の形態1における画像処理部のCPUにより実行される加工画像作成処理の一例を示すフローチャートである。3 is a flowchart illustrating an example of a processed image creation process executed by the CPU of the image processing unit according to the first embodiment. CPUが制御部から取得した画像の内容例を示す説明図である。It is explanatory drawing which shows the example of the content of the image which CPU acquired from the control part. CPUにより顔検出処理が実行されて得られる情報の内容例を示す説明図である。It is explanatory drawing which shows the example of the content of the information obtained by performing face detection processing by CPU. CPUによる解析処理によって特定される顔中心の例を示す説明図である。It is explanatory drawing which shows the example of the face center specified by the analysis process by CPU. CPUによる解析処理によって設定される輪郭処理線及び作業領域の例を示す説明図である。It is explanatory drawing which shows the example of the outline process line and work area which are set by the analysis process by CPU. CPUによる解析処理によって設定される輪郭処理線及び作業領域の他の例を示す説明図である。It is explanatory drawing which shows the other example of the outline process line and work area which are set by the analysis process by CPU. CPUによる小顔処理の概要を示す説明図である。It is explanatory drawing which shows the outline | summary of the small face process by CPU. 実施の形態2における画像処理部のCPUにより実行される解析処理の一例を示すフローチャートである。10 is a flowchart illustrating an example of analysis processing executed by the CPU of the image processing unit according to the second embodiment. 実施の形態2における画像処理部のCPUにより実行される顔分類の判別処理の一例を示すフローチャートである。12 is a flowchart illustrating an example of face classification determination processing executed by the CPU of the image processing unit according to the second embodiment. 画像中で検出される顔に対して特定される輪郭及び中央線の例を示す説明図である。It is explanatory drawing which shows the example of the outline and centerline which are identified with respect to the face detected in an image. 実施の形態2における画像処理部のCPUにより実行される小顔処理の一例を示すフローチャートである。10 is a flowchart illustrating an example of small face processing executed by the CPU of the image processing unit according to the second embodiment. 実施の形態3における画像処理部のCPUにより実行される解析処理の一例を示すフローチャートである。10 is a flowchart illustrating an example of analysis processing executed by a CPU of an image processing unit according to Embodiment 3. 実施の形態3における画像処理部のCPUにより実行される目の拡大率の算出処理の一例を示すフローチャートである。15 is a flowchart illustrating an example of an eye enlargement ratio calculation process executed by the CPU of the image processing unit according to the third embodiment. 画像中で検出される顔領域から算出される目の大きさの例を示す説明図である。It is explanatory drawing which shows the example of the magnitude | size of the eye calculated from the face area | region detected in an image. 実施の形態3における画像処理部のCPUにより実行される小顔処理の一例を示すフローチャートである。14 is a flowchart illustrating an example of small face processing executed by a CPU of an image processing unit according to Embodiment 3.

以下、本発明をその実施の形態を示す図面に基づいて具体的に説明する。   Hereinafter, the present invention will be specifically described with reference to the drawings showing embodiments thereof.

以下の説明では、ユーザを写真撮影し、撮影した画像に基づいて写真シールを出力する画像出力装置に、本発明に係る画像処理装置を適用した例を挙げて説明する。つまり以下に示す実施の形態において、本発明に係る画像処理装置は画像出力装置に含まれ、写真シールを出力するために撮影された画像に対し補正を行なう。   In the following description, an example in which the image processing apparatus according to the present invention is applied to an image output apparatus that takes a photograph of a user and outputs a photographic sticker based on the captured image will be described. In other words, in the embodiment described below, the image processing apparatus according to the present invention is included in the image output apparatus, and corrects an image taken to output a photo sticker.

(実施の形態1)
図1及び図2は、本実施の形態における画像出力装置の外観を示す斜視図である。画像出力装置は全体として略直方体形状のボックス型の装置であり、鉛直方向に略半分に分けるように仕切りが設けられている。画像出力装置は、この仕切りによって撮影空間R1及び編集空間R2に分けられている。図1は主に画像出力装置の撮影空間R1側から観た外観斜視図を示しており、図2は主に編集空間R2側から観た画像出力装置の外観斜視図を示している。
(Embodiment 1)
1 and 2 are perspective views showing an appearance of the image output apparatus according to the present embodiment. The image output apparatus is a box-type apparatus having a substantially rectangular parallelepiped shape as a whole, and is provided with a partition so as to be divided in substantially half in the vertical direction. The image output apparatus is divided into an imaging space R1 and an editing space R2 by this partition. FIG. 1 shows an external perspective view mainly viewed from the photographing space R1 side of the image output apparatus, and FIG. 2 shows an external perspective view of the image output apparatus mainly viewed from the editing space R2 side.

図1の斜視図に示すように、撮影空間R1は略直方体をなすフレームに囲まれた空間である。撮影空間R1は、ユーザからの料金の投入を受け付け、ユーザの写真撮影を実行するための空間である。撮影空間R1には、所定料金を受け付ける受付部1が外側に設けられており、また、編集空間R2との仕切りに相当する内部壁面にはユーザを撮影するためのカメラ21、ディスプレイ22等の機器を含む撮影部2が設けられている。   As shown in the perspective view of FIG. 1, the imaging space R1 is a space surrounded by a frame that forms a substantially rectangular parallelepiped. The shooting space R1 is a space for accepting the input of a fee from the user and for taking a picture of the user. The photographing space R1 is provided with a receiving unit 1 that accepts a predetermined fee on the outside, and devices such as a camera 21 and a display 22 for photographing a user on an inner wall surface corresponding to a partition with the editing space R2. An imaging unit 2 including is provided.

受付部1には、硬貨の投入を受け付けるコイン投入口10と、コイン投入口10から投入される硬貨の真偽を判定するコインセレクタ11と、投入された硬貨の総額又は投入残額等の各種情報を表示するための表示パネル12とが含まれる。コインセレクタ11は、コイン投入口10から投入される硬貨の真偽を判定して判定信号を送出する。コインセレクタ11は、硬貨が偽と判定された場合、又は硬貨を受け付けないように設定されている間、図示しないコイン返却口へ硬貨を吐き出す。表示パネル12は、液晶パネル、セグメントLED等からなり、制御信号を受け付けてコインの投入を促す案内、投入すべき料金、投入総額、残額、又は他のユーザが撮影中でありコインの投入を受け付けていない旨の案内等を表示する。   The reception unit 1 includes a coin insertion slot 10 that accepts coin insertion, a coin selector 11 that determines the authenticity of coins inserted from the coin insertion slot 10, and various types of information such as the total amount of coins inserted or the amount remaining. And a display panel 12 for displaying. The coin selector 11 determines the authenticity of the coin inserted from the coin insertion slot 10 and sends a determination signal. The coin selector 11 discharges a coin to a coin return port (not shown) when the coin is determined to be false or while it is set not to accept a coin. The display panel 12 is composed of a liquid crystal panel, a segment LED, etc., and receives a control signal to prompt the insertion of coins, a charge to be inserted, the total amount to be inserted, the remaining amount, or another user is shooting and accepts the insertion of a coin A message indicating that it has not been displayed.

受付部1に含まれている表示パネル12及びコインセレクタ11は、後述する第1筐体の内部に収納された制御機構に接続されており、制御機構との間で判定信号、制御信号等を送受信する。   The display panel 12 and the coin selector 11 included in the receiving unit 1 are connected to a control mechanism housed in a first housing described later, and a determination signal, a control signal, and the like are transmitted to the control mechanism. Send and receive.

ユーザは、受付部1のコイン投入口10から所定料金に相当する硬貨を投入することにより、画像出力装置によるサービスを受けることができる。   The user can receive a service by the image output device by inserting coins corresponding to a predetermined fee from the coin insertion slot 10 of the reception unit 1.

撮影空間R1の内部、即ち撮影ブース内部には、撮影部2を構成する各機器が設置されている。撮影ブース内部の編集空間R2との空間を仕切る壁面の下部には、各機器を制御する制御機構を収納した第1筐体20が設置されている。第1筐体20の上方であって、立った状態のユーザの略目線の高さの位置にカメラ21が設置されている。カメラ21の下方には、カメラ21から出力される映像信号に基づきプレビュー画面を表示し、且つユーザの操作を受け付けるタッチパネル式のディスプレイ22が設定されている。また、カメラ21及びディスプレイ22を囲むように被写体に光を照射するストロボ・ランプ23が設置されている。また、第1筐体20上部には音楽、案内音声を出力するスピーカ24,24が設置されている。   In the imaging space R1, that is, inside the imaging booth, each device constituting the imaging unit 2 is installed. A first housing 20 containing a control mechanism for controlling each device is installed at the lower part of the wall surface that partitions the space with the editing space R2 inside the photographing booth. A camera 21 is installed above the first housing 20 and at a height that is approximately the height of the standing user. A touch panel display 22 that displays a preview screen based on a video signal output from the camera 21 and accepts a user operation is set below the camera 21. Further, a strobe lamp 23 for irradiating the subject with light is provided so as to surround the camera 21 and the display 22. Speakers 24 and 24 for outputting music and guidance voice are installed on the upper portion of the first housing 20.

撮影部2を構成するカメラ21、ディスプレイ22、ストロボ・ランプ23及びスピーカ24,24は夫々、第1筐体20の内部に設置されている制御機構に夫々接続されている。   The camera 21, the display 22, the strobe lamp 23, and the speakers 24 and 24 constituting the photographing unit 2 are respectively connected to a control mechanism installed in the first housing 20.

カメラ21は、ユーザを被写体として撮影するため、内部にレンズ群、絞り、シャッター、CCD(Charge Coupled Device)等の撮像素子を含むデジタルカメラである。カメ
ラ21は、タイマー機能によりシャッターが動作して撮像素子から静止画像を取得し記憶することにより写真撮影を実行する。また、カメラ21は起動している間、撮像素子から出力されるデジタル化された映像信号を制御機構へ出力している。制御機構からは、この映像信号に基づくプレビュー画面の表示用の撮影画像が出力される。
The camera 21 is a digital camera that includes an imaging element such as a lens group, a diaphragm, a shutter, and a CCD (Charge Coupled Device) in order to photograph a user as a subject. The camera 21 takes a picture by acquiring and storing a still image from the imaging device by operating a shutter by a timer function. While the camera 21 is activated, the camera 21 outputs a digitized video signal output from the image sensor to the control mechanism. The control mechanism outputs a captured image for displaying a preview screen based on the video signal.

ディスプレイ22は撮影中の操作を案内する操作画面とプレビュー画面とを表示するための液晶パネルを有し、カメラ21からリアルタイムに出力される映像信号に基づいて制御機構から出力されている画像を受け付けて表示する。また、ディスプレイ22はタッチパネル式であり、ユーザによってタッチされた箇所の画面上の位置の情報を含む信号が制御機構へ出力される。   The display 22 has a liquid crystal panel for displaying an operation screen for guiding operations during shooting and a preview screen, and accepts an image output from the control mechanism based on a video signal output from the camera 21 in real time. To display. Further, the display 22 is a touch panel type, and a signal including information on a position on the screen at a location touched by the user is output to the control mechanism.

ストロボ・ランプ23は、撮影ブース内の照明機器であると共に、写真撮影時にはフラッシュとして機能する。なお、本実施の形態ではストロボ・ランプ23は図に示すように7つに分けられており、制御機構に含まれる制御基盤を介して夫々の発光のタイミングがカメラ21による写真撮影(シャッターの動作)に同期して制御される。   The strobe lamp 23 is a lighting device in the photographing booth and functions as a flash when taking a picture. In the present embodiment, the strobe lamp 23 is divided into seven as shown in the figure, and the timing of each light emission is taken by the camera 21 via the control base included in the control mechanism (the operation of the shutter). ) Is controlled in synchronization with

撮影ブースの外周は遮光性を有するシート材(図示せず)によって覆われている。このシート材によって外部からの光が遮断され、且つ外部からの覗き見を防止することができ、さらにユーザが撮影ブース内で自由にポーズをとることができるプライベート空間が実現される。   The outer periphery of the photography booth is covered with a light-shielding sheet material (not shown). This sheet material blocks external light, prevents peeping from the outside, and realizes a private space where the user can freely pose in the shooting booth.

また、撮影ブース内側から見たシート材は均等な色調及び明度となるようにしてある。カメラ21から観た場合にユーザの後方がシート材の均等な色調及び明度となるので、後述にて説明するようにユーザが写っている領域以外を透明化するクロマキー処理が可能になる。   In addition, the sheet material viewed from the inside of the photographing booth has uniform color tone and brightness. When viewed from the camera 21, the rear side of the user has the same color tone and lightness of the sheet material, so that the chroma key process for making the area other than the area in which the user is visible transparent becomes possible, as will be described later.

ユーザは撮影ブース内に入り、ディスプレイ22に表示される案内及びスピーカ24,24から出力される案内音声に従い操作画面を操作し、ストロボ・ランプ23からの照明を受けてポーズを決め、カメラ21による写真撮影を実行することができる。まず、ユーザはタッチパネル式のディスプレイ22に表示される操作画面から、ユーザが写る写真を装飾する前景画像及び/又は背景画像を選択することができる。ユーザが前景画像及び/又は背景画像を選択した場合、ディスプレイ22には、カメラ21から制御機構を介してリアルタイムに出力されている画像、即ちカメラ21から出力されている撮影画像、選択された前景画像及び/又は背景画像に基づく印刷結果のプレビュー画面が表示される。ユーザはプレビュー画面を確認しながらポーズを決め、写真撮影を実行することができる。   The user enters the shooting booth, operates the operation screen according to the guidance displayed on the display 22 and the guidance voice output from the speakers 24, 24, determines the pose by receiving illumination from the strobe lamp 23, and uses the camera 21. A photo shoot can be performed. First, the user can select a foreground image and / or a background image that decorates a photograph taken by the user from an operation screen displayed on the touch panel display 22. When the user selects the foreground image and / or the background image, the display 22 displays an image output in real time from the camera 21 via the control mechanism, that is, a captured image output from the camera 21, and the selected foreground. A print result preview screen based on the image and / or the background image is displayed. The user can determine a pose while confirming the preview screen, and execute a photo shoot.

写真撮影が実行された場合、制御機構はカメラ21で記憶された静止画像を取得し、後にユーザによる編集操作を受け付けるための画像、及び、後に印刷出力するための画像として夫々複製する。   When a photograph is taken, the control mechanism acquires a still image stored by the camera 21 and copies it as an image for later accepting an editing operation by the user and an image for later printing out.

次に図2の斜視図に示す編集空間R2に設置されている各構成部について説明する。編集空間R2は、上述の撮影空間R1の内部のカメラ21、ディスプレイ22、ストロボ・ランプ23、スピーカ24,24及び第1筐体20が設置されていた壁面の裏側の空間であり、ユーザが写真撮影を実行した後に画像の編集をすることができる空間である。図2に示す編集空間R2は撮影空間R1の上面から延設されているバーに取り付けられたカーテン状のシート材(図示せず)によって他の空間から仕切られる。そして編集空間R2には、以下に示す各構成部を内外に備える略直方体の第2筐体30が設置されている。   Next, each component installed in the editing space R2 shown in the perspective view of FIG. 2 will be described. The editing space R2 is a space behind the wall where the camera 21, display 22, strobe / lamp 23, speakers 24 and 24, and the first housing 20 are installed, and the user can take photographs. This is a space where an image can be edited after shooting. The editing space R2 shown in FIG. 2 is partitioned from other spaces by a curtain-like sheet material (not shown) attached to a bar extending from the upper surface of the photographing space R1. The editing space R <b> 2 is provided with a substantially rectangular parallelepiped second housing 30 having the following components inside and outside.

第2筐体30の一方の側面は撮影空間R1との仕切りである壁面に接しており、他の三側面の内の対向する面には夫々、写真撮影された画像及びその他の画像を編集するためのインタフェースを備える第1編集部4a及び第2編集部4bが設けられている。他方の側面には編集された画像を所定の写真シール用紙に印刷出力する印刷部5が設けられている。また、第2筐体30の内部には、第1編集部4a、第2編集部4b及び印刷部5の各構成部を制御する制御機構が設置されている。   One side surface of the second housing 30 is in contact with a wall surface that is a partition with the imaging space R1, and a photographed image and other images are edited on the opposing surfaces of the other three side surfaces, respectively. A first editing unit 4a and a second editing unit 4b having an interface for the above are provided. On the other side, a printing unit 5 is provided for printing out the edited image on a predetermined photo sticker sheet. In addition, a control mechanism that controls each component of the first editing unit 4 a, the second editing unit 4 b, and the printing unit 5 is installed in the second housing 30.

なお、第1筐体20及び第2筐体30の相互に接している面は夫々が有する開口部(図示せず)を介して内部が連通しており、第1筐体20の内部に設置されている撮影部2の制御機構と、第2筐体30の内部に設置されている第1編集部4a、第2編集部4b及び印刷部5の制御機構とは、複数のケーブル類によって接続されている。   Note that the surfaces of the first casing 20 and the second casing 30 that are in contact with each other communicate with each other through an opening (not shown) of each, and are installed inside the first casing 20. The control mechanism of the photographing unit 2 and the control mechanism of the first editing unit 4a, the second editing unit 4b, and the printing unit 5 installed in the second housing 30 are connected by a plurality of cables. Has been.

第1編集部4aには夫々、写真撮影された画像及び他の画像を編集するための操作画面を表示するタブレットディスプレイ40aと、2つのタッチペン41a,42aと、スピーカ43aとが含まれる。なお後述の第2編集部4bにもタブレットディスプレイ40bと、2つのタッチペン41b,42bと、スピーカ43bとが含まれている。第1編集部4a及び第2編集部4b夫々のタブレットディスプレイ40a,40b、2つのタッチペン41a,42a,41b,42b、及びスピーカ43a,43bは夫々、第2筐体30の対向する面に向かい合うように設置されている。また、タブレットディスプレイ40a,40b、タッチペン41a,42a,41b,42b及びスピーカ43a,43bは第2筐体30の内部の制御機構に接続されている。   The first editing unit 4a includes a tablet display 40a that displays an operation screen for editing a photographed image and other images, two touch pens 41a and 42a, and a speaker 43a. Note that the second editing unit 4b described later also includes a tablet display 40b, two touch pens 41b and 42b, and a speaker 43b. The tablet displays 40a and 40b, the two touch pens 41a, 42a, 41b, and 42b, and the speakers 43a and 43b of the first editing unit 4a and the second editing unit 4b, respectively, face the opposing surfaces of the second housing 30. Is installed. The tablet displays 40 a and 40 b, the touch pens 41 a, 42 a, 41 b and 42 b and the speakers 43 a and 43 b are connected to a control mechanism inside the second housing 30.

印刷部5には、第2筐体30の内部に設置されており画像を所定の用紙に印刷するプリンタ50と、印刷された用紙がプリンタから吐き出されるシール吐出口51と、各種情報を表示する表示パネル52とが含まれる。表示パネル52は第2筐体30の内部に設置された制御機構に接続されており、プリンタ50も第2筐体30の内部で制御機構に接続されている。   The printing unit 5 displays a printer 50 that is installed inside the second housing 30 and prints an image on a predetermined sheet, a seal discharge port 51 through which the printed sheet is discharged from the printer, and various types of information. Display panel 52. The display panel 52 is connected to a control mechanism installed inside the second housing 30, and the printer 50 is also connected to the control mechanism inside the second housing 30.

ユーザは、撮影ブース内で撮影部2により撮影を完了した後、第1編集部4a又は第2編集部4bにより印刷する画像の選択、選択した画像に対する落書き等の作業が可能である。第1編集部4a又は第2編集部4b夫々のタブレットディスプレイ40a,40bには、写真撮影が実行されたことによって取得された画像と、選択された前景画像及び/又は背景画像とが共に表示される。タブレットディスプレイ40a,40bは、共に設置されているタッチペン41a,42a,41b,42bによる操作を受け付けるようにしてあり、ユーザはタッチペン41a,42a,41b,42bにより印刷する画像の選択及び選択した画像への文字、スタンプ状の絵柄の挿入などの操作が可能である。   The user can perform operations such as selecting an image to be printed by the first editing unit 4a or the second editing unit 4b and graffiti on the selected image after completing the shooting by the shooting unit 2 in the shooting booth. On the tablet displays 40a and 40b of the first editing unit 4a and the second editing unit 4b, both the image acquired by executing the photography and the selected foreground image and / or background image are displayed. The The tablet displays 40a and 40b are configured to accept operations by the touch pens 41a, 42a, 41b, and 42b installed together, and the user selects an image to be printed by the touch pens 41a, 42a, 41b, and 42b, and selects the selected image. Operations such as insertion of characters and stamp-like patterns.

制御機構により、写真撮影された画像に対し、後述する画像処理装置による補正処理が行なわれる。そして、ユーザによる編集が完了した場合、補正処理後の印刷出力用の画像に、選択された前景画像及び/又は背景画像、更に編集結果に基づく文字、絵柄等などが合成される。合成された後の画像が第2筐体30内部に設置されているプリンタ50によって所定の用紙に印刷される。印刷された所定の用紙は写真シールとしてシール吐出口51に吐き出される。ユーザは、シール吐出口51から完成した写真シールを取得することができ、これにより写真シールの撮影提供サービスが実現する。   The control mechanism performs a correction process by an image processing apparatus described later on the photographed image. When the editing by the user is completed, the selected foreground image and / or background image, and characters, designs, and the like based on the editing result are combined with the print output image after the correction process. The combined image is printed on a predetermined sheet by the printer 50 installed in the second housing 30. The printed predetermined paper is discharged to the seal discharge port 51 as a photo sticker. The user can obtain the completed photo sticker from the sticker discharge port 51, thereby realizing a photo sticker photographing providing service.

図3及び図4は、本実施の形態に係る画像出力装置の構成を模式的に示すブロック図である。図3は、主に以下に説明する制御部6、画像処理部7、電源部8、通信部9及び受付部1の構成を示し、図4は、撮影部2、第1編集部4a、第2編集部4b及び印刷部5の構成を示している。図3及び図4に示すように画像出力装置は、各構成部を制御する制御部6と、撮影された画像を補正する画像処理部7と、AC電源から電力を供給する電源部8と、インターネット等の外部ネットワークNへ通信が可能な通信部9と、上述のコイン投入口10、コインセレクタ11及び表示パネル12を含む受付部1と、カメラ21、ディスプレイ22、ストロボ・ランプ23及びスピーカ24,24を含む撮影部2と、タブレットディスプレイ40a、2つのタッチペン41a,42a及びスピーカ43aを含む第1編集部4aと、タブレットディスプレイ40b、2つのタッチペン41b,42b及びスピーカ43bを含む第2編集部4bと、プリンタ50、シール吐出口51及び表示パネル52を含む印刷部5と、各部を接続するバス100とにより構成される。なお、制御部6、画像処理部7、電源部8、通信部9及びバス100が、第1筐体20及び第2筐体30の内部に設置された制御機構に対応する。   3 and 4 are block diagrams schematically showing the configuration of the image output apparatus according to the present embodiment. 3 mainly shows configurations of the control unit 6, the image processing unit 7, the power supply unit 8, the communication unit 9, and the receiving unit 1 described below. FIG. 4 shows the photographing unit 2, the first editing unit 4a, and the first unit. 2 shows the configuration of the editing unit 4b and the printing unit 5. As shown in FIGS. 3 and 4, the image output apparatus includes a control unit 6 that controls each component, an image processing unit 7 that corrects a captured image, a power supply unit 8 that supplies power from an AC power source, A communication unit 9 capable of communicating with an external network N such as the Internet, a reception unit 1 including the above-described coin insertion slot 10, coin selector 11 and display panel 12, a camera 21, a display 22, a strobe lamp 23, and a speaker 24. , 24, a first editing unit 4a including a tablet display 40a, two touch pens 41a and 42a and a speaker 43a, and a second editing unit including a tablet display 40b, two touch pens 41b and 42b and a speaker 43b. 4b, a printer 50, a printing unit 5 including a seal discharge port 51 and a display panel 52, and a bus connecting the units 00 and by the constructed. The control unit 6, the image processing unit 7, the power supply unit 8, the communication unit 9, and the bus 100 correspond to control mechanisms installed inside the first casing 20 and the second casing 30.

受付部1、撮影部2、第1編集部4a、第2編集部4b及び印刷部5を夫々構成する各ハードウェアは、上述のように、画像出力装置のユーザによる操作が可能なように撮影空間R1、編集空間R2に設置されており、第1筐体20及び第2筐体30内部に設置されている制御機構内のバス100に接続されている。これに対し制御部6、画像処理部7、電源部8及び通信部9は第1筐体20及び第2筐体30の内部に設置されている制御機構内に含まれており、制御機構内に配されたバス100に接続されている。   As described above, the hardware constituting each of the receiving unit 1, the photographing unit 2, the first editing unit 4a, the second editing unit 4b, and the printing unit 5 is photographed so that it can be operated by the user of the image output apparatus. It is installed in the space R1 and the editing space R2, and is connected to the bus 100 in the control mechanism installed in the first housing 20 and the second housing 30. On the other hand, the control unit 6, the image processing unit 7, the power supply unit 8, and the communication unit 9 are included in a control mechanism installed inside the first casing 20 and the second casing 30. Are connected to the bus 100.

制御機構は、第1筐体20及び第2筐体30の内部に設置された複数のパーソナルコンピュータ(以下、PC:Personal Computerという。)と、上述の受付部1、撮影部2、
第1編集部4a、第2編集部4b及び印刷部5を構成する各ハードウェアをPCから制御するための制御基盤とを含んで構成される。なお、複数のPCは夫々、その制御対象によって機能が分割される。例えば、撮影空間R1の受付部1を制御するPCと、撮影部2を制御するPCと、第1編集部4a及び第2編集部4bを制御するPCと、撮影された画像に画像処理を施し印刷部5にて出力するPCと、夫々機能が分割されて動作するように構成される。本実施の形態では、画像処理について主に説明するため仮想的に、受付部1、撮影部2、第1編集部4a及び第2編集部4bを制御する第1PCと、画像処理を行ない印刷部5にて出力する第2PCとの動作によって各構成部が制御されるとして以下に説明する。
The control mechanism includes a plurality of personal computers (hereinafter referred to as PCs) installed in the first housing 20 and the second housing 30, the above-described receiving unit 1, the photographing unit 2, and the like.
The first editing unit 4a, the second editing unit 4b, and the control unit for controlling each hardware constituting the printing unit 5 from the PC. Note that the functions of each of the plurality of PCs are divided depending on the control target. For example, the PC that controls the reception unit 1 of the imaging space R1, the PC that controls the imaging unit 2, the PC that controls the first editing unit 4a and the second editing unit 4b, and the captured image are subjected to image processing. The PC that is output by the printing unit 5 is configured so that the functions are divided and operated. In the present embodiment, in order to mainly describe image processing, a first PC that virtually controls the receiving unit 1, the photographing unit 2, the first editing unit 4a, and the second editing unit 4b, and a printing unit that performs image processing. It will be described below that each component is controlled by the operation with the second PC that outputs at 5.

制御部6には第1PCに備えられた、各構成部のハードウェアを制御するCPU60と、CPU60の動作により発生する情報を一時的に記憶するDRAM(Dynamic Random Access Memory)等のメモリ61と、各種データを記憶するHDD(Hard Disk Drive)6
2と、撮影部2のカメラ21から出力された映像信号から静止画像を撮影画像としてキャプチャし、クロマキー処理を実行するためのキャプチャ・クロマキーボード63とが含まれる。
The control unit 6 includes a CPU 60 provided in the first PC that controls hardware of each component, a memory 61 such as a DRAM (Dynamic Random Access Memory) that temporarily stores information generated by the operation of the CPU 60, HDD (Hard Disk Drive) 6 for storing various data
2 and a capture / chroma keyboard 63 for capturing a still image as a photographed image from the video signal output from the camera 21 of the photographing unit 2 and executing chroma key processing.

CPU60は、HDD62に記憶されている後述の制御プログラム6Pを読み出して実行することにより、受付部1のコインセレクタ11からの判定信号を受け付け、受け付けた判定信号に応じて表示パネル12へ制御信号を送出し、所定料金の受け付けを実現する。またCPU60は、制御プログラム6Pを読み出して実行することにより、撮影部2のカメラ21による撮影と、ストロボ・ランプ23との動作を同期させる制御を行ない、カメラ21によって写真撮影されて記憶された印刷出力用の画像を取得する処理、更に、カメラ21から出力される映像信号を、キャプチャ・クロマキーボード63を介してプレビュー画面、編集画面用の撮影画像として取得する処理、ディスプレイ22に表示する処理、第1編集部4a及び第2編集部4bによる編集を受け付ける処理等の各種処理を実行する。   The CPU 60 reads and executes a later-described control program 6P stored in the HDD 62, thereby accepting a judgment signal from the coin selector 11 of the accepting unit 1, and sending a control signal to the display panel 12 in accordance with the accepted judgment signal. Send out and realize acceptance of a predetermined charge. Further, the CPU 60 reads out and executes the control program 6P, thereby performing control to synchronize the photographing with the camera 21 of the photographing unit 2 and the operation with the strobe lamp 23, and the print photographed by the camera 21 and stored. A process of acquiring an image for output; a process of acquiring a video signal output from the camera 21 as a captured image for a preview screen and an editing screen via the capture / chroma keyboard 63; a process of displaying on the display 22; Various processes such as a process of accepting editing by the first editing unit 4a and the second editing unit 4b are executed.

HDD62には、CPU60が各構成部のハードウェアを制御するための制御プログラム6Pが記憶されている。CPU60がHDD62から制御プログラム6Pをメモリ61に読み出して実行することにより、各ハードウェアの制御及び種々のソフトウェア機能が実現される。   The HDD 62 stores a control program 6P for the CPU 60 to control the hardware of each component. When the CPU 60 reads the control program 6P from the HDD 62 to the memory 61 and executes it, control of each hardware and various software functions are realized.

また、HDD62には、制御プログラム6Pの他に、写真撮影された印刷出力用の画像と合成するための前景/背景画像、撮影部2のディスプレイ22に撮影画像と共に表示するための前景/背景画像が記憶されている。HDD62には更に、撮影部2のディスプレイ22に表示される操作画面に用いられる各画像、第1及び第2編集部4a,4bのタブレットディスプレイ40a,40bに表示される編集画面に用いられる画像、テキストファイル、スピーカ24,24,43a,43bに出力する案内音声などの音声データ等のデータが記憶されている。また、HDD62には、ユーザが写真撮影を実行したことでCPU60によりカメラ21から取得された印刷出力用の画像、前景画像及び/又は背景画像と合成処理が実行されることで得られる合成画像及び編集処理によって得られる編集画像が記憶される。   In addition to the control program 6P, the HDD 62 includes a foreground / background image to be combined with a photographed printout image, and a foreground / background image to be displayed on the display 22 of the photographing unit 2 together with the photographed image. Is remembered. The HDD 62 further includes images used for operation screens displayed on the display 22 of the photographing unit 2, images used for editing screens displayed on the tablet displays 40a and 40b of the first and second editing units 4a and 4b, Data such as a text file and voice data such as guidance voices output to the speakers 24, 24, 43a, and 43b are stored. The HDD 62 also includes a composite image obtained by executing a composite process with a print output image, foreground image, and / or background image acquired from the camera 21 by the CPU 60 when the user has taken a picture. An edited image obtained by the editing process is stored.

キャプチャ・クロマキーボード63は、受け付けた映像信号から例えば毎秒30枚の静止画像を取得して出力するキャプチャ機能と、キャプチャされた各静止画像から所定の色調及び明度の画素を認識し、一定の範囲内で同一の色調及び明度の画素に対してα値(透明度)を設定することにより透明化し出力するクロマキー機能とを有するハードウェアである。キャプチャ・クロマキーボード63は、カメラ21から出力される映像信号を受け付けるように接続されている。また、キャプチャ及びクロマキー処理された後の静止画像は、キャプチャ・クロマキーボード63に内蔵される図示しないメモリに書き込まれる。CPU60は当該メモリから静止画像をプレビュー用の撮影画像として読み出し、クロマキー処理を行なわせ、ディスプレイ22のプレビュー画面に表示する処理を実行する。   The capture / chroma keyboard 63 acquires, for example, 30 still images per second from the received video signal and outputs them, and recognizes pixels of a predetermined color tone and brightness from each captured still image, and has a certain range. Hardware having a chroma key function for transparentizing and outputting an alpha value (transparency) for pixels having the same color and lightness. The capture / chroma keyboard 63 is connected to receive a video signal output from the camera 21. The still image after the capture and chroma key processing is written in a memory (not shown) built in the capture / chroma keyboard 63. The CPU 60 reads a still image from the memory as a photographed image for preview, performs a chroma key process, and executes a process for displaying on the preview screen of the display 22.

また、キャプチャ・クロマキーボード63は、ドライバソフトにより毎秒取得する静止画像の枚数、及び透明化する所定の色調及び明度、例えばRGB値の設定が可能である。CPU60は、カメラ21によって撮影される画像の内のユーザの後方に位置するシート材が写っている領域の色調及び明度を透明化するように指示する。これにより、CPU60は、キャプチャ・クロマキーボード63にて、クロマキー処理された人物のみの人物画像を得ることができ、前景画像及び/又は背景画像と重ねてプレビュー画面を表示させることができる。   In addition, the capture / chroma keyboard 63 can set the number of still images acquired every second by the driver software, and a predetermined color tone and lightness to be made transparent, for example, RGB values. The CPU 60 instructs to make the color tone and lightness of the area in which the sheet material located behind the user in the image photographed by the camera 21 is shown transparent. As a result, the CPU 60 can obtain a person image of only the person who has been subjected to the chroma key processing with the capture / chroma keyboard 63, and can display a preview screen superimposed on the foreground image and / or the background image.

画像処理部7には第2PCに備えられた、各構成部のハードウェアを制御するCPU70と、CPU70の動作により発生する情報を一時的に記憶するDRAM等のメモリ71と、各種データを記憶するHDD72と、画像及び描画命令を受け付けて描画処理を行なうグラフィックボード73とが含まれる。画像処理部7は単独で、対象となる画像に対して後述する加工処理を行なう画像処理装置として動作することが可能である。   The image processing unit 7 stores a CPU 70 provided in the second PC for controlling the hardware of each component, a memory 71 such as a DRAM for temporarily storing information generated by the operation of the CPU 70, and various data. An HDD 72 and a graphic board 73 that receives an image and a drawing command and performs a drawing process are included. The image processing unit 7 alone can operate as an image processing apparatus that performs a later-described processing process on a target image.

CPU70は、HDD72に記憶されている後述の画像処理プログラム7Pを読み出して実行することにより、制御部6の制御に基づく写真撮影によってカメラ21にて撮影された画像を加工する画像処理を実現する。詳細には、制御部6の制御により、ユーザが写真撮影を実行してカメラ21にて写真撮影された画像が画像処理部7へ受け渡される。そしてCPU70は、制御部6から写真撮影された画像を取得してメモリ71に書き込み、画像処理を実行することによって、画像中のユーザの顔を小顔にするなどの見栄えを良くする加工を行なう。画像処理の詳細については、後述にて説明する。   The CPU 70 reads out and executes an image processing program 7P, which will be described later, stored in the HDD 72, thereby realizing image processing for processing an image photographed by the camera 21 by photographing based on the control of the control unit 6. Specifically, under the control of the control unit 6, an image taken by the user and photographed by the camera 21 is delivered to the image processing unit 7. The CPU 70 obtains a photographed image from the control unit 6, writes it in the memory 71, and executes image processing so as to improve the appearance such as making the user's face in the image a small face. . Details of the image processing will be described later.

HDD72には、CPU70が、取得した画像に対する加工などの画像処理を行なうための画像処理プログラム7Pが記憶されている。画像処理プログラム7Pは、図示しないCD−ROM、DVD等の記録媒体に記録された画像処理プログラムをHDD72に複製したものでもよいし、通信部9を介して取得したものでもよい。   The HDD 72 stores an image processing program 7P for the CPU 70 to perform image processing such as processing on the acquired image. The image processing program 7P may be a copy of the image processing program recorded on a recording medium such as a CD-ROM or DVD (not shown) in the HDD 72, or may be acquired via the communication unit 9.

グラフィックボード73は、受け付けた画像及び描画命令に基づき、図示しない内蔵メモリに画像を描画するハードウェアである。CPU70は、自身が制御部6から取得してメモリ71に一時的に記憶した画像に対する画像処理を、グラフィックボード73を用いて行なう。具体的には、CPU70は画像と、画像処理に伴なう描画命令とをグラフィックボード73に与えて描画処理を行なわせ、描画処理によって得られた画像をメモリ71に取得する。   The graphic board 73 is hardware for drawing an image in a built-in memory (not shown) based on the received image and drawing command. The CPU 70 uses the graphic board 73 to perform image processing on the image acquired from the control unit 6 and temporarily stored in the memory 71. Specifically, the CPU 70 gives an image and a drawing command accompanying the image processing to the graphic board 73 to perform the drawing processing, and acquires the image obtained by the drawing processing in the memory 71.

電源部8は、第1PC及び第2PCのみならず各構成部へのAC電源からの電力の供給を実現する。画像出力装置には、電源を投入する電源スイッチ(図示せず)が設けられており、電源部8に接続されている。電源部8は電源スイッチのオン/オフを検知し、画像出力装置の稼動/動作を切り替える。なお、電源部8はUPS(Uninterruptible Power Supply:無停電電源装置)ユニット80を含んで構成される。UPSユニット80により、AC電源からの電力が突然遮断された場合でも、各構成部へのダメージを減らすことができる。電源スイッチがオフに切り替えられた場合、UPSユニット80は停電信号をCPU60へ出力し、CPU60は停電信号を検知したときの所定の終了処理を行ない画像出力装置全体の電源をオフにする。   The power supply unit 8 realizes power supply from the AC power supply to each component as well as the first PC and the second PC. The image output apparatus is provided with a power switch (not shown) for turning on the power, and is connected to the power supply unit 8. The power supply unit 8 detects the on / off of the power switch, and switches the operation / operation of the image output apparatus. The power supply unit 8 includes a UPS (Uninterruptible Power Supply) unit 80. Even when the power from the AC power supply is suddenly cut off by the UPS unit 80, damage to each component can be reduced. When the power switch is switched off, the UPS unit 80 outputs a power failure signal to the CPU 60, and the CPU 60 performs predetermined termination processing when the power failure signal is detected, and turns off the power of the entire image output apparatus.

通信部9は、PHSユニット90により構成され、制御部6(CPU60)に内部バス100を介して接続されている。PHSユニット90は、インターネット等の外部ネットワークNに接続してデータの送受信を実現する。CPU60は、通信部9のPHSユニット90を介して外部ネットワークN上の他の装置と通信してデータの送受信が可能である。本実施の形態における画像出力装置では、CPU90はユーザの名前、メールアドレス等の識別情報又は送信先のURLと共に、撮影して編集した後の画像を外部ネットワークNに接続している他のサーバ装置へ送信する機能を有している。この機能により、ユーザがサーバ装置から自身が撮影して編集した画像を携帯電話機又は自宅のPCにより閲覧することができるサービス、及び携帯電話機又はPCへダウンロードすることができるサービスが実現可能である。   The communication unit 9 includes a PHS unit 90 and is connected to the control unit 6 (CPU 60) via the internal bus 100. The PHS unit 90 is connected to an external network N such as the Internet to realize data transmission / reception. The CPU 60 can transmit and receive data by communicating with other devices on the external network N via the PHS unit 90 of the communication unit 9. In the image output apparatus according to the present embodiment, the CPU 90 is connected to the external network N by connecting the image after shooting and editing together with identification information such as the user name and mail address or the URL of the transmission destination. It has a function to transmit to. With this function, it is possible to realize a service that allows a user to browse an image that the user has taken and edited from the server device using a mobile phone or a home PC, and a service that can be downloaded to the mobile phone or the PC.

このように構成される画像出力装置で、ユーザが写真プリントの提供サービスを受ける場合に、CPU60の処理に基づき画像出力装置にて実行される全体的処理について説明する。図5は、実施の形態1におけるCPU60が写真撮影、編集、印刷を実行する処理手順を示すフローチャートである。   An overall process executed by the image output apparatus based on the processing of the CPU 60 when the user receives a photo print providing service in the image output apparatus configured as described above will be described. FIG. 5 is a flowchart illustrating a processing procedure in which the CPU 60 according to the first embodiment executes photography, editing, and printing.

CPU60は、コイン投入口10から所定料金を満たす硬貨が投入されたか否かを判断する(ステップS1)。CPU60は、所定料金を満たす硬貨が投入されていないと判断した場合(S1:NO)、処理をステップS1へ戻して所定料金を満たす硬貨が投入されたと判断するまで待機する。なお、この間CPU60は、表示パネル12に投入済みの硬貨の総額を表示させるように制御信号を表示パネル12へ出力する。   The CPU 60 determines whether or not a coin satisfying a predetermined fee has been inserted from the coin insertion slot 10 (step S1). If the CPU 60 determines that no coin satisfying the predetermined fee has been inserted (S1: NO), the CPU 60 returns the process to step S1 and waits until it is determined that a coin satisfying the predetermined fee has been inserted. During this time, the CPU 60 outputs a control signal to the display panel 12 so as to display the total amount of coins already inserted on the display panel 12.

CPU60は、ステップS1において所定料金を満たす硬貨が投入されたと判断した場合(S1:YES)、表示パネル12に案内情報の画面を表示し、更に撮影部2のディスプレイ22に操作画面を表示させ、更にスピーカから案内音声を出力し(ステップS2)、ユーザに撮影ブース内に入り、撮影を実行するように促す。これにより、写真プリントサービスの提供が開始される。   When the CPU 60 determines in step S1 that coins satisfying a predetermined fee have been inserted (S1: YES), the CPU 60 displays a guidance information screen on the display panel 12, and further displays an operation screen on the display 22 of the photographing unit 2, Further, a guidance voice is output from the speaker (step S2), and the user is prompted to enter the shooting booth and execute shooting. Thereby, the provision of the photo print service is started.

CPU60は、ユーザがディスプレイ22における操作画面などを操作することにより、合成させる前景画像及び/又は背景画像が選択され、更に、撮影が実行され、完了したか否かを判断する(ステップS3)。具体的には、前景画像及び/又は背景画像が選択されると、シャッターを動作させるためのカウントが開始され、ディスプレイ22にプレビュー画面が表示される。そして、カウントアップされたとCPU60が判断してシャッターを動作させ写真撮影が実行される。ユーザがプレビュー画面を見て撮影された画像で決定する旨のボタン等を操作するか、例えば6回などの所定回数の写真撮影が終了するかにより撮影が完了する。CPU60は、撮影が完了していないと判断した場合(S3:NO)、処理をステップS3へ戻して、撮影が完了するまで待機する。   The CPU 60 determines whether the foreground image and / or the background image to be combined is selected by operating the operation screen on the display 22 and the photographing is executed and completed (step S3). Specifically, when a foreground image and / or a background image is selected, counting for operating the shutter is started, and a preview screen is displayed on the display 22. Then, the CPU 60 determines that the count has been incremented, operates the shutter, and executes photography. The shooting is completed depending on whether the user operates a button or the like indicating that the image is determined by looking at the preview screen, or whether a predetermined number of times of shooting such as six times is completed. If the CPU 60 determines that shooting has not been completed (S3: NO), it returns the process to step S3 and waits until shooting is completed.

CPU60は、撮影が完了したと判断した場合(S3:YES)、シャッターを動作させて写真撮影された画像をカメラ21から取得し、選択された前景画像及び/又は背景画像と関連付けてメモリ61に保存する(ステップS4)。そしてCPU60は、ディスプレイ22に案内情報の画面を表示させ、第1編集部4a又は第2編集部4bのタブレットディスプレイ40a,40bに操作画面を表示させ、スピーカ24,24によって案内音声を出力し(ステップS5)、ユーザに編集空間R2へ移動し、編集操作を行なうように促す。   If the CPU 60 determines that shooting has been completed (S3: YES), the CPU 60 acquires a photographed image from the camera 21 by operating the shutter, and associates it with the selected foreground image and / or background image in the memory 61. Save (step S4). The CPU 60 displays the guidance information screen on the display 22, displays the operation screen on the tablet displays 40a and 40b of the first editing unit 4a or the second editing unit 4b, and outputs guidance voices through the speakers 24 and 24 ( Step S5), prompting the user to move to the editing space R2 and perform an editing operation.

次にCPU60は、メモリ61に保存した写真撮影された画像を画像処理部7へ受け渡して、画像処理を実行させる(ステップS6)。そしてCPU60は、タブレットディスプレイ40a,40bの操作画面にて編集を受け付ける(ステップS7)。このとき、操作画面に表示されるユーザを撮影した画像は、画像処理後の画像であってもよい。この場合、CPU60は画像処理後の小顔にする加工が行なわれた撮影画像をキャプチャ・クロマキーボード63にてクロマキー処理して人物のみの画像を作成し、操作画面に前景画像及び/又は背景画像と重ねて表示させる。   Next, the CPU 60 transfers the photographed image stored in the memory 61 to the image processing unit 7 to execute image processing (step S6). The CPU 60 accepts editing on the operation screen of the tablet displays 40a and 40b (step S7). At this time, the image of the user displayed on the operation screen may be an image after image processing. In this case, the CPU 60 performs chroma key processing on the captured image that has been processed to make a small face after image processing, using the capture / chroma keyboard 63 to create an image of only the person, and displays the foreground image and / or background image on the operation screen. And overlaid on the display.

CPU60は、編集完了を指示する操作がされたことにより編集が完了し、且つ画像処理部7による画像処理が完了したか否かを判断する(ステップS8)。CPU60は、編集又は画像処理部7による画像処理のいずれかが未完了であると判断した場合(S8:NO)、処理をステップS8に戻して両者が完了するまで待機する。   The CPU 60 determines whether the editing is completed due to the operation for instructing the completion of editing and whether the image processing by the image processing unit 7 is completed (step S8). If the CPU 60 determines that either editing or image processing by the image processing unit 7 has not been completed (S8: NO), the process returns to step S8 and waits until both are completed.

CPU60は、編集及び画像処理のいずれもが完了したと判断した場合(S8:YES)、画像処理部7による画像処理によって加工が完了した加工画像と、編集結果の文字又は画像などの情報と、選択されて関連付けてメモリ61に保存されている背景画像及び/又は前景画像とに対し合成処理を実行して合成画像を生成する(ステップS9)。CPU60は、生成された合成画像を操作画面に表示すると共に、印刷部5のプリンタ50へ出力して印刷出力を指示する(ステップS10)。このときCPU60は、操作画面にて印刷レイアウトの選択、印刷指示を受け付けてもよい。   When the CPU 60 determines that both editing and image processing have been completed (S8: YES), the processed image that has been processed by the image processing by the image processing unit 7, information such as characters or images of the editing result, A synthesis process is performed on the background image and / or the foreground image selected and associated and stored in the memory 61 to generate a synthesized image (step S9). The CPU 60 displays the generated composite image on the operation screen and outputs it to the printer 50 of the printing unit 5 to instruct printing output (step S10). At this time, the CPU 60 may accept a print layout selection and a print instruction on the operation screen.

CPU60は、印刷が完了したか否かを判断し(ステップS11)、印刷が完了していないと判断した場合(S11:NO)、処理をステップS11へ戻して印刷が完了したと判断するまで待機する。CPU60は、プリンタ50における印刷が完了したと判断した場合(S11:YES)、印刷が完了した旨を示す案内表示を印刷部5の表示パネル52、第1編集部4a又は第2編集部4bのタブレットディスプレイ40a,40bに表示し、スピーカ43a,43bから案内音声を出力し(ステップS12)、処理を終了する。   The CPU 60 determines whether or not printing has been completed (step S11). If it is determined that printing has not been completed (S11: NO), the process returns to step S11 and waits until it is determined that printing has been completed. To do. When the CPU 60 determines that the printing in the printer 50 is completed (S11: YES), the CPU 60 displays a guidance display indicating that the printing is completed on the display panel 52 of the printing unit 5, the first editing unit 4a, or the second editing unit 4b. The information is displayed on the tablet displays 40a and 40b, guidance voices are output from the speakers 43a and 43b (step S12), and the process is terminated.

このとき、印刷された写真シールがシール吐出口51に排出されているので、ユーザは自身が撮影された写真シールを取得することができる。このように、写真プリントサービスの提供が実現される。   At this time, since the printed photo sticker is discharged to the sticker discharge port 51, the user can obtain the photo sticker in which the user is photographed. Thus, the provision of a photo print service is realized.

次に、図5に示したフローチャートの内のステップS6における画像処理実行の指示に基づき、画像処理部7にて実行される画像処理について詳細を説明する。なお、カメラ21から取得されて制御部6から受け渡される画像は、複数の画素の輝度値、色差値からなるデジタル画像データである。   Next, details of the image processing executed by the image processing unit 7 based on an instruction to execute image processing in step S6 in the flowchart shown in FIG. 5 will be described. Note that the image acquired from the camera 21 and delivered from the control unit 6 is digital image data including luminance values and color difference values of a plurality of pixels.

図6は、実施の形態1における画像処理部7のCPU70により実行される画像処理手順の全体の一例を示すフローチャートである。以下に示す処理は、CPU70がHDD72から画像処理プログラム7Pを読み出して実行することにより実現される。   FIG. 6 is a flowchart illustrating an example of the entire image processing procedure executed by the CPU 70 of the image processing unit 7 according to the first embodiment. The processing described below is realized by the CPU 70 reading and executing the image processing program 7P from the HDD 72.

CPU70は、制御部6から受け渡される写真撮影された画像を取得し(ステップS101)、取得した画像から人物の顔を検出し(ステップS102)、検出した顔における各器官が写る領域を特定する(ステップS103)。更にCPU70は、検出した人物の顔の輪郭を抽出する(ステップS104)。   The CPU 70 acquires a photographed image delivered from the control unit 6 (step S101), detects a human face from the acquired image (step S102), and specifies a region where each organ in the detected face is captured. (Step S103). Further, the CPU 70 extracts the contour of the detected human face (step S104).

ステップS102からステップS104までの顔検出、各器官領域の特定、及び輪郭抽出の処理は、肌色検出、テンプレートマッチングなどの種々の既存技術を利用して行なわれる。ステップS102の顔検出処理によってCPU70は具体的に、画像中の顔が写っている領域(顔領域)の画像内における座標情報を得る。顔領域は具体的には、眉及び口の領域の外接矩形などである。顔領域は楕円形等でもよい。このとき、顔の傾きも検出され、画像に写る人物の顔が傾いている場合には、顔検出により得られる顔領域の横軸方向及び縦軸方向は、画像の水平方向及び垂直方向に対して傾いている。またこのとき、検出された顔の数が得られ、後の処理で用いるとしてもよい。また、ステップS103の各器官が写る領域の特定処理では、各器官、例えば目、鼻又は口の輪郭がテンプレートマッチングにより特定され、各器官の輪郭上の数点の座標情報、又は各器官を覆う楕円形状の画像内における座標情報が得られる。ステップS104における顔の輪郭抽出処理でも、肌色検出などにより顔の輪郭が抽出され、抽出された顔の輪郭上の数点の画像内における座標情報が得られる。   The face detection, identification of each organ region, and contour extraction from step S102 to step S104 are performed using various existing techniques such as skin color detection and template matching. Specifically, the CPU 70 obtains coordinate information in the image of the region (face region) where the face in the image is captured by the face detection processing in step S102. Specifically, the face area is a circumscribed rectangle of the eyebrow and mouth areas. The face area may be oval. At this time, the tilt of the face is also detected, and when the face of a person in the image is tilted, the horizontal and vertical directions of the face area obtained by face detection are relative to the horizontal and vertical directions of the image. Leaning. At this time, the number of detected faces can be obtained and used in later processing. Further, in the region specifying process of each organ in step S103, the contour of each organ, for example, the eyes, nose, or mouth, is specified by template matching, and several coordinate information on the contour of each organ or each organ is covered. Coordinate information in an elliptical image is obtained. Also in the face outline extraction process in step S104, the face outline is extracted by skin color detection or the like, and coordinate information in several images on the extracted face outline is obtained.

次にCPU70は、ステップS102からステップS104までの処理によって得られる顔の輪郭、各器官領域に関する座標情報を解析する処理を行なう(ステップS105)。解析処理の詳細は後述にて説明するが、ここでは、CPU70は検出された顔を補正するための各種情報の特定、及び加工作業領域の設定を行なう。   Next, the CPU 70 performs processing for analyzing the contour of the face obtained by the processing from step S102 to step S104 and coordinate information regarding each organ region (step S105). The details of the analysis process will be described later. Here, the CPU 70 specifies various information for correcting the detected face and sets a processing work area.

CPU70は、ステップS102における顔検出処理の結果に基づき、取得した画像から複数の顔が検出されたか否かを判断する(ステップS106)。CPU70は、取得した画像から顔は複数検出されていないと判断した場合(S106:NO)、処理を後述のステップS108に進める。   The CPU 70 determines whether or not a plurality of faces are detected from the acquired image based on the result of the face detection process in step S102 (step S106). If the CPU 70 determines that a plurality of faces are not detected from the acquired image (S106: NO), the process proceeds to step S108 described later.

CPU70は、取得した画像から複数の顔が検出されたと判断した場合(S106:YES)、各顔の輪郭夫々に対し、他の輪郭が重複するか否かを判断し、重複する輪郭に対応する顔を加工対象から除外する処理を行なう(ステップS107)。ステップS107の重複輪郭除外処理の詳細についても後述にて説明する。   When the CPU 70 determines that a plurality of faces have been detected from the acquired image (S106: YES), the CPU 70 determines whether or not other contours overlap for each of the contours of each face, and corresponds to the overlapping contours. A process of excluding the face from the processing target is performed (step S107). Details of the overlapping contour removal processing in step S107 will also be described later.

次にCPU70は、検出された顔を小顔になるよう加工する小顔処理を行なう準備のため、ステップS105の解析処理にて設定された作業領域内にグリッドを作成する(ステップS108)。グリッドの作成において例えばCPU70は、作業領域を縦横夫々50などの所定数で分割する。このとき、メッシュ分割してもよいし、顔の黄金比に応じた分割を行なってもよい。   Next, the CPU 70 creates a grid in the work area set in the analysis processing in step S105 in preparation for performing small face processing for processing the detected face to be a small face (step S108). In creating the grid, for example, the CPU 70 divides the work area by a predetermined number such as 50 vertically and horizontally. At this time, mesh division may be performed, or division according to the golden ratio of the face may be performed.

そしてCPU70は小顔処理を実行する(ステップS109)。小顔処理の詳細については後述にて説明する。   The CPU 70 executes small face processing (step S109). Details of the small face processing will be described later.

CPU70は、ステップS109にて小顔処理を実行した結果得られる画像を用い、加工画像作成処理を実行し(ステップS110)、後のCPU60による合成画像生成処理に用いることができる画像を生成し、画像処理部7における画像処理を終了する。なお、ステップS110における加工画像作成処理についても詳細を後述にて説明する。   The CPU 70 uses the image obtained as a result of executing the small face processing in step S109, executes the processed image creation processing (step S110), generates an image that can be used for the composite image generation processing by the CPU 60 later, The image processing in the image processing unit 7 ends. Details of the processed image creation processing in step S110 will be described later.

なお、ステップS102からステップS104までの処理の順序は図6のフローチャートに示す処理手順には限らず、前後してもよい。また、ステップS106における顔の数が複数であるか否かの判断処理は必須ではない。したがって、顔の数が複数であるか否かに関わらず、ステップS107の処理へ進めてよい。ステップS107における処理では、抽出された顔領域を一つずつ選択して処理を行なうようにしてあり、顔の数が複数であるか単数であるかによらずに処理が行なわれる。   Note that the order of processing from step S102 to step S104 is not limited to the processing procedure shown in the flowchart of FIG. In addition, it is not essential to determine whether or not there are a plurality of faces in step S106. Therefore, the process may proceed to step S107 regardless of whether or not the number of faces is plural. In the process in step S107, the extracted face areas are selected one by one, and the process is performed regardless of whether the number of faces is plural or singular.

図7は、実施の形態1における画像処理部7のCPU70により実行される解析処理の一例を示すフローチャートである。図7のフローチャートに示す処理手順は、図6のフローチャートに示したステップS105の処理手順の詳細である。   FIG. 7 is a flowchart illustrating an example of analysis processing executed by the CPU 70 of the image processing unit 7 according to the first embodiment. The processing procedure shown in the flowchart of FIG. 7 is the details of the processing procedure of step S105 shown in the flowchart of FIG.

CPU70は、顔検出により得られた顔領域から一の顔領域を選択し(ステップS51)、選択した顔領域内で特定されている目、鼻又は口の領域の位置に基づき、顔中心を特定する(ステップS52)。ステップS52における顔中心の特定処理としてCPU70は、ステップS103にて特定された鼻の領域の中心位置を顔中心と特定してもよいし、ステップS103にて特定された両目の領域の中心位置と、鼻の領域の中心位置とを結ぶ三角形の重心を顔中心と特定してもよい。本実施の形態における画像処理部7による処理では、顔検出により得られる顔領域である矩形の中心を顔中心とするのでなく、目、鼻又は口の位置から顔中心を特定する。本実施の形態のような写真プリントサービスの提供を受けるユーザは、顔をカメラ21に向けずに、斜めに向けてポーズをとるなどの状況が考えられ、顔領域の中心が必ずしも顔中心と一致するとは限らないからである。   The CPU 70 selects one face area from the face areas obtained by the face detection (step S51), and specifies the face center based on the position of the eye, nose or mouth area specified in the selected face area. (Step S52). As the face center specifying process in step S52, the CPU 70 may specify the center position of the nose region specified in step S103 as the face center, or the center position of both eye regions specified in step S103. The center of gravity of the triangle connecting the center position of the nose region may be specified as the face center. In the processing by the image processing unit 7 in the present embodiment, the center of the face is specified from the position of the eyes, nose, or mouth, instead of using the center of the rectangle that is the face region obtained by face detection as the center of the face. The user who is provided with the photo print service as in the present embodiment may be in a situation such as posing in an oblique direction without facing the camera 21, and the center of the face area does not necessarily coincide with the center of the face. This is not always the case.

CPU70は、顔の輪郭を基に、輪郭を外側に拡大させた処理輪郭線を、加工処理の境界線とするために顔領域に設定する(ステップS53)。具体的にCPU70は、ステップS52にて特定された顔中心を中心に、ステップS104にて抽出された顔の輪郭を拡大する。即ち、CPU70は、顔中心から顔の輪郭上の各点までの距離に、所定の拡大係数を乗じ、拡大係数を乗じて得られる距離にある点を結ぶ線を処理輪郭線として設定する。   Based on the face contour, the CPU 70 sets a processing contour line whose contour has been expanded outward as a face area for use as a processing processing boundary line (step S53). Specifically, the CPU 70 enlarges the contour of the face extracted in step S104 around the face center specified in step S52. That is, the CPU 70 multiplies the distance from the center of the face to each point on the face contour by a predetermined enlargement factor, and sets a line connecting points at a distance obtained by multiplying the enlargement factor as a processing contour line.

次にCPU70は、顔検出により得られた顔領域の横軸方向及び縦軸方向、即ち顔の横方向及び縦方向に平行であって、顔の中央線即ち鼻又は口の中心を通る線へ向かう処理ベクトルを特定する(ステップS54)。ステップS54にて特定される処理ベクトルは、後述の小顔処理において画像を収縮する方向及び大きさを示すベクトルとして利用される。ここで、顔の横方向と縦方向との夫々について処理ベクトルを特定することにより、顔の横方向及び縦方向夫々に対し、別個の比率で後述の小顔処理を行なうことが可能となる。   Next, the CPU 70 moves to the horizontal axis direction and vertical axis direction of the face area obtained by the face detection, that is, parallel to the horizontal direction and vertical direction of the face, and passes through the center line of the face, that is, the line passing through the center of the nose or mouth. A processing vector to be headed is specified (step S54). The processing vector specified in step S54 is used as a vector indicating the direction and size of image shrinkage in small face processing described later. Here, by specifying a processing vector for each of the horizontal direction and the vertical direction of the face, small face processing described later can be performed at a separate ratio for each of the horizontal direction and the vertical direction of the face.

CPU70は、画像を収縮させる比率である処理係数を決定する(ステップS55)。後述の小顔処理にて、ステップS54で特定された横方向及び縦方向の処理ベクトルに沿って画像を収縮させるところ、処理係数とは、この際の画像の収縮率(小顔率)に対し、顔の大きさに応じて変化を加えるためのものである。具体的にCPU70は、検出された顔の幅、即ち処理輪郭線の外接矩形の幅に基づき、処理係数を決定する。処理係数は顔領域の大きさ、即ち画像に占める比率に応じて変化するように予め設定されており、顔領域の大きさが比較的大きい場合、即ち手前に顔が写る場合と、顔領域の大きさが比較的小さい場合即ち奥に顔が写る場合とでは、顔の大きさが比較的大きい場合に収縮の比率が大きくなるようにしてある。これにより、奥に写る人物の顔は小さいにも拘らず更に無用に小さく加工されるなどの事態を防止する。   The CPU 70 determines a processing coefficient that is a ratio for shrinking the image (step S55). In the small face processing described later, the image is contracted along the horizontal and vertical processing vectors specified in step S54. The processing coefficient is the image contraction rate (small face rate) at this time. This is for adding changes according to the size of the face. Specifically, the CPU 70 determines the processing coefficient based on the detected face width, that is, the width of the circumscribed rectangle of the processing outline. The processing coefficient is set in advance so as to change in accordance with the size of the face area, that is, the ratio to the image, and when the size of the face area is relatively large, that is, when the face appears in front, When the size is relatively small, that is, when the face is in the back, the contraction ratio is increased when the size of the face is relatively large. As a result, it is possible to prevent a situation in which the face of a person in the back is further processed unnecessarily even though it is small.

CPU70は、ステップS53にて拡大した処理輪郭線を含む所定範囲を作業領域として設定する(ステップS56)。ここでは、処理輪郭線の外接矩形(画像の垂直方向及び水平方向を、縦方向及び横方向とする)を所定の倍率で拡大したものを作業領域として設定する。作業領域を設定して、後述する小顔処理の対象領域を限定することにより、処理の高速化を図ることができる。   The CPU 70 sets a predetermined range including the processing contour expanded in step S53 as a work area (step S56). Here, a circumscribed rectangle of the processing outline (the vertical and horizontal directions of the image are set to the vertical and horizontal directions) enlarged at a predetermined magnification is set as the work area. By setting the work area and limiting the target area for the small face processing described later, the processing speed can be increased.

CPU70は、顔検出により得られた顔領域全てについて処理を行なったか否かを判断し(ステップS57)、顔領域全てについて処理を行っていないと判断した場合(S57:NO)、処理をステップS51へ戻す。CPU70は、検出された顔全てについて処理を行なったと判断した場合(S57:YES)、解析処理を終了し、図6のフローチャートにおけるステップS106へ処理を戻す。   The CPU 70 determines whether or not the processing has been performed for all the face regions obtained by the face detection (step S57), and when it is determined that the processing has not been performed for all the face regions (S57: NO), the processing is performed in step S51. Return to. If the CPU 70 determines that the processing has been performed for all the detected faces (S57: YES), it ends the analysis processing and returns the processing to step S106 in the flowchart of FIG.

図8は、実施の形態1における画像処理部7のCPU70により実行される重複輪郭除外処理の一例を示すフローチャートである。図8のフローチャートに示す処理手順は、図6のフローチャートに示したステップS107の処理手順の詳細である。   FIG. 8 is a flowchart illustrating an example of the overlapping contour removal process executed by the CPU 70 of the image processing unit 7 according to the first embodiment. The processing procedure shown in the flowchart of FIG. 8 is the details of the processing procedure of step S107 shown in the flowchart of FIG.

CPU70は、顔検出により得られた顔領域から一の顔領域を選択し(ステップS71)、選択した顔領域に設定されている処理輪郭線を取得する(ステップS72)。CPU70は、取得した処理輪郭線が他の顔領域に対応付けられている処理輪郭線と交差するか否かを判断する(ステップS73)。ステップS73における判断処理は、処理輪郭線同士が交差するか否かのみならず、処理輪郭線間の距離が所定値以下であるか否かを判断してもよい。また、検出された顔の数が単数である場合は他の顔領域が存在しないので、CPU70は、ステップS73の判断処理にて他の処理輪郭線と交差しないと判断する。   The CPU 70 selects one face area from the face areas obtained by the face detection (step S71), and acquires the processing contour set in the selected face area (step S72). The CPU 70 determines whether or not the acquired processing contour line intersects with the processing contour line associated with another face area (step S73). The determination process in step S73 may determine whether or not the distance between the process outlines is not more than a predetermined value as well as whether or not the process outlines intersect each other. When the number of detected faces is singular, there is no other face area, and therefore the CPU 70 determines that it does not intersect with other processing contour lines in the determination processing in step S73.

CPU70は、取得した処理輪郭線が他の処理輪郭線と交差しないと判断した場合(S73:NO)、顔検出により得られた顔領域全てについて処理を行なったか否かを判断する(ステップS74)。   When the CPU 70 determines that the acquired processing contour does not intersect with another processing contour (S73: NO), the CPU 70 determines whether or not processing has been performed for all the face regions obtained by face detection (step S74). .

CPU70は、取得した処理輪郭線が他の処理輪郭線と交差すると判断した場合(S73:YES)、取得した処理輪郭線が設定されている顔領域を後述の小顔処理、即ち加工処理の対象から除外し(ステップS75)、処理をステップS74へ進める。なお、CPU70は具体的に、各顔領域に加工処理の対象外であるか否かを示すフラグ(デフォルトではオフ)を対応付けておき、ステップS75では、当該フラグをオンにする。CPU70は、後述する小顔処理において当該フラグがオンである顔領域に対しては処理を行なわない。   When the CPU 70 determines that the acquired processing contour line intersects with another processing contour line (S73: YES), the face area in which the acquired processing contour line is set is the target of small face processing, that is, processing processing described later. (Step S75), and the process proceeds to step S74. Specifically, the CPU 70 associates each face area with a flag (OFF by default) indicating whether or not it is out of the processing target, and turns on the flag in step S75. The CPU 70 does not perform processing on a face area in which the flag is turned on in small face processing described later.

そしてCPU70は、ステップS74にて顔領域全てについて処理を行っていないと判断した場合(S74:NO)、処理をステップS71へ戻し、顔領域全てについて処理を行なったと判断した場合(S74:YES)、解析処理を終了し、図6のフローチャートにおけるステップS108へ処理を戻す。   If the CPU 70 determines that the process has not been performed for all the face areas in step S74 (S74: NO), the process returns to step S71, and if it is determined that the process has been performed for all the face areas (S74: YES). The analysis process is terminated, and the process returns to step S108 in the flowchart of FIG.

図8のフローチャートに示した処理手順により、複数のユーザがカメラ21に向けて前後になって写る場合などに顔が重なっているとき、又は顔を寄せて写る場合など顔が近接しているときに、顔領域に無用に加工を行なうことによって輪郭にて歪が生じる事態が防止される。   When the faces overlap, such as when a plurality of users appear back and forth toward the camera 21, or when the faces are close to each other, such as when looking close together, according to the processing procedure shown in the flowchart of FIG. In addition, a situation in which distortion is generated in the contour due to unnecessary processing on the face region is prevented.

図9は、実施の形態1における画像処理部7のCPU70により実行される小顔処理の一例を示すフローチャートである。図9のフローチャートに示す処理手順は、図6のフローチャートに示したステップS109の処理手順の詳細である。ここで、以下に示す処理が行なわれるに際し、検出された顔の顔領域には作業領域が設定されており、更に作業領域内にグリッドが作成されている。   FIG. 9 is a flowchart illustrating an example of small face processing executed by the CPU 70 of the image processing unit 7 according to the first embodiment. The processing procedure shown in the flowchart of FIG. 9 is the details of the processing procedure of step S109 shown in the flowchart of FIG. Here, when the following processing is performed, a work area is set in the face area of the detected face, and a grid is created in the work area.

CPU70は、顔検出により得られた顔領域から一の顔領域を選択し(ステップS91)、選択した顔領域に設定されている作業領域に対し、後述の処理(S96、S97)を行なわないためのマスクを作成する(ステップS92)。具体的にはCPU70は、設定されている作業領域内であって、処理輪郭線の外側、目の領域、及び、両目の中央を結ぶ直線よりも上側の領域をマスキング対象領域(マスク)とする。そしてマスク内の画素に対するマスク値を「0」とし、それ以外の作業領域内の画素に対するマスク値を「1」とする。次にCPU70は、ステップS92で作成したマスクにおいて、処理輪郭線の内側との境界をぼかす処理を行なう(ステップS93)。ぼかし処理を行なうことにより、マスク値が「1」である領域と、「0」である領域との境界がぼやけ、後述の処理(S96、S97)の結果が、自然な画像となる。   The CPU 70 selects one face area from the face areas obtained by the face detection (step S91), and does not perform the later-described processing (S96, S97) for the work area set in the selected face area. Is created (step S92). Specifically, the CPU 70 sets a masking target area (mask) in the set work area and outside the processing outline, above the eye area, and above the straight line connecting the centers of both eyes. . The mask value for the pixels in the mask is set to “0”, and the mask value for the pixels in the other work areas is set to “1”. Next, the CPU 70 performs a process of blurring the boundary with the inner side of the processing outline in the mask created in step S92 (step S93). By performing the blurring process, the boundary between the area where the mask value is “1” and the area where the mask value is “0” is blurred, and the result of the processing (S96, S97) described later becomes a natural image.

CPU70は、全顔領域についてステップS92及びS93のマスクの処理を行なったか否かを判断し(ステップS94)、全顔領域について処理を行なっていないと判断した場合(S94:NO)、処理をステップS91へ戻す。CPU70は、全顔領域について処理を行なったと判断した場合(S94:YES)、次のステップへ処理を進める。   The CPU 70 determines whether or not the mask processing in steps S92 and S93 has been performed for the entire face area (step S94), and if it is determined that the process has not been performed for the entire face area (S94: NO), the process is stepped. Return to S91. If the CPU 70 determines that the process has been performed for the entire face area (S94: YES), the process proceeds to the next step.

CPU70は、再度顔検出により得られた顔領域から一の顔領域を選択し(ステップS95)、選択した顔領域に対応する顔への小顔率を設定する(ステップS96)。小顔率とは顔を小さくする効果の強さを示し、具体的には作業領域内の画像の収縮率である。小顔率には、0.9,0.8等任意の値を設定可能である。またこのとき、小顔率は顔の横方向と縦方向とで夫々異なる値を設定することが可能なように、横方向の小顔率と縦方向の小顔率とが設定される。   The CPU 70 again selects one face area from the face areas obtained by the face detection (step S95), and sets a small face ratio to the face corresponding to the selected face area (step S96). The small face rate indicates the strength of the effect of reducing the face, and specifically the shrinkage rate of the image in the work area. An arbitrary value such as 0.9 or 0.8 can be set for the small face ratio. At this time, the small face ratio in the horizontal direction and the small face ratio in the vertical direction are set so that different values can be set for the small face ratio in the horizontal direction and the vertical direction of the face.

CPU70は、ステップS96で設定された小顔率で、マスクが掛けられた作業領域内の各画素をグリッド毎に、顔中心へ向けて移動させ(ステップS97)、小顔処理を実現する。なお、グリッドを移動させる描画は、CPU70が描画命令を与えることによりグラフィックボード73を用いて行なう。グリッド毎の移動量は、顔中心からの距離に応じて異なる。詳細には、各グリッド内の画素を、以下に示す式(1)で求められる移動量に基づいて顔中心へ向かって移動させる。
横方向移動量=顔中心からの距離×横方向の小顔率×マスク値
縦方向移動量=顔中心からの距離×縦方向の小顔率×マスク値
…(1)
The CPU 70 moves each pixel in the work area on which the mask is applied at the small face rate set in step S96 toward the face center for each grid (step S97), thereby realizing small face processing. The drawing for moving the grid is performed by using the graphic board 73 when the CPU 70 gives a drawing command. The amount of movement for each grid varies depending on the distance from the face center. Specifically, the pixels in each grid are moved toward the face center based on the movement amount obtained by the following equation (1).
Horizontal movement amount = distance from the face center × horizontal small face rate × mask value Vertical movement amount = distance from the face center × vertical small face rate × mask value (1)

式(1)に示すように、マスク値に「0」が設定されたグリッドの画素は移動されない。また、ステップS93におけるぼかし処理により、作業領域内のマスクとの境界付近のグリッドの移動量が境界に近いほど小さくなるように調整され、マスクとの境界では移動量はゼロである。これにより、マスキングされた領域外の作業領域内の画像が全体的に顔中心へ移動して、マスクとの境界付近の画素が欠落することが回避される。   As shown in Expression (1), the pixels of the grid whose mask value is set to “0” are not moved. Further, by the blurring process in step S93, the amount of movement of the grid near the boundary with the mask in the work area is adjusted so as to be closer to the boundary, and the amount of movement at the boundary with the mask is zero. Thereby, it is avoided that the image in the work area outside the masked area moves to the center of the face as a whole, and pixels near the boundary with the mask are lost.

CPU70は、全顔領域についてステップS96及びS97の所定の比率の決定及び小顔処理を行なったか否かを判断し(ステップS98)、全顔領域について処理を行なっていないと判断した場合(S98:NO)、処理をステップS95へ戻す。CPU70は、全顔領域について処理を行なったと判断した場合(S98:YES)、小顔処理を終了し、図6のフローチャートにおけるステップS110へ処理を戻す。   The CPU 70 determines whether or not the predetermined ratio determination and small face processing of steps S96 and S97 have been performed for the entire face area (step S98), and if it is determined that the processing has not been performed for the entire face area (S98: NO), the process returns to step S95. When the CPU 70 determines that the process has been performed for the entire face area (S98: YES), the small face process is terminated, and the process returns to step S110 in the flowchart of FIG.

なお、図9のフローチャートに示した処理において、ステップS91からS94まで、ステップS95からS98までの2段階にわけ、ステップS92及びS93の処理を全顔領域に対して行なってから、再度全顔領域に対してステップS96及びS97の処理を行なう構成とした。これは、ステップS97にてグラフィックボード73を用いた描画処理を行なう構成としているため、グラフィックボード73を占有する時間をまとめて描画処理を高速に効率よく行なうためである。したがって、必ずしも図9のフローチャートに示した処理手順のように、2段階に分けて処理を行なう必要はない。   In the process shown in the flowchart of FIG. 9, the process is divided into two stages, steps S91 to S94 and steps S95 to S98. After the processes of steps S92 and S93 are performed on the entire face area, the entire face area is again displayed. In contrast, the processing of steps S96 and S97 is performed. This is because the drawing process using the graphic board 73 is performed in step S97, so that the drawing process can be performed efficiently at a high speed by collecting the time occupied by the graphic board 73. Therefore, it is not always necessary to perform the processing in two stages as in the processing procedure shown in the flowchart of FIG.

次に、小顔処理の結果を反映させた加工画像を作成する処理について説明する。図10は、実施の形態1における画像処理部7のCPU70により実行される加工画像作成処理の一例を示すフローチャートである。図10のフローチャートに示す処理手順は、図6のフローチャートに示したステップS110の処理手順の詳細である。   Next, a process for creating a processed image reflecting the result of the small face process will be described. FIG. 10 is a flowchart illustrating an example of the processed image creation process executed by the CPU 70 of the image processing unit 7 according to the first embodiment. The processing procedure shown in the flowchart of FIG. 10 is the details of the processing procedure of step S110 shown in the flowchart of FIG.

CPU70は、図6のフローチャートのステップS109における小顔処理が終了した場合、メモリ71に保存してある制御部6から取得した元の画像を、グラフィックボード73を利用して描画する(ステップS1001)。CPU70は再度、検出により得られた顔領域から一の顔領域を選択し(ステップS1002)、選択した顔領域について小顔処理後の作業領域内の画像を、ステップS51で描画した画像の上に重ねるようにして描画させる(ステップS1003)。このとき、作業領域内の部分のみが、元の画像に重ねられるようにして描画される。   When the small face processing in step S109 in the flowchart of FIG. 6 is completed, the CPU 70 draws the original image acquired from the control unit 6 stored in the memory 71 using the graphic board 73 (step S1001). . The CPU 70 again selects one face area from the face areas obtained by the detection (step S1002), and the image in the work area after the small face processing for the selected face area is placed on the image drawn in step S51. Drawing is performed so as to overlap (step S1003). At this time, only the part in the work area is drawn so as to be superimposed on the original image.

次にCPU70は、全顔領域について描画処理を行なったか否かを判断し(ステップS1004)、全顔領域について描画処理を行っていないと判断した場合(S1004:NO)、処理をステップS1002へ戻す。CPU70は、全顔領域について描画処理を行なったと判断した場合(S1004:YES)、加工画像作成処理を終了し、図6のフローチャートに処理を戻し、画像処理を終了する。   Next, the CPU 70 determines whether or not the drawing process has been performed for the entire face area (step S1004). If it is determined that the drawing process has not been performed for the entire face area (S1004: NO), the process returns to step S1002. . If the CPU 70 determines that the drawing process has been performed for the entire face area (S1004: YES), the processed image creation process ends, the process returns to the flowchart of FIG. 6, and the image process ends.

図6乃至図10のフローチャートに示した処理手順により、人物が動きのあるポーズをとる場合も夫々の顔が小顔となる加工が有効に行なわれる。   According to the processing procedures shown in the flowcharts of FIGS. 6 to 10, even when a person takes a pose with movement, the process of making each face a small face is effectively performed.

次に、図6乃至図10のフローチャートに示した画像処理部7のCPU70によって実行される各処理手順を、具体例を示す図面を参照して説明する。   Next, each processing procedure executed by the CPU 70 of the image processing unit 7 shown in the flowcharts of FIGS. 6 to 10 will be described with reference to the drawings showing specific examples.

図11は、CPU70が制御部6から取得した画像の内容例を示す説明図である。図11の説明図に示す内容例では、画像に3人の人物が写っていることが判る。図11に示すように、右側に写る人物及び中央に写る人物は顔が正面に向いておらず、鼻を通る顔の中央線に対し頬部分の面積が左右対称ではない。この場合、肌色の領域の中心線を基準に左右対照に輪郭を内側にずらすなどしたときには、顔に歪みが生まれて不自然となる。また、図11に示すように、左側に写る人物及び中央に写る人物は顔を傾けてポーズをとっている。したがって、肌色の領域に対し画像の垂直方向を軸に処理を行なうと顔に歪みが生じる。   FIG. 11 is an explanatory diagram illustrating an example of the content of an image acquired by the CPU 70 from the control unit 6. In the example of content shown in the explanatory diagram of FIG. 11, it can be seen that three people are shown in the image. As shown in FIG. 11, the person shown on the right side and the person shown in the center do not face in front, and the cheek area is not symmetrical with respect to the center line of the face passing through the nose. In this case, when the contour is shifted inward with respect to the left and right contrast with respect to the center line of the skin color region, the face is distorted and unnatural. Also, as shown in FIG. 11, the person shown on the left side and the person shown in the center are posing with their faces tilted. Therefore, if the skin color region is processed around the vertical direction of the image, the face is distorted.

図12は、CPU70により顔検出処理が実行されて得られる情報の内容例を示す説明図である。顔検出処理により、図11に示した画像に対して3つの矩形が、検出された顔領域として得られていることが示されている。左側に写る人物及び中央に写る人物については、矩形である顔領域の横軸方向及び縦軸方向は、画像の水平方向及び垂直方向に対して傾いていることが示されている。また、各人物について顔の各器官の輪郭上の点が、各器官領域として特定されている。図12に示す各点は夫々、区別されずに示されているが、顔検出処理により右目の輪郭上の点、左目の輪郭上の点、鼻の輪郭上の点などのように器官毎に区別されて検出される。同様に顔の輪郭上の点が特定されている。   FIG. 12 is an explanatory diagram illustrating an example of the content of information obtained by the face detection process performed by the CPU 70. It is shown that three rectangles are obtained as detected face areas for the image shown in FIG. 11 by the face detection process. For the person shown on the left side and the person shown in the center, it is shown that the horizontal axis direction and the vertical axis direction of the rectangular face area are inclined with respect to the horizontal direction and the vertical direction of the image. Further, the points on the contours of the organs of the face for each person are specified as the organ regions. Each point shown in FIG. 12 is shown without distinction, but for each organ such as a point on the right eye contour, a point on the left eye contour, a point on the nose contour, etc. by face detection processing. It is detected by distinction. Similarly, points on the face outline are identified.

図13は、CPU70による解析処理によって特定される顔中心の例を示す説明図である。図13には、検出された顔夫々について、特定された顔中心を通る顔の縦方向の中央線と、横方向の中央線とが示されている。以後の処理では、図13に示した顔中心を基準に、顔を小顔にする加工が行なわれる。顔中心に向かい小顔処理の加工が行なわれるので、複数の人物が、図13に示すように顔を傾けて写るか、又は正面を向かずに写るかなど、動きのあるポーズをとる画像であっても、不自然な画像とならず、有効に加工を行なうことができる。   FIG. 13 is an explanatory diagram illustrating an example of the face center specified by the analysis processing by the CPU 70. FIG. 13 shows a vertical center line and a horizontal center line of a face passing through the specified face center for each detected face. In the subsequent processing, processing for making the face a small face is performed with the face center shown in FIG. 13 as a reference. Since the small face processing is performed toward the center of the face, an image in which a plurality of persons pose with a motion, such as whether the face is tilted as shown in FIG. 13 or the face is not faced. Even if it exists, it does not become an unnatural image and can be processed effectively.

図14は、CPU70による解析処理によって設定される輪郭処理線及び作業領域の例を示す説明図である。図14には、各人物の顔に対し、図13に示した顔中心を特定する2つの中央線に加え、顔検出処理によって特定された顔の輪郭を破線にて示している。また、図14中の74a,74b,74cは、解析処理により特定された処理輪郭線であり、75a,75b,75cは設定された作業領域を示している。   FIG. 14 is an explanatory diagram illustrating an example of contour processing lines and work areas set by analysis processing performed by the CPU 70. In FIG. 14, for each person's face, in addition to the two center lines for specifying the face center shown in FIG. 13, the outline of the face specified by the face detection process is indicated by a broken line. Further, 74a, 74b, and 74c in FIG. 14 are process outlines specified by the analysis process, and 75a, 75b, and 75c indicate the set work areas.

図14に示すように、各人物の顔について処理輪郭線74a,74b,74cは、破線にて示した実際の輪郭を拡大させることで設定されており、実際の輪郭の外側に位置している。実際に顔の輪郭よりも外側の線を処理輪郭線74a,74b,74cとすることにより、実際の輪郭における歪みが防止されるので、小顔にする加工が行なわれることによって輪郭に不自然な歪みが生じることを防止することができる。   As shown in FIG. 14, the processing contour lines 74a, 74b, and 74c for each person's face are set by enlarging the actual contour indicated by the broken line, and are located outside the actual contour. . By actually setting the lines outside the face contour as the processing contour lines 74a, 74b, and 74c, distortion in the actual contour can be prevented. It is possible to prevent distortion from occurring.

また図14に示すように、作業領域75a,75b,75cとして夫々、処理輪郭線74a,74b,74cの外接矩形を所定の倍率で拡大したものを設定されていることが示されている。以後、作業領域75a,75b,75c内の画像に限定して小顔処理が高速に行なわれる。   As shown in FIG. 14, the work areas 75a, 75b, and 75c are set by enlarging the circumscribed rectangles of the processing contour lines 74a, 74b, and 74c at a predetermined magnification. Thereafter, the small face processing is performed at high speed only for the images in the work areas 75a, 75b, and 75c.

次に、図8のフローチャートに示した重複輪郭除外処理について具体例を挙げて説明する。図14に示した例に対し、重複輪郭除外処理を行なう場合、まずCPU70は例えばステップS71にて中央の人物の顔領域を選択し(S71)、処理輪郭線74bを取得する(S72)。そして、CPU70は処理輪郭線74bに対し、他の処理輪郭線74a又は処理輪郭線74cと交差するか否かを判断する(S73)。この場合、CPU70は、いずれの処理輪郭線74a,74cとも交差しないと判断するので(S73:NO)、いずれの顔領域も、加工処理対象から除外されない。   Next, the overlapping contour excluding process shown in the flowchart of FIG. 8 will be described with a specific example. In the case of performing the overlapping contour excluding process for the example shown in FIG. 14, first, the CPU 70 selects the face area of the central person in step S71, for example (S71), and acquires the processing contour line 74b (S72). Then, the CPU 70 determines whether or not the process outline 74b intersects with another process outline 74a or the process outline 74c (S73). In this case, since the CPU 70 determines that it does not intersect with any of the processing contour lines 74a and 74c (S73: NO), no face area is excluded from the processing target.

図15は、CPU70による解析処理によって設定される輪郭処理線及び作業領域の他の例を示す説明図である。図15に示す例は、画像中の2人の人物の顔が検出された例である。図15に示す例では、2人の人物は前後に重なって写っている。そして夫々の顔領域に対して、破線に示す輪郭が抽出されている。更に、図14に示した例と同様に、抽出された輪郭に基づき処理輪郭線74d,74e及び作業領域75d,75eが設定されている。   FIG. 15 is an explanatory diagram illustrating another example of the contour processing line and the work area set by the analysis processing performed by the CPU 70. The example shown in FIG. 15 is an example in which the faces of two persons in the image are detected. In the example shown in FIG. 15, two persons are shown overlapping each other. And the outline shown with a broken line is extracted with respect to each face area | region. Further, similarly to the example shown in FIG. 14, processing contour lines 74d and 74e and work areas 75d and 75e are set based on the extracted contour.

図15に示す例に対し、CPU70が重複輪郭除外処理を行なう場合は、2人の顔のいずれも加工処理対象から除外される。図15に示すように、処理輪郭線74d,74eが交差しているからである。このように、画像中の複数の人物の顔が重なるように近接している場合には、後述の小顔処理を行なって夫々画素を移動したときに、相互に画像の歪みを発生させる可能性がある。画像処理部7の重複輪郭除外処理により、歪みを発生させる可能性のある顔については加工を行なわないようにすることができ、複数の人物が動きのあるポーズをとり、複数の人物が密着して写る画像、又は重なって写る画像であっても加工によって不自然な画像となることがない。   In contrast to the example shown in FIG. 15, when the CPU 70 performs the overlapping contour exclusion process, both of the two faces are excluded from the processing target. This is because the processing contour lines 74d and 74e intersect as shown in FIG. As described above, when a plurality of human faces in the image are close to each other so as to overlap each other, there is a possibility that image distortion occurs mutually when the small face processing described later is performed and each pixel is moved. There is. The overlapping contour exclusion process of the image processing unit 7 can prevent a face that may cause distortion from being processed, so that a plurality of persons pose a moving pose and a plurality of persons are in close contact with each other. Even if an image is captured in an overlapping manner, or an image is captured in an overlapping manner, it does not become an unnatural image due to processing.

図14の例では、処理輪郭線74a,74b,74cがいずれも交差していないために、いずれの顔も加工対象外とならず、図15の例では処理輪郭線74d,74eが交差しているためにいずれの顔も加工対象外となった。重複輪郭除外処理では、完全に交差している場合のみならず、処理輪郭線間の距離が所定値以下である場合には顔が近接しているために加工対象外とすべきと判断してもよい。したがって、図14の例であっても例えば処理輪郭線74b,74c間の距離が所定値以下であるために、中央の人物の顔と右側の人物の顔とを加工対象外としてもよい。また、処理輪郭線が交差しているか否かのみならず、作業領域間が重複している場合に加工対象外とする構成としてもよい。   In the example of FIG. 14, since the processing contour lines 74a, 74b, and 74c do not intersect, no face is excluded from processing, and in the example of FIG. 15, the processing contour lines 74d and 74e intersect. As a result, both faces were not processed. In the overlapping contour exclusion process, not only when completely intersecting, but when the distance between processing contour lines is less than or equal to a predetermined value, it is determined that the face is close and should not be processed Also good. Accordingly, even in the example of FIG. 14, for example, the distance between the processing contour lines 74b and 74c is equal to or less than a predetermined value, so that the face of the central person and the face of the right person may be excluded from the processing target. Moreover, it is good also as a structure which does not become a process target when not only whether the process outlines cross | intersect but between work areas overlaps.

なお、図15に示した作業領域75dと作業領域75eとは、重複している。重複領域については作業領域から除外されるようにマスクとするようにしてもよい。   Note that the work area 75d and the work area 75e shown in FIG. 15 overlap. The overlapping area may be used as a mask so as to be excluded from the work area.

次に、図9のフローチャートに示した小顔処理について具体例を挙げて説明する。図16は、CPU70による小顔処理の概要を示す説明図である。図16には、各顔領域について設定されている作業領域75a,75b,75cに対して作成されるマスクが黒塗りにて示されている。図16に示すマスクは、作業領域75a,75b,75cの矩形内であって処理輪郭線74a,74b,74cの外側の領域である。更に、両目の領域及び両目の中央を結ぶ直線よりも画像の上側の領域もマスクの領域とされている。当該領域にマスクをして小顔処理を行なうことにより、画素を移動させる領域と移動させない領域との境界が自然となる。なお、図16に示すマスクは、ぼかし処理を行なう前の状態を示している。また、両目の領域をマスクとすることにより、両目が加工されて目が小さくなることが回避され、各人物の顔を小顔に見せる加工を有効に行なうことができる。   Next, the small face processing shown in the flowchart of FIG. 9 will be described with a specific example. FIG. 16 is an explanatory diagram showing an outline of the small face processing by the CPU 70. In FIG. 16, the masks created for the work areas 75a, 75b, and 75c set for each face area are shown in black. The mask shown in FIG. 16 is an area inside the rectangle of the work areas 75a, 75b, and 75c and outside the processing outlines 74a, 74b, and 74c. Furthermore, the area above the image from the straight line connecting the areas of both eyes and the center of both eyes is also set as the mask area. By masking the area and performing small face processing, the boundary between the area where the pixel is moved and the area where the pixel is not moved becomes natural. Note that the mask shown in FIG. 16 shows a state before the blurring process is performed. Further, by using both eye regions as a mask, it is possible to avoid both eyes from being processed and to reduce the eyes, and it is possible to effectively perform the process of making each person's face appear as a small face.

作業領域75a,75b,75cをそのまま顔中心に向かって収縮させることにより小顔とすることもできるが、この場合、作業領域75a,75b,75cの矩形の境界線当たりに画素情報が欠落する、境界に歪みが発生するなど不自然な画像となる可能性がある。   The work areas 75a, 75b, and 75c can be made smaller by shrinking the work areas as they are toward the center of the face, but in this case, pixel information is missing per rectangular boundary line of the work areas 75a, 75b, and 75c. There is a possibility of unnatural images such as distortion at the boundary.

図16の黒塗りで示されるマスク以外の作業領域75a,75b,75c内の画素をグリッド毎に、夫々矢印に示す方向に沿って顔中心へ向かって移動させることにより、小顔処理が行なわれる。   Small face processing is performed by moving the pixels in the work areas 75a, 75b, and 75c other than the mask shown in black in FIG. 16 toward the face center along the directions indicated by the arrows for each grid. .

そして、小顔処理が行なわれた後の作業領域75a,75b,75cが、図11の説明図に示したような元の画像に夫々重ねられて描画されることにより(図10、S1003)、画像中の人物の顔が小顔となるように加工が行なわれた加工画像が作成される。   Then, the work areas 75a, 75b, and 75c after the small face processing are drawn on the original images as shown in the explanatory diagram of FIG. 11 (FIG. 10, S1003). A processed image is created so that the face of the person in the image is a small face.

(実施の形態2)
実施の形態2では、実施の形態1で示した画像処理に加え、画像に写る人物の顔型を分類し、顔型の分類に応じて顔の縦方向及び横方向に対する小顔率を調整する処理を行なう。
(Embodiment 2)
In the second embodiment, in addition to the image processing shown in the first embodiment, the face type of the person shown in the image is classified, and the small face ratio in the vertical and horizontal directions of the face is adjusted according to the classification of the face type. Perform processing.

実施の形態2における画像出力装置の構成は、解析処理の詳細、小顔処理の詳細以外はハードウェア構成及びソフトウェア的な処理手順も同様である。以下の説明では、実施の形態1と共通する構成については同一の符号を付し、相違する処理手順について説明する。   The configuration of the image output apparatus according to the second embodiment is the same in hardware configuration and software processing procedure except for the details of analysis processing and the details of small face processing. In the following description, components that are the same as those in the first embodiment are denoted by the same reference numerals, and different processing procedures are described.

図17は、実施の形態2における画像処理部7のCPU70により実行される解析処理の一例を示すフローチャートである。図17のフローチャートにて説明する処理手順の内、実施の形態1にて示した図7のフローチャートの処理手順と共通する処理手順については、同一のステップ番号を付して詳細な説明を省略する。   FIG. 17 is a flowchart illustrating an example of analysis processing executed by the CPU 70 of the image processing unit 7 according to the second embodiment. Of the processing procedures described in the flowchart of FIG. 17, the same processing steps as those in the flowchart of FIG. 7 described in the first embodiment are denoted by the same step numbers, and detailed description thereof is omitted. .

CPU70は、検出された顔の顔領域を選択し(S51)、顔中心を特定し(S52)、更に顔の輪郭を外側に拡大させた処理輪郭線を設定し(S53)、処理ベクトルを特定し(S54)、処理係数を決定すると(S55)、それらの情報に基づき顔分類を判別する(ステップS58)。CPU70は、顔分類の判別結果を各顔に対応付けて記憶しておき、後の小顔処理にて小顔率の設定の際に用いる。   The CPU 70 selects the face area of the detected face (S51), specifies the center of the face (S52), sets a processing contour line that further expands the contour of the face (S53), and specifies a processing vector If the processing coefficient is determined (S55), the face classification is determined based on the information (step S58). The CPU 70 stores the face classification discrimination result in association with each face, and uses it when setting the small face ratio in subsequent small face processing.

顔分類の判別処理について詳細を説明する。図18は、実施の形態2における画像処理部7のCPU70により実行される顔分類の判別処理の一例を示すフローチャートである。   Details of the face classification discrimination processing will be described. FIG. 18 is a flowchart illustrating an example of face classification determination processing executed by the CPU 70 of the image processing unit 7 according to the second embodiment.

CPU70は、特定されている顔中心を基準に、顔中心を通る顔の横方向の中央線と抽出されている実際の顔の輪郭との交点の内の、左側の交点までの長さa1を特定する(ステップS801)。そしてCPU70は、顔中心から、顔中心を通る顔の横方向の中央線と実際の顔の輪郭との交点の内の、右側の交点までの長さa2を特定する(ステップS802)。更にCPU70は、顔中心から、顔中心を通る顔の縦方向の中央線と実際の顔の下部の輪郭との交点までの長さa3を特定する(ステップS803)。   Based on the identified face center, the CPU 70 calculates the length a1 to the left intersection of the intersections of the lateral center line of the face passing through the face center and the extracted actual face contour. Specify (step S801). Then, the CPU 70 specifies the length a2 from the center of the face to the right-side intersection of the intersections between the horizontal center line of the face passing through the center of the face and the actual face contour (step S802). Further, the CPU 70 specifies the length a3 from the face center to the intersection of the vertical center line of the face passing through the face center and the actual lower contour of the face (step S803).

次にCPU70は、ステップS801からステップS803までで特定した長さa1,a2,a3を用い、顔の幅即ち横方向の長さに対する顔の縦方向の長さの比率kが、所定値に等しいか否かを判断する(ステップS804)。ここで比率kは、
k=a3/(a1+a2)
で表わされる。
Next, the CPU 70 uses the lengths a1, a2, and a3 specified in steps S801 to S803, and the ratio k of the length of the face in the vertical direction to the width of the face, that is, the length in the horizontal direction is equal to a predetermined value. Whether or not (step S804). Where the ratio k is
k = a3 / (a1 + a2)
It is represented by

CPU70は、ステップS804にて、比率kが所定値に等しいと判断した場合(S804:YES)、標準の顔型であるパターン1に顔型を分類し(ステップS805)、分類処理を終了して、図17のフローチャートにおけるステップS56に処理を戻す。   If the CPU 70 determines in step S804 that the ratio k is equal to the predetermined value (S804: YES), the CPU 70 classifies the face type into the pattern 1 that is a standard face type (step S805), and ends the classification process. Then, the process returns to step S56 in the flowchart of FIG.

CPU70は、ステップS804にて、比率kが所定値に等しくないと判断した場合(S804:NO)、比率kが所定値よりも大きいか否かを判断する(ステップS806)。CPU70は、比率kが所定値よりも大きいと判断した場合(S806:YES)、縦方向の長さが長いので面長型であるパターン2に顔型を分類し(ステップS807)、分類処理を終了して、図17のフローチャートにおけるステップS56に処理を戻す。   When determining that the ratio k is not equal to the predetermined value in step S804 (S804: NO), the CPU 70 determines whether the ratio k is larger than the predetermined value (step S806). When the CPU 70 determines that the ratio k is larger than the predetermined value (S806: YES), the face type is classified into the pattern 2 which is a face length type because the length in the vertical direction is long (step S807), and the classification process is performed. Then, the process returns to step S56 in the flowchart of FIG.

CPU70は、ステップS806にて、比率kが所定値よりも小さいと判断した場合(S806:NO)、横方向の長さが長いので丸顔型であるパターン3に顔型を分類し(ステップS808)、分類処理を終了して、図17のフローチャートにおけるステップS56に処理を戻す。   If the CPU 70 determines in step S806 that the ratio k is smaller than the predetermined value (S806: NO), it classifies the face type into the pattern 3 that is a round face type because the horizontal length is long (step S808). ), The classification process is terminated, and the process returns to step S56 in the flowchart of FIG.

このとき、所定値としては、理想的な顔の縦横比が4:3であることから0.75を用いるとする。他の値を用いてもよい。ステップS804にて、比率kが0.75と完全に等しいと判断される可能性が低いので、プラスマイナス0.01などの所定の範囲内で0.75と等しいと判断する。   At this time, 0.75 is used as the predetermined value because the ideal aspect ratio of the face is 4: 3. Other values may be used. In step S804, since it is unlikely that the ratio k is determined to be completely equal to 0.75, it is determined that the ratio k is equal to 0.75 within a predetermined range such as plus or minus 0.01.

図18のフローチャートに示した処理を、具体例を挙げて説明する。図19は、画像中で検出される顔に対して特定される輪郭及び中央線の例を示す説明図である。図19の説明図に示される画像中の3人の人物の内、右側の人物の顔に対して顔型の分類処理が行なわれる場合を例に挙げる。図19に示すように、顔中心から、横方向の中央線と顔の輪郭との左側の交点までの長さa1、右側の交点までの長さa2が特定され、更に、顔中心から、縦方向の中央線と顔の下部の輪郭との交点までの長さa3が特定される。これらの長さa1,a2,a3に基づき算出される比率kにより、右側の人物の顔型が分類される。   The process shown in the flowchart of FIG. 18 will be described with a specific example. FIG. 19 is an explanatory diagram illustrating an example of a contour and a center line specified for a face detected in an image. An example in which face type classification processing is performed on the face of the right person among the three persons in the image shown in the explanatory diagram of FIG. As shown in FIG. 19, the length a1 from the center of the face to the left intersection of the horizontal center line and the face outline is specified, and the length a2 to the right intersection is further specified. A length a3 to the intersection of the direction center line and the lower contour of the face is specified. The face type of the right person is classified by the ratio k calculated based on these lengths a1, a2, and a3.

分類された顔型を小顔処理における小顔率の設定の際に用いる処理について説明する。図20は、実施の形態2における画像処理部7のCPU70により実行される小顔処理の一例を示すフローチャートである。図20のフローチャートにて説明する処理手順の内、実施の形態1にて示した図9のフローチャートの処理手順と共通する処理手順については、同一のステップ番号を付して詳細な説明を省略する。   The process used when setting the small face ratio in the small face process for the classified face type will be described. FIG. 20 is a flowchart illustrating an example of the small face processing executed by the CPU 70 of the image processing unit 7 according to the second embodiment. Of the processing procedures described in the flowchart of FIG. 20, the processing steps common to the processing procedure of the flowchart of FIG. 9 shown in the first embodiment are denoted by the same step numbers and detailed description thereof is omitted. .

CPU70は、全顔領域についてマスクを作成し(S92)、マスクをぼかす処理(S93)を行なった場合(S94:YES)、再度、一の顔領域を選択し(S95)、選択した顔について判別され、対応付けて記憶してある顔型の分類に基づき、小顔率を設定する(ステップS99)。このときCPU70は、顔型の分類に基づいて顔の横方向の小顔率と縦方向の小顔率とを設定する。例えばCPU70は、解析処理により顔がパターン1(標準型)と判別されている場合には、初期的に設定してある小顔率を、顔の横方向及び縦方向夫々そのまま用いる。これに対し、CPU70は、解析処理により顔がパターン2(面長型)と判別されている場合には、顔の縦方向の小顔率を顔の横方向の小顔率よりも強くするように設定する。顔が面長型と判別されている場合CPU70は、顔の縦横比が理想の0.75に近づくように、以下の式(2)に基づき縦方向の小顔率を設定してもよい。このとき、横方向の小顔率は初期的に設定してある小顔率を用いる。
縦方向の小顔率
=縦方向の小顔率(初期設定)×[0.75/{a3/(a1+a2)}]…(2)
The CPU 70 creates a mask for the entire face area (S92), and performs the process of blurring the mask (S93) (S94: YES), selects one face area again (S95), and determines the selected face. Then, the small face ratio is set based on the face type classification stored in association (step S99). At this time, the CPU 70 sets the small face ratio in the horizontal direction and the small face ratio in the vertical direction based on the face type classification. For example, when the face is determined to be pattern 1 (standard type) by the analysis process, the CPU 70 uses the initially set small face ratio as it is in the horizontal direction and the vertical direction of the face. On the other hand, when the face is determined to be pattern 2 (surface length type) by the analysis process, the CPU 70 makes the small face ratio in the vertical direction of the face stronger than the small face ratio in the horizontal direction of the face. Set to. When the face is determined to be a face length type, the CPU 70 may set the vertical small face ratio based on the following equation (2) so that the aspect ratio of the face approaches an ideal 0.75. At this time, the initially set small face ratio is used as the small face ratio in the horizontal direction.
Small face ratio in the vertical direction = small face ratio in the vertical direction (initial setting) × [0.75 / {a3 / (a1 + a2)}] (2)

また、CPU70は、解析処理により顔がパターン3(丸顔型)と判別されている場合には、顔の横方向の小顔率を顔の縦方向の小顔率よりも強くするように設定する。顔が丸顔型と判別されている場合CPU70は、顔の縦横比が理想の0.75に近づくように、以下の式(3)に基づき横方向の小顔率を設定してもよい。このとき、縦方向の小顔率は初期的に設定してある小顔率を用いる。
横方向の小顔率
=横方向の小顔率(初期設定)×[{a3/(a1+a2)}/0.75]…(3)
Further, when the face is determined to be pattern 3 (round face type) by the analysis process, the CPU 70 sets the small face ratio in the horizontal direction of the face to be stronger than the small face ratio in the vertical direction of the face. To do. When the face is determined to be a round face type, the CPU 70 may set the small face ratio in the horizontal direction based on the following equation (3) so that the aspect ratio of the face approaches the ideal 0.75. At this time, the initially set small face ratio is used as the small face ratio in the vertical direction.
Small face ratio in the horizontal direction = small face ratio in the horizontal direction (initial setting) × [{a3 / (a1 + a2)} / 0.75] (3)

次にCPU70は、全顔領域について、上述のように顔の分類に基づいて設定した小顔率で、マスクが掛けられた作業領域内の各画素をグリッド毎に、顔中心へ向けて移動させ(S97)、小顔処理を実現し、小顔処理を終了する。   Next, the CPU 70 moves each pixel in the work area on which the mask is applied toward the face center for each grid at the small face ratio set based on the face classification as described above for the entire face area. (S97) The small face processing is realized and the small face processing is terminated.

このように、画像中の人物の顔夫々の顔型の分類に応じて加工が行なわれるので、人物が動きのあるポーズをとる画像であっても、画像中の人物の顔を小顔に見せる加工を有効に行なうことができる。   As described above, since the processing is performed according to the face type classification of each face of the person in the image, even if the image is a pose in which the person moves, the face of the person in the image is shown as a small face. Processing can be performed effectively.

(実施の形態3)
実施の形態3では、実施の形態1又は2に示した画像処理に加え、画像に写る人物の顔の内の両目の領域を、両目が大きくなるように、且つ不自然に大きくなりすぎないように加工処理を行なう。
(Embodiment 3)
In the third embodiment, in addition to the image processing shown in the first or second embodiment, the area of both eyes in the face of the person appearing in the image is not enlarged so that both eyes become large and unnaturally large. Processing is performed.

実施の形態3における画像出力装置の構成は、解析処理の詳細、小顔処理の詳細以外は、ハードウェア構成及びソフトウェア的な処理手順も同様である。以下の説明では、実施の形態1又は2と共通する構成については同一の符号を付して詳細な説明を省略し、相違する処理手順について説明する。   The configuration of the image output apparatus according to the third embodiment is the same in hardware configuration and software processing procedure except for the details of analysis processing and the details of small face processing. In the following description, components that are the same as those in the first or second embodiment will be denoted by the same reference numerals, detailed description thereof will be omitted, and different processing procedures will be described.

図21は、実施の形態3における画像処理部7のCPU70により実行される解析処理の一例を示すフローチャートである。図21のフローチャートにて説明する処理手順の内、実施の形態1又は2にて示した図7又は図17のフローチャートの処理手順と共通する処理手順については、同一のステップ番号を付して詳細な説明を省略する。   FIG. 21 is a flowchart illustrating an example of analysis processing executed by the CPU 70 of the image processing unit 7 according to the third embodiment. Of the processing procedures described in the flowchart of FIG. 21, the same processing steps as those in the flowchart of FIG. 7 or 17 shown in the first or second embodiment are denoted by the same step numbers and detailed. The detailed explanation is omitted.

CPU70は、検出された顔の顔領域を選択し(S51)、顔中心を特定し(S52)、更に顔の輪郭を外側に拡大させた処理輪郭線を設定し(S53)、処理ベクトルを特定し(S54)、処理係数を決定し(S55)、顔分類を判別すると(S58)、次に、目の拡大率を算出する(ステップS59)。CPU70は、顔毎に算出される拡大率を各顔に対応付けて記憶しておき、後の小顔処理にて目の領域を拡大する際に用いる。その後は、CPU70は、作業領域を設定し(S56)、全ての顔領域について処理を行なったと判断するまで(S57:YES)、処理を繰り返す。   The CPU 70 selects the face area of the detected face (S51), specifies the center of the face (S52), sets a processing contour line that further expands the contour of the face (S53), and specifies a processing vector (S54), the processing coefficient is determined (S55), the face classification is determined (S58), and then the eye enlargement ratio is calculated (step S59). The CPU 70 stores the enlargement ratio calculated for each face in association with each face, and uses it when enlarging the eye area in the subsequent small face processing. Thereafter, the CPU 70 sets a work area (S56), and repeats the process until it is determined that all face areas have been processed (S57: YES).

目の拡大率の算出処理について詳細を説明する。図22は、実施の形態3における画像処理部7のCPU70により実行される目の拡大率の算出処理の一例を示すフローチャートである。図22のフローチャートに示す処理手順は、図21のフローチャートに示したステップS59の処理手順の詳細である。   Details of the eye enlargement rate calculation process will be described. FIG. 22 is a flowchart illustrating an example of an eye enlargement rate calculation process executed by the CPU 70 of the image processing unit 7 according to the third embodiment. The processing procedure shown in the flowchart of FIG. 22 is the details of the processing procedure of step S59 shown in the flowchart of FIG.

CPU70は、図6に示した画像処理中のステップS102にて抽出された顔領域の大きさ(画素数)を求める(ステップS9001)。具体的には例えば、CPU70は、顔検出処理によって得られた矩形の面積(図12参照)を、顔領域の面積として求める。また、顔領域の内、解析処理のS52にて特定される顔中心を通る顔の横方向の中央線よりも下部の面積としてもよいし、肌色部分を抽出し、抽出した領域の面積を、顔領域の面積として求めてもよい。   The CPU 70 obtains the size (number of pixels) of the face area extracted in step S102 during the image processing shown in FIG. 6 (step S9001). Specifically, for example, the CPU 70 obtains the area of the rectangle (see FIG. 12) obtained by the face detection process as the area of the face area. Moreover, it is good also as an area below the horizontal center line of the face passing through the face center specified in S52 of the analysis process in the face area, and extracting the skin color part, the area of the extracted area is You may obtain | require as an area of a face area | region.

CPU70は、ステップS9001で求めた顔領域の大きさに対する基準の目の大きさを求める(ステップS9002)。具体的には、CPU70は、ステップS9001で求めた面積に対する基準となる所定の比率によって、基準の大きさを面積として求める。   The CPU 70 obtains a reference eye size for the face region size obtained in step S9001 (step S9002). Specifically, the CPU 70 obtains the reference size as the area based on a predetermined ratio as a reference with respect to the area obtained in step S9001.

CPU70は、図6に示した画像処理中のステップS103にて特定された目の領域の大きさ(画素数)を求める(ステップS9003)。具体的には、CPU70は、特定された目の輪郭上の数点の座標情報、又は目の領域を覆う楕円形状の画像内における座標情報から、当該座標情報が示す輪郭内に含まれる領域の面積を求める。   The CPU 70 obtains the size (number of pixels) of the eye area specified in step S103 during the image processing shown in FIG. 6 (step S9003). Specifically, the CPU 70 determines, based on the coordinate information of several points on the identified eye contour, or the coordinate information in the elliptical image covering the eye region, the region included in the contour indicated by the coordinate information. Find the area.

CPU70は、ステップS9002で求めた基準の大きさと、ステップS9003で求めた目の領域の大きさとを比較する(ステップS9004)。CPU70は、ステップS9004における比較結果に応じて所定の数式に従って目の拡大率を算出する(ステップS9005)。ステップS9005の算出方法は例えば以下である。   The CPU 70 compares the reference size obtained in step S9002 with the eye region size obtained in step S9003 (step S9004). The CPU 70 calculates the magnification rate of the eyes according to a predetermined mathematical expression according to the comparison result in step S9004 (step S9005). The calculation method in step S9005 is, for example, as follows.

ステップS9002で求めた基準の大きさをA、ステップS9003で求めた被写体の人物の目の領域の大きさをBとする。ここで基準となる目の拡大率をE(例えば1.1=110%)、求める目の拡大率をeとすると、CPU70は、所定の数式として以下の式に従って拡大率を算出する。   Assume that the reference size obtained in step S9002 is A, and the size of the eye area of the subject person obtained in step S9003 is B. Here, assuming that the reference eye enlargement rate is E (for example, 1.1 = 110%) and the desired eye enlargement rate is e, the CPU 70 calculates the enlargement rate according to the following equation as a predetermined equation.

Figure 2010061646
Figure 2010061646

ただし、CPU70はステップS9005における算出処理にて、算出した拡大率eが1(100%)以上となるように、且つ拡大率eが自然な範囲に収まるか否かを判断し、係数αにて調整を行なう。なお、用いる数式は式(4)には限らない。以下の式(5)を用いて求めてもよい。   However, in the calculation process in step S9005, the CPU 70 determines whether the calculated enlargement ratio e is 1 (100%) or more and whether the enlargement ratio e falls within a natural range, and uses the coefficient α. Make adjustments. The mathematical formula used is not limited to the formula (4). You may obtain | require using the following formula | equation (5).

Figure 2010061646
Figure 2010061646

式(4)及び式(5)のいずれを用いた場合も、顔領域の大きさに対して目が基準の大きさよりも大きい顔については、目が大きくなりすぎることがないように、拡大率は1を下回らない条件下で小さく算出され、目が基準の大きさ以下である顔については拡大率が比較的大きな値となって効果的に目の領域を拡大できる。   Regardless of which of formula (4) and formula (5) is used, the enlargement ratio is set so that the eyes are larger than the reference size with respect to the size of the face area so that the eyes do not become too large. Is calculated to be small under a condition not less than 1, and for the face whose eyes are smaller than the reference size, the enlargement ratio becomes a relatively large value, and the eye area can be effectively enlarged.

CPU70はこれにより拡大率の算出処理を終了し、図21のフローチャートにおけるステップS56に処理を戻す。   Thus, the CPU 70 ends the enlargement ratio calculation process, and returns the process to step S56 in the flowchart of FIG.

図22のフローチャートに示した処理を、具体例を挙げて説明する。図23は、画像中で検出される顔領域から算出される目の大きさの例を示す説明図である。図23の説明図に示される画像中の3人の人物の内、右側の人物の顔の目の大きさが求められる場合を例に挙げる。図23には、実施の形態1の図12にて示した顔検出処理結果により得られる目の輪郭上の点を結んだ領域がハッチングにて示されている。CPU70は、図22のフローチャートに示したステップS9003にて、図23中のハッチングにて示したように目の領域の面積bを求める。   The process shown in the flowchart of FIG. 22 will be described with a specific example. FIG. 23 is an explanatory diagram showing an example of the eye size calculated from the face area detected in the image. An example will be described in which the size of the face of the right person among the three persons in the image shown in the explanatory diagram of FIG. 23 is obtained. In FIG. 23, a region connecting points on the outline of the eye obtained by the face detection processing result shown in FIG. 12 of the first embodiment is shown by hatching. In step S9003 shown in the flowchart of FIG. 22, the CPU 70 obtains the area b of the eye region as shown by hatching in FIG.

なお、上述のフローチャートの説明では、顔領域の大きさ及び目の領域の大きさは、面積として求めた。しかしながら本発明はこれに限らず、顔領域の大きさは、検出処理によって得られた矩形の横幅又は縦幅でもよい。この場合、図23に示すように、目の領域の大きさも特定された目の輪郭上の横幅b1又は縦幅b2を、目の領域の大きさとして求める。そして、CPU70は、横幅どうし又は縦幅どうしを用い、上述の式(4)により拡大率を求めてもよい。また、CPU70は、横幅b1と縦幅b2とを掛けて面積Bとして扱い、上述の式(4)により拡大率を求めてもよい。   In the above description of the flowchart, the size of the face region and the size of the eye region are obtained as areas. However, the present invention is not limited to this, and the size of the face area may be a rectangular horizontal width or vertical width obtained by the detection process. In this case, as shown in FIG. 23, the horizontal width b1 or the vertical width b2 on the eye contour in which the size of the eye region is specified is obtained as the size of the eye region. Then, the CPU 70 may use the horizontal widths or the vertical widths to obtain the enlargement ratio according to the above equation (4). Further, the CPU 70 may multiply the horizontal width b1 by the vertical width b2 and treat it as the area B, and obtain the enlargement ratio by the above-described equation (4).

また、上述のフローチャートの説明では、基準の目の大きさの算出、及び被写体の人物の顔領域から特定された目の領域の大きさの算出を、面積(例えば画素数)として求めるとした。求められる目の大きさはいずれも、ステップS9001にて算出される顔領域の大きさに対する比率(百分率)でもよい。このとき、基準の目の大きさは予め基準の比率が与えられているから、改めて算出するステップS9002は不要である。   Further, in the description of the flowchart described above, the calculation of the reference eye size and the calculation of the size of the eye area specified from the face area of the subject person are obtained as the area (for example, the number of pixels). Any of the required eye sizes may be a ratio (percentage) to the size of the face area calculated in step S9001. At this time, since a reference ratio is given in advance for the size of the reference eye, step S9002 for calculating again is unnecessary.

次に、求められた目の拡大率eを用いた小顔処理について説明する。図24は、実施の形態3における画像処理部7のCPU70により実行される小顔処理の一例を示すフローチャートである。なお、図24のフローチャートにて説明する処理手順の内、実施の形態1又は2にて示した図9又は図20のフローチャートの処理手順と共通する処理手順については、同一のステップ番号を付して詳細な説明を省略する。   Next, small face processing using the obtained eye enlargement ratio e will be described. FIG. 24 is a flowchart illustrating an example of small face processing executed by the CPU 70 of the image processing unit 7 according to the third embodiment. Of the processing procedures described in the flowchart of FIG. 24, the same processing steps as those in the flowchart of FIG. 9 or 20 shown in the first or second embodiment are denoted by the same step numbers. Detailed description is omitted.

CPU70は、全顔領域についてマスクを作成してぼかし処理を行ない(S91〜S94)、全顔領域について顔型の分類に基づき設定された小顔率を用いて顔領域のグリッド移動を行なう(S95〜S99)。CPU70は、再度、一の顔領域を選択し(ステップS910)、選択した顔領域から目の領域を抽出する(ステップS911)。抽出する目の領域は、図23に示すように特定された目の輪郭上の点で囲まれる領域でもよいし、特定された目の輪郭上の点を含む楕円形でもよい。そして、CPU70は、選択した顔の目の領域について算出してあった目の拡大率eに基づき、抽出した目の領域を拡大する(ステップS912)。   The CPU 70 creates a mask for the entire face area and performs blurring processing (S91 to S94), and performs a grid movement of the face area using the small face ratio set based on the face type classification for the entire face area (S95). ~ S99). The CPU 70 again selects one face area (step S910), and extracts an eye area from the selected face area (step S911). The eye region to be extracted may be a region surrounded by a point on the specified eye contour as shown in FIG. 23, or may be an ellipse including a point on the specified eye contour. Then, the CPU 70 enlarges the extracted eye region based on the eye enlargement rate e calculated for the eye region of the selected face (step S912).

CPU70は、全顔領域についてステップS911及びS912の処理の目の領域の拡大処理を行なったか否かを判断し(ステップS913)、全顔領域について処理を行なっていないと判断した場合(S913:NO)、処理をステップS910へ戻す。CPU70は、全顔領域について処理を行なったと判断した場合(S913:YES)、小顔処理を終了する。   The CPU 70 determines whether or not the eye area enlargement process of steps S911 and S912 has been performed for the entire face area (step S913), and when it is determined that the process has not been performed for the entire face area (S913: NO) ), The process returns to step S910. When the CPU 70 determines that the process has been performed on the entire face area (S913: YES), the small face process is terminated.

CPU70は、この後の加工画像作成処理においては、元の画像の上に、拡大した目の領域の画像と、小顔処理後の作業領域内の画像とを重ねるようにして描画させる。このとき、マスク処理をしてある作業領域内の画像を最も上に重ねるようにしてもよいし、目の領域の境界のぼかし処理をしておき、当該目の領域の画像を最も上に重ねるようにしてもよい。   In the subsequent processed image creation process, the CPU 70 draws an image of the enlarged eye area and an image in the work area after the small face process on the original image. At this time, the image in the work area where the mask process is performed may be superimposed on the top, or the boundary of the eye area is blurred, and the image of the eye area is superimposed on the top. You may do it.

このように、各顔領域に対する基準の目の大きさを用い、被写体として写る人物の個別の顔の特性に応じて、適切に目の大きさを拡大することができる。つまり、画像中の顔領域に対して個別に、夫々の顔の大きさに対する大きさにて拡大率が調整されるから、奥に写る人物と、手前に写る人物とで両目の領域の拡大を適切に調節できる。プリクラのように複数の人物が動きのあるポーズをとり、前後に重なって写る場合が少なくないときには、同一の拡大率を一律に用いて目の領域を拡大するとした場合には後ろ(奥に)写る人物の目が不自然に大きく拡大されるなどの問題が生じる可能性がある。しかしながら、本実施の形態3における画像処理部7の処理により、上述のように個別に適切な拡大が可能であるから、ユーザが満足する画像を得られる。   In this way, using the reference eye size for each face region, the eye size can be appropriately enlarged according to the characteristics of the individual face of the person captured as the subject. In other words, since the enlargement ratio is adjusted individually for the face area in the image with the size of each face size, enlargement of the area of both eyes with the person in the back and the person in the foreground is performed. It can be adjusted appropriately. When there are many cases where multiple people pose a moving pose like a photo booth and overlap each other in front and back, if the same enlargement factor is used to enlarge the eye area, it is behind (in the back) There is a possibility that problems such as unnaturally large enlargement of the human eyes appearing in the image. However, since the image processing unit 7 according to the third embodiment can perform appropriate enlargement individually as described above, an image that satisfies the user can be obtained.

また、写体として写る人物の顔における目の大きさに応じて個別に、目の拡大率が調整されるから、一律の割合で拡大するよりも、異なる特性の顔に応じて両目の領域を拡大して小顔に見せる加工を有効に行なうことができる。つまり、画像中の目が大きい顔の人物の目が更に大きくなり過ぎる事態、又は、目が小さい顔の人物の目の拡大が不足する事態を避け、異なる特性の顔を有するユーザが共に動きのあるポーズをとって写る場合であっても、各ユーザが満足する画像を得られる。   In addition, since the magnification rate of the eyes is adjusted individually according to the size of the eyes of the person's face as a subject, rather than enlarging at a uniform rate, the areas of both eyes are matched according to faces with different characteristics. It is possible to effectively perform processing that enlarges and shows a small face. In other words, avoid the situation where the eyes of a person with a large face in the image become too large, or the expansion of the eyes of a person with a face with a small eye is insufficient. Even when a certain pose is taken, an image that satisfies each user can be obtained.

実施の形態1乃至3では、画像処理部7の小顔処理において描画を、グラフィックボード73を用いてハードウェア的に実現した。画像処理部7はグラフィックボード73を有さずに、CPU70により描画処理をソフトウェア的に実行する構成としてもよい。   In the first to third embodiments, drawing is realized in hardware using the graphic board 73 in the small face processing of the image processing unit 7. The image processing unit 7 may have a configuration in which the CPU 70 performs the drawing process by software without using the graphic board 73.

実施の形態1乃至3では、画像処理部7は画像出力装置に含まれる一構成部であった。本発明はこれに限らず、画像処理部7が、加工処理対象として読み込まれた画像に対して人物の顔を加工する一の画像処理装置として単独に動作するものであってもよい。また、画像処理部7による画像処理の対象は、プリクラにおける画像のみならず、人物を写した画像に対する画像処理に広く適用可能である。   In the first to third embodiments, the image processing unit 7 is a component included in the image output apparatus. The present invention is not limited to this, and the image processing unit 7 may operate independently as one image processing apparatus that processes a person's face with respect to an image read as a processing target. Further, the target of image processing by the image processing unit 7 can be widely applied not only to images in the photo booth but also to image processing for an image of a person.

上述のように、本発明の範囲は本実施の形態に限定されるものではないことは勿論である。   Of course, as described above, the scope of the present invention is not limited to this embodiment.

2 撮影部
21 カメラ
5 印刷部
50 プリンタ
6 制御部
60 CPU
7 画像処理部
70 CPU
72 HDD
7P 画像処理プログラム
2 photographing unit 21 camera 5 printing unit 50 printer 6 control unit 60 CPU
7 Image processing unit 70 CPU
72 HDD
7P image processing program

Claims (9)

画像中の人物の顔を検出する検出手段と、検出した顔を加工する加工手段とを備える画像処理装置において、
前記検出手段が検出した顔の輪郭に基づき加工処理範囲の境界を特定する処理境界線を設定する処理境界設定手段と、
顔の輪郭を含む所定範囲を顔領域として画像から抽出する手段と、
前記処理境界設定手段が設定した処理境界線について、他の顔の処理境界線との間の画像内における距離が所定値以下であるか否かを判断する判断手段と、
距離が所定値以下と判断された処理境界線に対応する顔の顔領域を加工対象から除外する手段と
を備えることを特徴とする画像処理装置。
In an image processing apparatus comprising a detecting means for detecting a human face in an image and a processing means for processing the detected face,
Processing boundary setting means for setting a processing boundary line that identifies a boundary of the processing range based on the face contour detected by the detection means;
Means for extracting a predetermined range including the outline of the face from the image as a face area;
A determination unit that determines whether or not a distance in the image between the processing boundary line set by the processing boundary setting unit and the processing boundary line of another face is equal to or less than a predetermined value;
An image processing apparatus comprising: means for excluding a face area of a face corresponding to a processing boundary line whose distance is determined to be equal to or less than a predetermined value from a processing target.
前記処理境界設定手段は、
前記検出手段が検出した顔の輪郭線を抽出する手段を備え、
抽出した輪郭線よりも外側を処理境界線として設定するようにしてあること
を特徴とする請求項1に記載の画像処理装置。
The processing boundary setting means includes
Means for extracting a face outline detected by the detection means;
The image processing apparatus according to claim 1, wherein an outside of the extracted contour line is set as a processing boundary line.
前記検出手段が検出した顔の目、鼻又は口の各領域を特定する手段と、
特定した各領域の位置に基づいて顔中心を特定する手段と
を備え、
前記加工手段は、
顔領域内で特定された顔中心へ向け、処理境界線内の領域の画像を縦横夫々所定の比率にて収縮させるようにしてあること
を特徴とする請求項1又は2に記載の画像処理装置。
Means for specifying each area of the face eye, nose or mouth detected by the detection means;
Means for identifying the center of the face based on the position of each identified area,
The processing means includes
The image processing apparatus according to claim 1, wherein an image in an area within the processing boundary line is contracted at a predetermined ratio in each of the vertical and horizontal directions toward the face center specified in the face area. .
特定した目、鼻又は口の各領域の内、両目の領域を結ぶ第1直線、及び、鼻の領域又は口の領域の中心を顔に対し縦方向に通る第2直線を特定する手段と、
第1直線及び第2直線の交点から、第1直線が顔の輪郭と交わる2つの交点までの長さを夫々特定する手段と、
第1直線及び第2直線の交点から、第2直線が顔の下部で顔の輪郭と交わる交点までの長さを特定する手段と、
特定された夫々の長さに基づき、撮像画像に写っている人物の顔の型を分類する手段と、
分類した型に応じて、縦横の収縮率を夫々調整するための前記所定の比率に対する係数を決定する手段と
を更に備えることを特徴とする請求項3に記載の画像処理装置。
Means for identifying a first straight line connecting the areas of both eyes of each of the identified eye, nose or mouth areas, and a second straight line passing through the center of the nose area or mouth area in a longitudinal direction with respect to the face;
Means for specifying the length from the intersection of the first straight line and the second straight line to the two intersections where the first straight line intersects the face contour;
Means for specifying the length from the intersection of the first straight line and the second straight line to the intersection at which the second straight line intersects the face contour at the bottom of the face;
Means for classifying the face type of the person shown in the captured image based on each identified length;
4. The image processing apparatus according to claim 3, further comprising: a unit that determines a coefficient for the predetermined ratio for adjusting the vertical and horizontal contraction rates according to the classified types. 5.
前記加工手段は、顔領域内であって更に処理境界線内の領域の画像を、両目の領域を除いて収縮させるようにしてあること
を特徴とする請求項3又は4に記載の画像処理装置。
5. The image processing apparatus according to claim 3, wherein the processing unit is configured to shrink an image of a region within the face region and further within the processing boundary line except for a region of both eyes. .
特定した目の領域の、顔領域に対する大きさを求める手段と、
求めた大きさと予め与えられた基準の大きさとを比較する手段と、
比較結果に応じた目の大きさの拡大率を算出する手段と
を備え、
前記加工手段は、算出した拡大率に基づき、前記特定した両目の領域の画像を拡大させるようにしてあること
を特徴とする請求項3乃至5のいずれかに記載の画像処理装置。
Means for determining the size of the identified eye area relative to the face area;
Means for comparing the determined size with a predetermined reference size;
Means for calculating an enlargement ratio of the eye size according to the comparison result,
The image processing apparatus according to any one of claims 3 to 5, wherein the processing unit is configured to enlarge an image of the specified region of both eyes based on the calculated enlargement ratio.
撮像手段と、該撮像手段から得られる撮像画像を他の画像と合成する合成手段と、合成された画像を所定の媒体に出力する手段とを備える画像出力装置において、
撮像画像中の人物の顔を検出し、検出した顔に加工を行なう画像処理手段を更に備え、
該画像処理手段は、
検出した顔の輪郭に基づき加工処理範囲の境界を特定する処理境界線を設定する処理境界設定手段と、
顔の輪郭を含む所定範囲を顔領域として画像から抽出する手段と、
前記処理境界設定手段が設定した処理境界線について、他の顔の処理境界線との間の画像内における距離が所定値以下であるか否かを判断する判断手段と、
距離が所定値以下と判断された処理境界線に対応する顔の顔領域を加工対象から除外する手段と
を備えることを特徴とする画像出力装置。
An image output apparatus comprising: an imaging unit; a combining unit that combines a captured image obtained from the imaging unit with another image; and a unit that outputs the combined image to a predetermined medium.
Image processing means for detecting a human face in the captured image and processing the detected face;
The image processing means includes:
Processing boundary setting means for setting a processing boundary line for specifying a boundary of the processing range based on the detected face contour;
Means for extracting a predetermined range including the outline of the face from the image as a face area;
A determination unit that determines whether or not a distance in the image between the processing boundary line set by the processing boundary setting unit and the processing boundary line of another face is equal to or less than a predetermined value;
An image output apparatus comprising: means for excluding a face area of a face corresponding to a processing boundary line whose distance is determined to be equal to or less than a predetermined value from a processing target.
画像中の人物の顔を検出し、検出した顔を加工する画像処理方法において、
検出された顔の輪郭に基づき加工処理範囲の境界を特定する処理境界線を設定し、
顔の輪郭を含む所定範囲を顔領域として画像から抽出し、
設定した処理境界線について、他の顔の処理境界線との間の画像内における距離が所定値以下であるか否かを判断し、
距離が所定値以下と判断された処理境界線に対応する顔の顔領域を加工対象から除外する
ことを特徴とする画像処理方法。
In an image processing method for detecting a human face in an image and processing the detected face,
Set the processing boundary line that identifies the boundary of the processing range based on the detected face contour,
A predetermined range including the face outline is extracted from the image as a face area,
For the set processing boundary line, determine whether the distance in the image between the processing boundary lines of other faces is equal to or less than a predetermined value,
An image processing method comprising: excluding a face area of a face corresponding to a processing boundary line whose distance is determined to be equal to or less than a predetermined value from a processing target.
コンピュータに、画像に写る人物の顔を検出させ、検出された顔を加工させるコンピュータプログラムにおいて、
検出された顔の輪郭に基づき加工処理範囲の境界を特定する処理境界線を設定するステップ、
顔の輪郭を含む所定範囲を顔領域として画像から抽出するステップ、
設定された処理境界線について、他の顔の処理境界線との間の画像内における距離が所定値以下であるか否かを判断するステップ、及び、
所定値以下であると判断された処理境界線に対応する顔の顔領域を加工対象から除外するステップ
を実行させることを特徴とするコンピュータプログラム。
In a computer program that causes a computer to detect the face of a person in an image and process the detected face,
Setting a processing boundary line that identifies the boundary of the processing range based on the detected face contour;
Extracting a predetermined range including a face outline from the image as a face area;
Determining whether the distance in the image between the processing boundary line of the other face and the processing boundary line of the other face is equal to or less than a predetermined value; and
A computer program for executing a step of excluding a face area of a face corresponding to a processing boundary determined to be equal to or less than a predetermined value from a processing target.
JP2009174681A 2008-08-08 2009-07-27 Image processing apparatus, image output apparatus, image processing method, and computer program Active JP5229910B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009174681A JP5229910B2 (en) 2008-08-08 2009-07-27 Image processing apparatus, image output apparatus, image processing method, and computer program

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2008206092 2008-08-08
JP2008206092 2008-08-08
JP2009174681A JP5229910B2 (en) 2008-08-08 2009-07-27 Image processing apparatus, image output apparatus, image processing method, and computer program

Related Child Applications (2)

Application Number Title Priority Date Filing Date
JP2013052221A Division JP5298357B2 (en) 2008-08-08 2013-03-14 Image processing apparatus, image processing method, and computer program
JP2013052220A Division JP5360450B2 (en) 2008-08-08 2013-03-14 Image processing apparatus, image processing method, and computer program

Publications (2)

Publication Number Publication Date
JP2010061646A true JP2010061646A (en) 2010-03-18
JP5229910B2 JP5229910B2 (en) 2013-07-03

Family

ID=42188323

Family Applications (3)

Application Number Title Priority Date Filing Date
JP2009174681A Active JP5229910B2 (en) 2008-08-08 2009-07-27 Image processing apparatus, image output apparatus, image processing method, and computer program
JP2013052221A Active JP5298357B2 (en) 2008-08-08 2013-03-14 Image processing apparatus, image processing method, and computer program
JP2013052220A Active JP5360450B2 (en) 2008-08-08 2013-03-14 Image processing apparatus, image processing method, and computer program

Family Applications After (2)

Application Number Title Priority Date Filing Date
JP2013052221A Active JP5298357B2 (en) 2008-08-08 2013-03-14 Image processing apparatus, image processing method, and computer program
JP2013052220A Active JP5360450B2 (en) 2008-08-08 2013-03-14 Image processing apparatus, image processing method, and computer program

Country Status (1)

Country Link
JP (3) JP5229910B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012142772A (en) * 2010-12-28 2012-07-26 Furyu Kk Image processing system and image processing method
JP2016127419A (en) * 2014-12-26 2016-07-11 カシオ計算機株式会社 Image correction device, image correction method, and program
CN107734251A (en) * 2017-09-29 2018-02-23 维沃移动通信有限公司 A kind of photographic method and mobile terminal
JP2021518023A (en) * 2019-01-18 2021-07-29 ベイジン センスタイム テクノロジー デベロップメント カンパニー, リミテッド Image processing methods and devices, image devices and storage media

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014128946A (en) * 2012-12-28 2014-07-10 Sinfonia Technology Co Ltd Thermal printer and sticker printing device using thermal printer
JP6375755B2 (en) * 2014-07-10 2018-08-22 フリュー株式会社 Photo sticker creation apparatus and display method
JP6311372B2 (en) * 2014-03-13 2018-04-18 オムロン株式会社 Image processing apparatus and image processing method
CN105611172B (en) * 2016-02-25 2018-08-07 北京小米移动软件有限公司 The reminding method and device that countdown is taken pictures
US11100615B2 (en) 2018-06-15 2021-08-24 Casio Computer Co., Ltd. Image processing device, image processing method, and image processing program
WO2023132076A1 (en) * 2022-01-07 2023-07-13 富士通株式会社 Image processing device, image processing method, and image processing program

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004318204A (en) * 2003-04-10 2004-11-11 Sony Corp Image processing device, image processing method, and photographing device
JP2006019930A (en) * 2004-06-30 2006-01-19 Canon Inc Image processor and processing method
WO2006090671A1 (en) * 2005-02-23 2006-08-31 Matsushita Electric Works, Ltd. Method of inspecting granular material and inspection device for conducting that method
JP2006268352A (en) * 2005-03-23 2006-10-05 Canon Inc Image processing apparatus and its method
JP2008282205A (en) * 2007-05-10 2008-11-20 Seiko Epson Corp Image processor and image processing method

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000354517A (en) * 1999-06-15 2000-12-26 Kao Corp Method for creating face image
JP2001209817A (en) * 2000-01-27 2001-08-03 Fujimikku:Kk Method and device for correcting face image
JP2003030402A (en) * 2001-07-11 2003-01-31 Megane Center:Kk System for collecting glasses marketing information
JP2003030296A (en) * 2001-07-16 2003-01-31 Nikon Gijutsu Kobo:Kk System for temporarily putting on glasses
JP4142918B2 (en) * 2002-08-23 2008-09-03 株式会社メイクソフトウェア Image editing method, image editing apparatus, and computer program
JP2004246673A (en) * 2003-02-14 2004-09-02 Fuji Photo Film Co Ltd Face image processing device and system
JP2004259034A (en) * 2003-02-26 2004-09-16 Atsushi Umoto Image correction system, image correction method, and counselling providing server
JP2004318205A (en) * 2003-04-10 2004-11-11 Sony Corp Image processing device, image processing method, and photographing device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004318204A (en) * 2003-04-10 2004-11-11 Sony Corp Image processing device, image processing method, and photographing device
JP2006019930A (en) * 2004-06-30 2006-01-19 Canon Inc Image processor and processing method
WO2006090671A1 (en) * 2005-02-23 2006-08-31 Matsushita Electric Works, Ltd. Method of inspecting granular material and inspection device for conducting that method
JP2006268352A (en) * 2005-03-23 2006-10-05 Canon Inc Image processing apparatus and its method
JP2008282205A (en) * 2007-05-10 2008-11-20 Seiko Epson Corp Image processor and image processing method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012142772A (en) * 2010-12-28 2012-07-26 Furyu Kk Image processing system and image processing method
JP2016127419A (en) * 2014-12-26 2016-07-11 カシオ計算機株式会社 Image correction device, image correction method, and program
CN107734251A (en) * 2017-09-29 2018-02-23 维沃移动通信有限公司 A kind of photographic method and mobile terminal
JP2021518023A (en) * 2019-01-18 2021-07-29 ベイジン センスタイム テクノロジー デベロップメント カンパニー, リミテッド Image processing methods and devices, image devices and storage media
JP7109585B2 (en) 2019-01-18 2022-07-29 ベイジン・センスタイム・テクノロジー・デベロップメント・カンパニー・リミテッド Image processing method and apparatus, image device and storage medium
US11538207B2 (en) 2019-01-18 2022-12-27 Beijing Sensetime Technology Development Co., Ltd. Image processing method and apparatus, image device, and storage medium

Also Published As

Publication number Publication date
JP5229910B2 (en) 2013-07-03
JP5360450B2 (en) 2013-12-04
JP5298357B2 (en) 2013-09-25
JP2013109788A (en) 2013-06-06
JP2013109787A (en) 2013-06-06

Similar Documents

Publication Publication Date Title
JP5360450B2 (en) Image processing apparatus, image processing method, and computer program
US7623733B2 (en) Image combination device, image combination method, image combination program, and recording medium for combining images having at least partially same background
JP2007240887A (en) Automatic photographing device and method thereof
JP3983624B2 (en) Image composition apparatus, image composition method, image composition program, and recording medium on which image composition program is recorded
JP5472767B2 (en) Image processing apparatus and image processing method
JP2017147621A (en) Image processing apparatus, image processing method and computer program
JP5555924B2 (en) Shooting game machine, shooting game machine control method, and computer program
JP5239318B2 (en) Photo sticker making method and photo sticker making device
JP3983623B2 (en) Image composition apparatus, image composition method, image composition program, and recording medium on which image composition program is recorded
JP3859693B1 (en) Automatic photography apparatus and method
JP5212461B2 (en) Image processing apparatus and image processing method
JP6685094B2 (en) Image processing apparatus, image processing method, and computer program
JP5854333B2 (en) Image output device
JP5998344B2 (en) Shooting game machine, shooting game machine control method, and computer program
JP6124087B2 (en) Image editing apparatus and image editing method
JP6646202B2 (en) Photo sticker making device and display method
JP2018106678A (en) Sticker making game machine and image processing method
JP6671015B2 (en) Photo sticker making apparatus and image processing method
JP6041024B1 (en) Photo sticker creation apparatus and display method
JP2018064220A (en) Photograph preparation game machine and display method
JP2016208486A (en) Photo seal producing apparatus and display method
JP5805903B1 (en) Photo sticker creation apparatus and display method
JP2023013787A (en) Image processing device, image processing method, and program
JP5776031B2 (en) Image processing apparatus, image processing method, and computer program
JP2015037311A (en) Imaging apparatus and display control method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120608

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130131

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130314

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

Free format text: PAYMENT UNTIL: 20160329

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5229910

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313114

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R371 Transfer withdrawn

Free format text: JAPANESE INTERMEDIATE CODE: R371

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313114

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250