JP2008203960A - Image processor, its control method, program, and printer - Google Patents

Image processor, its control method, program, and printer Download PDF

Info

Publication number
JP2008203960A
JP2008203960A JP2007036372A JP2007036372A JP2008203960A JP 2008203960 A JP2008203960 A JP 2008203960A JP 2007036372 A JP2007036372 A JP 2007036372A JP 2007036372 A JP2007036372 A JP 2007036372A JP 2008203960 A JP2008203960 A JP 2008203960A
Authority
JP
Japan
Prior art keywords
face
image
predetermined
face area
decoration image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2007036372A
Other languages
Japanese (ja)
Inventor
Shinji Hata
新治 秦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2007036372A priority Critical patent/JP2008203960A/en
Publication of JP2008203960A publication Critical patent/JP2008203960A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)
  • Processing Or Creating Images (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reduce user's operations so as to rearrange decorative images related to a face area. <P>SOLUTION: A control method of an image processor detects a face area in a picture image by face recognition processing (Step S130); and arranges decorative images related to a face at prescribed relative positions with the detected face area as a reference (Step S190). Thereby, by fixing relative positions at which the decorative images related to the face at appropriate positions, since the decorative images related to the face may be arranged at appropriate positions in the face area, the user's operations so as to rearrange the decorative images may be reduced as compared with arranging the decorative images at fixed positions set so that the decorative images are irrelevant to the face area. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、画像処理装置、その制御方法、プログラム及び印刷装置に関する。   The present invention relates to an image processing apparatus, a control method therefor, a program, and a printing apparatus.

従来、画像データに飾り付け画像を合成する方法が知られている。例えば、特許文献1に記載された複写装置では、原稿の画像データのうちユーザが指定する位置に、記憶媒体に保持されている飾り付け画像を合成し、新たな画像イメージを作成して印刷する。こうすることにより、他の機材に接続することなく、複写原稿に容易に画像を合成することができる。
特開平9−139832
Conventionally, a method of synthesizing a decoration image with image data is known. For example, in the copying apparatus described in Patent Document 1, a decoration image held in a storage medium is synthesized at a position specified by a user in image data of a document, and a new image image is created and printed. In this way, it is possible to easily synthesize an image on a copy document without connecting to other equipment.
JP-A-9-139832

ところで、画像データに人物の顔が含まれているときには、吹き出しや涙マークなど人物の顔に関連する飾り付け画像を合成することが考えられる。   By the way, when a person's face is included in the image data, it is conceivable to synthesize a decoration image related to the person's face such as a balloon or a tear mark.

しかしながら、特許文献1に記載された複写装置では、飾り付け画像を画像データに合成するとき、合成する位置をユーザが毎回指定しなければならず、ユーザの手間がかかるという問題点があった。   However, the copying apparatus described in Patent Document 1 has a problem in that when a decorative image is combined with image data, the user has to specify the position to be combined each time, which is troublesome for the user.

本発明は、このような課題に鑑みなされたものであり、顔に関する飾り付け画像を配置し直すというユーザの操作を減らすことができる画像処理装置、その制御方法及びその制御プログラムを提供することを目的の一つとする。また、そのような画像処理装置を備えた印刷装置を提供することを目的の一つとする。   The present invention has been made in view of such a problem, and an object of the present invention is to provide an image processing apparatus, a control method thereof, and a control program thereof that can reduce a user's operation of rearranging a decorative image related to a face. One of them. Another object is to provide a printing apparatus provided with such an image processing apparatus.

本発明は、上述の目的の少なくとも一つを達成するために以下の手段を採った。   The present invention adopts the following means in order to achieve at least one of the above objects.

本発明の画像処理装置は、
各種画像を表示可能な画像表示手段と、
顔に関する飾り付け画像である顔飾り付け画像を記憶する顔飾り付け画像記憶手段と、
顔領域に対する顔飾り付け画像の相対位置を定めた相対位置情報を記憶する相対位置情報記憶手段と、
所定の写真画像の顔領域を検出する顔領域検出手段と、
前記顔領域検出手段によって前記所定の写真画像の顔領域が検出され且つ前記顔飾り付け画像記憶手段から所定の顔飾り付け画像が読み込まれたとき、該所定の顔飾り付け画像の相対位置情報を前記相対位置情報記憶手段から読み込み、前記相対位置情報と前記所定の写真画像の顔領域の絶対位置とに基づいて、前記所定の写真画像における該所定の顔飾り付け画像の表示位置を決定し、該表示位置に該所定の顔飾り付け画像が表示されるよう前記画像表示手段を制御する制御手段と、
を備えたものである。
The image processing apparatus of the present invention
Image display means capable of displaying various images;
Face decoration image storage means for storing a face decoration image which is a decoration image related to the face;
Relative position information storage means for storing relative position information defining a relative position of the face decoration image with respect to the face area;
Face area detecting means for detecting a face area of a predetermined photographic image;
When the face area of the predetermined photographic image is detected by the face area detection means and the predetermined face decoration image is read from the face decoration image storage means, the relative position information of the predetermined face decoration image is obtained as the relative position. Reading from the information storage means, based on the relative position information and the absolute position of the face area of the predetermined photographic image, to determine the display position of the predetermined face decoration image in the predetermined photographic image, Control means for controlling the image display means so that the predetermined face decoration image is displayed;
It is equipped with.

この画像処理装置では、顔領域検出手段によって所定の写真画像の顔領域が検出され且つ顔飾り付け画像記憶手段から所定の顔飾り付け画像が読み込まれたとき、所定の顔飾り付け画像の相対位置情報を相対位置情報記憶手段から読み込み、相対位置情報と所定の写真画像の顔領域の絶対位置とに基づいて、所定の写真画像における所定の顔飾り付け画像の表示位置を決定し、表示位置に所定の顔飾り付け画像を表示する。このように、写真画像のどこに顔領域が存在していても、その顔領域に対する顔飾り付け画像の位置は予め定められた相対位置情報に基づいて決定されるため、予め顔領域に対する顔飾り付け画像の相対位置を適切な位置に定め、この相対位置を相対位置情報として相対位置情報記憶手段に記憶しておけば、顔飾り付け画像は顔領域に対して適切な位置に配置されることになる。したがって、顔飾り付け画像を顔領域とは無関係に定めた固定位置に配置する場合に比べて、顔飾り付け画像を配置し直すというユーザの操作を減らすことができる。   In this image processing apparatus, when the face area of the predetermined photographic image is detected by the face area detection unit and the predetermined face decoration image is read from the face decoration image storage unit, the relative position information of the predetermined face decoration image is relative. Read from the position information storage means, determine the display position of the predetermined face decoration image in the predetermined photo image based on the relative position information and the absolute position of the face area of the predetermined photo image, and determine the predetermined face decoration at the display position Display an image. Thus, no matter where the face area exists in the photographic image, the position of the face decoration image with respect to the face area is determined based on the predetermined relative position information. If the relative position is set to an appropriate position and this relative position is stored as relative position information in the relative position information storage means, the face decoration image is arranged at an appropriate position with respect to the face area. Therefore, the user's operation of rearranging the face decoration image can be reduced as compared with the case where the face decoration image is arranged at a fixed position determined independently of the face area.

本発明の画像処理装置は、前記顔領域検出手段で検出された前記所定の写真画像の顔領域の前記写真画像の所定方向に対する傾き角度を算出する顔傾き角度算出手段を備え、前記制御手段は、前記顔領域検出手段によって前記所定の写真画像の顔領域が検出され且つ前記顔飾り付け画像記憶手段から所定の顔飾り付け画像が読み込まれたとき、該所定の顔飾り付け画像の相対位置情報を前記相対位置情報記憶手段から読み込み、前記所定の写真画像の顔領域の傾き角度に基づいて該所定の顔飾り付け画像を回転させると共に、前記相対位置情報と前記所定の写真画像の顔領域の絶対位置とに基づいて前記所定の写真画像における該所定の顔飾り付け画像の表示位置を決定し、該表示位置に該所定の顔飾り付け画像が表示されるよう前記画像表示手段を制御するものとしてもよい。こうすることで、写真画像の顔領域の傾き角度に応じて顔飾り付け画像を回転し直すというユーザの操作を減らすことができる。なお、ここで「所定方向に対する傾き角度」とは、何らかの基準方向に対して定めた傾き角度であり、例えば、天地方向に対する傾き角度であってもよく、水平方向に対する傾き角度であってもよい。なお、顔飾り付け画像を回転させる方法とは、例えば、顔傾き角度算出手段で算出した顔傾き角度と同じ角度だけ回転させる方法であってもよく、顔傾き角度算出手段で算出した傾き角度に所定の値を加えた角度だけ回転させる方法であってもよい。   The image processing apparatus of the present invention comprises a face inclination angle calculating means for calculating an inclination angle of the face area of the predetermined photographic image detected by the face area detecting means with respect to a predetermined direction of the photographic image, and the control means When the face area of the predetermined photographic image is detected by the face area detection means and the predetermined face decoration image is read from the face decoration image storage means, the relative position information of the predetermined face decoration image is obtained as the relative position information. Read from the position information storage means, rotate the predetermined face decoration image based on the inclination angle of the face area of the predetermined photographic image, and to the relative position information and the absolute position of the face area of the predetermined photographic image And determining the display position of the predetermined face decoration image in the predetermined photographic image based on the image table so that the predetermined face decoration image is displayed at the display position. It may be controlled means. By doing so, the user's operation of rotating the face decoration image again according to the inclination angle of the face area of the photographic image can be reduced. Here, the “inclination angle with respect to a predetermined direction” is an inclination angle determined with respect to some reference direction, and may be, for example, an inclination angle with respect to the vertical direction or an inclination angle with respect to the horizontal direction. . Note that the method of rotating the face decoration image may be, for example, a method of rotating the face decoration angle by the same angle as the face inclination angle calculated by the face inclination angle calculation means. It may be a method of rotating by an angle obtained by adding the value of.

本発明の画像処理装置は、前記所定の写真画像の顔領域の大きさを算出する顔領域面積算出手段を備え、前記制御手段は、前記顔領域検出手段によって前記所定の写真画像の顔領域が検出され且つ前記顔飾り付け画像記憶手段から所定の顔飾り付け画像が読み込まれたとき、該所定の顔飾り付け画像の相対位置情報を前記相対位置情報記憶手段から読み込み、前記所定の写真画像の顔領域の大きさに基づいて該所定の顔飾り付け画像を表示する大きさを決定すると共に、前記相対位置情報と前記所定の写真画像の顔領域の絶対位置とに基づいて前記所定の写真画像における該所定の顔飾り付け画像の表示位置を決定し、前記表示位置に該所定の顔飾り付け画像が表示されるよう前記画像表示手段を制御するものであってもよい。こうすれば、写真画像の顔領域の大きさに応じて顔飾り付け画像の大きさを変更し直すというユーザの操作を減らすことができる。なお、所定の写真の顔領域の大きさに基づいて所定の顔飾り付け画像を表示する方法とは、例えば、顔領域が大きいときには顔飾り付け画像を大きく表示する方法であってもよく、顔領域が小さいときには、顔飾り付け画像を小さく表示する方法であってもよい。   The image processing apparatus of the present invention comprises a face area area calculating means for calculating the size of the face area of the predetermined photographic image, and the control means detects the face area of the predetermined photographic image by the face area detecting means. When the detected face decoration image is read from the face decoration image storage means, the relative position information of the predetermined face decoration image is read from the relative position information storage means, and the face area of the predetermined photographic image is read. A size for displaying the predetermined face decoration image is determined based on the size, and the predetermined image image in the predetermined photographic image is determined based on the relative position information and the absolute position of the face area of the predetermined photographic image. The display position of the face decoration image may be determined, and the image display unit may be controlled so that the predetermined face decoration image is displayed at the display position. In this way, the user's operation of changing the size of the face decoration image according to the size of the face area of the photographic image can be reduced. The method for displaying the predetermined face decoration image based on the size of the face area of the predetermined photo may be, for example, a method of displaying the face decoration image large when the face area is large. When it is small, a method of displaying a face decoration image small may be used.

本発明の画像処理装置は、前記顔領域検出手段で検出された前記顔領域の数をカウントする顔領域数カウント手段を備え、前記制御手段は、前記顔領域検出手段によって前記所定の写真画像の顔領域が検出され且つ前記顔飾り付け画像記憶手段から所定の顔飾り付け画像が読み込まれたのち、前記顔領域数カウント手段によって前記顔領域の数が2以上カウントされたとき、該所定の顔飾り付け画像の相対位置情報を前記相対位置情報記憶手段から読み込み、前記相対位置情報と前記所定の写真画像の2以上の顔領域の中から所定の規則に従って定めた顔領域の前記絶対位置とに基づいて前記所定の写真画像における該所定の顔飾り付け画像の表示位置を決定し、前記表示位置に該所定の顔飾り付け画像が表示されるよう前記画像表示手段を制御するものであってもよい。こうすれば、写真画像中に複数の顔領域があるときでも、そのうちの1つの顔領域を選定し、その顔領域に顔飾り付け画像を付けるため、選定された顔領域とユーザが顔飾り付け画像を付けたいと思っていた顔領域とが一致していれば、顔飾り付け画像を配置し直すというユーザの操作を減らすことができる。なお、ここで「所定の規則」とは、検出された顔領域の1つを選定可能な規則であり、例えば、検出された顔領域のうち最も顔領域が広いものに選定するという規則であってもよく、検出された顔領域のうち写真画像の中心位置に最も近いものに選定するという規則であってもよい。   The image processing apparatus of the present invention comprises a face area number counting means for counting the number of the face areas detected by the face area detecting means, and the control means is configured to detect the predetermined photographic image by the face area detecting means. After a face area is detected and a predetermined face decoration image is read from the face decoration image storage means, when the number of face areas is counted by two or more by the face area number counting means, the predetermined face decoration image The relative position information is read from the relative position information storage means, and based on the relative position information and the absolute position of the face area determined according to a predetermined rule from two or more face areas of the predetermined photographic image. A display position of the predetermined face decoration image in a predetermined photographic image is determined, and the image display means is configured to display the predetermined face decoration image at the display position. Gosuru may be one. In this way, even when there are a plurality of face areas in the photographic image, one of the face areas is selected, and a face decoration image is attached to the face area. If the face area that the user wishes to attach matches, the user's operation of rearranging the face decoration image can be reduced. Here, the “predetermined rule” is a rule that can select one of the detected face areas, for example, a rule that selects the detected face area with the widest face area. Alternatively, the rule may be to select the detected face area closest to the center position of the photographic image.

本発明の画像処理装置は、前記顔領域検出手段で検出された前記顔領域の数が予め定めた上限値以上であるか否かを判定する顔領域数判定手段を備え、前記制御手段は、前記顔領域検出手段によって前記所定の写真画像の顔領域が検出され且つ前記顔飾り付け画像記憶手段から所定の顔飾り付け画像が読み込まれたのち、前記顔領域数判定手段で前記顔領域の数が予め定めた上限値以上であると判定されたとき、該所定の顔飾り付け画像の表示位置を所定の固定位置に決定し、前記表示位置に該所定の顔飾り付け画像が表示されるよう前記画像表示手段を制御するものであってもよい。写真画像中に予め定めた上限値以上の数の顔領域が検出されたときには、1つの顔領域を選定してもそれがユーザの意図した顔領域と一致する確率が下がり、本発明の効果が十分に得られないためである。なお、ここで「所定の固定位置」とは、予め定められた固定位置であり、例えば、写真画像の中央であってもよく、写真画像の4隅のいずれか近傍であってもよい。また、ここで、「上限値」とは、例えば値3のように予め定められた任意の値であってもよく、顔領域の数が多すぎてそのうちの1つの顔領域を顔飾り付け画像に追従させるべき顔領域として自動選定したとしても、その自動選定した顔領域と実際にユーザが顔飾り付け画像を付けたい顔領域とが一致する確率が低くなるような値であってもよい。   The image processing apparatus of the present invention comprises face area number determination means for determining whether or not the number of the face areas detected by the face area detection means is greater than or equal to a predetermined upper limit value, and the control means comprises: After the face area of the predetermined photographic image is detected by the face area detection means and the predetermined face decoration image is read from the face decoration image storage means, the number of the face areas is previously determined by the face area number determination means. When it is determined that the predetermined upper limit value is exceeded, the display position of the predetermined face decoration image is determined to be a predetermined fixed position, and the image display means is configured to display the predetermined face decoration image at the display position. It may be one that controls. When a number of face areas equal to or greater than a predetermined upper limit value are detected in a photographic image, the probability of matching one face area with the face area intended by the user is reduced, and the effect of the present invention is reduced. This is because it cannot be obtained sufficiently. Here, the “predetermined fixed position” is a predetermined fixed position, and may be, for example, the center of the photographic image or near one of the four corners of the photographic image. Here, the “upper limit value” may be an arbitrary value determined in advance, for example, a value of 3, for example, and there are too many face areas, and one face area is designated as a face decoration image. Even if the face area to be followed automatically is selected, the face area may be a value that reduces the probability that the automatically selected face area matches the face area that the user actually wants to add a face decoration image to.

本発明の印刷装置は、上述したいずれかに記載の画像処理装置と、印刷媒体への印刷を実行可能な印刷実行手段とを備えたものである。本発明の画像処理装置を搭載した印刷装置は、本発明の画像処理装置を搭載しているため顔飾り付け画像を配置し直すというユーザの操作を減らすことができるものであるから、これを搭載した印刷装置も同様の効果が得られる。   A printing apparatus according to the present invention includes any one of the above-described image processing apparatuses and a print execution unit capable of executing printing on a print medium. Since the printing apparatus equipped with the image processing apparatus of the present invention is equipped with the image processing apparatus of the present invention, it can reduce the user's operation of rearranging the face decoration image. A printing apparatus can achieve the same effect.

本発明の画像処理装置の制御方法は、
各種画像を表示可能な画像表示手段と、顔に関する飾り付け画像である顔飾り付け画像を記憶する顔飾り付け画像記憶手段と、顔領域に対する顔飾り付け画像の相対位置を定めた相対位置情報を記憶する相対位置情報記憶手段と、を備えた画像処理装置をコンピュータ・ソフトウェアで制御する制御方法であって、
(a)所定の写真画像の顔領域を検出するステップと、
(b)前記ステップ(a)で検出した顔領域に飾り付ける所定の顔飾り付け画像を前記顔飾り付け画像記憶手段から読み込み、該所定の顔飾り付け画像の相対位置情報を前記相対位置情報記憶手段から読み込み、該相対位置情報と前記所定の写真画像の顔領域の絶対位置とに基づいて、該所定の写真画像における該所定の顔飾り付け画像の表示位置を決定し、該表示位置に該所定の顔飾り付け画像が表示されるよう前記画像表示手段を制御するステップと、
を含むものである。
The control method of the image processing apparatus of the present invention includes:
Image display means capable of displaying various images, face decoration image storage means for storing a face decoration image that is a face decoration image, and relative position for storing relative position information that defines the relative position of the face decoration image with respect to the face area A control method for controlling an image processing apparatus provided with information storage means by computer software,
(A) detecting a face area of a predetermined photographic image;
(B) A predetermined face decoration image to be decorated on the face area detected in the step (a) is read from the face decoration image storage means, and relative position information of the predetermined face decoration image is read from the relative position information storage means, Based on the relative position information and the absolute position of the face area of the predetermined photographic image, a display position of the predetermined face decoration image in the predetermined photographic image is determined, and the predetermined face decoration image is set at the display position. Controlling the image display means so that is displayed;
Is included.

本発明の画像処理装置の制御方法は、顔領域検出手段によって所定の写真画像の顔領域が検出され且つ顔飾り付け画像記憶手段から所定の顔飾り付け画像が読み込まれたとき、所定の顔飾り付け画像の相対位置情報を相対位置情報記憶手段から読み込み、相対位置情報と所定の写真画像の顔領域の絶対位置とに基づいて、所定の写真画像における所定の顔飾り付け画像の表示位置を決定し、表示位置に所定の顔飾り付け画像を表示する。このように、写真画像のどこに顔領域が存在していても、その顔領域に対する顔飾り付け画像の位置は予め定められた相対位置情報に基づいて決定されるため、予め顔領域に対する顔飾り付け画像の相対位置を適切な位置に定め、この相対位置を相対位置情報として相対位置情報記憶手段に記憶しておけば、顔飾り付け画像は顔領域に対して適切な位置に配置されることになる。したがって、顔飾り付け画像を顔領域とは無関係に定めた固定位置に配置する場合に比べて、顔飾り付け画像を配置し直すというユーザの操作を減らすことができる。   According to the control method of the image processing apparatus of the present invention, when a face area of a predetermined photographic image is detected by the face area detection unit and a predetermined face decoration image is read from the face decoration image storage unit, the predetermined face decoration image is stored. The relative position information is read from the relative position information storage means, the display position of the predetermined face decoration image in the predetermined photo image is determined based on the relative position information and the absolute position of the face area of the predetermined photo image, and the display position A predetermined face decoration image is displayed on the screen. Thus, no matter where the face area exists in the photographic image, the position of the face decoration image with respect to the face area is determined based on the predetermined relative position information. If the relative position is set to an appropriate position and this relative position is stored as relative position information in the relative position information storage means, the face decoration image is arranged at an appropriate position with respect to the face area. Therefore, the user's operation of rearranging the face decoration image can be reduced as compared with the case where the face decoration image is arranged at a fixed position determined independently of the face area.

本発明の画像処理装置の制御方法において、画像処理装置の制御方法は上述したいずれかの画像処理装置が備えている各種構成を備えていてもよいし、また、上述したいずれかの画像処理装置の機能を実現するようなステップを追加してもよい。   In the control method of the image processing apparatus of the present invention, the control method of the image processing apparatus may include various configurations included in any of the above-described image processing apparatuses, or any of the above-described image processing apparatuses. Steps for realizing the functions may be added.

本発明の制御プログラムは、1又は複数のコンピュータに、画像処理装置の制御方法の各ステップを実行させるためのプログラムである。このプログラムは、コンピュータが読み取り可能な記録媒体(例えばハードディスク、ROM、FD、CD、DVDなど)に記録されていてもよいし、伝送媒体(インターネットやLANなどの通信網)を介してあるコンピュータから別のコンピュータへ配信されてもよいし、その他どのような形で授受されてもよい。このプログラムを一つのコンピュータに実行させるか又は複数のコンピュータに各ステップを分担して実行させれば、上述した制御方法と同様の効果を得ることができる。   The control program of the present invention is a program for causing one or more computers to execute the steps of the control method of the image processing apparatus. This program may be recorded on a computer-readable recording medium (for example, hard disk, ROM, FD, CD, DVD, etc.), or from a computer via a transmission medium (communication network such as the Internet or LAN). It may be distributed to another computer, or may be exchanged in any other form. If this program is executed by a single computer or each step is shared and executed by a plurality of computers, the same effect as the control method described above can be obtained.

次に、本発明の実施の形態を図面に基づいて説明する。図1は、本発明の一実施形態であるフォトプリンタ10の斜視図であり、図2は、フォトプリンタ10の構成の概略を示すブロック図である。   Next, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a perspective view of a photo printer 10 according to an embodiment of the present invention, and FIG. 2 is a block diagram showing an outline of the configuration of the photo printer 10.

本実施形態のフォトプリンタ10は、図1に示すように、プリンタ本体12の前面を開閉可能な前面扉14と、プリンタ本体12の上面に設けられた操作パネル20と、プリンタ本体12の上面の奥の一辺に開閉自在に取り付けられ閉状態で操作パネル20を覆うカバー30と、プリンタ本体12に内蔵された印刷機構40(図2参照)と、フォトプリンタ10の全体の制御を司るコントローラ50(図2参照)とを備えている。なお、本実施形態では印刷媒体を「記録紙」として説明するが、材質を特定する趣旨ではなく、紙の他フィルムなど他の材質も含むものとする。   As shown in FIG. 1, the photo printer 10 of this embodiment includes a front door 14 that can open and close the front surface of the printer main body 12, an operation panel 20 provided on the upper surface of the printer main body 12, and an upper surface of the printer main body 12. A cover 30 that is attached to one side of the back so as to be freely opened and closed and covers the operation panel 20 in a closed state, a printing mechanism 40 (see FIG. 2) built in the printer main body 12, and a controller 50 that controls the entire photo printer 10 ( 2). In this embodiment, the printing medium is described as “recording paper”, but it is not intended to specify the material, but includes other materials such as a film other than paper.

前面扉14は、プリンタ本体12の前面を開閉するための蓋であり、図1に示すように、開状態のときには、プリンタ本体12の前面から排紙される記録紙Sを受けるための排紙トレイとして機能すると共に、プリンタ本体12の前面に設けられた各種のメモリカードスロット18をユーザが利用可能な状態となる。   The front door 14 is a lid for opening and closing the front surface of the printer main body 12. As shown in FIG. 1, when the front door 14 is in an open state, the front door 14 is discharged to receive the recording paper S discharged from the front surface of the printer main body 12. In addition to functioning as a tray, various memory card slots 18 provided on the front surface of the printer main body 12 can be used by the user.

操作パネル20は、文字や図形、記号などを表示するディスプレイ22と、このディスプレイ22の周囲に配置されたボタン群24とを備えている。ボタン群24は、図2に示すように、電源のオンオフを行うための電源ボタン24a、ディスプレイ22に表示されている画像等の表示サイズを6分割表示・15分割表示・全画面表示等に切り替えるための表示切替ボタン24b、印刷機能に関する複数の選択肢が並んだメインメニュー画面を呼び出すためのメニューボタン24c、操作を途中でキャンセルしたり記録紙Sへの印刷を途中で中断したりするためのキャンセルボタン24d、記録紙Sへの印刷実行を指示するための印刷ボタン24e、メモリカードスロット18に挿入されたメモリカードMに編集画像等を保存するための保存ボタン24f、ディスプレイ22に表示された複数の選択肢の中から所望の選択肢を選択したりカーソルを移動したりするときに操作される上下左右ボタン24g、この上下左右ボタン24gの中央に配置され上下左右ボタン24gによって選択されている選択肢に決定したことを指示するためのOKボタン24hなどで構成されている。また、図1に示すように、操作パネル20の奥には、印刷機構40の給紙口48が設けられ、この給紙口48には、ガイド幅が記録紙Sの幅に合うように左右方向にスライド操作される一対の用紙ガイド49a,49bが設けられている。   The operation panel 20 includes a display 22 that displays characters, graphics, symbols, and the like, and a button group 24 arranged around the display 22. As shown in FIG. 2, the button group 24 switches the power button 24a for turning on / off the power, the display size of an image or the like displayed on the display 22 to 6-split display, 15-split display, full-screen display, or the like. A display switch button 24b for displaying, a menu button 24c for calling a main menu screen on which a plurality of options relating to the printing function are arranged, and a cancel for canceling the operation or interrupting printing on the recording paper S. A button 24d, a print button 24e for instructing execution of printing on the recording paper S, a save button 24f for saving an edited image or the like in the memory card M inserted in the memory card slot 18, and a plurality of items displayed on the display 22 Up, down, left, and right operated when selecting a desired option or moving the cursor Tan 24g, and it is configured by a the up, down, right and left buttons OK button for being disposed in the center to indicate that it has determined choices selected by the up, down, left, and right buttons 24g of 24g 24h. As shown in FIG. 1, a paper feed port 48 of the printing mechanism 40 is provided in the back of the operation panel 20, and the paper feed port 48 has left and right guide widths that match the width of the recording paper S. A pair of paper guides 49a and 49b that are slid in the direction are provided.

カバー30は、図1に示すように、プリンタ本体12の上面を覆うことのできる大きさに成形された樹脂板であり、ディスプレイ22と同じ大きさの窓34を備え、カバー支持軸32に開閉可能に取り付けられている。また、カバー30が開状態のときには、記録紙Sを印刷機構40へ供給するための給紙トレイとして利用可能である。一方、カバー30が閉状態であっても、カバー30には窓34が備えられているため、ユーザはこの窓34を介してディスプレイ22の表示内容を確認することができる。   As shown in FIG. 1, the cover 30 is a resin plate formed in a size that can cover the upper surface of the printer body 12, and includes a window 34 that is the same size as the display 22, and opens and closes the cover support shaft 32. It is attached as possible. Further, when the cover 30 is in the open state, it can be used as a paper feed tray for supplying the recording paper S to the printing mechanism 40. On the other hand, even if the cover 30 is in the closed state, the cover 30 is provided with the window 34, so that the user can check the display content of the display 22 through the window 34.

印刷機構40は、プリンタ本体12の内部に配置され、図2に示すように、左右方向にループ状に架け渡されたキャリッジベルト41により駆動されガイド42に沿って左右に往復するキャリッジ43と、キャリッジ43にシアン・マゼンダ・イエロー・ブラック等の各色のインクを供給するインクカートリッジ44と、各インクカートリッジ44から供給された各インクに圧力をかけてノズルから記録紙Sに向かってインクを吐出する印刷ヘッド45と、操作パネル20に形成された給紙口48から供給された記録紙Sを排紙トレイである開状態の前面扉14へ送り出す搬送ローラ46とを備えている。インクカートリッジ44は印刷機構40の下方に取り付けられており、インクカートリッジ44がキャリッジ43上に搭載されていない、いわゆるオフキャリッジタイプである。印刷ヘッド45は、ここでは圧電素子に電圧をかけることによりこの圧電素子を変形させてインクを加圧する方式を採用しているが、発熱抵抗体(例えばヒータなど)に電圧をかけインクを加熱して発生した気泡によりインクを加圧する方式を採用してもよい。   The printing mechanism 40 is disposed inside the printer main body 12 and, as shown in FIG. 2, is driven by a carriage belt 41 laid in a loop shape in the left-right direction, and reciprocates left and right along a guide 42. An ink cartridge 44 that supplies ink of each color such as cyan, magenta, yellow, and black to the carriage 43, and pressure is applied to each ink supplied from each ink cartridge 44 to eject the ink from the nozzle toward the recording paper S. The printing head 45 includes a transport roller 46 that feeds the recording paper S supplied from a paper feed port 48 formed on the operation panel 20 to the open front door 14 that is a paper discharge tray. The ink cartridge 44 is attached below the printing mechanism 40 and is a so-called off-carriage type in which the ink cartridge 44 is not mounted on the carriage 43. Here, the print head 45 employs a method in which a voltage is applied to the piezoelectric element to deform the piezoelectric element and pressurize the ink. However, a voltage is applied to a heating resistor (for example, a heater) to heat the ink. A method of pressurizing the ink with the generated bubbles may be employed.

コントローラ50は、図2に示すように、CPU51を中心とするマイクロプロセッサとして構成されており、各種処理プログラムや各種データ、各種テーブルなどを記憶したROM52と、一時的にデータを記憶するRAM53と、電気的に書き換え可能で電源を切ってもデータは保持されるフラッシュメモリ54と、メモリカードスロット18に挿入されたメモリカードMや印刷機構40、操作パネル20と通信を可能とするインタフェース55(I/F)とを備え、これらはバス57を介して互いに信号のやり取りが可能なように接続されている。ROM52には、後述する飾り付け画像配置処理ルーチンや顔認識処理ルーチン、顔選定処理ルーチンなどが記憶されている。フラッシュメモリ54には、後述する顔飾り付け画像や飾り付け画像情報などが記憶されている。このコントローラ50は、メモリカードスロット18に挿入されたメモリカードMの画像ファイルなどを入力し、操作パネル20のボタン群24からの指令信号や印刷機構40の各部からの検出信号などを入力する。また、コントローラ50は、メモリカードMに編集画像などを保存するほか、印刷機構40の各部への制御信号や操作パネルのディスプレイ22への制御信号を出力する。   As shown in FIG. 2, the controller 50 is configured as a microprocessor centered on the CPU 51, and includes a ROM 52 that stores various processing programs, various data, various tables, a RAM 53 that temporarily stores data, An interface 55 (I) that can communicate with the flash memory 54 that is electrically rewritable and retains data even when the power is turned off, and the memory card M, the printing mechanism 40, and the operation panel 20 inserted in the memory card slot 18. / F), and these are connected via the bus 57 so that signals can be exchanged with each other. The ROM 52 stores a decorative image arrangement processing routine, a face recognition processing routine, a face selection processing routine, and the like, which will be described later. The flash memory 54 stores a face decoration image and decoration image information, which will be described later. The controller 50 inputs an image file of the memory card M inserted into the memory card slot 18, and inputs a command signal from the button group 24 of the operation panel 20, a detection signal from each part of the printing mechanism 40, and the like. Further, the controller 50 saves an edited image or the like in the memory card M, and outputs a control signal to each part of the printing mechanism 40 and a control signal to the display 22 of the operation panel.

次に、こうして構成された本実施形態のフォトプリンタ10の動作、特に顔飾り付け画像配置処理の動作について説明する。図3は、コントローラ50のCPU51により実行される飾り付け画像配置処理ルーチンの一例を表すフローチャートである。この飾り付け画像配置処理ルーチンはROM52に記憶され、CPU51により写真画像が読み込まれたときなどに繰り返し実行される。   Next, the operation of the thus configured photo printer 10 of the present embodiment, particularly the operation of the face decoration image arrangement processing will be described. FIG. 3 is a flowchart illustrating an example of a decorative image arrangement processing routine executed by the CPU 51 of the controller 50. This decoration image arrangement processing routine is stored in the ROM 52 and is repeatedly executed when a photographic image is read by the CPU 51.

図3の飾り付け画像配置処理ルーチンが開始されると、CPU51は、まず、ユーザに飾り付け画像の選択を促す飾り付け画像選択画面(図4参照)をディスプレイ22に表示する(ステップS100)。これにより、ユーザは写真画像に配置する飾り付け画像を選択することができる。図4に示すように、飾り付け画像選択画面では、写真画像の縁を囲むフレームマーク81、写真画像の上側に付される垂れ幕マーク82、顔の外側に付される夢マーク83、顔の外側に付される吹き出しマーク84、目の下に付される涙マーク85、目の斜め上に付される怒りマーク86、頭の上に付される閃きマーク87、目の上に付されるメガネマーク88等が選択可能に表示されている。そして、ユーザが上下左右ボタン24gで写真画像に配置する飾り付け画像を選択し、OKボタン24hを押下すると、CPU51はフラッシュメモリ54より、ユーザが選択した飾り付け画像に対応する飾り付け画像情報(図5参照)を読み込む(ステップS110)。ここで、飾り付け画像情報とは、飾り付け画像が顔に関連する飾り付け画像(顔飾り付け画像)であるか否かを表す顔追従フラグ、顔領域の中心座標を基準とした顔飾り付け画像の相対座標(X_S_OFFSET,Y_S_OFFSET)を示すオフセット座標、顔の面積を基準とした顔飾り付け画像の相対面積を示すオフセットサイズ、顔領域の上下方向を基準とした顔飾り付け画像の相対角度を示すオフセット回転角度、顔飾り付け画像幅及び顔飾り付け画像高さなどを含む情報をいう。なお、顔追従フラグがゼロのときには顔飾り付け画像以外の飾り付け画像(例えば、フレームマーク81や垂れ幕マーク82など)であることを示し、値1のときには顔飾り付け画像(例えば、吹き出しマーク84や涙マーク85など)であることを示す。   When the decorative image arrangement processing routine of FIG. 3 is started, the CPU 51 first displays a decorative image selection screen (see FIG. 4) that prompts the user to select a decorative image on the display 22 (step S100). Thereby, the user can select a decoration image to be arranged in the photographic image. As shown in FIG. 4, on the decoration image selection screen, a frame mark 81 that surrounds the edge of the photographic image, a banner mark 82 attached to the upper side of the photographic image, a dream mark 83 attached to the outside of the face, A balloon mark 84 attached, a tear mark 85 attached below the eyes, an anger mark 86 attached obliquely above the eyes, a flash mark 87 attached above the head, a glasses mark 88 attached above the eyes, etc. Is displayed as selectable. When the user selects a decoration image to be arranged on the photographic image with the up / down / left / right buttons 24g and presses the OK button 24h, the CPU 51 receives the decoration image information corresponding to the decoration image selected by the user from the flash memory 54 (see FIG. 5). ) Is read (step S110). Here, the decoration image information is a face following flag indicating whether or not the decoration image is a decoration image related to the face (face decoration image), relative coordinates of the face decoration image based on the center coordinates of the face area ( X_S_OFFSET, Y_S_OFFSET), offset size indicating the relative area of the face decoration image relative to the face area, offset rotation angle indicating the relative angle of the face decoration image relative to the vertical direction of the face area, face decoration Information including image width and face decoration image height. When the face following flag is zero, it indicates a decoration image other than the face decoration image (for example, the frame mark 81 or the banner mark 82). When the value is 1, the face decoration image (for example, the balloon mark 84 or the tear mark) is displayed. 85).

次に、CPU51は、ステップS110で読み込んだ顔追従フラグがゼロか否かを判定し(ステップS120)、顔追従フラグがゼロのときには、今回選択した飾り付け画像は顔飾り付け画像ではないため、あらかじめ定められた固定位置(本実施形態では写真画像中央位置とする)に飾り付け画像を配置し(ステップS210)、本ルーチンを終了する。一方、顔追従フラグが値1であったときには、今回選択した飾り付け画像は顔飾り付け画像であるため、後述する顔認識処理ルーチンを用いて顔領域の検出を試みる(ステップS130)。これにより、飾り付け画像が顔飾り付け画像であるときにのみ、ステップS130以下の処理を行うことになる。   Next, the CPU 51 determines whether or not the face following flag read in step S110 is zero (step S120). When the face following flag is zero, the decoration image selected this time is not a face decoration image, and is thus determined in advance. The decorative image is arranged at the fixed position (in this embodiment, the center position of the photographic image) (step S210), and this routine ends. On the other hand, when the face following flag is 1, the decoration image selected this time is a face decoration image, so an attempt is made to detect a face area using a face recognition processing routine described later (step S130). As a result, only after the decoration image is a face decoration image, the processing from step S130 is performed.

ここで、顔認識処理ルーチンについて詳しく説明する。図6は顔認識処理ルーチンの一例を表すフローチャートである。図6の顔認識処理ルーチンが実行されると、CPU51は写真画像中の顔領域の検出を試行する(ステップS300)。ここで、顔領域を検出する方法は公知技術なので、ここではその詳細な検出方法については省略するが、例えば、写真画像から肌色に指定した色と近い色を持つ画素を肌色画素の集合として抽出する方法がある。この方法は、例えば、肌色を他の色と区別するための色空間上で、予め色空間上の肌色の範囲を定め、各画素の色が定められた範囲に入っているか否かを判定することにより行われる。このとき、画像データを色相、彩度及び輝度の色空間に変換し、カラー画像の平均輝度を算出し、算出した平均輝度の所定の範囲毎に、予め肌色画素値に適切な範囲を設定して、範囲内の肌色画素値の領域を肌色画素の集合として抽出してもよい。このように、画像の平均輝度を複数の範囲に区分し、各範囲に対して肌色画素値の範囲を設定するようにすれば、画像全体が明るいか暗いかに応じて、適切な肌色画素の範囲を設定することができる。この結果、肌色画素の検出をより正確に行うことが可能である。これにより、肌色画素の集合を抽出することができる。このとき、ある程度の数(例えば10画素、または、画像全体の画素数の1%以上)以上の肌色画素が接した状態で集合している画像領域のみをして抽出してもよい。肌色画素の集合を抽出した後、CPU51は、肌色画素の集合から目及び口の抽出を行う。ここで、目及び口の位置を抽出する方法は公知技術なので、ここではその詳細な抽出方法については省略するが、例えば、検出した肌色画素の集合領域から、肌色画素の集合領域よりも輝度値の低い領域を目の領域として抽出し、抽出した両目の下側の範囲内で肌色画素の集合領域よりも輝度値の低い領域を口の領域として抽出する。このとき、ニューラルネットワークによる処理や、画像内の形状を利用した処理などの種々の処理によって抽出してもよい。なお、写真画像中の位置座標は、写真画像の左上隅を原点(0,0)とし、右方向をX座標正の方向、下方向をY座標正の方向とする(図7参照)。   Here, the face recognition processing routine will be described in detail. FIG. 6 is a flowchart showing an example of a face recognition processing routine. When the face recognition processing routine of FIG. 6 is executed, the CPU 51 tries to detect a face area in the photographic image (step S300). Here, since the method for detecting the face area is a known technique, the detailed detection method is omitted here. For example, pixels having a color close to the color designated as the skin color are extracted from the photograph image as a set of skin color pixels. There is a way to do it. In this method, for example, a skin color range on the color space is defined in advance in a color space for distinguishing the skin color from other colors, and it is determined whether or not the color of each pixel is in the predetermined range. Is done. At this time, the image data is converted into a color space of hue, saturation and luminance, the average luminance of the color image is calculated, and an appropriate range is set in advance for the skin color pixel value for each predetermined range of the calculated average luminance. Thus, the skin color pixel value region within the range may be extracted as a set of skin color pixels. In this way, by dividing the average luminance of the image into a plurality of ranges and setting a range of skin color pixel values for each range, an appropriate range of skin color pixels can be selected depending on whether the entire image is bright or dark. Can be set. As a result, skin color pixels can be detected more accurately. Thereby, a set of skin color pixels can be extracted. At this time, it is possible to extract only the image areas that are gathered in a state where a certain number (for example, 10 pixels, or 1% or more of the total number of pixels) or more skin color pixels are in contact with each other. After extracting the set of skin color pixels, the CPU 51 extracts eyes and mouth from the set of skin color pixels. Here, since the method for extracting the positions of the eyes and mouth is a known technique, the detailed extraction method is omitted here. For example, the luminance value from the detected area of the flesh-colored pixels is larger than that of the flesh-colored pixels. A region having a low luminance value is extracted as a mouth region within the range below the extracted eyes and having a luminance value lower than that of the flesh color pixel collection region. At this time, the image may be extracted by various processes such as a process using a neural network or a process using a shape in an image. The position coordinates in the photographic image are such that the upper left corner of the photographic image is the origin (0, 0), the right direction is the positive X coordinate direction, and the downward direction is the positive Y coordinate direction (see FIG. 7).

続いて、CPU51は、顔領域の検出を試行した結果、顔領域を検出できたか否かを判定し(ステップS310)、顔領域を検出できなかったときには、顔領域の検出に失敗したことを表すために顔検出フラグをゼロに設定し(ステップS360)、本ルーチンを終了する。なお、顔領域を検出できなかったときとは、例えば、肌色画素の集合を抽出できなかったときや肌色画素の集合を抽出した後に、目や口を抽出できなかったときなどが挙げられる。一方、CPU51は、ステップS310で顔領域を検出できたときには、顔領域の検出に成功したことを表すために顔検出フラグを値1に設定し(ステップS320)、図7に示すように、検出した写真画像の顔領域に外側から接する矩形を作成し(ステップS330)、この矩形の4隅の座標や中心座標、面積を求めてそれらをRAM53の所定領域に記憶する(ステップS340)。ここで、矩形の座標は、顔認識処理ルーチンで検出した目及び口の位置から顔領域の上下方向を判定し、顔領域の左上位置に相当する矩形の左上座標を(X_F_LT,Y_F_LT)と定める。同様に、矩形の右上座標を(X_F_RT,Y_F_RT),矩形の左下座標を(X_F_LB,Y_F_LB),矩形の右下座標を(X_F_RB,Y_F_RB)として、矩形の4隅の座標を定める。また、矩形の中心座標を(X_C、Y_C)とする。なお、本実施形態では、矩形の面積を顔領域の面積とみなす。   Subsequently, the CPU 51 determines whether or not the face area has been detected as a result of the detection of the face area (step S310). If the face area cannot be detected, it indicates that the face area has failed to be detected. Therefore, the face detection flag is set to zero (step S360), and this routine ends. Note that when the face area could not be detected, for example, when a set of skin color pixels could not be extracted, or after extracting a set of skin color pixels, eyes or mouth could not be extracted. On the other hand, when the CPU 51 can detect the face area in step S310, the CPU 51 sets the face detection flag to a value 1 to indicate that the face area has been successfully detected (step S320). As shown in FIG. A rectangle that touches the face area of the photograph image from the outside is created (step S330), and the coordinates, center coordinates, and area of the four corners of the rectangle are obtained and stored in a predetermined area of the RAM 53 (step S340). Here, for the rectangular coordinates, the vertical direction of the face area is determined from the eyes and mouth positions detected by the face recognition processing routine, and the upper left coordinates of the rectangle corresponding to the upper left position of the face area are defined as (X_F_LT, Y_F_LT). . Similarly, the coordinates of the four corners of the rectangle are determined with the upper right coordinates of the rectangle as (X_F_RT, Y_F_RT), the lower left coordinates of the rectangle as (X_F_LB, Y_F_LB), and the lower right coordinates of the rectangle as (X_F_RB, Y_F_RB). The center coordinates of the rectangle are (X_C, Y_C). In the present embodiment, the rectangular area is regarded as the area of the face region.

続いて、CPU51は、全ての顔領域についてステップS330及びステップS340の処理を実行したか否かを判定し(ステップS350)、まだそれらの処理を実行していない顔領域が残っているときには、次の顔領域についてステップS330及びステップS340の処理を実行する。一方、全ての顔領域についてステップS330及びステップS340の処理を実行したときには、本ルーチンを終了する。写真画像に複数の人物が写っているときには、ステップS300で顔領域の検出を試行したときに複数の顔領域が検出されるため、検出された全ての顔領域についてステップS330及びステップS340の処理を実行したか否かを判定する。また、顔領域が複数存在する場合には、CPU51は、各顔領域に矩形の4隅の座標や中心座標、面積を対応付けてRAM53に記憶する。   Subsequently, the CPU 51 determines whether or not the processes of step S330 and step S340 have been executed for all the face areas (step S350). Steps S330 and S340 are executed for the face area. On the other hand, when the processes of step S330 and step S340 have been executed for all the face areas, this routine ends. When a plurality of persons are shown in the photographic image, a plurality of face areas are detected when an attempt is made to detect a face area in step S300. Therefore, the processes in steps S330 and S340 are performed for all detected face areas. It is determined whether or not it has been executed. When there are a plurality of face areas, the CPU 51 associates the coordinates, center coordinates, and area of the four corners of the rectangle with each face area and stores them in the RAM 53.

図3のフローに戻り、CPU51は、このような顔認識処理ルーチンを終了した後、顔検出フラグがゼロか値1かを判定し(ステップS140)、顔検出フラグがゼロのとき、つまり、顔領域の検出に失敗したときには、予め定められた固定位置(本実施形態では写真画像中央位置とする)に顔飾り付け画像を配置し(ステップS210)、本ルーチンを終了する。一方、顔検出フラグが値1のとき、つまり、顔領域の検出に成功したときには、続いて顔選定処理ルーチンを実行する(ステップS150)。なお、顔領域の検出に失敗したときには、顔飾り付け画像は予め定められた固定位置に配置されるため、ユーザは顔飾り付け画像を適切な位置に移動する操作を行うことになる。   Returning to the flow of FIG. 3, after completing the face recognition processing routine, the CPU 51 determines whether the face detection flag is zero or value 1 (step S140), and when the face detection flag is zero, that is, the face If the area detection fails, the face decoration image is arranged at a predetermined fixed position (in this embodiment, the center position of the photographic image) (step S210), and this routine is terminated. On the other hand, when the face detection flag is 1, that is, when the face area is successfully detected, the face selection processing routine is subsequently executed (step S150). If the face area detection fails, the face decoration image is placed at a predetermined fixed position, and the user performs an operation of moving the face decoration image to an appropriate position.

ここで、顔選定処理ルーチンについて詳しく説明する。図8は顔選定処理ルーチンの一例を表すフローチャートである。図8の顔選定処理ルーチンが実行されると、CPU51は、顔認識処理ルーチン(ステップS130)で複数の顔領域を検出したか否かを判定し(ステップS400)、顔認識処理ルーチンで1つの顔領域のみを検出したと判定されたときには、その顔領域を追従対象の顔領域として設定し(ステップS410)、顔飾り付け画像を追従させるべき顔領域があることを表すために追従対象フラグを値1に設定し(ステップS420)、本ルーチンを終了する。ここで、追従対象の顔領域とは、今回の顔飾り付け画像を付けるために顔飾り付け画像を追従させる顔領域をいう。一方、顔認識処理ルーチンで複数の顔領域を検出したと判定されたときには、顔領域の数が上限値以上か否かを判定する(ステップS430)。ここで、上限値とは、顔領域の数が多すぎてそのうちの1つの顔領域を顔飾り付け画像に追従させるべき顔領域として自動選定したとしても、その自動選定した顔領域と実際にユーザが顔飾り付け画像を付けたい顔領域とが一致する確率が低くなるような値に設定されている。本実施形態では、この上限値を値3とした。そして、顔領域の数が上限値未満であるときには、それぞれの顔領域の面積を読み込み(ステップS440)、読み込んだ面積のうち最も大きな面積を持つ顔領域を追従対象の顔領域として設定し(ステップS450)、追従対象フラグを値1に設定し(ステップS420)、本ルーチンを終了する。一方、顔領域の数が上限値以上であったときには、追従対象の顔領域を設定したとしても、それとユーザが顔飾り付け画像と付けたい顔領域とが一致する確率が低いことから、追従対象の顔領域を設定することなく、追従対象フラグをゼロに設定し(ステップS460)、本ルーチンを終了する。   Here, the face selection processing routine will be described in detail. FIG. 8 is a flowchart showing an example of the face selection processing routine. When the face selection processing routine of FIG. 8 is executed, the CPU 51 determines whether or not a plurality of face areas have been detected in the face recognition processing routine (step S130) (step S400), and one face recognition processing routine executes one face recognition processing routine. If it is determined that only the face area has been detected, the face area is set as the face area to be followed (step S410), and the follow target flag is set to indicate that there is a face area that should be followed by the face decoration image. 1 is set (step S420), and this routine is terminated. Here, the face area to be tracked refers to a face area that causes the face decoration image to follow in order to attach the current face decoration image. On the other hand, when it is determined in the face recognition processing routine that a plurality of face areas have been detected, it is determined whether or not the number of face areas is equal to or greater than the upper limit value (step S430). Here, even if the number of face areas is too large and one face area is automatically selected as a face area that should follow the face decoration image, the upper limit value is determined by the user as the automatically selected face area. The value is set such that the probability that the face area to which the face decoration image is to be attached matches is low. In this embodiment, this upper limit value is set to 3. If the number of face areas is less than the upper limit value, the area of each face area is read (step S440), and the face area having the largest area among the read areas is set as the face area to be tracked (step S440). (S450), the tracking target flag is set to 1 (step S420), and this routine is terminated. On the other hand, when the number of face areas is greater than or equal to the upper limit value, even if the face area to be followed is set, the probability that the face decoration image and the face area that the user wants to match is low. Without setting the face area, the tracking target flag is set to zero (step S460), and this routine ends.

さて、図3のフローに戻り、CPU51は、顔選定処理ルーチン(ステップS150)の後、追従対象の顔領域があるか否かを追従対象フラグに基づいて判定する(ステップS160)。そして、追従対象の顔領域がなかったとき、つまり、追従対象フラグがゼロであるときには、前出の固定位置に顔飾り付け画像を配置し(ステップS210)、本ルーチンを終了する。なお、顔飾り付け画像が予め定められた固定位置に配置されるときは、ユーザは顔飾り付け画像を適切な位置に移動する操作を行うことになる。一方、追従対象の顔領域があるとき、つまり、追従対象フラグが値1であるときには、顔領域に追従する顔飾り付け画像の傾き角度を算出する(ステップS170)。具体的には、まず、矩形の左上座標の値(X_F_RT,Y_F_RT)と矩形の右下座標の値(X_F_LB,Y_F_LB)を比較し、以下の表1に示すように、それぞれの座標の値の条件式に対応する角度に顔領域傾き角度を決定する。なお、図9は顔領域傾き角度と矩形の左上座標及び右上座標との関係を表す。続いて、CPU51はRAM53より追従させる顔飾り付け画像のオフセット回転角度を読み込み、オフセット回転角度を顔領域の傾き角度に加算して顔飾り付け画像の傾き角度を算出する。これにより、顔領域が写真画像の所定方向に対して傾いていたとき、その傾き角度に合わせて顔飾り付け画像を回転することができる。なお、顔領域傾き角度、オフセット回転角度及び顔飾り付け画像傾き角度は時計回り方向を正の角度とする。   Returning to the flow of FIG. 3, after the face selection processing routine (step S150), the CPU 51 determines whether there is a tracking target face area based on the tracking target flag (step S160). When there is no follow-up target face area, that is, when the follow-up target flag is zero, a face decoration image is placed at the above-mentioned fixed position (step S210), and this routine ends. Note that when the face decoration image is arranged at a predetermined fixed position, the user performs an operation of moving the face decoration image to an appropriate position. On the other hand, when there is a follow target face area, that is, when the follow target flag is 1, the inclination angle of the face decoration image that follows the face area is calculated (step S170). Specifically, first, the value of the upper left coordinate of the rectangle (X_F_RT, Y_F_RT) and the value of the lower right coordinate of the rectangle (X_F_LB, Y_F_LB) are compared, and as shown in Table 1 below, the value of each coordinate is The face area inclination angle is determined to an angle corresponding to the conditional expression. FIG. 9 shows the relationship between the face area tilt angle and the upper left and upper right coordinates of the rectangle. Subsequently, the CPU 51 reads the offset rotation angle of the face decoration image to be followed from the RAM 53 and adds the offset rotation angle to the inclination angle of the face area to calculate the inclination angle of the face decoration image. Thereby, when the face area is inclined with respect to a predetermined direction of the photographic image, the face decoration image can be rotated according to the inclination angle. It should be noted that the face region tilt angle, the offset rotation angle, and the face decoration image tilt angle are positive in the clockwise direction.

Figure 2008203960
Figure 2008203960

次に、CPU51は、RAM53より顔領域の面積の値及びオフセットサイズの値を読み込み、読み込んだ面積の値にオフセットサイズの値を乗算して、顔飾り付け画像の大きさを算出する(ステップS180)。   Next, the CPU 51 reads the area value and offset size value of the face area from the RAM 53, and multiplies the read area value by the offset size value to calculate the size of the face decoration image (step S180). .

次に、CPU51は、飾り付け画像情報(図5参照)や顔飾り付け画像の傾き角度・面積に基づいて顔飾り付け画像を配置する(ステップS190)。具体的には、まず、顔領域の面積が所定のデフォルト値であるとしたときの顔飾り付け画像の左上座標(X_OFFSET,Y_OFFSET)を求める。この座標(X_OFFSET,Y_OFFSET)は、顔領域の面積がデフォルト値で且つ顔領域傾き角度が0°のときに、飾り付け画像情報に含まれるオフセット座標(X_S_OFFSET,Y_S_OFFSET)となるように決められている。そして、顔領域の面積がデフォルト値で顔領域傾き角度が90°、180°、270°のときには、座標(X_OFFSET,Y_OFFSET)はそれぞれ表2及び図9のようになる。すなわち、オフセット座標(X_S_OFFSET,Y_S_OFFSET)を顔領域傾き角度だけ回転させた座標となる。このようにして座標(X_OFFSET,Y_OFFSET)を定めたあと、顔領域の中心座標(X_F_C,Y_F_C)と先ほど求めた座標(X_OFFSET,Y_OFFSET)との距離を、デフォルト値に対する今回の顔領域の面積の比に基づいて伸縮する。そして、顔領域の中心座標(X_F_C,Y_F_C)から座標(X_OFFSET,Y_OFFSET)の方向に伸縮後の距離だけ離れた座標を、今回の顔飾り付け画像の左上座標(X_S,Y_S)とする(図7参照)。また、顔領域の面積がデフォルト値で且つ顔領域傾き角度が0°のときの顔飾り付け画像につき、その傾き角度がステップS170で算出した傾き角度になるようにすると共に、その大きさがステップS180で算出した顔飾り付け画像になるように拡大・縮小する。そうしたうえで、その顔飾り付け画像の左上隅が左上座標(X_S,Y_S)と一致するように配置する。ここで、図10は、顔領域の面積がデフォルト値のときのの各顔飾り付け画像の配置位置を示したものである。この図10には、併せて各顔飾り付け画像のオフセット座標やオフセットサイズ、オフセット回転角度も例示した。   Next, the CPU 51 arranges the face decoration image based on the decoration image information (see FIG. 5) and the inclination angle / area of the face decoration image (step S190). Specifically, first, the upper left coordinates (X_OFFSET, Y_OFFSET) of the face decoration image when the area of the face region is a predetermined default value are obtained. These coordinates (X_OFFSET, Y_OFFSET) are determined to be offset coordinates (X_S_OFFSET, Y_S_OFFSET) included in the decorative image information when the area of the face region is the default value and the face region tilt angle is 0 °. . When the face area is the default value and the face area tilt angles are 90 °, 180 °, and 270 °, the coordinates (X_OFFSET, Y_OFFSET) are as shown in Table 2 and FIG. 9, respectively. That is, the coordinates obtained by rotating the offset coordinates (X_S_OFFSET, Y_S_OFFSET) by the face region tilt angle are obtained. After determining the coordinates (X_OFFSET, Y_OFFSET) in this way, the distance between the center coordinates (X_F_C, Y_F_C) of the face area and the previously obtained coordinates (X_OFFSET, Y_OFFSET) is set to the area of the current face area with respect to the default value. Scales based on the ratio. Then, coordinates that are separated from the center coordinates (X_F_C, Y_F_C) of the face region by the distance after expansion / contraction in the direction of the coordinates (X_OFFSET, Y_OFFSET) are the upper left coordinates (X_S, Y_S) of the current face decoration image (FIG. 7). reference). In addition, for the face decoration image when the area of the face area is the default value and the face area tilt angle is 0 °, the tilt angle is set to the tilt angle calculated in step S170 and the size thereof is set in step S180. The image is enlarged or reduced so that the face decoration image calculated in step 1 is obtained. After that, the face decoration image is arranged so that the upper left corner coincides with the upper left coordinates (X_S, Y_S). Here, FIG. 10 shows an arrangement position of each face decoration image when the area of the face region is a default value. FIG. 10 also illustrates the offset coordinates, offset size, and offset rotation angle of each face decoration image.

Figure 2008203960
Figure 2008203960

次に、CPU51は、配置された顔飾り付け画像の配置位置が相応しい位置であるか否かを判定し(ステップS200)、飾り付け画像の配置位置が相応しい位置であると判定したときには、本ルーチンを終了する。具体的には、配置された顔飾り付け画像の全部の領域が写真画像領域の内部に配置されているときに、飾り付け画像の配置位置が相応しい位置であると判定する。一方、CPU51が、顔飾り付け画像の配置位置が相応し位置でないと判定したときには、予め定められた固定位置に顔飾り付け画像を配置し(ステップS210)、本ルーチンを終了する。このように、写真画像のどこに顔領域が存在していても、その顔領域に対する顔飾り付け画像の位置は予め定められた顔飾り付け画像情報に基づいて決定されるため、予め顔領域に対する顔飾り付け画像の相対座標を適切な位置に定め、この相対座標を飾り付け画像情報としてフラッシュメモリ54に記憶しておけば、顔飾り付け画像は顔領域に対して適切な位置に配置されることになる。   Next, the CPU 51 determines whether or not the arrangement position of the arranged face decoration image is an appropriate position (step S200). When it is determined that the arrangement position of the decoration image is an appropriate position, this routine is terminated. To do. Specifically, when the entire area of the arranged face decoration image is arranged inside the photographic image area, it is determined that the arrangement position of the decoration image is an appropriate position. On the other hand, when the CPU 51 determines that the layout position of the face decoration image is not the corresponding position, the face decoration image is disposed at a predetermined fixed position (step S210), and this routine ends. Thus, no matter where the face area exists in the photographic image, the position of the face decoration image with respect to the face area is determined based on the predetermined face decoration image information. Is stored in the flash memory 54 as decoration image information, and the face decoration image is arranged at an appropriate position with respect to the face area.

飾り付け画像配置処理ルーチンにより顔飾り付け画像が自動配置されたのち、ユーザは、自動配置された顔飾り付け画像を上下左右ボタン24gを用いて、必要があれば任意の場所に移動し、OKボタン24hを押下して、顔飾り付け画像の配置位置を決定する。顔飾り付け画像は顔領域に対して適切な位置に配置されているため、顔飾り付け画像を顔領域とは無関係に定めた固定位置に配置する場合に比べて、顔飾り付け画像を配置し直すというユーザの操作を減らすことができる。   After the face decoration image is automatically arranged by the decoration image arrangement processing routine, the user moves the automatically arranged face decoration image to an arbitrary position using the up / down / left / right buttons 24g, and presses the OK button 24h. Press to determine the position of the face decoration image. Since the face decoration image is arranged at an appropriate position with respect to the face area, a user who rearranges the face decoration image compared to the case where the face decoration image is arranged at a fixed position that is determined independently of the face area. Can reduce the operation.

ここで、本実施形態の構成要素と本発明の構成要素との対応関係を明らかにする。本実施形態のディスプレイ22が画像表示手段に相当し、フラッシュメモリ54が顔飾り付け画像記憶手段及び相対位置情報記憶手段に相当し、コントローラ50が制御手段、顔領域検出手段、顔傾き角度検出手段、顔領域面積算出手段及び顔領域数カウント手段に相当し、印刷機構40が印刷実行手段に相当する。また、飾り付け画像情報が相対位置情報に相当する。なお、本実施形態ではフォトプリンタ10の動作の説明をすることにより本発明の画像処理装置の制御方法の一例も明らかにしている。   Here, the correspondence between the components of the present embodiment and the components of the present invention will be clarified. The display 22 of the present embodiment corresponds to image display means, the flash memory 54 corresponds to face decoration image storage means and relative position information storage means, the controller 50 includes control means, face area detection means, face inclination angle detection means, It corresponds to a face area area calculation unit and a face area number count unit, and the printing mechanism 40 corresponds to a print execution unit. The decorative image information corresponds to the relative position information. In this embodiment, an example of the control method of the image processing apparatus of the present invention is also clarified by describing the operation of the photo printer 10.

以上詳述した本実施形態のフォトプリンタ10によれば、所定の写真画像の顔領域が検出され且つフラッシュメモリ54から所定の顔飾り付け画像が読み込まれたとき、所定の顔飾り付け画像の飾り付け画像情報をROM52から読み込み、飾り付け画像情報と写真画像の顔領域の座標位置とに基づいて、写真画像における顔飾り付け画像の表示位置を決定し、表示位置に顔飾り付け画像を表示する。このため、予め顔領域に対する顔飾り付け画像の相対位置を適切な位置に定めておけば、顔飾り付け画像は顔領域に対して適切な位置に配置されることになる。したがって、顔飾り付け画像を顔領域とは無関係に定めた固定位置に配置する場合に比べて、顔飾り付け画像を配置し直すというユーザの操作を減らすことができる。   According to the photo printer 10 of the present embodiment described in detail above, when a face area of a predetermined photographic image is detected and a predetermined face decoration image is read from the flash memory 54, the decoration image information of the predetermined face decoration image Is read from the ROM 52, the display position of the face decoration image in the photographic image is determined based on the decoration image information and the coordinate position of the face area of the photographic image, and the face decoration image is displayed at the display position. For this reason, if the relative position of the face decoration image with respect to the face area is set to an appropriate position in advance, the face decoration image is arranged at an appropriate position with respect to the face area. Therefore, the user's operation of rearranging the face decoration image can be reduced as compared with the case where the face decoration image is arranged at a fixed position determined independently of the face area.

また、所定の写真画像の顔領域の傾き角度を算出し、算出した顔領域の傾き角度に基づいて所定の顔飾り付け画像を回転させて顔飾り付け画像を表示する位置を決定するため、写真画像の顔領域の傾き角度に顔飾り付け画像を回転し直すというユーザの操作を減らすことができる。   In addition, the inclination angle of the face area of the predetermined photographic image is calculated, and the position of displaying the face decoration image is determined by rotating the predetermined face decoration image based on the calculated inclination angle of the face area. The user's operation of rotating the face decoration image again to the inclination angle of the face area can be reduced.

更に、所定の写真画像の顔領域の大きさを算出し、算出した顔領域の大きさに基づいて所定の顔飾り付け画像を表示する大きさを決定するため、写真画像の顔領域の大きさに応じて顔飾り付け画像の大きさを変更し直すというユーザの操作を減らすことができる。   Further, since the size of the face area of the predetermined photographic image is calculated, and the size of displaying the predetermined face decoration image is determined based on the calculated size of the face area, the size of the face area of the photographic image is determined. Accordingly, the user's operation of changing the size of the face decoration image again can be reduced.

更にまた、所定の写真画像の顔領域の数をカウントし、カウントした顔領域の数が2以上であるときには、複数の顔領域のうち最も面積の大きな顔領域を基準として顔飾り付け画像を表示する位置を決定するため、写真画像中に複数の顔領域があるときでも、選定された顔領域とユーザが顔飾り付け画像を付けたいと思っていた顔領域とが一致していれば、顔飾り付け画像を配置し直すというユーザの操作を減らすことができる。   Furthermore, the number of face areas of a predetermined photographic image is counted, and when the number of face areas counted is 2 or more, a face decoration image is displayed based on the face area having the largest area among the plurality of face areas. To determine the position, even if there are multiple face areas in the photo image, if the selected face area matches the face area that the user wanted to attach the face decoration image to, the face decoration image The user's operation of rearranging can be reduced.

そしてまた、所定の写真画像の顔領域の数が予め定めた上限値以上のときは、1つの顔領域を自動選定しても、その顔領域とユーザの意図した顔領域とが一致する確率が低いため、顔飾り付け画像を所定の固定位置に表示する。   In addition, when the number of face areas of a predetermined photographic image is equal to or greater than a predetermined upper limit, even if one face area is automatically selected, there is a probability that the face area matches the face area intended by the user. Since it is low, the face decoration image is displayed at a predetermined fixed position.

なお、本発明は上述した実施形態に何ら限定されることはなく、本発明の技術的範囲に属する限り種々の態様で実施し得ることはいうまでもない。   It should be noted that the present invention is not limited to the above-described embodiment, and it goes without saying that the present invention can be implemented in various modes as long as it belongs to the technical scope of the present invention.

例えば、上述した実施形態では、フォトプリンタ10は印刷機構40の下部にインクカートリッジ44を装着するオフキャリッジ式の印刷機構40としたが、キャリッジ43にインクカートリッジ44を装着するオンキャリッジ式の印刷機構としてもよい。また、インクジェット方式の印刷機構としたが、電子写真方式やドットインパクト方式などのプリンタに本発明を適用してもよいし、プリンタのほかにスキャナなどの機能を併せ持つ複合機に本発明を適用してもよい。   For example, in the above-described embodiment, the photo printer 10 is the off-carriage type printing mechanism 40 in which the ink cartridge 44 is mounted below the printing mechanism 40, but the on-carriage type printing mechanism in which the ink cartridge 44 is mounted on the carriage 43. It is good. Although the inkjet printing mechanism is used, the present invention may be applied to a printer such as an electrophotographic method or a dot impact method, or the present invention may be applied to a multi-function machine having a function of a scanner in addition to the printer. May be.

上述した実施形態では、ステップS120で顔追従フラグが値1であると判定されたときには、常に顔認識処理を行うこととしたが、必ずしもそのようにする必要はない。例えば、顔認識処理ルーチンの終了前に今回の写真画像のファイル名に対応する形式で矩形の座標等をRAM53に記憶し、顔認識処理(ステップS130)を行う前に、顔認識処理を行おうとしている写真画像に対応する形式で矩形の座標等がRAM53に記憶されているか否かを判定するステップを加え、矩形の座標等がRAM53に記憶されていると判定したときには、顔認識処理(ステップS130)を行う代わりに、その写真画像に対応する矩形の座標等をRAM53から読み取ることとしてもよい。こうすれば、一度顔認識処理を行った写真画像を再度読み込むときには、再度顔認識処理を行わなくてもよいため、処理時間を短縮することができる。   In the above-described embodiment, the face recognition process is always performed when it is determined in step S120 that the face following flag is 1, but this is not necessarily required. For example, before the end of the face recognition processing routine, rectangular coordinates and the like are stored in the RAM 53 in a format corresponding to the file name of the current photographic image, and the face recognition processing is performed before the face recognition processing (step S130). In addition to adding a step of determining whether or not rectangular coordinates or the like are stored in the RAM 53 in a format corresponding to the photographic image, and when determining that the rectangular coordinates or the like are stored in the RAM 53, face recognition processing (step Instead of performing S130), rectangular coordinates or the like corresponding to the photographic image may be read from the RAM 53. In this way, when the photographic image that has been subjected to the face recognition process is read again, the face recognition process does not have to be performed again, so that the processing time can be shortened.

上述した実施形態では、ステップS170で矩形の左上座標の位置に従って、90°毎に顔領域の傾き角度を定めることとしたが、顔領域検出処理で検出した目及び口の位置関係から顔領域の上下方向を検出し、写真画像の上下線を基準として左右の目を結ぶ直線が時計回り方向になす角度を顔領域の傾き角度として算出してもよいし、写真画像の上下線を基準として矩形の左上座標と矩形の右上座標とを結ぶ線分が時計回り方向になす角度を顔領域の傾き角度として算出してもよい。こうすれば、90°毎に算出した場合に比べて、より細かな角度で顔領域の傾き角度を算出することができるため、より細かな角度で顔飾り付け画像を回転することができる。   In the above-described embodiment, the inclination angle of the face area is determined every 90 ° according to the position of the upper left coordinate of the rectangle in step S170. However, the face area is detected based on the positional relationship between the eyes and mouth detected by the face area detection process. The vertical direction may be detected, and the angle formed by the straight line connecting the left and right eyes with respect to the upper and lower lines of the photographic image in the clockwise direction may be calculated as the tilt angle of the face area. An angle formed by a line segment connecting the upper left coordinates of the rectangle and the upper right coordinates of the rectangle in the clockwise direction may be calculated as the inclination angle of the face area. In this way, since the tilt angle of the face area can be calculated at a finer angle than when calculated every 90 °, the face decoration image can be rotated at a finer angle.

上述した実施形態では、ステップS200で配置された顔飾り付け画像の全部の領域が写真画像領域の内部に配置されているときに、飾り付け画像の配置位置が相応しい位置であると判定することとしたが、顔飾り付け画像毎に大きさの範囲を予め定め、顔飾り付け画像の大きさが予め定められた範囲内の大きさで配置されたときに飾り付け画像の配置位置が相応しい位置であると判定するものとしてもよい。例えば、顔飾り付け画像が夢マーク83や吹き出しマーク84であるときには、顔飾り付け画像を小さく表示すると文字が書き込めず、逆に大きく表示すると不要な手書き欄が増えてしまうことになる。このようなときには、ユーザが顔飾り付け画像の大きさを操作し直す必要があるため、本発明の効果を十分に得ることができない。   In the above-described embodiment, when all the areas of the face decoration image arranged in step S200 are arranged in the photographic image area, it is determined that the arrangement position of the decoration image is an appropriate position. The size range is determined in advance for each face decoration image, and when the size of the face decoration image is arranged within the predetermined range, it is determined that the arrangement position of the decoration image is an appropriate position It is good. For example, when the face decoration image is the dream mark 83 or the balloon mark 84, characters cannot be written if the face decoration image is displayed in a small size, and on the contrary, unnecessary handwriting fields increase. In such a case, since it is necessary for the user to manipulate the size of the face decoration image again, the effect of the present invention cannot be sufficiently obtained.

上述した実施形態では、顔飾り付け画像及び飾り付け画像情報はフラッシュメモリ54に記憶されているものとしたが、メモリースティックやCD−ROMなど持ち運び可能なリムーバルディスクに記憶されていてもよい。こうすれば、ユーザは様々な顔飾り付け画像を写真画像に配置することができる。   In the embodiment described above, the face decoration image and the decoration image information are stored in the flash memory 54, but may be stored in a portable removable disk such as a memory stick or a CD-ROM. In this way, the user can arrange various face decoration images on the photographic image.

上述した実施形態では、写真画像に顔飾り付け画像を配置することとしたが、写真画像と顔飾り付け画像を合成し記憶する画像合成手段を備えていてもよい。こうすれば、ユーザは加工した写真画像を記憶することができる。   In the embodiment described above, the face decoration image is arranged on the photographic image. However, an image composition means for combining and storing the photographic image and the face decoration image may be provided. In this way, the user can store the processed photographic image.

フォトプリンタ10の斜視図。1 is a perspective view of a photo printer 10. FIG. フォトプリンタ10の構成の概略を示すブロック図。1 is a block diagram showing an outline of the configuration of a photo printer. 飾り付け画像配置処理ルーチンの一例を示すフローチャート。The flowchart which shows an example of a decoration image arrangement | positioning processing routine. 飾り付け画像選択画面の一例を示す説明図。Explanatory drawing which shows an example of a decoration image selection screen. 顔飾り付け画像及び飾り付け画像情報の説明図。Explanatory drawing of a face decoration image and decoration image information. 顔認識処理ルーチンの一例を示すフローチャート。The flowchart which shows an example of a face recognition process routine. 写真画像中の位置座標を説明する説明図。Explanatory drawing explaining the position coordinate in a photograph image. 顔選定処理ルーチンの一例を示すフローチャート。The flowchart which shows an example of a face selection process routine. 顔領域傾き角度と矩形の左上座標及び右上座標との関係を表す説明図。Explanatory drawing showing the relationship between a face area inclination angle, and the upper left coordinate and upper right coordinate of a rectangle. 顔飾り付け画像の配置位置の一例を説明する説明図。Explanatory drawing explaining an example of the arrangement position of a face decoration image.

符号の説明Explanation of symbols

10 フォトプリンタ、12 プリンタ本体、14 前面扉、18 メモリカードスロット、20 操作パネル、22 ディスプレイ、24 ボタン群、24a 電源ボタン、24b 表示切替ボタン、24c メニューボタン、24d キャンセルボタン、24e 印刷ボタン、24f 保存ボタン、24g 上下左右ボタン、24h OKボタン、30 カバー、32 カバー支持軸、34 窓、40 印刷機構、41 キャリッジベルト、42 ガイド、43 キャリッジ、44 インクカートリッジ、45 印刷ヘッド、46 搬送ローラ、48 給紙口、49 用紙ガイド、50 コントローラ、51 CPU、52 ROM、53 RAM、54 フラッシュメモリ、55 I/F、57 バス、81 フレームマーク、82 垂れ幕マーク、83 夢マーク、84 吹き出しマーク、85 涙マーク、86 怒りマーク、87 閃きマーク、88 メガネマーク、S 記録紙、M メモリーカード。   10 Photo Printer, 12 Printer Body, 14 Front Door, 18 Memory Card Slot, 20 Operation Panel, 22 Display, 24 Button Group, 24a Power Button, 24b Display Switch Button, 24c Menu Button, 24d Cancel Button, 24e Print Button, 24f Save button, 24g Up / down / left / right button, 24h OK button, 30 cover, 32 cover support shaft, 34 window, 40 printing mechanism, 41 carriage belt, 42 guide, 43 carriage, 44 ink cartridge, 45 print head, 46 transport roller, 48 Paper feed port, 49 Paper guide, 50 Controller, 51 CPU, 52 ROM, 53 RAM, 54 Flash memory, 55 I / F, 57 Bus, 81 Frame mark, 82 Banner mark, 83 Yumema Click, 84 balloon mark, 85 tears mark, 86 anger mark, 87 flash mark, 88 glasses mark, S recording paper, M memory card.

Claims (8)

各種画像を表示可能な画像表示手段と、
顔に関する飾り付け画像である顔飾り付け画像を記憶する顔飾り付け画像記憶手段と、
顔領域に対する顔飾り付け画像の相対位置を定めた相対位置情報を記憶する相対位置情報記憶手段と、
所定の写真画像の顔領域を検出する顔領域検出手段と、
前記顔領域検出手段によって前記所定の写真画像の顔領域が検出され且つ前記顔飾り付け画像記憶手段から所定の顔飾り付け画像が読み込まれたとき、該所定の顔飾り付け画像の相対位置情報を前記相対位置情報記憶手段から読み込み、前記相対位置情報と前記所定の写真画像の顔領域の絶対位置とに基づいて、前記所定の写真画像における該所定の顔飾り付け画像の表示位置を決定し、該表示位置に該所定の顔飾り付け画像が表示されるよう前記画像表示手段を制御する制御手段と、
を備えた画像処理装置。
Image display means capable of displaying various images;
Face decoration image storage means for storing a face decoration image which is a decoration image related to the face;
Relative position information storage means for storing relative position information defining the relative position of the face decoration image with respect to the face area;
Face area detecting means for detecting a face area of a predetermined photographic image;
When the face area of the predetermined photographic image is detected by the face area detecting means and the predetermined face decoration image is read from the face decoration image storage means, the relative position information of the predetermined face decoration image is obtained as the relative position. Read from the information storage means, based on the relative position information and the absolute position of the face area of the predetermined photographic image, determine the display position of the predetermined face decoration image in the predetermined photographic image, Control means for controlling the image display means so that the predetermined face decoration image is displayed;
An image processing apparatus.
請求項1に記載の画像処理装置であって、
前記顔領域検出手段で検出された前記所定の写真画像の顔領域の前記写真画像の所定方向に対する傾き角度を算出する顔傾き角度算出手段、
を備え、
前記制御手段は、前記顔領域検出手段によって前記所定の写真画像の顔領域が検出され且つ前記顔飾り付け画像記憶手段から所定の顔飾り付け画像が読み込まれたとき、該所定の顔飾り付け画像の相対位置情報を前記相対位置情報記憶手段から読み込み、前記所定の写真画像の顔領域の傾き角度に基づいて該所定の顔飾り付け画像を回転させると共に、前記相対位置情報と前記所定の写真画像の顔領域の絶対位置とに基づいて前記所定の写真画像における該所定の顔飾り付け画像の表示位置を決定し、該表示位置に該所定の顔飾り付け画像が表示されるよう前記画像表示手段を制御する、
画像処理装置。
The image processing apparatus according to claim 1,
A face inclination angle calculating means for calculating an inclination angle of the face area of the predetermined photographic image detected by the face area detecting means with respect to a predetermined direction of the photographic image;
With
The control means detects the relative position of the predetermined face decoration image when the face area of the predetermined photographic image is detected by the face area detection means and the predetermined face decoration image is read from the face decoration image storage means. Information is read from the relative position information storage means, the predetermined face decoration image is rotated based on the inclination angle of the face area of the predetermined photo image, and the relative position information and the face area of the predetermined photo image are Determining the display position of the predetermined face decoration image in the predetermined photographic image based on the absolute position, and controlling the image display means so that the predetermined face decoration image is displayed at the display position;
Image processing device.
請求項1又は2に記載の画像処理装置であって、
前記所定の写真画像の顔領域の大きさを算出する顔領域面積算出手段、
を備え、
前記制御手段は、前記顔領域検出手段によって前記所定の写真画像の顔領域が検出され且つ前記顔飾り付け画像記憶手段から所定の顔飾り付け画像が読み込まれたとき、該所定の顔飾り付け画像の相対位置情報を前記相対位置情報記憶手段から読み込み、前記所定の写真画像の顔領域の大きさに基づいて該所定の顔飾り付け画像を表示する大きさを決定すると共に、前記相対位置情報と前記所定の写真画像の顔領域の絶対位置とに基づいて前記所定の写真画像における該所定の顔飾り付け画像の表示位置を決定し、前記表示位置に該所定の顔飾り付け画像が表示されるよう前記画像表示手段を制御する、
画像処理装置。
The image processing apparatus according to claim 1, wherein:
A face area calculation means for calculating the size of the face area of the predetermined photographic image;
With
The control means detects the relative position of the predetermined face decoration image when the face area of the predetermined photographic image is detected by the face area detection means and the predetermined face decoration image is read from the face decoration image storage means. Information is read from the relative position information storage means, the size for displaying the predetermined face decoration image is determined based on the size of the face area of the predetermined photo image, and the relative position information and the predetermined photo are determined. The display position of the predetermined face decoration image in the predetermined photographic image is determined based on the absolute position of the face area of the image, and the image display means is configured to display the predetermined face decoration image at the display position. Control,
Image processing device.
請求項1〜3のいずれかに記載の画像処理装置であって、
前記顔領域検出手段で検出された前記顔領域の数をカウントする顔領域数カウント手段、
を備え、
前記制御手段は、前記顔領域検出手段によって前記所定の写真画像の顔領域が検出され且つ前記顔飾り付け画像記憶手段から所定の顔飾り付け画像が読み込まれたのち、前記顔領域数カウント手段によって前記顔領域の数が2以上カウントされたとき、該所定の顔飾り付け画像の相対位置情報を前記相対位置情報記憶手段から読み込み、前記相対位置情報と前記所定の写真画像の2以上の顔領域の中から所定の規則に従って定めた顔領域の前記絶対位置とに基づいて前記所定の写真画像における該所定の顔飾り付け画像の表示位置を決定し、前記表示位置に該所定の顔飾り付け画像が表示されるよう前記画像表示手段を制御する、
画像処理装置。
The image processing apparatus according to any one of claims 1 to 3,
Face area number counting means for counting the number of face areas detected by the face area detecting means;
With
The control means detects the face area of the predetermined photographic image by the face area detection means and reads the predetermined face decoration image from the face decoration image storage means, and then counts the face by the face area number counting means. When the number of areas is counted two or more, the relative position information of the predetermined face decoration image is read from the relative position information storage means, and the relative position information and the two or more face areas of the predetermined photographic image are read out. The display position of the predetermined face decoration image in the predetermined photographic image is determined based on the absolute position of the face area determined according to a predetermined rule, and the predetermined face decoration image is displayed at the display position. Controlling the image display means;
Image processing device.
請求項1〜4のいずれかに記載の画像処理装置であって、
前記顔領域検出手段で検出された前記顔領域の数が予め定めた上限値以上であるか否かを判定する顔領域数判定手段、
を備え、
前記制御手段は、前記顔領域検出手段によって前記所定の写真画像の顔領域が検出され且つ前記顔飾り付け画像記憶手段から所定の顔飾り付け画像が読み込まれたのち、前記顔領域数判定手段で前記顔領域の数が予め定めた上限値以上であると判定されたとき、該所定の顔飾り付け画像の表示位置を所定の固定位置に決定し、前記表示位置に該所定の顔飾り付け画像が表示されるよう前記画像表示手段を制御する、
画像処理装置。
The image processing apparatus according to any one of claims 1 to 4,
Face area number determining means for determining whether or not the number of the face areas detected by the face area detecting means is equal to or greater than a predetermined upper limit;
With
The control means detects the face area of the predetermined photographic image by the face area detection means and reads the predetermined face decoration image from the face decoration image storage means, and then determines the face area by the face area number determination means. When it is determined that the number of areas is equal to or greater than a predetermined upper limit value, the display position of the predetermined face decoration image is determined as a predetermined fixed position, and the predetermined face decoration image is displayed at the display position. Controlling the image display means,
Image processing device.
請求項1〜5のいずれかに記載の画像処理装置と、
印刷媒体に印刷を実行可能な印刷実行手段と、
を備えた印刷装置。
An image processing apparatus according to claim 1;
Print execution means capable of executing printing on a print medium;
Printing device with
各種画像を表示可能な画像表示手段と、顔に関する飾り付け画像である顔飾り付け画像を記憶する顔飾り付け画像記憶手段と、顔領域に対する顔飾り付け画像の相対位置を定めた相対位置情報を記憶する相対位置情報記憶手段と、を備えた画像処理装置をコンピュータ・ソフトウェアで制御する制御方法であって、
(a)所定の写真画像の顔領域を検出するステップと、
(b)前記ステップ(a)で検出した顔領域に飾り付ける所定の顔飾り付け画像を前記顔飾り付け画像記憶手段から読み込み、該所定の顔飾り付け画像の相対位置情報を前記相対位置情報記憶手段から読み込み、該相対位置情報と前記所定の写真画像の顔領域の絶対位置とに基づいて、該所定の写真画像における該所定の顔飾り付け画像の表示位置を決定し、該表示位置に該所定の顔飾り付け画像が表示されるよう前記画像表示手段を制御するステップと、
を含む画像処理装置の制御方法。
Image display means capable of displaying various images, face decoration image storage means for storing a face decoration image that is a face decoration image, and relative position for storing relative position information that defines the relative position of the face decoration image with respect to the face area A control method for controlling an image processing apparatus provided with information storage means by computer software,
(A) detecting a face area of a predetermined photographic image;
(B) A predetermined face decoration image to be decorated on the face area detected in the step (a) is read from the face decoration image storage means, and relative position information of the predetermined face decoration image is read from the relative position information storage means, Based on the relative position information and the absolute position of the face area of the predetermined photographic image, a display position of the predetermined face decoration image in the predetermined photographic image is determined, and the predetermined face decoration image is set at the display position. Controlling the image display means so that is displayed;
A method for controlling an image processing apparatus.
請求項7に記載の画像処理装置の制御方法の各ステップを1又は複数のコンピュータに実現させるための制御プログラム。   A control program for causing one or more computers to realize each step of the control method of the image processing apparatus according to claim 7.
JP2007036372A 2007-02-16 2007-02-16 Image processor, its control method, program, and printer Withdrawn JP2008203960A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007036372A JP2008203960A (en) 2007-02-16 2007-02-16 Image processor, its control method, program, and printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007036372A JP2008203960A (en) 2007-02-16 2007-02-16 Image processor, its control method, program, and printer

Publications (1)

Publication Number Publication Date
JP2008203960A true JP2008203960A (en) 2008-09-04

Family

ID=39781438

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007036372A Withdrawn JP2008203960A (en) 2007-02-16 2007-02-16 Image processor, its control method, program, and printer

Country Status (1)

Country Link
JP (1) JP2008203960A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9519950B2 (en) 2013-12-20 2016-12-13 Furyu Corporation Image generating apparatus and image generating method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002077592A (en) * 2000-04-13 2002-03-15 Fuji Photo Film Co Ltd Image processing method
JP2005242566A (en) * 2004-02-25 2005-09-08 Canon Inc Image composition device and method
JP2007004677A (en) * 2005-06-27 2007-01-11 Seiko Epson Corp Comment layout device and album making device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002077592A (en) * 2000-04-13 2002-03-15 Fuji Photo Film Co Ltd Image processing method
JP2005242566A (en) * 2004-02-25 2005-09-08 Canon Inc Image composition device and method
JP2007004677A (en) * 2005-06-27 2007-01-11 Seiko Epson Corp Comment layout device and album making device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9519950B2 (en) 2013-12-20 2016-12-13 Furyu Corporation Image generating apparatus and image generating method

Similar Documents

Publication Publication Date Title
JP5375894B2 (en) Nail printing apparatus and printing control method
JP5141742B2 (en) Nail printing apparatus and printing control method
US20090051946A1 (en) Image area selecting method
JP4229072B2 (en) Image processing device, printing device
JP2006231651A (en) Printing apparatus
JP2007065940A (en) Image selection device and image selection means
US20050128510A1 (en) Method for selecting images for action by an imaging apparatus
JP4924279B2 (en) Image processing apparatus, control method thereof, and program
US20020001010A1 (en) Image printing system and printing method of the same
JP2012027848A (en) Print control unit, printer and printing preview method
JP2008203960A (en) Image processor, its control method, program, and printer
JP4660075B2 (en) Multi-function printer, label printing method, program thereof, and printing system
JP2009234244A (en) Printer, its control method and program
JP2009164871A (en) Image forming device, control method thereof, and program
JP2014019055A (en) Printing device, and printing method
JP6787298B2 (en) Image processing device
JP4186116B2 (en) Image processing apparatus and method
JP2008242650A (en) Image processing apparatus, method for controlling the same, and program of the same
JP2008122772A (en) Image display device, image display method, and its program
JP4765907B2 (en) Image processing apparatus, control method thereof, and program thereof
JP4858049B2 (en) Printer, control method thereof, and program thereof
JP2011104879A (en) Image forming apparatus
JP2011166339A (en) Image forming apparatus and program
JP3314737B2 (en) Printer
JP5556331B2 (en) Image processing apparatus, image processing method, and program thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090811

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110708

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110712

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20110818