JP5136335B2 - CAMERA DEVICE, IMAGE CUTTING METHOD, PROGRAM - Google Patents

CAMERA DEVICE, IMAGE CUTTING METHOD, PROGRAM Download PDF

Info

Publication number
JP5136335B2
JP5136335B2 JP2008252013A JP2008252013A JP5136335B2 JP 5136335 B2 JP5136335 B2 JP 5136335B2 JP 2008252013 A JP2008252013 A JP 2008252013A JP 2008252013 A JP2008252013 A JP 2008252013A JP 5136335 B2 JP5136335 B2 JP 5136335B2
Authority
JP
Japan
Prior art keywords
image
main subject
capturing
procedure
camera device
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
JP2008252013A
Other languages
Japanese (ja)
Other versions
JP2010087646A (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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2008252013A priority Critical patent/JP5136335B2/en
Publication of JP2010087646A publication Critical patent/JP2010087646A/en
Application granted granted Critical
Publication of JP5136335B2 publication Critical patent/JP5136335B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)

Description

本発明は、画像から特定領域を切り出す機能を備えたカメラ装置、及び切り出し画像表示方法と、それらの実現に使用されるプログラムに関するものである。   The present invention relates to a camera device having a function of cutting out a specific area from an image, a cut-out image display method, and a program used for realizing them.

従来、カメラ装置で撮影した画像から所望する被写体に相当する特定領域の画像を切り出す(抽出する)技術として、例えば下記特許文献1には、任意の背景にユーザが所望する主要被写体を配置して撮影した被写体込み画像と、主要被写体が存在しない背景のみの背景画像とを取得した後、双方の画像において一致しない被写体領域を切り出す技術が記載されている。   Conventionally, as a technique for cutting out (extracting) an image of a specific area corresponding to a desired subject from an image photographed by a camera device, for example, in Patent Document 1 below, a main subject desired by a user is arranged on an arbitrary background. A technique is described in which after capturing a photographed subject-incorporated image and a background image with only a background where no main subject exists, a subject region that does not match in both images is cut out.

かかる従来技術においては、被写体込み画像と背景画像との間で一致しない被写体領域は、ユーザが所望する主要被写体の領域である。そのため、上記従来技術によれば、撮影画像から主要被写体のみの画像を切り出すことができる。
特開平9−186936号公報
In such a conventional technique, the subject region that does not match between the subject-incorporated image and the background image is the region of the main subject desired by the user. Therefore, according to the prior art, an image of only the main subject can be cut out from the captured image.
JP-A-9-186936

しかしながら、上記技術においては、例えば被写体込み画像を撮影したときの背景の状態と、背景画像を撮影したときの背景の状態とが変化している場合、この変化した背景領域までもが切り出されてしまう。例えば、被写体込み画像を撮影したときから背景画像を撮影したときまでの間に背景である空の雲が動いた場合、ユーザが所望しないこの雲までもが切り出されてしまう。そして、係る事態は、被写体込み画像と背景画像とを撮影した後でなければ撮影者は知ることができないという問題があった。   However, in the above technique, for example, when the background state when the image including the subject is photographed and the background state when the background image is photographed are changed, the changed background region is also cut out. End up. For example, when a cloud in the sky as the background moves between the time when the subject-included image is captured and the time when the background image is captured, even the cloud that the user does not desire is cut out. In addition, such a situation has a problem that the photographer cannot know unless the subject-included image and the background image are captured.

本発明は、かかる従来の課題に鑑みてなされたものであり、意図する被写体に相当する特定領域のみが切り出された画像を確実に取得することができるカメラ装置及び画像切り出し方法、その実現に使用されるプログラムを提供することを目的とする。   The present invention has been made in view of such a conventional problem, and is capable of reliably acquiring an image in which only a specific region corresponding to an intended subject is cut out, and an image cutting method used for realizing the camera device. The purpose is to provide a program.

請求項1記載の発明に係るカメラ装置にあっては、画像から特定領域を切り出す機能を備えたカメラ装置であって、被写体を撮像する撮像手段と、この撮像手段により一定周期で撮像された画像をスルー画像として表示する表示手段と、前記撮像手段により撮像された第1の画像と、この第1の画像の撮像後における前記表示手段によるスルー画像の表示期間中に前記撮像手段により撮像された第2の画像とに基づいて主要被写体領域を特定する特定手段と、この特定手段により特定された主要被写体領域の部分画像を、前記第1の画像と前記第2の画像とのいずれか一方から保存対象画像として切り出す切り出し手段と、前記表示手段によるスルー画像の表示中に、前記撮像手段に被写体を繰り返し撮像させる撮像制御手段と、前記切り出し手段により繰り返し切り出される保存対象画像のうち、それまでの中で最大の保存対象画像を記憶する記憶手段とを備えことを特徴とする。
The camera device according to the first aspect of the present invention is a camera device having a function of cutting out a specific area from an image, and an imaging unit that captures an image of an object and an image captured by the imaging unit at a constant period. Display means for displaying the image as a through image, a first image captured by the imaging means, and the imaging means during the display period of the through image by the display means after the first image is captured. A specifying means for specifying the main subject area based on the second image, and a partial image of the main subject area specified by the specifying means from either one of the first image and the second image and clipping means for cutting out a storage target image, while displaying the through image by said display means, and an imaging control means for imaging repeatedly subject to said imaging means, leaving the cutting Of storage target image repeatedly extracted by means, characterized in that Ru and a storage means for storing the maximum storage target image in far.

また、請求項記載の発明に係るカメラ装置にあっては、画像から特定領域を切り出す機能を備えたカメラ装置であって、被写体を撮像する撮像手段と、この撮像手段により一定周期で撮像された画像をスルー画像として表示する表示手段と、前記撮像手段により撮像された第1の画像と、この第1の画像の撮像後における前記表示手段によるスルー画像の表示期間中に前記撮像手段により撮像された第2の画像とに基づいて主要被写体領域を特定する特定手段と、この特定手段により特定された主要被写体領域の部分画像を、前記第1の画像と前記第2の画像とのいずれか一方から保存対象画像として切り出す切り出し手段と、この切り出し手段により切り出された保存対象画像を記憶する記憶手段とを備え、前記第1の画像と前記第2の画像とは、同一の主要被写体を含むと共に互いに背景を異にする画像であることを特徴とする。
The camera device according to the second aspect of the present invention is a camera device having a function of extracting a specific area from an image, and is imaged at a constant cycle by an imaging means for imaging a subject. A display unit that displays the captured image as a through image, a first image captured by the imaging unit, and an image captured by the imaging unit during a through image display period by the display unit after the first image is captured. Specifying means for specifying a main subject area based on the second image thus obtained, and a partial image of the main subject area specified by the specifying means as either one of the first image and the second image and clipping means for cutting out a stored target image from one, and a storage means for storing the storage target image extracted by the cutout unit, the first image and the second The image, characterized in that an image having different background together with containing the same main object.

また、請求項記載の発明に係るカメラ装置にあっては、前記特定手段は、前記第1の画像と前記第2の画像との差分を取得する減算手段と、この減算手段により取得された差分に基づくラベリング処理を行うラベリング処理手段とを含み、このラベリング処理手段によりグループ分けされた複数の連結領域の中で最大の連結領域を主要被写体領域として特定することを特徴とする。
Further, in the camera device according to the invention of claim 3 , the specifying means is obtained by a subtracting means for obtaining a difference between the first image and the second image, and the subtracting means. A labeling processing unit for performing a labeling process based on the difference, and specifying the largest connected region among the plurality of connected regions grouped by the labeling processing unit as a main subject region.

また、請求項記載の発明に係るカメラ装置にあっては、前記第1の画像と前記第2の画像との双方から所定の同一領域を対象として複数の特徴点をそれぞれ取得する特徴点取得手段と、前記第1の画像と前記第2の画像との一方に、前記特徴点取得手段とによって取得された前記第1の画像と前記第2の画像とにおける互いに対応する複数の特徴点を一致させる補正を施す補正手段とを備え、前記特定手段は、前記第1の画像と前記第2の画像とのうちで前記補正手段による補正された側の画像と、前記第1の画像と前記第2の画像とのうちで前記補正手段による補正されていない側の画像とに基づいて主要被写体領域を特定することを特徴とする。
In the camera device according to the fourth aspect of the present invention, feature point acquisition for acquiring a plurality of feature points for a predetermined same region from both the first image and the second image, respectively. And a plurality of feature points corresponding to each other in the first image and the second image acquired by the feature point acquisition unit in one of the first image and the second image. Correction means for performing a matching correction, and the specifying means includes an image on a side corrected by the correction means among the first image and the second image, the first image, and the second image. The main subject region is specified based on the second image and the image on the side not corrected by the correcting means .

また、請求項記載の発明に係る切り出し画像表示方法にあっては、画像から特定領域を切り出す機能を備えたカメラ装置において、第1の画像を撮像する工程と、第1の画像の撮像後に一定周期で撮像した画像をスルー画像として表示する工程と、スルー画像の表示期間中に第2の画像を撮像する工程と、第1の画像と第2の画像とに基づいて主要被写体領域を特定する工程と特定した主要被写体領域の部分画像を、前記第1の画像と前記第2の画像とのいずれか一方から保存対象画像として切り出す工程と、スルー画像の表示期間中に第2の画像を繰り返し撮像させる工程と、繰り返し切り出される保存対象画像のうち、それまでの中で最大の保存対象画像を記憶する工程とを含むことを特徴とする。
また、請求項6記載の発明に係る切り出し画像表示方法にあっては、画像から特定領域を切り出す機能を備えたカメラ装置において、第1の画像を撮像する工程と、第1の画像の撮像後に一定周期で撮像した画像をスルー画像として表示する工程と、スルー画像の表示期間中に第2の画像を撮像する工程と、第1の画像と第2の画像とに基づいて主要被写体領域を特定する工程と、特定した主要被写体領域の部分画像を、前記第1の画像と前記第2の画像とのいずれか一方から保存対象画像として切り出す工程と、切り出した保存対象画像を記憶する工程とを含み、前記第1の画像と前記第2の画像とは、同一の主要被写体を含むと共に互いに背景を異にする画像であることを特徴とする。
In the clipped image display method according to the fifth aspect of the present invention, in the camera device having a function of cutting out the specific area from the image, the step of capturing the first image, and after the capturing of the first image A step of displaying an image captured at a fixed period as a through image, a step of capturing a second image during the display period of the through image, and specifying a main subject region based on the first image and the second image A step of cutting out a partial image of the identified main subject area as a storage target image from one of the first image and the second image, and a second image during a through image display period And a step of storing the largest storage target image among the storage target images repeatedly cut out .
In the clipped image display method according to the sixth aspect of the present invention, in the camera device having a function of cutting out the specific area from the image, the step of capturing the first image, and after capturing the first image A step of displaying an image captured at a fixed period as a through image, a step of capturing a second image during the display period of the through image, and specifying a main subject region based on the first image and the second image A step of cutting out a partial image of the identified main subject area as a storage target image from either one of the first image and the second image, and a step of storing the cut out storage target image In addition, the first image and the second image are images that include the same main subject and have different backgrounds.

また、請求項7記載の発明に係るプログラムにあっては、画像から特定領域を切り出す機能を備えたカメラ装置が有するコンピュータに、第1の画像を撮像する手順と、第1の画像の撮像後に一定周期で撮像した画像をスルー画像として表示する手順と、スルー画像の表示期間中に第2の画像を撮像する手順と、第1の画像と第2の画像とに基づいて主要被写体領域を特定する手順と特定した主要被写体領域の部分画像を、前記第1の画像と前記第2の画像とのいずれか一方から保存対象画像として切り出す手順と、スルー画像の表示期間中に第2の画像を繰り返し撮像させる手順と、繰り返し切り出される保存対象画像のうち、それまでの中で最大の保存対象画像を記憶する手順とを実行させることを特徴とする。
また、請求項8記載の発明に係るプログラムにあっては、画像から特定領域を切り出す機能を備えたカメラ装置が有するコンピュータに、第1の画像を撮像する手順と、第1の画像の撮像後に一定周期で撮像した画像をスルー画像として表示する手順と、スルー画像の表示期間中に第2の画像を撮像する手順と、第1の画像と第2の画像とに基づいて主要被写体領域を特定する手順と、特定した主要被写体領域の部分画像を、前記第1の画像と前記第2の画像とのいずれか一方から保存対象画像として切り出す手順と、切り出した保存対象画像を記憶する手順とを実行させるためのプログラムであって、前記第1の画像と前記第2の画像とは、同一の主要被写体を含むと共に互いに背景を異にする画像であることを特徴とする。
According to a seventh aspect of the present invention, there is provided a program for capturing a first image on a computer having a camera device having a function of extracting a specific area from an image, and after capturing the first image. A procedure for displaying an image captured at a fixed period as a through image, a procedure for capturing a second image during a through image display period, and a main subject region based on the first image and the second image A procedure for cutting out a partial image of the identified main subject area as a storage target image from one of the first image and the second image, and a second image during a through image display period And a procedure for storing the largest storage target image among the storage target images repeatedly cut out .
In the program according to the eighth aspect of the present invention, a procedure for capturing the first image on the computer of the camera device having a function of cutting out the specific area from the image, and after capturing the first image A procedure for displaying an image captured at a fixed period as a through image, a procedure for capturing a second image during a through image display period, and a main subject region based on the first image and the second image A procedure for cutting out a partial image of the identified main subject area as a storage target image from either the first image or the second image, and a procedure for storing the cut out storage target image A program for execution, wherein the first image and the second image are images that include the same main subject and have different backgrounds.

本発明によれば、意図する被写体に相当する特定領域のみが切り出された画像を確実に取得することが可能となる。   According to the present invention, it is possible to reliably acquire an image in which only a specific area corresponding to an intended subject is cut out.

以下、本発明の一実施の形態を図にしたがって説明する。
(実施形態1)
図1は、本発明に係るデジタルカメラの外観を示す図であり、同図(a)は正面図、同図(b)は背面図、同図(c)は上面図である。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
(Embodiment 1)
1A and 1B are views showing the appearance of a digital camera according to the present invention. FIG. 1A is a front view, FIG. 1B is a rear view, and FIG. 1C is a top view.

図1(a)に示したように本実施形態のデジタルカメラは、本体1の正面側に撮像レンズ2、及びストロボ発光窓3を有している。また、図1(b)に示すように本体1の背面には、表示手段である液晶モニタ4、カーソルキー5、SETキー6、メニューキー7が設けられている。また、図1(c)に示すように本体1の上面には、シャッターボタン8、電源ボタン9が設けられている。なお、図示しないが本体1の側部には、デジタルカメラをUSBケープルを介してパーソナルコンピュータ等と接続する場合に用いる後述するUSB端子接続部が設けられている。   As shown in FIG. 1A, the digital camera of this embodiment has an imaging lens 2 and a strobe light emission window 3 on the front side of the main body 1. Further, as shown in FIG. 1B, a liquid crystal monitor 4, a cursor key 5, a SET key 6, and a menu key 7 as display means are provided on the back of the main body 1. Further, as shown in FIG. 1C, a shutter button 8 and a power button 9 are provided on the upper surface of the main body 1. Although not shown, a USB terminal connection unit (described later) used when connecting the digital camera to a personal computer or the like via a USB cable is provided on the side of the main body 1.

図2は図1に示したデジタルカメラの電子回路構成の概略を示すブロック図である。デジタルカメラは、撮影した被写体の画像データを取り込むためカメラモジュール11を有している。カメラモジュール11は、前記撮像レンズ2を含む結像光学系ブロック12と、撮像手段であるCMOSセンサ13、ISP(Image Signa1 Processor)14、光学系駆動制御部15から構成されている。   FIG. 2 is a block diagram showing an outline of the electronic circuit configuration of the digital camera shown in FIG. The digital camera has a camera module 11 for capturing image data of a photographed subject. The camera module 11 includes an imaging optical system block 12 including the imaging lens 2, a CMOS sensor 13 as an imaging means, an ISP (Image Signa1 Processor) 14, and an optical system drive control unit 15.

CMOSセンサ13は前記結像光学系2により結像された被写体の光学像を光電変換するとともにA/D変換し、デジタルデータとしてISP14に出力する。CMOSセンサ13の出力は、CMOSセンサ13の受光面におけるカラーフィルタ配列(本実施形態ではベイヤー配列)に従った出力となっている。ISP14では、入力したデジタルデータに対し、色の調整、データフォーマット変換(ベイヤー配列から輝度信号Y、色差信号Cb、Crへの変換)等がなされる。ISP14からはY,Cb,Crの各デジタル信号が8bitの解像度にて出力される。   The CMOS sensor 13 photoelectrically converts and A / D-converts the optical image of the subject imaged by the imaging optical system 2 and outputs it to the ISP 14 as digital data. The output of the CMOS sensor 13 is an output according to the color filter array (Bayer array in this embodiment) on the light receiving surface of the CMOS sensor 13. In the ISP 14, color adjustment, data format conversion (conversion from a Bayer array to a luminance signal Y, color difference signals Cb, Cr), and the like are performed on the input digital data. Each digital signal of Y, Cb, and Cr is output from the ISP 14 with a resolution of 8 bits.

前記結像光学系ブロック12は、撮像レンズ2を構成するレンズ群を駆動するズームモータ及び合焦モータと、絞り、メカニカルシャッタを含み、それらがCPU21の命令に従い前記光学系駆動制御部15により駆動を制御される。また、カメラモジュール11からの出力信号(Y,Cr,Cbの各データ)は、DMA22によりワークメモリ23へ転送される。ワークメモリ23は、DRAM等で構成される本発明の記憶手段である。   The imaging optical system block 12 includes a zoom motor and a focusing motor for driving a lens group constituting the imaging lens 2, an aperture, and a mechanical shutter, which are driven by the optical system drive control unit 15 in accordance with a command from the CPU 21. Controlled. Output signals (Y, Cr, and Cb data) from the camera module 11 are transferred to the work memory 23 by the DMA 22. The work memory 23 is a storage means of the present invention configured by a DRAM or the like.

ワークメモリ23へ転送されたY,Cr,Cbの各データは、画像エンジン24によってRGB形式の画像データに変換された後、VRAM25に転送される。なお、上記画像データには、必要に応じて画像エンジン24内において種々のCG画像が合成される。   The Y, Cr, and Cb data transferred to the work memory 23 is converted into RGB format image data by the image engine 24 and then transferred to the VRAM 25. Various CG images are combined with the image data in the image engine 24 as necessary.

また、画像エンジン24は、CPU21の命令に従って、ワークメモリ23へ転送されたY,Cr,Cbの各データを圧縮しJPEG等の所望のファイルフォーマットの画像データに変換する。変換後の画像データはフラッシュメモリ26に保存される一方、必要に応じて読み出されて画像エンジン24により伸張され、ワークメモリ23内に展開される。なお、フラッシュメモリ26には、後述する被写体切り出し撮影モードでの撮影時において切り出した被写体の画像データも記録される。   Further, the image engine 24 compresses each data of Y, Cr, Cb transferred to the work memory 23 according to a command of the CPU 21 and converts it into image data of a desired file format such as JPEG. The converted image data is stored in the flash memory 26, read out as necessary, decompressed by the image engine 24, and expanded in the work memory 23. Note that the flash memory 26 also stores image data of a subject cut out during shooting in a subject cut-out shooting mode described later.

表示制御部27は、ワークメモリ23に格納された画像データに基づく表示データを生成して液晶モニタ4に出力し、液晶モニタ4に画像を表示させる。すなわち撮影待機状態において所定のフレームレートでカメラモジュール11により取り込まれる通常のスルー画像や、画像エンジン24によりCG画像が合成された状態のスルー画像、フラッシュメモリ26から読み出され伸張された後の画像データに基づく記録画像を液晶モニタ4に表示させる。   The display control unit 27 generates display data based on the image data stored in the work memory 23, outputs the display data to the liquid crystal monitor 4, and causes the liquid crystal monitor 4 to display an image. That is, a normal through image captured by the camera module 11 at a predetermined frame rate in a shooting standby state, a through image in which a CG image is synthesized by the image engine 24, and an image after being read and expanded from the flash memory 26 A recorded image based on the data is displayed on the liquid crystal monitor 4.

キー入力部28は、前述したカーソルキー5、SETキー6、メニューキー7、シャッターボタン8、電源ボタン9を含み各キーの操作状態を示す状態信号をCPU21へ出力する。USB制御部29は、USBケーブルを介してUSB接続端子部30に接続されたパーソナルコンピュータ等とデジタルカメラの間における画像データの通信を制御する。   The key input unit 28 includes the cursor key 5, the SET key 6, the menu key 7, the shutter button 8, and the power button 9, and outputs a state signal indicating the operation state of each key to the CPU 21. The USB control unit 29 controls communication of image data between a personal computer or the like connected to the USB connection terminal unit 30 via a USB cable and the digital camera.

CPU21は、上述した各部の動作を種々の動作プログラムに従い制御する。CPU21の動作プログラムは、前記フラッシュメモリ26に、画像データを記録するための画像記録領域とは別に確保されているプログラム格納領域に、デジタルカメラの種々の動作設定に用いられるメニューデータと共に格納されている。   The CPU 21 controls the operation of each unit described above according to various operation programs. The operation program of the CPU 21 is stored in the flash memory 26 together with menu data used for various operation settings of the digital camera in a program storage area secured separately from an image recording area for recording image data. Yes.

そして、CPU21は、キー入力部28からの状態信号に対応してフラッシュメモリ26に格納されている前記複数種の動作モードに対応する撮像プログラムやメニューデータを取り出し、デジタルカメラの動作を制御する。例えば、シャッターボタン8を押したときの撮影動作、画像データの記録、記録した画像の再生・表示、メニューキー7を押したときのカーソルキー5等による機能選択メニューの表示制御や設定画面の表示制御を行う。   Then, the CPU 21 takes out imaging programs and menu data corresponding to the plurality of operation modes stored in the flash memory 26 in response to the status signal from the key input unit 28, and controls the operation of the digital camera. For example, shooting operation when the shutter button 8 is pressed, recording of image data, playback / display of the recorded image, display control of the function selection menu by the cursor key 5 when the menu key 7 is pressed, and display of the setting screen Take control.

そして、CPU21は、被写体切り出し撮影モードにおいては前記撮像プログラムに従い動作することによって、本発明の特定手段(減算手段、ラベリング処理手段を含む)、切り出し手段、表示制御手段、撮像制御手段として機能することにより、後述する処理を実行する。   The CPU 21 functions as the specifying means (including subtracting means and labeling processing means), the clipping means, the display control means, and the imaging control means of the present invention by operating according to the imaging program in the subject clipping shooting mode. Thus, the processing described later is executed.

次に、以上の構成からなるデジタルカメラの本発明に係る動作について説明する。図3は、本実施形態のデジタルカメラにおいて、記録モードの下位モードとして予め用意されている被写体切り出し撮影モードが設定されたときのCPU21の処理手順を示すフローチャートである。   Next, an operation according to the present invention of the digital camera having the above configuration will be described. FIG. 3 is a flowchart showing the processing procedure of the CPU 21 when the subject cut-out shooting mode prepared in advance as the lower mode of the recording mode is set in the digital camera of the present embodiment.

CPU21は、被写体切り出し撮影モードの設定とともに撮影待機状態となり、カメラモジュール11に所定のフレームレートでの画像の取り込み動作を開始させることにより、通常の撮影モードと同様、液晶モニタ4におけるスルー画像の表示を開始する(ステップSA1)。その後、直ちにユーザに対して第1の背景による被写体の撮影を要求する(ステップSA2)。例えば予め用意されている所定のメッセージを液晶モニタ4に表示させることによってユーザに撮影操作を促す。なお、このステップについては、ユーザが被写体切り出し撮影モードの撮影方法を了解していることを前提とし省略しても構わない。   The CPU 21 enters a shooting standby state together with the setting of the subject cutout shooting mode, and causes the camera module 11 to start an image capturing operation at a predetermined frame rate, thereby displaying a through image on the liquid crystal monitor 4 as in the normal shooting mode. Is started (step SA1). Thereafter, the user is immediately requested to shoot the subject with the first background (step SA2). For example, a predetermined message prepared in advance is displayed on the liquid crystal monitor 4 to prompt the user to perform a shooting operation. This step may be omitted on the assumption that the user understands the shooting method in the subject cutout shooting mode.

その後、シャッターボタンの操作待ちを行い(ステップSA3でNO)、シャッターボタンが押されたら(ステップSA3でYES)、撮影処理を実行し基準画像を取得する(ステップSA4)。すなわちカメラモジュール11による画像の取り込みを行い、取り込んだ画像データをワークメモリ23の所定領域に基準画像として一時記憶する。   Thereafter, the operation of the shutter button is waited (NO in step SA3), and when the shutter button is pressed (YES in step SA3), a photographing process is executed to acquire a reference image (step SA4). That is, an image is captured by the camera module 11 and the captured image data is temporarily stored as a reference image in a predetermined area of the work memory 23.

図5(a)は、上記の基準画像G1の一例を示した図である。図示した基準画像G1は、ユーザが所望する被写体画像が猫の画像であって、任意の背景を第1の背景とし、主たる被写体である猫を前景に配置して撮影が行われた場合の例である。   FIG. 5A is a diagram illustrating an example of the reference image G1. The illustrated reference image G1 is an example in which the subject image desired by the user is a cat image, and an arbitrary background is used as the first background, and the cat, which is the main subject, is placed in the foreground, and shooting is performed. It is.

その後、CPU21は、ワークメモリ23に確保した保存対象記憶領域をいったん初期化する(ステップSA5)。なお、図示しないが係る処理は、被写体切り出し撮影モードの設定直後にはスキップする。   Thereafter, the CPU 21 once initializes the storage target storage area secured in the work memory 23 (step SA5). Although not shown, the processing is skipped immediately after the subject cut-out shooting mode is set.

その後、先の撮影で使用した第1の背景とは異なる第2の背景による被写体の撮影(但し、シャッターボタン8を押し続けることによる所定の時間間隔での連続撮影)を要求する(ステップSA6)。このときもステップSA1と同様、例えば液晶モニタ4に所定のメッセージを表示させることにより行う。なお、このステップも省略しても構わない。また、上記連続撮影での撮影タイミングはスルー画像として表示する画像の取り込み(撮像)タイミングと同一でも良いし、異なるタイミングでも構わない。   Thereafter, it is requested to shoot a subject with a second background different from the first background used in the previous shooting (however, continuous shooting at a predetermined time interval by continuously pressing the shutter button 8) (step SA6). . At this time, similarly to step SA1, for example, a predetermined message is displayed on the liquid crystal monitor 4. Note that this step may be omitted. The shooting timing in the continuous shooting may be the same as or different from the timing of capturing (imaging) an image displayed as a through image.

そして、再びシャッターボタンの操作待ちを行い(ステップSA7でNO)、シャッターボタンが押されたら(ステップSA7でYES)、それに応答して、連続撮影による1回目の撮影処理を実行し参照画像を取得する(ステップSA8)。すなわちカメラモジュール11による画像の取り込みを行い、取り込んだ画像データをワークメモリ23の所定領域に参照画像として一時記憶する。図5(b)は、上記の参照画像G2の一例を示した図である。   Then, it waits for the operation of the shutter button again (NO in step SA7), and when the shutter button is pressed (YES in step SA7), in response thereto, the first shooting process by continuous shooting is executed and a reference image is acquired. (Step SA8). That is, an image is captured by the camera module 11 and the captured image data is temporarily stored as a reference image in a predetermined area of the work memory 23. FIG. 5B is a diagram showing an example of the reference image G2.

引き続き、CPU21は図4に示した撮影対象候補抽出処理を実行する(ステップSA9)。係る処理では、まず、先に取得した基準画像と参照画像との輝度成分を対象として両画像の差分を取得する(ステップSA101)。すなわち基準画像と参照画像との間で対応する画素毎に画素値(輝度値)の減算を行う。   Subsequently, the CPU 21 executes the photographing target candidate extraction process shown in FIG. 4 (step SA9). In this process, first, the difference between the two images is acquired with respect to the luminance component of the previously acquired standard image and reference image (step SA101). That is, the pixel value (luminance value) is subtracted for each corresponding pixel between the standard image and the reference image.

次に、減算処理後のデータについて、差分(減算)結果の絶対値が所定の閾値TH以下の画素を対象としてラベリング処理を行う(ステップSA102)。ラベリング処理は周知のように、互いに連結している画素に同じラベルを付加することで、上記画素群を複数の領域にグループ化する処理である。なお、具体的な手法については任意の手法(4近傍によるラベリング処理等)を使用する。なお、閾値THは予め決められた値であり、例えばTH=1である。   Next, a labeling process is performed on the data after the subtraction process for pixels whose absolute value of the difference (subtraction) result is equal to or less than a predetermined threshold value TH (step SA102). As is well known, the labeling process is a process of grouping the pixel group into a plurality of regions by adding the same label to pixels connected to each other. As a specific method, an arbitrary method (labeling process using four neighborhoods, etc.) is used. The threshold value TH is a predetermined value, for example, TH = 1.

図6(a)、同図(d)は、上記の差分(減算)結果の絶対値が閾値TH以下の画素群の例をそれぞれ示したものであり、以後これを便宜的にラベリング対象画像G3と呼ぶ。すなわち同図(a)は、前述した基準画像G1と参照画像G2とにおいて画像内(撮影時の画角内)における主たる被写体(猫)の位置が異なっている場合のラベリング対象画像G3の例、同図(d)は、主たる被写体(猫)の位置が一致している場合のラベリング対象画像G3の例である。なお、通常は最初に参照画像G2を取得した時、つまり背景を変えた直後の撮影時点では主たる被写体の位置は基準画像G1と異なるため、ラベリング対象画像G3(閾値TH以下の画素群)は図6(a)に示したようなものとなる。   FIGS. 6A and 6D show examples of pixel groups in which the absolute value of the difference (subtraction) result is equal to or less than a threshold value TH, and this is hereinafter referred to as a labeling target image G3 for convenience. Call it. That is, (a) in the figure shows an example of the labeling target image G3 in the case where the position of the main subject (cat) in the image (within the angle of view at the time of shooting) is different between the reference image G1 and the reference image G2 described above. FIG. 4D shows an example of the labeling target image G3 when the main subject (cat) is in the same position. Usually, when the reference image G2 is first acquired, that is, at the time of shooting immediately after the background is changed, the position of the main subject is different from the reference image G1, and therefore the labeling target image G3 (pixel group having a threshold value TH or less) is shown in FIG. As shown in FIG.

引き続き、CPU21は、上記ラベリング処理においてグループ分けした各々の連結領域(同一ラベルの画素が連結された領域)のうちで一番大きな連結領域を判別し、その連結領域を撮影対象領域、つまりユーザが意図する主たる被写体の領域として特定する(ステップSA103)。図6(b)は、同図(a)のラベリング対象画像G3における撮影対象領域101、同図(e)は、同図(d)のラベリング対象画像G3における撮影対象領域101をそれぞれ示したものである。   Subsequently, the CPU 21 determines the largest connected region among the connected regions (regions where pixels having the same label are connected) grouped in the labeling process, and determines the connected region as a shooting target region, that is, a user. It is specified as the intended main subject area (step SA103). FIG. 6B shows the shooting target area 101 in the labeling target image G3 in FIG. 6A, and FIG. 6E shows the shooting target area 101 in the labeling target image G3 in FIG. It is.

しかる後、参照画像G2から上記撮影対象領域101に対応する部分を撮影対象候補として抽出し(ステップSA104)、撮影対象候補抽出処理を終了し、図3の処理へ戻る。なお、ステップSA104では、撮影対象領域101にラベルが付加されていない中窓状の領域(穴)が存在する場合には、その領域を含めて撮影対象候補として抽出する。   Thereafter, a portion corresponding to the above-described shooting target area 101 is extracted from the reference image G2 as a shooting target candidate (step SA104), the shooting target candidate extraction process is terminated, and the process returns to the process of FIG. In step SA104, if there is a middle window-like region (hole) to which the label is not added in the photographing target region 101, the region including the region is extracted as a photographing target candidate.

図6(c)、同図(f)は、ステップSA104で抽出される(切り出される)撮影対象候補の画像(以後、撮影対象候補画像と呼ぶ)の例を示したものであり、同図(c)は、同図(b)に対応する撮影対象候補画像G4、同図(f)は、同図(d)に対応する撮影対象候補画像G4の例である。   FIG. 6C and FIG. 6F show examples of imaging target candidate images (hereinafter referred to as imaging target candidate images) extracted (cut out) in step SA104. c) is an example of a photographic target candidate image G4 corresponding to FIG. 8B, and FIG. 10F is an example of the photographic target candidate image G4 corresponding to FIG.

そして、図3の処理へ戻りCPU21は、上記撮影対象候補抽出処理が連続撮影を開始してから1回目の処理であったとき、すなわち連続撮影の開始直後においては、前述したワークメモリ23の保存対象記憶領域には保存対象となる画像は保存されていないため(ステップSA10でNO)、そのままステップSA12へ進み、撮影対象候補抽出処理で抽出した(切り出した)撮影対象候補画像を保存対象画像として保存対象記憶領域に一時記憶する。   Then, returning to the processing of FIG. 3, the CPU 21 saves the work memory 23 described above when the above-described shooting target candidate extraction processing is the first processing after the start of continuous shooting, that is, immediately after the start of continuous shooting. Since the image to be stored is not stored in the target storage area (NO in step SA10), the process proceeds to step SA12 as it is, and the shooting target candidate image extracted (cut out) by the shooting target candidate extraction process is used as the storage target image. Temporarily store in the storage target storage area.

しかる後、ここで記憶した保存対象画像をスルー画像における決められた合成領域に合成して液晶モニタ4に画面表示させる(ステップSA12)。本実施形態においては、図7(a)に示したように、スルー画像G5の画面右上に決められたサイズの合成領域102を設けるとともに、そこに保存対象画像(この場合は、撮影対象候補画像)を合成して表示させる。なお、図7(a)は、上記保存対象画像が図6(c)に例示した撮影対象候補画像G4である場合の例である。   Thereafter, the image to be stored stored here is synthesized with the determined synthesis area in the through image and displayed on the liquid crystal monitor 4 (step SA12). In the present embodiment, as shown in FIG. 7A, a composite area 102 having a determined size is provided at the upper right of the through image G5, and a storage target image (in this case, a shooting target candidate image) is provided. ) And display it. FIG. 7A shows an example in which the storage target image is the photographing target candidate image G4 illustrated in FIG.

引き続き、CPU21はシャッターボタンの操作が解除されたか否かを確認し、操作が解除されていなければ(ステップSA13でNO)、ステップSA8へ戻り、次の撮影タイミングで新たな撮影処理を実行し参照画像を取得し、さらにステップSA4で取得した基準画像と新たな参照画像とに基づき再び撮影対象候補抽出処理を行い、新たな撮影対象候補画像を取得する(ステップSA9)。   Subsequently, the CPU 21 checks whether or not the operation of the shutter button has been released. If the operation has not been released (NO in step SA13), the CPU 21 returns to step SA8 to execute a new shooting process at the next shooting timing and refer to it. An image is acquired, and the imaging target candidate extraction process is performed again based on the standard image acquired in step SA4 and the new reference image, thereby acquiring a new imaging target candidate image (step SA9).

しかる後、新たに取得した撮影対象候補画像と、その時点でワークメモリ23の保存対象記憶領域に記憶されている保存対象画像との大きさを比較し、その撮影対象候補画像が保存対象画像よりも大きくなければ(ステップSA10でNO)、そのままステップSA12へ進み、前回と同様の保存対象画像を合成したスルー画像を液晶モニタ4に画面表示させる。   After that, the size of the newly acquired shooting target candidate image and the size of the saving target image stored in the saving target storage area of the work memory 23 at that time are compared, and the shooting target candidate image is compared with the saving target image. If not larger (NO in step SA10), the process proceeds to step SA12 as it is, and a through image obtained by synthesizing the same image to be stored as the previous time is displayed on the liquid crystal monitor 4.

逆に、新たに取得した撮影対象候補画像が保存対象画像よりも大きければ(ステップSA10でYES)、その撮影対象候補画像を新たな保存対象画像として保存対象記憶領域に記憶し(ステップSA11)、新たに記憶した保存対象画像を合成したスルー画像を液晶モニタ4に画面表示させる(ステップSA12)。   On the contrary, if the newly acquired shooting target candidate image is larger than the saving target image (YES in step SA10), the shooting target candidate image is stored in the saving target storage area as a new saving target image (step SA11). A through image obtained by synthesizing the newly stored image to be stored is displayed on the liquid crystal monitor 4 (step SA12).

以後、シャッターボタンの操作が解除されるまで(シャッターボタンが押されている間)はステップSA8〜SA12の処理を繰り返し行うことにより、画角の変動に伴い新たに取得した撮影対象候補画像が保存対象画像よりも大きくなる毎に保存対象画像を逐次更新する。その間、いずれかの時点で撮影した参照画像G2おける主たる被写体(猫)の位置が基準画像G1と一致すると、その時点でスルー画像G5の合成領域102に表示される保存対象画像が図6(f)に示したような撮影対象候補画像G4に変化するとともに、それ以降は、その撮影対象候補画像G4が合成領域102に表示され続けることとなる。   Thereafter, until the operation of the shutter button is released (while the shutter button is pressed), the processing of steps SA8 to SA12 is repeated, so that a newly acquired photographing target candidate image is saved as the angle of view changes. Each time the image becomes larger than the target image, the storage target image is updated sequentially. In the meantime, when the position of the main subject (cat) in the reference image G2 taken at any time coincides with the standard image G1, the save target image displayed in the composite region 102 of the through image G5 at that time is shown in FIG. ) As shown in FIG. 5B, and thereafter, the candidate image G4 for photographing is continuously displayed in the synthesis area 102.

そして、CPU21は、いずれかの時点でシャッターボタンの操作が解除されたら(ステップSA13でYES)、その時点で保存対象記憶領域に記憶してある保存対象画像をユーザが意図する被写体の画像としてフラッシュメモリ26に保存する(ステップSA14)。これにより被写体切り出し撮影モードによる撮影動作を完了し、係るモードが設定されている間は、前述した全ての処理を繰り返し行う。   When the operation of the shutter button is released at any time (YES in step SA13), the CPU 21 flashes the save target image stored in the save target storage area at that time as the image of the subject intended by the user. Save in the memory 26 (step SA14). As a result, the photographing operation in the subject cut-out photographing mode is completed, and all the processes described above are repeated while the mode is set.

本実施形態においては、被写体切り出し撮影モードを用いた撮影に際しては、ユーザに以下の要領で画像の取得を望む任意の被写体の撮影を行わせれば、意図する被写体に相当する特定領域のみが切り出された画像、つまりユーザが所望とする被写体画像を確実に取得させることができる。   In the present embodiment, when shooting using the subject cutout shooting mode, if the user performs shooting of an arbitrary subject for which an image is desired to be acquired in the following manner, only a specific area corresponding to the intended subject is cut out. Thus, it is possible to reliably acquire the desired image, that is, the subject image desired by the user.

すなわち、撮影に際しては、ユーザに初めに任意の背景(第1の背景)を選んで画像の取得を望む任意の被写体(上述した例では猫)を撮影させる。次に、ユーザがデジタルカメラの位置を移動させることにより背景を他の背景(第2の背景)に変えてから、同一の被写体の連続撮影を開始する。この際、デジタルカメラは、ユーザがシャッターボタンを押し続けることにより連続撮影を継続し、その間にはユーザにスルー画像G5に表示されている保存対象画像(G4)を確認させながらフレーミングを調整させる。その後、ユーザが保存対象画像(G4)が上記被写体と一致したと判断した時点で、つまりユーザが被写体部分の切り出しが上手くいったと判断した時点でシャッターボタンを離して撮影を終了させることにより、ユーザが所望とする被写体画像を確実に取得させることができる。   That is, at the time of shooting, the user first selects an arbitrary background (first background) and causes an arbitrary subject (a cat in the example described above) to be captured to be captured. Next, after the user moves the position of the digital camera to change the background to another background (second background), continuous shooting of the same subject is started. At this time, the digital camera continues the continuous shooting when the user keeps pressing the shutter button, and adjusts the framing while allowing the user to check the storage target image (G4) displayed in the through image G5. Thereafter, when the user determines that the image to be stored (G4) matches the subject, that is, when the user determines that the subject portion has been cut out, the user releases the shutter button to end the shooting. Can reliably acquire a desired subject image.

また、本実施形態においてデジタルカメラは、基準画像G1を撮影した後、参照画像G2を撮影する際には、ユーザがシャッターボタンを押している間に連続撮影を行う。そして、デジタルカメラは、その間には繰り返し取得した保存対象画像G4の中で最大の保存対象画像G4のみを逐次更新して記憶しながらスルー画像に合成して表示し、その保存対象画像G4を最終的に撮影画像として記録するようにした。   Further, in the present embodiment, the digital camera performs continuous shooting while the user presses the shutter button when shooting the reference image G2 after shooting the standard image G1. The digital camera then synthesizes and displays the through image while sequentially updating and storing only the largest storage target image G4 among the storage target images G4 obtained repeatedly, and the storage target image G4 is finally displayed. It was recorded as a photographed image.

よって、ユーザにおいては、シャッターボタンをいちいち操作せずに多数の参照画像G2を撮影することができ、所望とする被写体画像を容易かつ短時間で確実に取得することができる。なお、所望とする被写体画像を確実に取得するだけであれば、時間は掛かるがシャッターボタンが押される毎に参照画像G2を取得するようにすることもできる。   Therefore, the user can take a large number of reference images G2 without operating the shutter button one by one, and a desired subject image can be acquired easily and reliably in a short time. If it is only necessary to reliably obtain a desired subject image, it takes time, but the reference image G2 can be obtained every time the shutter button is pressed.

しかも、本実施形態においては、ユーザがフレーミングを調整することにより、スルー画像上の合成領域102に表示される被写体像が、図7(b)に示されるように所望する被写体(上述した例では猫)の全体像となったとユーザが判断したときに、ユーザがシャッターボタンを離して撮影を終了させれば、所望する被写体の全体画像を確実に切り出して保存することができる。   In addition, in the present embodiment, when the user adjusts the framing, the subject image displayed in the composite area 102 on the through image becomes a desired subject (in the above example, as shown in FIG. 7B). When the user determines that the entire image of the cat has been obtained, if the user releases the shutter button to end the shooting, the entire image of the desired subject can be reliably cut out and stored.

さらに、ステップSA9の撮影対象候補抽出処理では、撮影対象領域(主たる被写体領域)101を、基準画像G1と参照画像G2との差分結果に対してラベリング処理を行うことにより特定するようにしたことから、撮影対象領域101を高精度で、しかも短い処理時間で特定することができる。   Furthermore, in the shooting target candidate extraction process in step SA9, the shooting target area (main subject area) 101 is specified by performing a labeling process on the difference result between the reference image G1 and the reference image G2. The imaging target area 101 can be specified with high accuracy and in a short processing time.

ここで、本実施形態においては、撮影対象候補画像G4を参照画像G2から抽出するようにしたが、撮影対象候補画像G4は基準画像G1から抽出するようにしても構わない。   Here, in the present embodiment, the shooting target candidate image G4 is extracted from the reference image G2, but the shooting target candidate image G4 may be extracted from the reference image G1.

また、図4に示した撮影対象候補抽出処理における前述したラベリング処理(ステップSA103)では予め決められた閾値THを用いるようにしたが、基準画像G1と参照画像G2との画質状態が異なる場合には閾値THを大きくするようにしてもよい。例えばラベリング処理に先立ち、基準画像G1と参照画像G2とにおいて、主たる被写体と判断される部分の明るさの違いを検出すると共に、それが大きくなるほど閾値THを大きくする調整を行い、調整後の閾値THを用いてラベリング処理を行うようにしてもよい。それにより、基準画像G1と参照画像G2との画質状態が異なる場合であっても、参照画像G2からより正確な撮影対象候補画像G4を抽出することができる。   Further, in the above-described labeling process (step SA103) in the photographing target candidate extraction process shown in FIG. 4, a predetermined threshold TH is used. However, when the image quality state of the reference image G1 and the reference image G2 are different. May increase the threshold value TH. For example, prior to the labeling process, a difference in brightness of a portion determined to be the main subject is detected in the base image G1 and the reference image G2, and the threshold TH after the adjustment is increased by increasing the threshold. Labeling processing may be performed using TH. Thereby, even when the image quality states of the standard image G1 and the reference image G2 are different, it is possible to extract a more accurate photographing target candidate image G4 from the reference image G2.

また、前述したラベリング処理に先立ち、基準画像G1と参照画像G2との差分を取得する処理(ステップSA101)では、以下のようにしてもよい。例えば基準画像G1と参照画像G2とにおいて、主たる被写体と判断される部分の明るさ等の画質状態が異なる場合には、基準画像G1と参照画像G2とのうち少なくともいずれか一方をいったん正規化し、つまり両画像G1,G2における主たる被写体と判断される部分の明るさを近づける調整処理を行った後、差分を取得するようにしてもよい。それにより、基準画像G1と参照画像G2との画質状態が異なる場合であっても、参照画像G2からより正確な撮影対象候補画像G4を抽出することができる。   Prior to the labeling process described above, the process of acquiring the difference between the base image G1 and the reference image G2 (step SA101) may be performed as follows. For example, when the standard image G1 and the reference image G2 have different image quality states such as the brightness of the portion determined to be the main subject, at least one of the standard image G1 and the reference image G2 is once normalized, That is, the difference may be acquired after performing an adjustment process that brings the brightness of the portion determined to be the main subject in both the images G1 and G2 closer. Thereby, even when the image quality states of the standard image G1 and the reference image G2 are different, it is possible to extract a more accurate photographing target candidate image G4 from the reference image G2.

(実施形態2)
次に、本発明に係る第2の実施形態について説明する。本実施形態は、図1及び図2に示した構成のデジタルカメラにおいて、CPU21が被写体切り出し撮影モードで第1の実施形態とは異なる後述する処理を行うとともに、そのためのプログラムが前記フラッシュメモリ26のプログラム格納領域に格納されており、係るプログラムに従い動作することによりCPU21が本発明の特徴点取得手段、補正手段としても機能するものである。
(Embodiment 2)
Next, a second embodiment according to the present invention will be described. In the present embodiment, in the digital camera having the configuration shown in FIGS. 1 and 2, the CPU 21 performs processing to be described later, which is different from the first embodiment in the subject cutout shooting mode, and a program for this is stored in the flash memory 26. It is stored in the program storage area, and the CPU 21 functions as the feature point acquisition means and correction means of the present invention by operating according to the program.

概略を先に述べると、本実施形態においてもCPU21は、被写体切り出し撮影モードが設定されたときには図3で説明した処理を行う。但し前述したステップSA9の撮影対象候補抽出処理では、前述した参照画像に射影変換処理をいったん施し、処理後の参照画像において前述した撮影対象領域101を特定した後、撮影対象候補画像を抽出する。   If the outline is described first, also in the present embodiment, the CPU 21 performs the processing described in FIG. 3 when the subject cut-out shooting mode is set. However, in the above-described shooting target candidate extraction process in step SA9, the above-described reference image is once subjected to projective transformation processing, and after the above-described shooting target area 101 is specified in the processed reference image, the shooting target candidate image is extracted.

図8は、本実施形態においてCPU21が実行する撮影対象候補抽出処理を示したフローチャートである。なお、本実施形態では前述したステップSA8以降の連続撮影に際し、ユーザには被写体をできるだけ大きく、且つ画角内の中心に位置させるように撮影を行わせることを前提とする。   FIG. 8 is a flowchart showing the photographing target candidate extraction process executed by the CPU 21 in the present embodiment. In the present embodiment, it is assumed that the user performs shooting so that the subject is as large as possible and positioned at the center within the angle of view during the continuous shooting after step SA8.

以下説明とすると、撮影対象候補抽出処理においてCPU21は、まず、ステップSA4で取得した基準画像とステップSA8で取得した参照画像との各々において、予め決められている所定の中心部分領域で特徴点(特徴量の大きい点)を4箇所ずつ抽出する(ステップSB101)。   In the following description, in the photographing target candidate extraction process, the CPU 21 first sets feature points (in a predetermined central partial region) in each of the reference image acquired in step SA4 and the reference image acquired in step SA8. Four points with large feature values are extracted (step SB101).

特徴点の抽出には、例えばハリスの特徴点検出関数を用いる。すなわち画像のある位置(x,y)における画素値をI(x,y)とするとき、共分散行列Gは下記式(1)で与えられる。   For example, a Harris feature point detection function is used for feature point extraction. That is, when the pixel value at a certain position (x, y) of the image is I (x, y), the covariance matrix G is given by the following equation (1).

Figure 0005136335
Figure 0005136335

共分散行列Gの2個の固有値が大きいときにはその位置にコーナーが存在する事を示しているので、コーナー検出関数、つまりハリスの特徴点検出関数R_Hは下記式(2)で表すことができる。なお、式(2)において、del()は行列式を、tr()はトレース(対角成分の和)を表す。kは所望の定数であり、例えば0.04が用いられる。   When the two eigenvalues of the covariance matrix G are large, it indicates that there is a corner at that position. Therefore, the corner detection function, that is, the Harris feature point detection function R_H, can be expressed by the following equation (2). In equation (2), del () represents a determinant, and tr () represents a trace (sum of diagonal components). k is a desired constant, for example, 0.04 is used.

Figure 0005136335
Figure 0005136335

以上に基づきステップSB101では、基準画像I1、参照画像I2の中心部分近辺の領域で、各々[数2]で示されるR_Hが大きい4点を取得する。図9(a)に基準画像I1を、同図(b)に参照画像I2を示す。また、同図(c)に基準画像I1で抽出した4つの特徴点の例を、同図(d)に参照画像I2で抽出した4つの特徴点の例をそれぞれ示す。なお、図中に白抜きの×印で示した部分(中心部分)が特徴点である。   Based on the above, in step SB101, four points each having a large R_H represented by [Equation 2] are obtained in the vicinity of the central portion of the base image I1 and the reference image I2. FIG. 9A shows a standard image I1, and FIG. 9B shows a reference image I2. FIG. 4C shows an example of four feature points extracted from the standard image I1, and FIG. 4D shows an example of four feature points extracted from the reference image I2. Note that a portion (center portion) indicated by a white cross in the drawing is a feature point.

そして、基準画像I1で抽出した4つの特徴点を、特微量(R_H)が大きい順に(x1,yl)、(x2,y2)、(x3,y3)、(x4,y4)として識別し、同様に参照画像I2で取得した4つの特徴点を、特微量(R_H)が大きい順に、(u1,v1)、(u2,v2)、(u3,v3)、(u4,v4)として識別することにより、双方の画像I1,I2における4つの特徴点を対応付ける(ステップSB102)。   The four feature points extracted from the reference image I1 are identified as (x1, yl), (x2, y2), (x3, y3), (x4, y4) in descending order of the feature amount (R_H), and the same Are identified as (u1, v1), (u2, v2), (u3, v3), (u4, v4) in descending order of the characteristic amount (R_H). The four feature points in both the images I1 and I2 are associated (step SB102).

ここで、基準画像(x,y)I1内の被写体と参照画像(u,v)I2内の被写体とは、両画像の中心領域に被写体が存在し、特徴点がすべて被写体上であるとすれば、下記(3)式で示される同次座標上の射影変換での対応となる。Gは射影変換行列で要素は下記(4)式で示される。   Here, it is assumed that the subject in the standard image (x, y) I1 and the subject in the reference image (u, v) I2 are present in the center region of both images and all feature points are on the subject. For example, this corresponds to the projective transformation on the homogeneous coordinates expressed by the following equation (3). G is a projective transformation matrix, and its elements are represented by the following equation (4).

Figure 0005136335
Figure 0005136335

Figure 0005136335
Figure 0005136335

したがって、下記式(5)で示される行列式にて射影変換行列Gを求める(ステップSB103)。   Therefore, the projective transformation matrix G is obtained by the determinant represented by the following formula (5) (step SB103).

Figure 0005136335
Figure 0005136335

引き続き、参照画像(u,v)I2の被写体を基準画像I1の被写体と合わせるため、求めた下記式(6)で表される射影変換行列Gを用いて、参照画像(u,v)I2を射影変換によって修正し、修正参照画像(u’,v’)I3を取得する(ステップSB104)。すなわち参照画像(u,v)I2を、それが撮影されたときの被写体に対する撮影方向や撮影角度を、基準画像(x,y)I1が撮影されたときの被写体に対する撮影方向や撮影角度と一致させるように修正(補正)し、図9(e)に示した修正後の画像を修正参照画像(u’,v’)とする。   Subsequently, in order to match the subject of the reference image (u, v) I2 with the subject of the standard image I1, the reference image (u, v) I2 is obtained using the projection transformation matrix G expressed by the following equation (6). Correction is performed by projective transformation, and a corrected reference image (u ′, v ′) I3 is acquired (step SB104). In other words, the reference image (u, v) I2 has the same shooting direction and angle as the subject when the reference image (x, y) I1 is taken. The corrected image shown in FIG. 9E is used as a corrected reference image (u ′, v ′).

Figure 0005136335
Figure 0005136335

しかる後、上記修正参照画像I3と基準画像I1との差分を取得する(ステップSB105)。これ以降は、第1の実施形態の撮影対象候補抽出処理と同様に、差分(減算)結果の絶対値が所定の閾値TH以下の画素を対象としてラベリング処理を行い(ステップSB106)、ラベリング処理においてグループ分けした各々の連結領域のうちで一番大きな連結領域を判別し、その連結領域を撮影対象領域として特定した後(ステップSB107)、修正参照画像I3から上記撮影対象領域に対応する部分を撮影対象候補として抽出し(ステップSB108)、撮影対象候補抽出処理を終了する。   Thereafter, the difference between the modified reference image I3 and the base image I1 is acquired (step SB105). Thereafter, similarly to the shooting target candidate extraction process of the first embodiment, a labeling process is performed for pixels whose absolute value of the difference (subtraction) result is equal to or smaller than a predetermined threshold TH (step SB106). After determining the largest connected area among the grouped connected areas and specifying the connected area as a shooting target area (step SB107), a portion corresponding to the shooting target area is shot from the corrected reference image I3. The target candidate is extracted (step SB108), and the photographing target candidate extraction process is terminated.

以上のように本実施形態においては、撮影対象候補抽出処理において撮影対象領域101を特定する際には、射影変換処理によって参照画像をいったん修正した後、修正後の参照画像(修正参照画像I3)を用いて、基準画像との差分の取得、及びラベリング処理を行うようにした。したがって、第1の実施形態と比べ、撮影対象領域101をより一層精度良く特定することができ、より正確な撮影対象候補画像G4を抽出することができる。つまり所望とする被写体画像としてより良好な画像を得ることができる。   As described above, in the present embodiment, when the shooting target region 101 is specified in the shooting target candidate extraction process, the reference image is once corrected by the projective transformation process, and then the corrected reference image (corrected reference image I3). Is used to obtain the difference from the reference image and to perform the labeling process. Therefore, as compared with the first embodiment, the shooting target area 101 can be specified with higher accuracy, and a more accurate shooting target candidate image G4 can be extracted. That is, a better image can be obtained as a desired subject image.

なお、第1及び第2の実施形態においては、本発明をデジタルカメラに適用した場合について説明したが、本発明はこれに限定されるものでなはく、静止画撮影機能を有するものであれば、デジタルビデオカメラ、カメラ付き携帯電話端末等の他のカメラ装置にも適用することができる。   In the first and second embodiments, the case where the present invention is applied to a digital camera has been described. However, the present invention is not limited to this and may have a still image shooting function. For example, the present invention can be applied to other camera devices such as a digital video camera and a mobile phone terminal with a camera.

各実施形態に共通する本発明に係るデジタルカメラの外観図である。1 is an external view of a digital camera according to the present invention common to each embodiment. 同デジタルカメラの電子回路構成の概略を示すブロック図である。It is a block diagram which shows the outline of the electronic circuit structure of the digital camera. 第1の実施形態において、被写体切り出し撮影モードが設定されたときのCPUの処理手順を示すフローチャートである。6 is a flowchart illustrating a processing procedure of a CPU when a subject cutout shooting mode is set in the first embodiment. 撮影対象候補抽出処理の内容を示すフローチャートである。It is a flowchart which shows the content of the imaging | photography candidate candidate extraction process. 基準画像と参照画像との例を示す図である。It is a figure which shows the example of a reference | standard image and a reference image. 撮影対象候補抽出処理の過程で生成される画像データの一例を示す図である。It is a figure which shows an example of the image data produced | generated in the process of a photographic subject candidate extraction process. スルー画像の表示例を示す図である。It is a figure which shows the example of a display of a through image. 第2の実施形態における撮影対象候補抽出処理の内容を示すフローチャートである。It is a flowchart which shows the content of the imaging | photography candidate candidate extraction process in 2nd Embodiment. 同撮影対象候補抽出処理における参照画像の射影変換手順を示す図である。It is a figure which shows the projection conversion procedure of the reference image in the same imaging | photography candidate candidate extraction process.

符号の説明Explanation of symbols

4 液晶モニタ
8 シャッターボタン
11 カメラモジュール
13 CMOSセンサ
21 CPU
23 ワークメモリ
26 フラッシュメモリ
28 キー入力部
101 撮影対象領域
102 合成領域
G1 基準画像
G2 参照画像
G3 ラベリング対象画像
G4 撮影対象候補画像
G5 スルー画像
I1 基準画像
I2 参照画像
I3 修正参照画像
4 LCD monitor 8 Shutter button 11 Camera module 13 CMOS sensor 21 CPU
23 Work memory 26 Flash memory 28 Key input unit 101 Shooting target region 102 Composite region G1 Reference image G2 Reference image G3 Labeling target image G4 Shooting target candidate image G5 Through image I1 Reference image I2 Reference image I3 Modified reference image

Claims (8)

画像から特定領域を切り出す機能を備えたカメラ装置であって、
被写体を撮像する撮像手段と、
この撮像手段により一定周期で撮像された画像をスルー画像として表示する表示手段と、
前記撮像手段により撮像された第1の画像と、この第1の画像の撮像後における前記表示手段によるスルー画像の表示期間中に前記撮像手段により撮像された第2の画像とに基づいて主要被写体領域を特定する特定手段と、
この特定手段により特定された主要被写体領域の部分画像を、前記第1の画像と前記第2の画像とのいずれか一方から保存対象画像として切り出す切り出し手段と、
前記表示手段によるスルー画像の表示中に、前記撮像手段に被写体を繰り返し撮像させる撮像制御手段と、
前記切り出し手段により繰り返し切り出される保存対象画像のうち、それまでの中で最大の保存対象画像を記憶する記憶手段と
を備えことを特徴とするカメラ装置。
A camera device having a function of extracting a specific area from an image,
Imaging means for imaging a subject;
Display means for displaying, as a through image, an image picked up at a fixed period by the image pickup means;
The main subject based on the first image captured by the imaging unit and the second image captured by the imaging unit during the through image display period by the display unit after the first image is captured. An identification means for identifying the area;
Clipping means for cutting out a partial image of the main subject area specified by the specifying means as a storage target image from either one of the first image and the second image;
An imaging control unit that causes the imaging unit to repeatedly image a subject during display of a through image by the display unit;
Wherein among the repeated storage target image extracted by excision means, that up to a maximum of storing storage target image storage means, features and to Luke camera device that Ru equipped with in.
画像から特定領域を切り出す機能を備えたカメラ装置であって、
被写体を撮像する撮像手段と、
この撮像手段により一定周期で撮像された画像をスルー画像として表示する表示手段と、
前記撮像手段により撮像された第1の画像と、この第1の画像の撮像後における前記表示手段によるスルー画像の表示期間中に前記撮像手段により撮像された第2の画像とに基づいて主要被写体領域を特定する特定手段と、
この特定手段により特定された主要被写体領域の部分画像を、前記第1の画像と前記第2の画像とのいずれか一方から保存対象画像として切り出す切り出し手段と、
この切り出し手段により切り出された保存対象画像を記憶する記憶手段と
を備え、
前記第1の画像と前記第2の画像とは、同一の主要被写体を含むと共に互いに背景を異にする画像である
ことを特徴とするカメラ装置。
A camera device having a function of extracting a specific area from an image,
Imaging means for imaging a subject;
Display means for displaying, as a through image, an image picked up at a fixed period by the image pickup means;
The main subject based on the first image captured by the imaging unit and the second image captured by the imaging unit during the through image display period by the display unit after the first image is captured. An identification means for identifying the area;
Clipping means for cutting out a partial image of the main subject area specified by the specifying means as a storage target image from either one of the first image and the second image;
Storage means for storing an image to be saved cut out by the cut-out means;
With
Wherein the first image and the second image, features and to Luke camera device that is an image having different background together with containing the same main object.
前記特定手段は、前記第1の画像と前記第2の画像との差分を取得する減算手段と、この減算手段により取得された差分に基づくラベリング処理を行うラベリング処理手段とを含み、このラベリング処理手段によりグループ分けされた複数の連結領域の中で最大の連結領域を主要被写体領域として特定することを特徴とする請求項記載のカメラ装置。 The specifying unit includes a subtraction means for obtaining a difference between the first image and the second image, and a labeling processing unit which performs labeling processing based on the difference obtained by the subtraction means, the labeling process 3. The camera device according to claim 2 , wherein the largest connected area among the plurality of connected areas grouped by the means is specified as the main subject area. 前記第1の画像と前記第2の画像との双方から所定の同一領域を対象として複数の特徴点をそれぞれ取得する特徴点取得手段と、
前記第1の画像と前記第2の画像との一方に、前記特徴点取得手段とによって取得された前記第1の画像と前記第2の画像とにおける互いに対応する複数の特徴点を一致させる補正を施す補正手段と
を備え、
前記特定手段は、前記第1の画像と前記第2の画像とのうちで前記補正手段による補正された側の画像と、前記第1の画像と前記第2の画像とのうちで前記補正手段による補正されていない側の画像とに基づいて主要被写体領域を特定する
ことを特徴とする請求項1乃至いずれか記載のカメラ装置。
Feature point acquisition means for acquiring a plurality of feature points for a predetermined same region from both the first image and the second image;
Correction for matching a plurality of feature points corresponding to each other in the first image and the second image acquired by the feature point acquisition unit with one of the first image and the second image Correction means for applying
The specifying unit, the image of the correction means according to the corrected side by one of the first image and the second image, the correction means of the said first image and the second image identifying the main subject area based on the image of the uncorrected side of the camera device according to any one of claims 1 to 3, wherein.
画像から特定領域を切り出す機能を備えたカメラ装置において、
第1の画像を撮像する工程と、
第1の画像の撮像後に一定周期で撮像した画像をスルー画像として表示する工程と、
スルー画像の表示期間中に第2の画像を撮像する工程と、
第1の画像と第2の画像とに基づいて主要被写体領域を特定する工程と
特定した主要被写体領域の部分画像を、前記第1の画像と前記第2の画像とのいずれか一方から保存対象画像として切り出す工程と、
スルー画像の表示期間中に第2の画像を繰り返し撮像させる工程と、
繰り返し切り出される保存対象画像のうち、それまでの中で最大の保存対象画像を記憶する工程と
を含むことを特徴とする切り出し画像表示方法。
In a camera device having a function of cutting out a specific area from an image,
Capturing a first image;
Displaying an image captured at a constant period after capturing the first image as a through image;
Capturing a second image during a through image display period;
Identifying a main subject region based on the first image and the second image ;
Cutting out the identified partial image of the main subject region from any one of the first image and the second image as a storage target image;
Repeatedly capturing a second image during a through image display period;
And a step of storing the largest image to be saved among the images to be saved that are repeatedly cut out .
画像から特定領域を切り出す機能を備えたカメラ装置において、
第1の画像を撮像する工程と、
第1の画像の撮像後に一定周期で撮像した画像をスルー画像として表示する工程と、
スルー画像の表示期間中に第2の画像を撮像する工程と、
第1の画像と第2の画像とに基づいて主要被写体領域を特定する工程と
特定した主要被写体領域の部分画像を、前記第1の画像と前記第2の画像とのいずれか一方から保存対象画像として切り出す工程と、
切り出した保存対象画像を記憶する工程と
を含み、
前記第1の画像と前記第2の画像とは、同一の主要被写体を含むと共に互いに背景を異にする画像である
ことを特徴とする切り出し画像表示方法。
In a camera device having a function of cutting out a specific area from an image,
Capturing a first image;
Displaying an image captured at a constant period after capturing the first image as a through image;
Capturing a second image during a through image display period;
Identifying a main subject region based on the first image and the second image ;
Cutting out the identified partial image of the main subject region from any one of the first image and the second image as a storage target image;
Viewing including the step of storing the storage target image cut out,
The cut-out image display method, wherein the first image and the second image are images that include the same main subject and have different backgrounds .
画像から特定領域を切り出す機能を備えたカメラ装置が有するコンピュータに、
第1の画像を撮像する手順と、
第1の画像の撮像後に一定周期で撮像した画像をスルー画像として表示する手順と、
スルー画像の表示期間中に第2の画像を撮像する手順と、
第1の画像と第2の画像とに基づいて主要被写体領域を特定する手順と
特定した主要被写体領域の部分画像を、前記第1の画像と前記第2の画像とのいずれか一方から保存対象画像として切り出す手順と、
スルー画像の表示期間中に第2の画像を繰り返し撮像させる手順と、
繰り返し切り出される保存対象画像のうち、それまでの中で最大の保存対象画像を記憶する手順と
を実行させることを特徴とするプログラム。
A computer having a camera device having a function of cutting out a specific area from an image,
A procedure for capturing a first image;
A procedure for displaying, as a through image, an image captured at a fixed period after capturing the first image;
A procedure for capturing a second image during a through image display period;
A procedure for identifying a main subject area based on the first image and the second image ;
A procedure for cutting out a partial image of the identified main subject area as a storage target image from either one of the first image and the second image;
A procedure for repeatedly capturing a second image during a through image display period;
A program for executing a procedure for storing the largest image to be saved among the images to be saved repeatedly cut out so far .
画像から特定領域を切り出す機能を備えたカメラ装置が有するコンピュータに、
第1の画像を撮像する手順と、
第1の画像の撮像後に一定周期で撮像した画像をスルー画像として表示する手順と、
スルー画像の表示期間中に第2の画像を撮像する手順と、
第1の画像と第2の画像とに基づいて主要被写体領域を特定する手順と
特定した主要被写体領域の部分画像を、前記第1の画像と前記第2の画像とのいずれか一方から保存対象画像として切り出す手順と、
切り出した保存対象画像を記憶する手順と
を実行させるためのプログラムであって、
前記第1の画像と前記第2の画像とは、同一の主要被写体を含むと共に互いに背景を異にする画像である
ことを特徴とするプログラム。
A computer having a camera device having a function of cutting out a specific area from an image,
A procedure for capturing a first image;
A procedure for displaying, as a through image, an image captured at a fixed period after capturing the first image;
A procedure for capturing a second image during a through image display period;
A procedure for identifying a main subject area based on the first image and the second image ;
A procedure for cutting out a partial image of the identified main subject area as a storage target image from either one of the first image and the second image;
To execute the steps of storing the storage target image cut out a because the program,
The program according to claim 1, wherein the first image and the second image are images including the same main subject and having different backgrounds .
JP2008252013A 2008-09-30 2008-09-30 CAMERA DEVICE, IMAGE CUTTING METHOD, PROGRAM Expired - Fee Related JP5136335B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008252013A JP5136335B2 (en) 2008-09-30 2008-09-30 CAMERA DEVICE, IMAGE CUTTING METHOD, PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008252013A JP5136335B2 (en) 2008-09-30 2008-09-30 CAMERA DEVICE, IMAGE CUTTING METHOD, PROGRAM

Publications (2)

Publication Number Publication Date
JP2010087646A JP2010087646A (en) 2010-04-15
JP5136335B2 true JP5136335B2 (en) 2013-02-06

Family

ID=42251189

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008252013A Expired - Fee Related JP5136335B2 (en) 2008-09-30 2008-09-30 CAMERA DEVICE, IMAGE CUTTING METHOD, PROGRAM

Country Status (1)

Country Link
JP (1) JP5136335B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6280382B2 (en) * 2013-03-08 2018-02-14 キヤノン株式会社 Image processing apparatus and image processing method
JP6337911B2 (en) * 2016-01-20 2018-06-06 カシオ計算機株式会社 Image processing apparatus, image processing method, and program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000078564A (en) * 1998-08-28 2000-03-14 Aiphone Co Ltd System for tracing person on television camera monitor
JP2004357202A (en) * 2003-05-30 2004-12-16 Canon Inc Photographing apparatus
JP4685465B2 (en) * 2005-02-01 2011-05-18 パナソニック株式会社 Monitoring and recording device

Also Published As

Publication number Publication date
JP2010087646A (en) 2010-04-15

Similar Documents

Publication Publication Date Title
KR101900097B1 (en) Image capturing method and image capturing apparatus
WO2020057199A1 (en) Imaging method and device, and electronic device
US8576327B2 (en) Focus bracket photographing imaging apparatus, reproduction display apparatus, image recording method, and reproduction displaying method
KR101256326B1 (en) Image capturing apparatus, image capturing method, and storage medium storing program for image capturing
KR101433121B1 (en) Image processing device for generating composite image having predetermined aspect ratio
JP2007306416A (en) Method for displaying face detection frame, method for displaying character information, and imaging apparatus
JP2006033241A (en) Image pickup device and image acquiring means
JP2009194700A (en) Image processor and image processing program
JP4509081B2 (en) Digital camera and digital camera program
JP5156991B2 (en) Imaging apparatus, imaging method, and imaging program
WO2016008359A1 (en) Object movement track image synthesizing method, device and computer storage medium
US8525913B2 (en) Digital photographing apparatus, method of controlling the same, and computer-readable storage medium
US11622175B2 (en) Electronic apparatus and control method thereof
JP4683190B2 (en) Imaging apparatus, image effect applying method, and image effect applying program
JP5136335B2 (en) CAMERA DEVICE, IMAGE CUTTING METHOD, PROGRAM
JP5434718B2 (en) Image processing apparatus and image processing method
JP4632417B2 (en) Imaging apparatus and control method thereof
JP5392336B2 (en) Imaging apparatus, imaging method, and imaging program
JP4705146B2 (en) Imaging apparatus and imaging method
JP2007201779A (en) Electronic camera
JP2015023514A (en) Information processing apparatus, imaging apparatus, control method and program
JP5289354B2 (en) Imaging device
JP2010154390A (en) Imaging device, imaging method, and program
JP5083116B2 (en) Imaging apparatus, image processing method, and program
JP2008124793A (en) Imaging apparatus, and imaging method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110914

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120823

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120904

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120918

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

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

R150 Certificate of patent or registration of utility model

Ref document number: 5136335

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

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees