JP5556331B2 - Image processing apparatus, image processing method, and program thereof - Google Patents

Image processing apparatus, image processing method, and program thereof Download PDF

Info

Publication number
JP5556331B2
JP5556331B2 JP2010098757A JP2010098757A JP5556331B2 JP 5556331 B2 JP5556331 B2 JP 5556331B2 JP 2010098757 A JP2010098757 A JP 2010098757A JP 2010098757 A JP2010098757 A JP 2010098757A JP 5556331 B2 JP5556331 B2 JP 5556331B2
Authority
JP
Japan
Prior art keywords
image
original image
character string
character
character frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2010098757A
Other languages
Japanese (ja)
Other versions
JP2011229059A (en
Inventor
栄治 田中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko 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 JP2010098757A priority Critical patent/JP5556331B2/en
Publication of JP2011229059A publication Critical patent/JP2011229059A/en
Application granted granted Critical
Publication of JP5556331B2 publication Critical patent/JP5556331B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

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

従来、この種の画像処理装置としては、元画像に含まれる人物の顔画像を検出し、顔画像の姿勢が原画像の縦横いずれの方向に沿っているかを判定し、顔画像の面積比に基づいてポートレート写真、記念写真、風景写真のいずれであるかを判定し、判定結果に応じて原画像データに補正を行うものが提案されている(例えば、特許文献1参照)。この装置では、原画像に基づいて撮影意図を反映した写真プリントを得ることができる。   Conventionally, this type of image processing apparatus detects a face image of a person included in an original image, determines whether the orientation of the face image is in the vertical or horizontal direction of the original image, and determines the area ratio of the face image. It has been proposed to determine whether the photograph is a portrait photograph, a commemorative photograph, or a landscape photograph, and to correct the original image data according to the determination result (see, for example, Patent Document 1). In this apparatus, a photographic print reflecting the photographing intention can be obtained based on the original image.

特開2007−200068号公報Japanese Patent Laid-Open No. 2007-200068

ところで、上述の装置などでは、例えば文字列を画像上に配置したいことがある。このように、画像上に文字列を配置するとき、上述の装置などでは、ユーザーが意図するような文字列の配置を行うものではなかった。そして、配置する文字列の位置や大きさ、方向などをユーザーが変更しながら文字列を配置した画像を作成しなければならず、操作が煩雑であった。   By the way, in the above-described apparatus or the like, for example, a character string may be arranged on an image. As described above, when the character string is arranged on the image, the above-described device or the like does not arrange the character string as intended by the user. Then, the user has to create an image in which character strings are arranged while changing the position, size, direction, and the like of the character strings to be arranged, and the operation is complicated.

本発明は、このような課題に鑑みなされたものであり、ユーザーの意図にできるだけ応える画像をより容易に作製することができる画像処理装置、画像処理方法及びそのプログラムを提供することを主目的とする。   The present invention has been made in view of such problems, and has as its main object to provide an image processing apparatus, an image processing method, and a program thereof that can more easily produce an image that meets the user's intention as much as possible. To do.

本発明は、上述の主目的を達成するために以下の手段を採った。   The present invention adopts the following means in order to achieve the main object described above.

本発明の画像処理装置は、
装飾される元となる画像としてユーザーによって選択された元画像を取得する画像取得手段と、
前記元画像上に配置する文字列を取得する文字列取得手段と、
前記取得した元画像を解析して前記元画像上に含まれる顔領域を検出する領域検出手段と、
前記検出した顔領域に重ならない前記元画像上の位置に、前記取得した元画像の上下方向に合わせた方向で、前記取得した文字列を配置する文字枠の位置及び大きさを設定する設定手段と、
前記文字枠の位置及び大きさに基づいて前記文字列を前記元画像上に配置した画像である装飾済画像を作成し該作成した装飾済画像を出力する出力手段と、
を備えたものである。
The image processing apparatus of the present invention
Image acquisition means for acquiring an original image selected by the user as an image to be decorated;
A character string acquisition means for acquiring a character string to be arranged on the original image;
Area detecting means for analyzing the acquired original image and detecting a face area included on the original image;
Setting means for setting a position and size of a character frame in which the acquired character string is arranged in a direction aligned with a vertical direction of the acquired original image at a position on the original image that does not overlap the detected face area When,
Output means for creating a decorated image that is an image in which the character string is arranged on the original image based on the position and size of the character frame, and outputting the created decorated image;
It is equipped with.

この画像処理装置では、ユーザーによって選択された元画像及び元画像上に配置する文字列を取得し、取得した元画像に含まれる顔領域を検出し、検出した顔領域に重ならない元画像上の位置に、元画像の上下方向に合わせた方向で、取得した文字列を配置する文字枠の位置及び大きさを設定する。そして、設定した文字枠に基づいて文字列を元画像上に配置することにより装飾済画像を作成し、この作成した装飾済画像を出力する。このように、元画像の上下方向に合わせて文字列を配置するため、例えば画像に対して間違った方向に文字列が配置されてしまうことがより少ない。また、元画像上に配置する文字列が顔領域上に重ならないため、より適した画像とすることができる。したがって、ユーザーの意図にできるだけ応える画像をより容易に作製することができる。このとき、前記文字列取得手段は、ユーザーの入力した文字列を取得するものとしてもよいし、元画像に含まれる作成日時の文字列を該元画像から読み出して取得するものとしてもよい。   In this image processing apparatus, an original image selected by a user and a character string to be arranged on the original image are acquired, a face area included in the acquired original image is detected, and an original image that does not overlap the detected face area is detected. The position and size of the character frame in which the acquired character string is arranged are set in the position in a direction that matches the vertical direction of the original image. Then, a decorated image is created by arranging a character string on the original image based on the set character frame, and the created decorated image is output. Thus, since the character strings are arranged in accordance with the vertical direction of the original image, for example, the character strings are less likely to be arranged in the wrong direction with respect to the image. Further, since the character string arranged on the original image does not overlap the face area, a more suitable image can be obtained. Therefore, it is possible to more easily produce an image that meets the user's intention as much as possible. At this time, the character string acquisition unit may acquire a character string input by the user, or may read and acquire a character string of a creation date and time included in the original image from the original image.

本発明の画像処理装置において、前記設定手段は、前記元画像の上下方向に関する情報が該元画像に付帯していないときには、前記検出した顔領域に含まれる顔の上下方向、前記元画像に含まれる1以上の色領域の色に関する情報及び前記元画像に含まれるエッジ情報のうち少なくとも1以上に基づいて前記元画像の上下方向を判定し、該判定結果の上下方向に合わせた方向に基づいて前記文字枠を設定し、前記出力手段は、前記上下方向にも基づいて前記装飾済画像を作成するものとしてもよい。こうすれば、元画像の上下方向をより確実なものとすることができ、ユーザーの意図により応える画像を作製することができる。   In the image processing apparatus according to the aspect of the invention, the setting unit may include the vertical direction of the face included in the detected face area in the original image when the information about the vertical direction of the original image is not attached to the original image. The vertical direction of the original image is determined based on at least one or more of the information relating to the color of the one or more color regions and the edge information included in the original image, and based on the direction in accordance with the vertical direction of the determination result The character frame may be set, and the output unit may create the decorated image based on the vertical direction. In this way, the vertical direction of the original image can be made more reliable, and an image that meets the user's intention can be produced.

本発明の画像処理装置において、前記領域検出手段は、前記元画像に含まれる1以上の色領域をも検出し、前記設定手段は、前記検出した顔領域に重ならず、且つ前記検出した1つの色領域上に前記文字枠が含まれるように該文字枠を設定するものとしてもよい。こうすれば、1つの色領域上に文字列が配置されるため、文字列がより読みやすく、ユーザーの意図により応える画像を作製することができる。このとき、前記設定手段は、前記文字枠を配置する色領域の幅と、前記取得した文字列の長さと、該文字列に含まれる単語に基づいて前記文字枠を複数段に設定するものとしてもよい。こうすれば、1つの色領域上に複数段に亘って文字列が配置されるため、文字列がより読みやすく、ユーザーの意図により応える画像を作製することができる。ここで、「文字列に含まれる単語に基づいて」とは、単語の数としてもよいし、単語に含まれる文字数としてもよい。また、前記設定手段は、前記複数段に文字枠を設定するに際して、各段の文字数がより均一になるよう前記文字列の配置を行うよう前記文字枠を設定するものとしてもよい。   In the image processing apparatus of the present invention, the area detection unit also detects one or more color areas included in the original image, and the setting unit does not overlap the detected face area and the detected 1 The character frame may be set so that the character frame is included in one color region. In this way, since the character string is arranged on one color area, the character string is easier to read, and an image that meets the user's intention can be produced. At this time, the setting means sets the character frame in a plurality of stages based on the width of the color region in which the character frame is arranged, the length of the acquired character string, and the word included in the character string. Also good. In this way, since the character strings are arranged in a plurality of stages on one color region, the character strings are easier to read and an image that meets the user's intention can be produced. Here, “based on words included in the character string” may be the number of words or the number of characters included in the word. The setting unit may set the character frame so that the character strings are arranged so that the number of characters in each step is more uniform when the character frame is set in the plurality of steps.

本発明の画像処理装置において、前記設定手段は、前記顔領域に重ならないという条件を含む所定条件の下での最大のフォントサイズとなるよう前記文字枠を設定するものとしてもよい。こうすれば、文字サイズがより大きいため、視認しやすく、ユーザーの意図により応える画像を作製することができる。ここで「所定条件」には、例えば、元画像と文字列とが視認しやすい条件などを含むものとしてもよい。また、「最大のフォントサイズ」とは、例えば、元画像と文字列とが視認しやすい最大のフォントサイズとしてもよい。   In the image processing apparatus of the present invention, the setting means may set the character frame so as to have a maximum font size under a predetermined condition including a condition that the face area does not overlap. In this way, since the character size is larger, it is easy to visually recognize and an image that meets the user's intention can be produced. Here, the “predetermined condition” may include, for example, a condition where the original image and the character string are easily visible. In addition, the “maximum font size” may be, for example, the maximum font size in which the original image and the character string are easily visible.

本発明の画像処理装置において、前記出力手段は、着色剤を用いて印刷媒体へ画像を形成する印刷手段へ前記装飾済画像を出力するものとしてもよい。   In the image processing apparatus of the present invention, the output unit may output the decorated image to a printing unit that forms an image on a print medium using a colorant.

本発明の画像処理方法は、
(a)装飾される元となる画像としてユーザーによって選択された元画像を取得するステップと、
(b)前記元画像上に配置する文字列を取得するステップと、
(c)前記取得した元画像を解析して前記元画像上に含まれる顔領域を検出するステップと、
(d)前記検出した顔領域に重ならない前記元画像上の位置に、前記取得した元画像の上下方向に合わせた方向で、前記取得した文字列を配置する文字枠の位置及び大きさを設定するステップと、
(e)前記文字枠の位置及び大きさに基づいて前記文字列を前記元画像上に配置した画像である装飾済画像を作成し該作成した装飾済画像を出力するステップと、
を含むものである。
The image processing method of the present invention includes:
(A) obtaining an original image selected by the user as an original image to be decorated;
(B) obtaining a character string to be arranged on the original image;
(C) analyzing the acquired original image to detect a face area included on the original image;
(D) A position and size of a character frame in which the acquired character string is arranged in a direction aligned with a vertical direction of the acquired original image at a position on the original image that does not overlap the detected face area. And steps to
(E) creating a decorated image that is an image in which the character string is arranged on the original image based on the position and size of the character frame, and outputting the created decorated image;
Is included.

この画像処理方法では、上述した画像処理装置と同様に、元画像の上下方向に合わせて文字列を配置するため、例えば画像に対して間違った方向に文字列が配置されてしまうことがより少ない。また、元画像上に配置する文字列が顔領域上に重ならないため、より適した画像とすることができる。したがって、ユーザーの意図にできるだけ応える画像をより容易に作製することができる。なお、この画像処理方法において、上述した画像処理装置の種々の態様を採用してもよいし、また、上述した画像処理装置の各機能を実現するようなステップを追加してもよい。   In this image processing method, as in the image processing apparatus described above, the character string is arranged in the vertical direction of the original image, and therefore, for example, the character string is less likely to be arranged in the wrong direction with respect to the image. . Further, since the character string arranged on the original image does not overlap the face area, a more suitable image can be obtained. Therefore, it is possible to more easily produce an image that meets the user's intention as much as possible. In this image processing method, various aspects of the above-described image processing apparatus may be adopted, and steps for realizing each function of the above-described image processing apparatus may be added.

本発明のプログラムは、上述した画像処理方法の各ステップを1以上のコンピューターに実現させるためのものである。このプログラムは、コンピューターが読み取り可能な記憶媒体(例えばハードディスク、ROM、FD、CD、DVDなど)に記憶されていてもよいし、伝送媒体(インターネットやLANなどの通信網)を介してあるコンピューターから別のコンピューターへ配信されてもよいし、その他どのような形で授受されてもよい。このプログラムを1つのコンピューターに実行させるか又は複数のコンピューターに各ステップを分担して実行させれば、上述した画像処理方法の各ステップが実行されるため、この方法と同様の作用効果を得ることができる。   The program of the present invention is for causing one or more computers to realize each step of the above-described image processing method. This program may be stored in a computer-readable storage 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 if each step is shared and executed by a plurality of computers, each step of the above-described image processing method is executed, so that the same effect as this method can be obtained. Can do.

本実施形態であるプリンター20の構成の概略を示す構成図。FIG. 2 is a configuration diagram showing an outline of the configuration of a printer 20 according to the present embodiment. 画像作成処理ルーチンの一例を示すフローチャート。5 is a flowchart illustrating an example of an image creation processing routine. 元画像60から装飾済画像68を作成する説明図。Explanatory drawing which creates the decorated image 68 from the original image 60. FIG. 元画像61から装飾済画像69を作成する説明図。Explanatory drawing which creates the decorated image 69 from the original image 61. FIG.

次に、本発明の実施の形態を図面を用いて説明する。図1は本実施形態であるプリンター20の構成の概略を示す構成図である。本実施形態のプリンター20は、プリンター20の全体をコントロールするコントローラー21と、着色剤としてのインクを印刷媒体としての記録紙Sに吐出するプリンター部40と、ガラス面に載置された読取原稿を読み取るスキャナー部45と、各種情報の表示やユーザーからの入力を受け付ける操作パネル50と、メモリーカード56とのデータの入出力を司るメモリーカードリーダー55とを備えている。このプリンター20は、プリンター部40とスキャナー部45とを備え、プリンター機能、スキャナー機能及びコピー機能を有するマルチファンクションプリンターとして構成されている。このプリンター20では、メインコントローラー21やプリンター部40、スキャナー部45、操作パネル50及びメモリーカードリーダー55は、バス29によって電気的に接続されている。   Next, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a configuration diagram showing an outline of a configuration of a printer 20 according to the present embodiment. The printer 20 of the present embodiment includes a controller 21 that controls the entire printer 20, a printer unit 40 that discharges ink as a colorant onto a recording sheet S as a print medium, and a read document placed on a glass surface. A scanner unit 45 for reading, an operation panel 50 for receiving display of various information and input from a user, and a memory card reader 55 for inputting / outputting data to / from the memory card 56 are provided. The printer 20 includes a printer unit 40 and a scanner unit 45, and is configured as a multifunction printer having a printer function, a scanner function, and a copy function. In the printer 20, the main controller 21, the printer unit 40, the scanner unit 45, the operation panel 50, and the memory card reader 55 are electrically connected by a bus 29.

コントローラー21は、CPU22を中心とするマイクロプロセッサーとして構成されており、各種処理プログラムを記憶しデータを書き換え可能なフラッシュROM23と、一時的にデータを記憶したりデータを保存したりするRAM24とを備えている。このコントローラー21は、印刷処理を実行するようプリンター部40を制御すると共に、画像読取処理を実行するようスキャナー部45を制御する。また、このコントローラー21は、機能ブロックとして、画像データを取得する元画像取得部31と、画像データに配置する文字を取得する文字列取得部32と、画像データの領域を検出する領域検出部34と、配置する文字枠を設定する文字枠設定部35と、作成した画像を出力する画像出力部36とを備えている。元画像取得部31は、メモリーカード56に格納されている画像データやスキャナー部45で読み取ったあとの画像データを、装飾される元となる画像としてユーザーによって選択された元画像として取得する。文字列取得部32は、メモリーカード56の画像データに付帯する撮影日時や操作パネル50で入力された文字列などを元画像上に配置する文字列として取得する。領域検出部34は、元画像に含まれる1以上の顔領域や、所定色で塗りつぶされた色領域を1以上検出する。文字枠設定部35は、顔領域に重ならない位置に、元画像の上下方向に合わせた方向で、文字列を配置する文字枠の位置及び大きさを設定する。画像出力部36は、文字枠に基づいて文字列を元画像上に配置して装飾済画像を作成し、作成した装飾済画像を操作パネル50やプリンター部40へ出力する。   The controller 21 is configured as a microprocessor centered on the CPU 22 and includes a flash ROM 23 that can store various processing programs and can rewrite data, and a RAM 24 that temporarily stores data and stores data. ing. The controller 21 controls the printer unit 40 to execute the printing process and also controls the scanner unit 45 to execute the image reading process. The controller 21 includes, as functional blocks, an original image acquisition unit 31 that acquires image data, a character string acquisition unit 32 that acquires characters to be arranged in the image data, and an area detection unit 34 that detects an area of the image data. A character frame setting unit 35 for setting a character frame to be arranged, and an image output unit 36 for outputting the created image. The original image acquisition unit 31 acquires the image data stored in the memory card 56 and the image data read by the scanner unit 45 as an original image selected by the user as an image to be decorated. The character string acquisition unit 32 acquires a shooting date and time attached to the image data of the memory card 56, a character string input on the operation panel 50, and the like as a character string to be arranged on the original image. The area detection unit 34 detects one or more face areas included in the original image and one or more color areas filled with a predetermined color. The character frame setting unit 35 sets the position and size of the character frame in which the character string is arranged in a direction that matches the vertical direction of the original image at a position that does not overlap the face area. The image output unit 36 creates a decorated image by arranging a character string on the original image based on the character frame, and outputs the created decorated image to the operation panel 50 or the printer unit 40.

プリンター部40は、記録紙Sへインクを吐出することにより印刷を行う印刷ヘッド42と、記録紙Sを搬送する搬送機構44とを備えた周知のインクジェット方式のカラープリンター機構として構成されている。印刷ヘッド42は、圧電素子に電圧をかけることによりこの圧電素子を変形させてインクを加圧する方式によりノズルから各色のインクを吐出する。なお、インクへ圧力をかける機構は、ヒーターの熱による気泡の発生によるものとしてもよい。搬送機構44は、記録紙Sの給紙位置側に配設された紙送りローラーや、記録紙Sの排紙側に配設された搬送ローラーなどを備えている。   The printer unit 40 is configured as a known inkjet color printer mechanism including a print head 42 that performs printing by ejecting ink onto the recording paper S and a transport mechanism 44 that transports the recording paper S. The print head 42 ejects ink of each color from the nozzles by applying a voltage to the piezoelectric element to deform the piezoelectric element and pressurize the ink. The mechanism for applying pressure to the ink may be based on the generation of bubbles due to the heat of the heater. The transport mechanism 44 includes a paper feed roller disposed on the paper feed position side of the recording paper S, a transport roller disposed on the paper discharge side of the recording paper S, and the like.

スキャナー部45は、フラットベッド式であり、原稿台に載置された原稿を画像データとして読み取る読取センサー46と、原稿を読み取る際に読取センサー46を移動させる移動機構48とを備えた周知のイメージスキャナーとして構成されている。読取センサー46は、原稿に向かって発光したあとの反射光をレッド(R)、グリーン(G)、ブルー(B)の各色に分解してスキャンデータとするセンサーである。   The scanner unit 45 is a flat bed type, and is a known image including a reading sensor 46 that reads a document placed on a document table as image data, and a moving mechanism 48 that moves the reading sensor 46 when reading the document. Configured as a scanner. The reading sensor 46 is a sensor that separates the reflected light after being emitted toward the document into red (R), green (G), and blue (B) colors to obtain scan data.

操作パネル50は、表示部52と操作部54とを備えている。表示部62は、液晶ディスプレイであり、メニューの選択や設定を行う各種操作画面などが表示される。また、操作部54は、電源をオンオフするための電源キーやカーソルを上下左右に移動させるカーソルキー、入力をキャンセルするキャンセルキー,選択内容を決定する決定キーなどがあり、コントローラー21へユーザーの指示を入力できるようになっている。   The operation panel 50 includes a display unit 52 and an operation unit 54. The display unit 62 is a liquid crystal display, and displays various operation screens for selecting and setting menus. The operation unit 54 includes a power key for turning on / off the power, a cursor key for moving the cursor up / down / left / right, a cancel key for canceling the input, a determination key for determining the selection, and the like. Can be entered.

メモリーカードリーダー55は、メモリーカードスロットに挿入されたメモリーカード56との間でデータの入出力を行なうものである。このメモリーカードリーダー55は、メモリーカード56が接続されているとき、メモリーカード56に保存されているファイルを読み出してコントローラー21に送信したりコントローラー21からの命令を入力し該命令に基づいてメモリーカード56にデータを書き込んだりする。   The memory card reader 55 inputs and outputs data with the memory card 56 inserted into the memory card slot. When the memory card 56 is connected, the memory card reader 55 reads a file stored in the memory card 56 and transmits the file to the controller 21 or inputs a command from the controller 21 and based on the command. 56 to write data.

次に、こうして構成された本実施形態のプリンター20の動作、特に、メモリーカード56に記憶された画像を元画像として、この元画像上にユーザーが入力した文字列を配置した装飾済画像を作成する際の動作について説明する。ここでは、元画像データに格納されている撮影日時とユーザーが入力した文字列とを元画像に配置する場合について具体的に説明する。まずユーザーは、図示しない処理選択画面で画像装飾印刷を選択する。この画像装飾印刷は、選択した画像に撮影日時や入力した文字列を配置して印刷する処理である。すると、CPU22は、メモリーカード56に格納された画像を読み出して、選択可能な状態で1以上のサムネイルを表示部52へ配置表示する。ここで、画像が選択されると、CPU22は、選択された画像を元画像として設定すると共に、文字入力画面を表示部52へ表示させる。ユーザーは、操作部54の各種キーを操作して印刷したい文字を入力し、図示しない文字入力画面に配置された画像作成実行キーを押下する。すると、CPU22は、フラッシュROM23に記憶された画像作成処理ルーチンを実行する。図2は、コントローラー21のCPU22により実行される画像作成処理ルーチンの一例を示すフローチャートである。このルーチンでは、CPU22は、元画像取得部31、文字列取得部32、領域検出部34、文字枠設定部35及び画像出力部36を利用して画像を作成・出力する処理を行う。   Next, the operation of the printer 20 according to the present embodiment configured as described above, in particular, an image stored in the memory card 56 is used as an original image, and a decorated image in which a character string input by the user is arranged on the original image is created. The operation when doing this will be described. Here, the case where the shooting date and time stored in the original image data and the character string input by the user are arranged in the original image will be specifically described. First, the user selects image decoration printing on a process selection screen (not shown). This image decoration printing is a process in which a shooting date and an input character string are arranged and printed on a selected image. Then, the CPU 22 reads out the image stored in the memory card 56 and arranges and displays one or more thumbnails on the display unit 52 in a selectable state. Here, when an image is selected, the CPU 22 sets the selected image as an original image and causes the display unit 52 to display a character input screen. The user operates various keys of the operation unit 54 to input characters to be printed, and presses an image creation execution key arranged on a character input screen (not shown). Then, the CPU 22 executes an image creation processing routine stored in the flash ROM 23. FIG. 2 is a flowchart showing an example of an image creation processing routine executed by the CPU 22 of the controller 21. In this routine, the CPU 22 performs processing for creating and outputting an image using the original image acquisition unit 31, the character string acquisition unit 32, the region detection unit 34, the character frame setting unit 35, and the image output unit 36.

このルーチンが開始されると、CPU22は、元画像取得部31を介してメモリーカード56から元画像を取得すると共に(ステップS100)、文字列取得部32を介して元画像データに格納されたこの元画像のメタデータを取得する(ステップS110)。このメタデータには、撮影日時が含まれ、更に、撮影したデジタルカメラが機能として有する場合には、撮影情報として撮影モード(例えばポートレートモードや風景モード)の情報や画像の上下方向の情報などが含まれている。この撮影情報は、例えば、撮影したデジタルカメラがジャイロセンサを有し画像の上下情報を記憶する機能を有する場合や、撮影モードの記憶機能を有するときに、これらの情報が更に画像データに格納される。   When this routine is started, the CPU 22 acquires the original image from the memory card 56 via the original image acquisition unit 31 (step S100) and stores the original image data stored in the original image data via the character string acquisition unit 32. The metadata of the original image is acquired (step S110). This metadata includes the shooting date and time, and when the digital camera that has shot has a function, shooting mode information (for example, portrait mode or landscape mode), image vertical direction information, etc. It is included. For example, when the photographed digital camera has a gyro sensor and has a function of storing the upper and lower information of the image, or when it has a function of storing the shooting mode, this information is further stored in the image data. The

次に、CPU22は、操作パネル50で入力された、元画像に重ねる文字列を文字列取得部32を介して取得する(ステップS120)。続いて、CPU22は、取得した元画像のエッジ検出処理を実行する(ステップS130)。このエッジ検出処理では、例えば、エッジ検出フィルターを用いて画像を解析して、元画像に含まれるエッジ領域を検出する処理を行う。エッジ検出フィルターとしては、例えばソーベルフィルターやロバーツフィルタ、プリューウィットフィルタ、ラプラシアンフィルタなどを用いることができる。このエッジ検出処理では、画像データの最上段左側を始点として最下段右側を終点とし、注目画素に対してエッジ検出フィルターを適用してその周囲との関係を明らかにし、注目画像がエッジであるか否かの判定を行うものとした。   Next, the CPU 22 acquires a character string input on the operation panel 50 to be superimposed on the original image via the character string acquisition unit 32 (step S120). Subsequently, the CPU 22 executes edge detection processing of the acquired original image (step S130). In this edge detection processing, for example, an image is analyzed using an edge detection filter, and processing for detecting an edge region included in the original image is performed. As the edge detection filter, for example, a Sobel filter, a Roberts filter, a Prewitt filter, a Laplacian filter, or the like can be used. In this edge detection process, the top left side of the image data is the starting point, the bottom right side is the end point, and the edge detection filter is applied to the pixel of interest to clarify the relationship with the surroundings. Judgment of whether or not was made.

次に、CPU22は、領域検出部34を用いて顔領域の検出処理を実行する(ステップS140)。この顔領域は、元画像のうち予め定められた肌色の範囲内の画素を肌色画素として抽出し、抽出した肌色画素に基づいて所定の特徴(例えば、肌色画素が顔に相当する形状で所定の面積を占めている領域)を有する肌色画素の領域を算出し、算出した肌色画素の領域の中央やや上部で肌色画素の領域よりも輝度値の低い領域を目の領域として抽出すると共に抽出した両目の下側の領域内で肌色画素の集合領域よりも輝度値の低い領域を口の領域として抽出し、目や口の領域が抽出されたときにこの肌色画素の領域を矩形の境界線で囲んで顔領域として検出するものとした。   Next, the CPU 22 performs face area detection processing using the area detection unit 34 (step S140). This face region is obtained by extracting pixels within a predetermined skin color range from the original image as skin color pixels, and using a predetermined feature (for example, a skin color pixel having a shape corresponding to a face) The area of the skin color pixel having an area) is calculated, and an area having a luminance value lower than the skin color pixel area at the center or slightly above the calculated skin color pixel area is extracted as an eye area. In the area under the eyes, an area having a lower luminance value than the flesh color pixel collection area is extracted as a mouth area, and when the eye or mouth area is extracted, the skin color pixel area is surrounded by a rectangular border. Detected as a face area.

次に、CPU22は、領域検出部34を用いて1以上の色領域の検出処理を実行する(ステップS150)。この処理では、上述で検出したエッジにより分けられる領域ごとに、その領域が略1色で形成されているいわゆるベタ塗り領域であるか否かを判定する。ここでは、1つの領域に対して、任意の複数画素を抽出しこの画素値が所定範囲内である場合に色領域であると判定するものとした。例えば、複数画素のR値の差が値10以内、G値の差が10以内、及びB値の差が値10以内をすべて満たした場合には、色領域であると判定するものとした。なお、顔領域については、この色領域から除外するものとした。   Next, the CPU 22 executes detection processing for one or more color regions using the region detection unit 34 (step S150). In this process, for each area divided by the edge detected above, it is determined whether or not the area is a so-called solid area formed with substantially one color. Here, an arbitrary plurality of pixels are extracted from one area, and when the pixel value is within a predetermined range, it is determined that the area is a color area. For example, when the difference between the R values of a plurality of pixels is less than 10, the difference between the G values is less than 10, and the difference between the B values is less than 10, the color region is determined. The face area is excluded from this color area.

続いて、CPU22は、元画像データに上下方向の情報が含まれているか否かを判定する(ステップS160)。元画像データに上下方向の情報が含まれていないときには、CPU22は、顔領域の上下方向、色領域の色情報及びエッジの開放方向のいずれかに応じて元画像の上下方向を検出する(ステップS170)。顔領域の上下方向では、顔領域に含まれる顔の上下方向により元画像の上下方向を判定することができる。色領域の色情報では、例えば、青色の領域(例えば空)のある側を上方向と判定したり、より明るい色がより上方であると判定することができる。また、エッジの開放方向では、建物や人物などを近接して撮影した場合など、エッジが開放している方が下方であると判定することができる。   Subsequently, the CPU 22 determines whether or not the vertical direction information is included in the original image data (step S160). When the original image data does not include information on the vertical direction, the CPU 22 detects the vertical direction of the original image according to one of the vertical direction of the face area, the color information of the color area, and the opening direction of the edge (step). S170). In the vertical direction of the face area, the vertical direction of the original image can be determined based on the vertical direction of the face included in the face area. In the color information of the color area, for example, it can be determined that the side where the blue area (for example, the sky) is present is upward, or that the brighter color is higher. Further, in the opening direction of the edge, it can be determined that the edge is open, such as when a building or a person is photographed close to each other.

ステップS170のあと、またはステップS160で元画像データに上下方向の情報が含まれているときには、CPU22は、文字枠設定部35を用い、文字枠の設定処理を実行する(ステップS180〜S210)。ここでは、撮影日時については、右下の所定位置に固定的に配置するよう文字枠を設定するものとした。まず、CPU22は、所定面積以上の色領域があるか否かを判定する(ステップS180)。この「所定面積」は、例えば、文字と画像とが見やすいようにできるだけ大きなサイズとして設定された所定のフォントサイズ(例えば16ポイントなど)で且つ2〜3の単語の文字列が包含可能な大きさに経験的に定めることができる。所定面積以上の色領域がないときには、CPU22は、元画像の上下方向に合わせた方向で、顔領域に重ならない位置及び大きさの文字枠を設定する(ステップS190)。ここでは、画像の中央よりも下方の領域に、できるだけ、所定のフォントサイズで1段の文字枠を設定するものとした。   After step S170 or when the original image data includes vertical information in step S160, the CPU 22 executes a character frame setting process using the character frame setting unit 35 (steps S180 to S210). Here, for the shooting date and time, a character frame is set so as to be fixedly arranged at a predetermined position in the lower right. First, the CPU 22 determines whether or not there is a color area larger than a predetermined area (step S180). This “predetermined area” is, for example, a predetermined font size (for example, 16 points) set as large as possible so that characters and images can be easily seen, and a size that can contain character strings of 2-3 words. Can be determined empirically. When there is no color area larger than the predetermined area, the CPU 22 sets a character frame having a position and size that does not overlap the face area in a direction aligned with the vertical direction of the original image (step S190). Here, a one-step character frame with a predetermined font size is set as much as possible in an area below the center of the image.

一方、ステップS180で所定面積以上の色領域があるときには、入力された文字列の単語数、文字数及び色領域の大きさに基づいて文字枠の段数を設定し(ステップS200)、元画像の上下方向に合わせた方向で色領域上に収まる大きさの文字枠を設定する(ステップS210)。ここでは、色領域の幅に合わせ、より少ない段数となるように文字枠を設定し、更に各段の文字数がより均一になる文字枠を設定するものとした。なお、所定面積以上の色領域が複数ある場合は、そのうち短辺と長辺との差がより少ない矩形状の色領域を第1とし、最大面積の色領域を第2とし、より中央に近い色領域を第3とする優先順位で、文字枠を配置する色領域を設定するものとした。このように、顔領域が排除されている色領域に文字枠を設定することから、この文字枠は、元画像に含まれる顔領域に重ならないように設定される。   On the other hand, if there is a color area larger than the predetermined area in step S180, the number of character frames is set based on the number of words in the input character string, the number of characters, and the size of the color area (step S200). A character frame having a size that fits on the color area in the direction matched with the direction is set (step S210). Here, in accordance with the width of the color area, the character frame is set so as to have a smaller number of steps, and the character frame in which the number of characters in each step is more uniform is set. When there are a plurality of color areas having a predetermined area or more, a rectangular color area having a smaller difference between the short side and the long side is first, a color area having the maximum area is second, and closer to the center. The color area in which the character frame is arranged is set in the priority order in which the color area is third. As described above, since the character frame is set in the color area from which the face area is excluded, the character frame is set so as not to overlap the face area included in the original image.

ステップS210のあと、またはステップS190のあと、CPU22は、画像出力部36を用い、元画像に設定した文字枠に文字列を配置して修飾済画像を作成し(ステップS220)、作成した修飾済画像を操作パネル50やプリンター部40へ出力し(ステップS230)、このルーチンを終了する。修飾済画像の作成は、例えば、設定した文字枠にユーザから入力された文字列を配置すると共に、元画像データに格納されていた撮影日時の文字列を配置する処理を行うものとした。その後、表示部52に表示された修飾済画像を確認したユーザーが印刷指示すると、CPU22は、プリンター部40を駆動して、修飾済画像の印刷処理を行う。   After step S210 or after step S190, the CPU 22 uses the image output unit 36 to create a modified image by placing a character string in the character frame set in the original image (step S220), and the created modified image. The image is output to the operation panel 50 and the printer unit 40 (step S230), and this routine ends. The creation of the modified image is performed, for example, by placing a character string input from the user in the set character frame and placing a character string of the shooting date and time stored in the original image data. Thereafter, when the user who has confirmed the modified image displayed on the display unit 52 issues a print instruction, the CPU 22 drives the printer unit 40 to perform the modified image printing process.

ここで、図2の画像作成処理ルーチン及び図3,4を用いて画像作成処理の具体例を説明する。図3は、元画像60から装飾済画像68を作成する説明図であり、図4は、元画像61から装飾済画像69を作成する説明図である。図3に示すように、元画像60を取得すると、この元画像のメタデータ及び配置する文字列を入力し、エッジ検出処理を行う。次に、顔領域検出処理を行い、複数の顔領域62を検出する。次に、色領域検出処理を実行し、単一色で形成されている色領域64を複数検出する。この元画像60では、人物が中央に2名おり、あまり大きな色領域がない画像となっている。続いて、画像の上下方向の情報がない場合、顔領域62の顔の上下方向に応じて元画像60の上下方向を検出する。この元画像60では、横長の画像の右側が上となる画像である。画像の上下方向を検出すると、文字列を配置可能な十分な大きさの色領域がないことから、CPU22は、ステップS190で色領域にかかわらず顔領域62に重ならないように文字枠66を設定する。ここでは、所定のフォントサイズで文字列が配置されるよう、1段の文字枠を中央下段側に配置した文字枠を設定した。そして、設定した文字枠に文字列を配置して装飾済画像68を作成し、作成した装飾済画像68の印刷処理を行う。また、図4に示すように、元画像61を取得すると、この元画像のメタデータ及び配置する文字列を入力し、エッジ検出処理を行う。次に、顔領域検出処理を行い、顔領域63を検出する。次に、色領域検出処理を実行し、単一色で形成されている色領域65を複数検出する。この元画像61では、比較的大きな色領域が複数ある画像となっている。続いて、画像の上下方向の情報がない場合、顔領域63の顔の上下方向に応じてこの元画像61の上下方向を検出する。画像の上下方向を検出すると、文字列を配置可能な色領域が複数あることから、CPU22は、ステップS200,S210で、矩形状且つ最大面積の色領域に含まれるよう文字列を複数段とする文字枠67を設定する。そして、設定した文字枠に文字列を配置して装飾済画像69を作成し、作成した装飾済画像69の印刷処理を行う。   Here, a specific example of the image creation processing will be described using the image creation processing routine of FIG. 2 and FIGS. FIG. 3 is an explanatory diagram for creating a decorated image 68 from the original image 60, and FIG. 4 is an explanatory diagram for creating a decorated image 69 from the original image 61. As shown in FIG. 3, when the original image 60 is acquired, metadata of the original image and a character string to be arranged are input, and edge detection processing is performed. Next, face area detection processing is performed to detect a plurality of face areas 62. Next, a color area detection process is executed to detect a plurality of color areas 64 formed of a single color. In the original image 60, there are two persons in the center and there is no very large color area. Subsequently, when there is no information on the vertical direction of the image, the vertical direction of the original image 60 is detected according to the vertical direction of the face in the face region 62. In the original image 60, the right side of the horizontally long image is the upper image. When the vertical direction of the image is detected, there is no sufficiently large color area in which the character string can be arranged. Therefore, in step S190, the CPU 22 sets the character frame 66 so as not to overlap the face area 62 regardless of the color area. To do. Here, a character frame is set in which one character frame is arranged on the lower center side so that a character string is arranged with a predetermined font size. Then, a character string is arranged in the set character frame to create a decorated image 68, and the created decorated image 68 is printed. As shown in FIG. 4, when the original image 61 is acquired, metadata of the original image and a character string to be arranged are input, and edge detection processing is performed. Next, face area detection processing is performed to detect the face area 63. Next, color area detection processing is executed to detect a plurality of color areas 65 formed of a single color. The original image 61 is an image having a plurality of relatively large color regions. Subsequently, when there is no information on the vertical direction of the image, the vertical direction of the original image 61 is detected according to the vertical direction of the face in the face region 63. When the vertical direction of the image is detected, there are a plurality of color regions in which the character string can be arranged. Therefore, in steps S200 and S210, the CPU 22 sets a plurality of character strings so as to be included in the rectangular color area having the maximum area. A character frame 67 is set. Then, a character string is arranged in the set character frame to create a decorated image 69, and the created decorated image 69 is printed.

ここで、本実施形態の構成要素と本発明の構成要素との対応関係を明らかにする。本実施形態のCPU22及び元画像取得部31が本発明の画像取得手段に相当し、文字列取得部32及びCPU22が文字列取得手段に相当し、領域検出部34及びCPU22が領域検出手段に相当し、文字枠設定部35及びCPU22が設定手段に相当し、画像出力部36及びCPU22が出力手段に相当し、プリンター部40が印刷手段に相当する。なお、本実施形態では、プリンター20の動作を説明することにより本発明の画像処理方法の一例も明らかにしている。   Here, the correspondence between the components of the present embodiment and the components of the present invention will be clarified. The CPU 22 and the original image acquisition unit 31 of the present embodiment correspond to the image acquisition unit of the present invention, the character string acquisition unit 32 and the CPU 22 correspond to the character string acquisition unit, and the region detection unit 34 and the CPU 22 correspond to the region detection unit. The character frame setting unit 35 and the CPU 22 correspond to a setting unit, the image output unit 36 and the CPU 22 correspond to an output unit, and the printer unit 40 corresponds to a printing unit. In the present embodiment, an example of the image processing method of the present invention is also clarified by describing the operation of the printer 20.

以上詳述した本実施形態のプリンター20によれば、ユーザーによって選択された元画像及び元画像上に配置する文字列を取得し、取得した元画像に含まれる顔領域を検出し、検出した顔領域に重ならない元画像上の位置に、元画像の上下方向に合わせた方向で、取得した文字列を配置する文字枠の位置及び大きさを設定する。そして、設定した文字枠に基づいて文字列を元画像上に配置することにより装飾済画像を作成し、この作成した装飾済画像を出力する。このように、元画像の上下方向に合わせて文字列を配置するため、例えば画像に対して間違った方向に文字列が配置されてしまうことがより少ない。また、元画像上に配置する文字列が顔領域上に重ならないため、より適した画像とすることができる。したがって、ユーザーの意図にできるだけ応える画像をより容易に作製することができる。   According to the printer 20 of the present embodiment described in detail above, the original image selected by the user and the character string arranged on the original image are acquired, the face area included in the acquired original image is detected, and the detected face The position and size of the character frame in which the acquired character string is to be arranged are set at a position on the original image that does not overlap the area in a direction that matches the vertical direction of the original image. Then, a decorated image is created by arranging a character string on the original image based on the set character frame, and the created decorated image is output. Thus, since the character strings are arranged in accordance with the vertical direction of the original image, for example, the character strings are less likely to be arranged in the wrong direction with respect to the image. Further, since the character string arranged on the original image does not overlap the face area, a more suitable image can be obtained. Therefore, it is possible to more easily produce an image that meets the user's intention as much as possible.

また、顔領域に含まれる顔の上下方向、色領域の色に関する情報及びエッジ情報のうち少なくとも1以上に基づいて元画像の上下方向を判定するため、元画像の上下方向をより確実なものとすることができ、ユーザーの意図により応える画像を作製することができる。更に、元画像に含まれる1以上の色領域を検出し、検出した顔領域に重ならず、且つ検出した1つの色領域上に文字枠が含まれるように文字枠を設定するため、1つの色領域上に文字列が配置され、文字列がより読みやすく、ユーザーの意図により応える画像を作製することができる。更にまた、文字枠を配置する色領域の幅と、取得した文字列の長さと、文字列に含まれる単語の数及び文字数に基づいて文字枠を複数段に設定するため、文字列がより読みやすく、ユーザーの意図により応える画像を作製することができる。そして、複数段に文字枠を設定するに際して、各段の文字数がより均一になるよう文字枠を設定するため、文字列がより読みやすい。そしてまた、所定のフォントサイズ、即ち顔領域に重ならず、できるだけ大きなフォントサイズとなるよう文字枠を設定するため、視認しやすく、ユーザーの意図により応える画像を作製することができる。そして更に、インクを用いて記録紙S印刷するへ画像を形成するプリンター部40へ装飾済画像を出力するものため、作成した装飾済画像を印刷することができる。   In addition, since the vertical direction of the original image is determined based on at least one of the vertical direction of the face included in the face region, the information about the color of the color region, and the edge information, the vertical direction of the original image is made more reliable. The image which responds according to a user's intention can be produced. Further, one or more color regions included in the original image are detected, and the character frame is set so that the character frame is included on one detected color region without overlapping the detected face region. A character string is arranged on the color region, the character string is easier to read, and an image that meets the user's intention can be created. Furthermore, since the character frame is set in multiple stages based on the width of the color area in which the character frame is arranged, the length of the acquired character string, the number of words included in the character string, and the number of characters, the character string is more read. It is easy to produce an image that meets the user's intention. When character frames are set in a plurality of stages, the character frames are set so that the number of characters in each stage is more uniform, so that the character string is easier to read. In addition, since the character frame is set so as to have a predetermined font size, that is, a font size as large as possible without overlapping the face area, an image that is easy to visually recognize and responds to the user's intention can be produced. Furthermore, since the decorated image is output to the printer unit 40 that forms an image on the recording paper S using ink, the created decorated image can be printed.

なお、本発明は上述した実施形態に何ら限定されることはなく、本発明の技術的範囲に属する限り種々の態様で実施し得ることはいうまでもない。   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.

例えば、上述した実施形態では、色領域を検出し、色領域に文字枠を配置するものとしたが、この処理を省略するものとしてもよい。こうしても、元画像の上下方向に合わせて文字列が配置されると共に、顔領域に文字列が配置されないことから、ユーザーの意図にできるだけ応える画像をより容易に作製することができる。   For example, in the above-described embodiment, the color area is detected and the character frame is arranged in the color area. However, this process may be omitted. Even in this case, the character string is arranged in the vertical direction of the original image and the character string is not arranged in the face area, so that an image that meets the user's intention as much as possible can be more easily produced.

上述した実施形態では、色領域の幅と、文字列の長さと、文字列に含まれる単語に基づいて文字枠を複数段に設定するものとしたが、特にこれに限定されず、これらのうち1以上を省略してもよいし、他の条件を加えるものとしてもよい。あるいは、文字枠を色領域に合わせて複数段に設定する処理を省略するものとしてもよい。また、文字枠を設定するに際して、文字数などに応じて、フォントサイズを増加させるものとしてもよいし、フォントサイズを減少させるものとしてもよい。   In the above-described embodiment, the character frame is set in a plurality of stages based on the width of the color region, the length of the character string, and the word included in the character string. One or more may be omitted, or other conditions may be added. Alternatively, the process of setting the character frame in a plurality of stages according to the color area may be omitted. In setting the character frame, the font size may be increased or the font size may be decreased according to the number of characters.

上述した実施形態では、ユーザーの入力した文字列を元画像上に配置するものとしたが、これを省略し、撮影日時のみを元画像上に配置するものとしてもよい。また、上述した実施形態では、撮影日時の文字列を元画像上に配置するものとしたが、これを省略し、ユーザーの入力した文字列のみを元画像上に配置するものとしてもよい。こうしても、元画像の上下方向に合わせ且つ顔領域に重ならずに文字列が配置されるから、ユーザーの意図にできるだけ応える画像をより容易に作製することができる。   In the embodiment described above, the character string input by the user is arranged on the original image, but this may be omitted and only the shooting date and time may be arranged on the original image. In the above-described embodiment, the character string of the shooting date and time is arranged on the original image. However, this may be omitted and only the character string input by the user may be arranged on the original image. Even in this case, the character string is arranged in the vertical direction of the original image and without overlapping the face area, so that an image that meets the user's intention as much as possible can be more easily produced.

上述した実施形態では、図3,4において、視認しやすいように図面の便宜として文字枠を白抜きで表現したが、これに限定されず、白抜きを省略し元画像上に文字を配置してもよい。また、文字枠は縁なしとしてもよいし、縁ありとしてもよい。配置する文字の色は、ユーザーにより選択された色としてもよいし、予め定められた色としてもよい。また、元画像の色に合わせて視認しやすい色で文字列を形成するものとしてもよい。   In the embodiment described above, in FIGS. 3 and 4, the character frame is expressed in white for convenience of drawing for easy viewing. However, the present invention is not limited to this, and the white space is omitted and the character is arranged on the original image. May be. The character frame may have no border or may have a border. The color of the character to be arranged may be a color selected by the user, or may be a predetermined color. Alternatively, the character string may be formed in a color that is easy to visually recognize according to the color of the original image.

上述した実施形態では、説明しなかったが、装飾済画像を表示部52へ表示させたあと、配置されている文字列の位置、フォントサイズ、段数などをユーザーが操作部54を操作して変更可能としてもよい。こうすれば、更にユーザーの意図に沿った画像を提供することができる。   Although not described in the above-described embodiment, after the decorated image is displayed on the display unit 52, the user changes the position of the arranged character string, the font size, the number of steps, and the like by operating the operation unit 54. It may be possible. In this way, it is possible to provide an image that further meets the user's intention.

上述した実施形態では、印刷、スキャン及びコピーを実行可能なマルチファンクションプリンターを本発明の画像処理装置として説明したが、プリンター単体やスキャナー単体、FAXなどとしてもよい。あるいは、元画像の文字列を配置する画像処理を行う装置であれば特に限定されず、例えば、パソコンやノートパソコンなどの情報処理機器、デジタルスチルカメラやデジタルビデオカメラなどの撮影機器、デジタルテレビやHDDレコーダーなどの映像機器、携帯用及び家庭用のゲーム機器、携帯電話などの通信機器などとしてもよい。また、プリンター部40は、インクジェット方式としたが、電子写真方式や、熱転写方式、ドットインパクト方式としてもよい。また、スキャナー部45は、原稿を固定し読取センサー46を移動して画像を読み取るフラットベッド式としたが、読取センサー46を固定し原稿を移動して読み取る方式を採用してもよい。また、プリンター20の態様で本発明を説明したが、画像処理方法の態様としてもよいし、この方法のプログラムの態様としてもよい。   In the above-described embodiments, the multifunction printer capable of executing printing, scanning, and copying has been described as the image processing apparatus of the present invention. However, a printer alone, a scanner alone, a FAX, or the like may be used. Alternatively, it is not particularly limited as long as it is an image processing device that arranges a character string of the original image. For example, an information processing device such as a personal computer or a notebook computer, a photographing device such as a digital still camera or a digital video camera, a digital television Video devices such as HDD recorders, portable and home game devices, and communication devices such as mobile phones may be used. In addition, although the printer unit 40 is an inkjet method, it may be an electrophotographic method, a thermal transfer method, or a dot impact method. The scanner unit 45 is a flatbed type that fixes an original and moves the reading sensor 46 to read an image, but may adopt a method in which the reading sensor 46 is fixed and the original is moved and read. Further, although the present invention has been described in the form of the printer 20, it may be in the form of an image processing method or in the form of a program for this method.

20 プリンター、21 コントローラー、22 CPU、23 フラッシュROM、24 RAM、29 バス、31 元画像取得部、32 文字列取得部、34 領域検出部、35 文字枠設定部、36 画像出力部、40 プリンター部、42 印刷ヘッド、44 搬送機構、45 スキャナー部、46 読取センサー、48 移動機構、50 操作パネル、52 表示部、54 操作部、55 メモリーカードリーダー、56 メモリーカード、60,61 元画像、62,63 顔領域、64,65 色領域、66,67 文字枠、68,69 装飾済画像、S 記録紙。 20 Printer, 21 Controller, 22 CPU, 23 Flash ROM, 24 RAM, 29 Bus, 31 Original image acquisition unit, 32 Character string acquisition unit, 34 Area detection unit, 35 Character frame setting unit, 36 Image output unit, 40 Printer unit , 42 Print head, 44 Transport mechanism, 45 Scanner section, 46 Reading sensor, 48 Moving mechanism, 50 Operation panel, 52 Display section, 54 Operation section, 55 Memory card reader, 56 Memory card, 60, 61 Original image, 62, 63 face area, 64, 65 color area, 66, 67 character frame, 68, 69 decorated image, S recording paper.

Claims (6)

装飾される元となる画像としてユーザーによって選択された元画像を取得する画像取得手段と、
前記元画像上に配置する文字列を取得する文字列取得手段と、
前記取得した元画像を解析して前記元画像上に含まれる顔領域を検出する領域検出手段と、
前記検出した顔領域に重ならない前記元画像上の位置に、前記取得した元画像の上下方向に合わせた方向で、前記取得した文字列を配置する文字枠の位置及び大きさを設定する設定手段と、
前記文字枠の位置及び大きさに基づいて前記文字列を前記元画像上に配置した画像である装飾済画像を作成し該作成した装飾済画像を出力する出力手段と、を備え
前記領域検出手段は、前記元画像に含まれる1以上の色領域をも検出し、
前記設定手段は、前記検出した顔領域に重ならず、且つ前記検出した1つの色領域上に前記文字枠が含まれるように該文字枠を設定し、
前記設定手段は、前記文字枠を配置する色領域の幅と、前記取得した文字列の長さと、該文字列に含まれる単語に基づいて前記文字枠を複数段に設定する、
画像処理装置。
Image acquisition means for acquiring an original image selected by the user as an image to be decorated;
A character string acquisition means for acquiring a character string to be arranged on the original image;
Area detecting means for analyzing the acquired original image and detecting a face area included on the original image;
Setting means for setting a position and size of a character frame in which the acquired character string is arranged in a direction aligned with a vertical direction of the acquired original image at a position on the original image that does not overlap the detected face area When,
And an output means for outputting the created decoration already images created the decoration-image-is an image obtained by arranging the character string on the original image based on the position and size of the character frame,
The area detecting means also detects one or more color areas included in the original image;
The setting means sets the character frame so that the character frame is not included in the detected face region and is included in the one color region detected;
The setting means sets the character frame in a plurality of stages based on a width of a color region in which the character frame is arranged, a length of the acquired character string, and a word included in the character string.
Image processing device.
前記設定手段は、前記元画像の上下方向に関する情報が該元画像に付帯していないときには、前記検出した顔領域に含まれる顔の上下方向、前記元画像に含まれる1以上の色領域の色に関する情報及び前記元画像に含まれるエッジ情報のうち少なくとも1以上に基づいて前記元画像の上下方向を判定し、該判定結果の上下方向に合わせた方向に基づいて前記文字枠を設定し、
前記出力手段は、前記上下方向にも基づいて前記装飾済画像を作成する、請求項1に記載の画像処理装置。
The setting means, when information relating to the vertical direction of the original image is not attached to the original image, the vertical direction of the face included in the detected face region, the color of one or more color regions included in the original image Determining the vertical direction of the original image based on at least one or more of the information on the edge information included in the original image, and setting the character frame based on the direction according to the vertical direction of the determination result,
The image processing apparatus according to claim 1, wherein the output unit creates the decorated image based on the vertical direction.
前記設定手段は、前記顔領域に重ならないという条件を含む所定条件の下での最大のフォントサイズとなるよう前記文字枠を設定する、請求項1又は2に記載の画像処理装置。 The setting means, the maximum setting the character frame so that the font size, the image processing apparatus according to claim 1 or 2 under a predetermined condition including a condition that does not overlap the face area. 前記出力手段は、着色剤を用いて印刷媒体へ画像を形成する印刷手段へ前記装飾済画像を出力する、請求項1〜のいずれか1項に記載の画像処理装置。 And the output means, the outputs of the decoration-image-to the printing means for forming an image on a print medium by using a colorant, an image processing apparatus according to any one of claims 1-3. (a)装飾される元となる画像としてユーザーによって選択された元画像を取得するステップと、
(b)前記元画像上に配置する文字列を取得するステップと、
(c)前記取得した元画像を解析して前記元画像上に含まれる顔領域を検出するステップと、
(d)前記検出した顔領域に重ならない前記元画像上の位置に、前記取得した元画像の上下方向に合わせた方向で、前記取得した文字列を配置する文字枠の位置及び大きさを設定するステップと、
(e)前記文字枠の位置及び大きさに基づいて前記文字列を前記元画像上に配置した画像である装飾済画像を作成し該作成した装飾済画像を出力するステップと、をみ、
前記ステップ(c)では、前記元画像に含まれる1以上の色領域をも検出し、
前記ステップ(d)では、前記検出した顔領域に重ならず、且つ前記検出した1つの色領域上に前記文字枠が含まれるように該文字枠を設定し、
前記ステップ(d)では、前記文字枠を配置する色領域の幅と、前記取得した文字列の長さと、該文字列に含まれる単語に基づいて前記文字枠を複数段に設定する、
画像処理方法。
(A) obtaining an original image selected by the user as an original image to be decorated;
(B) obtaining a character string to be arranged on the original image;
(C) analyzing the acquired original image to detect a face area included on the original image;
(D) A position and size of a character frame in which the acquired character string is arranged in a direction aligned with a vertical direction of the acquired original image at a position on the original image that does not overlap the detected face area. And steps to
A step of said string to create a decoration-image-an image placed on an original image and outputs the decoration already created image the on the basis of the position and size of the (e) the character frame, only including,
In the step (c), one or more color regions included in the original image are also detected,
In the step (d), the character frame is set so as not to overlap the detected face region and to be included in the detected one color region,
In the step (d), the character frame is set in a plurality of stages based on the width of the color region in which the character frame is arranged, the length of the acquired character string, and the word included in the character string.
Image processing method.
請求項に記載の画像処理方法の各ステップを1以上のコンピューターに実行させるプログラム。 The program which makes one or more computers perform each step of the image processing method of Claim 5 .
JP2010098757A 2010-04-22 2010-04-22 Image processing apparatus, image processing method, and program thereof Expired - Fee Related JP5556331B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010098757A JP5556331B2 (en) 2010-04-22 2010-04-22 Image processing apparatus, image processing method, and program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010098757A JP5556331B2 (en) 2010-04-22 2010-04-22 Image processing apparatus, image processing method, and program thereof

Publications (2)

Publication Number Publication Date
JP2011229059A JP2011229059A (en) 2011-11-10
JP5556331B2 true JP5556331B2 (en) 2014-07-23

Family

ID=45043889

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010098757A Expired - Fee Related JP5556331B2 (en) 2010-04-22 2010-04-22 Image processing apparatus, image processing method, and program thereof

Country Status (1)

Country Link
JP (1) JP5556331B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104883467B (en) * 2014-02-28 2019-01-11 日本冲信息株式会社 Image forming apparatus and method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002010066A (en) * 2000-06-26 2002-01-11 Olympus Optical Co Ltd Image reproducer
JP2007096816A (en) * 2005-09-29 2007-04-12 Fujifilm Corp Image composing apparatus, image composing program, and image composing program storing medium
JP2009219024A (en) * 2008-03-12 2009-09-24 Fujifilm Corp Method, program and apparatus for determining direction and position for combining additional information

Also Published As

Publication number Publication date
JP2011229059A (en) 2011-11-10

Similar Documents

Publication Publication Date Title
JP5187139B2 (en) Image processing apparatus and program
JPH114339A (en) Image processing unit and photograph synthesis system
JP2007065940A (en) Image selection device and image selection means
JP2009031978A (en) Coloring, coloring picture producing device, coloring picture producing method, and program thereof
JP2010117787A (en) Image processing apparatus
US20100123918A1 (en) Image forming apparatus and program
JP5556331B2 (en) Image processing apparatus, image processing method, and program thereof
JP4785628B2 (en) Image processing apparatus, image processing method, and program
JP4941157B2 (en) Coloring production apparatus, coloring production method and program thereof
JP4186116B2 (en) Image processing apparatus and method
JP2009027425A (en) Image processing device, image processing method, and program thereof
JP2011164277A (en) Image display device and image display method
JP2021193780A (en) Image reader, image reading method and image reading program
JP2008269406A (en) Image output managing device, method and program
JP2011166339A (en) Image forming apparatus and program
JP4924274B2 (en) Image processing apparatus, image processing method, and program thereof
JP2009023199A (en) Image processor, image processing method, and its program
JP2004235680A (en) Manuscript reader
JP2009164871A (en) Image forming device, control method thereof, and program
JP2010108238A (en) Image processor, image processing method, and program
JP5655607B2 (en) Image conversion processing device
JP2012049737A (en) Display image printer
JP2008271462A (en) Image reading apparatus, image reading method and image reading program
JP2007045022A (en) Printing device and method for printing
JP4432700B2 (en) Image display processing apparatus, printing apparatus including the same, and image display processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130304

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140131

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140218

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140410

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140520

R150 Certificate of patent or registration of utility model

Ref document number: 5556331

Country of ref document: JP

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

LAPS Cancellation because of no payment of annual fees