JP4222238B2 - Imaging apparatus and imaging control method - Google Patents
Imaging apparatus and imaging control method Download PDFInfo
- Publication number
- JP4222238B2 JP4222238B2 JP2004081742A JP2004081742A JP4222238B2 JP 4222238 B2 JP4222238 B2 JP 4222238B2 JP 2004081742 A JP2004081742 A JP 2004081742A JP 2004081742 A JP2004081742 A JP 2004081742A JP 4222238 B2 JP4222238 B2 JP 4222238B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- contour
- front image
- unit
- reduced
- 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
Links
- 238000000034 method Methods 0.000 title claims description 55
- 238000003384 imaging method Methods 0.000 title claims description 12
- 230000008569 process Effects 0.000 claims description 35
- 230000009466 transformation Effects 0.000 description 23
- 238000009966 trimming Methods 0.000 description 23
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 21
- 238000001514 detection method Methods 0.000 description 14
- 238000010586 diagram Methods 0.000 description 12
- 238000006243 chemical reaction Methods 0.000 description 9
- 238000000605 extraction Methods 0.000 description 7
- 229910052704 radon Inorganic materials 0.000 description 7
- SYUHGPGVQRZVTB-UHFFFAOYSA-N radon atom Chemical compound [Rn] SYUHGPGVQRZVTB-UHFFFAOYSA-N 0.000 description 7
- 230000004044 response Effects 0.000 description 5
- 239000013598 vector Substances 0.000 description 5
- 239000000284 extract Substances 0.000 description 4
- 239000011159 matrix material Substances 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000002542 deteriorative effect Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000003702 image correction Methods 0.000 description 3
- 230000001771 impaired effect Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000003708 edge detection Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
Landscapes
- Image Processing (AREA)
- Studio Circuits (AREA)
- Television Signal Processing For Recording (AREA)
- Studio Devices (AREA)
Description
本発明は、デジタルカメラ等の撮影装置と撮影制御方法とに関する。 The present invention relates to a photographing apparatus such as a digital camera and a photographing control method.
近年、電子技術の進歩に伴い、単なる撮影ばかりでなく、撮影された画像に対して各種編集の可能なデジタルカメラも汎用化されている。特許文献1に示された電子カメラは、画像処理回路を備え、斜方から原稿等を撮影した場合でも、その撮影画像から原稿を正面から撮影した正面画像を生成することが可能である。
撮影画像から正面画像を生成するためには、非常に多く計算が必要となり、画素数が400万・500万画素などに増大していくにつれて、処理時間が長くなる。処理時間を短縮するためには、より高速なCPUを使うなどの方法をとらなければならない。 In order to generate a front image from a captured image, a great deal of calculation is required, and the processing time becomes longer as the number of pixels increases to 4 million or 5 million pixels. In order to shorten the processing time, a method such as using a faster CPU must be taken.
しかしながら、デジタルカメラでは搭載するCPUのパワーにも自ずと制限がある。撮影時に正面画像を生成して保存すると、CPUが低速であるがゆえに、保存し終わるまで時間がかかり、すばやい撮影ができなくなる。つまり、カメラとしての利便性・操作性が損なわれる。また、その間CPUパワーを占有してしまって他の処理に割くことが出来ず、キー操作のレスポンスが極度に悪くなるなどユーザーの操作性も悪くなるという問題があった。 However, the power of the CPU mounted in the digital camera is naturally limited. If a front image is generated and saved at the time of shooting, it takes time until the saving is completed because the CPU is slow, and quick shooting cannot be performed. That is, convenience and operability as a camera are impaired. In addition, the CPU power is occupied during that time and cannot be used for other processing, and there is a problem that the operability of the user is deteriorated such that the response of the key operation is extremely deteriorated.
一方、デジタルカメラでは閲覧するために低解像度の表示装置(LCD画面)を備えている。閲覧用に画像を表示装置(LCD画面)に表示する際に、正面画像への補正を行ってLCD画面に表示するための低解像度の補正画像を作製して表示することも考えられるが、これも正面画像の作成までを毎回行って表示するため、多くの画像を順番に閲覧していくようなデジタルカメラの操作に対してはレスポンスの向上はあまり望めないという問題があった。 On the other hand, a digital camera has a low-resolution display device (LCD screen) for browsing. When displaying an image on a display device (LCD screen) for viewing, it is conceivable to make a corrected image with a low resolution for correction on the front image and display it on the LCD screen. However, since a front image is created and displayed every time, there is a problem that improvement in response cannot be expected so much for the operation of a digital camera in which many images are browsed sequentially.
本発明は、以上のような現状に鑑みてなされた発明であり、デジタルカメラの操作性、利便性、やレスポンス特性を劣化させずに、正面画像を生成できる撮影装置を提供することを目的とする。 The present invention has been made in view of the current situation as described above, and an object thereof is to provide a photographing apparatus capable of generating a front image without deteriorating the operability, convenience, and response characteristics of a digital camera. To do.
上記目的を達成するために、本発明の第1の観点に係る撮影装置は、撮影モードと再生モードとを切替えるモード切替手段と、
前記撮影モードが設定されているときに撮影対象を撮影して撮影画像を取得する撮影部と、
前記撮影画像を記憶する記憶手段と、
前記撮影画像における前記撮影対象の輪郭を求める輪郭形成手段と、
前記求められた輪郭に基づいて前記撮影画像と実際の前記撮影対象との関係を示す射影パラメータを求める射影パラメータ取得手段と、
前記射影パラメータを用い、前記撮影対象物を撮影した場合の正面画像を前記撮影画像について形成する正面画像形成手段と、
前記撮影画像、該撮影画像について形成された前記正面画像を表示する表示手段と、
前記輪郭形成手段とパラメータ取得手段と正面画像形成手段と表示手段を制御する制御手段とを備え、
前記制御手段は、
前記輪郭形成手段により求めた輪郭に関する情報及び前記撮影画像の縮小画像とを前記撮影画像に対応させて前記記憶手段に記憶させておき、
前記再生モードが設定されたときに、前記記憶手段で記憶している前記輪郭に関する情報に基づき、前記撮影画像の縮小画像に対応する縮小正面画像を作成して前記表示手段により表示し、その後に、該撮影画像に対応する前記正面画像を作成して該表示手段により表示する
ことを特徴とする。
In order to achieve the above object, a photographing apparatus according to a first aspect of the present invention includes mode switching means for switching between a photographing mode and a reproduction mode,
A shooting unit that captures a shooting target and acquires a shot image when the shooting mode is set;
Storage means for storing the captured image;
Contour forming means for obtaining a contour of the photographing object in the photographed image;
Projection parameter obtaining means for obtaining a projection parameter indicating a relationship between the photographed image and the actual photographing object based on the obtained contour;
A front image forming unit that forms a front image of the photographed image with respect to the photographed image using the projection parameter;
Display means for displaying the photographed image and the front image formed for the photographed image;
A control means for controlling the contour forming means, parameter acquiring means, front image forming means and display means;
The control means includes
Information related to the contour obtained by the contour forming unit and a reduced image of the captured image are stored in the storage unit in association with the captured image,
When the reproduction mode is set, a reduced front image corresponding to a reduced image of the photographed image is created based on the information related to the contour stored in the storage unit and displayed by the display unit, and thereafter The front image corresponding to the photographed image is created and displayed by the display means .
このような構成を採用したことにより、撮影モードで正面画像を形成しなくなり、例えば連続的な撮影も可能になり、利便性を損なわない。また再生モードにおいて先ず、縮小正面画像を表示させることで、縮小正面画像を見た段階で、撮影画像を正面画像に補正した表示まで希望していない場合は、前/後の画像にすばやく進めることができるので、操作性、利便性やレスポンス特性を劣化させずに、正面画像を生成・確認することができる。 By adopting such a configuration, a front image is not formed in the shooting mode, and for example, continuous shooting is possible, and convenience is not impaired. In the playback mode, first, the reduced front image is displayed, and when the reduced front image is viewed, if the photographed image is not desired to be corrected to the front image, the previous / next image is quickly advanced. Therefore, a front image can be generated and confirmed without deteriorating operability, convenience, and response characteristics.
なお、前記再生モードが設定されたときに、前記正面画像を前記表示手段に表示する際には、前記記憶手段で記憶している前記輪郭に関する情報を読出し、前記射影パラメータ取得手段により該輪郭に関する情報に基づいて前記射影パラメータを求め、前記正面画像形成手段により前記正面画像を形成し、前記表示手段により該正面画像を表示してもよい。 Incidentally, when the reproduction mode is set, when displaying the front image on the display means reads the information on the contour stored in the storage means, to the contour by the projection parameter acquiring unit The projection parameter may be obtained based on the information, the front image may be formed by the front image forming unit, and the front image may be displayed by the display unit.
また、前記制御手段は、前記縮小正面画像を作成して前記表示手段により表示し、指示があった場合に、前記撮影画像に対応する前記正面画像を作成して該表示手段により表示してもよい。 Further, the control means creates the reduced front image and displays it on the display means . When instructed , the control means creates the front image corresponding to the captured image and displays it on the display means. Good.
また、前記撮影画像、前記縮小画像、前記縮小正面画像或いは前記正面画像の編集の指示を入力する編集指示入力手段を備え、前記制御部は、前記入力された前編集の指示の内容に応じて編集対象となる画像を前記撮影画像、前記縮小画像、前記縮小正面画像或いは前記正面画像から選択し前記表示手段に表示し、該画像に対応するデータを用いて該編集を実施してもよい。 In addition, the image processing apparatus includes an editing instruction input unit that inputs an instruction to edit the photographed image, the reduced image, the reduced front image, or the front image, and the control unit responds to the content of the input pre-editing instruction. An image to be edited may be selected from the photographed image, the reduced image, the reduced front image, or the front image, displayed on the display means, and the editing may be performed using data corresponding to the image.
上記課題を解決するために、本発明の第2の観点に係る撮影制御方法は、撮影モードと再生モードとを切替えるモード切替手段と、
前記撮影モードが設定されているときに撮影対象を撮影して撮影画像を取得する撮影部と、
前記撮影画像を記憶する記憶手段と、
前記撮影画像における前記撮影対象の輪郭を求める輪郭形成手段と、
前記求められた輪郭に基づいて前記撮影画像と実際の前記撮影対象との関係を示す射影パラメータを求める射影パラメータ取得手段と、
前記射影パラメータを用い、前記撮影対象物を撮影した場合の正面画像を形成する正面画像形成手段と、
前撮影画像について形成された前記正面画像を表示する表示手段と、
前記輪郭形成手段とパラメータ取得手段と正面画像形成手段と表示手段を制御する制御手段とを備えるカメラ装置において、
前記輪郭形成手段により求めた輪郭に関する情報及び前記撮影画像の縮小画像とを前記撮影画像に対応させて前記記憶手段に記憶させておき、
前記再生モードが設定されたときに、前記記憶手段で記憶している前記輪郭に関する情報に基づき、前記撮影画像の縮小画像に対応する縮小正面画像を作成して前記表示手段により表示し、その後に、該撮影画像に対応する前記正面画像を作成して該表示手段により表示する処理と、
を実施することを特徴とする。
In order to solve the above-described problem, a shooting control method according to a second aspect of the present invention includes a mode switching unit that switches between a shooting mode and a playback mode,
A shooting unit that captures a shooting target and acquires a shot image when the shooting mode is set;
Storage means for storing the captured image;
Contour forming means for obtaining a contour of the photographing object in the photographed image;
Projection parameter obtaining means for obtaining a projection parameter indicating a relationship between the photographed image and the actual photographing object based on the obtained contour;
A front image forming means for forming a front image when the photographing object is photographed using the projection parameter;
Display means for displaying the front image formed for the previous photographed image;
In the camera device comprising the contour forming means, the parameter acquiring means, the front image forming means, and the control means for controlling the display means,
Information related to the contour obtained by the contour forming unit and a reduced image of the captured image are stored in the storage unit in association with the captured image,
When the reproduction mode is set, a reduced front image corresponding to a reduced image of the photographed image is created based on the information related to the contour stored in the storage unit and displayed by the display unit, and thereafter A process of creating the front image corresponding to the photographed image and displaying it by the display means ;
It is characterized by implementing.
なお、前記再生モードが設定されたときに、前記正面画像を再度前記表示手段に表示する際には、前記記憶手段で記憶している前記輪郭に関する情報を読出し、前記射影パラメータ取得手段により輪郭に関する情報に基づいて前記射影パラメータを求め、前記正面画像形成手段により前記正面画像を形成して前記表示手段により該正面画像を表示してもよい。 When the reproduction mode is set, when the front image is displayed again on the display unit, the information on the contour stored in the storage unit is read out, and the projection parameter acquisition unit performs a process on the contour. The projection parameter may be obtained based on the information, the front image may be formed by the front image forming unit, and the front image may be displayed by the display unit.
また、前記縮小正面画像を作成して前記表示手段により表示させた結果、指示があった場合に、前記撮影画像に対応する前記正面画像を作成して該表示手段により表示してもよい。
また、前記撮影装置は、前記撮影画像、前記縮小画像、前記縮小正面画像或いは前記正面画像の編集の指示を入力する編集指示入力手段を備え、
前記入力された前編集の指示の内容に応じて編集対象となる画像を前記撮影画像、前記縮小画像、前記縮小正面画像或いは前記正面画像から選択し前記表示手段に表示し、該画像に対応するデータを用いて該編集を実施してもよい。
Further, when there is an instruction as a result of creating the reduced front image and displaying it by the display means, the front image corresponding to the photographed image may be created and displayed by the display means.
The photographing apparatus includes an editing instruction input means for inputting an instruction to edit the photographed image, the reduced image, the reduced front image, or the front image,
An image to be edited is selected from the photographed image, the reduced image, the reduced front image, or the front image according to the content of the input pre-edit instruction, and is displayed on the display unit, and corresponds to the image. The editing may be performed using data.
本発明によれば、撮影モードでは、正面画像を形成せず、再生モードの時に正面画像を形成することになるので、撮影時の利便性が低下せず、例えば連続的に撮影することも可能である。 According to the present invention, in the shooting mode, the front image is not formed, and the front image is formed in the playback mode. Therefore, the convenience in shooting does not deteriorate, and for example, continuous shooting is possible. It is.
(実施形態1)
図1は、本発明の実施形態に係るデジタルカメラの構成図である。
(Embodiment 1)
FIG. 1 is a configuration diagram of a digital camera according to an embodiment of the present invention.
このデジタルカメラ100は、CPU等で構成され、システムの全体の制御を行なう制御部101と、画像を集光するためのレンズなどで構成される光学レンズ102と、CCD等で構成されて、集光された画像をデジタル化し取り込イメージセンサ103と、記憶部104と、撮影した撮影画像等を表示するLCD画面などの表示部105と、制御部101とあいまって画像処理を行う画像処理部106と、各種キー類が配置された入力部107とを備えている。 The digital camera 100 includes a CPU and the like. The digital camera 100 includes a control unit 101 that controls the entire system, an optical lens 102 that includes a lens that collects an image, a CCD, and the like. Digitized and captured image sensor 103, storage unit 104, display unit 105 such as an LCD screen that displays captured images and the like, and image processing unit 106 that performs image processing in combination with control unit 101. And an input unit 107 in which various keys are arranged.
記憶部104は、イメージセンサ103からの画像を記憶するイメージメモリや、制御部101で実行するためのプログラムを記憶するためのROM(Read Only Memory)や、制御部101が演算等を行う際にデータを記憶するためのRAM(Random Access Memory)等や、処理済みの画像等を保管するための不揮発性メモリ等で構成されている。 The storage unit 104 stores an image memory for storing an image from the image sensor 103, a ROM (Read Only Memory) for storing a program to be executed by the control unit 101, and when the control unit 101 performs an operation or the like. A RAM (Random Access Memory) for storing data, a non-volatile memory for storing processed images, and the like are included.
入力部107には、例えばシャッターキーや、モードを設定するモード設定キーや、各種編集処理機能を選択して実行させるキー等がある。
次に、このデジタルカメラの動作を複数の図を参照して説明する。
The input unit 107 includes, for example, a shutter key, a mode setting key for setting a mode, and a key for selecting and executing various editing processing functions.
Next, the operation of this digital camera will be described with reference to a plurality of drawings.
図2は、デジタルカメラの撮影状態を示す模式図である。
図3は、撮影画像の一例を示す図である。
FIG. 2 is a schematic diagram illustrating a shooting state of the digital camera.
FIG. 3 is a diagram illustrating an example of a captured image.
ユーザが撮影を行う場合には、入力部107のモード設定キーを操作して撮影モードを設定し、図2のように、撮影対象Tに光学レンズ102を向けてシャッターキーを押下する。シャッターキーが押下されると、撮影対象を含む画像が光学レンズ102を介してイメージセンサ103に集光される。 When the user performs shooting, the mode setting key of the input unit 107 is operated to set the shooting mode, and the shutter key is pressed with the optical lens 102 facing the shooting target T as shown in FIG. When the shutter key is pressed, an image including a subject to be photographed is condensed on the image sensor 103 via the optical lens 102.
イメージセンサ103は、集光された画像を光電変換し、画素ごとの画像データからなる図3のような撮影画像M1を生成する。撮影対象Tが例えば原稿の場合に、斜方から撮影対象を撮影すると、撮影画像M1における撮影対象Tには歪みが生じる。 The image sensor 103 photoelectrically converts the collected image, and generates a captured image M1 as shown in FIG. 3 composed of image data for each pixel. When the shooting target T is, for example, a document, if the shooting target is shot from an oblique direction, the shooting target T in the shot image M1 is distorted.
制御部101は、図4のように、撮影画像M1と、その撮影画像M1の画素を間引きした縮小画像M2と、後述する輪郭に関する情報としての「輪郭未検出」IR1とを、記憶部104に対応させて記憶させる。 As shown in FIG. 4, the control unit 101 stores, in the storage unit 104, a captured image M1, a reduced image M2 obtained by thinning out pixels of the captured image M1, and “contour undetected” IR1 as information regarding a contour to be described later. Correspond and memorize.
図4は、記憶部104の記憶内容を示す模式図である。
縮小画像M2は、表示部105に表示して画像の全体を把握するに十分な程度の解像度(ピクセル数)を持つことが望ましい。
FIG. 4 is a schematic diagram showing the contents stored in the storage unit 104.
It is desirable that the reduced image M2 has a resolution (number of pixels) sufficient to be displayed on the display unit 105 and grasp the entire image.
記憶部104に記憶される輪郭に関する情報には、図5のように例えば3通りがある。
図5は、輪郭に関する情報を示す図である。
撮影対象Tの輪郭が求められてなければ「輪郭未検出」IR1が、記憶される。輪郭を求める必要がなければ「輪郭検出必要なし」IR2が記憶される。輪郭が求められた場合には、その輪郭の座標情報を含む「輪郭検出−(x1,y1)−(x2,y2)−(x3,y3)−(x4,y4)」IR3が記憶される。
For example, there are three types of information related to the contour stored in the storage unit 104 as shown in FIG.
FIG. 5 is a diagram showing information about the contour.
If the contour of the imaging target T is not obtained, “contour not detected” IR1 is stored. If it is not necessary to obtain the contour, “contour detection not required” IR2 is stored. When the contour is obtained, “contour detection− (x1, y1) − (x2, y2) − (x3, y3) − (x4, y4)]” IR3 including the coordinate information of the contour is stored.
撮影後、撮影/再生切り替えキーを押下して再生モードに切り替えると、制御部101は、記憶部104に記憶された縮小画像M2を読み出し、図6(a)のように表示部105に表示させる。この処理を行う時間をt1とする。 After shooting, when the shooting / playback switching key is pressed to switch to the playback mode, the control unit 101 reads the reduced image M2 stored in the storage unit 104 and displays it on the display unit 105 as shown in FIG. . The time for performing this process is assumed to be t1.
図6は、表示部105に表示される画像を示す図である。
撮影対象Tを斜方から撮影した場合には、撮影対象Tが歪んで撮影されるので見づらい。そこで、縮小画像M2を表示部105を表示した結果、ユーザからの指示があれば、図7及び図8に示す補正を施す。
FIG. 6 is a diagram illustrating an image displayed on the display unit 105.
When the photographing target T is photographed from an oblique direction, the photographing target T is distorted and difficult to see. Therefore, when the reduced image M2 is displayed on the display unit 105 and there is an instruction from the user, the correction shown in FIGS. 7 and 8 is performed.
図7は,補正の概要を示す図である。
縮小画像M2の表示処理(図7のD1)を行った後の段階D2で、入力部107からユーザの指示があり、補正を行う必要がある場合には、輪郭の検出処理(図7の段階D3)〜高精細の正面画像の表示処理(図7の段階D6)までを行う。
FIG. 7 is a diagram showing an outline of correction.
If there is a user instruction from the input unit 107 at the stage D2 after the display process of the reduced image M2 (D1 in FIG. 7) and it is necessary to perform correction, the contour detection process (stage in FIG. 7) is performed. D3) to high-definition front image display processing (step D6 in FIG. 7) are performed.
段階D3では、制御部101は撮影画像M1を記憶部104から読出し、画像処理部106により、後述するように輪郭を検出する。輪郭が検出された場合、制御部101は、撮影画像M1、縮小画像M2と対応させて「輪郭検出−(x1,y1)−(x2,y2)−(x3,y3)−(x4,y4)」IR3の情報を記憶部104に書込む。輪郭が検出されなかった場合、制御部101は、撮影画像M1、縮小画像M2と対応させて「輪郭検出必要なし」IR2を記憶部104に書込む。 In step D3, the control unit 101 reads the captured image M1 from the storage unit 104, and detects an outline by the image processing unit 106 as described later. When the contour is detected, the control unit 101 associates the captured image M1 and the reduced image M2 with “contour detection− (x1, y1) − (x2, y2) − (x3, y3) − (x4, y4)”. The information of IR3 is written in the storage unit 104. When the contour is not detected, the control unit 101 writes “contour detection unnecessary” IR2 in the storage unit 104 in association with the captured image M1 and the reduced image M2.
制御部101は、この輪郭検出に必要とする時間をt2とする。段階D4の後の段階D5において、制御部101は、検出された輪郭を使って画像処理装置106にて正面画像に補正された画像を作成する。この処理に必要な時間をt3とする。段階D6において、正面画像に補正された画像を表示部105に表示させる。この処理に必要な時間をt4とする。この一連の処理にかかる時間は、t1+t2+t3+t4となる。 The control unit 101 sets time required for this contour detection to t2. In step D5 after step D4, the control unit 101 uses the detected contour to create an image corrected to a front image by the image processing device 106. The time required for this processing is assumed to be t3. In step D6, the image corrected to the front image is displayed on the display unit 105. The time required for this processing is assumed to be t4. The time required for this series of processing is t1 + t2 + t3 + t4.
再度、正面画像を表示する場合、段階D7で、低解像度の正面画像を求め、段階D8からD11の処理を行う。
段階D7において、制御部101は記憶部104に記憶された縮小画像M2を読み出し、さらに輪郭に関する情報も読み出す。この情報が「輪郭検出−(x1,y1)−(x2,y2)−(x3,y3)−(x4,y4)」IR3であれば、制御部101は、画像処理部106を用い、輪郭の頂点の座標から縮小画像M2/撮影画像M1の比率で縮小した輪郭の座標を使って縮小画像M2から正面画像に補正された低解像度正面画像を作成する。この処理にかかる時間をt5とする。制御部101は、低解像度正面画像を表示部105に、図6(b)のように、表示させる(図7の段階D8)。
When the front image is displayed again, a low-resolution front image is obtained in step D7, and the processes in steps D8 to D11 are performed.
In step D7, the control unit 101 reads the reduced image M2 stored in the storage unit 104, and further reads information related to the contour. If this information is “contour detection− (x1, y1) − (x2, y2) − (x3, y3) − (x4, y4)]” IR3, the control unit 101 uses the image processing unit 106 to detect the contour. A low-resolution front image corrected from the reduced image M2 to the front image is created using the coordinates of the contour reduced by the ratio of the reduced image M2 / captured image M1 from the vertex coordinates. The time required for this processing is assumed to be t5. The control unit 101 displays the low-resolution front image on the display unit 105 as shown in FIG. 6B (step D8 in FIG. 7).
段階D8で低解像度正面画像を表示した結果、段階D9で、ユーザからの指示が入力部107から入力され、高解像度の正面画像が必要になった場合、制御部101は、段階D10で、撮影画像M1と輪郭に関する情報を使って画像処理部106により、正面画像に補正された高解像度の正面画像を作成する。そして段階D11で、正面画像に補正された画像を表示部105に表示する。
段階D7から段階D11に到るこの一連の処理にかかる時間はt5+t6+t3+t4 となる。
As a result of displaying the low-resolution front image in step D8, if an instruction from the user is input from the input unit 107 in step D9 and a high-resolution front image is required, the control unit 101 captures the image in step D10. A high-resolution front image corrected to a front image is created by the image processing unit 106 using the image M1 and information about the contour. In step D <b> 11, the image corrected to the front image is displayed on the display unit 105.
The time required for this series of processing from stage D7 to stage D11 is t5 + t6 + t3 + t4.
図8は、画像の解像度を示す説明図である。
図8のように、縮小画像M2から正面画像に補正された低解像度画像M3を作成する場合、そもそも補正前の縮小画像M2の解像度(ピクセル数)が少ないため、補正後の画像M3の解像度も低い表示となる。一方、撮影画像M1か正面画像に補正された高解像度画像M4を作成する場合、補正前の撮影画像M1が十分な解像度(ピクセル数)を持っているため、補正後の画像M4は解像度が高い表示となる。
段階D1〜段階D11を効率的に行うための処理フローを図9に示す。
FIG. 8 is an explanatory diagram showing the resolution of an image.
As shown in FIG. 8, when the low-resolution image M3 corrected from the reduced image M2 to the front image is created, since the resolution (number of pixels) of the reduced image M2 before correction is originally small, the resolution of the image M3 after correction is also high. The display is low. On the other hand, when the high-resolution image M4 corrected to the captured image M1 or the front image is created, the corrected image M4 has a high resolution because the captured image M1 before correction has a sufficient resolution (number of pixels). Display.
FIG. 9 shows a processing flow for efficiently performing the steps D1 to D11.
図9は、補正処理を行うためのフローチャートである。
図9のステップS1において、制御部101は、輪郭に関する情報(輪郭検出情報)を記憶部104から読出す。輪郭に関する情報が「輪郭未検出」IR1または「輪郭検出必要なし」IR2のとき(ステップS2:NO)、制御部101は、縮小画像M2を読出し、表示部105に表示する(ステップS3)。
FIG. 9 is a flowchart for performing the correction process.
In step S <b> 1 of FIG. 9, the control unit 101 reads out information related to the contour (contour detection information) from the storage unit 104. When the information regarding the contour is “contour not detected” IR1 or “contour detection not necessary” IR2 (step S2: NO), the control unit 101 reads the reduced image M2 and displays it on the display unit 105 (step S3).
ステップS4において、ユーザから入力部107を介して表示中止の指示があると(ステップS4:YES)、制御部101は処理を終了する。即ち、ステップS4は、図7における段階D2に相当する。 In step S4, when there is a display stop instruction from the user via the input unit 107 (step S4: YES), the control unit 101 ends the process. That is, step S4 corresponds to stage D2 in FIG.
表示中止の指示がない場合(ステップS4:NO)、制御部101は、輪郭に関する情報が「輪郭未検出」IR1であるか否かを判断する(ステップS5)。「輪郭未検出」IR1でない場合(ステップS5:NO)、制御部101は処理を終了し、「輪郭未検出」IR1の場合(ステップS5:YES)、ステップS6の輪郭検出を行う。そして、輪郭検出の結果、輪郭が得られなかった場合には(ステップS7:NO)、制御部101は、「輪郭検出必要なし」IR2の情報を記憶部104に書込む(ステップS8)。輪郭として、輪郭の頂点の座標が得られた場合(ステップS7:YES)、制御部101は、その頂点の座標を含む「輪郭検出−(x1,y1)−(x2,y2)−(x3,y3)−(x4,y4)」IR3の情報を記憶部101に書込む。 If there is no instruction to stop the display (step S4: NO), the control unit 101 determines whether or not the information regarding the contour is “contour not detected” IR1 (step S5). If it is not “contour undetected” IR1 (step S5: NO), the control unit 101 ends the process, and if it is “contour not detected” IR1 (step S5: YES), the contour detection of step S6 is performed. If the contour is not obtained as a result of the contour detection (step S7: NO), the control unit 101 writes the information of “no contour detection necessary” IR2 in the storage unit 104 (step S8). When the coordinates of the vertex of the contour are obtained as the contour (step S7: YES), the control unit 101 includes “contour detection− (x1, y1) − (x2, y2) − (x3, y3) − (x4, y4) ”IR3 information is written in the storage unit 101.
ステップS9の後のステップS10で、制御部101は、撮影画像M1を記憶部104から読出し、画像処理部106により、撮影画像M1を高解像度正面画像に補正し、これを表示部105で表示する。 In step S10 after step S9, the control unit 101 reads the captured image M1 from the storage unit 104, corrects the captured image M1 to a high-resolution front image by the image processing unit 106, and displays it on the display unit 105. .
ここで、ステップS7及びステップS10の詳細を説明する。
まず、画像処理部106が画像処理に用いるアフィン変換についての基本的な考え方(実現方法)を説明する。
Here, the details of step S7 and step S10 will be described.
First, a basic concept (implementation method) of affine transformation used by the image processing unit 106 for image processing will be described.
画像の空間変換にアフィン変換が幅広く応用されている。本実施形態では、3次元のカメラパラメータを用いずに2次元アフィン変換を用いて射影変換を行う。これは、変換前の座標(u,v)の点が、移動、拡大縮小、回転などの変換によって、変換後の座標(x,y)が次の数1,数2によって関係付けられることになる。射影変換もこのアフィン変換により行われることができる。
図10は、撮影画像における四角形の撮影対象Tの各頂点の座標を示したものである。
デジタルカメラ100で撮影された四角形と実際の撮影対象物との関係について、図11に基づいて説明する。
この図11において、U−V−W座標系は、デジタルカメラ100で撮影して得られた画像の3次元座標系である。A(Au,Av,Aw))ベクトルとB(Bu,Bv,Bw)ベクトルとは、3次元座標系U−V−Wにおいて、撮影対象物をベクトルで表したものである。
また、S(Su,Sv,Sw)ベクトルは、3次元座標系U−V−Wの原点と撮影対象Tとの距離を示す。
図11に示す投影スクリーンは、撮影対象Tの画像の射影を行うためのものである。
FIG. 10 shows the coordinates of the vertices of the rectangular imaging target T in the captured image.
The relationship between the quadrangle photographed with the digital camera 100 and the actual photographing object will be described with reference to FIG.
In FIG. 11, the U-V-W coordinate system is a three-dimensional coordinate system of an image obtained by photographing with the digital camera 100. The A (Au, Av, Aw) vector and the B (Bu, Bv, Bw) vector represent the object to be imaged as vectors in the three-dimensional coordinate system UV-W.
The S (Su, Sv, Sw) vector indicates the distance between the origin of the three-dimensional coordinate system UV-W and the imaging target T.
The projection screen shown in FIG. 11 is for projecting an image of the photographing target T.
投影スクリーン上の座標系をx,yとすると、この投影スクリーン上に投影される画像がデジタルカメラ100に撮影される画像と考えればよい。投影スクリーンは、W軸上から距離fだけ離れて垂直に位置するものとする。撮影対象物の任意の点P(u,v,w)と原点とを直線で結び、その直線と投影スクリーンと交差する点があるものとして、その交点のX−Y座標をp(x,y)とする。このとき、座標pは、射影変換より次の数3によって表される。
数3より、図11に示すように点P0,P1,P2,P3と投影スクリーンへの投影点p0,p1,p2,p3との関係から、次の数4に示す関係が求められる。
次に、射影変換について説明する。
撮影対象物上の任意の点Pは、S,A,Bベクトルを用いて、次の数6によって表される。
An arbitrary point P on the object to be imaged is expressed by the following equation 6 using S, A, and B vectors.
この数8にm,nを代入することにより、撮影画像の対応点(x,y)が求められる。対応点(x,y)は、整数値とは限らないので、画像補間法などを用いて画素の値を求めればよい。 By substituting m and n into Equation 8, the corresponding point (x, y) of the captured image is obtained. Since the corresponding point (x, y) is not necessarily an integer value, the pixel value may be obtained using an image interpolation method or the like.
上記m,nは、予め補正画像p(u,v)を出力する画像サイズ(0≦u<umax, 0≦v<vmax)を与えて、その画像サイズに合わせて画像を調整する方法が考えられる。この方法によれば、m,nは次の数9によって表される。
しかし、作成される補正画像の縦横比と撮影対象物の縦横比とは一致しない。ここで、補正画像p(u,v)とm、nの値との関係は、数3、数4、数5から、次の数10によって表される。
尚、カメラが固定焦点である場合、レンズの焦点距離fの値を、予め得ることができる。ズームレンズ等が存在する場合には、レンズの焦点距離fの値は、レンズのズーム倍率によって変化するので、そのズーム倍率とレンズの焦点距離fとの関係をを示すテーブルを予め作成して記憶し、ズーム倍率に基づいて焦点距離fを読み出し、数10,数11に従って、射影変換を行うことができる。
画像処理部106は、このようなアフィン変換を行うため、まず、撮影した撮影対象物の画像から射影パラメータを抽出する。
If the camera has a fixed focus, the value of the focal length f of the lens can be obtained in advance. When a zoom lens or the like is present, the value of the focal length f of the lens changes depending on the zoom magnification of the lens. Therefore, a table indicating the relationship between the zoom magnification and the focal length f of the lens is created and stored in advance. Then, the focal length f can be read based on the zoom magnification, and projective transformation can be performed according to Equations 10 and 11.
In order to perform such affine transformation, the image processing unit 106 first extracts projection parameters from the captured image of the photographic subject.
画像処理部106が実行する射影パラメータの抽出処理を図12に示すフローチャートに基づいて説明する。
画像処理部106は、撮影対象Tが四角の原稿の場合、撮影した撮影対象Tの画像から、この撮影対象Tの画像の四すみの座標点(四角形輪郭)を抽出する(ステップS31)。画像処理部106は、図13に示すフローチャートに示す四角形の輪郭を抽出する。
Projection parameter extraction processing executed by the image processing unit 106 will be described with reference to the flowchart shown in FIG.
When the shooting target T is a square document, the image processing unit 106 extracts the four corner coordinates (rectangular outline) of the image of the shooting target T from the shot image of the shooting target T (step S31). The image processing unit 106 extracts a rectangular outline shown in the flowchart of FIG.
即ち、画像処理部106は、画像処理の演算数を減らすため、記憶部104から縮小画像M2を読出す。(図13のステップS41)。
画像処理部106は、縮小画像M2から、撮影対象Tのエッジ画像を作成する(ステップS42)。
That is, the image processing unit 106 reads the reduced image M2 from the storage unit 104 in order to reduce the number of operations for image processing. (Step S41 in FIG. 13).
The image processing unit 106 creates an edge image of the shooting target T from the reduced image M2 (step S42).
画像処理部106は、撮影対象Tのエッジ画像から、このエッジ画像に含まれる直線パラメータを検出する(ステップS43)。
画像処理部106は、検出した直線パラメータから、撮影対象物の輪郭を形成する候補となる四角形を作成する(ステップS44)。
画像処理部106は、このように候補となる四角形を生成し、生成した各四角形に優先順位を付す(図12のステップS32)。
The image processing unit 106 detects a straight line parameter included in the edge image from the edge image of the photographing target T (step S43).
The image processing unit 106 creates a quadrangle that is a candidate for forming the contour of the object to be photographed from the detected straight line parameters (step S44).
The image processing unit 106 generates candidate rectangles in this way, and assigns priorities to the generated rectangles (step S32 in FIG. 12).
画像処理部106は、優先順位に従って四角形を選択し、選択した四角形を抽出できたか否かを判定する(ステップS33)。
四角形を抽出できなかったと判定した場合(ステップS33:NO)、制御部101は、この射影パラメータ抽出処理を終了させる。
The image processing unit 106 selects a rectangle according to the priority order, and determines whether or not the selected rectangle has been extracted (step S33).
If it is determined that the quadrangle could not be extracted (step S33: NO), the control unit 101 ends the projection parameter extraction process.
一方、四角形を抽出できたと判定した場合(ステップS33:YES)、制御部101は、画像処理部106から、抽出した四角形を取得して、表示部105に送り、四角形のプレビュー画像を表示させる(ステップS34)。
ここで、制御部101は、入力部107から送信された操作情報に基づいてYESキー、NOキーのいずれが押下されたか否かを判定する(ステップS35)。
On the other hand, if it is determined that the quadrangle has been extracted (step S33: YES), the control unit 101 acquires the extracted quadrangle from the image processing unit 106 and sends it to the display unit 105 to display a quadrangle preview image ( Step S34).
Here, the control unit 101 determines which of the YES key and the NO key has been pressed based on the operation information transmitted from the input unit 107 (step S35).
NOキーが押下されたと制御部101が判定した場合(ステップS35:NO)、画像処理部106は、次の候補の四角形を指定する(ステップS36)。
一方、YESキーが押下されたと判定した場合(ステップS35:YES)、制御部101は、抽出した四角形の頂点から、アフィンパラメータを算出する(ステップS37)。
If the control unit 101 determines that the NO key has been pressed (step S35: NO), the image processing unit 106 designates the next candidate rectangle (step S36).
On the other hand, if it is determined that the YES key is pressed (step S35: YES), the control unit 101 calculates an affine parameter from the extracted quadrangular vertex (step S37).
次に、この射影パラメータの抽出処理を、さらに具体的に説明する。
画像処理部106がステップS41において生成した縮小画像M2の一例を図14(a)に示す。画像処理部106は、このような縮小画像M2から、Robertsフィルタと呼ばれるエッジ検出用のフィルタを用いて図14(b)に示すようなエッジ画像を生成する(ステップS42)。このRobertsフィルタとは、2つの4近傍画素の重み付けを行って2つのフィルタΔ1、Δ2を取得して平均化することによって、画像のエッジを検出するフィルタである。
Next, the projection parameter extraction process will be described more specifically.
An example of the reduced image M2 generated by the image processing unit 106 in step S41 is shown in FIG. The image processing unit 106 generates an edge image as shown in FIG. 14B from the reduced image M2 using a filter for edge detection called a Roberts filter (step S42). The Roberts filter is a filter that detects an edge of an image by weighting two 4-neighboring pixels, obtaining two filters Δ1 and Δ2, and averaging them.
図15(a)は、フィルタΔ1の係数を示し、図15(b)は、フィルタΔ2の係数を示す。この2つのフィルタΔ1,Δ2の係数を、ある着目した座標(x,y)の画素値f(x,y)に適用すると、変換後の画素値g(x,y)は、次の数12によって表される。
ラドン変換とは、n次元のデータを、(n−1)次元の投影データに対応させる積分変換である。具体的には、図16(a),(b)に示すように、画像データをf(x,y)として、x−y座標系から角度θだけ回転したr−θ座標系を考える。θ方向の画像投影データp(r,θ)は、次の数13によって定義される。
この数13による変換がラドン変換と呼ばれるものである。
図16(a)に示すような画像データf(x,y)は、ラドン変換により、図16(b)に示すような画像投影データp(r,θ)に変換される。
このようなラドン変換によれば、図17(a)に示すようなx−y座標系の直線Lは、極座標系では、ρ=xcosα+ysinαで表される。この直線Lは、p(ρ,α)の点に全て投影されるので、p(r,θ)のピークを検出することで、直線の検出が可能になる。画像処理部106は、この原理を用いて、エッジ画像から、ラドン変換によりデータp(r,θ)を生成する。
This conversion by Equation 13 is called Radon conversion.
Image data f (x, y) as shown in FIG. 16A is converted into image projection data p (r, θ) as shown in FIG. 16B by Radon transformation.
According to such a Radon transform, a straight line L in the xy coordinate system as shown in FIG. 17A is represented by ρ = x cos α + y sin α in the polar coordinate system. Since this straight line L is entirely projected on the point p (ρ, α), it is possible to detect the straight line by detecting the peak of p (r, θ). Using this principle, the image processing unit 106 generates data p (r, θ) from the edge image by Radon transform.
次に、画像処理部106は、生成したデータp(r,θ)から、そのピーク点を抽出する。このため、画像処理部106は、図18に示すフローチャートに従って、このピーク点の抽出処理を実行する。 Next, the image processing unit 106 extracts the peak point from the generated data p (r, θ). For this reason, the image processing unit 106 executes this peak point extraction processing according to the flowchart shown in FIG.
画像処理部106は、p(r,θ)での最大値pmaxを探す(ステップS51)。
画像処理部106は、閾値pth = pmax * k(kは0以上1までの定数値)を求める(ステップS52)。
画像処理部106は、pthを閾値にしてp(r,θ)から2値画像B(r,θ)を生成する(ステップS53)。
The image processing unit 106 searches for the maximum value pmax at p (r, θ) (step S51).
The image processing unit 106 obtains a threshold value pth = pmax * k (k is a constant value from 0 to 1) (step S52).
The image processing unit 106 generates a binary image B (r, θ) from p (r, θ) using pth as a threshold (step S53).
画像処理部106は、B(r,θ)の画像ラベリングを行う。このとき得られたラベル数をN1とする(ステップS54)。
画像処理部106は、各ラベル領域内でp(r,θ)が最大値のところのr,θを調べる。そして、画像処理部106は、この値を、それぞれri,θi (i=1〜Nl)として取得する(ステップS55)。これが直線のパラメータとなる。
次に、画像処理部106は、検出した直線パラメータを用いて四角形候補を生成する場合(図13のステップS44の処理)、図19(a)に示すように、4本の直線が四角形を形成すれば、例えば、対向する直線a1,a3は、対向する直線a1,a3以外の2本の直線a2,a4と、それぞれ、交点p1,p4,p2,p3を有することになる。この場合、制御部101は、四角形を抽出できたと判定する(図12のステップS33:YES)。
The image processing unit 106 performs image labeling of B (r, θ). The number of labels obtained at this time is set to N1 (step S54).
The image processing unit 106 examines r and θ where p (r, θ) has the maximum value in each label area. The image processing unit 106 acquires these values as ri, θi (i = 1 to Nl), respectively (step S55). This is a straight line parameter.
Next, when the quadrilateral candidate is generated using the detected straight line parameter (the process of step S44 in FIG. 13), the image processing unit 106 forms four quadrilaterals as shown in FIG. 19A. In this case, for example, the opposing straight lines a1 and a3 have two straight lines a2 and a4 other than the opposing straight lines a1 and a3 and intersections p1, p4, p2, and p3, respectively. In this case, the control unit 101 determines that the quadrangle has been extracted (step S33 in FIG. 12: YES).
一方、図19(b),(c)に示すように、4つの交点がなければ、制御部101は、四角形を抽出できなかったと判定する(ステップS33:NO)。
次に、画像処理部106は、抽出した四角形の候補の中から、撮影対象物の辺を表すものとして、最もふさわしい四角形を選択する。
On the other hand, as shown in FIGS. 19B and 19C, if there are no four intersections, the control unit 101 determines that the quadrangle could not be extracted (step S33: NO).
Next, the image processing unit 106 selects the most suitable rectangle as the one representing the side of the object to be photographed from the extracted rectangle candidates.
この方法はいくつか考えられ、本実施形態では、撮影された四角形のうち、最外郭の四角形を選ぶものとする。
長方形Riの4つの頂点の座標を、それぞれ、(x0,y0),(x1,y1),(x2,y2),(x3,y3)とすると、四角形の面積Siは、次の数14によって表される。
If the coordinates of the four vertices of the rectangle Ri are (x0, y0), (x1, y1), (x2, y2), and (x3, y3), the square area Si is expressed by the following equation (14). Is done.
画像処理部106は、図20に示すフローチャートに従って、この四角形を選択する。
画像処理部106は、複数の候補数Nrの四角形のうちから、いずれかの四角形を選択する(ステップS61)。
The image processing unit 106 selects this rectangle according to the flowchart shown in FIG.
The image processing unit 106 selects one of the plurality of candidate Nr quadrangles (step S61).
画像処理部106は、選択した四角形の面積Siを、数14に従って求める(ステップS62)。
画像処理部106は、候補数Nrをデクリメントする(ステップS63)。
画像処理部106は、候補数Nrが0になったか否かを判定する(ステップS64)。
The image processing unit 106 calculates an area Si of the selected quadrangle according to Equation 14 (step S62).
The image processing unit 106 decrements the number of candidates Nr (step S63).
The image processing unit 106 determines whether the number of candidates Nr has become 0 (step S64).
候補数Nrが0にはなっていないと判定した場合(ステップS64:NO)、画像処理部106は、ステップS61〜S63の処理を、再度、実行する。
このような処理を繰り返し行うことによって、候補数Nrが0になったと判定した場合(ステップS64:YES)、画像処理部106は、求めた面積Siの大きい順に、候補となる四角形のデータを並べ替える(ステップS65)。
そして、画像処理部106は、一番目の四角形を最優先の四角形の輪郭とする。このように複数の四角形の候補があっても常に最大外郭の四角形が優先的に選択される。このように最大外郭の四角形を優先的に選択するのは、通常、意識的に撮影対象物が撮影画角内の最大になるように、ズーム調整や撮影位置の調整が行われ、最大外郭の四角形が撮影対象物の輪郭と考えられるからである。
When it is determined that the number of candidates Nr is not 0 (step S64: NO), the image processing unit 106 executes the processes of steps S61 to S63 again.
When it is determined that the number of candidates Nr has become 0 by repeating such processing (step S64: YES), the image processing unit 106 arranges candidate quadrilateral data in descending order of the calculated area Si. Change (step S65).
Then, the image processing unit 106 sets the first rectangle as the highest-priority rectangle outline. Thus, even if there are a plurality of quadrangle candidates, the quadrilateral with the maximum outline is always preferentially selected. In this way, the preferential selection of the quadrangular shape of the maximum outline is usually performed by zoom adjustment and adjustment of the photographing position so that the object to be photographed becomes the maximum within the photographing angle of view. This is because the quadrangle is considered as the outline of the object to be imaged.
従って、概ね、撮影対象Tの輪郭が自動的に抽出されることが期待される。また、誤って四角形が抽出されたとしても、ユーザは、一般には、最大外郭の四角形から順次、確認することになる。このため、撮影対象Tの輪郭を示す直線が抽出されていれば、真の撮影対象Tの四角形は、NOキーを順次押下することによって選択されることになる。 Therefore, in general, it is expected that the outline of the imaging target T is automatically extracted. In addition, even if a quadrangle is extracted by mistake, the user generally confirms sequentially from the quadrangle of the maximum outline. For this reason, if a straight line indicating the outline of the photographing target T is extracted, the true square of the photographing target T is selected by sequentially pressing the NO key.
このようにして、選択された撮影対象物の四角形の4点の頂点の座標(x0,y0),(x1,y1),(x2,y2),(x3,y3)を用いて、数5,数8に従って、数8に示す行列内の各要素であるアフィンパラメータを求めることができる。 In this way, using the coordinates (x0, y0), (x1, y1), (x2, y2), (x3, y3) of the four points of the quadrangle of the selected photographing object, According to Equation 8, affine parameters that are each element in the matrix shown in Equation 8 can be obtained.
(1)撮影対象画像からのアフィンパラメータ抽出
このような考え方に基づいて、画像処理部106は、四角形の頂点からアフィンパラメータを取得する。この処理を、図21に示すフローチャートに基づいて説明する。
画像処理部106は、四角形の4点の頂点座標(x0,y0),(x1,y1),(x2,y2),(x3,y3)から、数5に従って、射影係数α、βを算出する(ステップS71)。
(1) Extraction of Affine Parameter from Image to be Captured Based on such a concept, the image processing unit 106 acquires an affine parameter from a rectangular vertex. This process will be described based on the flowchart shown in FIG.
The image processing unit 106 calculates projection coefficients α and β according to Equation 5 from the four vertex coordinates (x0, y0), (x1, y1), (x2, y2), and (x3, y3) of the quadrangle. (Step S71).
画像処理部106は、数10に従って撮影対象物の縦横比kを算出する(ステップS72)。画像処理部106は、画像の中心点(uc,vc)を指定する(ステップS73)。画像処理部106は、最大画像サイズvmax/umaxと数10で表される縦横比kとを比較する(ステップS74)。
vmax/umax≦kの場合(ステップS74:NO)、縦横比kを変えないものとして、画像処理部106は、U軸側(横)の最大画像サイズumaxの方が撮影対象物の画像サイズよりも大きいと判定する。そして、画像処理部106は、V軸側の最大画像サイズと撮影対象物の画像サイズとが一致するように、数11の条件(1)に従って、m,nの値を求める(ステップS75)。
The image processing unit 106 calculates the aspect ratio k of the object to be photographed according to Equation 10 (step S72). The image processing unit 106 designates the center point (uc, vc) of the image (step S73). The image processing unit 106 compares the maximum image size vmax / umax with the aspect ratio k expressed by Equation 10 (step S74).
When vmax / umax ≦ k (step S74: NO), the image processing unit 106 assumes that the maximum image size umax on the U-axis side (lateral) is larger than the image size of the object to be photographed, assuming that the aspect ratio k is not changed. Is also determined to be large. Then, the image processing unit 106 obtains the values of m and n according to the condition (1) of Formula 11 so that the maximum image size on the V-axis side matches the image size of the photographing target (Step S75).
vmax/umax>kの場合(ステップS74:YES)、縦横比kを変えないものとして、画像処理部106は、V軸側(縦)の最大画像サイズvmaxの方が撮影対象物の画像サイズよりも大きいと判定する。そして、画像処理部106は、U軸側の最大画像サイズと撮影対象物の画像サイズとが一致するように、数11の条件(2)に従ってm,nの値を求める(ステップS76)。 If vmax / umax> k (step S74: YES), assuming that the aspect ratio k is not changed, the image processing unit 106 determines that the maximum image size vmax on the V-axis side (vertical) is larger than the image size of the object to be photographed. Is also determined to be large. Then, the image processing unit 106 obtains the values of m and n according to the condition (2) of Equation 11 so that the maximum image size on the U-axis side matches the image size of the photographing target (Step S76).
画像処理部106は、算出したm、nと四角形の4点の頂点座標(x0,y0),(x1,y1),(x2,y2),(x3,y3)から、数8に従って、アフィン変換行列Afを求める(ステップS77)。 The image processing unit 106 calculates an affine transformation from the calculated vertex coordinates (x0, y0), (x1, y1), (x2, y2), and (x3, y3) of the four points of the quadrangle according to Equation 8 A matrix Af is obtained (step S77).
画像処理部106は、このアフィン変換行列Afの各要素をアフィンパラメータAとして、このアフィンパラメータAを取得する(ステップS78)。
尚、四角形が認識できないような場合(図12のステップS33:NO)のように、画像撮影条件等が不適であり、射影パラメータが得られない場合がある。このような場合、例えば警告文を、表示部105に表示させ、撮影者に領域が検出できなかったことを適切に警告する。
The image processing unit 106 acquires the affine parameter A using each element of the affine transformation matrix Af as the affine parameter A (step S78).
Note that, as in the case where the quadrangle cannot be recognized (step S33 in FIG. 12: NO), the image capturing condition or the like is inappropriate, and the projection parameter may not be obtained. In such a case, for example, a warning text is displayed on the display unit 105 to appropriately warn the photographer that the area could not be detected.
(2)抽出したアフィンパラメータによる画像変換
次に、得られたアフィンパラメータを用いて補正画像を作成する画像処理方法について説明する。
(2) Image Conversion Using Extracted Affine Parameters Next, an image processing method for creating a corrected image using the obtained affine parameters will be described.
まず、アフィンパラメータを用いて射影変換や他のアフィン変換を行なう場合、図22に示すように、元の画像の点p(x,y)が、変換行列Apによる射影変換等によって変換(後)画像の点P(u,v)に対応するものとする。この場合、元の画像の点pに対応する変換画像の点Pを求めるよりは、変換画像の点P(u,v)に対応する元の画像の点p(x,y)を求めたほうが好ましい。 First, when projective transformation or other affine transformation is performed using affine parameters, as shown in FIG. 22, the point p (x, y) of the original image is transformed by projective transformation using the transformation matrix Ap (after). Assume that it corresponds to the point P (u, v) of the image. In this case, it is better to obtain the point p (x, y) of the original image corresponding to the point P (u, v) of the converted image than to obtain the point P of the converted image corresponding to the point p of the original image. preferable.
尚、変換画像の点Pの座標を求める際、バイリニア法による補間方法を用いるものとする。バイリニア法による補間方法は、一方の画像(元の画像)の座標点と対応する他方の画像(変換画像)の座標点を探し出して、一方の画像の座標点の周辺4点の(画素)値から変換画像の点P(u,v)の(画素)値を求める方法である。この方法によれば、変換画像の点Pの画素値Pは、次の数15に従って算出される。
変換画像の点P(u,v)に対応する元の画像の点p(x,y)を求めるため、画像処理部106は、図23に示すフローチャートの処理を実行する。
画像処理部106は、変換画像の画素位置uを0に初期化する(ステップS91)。
In order to obtain the point p (x, y) of the original image corresponding to the point P (u, v) of the converted image, the image processing unit 106 executes the processing of the flowchart shown in FIG.
The image processing unit 106 initializes the pixel position u of the converted image to 0 (step S91).
画像処理部106は、変換画像の画素位置vを0に初期化する(ステップS92)。画像処理部106は、数5及び数8で得られたアフィンパラメータAを用いて変換画像の画素位置(u,v)を代入し、数2に従って、元の画像の画素位置(x,y)を求める(ステップS93)。 The image processing unit 106 initializes the pixel position v of the converted image to 0 (step S92). The image processing unit 106 substitutes the pixel position (u, v) of the converted image using the affine parameter A obtained by Equations 5 and 8, and according to Equation 2, the pixel position (x, y) of the original image Is obtained (step S93).
画像処理部106は、求めた画素位置(x,y)から、数15に従って、バイリニア法により画素値P(u,v)を求める(ステップS94)。画像処理部106は、補正後画像の座標vを1つだけインクリメントする(ステップS95)。
画像処理部106は、補正後画像の座標vと座標vの最大値vmaxとを比較して、補正後画像の座標vが最大値vmax以上になったか否かを判定する(ステップS96)。座標vが最大値vmax未満であると判定した場合(ステップS96:NO)、画像処理部106は、ステップS93〜S95を再度実行する。
The image processing unit 106 obtains the pixel value P (u, v) from the obtained pixel position (x, y) according to the formula 15 by the bilinear method (step S94). The image processing unit 106 increments the coordinate v of the corrected image by one (step S95).
The image processing unit 106 compares the coordinate v of the corrected image with the maximum value vmax of the coordinate v, and determines whether or not the coordinate v of the corrected image is greater than or equal to the maximum value vmax (step S96). When it is determined that the coordinate v is less than the maximum value vmax (step S96: NO), the image processing unit 106 executes steps S93 to S95 again.
ステップS93〜S95の処理を繰り返すことにより、座標vが最大値vmaxに達したと判定した場合(ステップS96:YES)、画像処理部106は、補正後画像の座標uを1つだけインクリメントする(ステップS97)。
画像処理部106は、座標uと座標uの最大値umaxとを比較し、座標uが最大値umax以上になったか否かを判定する(ステップS98)。座標uが最大値umax未満であると判定した場合(ステップS98:NO)、画像処理部106は、再度、ステップS92〜S97の処理を実行する。
When it is determined that the coordinate v has reached the maximum value vmax by repeating the processes in steps S93 to S95 (step S96: YES), the image processing unit 106 increments the coordinate u of the corrected image by one ( Step S97).
The image processing unit 106 compares the coordinate u with the maximum value umax of the coordinate u, and determines whether the coordinate u is equal to or greater than the maximum value umax (step S98). When it is determined that the coordinate u is less than the maximum value umax (step S98: NO), the image processing unit 106 executes the processes of steps S92 to S97 again.
ステップ92〜S97の処理を繰り返すことにより、座標uが最大値umaxに達したと判定した場合(ステップ98:YES)、画像処理部106は、この画像変換処理を終了させる。 If it is determined that the coordinate u has reached the maximum value umax by repeating the processes of steps 92 to S97 (step 98: YES), the image processing unit 106 ends the image conversion process.
説明を再び図9のフローチャートに戻す。
ステップS2で輪郭に関する情報が「輪郭検出−(x1,y1)−(x2,y2)−(x3,y3)−(x4,y4)」IR3の場合(ステップS2:YES)、輪郭に相当する撮影対象Tの頂点座標がすでに求められていることになる。この場合、制御部101は、画像処理部106を利用し、ステップS10と同様にして、縮小画像M2を正面画像に補正し、その結果得られる低解像度正面画像を表示部105に表示する(ステップS11)。
The description returns to the flowchart of FIG. 9 again.
When the information regarding the contour is “contour detection− (x1, y1) − (x2, y2) − (x3, y3) − (x4, y4)]” IR3 in step S2 (step S2: YES), photographing corresponding to the contour is performed. The vertex coordinates of the target T have already been obtained. In this case, the control unit 101 uses the image processing unit 106 to correct the reduced image M2 to a front image in the same manner as in step S10, and displays the low-resolution front image obtained as a result on the display unit 105 (step S10). S11).
このステップS11を実施した段階は、図7の段階D8に相当する。ここで、制御部101は、ユーザから表示中止の指示がある場合(ステップS12:YES)、処理を終了する。ユーザから表示中止の指示がない場合(ステップS12:NO)、制御部101は、撮影画像M1を記憶部105から読出し、ステップS10と同様にして、撮影画像M1を正面画像に補正し、その結果得られる高解像度正面画像を表示部105に表示する(ステップS13)。 The stage in which step S11 is performed corresponds to stage D8 in FIG. Here, the control part 101 complete | finishes a process, when there exists a display cancellation instruction | indication from a user (step S12: YES). When there is no display stop instruction from the user (step S12: NO), the control unit 101 reads the captured image M1 from the storage unit 105, corrects the captured image M1 to a front image in the same manner as in step S10, and results thereof. The obtained high-resolution front image is displayed on the display unit 105 (step S13).
以上のように、本実施形態のデジタルカメラ100では、撮影モードで撮影を行う場合に、正面画像を形成する処理を行わない。そのため、制御部101としてCPUを搭載した場合でも、そのパワーが少なくても、連続的な撮影が十分可能になり、デジタルカメラの利便性を損なわない。 As described above, the digital camera 100 according to the present embodiment does not perform the process of forming the front image when shooting in the shooting mode. Therefore, even when a CPU is mounted as the control unit 101, continuous shooting is sufficiently possible even if the power is low, and the convenience of the digital camera is not impaired.
また、再生モードで正面画像を形成する場合に、段階D2,D9で、一連の処理の過程で処理を中止することができる。これにより、例えば段階D2に中止の指示をユーザがデジタルカメラ100が入力すると、次/前の画像の表示に進めることができる。よって、ユーザーが縮小画像M2を見た段階で正面画像に補正された表示まで希望していない場合は、前/後の画像にすばやく進めることを意味する。 Further, when a front image is formed in the reproduction mode, the processing can be stopped in a series of processing steps D2 and D9. Thereby, for example, when the digital camera 100 inputs an instruction to cancel in step D2, it is possible to proceed to display of the next / previous image. Therefore, when the user does not desire the display corrected to the front image at the stage of viewing the reduced image M2, it means that the user quickly proceeds to the previous / next image.
また、段階D9で中止の指示を入力すると、次/前の画像の表示に進むことができる。これにより、粗い表示(低解像度の画像)を見た段階で細かな表示まで希望していない場合は前/後の画像にすばやく進めることを意味する。 Further, when an instruction to cancel is input in step D9, it is possible to proceed to display of the next / previous image. This means that when a coarse display (low-resolution image) is viewed, fine display is not desired, and the image is quickly advanced to the previous / next image.
したがって、複数の画像を入力部107のキーなどを使って順次切り替えて表示していくような操作の場合でも、ユーザーは最初に補正前の縮小画像M2が表示された段階で、正面画像に補正して表示することを望む場合は、段階D6の処理がすむまで少し待ち、望まない場合は中止の指示を入力するだけで(t1の時間だけで)次/前の画像の表示に移行するという自然な操作を行うだけで済む。 Therefore, even in the operation of sequentially switching and displaying a plurality of images using the keys of the input unit 107, the user corrects the front image when the reduced image M2 before correction is first displayed. If it is desired to display the image, it waits for a while until the processing of the step D6 is completed. If not, it is simply input a stop instruction (only at the time t1), and the display is shifted to the next / previous image display. All you have to do is a natural operation.
一方、一度正面画像に補正した表示を行った画像に対しては、最初から低解像度正面画像の表示を行った段階で、より細かな高解像度の正面画像の表示を望む場合は少し待ち、望まない場合は中止の指示を入力するだけで(t5+t6 だけの処理時間で)次/前の画像の表示に移行するという自然な操作を行うだけで済む。即ち、デジタルカメラの操作性、利便性、やレスポンス特性を劣化させずに、正面画像を生成できる。
また、画像がたくさん記憶されていても、撮影画像をカーソルキーなどで順次閲覧していくという簡単な操作だけで非力なCPUを持ったデジタルカメラでも正面画像に補正された画像の閲覧時のスピードを上げることが出来るという効果がある。
On the other hand, for the image that has been corrected to the front image once, if you want to display a finer high-resolution front image at the stage of displaying the low-resolution front image from the beginning, wait a little, If there is not, it is only necessary to input a cancellation instruction (with a processing time of t5 + t6) and to perform a natural operation of shifting to display of the next / previous image. That is, a front image can be generated without deteriorating the operability, convenience, and response characteristics of the digital camera.
Even when a large number of images are stored, even a digital camera with a powerless CPU can be used to view images taken with the cursor key, etc. There is an effect that can be raised.
(実施形態2)
図24は、本発明の実施形態2に係る編集処理を示すフローチャートである。
図25は、記憶部に記憶されているナビゲーションテーブルを示す説明図である。
(Embodiment 2)
FIG. 24 is a flowchart showing editing processing according to the second embodiment of the present invention.
FIG. 25 is an explanatory diagram showing a navigation table stored in the storage unit.
実施形態1のデジタルカメラ100に、撮影画像M1に対してトリミング・リサイズ・DPOF(Digital Print Order Format)設定など、さまざまな編集機能を持たせることが可能である。
トリミングやリサイズなどは正面画像に補正を行った状態からと行わない状態からとでは処理を行った結果が異なる。
The digital camera 100 according to the first embodiment can be provided with various editing functions such as trimming, resizing, and DPOF (Digital Print Order Format) setting for the captured image M1.
Trimming, resizing, and the like have different processing results depending on whether the front image is corrected or not.
そこで、本実施形態では、図1のデジタルカメラ100の記憶部104に、図25に示すナビゲーションテーブルを記憶させている。ナビゲーションテーブルの1列目には、編集の内容を示す、リサイズ、トリミング、DPOF設定等が記憶される。ナビゲーションテーブルの2列目には、その時点で表示部105で表示されている画像に対して編集を行うか否かを示すものであり、「継承」は編集を実施する前の表示部105の表示状態を継続して処理を行うことを示す。 Therefore, in this embodiment, the navigation table shown in FIG. 25 is stored in the storage unit 104 of the digital camera 100 shown in FIG. In the first column of the navigation table, resizing, trimming, DPOF setting, and the like indicating the contents of editing are stored. The second column of the navigation table indicates whether or not the image displayed on the display unit 105 at that time is to be edited, and “inherit” indicates that the display unit 105 before editing is performed. Indicates that the display state is continued for processing.
ナビゲーションテーブルの2列目の「無」は、表示部105の表示状態に係わらず、正面画像に補正表示しないことを示す。ナビゲーションテーブルの3列目の「継承」は、表示部105に表示されている画像の解像度をそのまま継承して編集を行うことを示している。同3列目の「高解像度」は、その時点の表示部105の表示状態に係わらず、高解像度の画素について編集を行うことを示している。 “None” in the second column of the navigation table indicates that correction display is not performed on the front image regardless of the display state of the display unit 105. “Inheritance” in the third column of the navigation table indicates that editing is performed by inheriting the resolution of the image displayed on the display unit 105 as it is. “High resolution” in the third column indicates that editing is performed on a high resolution pixel regardless of the display state of the display unit 105 at that time.
ユーザが入力部107のキーを用いて編集を指定した場合、制御部101は、記憶部104のナビゲーションテーブルを参照する(図24のステップS100)。そして、ナビゲーションテーブルの1列目から指示に対応する編集内容を探し、2列目,3列目から、正面画像への補正が必要か、或いは解像度の変更が必要か等の情報を取得する。 When the user designates editing using the key of the input unit 107, the control unit 101 refers to the navigation table in the storage unit 104 (step S100 in FIG. 24). Then, the editing contents corresponding to the instruction are searched from the first column of the navigation table, and information such as whether correction to the front image is necessary or resolution change is acquired from the second and third columns.
ステップS101において、制御部101は、ナビゲーションテーブルの2列目が「継承」か否かを判断し、「継承」の場合(ステップS101:YES)、制御部101は表示部105で表示している画像が正面画像であるか否かを判別する(ステップS102)。正面画像の場合(ステップS102:YES)、制御部101は、高解像度の表示の指定があるか否かを判断する(ステップS103)。 In step S <b> 101, the control unit 101 determines whether or not the second column of the navigation table is “inherit”. If it is “inherit” (step S <b> 101: YES), the control unit 101 displays on the display unit 105. It is determined whether or not the image is a front image (step S102). In the case of a front image (step S102: YES), the control unit 101 determines whether there is a designation for high-resolution display (step S103).
制御部101は、ナビゲーションテーブルの3列目の記憶内容にしたがって、高解像度の表示の指定がある場合(ステップS103:YES)、制御部101は、現在表示部105で表示している画像が、高解像度の画像であるか否かを判定する(ステップS104)。現在の表示部105で表示している画像が、低解像度の画像の場合(ステップS104:NO)、制御部101は、記憶部104から撮影画像M1を読出し、画像処理部106を用いて高解像度の正面画像を形成し、表示部105に表示させる(ステップS105)。そして、ステップS106で、制御部101は、ユーザからの指示に対応する編集を行う。 When the control unit 101 designates high-resolution display according to the stored contents of the third column of the navigation table (step S103: YES), the control unit 101 displays the image currently displayed on the display unit 105 as follows: It is determined whether or not the image is a high resolution image (step S104). When the image currently displayed on the display unit 105 is a low-resolution image (step S104: NO), the control unit 101 reads the captured image M1 from the storage unit 104 and uses the image processing unit 106 to perform high-resolution. Is displayed on the display unit 105 (step S105). In step S106, the control unit 101 performs editing corresponding to the instruction from the user.
ステップS102で現在の表示部105で表示している画像が正面画像でない場合、ステップS103で表示部105で表示している画像が低解像度の画像の場合、及びステップS104で現在の表示部105の表示が高解像度であると判断した場合には、制御部101は、現在表示部105に表示している画像について、編集を行う(ステップS106)。 If the image displayed on the current display unit 105 in step S102 is not a front image, the image displayed on the display unit 105 in step S103 is a low resolution image, and the current display unit 105 in step S104. If it is determined that the display has a high resolution, the control unit 101 edits the image currently displayed on the display unit 105 (step S106).
また、ナビゲーションテープルの2列目に「継承」が記憶されていない場合(ステップS101:NO)、制御部101は、ナビゲーションテーブルの2列目に「無」が記憶されているか否かを判断する(ステップS107)。ナビゲーションテーブルの2列目に「無」が記憶され、正面画像を表示をしないことが示されている場合(ステップS107:YES)、制御部101は現在表示部105で表示している画像が正面画像か否かを判断する(ステップS108)。正面画像が表示されている場合(ステップS108:YES)に、制御部101は、縮小画像M2を記憶部104から読出し、これを表示部105に表示させる(ステップS109)。ステップS109の次に、制御部101は、その時点で表示部105に表示している画像について、編集を行う(ステップS106)。 If “inheritance” is not stored in the second column of the navigation table (step S101: NO), the control unit 101 determines whether “none” is stored in the second column of the navigation table. (Step S107). When “No” is stored in the second column of the navigation table and it is indicated that the front image is not displayed (step S107: YES), the control unit 101 indicates that the image currently displayed on the display unit 105 is the front side. It is determined whether or not it is an image (step S108). When the front image is displayed (step S108: YES), the control unit 101 reads the reduced image M2 from the storage unit 104 and displays it on the display unit 105 (step S109). After step S109, the control unit 101 edits the image currently displayed on the display unit 105 (step S106).
ステップS106で編集を行った制御部101は、編集された正面画像の保存が必要な場合に(ステップS110:YES)、輪郭に関する情報として「輪郭検出必要なし」IR2を記憶部104に書込む(ステップS111)。ステップS111の後、或いはステップS110で保存の必要がない場合、制御部101は、処理を終了する。 When it is necessary to save the edited front image (step S110: YES), the control unit 101 that has performed the editing in step S106 writes “contour detection unnecessary” IR2 as information regarding the contour in the storage unit 104 ( Step S111). After step S111 or when there is no need for storage in step S110, the control unit 101 ends the process.
以上のステップS100からステップS111を実施することにより、例えば表示部105に、正面画像補正が行われていない表示がされている状態で、入力部107のトリミングを指示するキーが押下されると、図26(a)のようにトリミング位置やサイズなどを指定する画面が表示部105に表示される。 By performing the above steps S100 to S111, for example, when the display unit 105 is displayed in a state where the front image correction is not performed, a key for instructing trimming of the input unit 107 is pressed. A screen for designating the trimming position, size, etc. is displayed on the display unit 105 as shown in FIG.
この時正面画像に補正されていない状態でトリミングされるため、そのトリミング位置やサイズなどを指定する画面も正面画像に補正されていない状態での表示となる。トリミングを実行すると、制御部101は、記憶装置104に記憶された撮影画像M1を読み込み、トリミング位置やサイズなどを指定する画面で指定されたトリミング枠の座標とサイズを撮影画像M1/縮小画像M2の比率で変換した値でトリミング処理を行い、記憶部104に記憶する。図27(a)がトリミング後の画像の内容である。 At this time, since the trimming is performed in a state where the front image is not corrected, the screen for designating the trimming position and size is displayed in a state where the front image is not corrected. When the trimming is executed, the control unit 101 reads the captured image M1 stored in the storage device 104, sets the coordinates and size of the trimming frame designated on the screen for designating the trimming position, size, etc., to the captured image M1 / reduced image M2. The trimming process is performed with the value converted at the ratio of the above and stored in the storage unit 104. FIG. 27A shows the contents of the image after trimming.
一方、表示部105に、補正が行われて正面画像が表示されている状態で入力部107のトリミング処理を指示するキーを押下すると、図26(b)のようにトリミング位置やサイズなどを指定する画面が表示される。この時には、正面画像に補正された状態でトリミングされるため、トリミング位置やサイズなどを指定する画面でも正面画像に補正された状態での表示となる。トリミングを実行すると、制御部101は、記憶部104に記憶された撮影画像M1と輪郭に関する情報を読み込み、画像処理部106を使って正面画像を作成し、この正面画像をテンポラリ画像として記憶部104に記憶する。 On the other hand, when a key for instructing the trimming process of the input unit 107 is pressed in a state where the front image is displayed after correction is performed on the display unit 105, the trimming position, size, and the like are designated as shown in FIG. The screen to be displayed is displayed. At this time, since the trimming is performed with the front image corrected, the screen for designating the trimming position, size, and the like is displayed with the front image corrected. When the trimming is executed, the control unit 101 reads the captured image M1 and information regarding the contour stored in the storage unit 104, creates a front image using the image processing unit 106, and stores the front image as a temporary image in the storage unit 104. To remember.
次に、トリミング位置やサイズなどを指定する画面で指定された位置とサイズをテンポラリ画像/縮小画像M2の比率で変換した値でテンポラリ画像に対してトリミング処理を行い、記憶部104に記憶する。図27(b)がトリミング後の画像の内容である。 Next, trimming processing is performed on the temporary image with a value obtained by converting the position and size designated on the screen for designating the trimming position and size by the ratio of the temporary image / reduced image M2, and the result is stored in the storage unit 104. FIG. 27B shows the contents of the image after trimming.
また、入力部107中のリサイズ処理を指示するためのキーを押下すると、制御部101は、トリミングと同様に起動前の正面画像の補正状態をそのまま継承した図28(a),図28(b)に示すリサイズ後のサイズ選択画面を表示部105に表示する。リサイズ時は正面画像の補正を行うか否かはユーザーにとって大切であるが、高解像度の表示か低解像度の表示であるかは、処理に影響を及ぼすことはない。 When the key for instructing the resizing process in the input unit 107 is pressed, the control unit 101 inherits the correction state of the front image before activation as it is in the trimming as shown in FIGS. 28A and 28B. The size selection screen after resizing shown in FIG. Whether or not to correct the front image at the time of resizing is important for the user, but whether the display is high resolution or low resolution does not affect the processing.
しかし、前述のトリミング処理のような場合、座標位置やサイズの指定が介在するため、粗い正面画像補正された表示では、補正過程における誤差が大きくなる場合も考えられ、図26(b)の画面と図27(b)の画像との差も大きくなってしまうこと想定される。より細かな表示上で行うほうが座標位置やサイズの指定には好ましい。従って、編集の中で表示精度を必要とする場合は、編集処理に入ると同時に自動的に高解像度の画像を表示させる。 However, in the case of the above-described trimming processing, since the designation of the coordinate position and size is involved, there may be a case where the error in the correction process becomes large in the display subjected to the rough front image correction, and the screen of FIG. It is assumed that the difference between the image and the image of FIG. It is preferable to specify the coordinate position and size on a finer display. Therefore, when display accuracy is required during editing, a high-resolution image is automatically displayed at the same time as the editing process starts.
入力部107中のDPOF設定を指示するキーを押下すると、制御部101は、図28(c)のようにDPOF設定画面を表示部105に表示する。この場合、正面画像であろうとなかろうと、DPOF設定後のプリント処理では、記憶部104に記憶されている撮影画像M1の内容をそのまま印刷することになるため、正面画像に補正された画像のままで表示してしまうと、正面画像に補正された画像を印刷するというような誤解を与えかねない。従って、DPOF設定画面は縮小画像M2を表示した画面となる。 When a key instructing DPOF setting in the input unit 107 is pressed, the control unit 101 displays a DPOF setting screen on the display unit 105 as shown in FIG. In this case, whether or not the image is a front image, in the print processing after DPOF setting, the content of the captured image M1 stored in the storage unit 104 is printed as it is, so that the image corrected to the front image remains as it is. If it is displayed, it may give a misunderstanding that the corrected image is printed on the front image. Therefore, the DPOF setting screen is a screen displaying the reduced image M2.
また、撮影モードと再生モードとでは正面画像を表示することができても、それを記憶部に記憶していない。そこで、補正で正面画像を形成し、それを記録する処理も、編集の一種として利用される。図28(d)は、この処理の設定で表示される画像例である。 Further, even though the front image can be displayed in the shooting mode and the playback mode, it is not stored in the storage unit. Therefore, a process of forming a front image by correction and recording it is also used as a kind of editing. FIG. 28D shows an example of an image displayed with this processing setting.
正面画像に補正された内容の画像を新たに作成し、記憶部104に記憶するための編集により、輪郭に基づき、縮小画像M2や撮影画像M1に関して正面画像に補正した画像を新たに形成し、これを記憶部105に記憶にさせることで、正面画像に補正された画像を閲覧することができる。 By newly creating an image of the corrected content in the front image and editing it for storage in the storage unit 104, a new image corrected to the front image with respect to the reduced image M2 and the captured image M1 is formed based on the contour, By storing this in the storage unit 105, the image corrected to the front image can be browsed.
しかし、このように処理された画像を本デジタルカメラで再生時に撮影された画像と同じように輪郭を検出し、正面画像に補正してしまうと、すでにその画像そのものが正面画像に補正された画像であるにも拘らず、その画像の中に含まれる輪郭によって新たに正面画像に補正された表示を行ってしまう場合も起こりえる。これはユーザーが望む結果とは異なるため、正面画像に補正された内容の画像を記憶部104に記憶する場合は、輪郭に関する情報として「輪郭検出必要」IR2の情報を書き込む。 However, if the image processed in this way is detected in the same way as the image taken during playback with this digital camera and corrected to the front image, the image itself has already been corrected to the front image. In spite of this, there may be a case where the display corrected to the front image is newly performed by the contour included in the image. Since this is different from the result desired by the user, when storing the corrected image in the front image in the storage unit 104, information on “contour detection required” IR2 is written as information on the contour.
一方、表示をする際には、記憶部104の「輪郭検出必要」IR2が記憶されていれば、輪郭検出及び、正面画像補正表示を行わないため、記憶されている画像を撮影画像或いは縮小画像と見なし、その見なされた縮小画像をそのまま表示する。 On the other hand, when displaying, if “contour detection required” IR2 in the storage unit 104 is stored, the contour detection and the front image correction display are not performed, so the stored image is taken as a captured image or a reduced image. And the reduced image thus regarded is displayed as it is.
以上のように、本実施形態のデジタルカメラでは、編集の内容に応じて表示部105で表示する画像が適切に切り替わる。そのため、ユーザーに処理後の内容が把握でき、利便性の向上が期待できるという利点がある。 As described above, in the digital camera of the present embodiment, the image displayed on the display unit 105 is appropriately switched according to the content of editing. Therefore, there is an advantage that the user can grasp the contents after processing and expect improvement in convenience.
なお、本発明は、上記実施形態に限定されず、種々の変形が可能である。
例えば、輪郭を検出する際、撮影対象Tが原稿であるとして四角形の輪郭を求めているが、撮影対象Tの形状に応じた輪郭を求めてもよい。
In addition, this invention is not limited to the said embodiment, A various deformation | transformation is possible.
For example, when the contour is detected, a rectangular contour is obtained assuming that the photographing target T is a document, but a contour corresponding to the shape of the photographing target T may be obtained.
100…デジタルカメラ、101…制御部、102…光学レンズ、103…イメージセンサ、104…記憶部、105…表示部、106…画像処理部、107…入力部、D1〜D11…段階、M1…撮影画像、M2…縮小画像、IR1〜IR3…輪郭に関する情報 DESCRIPTION OF SYMBOLS 100 ... Digital camera, 101 ... Control part, 102 ... Optical lens, 103 ... Image sensor, 104 ... Memory | storage part, 105 ... Display part, 106 ... Image processing part, 107 ... Input part, D1-D11 ... Stage, M1 ... Photographing Image, M2 ... Reduced image, IR1-IR3 ... Information about contour
Claims (8)
前記撮影モードが設定されているときに撮影対象を撮影して撮影画像を取得する撮影部と、
前記撮影画像を記憶する記憶手段と、
前記撮影画像における前記撮影対象の輪郭を求める輪郭形成手段と、
前記求められた輪郭に基づいて前記撮影画像と実際の前記撮影対象との関係を示す射影パラメータを求める射影パラメータ取得手段と、
前記射影パラメータを用い、前記撮影対象物を撮影した場合の正面画像を前記撮影画像について形成する正面画像形成手段と、
前記撮影画像、該撮影画像について形成された前記正面画像を表示する表示手段と、
前記輪郭形成手段とパラメータ取得手段と正面画像形成手段と表示手段を制御する制御手段とを備え、
前記制御手段は、
前記輪郭形成手段により求めた輪郭に関する情報及び前記撮影画像の縮小画像とを前記撮影画像に対応させて前記記憶手段に記憶させておき、
前記再生モードが設定されたときに、前記記憶手段で記憶している前記輪郭に関する情報に基づき、前記撮影画像の縮小画像に対応する縮小正面画像を作成して前記表示手段により表示し、その後に、該撮影画像に対応する前記正面画像を作成して該表示手段により表示する
ことを特徴とする撮影装置。 Mode switching means for switching between shooting mode and playback mode;
A shooting unit that captures a shooting target and acquires a shot image when the shooting mode is set;
Storage means for storing the captured image;
Contour forming means for obtaining a contour of the photographing object in the photographed image;
Projection parameter obtaining means for obtaining a projection parameter indicating a relationship between the photographed image and the actual photographing object based on the obtained contour;
A front image forming unit that forms a front image of the photographed image with respect to the photographed image using the projection parameter;
Display means for displaying the photographed image and the front image formed for the photographed image;
A control means for controlling the contour forming means, parameter acquiring means, front image forming means and display means;
The control means includes
Information related to the contour obtained by the contour forming unit and a reduced image of the captured image are stored in the storage unit in association with the captured image,
When the reproduction mode is set, a reduced front image corresponding to a reduced image of the photographed image is created based on the information related to the contour stored in the storage unit and displayed by the display unit, and thereafter An imaging apparatus, wherein the front image corresponding to the captured image is created and displayed by the display means .
前記再生モードが設定されたときに、前記正面画像を前記表示手段に表示する際には、前記記憶手段で記憶している前記輪郭に関する情報を読出し、前記射影パラメータ取得手段により該輪郭に関する情報に基づいて前記射影パラメータを求め、前記正面画像形成手段により前記正面画像を形成し、前記表示手段により該正面画像を表示する、
ことを特徴とする請求項1に記載の撮影装置。 The control means includes
When the reproduction mode is set, when displaying the front image on the display means, information on the contour stored in the storage means reads, on the information on the contour by the projection parameter acquiring unit Obtaining the projection parameter based on the front image forming means, forming the front image, and displaying the front image by the display means;
The imaging apparatus according to claim 1, wherein:
前記再生モードが設定されたときに、前記縮小正面画像を作成して前記表示手段により表示し、指示があった場合に、前記撮影画像に対応する前記正面画像を作成して該表示手段により表示することを特徴とする請求項1又は2に記載の撮影装置。 The control means includes
When the playback mode is set, the reduced front image is created and displayed by the display means, and when instructed, the front image corresponding to the captured image is created and displayed by the display means. The photographing apparatus according to claim 1 or 2 , wherein
前記制御部は、前記入力された前編集の指示の内容に応じて編集対象となる画像を前記撮影画像、前記縮小画像、前記縮小正面画像或いは前記正面画像から選択して前記表示手段に表示し、該画像に対応するデータを用いて該編集を実施することを特徴とする請求項1乃至3の何れか1項に記載の撮影装置。 Editing instruction input means for inputting an instruction to edit the captured image, the reduced image, the reduced front image or the front image;
The control unit selects an image to be edited from the photographed image, the reduced image, the reduced front image, or the front image according to the content of the input pre-edit instruction and displays the selected image on the display unit. The photographing apparatus according to any one of claims 1 to 3 , wherein the editing is performed using data corresponding to the image.
前記撮影モードが設定されているときに撮影対象を撮影して撮影画像を取得する撮影部と、
前記撮影画像を記憶する記憶手段と、
前記撮影画像における前記撮影対象の輪郭を求める輪郭形成手段と、
前記求められた輪郭に基づいて前記撮影画像と実際の前記撮影対象との関係を示す射影パラメータを求める射影パラメータ取得手段と、
前記射影パラメータを用い、前記撮影対象物を撮影した場合の正面画像を形成する正面画像形成手段と、
前撮影画像について形成された前記正面画像を表示する表示手段と、
前記輪郭形成手段とパラメータ取得手段と正面画像形成手段と表示手段を制御する制御手段とを備えるカメラ装置において、
前記輪郭形成手段により求めた輪郭に関する情報及び前記撮影画像の縮小画像とを前記撮影画像に対応させて前記記憶手段に記憶させておき、
前記再生モードが設定されたときに、前記記憶手段で記憶している前記輪郭に関する情報に基づき、前記撮影画像の縮小画像に対応する縮小正面画像を作成して前記表示手段により表示し、その後に、該撮影画像に対応する前記正面画像を作成して該表示手段により表示する処理と、
を実施することを特徴とする撮影制御方法。 Mode switching means for switching between shooting mode and playback mode;
A shooting unit that captures a shooting target and acquires a shot image when the shooting mode is set;
Storage means for storing the captured image;
Contour forming means for obtaining a contour of the photographing object in the photographed image;
Projection parameter obtaining means for obtaining a projection parameter indicating a relationship between the photographed image and the actual photographing object based on the obtained contour;
A front image forming means for forming a front image when the photographing object is photographed using the projection parameter;
Display means for displaying the front image formed for the previous photographed image;
In the camera device comprising the contour forming means, the parameter acquiring means, the front image forming means, and the control means for controlling the display means,
Information related to the contour obtained by the contour forming unit and a reduced image of the captured image are stored in the storage unit in association with the captured image,
When the reproduction mode is set, a reduced front image corresponding to a reduced image of the photographed image is created based on the information related to the contour stored in the storage unit and displayed by the display unit, and thereafter A process of creating the front image corresponding to the photographed image and displaying it by the display means ;
An imaging control method comprising:
ことを特徴とする請求項5に記載の撮影制御方法。 When the playback mode is set, when displaying the front image on the display unit, the information on the contour stored in the storage unit is read, and based on the information on the contour by the projection parameter acquisition unit. Obtaining the projection parameter, forming the front image by the front image forming means, and displaying the front image by the display means,
The imaging control method according to claim 5 , wherein:
前記入力された前編集の指示の内容に応じて編集対象となる画像を前記撮影画像、前記縮小画像、前記縮小正面画像或いは前記正面画像から選択し前記表示手段に表示し、該画像に対応するデータを用いて該編集を実施することを特徴とする請求項5乃至7の何れか1項に記載の撮影制御方法。 The photographing apparatus includes an editing instruction input means for inputting an instruction to edit the photographed image, the reduced image, the reduced front image, or the front image,
An image to be edited is selected from the photographed image, the reduced image, the reduced front image, or the front image according to the content of the input pre-edit instruction, and is displayed on the display unit, and corresponds to the image. The imaging control method according to claim 5, wherein the editing is performed using data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004081742A JP4222238B2 (en) | 2004-03-19 | 2004-03-19 | Imaging apparatus and imaging control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004081742A JP4222238B2 (en) | 2004-03-19 | 2004-03-19 | Imaging apparatus and imaging control method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005269458A JP2005269458A (en) | 2005-09-29 |
JP4222238B2 true JP4222238B2 (en) | 2009-02-12 |
Family
ID=35093489
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004081742A Expired - Fee Related JP4222238B2 (en) | 2004-03-19 | 2004-03-19 | Imaging apparatus and imaging control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4222238B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5909990B2 (en) * | 2011-10-25 | 2016-04-27 | 株式会社リコー | Imaging apparatus and imaging method |
-
2004
- 2004-03-19 JP JP2004081742A patent/JP4222238B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2005269458A (en) | 2005-09-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4363151B2 (en) | Imaging apparatus, image processing method thereof, and program | |
JP4930297B2 (en) | Imaging device | |
JP4489608B2 (en) | DIGITAL STILL CAMERA, IMAGE REPRODUCTION DEVICE, FACE IMAGE DISPLAY DEVICE, AND CONTROL METHOD THEREOF | |
US5596346A (en) | Method and apparatus for applying a function to a localized area of a digital image using a window | |
JP5106142B2 (en) | Electronic camera | |
WO2007052572A1 (en) | Electronic camera | |
JP2004266774A (en) | Signal processing apparatus and image data generating apparatus | |
JP2002247614A (en) | Projector | |
KR102400283B1 (en) | Image processing apparatus, image processing method, and program | |
JP2008061148A (en) | Imaging apparatus, zoom information display method, and zoom information display program | |
US20060039630A1 (en) | Image processing apparatus, image processing method, program, and storage medium | |
JP2000244814A (en) | Image compositing device and recording medium where image compositing method is recorded | |
JP2005318177A (en) | Material presentation apparatus | |
JP4696614B2 (en) | Image display control device and program | |
JP2001177716A (en) | Image processing method and image processor | |
KR101599885B1 (en) | Digital photographing apparatus and method | |
JP2011040896A (en) | Image capturing apparatus and method of controlling the same | |
JP4222238B2 (en) | Imaging apparatus and imaging control method | |
JP4363154B2 (en) | Imaging apparatus, image processing method thereof, and program | |
JP2008263486A (en) | Imaging apparatus | |
JP3893416B2 (en) | Electronic still camera and image data recording / reproducing method thereof | |
JP2007178735A (en) | Imaging apparatus, method for displaying viewing angle in zooming, and program | |
JP2022036153A (en) | Imaging apparatus | |
JP2010016693A (en) | Electronic camera | |
JP2004072677A (en) | Device, method and program for compositing image and recording medium recording the program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20061128 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080805 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20081003 |
|
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: 20081028 |
|
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: 20081110 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111128 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111128 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121128 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131128 Year of fee payment: 5 |
|
LAPS | Cancellation because of no payment of annual fees |