JP2012133492A - Image processing device and program - Google Patents

Image processing device and program Download PDF

Info

Publication number
JP2012133492A
JP2012133492A JP2010283740A JP2010283740A JP2012133492A JP 2012133492 A JP2012133492 A JP 2012133492A JP 2010283740 A JP2010283740 A JP 2010283740A JP 2010283740 A JP2010283740 A JP 2010283740A JP 2012133492 A JP2012133492 A JP 2012133492A
Authority
JP
Japan
Prior art keywords
interpolation
image
feature amount
image processing
processing apparatus
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.)
Withdrawn
Application number
JP2010283740A
Other languages
Japanese (ja)
Inventor
Tsukasa Murata
司 村田
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.)
Nikon Corp
Original Assignee
Nikon Corp
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 Nikon Corp filed Critical Nikon Corp
Priority to JP2010283740A priority Critical patent/JP2012133492A/en
Publication of JP2012133492A publication Critical patent/JP2012133492A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To prevent impression of blur of image from changing due to magnification processing.SOLUTION: The image processing device for magnifying image comprises: a feature amount extraction part that extracts feature amount relevant to blur from plural partial areas of an image; and an interpolation processing part that magnifies the image by performing interpolation calculation using an interpolation parameter suitable for the extracted feature amount on each of the plural partial areas. The feature amount extraction part may extract the feature amount by normalizing an edge amount extracted from each of plural partial areas in an image area wider than the partial area.

Description

本発明は、画像処理装置およびプログラムに関する。   The present invention relates to an image processing apparatus and a program.

入力された画像データを最近傍補間処理で拡大した後、拡大率に応じたサイズのフィルタでフィルタリングする技術が知られている(例えば特許文献1)。
[先行技術文献]
[特許文献]
[特許文献1]特開2002−259960号公報
A technique is known in which input image data is enlarged by nearest neighbor interpolation processing and then filtered with a filter having a size corresponding to the enlargement ratio (for example, Patent Document 1).
[Prior art documents]
[Patent Literature]
[Patent Document 1] JP 2002-259960 A

画像を補間処理で一様に変倍すると、変倍後の画像のエッジ成分の振る舞いが、元画像とは異なった振る舞いになる。例えば、画像の拡大処理では、拡大後の画像は一様にボケてしまう場合がある。また、画像の縮小処理では、縮小後の画像が一様にくっきりしたものになってしまう場合がある。このため、補間処理によって一様に変倍された画像が、元の画像とは大きく異なった印象の画像になってしまうという課題があった。   If the image is scaled uniformly by interpolation processing, the behavior of the edge component of the scaled image will be different from the original image. For example, in the image enlargement process, the enlarged image may be blurred uniformly. Further, in the image reduction process, the reduced image may be uniformly clear. For this reason, there has been a problem that an image that has been uniformly scaled by interpolation processing has an impression that is significantly different from the original image.

上記課題を解決するために、本発明の一態様においては、画像を変倍する画像処理装置であって、画像内の複数の部分領域のそれぞれから、ボケに関する特徴量を抽出する特徴量抽出部と、複数の部分領域のそれぞれに対し、それぞれから抽出された特徴量に応じた補間パラメータを用いて補間演算をすることにより、画像を変倍する補間処理部とを備える。   In order to solve the above-described problem, in one aspect of the present invention, an image processing apparatus for scaling an image, the feature amount extraction unit extracting a feature amount related to blur from each of a plurality of partial regions in the image. And an interpolation processing unit that scales the image by performing an interpolation operation on each of the plurality of partial regions using an interpolation parameter corresponding to the feature amount extracted from each of the partial regions.

なお、上記の発明の概要は、本発明の必要な特徴の全てを列挙したものではない。また、これらの特徴群のサブコンビネーションもまた、発明となりうる。   It should be noted that the above summary of the invention does not enumerate all the necessary features of the present invention. In addition, a sub-combination of these feature groups can also be an invention.

カメラ100が撮影した画像を変倍するシーンを示す概念図である。It is a conceptual diagram which shows the scene which changes the magnification of the image which the camera 100 image | photographed. 本実施形態に係るカメラ100のシステム構成図を示す図である。It is a figure which shows the system block diagram of the camera 100 which concerns on this embodiment. 縮小画像400を生成する処理の一部を模式的に示す図である。It is a figure which shows typically a part of process which produces | generates the reduced image 400. FIG. 縮小画像400を生成する処理の一部を模式的に示す図である。It is a figure which shows typically a part of process which produces | generates the reduced image 400. FIG. 補間演算に用いる補間パラメータの一例を説明する図である。It is a figure explaining an example of the interpolation parameter used for an interpolation calculation. カメラ100において縮小画像を生成する処理フローを示す図である。FIG. 6 is a diagram showing a processing flow for generating a reduced image in the camera 100.

以下、発明の実施の形態を通じて本発明を説明するが、以下の実施形態は特許請求の範囲にかかる発明を限定するものではない。また、実施形態の中で説明されている特徴の組み合わせの全てが発明の解決手段に必須であるとは限らない。   Hereinafter, the present invention will be described through embodiments of the invention, but the following embodiments do not limit the invention according to the claims. In addition, not all the combinations of features described in the embodiments are essential for the solving means of the invention.

図1は、カメラ100が撮影した画像を変倍するシーンを示す概念図である。カメラ100は、撮像装置の一例としてのデジタルカメラである。カメラ100で撮像されて生成された撮像画像データは、撮影結果等をユーザに提示すべく、表示パネル等の表示部110に表示される。このとき、撮像画像データは、表示部110が画像表示に用いる画素数の画像データに変換される。多くの場合、撮像画像データは縮小されて表示部110に表示される。近年、撮像装置が有する撮像素子の有効画素数はますます高くなる。しかし、表示部110が有する画素数は大きく増えていないので、撮像画像データに対する縮小率は高くなる傾向にある。   FIG. 1 is a conceptual diagram showing a scene in which an image taken by the camera 100 is scaled. The camera 100 is a digital camera as an example of an imaging device. The captured image data generated by being captured by the camera 100 is displayed on a display unit 110 such as a display panel in order to present a captured result or the like to the user. At this time, the captured image data is converted into image data of the number of pixels used by the display unit 110 for image display. In many cases, the captured image data is reduced and displayed on the display unit 110. In recent years, the number of effective pixels of an image pickup device included in an image pickup apparatus is increasing. However, since the number of pixels included in the display unit 110 has not increased significantly, the reduction ratio for captured image data tends to be high.

また、カメラ100で生成された撮像画像データは、種々の画像出力機器を介して種々の出力媒体に出力される。例えば、撮像画像データは、画像出力機器の一例としてのデジタルフォトフレーム20、携帯電話端末30、パーソナルコンピュータ42、テレビ60等に出力され、各画像出力機器がそれぞれ有する表示パネルに出力される。撮像画像データは、表示パネルが表示に用いる画素数に従って縮小または拡大されて表示される。また、撮像画像データは、プリンタ50に出力され、プリンタ50が有するプリントヘッドのプリント解像度に応じた画素数に従って縮小または拡大されて、プリント媒体にプリントされる。画像出力機器としては、図示した機器の他、プロジェクタなどの投影装置等を例示することができる。   Also, captured image data generated by the camera 100 is output to various output media via various image output devices. For example, the captured image data is output to a digital photo frame 20, a mobile phone terminal 30, a personal computer 42, a television 60, etc. as an example of an image output device, and is output to a display panel included in each image output device. The captured image data is displayed by being reduced or enlarged according to the number of pixels used for display by the display panel. The captured image data is output to the printer 50, and is reduced or enlarged according to the number of pixels corresponding to the print resolution of the print head of the printer 50, and printed on the print medium. Examples of the image output device include a projection device such as a projector in addition to the illustrated device.

例えば、近年の撮像装置で撮像された高画素数の撮像画像データを、デジタルフォトフレーム20や、大型TV60に表示する場合、撮像画像データを大きく縮小して表示する必要がある。また、少画素数の画像データを、PC42を用いてPCモニター40に部分的に拡大するなどして表示する場合、画像データを大きく拡大して表示する必要がある。   For example, when high-pixel-captured image data captured by a recent imaging apparatus is displayed on the digital photo frame 20 or the large TV 60, the captured image data needs to be greatly reduced and displayed. Further, when displaying image data with a small number of pixels by partially enlarging the image data on the PC monitor 40 using the PC 42, it is necessary to display the image data in a greatly enlarged manner.

一般に、画像に変倍処理を施すと、変倍処理の前後で画像の見た目の印象が変わってしまう場合がある。例えば画像を縮小する場合、画像の一部にボケのある領域があったとしても、縮小処理でその領域がくっきりしてしまい、全体が一様にくっきりした画像なってしまう場合がある。具体的には、変倍前の画像に背景としてボカされて撮影された雲や山が、縮小処理によって前景の主要被写体と同じ程度にくっきりしてしまう場合などである。   In general, when a scaling process is performed on an image, the appearance of the image may change before and after the scaling process. For example, when an image is reduced, even if there is a blurred area in a part of the image, the area may be sharpened by the reduction process, and the entire image may be uniformly clear. Specifically, a case where a cloud or mountain photographed as a background in an image before zooming is sharpened to the same extent as the main subject in the foreground by the reduction process.

変倍前後で生じる見た目の印象の変化は、拡大率や縮小率が高い場合に特に顕著になり易い。また、PCモニター40やデジタルフォトフレーム20を含む画像出力機器には、様々な画素数の画像が入力される場合がある。したがって、特定の変倍率だけでなく、幅広い変倍率に対しても見た目の印象が変わらないような変倍処理が望まれる。   The change in the appearance impression that occurs before and after zooming tends to be particularly noticeable when the enlargement ratio or reduction ratio is high. In addition, an image output device including the PC monitor 40 and the digital photo frame 20 may receive an image having various numbers of pixels. Therefore, there is a demand for a scaling process that does not change the visual impression not only for a specific scaling ratio but also for a wide range of scaling ratios.

本実施形態では、画像のボケに着目して、見た目の印象が変倍処理の前後で変化しにくい画像処理の一例を説明する。本実施形態では、カメラ100が撮像画像データを補間演算で縮小して表示部110に表示する場合等、主として撮像画像データを縮小する場合を取り上げて、カメラ100の動作の一例を説明する。   In the present embodiment, an example of image processing in which the visual impression is less likely to change before and after the scaling process will be described by focusing on image blur. In the present embodiment, an example of the operation of the camera 100 will be described by taking up mainly the case where the captured image data is reduced, such as when the camera 100 reduces the captured image data by interpolation and displays the image on the display unit 110.

図2は、本実施形態に係るカメラ100のシステム構成図を示す。カメラ100は光学系101を備える。光学系101は、ズームレンズ、フォーカスレンズ等により構成される。被写体光は光軸に沿って光学系101に入射し、シャッタ102を通過して撮像素子103の受光面に被写体像として結像する。   FIG. 2 is a system configuration diagram of the camera 100 according to the present embodiment. The camera 100 includes an optical system 101. The optical system 101 includes a zoom lens, a focus lens, and the like. Subject light enters the optical system 101 along the optical axis, passes through the shutter 102, and forms an image as a subject image on the light receiving surface of the image sensor 103.

撮像素子103は、被写体像である光学像を光電変換する素子であり、例えば、CCD、CMOSセンサが用いられる。撮像素子103で光電変換された被写体像は、電荷として読み出されてアンプ部104でゲイン調整等がなされる。アンプ部104で増幅された信号は、アナログ信号としてA/D変換器105へ転送され、A/D変換器105でデジタル信号に変換される。撮像素子103の電荷読み出し、シャッタ102の駆動等の制御は、システム制御部114の同期制御を受けたタイミング発生部112が供給するクロック信号により制御される。   The image sensor 103 is an element that photoelectrically converts an optical image that is a subject image, and for example, a CCD or a CMOS sensor is used. The subject image photoelectrically converted by the image sensor 103 is read out as electric charge, and gain adjustment or the like is performed by the amplifier unit 104. The signal amplified by the amplifier unit 104 is transferred as an analog signal to the A / D converter 105 and converted to a digital signal by the A / D converter 105. Controls such as charge reading of the image sensor 103 and driving of the shutter 102 are controlled by a clock signal supplied by the timing generator 112 that receives synchronization control of the system controller 114.

デジタル信号に変換された被写体像は、画像データとして順次処理される。A/D変換器105によりデジタル信号に変換された画像データは、画像処理部107へ引き渡されて処理される。具体的には、A/D変換器105によりデジタル信号に変換された画像データは、メモリ制御部106の制御により、内部メモリ108に一旦記憶される。内部メモリ108は、高速で読み書きのできるランダムアクセスメモリであり、例えばDRAM、SRAMなどが用いられる。内部メモリ108は、連写撮影、動画撮影において高速に連続して画像データが生成される場合に、画像処理の順番を待つバッファメモリとしての役割を担う。また、画像処理部107が行う画像処理、圧縮処理において、ワークメモリとしての役割も担う。したがって、内部メモリ108は、これらの役割を担うに相当する十分なメモリ容量を備える。メモリ制御部106は、いかなる作業にどれくらいのメモリ容量を割り当てるかを制御する。   The subject image converted into the digital signal is sequentially processed as image data. The image data converted into a digital signal by the A / D converter 105 is delivered to the image processing unit 107 and processed. Specifically, the image data converted into a digital signal by the A / D converter 105 is temporarily stored in the internal memory 108 under the control of the memory control unit 106. The internal memory 108 is a random access memory that can be read and written at high speed, and for example, a DRAM, an SRAM, or the like is used. The internal memory 108 serves as a buffer memory that waits for the order of image processing when image data is continuously generated at high speed in continuous shooting and moving image shooting. In addition, the image processing unit 107 also serves as a work memory in the image processing and compression processing. Therefore, the internal memory 108 has a sufficient memory capacity corresponding to these roles. The memory control unit 106 controls how much memory capacity is allocated to what work.

画像処理部107は、設定されている撮影モード、ユーザからの指示に従って、画像データを規格化された画像フォーマットの画像データに変換する。例えば、カメラ100の撮影モードの一部として静止画撮影モードおよび動画撮影モードを有しており、静止画撮影モードで静止画像としてJPEGファイルを生成する場合、画像処理部107は、色変換処理、ガンマ処理、ホワイトバランス補正等の画像処理を行った後に適応離散コサイン変換等を施して圧縮処理を行う。また、例えば動画撮影モードで動画像としてのMPEGファイル、H.264ファイルを生成する場合、画像処理部107は、生成された連続する静止画としてのフレーム画像に対して、フレーム内符号化、フレーム間符号化、量子化、エントロピー符号化等を施して圧縮処理を行う。   The image processing unit 107 converts the image data into image data of a standardized image format according to the set shooting mode and an instruction from the user. For example, when having a still image shooting mode and a moving image shooting mode as part of the shooting mode of the camera 100 and generating a JPEG file as a still image in the still image shooting mode, the image processing unit 107 performs color conversion processing, After performing image processing such as gamma processing and white balance correction, compression processing is performed by performing adaptive discrete cosine transform or the like. Also, for example, an MPEG file as a moving image in the moving image shooting mode, When generating an H.264 file, the image processing unit 107 performs compression processing by performing intra-frame encoding, inter-frame encoding, quantization, entropy encoding, and the like on the generated frame images as continuous still images. I do.

変換された画像データは再び内部メモリ108に保管される。画像処理部107によって処理された静止画像データ、動画像データは、システム制御部114の制御により、内部メモリ108から記録媒体IF111を介して、不揮発性メモリである記録媒体122に記録される。記録媒体122は、フラッシュメモリ等により構成される。記録媒体122は、カメラ100の本体に対して着脱可能な不揮発性メモリであってよい。   The converted image data is stored in the internal memory 108 again. Still image data and moving image data processed by the image processing unit 107 are recorded on the recording medium 122 which is a nonvolatile memory from the internal memory 108 via the recording medium IF 111 under the control of the system control unit 114. The recording medium 122 is configured by a flash memory or the like. The recording medium 122 may be a non-volatile memory that can be attached to and detached from the main body of the camera 100.

画像処理部107は、記録用に処理される画像データに並行して、表示用の画像データを生成する。画像処理部107は、記録用に処理される画像データに並行して、後述する変倍処理を施すことによって表示用の画像データを生成する。生成された表示用の画像データは、表示制御部109の制御に従って、液晶パネル等で構成される表示部110に表示される。また、表示制御部109は、画像の表示と共に、もしくは画像を表示することなく、カメラ100の各種設定に関する様々なメニュー項目を、表示部110に表示することができる。   The image processing unit 107 generates display image data in parallel with the image data processed for recording. The image processing unit 107 generates display image data by performing a scaling process described later in parallel with the image data processed for recording. The generated display image data is displayed on the display unit 110 configured by a liquid crystal panel or the like under the control of the display control unit 109. In addition, the display control unit 109 can display various menu items related to various settings of the camera 100 on the display unit 110 with or without displaying an image.

カメラ100は、上記の画像処理における各々の要素も含めて、システム制御部114により直接的または間接的に制御される。システム制御部114は、電気的に消去・記録可能な不揮発性メモリであるシステムメモリを有する。システムメモリは、EEPROM(登録商標)等により構成される。システム制御部114が有するシステムメモリは、カメラ100の動作時に必要な定数、変数、プログラム等を、カメラ100の非動作時にも失われないよう記録している。システム制御部114は、定数、変数、プログラム等を適宜内部メモリ108に展開して、カメラ100の制御に利用する。   The camera 100 is directly or indirectly controlled by the system control unit 114 including each element in the image processing described above. The system control unit 114 includes a system memory that is an electrically erasable / recordable nonvolatile memory. The system memory is configured by EEPROM (registered trademark) or the like. The system memory included in the system control unit 114 records constants, variables, programs, and the like necessary when the camera 100 is operating so that they are not lost even when the camera 100 is not operating. The system control unit 114 expands constants, variables, programs, and the like as appropriate in the internal memory 108 and uses them for controlling the camera 100.

カメラ100は、ユーザからの操作を受け付ける操作部材120を備えている。システム制御部114は、操作部材120が操作されたことを検知する。システム制御部114は、検出された操作に応じた動作を実行する。例えば、操作部材120としてのレリーズスイッチが操作されたことを検知したときには、システム制御部114は、被写体像を光電変換して画像データを生成する一連の撮影動作を実行する。   The camera 100 includes an operation member 120 that receives an operation from a user. The system control unit 114 detects that the operation member 120 has been operated. The system control unit 114 performs an operation according to the detected operation. For example, when it is detected that the release switch as the operation member 120 is operated, the system control unit 114 performs a series of shooting operations for photoelectrically converting the subject image to generate image data.

光学系101は、レンズ制御部113によって制御される。レンズ制御部113は、例えば、ユーザの指示に応じてズームレンズを駆動し、被写体像の画角を変更する。また、レンズ制御部113は、AF情報に基づいてフォーカスレンズを駆動し、被写体像を撮像素子103の受光面上で合焦させる。レンズ制御部113は、操作部材120等を通じてユーザによって指定された被写体に対して、オートフォーカスの制御を実行してよい。また、レンズ制御部113は、画像処理部107が処理した画像データまたは測光センサの出力を解析して露出値を算出する。レンズ制御部113は、算出した露出値に従って、光学系101が有する絞りの制御信号を出力する。   The optical system 101 is controlled by the lens control unit 113. For example, the lens control unit 113 drives the zoom lens in accordance with a user instruction to change the angle of view of the subject image. In addition, the lens control unit 113 drives the focus lens based on the AF information, and focuses the subject image on the light receiving surface of the image sensor 103. The lens control unit 113 may perform autofocus control on a subject designated by the user through the operation member 120 or the like. The lens control unit 113 also calculates the exposure value by analyzing the image data processed by the image processing unit 107 or the output of the photometric sensor. The lens control unit 113 outputs a control signal for the diaphragm of the optical system 101 according to the calculated exposure value.

図3、4は、入力画像300に縮小処理を施して縮小画像400を生成するまでの処理を模式的に示す。図3および4に係る処理は、特に断わらない限り、画像処理部107が主体として動作することで実行される。入力画像300は、例えば撮像素子103によって撮像され内部メモリ108に記憶された撮像画像データであり、縮小処理の対象となる画像である。例えば、入力画像300は、4928×3264画素等、1600万画素を超える画素数の画像データであってよい。一方、縮小後の画像は、例えば、900×600画素など、100万画素以下の画素数の画像データであってよい。   3 and 4 schematically show processing until the reduced image 400 is generated by performing the reduction processing on the input image 300. The processing according to FIGS. 3 and 4 is executed by the image processing unit 107 acting as a main subject unless otherwise specified. The input image 300 is captured image data captured by the image sensor 103 and stored in the internal memory 108, for example, and is an image to be subjected to a reduction process. For example, the input image 300 may be image data having a number of pixels exceeding 16 million pixels, such as 4928 × 3264 pixels. On the other hand, the reduced image may be image data having a number of pixels of one million pixels or less, such as 900 × 600 pixels.

画像処理部107は、入力画像300に対してエッジ量抽出処理310を施して、縮小画像の各画素点に対応してエッジ量を有するデータ列を内部メモリ108に生成する。本データ列のことを、エッジ量画像320と呼ぶ。エッジ量抽出処理310では、例えば、縮小画像の画素位置に対応する予め定められた大きさの部分領域から、エッジ量が抽出される。一例として、エッジ抽出フィルタ312が、入力画像300内の実線で図示した複数の部分領域にそれぞれ適用される。例示したエッジ抽出フィルタ312は、部分領域の一例としての3×3画素の画素ブロック内の各画素に適用する重み係数として、中心画素に対して8、周囲の8画素に対して−1を定めている。エッジ抽出フィルタ312を適用することで各中心画素のエッジ量が抽出される。抽出された各中心画素のエッジ量が、エッジ量画像320内の破線で図示した画素点に対応づけられる。なお、エッジ量の抽出方法は、本例に限られない。また、エッジ量を抽出するフィルタのサイズも本例に限られない。   The image processing unit 107 performs an edge amount extraction process 310 on the input image 300 to generate a data string having an edge amount corresponding to each pixel point of the reduced image in the internal memory 108. This data string is called an edge amount image 320. In the edge amount extraction process 310, for example, an edge amount is extracted from a partial area having a predetermined size corresponding to the pixel position of the reduced image. As an example, the edge extraction filter 312 is applied to each of a plurality of partial regions illustrated by solid lines in the input image 300. The illustrated edge extraction filter 312 determines 8 for the center pixel and −1 for the surrounding 8 pixels as the weighting coefficient applied to each pixel in the 3 × 3 pixel block as an example of the partial region. ing. By applying the edge extraction filter 312, the edge amount of each center pixel is extracted. The extracted edge amount of each central pixel is associated with the pixel point illustrated by the broken line in the edge amount image 320. Note that the edge amount extraction method is not limited to this example. The size of the filter for extracting the edge amount is not limited to this example.

画像処理部107は、エッジ量画像320に対して正規化処理330を施して正規化画像340を生成し、内部メモリ108に生成する。正規化画像340は、縮小画像の各画素点に対応して、正規化されたエッジ量を有するデータ列である。正規化処理330では、エッジ量画像320の全領域から、エッジ量の平均値および標準偏差σを算出する。そして、各画素点についてエッジ量から平均値を減算して偏差を算出する。そして、各画素点について偏差を標準偏差σで除すことで、正規化画像340を生成する。正規化画像340は、縮小画像の各画素点で、相対的にどれくらい強いエッジを有するべきかを示しているといえる。   The image processing unit 107 performs a normalization process 330 on the edge amount image 320 to generate a normalized image 340 and generates it in the internal memory 108. The normalized image 340 is a data string having a normalized edge amount corresponding to each pixel point of the reduced image. In the normalization process 330, the average value of the edge amount and the standard deviation σ are calculated from the entire region of the edge amount image 320. Then, the deviation is calculated by subtracting the average value from the edge amount for each pixel point. Then, the normalized image 340 is generated by dividing the deviation for each pixel point by the standard deviation σ. It can be said that the normalized image 340 shows how strong the edge should be at each pixel point of the reduced image.

画像処理部107は、正規化画像340に対して平滑化処理350を施して平滑化画像360を生成し、内部メモリ108に生成する。平滑化画像360は、縮小画像の各画素点に対応して、正規化かつ平滑化されたエッジ量を有するデータ列である。例えば、平滑化処理350では、平滑化フィルタ352を各画素点に適用することによって、各画素点の正規化されたエッジ量を平滑化する。例示した平滑化フィルタ352は、注目画素に対して2、周囲の8画素に対して1を定めている。平滑化処理350により、注目画素と周辺画素との間の相関を強化することができる。平滑化の具体的な処理方法は、本例に限られない。注目画素に対して周囲の画素の振舞いを加味することができる処理であれば、どのような処理であってもよい。平滑化したエッジ量に変換する場合に、予め定められた任意の関数を用いて変換したり、LUTを用いて変換してもよい。   The image processing unit 107 performs a smoothing process 350 on the normalized image 340 to generate a smoothed image 360, which is generated in the internal memory 108. The smoothed image 360 is a data string having a normalized and smoothed edge amount corresponding to each pixel point of the reduced image. For example, in the smoothing process 350, the normalized edge amount of each pixel point is smoothed by applying the smoothing filter 352 to each pixel point. The illustrated smoothing filter 352 determines 2 for the target pixel and 1 for the surrounding 8 pixels. By the smoothing process 350, the correlation between the target pixel and the peripheral pixels can be enhanced. The specific processing method of smoothing is not limited to this example. Any processing may be used as long as the behavior of surrounding pixels can be added to the target pixel. When converting to a smoothed edge amount, conversion may be performed using an arbitrary predetermined function or using an LUT.

図3で例示した処理により、画像処理部107は、入力画像300内の複数の部分領域のそれぞれから、ボケに関する特徴量を抽出することができる。本実施形態に係る説明で単に特徴量と呼ぶときは、特に断らない限り、ボケに関する特徴量を指す。本実施形態においては、特に断らない限り、特徴量とは正規化かつ平滑化されたエッジ量を指す。   With the processing illustrated in FIG. 3, the image processing unit 107 can extract a feature amount related to blur from each of a plurality of partial regions in the input image 300. When simply referred to as a feature value in the description of the present embodiment, it refers to a feature value related to blur unless otherwise specified. In the present embodiment, unless otherwise specified, the feature amount refers to a normalized and smoothed edge amount.

図4は、平滑化画像360から、縮小画像400を生成するまでの処理を模式的に示す。上述したように、平滑化画像360は、縮小画像の各画素点に対応して特徴量を有するデータ列である。画像処理部107は、フィルタパラメータ抽出処理370として、各画素点の特徴量を補間パラメータに変換する。   FIG. 4 schematically shows processing from the smoothed image 360 to the generation of the reduced image 400. As described above, the smoothed image 360 is a data string having a feature amount corresponding to each pixel point of the reduced image. As the filter parameter extraction process 370, the image processing unit 107 converts the feature amount of each pixel point into an interpolation parameter.

具体的には、画像処理部107は、特徴量と補間パラメータとを対応づけたテーブル372に従って、各画素点の特徴量を補間パラメータに変換する。テーブル372は、補間演算で用いる近傍画素に対する重み係数を定めるデータと、特徴量とを対応づけてよい。例えば、注目画素を内部に含むn×n画素ブロックの画素値を補間演算に使用する場合、n×n画素ブロックの各画素位置(x〜x、y〜y)に対応するn個の重み係数を定めるデータが、テーブル372に記憶される。 Specifically, the image processing unit 107 converts the feature amount of each pixel point into an interpolation parameter according to a table 372 that associates the feature amount with the interpolation parameter. The table 372 may associate data defining a weighting factor for neighboring pixels used in the interpolation calculation with the feature amount. For example, when the pixel value of the n × n pixel block including the target pixel is used for the interpolation calculation, n corresponding to each pixel position (x 1 to x n , y 1 to y n ) of the n × n pixel block. data defining the two weighting coefficients are stored in the table 372.

テーブル372には、より大きい値の特徴量に対応して、より高い空間周波成分を伝達することができる重み係数を定めるデータが記憶される。例えば、テーブル372に記憶されるデータとしては、キュービック補間の重み係数の関数形状を定めるパラメータを例示することができる。テーブル372には、特徴量および縮小率の組み合わせに対応して、重み係数を定めるデータが記憶されてよい。重み係数を定めるデータの詳細については、後述する。   The table 372 stores data for determining a weighting factor that can transmit a higher spatial frequency component corresponding to a feature value having a larger value. For example, the data stored in the table 372 may include parameters that determine the function shape of the weighting coefficient for cubic interpolation. The table 372 may store data for determining weighting factors corresponding to combinations of feature amounts and reduction ratios. Details of the data for determining the weighting coefficient will be described later.

フィルタパラメータ抽出処理370により、補間パラメータ画像380が内部メモリ108に生成される。補間パラメータ画像380は、縮小画像の各画素点に対応して補間パラメータを有するデータ列となる。補間演算処理390では、補間パラメータ画像380と入力画像300とを用いて、縮小画像400を生成して内部メモリ108に記憶する。具体的には、入力画像300の画素値を補間パラメータに従って補間演算することにより、各画素点の画素値を算出する。   An interpolation parameter image 380 is generated in the internal memory 108 by the filter parameter extraction process 370. The interpolation parameter image 380 is a data string having an interpolation parameter corresponding to each pixel point of the reduced image. In the interpolation calculation process 390, the reduced image 400 is generated using the interpolation parameter image 380 and the input image 300 and stored in the internal memory 108. Specifically, the pixel value of each pixel point is calculated by performing interpolation calculation on the pixel value of the input image 300 according to the interpolation parameter.

本実施形態のカメラ100によれば、画像内でエッジ量が相対的に強い画像領域には、高周波数領域を伝達する補間パラメータを適用することができる。また、画像内でエッジ量が相対的に弱い画像領域には、高周波数領域を伝達しない補間パラメータを適用することができる。このため、入力画像300内で相対的にボケの小さい画像領域は、縮小画像400においても相対的にボケが小さく、相対的にボケのある画像領域は縮小画像400においても相対的にボケが大きくなる。したがって、縮小処理の前後で、ボケに関して見た目が大きく変わってしまうことを防ぐことができる。   According to the camera 100 of this embodiment, an interpolation parameter that transmits a high-frequency region can be applied to an image region having a relatively strong edge amount in the image. In addition, an interpolation parameter that does not transmit a high-frequency region can be applied to an image region having a relatively weak edge amount in the image. Therefore, an image area with relatively small blur in the input image 300 has relatively small blur in the reduced image 400, and an image area with relatively blur is relatively large in the reduced image 400. Become. Therefore, it is possible to prevent the appearance of blurring from changing significantly before and after the reduction process.

図5は、補間演算に用いる補間パラメータの一例を説明する図である。本図において、x軸は、補間位置から各画素位置までの距離を示す。横軸の座標値は、変倍対象の画像の画素間隔が1となるよう正規化されている。h(x)は、補間演算に用いられる重み係数を示す。   FIG. 5 is a diagram for explaining an example of interpolation parameters used for the interpolation calculation. In this figure, the x-axis indicates the distance from the interpolation position to each pixel position. The coordinate values on the horizontal axis are normalized so that the pixel interval of the image to be scaled is 1. h (x) represents a weighting coefficient used for the interpolation calculation.

重み係数500は、重み係数の一例として、キュービック補間の重み係数を示す。キュービック補間では、注目画素の近傍の4×4画素の画素値を重み係数に従って加重平均することにより、注目画素の画素値が算出される。本実施形態において、|x|が1以下の画素に対する重み係数を、h(x)=(a+2)|x|−(a+3)|x|+1で算出する。|x|が1より大きく2以下の画素に対する重み係数を、h(x)=a|x|−5a|x|+8a|x|−4aで算出する。|x|が2より大きい画素に対しては、重み係数として0を適用する。 The weighting factor 500 indicates a cubic interpolation weighting factor as an example of the weighting factor. In the cubic interpolation, the pixel value of the pixel of interest is calculated by weighted averaging the pixel values of 4 × 4 pixels in the vicinity of the pixel of interest according to a weighting coefficient. In the present embodiment, a weighting coefficient for a pixel having | x | of 1 or less is calculated as h (x) = (a + 2) | x | 3 − (a + 3) | x | 2 +1. The weighting coefficient for pixels where | x | is greater than 1 and less than or equal to 2 is calculated by h (x) = a | x | 3 −5a | x | 2 + 8a | x | −4a. For pixels where | x | is greater than 2, 0 is applied as a weighting factor.

本実施形態において、係数aは、h(x)の関数形状を定めるパラメータであり、重み係数を定めるデータの一例とする。本図には、a=−1の場合のh(x)が実線で示され、a=−0.2の場合のh(x)が点線で示される。a=−1で定まる重み係数と比較して、a=−0.2で定まる重み係数の方が、より高周波成分を伝達することができる。つまり、異なる値の係数aを選択することで、高周波成分の伝達度合いを異ならせることができる。したがって、図4に例示したテーブル372には、より大きい特徴量に対して、より高周波成分を伝達することができる係数aの値が対応づけられてよい。テーブル372には、2以上の特徴量に対して、互いに値が異なる係数aが対応づけられてよい。   In the present embodiment, the coefficient a is a parameter that determines the function shape of h (x), and is an example of data that determines the weighting coefficient. In the drawing, h (x) when a = −1 is indicated by a solid line, and h (x) when a = −0.2 is indicated by a dotted line. Compared with the weighting factor determined by a = −1, the weighting factor determined by a = −0.2 can transmit higher frequency components. That is, by selecting a coefficient a having a different value, the transmission degree of the high frequency component can be varied. Therefore, in the table 372 illustrated in FIG. 4, the value of the coefficient a that can transmit a higher frequency component may be associated with a larger feature amount. In the table 372, coefficients a having different values may be associated with two or more feature amounts.

重み係数510は、重み係数の他の一例としての線形補間の重み係数を示す。線形補間では、注目画素の近傍の2×2画素の画素値を用いて補間演算する。|x|が1以下の画素に対する重み係数は、h(x)=1−|x|で算出される。|x|が1を超える画素に対しては、重み係数として0が適用される。一般に、線形補間は、キュービック補間と比較すると、フィルタ半径が小さく、より高周波成分を伝達することができる。したがって、予め定められた値以下の特徴量を持つ画素点に対してキュービック補間を適用し、予め定められた値よりも大きい特徴量を持つ画素点に対して線形補間を適用してよい。例えば、テーブル372には、キュービック補間を識別する情報が第1の特徴量に対応づけられ、線形補間を識別する情報が、第1の特徴量も大きい第2の特徴量に対応づけられてよい。このように、テーブル372には、重み係数を定めるデータの一例として、補間演算に用いる補間関数を識別する情報が、特徴量に対応づけられてよい。   The weighting factor 510 indicates a weighting factor for linear interpolation as another example of the weighting factor. In linear interpolation, interpolation calculation is performed using pixel values of 2 × 2 pixels in the vicinity of the target pixel. The weighting coefficient for pixels having | x | of 1 or less is calculated by h (x) = 1− | x |. For pixels where | x | exceeds 1, 0 is applied as a weighting factor. In general, linear interpolation has a smaller filter radius and can transmit higher frequency components than cubic interpolation. Therefore, cubic interpolation may be applied to pixel points having a feature amount equal to or less than a predetermined value, and linear interpolation may be applied to pixel points having a feature amount larger than a predetermined value. For example, in the table 372, information for identifying cubic interpolation may be associated with a first feature amount, and information for identifying linear interpolation may be associated with a second feature amount having a large first feature amount. . As described above, in the table 372, information identifying an interpolation function used for the interpolation calculation may be associated with the feature amount as an example of data for determining the weighting coefficient.

図6は、カメラ100において縮小画像を生成する処理フローを示す。撮像画像データが内部メモリ108に記憶された場合に、本フローが開始される。本フロー図においては、特に断わらない限り、画像処理部107が主体となって動作する。   FIG. 6 shows a processing flow for generating a reduced image in the camera 100. This flow is started when the captured image data is stored in the internal memory 108. In this flowchart, the image processing unit 107 operates mainly unless otherwise specified.

ステップS602で、撮像画像データに対する縮小率を決定する。縮小率は、撮像画像データの画素数と、生成すべき縮小画像の画素数とにより決定される。ステップS604で、撮像画像データからエッジ量を抽出する。本処理フローは、図3に関連して説明したエッジ量抽出処理310に該当する。   In step S602, a reduction ratio for the captured image data is determined. The reduction ratio is determined by the number of pixels of the captured image data and the number of pixels of the reduced image to be generated. In step S604, an edge amount is extracted from the captured image data. This processing flow corresponds to the edge amount extraction processing 310 described with reference to FIG.

ステップS606で、縮小後の画素に対応する特徴量を、撮像画像データから算出する。本処理フローは、図3に関連して説明した正規化処理330および平滑化処理350に該当する。本処理フローにより、図3に関連して説明した平滑化画像360に対応するデータが、内部メモリ108に生成される。   In step S606, a feature amount corresponding to the reduced pixel is calculated from the captured image data. This processing flow corresponds to the normalization processing 330 and the smoothing processing 350 described with reference to FIG. With this processing flow, data corresponding to the smoothed image 360 described with reference to FIG. 3 is generated in the internal memory 108.

ステップS608で、画素点毎に補間パラメータを算出する。本処理フローは、図4に関連して説明したフィルタパラメータ抽出処理370に該当する。図4および5に関連して説明したように、縮小率および特徴量の組み合わせに応じて、補間パラメータが選択される。例えば図5等に関連して説明したように、縮小率および特徴量に補間パラメータを対応づけるテーブル372に従って、画素点毎に補間パラメータを選択する。例えば縮小率および特徴量に対応する、キュービック補間用の係数aが、画素点毎に決定される。そして、画素点の位置と、撮像画像データの4×4画素との位置関係に基づき、補間パラメータの一例としての重み係数のセットが、画素点毎に算出される。   In step S608, an interpolation parameter is calculated for each pixel point. This processing flow corresponds to the filter parameter extraction processing 370 described with reference to FIG. As described with reference to FIGS. 4 and 5, the interpolation parameter is selected according to the combination of the reduction ratio and the feature amount. For example, as described with reference to FIG. 5 and the like, the interpolation parameter is selected for each pixel point according to the table 372 that associates the interpolation parameter with the reduction ratio and the feature amount. For example, the coefficient a for cubic interpolation corresponding to the reduction ratio and the feature amount is determined for each pixel point. Then, based on the positional relationship between the position of the pixel point and 4 × 4 pixels of the captured image data, a set of weighting coefficients as an example of an interpolation parameter is calculated for each pixel point.

ステップS610で、ステップS608で算出された補間パラメータを用いて、撮像画像データを補間演算することにより、縮小画像を算出する。本処理フローは、図4に関連して説明した補間演算処理390に該当する。例えばステップS608で画素点毎に算出された重み係数のセットを、撮像画像データの対応する4×4画素に適用して加重平均することにより、各画素点の画素値が算出される。   In step S610, a reduced image is calculated by performing an interpolation operation on the captured image data using the interpolation parameter calculated in step S608. This processing flow corresponds to the interpolation calculation processing 390 described with reference to FIG. For example, the pixel value of each pixel point is calculated by applying the weighted coefficient set calculated for each pixel point in step S608 to the corresponding 4 × 4 pixels of the captured image data and performing weighted averaging.

ステップS612において、縮小画像を出力する。例えば、表示制御部109の制御により、縮小画像が表示部110に表示される。縮小画像は、記録媒体IF111を介して記録媒体122に記録されてもよい。   In step S612, a reduced image is output. For example, the reduced image is displayed on the display unit 110 under the control of the display control unit 109. The reduced image may be recorded on the recording medium 122 via the recording medium IF111.

ステップS614で、撮像画像データから他の縮小率の画像を生成するかを判断する。例えば、外部のフォトフレーム20等の外部の画像出力機器用の画像を生成するかを判断する。他にも、ユーザが指定した一部領域を拡大した画像を更に生成するか否かを判断する。他の縮小率の画像を生成する場合、ステップS602に進む。予め定められた縮小画像のセットが生成されるまで、ステップS602からステップS612の処理を続ける。全ての縮小率の画像の生成が完了すると、一連の縮小画像の生成処理を終了する。   In step S614, it is determined whether to generate an image with another reduction ratio from the captured image data. For example, it is determined whether to generate an image for an external image output device such as the external photo frame 20. In addition, it is determined whether or not to further generate an image in which a partial area designated by the user is enlarged. When generating an image with another reduction ratio, the process proceeds to step S602. The processing from step S602 to step S612 is continued until a predetermined reduced image set is generated. When the generation of all the reduction ratio images is completed, a series of reduced image generation processing ends.

以上に説明した縮小処理によれば、特にボケに関する特徴量に応じて異なる補間パラメータを用いて補間演算することができる。このため、ボケが相対的に大きい部分領域のエッジが強調されてくっきりしてしまうことがない。また、ボケが相対的に小さい部分領域がボケてしまうこともない。このため、縮小対象の画像内のボケ具合の違いを、縮小後の画像にきちんと反映することができる。   According to the reduction process described above, it is possible to perform an interpolation operation using different interpolation parameters depending on, in particular, a feature amount related to blur. For this reason, the edge of the partial area where the blur is relatively large is not emphasized and sharpened. In addition, the partial area where the blur is relatively small is not blurred. For this reason, the difference in the degree of blur in the image to be reduced can be properly reflected in the image after reduction.

上記では、縮小処理をする場合のカメラ100の動作を主として説明した。しかし、同様の処理を拡大処理にも適用することで、ボケに関する特徴量に応じて異なる補間パラメータを用いて補間演算することができる。したがって、拡大処理においても、画像全体に一様な補間パラメータを適用する場合と比べて、ボケが相対的に小さい部分領域がボケてしまうことを防ぐことができる。このため、拡大対象の画像内のボケ具合の違いを、拡大後の画像にきちんと反映することができる。したがって、以上に説明したボケに関する特徴量に応じた補間処理は、画素数を低減する縮小処理だけでなく、画素数を増加する拡大処理にも適用することができる。   In the above, the operation of the camera 100 when performing the reduction process has been mainly described. However, by applying the same process to the enlargement process, it is possible to perform an interpolation operation using different interpolation parameters according to the feature amount related to the blur. Therefore, even in the enlargement process, it is possible to prevent a partial region with relatively small blurring from being blurred compared to a case where uniform interpolation parameters are applied to the entire image. For this reason, the difference in the degree of blur in the image to be enlarged can be accurately reflected in the enlarged image. Therefore, the interpolation processing according to the feature amount related to the blur described above can be applied not only to the reduction processing for reducing the number of pixels but also to the enlargement processing for increasing the number of pixels.

画像処理部107は、画像内の複数の部分領域のそれぞれから、ボケに関する特徴量を抽出する特徴量抽出部と、複数の部分領域のそれぞれに対し、それぞれから抽出された特徴量に応じた補間パラメータを用いて補間演算をすることにより、画像を変倍する補間処理部として機能することができる。上記において、複数の部分領域のそれぞれから抽出したエッジ量を、全画像領域で正規化することにより、特徴量を抽出するとして説明した。しかし、正規化の対象とする画像領域は、画像領域全体でなくともよい。例えば、縮小画像の複数の画素点を含む複数の画素点から形成される画像領域であればよい。すなわち、上記複数の部分領域のそれぞれから抽出したエッジ量を、部分領域よりも広い画像領域で正規化することにより、特徴量を抽出してよい。画像全体または比較的に広い画像領域で正規化することで、例えば全体的に画像がボケている撮像画像データの中でも、特徴量の分布に応じて補間パラメータを異ならせることができる。全体的にくっきりした撮像画像データに対しても同様である。したがって、変倍対象となる画像内のボケ具合の違いを、変倍後の画像に適切に反映することができる。   The image processing unit 107 extracts a feature quantity related to blur from each of a plurality of partial areas in the image, and performs interpolation according to the feature quantity extracted from each of the plurality of partial areas. By performing the interpolation calculation using the parameters, it can function as an interpolation processing unit for scaling the image. In the above description, it has been described that the feature amount is extracted by normalizing the edge amount extracted from each of the plurality of partial regions in the entire image region. However, the image area to be normalized may not be the entire image area. For example, it may be an image region formed from a plurality of pixel points including a plurality of pixel points of the reduced image. That is, the feature amount may be extracted by normalizing the edge amount extracted from each of the plurality of partial regions with an image region wider than the partial region. By normalizing the entire image or a relatively wide image area, for example, even in captured image data in which the image is totally blurred, the interpolation parameter can be varied according to the distribution of the feature amount. The same applies to captured image data that is clear overall. Therefore, the difference in the degree of blur in the image to be scaled can be appropriately reflected in the image after scaling.

上記において、エッジ量の平均値および標準偏差σを用いて、正規化されたエッジ量を算出するとして説明した。しかし、画像内のエッジ量分布における各エッジ量の位置を評価できる指標値であれば、どのような処理で算出してもよい。   In the above description, the normalized edge amount is calculated using the average value of the edge amount and the standard deviation σ. However, any processing may be used as long as it is an index value that can evaluate the position of each edge amount in the edge amount distribution in the image.

上記において、エッジ量を加重平均する平均化フィルタを用いて、エッジ量を平滑化するとした。撮像画像データに局所的に急峻なエッジがある場合、対応する画素点に大きなエッジ量が算出されることがある。補間パラメータを選択する場合に、抽出したエッジ量を平滑化せずに用いると、隣接する画素間で補間特性が大きく異なるフィルタが適用されてしまう場合がある。しかし、本実施形態のようにエッジ量を平滑化することで、周囲の画素点のエッジ量を加味して特徴量を算出することができるので、ある画素点に周囲とは補間特性が全く異なるフィルタが適用されてしまうことがない。   In the above description, the edge amount is smoothed using an averaging filter that weights and averages the edge amount. When there is a locally steep edge in the captured image data, a large edge amount may be calculated at the corresponding pixel point. When selecting an interpolation parameter, if the extracted edge amount is used without being smoothed, a filter having greatly different interpolation characteristics may be applied between adjacent pixels. However, by smoothing the edge amount as in the present embodiment, the feature amount can be calculated by taking into account the edge amount of the surrounding pixel points, so that the interpolation characteristics of a certain pixel point are completely different from the surroundings. The filter is never applied.

エッジ量を平滑化する処理は、上記の平均化フィルタを用いた処理に限られず、周囲との間で平均化された特徴量を抽出することができる処理であれば、どのような処理であってもよい。例えば、縮小画像の画素数よりも少ない数の画素点でエッジ量を抽出して正規化し、縮小画像の画素点に対応するエッジ量を補間等で算出することで、縮小画像の画素点に対応する特徴量を算出してよい。少画素点のエッジ量から画素点のエッジ量を算出することで、特徴量の一例としての平滑化されたエッジ量を算出することができる。このように、変倍後の画像よりも少数の画素点に対応してエッジ量を抽出した場合でも、変倍後の画像の画素点に対応する特徴量を算出することがきる。すなわち、エッジ量を全画素点で抽出するか否かにかかわらず、画像の変倍後の複数の画素にそれぞれ対応する特徴量を抽出する。そして、複数の画素にそれぞれ対応する特徴量に応じた補間パラメータを用いてそれぞれ補間演算をすることにより、複数の画素の画素値をそれぞれ算出することができる。また別の一例として、エッジ量を補間するのではなく、変倍後の画像よりも少数の画素点について特徴量、または補間パラメータを算出するようにしてもよい。そして、算出しなかった画素点の補間パラメータを、近傍の画素点の特徴量、または補間パラメータを補間する事で算出してもよい。   The process for smoothing the edge amount is not limited to the process using the averaging filter described above, and any process can be used as long as it can extract the feature quantity averaged with the surroundings. May be. For example, by extracting and normalizing the edge amount with a smaller number of pixel points than the number of pixels of the reduced image, and calculating the edge amount corresponding to the pixel point of the reduced image by interpolation or the like, it corresponds to the pixel point of the reduced image The feature amount to be calculated may be calculated. By calculating the edge amount of the pixel point from the edge amount of the small pixel point, a smoothed edge amount as an example of the feature amount can be calculated. As described above, even when the edge amount is extracted corresponding to a smaller number of pixel points than the image after scaling, the feature amount corresponding to the pixel point of the image after scaling can be calculated. In other words, regardless of whether or not the edge amount is extracted at all pixel points, feature amounts corresponding to a plurality of pixels after scaling of the image are extracted. The pixel values of the plurality of pixels can be calculated by performing the interpolation calculation using the interpolation parameters corresponding to the feature amounts respectively corresponding to the plurality of pixels. As another example, the feature amount or the interpolation parameter may be calculated for a smaller number of pixel points than the image after scaling, instead of interpolating the edge amount. Then, the interpolation parameter of the pixel point that has not been calculated may be calculated by interpolating the feature amount of the neighboring pixel point or the interpolation parameter.

上記において、特徴量に応じてキュービック補間か線形補間かを選択したり、特徴量に応じてキュービック補間の係数aを決定したりすることで、補間演算に用いる近傍画素に対する重み係数を、特徴量に応じて異ならせるとした。しかし、キュービック補間および線形補間の他にも、最近傍補間、ガウシアン補間など、補間演算に用いる種々の補間フィルタの中から、適用すべき補間フィルタを選択することもできる。すなわち、補間演算に用いる補間フィルタの種類を、特徴量に応じて異ならせてもよい。また、特徴量に応じて、2つの異なるフィルターによる結果をもちいて、それぞれの重み付け和で結果を算出しても良い。   In the above, by selecting either cubic interpolation or linear interpolation according to the feature quantity, or by determining the coefficient a of cubic interpolation according to the feature quantity, the weighting coefficient for the neighboring pixels used for the interpolation calculation is calculated using the feature quantity. It was supposed to be different depending on the situation. However, in addition to cubic interpolation and linear interpolation, an interpolation filter to be applied can be selected from various interpolation filters such as nearest neighbor interpolation and Gaussian interpolation. In other words, the type of interpolation filter used for the interpolation calculation may be varied according to the feature amount. Also, depending on the feature amount, the result of two different filters may be used to calculate the result with the respective weighted sums.

例えば、特徴量が予め定められた値以下のボケ量を示す場合、第1補間関数に基づく補間フィルタを適用し、特徴量が予め定められた値よりも大きいボケ量を示す場合、第1補間関数よりも高空間周波数成分を伝達しない第2補間関数に基づく補間フィルタを適用してよい。「高空間周波数成分を伝達しない」とは、高空間周波数の成分を強調または発生しないこを含む概念である。第1補間フィルタとしては、線形補間および最近傍補間の少なくとも一方に基づく補間フィルタを例示することができ、第2補間フィルタとしては、キュービック補間およびガウシアン補間の少なくとも一方に基づく補間フィルタを例示することができる。   For example, when the feature amount indicates a blur amount equal to or less than a predetermined value, an interpolation filter based on the first interpolation function is applied, and when the feature amount indicates a blur amount larger than a predetermined value, the first interpolation An interpolation filter based on a second interpolation function that does not transmit a higher spatial frequency component than the function may be applied. “Not transmitting high spatial frequency components” is a concept including not emphasizing or generating high spatial frequency components. Examples of the first interpolation filter include an interpolation filter based on at least one of linear interpolation and nearest neighbor interpolation, and examples of the second interpolation filter include an interpolation filter based on at least one of cubic interpolation and Gaussian interpolation. Can do.

また、補間関数の形状を制御するパラメータとして、キュービック補間の係数aの他、ガウシアン補間の標準偏差σを例示することができる。例えば、ガウシアン補間の標準偏差σを、特徴量に基づき算出してよい。さらに、特徴量の大きさの逆数に比例する値を、ガウシアン補間の標準偏差σに適用してよい。この場合、エッジが強く特徴量が大きい値の部分では、ガウシアン補間のフィルター半径が大きくなり、その結果、補間処理で算出された対応点の画素値は低周波成分が大きくなる。   Further, as a parameter for controlling the shape of the interpolation function, the standard deviation σ of Gaussian interpolation can be exemplified in addition to the coefficient a of cubic interpolation. For example, the standard deviation σ of Gaussian interpolation may be calculated based on the feature amount. Furthermore, a value proportional to the inverse of the feature amount may be applied to the standard deviation σ of Gaussian interpolation. In this case, the filter radius of the Gaussian interpolation becomes large in the portion where the edge is strong and the feature amount is large, and as a result, the pixel value of the corresponding point calculated by the interpolation processing has a large low frequency component.

そして、特徴量に応じてフィルタ半径を異ならせるなど、補間演算に用いる近傍画素の画素数を特徴量に応じて異ならせてもよい。具体的には、特徴量がより大きいボケ量を示す場合、補間演算に用いる近傍画素の画素数をより大きくしてよい。一例として、特徴量が予め定められた値以下の場合、線形補間を適用し、特徴量が予め定められた値より大きい場合、フィルタ半径が線形補間よりも大きいキュービック補間を適用してよい。このように、特徴量がより大きい場合、より大きいフィルタ半径を持つ補間関数を適用する事で、ボケの大きい画素値が算出される。   Then, the number of neighboring pixels used for the interpolation calculation may be varied according to the feature amount, such as changing the filter radius according to the feature amount. Specifically, when the feature amount indicates a larger blur amount, the number of neighboring pixels used for the interpolation calculation may be increased. As an example, linear interpolation may be applied when the feature amount is equal to or smaller than a predetermined value, and cubic interpolation with a filter radius larger than the linear interpolation may be applied when the feature amount is larger than the predetermined value. As described above, when the feature amount is larger, a pixel value having a larger blur is calculated by applying an interpolation function having a larger filter radius.

上記において、補間パラメータが縮小率および特徴量に対応づけられているとして説明した。つまり、変倍処理の対象となる画像の画素数と変倍後の画素数との比に応じた補間パラメータを適用することを説明した。一例として、縮小率がより大きい場合に、補間演算に用いる近傍画素の画素数をより大きくすると良い。具体的には、特徴量がより大きい場合、より大きいフィルタ半径を持つ補間フィルタを適用してよい。例えば、キュービック補間のフィルター半径を、縮小率と特徴量に応じて変化させると良い。   In the above description, it has been described that the interpolation parameter is associated with the reduction ratio and the feature amount. That is, it has been described that the interpolation parameter according to the ratio between the number of pixels of the image to be subjected to the scaling process and the number of pixels after the scaling is applied. As an example, when the reduction ratio is larger, it is preferable to increase the number of neighboring pixels used for the interpolation calculation. Specifically, when the feature amount is larger, an interpolation filter having a larger filter radius may be applied. For example, the filter radius of cubic interpolation may be changed according to the reduction ratio and the feature amount.

上記において、特徴量に応じた補間演算により変倍後の画像の画素値を算出するとして説明した。画素値としては、RGB等の複数の色信号の強度を例示することができる。すなわち、R信号、G信号およびB信号について、特徴量に応じて色毎に補間演算することによって、変倍後の画像における各色信号の強度を算出してよい。特徴量は、変倍対象の画像から色毎に抽出してよいし、変倍対象の画像の輝度信号に基づき抽出してもよい。また、画素値としては、RGB等の色信号の他、輝度信号および色差信号を例示することができる。すなわち、輝度信号および色差信号のそれぞれに、特徴量に応じて補間演算することによって、変倍後の画像における輝度信号および色差信号の強度をそれぞれ算出してよい。特徴量は、変倍対象の画像から輝度信号および色差信号毎に抽出してよいし、変倍対象の画像の輝度信号に基づき抽出してもよい。特徴量に基づく補間処理は、輝度信号に対してのみ行ってもよい。つまり、輝度信号に対しては、輝度信号の特徴量に応じて補間演算し、色差信号に対しては、特徴量によらず予め定められた補間演算を一様に適用してよい。   In the above description, it has been described that the pixel value of the image after scaling is calculated by the interpolation calculation according to the feature amount. Examples of pixel values include the intensity of a plurality of color signals such as RGB. That is, with respect to the R signal, the G signal, and the B signal, the intensity of each color signal in the image after scaling may be calculated by performing an interpolation operation for each color according to the feature amount. The feature amount may be extracted for each color from the image to be scaled, or may be extracted based on the luminance signal of the image to be scaled. Moreover, as a pixel value, a luminance signal and a color difference signal can be exemplified in addition to color signals such as RGB. In other words, the intensity of the luminance signal and the color difference signal in the image after scaling may be calculated by performing an interpolation operation on each of the luminance signal and the color difference signal according to the feature amount. The feature amount may be extracted from the image to be scaled for each luminance signal and color difference signal, or may be extracted based on the brightness signal of the image to be scaled. The interpolation process based on the feature amount may be performed only on the luminance signal. That is, an interpolation calculation may be performed on the luminance signal according to the feature amount of the luminance signal, and a predetermined interpolation calculation may be uniformly applied to the color difference signal regardless of the feature amount.

上記において、2次元の画素ブロックからエッジ量を抽出するとして説明した。他にも、1次元方向のエッジ量を抽出してもよい。例えば垂直方向および水平方向のそれぞれのエッジ量を抽出してよい。そして、垂直方向および水平方向のそれぞれにつき、ボケに関する特徴量を算出してもよい。垂直方向および水平方向のそれぞれにつき、それぞれの特徴量に基づき補間パラメータを算出してよい。例えば、垂直方向および水平方向のそれぞれについて、特徴量に応じた補間パラメータを算出してよい。また、垂直方向および水平方向のそれぞれについて、特徴量に応じたフィルタ半径を持つ補間フィルタを適用してよい。   In the above description, the edge amount is extracted from the two-dimensional pixel block. In addition, the edge amount in the one-dimensional direction may be extracted. For example, the respective edge amounts in the vertical direction and the horizontal direction may be extracted. Then, a feature amount related to blur may be calculated for each of the vertical direction and the horizontal direction. For each of the vertical direction and the horizontal direction, interpolation parameters may be calculated based on the respective feature amounts. For example, an interpolation parameter corresponding to the feature amount may be calculated for each of the vertical direction and the horizontal direction. Further, an interpolation filter having a filter radius corresponding to the feature amount may be applied to each of the vertical direction and the horizontal direction.

上記において、撮像画像データを撮影したときの撮影条件に応じた変倍処理については、特に言及しなかった。しかし、撮影条件を加味して補間パラメータを決定してもよい。例えば、ポートレートモードで撮像された撮像画像データに変倍処理を施す場合、人物の画像領域の高周波成分が伝達されるよう、人物の画像領域に含まれる部分領域の特徴量を補正してよい。例えば、人物の画像領域に属する部分領域から抽出された特徴量に、1より大きい補正係数を乗じてよい。本補正により、ポートレートモードで撮像された人物像が変倍処理でボケてしまうことを防ぐことができる。   In the above description, the zooming process according to the shooting condition when shooting the captured image data is not specifically mentioned. However, the interpolation parameter may be determined in consideration of shooting conditions. For example, when scaling processing is performed on captured image data captured in the portrait mode, the feature amount of the partial area included in the person image area may be corrected so that the high-frequency component of the person image area is transmitted. . For example, a feature amount extracted from a partial area belonging to a person's image area may be multiplied by a correction coefficient larger than 1. With this correction, it is possible to prevent a person image captured in the portrait mode from being blurred by the scaling process.

上記実施形態で説明したカメラ100は、レンズ交換式一眼レフカメラ、コンパクトデジタルカメラ、ミラーレス一眼カメラおよびビデオカメラ等はもちろん、カメラ機能付きの携帯電話等に適用できる。また、上記において、上記の変倍処理が、主としてカメラ100で行われるとして説明した。しかし、当該変倍処理を、デジタルフォトフレーム20、携帯電話端末30、パーソナルコンピュータ42、プリンタ50、テレビ60が行うことができる。   The camera 100 described in the above embodiment can be applied to a mobile phone with a camera function as well as a lens interchangeable single lens reflex camera, a compact digital camera, a mirrorless single lens camera, a video camera, and the like. In the above description, it has been described that the scaling process is mainly performed by the camera 100. However, the scaling process can be performed by the digital photo frame 20, the mobile phone terminal 30, the personal computer 42, the printer 50, and the television 60.

カメラ100、デジタルフォトフレーム20、携帯電話端末30、パーソナルコンピュータ42、プリンタ50、テレビ60は、変倍処理の実行を制御する制御プログラムをプロセッサが実行することで、当該変倍処理を実行してよい。パーソナルコンピュータ42等のように、外部の記録媒体からプログラムを読み込むことができる電子情報処理装置においては、制御プログラムを記憶しているコンピュータ読取可能な記録媒体を読み込むことによって制御プログラムをロードしてよい。   The camera 100, the digital photo frame 20, the mobile phone terminal 30, the personal computer 42, the printer 50, and the television 60 execute the scaling process by the processor executing a control program that controls the execution of the scaling process. Good. In an electronic information processing apparatus that can read a program from an external recording medium such as the personal computer 42, the control program may be loaded by reading a computer-readable recording medium that stores the control program. .

以上、本発明を実施の形態を用いて説明したが、本発明の技術的範囲は上記実施の形態に記載の範囲には限定されない。上記実施の形態に、多様な変更または改良を加えることが可能であることが当業者に明らかである。その様な変更または改良を加えた形態も本発明の技術的範囲に含まれ得ることが、特許請求の範囲の記載から明らかである。   As mentioned above, although this invention was demonstrated using embodiment, the technical scope of this invention is not limited to the range as described in the said embodiment. It will be apparent to those skilled in the art that various modifications or improvements can be added to the above-described embodiment. It is apparent from the scope of the claims that the embodiments added with such changes or improvements can be included in the technical scope of the present invention.

特許請求の範囲、明細書、および図面中において示した装置、システム、プログラム、および方法における動作、手順、ステップ、および段階等の各処理の実行順序は、特段「より前に」、「先立って」等と明示しておらず、また、前の処理の出力を後の処理で用いるのでない限り、任意の順序で実現しうることに留意すべきである。特許請求の範囲、明細書、および図面中の動作フローに関して、便宜上「まず、」、「次に、」等を用いて説明したとしても、この順で実施することが必須であることを意味するものではない。   The order of execution of each process such as operations, procedures, steps, and stages in the apparatus, system, program, and method shown in the claims, the description, and the drawings is particularly “before” or “prior to”. It should be noted that the output can be realized in any order unless the output of the previous process is used in the subsequent process. Regarding the operation flow in the claims, the description, and the drawings, even if it is described using “first”, “next”, etc. for convenience, it means that it is essential to carry out in this order. It is not a thing.

20 デジタルフォトフレーム、30 携帯電話端末、42 パーソナルコンピュータ、50 プリンタ、60 テレビ、100 カメラ、101 光学系、102 シャッタ、103 撮像素子、104 アンプ部、105 A/D変換器、106 メモリ制御部、107 画像処理部、108 内部メモリ、109 表示制御部、110 表示部、111 記録媒体IF、112 タイミング発生部、113 レンズ制御部、114 システム制御部、120 操作部材、122 記録媒体、300 入力画像、310 エッジ量抽出処理、312 エッジ抽出フィルタ、320 エッジ量画像、330 正規化処理、340 正規化画像、350 平滑化処理、352 平滑化フィルタ、360 平滑化画像、370 フィルタパラメータ抽出処理、372 テーブル、380 補間パラメータ画像、390 補間演算処理、400 縮小画像、500、510 重み係数 20 digital photo frame, 30 mobile phone terminal, 42 personal computer, 50 printer, 60 TV, 100 camera, 101 optical system, 102 shutter, 103 image sensor, 104 amplifier unit, 105 A / D converter, 106 memory control unit, 107 image processing unit, 108 internal memory, 109 display control unit, 110 display unit, 111 recording medium IF, 112 timing generation unit, 113 lens control unit, 114 system control unit, 120 operation member, 122 recording medium, 300 input image, 310 Edge amount extraction processing, 312 Edge extraction filter, 320 Edge amount image, 330 Normalization processing, 340 Normalization image, 350 Smoothing processing, 352 Smoothing filter, 360 Smoothed image, 370 Filter parameter extraction processing, 372 Buru, 380 interpolation parameter image, 390 interpolation calculation process, 400 the reduced image, 500, 510 weight factors

Claims (14)

画像を変倍する画像処理装置であって、
前記画像内の複数の部分領域のそれぞれから、ボケに関する特徴量を抽出する特徴量抽出部と、
前記複数の部分領域のそれぞれに対し、それぞれから抽出された前記特徴量に応じた補間パラメータを用いて補間演算をすることにより、前記画像を変倍する補間処理部と
を備える画像処理装置。
An image processing apparatus for scaling an image,
A feature amount extraction unit that extracts a feature amount related to blur from each of the plurality of partial regions in the image;
An image processing apparatus comprising: an interpolation processing unit that scales the image by performing an interpolation operation on each of the plurality of partial regions using an interpolation parameter corresponding to the feature amount extracted from each of the partial regions.
前記特徴量抽出部は、前記複数の部分領域のそれぞれから抽出したエッジ量を、それぞれの部分領域よりも広い画像領域から抽出されたエッジ量を用いて正規化することにより、前記特徴量を抽出する
請求項1に記載の画像処理装置。
The feature amount extraction unit extracts the feature amount by normalizing an edge amount extracted from each of the plurality of partial regions using an edge amount extracted from an image region wider than each partial region. The image processing apparatus according to claim 1.
前記補間処理部は、前記補間演算に用いる近傍画素の画素数を、前記特徴量に応じて異ならせる
請求項1または2に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the interpolation processing unit varies the number of neighboring pixels used for the interpolation calculation according to the feature amount.
前記補間処理部は、前記特徴量がより大きいボケ量を示す場合、前記近傍画素の画素数をより大きくする
請求項3に記載の画像処理装置。
The image processing apparatus according to claim 3, wherein the interpolation processing unit increases the number of neighboring pixels when the feature amount indicates a larger blur amount.
前記補間処理部は、前記補間演算に用いる近傍画素に対する重み係数を、前記特徴量に応じて異ならせる
請求項1から4のいずれか一項に記載の画像処理装置。
5. The image processing apparatus according to claim 1, wherein the interpolation processing unit varies a weighting coefficient for neighboring pixels used for the interpolation calculation according to the feature amount. 6.
前記補間処理部は、異なる2種類以上の補間フィルタによって算出された画素値を、前記特徴量に応じて異なる重みで加算する
請求項1から5のいずれか一項に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the interpolation processing unit adds pixel values calculated by two or more different types of interpolation filters with different weights according to the feature amount.
前記補間処理部は、前記補間演算に用いる補間フィルタの種類を、前記特徴量に応じて異ならせる
請求項1から6のいずれか一項に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the interpolation processing unit changes a type of an interpolation filter used for the interpolation calculation in accordance with the feature amount.
前記補間処理部は、前記特徴量が予め定められた値以下のボケ量を示す場合、第1補間フィルタを適用し、前記特徴量が前記予め定められた値よりも大きいボケ量を示す場合、前記第1補間フィルタよりも高空間周波数成分を伝達しない第2補間フィルタを適用する
請求項7に記載の画像処理装置。
The interpolation processing unit applies a first interpolation filter when the feature amount indicates a blur amount equal to or less than a predetermined value, and when the feature amount indicates a blur amount larger than the predetermined value, The image processing apparatus according to claim 7, wherein a second interpolation filter that does not transmit a higher spatial frequency component than the first interpolation filter is applied.
前記第1補間フィルタは、線形補間、最近傍補間およびキュービック補間の少なくとも一方に基づく補間フィルタであり、前記第2補間フィルタは、ガウシアン補間に基づく補間フィルタである
請求項8に記載の画像処理装置。
The image processing apparatus according to claim 8, wherein the first interpolation filter is an interpolation filter based on at least one of linear interpolation, nearest neighbor interpolation, and cubic interpolation, and the second interpolation filter is an interpolation filter based on Gaussian interpolation. .
前記特徴量抽出部は、周囲の部分領域との間で平均化された前記特徴量を抽出する
請求項1から9のいずれか一項に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the feature amount extraction unit extracts the feature amount averaged with a surrounding partial region.
前記特徴量抽出部は、前記画像の変倍後の複数の画素にそれぞれ対応する前記特徴量を抽出し、
前記補間処理部は、前記複数の画素にそれぞれ対応する前記特徴量に応じた補間パラメータを用いてそれぞれ補間演算をすることにより、前記複数の画素の画素値をそれぞれ算出する
請求項1から10のいずれか一項に記載の画像処理装置。
The feature amount extraction unit extracts the feature amount corresponding to each of a plurality of pixels after scaling of the image,
The said interpolation process part calculates the pixel value of each of these pixels by performing each interpolation calculation using the interpolation parameter according to the said feature-value corresponding to each of these pixels. The image processing apparatus according to any one of claims.
前記補間処理部は、前記画像の画素数に対する前記変倍した後の画素数との比に応じた補間パラメータを適用する
請求項1から11のいずれか一項に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the interpolation processing unit applies an interpolation parameter in accordance with a ratio between the number of pixels of the image and the number of pixels after scaling.
前記補間処理部は、前記画像の縮小率がより大きい場合に、前記補間演算に用いる近傍画素の画素数をより大きくする
請求項12に記載の画像処理装置。
The image processing apparatus according to claim 12, wherein the interpolation processing unit increases the number of neighboring pixels used for the interpolation calculation when the reduction ratio of the image is larger.
画像の変倍処理用のプログラムであって、コンピュータに、
前記画像内の複数の部分領域のそれぞれから、ボケに関する特徴量を抽出する特徴量抽出ステップと、
前記複数の部分領域のそれぞれに対し、それぞれから抽出された前記特徴量に応じた補間パラメータを用いて補間演算をすることにより、前記画像を変倍する補間処理ステップと
を実行させるプログラム。
An image scaling process program for a computer,
A feature amount extraction step for extracting a feature amount related to blur from each of the plurality of partial regions in the image;
A program for executing an interpolation processing step for scaling the image by performing an interpolation operation on each of the plurality of partial regions using an interpolation parameter corresponding to the feature amount extracted from each of the plurality of partial regions.
JP2010283740A 2010-12-20 2010-12-20 Image processing device and program Withdrawn JP2012133492A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010283740A JP2012133492A (en) 2010-12-20 2010-12-20 Image processing device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010283740A JP2012133492A (en) 2010-12-20 2010-12-20 Image processing device and program

Publications (1)

Publication Number Publication Date
JP2012133492A true JP2012133492A (en) 2012-07-12

Family

ID=46649035

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010283740A Withdrawn JP2012133492A (en) 2010-12-20 2010-12-20 Image processing device and program

Country Status (1)

Country Link
JP (1) JP2012133492A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014042684A (en) * 2012-08-28 2014-03-13 Dainippon Printing Co Ltd Medical image processing device, and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014042684A (en) * 2012-08-28 2014-03-13 Dainippon Printing Co Ltd Medical image processing device, and program

Similar Documents

Publication Publication Date Title
US8018520B2 (en) Imaging device, imaging method, display control device, display control method, and program
JP5036599B2 (en) Imaging device
US7825969B2 (en) Image stabilization using multi-exposure pattern
US8023000B2 (en) Image pickup apparatus, image processing apparatus, image pickup method, and image processing method
US8149290B2 (en) Image processor, imaging apparatus including the same, and image processing method, with blurring processing of background image
US20120188394A1 (en) Image processing methods and apparatuses to enhance an out-of-focus effect
KR101643613B1 (en) Digital image process apparatus, method for image processing and storage medium thereof
JP5864037B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
KR20100039430A (en) Image processor, image processing method, digital camera, and imaging apparatus
JP2009194700A (en) Image processor and image processing program
WO2012132129A1 (en) Image-capturing device, image-capturing method, and program
JP2005269373A (en) Video signal processing system, and electronic video apparatus
JP2018107526A (en) Image processing device, imaging apparatus, image processing method and computer program
CN105432068A (en) Imaging device, imaging method, and image processing device
JP5212046B2 (en) Digital camera, image processing apparatus, and image processing program
JP5589660B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP4944061B2 (en) Image processing apparatus and method, and program
JP2008109305A (en) Image processing device, and control method of image processing device
JP2017143354A (en) Image processing apparatus and image processing method
US9282257B2 (en) Image apparatus and imaging method
JP2006253970A (en) Imaging apparatus, shading correction data generating method, and program
JP6157274B2 (en) Imaging apparatus, information processing method, and program
JP2012191265A (en) Image processing apparatus and program
JP6245847B2 (en) Image processing apparatus and image processing method
JP2022083147A (en) Imaging apparatus, imaging method, program, and recording medium

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140304