JP2020115683A - Image processing system, imaging apparatus, image processing method, and program - Google Patents

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

Info

Publication number
JP2020115683A
JP2020115683A JP2020073232A JP2020073232A JP2020115683A JP 2020115683 A JP2020115683 A JP 2020115683A JP 2020073232 A JP2020073232 A JP 2020073232A JP 2020073232 A JP2020073232 A JP 2020073232A JP 2020115683 A JP2020115683 A JP 2020115683A
Authority
JP
Japan
Prior art keywords
image
correction
area
images
evaluation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2020073232A
Other languages
Japanese (ja)
Other versions
JP6881646B2 (en
Inventor
博美 吉川
Hiromi Yoshikawa
博美 吉川
吉田 和弘
Kazuhiro Yoshida
和弘 吉田
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2020073232A priority Critical patent/JP6881646B2/en
Publication of JP2020115683A publication Critical patent/JP2020115683A/en
Application granted granted Critical
Publication of JP6881646B2 publication Critical patent/JP6881646B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Transforming Light Signals Into Electric Signals (AREA)
  • Color Television Image Signal Generators (AREA)
  • Studio Devices (AREA)

Abstract

To provide a system and method capable of reducing differences in luminance and color differences of a plurality of combined images.SOLUTION: An image processing system that performs image processing on a plurality of images including overlapping image areas as overlapping areas includes an operation unit 40 that calculates an evaluation value for evaluating each image by using pixel values of one or more pixels in each of the overlapping areas, a determination unit 41 that determines whether there is a correction target image from among the plurality of images on the basis of the calculated evaluation value, an image determination unit 42 that determines a correction reference image to be a reference at the time of correction from among the plurality of images on the basis of the calculated evaluation value when it is determined that there is a correction target image, and an image correction unit 43 that corrects the correction target image on the basis of the determined correction reference image.SELECTED DRAWING: Figure 10

Description

本発明は、重複する画像領域を重複領域として含む複数の画像に対して画像処理を行う画像処理システム、撮像装置、画像処理方法およびその方法をコンピュータに実行させるためのプログラムに関する。 The present invention relates to an image processing system that performs image processing on a plurality of images including overlapping image areas as overlapping areas, an imaging apparatus, an image processing method, and a program for causing a computer to execute the method.

360°のあらゆる方向を撮像可能な撮像装置として、全天球撮像カメラが知られ、監視カメラ等として使用されている。全天球撮像カメラは、複数の広角レンズまたは魚眼レンズを用い、複数の撮像素子で撮像し、得られた複数の画像に対して歪み補正や射影変換等を行い、それらを結合して1枚の全天球画像を生成する。隣接する撮像素子で撮像して得られた画像には、画像の一部が重複した画像重複領域が存在し、全天球撮像カメラでは、その画像重複領域で各画像を結合している。 A spherical imaging camera is known as an imaging device capable of imaging any direction of 360°, and is used as a surveillance camera or the like. The omnidirectional imaging camera uses a plurality of wide-angle lenses or fish-eye lenses, images with a plurality of imaging elements, performs distortion correction, projective transformation, and the like on the obtained images, and combines them into a single image. Generate a spherical image. An image obtained by picking up images by the adjacent image pickup devices has an image overlapping area in which a part of the image overlaps, and in the omnidirectional imaging camera, the images are combined in the image overlapping area.

全天球撮像カメラでは、撮像方向が異なる複数の撮像素子を用いて撮像を行うため、各撮像素子により得られた画像の画像重複領域の明るさや色合いが異なり、結合した場合に視認性が悪くなるという問題があった。そこで、画像重複領域の色調を揃える初期ゲインと、他の撮像素子との差異を小さくする補正ゲインとを用い、画像重複領域を補正し、その画像重複領域の色調の差異を小さくする技術が提案されている(例えば、特許文献1参照)。 Since the omnidirectional camera captures images using multiple image sensors with different image capturing directions, the brightness and color of the image overlap area of the images obtained by each image sensor are different, resulting in poor visibility when combined. There was a problem of becoming. Therefore, a technique is proposed in which an initial gain for uniformizing the color tones of the image overlapping area and a correction gain for reducing the difference from other image pickup elements are used to correct the image overlapping area and reduce the difference in the color tones of the image overlapping area. (For example, see Patent Document 1).

全天球撮像カメラでは、広角レンズや魚眼レンズを用いて広い範囲を撮像することから、その撮像範囲内に太陽や照明等の光源が入りやすい。このため、画像の一部が白くぼやけ、光が滲んだように見えるフレアが発生する可能性が高いことが知られている。フレアは、各画像に均一に発生するものではないため、フレアが発生した画像とフレアが発生していない画像とは、輝度の差だけではなく、色差も生じる。このため、これら画像を結合すると、その繋ぎ目が目立つという問題がある。 Since the omnidirectional imaging camera images a wide range using a wide-angle lens or a fisheye lens, it is easy for a light source such as the sun or illumination to enter the imaging range. Therefore, it is known that there is a high possibility that a part of the image is blurred in white and flare appears as if the light is blurred. Since flare does not occur uniformly in each image, not only a difference in luminance but also a color difference occurs between an image with flare and an image without flare. Therefore, when these images are combined, there is a problem that the joints are conspicuous.

上記の従来技術では、画像重複領域の色調の差異を小さくし、繋ぎ目を目立たなくすることはできるが、それ以外の領域は補正されないので、結合した画像は、輝度の差や色差を有する画像となる。 In the above conventional technique, it is possible to reduce the difference in color tones in the image overlapping areas and make the joints inconspicuous, but since the other areas are not corrected, the combined image is an image having a difference in luminance or a color difference. Becomes

そこで、結合する複数の画像の輝度の差や色差を低減することができるシステムおよび方法等の提供が望まれていた。 Therefore, it has been desired to provide a system and method that can reduce the difference in brightness and the difference in color between a plurality of images to be combined.

本発明は、上記課題に鑑みなされたものであり、重複する画像領域を重複領域として含む複数の画像に対して画像処理を行う画像処理システムであって、各重複領域内の1以上の画素の画素値を用いて各画像を評価するための評価値を算出する演算部と、演算部により算出された評価値に基づき、複数の画像の中に補正対象画像があるか否かを判断する判断部と、判断部により補正対象画像があると判断された場合に、演算部により算出された評価値に基づき、複数の画像の中から補正を行う際の基準となる補正基準画像を決定する画像決定部と、画像決定部により決定された補正基準画像に基づき、補正対象画像を補正する画像補正部とを含む、画像処理システムが提供される。 The present invention has been made in view of the above problems, and is an image processing system that performs image processing on a plurality of images that include overlapping image areas as overlapping areas, and includes one or more pixels in each overlapping area. A calculation unit that calculates an evaluation value for evaluating each image using pixel values, and a determination that determines whether or not there is a correction target image among a plurality of images based on the evaluation value calculated by the calculation unit Image that determines a correction reference image to be a reference when performing correction from a plurality of images based on the evaluation value calculated by the calculation unit when the correction unit determines that the correction target image exists An image processing system including a determination unit and an image correction unit that corrects an image to be corrected based on the correction reference image determined by the image determination unit is provided.

本発明によれば、結合する複数の画像の輝度の差や色差を低減することができる。 According to the present invention, it is possible to reduce the difference in brightness and the difference in color between a plurality of images to be combined.

撮像装置の外観図。The external view of an imaging device. 撮像像置のハードウェア構成を示した図。The figure which showed the hardware constitutions of a captured image storage. 撮像装置に用いられる魚眼レンズについて説明する図。The figure explaining the fish-eye lens used for an imaging device. 撮像装置により撮像された複数の画像における重複領域について説明する図。The figure explaining the overlap area in the some image imaged with the imaging device. 全天球画像のフォーマットについて説明する図。The figure explaining the format of a spherical image. 魚眼画像から全天球画像に変換する変換テーブルについて説明する図。The figure explaining the conversion table which converts into a spherical image from a fish-eye image. 全天球画像を生成する処理の流れを示したフローチャート。The flowchart which showed the flow of the process which produces|generates a spherical image. 歪み補正を行った結果を示した図。The figure which showed the result of performing distortion correction. 繋ぎ位置を検出する方法について説明する図。The figure explaining the method of detecting a connection position. 画像処理システムの機能ブロック図。The functional block diagram of an image processing system. 画像処理システムが実行する全体の処理の流れを示したフローチャート。3 is a flowchart showing the flow of overall processing executed by the image processing system. 図11に示すステップ1110における評価値の取得について説明する図。The figure explaining acquisition of the evaluation value in step 1110 shown in FIG. 図11に示すステップ1120における判断の詳細な処理の流れを示したフローチャート。12 is a flowchart showing a detailed processing flow of determination in step 1120 shown in FIG. 11. 図11に示すステップ1130における補正マップ作成の詳細な処理の流れを示したフローチャート。12 is a flowchart showing the flow of detailed processing for creating a correction map in step 1130 shown in FIG. 11. 補正除外マップ作成について説明する図。FIG. 6 is a diagram illustrating creation of a correction exclusion map. 重複領域の補正量を算出する方法について説明する図。The figure explaining the method of calculating the correction amount of an overlap area. 重複領域の補正量から画像全体の補正量を算出する方法について説明する図。FIG. 6 is a diagram illustrating a method of calculating a correction amount of an entire image from a correction amount of an overlapping area. 図14で作成した補正マップを、図15で作成した補正除外マップにより修正する方法について説明する図。FIG. 16 is a diagram illustrating a method of correcting the correction map created in FIG. 14 with the correction exclusion map created in FIG. 15. 図13に示すステップ1310における重複領域の平均値を算出する1つの処理の流れを示したフローチャート。14 is a flowchart showing the flow of one process for calculating the average value of overlapping regions in step 1310 shown in FIG. 13. 図13に示すステップ1310における重複領域の平均値を算出する別の処理の流れを示したフローチャート。14 is a flowchart showing the flow of another process for calculating the average value of overlapping regions in step 1310 shown in FIG. 13. 図20に示すステップ2030のマッチング度を算出する方法を説明する図。The figure explaining the method of calculating the matching degree of step 2030 shown in FIG. 図14に示すステップ1430の補正量の補間処理について説明する図。The figure explaining the interpolation processing of the correction amount of step 1430 shown in FIG. 図14に示すステップ1430の補正量の補間処理について説明する図。The figure explaining the interpolation processing of the correction amount of step 1430 shown in FIG. 図14に示すステップ1430の補正量の補間処理について説明する図。The figure explaining the interpolation processing of the correction amount of step 1430 shown in FIG. 図14に示すステップ1430の補正量の補間処理について説明する図。The figure explaining the interpolation processing of the correction amount of step 1430 shown in FIG. 重複領域の補正量を修正する処理の流れを示したフローチャート。6 is a flowchart showing the flow of processing for correcting the correction amount of the overlapping area. 重複領域の補正量を制限する処理の流れを示したフローチャート。6 is a flowchart showing the flow of processing for limiting the correction amount of the overlapping area. 図27に示す処理で用いられる閾値テーブルを例示した図。The figure which illustrated the threshold value table used by the process shown in FIG.

図1は、画像処理システムを備える撮像装置の外観を示した図である。ここでは、撮像装置を、全天球撮像カメラとしているが、これに限られるものではない。撮像装置としては、複数の撮像素子で重複する画像領域(重複領域)を撮影し、撮影した複数の画像を、その重複領域で繋ぎ合わせることができる撮像機器であってもよい。なお、撮影した複数の画像を、その重複領域で繋ぎ合わせる処理は、画像処理ICやソフトウェアを用いて実行することができる。 FIG. 1 is a diagram showing an appearance of an image pickup apparatus including an image processing system. Here, the imaging device is a spherical imaging camera, but the imaging device is not limited to this. The image capturing apparatus may be an image capturing apparatus capable of capturing overlapping image regions (overlapping regions) with a plurality of image capturing elements and connecting the captured plurality of images in the overlapping regions. The process of joining a plurality of captured images in the overlapping area can be executed by using an image processing IC or software.

全天球撮像カメラ10は、撮像位置から全方位を撮像することができるように、180°を超える画角をもつ2つの魚眼レンズ11、12と、それぞれに対応する2つの撮像素子13、14とを備えている。ここでは、魚眼レンズ11、12および撮像素子13、14をそれぞれ2つずつ備える構成を例示しているが、これに限られるものではなく、3つ以上備える構成であってもよい。なお、画角とは、魚眼レンズ11、12を用いて撮像できる範囲を角度で表したものである。 The omnidirectional imaging camera 10 includes two fisheye lenses 11 and 12 having an angle of view of more than 180° and two image pickup devices 13 and 14 corresponding to the fisheye lenses 11 and 12 so that images can be taken in all directions from the imaging position. Equipped with. Here, a configuration including two fish-eye lenses 11 and 12 and two imaging elements 13 and 14 is illustrated, but the configuration is not limited to this, and a configuration including three or more may be used. It should be noted that the angle of view is a range in which an image can be captured using the fisheye lenses 11 and 12 in terms of angles.

魚眼レンズ11、12は、撮像した画像の中心からの距離と光の入射角度が比例する等距離射影方式を採用することができる。撮像素子13、14としては、入射された光を電気信号に変換するCCD(Charge Coupled Device)イメージセンサやCMOS(Complementary Metal Oxide Semiconductor)イメージセンサ等を用いることができる。2つの撮像素子13、14は、撮像した画像に、重複する画像領域としての重複領域が含まれるように、全方位を撮像する。 The fisheye lenses 11 and 12 can adopt an equidistant projection method in which the distance from the center of the captured image is proportional to the incident angle of light. As the image pickup devices 13 and 14, a CCD (Charge Coupled Device) image sensor, a CMOS (Complementary Metal Oxide Semiconductor) image sensor, or the like that converts incident light into an electric signal can be used. The two image pickup devices 13 and 14 pick up images in all directions so that the picked-up images include overlapping regions as overlapping image regions.

撮像は、撮影者が撮像SW15を押下し、それをトリガーとして撮像素子13、14が同時に露光することにより行われる。撮像素子13、14は、受光した光を電気信号に変換することにより画像を取得する。取得した画像は、魚眼レンズ11、12を使用して得られた画像であるため、魚眼画像と呼ばれる。2つの撮像素子13、14によって取得された2つの魚眼画像は、その後の画像処理において、画像変換が行われ、重複領域で結合されて、全天球画像が生成される。 The image capturing is performed by the photographer pressing the image capturing SW 15, and the image capturing elements 13 and 14 are exposed at the same time by using the image capturing SW 15 as a trigger. The image pickup devices 13 and 14 acquire an image by converting the received light into an electric signal. The acquired image is referred to as a fisheye image because it is an image obtained by using the fisheye lenses 11 and 12. The two fisheye images acquired by the two image pickup devices 13 and 14 are subjected to image conversion in the subsequent image processing and are combined in the overlapping region to generate a spherical image.

全天球撮像カメラ10は、生成した全天球画像のデータを格納し、要求を受けて、図示しないPC等の表示装置を備える機器へ出力し、その表示装置に表示させることができる。また、全天球撮像カメラ10は、生成した全天球画像を、図示しないプリンタやMFP(Multi-Function Peripheral)等に出力し、印刷出力することもできる。また、MFPやPCへ出力し、FAX送信やメール送信することも可能である。 The omnidirectional imaging camera 10 can store data of the generated omnidirectional image, receive a request, output to a device including a display device such as a PC (not shown), and display the data on the display device. Further, the omnidirectional imaging camera 10 can also output the generated omnidirectional image to a printer (not shown), an MFP (Multi-Function Peripheral), or the like for printout. Further, it is also possible to output to an MFP or a PC for FAX transmission or mail transmission.

図2は、全天球撮像カメラ10のハードウェア構成を示した図である。図2では、魚眼レンズ11、12を省略している。全天球撮像カメラ10は、2つの撮像素子13、14および撮像SW15のほか、コントローラ20、SDRAM21、外部記憶装置22を備えている。SDRAM21は、コントローラ20とともに使用され、所定の画像処理を実現するためのプログラムを格納する。外部記憶装置22は、画像処理されたデータ、すなわち上記の全天球画像のデータを格納する。 FIG. 2 is a diagram showing a hardware configuration of the omnidirectional imaging camera 10. In FIG. 2, the fisheye lenses 11 and 12 are omitted. The celestial sphere imaging camera 10 includes two image pickup devices 13 and 14 and an image pickup SW 15, a controller 20, an SDRAM 21, and an external storage device 22. The SDRAM 21 is used together with the controller 20 and stores a program for realizing predetermined image processing. The external storage device 22 stores image-processed data, that is, the above-described spherical image data.

コントローラ20は、CPU23、ROM24、SRAM25、画像処理ブロック26、SDRAM I/F27、外部記憶I/F28を含み、各々がバス29に接続されている。CPU23は、全天球撮像カメラ10全体の制御を行う。ROM24は、全天球撮像カメラ10を起動させるプログラムや後述する変換テーブル等を記憶する。SRAM25は、CPU23に対して作業領域を提供し、画像処理ブロック26は、CPU23、SRAM25およびSDRAM21等とともに上記の所定の画像処理を実行する。画像処理ブロック26としては、特定用途向けの集積回路であるASIC(Application Specific Integrated Circuit)を用いることができる。 The controller 20 includes a CPU 23, a ROM 24, an SRAM 25, an image processing block 26, an SDRAM I/F 27, and an external storage I/F 28, each connected to a bus 29. The CPU 23 controls the entire celestial sphere imaging camera 10. The ROM 24 stores a program for starting the omnidirectional imaging camera 10, a conversion table described later, and the like. The SRAM 25 provides a work area to the CPU 23, and the image processing block 26 executes the above predetermined image processing together with the CPU 23, the SRAM 25, the SDRAM 21 and the like. As the image processing block 26, an ASIC (Application Specific Integrated Circuit) which is an integrated circuit for a specific purpose can be used.

全天球撮像カメラ10は、2つの撮像素子13、14により2つの魚眼画像を取得する。このとき、撮像素子13、14は、A/D変換器を備えており、変換した電気信号を、このA/D変換器によりデジタルデータへ変換する。撮像素子13、14は、コントローラ20が備える画像処理ブロック26へこのデジタルデータを、魚眼画像のデータとして出力する。画像処理ブロック26は、CPU23等とともに、所定の画像処理として上記の画像変換、画像を繋ぎ合わせて全天球画像を生成する処理を行い、生成した全天球画像のデータを、外部記憶I/F28を介して外部記憶装置22に格納する。 The omnidirectional imaging camera 10 acquires two fish-eye images by the two imaging elements 13 and 14. At this time, the image pickup devices 13 and 14 include an A/D converter, and the converted electric signal is converted into digital data by the A/D converter. The image pickup devices 13 and 14 output the digital data as fisheye image data to the image processing block 26 included in the controller 20. The image processing block 26, together with the CPU 23 and the like, performs the above-described image conversion as a predetermined image processing and a process of connecting the images to generate a spherical image, and stores the generated spherical image data in an external storage I/O. The data is stored in the external storage device 22 via F28.

全天球撮像カメラ10は、そのほか、通信I/Fを備え、有線または無線により図示しないPCやMFP等と通信を行い、全天球画像データをそれらの機器へ送信し、表示や印刷出力等させることができる。無線により通信を行う場合、Wi−Fi等の無線LAN、Bluetooth(登録商標)、赤外線通信等を用いることができる。 The celestial sphere imaging camera 10 is also provided with a communication I/F, communicates with a PC, an MFP or the like (not shown) in a wired or wireless manner, and transmits celestial sphere image data to those devices for display or print output. Can be made. When wireless communication is performed, a wireless LAN such as Wi-Fi, Bluetooth (registered trademark), infrared communication, or the like can be used.

図3を参照して、魚眼レンズ11について詳細に説明する。魚眼レンズ12は、魚眼レンズ11と同様のものであるため、ここでは魚眼レンズ11についてのみ説明する。180°を超える画角をもつ魚眼レンズ11を有する撮像素子13で撮像された魚眼画像は、撮像位置を中心として、略半球分の被写体の画像となる。 The fisheye lens 11 will be described in detail with reference to FIG. The fisheye lens 12 is the same as the fisheye lens 11, so only the fisheye lens 11 will be described here. A fish-eye image captured by the image sensor 13 having the fish-eye lens 11 having an angle of view of more than 180° is an image of a subject that is approximately a hemisphere centered on the image capturing position.

ここで、図3(a)に示すように、魚眼レンズ11への光の入射角度をφ、画像の中心と像点との距離を像高h、射影関数をfとすると、これらの関係は、式1のように表すことができる。 Here, as shown in FIG. 3A, when the incident angle of light on the fisheye lens 11 is φ, the distance between the center of the image and the image point is the image height h, and the projection function is f, these relationships are as follows: It can be expressed as Equation 1.

射影関数fは、魚眼レンズ11の性質により異なり、例えば、等距離射影方式の魚眼レンズを採用した場合、図3(b)に示すように、入射角度φが矢線に示すように大きくなる程、像高hが大きくなるという比例関係で表される。なお、図3(b)中、円の外側の黒く塗り潰された領域は、光が入射されない領域である。 The projection function f differs depending on the property of the fish-eye lens 11, and for example, when an equidistant projection type fish-eye lens is adopted, as the incident angle φ becomes larger as shown by the arrow, as shown in FIG. It is represented by the proportional relationship that the height h increases. In addition, in FIG. 3B, the blackened region outside the circle is a region where no light is incident.

図4を参照して、撮像素子13、14により撮像された2つの魚眼画像の重複領域について説明する。図4中、撮像素子13を「撮像素子1」とし、撮像素子14を「撮像素子2」とする。魚眼レンズ11、12は、180°を超える画角をもっているため、撮像素子13、14で撮像された魚眼画像には、重複領域が含まれる。図4(a)は、撮像素子13、14で撮像された魚眼画像で、黒く塗り潰された領域は、光が入射されない領域、白い領域が入射角度90°までの領域、斜線で示される領域が入射角度90°を超える領域を示している。 With reference to FIG. 4, an overlapping region of two fisheye images captured by the image pickup devices 13 and 14 will be described. In FIG. 4, the image sensor 13 is referred to as “image sensor 1”, and the image sensor 14 is referred to as “image sensor 2”. Since the fisheye lenses 11 and 12 have an angle of view exceeding 180°, the fisheye images picked up by the image pickup devices 13 and 14 include overlapping regions. FIG. 4A is a fish-eye image captured by the image sensors 13 and 14. The black-filled region is a region in which no light is incident, the white region is a region up to an incident angle of 90°, and a region indicated by diagonal lines. Indicates an area where the incident angle exceeds 90°.

図4(a)の斜線で示される領域は、2つの魚眼画像の重複する画像領域を示すことから、重複領域として定義することができる。しかしながら、魚眼レンズ11、12は、像高hが大きくなり、像点が画像の中心から離れるほど歪みや収差が発生しやすくなる。また、魚眼レンズ11、12の周囲の外枠等が写り込む場合もある。歪みや収差が発生した領域や外枠等の画像は、画像を繋ぎ合わせるために使用することはできない。 The hatched area in FIG. 4A indicates an overlapping image area of two fisheye images, and thus can be defined as an overlapping area. However, in the fisheye lenses 11 and 12, the image height h increases, and distortion and aberrations are more likely to occur as the image point moves away from the center of the image. In addition, the outer frame around the fisheye lenses 11 and 12 may be reflected. Images such as regions or outer frames in which distortion or aberration has occurred cannot be used to join images.

そこで、図4(b)に示すように、重複領域30としては、その内側の所定幅を有する縦縞で示されるリング状の領域に限定することができる。ちなみに、図4(b)中、2つの魚眼画像は、撮像素子13、14を同時に露光し、撮像しているため、重複領域30は、基本的に同じ被写体の画像となる。 Therefore, as shown in FIG. 4B, the overlapping area 30 can be limited to a ring-shaped area indicated by vertical stripes having a predetermined width inside thereof. Incidentally, in FIG. 4B, the two fish-eye images are obtained by simultaneously exposing and imaging the image pickup devices 13 and 14, so that the overlapping region 30 is basically an image of the same subject.

次に、図5を参照して、全天球画像について説明する。魚眼画像は、図5(a)に示す略半分の球面を円形で表したフォーマットとされ、地球儀でいう経度が水平角度に相当し、緯度が垂直角度に相当している。水平角度は、0〜360°の範囲とされ、垂直角度は、0〜180°の範囲とされている。 Next, the omnidirectional image will be described with reference to FIG. The fisheye image has a format in which a substantially half spherical surface shown in FIG. 5A is represented by a circle, and the longitude of the globe corresponds to the horizontal angle and the latitude corresponds to the vertical angle. The horizontal angle is in the range of 0 to 360°, and the vertical angle is in the range of 0 to 180°.

全天球画像は、図5(b)に示す矩形で表したフォーマットとされ、水平方向が水平角度、垂直方向が垂直角度とされる2つの半天球画像を結合することにより生成される画像である。実際には、重複領域がある分、半天球画像より大きい画像であるが、ここでは半天球画像と呼ぶものとする。 The spherical image has a format represented by a rectangle shown in FIG. 5B, and is an image generated by combining two hemispherical images in which the horizontal direction is the horizontal angle and the vertical direction is the vertical angle. is there. In reality, the image is larger than the hemisphere image due to the overlapping area, but here, it is referred to as a hemisphere image.

2つの半天球画像は、魚眼画像の水平角度と垂直角度に対応する画素が有する画素値と同じ画素値を、図5(b)に示す矩形で表したフォーマットの同じ水平角度と垂直角度に対応する画素が有する画像として生成される。この半天球画像は、魚眼画像を射影変換することにより生成することができ、生成した2つの半天球画像を結合することで、水平方向および垂直方向に360°の全方位を表す全天球画像を生成することができる。 In the two hemisphere images, the same pixel value as the pixel value of the pixel corresponding to the horizontal angle and the vertical angle of the fisheye image is set to the same horizontal angle and vertical angle in the format represented by the rectangle shown in FIG. It is generated as an image of the corresponding pixel. This hemisphere image can be generated by projectively transforming a fish-eye image, and by combining the two generated hemisphere images, a hemisphere representing 360° in all directions in the horizontal and vertical directions. Images can be generated.

魚眼画像を射影変換する際に使用する変換テーブルを、図6に例示する。変換テーブルは、図6(a)に示すように、変更前画像である魚眼画像の水平角度と垂直角度の値である座標値と、変更後画像である半天球画像の座標値とを対応付けたテーブルである。変更前画像の座標値は、(x,y)で表され、変更後画像の座標値は、(θ,φ)で表される。図6(b)に示すように、いずれの画像も左上隅の座標(0,0)を基準とし、変更前画像における画素と、変更後画像における対応する画素とを決定し、それらの画素の座標値の組み合わせを、変換テーブルにデータとして保持する。対応関係は、変換前画像と変換後画像との射影関係から求めることができる。 FIG. 6 illustrates a conversion table used in projective conversion of a fisheye image. As shown in FIG. 6A, the conversion table associates the coordinate values that are the values of the horizontal angle and the vertical angle of the fish-eye image that is the pre-change image with the coordinate values of the hemisphere image that is the post-change image. It is the attached table. The coordinate value of the pre-change image is represented by (x, y), and the coordinate value of the post-change image is represented by (θ, φ). As shown in FIG. 6B, with respect to the coordinates (0, 0) of the upper left corner of each image, the pixel in the pre-change image and the corresponding pixel in the post-change image are determined, and those pixels are The combination of coordinate values is held as data in the conversion table. The correspondence relationship can be obtained from the projective relationship between the pre-conversion image and the post-conversion image.

変換テーブルは、2つの魚眼レンズ11、12および撮像素子13、14の各々に対してレンズ設計データ等を基に事前に作成することができ、図2に示したROM24に格納しておき、必要に応じて読み出して使用することができる。この変換テーブルを用いることで、魚眼画像を射影変換して、魚眼画像の歪みを補正することができる。この補正をした画像を結合することで、全天球画像を生成することができる。 The conversion table can be created in advance based on the lens design data and the like for each of the two fisheye lenses 11 and 12 and the image pickup devices 13 and 14, and is stored in the ROM 24 shown in FIG. It can be read and used accordingly. By using this conversion table, the fisheye image can be projectively converted to correct the distortion of the fisheye image. A celestial sphere image can be generated by combining the corrected images.

図7を参照して、全天球画像を生成する処理の流れについて説明する。2つの撮像素子13、14により2つの魚眼画像を撮像し、2つの魚眼画像が入力されることにより、ステップ700からこの処理を開始する。ステップ710では、ROM24に格納された図6(a)に示したような変換テーブルを用いて各魚眼画像を射影変換して歪み補正を行う。この歪み補正により、図5(a)に示す半天球画像が2つ得られる。 The flow of processing for generating a spherical image will be described with reference to FIG. 7. Two fish-eye images are picked up by the two image pickup devices 13 and 14, and the two fish-eye images are input to start the processing from step 700. In step 710, distortion correction is performed by projectively converting each fisheye image using the conversion table as shown in FIG. 6A stored in the ROM 24. By this distortion correction, two hemisphere images shown in FIG. 5A are obtained.

ステップ720では、得られた2つの半天球画像の重複領域で繋ぎ合わせるために、繋ぎ位置の検出を行う。繋ぎ位置の検出の詳細については後述する。ステップ730では、検出結果に基づき、ステップ710で使用した変換テーブルを補正する。補正を行う目的や具体的な処理の内容については後述する。ステップ740では、補正した変換テーブルに対して回転変換を行い、画像生成用の変換テーブルを作成する。なお、回転変換を行う目的は、画像生成用の変換テーブルにおいて、画像の上下方向と、全天球撮像カメラ10の天頂方向とを一致させるためである。 In step 720, a joining position is detected in order to join the two obtained hemisphere images in the overlapping region. Details of the detection of the connection position will be described later. In step 730, the conversion table used in step 710 is corrected based on the detection result. The purpose of the correction and the details of the specific processing will be described later. In step 740, rotation conversion is performed on the corrected conversion table to create a conversion table for image generation. The purpose of the rotation conversion is to match the vertical direction of the image with the zenith direction of the omnidirectional imaging camera 10 in the conversion table for image generation.

ステップ750では、2つの魚眼画像に対して、画像生成用の変換テーブルを用いて射影変換を行い、画像の歪みを補正する。ステップ760では、歪みが補正された2つの画像を結合するためのブレンド処理を実行する。2つの画像は、その重複領域において結合されるが、一方の画像の重複領域にしかデータが存在しない場合、そのデータをそのまま使用して結合を行う。ブレンド処理が終了した後、ステップ770へ進み、この処理を終了する。 In step 750, projective transformation is performed on the two fish-eye images using a transformation table for image generation to correct image distortion. In step 760, a blending process for combining the two images whose distortions have been corrected is executed. The two images are combined in the overlapping area, but when the data exists only in the overlapping area of one image, the data is used as it is to perform the combining. After the blending process is completed, the process proceeds to step 770 and this process is completed.

図8を参照して、図7のステップ710の歪み補正について詳細に説明する。2つの撮像素子13、14で撮像された2つの魚眼画像を、それぞれの変換テーブルを用いて射影変換し、歪み補正を行うと、図8(a)に示すようなそれぞれが矩形の半天球画像に変換される。撮像素子13で撮像され、変換された画像31は、図8(a)の上側の画像となり、撮像素子14で撮像され、変換された画像32は、図8(a)の下側の画像となる。上側の画像と下側の画像とが重複する中央部分の画像領域が重複領域30となり、その重複領域30を簡単に検出することができる。 The distortion correction in step 710 of FIG. 7 will be described in detail with reference to FIG. When two fisheye images picked up by the two image pickup devices 13 and 14 are projectively converted using the respective conversion tables and distortion correction is performed, each of them has a rectangular semi-sphere as shown in FIG. 8A. Converted to an image. The image 31 captured and converted by the image sensor 13 is the upper image in FIG. 8A, and the image 32 captured and converted by the image sensor 14 is the same as the lower image in FIG. 8A. Become. The image area in the central portion where the upper image and the lower image overlap becomes the overlapping area 30, and the overlapping area 30 can be easily detected.

このように変換された画像は、その画像の上下方向が、図8(b)に示す魚眼レンズ11、12を有する撮像素子13、14を備える全天球撮像カメラ10の矢線Aに示す天頂方向に対して略90°回転したものとなっている。 In the image thus converted, the vertical direction of the image is the zenith direction shown by the arrow A of the omnidirectional imaging camera 10 including the image pickup devices 13 and 14 having the fisheye lenses 11 and 12 shown in FIG. 8B. It is rotated by about 90° with respect to.

図9を参照して、繋ぎ位置を検出する処理について説明する。繋ぎ位置の検出には、一般によく知られているテンプレートマッチングを使用することができる。テンプレートマッチングでは、図8に示すようにして重複領域を検出した後、図9(a)に示すように、2つの半天球画像のうちの一方から、重複領域30内の所定サイズの画像を、テンプレート画像34として取り出す。テンプレート画像34は、所定の間隔stepで等間隔に、水平方向のサイズw、垂直方向のサイズhで、複数個取り出す。図9(a)中、テンプレート画像34は、番号1〜6で示される矩形の画像である。テンプレート画像34は、その画像の左上隅の座標を、テンプレート画像34の取り出し座標(sx1,sy1)等とする。取り出したテンプレート画像34は、例えば、図9(b)に示す画像である。 The process of detecting the connection position will be described with reference to FIG. 9. Template detection, which is generally well known, can be used to detect the connection position. In the template matching, after detecting the overlapping area as shown in FIG. 8, as shown in FIG. 9A, an image of a predetermined size in the overlapping area 30 is obtained from one of the two hemisphere images. The template image 34 is taken out. A plurality of template images 34 having a size w in the horizontal direction and a size h in the vertical direction are taken out at equal intervals at a predetermined interval step. In FIG. 9A, the template image 34 is a rectangular image indicated by numbers 1-6. In the template image 34, the coordinates of the upper left corner of the image are set as the extraction coordinates (sx1,sy1) of the template image 34 and the like. The extracted template image 34 is, for example, the image shown in FIG.

繋ぎ位置は、図9(c)に示すように、テンプレート画像34の左上隅の座標(kx,ky)を探索位置とし、その探索位置を2つの半天球画像のうちの他方の重複領域内をずらしながら、その評価値が最も高い位置を探索して検出する。探索範囲は、重複領域内とすることができる。テンプレートマッチングにより検出した座標(kx,ky)と、テンプレート画像34の取り出し座標の座標値(sx1,sy1)の差分を、繋ぎ位置の検出結果として出力する。この検出結果は、複数個のテンプレート画像を所定の間隔stepで取り出しているため、離散データとなる。このため、データ間は、線形補間を行う等して、その間のデータを取得することができる。 As shown in FIG. 9C, the connecting position is the search position at the coordinates (kx,ky) of the upper left corner of the template image 34, and the search position is set in the other overlapping area of the two semi-sphere images. While shifting, the position with the highest evaluation value is searched for and detected. The search range can be within the overlap region. The difference between the coordinate (kx, ky) detected by the template matching and the coordinate value (sx1, sy1) of the extracted coordinate of the template image 34 is output as the connection position detection result. This detection result is discrete data because a plurality of template images are taken out at a predetermined interval step. Therefore, it is possible to obtain the data between the data by performing linear interpolation or the like.

重複領域は、同じ被写体の画像となるが、その被写体に対して撮像素子13、14が向く方向が異なるため、視差が生じる。視差が生じると、被写体が二重像に見えてしまうことから、いずれか一方の画像に合わせる必要がある。この繋ぎ位置の検出は、こうした視差を補正するために行われる。なお、視差は、被写体の位置によって異なるため、撮像するたびに重複領域内で領域毎に最適な繋ぎ位置を検出する必要がある。 The overlapping areas are images of the same subject, but parallax occurs because the image pickup devices 13 and 14 are directed differently with respect to the subject. When parallax occurs, the subject looks like a double image, so it is necessary to match it with one of the images. The detection of the connection position is performed to correct such parallax. Since the parallax varies depending on the position of the subject, it is necessary to detect the optimum connection position for each area within the overlapping area each time an image is captured.

図7にステップ730で行う変換テーブルの補正は、テンプレートマッチングにより検出された座標を用いて行われる。具体的には、一方の魚眼画像に対して使用する変換テーブルの座標値(x,y)に繋ぎ位置の検出結果である差分を加算し、その座標値を補正する。この補正は、一方の魚眼画像を、繋ぎ合わせる他方の画像に繋ぎ合わせるための補正であるため、他方の魚眼画像に対して使用する変換テーブルの補正は行わない。 The correction of the conversion table performed in step 730 in FIG. 7 is performed using the coordinates detected by the template matching. Specifically, the difference as the detection result of the connection position is added to the coordinate value (x, y) of the conversion table used for one fish-eye image, and the coordinate value is corrected. Since this correction is a correction for joining one fish-eye image to the other image to be joined, the correction of the conversion table used for the other fish-eye image is not performed.

これまでは、2つの撮像素子13、14を用いて撮像した魚眼画像を画像変換し、それを繋ぎ合わせて全天球画像を生成する処理について説明してきた。以下、魚眼画像にフレアが発生しているかどうかを判断し、発生している場合には適切に補正をして、フレアの発生によって生じた輝度の差や色差を低減させる処理について説明する。ここでは、輝度の差や色差を生じる例として、フレアを取り挙げるが、それらの差が生じて結合した画像が不自然になるような例であれば、フレアに限定されるものではない。 So far, the process of converting the fish-eye images captured by using the two image pickup devices 13 and 14 and connecting them to generate a spherical image has been described. Hereinafter, a process of determining whether flare has occurred in the fisheye image, correcting the flare in the fisheye image appropriately, and reducing the difference in luminance and the color difference caused by the flare will be described. Here, flare is taken as an example in which a difference in brightness and a color difference are generated, but the example is not limited to flare as long as the difference results in an unnatural image.

図10は、この処理を実現するための画像処理システムの機能ブロック図である。画像処理システムは、複数の撮像素子13、14等から入力された複数の画像に対して画像処理を行う画像処理システムである。画像処理システムは、
演算部40と、判断部41と、画像決定部42と、画像補正部43とを含んで構成される。これらの機能部は、例えば、図2に示すCPU23がSDRAM21に記憶されたプログラムを実行することにより、あるいは画像処理ブロック26により実現される。
FIG. 10 is a functional block diagram of an image processing system for realizing this processing. The image processing system is an image processing system that performs image processing on a plurality of images input from the plurality of image pickup devices 13 and 14. Image processing system
The calculation unit 40, the determination unit 41, the image determination unit 42, and the image correction unit 43 are included. These functional units are realized, for example, by the CPU 23 shown in FIG. 2 executing a program stored in the SDRAM 21 or by the image processing block 26.

演算部40は、各重複領域内の1以上の画素の画素値を用いて各画像を評価するための評価値を算出する。評価値は、例えば、各重複領域内の複数の画素の画素値の平均値や分散値とすることができる。画素値は、カラー画像でRGB色空間を採用する場合、RGBの各色の信号量を含むことができる。YCbCr色空間を採用する場合は、輝度値、青系統の色の色相および彩度の値、赤系統の色の色相および彩度の値を含むことができる。 The calculation unit 40 calculates an evaluation value for evaluating each image by using the pixel value of one or more pixels in each overlapping area. The evaluation value can be, for example, an average value or a variance value of pixel values of a plurality of pixels in each overlapping area. The pixel value can include the signal amount of each color of RGB when the RGB color space is adopted in the color image. When the YCbCr color space is adopted, it is possible to include a luminance value, a hue and saturation value of a blue color, and a hue and saturation value of a red color.

判断部41は、演算部40により算出された評価値に基づき、複数の画像の中に補正対象画像があるか否かを判断する。例えば、判断部41は、閾値をもち、閾値と比較することにより補正対象画像の有無を判断することができる。具体的には、判断部41は、上記の平均値や分散値が閾値を超える画像を補正対象画像と判断し、その画像がある場合に補正対象画像があると判断することができる。 The determination unit 41 determines whether or not there is a correction target image among the plurality of images based on the evaluation value calculated by the calculation unit 40. For example, the determination unit 41 has a threshold value and can determine the presence or absence of the correction target image by comparing with the threshold value. Specifically, the determination unit 41 can determine that an image whose average value or variance exceeds the threshold value is a correction target image, and if there is such an image, determine that there is a correction target image.

画像決定部42は、判断部41により補正対象画像があると判断された場合に、演算部40により算出された評価値に基づき、複数の画像の中から補正を行う際の基準となる補正基準画像を決定する。補正基準画像は、複数の画像の補正対象画像を除いた画像の中から選択することができ、例えば、補正対象画像と結合する画像であって、補正対象画像ではない画像を、補正基準画像として決定することができる。上記の全天球撮像カメラ10の場合は、一方が補正対象画像であれば、他方の画像を補正基準画像として決定することができる。 The image determination unit 42, when the determination unit 41 determines that there is an image to be corrected, based on the evaluation value calculated by the calculation unit 40, a correction reference that is a reference when performing correction from a plurality of images. Determine the image. The correction reference image can be selected from the images excluding the correction target images of the plurality of images. For example, an image that is combined with the correction target image and is not the correction target image is used as the correction reference image. You can decide. In the case of the omnidirectional imaging camera 10 described above, if one is the correction target image, the other image can be determined as the correction reference image.

画像補正部43は、画像決定部42により決定された補正基準画像に基づき、補正対象画像を補正する。画像補正部43は、補正基準画像の輝度や色に近づけるように、補正対象画像の輝度や色を補正する。この補正により、結合する複数の画像の輝度の差や色差を低減することができる。 The image correction unit 43 corrects the correction target image based on the correction reference image determined by the image determination unit 42. The image correction unit 43 corrects the brightness and color of the correction target image so as to approach the brightness and color of the correction reference image. By this correction, it is possible to reduce the difference in brightness and the difference in color between the images to be combined.

図11を参照して、画像処理システムが実行する処理について説明する。画像処理システムは、2つの撮像素子13、14が撮像した2つの魚眼画像の入力を受け付けることにより、ステップ1100から処理を開始する。ステップ1110では、演算部40が、2つの魚眼画像の各重複領域内の1以上の画素の画素値を用いて各画像を評価するための評価値を算出する。 Processing executed by the image processing system will be described with reference to FIG. 11. The image processing system starts the process from step 1100 by accepting the inputs of the two fish-eye images captured by the two image sensors 13 and 14. In step 1110, the calculation unit 40 calculates an evaluation value for evaluating each image using the pixel value of one or more pixels in each overlapping region of the two fisheye images.

ステップ1120では、判断部41が、演算部40が算出した評価値に基づき、2つの魚眼画像の中にフレアが発生した画像(フレア画像)があるか否かを判断する。ステップ1120で、フレア画像がある場合はステップ1130へ進み、ない場合はステップ1150へ進み、この処理を終了する。 In step 1120, the determination unit 41 determines whether or not there is an image with flare (flare image) in the two fisheye images based on the evaluation value calculated by the calculation unit 40. In step 1120, if there is a flare image, the process proceeds to step 1130, and if it does not exist, the process proceeds to step 1150, and this process ends.

ステップ1130では、画像決定部42が、フレアが発生していない画像を、補正基準画像と決定し、画像補正部43が、ステップ1110で算出した評価値を用い、フレア画像を補正するための補正値をマップした補正マップを作成する。ステップ1140では、画像補正部43が、作成した補正マップを用いてフレア画像を補正する。補正が終了した後、ステップ1150へ進み、この処理を終了する。 In step 1130, the image determination unit 42 determines the image in which flare has not occurred as a correction reference image, and the image correction unit 43 uses the evaluation value calculated in step 1110 to perform correction for correcting the flare image. Create a correction map that maps the values. In step 1140, the image correction unit 43 corrects the flare image using the created correction map. After the correction is completed, the process proceeds to step 1150 and this process is completed.

図11に示すステップ1110の評価値の算出について、図12を参照して説明する。評価値は、重複領域内の1以上の画素の画素値を用いて算出することから、図12(a)の縦縞で示される重複領域30内の1以上の画素の画素値を取得する必要がある。その1つの方法を以下に説明する。なお、この方法は一例であるため、評価値を算出することができれば、いかなる方法でも使用することができる。 Calculation of the evaluation value in step 1110 shown in FIG. 11 will be described with reference to FIG. Since the evaluation value is calculated using the pixel values of one or more pixels in the overlapping area, it is necessary to acquire the pixel values of one or more pixels in the overlapping area 30 shown by the vertical stripes in FIG. is there. One method will be described below. Since this method is an example, any method can be used as long as the evaluation value can be calculated.

最初に、図12(a)に示すように、入力された2つの魚眼画像の各々を、予め決定された数のそれぞれが同じサイズの矩形からなる複数の評価領域に分割する。例えば、各魚眼画像のサイズが1952(pix)×1932(pix)である場合、48×48に分割することができる。この分割数は一例であるため、試験等により最適な分割数を決定し、その分割数を採用することができる。画像処理システムは、このような分割を行うための機能部として、複数の評価領域に分割する領域分割部を備えることができる。 First, as shown in FIG. 12A, each of the two input fish-eye images is divided into a plurality of evaluation areas each having a predetermined number of rectangles each having the same size. For example, when the size of each fish-eye image is 1952 (pix)×1932 (pix), it can be divided into 48×48. Since the number of divisions is an example, it is possible to determine the optimum number of divisions by a test or the like and adopt the number of divisions. The image processing system may include a region dividing unit that divides the image into a plurality of evaluation regions as a functional unit for performing such division.

次に、図12(b)に示すように、縦縞で示される重複領域30内に、領域全部が含まれる評価領域を、重複領域30に対応する評価領域として検出する。図12(b)では、検出した評価領域35が灰色で示されている。画像処理システムは、この検出を行うための機能部として、領域検出部を備えることができる。 Next, as shown in FIG. 12B, an evaluation area including the entire area within the overlapping area 30 indicated by vertical stripes is detected as an evaluation area corresponding to the overlapping area 30. In FIG. 12B, the detected evaluation area 35 is shown in gray. The image processing system can include an area detection unit as a functional unit for performing this detection.

検出された評価領域35は、複数の画素により構成される。各画素は、画素値を有している。評価値は、各評価領域35につき、画素値を合計してその数で除して平均値を求め、各評価領域につき求めた平均値を合計してその数で除して平均値を求めることにより算出することができる。また、評価値は、各評価領域につき求めた平均値を用い、その分散値を求めることにより算出することができる。したがって、評価値としては、上記の平均値あるいは分散値を用いることができる。画像処理システムは、評価領域の平均値を算出するための平均値算出部を、機能部として備えることができる。 The detected evaluation area 35 is composed of a plurality of pixels. Each pixel has a pixel value. For the evaluation value, for each evaluation area 35, the pixel values are summed and divided by the number to obtain an average value, and the average values obtained for each evaluation area are summed and divided by the number to obtain an average value. Can be calculated by Further, the evaluation value can be calculated by using the average value obtained for each evaluation area and obtaining the variance value thereof. Therefore, as the evaluation value, the above average value or variance value can be used. The image processing system can include an average value calculation unit for calculating the average value of the evaluation area as a functional unit.

図1に示す構造の全天球撮像カメラ10で撮像する場合、360°撮像するため、撮像SW15を押下する撮影者の指が大きく写り込んでしまうときがある。この場合、重複領域30において一方は指の画像があり、他方は指の画像がないことになる。この指の画像の有無によって算出される平均値や分散値は大きく変わってくるので、その部分の画像は、評価値の算出において採用しないほうが望ましい。 When the omnidirectional imaging camera 10 having the structure shown in FIG. 1 is used to capture an image of 360°, the photographer's finger pressing the image capturing SW 15 may be greatly reflected. In this case, in the overlapping area 30, one has a finger image and the other has no finger image. Since the average value and the variance value calculated depending on the presence or absence of the image of the finger greatly change, it is desirable not to use the image of that portion in the calculation of the evaluation value.

そこで、指の写り込みが予想される重複領域30の下側1/4の領域は、不要領域として設定し、その他の重複領域30内に含まれる評価領域のみを、重複領域30に対応する評価領域35として検出することができる。ここでは、重複領域の下側1/4の領域を、不要領域として設定したが、これに限られるものではなく、1/5以下や1/3以上の領域を不要領域としてもよいし、その他の領域を不要領域に追加してもよい。 Therefore, the lower 1/4 area of the overlapping area 30 where the finger is expected to be reflected is set as an unnecessary area, and only the evaluation areas included in the other overlapping areas 30 are evaluated as the evaluation areas corresponding to the overlapping area 30. It can be detected as a region 35. Here, the lower 1/4 region of the overlapping region is set as the unnecessary region, but the present invention is not limited to this, and a region of ⅕ or less or 1/3 or more may be the unnecessary region. The area may be added to the unnecessary area.

このように不要領域を設定し、指等の障害物を評価対象から除くことで、フレア画像と補正基準画像との相関性の高い評価領域のみを使用して平均値や分散値を求めることができる。 By setting unnecessary areas in this way and excluding obstacles such as fingers from the evaluation target, it is possible to obtain the average value or variance value using only the evaluation area with high correlation between the flare image and the correction reference image. it can.

図11に示すステップ1120のフレア画像の有無の判断について、図13を参照して説明する。この処理は、評価値を算出したことを受けて、ステップ1300から開始する。ステップ1310では、評価値として算出された、重複領域に対応する評価領域のすべての平均値を平均して、その平均値を算出する。この処理は、繋ぎ合わせる画像毎に行う。したがって、2つの画像を繋ぎ合わせる場合は、2つの画像の各々につき平均値を算出する。 The determination of the presence or absence of the flare image in step 1120 shown in FIG. 11 will be described with reference to FIG. This process starts from step 1300 in response to the calculation of the evaluation value. In step 1310, all the average values of the evaluation areas corresponding to the overlapping areas calculated as the evaluation values are averaged to calculate the average value. This process is performed for each image to be joined. Therefore, when joining two images, an average value is calculated for each of the two images.

ステップ1320では、繋ぎ合わせる画像の間で算出した平均値を比較する。ここでは、平均値の差分の絶対値を算出し、平均値が最小の画像を抽出する。そして、これらの情報を比較結果として出力する。例えば、画像1と画像2とを繋ぎ合わせる場合、その平均値をAVE_1とAVE_2とすると、比較結果は、|AVE_1-AVE_2|と、AVE_1>AVE_2のとき画像2、AVE_1<AVE_2のとき画像1となる。 In step 1320, the average values calculated between the stitched images are compared. Here, the absolute value of the difference between the average values is calculated, and the image with the minimum average value is extracted. Then, these pieces of information are output as comparison results. For example, in the case where image 1 and image 2 are connected, if the average values are AVE_1 and AVE_2, the comparison results are |AVE_1-AVE_2|, AVE_1>AVE_2, image 2 and AVE_1<AVE_2, image 1 Become.

ステップ1330では、比較結果の差分の絶対値が、予め設定された閾値Tより大きいか否かを判断する。大きい場合は、輝度値等の差が大きいことから、ステップ1340へ進み、フレアが発生し、その画像はフレア画像であると判断する。これに対し、小さい場合は、その差が小さいことから、ステップ1350へ進み、フレアが発生しておらず、フレア画像ではないと判断する。この判断が終了したところで、ステップ1360へ進み、この処理を終了する。 In step 1330, it is determined whether or not the absolute value of the difference of the comparison result is larger than a preset threshold T. If the difference is large, the difference in the brightness value or the like is large, so the process proceeds to step 1340, flare occurs, and it is determined that the image is a flare image. On the other hand, if the difference is small, the difference is small, and therefore the process proceeds to step 1350, and it is determined that flare has not occurred and the image is not a flare image. When this determination is completed, the process proceeds to step 1360 and this process is completed.

なお、ステップ1320で比較し、抽出した平均値が最小の画像を、フレアが発生していない画像であって、補正基準画像として定めることができる。基本的に、同時露光により撮像した場合、重複領域は同じ被写体の画像が同じ明るさで撮像されるはずである。しかしながら、一方の画像でフレアが発生している場合、重複領域の上記平均値が高くなるため、上記のように閾値を設け、その閾値より大きいとき、フレア画像と判断することができる。また、平均値が最小の画像では、フレアが発生していない可能性が高いことから、補正基準画像として使用することができる。 The image having the smallest average value extracted and compared in step 1320 can be determined as a correction reference image that is an image in which flare has not occurred. Basically, when images are taken by simultaneous exposure, the images of the same subject in the overlapping area should be taken with the same brightness. However, when flare occurs in one of the images, the average value of the overlapping area is high. Therefore, the threshold value is set as described above, and when it is larger than the threshold value, it can be determined that the image is a flare image. Further, since it is highly possible that flare does not occur in the image having the smallest average value, it can be used as the correction reference image.

図11に示すステップ1130の補正マップの作成について、図14を参照して説明する。フレア画像があると判断されたことを受けて、ステップ1400からこの処理を開始する。ステップ1410では、補正を除外する領域を指定する補正除外マップを作成する。補正除外マップは、補正対象画像を構成する複数の画素の各画素値に基づき判定された補正対象画像内の補正を行わない補正除外領域に含まれる評価領域に対応する位置のブロックに、補正除外する値を格納したものである。なお、それ以外のブロックには補正除外しない値が格納される。画像処理システムは、この補正除外マップを作成するために、補正除外領域を判定するための領域判定部を、機能部として備えることができる。 The creation of the correction map in step 1130 shown in FIG. 11 will be described with reference to FIG. In response to the determination that there is a flare image, this process is started from step 1400. In step 1410, a correction exclusion map is created that specifies the area where the correction is excluded. The correction exclusion map is a correction exclusion map for a block at a position corresponding to an evaluation region included in a correction exclusion region in the correction target image determined based on each pixel value of a plurality of pixels forming the correction target image. The value to be stored is stored. In addition, values not excluded from correction are stored in the other blocks. The image processing system can include, as a functional unit, an area determination unit for determining a correction exclusion area in order to create this correction exclusion map.

フレアが発生していない平均値が最小の画像に基づき、フレアが発生している画像を補正する場合、そのフレアが発生している画像全体を補正することになる。画像全体に対して補正を行うと、全体的に輝度が低下し、色が変化することになる。すると、画像を結合した場合に目で見て不自然な画像になることがある。例えば、光源の実際の輝度や色は、フレアが発生している画像における輝度や色であるにもかかわらず、補正によってその輝度が低下し、その色も暗い色になる。そこで、光源のように補正しないほうが良い被写体の画像に対しては、補正しないようにするため、補正除外マップを作成する。 When correcting an image in which flare has occurred based on an image in which flare has not occurred and which has the smallest average value, the entire image in which flare has occurred is corrected. When the correction is performed on the entire image, the brightness is lowered as a whole and the color is changed. Then, when the images are combined, the resulting image may look unnatural. For example, although the actual brightness or color of the light source is the brightness or color of the image in which flare is occurring, the brightness is reduced by the correction, and the color also becomes dark. Therefore, a correction exclusion map is created so that the image of the subject that should not be corrected like the light source is not corrected.

ステップ1420では、重複領域に対応する評価領域の平均値や分散値といった評価値から、重複領域の補正量を算出する。補正量は、どの程度輝度値を低下させたら良いか、どの程度色を変化させたら良いかを数値で表したものである。ステップ1430では、ステップ1420で算出した補正量を基に、補正対象画像、すなわちフレアが発生している画像全体の補正量を、補間処理により算出し、算出した補正量を用いて補正マップを作成する。補正マップは、算出した各補正量を、補正対象画像の各評価領域に対応する位置のブロックに格納したものである。 In step 1420, the correction amount of the overlapping area is calculated from the evaluation value such as the average value or the variance value of the evaluation areas corresponding to the overlapping area. The correction amount is a numerical value indicating how much the luminance value should be reduced and how much the color should be changed. In step 1430, based on the correction amount calculated in step 1420, the correction amount of the correction target image, that is, the entire image in which flare has occurred is calculated by interpolation processing, and a correction map is created using the calculated correction amount. To do. The correction map stores each calculated correction amount in a block at a position corresponding to each evaluation region of the correction target image.

ステップ1440では、ステップ1430で作成した補正マップに対し、ステップ1410で作成した補正除外マップを適用し、補正マップを修正する。そして、ステップ1450では、補正マップ内の補正値に、極端に高い値や低い値が存在する場合、それらの値を平準化する平準化処理、すなわちローパスフィルタ(LPF)処理を行う。LPFとしては、ガウシアンフィルタを用いることができる。 In step 1440, the correction exclusion map created in step 1410 is applied to the correction map created in step 1430 to modify the correction map. Then, in step 1450, if extremely high or low values exist in the correction values in the correction map, leveling processing for leveling those values, that is, low-pass filter (LPF) processing is performed. A Gaussian filter can be used as the LPF.

LPF処理は、1回に限らず、複数回行ってもよい。ただし、回数が多いと、補正除外した画像に対する補正値が大きく変化し、補正除外した意味がなくなってしまうことから、その回数は少ないほうが好ましい。図14に示す実施形態では、ステップ1460に示すように2回としている。画像処理システムは、この平準化処理を実施するための機能部として、平準化処理部をさらに備えることができる。 The LPF process is not limited to one time and may be performed a plurality of times. However, if the number of times is large, the correction value for the image that has been corrected is greatly changed, and the meaning of the correction is lost. Therefore, it is preferable that the number of times is small. In the embodiment shown in FIG. 14, twice as shown in step 1460. The image processing system may further include a leveling processing unit as a functional unit for performing this leveling processing.

ステップ1460ではLPF処理を2回実施したかを判断する。2回実施していない場合は、ステップ1440へ戻り、2回実施した場合は、ステップ1470へ進む。ステップ1470では、補正マップのリサイズ処理を行う。リサイズ処理は、補正マップが有する評価領域の数を、補正対象画像の画素数へ変更する処理である。このため、画像処理システムは、サイズ変更処理部を機能部として備えることができる。 In step 1460, it is determined whether the LPF process has been performed twice. If it has not been performed twice, the process returns to step 1440. If it has been performed twice, the process proceeds to step 1470. In step 1470, the correction map is resized. The resizing process is a process of changing the number of evaluation regions included in the correction map to the number of pixels of the correction target image. Therefore, the image processing system can include the size change processing unit as a functional unit.

ステップ1440までに生成される補正マップは、図12に示すように、魚眼画像を水平方向および垂直方向に分割した分割数のサイズとされている。すなわち、48×48に分割されていれば、48×48のサイズである。実際の魚眼画像は、上記の例では1952(pix)×1932(pix)のサイズであるため、リサイズ処理では、48×48から1952×1932へサイズを変更する処理を行う。このリサイズ処理が終了したところで、ステップ1480へ進み、この処理を終了する。 As shown in FIG. 12, the correction map generated up to step 1440 has the size of the number of divisions obtained by dividing the fisheye image in the horizontal direction and the vertical direction. That is, if it is divided into 48×48, the size is 48×48. Since the actual fish-eye image has a size of 1952 (pix)×1932 (pix) in the above example, the resizing process changes the size from 48×48 to 1952×1932. When this resizing process is completed, the process proceeds to step 1480, and this process is completed.

リサイズの方法としては、これまでに知られたいかなる方法でも使用することができる。例えば、バイリニア、ニアレストネイバー、バイキュービック等の方法を使用してサイズを変更することができる。 As the resizing method, any method known so far can be used. For example, bilinear, nearest neighbor, bicubic, and other methods can be used to resize.

図14に示すステップ1410の補正除外マップの作成方法を、図15を参照して説明する。図15では、図15(a)に示すように、光源50が写り込んだ画像において、この光源50の画像を、補正を除外する被写体の画像とする。まず、図15(b)に示すように、画像を複数の評価領域に分割し、各評価領域の平均値や分散値を算出し、評価領域ごとに補正除外領域か否かを判断する。なお、この判断を、上記の領域判定部で行うことができる。 A method of creating the correction exclusion map in step 1410 shown in FIG. 14 will be described with reference to FIG. In FIG. 15, as shown in FIG. 15A, in the image in which the light source 50 is reflected, the image of the light source 50 is set as the image of the subject whose correction is excluded. First, as shown in FIG. 15B, the image is divided into a plurality of evaluation areas, the average value and the variance value of each evaluation area are calculated, and it is determined for each evaluation area whether or not it is a correction exclusion area. It should be noted that this determination can be performed by the area determination unit.

補正除外領域の条件は、「高輝度かつ無彩色」または「高輝度かつ輝度の最大値が閾値以上」とすることができる。「高輝度かつ無彩色」を条件1とすると、高輝度は、輝度値が0〜255の場合、例えば200以上とすることができ、無彩色は、色差値が−127〜127の場合、例えば−1〜1とすることができる。「高輝度かつ輝度の最大値が閾値以上」を条件2とすると、高輝度は、輝度値が0〜255の場合、例えば230以上とすることができ、閾値としては、輝度値が0〜255の場合、例えば250とすることができる。これらの数値は一例を示したものであり、本発明はこれらの数値に限定されるものではない。 The condition of the correction exclusion area can be “high brightness and achromatic color” or “high brightness and the maximum value of brightness is greater than or equal to a threshold”. When “high brightness and achromatic color” is set as the condition 1, high brightness can be set to 200 or more when the brightness value is 0 to 255, and achromatic color is set to when the color difference value is −127 to 127, for example. It can be -1 to 1. When the condition 2 is “high brightness and the maximum value of brightness is greater than or equal to a threshold”, the high brightness can be set to, for example, 230 or more when the brightness value is 0 to 255, and the brightness value is 0 to 255 as a threshold. In this case, it can be set to 250, for example. These numerical values are examples and the present invention is not limited to these numerical values.

補正除外領域の条件は、上記条件1と条件2の両方で判断することが望ましい。1つの評価領域全体が均一な輝度や色を有している場合、条件1のみで判断することができる。しかしながら、1つの評価領域内に光源50等の高輝度の被写体と、木の枝等の低輝度の被写体が存在する場合、条件1に適合しなくなるため、光源50の画像が補正され、光源50が暗く不自然な画像になってしまうからである。この条件2を含めることで、このような光源50と木の枝等を含む画像も、補正除外領域として適切に抽出することができる。 It is desirable to determine the condition of the correction exclusion area based on both the condition 1 and the condition 2. When one evaluation area as a whole has uniform brightness and color, it can be judged only by the condition 1. However, when a high-luminance subject such as the light source 50 and a low-luminance subject such as a tree branch exist in one evaluation area, Condition 1 is not satisfied, so the image of the light source 50 is corrected, and the light source 50 is corrected. Is a dark and unnatural image. By including this condition 2, an image including such a light source 50 and a tree branch can be appropriately extracted as a correction exclusion area.

図15(b)ではこれらの条件に適合する領域として、8つの領域51が抽出されている。補正除外マップは、補正対象画像を複数の評価領域に分割した際のフォーマットと同様のフォーマットをもつ。補正除外マップは、図15(c)に示すように、条件に適合する評価領域に対応する位置のブロックに補正除外する値である「1」が格納される。条件に適合しない評価領域に対応する位置のブロックには補正除外しない値である「0」が格納される。 In FIG. 15B, eight regions 51 are extracted as regions that meet these conditions. The correction exclusion map has the same format as that when the correction target image is divided into a plurality of evaluation areas. As shown in FIG. 15C, the correction exclusion map stores “1”, which is the value of the correction exclusion, in the block at the position corresponding to the evaluation area that matches the condition. A value "0" that is not excluded from correction is stored in the block at the position corresponding to the evaluation area that does not meet the conditions.

図14に示すステップ1420の補正量の算出方法を、図16を参照して説明する。図16(a)は、フレア画像と、基準画像とを示した図で、図16(b)は、図16(a)中、破線で示された重複領域30に含まれる評価領域35を拡大して示した図である。繋ぎ位置に対応する評価領域35は、同じ符号で示された領域となる。すなわち、図16(b)のフレア画像から抽出された左図の符号aで示された評価領域と、基準画像から抽出された右図の符号aで示された評価領域とが繋ぎ合わせる領域となる。これは、全天球撮像カメラ10が表裏を同時に撮像するため、重複領域内の同じ画像は180°回転した位置となるからである。 A method of calculating the correction amount in step 1420 shown in FIG. 14 will be described with reference to FIG. 16A is a diagram showing a flare image and a reference image, and FIG. 16B is an enlarged view of the evaluation region 35 included in the overlapping region 30 shown by a broken line in FIG. 16A. FIG. The evaluation area 35 corresponding to the connecting position is an area indicated by the same reference numeral. That is, an area in which the evaluation area indicated by reference symbol a in the left figure extracted from the flare image in FIG. 16B and the evaluation area indicated by reference symbol a in the right figure extracted from the reference image are connected to each other. Become. This is because the omnidirectional camera 10 images the front and back sides at the same time, and the same image in the overlapping area is rotated by 180°.

繋ぎ合わせる際、符号aで示された2つの評価領域の値は、一方はフレアが発生しているため、高い値を示し、他方はフレアが発生していないため、それより低い値を示す。このため、同じ値にするべく、補正をしなければならない。その補正に用いる補正量cは、下記式2または式3により算出することができる。式2中、Eは、補正基準画像としての基準画像の評価値を示し、Eは、補正対象画像、すなわちフレア画像の評価値である。 At the time of joining, the values of the two evaluation areas indicated by the symbol a show a high value because one flare has occurred, and the other shows a lower value because no flare has occurred. For this reason, it is necessary to perform correction so that the same value is obtained. The correction amount c used for the correction can be calculated by the following Expression 2 or Expression 3. In Expression 2, E b represents the evaluation value of the reference image as the correction reference image, and E t is the evaluation value of the correction target image, that is, the flare image.

補正量cは、上記式2および式3のいずれの式を用いて算出してもよい。算出した補正量cは、フレア画像の対応する評価領域の値として格納される。したがって、図16(b)に示す符号aについての補正量cを算出した場合、その補正量cが符号aの値として格納される。 The correction amount c may be calculated using either of the above equations 2 and 3. The calculated correction amount c is stored as the value of the corresponding evaluation area of the flare image. Therefore, when the correction amount c for the code a shown in FIG. 16B is calculated, the correction amount c is stored as the value of the code a.

図14に示すステップ1430の補正量の補間処理について、図17を参照して説明する。重複領域の補正量cは、上記式2または式3を用いて算出される。重複領域の内側については、重複領域内の複数の評価領域35につき算出された補正量を用い、図17(a)の矢線に示すように画像の中心へ向けて補正量を補間し、内側の各評価領域の補正量を決定する。詳細な方法については後述する。 The correction amount interpolation processing of step 1430 shown in FIG. 14 will be described with reference to FIG. The correction amount c of the overlapping area is calculated by using the above Expression 2 or Expression 3. For the inside of the overlapping area, the correction amounts calculated for the plurality of evaluation areas 35 in the overlapping area are used, and the correction amount is interpolated toward the center of the image as shown by the arrow in FIG. The amount of correction for each evaluation area is determined. The detailed method will be described later.

重複領域の外側については、後のステップ1450でLPF処理を実施することから、LPF処理を実施しても重複領域の補正量に大きな変化が出ない補正量を設定する必要がある。そこで、例えば、図17(b)に示すように、評価領域xで示される領域は、それぞれ1つ上の評価領域の補正量と同じ補正量とし、評価領域yで示される領域は、それぞれ1つ左の評価領域の補正量と同じ補正量とする。なお、どの評価領域の補正量を使用するかは、予め設定により決定することができる。 As for the outside of the overlapping area, the LPF processing is performed in the subsequent step 1450. Therefore, it is necessary to set a correction amount that does not significantly change the correction amount of the overlapping area even if the LPF processing is performed. Thus, for example, as shown in FIG. 17B, the area indicated by the evaluation area x has the same correction amount as that of the evaluation area one level above, and the area indicated by the evaluation area y has the same correction amount. The correction amount is the same as the correction amount of the evaluation area on the left side. Note that which evaluation area to use for the correction amount can be determined in advance by setting.

図14に示すステップ1440の補正マップの修正について、図18を参照して説明する。図18(a)は、図14に示す処理により作成した補正マップの一部を示した図で、図18(b)は、図15(c)に示す補正除外マップの一部を示した図である。図18(a)に示す補正マップは、上記式2の評価値の比率を補正量とし、それを各評価領域の補正量として格納したものである。 The correction of the correction map in step 1440 shown in FIG. 14 will be described with reference to FIG. 18A is a diagram showing a part of the correction map created by the processing shown in FIG. 14, and FIG. 18B is a diagram showing a part of the correction exclusion map shown in FIG. 15C. Is. In the correction map shown in FIG. 18A, the ratio of the evaluation values of the above formula 2 is set as the correction amount, and the correction amount is stored as the correction amount of each evaluation area.

図18(a)に示す補正マップの修正は、図18(b)に示す補正除外マップを参照し、対応する評価領域における補正除外マップの補正量が「0」の場合、その評価領域については修正を行わない。これに対し、補正除外マップの補正量が「1」の場合、その補正量に対して補正が施されないような値に変更する。図18(b)を参照すると、座標(x3,y2)、(x3,y3)、(x4,y2)の評価領域に補正量1の値が格納されているため、補正マップの同じ位置にあるブロックの値を「1.00」に置換し、補正マップを修正する。これにより、その補正除外領域については、補正の効果を弱めるように補正マップを修正することができる。 To correct the correction map shown in FIG. 18A, refer to the correction exclusion map shown in FIG. 18B, and when the correction amount of the correction exclusion map in the corresponding evaluation area is “0”, Do not modify. On the other hand, when the correction amount of the correction exclusion map is "1", the correction amount is changed to a value such that the correction amount is not corrected. Referring to FIG. 18B, since the value of the correction amount 1 is stored in the evaluation areas of the coordinates (x3,y2), (x3,y3), (x4,y2), it is at the same position on the correction map. Replace the block value with "1.00" and correct the correction map. As a result, the correction map can be corrected for the correction exclusion area so as to weaken the correction effect.

フレア画像の補正は、図14に示す処理でリサイズ処理が実施された後の補正マップを用いて実施される。補正マップは、リサイズ処理によりフレア画像と同じ画素数の画像サイズとなっている。補正マップに、式2により算出された評価値の比率を用いて決定された各画素の補正量が格納されている場合、フレア画像内の各画素の画素値に、対応する各画素の補正量を乗算して、フレア画像内の各画素の画素値を補正する。補正マップに、式3により算出された評価値の差分を用いて決定された各画素の補正量が格納されている場合、フレア画像内の各画素の画素値から、対応する各画素の補正量を加算して、フレア画像内の各画素の画素値を補正する。 The correction of the flare image is performed using the correction map after the resizing process is performed in the process shown in FIG. The correction map has an image size of the same number of pixels as the flare image due to the resizing process. When the correction map stores the correction amount of each pixel determined using the ratio of the evaluation values calculated by Equation 2, the correction amount of each pixel corresponding to the pixel value of each pixel in the flare image. To correct the pixel value of each pixel in the flare image. When the correction map stores the correction amount of each pixel determined using the difference between the evaluation values calculated by Equation 3, the correction amount of each corresponding pixel is calculated from the pixel value of each pixel in the flare image. Is added to correct the pixel value of each pixel in the flare image.

なお、モノクロ画像である場合、フレア画像に対する補正マップは1つとなるが、カラー画像の場合、フレア画像は3つのプレーンから構成されるため、補正マップは3つとなる。すなわち、カラー画像がRGB画像であれば、フレア画像は、赤、青、緑の3つの色のプレーンから構成され、各プレーンを補正するための3つの補正マップが作成され、フレア画像を補正するために使用される。 In the case of a monochrome image, there is one correction map for the flare image, but in the case of a color image, the flare image is composed of three planes, and therefore there are three correction maps. That is, if the color image is an RGB image, the flare image is composed of planes of three colors of red, blue, and green, three correction maps for correcting each plane are created, and the flare image is corrected. Used for.

このようにフレア画像を補正することができるので、結合した場合の輝度の差や色差を低減することができる。また、光源等を補正除外し、光源等に対して補正を実施しないようにすることができるので、光源が暗くならず、色の飽和部の色ずれを防止することができる。さらに、補正マップにLPFを施し、平準化処理を実施することで、補正量の急激な変化をなくし、補正を除外した光源とその周辺との画素値の変化を緩和し、不自然な補正がかからないようにすることができる。 Since the flare image can be corrected in this way, it is possible to reduce the difference in luminance and the color difference when they are combined. Further, since it is possible to exclude the correction of the light source or the like and not perform the correction for the light source or the like, it is possible to prevent the light source from becoming dark and prevent the color shift of the saturated portion of the color. Furthermore, by applying an LPF to the correction map and performing a leveling process, a sharp change in the correction amount is eliminated, and a change in the pixel value between the light source excluding the correction and its surroundings is mitigated, resulting in an unnatural correction. It can be prevented.

図13に示したステップ1310の重複領域の平均値を算出する処理の別の例を、図19を参照して説明する。図13では、重複領域内の評価領域すべてを用いて平均値を算出したが、図19に示す例では、予め条件を設定し、評価領域を分別して平均値を算出する。具体的には、処理に入る前に、予め評価領域の平均値に対して閾値(上限Tup、下限Tdw)を設け、その値を上限値および下限値として設定しておく。 Another example of the process of calculating the average value of the overlapping areas in step 1310 shown in FIG. 13 will be described with reference to FIG. In FIG. 13, the average value is calculated using all the evaluation areas in the overlapping area, but in the example shown in FIG. 19, conditions are set in advance and the evaluation areas are classified to calculate the average value. Specifically, before starting the processing, thresholds (upper limit T up , lower limit T dw ) are set in advance for the average value of the evaluation area, and the values are set as the upper limit value and the lower limit value.

ステップ1900からこの処理を開始し、ステップ1910では、評価領域の1つを任意に選択し、その評価領域が重複領域内にあるか否かを判断する。評価領域は、例えば、画像の左上隅にある評価領域から順に選択することができる。これは一例であるので、これ以外の方法で選択することも可能である。 This process is started from step 1900, and in step 1910, one of the evaluation areas is arbitrarily selected, and it is determined whether or not the evaluation area is within the overlapping area. The evaluation area can be selected in order from the evaluation area in the upper left corner of the image, for example. Since this is an example, it is possible to select by other methods.

評価領域が重複領域内にない場合、ステップ1920へ進み、その評価領域の平均値は積算除外となる。すなわち、その平均値は積算しない。これに対し、重複領域内にある場合、ステップ1930へ進み、その評価領域の平均値が上限Tupより大きいかどうかを判断する。大きい場合は、ステップ1920へ進み、その評価領域の平均値は積算除外となる。同じか、または小さい場合は、ステップ1940へ進み、その評価領域の平均値が下限Tdwより小さいかどうかを判断する。小さい場合は、ステップ1920へ進み、その評価領域の平均値は積算除外となる。同じか、または大きい場合は、ステップ1950へ進み、その評価領域の平均値を積算する。 If the evaluation area is not within the overlapping area, the process proceeds to step 1920, and the average value of the evaluation area is excluded from integration. That is, the average value is not integrated. On the other hand, if it is in the overlapping area, the process proceeds to step 1930, and it is determined whether the average value of the evaluation area is larger than the upper limit T up . If it is larger, the process proceeds to step 1920, and the average value of the evaluation area is excluded from integration. If they are the same or smaller, the process proceeds to step 1940, and it is determined whether the average value of the evaluation area is smaller than the lower limit T dw . If it is smaller, the process proceeds to step 1920, and the average value of the evaluation area is excluded from integration. If they are the same or larger, the process proceeds to step 1950 and the average value of the evaluation area is integrated.

ステップ1920で積算除外となった場合、ステップ1950で積算した場合、ステップ1960へ進み、全評価領域について終了したかどうかを判断する。まだ終了していない場合は、ステップ1910へ戻り、次の評価領域に対して同様の処理を行う。終了した場合は、ステップ1970へ進み、重複領域内にある評価領域の平均値を積算した値を、その評価領域の数で除して重複領域の平均値を算出し、ステップ1980でこの処理を終了する。 If the integration is excluded in step 1920, or if the integration is performed in step 1950, the process proceeds to step 1960, and it is determined whether or not all evaluation areas have been completed. If it has not been completed yet, the processing returns to step 1910, and the same processing is performed on the next evaluation area. When the processing is completed, the process proceeds to step 1970, the value obtained by integrating the average values of the evaluation areas in the overlapping area is divided by the number of the evaluation areas to calculate the average value of the overlapping area, and this processing is performed in step 1980. finish.

上限Tup、下限Tdwは、フレア画像の有無を判断する際の影響を考慮し、積算を除外したい評価領域を適切に除外できるように決定することができる。 The upper limit T up and the lower limit T dw can be determined in consideration of the influence when determining the presence/absence of a flare image so that an evaluation region in which integration should be excluded can be appropriately excluded.

図13に示したステップ1310の重複領域の平均値を算出する処理のさらに別の例を、図20を参照して説明する。図19では、閾値として上限Tup、下限Tdwを設けたが、図20に示す例では、一致度(マッチング度)と呼ばれる指標の閾値を設定し、マッチング度に基づき、積算する評価領域か、積算除外する評価領域かを判断する。なお、マッチング度は、補正基準画像の重複領域に含まれる各評価領域の画像と、補正対象画像であるフレア画像の重複領域に含まれる各評価領域の画像との一致する度合いを表す指標である。画像処理システムは、マッチング度を算出するための一致度算出部を、機能部として備えることができる。 Still another example of the process of calculating the average value of the overlapping areas in step 1310 shown in FIG. 13 will be described with reference to FIG. In FIG. 19, the upper limit T up and the lower limit T dw are provided as the threshold values, but in the example shown in FIG. 20, the threshold value of the index called the matching degree (matching degree) is set, and the evaluation area is calculated based on the matching degree. , It is determined whether the evaluation area is excluded from the integration. The matching degree is an index indicating the degree of matching between the image of each evaluation area included in the overlapping area of the correction reference image and the image of each evaluation area included in the overlapping area of the flare image that is the correction target image. .. The image processing system may include a matching degree calculation unit for calculating the matching degree as a functional unit.

ステップ2000からこの処理を開始し、ステップ2010では、評価領域が重複領域内にあるか否かを判断する。重複領域内にない場合、ステップ2020へ進み、その評価領域の平均値は積算除外となる。重複領域内にある場合、ステップ2030へ進み、その評価領域のマッチング度を算出する。マッチング度およびその算出方法については後述する。ステップ2040では、算出したマッチング度が、予め設定した一致度閾値であるマッチング度の閾値Tより小さいかどうかを判断する。 This processing is started from step 2000, and in step 2010, it is determined whether or not the evaluation area is within the overlapping area. If it is not in the overlapping area, the process proceeds to step 2020, and the average value of the evaluation area is excluded from integration. If it is within the overlapping area, the process proceeds to step 2030, and the matching degree of the evaluation area is calculated. The matching degree and its calculation method will be described later. In step 2040, it is determined whether the calculated matching degree is smaller than a matching degree threshold value T m which is a preset matching degree threshold value.

大きい場合は、ステップ2020へ進み、その評価領域の平均値は積算除外となる。同じか、または小さい場合は、ステップ2050へ進み、その評価領域の平均値を積算する。ステップ2020で積算除外となった場合、ステップ2050で積算した場合、ステップ2060へ進み、全評価領域について終了したかどうかを判断する。まだ終了していない場合は、ステップ2010へ戻り、次の評価領域に対して同様の処理を行う。終了した場合は、ステップ2070へ進み、重複領域内にある評価領域の平均値を積算した値を、その評価領域の数で除して重複領域の平均値を算出し、ステップ2080でこの処理を終了する。 If it is larger, the process proceeds to step 2020, and the average value of the evaluation area is excluded from integration. If they are the same or smaller, the process proceeds to step 2050 and the average value of the evaluation area is integrated. If the integration is excluded in step 2020, or if the integration is performed in step 2050, the process proceeds to step 2060, and it is determined whether or not all evaluation areas have been completed. If not finished yet, the process returns to step 2010, and the same processing is performed on the next evaluation area. When the processing is completed, the process proceeds to step 2070, the value obtained by integrating the average values of the evaluation areas in the overlapping area is divided by the number of the evaluation areas to calculate the average value of the overlapping area, and this processing is performed in step 2080. finish.

図21を参照して、図20で使用されるマッチング度およびマッチング度の算出方法について説明する。繋ぎ位置と評価領域との関係は、図16に示した通りであるが、評価領域は、画像を水平方向および垂直方向に均等に分割しているため、繋ぎ位置と評価領域は完全に一致していない。 With reference to FIG. 21, the matching degree and the method of calculating the matching degree used in FIG. 20 will be described. The relationship between the connection position and the evaluation area is as shown in FIG. 16, but since the evaluation area divides the image evenly in the horizontal direction and the vertical direction, the connection position and the evaluation area completely match each other. Not not.

例えば、図21に示すように、評価領域35を灰色で示した領域とし、その領域の中心の座標をO、Oとする。そして、テンプレートマッチング等により検出した繋ぎ位置をP、Pとし、その繋ぎ位置を中心とした評価領域と同じサイズの破線で示す領域を繋ぎ領域36と定義する。 For example, as shown in FIG. 21, the evaluation area 35 is a gray area, and the coordinates of the center of the area are O 1 and O 2 . Then, the connection positions detected by template matching and the like are defined as P 1 and P 2, and a region indicated by a broken line having the same size as the evaluation region centering on the connection position is defined as a connection region 36.

繋ぎ領域36に含まれる被写体の画像は、フレア画像と基準画像で等しくなる。評価領域35の中心Oと繋ぎ領域36の中心P、評価領域35の中心Oと繋ぎ領域36の中心Pがそれぞれ一致する場合、評価領域35と繋ぎ領域36は一致するため、評価領域35の被写体の画像は一致する。 The image of the subject included in the connection area 36 is the same in the flare image and the reference image. When the center O 1 of the evaluation area 35 and the center P 1 of the connection area 36 and the center O 2 of the evaluation area 35 and the center P 2 of the connection area 36 match, the evaluation area 35 and the connection area 36 match, so The images of the subject in the region 35 match.

しかしながら、中心の座標のいずれかが一致しない場合、評価領域35の被写体の画像は一致しない。空や平坦な壁等の変化が少ない被写体の画像であれば、被写体の画像が完全に一致していなくても、評価値への影響は少ない。反対に、その変化が大きい被写体の画像の場合は、少しのずれで明るさや色味が異なり、評価値への影響が大きい。そこで、マッチング度という指標を用い、評価領域35の被写体の画像が一致しているかどうかを判定している。 However, if any of the center coordinates do not match, the images of the subject in the evaluation area 35 do not match. As long as the images of the subject such as the sky or the flat wall are small, even if the images of the subject do not completely match, the evaluation value is not significantly affected. On the other hand, in the case of an image of a subject whose change is large, the brightness and tint differ with a slight shift, and the influence on the evaluation value is large. Therefore, it is determined whether or not the images of the subject in the evaluation area 35 are matched by using the index of the matching degree.

マッチング度は、評価領域35毎に算出する分散値を用い、下記式4または式5により算出することができる。式4中、mはマッチング度、σはフレア画像の分散値、σは基準画像の分散値である。また、式5中、vはフレア画像の輝度値、vは基準画像の輝度値である。 The matching degree can be calculated by the following Expression 4 or Expression 5 using the variance value calculated for each evaluation area 35. In Expression 4, m is the degree of matching, σ 1 is the dispersion value of the flare image, and σ 2 is the dispersion value of the reference image. Further, in Expression 5, v 1 is the brightness value of the flare image, and v 2 is the brightness value of the reference image.

上記式4におけるマッチング度mは、フレア画像と基準画像の間の分散値の差分の絶対値により定義している。このため、通常はマッチング度が大きいほど被写体の画像が一致するが、この場合は、マッチング度が小さいほど被写体の画像が一致していることを示す。なお、被写体の画像の変化が大きい場合、分散値が大きくなり、被写体の画像の変化が小さい場合、分散値が小さくなる傾向がある。このことから、変化が大きい被写体の画像は少しのずれでもマッチング度への影響が大きく、反対に、変化が小さい被写体の画像は大きいずれでもマッチング度への影響は小さい。 The degree of matching m in the above equation 4 is defined by the absolute value of the difference in the variance value between the flare image and the reference image. Therefore, the higher the degree of matching is, the more the images of the subject generally match, but in this case, the smaller the degree of matching is, the more the images of the subject match. The variance value tends to increase when the change of the subject image is large, and the variance value tends to decrease when the change of the subject image is small. From this, an image of a subject having a large change has a large influence on the matching degree even if it is slightly displaced, and conversely, an image of a subject having a small change has a small influence on the matching degree.

なお、マッチング度を算出するために使用する画素値は、すべての画素の画素値を用いてもよいが、すべての画素値を用いると計算コストがかかることから、画像の明るさに影響がある画素値のみを用いることが好ましい。このような画素値としては、RGB画像であればGの値、YCbCr画像であればYの値を挙げることができる。 Note that the pixel value used to calculate the matching degree may be the pixel value of all pixels, but using all the pixel values has a calculation cost, which affects the brightness of the image. It is preferable to use only pixel values. As such a pixel value, a G value can be used for an RGB image, and a Y value can be used for a YCbCr image.

上記式5では、分散値を用いず、輝度値のみで算出することを示している。式5におけるマッチング度mは、輝度値の差分の絶対値で定義するため、式4と同様、マッチング度が小さいほど被写体の画像が一致していることを示す。 In the above formula 5, it is shown that the variance value is not used and only the brightness value is calculated. Since the matching degree m in Expression 5 is defined by the absolute value of the difference between the brightness values, the smaller the matching degree is, the more the images of the objects match, as in Expression 4.

図17に示す補正量の補間方法の1つの例を、図22を参照して説明する。図22(a)に灰色で示す重複領域30内にある複数の評価領域35の平均値を平均し、重複領域の平均値を算出する。その算出した平均値を、重複領域30内側の中心の斜線で示す部分の補正量とする。 One example of the correction amount interpolation method shown in FIG. 17 will be described with reference to FIG. The average value of the plurality of evaluation areas 35 in the overlapping area 30 shown in gray in FIG. 22A is averaged to calculate the average value of the overlapping area. The calculated average value is used as the correction amount of the portion indicated by the diagonal line in the center inside the overlapping region 30.

図22(b)に示すように、中心C、中心Cから重複領域に向けて水平方向および垂直方向に延ばした交点の重複領域O、その間の算出対象の領域Tとし、それらの補正量をr、r、rとする。また、中心Cと領域Tとの間の距離をd、領域Tと重複領域Oとの間の距離をdとする。すると、領域Tの補正量rは、距離を重みとした加重平均により算出される下記式6で表すことができる。 As shown in FIG. 22B, a center C, an overlapping area O of intersections extending from the center C in the horizontal direction and the vertical direction toward the overlapping area, and a calculation target area T therebetween are set as the correction amount r. Let c , r o , and r t . Further, the distance between the center C and the area T is d 1 , and the distance between the area T and the overlapping area O is d 2 . Then, the correction amount r t of the region T can be expressed by the following formula 6 calculated by a weighted average using the distance as a weight.

上記式6を用いて、図22(b)の中心Cから重複領域に向けて垂直方向および水平方向に延びる各領域の補正量を算出する。図22(c)の補正量が算出された灰色で示される算出領域と重複領域との間の白色で示される領域の補正量は、それらの間の距離に応じた加重平均により算出することができる。算出する領域をT、領域Tから垂直方向上側に延ばしたときの算出領域との交点をHとする。また、垂直方向下側に延ばしたときの重複領域との交点をO、領域Tから水平方向右側に延ばしたときの算出領域との交点をV、水平方向左側に延ばしたときの重複領域との交点をOとする。領域Tと領域Vとの距離をdh1、領域Tと領域Oとの距離をdh2、領域Tと領域Hとの距離をdv1、領域Tと領域Oとの距離をdv2とする。また、領域T、H、V、O、Oのそれぞれの補正量をr、r、r、ro1、ro2とする。すると、領域Tの補正量rは、下記式7により算出することができる。 The correction amount of each area extending in the vertical direction and the horizontal direction from the center C of FIG. 22B toward the overlapping area is calculated by using the above Expression 6. The correction amount of the white region between the calculation region shown in gray and the overlapping region in which the correction amount of FIG. 22C is calculated can be calculated by a weighted average according to the distance between them. it can. Let T be the area to be calculated, and H be the intersection with the calculation area when extending from the area T in the vertical direction. Further, the intersection point with the overlapping area when extended downward in the vertical direction is O 1 , the intersection point with the calculation area when extending from the area T to the right side in the horizontal direction is V, and the overlapping area when extended to the left side in the horizontal direction with The intersection of is set to O 2 . The distance between the region T and the region V is d h1 , the distance between the region T and the region O 2 is d h2 , the distance between the region T and the region H is d v1 , and the distance between the region T and the region O 1 is d v2 . To do. Further, the respective correction amounts of the regions T, H, V, O 1 and O 2 are defined as r t , r h , r v , r o1 and r o2 . Then, the correction amount r t of the region T can be calculated by the following Expression 7.

上記式6および式7を用いて、重複領域内側の評価領域すべての補正量を算出することができる。 The correction amounts of all the evaluation areas inside the overlapping area can be calculated using the above Expressions 6 and 7.

図22に示した補正量の補間方法では、特定の方向によらず、均等に補間している。繋ぎ合わせる画像で重複領域に同じ被写体の画像がある場合は問題が生じないが、障害物があって被写体の画像が異なる場合に、このような均等な補間では問題が生じる。例えば、被写体として一方の画像にのみ上記の指が写っている場合である。このような場合、均等に補間処理を行うことができないため、この例のように、特定の方向から順に補間処理を実施する。この方法を、図23を参照して説明する。 In the correction amount interpolation method shown in FIG. 22, interpolation is performed uniformly regardless of a specific direction. If there are images of the same subject in the overlapping areas in the images to be joined, no problem will occur, but if there are obstacles and the images of the subjects are different, problems will arise with such uniform interpolation. For example, there is a case where the above finger is shown in only one image as a subject. In such a case, since the interpolation processing cannot be performed uniformly, the interpolation processing is performed sequentially from a specific direction as in this example. This method will be described with reference to FIG.

図23(a)に示すように、例えば、重複領域内の3つの評価領域O、O、Oを用い、重複領域の垂直方向の最上部の1段下の領域から順に下方向へ向けて補正量を算出する。最初に、図23(a)に示す重複領域内の最上部の評価領域に接する重複領域内側の領域Tを、補正量を算出する対象の領域とする。その補正量は、領域Tの1段上の重複領域内側に接する評価領域O、領域Tの左右の重複領域内側に接する評価領域O、Oの補正量r、r、rと、領域Tと領域Oの距離d、領域Tと領域Oの距離dを用いて算出する。この補正量rt1は、下記式8を用いて算出することができる。 As shown in FIG. 23A, for example, three evaluation areas O 1 , O 2 , and O 3 in the overlapping area are used, and the areas one step below the uppermost portion in the vertical direction of the overlapping area are sequentially moved downward. To calculate the correction amount. First, the area T 1 inside the overlapping area, which is in contact with the uppermost evaluation area in the overlapping area shown in FIG. 23A, is set as the area for which the correction amount is calculated. The correction amount is evaluated area O 1 in contact with the overlapping region inside of one level upper region T 1, the correction amount r 1, r 2 of the evaluation region O 2, O 3 in contact with the overlapping region inside the left and right regions T 1, and r 3, the distance d 1 of the region T 1 and area O 2, is calculated using the distance d 2 in the region T 1 and region O 3. This correction amount r t1 can be calculated using the following equation 8.

上記式8を用いて、図23(b)に示す領域Tの左右の水平方向にある重複領域内側のすべての領域について補正量を算出する。次に、その1段下の重複領域内側の領域Tの補正量rt2を算出する。この補正量rt2は、領域Tの1段上の領域Pの補正量r、その水平方向の重複領域内側に接する評価領域O、Oの補正量r、rと、領域Tと領域Oの距離d、領域Tと領域Oの距離dを用いて算出する。この補正量rt2は、下記式9により算出することができる。これを垂直方向の下方向へ向けて繰り返し算出することで、重複領域内側の全ての領域の補正量を算出することができる。 The above equation 8 is used to calculate the correction amount for all areas inside the overlapping area in the horizontal direction on the left and right of the area T 1 shown in FIG. Next, the correction amount r t2 of the area T 2 inside the overlapping area that is one step lower than that is calculated. The correction amount r t2 is the correction amount r p of the region P one step above the region T 2 , and the correction amounts r 4 and r 5 of the evaluation regions O 4 and O 5 that are in contact with the inner side of the horizontal overlapping region. T 2 and the region O 4 of the distance d 3, is calculated using the distance d 4 areas T 2 and the region O 5. This correction amount r t2 can be calculated by the following equation 9. By repeatedly calculating this downward in the vertical direction, it is possible to calculate the correction amounts of all the areas inside the overlapping area.

重複領域内の評価領域に極端に大きい、または小さい補正量を有するものがある場合、補間によってその補正量が全体に広がり、結果として不自然な画像になることがある。 If the evaluation area in the overlapping area has an extremely large or small correction amount, the correction amount may be spread over the entire area by interpolation, resulting in an unnatural image.

図14に示すステップ1410の補正除外マップの作成において、補正除外領域となったブロックの平均座標値を算出すると、その平均座標値をその補正除外領域の中心として求めることができる。求めた中心を含む所定の領域(中心領域)に対して補正を行わないように補正量を設定し、その中心領域に向けて、補間処理を実施すれば、極端に大きい、または小さい補正量が波及するのを最小限に留めることができる。 In the creation of the correction exclusion map in step 1410 shown in FIG. 14, when the average coordinate value of the block that has become the correction exclusion area is calculated, the average coordinate value can be obtained as the center of the correction exclusion area. If a correction amount is set so as not to perform correction on a predetermined region (center region) including the obtained center, and interpolation processing is performed toward that center region, an extremely large or small correction amount is obtained. Ripple can be minimized.

図24に示すように、補正除外領域の中心領域が斜線で示される領域であった場合、その領域を補間基準領域とし、周囲の重複領域からその補間基準領域へ向けて重複領域内側の評価領域の補正量を補間により算出する。補正量は、上記式6、式7に示した加重平均を用いて算出することができる。なお、式8、式9を用いて算出してもよい。 As shown in FIG. 24, when the central area of the correction exclusion area is an area indicated by diagonal lines, the area is set as an interpolation reference area, and the evaluation area inside the overlapping area from the surrounding overlapping area toward the interpolation reference area. The correction amount of is calculated by interpolation. The correction amount can be calculated using the weighted average shown in the above equations 6 and 7. It should be noted that the calculation may be performed using Equations 8 and 9.

図24では、重複領域内側の評価領域の補正量を、補間基準領域に向けて四方から補間により算出しているが、特定の方向に特化して補間により算出してもよい。特定の方向に特化して算出すべき場合としては、重複領域に障害物がある場合や均等な補間では問題が生じる場合等である。図25に示す斜線の領域は、補間基準領域60が垂直方向に延び、その補間基準領域60には補正が施されないような値が格納されている。このため、重複領域の内側領域は、補間基準領域60により2つに分けられており、分けられた領域毎に上記式6、式7に示した加重平均により補正量を算出することができる。なお、式8、式9を用いて算出してもよい。 In FIG. 24, the correction amount of the evaluation area inside the overlapping area is calculated by interpolation from four directions toward the interpolation reference area, but it may be calculated by interpolation specialized in a specific direction. The cases where the calculation should be performed in a specific direction are, for example, when there are obstacles in the overlapping area or when there is a problem with uniform interpolation. The shaded area shown in FIG. 25 stores a value such that the interpolation reference area 60 extends in the vertical direction and the interpolation reference area 60 is not corrected. Therefore, the inner area of the overlapping area is divided into two by the interpolation reference area 60, and the correction amount can be calculated by the weighted average shown in the above equations 6 and 7 for each of the divided areas. It should be noted that the calculation may be performed using Equations 8 and 9.

マッチング度が高い重複領域は、同じ被写体の画像が含まれるため、繋ぎ合わせる際の信頼性が高い。反対に、マッチング度が低い重複領域は、異なる被写体の画像が含まれるため、繋ぎ合わせる際の信頼性が低い。このため、マッチング度が低い重複領域では、補正量を算出したとしても誤った値が算出される可能性が高い。 The overlapping regions having a high degree of matching include images of the same subject, and thus have high reliability in joining. On the other hand, the overlapping area having a low degree of matching includes images of different subjects, and thus has low reliability in joining. Therefore, in the overlapping area having a low degree of matching, an incorrect value is likely to be calculated even if the correction amount is calculated.

図26を参照して、マッチング度を用いて重複領域の補正量を補正する処理について説明する。この補正は、図14に示すステップ1420の重複領域の補正量を算出後に行うことができる。処理を開始する前に、マッチング度に対して閾値Tを設け、その値を設定しておく。 With reference to FIG. 26, a process of correcting the correction amount of the overlapping area using the matching degree will be described. This correction can be performed after calculating the correction amount of the overlapping area in step 1420 shown in FIG. Before starting the processing, a threshold value T m is provided for the matching degree and the value is set.

ステップ2600からこの処理を開始し、ステップ2610では、評価領域が重複領域内にあるか否かを判断する。重複領域内にない場合、その評価領域に対しては補正量の補正は行わず、ステップ2650へ進む。重複領域内にある場合、ステップ2620へ進み、その評価領域のマッチング度を参照する。なお、マッチング度が算出されていない場合は、上記の方法によりマッチング度を算出する。 This process is started from step 2600, and in step 2610, it is determined whether or not the evaluation area is within the overlapping area. If it is not within the overlap area, the correction amount is not corrected for the evaluation area, and the process proceeds to step 2650. If it is within the overlapping area, the process proceeds to step 2620 and the matching degree of the evaluation area is referred to. If the matching degree is not calculated, the matching degree is calculated by the above method.

ステップ2630では、参照したマッチング度が、予め設定したマッチング度の閾値Tより大きいかどうかを判断する。小さい場合は、その評価領域に対しては補正量の補正は行わず、ステップ2650へ進む。これに対し、大きい場合は、ステップ2640へ進み、その評価領域の補正量を補正する。補正は、その評価領域の補正量を、補正が施されないような値に補正する。具体的には、補正量が上記の評価値の比率で表される値である場合、補正量は「1.0」に補正し、上記の評価値の差分で表される値である場合、補正量は「0」に補正する。 In step 2630, it is determined whether or not the referred matching degree is larger than a preset matching degree threshold value T m . If it is smaller, the correction amount is not corrected for the evaluation area, and the process proceeds to step 2650. On the other hand, if it is larger, the process proceeds to step 2640 and the correction amount of the evaluation area is corrected. In the correction, the correction amount of the evaluation area is corrected to a value such that the correction is not performed. Specifically, when the correction amount is a value represented by the ratio of the above evaluation values, the correction amount is corrected to “1.0”, and when the correction amount is a value represented by the difference between the above evaluation values, the correction amount Is corrected to "0".

ステップ2650では、全評価領域に対して処理が終了したかを判断する。まだ終了していない場合は、ステップ2610へ戻り、次の評価領域に対して同様の処理を行う。終了した場合は、ステップ2660へ進み、この処理を終了する。 In step 2650, it is determined whether the processing has been completed for all the evaluation areas. If it has not been completed yet, the processing returns to step 2610, and the same processing is performed on the next evaluation area. When the processing is completed, the process proceeds to step 2660 and the processing is completed.

図14に示すステップ1420の重複領域の補正量の算出において、意図しない補正量が算出される場合がある。例えば、繋ぎ合わせる重複領域で同じ被写体の画像がない場合や、明るさが極端に異なる場合である。このような場合でも、極端に大きい、または小さい補正量とならないように所定の範囲内の補正量とすべく、補正量に対して制限処理を行うことができる。 In the calculation of the correction amount of the overlapping area in step 1420 shown in FIG. 14, an unintended correction amount may be calculated. For example, there are cases where there are no images of the same subject in the overlapping areas to be joined, or where the brightness is extremely different. Even in such a case, the correction amount can be limited so that the correction amount falls within a predetermined range so that the correction amount does not become extremely large or small.

図27を参照して、その制限処理について説明する。この制限処理は、図14に示すステップ1420の重複領域の補正量の算出後、またはステップ1430の補間処理による補正量の算出後に実行することができる。制限処理を開始する前に、フレア画像の画素値と制限処理の閾値との関係を示す閾値テーブルを作成しておく。 The restriction process will be described with reference to FIG. This limiting process can be executed after the correction amount of the overlapping region is calculated in step 1420 shown in FIG. 14 or after the correction amount is calculated by the interpolation process in step 1430. Before starting the limiting process, a threshold table showing the relationship between the pixel value of the flare image and the threshold of the limiting process is created.

閾値テーブルは、例えば、図28(a)、(b)に示すようなグラフ、あるいはそれらを数値として保持する表とすることができる。図28(a)は、補正量が評価値の比率の場合のテーブルを示し、図28(b)は、補正量が評価値の差分の場合のテーブルを示している。閾値テーブルでは、フレア画像の画素値としての信号量に対応した上限Tupと下限Tdwの閾値が定められている。 The threshold value table can be, for example, a graph as shown in FIGS. 28A and 28B, or a table holding these as numerical values. FIG. 28A shows a table when the correction amount is the ratio of the evaluation values, and FIG. 28B shows a table when the correction amount is the difference of the evaluation values. In the threshold table, thresholds of the upper limit T up and the lower limit T dw corresponding to the signal amount as the pixel value of the flare image are defined.

図28(a)における上限Tup、下限Tdwは、フレア画像の信号量s、補正を許容する信号量aとすると、下記式10、11で表すことができる。 The upper limit T up and the lower limit T dw in FIG. 28A can be expressed by the following equations 10 and 11 when the signal amount s of the flare image and the signal amount a that allows correction are set.

図28(b)における上限Tup、下限Tdwは、フレア画像の信号量s、補正を許容する信号量aとすると、下記式12、13で表すことができる。 The upper limit T up and the lower limit T dw in FIG. 28B can be expressed by the following equations 12 and 13 when the signal amount s of the flare image and the signal amount a that allows correction are set.

ステップ2700からこの処理を開始し、ステップ2710では、評価領域が重複領域内にあるか否かを判断する。重複領域内にない場合、その評価領域に対しては補正量の補正は行わず、ステップ2750へ進む。重複領域内にある場合、ステップ2720へ進み、図28に示した閾値テーブルを参照し、補正量の閾値であるTup、Tdwを取得する。Tup、Tdwは、上記式10、11または上記式12、13を用いて算出することができる。 This process is started from step 2700, and in step 2710, it is determined whether the evaluation area is within the overlap area. If it is not within the overlap area, the correction amount is not corrected for the evaluation area, and the process proceeds to step 2750. If it is within the overlap region, the process proceeds to step 2720, and the threshold value table shown in FIG. 28 is referred to, and the correction amount threshold values T up and T dw are acquired. T up and T dw can be calculated using Equations 10 and 11 above or Equations 12 and 13 above.

ステップ2730では、その評価領域の補正量が閾値テーブルの上限Tupより大きいか、または下限Tdwより小さいかどうかを判断する。上限Tupより大きいか、または下限Tdwより小さい場合、その評価領域の補正量に対しては制限処理を実行せず、ステップ2750へ進む。これに対し、上限Tupと同じか、小さく、下限Tdwと同じか、大きい場合は、ステップ2740へ進み、その評価領域の補正量に対して制限処理を実行する。 In step 2730, it is determined whether the correction amount of the evaluation area is larger than the upper limit T up of the threshold table or smaller than the lower limit T dw . If it is larger than the upper limit T up or smaller than the lower limit T dw , the limiting process is not executed for the correction amount of the evaluation area, and the process proceeds to step 2750. On the other hand, if it is equal to or smaller than the upper limit T up and smaller than or equal to the lower limit T dw , the process proceeds to step 2740, and the limiting process is executed for the correction amount of the evaluation area.

制限処理は、その評価領域の補正量を、補正が施されないような値に補正する。具体的には、補正量が上記の評価値の比率で表される値である場合、補正量は「1.0」に補正し、上記の評価値の差分で表される値である場合、補正量は「0」に補正する。 The limiting process corrects the correction amount of the evaluation area to a value such that the correction is not performed. Specifically, when the correction amount is a value represented by the ratio of the above evaluation values, the correction amount is corrected to “1.0”, and when the correction amount is a value represented by the difference between the above evaluation values, the correction amount Is corrected to "0".

ステップ2750では、全評価領域に対して処理が終了したかを判断する。まだ終了していない場合は、ステップ2710へ戻り、次の評価領域に対して同様の処理を行う。終了した場合は、ステップ2760へ進み、この処理を終了する。 In step 2750, it is determined whether the processing has been completed for all the evaluation areas. If it has not been completed yet, the processing returns to step 2710, and the same processing is performed on the next evaluation area. When the processing is completed, the process proceeds to step 2760 and the processing is completed.

以上のことから、本発明は、画像にフレアが発生していても、適切に補正を行うことができる。その際、フレア発生確率が最も低い画像を補正基準画像とし、その他の画像を補正することができる。また、通常におけるマッチング度が低い平均値(上記式4および式5で算出されるマッチング度の場合は高い平均値)を積算しないので、フレア画像と補正基準画像の相関性が高い平均値のみを使用して重複領域の平均値を算出できる。光源等の極端に明るい被写体や極端に暗い被写体が入った場合でも、それらの平均値は除外して重複領域の平均値を算出するので、重複領域の平均値算出への影響を少なくすることができる。 From the above, the present invention can appropriately perform correction even if flare occurs in an image. At this time, the image with the lowest flare occurrence probability can be used as the correction reference image and other images can be corrected. Further, since the average value with a low degree of matching in the normal case (the average value with a high degree of matching calculated by the above equations 4 and 5) is not integrated, only the average value with a high correlation between the flare image and the correction reference image is obtained. It can be used to calculate the average value of the overlap region. Even if an extremely bright or extremely dark subject such as a light source enters, the average value of the overlapping areas is calculated by excluding the average value of them, so that the influence on the average value calculation of the overlapping area can be reduced. it can.

制限処理を実施することで、極端に補正量が大きくなる場合にその補正量で補正されないようにすることができ、平準化処理を実施することで、部分的に極端な補正がかからないようにすることができる。また、補正マップに対してリサイズ処理を実施することで、画素単位の演算で補正が可能となり、補正マップの複雑な変換が必要なくなる。加重平均を用いて評価領域全体に対して補正量を算出することで、補正により画像内に輝度の差や色差といった信号段差が発生せず、自然な補正が可能となる。上記の比率や差分により補正量を算出するので、補正したときに信号段差が発生することがない。 By performing the limiting process, it is possible to prevent the correction amount from being corrected when the correction amount becomes extremely large, and by performing the leveling process, it is possible to prevent a partial extreme correction. be able to. Further, by performing the resizing process on the correction map, the correction can be performed by the calculation in pixel units, and the complicated conversion of the correction map is not necessary. By calculating the correction amount for the entire evaluation region using the weighted average, the correction does not cause a signal step such as a difference in luminance or a color difference in the image, and a natural correction can be performed. Since the correction amount is calculated based on the above ratio and difference, a signal step does not occur when the correction is performed.

これまで本発明を、画像処理システム、画像処理方法として上述した実施の形態をもって説明してきたが、本発明は上述した実施の形態に限定されるものではない。本発明は、他の実施の形態、追加、変更、削除など、当業者が想到することができる範囲内で変更することができ、いずれの態様においても本発明の作用・効果を奏する限り、本発明の範囲に含まれるものである。したがって、本発明は、画像処理方法をコンピュータに実行させるためのプログラムやそのプログラムが記録された記録媒体、そのプログラムを、ネットワークを介して提供するサーバ装置等も提供することができるものである。 The present invention has been described so far by the above-described embodiments as an image processing system and an image processing method, but the present invention is not limited to the above-described embodiments. The present invention can be modified within a range that can be conceived by those skilled in the art, such as other embodiments, additions, changes, deletions, etc. It is included in the scope of the invention. Therefore, the present invention can also provide a program for causing a computer to execute the image processing method, a recording medium on which the program is recorded, a server device that provides the program via a network, and the like.

10…全天球撮像カメラ、11、12…魚眼レンズ、13、14…撮像素子、15…撮像SW、20…コントローラ、21…SDRAM、22…外部記憶装置、23…CPU、24…ROM、25…SRAM、26…画像処理ブロック、27…SDRAM I/F、28…外部記憶I/F、29…バス、30…重複領域、31、32…画像、34…テンプレート画像、35…評価領域、36…繋ぎ領域、40…演算部、41…判断部、42…画像決定部、43…画像補正部、50…光源、51…領域、60…補間基準領域 Reference numeral 10... Spherical imaging camera, 11, 12... Fisheye lens, 13, 14... Imaging element, 15... Imaging SW, 20... Controller, 21... SDRAM, 22... External storage device, 23... CPU, 24... ROM, 25... SRAM, 26... Image processing block, 27... SDRAM I/F, 28... External storage I/F, 29... Bus, 30... Overlap area, 31, 32... Image, 34... Template image, 35... Evaluation area, 36... Connection region, 40... Calculation unit, 41... Judgment unit, 42... Image determination unit, 43... Image correction unit, 50... Light source, 51... Region, 60... Interpolation reference region

特許第4739122号公報Japanese Patent No. 4739122

Claims (6)

重複する画像領域を重複領域として含む複数の画像に対して画像処理を行い、前記複数の画像から全天球画像を生成する画像処理システムであって、
前記画像処理システムは、
各画像の前記重複領域内の画像に基づき、前記複数の画像の中に補正を行う画像があるか否かを判断することを特徴とする、画像処理システム。
An image processing system that performs image processing on a plurality of images including overlapping image areas as overlapping areas, and generates a spherical image from the plurality of images,
The image processing system,
An image processing system, comprising: determining whether or not there is an image to be corrected among the plurality of images based on the images in the overlapping area of each image.
前記補正を行う画像の複数の画素の各画素値に基づき、該補正を行う画像内の補正を行わない補正除外領域を判定し、
前記補正除外領域を除く画像領域を補正する、請求項1に記載の画像処理システム。
Based on each pixel value of a plurality of pixels of the image to be corrected, to determine the correction exclusion area in the image to be corrected is not corrected,
The image processing system according to claim 1, wherein an image region excluding the correction exclusion region is corrected.
前記複数の画像の各々を複数の評価領域に分割し、
分割された各前記評価領域につき、前記複数の画像の中に補正を行う画像があるか否かを判断することを特徴とする、請求項1または2に記載の画像処理システム。
Each of the plurality of images is divided into a plurality of evaluation areas,
The image processing system according to claim 1, wherein for each of the divided evaluation areas, it is determined whether or not there is an image to be corrected in the plurality of images.
複数の撮像素子と、前記複数の撮像素子により撮像された重複する画像領域を重複領域として含む複数の画像に対して画像処理を行う画像処理システムとを含む撮像装置であって、前記画像処理システムが、
各画像の前記重複領域内の画像に基づき、前記複数の画像の中に補正を行う画像があるか否かを判断し、全天球画像を生成することを特徴とする、撮像装置。
An image pickup apparatus comprising: a plurality of image pickup devices; and an image processing system that performs image processing on a plurality of images including overlapping image regions picked up by the plurality of image pickup devices as overlapping regions, the image processing system But,
An imaging apparatus, which determines whether or not there is an image to be corrected among the plurality of images based on the images in the overlapping region of each image, and generates a spherical image.
重複する画像領域を重複領域として含む複数の画像に対して画像処理を行い、前記複数の画像から全天球画像を生成する画像処理システムにより実行される画像処理方法であって、
各画像の前記重複領域内の画像に基づき、前記複数の画像の中に補正を行う画像があるか否かを判断するステップを含む、画像処理方法。
An image processing method executed by an image processing system that performs image processing on a plurality of images including overlapping image regions as overlapping regions, and generates a spherical image from the plurality of images,
An image processing method, comprising: determining whether or not there is an image to be corrected among the plurality of images based on the images in the overlapping region of each image.
請求項5に記載の画像処理方法をコンピュータに実行させるためのプログラム。 A program for causing a computer to execute the image processing method according to claim 5.
JP2020073232A 2020-04-16 2020-04-16 Image processing system, imaging device, image processing method and program Active JP6881646B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020073232A JP6881646B2 (en) 2020-04-16 2020-04-16 Image processing system, imaging device, image processing method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020073232A JP6881646B2 (en) 2020-04-16 2020-04-16 Image processing system, imaging device, image processing method and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2019005213A Division JP6696596B2 (en) 2019-01-16 2019-01-16 Image processing system, imaging device, image processing method and program

Publications (2)

Publication Number Publication Date
JP2020115683A true JP2020115683A (en) 2020-07-30
JP6881646B2 JP6881646B2 (en) 2021-06-02

Family

ID=71778717

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020073232A Active JP6881646B2 (en) 2020-04-16 2020-04-16 Image processing system, imaging device, image processing method and program

Country Status (1)

Country Link
JP (1) JP6881646B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002281379A (en) * 2001-03-21 2002-09-27 Ricoh Co Ltd Image pickup system
JP2013198070A (en) * 2012-03-22 2013-09-30 Ricoh Co Ltd Image processing apparatus, image processing method, and imaging apparatus
JP2014078926A (en) * 2012-09-18 2014-05-01 Ricoh Co Ltd Image adjustment device, image adjustment method and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002281379A (en) * 2001-03-21 2002-09-27 Ricoh Co Ltd Image pickup system
JP2013198070A (en) * 2012-03-22 2013-09-30 Ricoh Co Ltd Image processing apparatus, image processing method, and imaging apparatus
JP2014078926A (en) * 2012-09-18 2014-05-01 Ricoh Co Ltd Image adjustment device, image adjustment method and program

Also Published As

Publication number Publication date
JP6881646B2 (en) 2021-06-02

Similar Documents

Publication Publication Date Title
JP6467787B2 (en) Image processing system, imaging apparatus, image processing method, and program
CN108668093B (en) HDR image generation method and device
JP5461568B2 (en) Modify color and full color channel CFA images
US10521891B2 (en) Image processing apparatus, system, image processing method, and non-transitory recording medium
JP5413002B2 (en) Imaging apparatus and method, and program
JP5933105B2 (en) Image processing apparatus, imaging apparatus, filter generation apparatus, image restoration method, and program
JP4375322B2 (en) Image processing apparatus, image processing method, program thereof, and computer-readable recording medium recording the program
CN112532855B (en) Image processing method and device
JP6600936B2 (en) Image processing apparatus, image processing method, image processing system, program, and recording medium
US8310553B2 (en) Image capturing device, image capturing method, and storage medium having stored therein image capturing program
JP6696596B2 (en) Image processing system, imaging device, image processing method and program
US10896344B2 (en) Information processing apparatus, information processing method, and computer program
US11330177B2 (en) Image processing apparatus and image processing method
JP5733588B2 (en) Image processing apparatus and method, and program
JP2017138927A (en) Image processing device, imaging apparatus, control method and program thereof
JP6881646B2 (en) Image processing system, imaging device, image processing method and program
CN109447925B (en) Image processing method and device, storage medium and electronic equipment
CN113315956A (en) Image processing apparatus, image capturing apparatus, image processing method, and machine-readable medium
JP2005136497A (en) Image processing method, and image processing apparatus
JP2017182668A (en) Data processor, imaging device, and data processing method
JP2023111637A (en) Image processing device and method and imaging apparatus
JP2009081893A (en) Image processor, image processing method, program thereof, and computer-readable recording medium with same program recorded thereon

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200420

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200420

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210322

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210419

R151 Written notification of patent or utility model registration

Ref document number: 6881646

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151