JP2014147034A - Image processing apparatus, image processing method, and program - Google Patents

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

Info

Publication number
JP2014147034A
JP2014147034A JP2013015839A JP2013015839A JP2014147034A JP 2014147034 A JP2014147034 A JP 2014147034A JP 2013015839 A JP2013015839 A JP 2013015839A JP 2013015839 A JP2013015839 A JP 2013015839A JP 2014147034 A JP2014147034 A JP 2014147034A
Authority
JP
Japan
Prior art keywords
image
correction
processing
region
area
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.)
Pending
Application number
JP2013015839A
Other languages
Japanese (ja)
Inventor
Masashi Uehara
将司 上原
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2013015839A priority Critical patent/JP2014147034A/en
Publication of JP2014147034A publication Critical patent/JP2014147034A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To make it possible to calculate, in an image after distortion aberration correction processing, a rectangular area including a photographing area as much as possible, even in the case where a circumferential fisheye lens is used and the photographing area is not the entire area of the image.SOLUTION: An image processing apparatus 1 includes a correction unit 102 that performs distortion aberration correction processing to an image, and a calculation unit 103 that selects one of a plurality of predetermined processing methods according to photographing conditions of the image and correction conditions defined by the correction unit 102, and calculates the size of an area cut out from the image after the correction processing.

Description

本発明は、画像処理装置、画像処理方法、プログラムに関する。詳しくは、本発明は、撮像装置によって撮影された画像を補正する画像処理装置、画像処理方法、プログラムに関するものであり、特に、画像処理装置の収差補正時における画像の切り出し方法に関する。   The present invention relates to an image processing apparatus, an image processing method, and a program. Specifically, the present invention relates to an image processing device, an image processing method, and a program for correcting an image captured by an imaging device, and more particularly, to an image clipping method at the time of aberration correction of the image processing device.

従来、撮像装置によって撮影された画像に対して、歪曲収差と呼ばれる主にレンズによる光学的な歪みを補正する技術が知られている。また、歪曲収差を補正する場合には、補正処理後の画像が、大きく分類して、糸巻き型(図9参照)と樽型(図10参照)と呼ばれる2種類のいずれかの形状に変形することも知られている。
撮像装置により撮像されたデジタル画像は、一般的に矩形である。このため、例えば特許文献1または特許文献2のように、歪曲収差補正処理後の画像から矩形領域を切り出す手法が検討されてきた。この方法は、総じて、補正処理後の変形した画像から、できる限り最大の矩形領域を切り出すことに重点をおいたものであった。
ところで、一般的に利用されているレンズの1つに、魚眼レンズがある。魚眼レンズの中でも、特に円周魚眼(または全周魚眼)と呼ばれるレンズを用いる場合には、撮像素子などの撮像面は、全域が撮影領域として使用されるものではなく、中心からある半径の円の領域内が撮影領域として使用される。そして、この円の外の領域は、画像ではあるが被写体が写っていない黒い領域として記録される。
円周魚眼レンズを用いて撮影された画像の歪曲収差を補正する場合にも、前述の歪曲収差補正と、その後の画像の切り出しが必要となる。しかしながら、従来と同様に、変形後の画像から切り出し可能な最大の矩形の領域を切り出す処理を行うと、樽型に変形した場合には、円形の撮影領域の一部が切り取られてしまうことがある(図10参照)。円周魚眼レンズ以外の一般的なレンズでは、撮像面の全域が撮影領域となるため、樽型の画像に内接する最大の矩形の領域を切り取る処理であっても問題がない。これに対して、円周魚眼レンズを用いた場合には、被写体は、撮像面の中心の円形の領域にのみ写っている。このため、樽型に変形した画像に対して前述のような従来の方法を用いると、被写体が写っている円形の撮影領域の一部が切り取られるという問題が生じる。
2. Description of the Related Art Conventionally, a technique for correcting optical distortion caused mainly by a lens called distortion is known for an image taken by an imaging apparatus. Further, when correcting distortion, the image after correction processing is roughly classified and transformed into one of two types of shapes called a pincushion type (see FIG. 9) and a barrel type (see FIG. 10). It is also known.
A digital image captured by the imaging device is generally rectangular. For this reason, for example, as in Patent Document 1 or Patent Document 2, a method of cutting out a rectangular region from an image after distortion correction processing has been studied. This method generally focused on cutting out the largest rectangular area possible from a deformed image after correction processing.
Incidentally, there is a fish-eye lens as one of the lenses that are generally used. Among the fish-eye lenses, particularly when using a lens called a circumferential fish-eye (or all-round fish-eye), the entire imaging surface such as an image sensor is not used as an imaging region, and has a radius from the center. The area within the circle is used as the imaging area. The area outside the circle is recorded as a black area that is an image but does not show the subject.
Even when correcting distortion of an image shot using a circumferential fisheye lens, it is necessary to correct the distortion and cut out the image thereafter. However, as in the conventional case, when the maximum rectangular area that can be cut out from the deformed image is cut out, a part of the circular shooting area may be cut out when the barrel is deformed. Yes (see FIG. 10). In a general lens other than the circumferential fisheye lens, since the entire imaging surface is a shooting area, there is no problem even in the process of cutting out the largest rectangular area inscribed in the barrel-shaped image. On the other hand, when the circumferential fisheye lens is used, the subject is reflected only in the circular area at the center of the imaging surface. For this reason, when the conventional method as described above is used for an image deformed into a barrel shape, there arises a problem that a part of a circular photographing region in which a subject is captured is cut off.

特開2000−106623号公報JP 2000-106623 A 特開2009−38646号公報JP 2009-38646 A

上記実情に鑑み、本発明が解決しようとする課題は、円周魚眼レンズを用いた場合など、撮影領域が画像の全域ではない場合であっても、歪曲収差補正処理後の画像から撮影領域の欠損が少なくなるような矩形領域を算出することである。   In view of the above situation, the problem to be solved by the present invention is that the shooting area is missing from the image after the distortion correction processing even when the shooting area is not the entire area of the image, such as when using a circumferential fisheye lens. Is to calculate a rectangular region that reduces the number of

前記課題を解決するため、本発明の画像処理装置は、画像に歪曲収差補正処理を行う補正手段と、あらかじめ定められた複数の処理方法のうちの1つを、前記画像の撮影条件と前記補正手段による補正条件に応じて選択し、補正処理後の画像から切り出す領域のサイズを算出する算出手段と、を有することを特徴とする。
本発明の画像処理方法は、画像に歪曲収差補正処理を行う補正ステップと、前記補正ステップにおいて補正された画像から切り出す領域を、前記画像の撮影条件と前記補正ステップにおける補正条件によって算出するステップと、を有することを特徴とする。
本発明のプログラムは、コンピュータに、画像に歪曲収差補正処理を行う補正ステップと、前記補正ステップにおいて補正された画像から切り出す領域を、前記画像の撮影条件と前記補正ステップにおける補正条件によって算出するステップと、をコンピュータに実行させることを特徴とする。
In order to solve the above problems, an image processing apparatus according to the present invention includes a correction unit that performs distortion correction processing on an image, and one of a plurality of predetermined processing methods, the image capturing condition and the correction. And calculating means for calculating a size of a region to be cut out from the image after correction processing, which is selected according to the correction condition by the means.
The image processing method of the present invention includes a correction step for performing distortion correction processing on an image, and a step of calculating a region to be cut out from the image corrected in the correction step based on the image capturing condition and the correction condition in the correction step. It is characterized by having.
A program according to the present invention includes a correction step for performing distortion correction processing on an image on a computer, and a step of calculating a region to be cut out from the image corrected in the correction step according to the image capturing condition and the correction condition in the correction step. And making the computer execute.

本発明によれば、画像の撮影に用いられたレンズや補正条件によらず、補正処理後の画像から撮影領域が極力含まれるような矩形の領域を決定することができる。したがって、切出された領域の画像において、撮影領域が欠損することを防止または抑制できる。   According to the present invention, it is possible to determine a rectangular region that includes a photographing region as much as possible from an image after correction processing, regardless of the lens used for photographing the image and the correction conditions. Therefore, it is possible to prevent or suppress the shooting area from being lost in the image of the clipped area.

図1は、本発明の第1実施形態にかかる画像処理装置の構成の一例を示すブロック図である。FIG. 1 is a block diagram showing an example of the configuration of the image processing apparatus according to the first embodiment of the present invention. 図2は、撮影条件の判定と、歪曲収差補正処理と、切出し処理との一連の流れを示すフローチャートである。FIG. 2 is a flowchart showing a series of flows of determination of imaging conditions, distortion correction processing, and clipping processing. 図3は、図2のステップS202とS203における歪曲収差補正処理を示すフローチャートである。FIG. 3 is a flowchart showing the distortion correction processing in steps S202 and S203 of FIG. 図4は、補正処理後の画像の切出し領域のサイズを算出する処理を示すフローチャートである。FIG. 4 is a flowchart showing a process for calculating the size of the cutout area of the image after the correction process. 図5は、図4のサブプロセスAの内容を示すフローチャートである。FIG. 5 is a flowchart showing the contents of sub-process A in FIG. 図6は、元画像と撮影領域と切り出し領域の関係を模式的に示す図である。FIG. 6 is a diagram schematically illustrating the relationship among the original image, the imaging region, and the cutout region. 図7(a)は、糸巻型の変形が生じる場合の変換テーブルの例を示す図であり、図7(b)は、図7(a)に示す変換テーブルをグラフに示した図である。FIG. 7A is a diagram showing an example of a conversion table when a pincushion type deformation occurs, and FIG. 7B is a graph showing the conversion table shown in FIG. 7A. 図8(a)は、樽型の変形が生じる場合の変換テーブルの例を示す図であり、図8(b)は、図8(a)の変換テーブルをグラフ化した図である。FIG. 8A is a diagram illustrating an example of a conversion table when barrel-shaped deformation occurs, and FIG. 8B is a graph of the conversion table of FIG. 8A. 糸巻き型の変形の例を模式的に示す図である。It is a figure which shows typically the example of a deformation | transformation of a pincushion type | mold. 樽型の変形の例を模式的に示す図である。It is a figure which shows typically the example of a barrel-shaped deformation | transformation.

以下に、本発明の好ましい実施の形態を、添付の図面に基づいて詳細に説明する。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

(第1実施形態)
まず、図1を参照して、本発明の第1実施形態にかかる画像処理装置1の概略構成について説明する。図1は、本発明の第1実施形態にかかる画像処理装置1の構成の一例を示すブロック図である。画像処理装置1は、入力部101と、補正部102と、算出部103と、出力部104とを有する。
入力部101には、外部から画像(画像データ)が入力される。
補正部102は、入力部101から入力された画像に対して、歪曲収差補正処理を実行する。説明の便宜上、補正部102により歪曲収差補正処理が実行される前の画像を「元画像」と称し、補正された画像を「補正処理後の画像」と称することがある。
算出部103は、補正処理後の画像から切り出す矩形領域のサイズを算出する。説明の便宜上、補正処理後の画像から切り出す矩形領域を「切出し領域」と称する。切出し領域のサイズの算出のため、撮影条件に応じた複数の処理方法が予め定められている。そして、算出部103は、複数の処理方法から一つの処理方法を選択し、選択した当該一つの処理方法を用いて切出し領域のサイズを算出する。さらに、算出部103は、切出し領域の算出結果を用いて、補正処理後の画像から切り出し領域を切り出す。説明の便宜上、画像を切り出す処理を「切出し処理」と称する。
出力部104は、算出部103が切出した領域の画像を出力する。
(First embodiment)
First, a schematic configuration of an image processing apparatus 1 according to the first embodiment of the present invention will be described with reference to FIG. FIG. 1 is a block diagram showing an example of the configuration of the image processing apparatus 1 according to the first embodiment of the present invention. The image processing apparatus 1 includes an input unit 101, a correction unit 102, a calculation unit 103, and an output unit 104.
An image (image data) is input to the input unit 101 from the outside.
The correction unit 102 performs distortion correction processing on the image input from the input unit 101. For convenience of explanation, an image before distortion correction processing is performed by the correction unit 102 may be referred to as an “original image”, and a corrected image may be referred to as an “image after correction processing”.
The calculation unit 103 calculates the size of a rectangular area cut out from the image after correction processing. For convenience of explanation, a rectangular area cut out from an image after correction processing is referred to as a “cutout area”. In order to calculate the size of the cut-out area, a plurality of processing methods corresponding to shooting conditions are determined in advance. Then, the calculation unit 103 selects one processing method from the plurality of processing methods, and calculates the size of the cutout region using the selected one processing method. Furthermore, the calculation unit 103 uses the calculation result of the cutout region to cut out the cutout region from the corrected image. For convenience of explanation, the process of cutting out an image is referred to as “cutout process”.
The output unit 104 outputs an image of the area cut out by the calculation unit 103.

次に、本実施形態にかかる処理フローについて説明する。本実施形態では、通常と異なる撮影条件として、円周魚眼レンズを用いた撮影を挙げる。図2は、撮影条件の判定と、歪曲収差補正処理と、切出し処理との一連の流れを示すフローチャートである。   Next, a processing flow according to the present embodiment will be described. In the present embodiment, photographing using a circumferential fisheye lens is given as an unusual photographing condition. FIG. 2 is a flowchart showing a series of flows of determination of imaging conditions, distortion correction processing, and clipping processing.

ステップS201において、算出部103は、入力部101に入力された画像(元画像)の撮影条件を確認し、この画像が円周魚眼レンズを用いて撮影された画像であるかどうかを判定する。この画像が円周魚眼レンズを用いて撮影された画像であればステップS202に進み、そうでなければステップS203に進む。   In step S201, the calculation unit 103 checks the shooting conditions of the image (original image) input to the input unit 101, and determines whether this image is an image shot using a circumferential fisheye lens. If this image is an image taken using a circumferential fisheye lens, the process proceeds to step S202; otherwise, the process proceeds to step S203.

ステップS203においては、補正部102は、入力部101に入力された画像に対して、通常の歪曲収差補正処理を実行する。ここでは、変換テーブルを用いて補正前画像の画素の座標を変換するという、従来一般の歪曲収差補正処理が適用できる。   In step S <b> 203, the correction unit 102 performs normal distortion correction processing on the image input to the input unit 101. Here, a conventional general distortion correction process of converting the pixel coordinates of the image before correction using the conversion table can be applied.

ステップS202においては、補正部102は、入力部101に入力された画像に対して、円周魚眼レンズを用いて撮影された画像用の歪曲収差補正処理(以下、「円周魚眼用の歪曲収差補正処理」と称する)を実行する。なお、円周魚眼用の歪曲収差補正処理の内容は、通常の歪曲収差補正処理と同じであってもよい。ただし、円周魚眼用の歪曲収差補正処理においては、特別の注意を要することがある。
具体的な次のとおりである。円周魚眼レンズの円形の露光領域(イメージサークルと称することもある)は、撮像装置のセンサの矩形の撮像面(結像した光学像を画像データに変換できる面をいう)よりも小さい。このため、円周魚眼レンズを用いて撮影された画像は、矩形の画像の中央に、被写体が写っている円形の領域が存在する。この領域を「撮影領域」と称する。撮影領域は、レンズの露光領域が投影される領域である。そして、撮影領域の外側の領域は黒色の領域となる。
このように、全周魚眼レンズを用いて撮影された画像は、その全域が撮影領域となるわけではなく、画像には撮影領域ではない領域が含まれる。
黒色の領域は、通常は撮影領域外であるため、設計上、変換テーブルが存在しないことがある。しかしながら、何の補正も行わないと、画像内の連続性が保持できないことがある。また、黒色の領域にも、通常のノイズなどといった、ユーザが意識していない情報が存在している場合がある。このように、歪曲収差補正処理においては、この黒色の領域の扱いに特別の注意を要する。
そこで、本実施形態においては、円周魚眼用の歪曲収差補正処理を、通常の歪曲収差補正処理とは別の処理とする。たとえば、補正部102は、撮影領域の中心から円形の領域の外縁にかけて使用した変換テーブルの補正量を、その傾向を維持したまま仮想的に使用する。
In step S <b> 202, the correction unit 102 performs distortion correction processing for an image captured using a circumferential fisheye lens (hereinafter referred to as “distortion aberration for circumferential fisheye” on the image input to the input unit 101. (Referred to as “correction processing”). Note that the content of the distortion correction processing for the circular fisheye may be the same as the normal distortion correction processing. However, special attention may be required in the distortion correction processing for the circumferential fisheye.
The specific is as follows. The circular exposure area (sometimes referred to as an image circle) of the circumferential fisheye lens is smaller than the rectangular imaging surface of the sensor of the imaging device (referred to as a surface that can convert the formed optical image into image data). For this reason, an image photographed using a circumferential fisheye lens has a circular area in which the subject appears in the center of the rectangular image. This area is referred to as a “photographing area”. The imaging area is an area where the exposure area of the lens is projected. The area outside the shooting area is a black area.
As described above, the image captured using the all-around fisheye lens does not have the entire imaging region, and the image includes a region that is not the imaging region.
Since the black area is usually outside the imaging area, there may be no conversion table by design. However, if no correction is performed, continuity within the image may not be maintained. In addition, there are cases where information that the user is not conscious of, such as normal noise, also exists in the black area. As described above, in the distortion correction processing, special attention is required for handling the black region.
Therefore, in the present embodiment, the distortion correction process for the circumferential fisheye is a process different from the normal distortion correction process. For example, the correction unit 102 virtually uses the correction amount of the conversion table used from the center of the imaging region to the outer edge of the circular region while maintaining the tendency.

ステップS204においては、算出部103は、歪曲収差補正処理により画像が樽型に変形するかどうかを判定する。前記のとおり、歪曲収差補正処理の条件(補正条件)によって、補正処理後の画像が樽型または糸巻型に変形する。画像が樽型に変形する補正条件である場合にはステップS206に進み、そうでない場合にはステップS205に進む。   In step S204, the calculation unit 103 determines whether the image is deformed into a barrel shape by the distortion correction process. As described above, the image after the correction processing is deformed into a barrel shape or a pincushion shape depending on the distortion aberration correction processing conditions (correction conditions). If the correction condition is such that the image is deformed into a barrel shape, the process proceeds to step S206; otherwise, the process proceeds to step S205.

ステップS205においては、算出部103は、複数の処理方法から、補正処理後の画像に内接する最大の矩形の領域を切り出す切出し処理を選択する。すなわち、撮影時の画像の一部が切り捨てられる切り出し処理を選択する。そして、算出部103は、選択した処理方法を用いて切出し処理を実行する。   In step S205, the calculation unit 103 selects, from a plurality of processing methods, a clipping process that cuts out the largest rectangular area that is inscribed in the corrected image. That is, a clipping process is selected in which a part of the image at the time of shooting is cut off. Then, the calculation unit 103 executes the clipping process using the selected processing method.

ステップS206においては、算出部103は、複数の処理方法から、撮影領域の全域を含むように矩形の領域を切り出す切出し処理を選択する。そして、算出部103は、選択した処理方法を用いて切出し処理を実行する。   In step S <b> 206, the calculation unit 103 selects a clipping process for cutting out a rectangular area so as to include the entire imaging area from a plurality of processing methods. Then, the calculation unit 103 executes the clipping process using the selected processing method.

ステップS208においては、算出部103は、切出し画像の撮影領域の外側の領域を黒く塗りつぶす処理を実行する。   In step S <b> 208, the calculation unit 103 executes a process of blackening the area outside the shooting area of the cut image.

ステップS207において、出力部104は、切り出した領域の画像を出力する。   In step S207, the output unit 104 outputs an image of the clipped area.

このように、あらかじめ、切出し処理のための複数の処理方法が定められている。複数の処理方法には、少なくとも次の2つが含まれる。(1)補正処理後の画像に内接する最大の矩形の領域を切り出す処理方法。(2)補正処理後の画像に含まれる撮影領域の全域を含むように矩形の領域を切り出す処理方法。(2)の処理方法には、補正条件に応じてさらに複数の処理方法が含まれる。そして、算出部103は、画像の撮影条件と補正条件に応じて、複数の処理方法から1つを選択し、選択した処理方法を用いて切出し処理を実行する。なお、(1)の処理方法には、従来公知の処理方法が適用できる。(2)の処理方法の詳細については後述する。   As described above, a plurality of processing methods for the cutting process are determined in advance. The plurality of processing methods include at least the following two. (1) A processing method of cutting out the maximum rectangular area inscribed in the corrected image. (2) A processing method of cutting out a rectangular area so as to include the entire photographing area included in the corrected image. The processing method (2) further includes a plurality of processing methods according to the correction conditions. Then, the calculation unit 103 selects one of a plurality of processing methods according to the image capturing condition and the correction condition, and executes a clipping process using the selected processing method. A conventionally known processing method can be applied to the processing method (1). Details of the processing method (2) will be described later.

次に、歪曲収差補正処理について、図3を参照して説明する。図3は、図2のステップS202とS203における歪曲収差補正処理を示すフローチャートである。
歪曲収差補正処理は、上で説明したように通常の場合と、円周魚眼レンズの場合とで異なる部分はあるが、ここでは、共通する処理について説明する。
Next, distortion correction processing will be described with reference to FIG. FIG. 3 is a flowchart showing the distortion correction processing in steps S202 and S203 of FIG.
As described above, the distortion correction processing differs between the normal case and the case of the circumferential fisheye lens, but here, common processing will be described.

ステップS301において、補正部102は、元画像の先頭画素を選択する。
ステップS302においては、補正部102は、撮影領域の中心から選択した画素までの距離を算出する。
ステップS303においては、補正部102は、選択した画素の補正処理後における撮影領域の中心からの距離を算出する。
ステップS304においては、補正部102は、算出した距離から選択した画素の補正処理後の座標を算出する。
ステップS305においては、補正部102は、算出した座標を、選択した画素の補正処理後の座標として記録する。
ステップS306においては、補正部102は、ステップS302〜S305の処理が行われた画素が最後の画素であるかどうかを判定する。最後の画素でない場合にはステップS307に進み、最後の画素である場合にはステップS308に進む。
ステップS307においては、補正部102は、次の画素を補正対象の画素として選択する。そしてステップS302に進み、ステップS302以下の処理を繰り返す。これにより、補正部102は、元画像に含まれる全ての画素について、ステップS302〜S305の処理を実行する。
ステップS308においては、全ての画素について上記処理が終了したため、補正部102は、補正した画像を算出部103に出力する。
In step S301, the correction unit 102 selects the first pixel of the original image.
In step S302, the correction unit 102 calculates the distance from the center of the shooting area to the selected pixel.
In step S303, the correction unit 102 calculates the distance from the center of the imaging region after the correction process of the selected pixel.
In step S304, the correction unit 102 calculates coordinates after correction processing of the selected pixel from the calculated distance.
In step S305, the correction unit 102 records the calculated coordinates as coordinates after the correction processing of the selected pixel.
In step S306, the correction unit 102 determines whether the pixel on which the processing in steps S302 to S305 has been performed is the last pixel. If it is not the last pixel, the process proceeds to step S307, and if it is the last pixel, the process proceeds to step S308.
In step S307, the correction unit 102 selects the next pixel as a correction target pixel. Then, the process proceeds to step S302, and the processes after step S302 are repeated. As a result, the correction unit 102 executes the processes of steps S302 to S305 for all the pixels included in the original image.
In step S <b> 308, since the above processing has been completed for all pixels, the correction unit 102 outputs the corrected image to the calculation unit 103.

次に、図4〜図6を参照して、切出し領域のサイズを算出する処理について説明する。図4は、補正処理後の画像の切出し領域のサイズを算出する処理を示すフローチャートである。図5は、図4のサブプロセスAの内容を示すフローチャートである。図6は、元画像と撮影領域と切り出し領域の関係を模式的に示す図である。算出部103は、切出し領域のサイズの算出を、元画像と変換テーブルとを用いて行う。   Next, processing for calculating the size of the cutout area will be described with reference to FIGS. FIG. 4 is a flowchart showing a process for calculating the size of the cutout area of the image after the correction process. FIG. 5 is a flowchart showing the contents of sub-process A in FIG. FIG. 6 is a diagram schematically illustrating the relationship among the original image, the imaging region, and the cutout region. The calculation unit 103 calculates the size of the cutout area using the original image and the conversion table.

ステップS401〜S406において、算出部103は、元画像の左上の画素と、上辺中点の画素と、左辺中点の画素とを選択し、選択した画素のそれぞれについて、サブプロセスAを実行する。なお、前記の選択される画素は一例であり、他の画素が選択されてもよい。たとえば、左上の画素ではなく、元画像の左上以外の四隅に位置する画素であってもよい。また、上辺中点の画素ではなく下辺中点の画素であってもよい。さらに、左辺中点の画素ではなく、右辺中点の画素であってもよい。   In steps S <b> 401 to S <b> 406, the calculation unit 103 selects the upper left pixel, upper middle pixel, and left middle pixel of the original image, and executes the sub-process A for each of the selected pixels. Note that the selected pixel is an example, and another pixel may be selected. For example, pixels located at four corners other than the upper left of the original image may be used instead of the upper left pixel. Further, it may be a pixel at the middle point of the lower side instead of a pixel at the middle point of the upper side. Further, it may be a pixel at the midpoint of the right side instead of a pixel at the midpoint of the left side.

ここで、サブプロセスAについて、図5を参照して説明する。
ステップS501において、算出部103は、選択したそれぞれの画素の撮影領域の中心からの距離を算出する。
ステップS502において、算出部103は、変換テーブルを用いて、選択したそれぞれの画素の補正処理後における座標を算出する。
ステップS503において、算出部103は、算出した座標を用いて、選択したそれぞれの画素の補正処理後における撮影領域の中心からの縦方向と横方向の距離を算出する。
ステップS504において、算出部103は、算出した縦方向と横方向の距離を返す。
そして、図4のステップS407に進む。
Here, the sub-process A will be described with reference to FIG.
In step S501, the calculation unit 103 calculates the distance from the center of the shooting area of each selected pixel.
In step S502, the calculation unit 103 uses the conversion table to calculate coordinates after correction processing of each selected pixel.
In step S <b> 503, the calculation unit 103 calculates the vertical and horizontal distances from the center of the imaging region after the correction processing of each selected pixel using the calculated coordinates.
In step S504, the calculation unit 103 returns the calculated distance between the vertical direction and the horizontal direction.
Then, the process proceeds to step S407 in FIG.

ステップS407においては、算出部103は、画像の左辺が短辺であるかどうかを判定する。左辺が短辺である場合には、画像が横長である。この場合には、ステップS408に進む。一方、左辺が短辺でない場合には、画像が縦長である。この場合には、ステップS412に進む。   In step S407, the calculation unit 103 determines whether the left side of the image is a short side. When the left side is a short side, the image is horizontally long. In this case, the process proceeds to step S408. On the other hand, when the left side is not a short side, the image is vertically long. In this case, the process proceeds to step S412.

ステップS408においては、算出部103は、撮影領域の中心から補正処理後における上辺中点の画素までの縦方向の距離の2倍の寸法を、切出し領域の縦方向のサイズに設定する。この距離は、ステップS404のサブプロセスAにおいて算出される。
図10に示すように、従来の方法では、樽型に変形した補正処理後の画像Qから内接する最大の矩形の領域Pを切り出すと、円形の撮影領域Rの上下の部分S(ハッチングが施された領域)が欠損することがある。
これに対して、本発明の実施形態では、図6に示すように、切出し領域Dの縦方向のサイズは、円形の撮影領域Cと同じかそれより大きくなる。したがって、円形の撮影領域Cの上下の部分に欠損が生じないようにできる。
In step S <b> 408, the calculation unit 103 sets a size that is twice the vertical distance from the center of the imaging region to the upper-side midpoint pixel after the correction processing as the vertical size of the cut-out region. This distance is calculated in sub-process A of step S404.
As shown in FIG. 10, in the conventional method, when the largest rectangular area P that is inscribed is cut out from the corrected image Q transformed into a barrel shape, the upper and lower portions S (hatching is performed on the circular imaging area R). Area) may be lost.
On the other hand, in the embodiment of the present invention, as shown in FIG. 6, the vertical size of the cutout area D is the same as or larger than the circular imaging area C. Accordingly, it is possible to prevent a defect from occurring in the upper and lower portions of the circular imaging region C.

ステップS409において、算出部103は、補正処理後の左上の画素と補正処理後の左辺中点の画素について、撮影領域の中心からの横方向の距離を比較する。これらの距離はステップS402とS406のサブプロセスAにおいて算出される。
補正処理後の左上の画素の撮影領域の中心からの横方向距離が、補正処理後の左辺中点の画素の当該距離よりも大きい場合には、ステップS410に進む。一方、補正処理後の左上の画素の撮影領域の中心からの横方向距離が、補正処理後の左辺中点の画素の当該距離よりも小さい場合には、ステップS411に進む。
In step S409, the calculation unit 103 compares the horizontal distance from the center of the imaging region with respect to the pixel on the upper left after the correction processing and the pixel at the midpoint on the left side after the correction processing. These distances are calculated in sub-process A in steps S402 and S406.
If the lateral distance from the center of the imaging region of the upper left pixel after the correction process is larger than the distance of the pixel at the midpoint of the left side after the correction process, the process proceeds to step S410. On the other hand, when the lateral distance from the center of the imaging region of the upper left pixel after the correction process is smaller than the distance of the pixel at the midpoint of the left side after the correction process, the process proceeds to step S411.

ステップS410において、算出部103は、補正処理後における左辺中点の画素の撮影領域の中心からの横方向距離の2倍の寸法を、切出し領域の横方向のサイズに設定する。
ステップS411において、算出部103は、補正処理後における左上の画素の撮影領域の中心からの横方向距離の2倍の寸法を、切出し領域の横方向のサイズに設定する。
In step S410, the calculation unit 103 sets a size that is twice the horizontal distance from the center of the shooting area of the pixel at the left-side midpoint after the correction process to the horizontal size of the cut-out area.
In step S411, the calculation unit 103 sets a size that is twice the horizontal distance from the center of the imaging region of the upper left pixel after the correction process to the horizontal size of the cutout region.

一方、ステップS407において左辺が短辺でなく、画像が縦長である場合には、円形の撮影領域のうちで左右にのみ欠損が生じうる。すなわち、図10を左右いずれかに90度回転させた状態となる。この場合には、ステップS412に進む。ステップS412〜S415の処理は、ステップS408〜S411の処理において、画像の縦方向と横方向とを入れ替えた内容の処理である。具体的には、次のとおりである。
ステップS412においては、算出部103は、撮影領域の中心から補正処理後の左辺中点の画素までの横方向の距離の2倍の寸法を、切出し領域の横方向のサイズに設定する。前記のとおり、画像が縦長である場合には、円形の撮影領域のうちで左右にのみ欠損が生じうる。そこで、切出し領域の横方向のサイズを前記のように設定することにより、円形の撮影領域の左右に欠損が生じないようにできる。
ステップS413において、算出部103は、補正処理後の左上の画素と補正処理後の上辺中点の画素について、撮影領域の中心からの縦方向の距離を比較する。補正処理後の左上の画素の撮影領域の中心からの縦方向の距離が、補正処理後の上辺中点の画素の当該距離よりも大きい場合には、ステップS414に進む。一方、補正処理後の左上の画素の撮影領域の中心からの縦方向距離が、補正処理後の上辺中点の画素の当該距離よりも小さい場合には、ステップS415に進む。
ステップS414において、算出部103は、補正処理後における上辺中点の画素の撮影領域の中心からの縦方向の距離の2倍の寸法を、切出し領域の縦方向のサイズに設定する。
ステップS411において、算出部103は、補正処理後における左上の画素の撮影領域の中心からの縦方向距離の2倍の寸法を、切出し領域の縦方向のサイズに設定する。
On the other hand, if the left side is not a short side and the image is vertically long in step S407, a defect may occur only on the left and right of the circular shooting area. That is, FIG. 10 is rotated 90 degrees left or right. In this case, the process proceeds to step S412. The processing of steps S412 to S415 is processing of the content in which the vertical direction and the horizontal direction of the image are interchanged in the processing of steps S408 to S411. Specifically, it is as follows.
In step S412, the calculation unit 103 sets a size that is twice the horizontal distance from the center of the shooting area to the pixel at the midpoint of the left side after the correction process as the horizontal size of the cut-out area. As described above, when the image is vertically long, a defect may occur only on the left and right in the circular imaging region. Therefore, by setting the horizontal size of the cutout region as described above, it is possible to prevent a defect from being generated on the left and right of the circular imaging region.
In step S413, the calculation unit 103 compares the vertical distance from the center of the imaging region for the upper left pixel after the correction process and the pixel of the upper side midpoint after the correction process. If the vertical distance from the center of the shooting area of the upper left pixel after the correction process is greater than the distance of the upper middle point pixel after the correction process, the process proceeds to step S414. On the other hand, if the vertical distance from the center of the shooting area of the upper left pixel after the correction process is smaller than the distance of the pixel at the upper middle point after the correction process, the process proceeds to step S415.
In step S414, the calculation unit 103 sets a size that is twice the vertical distance from the center of the imaging region of the upper-side midpoint pixel after the correction processing to the vertical size of the cut-out region.
In step S411, the calculation unit 103 sets a size that is twice the vertical distance from the center of the imaging region of the upper left pixel after the correction process to the vertical size of the cutout region.

ステップS416において、算出部103は、設定した縦横それぞれのサイズで、補正処理後の画像Bから切出し領域Dを切り出す。図6において、ハッチングが施された領域Eは、元画像には存在しない領域である。このように、算出部103は、切出し領域Dに、元画像には存在しない領域を付加する。なお、元画像における撮影領域Cの外側の領域は、円周魚眼レンズを用いて撮影された画像であれば、黒色となる。そこで、算出部103は、追加された領域Eを黒色で塗り潰す処理を行う。これにより、切り出された画像が不自然にならないようにできる。   In step S416, the calculation unit 103 cuts out the cutout region D from the image B after the correction processing with the set vertical and horizontal sizes. In FIG. 6, a hatched region E is a region that does not exist in the original image. Thus, the calculation unit 103 adds an area that does not exist in the original image to the cutout area D. Note that the area outside the shooting area C in the original image is black if the image is shot using a circumferential fisheye lens. Therefore, the calculation unit 103 performs a process of filling the added area E with black. Thereby, it is possible to prevent the cut image from becoming unnatural.

なお、切出し領域のサイズの算出には、次のような方法も適用できる。
算出部103は、画像の撮影に用いられたセンサとレンズの情報を取得する。センサに関する情報には撮像面のサイズに関する情報が含まれる。レンズに関する情報には、撮影領域(イメージサークル)のサイズが含まれる。なお、画像処理装置1が、撮像装置のセンサに関する情報と、各種レンズの撮影領域に関する情報を保持している構成であってもよい。この場合には、算出部103は、撮像装置の型式(型番)や、画像の撮影に使用されたレンズの型式(型番)などの情報を取得し、当該撮像装置とレンズに対応する情報を読み出して切出し処理に用いる。また、撮像に用いられたレンズが倍率変更可能なズームレンズである場合には、倍率によって露光領域のサイズが変わることがあるため、算出部103は、レンズの倍率に関する情報も取得する。
次いで算出部103は、センサの撮像面のサイズとレンズの露光領域のサイズとから、撮影された画像(元画像)に含まれる撮影領域の位置およびサイズを判定する。
次いで算出部は、補正処理後の画像における撮影領域の外縁の位置を算出し、算出結果に基づいて、さらに補正処理後の画像における撮影領域の全体が含まれる矩形の領域を算出する。このようにして算出された矩形の領域が、切出し領域となる。
次いで算出部103は、算出した切出し領域を補正処理後の画像から切り出す。
The following method can also be applied to calculate the size of the cutout area.
The calculation unit 103 acquires information on the sensor and lens used to capture the image. The information regarding the sensor includes information regarding the size of the imaging surface. The information about the lens includes the size of the shooting area (image circle). Note that the image processing apparatus 1 may be configured to hold information related to sensors of the imaging apparatus and information related to imaging areas of various lenses. In this case, the calculation unit 103 acquires information such as the model (model number) of the imaging device and the model (model number) of the lens used to capture the image, and reads information corresponding to the imaging device and the lens. Used for cutting out. When the lens used for imaging is a zoom lens whose magnification can be changed, the size of the exposure region may change depending on the magnification. Therefore, the calculation unit 103 also acquires information on the magnification of the lens.
Next, the calculation unit 103 determines the position and size of the shooting area included in the shot image (original image) from the size of the imaging surface of the sensor and the size of the exposure area of the lens.
Next, the calculation unit calculates the position of the outer edge of the shooting area in the image after the correction process, and further calculates a rectangular area including the entire shooting area in the image after the correction process based on the calculation result. The rectangular area calculated in this way becomes a cutout area.
Next, the calculation unit 103 cuts out the calculated cutout region from the image after the correction process.

さらに、画像処理装置1は、図4と図5に示す処理と、前述の撮影領域のサイズの算出結果を用いる処理とを合せて用いてもよい。
例えば、算出部103は、図4と図5に示す処理と、前述の撮影領域のサイズの算出結果を用いる処理とによって、切出し領域のサイズを算出する。そして、算出部103は、図4と図5に示す処理によって算出した切出し領域のサイズと、前述の撮影領域のサイズを用いて算出した切出し領域のサイズとを比較する。そして、算出部103は、サイズの大きい方を、最終的な切出しサイズに決定する。その後、算出部103は、決定した切出し領域のサイズを用いて、補正処理後の画像に対して切出し処理を実行する。
または、算出部103は、比較の結果、図4と図5に示す処理によって算出した切出し領域のサイズが、前述の撮影領域のサイズを用いて算出した切出し領域のサイズより小さい場合には、図4と図5に示す処理によって算出した切出し領域のサイズを拡大する。次いで、算出部103は、再びサイズを比較する。そして、算出部103は、図4と図5に示す処理によって算出した切出し領域のサイズが、前述の撮影領域のサイズを用いて算出した切出し領域のサイズ以上になった場合には、拡大した切出し領域のサイズを、最終的な切出し領域のサイズに決定する。
Furthermore, the image processing apparatus 1 may use the processing shown in FIGS. 4 and 5 together with the processing using the above-described calculation result of the size of the imaging region.
For example, the calculation unit 103 calculates the size of the cutout region by the processing illustrated in FIGS. 4 and 5 and the processing using the above-described calculation result of the size of the imaging region. Then, the calculation unit 103 compares the size of the cut-out area calculated by the processes shown in FIGS. 4 and 5 with the size of the cut-out area calculated using the above-described shooting area size. Then, the calculation unit 103 determines the larger cutout size as the final cutout size. Thereafter, the calculation unit 103 performs a clipping process on the corrected image using the determined size of the clipping region.
Alternatively, as a result of the comparison, if the size of the cutout area calculated by the processing shown in FIGS. 4 and 5 is smaller than the size of the cutout area calculated using the above-described shooting area size, 4 and the size of the cutout area calculated by the processing shown in FIG. Next, the calculation unit 103 compares the sizes again. When the size of the cutout area calculated by the processing shown in FIGS. 4 and 5 is equal to or larger than the size of the cutout area calculated using the above-described shooting area size, the calculation unit 103 enlarges the cutout area. The size of the area is determined as the size of the final cut-out area.

次に、歪曲収差補正処理で用いられる変換テーブルについて、図7と図8を参照して説明する。
図7(a)は、糸巻型の変形が生じる場合の変換テーブルの例を示す。図7(a)に示すように、変換テーブルは、センサ上におけるサイズとして、撮影領域の中心からの距離の射影を離散的に有している。そして、実際には、補正部102は、このテーブルに規定される値を補間して用いる。なお、補正の精度を高めるためには、変換テーブルがより多くの射影を有していることが好ましい。図7(b)は、図7(a)に示す変換テーブルをグラフに示した図である。図7(b)に示すように、撮影領域の周辺に近づくにしたがって、変化量が大きくなる。これは、補正により画像が糸巻型に変形する場合の変換テーブルの特徴である。
図8(a)は、樽型の変形が生じる場合の変換テーブルの例を示す。図8(b)は、図8(a)の変換テーブルをグラフ化した図である。図8(b)に示すように、樽型の変形が生じる場合の変換テーブルは、撮影領域の周辺に近づくにしたがって、変化量が小さくなる傾向を有する。
前記のとおり、歪曲収差補正処理による画像の変形は、大きく分類すると、糸巻型と樽型の2種類に分類される。このため、変換テーブルも大きく分類して前記の2種類に分類できる。
Next, a conversion table used in the distortion correction process will be described with reference to FIGS.
FIG. 7A shows an example of a conversion table when a pincushion type deformation occurs. As shown in FIG. 7A, the conversion table has discrete projections of distances from the center of the imaging region as the size on the sensor. In practice, the correction unit 102 interpolates and uses the values defined in this table. In order to increase the accuracy of correction, it is preferable that the conversion table has more projections. FIG. 7B is a graph showing the conversion table shown in FIG. As shown in FIG. 7B, the amount of change increases as the area approaches the periphery of the imaging region. This is a feature of the conversion table when the image is transformed into a pincushion type by correction.
FIG. 8A shows an example of a conversion table when barrel-shaped deformation occurs. FIG. 8B is a graph showing the conversion table of FIG. As shown in FIG. 8B, the conversion table in the case of barrel-shaped deformation has a tendency for the amount of change to decrease as it approaches the periphery of the imaging region.
As described above, image deformation by distortion correction processing is roughly classified into two types: pincushion type and barrel type. For this reason, the conversion table can also be broadly classified into the above two types.

以上説明したとおり、本発明の実施形態によれば、円周魚眼レンズを用いて撮影された画像に歪曲収差補正を施した場合であっても、それ以外の場合であっても、撮像領域が極力切出し領域に含まれるように、切り出し領域のサイズを算出できる。   As described above, according to the embodiment of the present invention, the imaging region is as much as possible regardless of whether or not distortion correction is performed on an image captured using a circumferential fisheye lens. The size of the cutout area can be calculated so as to be included in the cutout area.

(第2実施形態)
前記第1実施形態においては、円周魚眼レンズを用いて撮影された画像に対する処理を例に示して説明したが、本発明は、このような構成に限定されない。本発明は、たとえば、所定のサイズのセンサを有する撮像装置に、当該所定のサイズとは異なるセンサを有する撮像装置用のレンズを装着して撮影した画像に対しても適用できる。
たとえば、撮像面のサイズが36mm×24mmのセンサ(以下、「36mmセンサ」と称する)を有する撮像装置に、それよりも小さいサイズのセンサ用のレンズを装着して撮影することがある。このような組み合わせでは、レンズの露光領域が36mmセンサの撮像面よりも小さくなることがある。この場合には、レンズの露光領域のサイズとセンサの撮像面のサイズとがあらかじめ明らかであれば、算出部103は、切り出し領域のサイズを算出できる。例えば36mmセンサの全域に露光するためには、露光領域が半径21.635mm以上の円形の領域のレンズが必要である。これに対し、撮像面のサイズが24mm×16mmのセンサ(以下、「24mmセンサ」と称する)用のレンズでは、露光領域の半径が14.42mmであると仮定できる。
そこで、算出部103は、36mmセンサを有する撮像装置に24mmセンサ用のレンズが装着されたことを撮影条件から判定できた場合には、次のように処理を行う。すなわち、算出部103は、センサの撮影面のうち、半径が14.42mmの円の内側の領域、またはこの円に内接する矩形の領域が撮影領域であると判定する。そして、算出部103は、この円の内側の領域またはこの円に内接する矩形の領域を、実施例1と同様の処理によって切り出し領域として算出することができる。このように、実施例1に示した円周魚眼レンズの例とは異なるが、画像処理装置1は、センササイズがレンズと異なる場合においても、算出処理の内容を切り替えることが可能である。
また、これらは、撮影条件が決定されれば一意に決まるものであるが、撮影条件に応じて複数の処理方法(切出し領域のサイズの算出のアルゴリズム)を選択的に利用すべきものである。
(Second Embodiment)
In the first embodiment, the processing for an image photographed using the circumferential fisheye lens has been described as an example, but the present invention is not limited to such a configuration. The present invention can also be applied to, for example, an image captured by mounting an imaging device lens having a sensor different from the predetermined size on an imaging device having a sensor of a predetermined size.
For example, an image pickup apparatus having a sensor having an image pickup surface size of 36 mm × 24 mm (hereinafter referred to as “36 mm sensor”) may be photographed with a sensor lens having a smaller size attached thereto. In such a combination, the exposure area of the lens may be smaller than the imaging surface of the 36 mm sensor. In this case, if the size of the exposure area of the lens and the size of the imaging surface of the sensor are known in advance, the calculation unit 103 can calculate the size of the cutout area. For example, in order to expose the entire area of the 36 mm sensor, a lens having a circular area with a radius of 21.635 mm or more is necessary. On the other hand, in a lens for a sensor having an imaging surface size of 24 mm × 16 mm (hereinafter referred to as “24 mm sensor”), it can be assumed that the radius of the exposure region is 14.42 mm.
Therefore, the calculation unit 103 performs the following process when it can be determined from the shooting conditions that the lens for the 24 mm sensor is attached to the imaging apparatus having the 36 mm sensor. That is, the calculation unit 103 determines that a region inside the circle having a radius of 14.42 mm or a rectangular region inscribed in the circle is a photographing region on the photographing surface of the sensor. Then, the calculation unit 103 can calculate a region inside this circle or a rectangular region inscribed in this circle as a cutout region by the same processing as in the first embodiment. As described above, although different from the example of the circumferential fisheye lens shown in the first embodiment, the image processing apparatus 1 can switch the content of the calculation process even when the sensor size is different from that of the lens.
These are uniquely determined when the shooting conditions are determined, but a plurality of processing methods (algorithms for calculating the size of the cutout area) should be selectively used according to the shooting conditions.

ここで、本発明の実施形態にかかる画像処理装置1のハードウェア構成について簡単に説明する。本発明の実施形態にかかる画像処理装置1は、CPUとRAMとROMと外部とデータの送受信を行うインターフェースとを有するコンピュータである。さらに、本発明の実施形態にかかる画像処理装置1は、外部から入力された画像や補正処理を施した画像を格納できる記憶デバイスや、このような記憶デバイスを接続できるインターフェースを有していてもよい。記憶デバイスとしては、たとえば、HDDやSSDなどが適用できる。そして、歪曲収差補正処理と切出し処理を実行するためのコンピュータプログラム(コンピュータソフトウェア)はあらかじめROMに格納されている。さらに、ROMには、外部から画像を入力する処理を実行するためのコンピュータプログラムと、切出した領域の画像を外部に出力する処理を実行するためのプログラムとが格納される。
CPUは、ROMに格納されるコンピュータプログラムを読み出し、RAMを作業領域として用いて実行する。これにより、コンピュータが前記各部として機能するとともに前記各処理が実行される。
歪曲収差補正処理に用いられる変換テーブルは、コンピュータ読取り可能なテーブルとして、ROMに格納されている。そして、CPUは、歪曲収差補正処理においては、この変換テーブルをROMから読み出して用いる。
同様に、切出し処理のための複数の処理方法も、これら複数の処理を実行するためのコンピュータプログラムとして、あらかじめROMに格納されている。また、歪曲収差補正処理に必要な各種情報も、コンピュータ読取り可能なデータとして、ROMに格納される。そして、CPUは、画像の撮影条件と補正条件に応じて複数の処理方法のうちの一つを選択して読み出し、実行する。これにより、複数の処理方法が選択的に実行される。
Here, a hardware configuration of the image processing apparatus 1 according to the embodiment of the present invention will be briefly described. An image processing apparatus 1 according to an embodiment of the present invention is a computer having a CPU, a RAM, a ROM, and an interface for transmitting and receiving data to and from the outside. Furthermore, the image processing apparatus 1 according to the embodiment of the present invention may include a storage device that can store an image input from the outside or an image that has been subjected to correction processing, and an interface that can connect such a storage device. Good. As the storage device, for example, an HDD or an SSD can be applied. A computer program (computer software) for executing the distortion correction process and the cutting process is stored in the ROM in advance. Further, the ROM stores a computer program for executing a process for inputting an image from the outside and a program for executing a process for outputting an image of the clipped area to the outside.
The CPU reads a computer program stored in the ROM and executes it using the RAM as a work area. As a result, the computer functions as each unit and the processes are executed.
The conversion table used for the distortion correction process is stored in the ROM as a computer-readable table. The CPU reads this conversion table from the ROM and uses it in the distortion correction process.
Similarly, a plurality of processing methods for the cutting process are stored in advance in the ROM as computer programs for executing the plurality of processes. Various information necessary for distortion correction processing is also stored in the ROM as computer-readable data. Then, the CPU selects, reads out and executes one of a plurality of processing methods according to the image capturing condition and the correction condition. Thereby, a plurality of processing methods are selectively executed.

また、本発明の実施形態にかかる画像処理装置1は、センサと、撮像した画像を格納可能な記録媒体を有する撮像装置に組み込まれる構成であってもよい。たとえば、本発明の実施形態にかかる画像処理装置は、デジタル一眼レフカメラに組み込まれる構成が適用できる。   Further, the image processing apparatus 1 according to the embodiment of the present invention may be configured to be incorporated in an imaging apparatus having a sensor and a recording medium capable of storing a captured image. For example, an image processing apparatus according to an embodiment of the present invention can be configured to be incorporated in a digital single lens reflex camera.

また、前記実施形態の機能を実現するプログラムを、記録媒体から直接、または有線/無線通信を用いてプログラムを実行可能なコンピュータを有するシステムまたは装置に供給して実行する構成も、本発明に含まれる。従って、本発明の機能処理をコンピュータで実現するために、当該コンピュータに供給されてインストールされるプログラムコード自体も、本発明を実現するものである。つまり、本発明の機能処理を実現するためのプログラム自体も本発明に含まれる。その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等、プログラムの形態を問わない。プログラムを供給するための記録媒体としては、例えば、フレキシブルディスク、ハードディスク、磁気テープ等の磁気記録媒体、MO、CD−ROM、CD−R、CD−RW、DVD−ROM、DVD−R、DVD−RW等が適用できる。また、光/光磁気記憶媒体、不揮発性の半導体メモリも適用できる。   Further, the present invention includes a configuration in which a program that realizes the functions of the above-described embodiments is supplied to a system or apparatus having a computer that can execute the program directly from a recording medium or using wired / wireless communication and executed. It is. Accordingly, the program code itself supplied and installed in the computer in order to implement the functional processing of the present invention by the computer also realizes the present invention. That is, the program itself for realizing the functional processing of the present invention is also included in the present invention. In this case, the program may be in any form as long as it has a program function, such as an object code, a program executed by an interpreter, or script data supplied to the OS. As a recording medium for supplying the program, for example, a magnetic recording medium such as a flexible disk, a hard disk, a magnetic tape, MO, CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-R, DVD- RW etc. are applicable. Further, an optical / magneto-optical storage medium and a non-volatile semiconductor memory can also be applied.

以上、本発明の実施形態(実施例)について詳細に説明したが、前記実施形態(実施例)は、本発明を実施するにあたっての具体例を示したに過ぎない。本発明の技術的範囲は、前記実施形態(実施例)に限定されるものではない。本発明は、その趣旨を逸脱しない範囲において種々の変更が可能であり、それらも本発明の技術的範囲に含まれる。   As mentioned above, although embodiment (Example) of this invention was described in detail, the said embodiment (Example) only showed the specific example in implementing this invention. The technical scope of the present invention is not limited to the above-described embodiment (example). The present invention can be variously modified without departing from the gist thereof, and these are also included in the technical scope of the present invention.

本発明は、補正により変形した画像から切出し領域を切り出すことができる画像処理装置、画像処理方法およびプログラムに関する。そして、本発明によれば、撮影に用いられるレンズや幾何学的な変換の種類によらず、補正処理後の画像から撮影領域をできるだけ含むような矩形領域を算出できる。   The present invention relates to an image processing apparatus, an image processing method, and a program that can cut out a cutout region from an image deformed by correction. According to the present invention, it is possible to calculate a rectangular area that includes the shooting area as much as possible from the image after the correction process, regardless of the lens used for shooting and the type of geometric transformation.

1:画像処理装置、101:入力部、102:補正部、103:算出部、104:出力部 1: Image processing apparatus 101: Input unit 102: Correction unit 103: Calculation unit 104: Output unit

Claims (11)

画像に歪曲収差補正処理を行う補正手段と、
あらかじめ定められた複数の処理方法のうちの1つを、前記画像の撮影条件と前記補正手段による補正条件に応じて選択し、補正処理後の画像から切り出す領域のサイズを算出する算出手段と、
を有することを特徴とする画像処理装置。
Correction means for performing distortion correction processing on the image;
Calculating means for selecting one of a plurality of predetermined processing methods according to the photographing condition of the image and a correction condition by the correction means, and calculating a size of a region to be cut out from the image after the correction processing;
An image processing apparatus comprising:
前記算出手段は、魚眼レンズで撮影された画像である場合には、魚眼レンズではないレンズで撮影された画像と異なる算出方法によって前記切り出す領域を算出することを特徴とする請求項1に記載の画像処理装置。   2. The image processing according to claim 1, wherein, when the image is an image shot with a fisheye lens, the calculation unit calculates the area to be cut out by a different calculation method from an image shot with a lens that is not a fisheye lens. apparatus. 前記算出手段は、画像に撮影領域ではない領域が含まれる場合には、画像の全域が撮影領域である場合と異なる方法によって、前記切り出し領域のサイズを算出することを特徴とする請求項1に記載の画像処理装置。   The calculation unit according to claim 1, wherein when the image includes a region that is not a shooting region, the calculation unit calculates the size of the cut-out region by a method different from that when the entire image is a shooting region. The image processing apparatus described. 前記算出手段は、魚眼レンズで撮影された画像である場合には、前記歪曲収差補正処理を行った後の画像において、前記歪曲収差補正処理が施される前の撮影領域の全てが含まれるように、前記切り出し領域のサイズを算出することを特徴とする請求項2に記載の画像処理装置。   In the case where the calculation means is an image shot with a fisheye lens, the image after the distortion correction processing is included in the image after the distortion correction processing is included. The image processing apparatus according to claim 2, wherein the size of the cutout area is calculated. 前記算出手段は、魚眼レンズで撮影された画像であって、かつ、前記歪曲収差補正処理を行った後の画像が樽型である場合には、前記歪曲収差補正処理を行った後の画像において、前記歪曲収差補正処理が施される前の撮影領域の全てが含まれるように、前記切り出し領域のサイズを算出することを特徴とする請求項2に記載の画像処理装置。   The calculation means is an image taken with a fisheye lens, and when the image after the distortion aberration correction processing is barrel-shaped, in the image after the distortion aberration correction processing, The image processing apparatus according to claim 2, wherein the size of the cut-out area is calculated so that the entire shooting area before the distortion aberration correction process is performed is included. 前記算出手段は、魚眼レンズで撮影された画像でない場合には、前記歪曲収差補正処理を行った後の画像において、前記歪曲収差補正処理が施される前の撮影領域の一部が含まれないように、前記切り出し領域のサイズを算出することを特徴とする請求項4または5に記載の画像処理装置。   When the calculation means is not an image photographed with a fisheye lens, the image after the distortion correction processing is not included in a part of the photographing region before the distortion correction processing is performed. The image processing apparatus according to claim 4, wherein the size of the cutout area is calculated. 前記算出手段は、画像に撮影領域ではない領域が含まれる場合には、前記歪曲収差補正処理を行った後の画像において、前記歪曲収差補正処理が施される前の撮影領域の全てが含まれるように、前記切り出し領域のサイズを算出することを特徴とする請求項3に記載の画像処理装置。   When the image includes a region that is not a shooting region, the calculation unit includes all of the shooting region before the distortion correction processing is performed in the image after the distortion correction processing is performed. The image processing apparatus according to claim 3, wherein the size of the cutout area is calculated as described above. 前記算出手段は、画像に撮影領域ではない領域が含まれ、かつ、前記歪曲収差補正処理を行った後の画像が樽型である場合には、前記歪曲収差補正処理を行った後の画像において、前記歪曲収差補正処理が施される前の撮影領域の全てが含まれるように、前記切り出し領域のサイズを算出することを特徴とする請求項3に記載の画像処理装置。   When the image includes a region that is not a shooting region and the image after the distortion correction processing is barrel-shaped, the calculation means The image processing apparatus according to claim 3, wherein the size of the cutout area is calculated so that all of the imaging area before the distortion aberration correction process is performed is included. 前記算出手段は、画像に撮影領域ではない領域が含まれない場合には、前記歪曲収差補正処理を行った後の画像において、前記歪曲収差補正処理が施される前の撮影領域の一部が含まれないように、前記切り出し領域のサイズを算出することを特徴とする請求項7または8に記載の画像処理装置。   When the image does not include a region that is not a shooting region, the calculation unit includes a portion of the shooting region before the distortion aberration correction processing is performed in the image after the distortion aberration correction processing is performed. The image processing apparatus according to claim 7, wherein the size of the cutout area is calculated so as not to be included. 画像に歪曲収差補正処理を行う補正ステップと、
前記補正ステップにおいて補正された画像から切り出す領域を、前記画像の撮影条件と前記補正ステップにおける補正条件に応じて算出するステップと、
を有することを特徴とする画像処理方法。
A correction step for performing distortion correction processing on the image;
Calculating a region to be cut out from the image corrected in the correction step according to the imaging condition of the image and the correction condition in the correction step;
An image processing method comprising:
コンピュータに、
画像に歪曲収差補正処理を行う補正ステップと、
前記補正ステップにおいて補正された画像から切り出す領域を、前記画像の撮影条件と前記補正ステップにおける補正条件に応じて算出するステップと、
を実行させることを特徴とするプログラム。
On the computer,
A correction step for performing distortion correction processing on the image;
Calculating a region to be cut out from the image corrected in the correction step according to the imaging condition of the image and the correction condition in the correction step;
A program characterized by having executed.
JP2013015839A 2013-01-30 2013-01-30 Image processing apparatus, image processing method, and program Pending JP2014147034A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013015839A JP2014147034A (en) 2013-01-30 2013-01-30 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013015839A JP2014147034A (en) 2013-01-30 2013-01-30 Image processing apparatus, image processing method, and program

Publications (1)

Publication Number Publication Date
JP2014147034A true JP2014147034A (en) 2014-08-14

Family

ID=51426943

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013015839A Pending JP2014147034A (en) 2013-01-30 2013-01-30 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP2014147034A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017045312A (en) * 2015-08-27 2017-03-02 株式会社デンソー Image generation device, image generation method, and program
JP2019165372A (en) * 2018-03-20 2019-09-26 株式会社リコー Imaging sensor fixing structure
CN112655196A (en) * 2018-09-12 2021-04-13 索尼公司 Image processing apparatus, program, and image processing method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017045312A (en) * 2015-08-27 2017-03-02 株式会社デンソー Image generation device, image generation method, and program
WO2017033691A1 (en) * 2015-08-27 2017-03-02 株式会社デンソー Image generation device, image generation method, and program
JP2019165372A (en) * 2018-03-20 2019-09-26 株式会社リコー Imaging sensor fixing structure
JP7124366B2 (en) 2018-03-20 2022-08-24 株式会社リコー Imaging element fixing structure and imaging device
CN112655196A (en) * 2018-09-12 2021-04-13 索尼公司 Image processing apparatus, program, and image processing method

Similar Documents

Publication Publication Date Title
JPWO2008139577A1 (en) Image processing apparatus, imaging apparatus, and image distortion correction method
US10244155B2 (en) Image capturing apparatus
JP2005229200A (en) Distortion correcting circuit
US10395337B2 (en) Image processing apparatus, image processing method, and storage medium
JP2013218654A (en) Image processing device
JP4919836B2 (en) Image processing apparatus, image pickup apparatus, and image distortion correction method for correcting image distortion
JP2014147034A (en) Image processing apparatus, image processing method, and program
JP2014127773A5 (en)
US11024015B2 (en) Image processing apparatus and distortion correction coefficient calculation method
JP2010103840A (en) Imaging apparatus
JP5309940B2 (en) Image processing apparatus and imaging apparatus
JP2007122328A (en) Distortion aberration correction device and distortion aberration correction method
US8629925B2 (en) Image processing apparatus, image processing method, and computer program
US9917972B2 (en) Image processor, image-processing method and program
US10244179B2 (en) Image processing apparatus, image capturing apparatus, control method, and recording medium
JP2008067176A (en) Image correction device, and image correction method
JP6622546B2 (en) Image processing apparatus and method
JP6440465B2 (en) Image processing apparatus, image processing method, and program
KR102655332B1 (en) Device and method for image correction
JP2015220662A (en) Information processing apparatus, method for the same, and program
JP6354217B2 (en) Image processing apparatus, system, image processing method, and program
JP2018098612A (en) Image processing system, image processing method, imaging apparatus, program, and storage medium
JP6136248B2 (en) Image processing apparatus, image processing method, and program
JP5141960B2 (en) Image processing device
JP6365386B2 (en) Image processing device