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

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

Info

Publication number
JP2017045273A
JP2017045273A JP2015167142A JP2015167142A JP2017045273A JP 2017045273 A JP2017045273 A JP 2017045273A JP 2015167142 A JP2015167142 A JP 2015167142A JP 2015167142 A JP2015167142 A JP 2015167142A JP 2017045273 A JP2017045273 A JP 2017045273A
Authority
JP
Japan
Prior art keywords
image
pixel
edge
resolution
processing unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2015167142A
Other languages
Japanese (ja)
Inventor
木村 直人
Naoto Kimura
直人 木村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2015167142A priority Critical patent/JP2017045273A/en
Publication of JP2017045273A publication Critical patent/JP2017045273A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Studio Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve image quality of a high-resolution image to be generated from a plurality of low-resolution images.SOLUTION: An alignment coordinate conversion unit (403) aligns a plurality of images other than a reference image, which is one of a plurality of input images and serving as alignment reference, with respect to the reference image. A pixel insertion processing unit (404) inserts pixels of the other images into the reference image. A direction-specific filtering processing unit (406) discriminates an edge direction from the image with the pixels inserted thereto, and performs edge direction-specific filtering on the image with the pixels inserted thereto, on the basis of the discriminated edge direction.SELECTED DRAWING: Figure 9

Description

本発明は、複数枚の低解像度の画像から高解像度の画像を生成する画像処理装置、画像処理方法、及びプログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and a program for generating a high resolution image from a plurality of low resolution images.

低解像度の画像から高解像度の画像を生成する超解像技術の一つとして、複数枚の低解像度画像を用いて1枚の高解像度画像を作成するような超解像(以下、複数枚超解像と表記する。)技術が知られている。このような複数枚超解像技術は、デジタルカメラ等において、例えば電子ズームにより拡大されて撮影された画像の画質を上げる際などに用いられている。   As one of the super-resolution techniques for generating a high-resolution image from a low-resolution image, super-resolution that creates a single high-resolution image using multiple low-resolution images (hereinafter, multiple The technology is known. Such a multiple-image super-resolution technique is used in a digital camera or the like when, for example, improving the image quality of an image that is enlarged by electronic zoom.

例えば、ベイヤー配列の色フィルタを有する撮像素子により得られた複数枚の低解像度画像から1枚の高解像度画像が生成される場合の複数枚超解像の処理について簡単に説明する。ベイヤー配列に対応した複数枚の低解像画像からは、R(赤),G(緑),B(青)のそれぞれ同一色成分別の画像が各々生成される。同一色成分別の各画像は、元の低解像度画像において同色成分の各画素に対応した座標にはその色成分の画素値が配され、他の色成分の画素に対応した座標にはゼロ値の画素が補間されて生成される。さらに、それら各色成分別の画像に対して拡大処理が行われることで、各色成分別の高解像度画像が生成される。その後、各色成分別の高解像度画像の中でゼロ値が補間されている座標に対して、他の画像において対応した座標の画素値が挿入される。そして、そのような画素の挿入がなされた後の各色成分別の高解像度画像から、1枚の超解像画像が作成される。   For example, a process of super-resolving a plurality of images when a single high-resolution image is generated from a plurality of low-resolution images obtained by an image sensor having a Bayer color filter will be briefly described. From a plurality of low resolution images corresponding to the Bayer array, R (red), G (green), and B (blue) images of the same color component are generated. For each image of the same color component, the pixel value of the color component is arranged at the coordinates corresponding to each pixel of the same color component in the original low resolution image, and the zero value is set at the coordinates corresponding to the pixels of the other color component Are generated by interpolation. Furthermore, a high-resolution image for each color component is generated by enlarging the image for each color component. Thereafter, the pixel value of the corresponding coordinate in another image is inserted into the coordinate where the zero value is interpolated in the high-resolution image for each color component. Then, one super-resolution image is created from the high-resolution image for each color component after such pixel insertion.

ここで、複数枚超解像の画素挿入処理では、信号の帯域が低くなるのを避けるために、画素挿入がなされる画像に対し、画素挿入の対象画素(ゼロ値の補間画素)の座標に最も近い座標に対応した画素を、他の画像から取得してそのまま挿入する処理が行われる。   Here, in the multi-pixel super-resolution pixel insertion processing, in order to avoid a decrease in the signal band, the coordinates of the pixel insertion target pixel (zero value interpolation pixel) are set to the coordinates of the pixel insertion image. A process of acquiring the pixel corresponding to the closest coordinate from another image and inserting it as it is is performed.

ただし、画素をそのまま挿入すると、例えば画素挿入が行われる側の画像の画素と、挿入された画素との間で位置ズレが生じていた場合には、その位置ズレ部分で不自然な信号の切り替わりが見えてしまうことがある。このように不自然な信号の切り替わり部分は、画質劣化として見えてしまう。したがって、画素挿入が行われた画像に対しては、なるべく画像信号の帯域が低くならないようにしつつ、画素の位置ズレによる不自然な信号の切り替わりによる画質劣化を抑えるような処理が望まれる。   However, if a pixel is inserted as it is, for example, if there is a position shift between the pixel on the side where the pixel is inserted and the inserted pixel, an unnatural signal switching occurs at the position shift portion. May be visible. Such an unnatural signal switching portion appears as image quality degradation. Therefore, for an image in which pixel insertion has been performed, it is desired to perform processing that suppresses image quality deterioration due to unnatural signal switching due to pixel position shifts, while minimizing the bandwidth of the image signal.

なお、特許文献1には、低解像度の入力画像に対して補間画素を生成し、その補間画素を入力画像に対して挿入することで高解像度の拡大画像を生成する技術が開示されている。また、この特許文献1には、補間画素の挿入により生成された拡大画像に対して、エッジ強調処理を施し、さらにエッジ強調処理された画像に対して、エッジの方向に応じて異なるフィルタ処理を施す技術が開示されている。   Patent Document 1 discloses a technique for generating an interpolated pixel for a low-resolution input image and generating a high-resolution enlarged image by inserting the interpolated pixel into the input image. Further, in Patent Document 1, edge enhancement processing is performed on an enlarged image generated by inserting an interpolation pixel, and different filter processing is performed on the image subjected to edge enhancement processing depending on the edge direction. Techniques to apply are disclosed.

特開2008−54267号公報JP 2008-54267 A

ここで、前述したように、複数枚超解像では画素挿入により高解像度画像が生成され、同様に、特許文献1に記載の技術では補間画素の挿入により拡大画像が生成されている。このため、前述したような画素の位置ズレにより不自然な信号の切り替わりが生ずるという複数枚超解像の処理における問題点に対処するために、特許文献1に記載の技術を適用することが考えられる。   Here, as described above, a high resolution image is generated by pixel insertion in the super-resolution of a plurality of images, and similarly, an enlarged image is generated by insertion of interpolation pixels in the technique described in Patent Document 1. For this reason, in order to cope with the problem in the multi-picture super-resolution processing in which the unnatural signal switching occurs due to the pixel positional deviation as described above, it is considered to apply the technique described in Patent Document 1. It is done.

しかしながら、複数枚超解像の処理に対して特許文献1に記載されている技術を適用したとすると、画素挿入の際の位置ズレにより発生する不自然な信号の切り替わり部分が、エッジ強調処理により更に強調されてしまうことになる。このため、特許文献1に記載されているようなエッジの方向に応じた異なるフィルタ処理を行ったとしても、画質向上の効果は殆ど得られない。また、画像内にノイズ等が発生していたような場合には、エッジ強調処理によってそのノイズが更に強調されてしまい、画質が劣化してしまう虞もある。   However, if the technique described in Patent Document 1 is applied to the multi-image super-resolution processing, an unnatural signal switching portion caused by a positional shift at the time of pixel insertion is caused by edge enhancement processing. It will be further emphasized. For this reason, even if different filter processing according to the edge direction as described in Patent Document 1 is performed, the effect of improving the image quality is hardly obtained. Further, when noise or the like is generated in the image, the noise is further emphasized by the edge enhancement processing, and the image quality may be deteriorated.

本発明はこのような問題点に鑑みてなされたものであり、複数枚の低解像度画像から生成される高解像度画像の画質を向上させることを可能とする画像処理装置、画像処理方法、及びプログラムを提供することを目的とする。   The present invention has been made in view of such problems, and an image processing apparatus, an image processing method, and a program that can improve the image quality of a high-resolution image generated from a plurality of low-resolution images. The purpose is to provide.

本発明は、複数枚の低解像度の画像を用いて高解像度の画像を生成する画像処理装置であって、入力された複数枚の画像のうち、位置合わせの基準となる1枚の画像を基準画像とし、前記基準画像に対して、前記基準画像を除く他の複数枚の画像の位置を合わせる位置合わせ手段と、前記基準画像に対して、前記他の複数の画像の画素を挿入して高解像度の画像を生成する画素挿入手段と、前記画素が挿入された後の画像からエッジの方向を判別して、前記判別したエッジの方向に基づき、前記画素の挿入がなされた後の画像に対して、前記エッジの方向別のフィルタリングを行うフィルタ手段とを有することを特徴とする。   The present invention is an image processing apparatus that generates a high-resolution image using a plurality of low-resolution images, and among the plurality of input images, one image serving as a reference for alignment is used as a reference. A positioning unit that aligns the positions of a plurality of other images excluding the reference image with respect to the reference image, and a pixel by inserting pixels of the plurality of other images with respect to the reference image. A pixel insertion unit that generates an image with a resolution; and a direction of an edge is determined from the image after the pixel is inserted, and the image after the pixel is inserted based on the determined edge direction And filtering means for performing filtering according to the direction of the edge.

本発明によれば、複数枚の低解像度画像から生成される高解像度画像の画質を向上させることが可能になる。   According to the present invention, it is possible to improve the image quality of a high-resolution image generated from a plurality of low-resolution images.

本実施形態のデジタルカメラの概略構成を示す図である。It is a figure which shows schematic structure of the digital camera of this embodiment. 本実施形態のデジタルカメラ内の画像処理部の構成例を示す図である。It is a figure which shows the structural example of the image process part in the digital camera of this embodiment. 画像処理部の全体の処理のフローチャートである。It is a flowchart of the whole process of an image processing part. 複数枚超解像の処理で発生する位置ズレの説明図である。It is explanatory drawing of the position shift which generate | occur | produces in the process of multiple super-resolution. ベイヤー配列による各画素の色成分分離の説明図である。It is explanatory drawing of color component separation of each pixel by a Bayer arrangement. 座標変換係数算出部の構成例を示す図である。It is a figure which shows the structural example of a coordinate transformation coefficient calculation part. 座標変換係数算出部における処理のフローチャートである。It is a flowchart of the process in a coordinate transformation coefficient calculation part. 3タップのフィルタによる方向判別の説明図である。It is explanatory drawing of the direction discrimination | determination by a 3-tap filter. 超解像処理部の構成例を示す図である。It is a figure which shows the structural example of a super-resolution process part. 超解像処理部における処理のフローチャートである。It is a flowchart of the process in a super-resolution process part. 座標変換の説明図である。It is explanatory drawing of coordinate transformation. 超解像画像の生成の際の画素挿入の説明図である。It is explanatory drawing of pixel insertion in the case of the production | generation of a super-resolution image. 画素挿入処理部における処理のフローチャートである。It is a flowchart of the process in a pixel insertion process part. 参照座標の説明に用いる図である。It is a figure used for description of a reference coordinate. 超解像画像における非欠落画素と欠落画素の割合の説明図である。It is explanatory drawing of the ratio of the non-missing pixel and a missing pixel in a super-resolution image. 方向別フィルタリング処理部における処理のフローチャートである。It is a flowchart of the process in the filtering process part according to direction. 初期タップ数の説明図である。It is explanatory drawing of the number of initial taps. 5タップのフィルタによる方向判別の説明図である。It is explanatory drawing of the direction discrimination | determination by a 5-tap filter. 方向判別結果の集計処理の説明図である。It is explanatory drawing of the total process of a direction discrimination | determination result. 方向別フィルタリング処理のフィルタ係数算出方法の説明図である。It is explanatory drawing of the filter coefficient calculation method of the filtering process according to direction.

以下、本発明の好ましい実施の形態を、添付の図面に基づいて詳細に説明する。
本実施形態の画像処理装置は、例えばデジタルカメラのような撮像装置だけでなく、タブレット端末、スマートフォン、電子ゲーム機、ドライブレコーダ、ナビゲーション装置、パーソナルコンピュータなど様々な情報処理装置であってもよい。この場合の情報処理装置は、その装置自身に搭載されているカメラ機能により撮影された撮影画像、又は、デジタルカメラ等により撮影された撮影画像を取得し、その撮影画像に対して後述する本実施形態に係る各処理を実行する。また、情報処理装置における本実施形態に係る処理は、内部のCPU等においてコンピュータプログラムを実行することにより実現されてもよい。本実施形態に係る処理を実現するためのコンピュータプログラムは、記録媒体や各種ネットワークや通信回線を介して情報処理装置に提供される。
本実施形態の画像処理装置は、複数枚の低解像度画像を用い、低解像度画像の画素数に対して水平,垂直方向でそれぞれk倍に画素数を拡大した高解像度画像を生成して、高解像度化を実現する超解像処理を行う。
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The image processing apparatus according to the present embodiment is not limited to an imaging apparatus such as a digital camera, but may be various information processing apparatuses such as a tablet terminal, a smartphone, an electronic game machine, a drive recorder, a navigation apparatus, and a personal computer. In this case, the information processing apparatus acquires a photographed image photographed by a camera function mounted on the apparatus itself or a photographed image photographed by a digital camera or the like, and this embodiment described later on the photographed image. Each process according to the form is executed. Further, the processing according to the present embodiment in the information processing apparatus may be realized by executing a computer program in an internal CPU or the like. A computer program for realizing the processing according to the present embodiment is provided to the information processing apparatus via a recording medium, various networks, or a communication line.
The image processing apparatus according to the present embodiment uses a plurality of low-resolution images, generates a high-resolution image in which the number of pixels is expanded k times in the horizontal and vertical directions with respect to the number of pixels of the low-resolution image, Perform super-resolution processing to achieve resolution.

図1には、本実施形態の画像処理装置が適用されたデジタルカメラの概略構成を示す。
図1において、光学系101は、ズームレンズやフォーカスレンズ等から構成されるレンズ群、絞り調整機構、及び、シャッター機構等を有している。この光学系101は、撮像素子102の撮像面上に被写体像等を結像させ、また、撮像素子102の撮像面に被写体像を結像させる際の被写体像の倍率や、ピント位置、光量等を調整する。
FIG. 1 shows a schematic configuration of a digital camera to which the image processing apparatus of this embodiment is applied.
In FIG. 1, an optical system 101 includes a lens group including a zoom lens, a focus lens, and the like, an aperture adjustment mechanism, a shutter mechanism, and the like. The optical system 101 forms a subject image or the like on the imaging surface of the image sensor 102, and the magnification, focus position, light amount, etc. of the subject image when the subject image is imaged on the imaging surface of the image sensor 102. Adjust.

撮像素子102は、光学系101により撮像面上に結像された被写体像等の光学像を光電変換して電気信号に変換するCCDやCMOSセンサー等の光電変換素子である。また、撮像素子102は、撮像面上にいわゆるベイヤー配列となされたR(赤),G(緑),青(B)の原色カラーフィルタを備えており、カラー画像の撮像が可能となされている。A/D変換部103は、撮像素子102から入力されたアナログ撮像信号をデジタルの画像データに変換する。A/D変換部103から出力された画像データは、画像処理部104に送られる。   The imaging element 102 is a photoelectric conversion element such as a CCD or CMOS sensor that photoelectrically converts an optical image such as a subject image formed on the imaging surface by the optical system 101 into an electrical signal. Further, the image sensor 102 includes R (red), G (green), and blue (B) primary color filters arranged in a so-called Bayer array on the imaging surface, so that a color image can be captured. . The A / D conversion unit 103 converts the analog imaging signal input from the imaging element 102 into digital image data. The image data output from the A / D conversion unit 103 is sent to the image processing unit 104.

画像処理部104は、ホワイトバランス補正処理や歪補正、ノイズリダクション処理、現像処理等の通常の信号処理の他に、入力された複数枚の画像を用いて本実施形態の超解像処理を行う。また、画像処理部104は、A/D変換部103から出力された画像だけでなく、記録部108から読み出された画像に対しても同様の超解像処理を行うことができる。画像処理部104にて行われる超解像処理の詳細は後述する。   In addition to normal signal processing such as white balance correction processing, distortion correction, noise reduction processing, and development processing, the image processing unit 104 performs super-resolution processing of this embodiment using a plurality of input images. . The image processing unit 104 can perform the same super-resolution processing not only on the image output from the A / D conversion unit 103 but also on the image read out from the recording unit 108. Details of the super-resolution processing performed in the image processing unit 104 will be described later.

操作部106は、各種ボタンやキー、ダイヤル、タッチパネル等で構成され、それらがユーザにより操作されたときに、そのユーザ操作による指示情報を生成して、システム制御部105に出力する。表示部107は、液晶ディスプレイや有機EL(Electro Luminescence)ディスプレイなどで構成され、撮像素子102で撮像されて画像処理部104で現像された画像や、記録部108から読み出され画像等を表示する。記録部108は、例えば半導体メモリが搭載されたメモリカードや光磁気ディスク等の回転記録体を収容したパッケージなどを用いた情報記録媒体に、画像データや各種情報等を記録し、また、それらデータや情報を読み出す。記録部108は、それら情報記録媒体を着脱可能な機能を備えていてもよい。また、情報記録媒体には、画像データや各種情報の他にプログラムが格納されていてもよい。バス109は、画像処理部104、システム制御部105、表示部107、及び記録部108の間で画像データをやり取りするために用いられる。   The operation unit 106 includes various buttons, keys, a dial, a touch panel, and the like. When these are operated by a user, instruction information generated by the user operation is generated and output to the system control unit 105. The display unit 107 includes a liquid crystal display, an organic EL (Electro Luminescence) display, and the like, and displays an image captured by the image sensor 102 and developed by the image processing unit 104, an image read from the recording unit 108, and the like. . The recording unit 108 records, for example, image data and various information on an information recording medium using a package containing a rotating recording body such as a memory card mounted with a semiconductor memory or a magneto-optical disk. And read information. The recording unit 108 may have a function of detachably attaching these information recording media. The information recording medium may store a program in addition to image data and various types of information. A bus 109 is used to exchange image data among the image processing unit 104, the system control unit 105, the display unit 107, and the recording unit 108.

システム制御部105は、本実施形態の画像処理装置全体の動作を制御、統括する制御機能部である。システム制御部105は、画像処理部104で処理された画像から得られる輝度値や、操作部106を介して入力されたユーザ指示情報に基づいて、光学系101や撮像素子102の駆動制御も行う。また、システム制御部105は、表示部107の表示制御や記録部108の書き込みと読み出しの制御も行う。   The system control unit 105 is a control function unit that controls and controls the overall operation of the image processing apparatus according to the present embodiment. The system control unit 105 also performs drive control of the optical system 101 and the image sensor 102 based on the luminance value obtained from the image processed by the image processing unit 104 and user instruction information input via the operation unit 106. . The system control unit 105 also performs display control of the display unit 107 and writing and reading control of the recording unit 108.

以下、画像処理部104において行われる超解像処理に関わる具体的な構成と処理の流れ等について説明をする。図2には、画像処理部104で行われる超解像処理に関わる具体的な一構成例を示す。
図2に示すように、画像処理部104は、超解像処理に関わる主要な構成として、基準画像選択部201、ベイヤー分離部202、座標変換係数算出部203、メモリ部204、超解像処理部205、YUV変換部206を有する。
また、図3には、図2に示した構成の画像処理部104で行われる処理のフローチャートを示す。以下、図3のフローチャートを参照しながら、図2に構成における各部の動作を説明する。
Hereinafter, a specific configuration and processing flow related to the super-resolution processing performed in the image processing unit 104 will be described. FIG. 2 shows a specific configuration example related to the super-resolution processing performed by the image processing unit 104.
As shown in FIG. 2, the image processing unit 104 includes a reference image selection unit 201, a Bayer separation unit 202, a coordinate conversion coefficient calculation unit 203, a memory unit 204, a super-resolution process, as main components related to the super-resolution processing. Unit 205 and YUV conversion unit 206.
FIG. 3 shows a flowchart of processing performed by the image processing unit 104 having the configuration shown in FIG. The operation of each part in the configuration shown in FIG. 2 will be described below with reference to the flowchart of FIG.

画像処理部104は、ステップS501において、図1のA/D変換部103から順に入力された画像を取得するか、又は、図1の記録部108から順に読み出された画像を取得する。なお、このとき画像処理部104に入力される画像は、前述したカラーフィルタのベイヤー配列に対応した各画素からなる画像であるため、以下、「ベイヤー画像」と表記する。画像処理部104は、ステップS501において、N枚のベイヤー画像を順番に取得する。ステップS501の後、画像処理部104は、基準画像選択部201にて行われるステップS502に処理を移行させる。   In step S501, the image processing unit 104 acquires images sequentially input from the A / D conversion unit 103 in FIG. 1 or acquires images sequentially read from the recording unit 108 in FIG. Note that the image input to the image processing unit 104 at this time is an image including pixels corresponding to the Bayer array of the color filter described above, and is hereinafter referred to as a “Bayer image”. In step S501, the image processing unit 104 sequentially acquires N Bayer images. After step S501, the image processing unit 104 shifts the processing to step S502 performed by the reference image selection unit 201.

ステップS502では、基準画像選択部201は、ステップS501で順に取得された複数枚(N枚)のベイヤー画像のうち、超解像処理を行う上で基準となる画像を選択する。本実施形態の場合、基準画像選択部201は、順に取得した複数枚のベイヤー画像のうち例えば1枚目の画像を、基準となる画像として選択する。なお、超解像処理を行う上で基準となる画像とは、後述する位置合わせの基準となる画像を指す。以下の説明では、位置合わせの基準となる画像を「基準画像」と表記し、それ以外の画像を「非基準画像」と表記する。   In step S502, the reference image selection unit 201 selects an image serving as a reference for performing super-resolution processing from among a plurality (N) of Bayer images sequentially acquired in step S501. In the case of the present embodiment, the reference image selection unit 201 selects, for example, the first image among the plurality of Bayer images acquired in order as a reference image. Note that an image serving as a reference in performing super-resolution processing refers to an image serving as a reference for alignment described later. In the following description, an image serving as a reference for alignment is referred to as “reference image”, and other images are referred to as “non-reference images”.

詳細は後述するが、本実施形態では、基準画像に対して非基準画像の画素を挿入することで超解像画像が生成される。ここで、例えば、図4に示すように、画素2003は画素挿入がなされない画素で、画素2004は他の画像からの画素が挿入される画素である場合を例に挙げる。例えば、画素2004の中心座標2001と、その画素2004に対して挿入される画素の中心座標2002との間に、位置ズレDが生じていたとする。このような位置ズレDが生じている場合、画素2003と画素挿入がなされた後の画素2004との間で、不自然な信号の切り替わりが発生して画質劣化として見えてしまう。したがって、本実施形態では、画素挿入がなされる際の位置ズレDを考慮して、基準画像に対して非基準画像の位置合わせを行うようになされている。   Although details will be described later, in this embodiment, a super-resolution image is generated by inserting pixels of a non-reference image into a reference image. Here, for example, as illustrated in FIG. 4, the pixel 2003 is a pixel into which no pixel is inserted, and the pixel 2004 is a pixel into which a pixel from another image is inserted. For example, it is assumed that there is a positional deviation D between the center coordinate 2001 of the pixel 2004 and the center coordinate 2002 of the pixel inserted with respect to the pixel 2004. When such a positional deviation D occurs, an unnatural signal switching occurs between the pixel 2003 and the pixel 2004 after the pixel insertion, and this appears as image quality degradation. Therefore, in the present embodiment, the non-reference image is aligned with the reference image in consideration of the positional deviation D when the pixels are inserted.

ステップS502の後、基準画像選択部201は、処理をステップS503に進める。
ステップS503では、基準画像選択部201は、前述した複数枚のベイヤー画像から基準画像を選択した後、その基準画像を最初に出力し、次に、各非基準画像を入力の順に出力する。この例では、ステップS501において取得されたN枚のベイヤー画像のうち、1枚目の画像が基準画像として出力され、以下、2枚目〜N枚目の画像が非基準画像として入力の順に出力される。また、基準画像選択部201は、それら画像を順に出力する際には、N枚のベイヤー画像のうちの何枚目の画像であるかを表す変数Mを設定する。例えば基準画像が出力される際には、変数Mは「1」に設定される。ステップS503の後、画像処理部104は、ベイヤー分離部202にて行われるステップS504に処理を移行させる。
After step S502, the reference image selection unit 201 advances the process to step S503.
In step S503, the reference image selection unit 201 selects a reference image from the plurality of Bayer images described above, outputs the reference image first, and then outputs each non-reference image in the order of input. In this example, among the N Bayer images acquired in step S501, the first image is output as a reference image, and the second to Nth images are output as non-reference images in the order of input. Is done. Further, when the reference image selection unit 201 sequentially outputs the images, the reference image selection unit 201 sets a variable M that represents the number of images among the N Bayer images. For example, when the reference image is output, the variable M is set to “1”. After step S503, the image processing unit 104 shifts the processing to step S504 performed by the Bayer separation unit 202.

ステップS504において、ベイヤー分離部202は、ステップS503にて基準画像選択部201から出力されるM枚目のベイヤー画像を、R(赤),G(緑),B(青)の各色成分別に分離して、それぞれ同一色成分別の3枚のモザイク画像を生成する。なお、変数Mが「1」である場合には、ベイヤー分離部202は、ベイヤー画像の基準画像から、R,G,Bの色成分別の3枚のモザイク画像を生成することになる。   In step S504, the Bayer separation unit 202 separates the Mth Bayer image output from the reference image selection unit 201 in step S503 for each color component of R (red), G (green), and B (blue). Then, three mosaic images for each same color component are generated. When the variable M is “1”, the Bayer separation unit 202 generates three mosaic images for each of R, G, and B color components from the reference image of the Bayer image.

以下、図5を参照して、ベイヤー分離部202にて行われるベイヤー画像の色成分分離処理について説明する。
図5(a)は、基準画像選択部201から出力された、水平方向の画素数が「W」で垂直方向の画素数が「H」となされたベイヤー画像の一例を示す。また、図5(b)〜図5(d)は、図5(a)のベイヤー画像を、R,G,Bの各色成分別にそれぞれ分離した各モザイク画像を示している。これら各色成分別のモザイク画像は、元のベイヤー画像において同色成分の各画素に対応した座標にはその色成分の画素値が配され、他の色成分の画素に対応した座標にはゼロ(0)値の画素が補間されて生成される。具体的には、図5(b)はRの色成分に対応したモザイク画像を示している。以下、Rの色成分を「R成分」と表記する。図5(b)のモザイク画像は、図5(a)のベイヤー画像のR成分に対応した各画素値の情報を持つ非欠落画素901Rと、図5(a)のベイヤー画像の画素値の情報を持たずにゼロ(0)値が挿入された欠落画素902とで構成されている。同様に、図5(c),図5(d)のモザイク画像は、それぞれ図5(a)のベイヤー画像のG,Bの色成分対応した各画素値の情報を持つ非欠落画素901G,901Bと、ゼロ値が挿入された欠落画素902とで構成されている。以下、Gの色成分を「G成分」、Bの色成分を「B成分」と表記する。
Hereinafter, the Bayer image color component separation processing performed by the Bayer separation unit 202 will be described with reference to FIG. 5.
FIG. 5A illustrates an example of a Bayer image output from the reference image selection unit 201 and having the horizontal pixel count “W” and the vertical pixel count “H”. FIGS. 5B to 5D show mosaic images obtained by separating the Bayer image of FIG. 5A for each of the R, G, and B color components. In the mosaic image for each color component, the pixel value of the color component is arranged at the coordinates corresponding to each pixel of the same color component in the original Bayer image, and zero (0) is set at the coordinates corresponding to the pixels of other color components. ) Value pixels are generated by interpolation. Specifically, FIG. 5B shows a mosaic image corresponding to the R color component. Hereinafter, the R color component is referred to as “R component”. The mosaic image in FIG. 5B includes the non-missing pixel 901R having information on each pixel value corresponding to the R component of the Bayer image in FIG. 5A and the pixel value information in the Bayer image in FIG. And a missing pixel 902 in which a zero (0) value is inserted. Similarly, the mosaic images in FIGS. 5C and 5D are non-missing pixels 901G and 901B having information on pixel values corresponding to the G and B color components of the Bayer image in FIG. 5A, respectively. And a missing pixel 902 in which a zero value is inserted. Hereinafter, the G color component is referred to as “G component”, and the B color component is referred to as “B component”.

これら図5(a)〜図5(d)で説明したようなベイヤー分離処理にて生成されたR,G,Bの各色成分別の3枚のモザイク画像のデータは、超解像処理部205と座標変換係数算出部203とメモリ部204に送られる。そして、ステップS504の後、画像処理部104は、後述するステップS505とステップS506の処理を経て、ステップS507に処理を進める。   The data of the three mosaic images for each color component of R, G, and B generated by the Bayer separation processing as described in FIGS. 5A to 5D is the super-resolution processing unit 205. To the coordinate conversion coefficient calculation unit 203 and the memory unit 204. After step S504, the image processing unit 104 proceeds to step S507 through steps S505 and S506 described later.

ステップS507では、画像処理部104は、変数Mがベイヤー画像の取得枚数である「N」になっていないか判定する。画像処理部104は、ステップS507においてMがNになっていない(M≠N)と判定した場合には、ステップS508に処理を進め、変数Mをインクリメント(「1」だけ増加)して、ステップS504に処理を戻す。そして、画像処理部104は、ステップS507において、MがNになった(M=N)と判定した場合には、ステップS509に処理を進める。   In step S507, the image processing unit 104 determines whether the variable M is “N”, which is the number of acquired Bayer images. If it is determined in step S507 that M is not N (M ≠ N), the image processing unit 104 proceeds to step S508, increments the variable M (increases by “1”), and proceeds to step S508. The process returns to S504. If the image processing unit 104 determines in step S507 that M has become N (M = N), the image processing unit 104 proceeds to step S509.

ステップS508で変数MがインクリメントされてステップS504の処理に戻ると、ベイヤー分離部202では、次のベイヤー画像に対するベイヤー分離処理が行われることになる。その後、画像処理部104は、後述するステップS505とS506の処理を行った後、ステップS507に処理を進める。このように、画像処理部104は、ステップS504〜S507までの処理を、ステップS508でのインクリメントにより変数Mがベイヤー画像の取得枚数Nになるまで繰り返す。すなわち、画像処理部104は、ステップS504からステップS507までの処理を、1枚目(M=1)のベイヤー画像(基準画像)から、2枚目(M=2)〜N枚目(M=N)の各ベイヤー画像(非基準画像)まで順番に行う。   When the variable M is incremented in step S508 and the process returns to step S504, the Bayer separation unit 202 performs Bayer separation processing on the next Bayer image. Thereafter, the image processing unit 104 performs processing in steps S505 and S506, which will be described later, and then proceeds to step S507. In this manner, the image processing unit 104 repeats the processing from steps S504 to S507 until the variable M becomes the number N of acquired Bayer images by the increment in step S508. That is, the image processing unit 104 performs the processing from step S504 to step S507 from the first (M = 1) Bayer image (reference image) to the second (M = 2) to Nth (M =). N) Each Bayer image (non-reference image) is sequentially performed.

ステップS505の処理は、座標変換係数算出部203にて行われる。座標変換係数算出部203は、ステップS505において、基準画像に対する各非基準画像の位置合わせのために必要な座標変換係数を算出する。本実施形態の場合、座標変換係数算出部203は、G成分のモザイク画像に対して後述するデモザイク処理を行い、そのデモザイク処理後の画像に対して歪曲補正処理を行い、その歪曲補正処理後の画像から、G成分の位置合わせ用画像を作成する。以下、G成分の位置合わせ用画像を、「位置合わせ用G画像」と表記する。座標変換係数算出部203は、変数Mが「1」のときには基準画像の位置合わせ用G画像をメモリ部204に保存し、その後ステップS508で変数Mがインクリメントされる毎に各非基準画像の位置合わせ用G画像を順番に生成してメモリ部204に保存する。そして、座標変換係数算出部203は、基準画像の位置合わせ用G画像と、その後に順番に生成された各非基準画像の位置合わせ用G画像とを用い、基準画像とそれら各非基準画像との間でそれぞれ位置合わせを行うための射影変換係数を算出する。   The process of step S505 is performed by the coordinate conversion coefficient calculation unit 203. In step S505, the coordinate conversion coefficient calculation unit 203 calculates a coordinate conversion coefficient necessary for positioning each non-reference image with respect to the reference image. In the case of the present embodiment, the coordinate conversion coefficient calculation unit 203 performs a demosaic process described later on the mosaic image of the G component, performs a distortion correction process on the image after the demosaic process, and performs the distortion correction process. An image for G component alignment is created from the image. Hereinafter, the G component alignment image is referred to as “alignment G image”. When the variable M is “1”, the coordinate conversion coefficient calculation unit 203 stores the G image for alignment of the reference image in the memory unit 204, and then each time the variable M is incremented in step S508, the position of each non-reference image. The alignment G images are generated in order and stored in the memory unit 204. Then, the coordinate conversion coefficient calculation unit 203 uses the reference G image for alignment of the reference image and the alignment G image for each non-reference image generated in turn thereafter, and uses the reference image and each of the non-reference images. Projective transformation coefficients for positioning each of the two are calculated.

図6には、図3のステップS505の座標変換係数算出処理を行う図2の座標変換係数算出部203の詳細な構成を示す。
この図6に示すように、座標変換係数算出部203は、デモザイク処理部301、歪曲補正処理部302、射影変換係数算出部303、方向判別処理部304を有して構成されている。
また、図7には、図6に示した座標変換係数算出部203で行われる処理のフローチャートを示す。以下、図7のフローチャートを参照しながら、図6に構成における各部の動作を説明する。
FIG. 6 shows a detailed configuration of the coordinate conversion coefficient calculation unit 203 in FIG. 2 that performs the coordinate conversion coefficient calculation processing in step S505 in FIG.
As shown in FIG. 6, the coordinate transformation coefficient calculation unit 203 includes a demosaic processing unit 301, a distortion correction processing unit 302, a projective transformation coefficient calculation unit 303, and a direction determination processing unit 304.
FIG. 7 shows a flowchart of processing performed by the coordinate conversion coefficient calculation unit 203 shown in FIG. The operation of each part in the configuration shown in FIG. 6 will be described below with reference to the flowchart of FIG.

座標変換係数算出部203は、ステップS601において、前述したベイヤー分離部202から入力されたM枚目のG成分のモザイク画像を取得する。ステップS601の後、座標変換係数算出部203は、デモザイク処理部301にて行われるステップS602に処理を移行させる。   In step S601, the coordinate conversion coefficient calculation unit 203 acquires the Mth mosaic image of the G component input from the Bayer separation unit 202 described above. After step S601, the coordinate conversion coefficient calculation unit 203 shifts the processing to step S602 performed in the demosaic processing unit 301.

ステップS602では、デモザイク処理部301は、ステップS601で取得したM枚目のG成分のモザイク画像に対し、デモザイク処理を行う。デモザイク処理としては、線形補間処理や適応補間処理などの公知の処理が用いられる。線形補間処理や適応補間処理の詳細な説明は省略する。ステップS602の後、座標変換係数算出部203は、歪曲補正処理部302にて行われるステップS603に処理を移行させる。   In step S602, the demosaic processing unit 301 performs demosaic processing on the Mth mosaic image of the G component acquired in step S601. As the demosaic process, a known process such as a linear interpolation process or an adaptive interpolation process is used. Detailed description of linear interpolation processing and adaptive interpolation processing will be omitted. After step S602, the coordinate conversion coefficient calculation unit 203 shifts the processing to step S603 performed in the distortion correction processing unit 302.

ステップS603では、歪曲補正処理部302は、ステップS602でデモザイク処理された後のG成分の画像に対し、歪曲補正処理のための座標補正処理を行う。歪曲補正処理としては、図1の光学系101のレンズが有する歪曲収差特性を表すレンズ情報に基づいた画像変形による補正などの公知の処理を用いることができ、その詳細な説明については省略する。なお、歪曲収差特性を表すレンズ情報は、光学系101のレンズの光軸中心からの像高に基づいたR,G,Bの各色成分のズレ量を表す情報である。この歪曲収差特性を表すレンズ情報は、例えば光学系101が有するメモリ(図1では図示を省略している。)や記録部108等に記憶され、システム制御部105にて読み出されて画像処理部104の歪曲補正処理部302に供給される。ステップS602の後、座標変換係数算出部203は、ステップS604に処理を進める。   In step S603, the distortion correction processing unit 302 performs coordinate correction processing for distortion correction processing on the G component image that has been demosaiced in step S602. As the distortion correction processing, known processing such as correction by image deformation based on lens information representing distortion aberration characteristics of the lens of the optical system 101 in FIG. 1 can be used, and detailed description thereof is omitted. The lens information representing the distortion characteristic is information representing the shift amount of each of R, G, and B color components based on the image height from the center of the optical axis of the lens of the optical system 101. The lens information indicating the distortion characteristic is stored in, for example, a memory (not shown in FIG. 1) included in the optical system 101, the recording unit 108, and the like, and is read out by the system control unit 105 to perform image processing. The distortion correction processing unit 302 of the unit 104 is supplied. After step S602, the coordinate conversion coefficient calculation unit 203 advances the process to step S604.

ステップS604では、座標変換係数算出部203は、ステップS603で歪曲補正処理されたG成分の画像が、1枚目(M=1)の基準画像から生成された画像か否か判定する。座標変換係数算出部203は、ステップS604において、1枚目(M=1)の基準画像から生成された画像であると判定した場合には、ステップS611に処理を進める。ステップS611の処理は、方向判別処理部304にて行われる処理である。一方、座標変換係数算出部203は、ステップS604において、1枚目(M=1)の基準画像から生成された画像でないと判定した場合、つまり非基準画像から生成された画像であると判定した場合には、ステップS605へ処理を進める。ステップS605の処理は、射影変換係数算出部303にて行われる処理である。   In step S604, the coordinate conversion coefficient calculation unit 203 determines whether the G component image subjected to the distortion correction process in step S603 is an image generated from the first (M = 1) reference image. If the coordinate conversion coefficient calculation unit 203 determines in step S604 that the image is generated from the first (M = 1) reference image, the process proceeds to step S611. The processing in step S611 is processing performed in the direction determination processing unit 304. On the other hand, the coordinate conversion coefficient calculation unit 203 determines in step S604 that it is not an image generated from the first (M = 1) reference image, that is, an image generated from a non-reference image. In the case, the process proceeds to step S605. The process of step S605 is a process performed by the projective transformation coefficient calculation unit 303.

ステップS611の処理に進んだ場合、方向判別処理部304は、ステップS603の歪曲補正処理後の1枚目(基準画像)のG成分の画像を「基準位置合わせ用G画像」とする。さらに、方向判別処理部304は、この基準位置合わせ用G画像の全ての画素に対し、エッジの方向判別処理を行う。方向判別処理部304にて行われる方向判別処理は、後述する射影変換係数算出部303がステップS609にて行う方向判別処理と同様であり、射影変換係数算出部303が行う方向判別処理の詳細は後述する。ステップS611の後、方向判別処理部304は、ステップS612に処理を進める。   When the processing proceeds to step S611, the direction determination processing unit 304 sets the first component (reference image) G component image after the distortion correction processing in step S603 as a “reference alignment G image”. Further, the direction determination processing unit 304 performs edge direction determination processing for all the pixels of the reference alignment G image. The direction determination processing performed by the direction determination processing unit 304 is the same as the direction determination processing performed by the projection conversion coefficient calculation unit 303 described later in step S609. Details of the direction determination processing performed by the projection conversion coefficient calculation unit 303 are as follows. It will be described later. After step S611, the direction determination processing unit 304 proceeds with the process to step S612.

ステップS612では、方向判別処理部304は、基準の位置合わせ用G画像と、方向判別処理により得られた方向判別結果の情報とを、メモリ部204に保存する。ステップS612の後、座標変換係数算出部203は、図7のフローチャートの処理を終了する。これにより、画像処理部104は、図3のステップS506に処理を進める。   In step S <b> 612, the direction determination processing unit 304 stores the reference alignment G image and direction determination result information obtained by the direction determination processing in the memory unit 204. After step S612, the coordinate conversion coefficient calculation unit 203 ends the process of the flowchart of FIG. Thereby, the image processing unit 104 advances the processing to step S506 in FIG.

一方、ステップS604で変数Mが2以上であるためステップS605の処理に進んだ場合、射影変換係数算出部303は、ステップS603で歪曲補正されたG成分の画像を「非基準位置合わせ用G画像」とする。また、このときの射影変換係数算出部303は、メモリ部204から基準の位置合わせ用G画像を取得する。ステップS605の後、射影変換係数算出部303は、ステップS606に処理を進める。   On the other hand, when the process proceeds to step S605 because the variable M is 2 or more in step S604, the projective transformation coefficient calculation unit 303 determines that the G component image corrected in distortion in step S603 is “G image for non-reference alignment”. " Further, the projective transformation coefficient calculation unit 303 at this time acquires a reference alignment G image from the memory unit 204. After step S605, the projective transformation coefficient calculation unit 303 advances the process to step S606.

ステップS606では、射影変換係数算出部303は、ステップS605で得た非基準位置合わせ用G画像と基準位置合わせ用G画像とを用いて、それら画像間の位置ズレ量を検出する。具体的には、射影変換係数算出部303は、基準位置合わせ用G画像に対応する非基準位置合わせ用G画像の位置ズレ量を画像内の複数個所で検出する。位置ズレ量検出処理は、パターンマッチングを用いた処理など公知の処理を用いることができ、その詳細な説明については省略する。ステップS606の後、射影変換係数算出部303は、ステップS607に処理を進める。   In step S606, the projective transformation coefficient calculation unit 303 detects a positional shift amount between the non-reference alignment G image and the reference alignment G image obtained in step S605. Specifically, the projective transformation coefficient calculation unit 303 detects a positional deviation amount of the non-reference alignment G image corresponding to the reference alignment G image at a plurality of locations in the image. As the positional deviation amount detection process, a known process such as a process using pattern matching can be used, and a detailed description thereof will be omitted. After step S606, the projective transformation coefficient calculation unit 303 advances the process to step S607.

ステップS607では、射影変換係数算出部303は、ステップS606で検出した位置ズレ量から座標変換係数を算出する。本実施形態の場合、射影変換係数算出部303は、座標変換係数として、下記の式(1)に示す射影変換式の係数a0〜a7を算出する。係数a0〜a7は、例えば最小二乗法などの公知の手法を用いて算出することができ、その詳細な説明については省略する。なお、式(1)の(xp,yp)は、座標(x,y)の射影変換後の座標である。ステップS607の後、射影変換係数算出部303は、ステップS608に処理を進める。 In step S607, the projection conversion coefficient calculation unit 303 calculates a coordinate conversion coefficient from the positional deviation amount detected in step S606. In the case of the present embodiment, the projection conversion coefficient calculation unit 303 calculates the coefficients a 0 to a 7 of the projection conversion formula shown in the following formula (1) as coordinate conversion coefficients. The coefficients a 0 to a 7 can be calculated using a known method such as a least square method, for example, and a detailed description thereof will be omitted. Note that (xp, yp) in the equation (1) is a coordinate after the projective transformation of the coordinate (x, y). After step S607, the projective transformation coefficient calculation unit 303 advances the process to step S608.

xp=(a0x+a1y+a2)/(a6x+a7y+1)
yp=(a3x+a4y+a5)/(a6x+a7y+1) ・・・式(1)
xp = (a 0 x + a 1 y + a 2 ) / (a 6 x + a 7 y + 1)
yp = (a 3 x + a 4 y + a 5 ) / (a 6 x + a 7 y + 1) (1)

ステップS608では、射影変換係数算出部303は、ステップS607で算出した座標変換係数a0〜a7を元に、非基準位置合わせ用G画像を変形する。これにより、非基準位置合わせ用G画像と基準位置合わせ用G画像との間の位置が合わせられたことになる。なお、変形処理としては、公知のバイリニア補間処理などを用いることができ、その詳細な説明については省略する。ステップS608の後、射影変換係数算出部303は、ステップS609に処理を進める。 In step S608, the projective transformation coefficient calculation unit 303 transforms the non-reference alignment G image based on the coordinate transformation coefficients a 0 to a 7 calculated in step S607. Thereby, the position between the non-reference alignment G image and the reference alignment G image is adjusted. In addition, as a deformation | transformation process, a well-known bilinear interpolation process etc. can be used, The detailed description is abbreviate | omitted. After step S608, the projective transformation coefficient calculation unit 303 advances the process to step S609.

ステップS609では、射影変換係数算出部303は、ステップS608で変形したM枚目の非基準画像の位置合わせ用G画像の全ての画素に対し、それぞれエッジの方向判別処理を行う。   In step S609, the projective transformation coefficient calculation unit 303 performs edge direction determination processing on all pixels of the alignment G image of the Mth non-reference image deformed in step S608.

以下、図8(a)〜図8(d)を用いて、射影変換係数算出部303がステップS609にて行う方向判別処理について説明する。
本実施形態において、射影変換係数算出部303が行う方向判別処理は、図8(a)〜図8(d)に示すように、例えば着目画素1601を中心として、その着目画素1601の周辺の3×3画素から4方向を判別する処理となされている。ここで、3×3画素の周辺画素のうち、着目画素1601に対して方向判別処理の対象となされる画素を「対象画素」と表記する。射影変換係数算出部303は、図8(a)の対象画素1602,1603の方向、図8(b)の対象画素1604,1605の方向、図8(c)の対象画素1606,1607の方向、図8(d)の対象画素1608,1609の方向を判別する。
Hereinafter, the direction determination process performed by the projective transformation coefficient calculation unit 303 in step S609 will be described with reference to FIGS. 8A to 8D.
In the present embodiment, the direction determination process performed by the projective transformation coefficient calculation unit 303 is, for example, as shown in FIG. 8A to FIG. The process is to determine four directions from × 3 pixels. Here, among the 3 × 3 surrounding pixels, a pixel that is a target of the direction determination process with respect to the target pixel 1601 is referred to as a “target pixel”. The projective transformation coefficient calculation unit 303 includes the direction of the target pixels 1602 and 1603 in FIG. 8A, the direction of the target pixels 1604 and 1605 in FIG. 8B, the direction of the target pixels 1606 and 1607 in FIG. The direction of the target pixels 1608 and 1609 in FIG.

具体的には、着目画素1601の画素の値を「pix」、対象画素の値をpix1,pix2とすると、射影変換係数算出部303は、下記式(2)のような差分絶対値和sadの算出処理を、図8(a)〜図8(d)に示した4方向分についてそれぞれ行う。なお、式(2)中の「pixi」は、対象画素の値pix1,pix2が用いられる。   Specifically, assuming that the pixel value of the pixel of interest 1601 is “pix” and the values of the target pixel are pix1 and pix2, the projective transformation coefficient calculation unit 303 calculates the difference absolute value sum sad as shown in the following equation (2). The calculation process is performed for each of the four directions shown in FIGS. 8 (a) to 8 (d). Note that the values “pix1” and “pix2” of the target pixel are used as “pixi” in Expression (2).

Figure 2017045273
Figure 2017045273

そして、射影変換係数算出部303は、図8(a)〜図8(d)に示した4方向分についてそれぞれ求めた差分絶対値和sad1,sad2,sad3,sad4の中で、最小の差分絶対値和min_sadが算出された方向を、方向判別結果とする。すなわち、この最小の差分絶対値和min_sadが算出された方向は、エッジの方向を表している。ただし、最小の差分絶対値和min_sadと、他の各差分絶対値和sadと間の差分が、差分との比較用として予め設定されている例えば所定の閾値以下であった場合には、射影変換係数算出部303は、着目画素とその周辺画素との間には殆ど差が無いと判断する。そして、この場合、射影変換係数算出部303は、4方向全てについてエッジの方向が検出されなかったとし、方向判別結果としてエラーを出力する。なお、最小の差分絶対値和min_sadと他の各差分絶対値和sadの差分に対する前述の所定の閾値は、任意のパラメータとして、例えば撮影された画像のシーン毎に変えられてもよい。   Then, the projective transformation coefficient calculation unit 303 calculates the smallest absolute difference among the sum of absolute differences sad1, sad2, sad3, and sad4 calculated for the four directions shown in FIGS. 8 (a) to 8 (d). The direction in which the value sum min_sad is calculated is taken as a direction discrimination result. That is, the direction in which this minimum difference absolute value sum min_sad is calculated represents the direction of the edge. However, when the difference between the minimum difference absolute value sum min_sad and each of the other difference absolute value sums sad is equal to or less than a predetermined threshold set in advance for comparison with the difference, for example, projective transformation The coefficient calculation unit 303 determines that there is almost no difference between the pixel of interest and its surrounding pixels. In this case, the projective transformation coefficient calculation unit 303 outputs an error as the direction determination result, assuming that the edge direction is not detected in all four directions. Note that the above-described predetermined threshold value for the difference between the minimum difference absolute value sum min_sad and each other difference absolute value sum sad may be changed as an arbitrary parameter, for example, for each scene of the photographed image.

図7に説明を戻す。
図7のステップS609の後、射影変換係数算出部303は、ステップS610に処理を進める。ステップS610では、射影変換係数算出部303は、ステップS607で算出した座標変換係数をM枚目の非基準画像に対する座標変換係数とし、ステップS608で算出した方向判別結果をM枚目の非基準画像の方向判別結果とし、メモリ部204に保存する。座標変換係数と方向判別結果は後の超解像処理部205で使用する。メモリ部204に保存された、M枚目の非基準画像に対する座標変換係数とその方向判別結果の情報は、後に超解像処理部205で使用される。ステップS610の後、座標変換係数算出部203は、図7のフローチャートの処理を終了する。
以上が、座標変換係数算出部203における図3のステップS505の処理の流れである。
Returning to FIG.
After step S609 in FIG. 7, the projective transformation coefficient calculation unit 303 advances the process to step S610. In step S610, the projective transformation coefficient calculation unit 303 sets the coordinate transformation coefficient calculated in step S607 as the coordinate transformation coefficient for the M-th non-reference image, and uses the direction discrimination result calculated in step S608 as the M-th non-reference image. And stored in the memory unit 204. The coordinate conversion coefficient and the direction determination result are used in the super-resolution processing unit 205 later. Information on the coordinate transformation coefficient and the direction discrimination result for the M-th non-reference image stored in the memory unit 204 is used later in the super-resolution processing unit 205. After step S610, the coordinate conversion coefficient calculation unit 203 ends the process of the flowchart of FIG.
The above is the process flow of step S505 in FIG. 3 in the coordinate conversion coefficient calculation unit 203.

図3に説明を戻す。
図3のステップS505の処理の後、画像処理部104は、図2の超解像処理部205にて行われるステップS506に処理を移行させる。
ステップS506において、超解像処理部205は、低解像度画像を用いて、高解像度画像を作成する超解像処理を行う。本実施形態の場合、超解像処理部205は、基準画像のベイヤー分離処理後のR,G,Bの各色成分別のモザイク画像と、非基準画像のベイヤー分離処理後のR,G,Bの各色成分別のモザイク画像とを用いた超解像処理を行う。超解像処理部205における超解像処理の詳細については後述する。
Returning to FIG.
After the processing in step S505 in FIG. 3, the image processing unit 104 shifts the processing to step S506 performed in the super-resolution processing unit 205 in FIG.
In step S506, the super-resolution processing unit 205 performs super-resolution processing for creating a high-resolution image using the low-resolution image. In the case of the present embodiment, the super-resolution processing unit 205 performs a mosaic image for each R, G, B color component after the Bayer separation process of the reference image and an R, G, B after the Bayer separation process of the non-reference image. Super-resolution processing is performed using a mosaic image for each color component. Details of the super-resolution processing in the super-resolution processing unit 205 will be described later.

ステップS506の後、画像処理部104は、前述したステップ507に処理を進める。そして、ステップS507において、変数Mがベイヤー画像の取得枚数Nになった(M=N)と判定した場合に、画像処理部104は、図2のYUV変換部206にて行われるステップS509に処理を移行させる。   After step S506, the image processing unit 104 advances the process to step 507 described above. If it is determined in step S507 that the variable M has reached the number of acquired Bayer images N (M = N), the image processing unit 104 performs processing in step S509 performed by the YUV conversion unit 206 in FIG. To migrate.

ステップS509の処理に進むと、YUV変換部206は、超解像処理部205の超解像処理により生成されたR,G,Bの各色成分別の超解像画像から、YUV画像を作成する。すなわち、このYUV画像は、R,G,Bの各色成分の超解像画像から作成された高解像度の超解像画像である。式(3)には、YUV変換部206が、R,G,Bの各色成分の画像データからYUV画像のデータを生成する際のデータ変換式を示す。   In step S509, the YUV conversion unit 206 creates a YUV image from the super-resolution image for each color component of R, G, B generated by the super-resolution processing of the super-resolution processing unit 205. . That is, this YUV image is a high-resolution super-resolution image created from the super-resolution image of each color component of R, G, B. Expression (3) shows a data conversion expression when the YUV conversion unit 206 generates YUV image data from image data of R, G, and B color components.

Y=0.299R+0.587G+0.114B
U=−0.169R−0.331G+0.5B ・・・式(3)
V=0.5R−0.419G−0.081B
Y = 0.299R + 0.587G + 0.114B
U = −0.169R−0.331G + 0.5B Formula (3)
V = 0.5R-0.419G-0.081B

そして、画像処理部104は、ステップS509にて作成されたYUV画像のデータを出力すると、図3のフローチャートの処理を終了する。   When the image processing unit 104 outputs the YUV image data created in step S509, the image processing unit 104 ends the process of the flowchart of FIG.

以下、図2の超解像処理部205が図3のフローチャートのステップS506で行う超解像処理の詳細について説明する。
本実施形態では、R,G,Bの各色成分別の低解像度画像の画素数を水平,垂直方向でそれぞれk倍に拡大した高解像度から超解像画像が生成される例を挙げて、超解像処理部205による超解像処理を説明する。
Hereinafter, the details of the super-resolution processing performed by the super-resolution processing unit 205 in FIG. 2 in step S506 of the flowchart in FIG. 3 will be described.
In the present embodiment, an example in which a super-resolution image is generated from a high resolution obtained by enlarging the number of pixels of a low-resolution image for each color component of R, G, and B by k times in the horizontal and vertical directions. Super-resolution processing by the resolution processing unit 205 will be described.

本実施形態では、低解像度画像の画素数を水平,垂直方向でk倍に拡大した高解像度画像が生成されるため、超解像処理部205は、低解像度画像の各画素の座標と高解像度画像の各画素の座標とを対応させるための座標変換処理を行う。この座標変換処理の際、超解像処理部205は、G成分の低解像度画像については、歪曲補正のための座標変換と、低解像度画像と高解像度画像との間で各画素の座標を対応させる位置合わせのための座標変換とを行う。また座標変換処理の際、超解像処理部205は、R,B成分の低解像度画像については、倍率色収差補正のための座標変換と、歪曲補正のための座標変換と、低解像度画像と高解像度画像との間で各画素の座標を対応させる位置合わせのための座標変換とを行う。そして、超解像処理部205は、R,G,Bの各色成分別の低解像度画像に対する座標変換処理後の各座標の画素値を、R,G,Bの各色成分別の高解像度画像のそれぞれ対応した座標の画素値として挿入するような処理を行う。このような画素値の挿入がなされた後、超解像処理部205は、R,G,Bの各成分別の高解像度画像に対して、後述するような欠落画素の補間処理とエッジの方向別のフィルタリング処理を行う。   In the present embodiment, since the high-resolution image is generated by expanding the number of pixels of the low-resolution image by k times in the horizontal and vertical directions, the super-resolution processing unit 205 determines the coordinates and the high-resolution of each pixel of the low-resolution image. A coordinate conversion process for associating the coordinates of each pixel of the image is performed. During this coordinate conversion processing, the super-resolution processing unit 205 corresponds to the coordinate conversion for distortion correction and the coordinates of each pixel between the low-resolution image and the high-resolution image for the G component low-resolution image. And coordinate conversion for alignment. In the coordinate conversion process, the super-resolution processing unit 205 performs coordinate conversion for correcting the lateral chromatic aberration, coordinate conversion for correcting the distortion, low-resolution image, and high-resolution image for the R and B component low-resolution images. Coordinate conversion is performed for alignment in which the coordinates of each pixel correspond to the resolution image. Then, the super-resolution processing unit 205 converts the pixel value of each coordinate after the coordinate conversion processing on the low-resolution image for each color component of R, G, B into the high-resolution image for each color component of R, G, B. A process of inserting the pixel value of the corresponding coordinate is performed. After such pixel values are inserted, the super-resolution processing unit 205 performs missing pixel interpolation processing and edge direction as described later on the high-resolution image for each of R, G, and B components. Perform another filtering process.

図9には、図2の超解像処理部205の詳細な構成例を示す。
図9に示すように、超解像処理部205は、倍率色収差座標補正部401、歪曲座標補正部402、位置合わせ用座標変換部403、画素挿入処理部404、欠落補間処理部405、方向別フィルタリング処理部406を有して構成されている。
また、図10には、図9に示した超解像処理部205の各部で行われる処理のフローチャートを示す。以下、図10のフローチャートを参照しながら、図9に構成における各部の動作を説明する。
FIG. 9 shows a detailed configuration example of the super-resolution processing unit 205 in FIG.
As shown in FIG. 9, the super-resolution processing unit 205 includes a chromatic aberration coordinate correction unit 401, a distortion coordinate correction unit 402, a coordinate conversion unit 403 for alignment, a pixel insertion processing unit 404, a missing interpolation processing unit 405, and a direction-specific operation. A filtering processing unit 406 is included.
FIG. 10 shows a flowchart of processing performed by each unit of the super-resolution processing unit 205 shown in FIG. The operation of each part in the configuration shown in FIG. 9 will be described below with reference to the flowchart of FIG.

図10のフローチャートにおいて、ステップS701からステップS706までの処理は、R,G,Bの各色成分の各画素の座標のみに関する処理となされている。このため、超解像処理部205は、先ずステップS701の処理として、R,G,Bの色成分別の低解像度画像である各モザイク画像の座標をそれぞれ(0,0)に初期化する。本実施形態において、R,G,Bの各色成分別のモザイク画像において初期化された座標(0,0)は、図11(a)に示すように例えば左上の画素の中心の座標を表している。そして、図11(a)に示すように、座標(0,0)から右方向がx方向で下方向がy方向となされている。したがって、R,G,Bの各色成分別のモザイク画像の中の各画素の座標は、それぞれ座標R(x,y)、G(x,y)、B(x,y)で表される。ステップS701の後、超解像処理部205は、倍率色収差座標補正部401にて行われるステップS702に処理を移行させる。   In the flowchart of FIG. 10, the processing from step S701 to step S706 is processing related only to the coordinates of each pixel of each color component of R, G, B. For this reason, the super-resolution processing unit 205 first initializes the coordinates of each mosaic image, which is a low-resolution image for each color component of R, G, and B, to (0, 0) as the process of step S701. In the present embodiment, the coordinates (0, 0) initialized in the mosaic image for each color component of R, G, B represent, for example, the coordinates of the center of the upper left pixel as shown in FIG. Yes. As shown in FIG. 11A, the right direction is the x direction and the downward direction is the y direction from the coordinates (0, 0). Accordingly, the coordinates of each pixel in the mosaic image for each color component of R, G, and B are represented by coordinates R (x, y), G (x, y), and B (x, y), respectively. After step S701, the super-resolution processing unit 205 shifts the processing to step S702 performed by the magnification chromatic aberration coordinate correction unit 401.

ステップS702では、倍率色収差座標補正部401は、R成分とB成分の各モザイク画像の各画素の座標R(x,y)と座標B(x,y)に対して、倍率色収差補正のための座標補正処理を行う。本実施形態では、倍率色収差座標補正部401は、図1の光学系101のレンズが有する倍率色収差特性を表すレンズ情報に基づいて、倍率色収差補正のための座標補正処理を行う。この倍率色収差特性を表すレンズ情報は、光学系101のレンズの光軸中心からの像高に基づいた、G成分に対するR,B成分の各ズレ量を表す情報であり、倍率色収差補正によりR成分とB成分についてのみ座標補正を行うための情報となされている。この倍率色収差特性を表すレンズ情報は、例えば、光学系101に備えられているメモリ(図1では図示を省略している)や記録部108等に記憶されており、システム制御部105にて読み出されて画像処理部104の超解像処理部205に供給される。   In step S702, the magnification chromatic aberration coordinate correction unit 401 corrects the magnification chromatic aberration with respect to the coordinates R (x, y) and coordinates B (x, y) of each pixel of the R component and B component mosaic images. Coordinate correction processing is performed. In the present embodiment, the lateral chromatic aberration coordinate correction unit 401 performs coordinate correction processing for correcting lateral chromatic aberration based on lens information representing the lateral chromatic aberration characteristics of the lens of the optical system 101 in FIG. The lens information representing the magnification chromatic aberration characteristic is information representing each deviation amount of the R and B components with respect to the G component based on the image height from the center of the optical axis of the lens of the optical system 101. And the information for performing the coordinate correction only for the B component. The lens information representing the magnification chromatic aberration characteristic is stored in, for example, a memory (not shown in FIG. 1) provided in the optical system 101, the recording unit 108, and the like, and is read by the system control unit 105. And is supplied to the super-resolution processing unit 205 of the image processing unit 104.

図11(b)と図11(d)は、ステップS702による倍率色収差補正のための座標補正処理前後のR成分とB成分の各座標を表している。図11(b)の図中の白丸は、倍率色収差補正のための座標補正処理前のR成分の各画素の座標R(x,y)を表し、図中の黒丸は座標補正処理後の各座標R(xr,yr)を表している。同様に、図11(d)の図中の白丸は、倍率色収差補正のための座標補正処理前のB成分の各画素の座標B(x,y)を表し、図中の黒丸は座標補正処理後の各座標B(xb,yb)を表している。なお、図11(c)は、G成分のモザイク画像の各画素の座標G(x,y)を表している。G成分については、倍率色収差座標補正部401による座標補正処理がなされないため、図11(c)には倍率色収差補正のための座標補正処理後の座標は描かれていない。ステップS702の後、超解像処理部205は、歪曲座標補正部402にて行われるステップS703に処理を移行させる。   FIG. 11B and FIG. 11D show the coordinates of the R component and the B component before and after the coordinate correction processing for correcting the chromatic aberration of magnification in step S702. The white circles in FIG. 11B represent the coordinates R (x, y) of each pixel of the R component before the coordinate correction process for correcting the lateral chromatic aberration, and the black circles in the figure represent the respective coordinates after the coordinate correction process. The coordinates R (xr, yr) are represented. Similarly, the white circles in FIG. 11D represent the coordinates B (x, y) of each pixel of the B component before the coordinate correction process for correcting the lateral chromatic aberration, and the black circles in the figure represent the coordinate correction process. Each subsequent coordinate B (xb, yb) is represented. Note that FIG. 11C shows the coordinates G (x, y) of each pixel of the mosaic image of the G component. For the G component, the coordinate correction processing by the magnification chromatic aberration coordinate correction unit 401 is not performed, and thus the coordinates after the coordinate correction processing for magnification chromatic aberration correction are not drawn in FIG. After step S702, the super-resolution processing unit 205 shifts the processing to step S703 performed in the distortion coordinate correction unit 402.

ステップS703では、歪曲座標補正部402は、G成分の各画素の座標G(x,y)と、倍率色収差補正の座標補正処理後のR,B成分の各画素の座標R(xr,yr),B(xb,yb)とに対して、歪曲収差補正のための座標補正処理を行う。本実施形態では、歪曲座標補正部402は、光学系101のレンズが有する歪曲収差特性を表すレンズ情報に基づいて歪曲色収差補正のための座標補正処理を行う。この歪曲収差特性を表すレンズ情報は、光学系101のレンズの光軸中心からの像高に基づいたR,G,Bの各色成分のズレ量を表す情報であり、歪曲収差補正のための座標補正処理をR,G,Bの各色成分について行うための情報となされている。この歪曲収差特性を表すレンズ情報は、倍率色収差特性のレンズ情報と同様に、例えば光学系101のメモリ等に記憶され、システム制御部105にて読み出されて画像処理部104の超解像処理部205に供給される。   In step S703, the distortion coordinate correction unit 402 performs the coordinate G (x, y) of each pixel of the G component and the coordinate R (xr, yr) of each pixel of the R and B components after the coordinate correction processing of the magnification chromatic aberration correction. , B (xb, yb) are subjected to coordinate correction processing for distortion correction. In the present embodiment, the distortion coordinate correction unit 402 performs coordinate correction processing for correcting distortion chromatic aberration based on lens information representing distortion aberration characteristics of the lens of the optical system 101. The lens information representing the distortion characteristic is information representing the shift amount of each color component of R, G, B based on the image height from the center of the optical axis of the lens of the optical system 101, and coordinates for correcting distortion aberration. It is information for performing correction processing for each of the R, G, and B color components. The lens information representing the distortion aberration characteristic is stored in, for example, a memory of the optical system 101, and read by the system control unit 105 and super-resolution processing of the image processing unit 104, like the lens information of the lateral chromatic aberration characteristic. Supplied to the unit 205.

図11(e)〜図11(g)は、ステップS703による歪曲収差補正のための座標補正処理前後のR,G,Bの各色成分の各座標を表している。図11(e)の図中の白丸は歪曲収差補正のための座標補正処理前のR成分の各画素の座標R(xr,yr)を表し、図中の黒丸は座標補正処理後の各座標R(xrd,yrd)を表している。同様に、図11(g)の図中の白丸は歪曲収差補正のための座標補正処理前のB成分の各画素の座標B(xb,yb)を表し、図中の黒丸は座標補正処理がなされた後の各座標B(xbd,ybd)を表している。また、図11(f)の図中の白丸は歪曲収差補正のための座標補正処理前のG成分の各画素の座標G(x,y)を表し、図中の黒丸は座標補正処理後の各座標G(xd,yd)を表している。ステップS703の後、超解像処理部205は、位置合わせ用座標変換部403にて行われるステップS704に処理を移行させる。   FIGS. 11E to 11G show the coordinates of the R, G, and B color components before and after the coordinate correction process for correcting distortion aberration in step S703. The white circles in FIG. 11 (e) represent the coordinates R (xr, yr) of each pixel of the R component before the coordinate correction process for distortion correction, and the black circles in the figure represent the coordinates after the coordinate correction process. R (xrd, yrd) is represented. Similarly, white circles in FIG. 11G represent the coordinates B (xb, yb) of each B component pixel before coordinate correction processing for distortion correction, and black circles in the drawing indicate coordinate correction processing. Each coordinate B (xbd, ybd) after being made is represented. Also, the white circles in FIG. 11 (f) represent the coordinates G (x, y) of each pixel of the G component before the coordinate correction process for distortion correction, and the black circles in the figure after the coordinate correction process. Each coordinate G (xd, yd) is represented. After step S703, the super-resolution processing unit 205 shifts the process to step S704 performed in the alignment coordinate conversion unit 403.

ステップS704では、位置合わせ用座標変換部403は、この時点で超解像処理部205に入力されているR,G,Bの各色成分別のモザイク画像が、1枚目の画像(基準画像)から生成されたモザイク画像であるか否かを判定する。位置合わせ用座標変換部403は、ステップS704において、1枚目の基準画像から生成されたモザイク画像であると判定した場合にはステップS705に処理を進める。一方、位置合わせ用座標変換部403は、ステップS704において、1枚目の画像でない非基準画像から生成されたモザイク画像であると判定した場合にはステップS706に処理を進める。   In step S704, the coordinate conversion unit 403 for alignment uses the first image (reference image) as the mosaic image for each color component of R, G, and B input to the super-resolution processing unit 205 at this time. It is determined whether or not the mosaic image is generated from. If the coordinate conversion unit for alignment 403 determines in step S704 that the mosaic image is generated from the first reference image, the process proceeds to step S705. On the other hand, if the coordinate conversion unit for alignment 403 determines in step S704 that the mosaic image is generated from a non-reference image that is not the first image, the process proceeds to step S706.

ステップS705の処理に進むと、位置合わせ用座標変換部403は、歪曲座標補正部402による座標補正処理後のR,G,Bの各色成分の各座標に対して座標拡大処理を行う。すなわち、ステップS705では、1枚目の基準画像に対応したR,G,Bの各色成分の座標に対して、座標拡大処理が行われる。本実施形態の場合、位置合わせ用座標変換部403は、歪曲座標補正部402による座標補正処理後の座標R(xrd,yrd),G(xd,yd),B(xbd,ybd)に対し、下記式(4)の演算により、座標のxとyの値をそれぞれk倍に拡大する。なお、式(4)中のkは、高解像度画像を生成する際の拡大率を表すパラメータである。   In step S705, the coordinate conversion unit for alignment 403 performs coordinate enlargement processing on the coordinates of the R, G, and B color components after the coordinate correction processing by the distortion coordinate correction unit 402. That is, in step S705, coordinate enlargement processing is performed on the coordinates of the R, G, and B color components corresponding to the first reference image. In the case of the present embodiment, the alignment coordinate conversion unit 403 applies the coordinates R (xrd, yrd), G (xd, yd), and B (xbd, ybd) after the coordinate correction processing by the distortion coordinate correction unit 402. The values of x and y of the coordinates are each expanded k times by the calculation of the following equation (4). Note that k in Equation (4) is a parameter that represents an enlargement ratio when generating a high-resolution image.

R(xrd,yrd)・k=R(xrd・k,yrd・k)
G(xd,yd)・k=G(xd・k,yd・k) ・・・式(4)
B(xbd,ybd)・k=B(xbd・k,ybd・k)
R (xrd, yrd) · k = R (xrd · k, yrd · k)
G (xd, yd) · k = G (xd · k, yd · k) (4)
B (xbd, ybd) · k = B (xbd · k, ybd · k)

図11(h)〜図11(j)は、ステップS705の処理による位置合わせ用座標変換部403による座標拡大処理の前後の各座標を表している。図11(h)の図中の白丸は座標拡大処理前のR成分の各座標R(xrd,yrd)を表し、図中の黒丸は座標拡大処理後の各座標R(xrd・k,yrd・k)を表している。図11(i)の図中の白丸は座標拡大処理前のG成分の各座標G(xd,yd)を表し、図中の黒丸は座標拡大処理後の各座標G(xd・k,yd・k)を表している。同様に、図11(j)の図中の白丸は座標拡大処理前のB成分の各画素の座標B(xbd,ybd)を表し、図中の黒丸は座標拡大処理後の各座標B(xbd・k,ybd・k)を表している。   FIGS. 11H to 11J show the coordinates before and after the coordinate enlargement process by the alignment coordinate conversion unit 403 in the process of step S705. In FIG. 11H, white circles represent the coordinates R (xrd, yrd) of the R component before the coordinate enlargement process, and black circles in the figure represent the coordinates R (xrd · k, yrd · y) after the coordinate enlargement process. k). The white circles in FIG. 11 (i) represent the coordinates G (xd, yd) of the G component before the coordinate enlargement process, and the black circles in the figure represent the coordinates G (xd · k, yd ·) after the coordinate enlargement process. k). Similarly, white circles in FIG. 11J represent the coordinates B (xbd, ybd) of each pixel of the B component before the coordinate enlargement process, and black circles in the figure represent the coordinates B (xbd) after the coordinate enlargement process. K, ybd · k).

以下、ステップS705で行われる基準画像のR,G,Bの各色成分の座標に対する座標拡大処理後の各座標値を、座標R(x',y'),G(x',y'),B(x',y')と表記する。ステップS705の後、超解像処理部205は、画素挿入処理部404にて行われるステップS707に処理を移行させる。   Hereinafter, the coordinate values after coordinate enlargement processing for the coordinates of the R, G, and B color components of the reference image performed in step S705 are represented as coordinates R (x ′, y ′), G (x ′, y ′), Indicated as B (x ′, y ′). After step S705, the super-resolution processing unit 205 shifts the processing to step S707 performed in the pixel insertion processing unit 404.

一方、ステップS706の処理に進んだ場合、位置合わせ用座標変換部403は、歪曲座標補正部402による座標補正処理後のR,G,Bの各色成分の各座標に対して、射影変換処理と座標拡大処理を行う。具体的には、位置合わせ用座標変換部403は、図2の座標変換係数算出部203で求められてメモリ部204に保存された座標変換係数を読み出し、その座標変換係数を用いて非基準画像のR,G,Bの各色成分の各座標に対して射影変換処理を行う。これにより、基準画像のR,G,Bの各色成分の各座標に対して、非基準画像のR,G,Bの各色成分の座標が合わせられることになる。そして、位置合わせ用座標変換部403は、その射影変換処理後のR,G,Bの各色成分の座標に対して、座標のx値とy値をそれぞれk倍に拡大する座標拡大処理を行う。   On the other hand, when the process proceeds to step S706, the alignment coordinate conversion unit 403 performs projective conversion processing on the coordinates of the R, G, and B color components after the coordinate correction processing by the distortion coordinate correction unit 402. Perform coordinate enlargement processing. Specifically, the alignment coordinate conversion unit 403 reads out the coordinate conversion coefficient obtained by the coordinate conversion coefficient calculation unit 203 in FIG. 2 and stored in the memory unit 204, and uses the coordinate conversion coefficient to read the non-reference image. Projective transformation processing is performed on the coordinates of the R, G, and B color components. As a result, the coordinates of the R, G, B color components of the non-reference image are matched with the coordinates of the R, G, B color components of the reference image. Then, the alignment coordinate conversion unit 403 performs coordinate expansion processing for expanding the x value and y value of the coordinate by k times with respect to the coordinates of the R, G, and B color components after the projective conversion processing. .

本実施形態では、低解像度画像の画素数を水平,垂直両方向でk倍に拡大した高解像度画像を生成するので、位置合わせ用座標変換部403は、前述の式(1)の射影変換式に対して更に水平,垂直両方向でk倍に座標を拡大するような式(5)の演算を行う。   In this embodiment, a high-resolution image in which the number of pixels of the low-resolution image is expanded k times in both the horizontal and vertical directions is generated. Therefore, the coordinate conversion unit 403 for alignment uses the projection conversion formula of the above-described formula (1). On the other hand, the calculation of Expression (5) is performed to further expand the coordinates k times in both the horizontal and vertical directions.

x'=k・(a0x+a1y+a2)/(a6x+a7y+1)
y'=k・(a3x+a4y+a5)/(a6x+a7y+1) ・・・式(5)
x ′ = k · (a 0 x + a 1 y + a 2 ) / (a 6 x + a 7 y + 1)
y ′ = k · (a 3 x + a 4 y + a 5 ) / (a 6 x + a 7 y + 1) (5)

なお、式(5)において、各係数a0〜a7は、前述した式(1)で用いたものと同じである。また、式(5)に対して入力される座標(x,y)の値は、歪曲座標補正部402がステップS703で求めた座標R(xrd,yrd),G(xd,yd),B(xbd,ybd)の値である。 In Equation (5), the coefficients a 0 to a 7 are the same as those used in Equation (1) described above. In addition, the coordinates (x, y) values input to Equation (5) are the coordinates R (xrd, yrd), G (xd, yd), B () obtained by the distortion coordinate correction unit 402 in step S703. xbd, ybd).

以下、ステップS706で行われる非基準画像のR,G,Bの各色成分の座標に対する射影変換処理と座標拡大処理後の各座標値を、前述のステップS705の場合と同様に、座標R(x',y'),G(x',y'),B(x',y')と表記する。ステップS706の後、超解像処理部205は、画素挿入処理部404にて行われるステップS707に処理を移行させる。   Thereafter, the coordinate values after the projective transformation process and the coordinate enlargement process for the coordinates of the R, G, and B color components of the non-reference image performed in step S706 are set to the coordinates R (x ', Y'), G (x ', y'), and B (x ', y'). After step S706, the super-resolution processing unit 205 shifts the processing to step S707 performed in the pixel insertion processing unit 404.

ステップS707では、画素挿入処理部404は、図2のメモリ部204に保存されているR,G,Bの各色成分別のモザイク画像の各画素値を読み出す。具体的には、画素挿入処理部404は、ステップS702からステップS707までの座標補正処理と座標変換処理が行われる前の各座標R(x,y),G(x,y),B(x,y)に対応した各画素値を読み出す。以下の説明では、それら各座標R(x,y),G(x,y),B(x,y)に対応した各画素値をRpix,Gpix,Bpixと表記する。ステップS707の後、画素挿入処理部404は、ステップS708に処理を進める。   In step S707, the pixel insertion processing unit 404 reads each pixel value of the mosaic image for each color component of R, G, B stored in the memory unit 204 of FIG. Specifically, the pixel insertion processing unit 404 performs coordinate R (x, y), G (x, y), B (x) before the coordinate correction process and the coordinate conversion process from step S702 to step S707 are performed. , Y), each pixel value is read out. In the following description, pixel values corresponding to these coordinates R (x, y), G (x, y), and B (x, y) are expressed as Rpix, Gpix, and Bpix. After step S707, the pixel insertion processing unit 404 advances the process to step S708.

ステップS708では、画素挿入処理部404は、それら各画素値Rpix,Gpix,Bpixと、基準画像と非基準画像の前述した各座標R(x',y'),G(x',y'),B(x',y')とを用いて、R,G,Bの色成分毎に画素挿入処理を行う。   In step S708, the pixel insertion processing unit 404, the pixel values Rpix, Gpix, Bpix, and the above-described coordinates R (x ′, y ′), G (x ′, y ′) of the reference image and the non-reference image. , B (x ′, y ′), pixel insertion processing is performed for each of the R, G, B color components.

以下、超解像処理における画素挿入処理の概念について、図12(a)と図12(b)を用いて説明する。
なお、図12(a)と図12(b)は、例えばG成分を例に挙げて、画素挿入の概念を説明するための図である。ここでは、例えば、水平方向の画素数がWで垂直方向の画像数がHの複数枚の低解像度画像を用い、水平,垂直方向に画素数を2倍に拡大した超解像画像を生成する際に、図12(a)に示すような高解像度画像10aに対して画素挿入処理を行う例を説明する。
Hereinafter, the concept of the pixel insertion process in the super-resolution process will be described with reference to FIGS. 12 (a) and 12 (b).
FIGS. 12A and 12B are diagrams for explaining the concept of pixel insertion, taking the G component as an example. Here, for example, using a plurality of low-resolution images having the number of pixels in the horizontal direction W and the number of images in the vertical direction H, a super-resolution image in which the number of pixels is doubled in the horizontal and vertical directions is generated. At this time, an example in which pixel insertion processing is performed on the high resolution image 10a as shown in FIG.

図12(a)に示した高解像度画像10aは、水平方向が画素数Wで垂直方向が画素数Hの低解像度画像を2倍に拡大して水平方向が画素数2Wで垂直方向が画素数2Hとなされた画像であり、超解像度画像を生成するための土台の役割を担う画像である。ここでは、説明を判り易くするために、図12(a)の例の高解像度画像10aは、全ての画素値が欠落画素を意味するゼロ値となされているとする。超解像処理における画素挿入処理は、低解像度画像の非欠落画素1001の値を、高解像度画像10aの欠落画素1002に挿入する処理である。このような画素挿入処理を、複数枚の低解像度画像を用いて行うことにより、図12(b)に示すような超解像画像10bを生成することができる。   A high-resolution image 10a shown in FIG. 12A is a double-magnification of a low-resolution image having the number of pixels W in the horizontal direction and the number of pixels H in the vertical direction, and the number of pixels in the horizontal direction is 2W and the number of pixels in the vertical direction. This is an image of 2H, and serves as a foundation for generating a super-resolution image. Here, in order to make the explanation easy to understand, in the high resolution image 10a in the example of FIG. 12A, it is assumed that all pixel values are set to zero values that mean missing pixels. The pixel insertion process in the super-resolution process is a process for inserting the value of the non-missing pixel 1001 of the low resolution image into the missing pixel 1002 of the high resolution image 10a. By performing such pixel insertion processing using a plurality of low-resolution images, a super-resolution image 10b as shown in FIG. 12B can be generated.

本実施形態の場合、図9の画素挿入処理部404は、低解像度の基準画像から高解像度画像を生成し、基準画像の高解像度画像の欠落画素を、低解像度画像である複数枚の非基準画像の非欠落画素の画素値を用いて置き換えるような画素挿入処理を行う。   In the case of the present embodiment, the pixel insertion processing unit 404 in FIG. 9 generates a high-resolution image from a low-resolution reference image, and detects missing pixels of the high-resolution image of the reference image as a plurality of non-reference images that are low-resolution images. A pixel insertion process is performed in which the pixel value of the non-missing pixel of the image is replaced.

図13には、図9の画素挿入処理部404が図10のステップS708で行う画素挿入処理のフローチャートを示す。
以下、図13のフローチャートを参照しながら、画素挿入処理部404による画素挿入処理について詳細に説明する。なお、図13ではG成分を例に挙げて画素挿入処理を説明しているが、R,B成分の場合も同様の処理であり、図13においてG成分に係る処理をそれぞれR,B成分の処理に代えることで実現できるため、R,B成分の画素挿入処理の説明については省略する。
FIG. 13 shows a flowchart of the pixel insertion processing performed by the pixel insertion processing unit 404 in FIG. 9 in step S708 in FIG.
Hereinafter, the pixel insertion processing by the pixel insertion processing unit 404 will be described in detail with reference to the flowchart of FIG. In FIG. 13, the pixel insertion process is described by taking the G component as an example, but the same process is performed for the R and B components, and the process related to the G component in FIG. Since this can be realized by replacing the processing, the description of the R and B component pixel insertion processing is omitted.

画素挿入処理部404は、先ず、ステップS801の処理として、基準画像から求められた前述したG成分の座標座標G(x',y')に最も近く且つ整数で表すことのできる座標を参照座標G0(x0,y0)として算出する。図14(a)は、G成分の高解像度画像1100において、座標G(x',y')と参照座標G0(x0,y0)の一例を示した図である。図14(b)は、図14(a)の座標G(x',y')と参照座標G0(x0,y0)の1画素分を抜き出して拡大した図である。参照座標G0(x0,y0)は、下記の式(6)により算出される。ステップS801の後、画素挿入処理部404は、ステップS802に処理を進める。   First, in step S801, the pixel insertion processing unit 404 uses, as reference coordinates, coordinates that are closest to the G component coordinate coordinates G (x ′, y ′) obtained from the reference image and can be represented by integers. Calculate as G0 (x0, y0). FIG. 14A is a diagram illustrating an example of the coordinates G (x ′, y ′) and the reference coordinates G0 (x0, y0) in the G component high-resolution image 1100. FIG. 14B is an enlarged view of one pixel extracted from the coordinates G (x ′, y ′) and the reference coordinates G0 (x0, y0) in FIG. The reference coordinates G0 (x0, y0) are calculated by the following equation (6). After step S801, the pixel insertion processing unit 404 advances the process to step S802.

Figure 2017045273
Figure 2017045273

ステップS802では、画素挿入処理部404は、前述の画素値Gpixがゼロ値(0)でないか否か(ゼロより大きいか否か)の判定を行う。画素挿入処理部404は、ステップS802において画素値Gpixがゼロ値でないと判定した場合には、その画素値Gpixの画素は非欠落画素であると判断して、ステップS803に処理を進める。一方、画素挿入処理部404は、ステップS802において画素値Gpixがゼロ値であると判定した場合には、その画素値Gpixの画素は欠落画素であると判断して、ステップS804に処理を進める。   In step S802, the pixel insertion processing unit 404 determines whether or not the above-described pixel value Gpix is not a zero value (0) (is greater than zero). If the pixel insertion processing unit 404 determines in step S802 that the pixel value Gpix is not zero, the pixel insertion processing unit 404 determines that the pixel having the pixel value Gpix is a non-missing pixel, and proceeds to step S803. On the other hand, if the pixel insertion processing unit 404 determines in step S802 that the pixel value Gpix is a zero value, the pixel insertion processing unit 404 determines that the pixel having the pixel value Gpix is a missing pixel, and proceeds to step S804.

ステップS802からステップS803の処理に進むと、画素挿入処理部404は、図14(b)に示すように座標G(x',y')と参照座標G0(x0,y0)との間の距離d(G)を算出する。この距離d(G)は、後のステップS808やS810の判定の際に用いられる。   When the processing proceeds from step S802 to step S803, the pixel insertion processing unit 404, as shown in FIG. 14B, the distance between the coordinates G (x ′, y ′) and the reference coordinates G0 (x0, y0). d (G) is calculated. This distance d (G) is used in subsequent determinations in steps S808 and S810.

以下、図12(a)と図12(b)を用いて、距離d(G)について説明する。
座標G(x',y')に最も近く存在し且つ整数で表される参照座標G0(x0,y0)は、高解像度画像1100の或る画素の中心を示す座標である。したがって、本実施形態では、画素挿入処理部404は、図14(b)の画素の拡大図で示すように、参照座標G0(x0,y0)に対し、座標G(x',y')がどれだけ近いかを評価する指標として距離d(G)を算出する。そして、画素挿入処理部404は、その距離d(G)の値を用いて、画素挿入を行うか否かの判定を行う。画素挿入処理部404は、下記の式(7)により距離d(G)を算出する。ステップS803の後、画素挿入処理部404は、ステップS805に処理を進める。
Hereinafter, the distance d (G) will be described with reference to FIGS. 12 (a) and 12 (b).
A reference coordinate G0 (x0, y0) that is closest to the coordinate G (x ′, y ′) and is represented by an integer is a coordinate that indicates the center of a certain pixel of the high-resolution image 1100. Therefore, in the present embodiment, the pixel insertion processing unit 404 has coordinates G (x ′, y ′) relative to the reference coordinates G0 (x0, y0) as shown in the enlarged view of the pixels in FIG. The distance d (G) is calculated as an index for evaluating how close it is. Then, the pixel insertion processing unit 404 determines whether or not to perform pixel insertion using the value of the distance d (G). The pixel insertion processing unit 404 calculates the distance d (G) by the following equation (7). After step S803, the pixel insertion processing unit 404 advances the process to step S805.

Figure 2017045273
Figure 2017045273

一方、ステップS802からステップS804の処理に進んだ場合、画素挿入処理部404は、画素値Gpixが欠落画素であると判断しているので、例外処理として、距離d(G)で表現できる最大の値を入力する。例えば8ビットまでしか距離d(G)が表現できない場合は、その距離d(G)の値として「255」を入力する。ステップS804の後、画素挿入処理部404は、ステップS805に処理を進める。   On the other hand, when the process proceeds from step S802 to step S804, the pixel insertion processing unit 404 determines that the pixel value Gpix is a missing pixel, and therefore, as the exception process, the maximum that can be expressed by the distance d (G). Enter a value. For example, when the distance d (G) can be expressed only up to 8 bits, “255” is input as the value of the distance d (G). After step S804, the pixel insertion processing unit 404 advances the process to step S805.

ステップS805では、画素挿入処理部404は、変数Mが「1」より大きいか否か判定する。すなわち、ステップS805では、現時点において処理されているM枚目の画像が2枚目以降の非基準画像であるか、又は、1枚目の基準画像であるかが判定される。画素挿入処理部404は、ステップS805において変数Mが「1」より大きく、2枚目以降の非基準画像の処理であると判定した場合には、ステップS808に処理を進める。一方、画素挿入処理部404は、ステップS805において変数Mが1であり、1枚目の基準画像の処理であると判定した場合には、ステップS806に処理を進める。   In step S805, the pixel insertion processing unit 404 determines whether or not the variable M is greater than “1”. That is, in step S805, it is determined whether the M-th image currently being processed is the second or later non-reference image or the first reference image. If the pixel insertion processing unit 404 determines in step S805 that the variable M is greater than “1” and is processing of the second and subsequent non-reference images, the pixel insertion processing unit 404 proceeds to step S808. On the other hand, if the variable M is 1 in step S805 and the pixel insertion processing unit 404 determines that the process is for the first reference image, the process proceeds to step S806.

ステップS806の処理に進むと、画素挿入処理部404は、ステップS803で求めた距離d(G)を、基準画像における座標G(x',y')と参照座標G0(x0,y0)の距離d0(G)としてメモリ部204に保存する。画素挿入処理部404は、これ以降、距離d0(G)を2枚目以降の非基準画像で求められる距離d(G)の値との比較に用いる。そして、画素挿入処理部404は、随時、距離d(G)の値に応じて、距離d0(G)の値を更新する。ステップS806の後、画素挿入処理部404は、ステップS807に処理を進める。   When the processing proceeds to step S806, the pixel insertion processing unit 404 uses the distance d (G) obtained in step S803 as the distance between the coordinate G (x ′, y ′) and the reference coordinate G0 (x0, y0) in the standard image. It is stored in the memory unit 204 as d0 (G). Thereafter, the pixel insertion processing unit 404 uses the distance d0 (G) for comparison with the value of the distance d (G) obtained from the second and subsequent non-reference images. Then, the pixel insertion processing unit 404 updates the value of the distance d0 (G) as needed according to the value of the distance d (G). After step S806, the pixel insertion processing unit 404 advances the process to step S807.

ステップS807では、画素挿入処理部404は、基準画像における座標G(x',y')の画素値Gpixを、参照座標G0(x0,y0)の画素値Gpix0としてメモリ部204に保存する。そして、画素挿入処理部404は、1枚目の基準画像のみについて、各画素値Gpix0を用いて高解像度画像1100を新規に作成する。この基準画像のみで画素値Gpix0を用いて新規に作成された高解像度画像1100は、後に行われるステップS812で2枚目以降の画像からの画素値が挿入されることにより随時更新されることになる。ステップS807の後、画素挿入処理部404は、現時点で処理の対象となっている座標(x',y')に対する画素挿入処理を終了する。その後、画素挿入処理部404は、次の画像の処理を行うときに、図13のフローチャートの処理を開始する。   In step S807, the pixel insertion processing unit 404 stores the pixel value Gpix of the coordinate G (x ′, y ′) in the standard image in the memory unit 204 as the pixel value Gpix0 of the reference coordinate G0 (x0, y0). Then, the pixel insertion processing unit 404 newly creates a high-resolution image 1100 using only each pixel value Gpix0 for only the first reference image. The high-resolution image 1100 newly created using only the reference image using the pixel value Gpix0 is updated as needed by inserting pixel values from the second and subsequent images in the subsequent step S812. Become. After step S807, the pixel insertion processing unit 404 ends the pixel insertion process for the coordinates (x ′, y ′) currently being processed. Thereafter, the pixel insertion processing unit 404 starts the processing of the flowchart of FIG. 13 when processing the next image.

ステップS805からステップS808の処理に進むと、画素挿入処理部404は、距離d(G)が、距離との比較用に予め設定されている所定の閾値TH(G)未満であるか否か判定する。画素挿入処理部404は、ステップS808において、距離d(G)が閾値TH(G)未満であると判定した場合には、ステップS809に処理を進める。一方、画素挿入処理部404は、ステップS808において、距離d(G)が閾値TH(G)以上であると判定した場合には、現時点で処理に対象となっている座標(x',y')についての画素挿入処理を終了する。その後、画素挿入処理部404は、次の画像の処理を行うときに、図13のフローチャートの処理を開始する。   When the process proceeds from step S805 to step S808, the pixel insertion processing unit 404 determines whether the distance d (G) is less than a predetermined threshold TH (G) set in advance for comparison with the distance. To do. If the pixel insertion processing unit 404 determines in step S808 that the distance d (G) is less than the threshold value TH (G), the process proceeds to step S809. On the other hand, if the pixel insertion processing unit 404 determines in step S808 that the distance d (G) is greater than or equal to the threshold value TH (G), the coordinates (x ′, y ′) currently targeted for processing are determined. ) Ends the pixel insertion process. Thereafter, the pixel insertion processing unit 404 starts the processing of the flowchart of FIG. 13 when processing the next image.

ステップS809の処理に進んだ場合、画素挿入処理部404は、参照座標G0(x0,y0)について保存している距離d0(G)の値をメモリ部204から読み出す。ステップS809の後、画素挿入処理部404は、ステップS810に処理を進める。   When the process proceeds to step S809, the pixel insertion processing unit 404 reads the value of the distance d0 (G) stored for the reference coordinate G0 (x0, y0) from the memory unit 204. After step S809, the pixel insertion processing unit 404 advances the process to step S810.

ステップS810では、画素挿入処理部404は、距離d(G)と距離d0(G)を比較する。画素挿入処理部404は、ステップS810において、距離d(G)が距離d0(G)よりも小さいと判定した場合はステップS811に処理を進める。一方、画素挿入処理部404は、ステップS810において、距離d(G)が距離d0(G)以上であると判定した場合は、現時点で処理の対象となっている座標(x',y')の画素挿入処理を終了する。   In step S810, the pixel insertion processing unit 404 compares the distance d (G) with the distance d0 (G). If the pixel insertion processing unit 404 determines in step S810 that the distance d (G) is smaller than the distance d0 (G), the pixel insertion processing unit 404 proceeds to step S811. On the other hand, if the pixel insertion processing unit 404 determines in step S810 that the distance d (G) is greater than or equal to the distance d0 (G), the coordinates (x ′, y ′) currently being processed are determined. This completes the pixel insertion process.

ステップS811の処理に進むと、画素挿入処理部404は、距離d0(G)の値を、距離d(G)に更新してメモリ部204に保存する。ステップS811の後、画素挿入処理部404は、ステップS812に処理を進める。   In step S811, the pixel insertion processing unit 404 updates the value of the distance d0 (G) to the distance d (G) and stores it in the memory unit 204. After step S811, the pixel insertion processing unit 404 advances the process to step S812.

ステップS812では、画素挿入処理部404は、距離d(G)に対応する画素値Gpixを画素値Gpix0として更新して、メモリ部204に保存する。メモリ部204への保存後、画素挿入処理部404は、現時点で処理の対象となっている座標(x',y')の画素挿入処理を終了する。以上が、画素挿入処理部404により行われるステップS708の詳細な処理である。   In step S812, the pixel insertion processing unit 404 updates the pixel value Gpix corresponding to the distance d (G) as the pixel value Gpix0 and stores it in the memory unit 204. After storage in the memory unit 204, the pixel insertion processing unit 404 ends the pixel insertion processing of the coordinates (x ′, y ′) that are currently processed. The above is the detailed processing of step S708 performed by the pixel insertion processing unit 404.

図10に説明を戻す。
ステップS708の後、超解像処理部205は、ステップS709に処理を進める。ステップS709では、超解像処理部205は、ステップS708による画素挿入処理後、現時点で処理の対象となっているM枚目の画像の全ての座標に対し、ステップS702からステップS708までの処理が終わったか否かを判定する。超解像処理部205は、ステップS709において、全ての座標に対する処理が終わっていないと判定した場合にはステップS710に処理を進め、全ての座標に対する処理が終わったと判定した場合にはステップS711に処理を進める。
Returning to FIG.
After step S708, the super-resolution processing unit 205 advances the process to step S709. In step S709, after the pixel insertion processing in step S708, the super-resolution processing unit 205 performs the processing from step S702 to step S708 on all the coordinates of the Mth image currently being processed. Determine if it is over. If the super-resolution processing unit 205 determines in step S709 that the processing for all coordinates has not been completed, the process proceeds to step S710. If the super-resolution processing unit 205 determines that the processing for all coordinates has been completed, the process proceeds to step S711. Proceed with the process.

ステップS710の処理に進んだ場合、超解像処理部205は、現時点で処理の対象となっている各座標R(x,y)、G(x,y)、B(x,y)を、次の座標に更新して、ステップS702以降の処理を行う。   When the processing proceeds to step S710, the super-resolution processing unit 205 determines the coordinates R (x, y), G (x, y), and B (x, y) that are currently processed, The process is updated to the next coordinate, and the processes after step S702 are performed.

ステップS711の処理に進んだ場合、超解像処理部205は、現時点で処理の対象となっている画像が最後のN枚目の画像か否かを判定する。超解像処理部205は、ステップS711において、最後のN枚目の画像であると判定した場合にはステップS712に処理を進め、一方、最後のN枚目の画像でないと判定した場合にはステップS714に処理を進める。   When the processing proceeds to step S711, the super-resolution processing unit 205 determines whether or not the image currently being processed is the last N-th image. If the super-resolution processing unit 205 determines in step S711 that the image is the last N-th image, the super-resolution processing unit 205 proceeds to step S712. If the super-resolution processing unit 205 determines that the image is not the last N-th image, The process proceeds to step S714.

ステップS712の処理は、欠落補間処理部405により行われる処理である。ステップS712において、欠落補間処理部405は、ステップS708による画素挿入処理がそれぞれ終わった後のN枚目のR,G,Bの各色成分別の高解像度画像に対して、それぞれ欠落補間処理を行う。ステップS712で行われる欠落補間処理は、R,G,Bの各色成分別の高解像度画像の中で未だに欠落画素であり値がゼロになっている画素を、周辺の非欠落画素から、エッジの方向を加味した適応補間処理により生成した画素値で置き換える処理である。このステップS712の欠落補間処理後のR,G,Bの各色成分別の高解像度画像は、全ての画素が非欠落画素で構成された画像になる。   The processing in step S712 is processing performed by the missing interpolation processing unit 405. In step S712, the missing interpolation processing unit 405 performs missing interpolation processing on the N-th high-resolution image for each color component of R, G, and B after the pixel insertion processing in step S708 is completed. . The missing interpolation processing performed in step S712 is performed by replacing pixels that are still missing pixels and have a value of zero in the high-resolution images for each of the R, G, and B color components from the surrounding non-missing pixels. This is a process of replacing the pixel value generated by the adaptive interpolation process with the direction taken into account. The high-resolution image for each color component of R, G, B after the missing interpolation processing in step S712 is an image in which all pixels are composed of non-missing pixels.

なお、本実施形態では、欠落補間処理の一例として適応補間処理を用いている。欠落補間処理は、線形補間処理であってもよい。これらの適応補間処理や線形補間処理は公知の技術であるためその説明は省略する。
また、超解像処理部205は、欠落補間処理部405による欠落補間処理が行われる前に、画像の中で非欠落画素が占める割合を算出し、その割合に応じて各処理部を制御してもよい。
In this embodiment, adaptive interpolation processing is used as an example of missing interpolation processing. The missing interpolation process may be a linear interpolation process. Since these adaptive interpolation processing and linear interpolation processing are known techniques, the description thereof is omitted.
Further, the super-resolution processing unit 205 calculates the ratio of non-missing pixels in the image before the missing interpolation processing by the missing interpolation processing unit 405 is performed, and controls each processing unit according to the ratio. May be.

以下、非欠落画素が占める割合に応じた制御例について、図15を用いて説明する。
図15は、水平,垂直方向の画素数がW,Hの低解像度画像に対し、水平,垂直方向共に画素数をk倍に拡大した高解像度画像1200を示した図である。ここで、例えば、非欠落画素1202の画素数が高解像度画像1200の全画素数に対して50%以上でない場合、エッジの方向を加味した適応補間の際に欠落画素1201を正確に生成することができなくなる。この場合、最終的に得られる超解像画像は、高画質とは言えず、超解像処理の効果が小さくなってしまう。このため、超解像処理部205は、下記の式(8)により、超解像画像において非欠落画素が占める割合を算出する。なお、式(8)のkは低解像度画像を拡大して超解像度画像を生成する際の拡大率である。
Hereinafter, a control example according to the ratio of non-missing pixels will be described with reference to FIG.
FIG. 15 is a diagram showing a high-resolution image 1200 in which the number of pixels in both the horizontal and vertical directions is increased by k times with respect to a low-resolution image having W and H pixel numbers in the horizontal and vertical directions. Here, for example, when the number of non-missing pixels 1202 is not 50% or more with respect to the total number of pixels of the high-resolution image 1200, the missing pixels 1201 are accurately generated during adaptive interpolation with the edge direction taken into account. Can not be. In this case, the finally obtained super-resolution image cannot be said to have high image quality, and the effect of the super-resolution processing is reduced. For this reason, the super-resolution processing unit 205 calculates the ratio of non-missing pixels in the super-resolution image by the following equation (8). Note that k in Expression (8) is an enlargement ratio when a super-resolution image is generated by enlarging a low-resolution image.

割合(%)={(高解像度画像中の非欠落画素の総数)/k2×W×H}×100(%)
・・・式(8)
Ratio (%) = {(Total number of non-missing pixels in high-resolution image) / k2 × W × H} × 100 (%)
... Formula (8)

超解像処理部205は、R,G,Bの各色成分別の三枚の高解像度画像に対して前述の割合算出を行い、それら各色成分別の三つの割合のうち、いずれか1つでも50%以上になっている場合には、超解像処理エラーとして、超解像処理を中止する。なお、超解像処理エラーとなった場合、超解像処理部205は、1枚目の画像(基準画像)におけるR,G,Bの各色成分別の低解像度画像を、水平,垂直方向ともにk倍に拡大した高解像度画像を、後段のYUV変換部206へ出力するようにしてもよい。   The super-resolution processing unit 205 performs the above-described ratio calculation for the three high-resolution images for each of the R, G, and B color components, and any one of the three ratios for each of the color components. If it is 50% or more, the super-resolution processing is stopped as a super-resolution processing error. When a super-resolution processing error occurs, the super-resolution processing unit 205 displays a low-resolution image for each of the R, G, and B color components in the first image (reference image) in both the horizontal and vertical directions. A high-resolution image enlarged by k times may be output to the YUV conversion unit 206 at the subsequent stage.

また、超解像処理部205は、R,G,Bの各色成分別の前述した三つの割合のうち、いずれか1つでも50%以上になっている場合、図10のステップS701まで処理を戻し、例えばk/2倍の高解像度画像を生成する処理を行うようにしてもよい。   In addition, when any one of the above-described three ratios for each of the R, G, and B color components is 50% or more, the super-resolution processing unit 205 performs the processing up to step S701 in FIG. For example, a process of generating a high resolution image of k / 2 times may be performed.

ステップS712の後、超解像処理部205は、方向別フィルタリング処理部406にて行われるステップS713に処理を移行させる。
ステップS713では、方向別フィルタリング処理部406は、欠落補間処理部405による欠落補間処理後のR,G,Bの各色成分別の高解像度画像に対し、方向別フィルタリング処理を行う。ステップS713の方向別フィルタリング処理の説明は後述する。
After step S712, the super-resolution processing unit 205 shifts the process to step S713 performed by the direction-specific filtering processing unit 406.
In step S713, the direction-specific filtering processing unit 406 performs direction-specific filtering processing on the high-resolution image for each color component of R, G, B after the missing interpolation processing by the missing interpolation processing unit 405. The direction-specific filtering process in step S713 will be described later.

ステップS713の後、超解像処理部205は、ステップS714に処理を進め、方向別フィルタリング処理後のR,G,Bの各色成分別の超解像画像を、メモリ部204に保存して図10のフローチャートの超解像処理を終了する。   After step S713, the super-resolution processing unit 205 advances the processing to step S714, stores the super-resolution image for each color component of R, G, and B after the direction-specific filtering processing in the memory unit 204 and stores the super-resolution image. The super-resolution process of the flowchart of FIG.

以下、図10のステップS713において方向別フィルタリング処理部406が行う方向別フィルタリング処理について詳細に説明する。
本実施形態の方向別フィルタリング処理は、R,G,Bの各色成分別の高解像度画像に対し、エッジの方向に沿ったフィルタリングを行う処理である。方向別フィルタリング処理部406は、エッジ方向に沿ったフィルタリング処理を行うことにより、画素挿入時の位置ズレで発生する不自然な信号の切り替わりによる画質劣化を少なくし、なおかつ画像の帯域を出来る限り低下させないようにしている。また、方向別フィルタリング処理部406は、エッジ以外の部分に例えばノイズ等が発生していた場合、それらのノイズの増加を抑圧する処理も行う。
Hereinafter, the direction-specific filtering processing performed by the direction-specific filtering processing unit 406 in step S713 of FIG. 10 will be described in detail.
The direction-specific filtering process of the present embodiment is a process for performing filtering along the edge direction on a high-resolution image for each color component of R, G, and B. The direction-specific filtering processing unit 406 performs filtering processing along the edge direction, thereby reducing image quality degradation due to unnatural signal switching caused by a positional shift at the time of pixel insertion and reducing the image bandwidth as much as possible. I try not to let you. Further, the direction-specific filtering processing unit 406 also performs processing for suppressing an increase in noise when, for example, noise or the like is generated in a portion other than the edge.

図16には、方向別フィルタリング処理部406による処理のフローチャートを示す。
以下、図16のフローチャートに沿って、方向別フィルタリング処理について説明する。なお、図16ではG成分の高解像度に対する方向別フィルタリング処理を例に挙げて説明しているが、R,B成分の場合も同様の処理であり、図16においてG成分に係る処理をそれぞれR,B成分の処理に代えることで実現できる。このため、R,B成分の高解像度画像に対する方向別フィルタリング処理の説明については省略する。
方向別フィルタリング処理部406による処理は、大まかには、先ず、エッジの方向を判別し、次に、その方向判別結果によるエッジの方向に沿ってフィルタリング処理を行うような流れとなっている。
FIG. 16 shows a flowchart of processing by the direction-specific filtering processing unit 406.
Hereinafter, the direction-specific filtering process will be described with reference to the flowchart of FIG. In FIG. 16, the filtering process for each direction with respect to the high resolution of the G component is described as an example. However, the same processing is applied to the R and B components. In FIG. , B component processing can be realized. For this reason, the description of the direction-specific filtering process for the high-resolution image of the R and B components is omitted.
The processing by the direction-specific filtering processing unit 406 is roughly performed by first determining the edge direction and then performing the filtering process along the edge direction based on the direction determination result.

方向別フィルタリング処理部406は、先ずステップS1301の処理として、エッジの方向判別処理のためのフィルタ処理に使用するフィルタのための初期タップ数と、その後の方向別フィルタリング処理で使用するフィルタのための初期タップ数とを決定する。これらタップ数は、画素挿入処理に係る画素(以下、着目画素と表記する。)に対してその周辺の幾つの画素で方向判別を行う際の方向数と、その後の方向別フィルタリング処理を行う際の方向数に対応した数として初期設定される。   First, in step S1301, the direction-specific filtering processing unit 406 performs the initial tap number for the filter used for the filter processing for the edge direction determination processing and the filter used for the subsequent direction-specific filtering processing. Determine the number of initial taps. The number of taps is the number of directions when the direction determination is performed with respect to the pixels related to the pixel insertion process (hereinafter referred to as the pixel of interest) with the number of pixels around the pixel and the subsequent filtering process according to direction. Initially set as a number corresponding to the number of directions.

本実施形態の場合、方向判別処理のためのフィルタ処理に使用する初期タップ数と、方向別フィルタリング処理のため初期タップ数は、具体的には以下のような第1,第2の二つのパラメータを基に決定される。第1のパラメータは、画像処理部104に入力された低解像度画像を水平,垂直方向に何倍に拡大した超解像画像を生成するのかを表す情報である。第2のパラメータは、生成した超解像画像を更に水平,垂直方向に何倍に拡大した画像を出力画像にするのかを表す情報である。   In the case of the present embodiment, the number of initial taps used for the filter processing for the direction discrimination processing and the number of initial taps for the direction-specific filtering processing are specifically the following first and second parameters: Determined based on The first parameter is information indicating how many times the low-resolution image input to the image processing unit 104 is to be enlarged in the horizontal and vertical directions to generate a super-resolution image. The second parameter is information indicating how many times the generated super-resolution image is further enlarged in the horizontal and vertical directions to be an output image.

図17には、方向判別処理と方向別フィルタリング処理の初期タップ数と、画像処理部104に入力された低解像度画像に対する超解像画像の拡大率と、生成された超解像画像に対する出力画像の拡大率との関係を示す。一例として、入力された低解像度画像を水平,垂直方向に2倍に拡大した超解像画像を生成し、その超解像画像を拡大せずにそのまま出力画像とした場合、方向判別処理に使用する初期タップ数と方向別フィルタリングの初期タップ数は、5タップとなされる。すなわち、本実施形態によれば、入力された低解像度画像に対する超解像画像の拡大率と、超解像画像に対する出力画像の拡大率とに応じて、タップ数が変更されることで、エッジを判別する際の方向数が決定されている。   FIG. 17 shows the initial number of taps of the direction determination process and the direction-specific filtering process, the enlargement ratio of the super-resolution image for the low-resolution image input to the image processing unit 104, and the output image for the generated super-resolution image. The relationship with the enlargement ratio is shown. As an example, when a super-resolution image is generated by enlarging the input low-resolution image twice in the horizontal and vertical directions, and the super-resolution image is used as an output image without being enlarged, it is used for direction discrimination processing. The number of initial taps to be performed and the number of initial taps for direction-specific filtering are 5 taps. That is, according to the present embodiment, the number of taps is changed according to the enlargement ratio of the super-resolution image with respect to the input low-resolution image and the enlargement ratio of the output image with respect to the super-resolution image. The number of directions when discriminating is determined.

図16に説明を戻す。
ステップS1301の初期タップ数の設定処理の後、方向別フィルタリング処理部406は、ステップS1302に処理を進める。
ステップS1302では、方向別フィルタリング処理部406は、G成分の高解像度画像の座標G(x',y')を座標G(0,0)に初期化する。ステップS1302の後、方向別フィルタリング処理部406は、ステップS1303に処理を進める。
なお、ステップS1303からステップS1312までの各処理は、全て座標毎に行われる処理である。
Returning to FIG.
After the initial tap number setting processing in step S1301, the direction-specific filtering processing unit 406 advances the processing to step S1302.
In step S1302, the direction-specific filtering processing unit 406 initializes the coordinates G (x ′, y ′) of the G component high-resolution image to the coordinates G (0, 0). After step S1302, the direction-specific filtering processing unit 406 advances the process to step S1303.
Note that the processes from step S1303 to step S1312 are all performed for each coordinate.

ステップS1303では、方向別フィルタリング処理部406は、前述したG成分の高解像度画像の座標G(x',y')と参照座標G0(x0,y0)から求められた距離d0(G)を、挿入される挿入画素の距離d0(G)として取得する。このときの距離d0(G)は、1枚目の基準画像に対する非基準画像の位置ズレ量を表す値として取得される。したがって、距離d0(G)は、2枚目以降の非基準画像が、1枚目の基準画像の座標に対し、どの程度ずれているかを表す指標となっている。ステップS1303の後、方向別フィルタリング処理部406は、ステップS1304に処理を進める。   In step S1303, the direction-specific filtering processing unit 406 calculates the distance d0 (G) obtained from the coordinates G (x ′, y ′) of the G component high-resolution image and the reference coordinates G0 (x0, y0) described above. Obtained as the distance d0 (G) of the inserted pixel to be inserted. The distance d0 (G) at this time is acquired as a value representing the positional deviation amount of the non-reference image with respect to the first reference image. Therefore, the distance d0 (G) is an index indicating how much the second and subsequent non-reference images are deviated from the coordinates of the first reference image. After step S1303, the direction-specific filtering processing unit 406 proceeds to step S1304.

ステップS1304では、方向別フィルタリング処理部406は、着目画素の座標G(x',y')に対応する挿入画素の距離d0(G)の値に応じて、G成分の高解像度画像で方向判別処理を行うことができるか否かを判定する。この判定は、例えば前述した図13のステップS808での比較処理と同様に、距離d0(G)の値と予め設定された所定の閾値TH(G)との比較により行うことができる。例えば、方向別フィルタリング処理部406は、距離d(G)が所定の閾値TH(G)未満である場合に、G成分の高解像度画像で方向判別処理を行うことができると判定する。また、方向判別処理を行えるか否かの判定は、前述した式(8)で算出したG成分の高解像度画像に対する非欠落画素の割合と、割合との比較用として予め設定されている所定の閾値(例えば50%)との比較により行うこともできる。例えば、方向別フィルタリング処理部406は、非欠落画素の割合が閾値(50%)未満である場合に、G成分の高解像度画像で方向判別処理を行うことができると判定する。そして、方向別フィルタリング処理部406は、ステップS1304において、G成分の高解像度画像で方向判別処理を行うことができると判定した場合にはステップS1305に処理を進める。一方、方向別フィルタリング処理部406は、ステップS1304において方向別判定処理を行うことができないと判定した場合には、低解像度画像の方向判別結果を用いて方向別フィルタリング処理を行うとしてステップS1307に処理を進める。   In step S1304, the direction-specific filtering processing unit 406 determines the direction of the high-resolution image of the G component according to the distance d0 (G) of the inserted pixel corresponding to the coordinate G (x ′, y ′) of the target pixel. It is determined whether or not processing can be performed. This determination can be made, for example, by comparing the value of the distance d0 (G) with a predetermined threshold value TH (G) as in the comparison process in step S808 of FIG. For example, the direction-specific filtering processing unit 406 determines that the direction determination processing can be performed on the high-resolution image of the G component when the distance d (G) is less than a predetermined threshold TH (G). Further, whether or not the direction determination process can be performed is determined by a predetermined value set in advance for comparison between the ratio of the non-missing pixels to the high-resolution image of the G component calculated by the above-described equation (8) and the ratio. It can also be performed by comparison with a threshold value (for example, 50%). For example, the direction-specific filtering processing unit 406 determines that the direction determination processing can be performed on the high-resolution image of the G component when the ratio of the non-missing pixels is less than the threshold (50%). If the direction-specific filtering processing unit 406 determines in step S1304 that the direction determination processing can be performed on the high-resolution image of the G component, the process proceeds to step S1305. On the other hand, if the direction-specific filtering processing unit 406 determines in step S1304 that the direction-specific determination process cannot be performed, the direction-specific filtering process is performed using the direction determination result of the low-resolution image, and the process is performed in step S1307. To proceed.

ステップS1305の処理に進むと、方向別フィルタリング処理部406は、着目画素の座標G(x',y')の方向判別処理で使用する方向判別のタップ数を決定する。このときのタップ数は、前述のステップS1301で決定した初期タップ数から増やすべきか否かを判定することで決定される。この場合の判定は、着目画素の座標G(x',y')に対応する挿入画素の距離d0(G)の値と、距離との比較用として予め設定された所定の閾値との比較により行ってもよいし、その時の座標や画素値に応じて決めてもよい。閾値との比較の場合、一例として、着目画素の座標G(x',y')に対応する挿入画素の距離d0(G)の値が閾値未満である場合、方向別フィルタリング処理部406は、方向判別処理で使用するタップ数を初期タップ数より増やす。ステップS1305の後、方向別フィルタリング処理部406は、ステップS1306に処理を進める。   In step S1305, the direction-specific filtering processing unit 406 determines the number of direction determination taps used in the direction determination processing of the coordinates G (x ′, y ′) of the pixel of interest. The number of taps at this time is determined by determining whether or not to increase from the initial number of taps determined in step S1301 described above. The determination in this case is made by comparing the value of the distance d0 (G) of the inserted pixel corresponding to the coordinate G (x ′, y ′) of the pixel of interest with a predetermined threshold set in advance for comparison with the distance. Or may be determined according to the coordinates and pixel values at that time. In the case of comparison with the threshold, as an example, when the value of the distance d0 (G) of the inserted pixel corresponding to the coordinate G (x ′, y ′) of the target pixel is less than the threshold, the direction-specific filtering processing unit 406 The number of taps used in the direction discrimination process is increased from the initial number of taps. After step S1305, the direction-specific filtering processing unit 406 proceeds to step S1306.

ステップS1306では、方向別フィルタリング処理部406は、G成分の高解像度画像の着目画素の座標G(x',y')に対し、その周辺の画素を用いて、方向判別処理を行う。この場合の方向判別処理は、前述の方向判別処理部304による方向判別処理と同様であるが、ここでは5タップで方向判別処理を行う場合について説明する。   In step S1306, the direction-specific filtering processing unit 406 performs direction determination processing on the coordinates G (x ′, y ′) of the target pixel of the G component high-resolution image using the surrounding pixels. The direction determination processing in this case is the same as the direction determination processing by the above-described direction determination processing unit 304. Here, a case where the direction determination processing is performed with five taps will be described.

図18(a)〜図18(l)を用いて、5タップによる方向判別処理について説明する。
図18(a)〜図18(l)は、それぞれ着目画素1501と方向判別に用いられる各周辺画素1502〜1525を示している。本実施形態の場合、方向別フィルタリング処理部406は、図18(a)〜図18(l)に示すように、着目画素1501に対し、各周辺画素1502〜1525のうち方向判別のための対象となるそれぞれ四つずつ対象画素の値を用いて合計で12方向の判別を行う。
A direction determination process using five taps will be described with reference to FIGS.
FIG. 18A to FIG. 18L illustrate a target pixel 1501 and peripheral pixels 1502 to 1525 used for direction determination, respectively. In the case of the present embodiment, the direction-specific filtering processing unit 406, as shown in FIGS. 18 (a) to 18 (l), for the target pixel 1501, the target for direction determination among the surrounding pixels 1502-1525. Using the values of the four target pixels, a total of 12 directions are discriminated.

これら図18(a)〜図18(l)に示した12方向全てについて述べると説明が煩雑になるため、一例として図18(a)のみを挙げることにする。図18(a)の例において、着目画素1501の画素値をpixとし、方向判別の対象画素1502,1503,1504,1505の画素値をそれぞれpix1,pix2,pix3,pix4とする。方向別フィルタリング処理部406は、下記の式(9)により、着目画素1501の画素値pixと対象画素1502,1503,1504,1505の各画素値pix1,pix2,pix3,pix4との差分絶対値和sadを算出する。なお、式(9)中のpixiは対象画素1502〜1505の各画素値pix1〜pix4である。   Since description of all the 12 directions shown in FIGS. 18A to 18L will be complicated, only FIG. 18A will be given as an example. In the example of FIG. 18A, the pixel value of the target pixel 1501 is set to pix, and the pixel values of the direction determination target pixels 1502, 1503, 1504, and 1505 are set to pix1, pix2, pix3, and pix4, respectively. The direction-specific filtering processing unit 406 calculates the sum of absolute differences between the pixel value pix of the target pixel 1501 and the pixel values pix1, pix2, pix3, and pix4 of the target pixels 1502, 1503, 1504, and 1505 by the following equation (9). Calculate sad. In the equation (9), pixi is the pixel values pix1 to pix4 of the target pixels 1502 to 1505.

Figure 2017045273
Figure 2017045273

方向別フィルタリング処理部406は、図18(b)〜図18(l)についても図18(a)の例と同様にして、それぞれ差分絶対値和sadを求める。図18(a)〜図18(l)の12方向について各々求められた差分絶対値和sadを、sad1〜sad12とする。方向別フィルタリング処理部406は、それら12方向の差分絶対値和sad1〜sad12の中で最も差分絶対値和の小さい差分絶対値和min_sadを求める。そして、方向別フィルタリング処理部406は、その最小差分絶対値和min_sadを方向判別処理により求めた方向とする。   The direction-specific filtering processing unit 406 obtains a difference absolute value sum sad for each of FIGS. 18B to 18L as in the example of FIG. The difference absolute value sum sad obtained for each of the 12 directions in FIGS. 18A to 18L is defined as sad1 to sad12. The direction-specific filtering processing unit 406 obtains the difference absolute value sum min_sad having the smallest difference absolute value sum among the difference absolute value sums sad1 to sad12 in the 12 directions. Then, the direction-specific filtering processing unit 406 sets the minimum difference absolute value sum min_sad as the direction obtained by the direction determination process.

ただし、方向別フィルタリング処理部406は、最小差分絶対値和min_sadと他の各差分絶対値和との差分が、予め設定されている所定の閾値以下である場合には、12方向全てに該当しないと判断し、方向判別結果としてエラーを出力する。なお、最小差分絶対値和min_sadと他の各差分絶対値和との差分に対する閾値は、任意のパラメータとして、画像のシーン毎に代えられてもよい。   However, the direction-specific filtering processing unit 406 does not correspond to all the 12 directions when the difference between the minimum difference absolute value sum min_sad and each of the other difference absolute value sums is equal to or less than a predetermined threshold value set in advance. And outputs an error as the direction discrimination result. Note that the threshold for the difference between the minimum difference absolute value sum min_sad and each of the other difference absolute value sums may be changed for each scene of the image as an arbitrary parameter.

なお、ステップS1305、ステップS1306の処理について、本実施形態では、方向別フィルタリング処理を行う対象であるG成分の高解像度画像を用いて前述した処理を行ったが、例えばR成分やB成分の高解像度画像を用いた処理であってもよい。ステップS1306の後、方向別フィルタリング処理部406は、ステップS1310に処理を進める。   Note that, in the present embodiment, the processing described above is performed using the high-resolution image of the G component that is the target of the direction-specific filtering processing for the processing of step S1305 and step S1306. Processing using a resolution image may be used. After step S1306, the direction-specific filtering processing unit 406 proceeds to step S1310.

ここで、ステップS1305、ステップS1306の処理は、高解像度画像を用いた方向判別処理である。これに対し、以下のステップS1307からステップS1309では、複数の入力画像の方向判別結果を用いた方向判別処理が行われる。すなわち、前述のステップS1304で方向別判定処理を行うことができないと判定された場合、ステップ1307〜S1309では、低解像度画像の方向判別結果を用いて方向別フィルタリング処理が行われる。   Here, the processing in steps S1305 and S1306 is direction determination processing using a high-resolution image. On the other hand, in the following steps S1307 to S1309, direction discrimination processing using the direction discrimination results of a plurality of input images is performed. In other words, when it is determined in step S1304 that the direction determination process cannot be performed, in steps 1307 to S1309, the direction filtering process is performed using the direction determination result of the low resolution image.

ステップS1307の処理に進むと、方向別フィルタリング処理部406は、前述の方向判別処理部304で行われてメモリ部204に保存されている方向判別結果を取得する。このとき、方向別フィルタリング処理部406は、座標G(x',y')に対応する方向判別結果を、複数枚の低解像画像の分だけ取得する。なお、座標G(x',y')に対応する低解像画像の座標(x,y)は、座標(x',y')をそれぞれ前述の倍率であるkで割った座標(x'/k,y'/k)に最も近い座標である。ステップS1307の後、方向別フィルタリング処理部406は、ステップS1308に処理を進める。   When the processing proceeds to step S1307, the direction-specific filtering processing unit 406 acquires the direction discrimination result stored in the memory unit 204 by the above-described direction discrimination processing unit 304. At this time, the direction-specific filtering processing unit 406 acquires the direction determination result corresponding to the coordinates G (x ′, y ′) for the plurality of low-resolution images. Note that the coordinates (x, y) of the low-resolution image corresponding to the coordinates G (x ′, y ′) are coordinates (x ′) obtained by dividing the coordinates (x ′, y ′) by k, which is the magnification described above. / K, y ′ / k). After step S1307, the direction-specific filtering processing unit 406 proceeds to step S1308.

ステップS1308では、方向別フィルタリング処理部406は、前述のステップS1307で取得した入力画像の枚数分の低解像度画像の方向判別結果を集計(同じ方向別の判別結果の枚数を合計)する処理を行う。   In step S1308, the direction-specific filtering processing unit 406 performs a process of totaling the direction determination results of the low-resolution images corresponding to the number of input images acquired in step S1307 (totaling the number of determination results for the same direction). .

以下、図19(a)〜図19(e)と図19(f)を用いて、入力画像の枚数分の低解像度画像の方向判別結果を集計する処理について説明する。
なお、図19(a)〜図19(d)の例は、低解像画像の方向判別結果を3タップで判別した結果を示している。図19(a)〜図19(d)は、それぞれ着目画素1701と方向判別に用いられる各周辺画素1702〜1709を示している。
In the following, a process of aggregating the direction determination results of the low resolution images corresponding to the number of input images will be described with reference to FIGS. 19 (a) to 19 (e) and 19 (f).
In addition, the example of FIG. 19A-FIG. 19D has shown the result of having discriminate | determined the direction discrimination | determination result of the low-resolution image by 3 taps. FIGS. 19A to 19D show a pixel of interest 1701 and peripheral pixels 1702 to 1709 used for direction determination, respectively.

方向別フィルタリング処理部406は、着目画素1701に対し、各周辺画素1702〜1709のうち方向判別のための対象となるそれぞれ二つずつ対象画素の値を用いた4方向の各判別結果を集計する。着目画素1701に対し、図19(a)が対象画素1702と1703、図19(b)が対象画素1704と1705、図19(c)が対象画素1706と1707、図19(d)が対象画素1708と1709の方向を判別する例である。なお、図19(e)は、4方向全てで方向判別が出来なかった場合(エラー判定された場合)の方向判別結果を表している。ここで、図19(a)〜図19(e)に示した各方向判別結果をditect[0],ditect[1],ditect[2],ditect[3],ditect[err]とする。方向別フィルタリング処理部406は、各方向判別結果をditect[0],ditect[1],ditect[2],ditect[3],ditect[err]に対し、図19(f)に示すように各低解像画像の方向判別結果を入力枚数分合計する。   The direction-specific filtering processing unit 406 aggregates the discrimination results in four directions using the values of the target pixels, each of which is a target for direction discrimination among the surrounding pixels 1702 to 1709, with respect to the target pixel 1701. . FIG. 19A shows the target pixels 1702 and 1703, FIG. 19B shows the target pixels 1704 and 1705, FIG. 19C shows the target pixels 1706 and 1707, and FIG. 19D shows the target pixel 1701. In this example, the directions of 1708 and 1709 are determined. Note that FIG. 19E shows a direction determination result when the direction cannot be determined in all four directions (when an error is determined). Here, the direction discrimination results shown in FIGS. 19A to 19E are defined as detect [0], detect [1], detect [2], detect [3], detect [err]. The direction-specific filtering processing unit 406 performs each direction determination result on each of detect [0], detect [1], detect [2], detect [3], detect [err] as shown in FIG. The direction determination results of the low resolution images are summed for the number of input sheets.

図16に説明を戻す。
ステップS1308の後、方向別フィルタリング処理部406は、ステップS1309に処理を進める。
ステップS1309では、方向別フィルタリング処理部406は、ステップS1308で集計したうち、最も集計枚数が多かった方向を、着目画素の座標G(x',y')に対応する方向判別結果として取得する。ステップS1309の後、方向別フィルタリング処理部406は、ステップS1310に処理を進める。
Returning to FIG.
After step S1308, the direction-specific filtering processing unit 406 proceeds to step S1309.
In step S1309, the direction-specific filtering processing unit 406 acquires, as the direction determination result corresponding to the coordinate G (x ′, y ′) of the pixel of interest, the direction having the largest total number of the totals in step S1308. After step S1309, the direction-specific filtering processing unit 406 proceeds to step S1310.

ステップS1310では、方向別フィルタリング処理部406は、方向別フィルタリング処理を行う際のタップ数を決定する。このときのタップ数は、前述のステップS1305からステップS1306までの処理により方向判別結果を取得したか、ステップS1307からステップS1309までの処理により方向判別結果を取得したかによって決定される。方向別フィルタリング処理部406は、ステップS1305からステップS1306までの処理により方向判別結果が取得された場合には、ステップS1305で決定した方向判別のタップ数と同じタップ数を使用する。一方、方向別フィルタリング処理部406は、ステップS1307からステップS1309までの処理により方向判別結果が取得された場合には、例えば3タップを使用する。なお、詳細な説明は後述するが、方向判別結果がエラー出力であった場合には、方向別フィルタリング処理部406は、3×3タップを使用する。ステップS1310の後、方向別フィルタリング処理部406は、ステップS1311に処理を進める。   In step S1310, the direction-specific filtering processing unit 406 determines the number of taps when performing the direction-specific filtering processing. The number of taps at this time is determined depending on whether the direction determination result is acquired by the processing from step S1305 to step S1306 or the direction determination result is acquired by the processing from step S1307 to step S1309. When the direction discrimination result is acquired by the processing from step S1305 to step S1306, the direction-specific filtering processing unit 406 uses the same tap number as the direction discrimination tap determined in step S1305. On the other hand, the direction-specific filtering processing unit 406 uses, for example, 3 taps when the direction determination result is acquired by the processing from step S1307 to step S1309. Although detailed description will be given later, if the direction determination result is an error output, the direction-specific filtering processing unit 406 uses 3 × 3 taps. After step S1310, the direction-specific filtering processing unit 406 proceeds to step S1311.

ステップS1311では、方向別フィルタリング処理部406は、ステップS1310で決定されたタップ数に応じて、方向別フィルタリング処理を行うためのフィルタ係数を決定する。   In step S1311, the direction-specific filtering processing unit 406 determines a filter coefficient for performing the direction-specific filtering processing according to the number of taps determined in step S1310.

以下、図20(a)〜図20(f)を用いて、方向別フィルタリングの処理を行うためのフィルタ係数の決定処理について説明する。なお、ここではタップ数を5タップとした場合の例を挙げている。また、本実施形態では、方向判別結果として、図20(a)に示すように着目画素1801と対象画素1802〜1805による判別結果が得られている場合を例に挙げる。   Hereinafter, filter coefficient determination processing for performing direction-specific filtering processing will be described with reference to FIGS. 20 (a) to 20 (f). Here, an example in which the number of taps is 5 taps is given. Further, in the present embodiment, as an example of the direction determination result, a determination result by the target pixel 1801 and the target pixels 1802 to 1805 is obtained as illustrated in FIG.

図20(a)の例のような方向判別結果による着目画素1801と対象画素1802〜1805のフィルタ係数を決定する場合、方向別フィルタリング処理部406は、図20(b)に示すように、先ず仮のフィルタ係数を決定する。例えば5タップのフィルタ係数として、着目画素1801のフィルタ係数が「6」、対象画素1802と1805のフィルタ係数が「1」、対象画素1803と1804のフィルタ係数が「4」となされた(1,4,6,4,1)のフィルタ係数が用いられる。なお、3タップのフィルタ係数の場合は、例えば着目画素のフィルタ係数が「2」で二つの対象画素のフィルタ係数が「1」となされた、(1,2,1)のフィルタ係数が用いられる。   When determining the filter coefficients of the pixel of interest 1801 and the target pixels 1802 to 1805 based on the result of direction discrimination as in the example of FIG. 20A, the direction-specific filtering processing unit 406 first, as shown in FIG. A temporary filter coefficient is determined. For example, as a 5-tap filter coefficient, the filter coefficient of the target pixel 1801 is “6”, the filter coefficients of the target pixels 1802 and 1805 are “1”, and the filter coefficients of the target pixels 1803 and 1804 are “4” (1, Filter coefficients of 4, 6, 4, 1) are used. In the case of a 3-tap filter coefficient, for example, the filter coefficient (1, 2, 1) in which the filter coefficient of the pixel of interest is “2” and the filter coefficients of the two target pixels is “1” is used. .

また、図20(c)に示すように、方向別フィルタリング処理部406は、対象画素1802〜1805と着目画素1801における画素挿入時の距離d0(G)をそれぞれメモリ部204から取得する。なお、ここでは、着目画素1801における距離はd0(0)とし、対象画素1802,1803,1804,1805における各距離はそれぞれd0(−2),d0(−1),d0(1),d0(2)であるとする。この例の場合、方向別フィルタリング処理部406は、図20(c)の例で取得した距離d0(0)を基に、図20(d)に示すような重みテーブルを作成する。なお、重みテーブルは、距離d0(0)の重みを「1」とし、最大の重みを「2」とした重みテーブルであり、距離d0(0)を基準とした所定の閾値により作成される。さらに、方向別フィルタリング処理部406は、重みテーブルにより、着目画素1801の重みw(0)、対象画素1802の重みw(−2)、対象画素1803の重みw(−1)、対象画素1804の重みw(1)、対象画素1805の重みw(2)を算出する。そして、方向別フィルタリング処理部406は、図20(b)の仮のフィルタ係数と図20(d)の重みを乗算することにより、図20(e)に示すようなフィルタ係数を決定する。   As shown in FIG. 20C, the direction-specific filtering processing unit 406 acquires from the memory unit 204 the distance d0 (G) at the time of pixel insertion in the target pixels 1802 to 1805 and the target pixel 1801. Here, the distance in the target pixel 1801 is d0 (0), and the distances in the target pixels 1802, 1803, 1804, and 1805 are d0 (−2), d0 (−1), d0 (1), and d0 ( 2). In the case of this example, the direction-specific filtering processing unit 406 creates a weight table as shown in FIG. 20D based on the distance d0 (0) acquired in the example of FIG. The weight table is a weight table in which the weight of the distance d0 (0) is “1” and the maximum weight is “2”, and is created with a predetermined threshold value based on the distance d0 (0). Further, the direction-specific filtering processing unit 406 uses the weight table to determine the weight w (0) of the target pixel 1801, the weight w (-2) of the target pixel 1802, the weight w (-1) of the target pixel 1803, and the target pixel 1804. The weight w (1) and the weight w (2) of the target pixel 1805 are calculated. Then, the direction-specific filtering processing unit 406 multiplies the temporary filter coefficient in FIG. 20B by the weight in FIG. 20D to determine a filter coefficient as shown in FIG.

なお、方向判別の結果がエラー出力となっている場合、方向別フィルタリング処理部406は、図20(f)に示すような予め決められた3×3のタップの各フィルタ係数を用いる。
本実施形態では、図20(a)〜図20(f)で説明した方法で方向別フィルタリング処理を行うためのフィルタ係数を決定する例を挙げたが、この方法に限らず、例えば図20(b)の仮のフィルタ係数のように予め決められたフィルタ係数を用いてもよい。
If the direction discrimination result is an error output, the direction-specific filtering processing unit 406 uses each predetermined 3 × 3 tap filter coefficient as shown in FIG.
In the present embodiment, the example of determining the filter coefficient for performing the direction-specific filtering process by the method described in FIGS. 20A to 20F has been described. However, the present invention is not limited to this method. For example, FIG. A predetermined filter coefficient such as the temporary filter coefficient of b) may be used.

図16に説明を戻す。ステップS1311の後、方向別フィルタリング処理部406は、ステップS1312に処理を進める。
ステップS1312では、方向別フィルタリング処理部406は、ステップS1311で決定したフィルタ係数を用いて、方向別フィルタリングの処理を行う。ここで、例えば、着目画素の画素値をpix0とし、4方向に方向判別された対象画素の各画素値をそれぞれpix1,pix2,pix3,pix4とする。また、各画素のフィルタリング係数をf[0],f[1],f[2],f[3],f[4]とすると、5タップのときの方向別フィルタリングの処理は、下記の式(10)を用いてフィルタリング後の着目画素の画素値pixを算出する処理となる。
Returning to FIG. After step S1311, the direction-specific filtering processing unit 406 advances the process to step S1312.
In step S1312, the direction-specific filtering processing unit 406 performs direction-specific filtering using the filter coefficient determined in step S1311. Here, for example, the pixel value of the pixel of interest is pix0, and the pixel values of the target pixel whose direction is determined in four directions are pix1, pix2, pix3, and pix4, respectively. Further, if the filtering coefficients of each pixel are f [0], f [1], f [2], f [3], and f [4], the direction-specific filtering process for 5 taps is as follows: This is a process of calculating the pixel value pix of the target pixel after filtering using (10).

Figure 2017045273
Figure 2017045273

なお、ここでは5タップを例に挙げたが、3タップの場合においても、方向別フィルタリング処理、方向判別結果がエラー出力となったときのフィルタリング処理も同様である。ステップS1312の後、方向別フィルタリング処理部406は、ステップS1313に処理を進める。   In addition, although 5 taps were mentioned here as an example, also in the case of 3 taps, the filtering process according to a direction and the filtering process when a direction discrimination | determination result becomes an error output are the same. After step S1312, the direction-specific filtering processing unit 406 proceeds to step S1313.

ステップS1313は、方向別フィルタリング処理部406は、G成分の高解像度画像の全ての画素に対して前述のステップS1312の処理が完了したか否かを判定する。方向別フィルタリング処理部406は、ステップS1313において、完了したと判定した場合には、ステップS1315に処理を進め、一方、完了していないと判定した場合には、ステップS1314に処理を進める。   In step S1313, the direction-specific filtering processing unit 406 determines whether or not the processing in step S1312 described above has been completed for all the pixels of the G component high-resolution image. The direction-specific filtering processing unit 406 proceeds to step S1315 if it is determined in step S1313 that the process has been completed, and proceeds to step S1314 if it is determined that the process has not been completed.

ステップS1314の処理に進んだ場合、方向別フィルタリング処理部406は、G成分の高解像度画像の座標G(x',y')を次の画素の座標に更新し、ステップS1303に処理を戻す。   When the processing proceeds to step S1314, the direction-specific filtering processing unit 406 updates the coordinates G (x ′, y ′) of the G component high-resolution image to the coordinates of the next pixel, and returns the processing to step S1303.

一方、ステップS1315では、方向別フィルタリング処理部406は、前述のステップS1314までの処理でG成分の高解像度画像の全ての画素に対し、方向別フィルタリングの処理を行った後の画像を、G成分の最終的な超解像画像として出力する。その後、方向別フィルタリング処理部406は、この図16の方向別フィルタリングの処理を終了する。
方向別フィルタリング処理部406は、以上のような処理を、R成分の高解像度画像、B成分の高解像度画像に対しても同様に行って、それぞれR,B成分の最終的な超解像画像として出力する。
On the other hand, in step S1315, the direction-specific filtering processing unit 406 displays the image after the direction-specific filtering processing is performed on all the pixels of the G component high-resolution image in the processing up to step S1314 described above as the G component. Is output as the final super-resolution image. Thereafter, the direction-specific filtering processing unit 406 ends the direction-specific filtering processing of FIG.
The direction-specific filtering processing unit 406 performs the above-described processing on the R component high-resolution image and the B component high-resolution image in the same manner, so that final R and B component super-resolution images are obtained. Output as.

以上説明したように、本実施形態によれば、エッジ方向に沿ったフィルタリング処理を行うことにより、画像の帯域を出来る限り低下させることなく、画素の位置ズレで不自然な信号の切り替わりが発生することによる画質劣化を少なくすることができる。また、本実施形態によれば、エッジ以外の部分に例えばノイズ等が発生していた場合でも、それらのノイズの増加を抑圧することができる。   As described above, according to the present embodiment, by performing the filtering process along the edge direction, an unnatural signal switching occurs due to the positional deviation of the pixels without reducing the band of the image as much as possible. It is possible to reduce image quality degradation due to the above. Further, according to the present embodiment, even when noise or the like is generated in a portion other than the edge, an increase in the noise can be suppressed.

<その他の実施形態>
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
<Other embodiments>
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

上述の実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。即ち、本発明は、その技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。   The above-described embodiments are merely examples of implementation in carrying out the present invention, and the technical scope of the present invention should not be construed as being limited thereto. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.

101 光学系、102 撮像素子、103 A/D変換部、104 画像処理部、105 システム制御部、106 操作部、107 表示部、108 記録部、109 バス、201 基準画像選択部、202 ベイヤー分離部、203 座標変換係数算出部、204 メモリ部、205 超解像処理部、206 YUV変換部、301 デモザイク処理部、302 歪曲補正処理部、303 射影変換係数算出部、401 倍率色収差座標補正部、402 歪曲座標補正部、403 位置合わせ用座標変換部、404 画素挿入処理部、405 欠落補間処理部、406 方向別フィルタリング処理部   DESCRIPTION OF SYMBOLS 101 Optical system, 102 Imaging device, 103 A / D conversion part, 104 Image processing part, 105 System control part, 106 Operation part, 107 Display part, 108 Recording part, 109 Bus, 201 Reference | standard image selection part, 202 Bayer separation part , 203 coordinate conversion coefficient calculation unit, 204 memory unit, 205 super-resolution processing unit, 206 YUV conversion unit, 301 demosaic processing unit, 302 distortion correction processing unit, 303 projective conversion coefficient calculation unit, 401 magnification chromatic aberration coordinate correction unit, 402 Distorted coordinate correction unit, 403 coordinate conversion unit for alignment, 404 pixel insertion processing unit, 405 missing interpolation processing unit, 406 filtering by direction

Claims (15)

複数枚の低解像度の画像を用いて高解像度の画像を生成する画像処理装置であって、
入力された複数枚の画像のうち、位置合わせの基準となる1枚の画像を基準画像とし、前記基準画像に対して、前記基準画像を除く他の複数枚の画像の位置を合わせる位置合わせ手段と、
前記基準画像に対して、前記他の複数の画像の画素を挿入して高解像度の画像を生成する画素挿入手段と、
前記画素が挿入された後の画像からエッジの方向を判別して、前記判別したエッジの方向に基づき、前記画素の挿入がなされた後の画像に対して、前記エッジの方向別のフィルタリングを行うフィルタ手段と
を有することを特徴とする画像処理装置。
An image processing apparatus that generates a high-resolution image using a plurality of low-resolution images,
Positioning means for aligning positions of a plurality of other images excluding the reference image with respect to the reference image, using one image as a reference for alignment among the plurality of input images as a reference image When,
Pixel insertion means for generating a high-resolution image by inserting pixels of the other plurality of images with respect to the reference image;
The direction of the edge is determined from the image after the pixel is inserted, and filtering according to the direction of the edge is performed on the image after the pixel is inserted based on the determined direction of the edge. And an image processing apparatus.
前記フィルタ手段は、前記画素が挿入された後の画像の中の着目画素の画素値と前記着目画素の周辺の複数の画素の画素値とを用いてエッジの方向を判別するためのフィルタ処理を行って、前記画素が挿入された後の画像のエッジの方向を判別することを特徴とする請求項1に記載の画像処理装置。   The filter means performs a filter process for determining an edge direction using a pixel value of a target pixel in an image after the pixel is inserted and pixel values of a plurality of pixels around the target pixel. The image processing apparatus according to claim 1, wherein the image processing apparatus determines an edge direction of the image after the pixel is inserted. 前記フィルタ手段は、
前記位置合わせを行うために前記基準画像に対して設定された座標値に基づいて、前記基準画像に対する前記他の複数の画像の位置ズレ量を求め、
前記位置ズレ量に基づいて、前記画素が挿入された後の画像からエッジの方向の判別が行えるか否かを判定して、前記判別が行えたエッジの方向に基づいて前記方向別のフィルタリングを行うことを特徴とする請求項1又は2に記載の画像処理装置。
The filter means includes
Based on the coordinate value set for the reference image to perform the alignment, the positional deviation amount of the other plurality of images with respect to the reference image is obtained,
Based on the positional deviation amount, it is determined whether or not the direction of the edge can be determined from the image after the pixel is inserted, and the filtering according to the direction is performed based on the direction of the edge that has been determined. The image processing apparatus according to claim 1, wherein the image processing apparatus performs the processing.
前記フィルタ手段は、前記位置ズレ量が所定の閾値未満である場合に、前記画素が挿入された後の画像からエッジの方向の判別が行えると判定することを特徴とする請求項3に記載の画像処理装置。   The said filter means determines that the direction of an edge can be discriminate | determined from the image after the said pixel is inserted, when the said amount of position shift is less than a predetermined threshold value. Image processing device. 前記フィルタ手段は、前記位置ズレ量に基づいて、前記画素が挿入された後の画像から前記エッジの方向を判別する際のフィルタ処理で用いるタップ数を決定することを特徴とする請求項3又は4に記載の画像処理装置。   The filter means determines the number of taps used in filter processing when determining the direction of the edge from the image after the pixel is inserted based on the positional deviation amount. 5. The image processing apparatus according to 4. 前記フィルタ手段は、前記位置ズレ量に基づいて、前記画素が挿入された後の画像からエッジの方向を判別する際のフィルタ処理で用いる各タップに対するフィルタ係数を決定することを特徴とする請求項3〜5のいずれか1項に記載の画像処理装置。   The filter means determines a filter coefficient for each tap used in a filter process when determining an edge direction from an image after the pixel is inserted based on the positional deviation amount. The image processing apparatus according to any one of 3 to 5. 前記フィルタ手段は、前記位置ズレ量に基づいて、前記画素が挿入された後の画像から前記エッジの方向を判別する際の方向数を決定することを特徴とする請求項3〜6のいずれか1項に記載の画像処理装置。   The said filter means determines the number of directions at the time of discriminating the direction of the said edge from the image after the said pixel is inserted based on the said amount of positional offsets. The image processing apparatus according to item 1. 前記フィルタ手段は、前記画素が挿入された後の画像の解像度に応じて、前記画素が挿入された後の画像から前記エッジの方向を判別する際の方向数を決定することを特徴とする請求項1〜6のいずれか1項に記載の画像処理装置。   The filter means determines the number of directions when determining the direction of the edge from the image after the pixel is inserted according to the resolution of the image after the pixel is inserted. Item 7. The image processing apparatus according to any one of Items 1 to 6. 前記フィルタ手段は、
前記画素の挿入がなされた後の画像について、画素値がゼロである欠落画素の画素数と、画素値がゼロより大きい非欠落画素の画素数との割合を求め、
前記割合に基づいて、前記画素が挿入された後の画像からエッジの方向の判別が行えるか否かを判定して、前記判別が行えたエッジの方向に基づいて前記方向別のフィルタリングを行うことを特徴とする請求項1又は2に記載の画像処理装置。
The filter means includes
For the image after the insertion of the pixel, find the ratio of the number of missing pixels whose pixel value is zero and the number of non-missing pixels whose pixel value is greater than zero,
Based on the ratio, it is determined whether or not the direction of the edge can be determined from the image after the pixel is inserted, and the filtering according to the direction is performed based on the direction of the edge that has been determined. The image processing apparatus according to claim 1, wherein:
前記フィルタ手段は、欠落画素の画素数と非欠落画素の画素数との割合として、前記画素の挿入がなされた後の画像のうちで非欠落画素が占める割合を求め、前記割合が所定の閾値未満である場合に、前記画素が挿入された後の画像からエッジの方向の判別が行えると判定することを特徴とする請求項9に記載の画像処理装置。   The filter means obtains a ratio of non-missing pixels in the image after the insertion of the pixels as a ratio between the number of missing pixels and the number of non-missing pixels, and the ratio is a predetermined threshold value. The image processing apparatus according to claim 9, wherein if it is less than the threshold value, it is determined that an edge direction can be determined from an image after the pixel is inserted. 前記画素が挿入される前の画像の中の着目画素の画素値と前記着目画素の周辺の複数の画素の画素値とを用いてエッジの方向を判別するためのフィルタ処理を行って、前記画素が挿入される前の画像のエッジの方向を判別する方向判別手段を有し、
前記フィルタ手段は、前記画素が挿入された後の画像からエッジの方向の判別が行えないと判定した場合には、前記方向判別手段により判別された前記エッジの方向に基づいて、前記画素が挿入された後の画像に対して、前記エッジの方向別のフィルタリングを行うことを特徴とする請求項3〜10のいずれか1項に記載の画像処理装置。
Performing a filtering process for determining an edge direction using a pixel value of a pixel of interest in an image before the pixel is inserted and pixel values of a plurality of pixels around the pixel of interest; Having direction discriminating means for discriminating the direction of the edge of the image before being inserted,
If it is determined that the edge direction cannot be determined from the image after the pixel is inserted, the filter unit inserts the pixel based on the edge direction determined by the direction determination unit. The image processing apparatus according to claim 3, wherein filtering is performed for each edge direction on the image after being processed.
前記方向判別手段は、前記画素が挿入される前の前記基準画像と前記他の複数枚の画像を用いてそれぞれ前記エッジの方向を判別し、
前記フィルタ手段は、前記画素が挿入された後の画像からエッジの方向の判別が行えないと判定した場合には、前記画素が挿入される前の前記基準画像と前記他の複数枚の画像からそれぞれ判別された複数のエッジの方向を各方向別に合計し、前記合計した数が最も多い方向に基づいて、前記画素が挿入された後の画像に対して、前記エッジの方向別のフィルタリングを行うことを特徴とする請求項11に記載の画像処理装置。
The direction discriminating unit discriminates the direction of the edge using the reference image before the pixel is inserted and the other plural images, respectively.
When it is determined that the direction of the edge cannot be determined from the image after the pixel is inserted, the filter means determines whether the reference image before the pixel is inserted and the other plurality of images. The directions of a plurality of determined edges are totaled for each direction, and filtering according to the direction of the edge is performed on the image after the pixels are inserted based on the direction having the largest total number. The image processing apparatus according to claim 11.
前記フィルタ手段は、
前記画素が挿入された後の画像からエッジの方向の判別が行える場合には、前記画素が挿入された後の画像から前記エッジの方向を判別する際のフィルタ処理で用いたタップ数を、前記エッジの方向別のフィルタリングの際のタップ数として決定し、
前記画素が挿入された後の画像からエッジの方向の判別が行えないと判定した場合には、前記方向判別手段が前記エッジの方向を判別する際のフィルタ処理で用いたタップ数を、前記エッジの方向別のフィルタリングの際のタップ数として決定することを特徴とする請求項11又は12に記載の画像処理装置。
The filter means includes
When the edge direction can be determined from the image after the pixel is inserted, the number of taps used in the filter processing when determining the edge direction from the image after the pixel is inserted is Determine the number of taps when filtering by edge direction,
When it is determined that the direction of the edge cannot be determined from the image after the pixel is inserted, the number of taps used in the filtering process when the direction determining unit determines the direction of the edge is The image processing apparatus according to claim 11, wherein the number of taps is determined as the number of taps for filtering in each direction.
複数枚の低解像度の画像を用いて高解像度の画像を生成する画像処理方法であって、
位置合わせ手段が、入力された複数枚の画像のうち、位置合わせの基準となる1枚の画像を基準画像とし、前記基準画像に対して、前記基準画像を除く他の複数枚の画像の位置を合わせるステップと、
画素挿入手段が、前記基準画像に対して、前記他の複数の画像の画素を挿入して高解像度の画像を生成するステップと、
フィルタ手段が、前記画素が挿入された後の画像からエッジの方向を判別して、前記判別したエッジの方向に基づき、前記画素の挿入がなされた後の画像に対して、前記エッジの方向別のフィルタリングを行うステップと
を含むことを特徴とする画像処理方法。
An image processing method for generating a high-resolution image using a plurality of low-resolution images,
The alignment means uses, as a reference image, one image serving as a reference for alignment among the plurality of input images, and positions of a plurality of other images excluding the reference image with respect to the reference image The step of matching
A step of inserting a pixel of the plurality of other images with respect to the reference image to generate a high-resolution image;
Filter means discriminates the direction of the edge from the image after the pixel is inserted, and based on the discriminated edge direction, the image after the pixel is inserted is classified according to the direction of the edge. An image processing method comprising the steps of:
コンピュータを、請求項1〜13のいずれか1項に記載の画像処理装置の各手段として機能させるためのプログラム。   The program for functioning a computer as each means of the image processing apparatus of any one of Claims 1-13.
JP2015167142A 2015-08-26 2015-08-26 Image processing apparatus, image processing method, and program Pending JP2017045273A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015167142A JP2017045273A (en) 2015-08-26 2015-08-26 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015167142A JP2017045273A (en) 2015-08-26 2015-08-26 Image processing apparatus, image processing method, and program

Publications (1)

Publication Number Publication Date
JP2017045273A true JP2017045273A (en) 2017-03-02

Family

ID=58210290

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015167142A Pending JP2017045273A (en) 2015-08-26 2015-08-26 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP2017045273A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019092844A1 (en) * 2017-11-10 2019-05-16 オリンパス株式会社 Image processing device, image processing method, and image processing program
US11445109B2 (en) 2017-07-05 2022-09-13 Olympus Corporation Image processing device, image capturing device, image processing method, and storage medium
US11882247B2 (en) 2019-12-04 2024-01-23 Olympus Corporation Image acquisition apparatus and camera body

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11445109B2 (en) 2017-07-05 2022-09-13 Olympus Corporation Image processing device, image capturing device, image processing method, and storage medium
WO2019092844A1 (en) * 2017-11-10 2019-05-16 オリンパス株式会社 Image processing device, image processing method, and image processing program
JP6553826B1 (en) * 2017-11-10 2019-07-31 オリンパス株式会社 Image processing apparatus, image processing method, and image processing program
US10491815B2 (en) 2017-11-10 2019-11-26 Olympus Corporation Image-processing apparatus, image-processing method, and non-transitory computer readable medium storing image-processing program
US11882247B2 (en) 2019-12-04 2024-01-23 Olympus Corporation Image acquisition apparatus and camera body

Similar Documents

Publication Publication Date Title
JP5980294B2 (en) Data processing apparatus, imaging apparatus, and data processing method
JP6308748B2 (en) Image processing apparatus, imaging apparatus, and image processing method
WO2013080920A1 (en) Image processing apparatus, image processing method, and image processing program
CN110930301A (en) Image processing method, image processing device, storage medium and electronic equipment
JP6087612B2 (en) Image processing apparatus and image processing method
US8363932B2 (en) Apparatus and method of removing false color in image
JP2014086956A (en) Image processing apparatus and image processing method
JP2017045273A (en) Image processing apparatus, image processing method, and program
US20110032269A1 (en) Automatically Resizing Demosaicked Full-Color Images Using Edge-Orientation Maps Formed In The Demosaicking Process
JP6838918B2 (en) Image data processing device and method
JP6274744B2 (en) Image processing apparatus and image processing method
JP2009237650A (en) Image processor and imaging device
JP6415094B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
JP6270423B2 (en) Image processing apparatus and control method thereof
JP6408884B2 (en) Image processing apparatus, image processing method, and program
US11303869B2 (en) Image processing apparatus and image processing method
JP6218520B2 (en) Image processing apparatus, image processing method, and program
JP2011151597A (en) Apparatus and program for processing image, and electronic camera
JP2014110507A (en) Image processing device and image processing method
JP2020149589A (en) Image processing device, imaging apparatus, image processing method, and program
JP2020057242A (en) Image processing system, image processing method, and program
EP4343678A1 (en) Method and apparatus for processing array image
JP2014086957A (en) Image processing device and image processing method
JP2016092806A (en) Image processing apparatus and image processing method
JP6012167B2 (en) Image processing apparatus, image processing method, and computer program