JP2005208760A - Person image extraction device and computer program - Google Patents

Person image extraction device and computer program Download PDF

Info

Publication number
JP2005208760A
JP2005208760A JP2004012363A JP2004012363A JP2005208760A JP 2005208760 A JP2005208760 A JP 2005208760A JP 2004012363 A JP2004012363 A JP 2004012363A JP 2004012363 A JP2004012363 A JP 2004012363A JP 2005208760 A JP2005208760 A JP 2005208760A
Authority
JP
Japan
Prior art keywords
image
person
value
person image
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2004012363A
Other languages
Japanese (ja)
Other versions
JP4502645B2 (en
Inventor
Hiroshi Sato
浩 佐藤
Hiroshi Saito
拓 斎藤
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2004012363A priority Critical patent/JP4502645B2/en
Publication of JP2005208760A publication Critical patent/JP2005208760A/en
Application granted granted Critical
Publication of JP4502645B2 publication Critical patent/JP4502645B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide a person image extraction device and a computer program, extracting a person image from a person image including a background image by minimum operation. <P>SOLUTION: This person image extraction device has: a means for acquiring coordinates of points showing a jaw part and a parietal part of the person image; a means calculating dispersion of a pixel value of a pixel positioned inside a rectangular area including the acquired coordinates showing the parietal point inside a color space; a means deciding whether the calculated dispersion of the pixel value is smaller than a threshold or not; a means averaging the color space when the dispersion of the pixel value is smaller than the threshold; a contour extraction means extracting a contour of the person image as a portion wherein a degree of a change of the pixel value is larger than the threshold; and a background image removal part removing the background image. The background image removal part stores a multi-valued template copying shape of a person, fits the coordinates of the jaw part and the parietal part of the person image to a face portion of the multi-valued template, and generates a composition image of the person image and the multi-valued template. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、障害物の写っている一般的な背景画像とともに撮影されている人物画像から、背景を消去して人物画像を抽出する人物画像抽出装置、及びコンピュータプログラムに関する。   The present invention relates to a person image extraction apparatus and a computer program for extracting a person image by erasing the background from a person image taken together with a general background image showing an obstacle.

従来、免許証、パスポート、種々の証明書用の肖像写真、葬儀用の遺影、犯罪捜査用の肖像写真の撮影等には、背景が白色又は青色になるようにして本来要求されているサイズよりも広い範囲を写真撮影し、人物の顔が要求されている条件に合致するようにトリミングする、又はプリントした写真を要求されているサイズに合わせて裁断することによって、要求されているサイズの肖像写真を作成していた。   Conventionally, for taking photographs of licenses, passports, portrait photographs for various certificates, funeral remains, portrait photographs for criminal investigation, etc., the background is white or blue and the size originally required Take a picture of a large area and crop it so that the face of the person meets the required conditions, or cut the printed photo to the required size, then portrait of the required size I was making a photo.

上述した従来の肖像写真の撮影方法では、白色又は青色の背景を得るために専用のスクリーン及び適当な照明が必要であり、加えてプリントした写真を要求されている条件に合致するようにトリミング又は裁断する必要があり、手間がかかっていた。   The conventional portrait photography method described above requires a dedicated screen and appropriate lighting to obtain a white or blue background, and additionally trims the printed photo to meet the required conditions. It was necessary to cut, and it took time and effort.

一方、近年のパーソナルコンピュータの性能向上及び普及に伴って種々の画像処理ソフトウェアが開発されており、一枚の画像中から任意の領域、例えば人物の全体像、顔等をユーザが指定することにより抽出し、他の画像、例えば風景画像に合成することが可能な機能が備えられているソフトウェアも多々開発されている。しかし、一枚の画像から任意領域を自動的に抽出する処理は困難であり、ユーザが画像の境界をマウスなどのポインティングデバイスでなぞってやる必要があるソフトウェアが主流であり、自動的に抽出処理を行うことができると謳っているソフトウェアであっても、実際にはユーザの手動操作によって、輪郭の指示が必要となっているソフトウェアが多い。   On the other hand, various image processing software has been developed along with the recent improvement and popularization of personal computers, and the user designates an arbitrary area, for example, a whole image of a person, a face, etc. from one image. Many softwares have been developed that have the function of extracting and synthesizing them with other images, such as landscape images. However, it is difficult to automatically extract an arbitrary area from a single image, and software that requires the user to trace the boundary of the image with a pointing device such as a mouse is the mainstream. Even software that says that it is possible to carry out contouring is actually a software that requires a contour instruction by a user's manual operation.

斯かる問題に対応すべく、例えば特許文献1では、背景画像は白色又は青色になるようにする必要はあるものの、写っている人物の頭頂、目の位置、あごの位置を指定することによって、人物の輪郭をマウスなどのポインティングデバイスでなぞってやる必要がない自動顔画像処理装置が開示されている。   In order to cope with such a problem, for example, in Patent Document 1, although the background image needs to be white or blue, by specifying the top of the person, the position of the eyes, and the position of the chin, An automatic face image processing apparatus is disclosed in which it is not necessary to trace the outline of a person with a pointing device such as a mouse.

特許文献2では、人物の写っていない背景画像のみを撮像し、同一の背景上で人物を撮像することによって、背景画像を効果的に排除して人物の輪郭を自動的にトリミングする前景画像抽出方法が開示されている。   In Patent Document 2, foreground image extraction is performed in which only a background image without a person is captured, and a person is imaged on the same background, thereby effectively eliminating the background image and automatically trimming the outline of the person. A method is disclosed.

特許文献3又は特許文献4では、一般的な背景画像に写っている人物画像から、色、特に人間の顔の色である肌色を中心とした画像を抽出することにより、自動的に顔画像を抽出することができる顔画像抽出方法が開示されている。
特開2001−005977号公報 特開2000−036032号公報 特開平9−050528号公報 特開平10−334213号公報
In Patent Document 3 or Patent Document 4, a face image is automatically extracted by extracting an image centered on a color, particularly a skin color that is the color of a human face, from a person image shown in a general background image. A face image extraction method that can be extracted is disclosed.
JP 2001-005977 A JP 2000-036032 A JP 9-0050528 A JP-A-10-334213

上述した従来の技術では、以下のような問題点があった。すなわち、特許文献1に開示されている顔画像処理方法では、結局は肖像写真を撮影するために専用の設備(スクリーン、照明等)が必要となるとともに、写っている人物の頭頂、目の位置、あごの位置を指定する必要がある。また、対象となる人物画像が背景画像よりも明るく、背景が一様であることが要求されることから、障害物を含む背景画像の状態によっては人物画像を抽出することが困難になるおそれがあるという問題点があった。   The conventional techniques described above have the following problems. In other words, the face image processing method disclosed in Patent Document 1 eventually requires dedicated equipment (screen, lighting, etc.) to take a portrait photograph, and the head and eye positions of the person in the image. It is necessary to specify the position of the chin. Further, since the target person image is required to be brighter than the background image and to have a uniform background, it may be difficult to extract the person image depending on the state of the background image including an obstacle. There was a problem that there was.

また、特許文献2に開示されている前景画像抽出方法では、顔画像だけでなく肖像画像として人物の上半身を抽出することが可能となっているが、背景画像を事前に撮影しておく必要があるとともに、人物を同一の背景画像で撮影する必要があり、簡便性に欠けるという問題点があった。   Further, in the foreground image extraction method disclosed in Patent Document 2, it is possible to extract the upper body of a person as a portrait image as well as a face image, but it is necessary to capture a background image in advance. In addition, there is a problem in that it is not easy to photograph a person with the same background image.

また、特許文献3又は特許文献4に開示されている顔画像抽出方法では、人物の顔画像だけを抽出することができ、肖像画像として人物の上半身を抽出することは困難であるという問題点があった。   Further, in the face image extraction method disclosed in Patent Document 3 or Patent Document 4, only a person's face image can be extracted, and it is difficult to extract the upper body of a person as a portrait image. there were.

本発明は斯かる事情に鑑みてなされたものであり、最小限のオペレーションによって、障害物の写っている一般的な背景画像とともに撮影されている人物画像から背景画像を消去して人物画像を抽出する人物画像抽出装置、及びコンピュータプログラムを提供することを目的とする。   The present invention has been made in view of such circumstances, and extracts a person image by erasing the background image from a person image taken together with a general background image showing an obstacle with minimal operations. An object of the present invention is to provide a person image extraction device and a computer program.

上記目的を達成するために第1発明に係る人物画像抽出装置は、画像中の前景に撮影されている人物画像を抽出する人物画像抽出装置において、前記人物画像の頭頂部及び顎部を示す点の座標を取得する手段と、取得した前記頭頂部を示す座標を含む矩形領域内に位置する画素の画素値の色空間内での分散を算出する手段と、算出した画素値の分散が閾値より小さいか否か判断する手段と、該手段で画素値の分散が閾値より小さいと判断した場合、前記色空間の平均化を行う手段と、人物画像の輪郭を隣接する画素の画素値の変化の度合が閾値よりも大きい部分として抽出する輪郭抽出部と、背景画像を除去する背景画像除去部とを備え、該背景画像除去部は、人物の形状を模した多値テンプレートを記憶しておき、前記人物画像の頭頂部及び顎部の座標を前記多値テンプレートの顔部分に適合させ、前記人物画像と前記多値テンプレートとの合成画像を生成すべくなしてあることを特徴とする。   In order to achieve the above object, a human image extracting apparatus according to a first aspect of the present invention is a human image extracting apparatus that extracts a human image taken in the foreground of the image, and indicates the top and chin of the human image. Means for acquiring the coordinates, means for calculating the dispersion in the color space of the pixel values of the pixels located in the rectangular area including the coordinates indicating the acquired top, and the dispersion of the calculated pixel values from the threshold Means for determining whether or not the variance of the pixel values is smaller than a threshold value, and means for averaging the color space and a change in the pixel value of the pixel adjacent to the contour of the person image. A contour extraction unit that extracts a portion having a degree greater than a threshold; and a background image removal unit that removes a background image. The background image removal unit stores a multi-value template imitating the shape of a person; The top of the person image and The coordinates of the jaws is adapted to the face portion of the multi-value template, characterized in that are no to produce a composite image of the said person image and the multi-value template.

第1発明に係る人物画像抽出装置では、抽出すべき人物画像の頭頂部及び顎部の座標のみを取得し、取得した頭頂部を示す座標を含む矩形領域内に位置する画素の画素値の色空間内での分散を算出することにより、必要に応じて色空間の平均化を行い、人物画像における頭部分を明確に特定することができるとともに、多値テンプレートを人物画像の頭頂部及び顎部の座標に合わせて適合し、段階的な階調表示により人物画像として抽出すべき領域を明確にする。これにより、背景画像の種類、状態等に左右されず、人物画像の頭頂部及び顎部のみを特定するだけで人物画像を確実に抽出することができ、免許証、パスポート、種々の証明書用の肖像写真、葬儀用の遺影、犯罪捜査用の肖像写真を作成することが可能となる。   In the person image extraction device according to the first aspect of the invention, only the coordinates of the top and chin of the person image to be extracted are acquired, and the color of the pixel value of the pixel located in the rectangular area including the coordinates indicating the acquired top By calculating the dispersion in the space, the color space can be averaged as necessary, and the head portion in the person image can be clearly specified, and the multi-value template can be used for the top and chin of the person image. The region to be extracted as a human image is clarified by stepwise gradation display. This makes it possible to reliably extract a person image by specifying only the top and chin of the person image, regardless of the type and state of the background image, and for licenses, passports, and various certificates. Portrait photos, funeral remains, and criminal investigation portrait photos.

また、第2発明に係る人物画像抽出装置は、第1発明において、前記背景画像除去部は、前記頭頂部を示す座標を含む矩形領域内に位置する画素の画素値の色空間内での分散に基づいて頭髪部分を抽出し、頭髪画像と背景画像との境界を特定すべくなしてあることを特徴とする。   In the human image extraction device according to a second aspect of the present invention, in the first aspect, the background image removal unit distributes pixel values of pixels located in a rectangular area including coordinates indicating the top of the head in a color space. The hair portion is extracted based on the above, and the boundary between the hair image and the background image is specified.

第2発明に係る人物画像抽出装置では、抽出すべき人物画像の頭頂部の座標に基づいて、従来の色に基づく顔画像の抽出方法では抽出が困難であった頭髪部分を確実に抽出することができる。これにより、背景画像の種類、状態等に左右されず、人物画像の頭髪部分を特定することができ、免許証、パスポート、種々の証明書用の肖像写真、葬儀用の遺影、犯罪捜査用の肖像写真を精度良く作成することが可能となる。   In the human image extracting apparatus according to the second aspect of the invention, based on the coordinates of the top of the human image to be extracted, the hair portion that has been difficult to extract by the conventional face image extracting method based on the color is reliably extracted. Can do. This makes it possible to specify the hair portion of a person image regardless of the type and state of the background image, and for licenses, passports, portrait photographs for various certificates, funeral remains, and criminal investigations. It is possible to create portrait photographs with high accuracy.

また、第3発明に係る人物画像抽出装置は、第1発明又は第2発明において、前記背景画像除去部は、前記顎部として取得した座標に基づいて、顔面画像の画素値の平均値を求め、求めた平均値との画素値の差異が所定の閾値より大きいか否かを判別することにより、人物画像の首周り部分と背景画像との境界を特定すべくなしてあることを特徴とする。   In the human image extraction device according to a third aspect of the present invention, in the first or second aspect, the background image removal unit obtains an average value of pixel values of the facial image based on the coordinates acquired as the jaw. The boundary between the neck portion of the person image and the background image is specified by determining whether or not the difference in pixel value from the obtained average value is larger than a predetermined threshold value. .

第3発明に係る人物画像抽出装置では、抽出すべき人物画像の頭頂部の座標に基づいて、従来の色に基づく顔画像の抽出方法では抽出が困難であった首周り部分を確実に抽出することができる。これにより、背景画像の種類、状態等に左右されず、人物画像の首周り部分を特定することができ、免許証、パスポート、種々の証明書用の肖像写真、葬儀用の遺影、犯罪捜査用の肖像写真を精度良く作成することが可能となる。   In the human image extracting apparatus according to the third aspect of the invention, based on the coordinates of the top of the human image to be extracted, the portion around the neck that is difficult to extract by the conventional face image extracting method based on the color is surely extracted. be able to. This makes it possible to specify the area around the neck of a person image regardless of the type and state of the background image, and for licenses, passports, portrait photographs for various certificates, funeral remains, and criminal investigations. It is possible to create a portrait photograph of the person with high accuracy.

また、第4発明に係る人物画像抽出装置は、第1発明乃至第3発明において、前記背景画像除去部は、前記人物画像の肩近傍の輪郭線を抽出し、輪郭線の傾きが所定の範囲内にない輪郭線を消去すべくなしてあることを特徴とする。   In the human image extraction device according to a fourth aspect of the present invention, in the first through third aspects, the background image removal unit extracts a contour line in the vicinity of the shoulder of the human image, and the inclination of the contour line is within a predetermined range. It is characterized in that an outline that is not inside is erased.

第4発明に係る人物画像抽出装置では、抽出すべき人物画像の頭頂部の座標に基づいて、従来の色に基づく顔画像の抽出方法では消去することが困難であった肩近傍における障害物の輪郭に基づいて生じる不要なエッジを確実に消去することができる。これにより、背景画像の種類、状態等に左右されず、人物画像の肩部分における不要なエッジを確実に消去することができ、免許証、パスポート、種々の証明書用の肖像写真、葬儀用の遺影、犯罪捜査用の肖像写真を精度良く作成することが可能となる。   In the human image extracting apparatus according to the fourth aspect of the present invention, based on the coordinates of the top of the human image to be extracted, obstacles in the vicinity of the shoulder that are difficult to erase by the conventional face image extracting method based on the color are included. Unnecessary edges generated based on the contour can be surely erased. As a result, it is possible to securely erase unnecessary edges on the shoulder portion of a person image regardless of the type and state of the background image, and for licenses, passports, portrait photographs for various certificates, funeral use This makes it possible to accurately create portraits for ashes and criminal investigations.

次に上記目的を達成するために第5発明に係るコンピュータプログラムは、画像中の前景に撮影されている人物画像を抽出する処理をコンピュータに実行させるコンピュータプログラムにおいて、前記人物画像の頭頂部及び顎部を示す点の座標を取得するステップと、取得した前記頭頂部を示す座標を含む矩形領域内に位置する画素の画素値の色空間内での分散を算出するステップと、算出した画素値の分散が閾値より小さいか否か判断するステップと、画素値の分散が閾値より小さいと判断した場合、前記色空間の平均化を行うステップと、人物画像の輪郭を隣接する画素の画素値の変化の度合が閾値よりも大きい部分として抽出するステップと、背景画像を除去するステップとを含み、前記背景画像を除去するステップは、人物の形状を模した多値テンプレートを記憶しておき、前記人物画像の頭頂部及び顎部の座標を前記多値テンプレートの顔部分に適合させ、前記人物画像と前記多値テンプレートとの合成画像を生成するものであることを特徴とする。   Next, in order to achieve the above object, a computer program according to a fifth aspect of the present invention is a computer program for causing a computer to execute a process of extracting a person image photographed in the foreground of the image. A step of acquiring coordinates of a point indicating a part, a step of calculating a dispersion in a color space of pixel values of pixels located in a rectangular area including the acquired coordinates indicating the top of the head, and Determining whether the variance is less than a threshold; if determining that the variance of pixel values is less than the threshold; averaging the color space; and changing a pixel value of a pixel adjacent to the contour of a person image And extracting the background image as a portion having a degree greater than a threshold, and removing the background image. The multi-value template stored is stored, the coordinates of the top and chin of the person image are adapted to the face portion of the multi-value template, and a composite image of the person image and the multi-value template is generated. It is characterized by being.

第5発明に係るコンピュータプログラムでは、抽出すべき人物画像の頭頂部及び顎部の座標のみを取得し、取得した頭頂部を示す座標を含む矩形領域内に位置する画素の画素値の色空間内での分散を算出することにより、必要に応じて色空間の平均化を行い、人物画像における頭部分を明確に特定することができるとともに、多値テンプレートを人物画像の頭頂部及び顎部の座標に合わせて適合し、段階的な階調表示により人物画像として抽出すべき領域を明確にする。これにより、背景画像の種類、状態等に左右されず、人物画像の頭頂部及び顎部のみを特定するだけで人物画像を確実に抽出することができ、免許証、パスポート、種々の証明書用の肖像写真、葬儀用の遺影、犯罪捜査用の肖像写真を作成することが可能となる。   In the computer program according to the fifth aspect of the present invention, only the coordinates of the top and chin of the person image to be extracted are acquired, and within the color space of the pixel value of the pixel located in the rectangular region including the coordinates indicating the acquired top By calculating the variance at, the color space can be averaged as necessary to clearly identify the head portion of the person image, and the multi-value template can be used for the coordinates of the top and chin of the person image. The region to be extracted as a human image is clarified by stepwise gradation display. This makes it possible to reliably extract a person image by specifying only the top and chin of the person image, regardless of the type and state of the background image, and for licenses, passports, and various certificates. Portrait photos, funeral remains, and criminal investigation portrait photos.

第1発明、及び第5発明によれば、背景画像の種類、状態等に左右されず、人物画像の頭頂部及び顎部のみを特定するだけで人物画像を確実に抽出することができ、免許証、パスポート、種々の証明書用の肖像写真、葬儀用の遺影、犯罪捜査用の肖像写真を作成することが可能となる。   According to the first and fifth aspects of the invention, the person image can be reliably extracted by specifying only the top and chin of the person image, regardless of the type and state of the background image. Certificates, passports, portrait photographs for various certificates, funeral remains, and portrait photographs for criminal investigations can be created.

また、第2発明によれば、背景画像の種類、状態等に左右されず、人物画像の頭髪部分を特定することができ、免許証、パスポート、種々の証明書用の肖像写真、葬儀用の遺影、犯罪捜査用の肖像写真を精度良く作成することが可能となる。   In addition, according to the second invention, it is possible to specify the hair portion of the person image regardless of the type and state of the background image, and to obtain a license, passport, portrait photograph for various certificates, funeral use This makes it possible to accurately create portraits for ashes and criminal investigations.

また、第3発明によれば、背景画像の種類、状態等に左右されず、人物画像の首周り部分を特定することができ、免許証、パスポート、種々の証明書用の肖像写真、葬儀用の遺影、犯罪捜査用の肖像写真を精度良く作成することが可能となる。   In addition, according to the third invention, it is possible to specify a portion around the neck of the person image regardless of the type and state of the background image, and to obtain a license, passport, portrait photograph for various certificates, funeral use It is possible to accurately create portraits for crimes and criminal investigations.

また、第4発明によれば、背景画像の種類、状態等に左右されず、人物画像の肩部分における不要なエッジを確実に消去することができ、免許証、パスポート、種々の証明書用の肖像写真、葬儀用の遺影、犯罪捜査用の肖像写真を精度良く作成することが可能となる。   Further, according to the fourth invention, an unnecessary edge in the shoulder portion of the person image can be surely erased regardless of the type and state of the background image, and the license image, passport and various certificates can be used. It is possible to accurately create portrait photographs, funeral remains, and criminal investigation portrait photographs.

以下、本発明をその実施の形態を示す図面に基づいて詳述する。図1は、本発明の実施の形態に係る人物画像抽出装置を具現化するコンピュータの概略構成図である。図1に示すように、人物画像抽出装置を具現化するコンピュータは、少なくとも、CPU(中央演算装置)11、記憶手段12、RAM(メモリ)13、外部の通信手段と接続する通信手段14、マウス、キーボード等の入力手段15、モニタ等の表示手段16、カメラ、CCD等の画像入力手段17、及び補助記憶手段18で構成される。   Hereinafter, the present invention will be described in detail with reference to the drawings illustrating embodiments thereof. FIG. 1 is a schematic configuration diagram of a computer that embodies a human image extraction apparatus according to an embodiment of the present invention. As shown in FIG. 1, a computer that embodies a person image extracting apparatus includes at least a CPU (central processing unit) 11, a storage unit 12, a RAM (memory) 13, a communication unit 14 connected to an external communication unit, a mouse. , An input means 15 such as a keyboard, a display means 16 such as a monitor, an image input means 17 such as a camera and a CCD, and an auxiliary storage means 18.

CPU11は、バスを介して上述したようなハードウェア各部と接続されており、上述したハードウェア各部を制御するとともに、記憶手段12に格納されたプログラムに従って、種々のソフトウェア的機能を実行する。画像入力手段16は、例えばCCDを利用して画像を撮像し、撮像した画像データを入力する。   The CPU 11 is connected to the above-described hardware units via a bus, controls the above-described hardware units, and executes various software functions according to programs stored in the storage unit 12. The image input unit 16 captures an image using, for example, a CCD, and inputs the captured image data.

表示手段16は、液晶表示装置、CRTディスプレイ等の表示装置であり、撮像した画像データを表示したり、人物画像として抽出された画像データを表示する。   The display means 16 is a display device such as a liquid crystal display device or a CRT display, and displays captured image data or image data extracted as a person image.

補助記憶手段18は、人物画像抽出装置を具現化するコンピュータで使用するプログラムを記録した可搬型記録媒体19であり、DVD、CD−ROM等が該当する。また、人物画像の背景除去に用いる多値テンプレート・データ等の人物画像抽出装置で使用するデータを記録する可搬型記録媒体19等も含む。   The auxiliary storage means 18 is a portable recording medium 19 in which a program used by a computer that embodies the person image extraction apparatus is recorded, and corresponds to a DVD, a CD-ROM, or the like. Further, a portable recording medium 19 for recording data used by a person image extraction device such as multi-value template data used for background removal of a person image is also included.

図2は、本発明の実施の形態に係る人物画像抽出装置のCPU11での前処理のフローチャートである。図2において、カメラ等の画像入力手段17は、背景画像を含めた人物画像を撮影し、撮影した背景画像を含む人物画像を画像データとして入力する。画像データが入力された場合、CPU11は、入力された画像データを記憶手段12の人物画像記憶部121に記憶する(ステップS201)。   FIG. 2 is a flowchart of pre-processing in CPU 11 of the person image extraction apparatus according to the embodiment of the present invention. In FIG. 2, an image input means 17 such as a camera captures a human image including a background image, and inputs the human image including the captured background image as image data. When image data is input, the CPU 11 stores the input image data in the person image storage unit 121 of the storage unit 12 (step S201).

なお、画像入力手段17により撮影された人物画像は、通常、RGB色空間で表されている。色空間はRGB色空間に限定されるものではなく、他にもHSV色空間、CIELAB(L*a*b)色空間等であってもよい。   Note that the person image captured by the image input means 17 is usually represented in the RGB color space. The color space is not limited to the RGB color space, but may be an HSV color space, a CIELAB (L * a * b) color space, or the like.

CPU11は、人物画像記憶部121に記憶した画像データを読み出して、表示手段16で表示する(ステップS202)。ユーザは、入力手段15であるマウス、タブレット等のポインティングデバイスによって、画面に表示されている背景画像を含む人物画像における頭頂部及び顎部を指定する。図3は、表示手段16で表示された、背景画像を含む人物画像の例示図である。図3の○印に示すように、背景画像を含む人物画像上で、頭頂部31と、顎部32が画面上で指定された場合、CPU11は、画面上で選択された点の表示座標値を算出して、RAM13に記憶する(ステップS203)。   The CPU 11 reads out the image data stored in the person image storage unit 121 and displays it on the display unit 16 (step S202). The user designates the crown and chin in the human image including the background image displayed on the screen by using a pointing device such as a mouse or a tablet as the input unit 15. FIG. 3 is a view showing an example of a person image including a background image displayed on the display means 16. As indicated by the circles in FIG. 3, when the top 31 and the jaw 32 are designated on the screen on the human image including the background image, the CPU 11 displays the display coordinate value of the point selected on the screen. Is calculated and stored in the RAM 13 (step S203).

CPU11は、頭頂部として指定された点の表示座標値を囲む所定の矩形領域を設定し、該矩形領域内に相当する座標に位置するすべての画素について、それぞれのR値、G値又はB値の平均値を求める。CPU11は、求めた画素毎のR値、G値又はB値の平均値を色空間内で相互に比較し、該色空間内におけるR値、G値又はB値の分散を算出する(ステップS204)。   CPU11 sets the predetermined | prescribed rectangular area surrounding the display coordinate value of the point designated as a top part, and each R value, G value, or B value is set about all the pixels located in the coordinate corresponded in this rectangular area. Find the average value of. The CPU 11 compares the obtained average value of the R value, G value, or B value for each pixel in the color space, and calculates the variance of the R value, G value, or B value in the color space (step S204). ).

CPU11は、算出した色空間内におけるR値、G値又はB値の分散に基づいて、例えば分散が小さいと判断する部分については、背景画像と人物画像の頭頂部との判別が困難であると判断することができる。具体例としては、背景画像が白色であるのに対して人物画像の頭頂部に白髪が存在する場合がこれに相当する。   Based on the variance of the R value, G value, or B value in the calculated color space, the CPU 11 determines that it is difficult to discriminate between the background image and the top of the person image, for example, for a portion that is judged to have a small variance. Judgment can be made. As a specific example, this corresponds to the case where the background image is white while white hair is present at the top of the person image.

そこで、CPU11は、算出された色空間内におけるR値、G値又はB値の分散が、所定の閾値よりも小さいと判断した場合(ステップS205:YES)、CPU11は、色空間の平均化を行い(ステップS206)、背景画像と人物画像の頭頂部との間に色覚的な差異が生じやすいように変換する。   Therefore, when the CPU 11 determines that the variance of the calculated R value, G value, or B value in the color space is smaller than a predetermined threshold (step S205: YES), the CPU 11 averages the color space. (Step S206), and conversion is performed so that a color-sensitive difference is likely to occur between the background image and the top of the person image.

図4は、色空間における明度に関する平均化処理の概要を示す図である。CPU11は、図4(a)に示すように明度の度数分布が一様でない色空間を、図4(b)に示すように明度の度数分布が一様であるように色空間を平均化(ストレッチ)する。明度だけでなく、彩度、色相についても同様の処理を行うことで、色の帯域を延ばすこと(ストレッチすること)ができ、後述する輪郭抽出処理において人物画像の頭頂部における輪郭の抽出が容易になるとともに、従来は困難であった白髪を含む頭髪部分についても、人物画像の頭部分として輪郭線を抽出することが可能となる。   FIG. 4 is a diagram showing an overview of the averaging process regarding the lightness in the color space. The CPU 11 averages the color space in which the lightness frequency distribution is not uniform as shown in FIG. 4A and the color space so that the lightness frequency distribution is uniform as shown in FIG. Stretch). By performing the same processing not only for lightness but also for saturation and hue, the color band can be extended (stretched), and it is easy to extract the contour at the top of the person image in the contour extraction processing described later. At the same time, it is possible to extract a contour line as a head portion of a person image even for a hair portion including gray hair, which has been difficult in the past.

次にCPU11は、人物画像において、なだらかな色変化をしている部分を同じ色の領域として平滑化する(ステップS207)。図5は、平滑化処理の原理の説明図である。取得した人物画像の全画素について、所定の画素の近傍、例えば上下左右10ピクセル以内に位置する画素とのR値、G値又はB値の差異を求める。求めた差異が所定の閾値以下である場合、所定の画素のR値、G値又はB値の値を、所定の画素の近傍に位置する画素とのR値、G値又はB値の平均値に置換する。図5では、左に位置する肌色領域では、R値、G値又はB値がなだらかに変化していることから、略均一なR値、G値又はB値へと置換される。しかし、輪郭線51の近傍では、背景画像の色へと大きく変化することから、R値、G値又はB値は平均値に置換されることはなく、輪郭線51が存在する画素のR値、G値又はB値が、隣接する画素のR値、G値又はB値と比べて突出し、結果として輪郭線51を強調することになる。   Next, the CPU 11 smoothes a portion in the person image that has a gentle color change as an area of the same color (step S207). FIG. 5 is an explanatory diagram of the principle of the smoothing process. For all the pixels of the acquired human image, a difference in R value, G value, or B value with a pixel located in the vicinity of a predetermined pixel, for example, within 10 pixels in the vertical and horizontal directions is obtained. When the obtained difference is equal to or less than a predetermined threshold, the R value, G value, or B value of the predetermined pixel is set to the average value of the R value, G value, or B value with the pixel located in the vicinity of the predetermined pixel. Replace with. In FIG. 5, since the R value, G value, or B value changes gently in the skin color region located on the left, the skin color region is replaced with a substantially uniform R value, G value, or B value. However, in the vicinity of the outline 51, the color changes greatly to the color of the background image, so the R value, G value, or B value is not replaced with the average value, and the R value of the pixel in which the outline 51 exists , G value or B value protrudes compared to R value, G value, or B value of adjacent pixels, and as a result, the contour line 51 is emphasized.

以上の前処理を行った上で、CPU11は、画素のR値、G値又はB値が急激に変化する部分を人物画像の輪郭として抽出する輪郭抽出処理を行う。図6は、本発明の実施の形態に係る人物画像抽出装置のCPU11での輪郭抽出処理のフローチャートである。図6に示す輪郭抽出処理は、一般的なフィルタ、例えばsobelフィルタを用いて、画素のR値、G値又はB値が急激に変化する座標を強調する処理である。   After performing the above preprocessing, the CPU 11 performs contour extraction processing for extracting a portion where the R value, G value, or B value of the pixel changes rapidly as the contour of the person image. FIG. 6 is a flowchart of the contour extraction process in the CPU 11 of the person image extraction apparatus according to the embodiment of the present invention. The contour extraction process shown in FIG. 6 is a process for emphasizing coordinates at which the R value, G value, or B value of a pixel changes rapidly using a general filter, for example, a sobel filter.

図7は、輪郭抽出処理に用いるsobelフィルタの例示図である。図7(a)は画面のx軸方向のフィルタ行列パラメータfxを、図7(b)は画面のy軸方向のフィルタ行列パラメータfyを、それぞれ示している。   FIG. 7 is a view showing an example of a sobel filter used for the contour extraction process. 7A shows the filter matrix parameter fx in the x-axis direction of the screen, and FIG. 7B shows the filter matrix parameter fy in the y-axis direction of the screen.

CPU11は、図7に示すフィルタ行列値を用いて、(数1)に示すようにR値、G値又はB値を、それぞれR'値、G’値又はB’値へと変換する(ステップS601)。なお、(数1)において、Rin、Gin又はBinは、それぞれ画素のR値、G値又はB値を示している。   The CPU 11 converts the R value, the G value, or the B value into an R ′ value, a G ′ value, or a B ′ value as shown in (Equation 1) using the filter matrix value shown in FIG. S601). In (Equation 1), Rin, Gin, or Bin indicates the R value, G value, or B value of the pixel, respectively.

(数1)
R'=255−|fx(Rin)+fy(Rin)|
G’=255−|fx(Gin)+fy(Gin)|
B’=255−|fx(Bin)+fy(Bin)|
(Equation 1)
R ′ = 255− | fx (Rin) + fy (Rin) |
G ′ = 255− | fx (Gin) + fy (Gin) |
B ′ = 255− | fx (Bin) + fy (Bin) |

sobelフィルタは、黒色を基調として、輪郭線を白色で表現するフィルタであることから、(数1)では、視認性を高めるべく白黒反転させ、白色を基調として、輪郭線を黒色で表現している。   Since the sobel filter is a filter that expresses the contour line in white with black as the tone, in (Equation 1), the black and white are inverted to improve visibility, and the contour line is expressed in black with white as the tone. Yes.

図8は、sobelフィルタを適用して輪郭線を抽出した後の人物画像の例示図である。図8では、輪郭線が強調されているものの、前処理途上のノイズ等が人物画像上に残されている。なお、従来の輪郭抽出処理では、この時点で輪郭を二値化処理を行っている。二値化処理を行うことにより輪郭線のラベリングが容易になるというメリットはあるものの、計算機負荷が増大することから、本発明ではあえて二値化処理を行わず、多値テンプレートによる背景画像の除去を容易ならしめている。   FIG. 8 is a view showing an example of the human image after the outline is extracted by applying the sobel filter. In FIG. 8, although the contour line is emphasized, noise or the like during the preprocessing is left on the person image. In the conventional contour extraction process, the contour is binarized at this point. Although there is a merit that the labeling of the contour line becomes easy by performing the binarization process, the computer load increases. Therefore, in the present invention, the binarization process is not performed and the background image is removed by the multi-value template. Make it easy.

CPU11は、図8に示す輪郭線を抽出した人物画像に対して、記憶部12に事前に記憶しておいた人物画像の多値テンプレートを適用する。すなわち、記憶部12に記憶してある多値テンプレートにおける頭頂部及び顎部を示す位置に、対象となる前処理を行った人物画像の頭頂部及び顎部が合致するように、人物画像を拡大又は縮小する。そして、CPU11は、多値テンプレートを用いた演算処理を行うことによって、人物画像の輪郭を強調し、背景画像の輪郭を弱める処理を行う。   The CPU 11 applies the multi-value template of the person image stored in advance in the storage unit 12 to the person image from which the contour line shown in FIG. 8 is extracted. That is, the person image is enlarged so that the head and jaw portions of the subject image that has been subjected to the target preprocessing match the positions indicating the crown and jaw portions in the multi-value template stored in the storage unit 12. Or reduce. And CPU11 performs the process which emphasizes the outline of a person image and weakens the outline of a background image by performing the calculation process using a multi-value template.

図9は、人物画像に適用する多値テンプレートの例示図である。図9に示すように、人物画像の中心部、すなわち人物画像である確度の高い部分を白色、人物画像から離れている周辺部、すなわち背景画像である確度の高い部分を黒色、その中間部分を順次階調データとして生成したテンプレートとして記憶手段12の多値テンプレート記憶部122に記憶しておく。   FIG. 9 is an illustration of a multi-value template applied to a person image. As shown in FIG. 9, the central portion of the human image, that is, the highly accurate portion that is the human image is white, the peripheral portion that is far from the human image, that is, the high-accuracy portion that is the background image, is black, and the intermediate portion is This is stored in the multi-value template storage unit 122 of the storage unit 12 as a template generated as sequential gradation data.

多値テンプレート記憶部122に記憶した多値テンプレートが、例えば256階調のグレースケールの多値テンプレートである場合、黒を0、白を255とし、中間色であるグレーを128で表す。該多値テンプレートを上述した白色を基調として、輪郭線を黒色で表現した人物画像に適用する。   When the multi-value template stored in the multi-value template storage unit 122 is, for example, a 256-level gray scale multi-value template, black is represented as 0, white is represented as 255, and intermediate gray is represented as 128. The multi-value template is applied to a human image in which the outline is expressed in black with the above-described white as a base tone.

具体的には、CPU11は、人物画像の頭頂部及び顎部の座標を多値テンプレートに合わせるように人物画像を拡大縮小する(ステップS602)。頭頂部及び顎部の座標が多値テンプレートに合致した場合、テンプレート値をTとして、各画素のR’値、B’値又はG’値を、それぞれ(数2)に示すようにR”値、G”値又はB”値へと変換する(ステップS603)。なお、(数2)において、max()、min()は、それぞれ最大値、最小値を求める関数を示している。なお、多値テンプレートを人物画像の頭頂部及び顎部の座標に合わせるように拡大縮小するものであってもよい。   Specifically, the CPU 11 enlarges / reduces the person image so that the coordinates of the top and chin of the person image match the multi-value template (step S602). When the coordinates of the top and chin match the multi-value template, the template value is T, and the R ′ value, B ′ value, or G ′ value of each pixel is R ″ value as shown in (Equation 2). , G ″ value or B ″ value (step S603). In (Expression 2), max () and min () indicate functions for obtaining the maximum value and the minimum value, respectively. The multi-value template may be enlarged or reduced so as to match the coordinates of the top and chin of the person image.

(数2)
R”=max(0,min(255,R’−T+128)
G”=max(0,min(255,G’−T+128)
B”=max(0,min(255,B’−T+128)
(Equation 2)
R ″ = max (0, min (255, R′−T + 128)
G ″ = max (0, min (255, G′−T + 128)
B ″ = max (0, min (255, B′−T + 128)

(数2)により、多値テンプレートが黒色である部分は白く表現され、輪郭を除去することが可能となり、多値テンプレートが白色である部分は黒く表現され、輪郭として抽出することが可能となる。したがって、背景画像である確度が高い多値テンプレートが黒色である部分は確実に除去することができるとともに、人物画像である確度が高い多値テンプレートが白色である部分は、確実に輪郭線を残すことが可能となる。図10は、多値テンプレート適用後の人物画像の例示図である。図10のように、画像全体に残存していたノイズ等を効果的に消去することが可能となる。   By (Equation 2), the portion where the multi-value template is black is expressed in white and the contour can be removed, and the portion where the multi-value template is white is expressed in black and can be extracted as the contour. . Therefore, it is possible to surely remove the black portion of the multi-value template with high accuracy that is the background image, and reliably leave the contour line portion of the white portion of the multi-value template with high accuracy that is the human image. It becomes possible. FIG. 10 is a view showing an example of a person image after the multi-value template is applied. As shown in FIG. 10, it is possible to effectively erase noise and the like remaining in the entire image.

次に、CPU11は、RGB色空間をHSV色空間へと変換処理を行う(ステップS604)。そして、色彩変化の度合いを画素毎に算出し(ステップS605)、所定の画素の近傍において色彩変化の度合いが一様であると判断された場合(ステップS606:YES)、該画素の近傍の画素については背景画像として一様な画素値、例えば灰色を示す画素へと置換する(ステップS607)。図11は、人物画像周縁の背景画像塗りつぶし処理の概要説明図である。図11に示すように、CPU11は、頭頂部の座標より上方はすべて背景画像であると判断でき、抽出した輪郭線の外側も背景画像であると判断できる。したがって、頭頂部31及び顎部32の座標に基づいて、輪郭抽出処理を行った人物画像を内包する矩形領域111を設定し、矩形領域111内で色彩の変化の度合いを画素毎に算出し、変化の度合いが一様である部分の画素については、一様な画素値を有する画素へと置換する。これにより、人物画像の周辺のノイズのほとんどを消去することが可能となる。   Next, the CPU 11 performs a conversion process from the RGB color space to the HSV color space (step S604). Then, the degree of color change is calculated for each pixel (step S605), and when it is determined that the degree of color change is uniform in the vicinity of a predetermined pixel (step S606: YES), pixels in the vicinity of the pixel Is replaced with a uniform pixel value as a background image, for example, a pixel indicating gray (step S607). FIG. 11 is an explanatory diagram of the outline of the background image painting process at the periphery of the person image. As shown in FIG. 11, the CPU 11 can determine that everything above the coordinates of the top is a background image, and can also determine that the outside of the extracted outline is also a background image. Therefore, based on the coordinates of the top 31 and the chin 32, a rectangular area 111 containing the person image subjected to the contour extraction process is set, and the degree of color change in the rectangular area 111 is calculated for each pixel. Pixels having a uniform degree of change are replaced with pixels having uniform pixel values. This makes it possible to eliminate most of the noise around the person image.

以下、CPU11は、輪郭線に対する細部調整処理を行うことによって、人物画像のより鮮明な輪郭線を特定する。まず、CPU11は、尖端障害物を除去すべく、背景画像塗りつぶし処理終了後の人物画像を縮小した後、元の大きさへ再拡大する。人物画像を縮小することによって、尖端障害物も縮小することから、尖端障害物が小さい場合は再拡大した時点で消去される。また、消去されないまでも、線幅が細くなり、表示が薄くなる。これを利用して、CPU11は、縮小・拡大処理をした人物画像と、元の人物画像とを対比し、消去された部分又は表示が薄くなった部分を不要な尖端障害物として抽出し、背景画像として一様な画素値を有する画素へと置換する。これにより、人物画像の尖端障害物を確実に消去することが可能となる。   Hereinafter, the CPU 11 specifies a clearer outline of the person image by performing a detailed adjustment process on the outline. First, the CPU 11 reduces the person image after the background image filling process to remove the pointed obstacle, and then re-enlarges it to the original size. By reducing the person image, the pointed obstacle is also reduced. If the pointed obstacle is small, it is erased when it is re-enlarged. Further, even if not erased, the line width becomes narrower and the display becomes thinner. Using this, the CPU 11 compares the reduced / enlarged person image with the original person image, extracts the erased part or the part with a thin display as an unnecessary pointed obstacle, The pixel is replaced with a pixel having a uniform pixel value. Thereby, it becomes possible to erase the pointed obstacle in the human image with certainty.

また、CPU11は、従来の顔画像抽出処理で行われている肌色抽出処理により、人物画像の顔画像を検出し、顎部の座標を中心とした周囲の矩形領域に対して、肌色であるか否かを判断する。同系色である部分は、顔画像の一部又は首部であると判断でき、その他の部分は抽出されるエッジの傾きに応じて、衣服部分、肩部分、背景部分であると区別することが可能となる。   Further, the CPU 11 detects the face image of the person image by the skin color extraction process performed in the conventional face image extraction process, and whether the skin color is the skin color with respect to the surrounding rectangular area centered on the coordinates of the jaw part. Judge whether or not. A similar color part can be determined to be part of the face image or the neck part, and other parts can be distinguished from the clothes part, shoulder part, and background part according to the inclination of the extracted edge. It becomes.

例えば肩部分においては、抽出されたエッジの方向は所定の範囲内に収まる。図12は、左肩部分におけるエッジ角度抽出の説明図である。すなわち、左肩部分である場合、図12に示すように、水平方向を0度とした場合に、肩を示す輪郭線は必ず下向きに角度θ傾斜している。したがって、CPU11は、当該左肩部分で上向きに傾斜しているエッジ121が検出された場合、エッジ121は人物画像の肩を示す輪郭線ではないと容易に判断することができる。よって、CPU11は、肩部分のエッジの傾斜角度θを抽出し、傾斜角度θが所定の範囲内にない、すなわち水平下向きを正とした場合θ<0と判断した場合、該エッジ部分について背景画像として背景画像として一様な画素値を有する画素へと置換する。これにより、人物画像の肩部分の輪郭線をより明確にし、不要なエッジを消去することが可能となる。図13は、不要なエッジ部分消去後の人物画像の例示図である。図13に示すように、最初の画像に障害物としていかなる背景画像が映っている場合であっても、上述した処理を行うことにより確実に人物画像を抽出することが可能となる。   For example, in the shoulder portion, the direction of the extracted edge falls within a predetermined range. FIG. 12 is an explanatory diagram of edge angle extraction in the left shoulder portion. That is, in the case of the left shoulder portion, as shown in FIG. 12, when the horizontal direction is set to 0 degree, the contour line indicating the shoulder is always inclined downward by the angle θ. Therefore, when the edge 121 inclined upward in the left shoulder portion is detected, the CPU 11 can easily determine that the edge 121 is not the contour line indicating the shoulder of the person image. Therefore, when the CPU 11 extracts the inclination angle θ of the edge of the shoulder portion and determines that θ <0 when the inclination angle θ is not within the predetermined range, that is, when the horizontal downward direction is positive, the background image for the edge portion is obtained. As a background image, the pixel is replaced with a pixel having a uniform pixel value. As a result, the contour line of the shoulder portion of the person image can be made clearer and unnecessary edges can be deleted. FIG. 13 is a view showing an example of a person image after unnecessary edge portion deletion. As shown in FIG. 13, even if any background image appears as an obstacle in the first image, it is possible to extract a person image reliably by performing the above-described processing.

以上のように、本実施の形態によれば、背景画像を含む人物画像について頭頂部及び顎部を指定さえすれば、背景画像が一様な画像でない場合であっても、人物画像を確実に抽出できるよう輪郭線を定めることが可能となる。   As described above, according to the present embodiment, as long as the top and the chin are specified for the human image including the background image, the human image can be reliably detected even if the background image is not a uniform image. It is possible to define a contour line so that it can be extracted.

以下、付記する。   The following is added.

(付記1) 画像中の前景に撮影されている人物画像を抽出する人物画像抽出装置において、
前記人物画像の頭頂部及び顎部を示す点の座標を取得する手段と、
取得した前記頭頂部を示す座標を含む矩形領域内に位置する画素の画素値の色空間内での分散を算出する手段と、
算出した画素値の分散が閾値より小さいか否か判断する手段と、
該手段で画素値の分散が閾値より小さいと判断した場合、前記色空間の平均化を行う手段と、
人物画像の輪郭を隣接する画素の画素値の変化の度合が閾値よりも大きい部分として抽出する輪郭抽出部と、
背景画像を除去する背景画像除去部とを備え、
該背景画像除去部は、人物の形状を模した多値テンプレートを記憶しておき、前記人物画像の頭頂部及び顎部の座標を前記多値テンプレートの顔部分に適合させ、前記人物画像と前記多値テンプレートとの合成画像を生成すべくなしてあることを特徴とする人物画像抽出装置。
(Supplementary Note 1) In a person image extraction apparatus that extracts a person image taken in the foreground in an image,
Means for acquiring the coordinates of a point indicating the crown and chin of the person image;
Means for calculating a dispersion in a color space of a pixel value of a pixel located in a rectangular area including a coordinate indicating the acquired top portion;
Means for determining whether or not the variance of the calculated pixel values is smaller than a threshold;
Means for averaging the color space if the means determines that the variance of the pixel values is less than a threshold;
A contour extraction unit that extracts a contour of a person image as a portion in which the degree of change in the pixel value of an adjacent pixel is larger than a threshold;
A background image removal unit for removing the background image,
The background image removal unit stores a multi-value template imitating the shape of a person, adapts the coordinates of the top and chin of the person image to the face part of the multi-value template, and A human image extracting apparatus characterized in that a composite image with a multi-value template is generated.

(付記2) 前記背景画像除去部は、
前記頭頂部を示す座標を含む矩形領域内に位置する画素の画素値の色空間内での分散に基づいて頭髪部分を抽出し、頭髪画像と背景画像との境界を特定すべくなしてあることを特徴とする付記1記載の人物画像抽出装置。
(Appendix 2) The background image removal unit
The hair portion is extracted based on the dispersion in the color space of the pixel value of the pixel located in the rectangular area including the coordinates indicating the top of the head, and the boundary between the hair image and the background image is specified. The person image extraction device according to appendix 1, characterized by:

(付記3) 前記背景画像除去部は、
前記顎部として取得した座標に基づいて、顔面画像の画素値の平均値を求め、求めた平均値との画素値の差異が所定の閾値より大きいか否かを判別することにより、人物画像の首周り部分と背景画像との境界を特定すべくなしてあることを特徴とする付記1又は2に記載の人物画像抽出装置。
(Supplementary Note 3) The background image removing unit
Based on the coordinates acquired as the jaw, the average value of the pixel values of the facial image is obtained, and by determining whether the difference in pixel value from the obtained average value is greater than a predetermined threshold, The person image extraction device according to appendix 1 or 2, wherein a boundary between the neck portion and the background image is specified.

(付記4) 前記背景画像除去部は、
前記人物画像の肩近傍の輪郭線を抽出し、輪郭線の傾きが所定の範囲内にない輪郭線を消去すべくなしてあることを特徴とする付記1乃至3のいずれか一項に記載の人物画像抽出装置。
(Supplementary Note 4) The background image removing unit
The contour line near the shoulder of the person image is extracted, and a contour line whose inclination is not within a predetermined range is to be deleted. Human image extraction device.

(付記5) 画像中の前景に撮影されている人物画像を抽出する人物画像抽出方法において、
前記人物画像の頭頂部及び顎部を示す点の座標を取得するステップと、
取得した前記頭頂部を示す座標を含む矩形領域内に位置する画素の画素値の色空間内での分散を算出するステップと、
算出した画素値の分散が閾値より小さいか否か判断するステップと、
画素値の分散が閾値より小さいと判断した場合、前記色空間の平均化を行うステップと、
人物画像の輪郭を隣接する画素の画素値の変化の度合が閾値よりも大きい部分として抽出するステップと、
背景画像を除去するステップとを含み、
前記背景画像を除去するステップは、人物の形状を模した多値テンプレートを記憶しておき、前記人物画像の頭頂部及び顎部の座標を前記多値テンプレートの顔部分に適合させ、前記人物画像と前記多値テンプレートとの合成画像を生成するものであることを特徴とする人物画像抽出方法。
(Additional remark 5) In the person image extraction method which extracts the person image currently image | photographed in the foreground in an image,
Obtaining coordinates of points indicating the top and chin of the person image;
Calculating a variance in a color space of pixel values of pixels located in a rectangular area including coordinates indicating the acquired top of the head;
Determining whether the calculated variance of pixel values is less than a threshold;
If it is determined that the variance of the pixel values is less than a threshold, averaging the color space;
Extracting a contour of a person image as a portion where the degree of change in pixel value of an adjacent pixel is larger than a threshold;
Removing a background image,
The step of removing the background image stores a multi-value template imitating the shape of a person, adapts the coordinates of the top and chin of the person image to the face portion of the multi-value template, and And a multi-value template for generating a composite image.

(付記6) 前記背景画像を除去するステップは、
前記頭頂部を示す座標を含む矩形領域内に位置する画素の画素値の色空間内での分散に基づいて頭髪部分を抽出し、頭髪画像と背景画像との境界を特定することを特徴とする付記5記載の人物画像抽出方法。
(Supplementary Note 6) The step of removing the background image includes:
A hair portion is extracted based on a dispersion in a color space of a pixel value of a pixel located in a rectangular area including coordinates indicating the top of the head, and a boundary between the hair image and a background image is specified. The person image extraction method according to appendix 5.

(付記7) 前記背景画像を除去するステップは、
前記顎部として取得した座標に基づいて、顔面画像の画素値の平均値を求め、求めた平均値との画素値の差異が所定の閾値より大きいか否かを判別することにより、人物画像の首周り部分と背景画像との境界を特定することを特徴とする付記5又は6に記載の人物画像抽出方法。
(Supplementary Note 7) The step of removing the background image includes:
Based on the coordinates acquired as the jaw, the average value of the pixel values of the facial image is obtained, and by determining whether the difference in pixel value from the obtained average value is greater than a predetermined threshold, The person image extraction method according to appendix 5 or 6, characterized in that a boundary between the neck periphery and the background image is specified.

(付記8) 前記背景画像を除去するステップは、
前記人物画像の肩近傍の輪郭線を抽出し、輪郭線の傾きが所定の範囲内にない輪郭線を消去することを特徴とする付記5乃至7のいずれか一項に記載の人物画像抽出方法。
(Supplementary Note 8) The step of removing the background image includes:
8. The person image extraction method according to any one of appendices 5 to 7, wherein a contour line near the shoulder of the person image is extracted, and a contour line whose inclination is not within a predetermined range is deleted. .

(付記9) 画像中の前景に撮影されている人物画像を抽出する処理をコンピュータに実行させるコンピュータプログラムにおいて、
前記人物画像の頭頂部及び顎部を示す点の座標を取得するステップと、
取得した前記頭頂部を示す座標を含む矩形領域内に位置する画素の画素値の色空間内での分散を算出するステップと、
算出した画素値の分散が閾値より小さいか否か判断するステップと、
画素値の分散が閾値より小さいと判断した場合、前記色空間の平均化を行うステップと、
人物画像の輪郭を隣接する画素の画素値の変化の度合が閾値よりも大きい部分として抽出するステップと、
背景画像を除去するステップとを含み、
前記背景画像を除去するステップは、人物の形状を模した多値テンプレートを記憶しておき、前記人物画像の頭頂部及び顎部の座標を前記多値テンプレートの顔部分に適合させ、前記人物画像と前記多値テンプレートとの合成画像を生成するものであることを特徴とするコンピュータプログラム。
(Supplementary Note 9) In a computer program for causing a computer to execute a process of extracting a person image taken in the foreground in an image,
Obtaining coordinates of points indicating the top and chin of the person image;
Calculating a variance in a color space of pixel values of pixels located in a rectangular area including coordinates indicating the acquired top of the head;
Determining whether the calculated variance of pixel values is less than a threshold;
If it is determined that the variance of the pixel values is less than a threshold, averaging the color space;
Extracting a contour of a person image as a portion where the degree of change in pixel value of an adjacent pixel is larger than a threshold;
Removing a background image,
The step of removing the background image stores a multi-value template imitating the shape of a person, adapts the coordinates of the top and chin of the person image to the face portion of the multi-value template, and And a computer program for generating a composite image of the multi-value template.

(付記10) 前記背景画像を除去するステップは、
前記頭頂部を示す座標を含む矩形領域内に位置する画素の画素値の色空間内での分散に基づいて頭髪部分を抽出し、頭髪画像と背景画像との境界を特定することを特徴とする付記9記載のコンピュータプログラム。
(Supplementary Note 10) The step of removing the background image includes:
A hair portion is extracted based on a dispersion in a color space of a pixel value of a pixel located in a rectangular area including coordinates indicating the top of the head, and a boundary between the hair image and a background image is specified. The computer program according to appendix 9.

(付記11) 前記背景画像を除去するステップは、
前記顎部として取得した座標に基づいて、顔面画像の画素値の平均値を求め、求めた平均値との画素値の差異が所定の閾値より大きいか否かを判別することにより、人物画像の首周り部分と背景画像との境界を特定することを特徴とする付記9又は10に記載のコンピュータプログラム。
(Supplementary Note 11) The step of removing the background image includes:
Based on the coordinates acquired as the jaw, the average value of the pixel values of the facial image is obtained, and by determining whether the difference in pixel value from the obtained average value is greater than a predetermined threshold, The computer program according to appendix 9 or 10, wherein a boundary between a neck portion and a background image is specified.

(付記12) 前記背景画像を除去するステップは、
前記人物画像の肩近傍の輪郭線を抽出し、輪郭線の傾きが所定の範囲内にない輪郭線を消去することを特徴とする付記9乃至11のいずれか一項に記載のコンピュータプログラム。
(Supplementary Note 12) The step of removing the background image includes:
The computer program according to any one of appendices 9 to 11, wherein a contour line in the vicinity of a shoulder of the person image is extracted and a contour line whose inclination is not within a predetermined range is deleted.

本発明の実施の形態に係る人物画像抽出装置を具現化するコンピュータの概略構成図である。1 is a schematic configuration diagram of a computer that embodies a human image extraction apparatus according to an embodiment of the present invention. 本発明の実施の形態に係る人物画像抽出装置のCPUでの前処理のフローチャートである。It is a flowchart of the pre-processing in CPU of the person image extraction apparatus which concerns on embodiment of this invention. 表示手段で表示された背景画像を含む人物画像の例示図である。It is an illustration figure of the person image containing the background image displayed by the display means. 色空間における明度に関する平均化処理の概要を示す図である。It is a figure which shows the outline | summary of the averaging process regarding the lightness in color space. 平滑化処理の原理の説明図である。It is explanatory drawing of the principle of a smoothing process. 本発明の実施の形態に係る人物画像抽出装置のCPUでの輪郭抽出処理のフローチャートである。It is a flowchart of the contour extraction process in CPU of the person image extraction apparatus which concerns on embodiment of this invention. 輪郭抽出処理に用いるsobelフィルタの例示図である。It is an illustration figure of a sobel filter used for an outline extraction process. sobelフィルタを適用して輪郭線を抽出した後の人物画像の例示図である。It is an illustration figure of a person image after applying a sobel filter and extracting a contour line. 人物画像に適用する多値テンプレートの例示図である。It is an illustration figure of the multi-value template applied to a person image. 多値テンプレート適用後の人物画像の例示図である。It is an illustration figure of the person image after multi-value template application. 人物画像周縁の背景画像塗りつぶし処理の概要説明図である。It is a schematic explanatory drawing of the background image filling process of a person image periphery. 左肩部分におけるエッジ角度抽出の説明図である。It is explanatory drawing of edge angle extraction in a left shoulder part. 不要なエッジ部分消去後の人物画像の例示図である。It is an illustration figure of the person image after unnecessary edge part deletion.

符号の説明Explanation of symbols

11 CPU
12 記憶手段
13 RAM
14 通信手段
15 入力手段
16 表示手段
17 画像入力手段
18 補助記憶手段
19 可搬型記録媒体
31 頭頂部
32 顎部
51 輪郭線
11 CPU
12 storage means 13 RAM
DESCRIPTION OF SYMBOLS 14 Communication means 15 Input means 16 Display means 17 Image input means 18 Auxiliary storage means 19 Portable recording medium 31 Top part 32 Jaw part 51 Contour line

Claims (5)

画像中の前景に撮影されている人物画像を抽出する人物画像抽出装置において、
前記人物画像の頭頂部及び顎部を示す点の座標を取得する手段と、
取得した前記頭頂部を示す座標を含む矩形領域内に位置する画素の画素値の色空間内での分散を算出する手段と、
算出した画素値の分散が閾値より小さいか否か判断する手段と、
該手段で画素値の分散が閾値より小さいと判断した場合、前記色空間の平均化を行う手段と、
人物画像の輪郭を隣接する画素の画素値の変化の度合が閾値よりも大きい部分として抽出する輪郭抽出部と、
背景画像を除去する背景画像除去部とを備え、
該背景画像除去部は、人物の形状を模した多値テンプレートを記憶しておき、前記人物画像の頭頂部及び顎部の座標を前記多値テンプレートの顔部分に適合させ、前記人物画像と前記多値テンプレートとの合成画像を生成すべくなしてあることを特徴とする人物画像抽出装置。
In a person image extraction device that extracts a person image taken in the foreground in the image,
Means for acquiring the coordinates of a point indicating the crown and chin of the person image;
Means for calculating a dispersion in a color space of a pixel value of a pixel located in a rectangular region including the acquired coordinates indicating the top of the head;
Means for determining whether or not the variance of the calculated pixel values is smaller than a threshold;
Means for averaging the color space if the means determines that the variance of the pixel values is less than a threshold;
A contour extraction unit that extracts a contour of a person image as a portion in which the degree of change in the pixel value of an adjacent pixel is larger than a threshold;
A background image removal unit for removing the background image,
The background image removal unit stores a multi-value template imitating the shape of a person, adapts the coordinates of the top and chin of the person image to the face part of the multi-value template, and A human image extracting apparatus characterized in that a composite image with a multi-value template is generated.
前記背景画像除去部は、
前記頭頂部を示す座標を含む矩形領域内に位置する画素の画素値の色空間内での分散に基づいて頭髪部分を抽出し、頭髪画像と背景画像との境界を特定すべくなしてあることを特徴とする請求項1記載の人物画像抽出装置。
The background image removing unit
The hair portion is extracted based on the dispersion in the color space of the pixel value of the pixel located in the rectangular area including the coordinates indicating the top of the head, and the boundary between the hair image and the background image is specified. The person image extraction device according to claim 1.
前記背景画像除去部は、
前記顎部として取得した座標に基づいて、顔面画像の画素値の平均値を求め、求めた平均値との画素値の差異が所定の閾値より大きいか否かを判別することにより、人物画像の首周り部分と背景画像との境界を特定すべくなしてあることを特徴とする請求項1又は2に記載の人物画像抽出装置。
The background image removing unit
Based on the coordinates acquired as the jaw, the average value of the pixel values of the facial image is obtained, and by determining whether the difference in pixel value from the obtained average value is greater than a predetermined threshold, 3. The person image extracting apparatus according to claim 1, wherein a boundary between the neck portion and the background image is specified.
前記背景画像除去部は、
前記人物画像の肩近傍の輪郭線を抽出し、輪郭線の傾きが所定の範囲内にない輪郭線を消去すべくなしてあることを特徴とする請求項1乃至3のいずれか一項に記載の人物画像抽出装置。
The background image removing unit
The contour line in the vicinity of the shoulder of the person image is extracted, and a contour line whose inclination is not within a predetermined range is to be erased. Human image extraction device.
画像中の前景に撮影されている人物画像を抽出する処理をコンピュータに実行させるコンピュータプログラムにおいて、
前記人物画像の頭頂部及び顎部を示す点の座標を取得するステップと、
取得した前記頭頂部を示す座標を含む矩形領域内に位置する画素の画素値の色空間内での分散を算出するステップと、
算出した画素値の分散が閾値より小さいか否か判断するステップと、
画素値の分散が閾値より小さいと判断した場合、前記色空間の平均化を行うステップと、
人物画像の輪郭を隣接する画素の画素値の変化の度合が閾値よりも大きい部分として抽出するステップと、
背景画像を除去するステップとを含み、
前記背景画像を除去するステップは、人物の形状を模した多値テンプレートを記憶しておき、前記人物画像の頭頂部及び顎部の座標を前記多値テンプレートの顔部分に適合させ、前記人物画像と前記多値テンプレートとの合成画像を生成するものであることを特徴とするコンピュータプログラム。
In a computer program for causing a computer to execute a process of extracting a person image taken in the foreground in the image,
Obtaining coordinates of points indicating the top and chin of the person image;
Calculating a variance in a color space of pixel values of pixels located in a rectangular area including coordinates indicating the acquired top of the head;
Determining whether the calculated variance of pixel values is less than a threshold;
If it is determined that the variance of the pixel values is less than a threshold, averaging the color space;
Extracting a contour of a person image as a portion where the degree of change in pixel value of an adjacent pixel is larger than a threshold;
Removing a background image,
The step of removing the background image stores a multi-value template imitating the shape of a person, adapts the coordinates of the top and chin of the person image to the face portion of the multi-value template, and And a computer program for generating a composite image of the multi-value template.
JP2004012363A 2004-01-20 2004-01-20 Person image extraction apparatus and computer program Expired - Fee Related JP4502645B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004012363A JP4502645B2 (en) 2004-01-20 2004-01-20 Person image extraction apparatus and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004012363A JP4502645B2 (en) 2004-01-20 2004-01-20 Person image extraction apparatus and computer program

Publications (2)

Publication Number Publication Date
JP2005208760A true JP2005208760A (en) 2005-08-04
JP4502645B2 JP4502645B2 (en) 2010-07-14

Family

ID=34898759

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004012363A Expired - Fee Related JP4502645B2 (en) 2004-01-20 2004-01-20 Person image extraction apparatus and computer program

Country Status (1)

Country Link
JP (1) JP4502645B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012528506A (en) * 2009-05-29 2012-11-12 デジタルオプティックス・コーポレイション・ヨーロッパ・リミテッド Method and apparatus for separating the top of the foreground from the background
JP2013026936A (en) * 2011-07-23 2013-02-04 Canon Inc Image processing apparatus, image processing method, and program
US8605955B2 (en) 2009-06-29 2013-12-10 DigitalOptics Corporation Europe Limited Methods and apparatuses for half-face detection
KR101440620B1 (en) * 2008-02-01 2014-09-17 삼성전자주식회사 Method and apparatus for estimation of object boundaries in moving picture
US8971628B2 (en) 2010-07-26 2015-03-03 Fotonation Limited Face detection using division-generated haar-like features for illumination invariance
CN109829850A (en) * 2019-03-06 2019-05-31 百度在线网络技术(北京)有限公司 Image processing method, device, equipment and computer-readable medium
JP2020077285A (en) * 2018-11-09 2020-05-21 富士通フロンテック株式会社 Image processing device, image processing method, image processing program and image processing system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05342352A (en) * 1992-06-08 1993-12-24 Dainippon Screen Mfg Co Ltd Edge extracting device for multi-gradation picture
JPH0877334A (en) * 1994-09-09 1996-03-22 Konica Corp Automatic feature point extracting method for face image
JPH08237537A (en) * 1995-03-01 1996-09-13 Fuji Mach Mfg Co Ltd Image processor
JP2000036032A (en) * 1998-07-17 2000-02-02 Fujitsu Ltd Foreground picture extracting method, picture processor, automatic trimming device, recording medium and portrait picture device
JP2003216959A (en) * 2002-01-22 2003-07-31 Toppan Printing Co Ltd Method, device and program for extracting outline

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05342352A (en) * 1992-06-08 1993-12-24 Dainippon Screen Mfg Co Ltd Edge extracting device for multi-gradation picture
JPH0877334A (en) * 1994-09-09 1996-03-22 Konica Corp Automatic feature point extracting method for face image
JPH08237537A (en) * 1995-03-01 1996-09-13 Fuji Mach Mfg Co Ltd Image processor
JP2000036032A (en) * 1998-07-17 2000-02-02 Fujitsu Ltd Foreground picture extracting method, picture processor, automatic trimming device, recording medium and portrait picture device
JP2003216959A (en) * 2002-01-22 2003-07-31 Toppan Printing Co Ltd Method, device and program for extracting outline

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101440620B1 (en) * 2008-02-01 2014-09-17 삼성전자주식회사 Method and apparatus for estimation of object boundaries in moving picture
JP2012528506A (en) * 2009-05-29 2012-11-12 デジタルオプティックス・コーポレイション・ヨーロッパ・リミテッド Method and apparatus for separating the top of the foreground from the background
US8633999B2 (en) 2009-05-29 2014-01-21 DigitalOptics Corporation Europe Limited Methods and apparatuses for foreground, top-of-the-head separation from background
US8605955B2 (en) 2009-06-29 2013-12-10 DigitalOptics Corporation Europe Limited Methods and apparatuses for half-face detection
US8971628B2 (en) 2010-07-26 2015-03-03 Fotonation Limited Face detection using division-generated haar-like features for illumination invariance
US8977056B2 (en) 2010-07-26 2015-03-10 Fotonation Limited Face detection using division-generated Haar-like features for illumination invariance
JP2013026936A (en) * 2011-07-23 2013-02-04 Canon Inc Image processing apparatus, image processing method, and program
JP2020077285A (en) * 2018-11-09 2020-05-21 富士通フロンテック株式会社 Image processing device, image processing method, image processing program and image processing system
JP7057268B2 (en) 2018-11-09 2022-04-19 富士通フロンテック株式会社 Image processing equipment, image processing methods, image processing programs and image processing systems
CN109829850A (en) * 2019-03-06 2019-05-31 百度在线网络技术(北京)有限公司 Image processing method, device, equipment and computer-readable medium

Also Published As

Publication number Publication date
JP4502645B2 (en) 2010-07-14

Similar Documents

Publication Publication Date Title
JP4396387B2 (en) Image correction device
US6389155B2 (en) Image processing apparatus
JP4461789B2 (en) Image processing device
KR101446975B1 (en) Automatic face and skin beautification using face detection
JP4345622B2 (en) Eye color estimation device
JP5538909B2 (en) Detection apparatus and method
JP4739870B2 (en) Sunglasses detection device and face center position detection device
US20120020568A1 (en) Image processor and image processing method
US9135726B2 (en) Image generation apparatus, image generation method, and recording medium
JP6489427B2 (en) Image processing apparatus and image processing method
JPH11313202A (en) Image processing unit and image processing method
JP2007272435A (en) Face feature extraction device and face feature extraction method
US7212674B1 (en) Method, apparatus and recording medium for face extraction
JP4502645B2 (en) Person image extraction apparatus and computer program
JP6098133B2 (en) Face component extraction device, face component extraction method and program
JP4496005B2 (en) Image processing method and image processing apparatus
JP2009237627A (en) Image processing method, image processor, image processing program, and printer
JP4742068B2 (en) Image processing method, image processing system, and image processing program
JP2009050035A (en) Image processing method, image processing system, and image processing program
JP2005165983A (en) Method for detecting jaw of human face, jaw detection system, and jaw detection program
JP2015184701A (en) Image processing apparatus, image processing method, and program
JP2021193624A (en) Recognition device, recognition method and recognition program
JP2013171511A (en) Image processing device, image processing program and storage medium
JP2007025901A (en) Image processor and image processing method
WO2023276271A1 (en) Information processing device, information processing method, and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061115

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090623

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090824

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091110

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100106

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100420

R150 Certificate of patent or registration of utility model

Ref document number: 4502645

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130430

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140430

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees