Movatterモバイル変換


[0]ホーム

URL:


JP6019782B2 - Image processing apparatus, image processing method, image processing program, and recording medium - Google Patents

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

Info

Publication number
JP6019782B2
JP6019782B2JP2012132712AJP2012132712AJP6019782B2JP 6019782 B2JP6019782 B2JP 6019782B2JP 2012132712 AJP2012132712 AJP 2012132712AJP 2012132712 AJP2012132712 AJP 2012132712AJP 6019782 B2JP6019782 B2JP 6019782B2
Authority
JP
Japan
Prior art keywords
block
local
image processing
value
image
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.)
Active
Application number
JP2012132712A
Other languages
Japanese (ja)
Other versions
JP2013258526A (en
Inventor
健介 山岡
健介 山岡
将之 池辺
将之 池辺
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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dai Nippon Printing Co LtdfiledCriticalDai Nippon Printing Co Ltd
Priority to JP2012132712ApriorityCriticalpatent/JP6019782B2/en
Publication of JP2013258526ApublicationCriticalpatent/JP2013258526A/en
Application grantedgrantedCritical
Publication of JP6019782B2publicationCriticalpatent/JP6019782B2/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Description

Translated fromJapanese

本発明は、画像に対し階調の画像補正を行う画像処理装置、画像処理方法、画像処理用プログラム、および、記録媒体に関する。  The present invention relates to an image processing apparatus, an image processing method, an image processing program, and a recording medium that perform gradation image correction on an image.

市販のディジタルスチルカメラ(Digital still camera)および広ダイナミックレンジ(RGB各色8ビット以上の表現力を持つ)カメラで撮像された画像の補正技術において、輝度や明度等の明るさの偏りを改善する技術に注目が集まっている。輝度等の偏りを改善するために、処理対象となる画像に対して、単一の輝度特性を用いた補正が主体であり、例えば、輝度特性を補正する関数には、ガンマ補正関数、対数関数、および、ヒストグラム平均化等の統計処理を用いて定義された関数等が用いられている。  Technology to improve brightness bias such as brightness and brightness in correction technology for images taken with a commercially available digital still camera and a wide dynamic range (with RGB 8 colors or more) Attention has been gathered. In order to improve the bias such as luminance, the image to be processed is mainly corrected using a single luminance characteristic. For example, the function for correcting the luminance characteristic includes a gamma correction function and a logarithmic function. , And functions defined using statistical processing such as histogram averaging are used.

また、光ファイバー等のブロードバンドインターネット接続の普及や高精細度テレビジョン放送等の動画等の高解像度化により、ディジタルスチルカメラおよびディジタルビデオカメラ(Digital video camera)といった機器が、数メガピクセルからギガピクセルのように高画質化して、画像処理の高速化や高精度が求められるようになってきている。  In addition, with the spread of broadband Internet connections such as optical fibers and higher resolution of moving images such as high-definition television broadcasts, devices such as digital still cameras and digital video cameras are moving from several megapixels to gigapixels. As described above, high image quality and high speed image processing and high accuracy have been demanded.

そのため、高速化で適切に画像のコントラストを強調できるように、例えば、特許文献1には、階調圧縮画像を得るための画像処理装置が開示されている。  For this reason, for example, Patent Document 1 discloses an image processing apparatus for obtaining a gradation-compressed image so that the contrast of an image can be appropriately enhanced at a higher speed.

特許4214457号公報Japanese Patent No. 4214457

しかしながら、特許文献1の技術では、高画質化した大容量の画像データに適用すると、回路的に多くのメモリが必要となり、小型化が難しく、コストの高いシステムとなっていた。  However, when the technique of Patent Document 1 is applied to large-capacity image data with high image quality, a large amount of memory is required in terms of circuitry, making the system difficult to reduce in size and costly.

本発明は、上記課題を解決するためになされたものであり、使用するメモリの大きさを軽減した画像処理装置等を提供することを目的とする。  SUMMARY An advantage of some aspects of the invention is that it provides an image processing apparatus and the like in which the size of a memory to be used is reduced.

上記の課題を解決するために、請求項1に記載の発明は、複数のフレームからなる動画データを取得する動画データ取得手段と、前記フレームに対して所定の方向に走査させる局所領域を設定する局所領域設定手段と、前記動画データのフレームの画像を、前記局所領域より大きさが小さい所定のブロック毎に分割するブロック分割手段と、前記各ブロックに対して、画像処理のための前処理を行い前記各ブロックのブロック処理値を算出するブロック処理値算出手段と、前記局所領域に対応する前記各ブロック処理値から、前記局所領域に対する前記前処理による局所処理値を算出する局所処理値算出手段と、を備えることを特徴とする。In order to solve the above problem, the invention according to claim 1 sets moving image data acquisition means for acquiring moving image data composed of a plurality of frames, and a local region to bescanned in a predetermined direction with respect to the frames. Local area setting means, block dividing means for dividing an image of a frame of the moving image data into predetermined blocks smaller in size than the local area, and preprocessing for image processing on each of the blocks Block processing value calculating means for calculating the block processing value of each block, and local processing value calculating means for calculating the local processing value by the preprocessing for the local area from the block processing values corresponding to the local area And.

また、請求項2に記載の発明は、請求項1に記載の画像処理装置において、前記ブロック処理値と、前記ブロックの画素数とから、1画素当たりの画素処理値を算出する画素処理値算出手段を更に備え、前記局所処理値算出手段が、前記局所領域に属する画素に対応する前記画素処理値から、前記局所処理値を算出することを特徴とする。  According to a second aspect of the present invention, in the image processing device according to the first aspect, a pixel processing value calculation for calculating a pixel processing value per pixel from the block processing value and the number of pixels of the block. Means for calculating the local processing value from the pixel processing value corresponding to the pixel belonging to the local region.

また、請求項3に記載の発明は、請求項2に記載の画像処理装置において、前記画素処理値算出手段が、前記ブロック処理値を、前記ブロックの画素数で割る際に、固定小数点法を用いた割り算により、前記画素処理値を算出することを特徴とする。  According to a third aspect of the present invention, in the image processing apparatus according to the second aspect, when the pixel processing value calculation unit divides the block processing value by the number of pixels of the block, a fixed-point method is used. The pixel processing value is calculated by the division used.

また、請求項4に記載の発明は、請求項2または請求項3に記載の画像処理装置において、前記局所処理値算出手段が、前記ブロックが前記局所領域に重なる部分の大きさに基づき、前記局所領域に属する画素に対応する前記画素処理値から、前記局所処理値を算出することを特徴とする。  According to a fourth aspect of the present invention, in the image processing apparatus according to the second or third aspect, the local processing value calculation unit is configured to determine whether the block overlaps the local region based on the size of the part. The local processing value is calculated from the pixel processing value corresponding to the pixel belonging to the local region.

また、請求項5に記載の発明は、請求項2または請求項3に記載の画像処理装置において、前記局所処理値算出手段が、前記局所領域に属する画素に対応する前記画素処理値から、ボックスフィルタ方式により前記局所処理値を算出することを特徴とする。  According to a fifth aspect of the present invention, in the image processing device according to the second or third aspect, the local processing value calculation means calculates a box from the pixel processing value corresponding to the pixel belonging to the local region. The local processing value is calculated by a filter method.

また、請求項6に記載の発明は、請求項1から請求項5のいずれか1項に記載の画像処理装置において、前記ブロック処理値が、前記ブロックにおける明るさに関するヒストグラムであって、前記局所処理値算出手段が、前記局所領域に対応する前記各ブロックのヒストグラムから、前記局所処理値として、前記局所領域における明るさに関する局所ヒストグラムを算出することを特徴とする。  The invention according to claim 6 is the image processing apparatus according to any one of claims 1 to 5, wherein the block processing value is a histogram related to brightness in the block, and The processing value calculation means calculates a local histogram related to brightness in the local region as the local processing value from the histogram of each block corresponding to the local region.

また、請求項7に記載の発明は、画像処理装置が画像処理をする画像処理方法において、複数のフレームからなる動画データを取得する動画データ取得ステップと、前記フレームに対して所定の方向に走査させる局所領域を設定する局所領域設定ステップと、前記動画データのフレームの画像を、前記局所領域より大きさが小さい所定のブロック毎に分割するブロック分割ステップと、前記各ブロックに対して、画像処理のための前処理を行い前記各ブロックのブロック処理値を算出するブロック処理値算出ステップと、前記局所領域に対応する前記各ブロック処理値から、前記局所領域に対する前記前処理による局所処理値を算出する局所処理値算出ステップと、を含むことを特徴とする。According to a seventh aspect of the present invention, in the image processing method in which the image processing apparatus performs image processing, a moving image data acquiring step for acquiring moving image data including a plurality of frames,and scanning in a predetermined direction with respect to the frames. a local region setting step of setting local regionswhich cause, an image frame of the moving image data, a block dividing step of dividing each said predetermined local region than the size is small block for each block, the image processing A block processing value calculation step of performing preprocessing for calculating the block processing value of each block, and calculating the local processing value by the preprocessing for the local region from each block processing value corresponding to the local region And a local processing value calculating step.

また、請求項8に記載の発明は、コンピュータを、複数のフレームからなる動画データを取得する動画データ取得手段、前記フレームに対して所定の方向に走査させる局所領域を設定する局所領域設定手段、前記動画データのフレームの画像を、前記局所領域より大きさが小さい所定のブロック毎に分割するブロック分割手段、前記各ブロックに対して、画像処理のための前処理を行い前記各ブロックのブロック処理値を算出するブロック処理値算出手段および、前記局所領域に対応する前記各ブロック処理値から、前記局所領域に対する前記前処理による局所処理値を算出する局所処理値算出手段として機能させることを特徴とする。The invention according to claim 8 is a video data acquisition unit that acquires video data consisting of a plurality of frames, a local region setting unit that sets a local regionto be scanned in a predetermined direction with respect to the frame, Block dividing means for dividing an image of a frame of the moving image data into predetermined blocks having a size smaller than the local area, and performing block processing for each block by performing preprocessing for image processing on each block A block processing value calculating unit that calculates a value; and a local processing value calculating unit that calculates a local processing value by the preprocessing for the local region from the block processing values corresponding to the local region, To do.

また、請求項9に記載の発明は、コンピュータを、複数のフレームからなる動画データを取得する動画データ取得手段、前記フレームに対して所定の方向に走査させる局所領域を設定する局所領域設定手段、前記動画データのフレームの画像を、前記局所領域より大きさが小さい所定のブロック毎に分割するブロック分割手段、前記各ブロックに対して、画像処理のための前処理を行い前記各ブロックのブロック処理値を算出するブロック処理値算出手段、および、前記局所領域に対応する前記各ブロック処理値から、前記局所領域に対する前記前処理による局所処理値を算出する局所処理値算出手段として機能させることを特徴とする画像処理用プログラムがコンピュータ読み取り可能に記録される。The invention according to claim 9 is a video data acquisition means for acquiring video data consisting of a plurality of frames, a local area setting means for setting a local areato be scanned in a predetermined direction with respect to the frames, Block dividing means for dividing an image of a frame of the moving image data into predetermined blocks having a size smaller than the local area, and performing block processing for each block by performing preprocessing for image processing on each block A block processing value calculating unit that calculates a value, and a local processing value calculating unit that calculates a local processing value by the preprocessing for the local region from the block processing values corresponding to the local region. An image processing program is recorded so as to be readable by a computer.

本発明によれば、ブロック単位に画像処理のための前処理により、ブロック処理値を算出し、局所領域に対応するブロック処理値から、局所処理値を算出しているので、画素単位に各局所領域の局所処理値を記憶しておく必要がないため、メモリの大きさを軽減することができる。  According to the present invention, block processing values are calculated by preprocessing for image processing in units of blocks, and local processing values are calculated from block processing values corresponding to local regions. Since it is not necessary to store the local processing value of the area, the size of the memory can be reduced.

本発明の第1実施形態に係る画像処理装置の概要構成例を示すブロック図である。1 is a block diagram illustrating a schematic configuration example of an image processing apparatus according to a first embodiment of the present invention.図1の画像処理部の概要構成例を示すブロック図である。FIG. 2 is a block diagram illustrating a schematic configuration example of an image processing unit in FIG. 1.動画データのフレーム画像をブロックに分割した様子の一例を示す模式図である。It is a schematic diagram which shows an example of a mode that the frame image of moving image data was divided | segmented into the block.図1の局所ヒストグラム生成部の概要構成例を示すブロック図である。It is a block diagram which shows the example of a schematic structure of the local histogram production | generation part of FIG.図4に示したY方向の加算処理部の概要構成例を示すブロック図である。FIG. 5 is a block diagram illustrating a schematic configuration example of an addition processor in the Y direction illustrated in FIG. 4.図4に示したX方向の加算処理部の概要構成例を示すブロック図である。FIG. 5 is a block diagram illustrating a schematic configuration example of an X-direction addition processing unit illustrated in FIG. 4.図1の画像処理装置における第1実施形態の動作例を示すフローチャートである。3 is a flowchart illustrating an operation example of the first embodiment in the image processing apparatus of FIG. 1.動画データのフレーム画像おいて、対象画素を中心とした局所領域の一例を示す模式図である。It is a schematic diagram which shows an example of the local area | region centering on an object pixel in the frame image of moving image data.局所領域とブロックとの関係の一例を示す模式図である。It is a schematic diagram which shows an example of the relationship between a local area | region and a block.Boxフィルタの考え方を示す模式図である。It is a schematic diagram which shows the idea of a Box filter.Boxフィルタの考え方を示す模式図である。It is a schematic diagram which shows the idea of a Box filter.Boxフィルタの考え方を示す模式図である。It is a schematic diagram which shows the idea of a Box filter.Boxフィルタの考え方を示す模式図である。It is a schematic diagram which shows the idea of a Box filter.本発明の第2実施形態に係る画像処理装置において、図1の画像処理部の概要構成例を示すブロック図である。FIG. 4 is a block diagram illustrating a schematic configuration example of an image processing unit in FIG. 1 in an image processing apparatus according to a second embodiment of the present invention.図1の画像処理装置における第2実施形態の動作例を示すフローチャートである。6 is a flowchart illustrating an operation example of a second embodiment in the image processing apparatus of FIG. 1.輝度を輝度領域に分割するための重み関数の一例を示す線図である。It is a diagram which shows an example of the weight function for dividing | segmenting a brightness | luminance into a brightness | luminance area | region.図16の重み関数に対する輝度値変換関数の一例を示す線図である。It is a diagram which shows an example of the luminance value conversion function with respect to the weight function of FIG.低輝度領域における上限変換関数および下限変換関数の一例を示す線図である。It is a diagram which shows an example of the upper limit conversion function in a low-luminance area | region, and a lower limit conversion function.中輝度領域における上限変換関数および下限変換関数の一例を示す線図である。It is a diagram which shows an example of the upper limit conversion function and lower limit conversion function in a medium brightness | luminance area | region.高輝度領域における上限変換関数および下限変換関数の一例を示す線図である。It is a diagram which shows an example of the upper limit conversion function in a high-intensity area | region, and a lower limit conversion function.低輝度領域において、対象画素の輝度値における上限値、下限値、および、変換後の輝度値の一例を示す模式図である。It is a schematic diagram which shows an example of the upper limit value, lower limit value, and converted luminance value in the luminance value of the target pixel in the low luminance region.中輝度領域において、対象画素の輝度値における上限値、下限値、および、変換後の輝度値の一例を示す模式図である。FIG. 6 is a schematic diagram illustrating an example of an upper limit value, a lower limit value, and a converted brightness value in a brightness value of a target pixel in a middle brightness area.高輝度領域において、対象画素の輝度値における上限値、下限値、および、変換後の輝度値の一例を示す模式図である。FIG. 5 is a schematic diagram illustrating an example of an upper limit value, a lower limit value, and a converted luminance value in a luminance value of a target pixel in a high luminance area.

以下、図面を参照して本発明を実施するための形態について説明する。  Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.

[1.第1実施形態に係る構成および機能概要]
(1.1 画像処理装置の構成および機能)
まず、本発明に係る第1実施形態に係る画像処理装置の概要構成および機能について、図を用いて説明する。
[1. Overview of Configuration and Function According to First Embodiment]
(1.1 Configuration and function of image processing apparatus)
First, a schematic configuration and function of the image processing apparatus according to the first embodiment of the present invention will be described with reference to the drawings.

図1は、本発明の第1実施形態に係る画像処理装置の概要構成例を示すブロック図である。  FIG. 1 is a block diagram showing a schematic configuration example of an image processing apparatus according to the first embodiment of the present invention.

図1に示すように、画像処理装置1は、画像処理用のLSI(Large Scale Integration)であり、各種の演算を行うCPU(Central Processing Unit)部2と、専用の画像処理を行う画像処理部3と、画像データ等を記憶する記憶部4と、処理される画像データを入力して処理結果を出力する入出力部(I/O)5と、を備える。これら各部は、画像処理装置1において、同一ダイ上に集積され、内部バス(図示せず)に接続されている。  As shown in FIG. 1, an image processing apparatus 1 is an LSI (Large Scale Integration) for image processing, and includes a CPU (Central Processing Unit) unit 2 that performs various operations and an image processing unit that performs dedicated image processing. 3, a storage unit 4 that stores image data and the like, and an input / output unit (I / O) 5 that inputs image data to be processed and outputs a processing result. These parts are integrated on the same die in the image processing apparatus 1 and connected to an internal bus (not shown).

入出力部5は、任意の画像信号(例えば、RGB信号)から、Y,Cb,Cr信号等の輝度と色を示す画像信号に変換する機能を有する。  The input / output unit 5 has a function of converting an arbitrary image signal (for example, an RGB signal) into an image signal indicating luminance and color, such as a Y, Cb, and Cr signal.

CPU部2は、演算装置やレジスタ等を有し、各種のプログラムを実行したり、入出力部5を通したデータの入出力を制御したり、画像処理部3に画像処理の指令をしたり、画像処理装置1外部のメインメモリ等を制御する。  The CPU unit 2 includes an arithmetic unit, a register, and the like, executes various programs, controls input / output of data through the input / output unit 5, and instructs the image processing unit 3 to perform image processing. The main memory outside the image processing apparatus 1 is controlled.

画像処理部3は、論理回路や、ラインメモリやシフトレジスタ等を有する。そして画像処理部3は、動画データにおけるフレーム画像から、輝度や明度等の明るさの変換を行う画素を中心とした局所領域を抽出したり、局所領域におけるヒストグラム(局所ヒストグラム)を生成したり、フレーム画像を所定のブロック毎に分割したり等、CPU部2からの指令に従って専用の画像処理をする。また、画像処理部3は、Box-Filtering方式を利用した、高速に逐次的に画像処理するための回路を有する。  The image processing unit 3 includes a logic circuit, a line memory, a shift register, and the like. Then, the image processing unit 3 extracts a local area centering on a pixel that performs brightness conversion such as luminance and brightness from a frame image in the moving image data, or generates a histogram (local histogram) in the local area, Dedicated image processing is performed in accordance with a command from the CPU unit 2, such as dividing a frame image into predetermined blocks. The image processing unit 3 includes a circuit for sequentially performing image processing at a high speed using a Box-Filtering method.

記憶部4は、DRAM(Dynamic Random Access Memory)等により構成され、画像を記憶するためのメモリ、すなわち、フレーム・メモリの機能を有する。また、記憶部4は、画像処理部3において生成された中間的な処理値を一時的に記憶する。また、記憶部4には、画像処理に必要なパラメータテーブルが記憶されている。  The storage unit 4 is configured by a DRAM (Dynamic Random Access Memory) or the like, and has a function of a memory for storing an image, that is, a frame memory. The storage unit 4 temporarily stores intermediate processing values generated by the image processing unit 3. The storage unit 4 stores a parameter table necessary for image processing.

(1.2 画像処理部の構成および機能)
次に、画像処理部3の構成および機能について図を用いて説明する。
図2は、図1の画像処理部の概要構成例を示すブロック図である。図3は、動画データのフレーム画像をブロックに分割した様子の一例を示す模式図である。図4は、局所ヒストグラム生成部の概要構成例を示すブロック図である。図5は、図4に示したY方向の加算処理部の概要構成例を示すブロック図である。図6は、図4に示したX方向の加算処理部の概要構成例を示すブロック図である。
(1.2 Configuration and function of image processing unit)
Next, the configuration and function of the image processing unit 3 will be described with reference to the drawings.
FIG. 2 is a block diagram illustrating a schematic configuration example of the image processing unit in FIG. FIG. 3 is a schematic diagram illustrating an example of a state in which a frame image of moving image data is divided into blocks. FIG. 4 is a block diagram illustrating a schematic configuration example of the local histogram generation unit. FIG. 5 is a block diagram illustrating a schematic configuration example of the addition processing unit in the Y direction illustrated in FIG. FIG. 6 is a block diagram illustrating a schematic configuration example of the addition processing unit in the X direction illustrated in FIG.

図2に示すように、画像処理部3はフレーム画像を所定のブロック(ブロックの領域)毎に分割し、各ブロックにおけるヒストグラム(ブロック・ヒストグラム)を生成するブロック・データ生成部3aと、ブロック・ヒストグラムを一時的に記憶するブロック・データ用メモリ3bと、ブロック・ヒストグラムを用いて局所領域におけるヒストグラム(局所ヒストグラム)を生成する局所領域データ生成部3cと、を有する。例えば、ヒストグラムは、画像処理のための前処理による処理値の一例として、明るさに関するヒストグラムである。  As shown in FIG. 2, the image processing unit 3 divides a frame image into predetermined blocks (block areas), generates a histogram (block histogram) in each block, a block data generation unit 3a, A block data memory 3b that temporarily stores a histogram, and a local area data generation unit 3c that generates a histogram (local histogram) in a local area using the block histogram. For example, the histogram is a histogram related to brightness as an example of a processing value obtained by preprocessing for image processing.

ブロック・データ生成部3aは、図3に示すように、フレーム画像を所定のブロック毎に分割し、ブロックアドレスを決定するための回路と、ブロック・ヒストグラムの各階級に対応したカウンタと、各カウンタをインクリメントさせるための輝度判定器とを有する。  As shown in FIG. 3, the block data generation unit 3a divides the frame image into predetermined blocks, determines a block address, a counter corresponding to each class of the block histogram, and each counter And a luminance determiner for incrementing.

ブロック・データ生成部3aは、図3に示すように、フレーム画像30を、例えば、8画素×8画素のブロックBに分割する。そして、ブロック・データ生成部3aは、画像処理のための前処理の一例として、各ブロックにおいて、ブロック・ヒストグラムBn[i、j](ブロック処理値の一例)を算出する。なお、[i、j]は、ブロックアドレス[行のブロック番号i、列のブロック番号j]であり、添え字nは、ヒストグラムの階級番号である。  As illustrated in FIG. 3, the block data generation unit 3 a divides the frame image 30 into, for example, a block B of 8 pixels × 8 pixels. Then, the block data generation unit 3a calculates a block histogram Bn [i, j] (an example of a block processing value) in each block as an example of preprocessing for image processing. [I, j] is the block address [row block number i, column block number j], and the subscript n is the histogram class number.

ブロック・データ用メモリ3bは、書き込み用メモリと読み出し用メモリを有する。そして、ブロック・データ生成部3aは、生成したブロック・ヒストグラムBn[i、j]tをブロック・データ用メモリ3bに書き込み、時間的にフレーム番号が1つ前のブロック・ヒストグラムBn[i、j]t−1をブロック・データ用メモリ3bから取得し、ブロック・ヒストグラムBn[i、j]t−1を局所領域データ生成部3cに出力する。  The block data memory 3b has a write memory and a read memory. Then, the block data generation unit 3a writes the generated block histogram Bn [i, j] t to the block data memory 3b, and the block histogram Bn [i, j with the previous frame number in time. ] T-1 is acquired from the block data memory 3b, and the block histogram Bn [i, j] t-1 is output to the local area data generation unit 3c.

このように、ブロック・データ生成部3aは、動画データのフレームの画像を所定のブロック毎に分割するブロック分割手段の一例として機能する。また、ブロック・データ生成部3aは、各ブロックに対して、画像処理のための前処理を行い、各ブロックのブロック処理値を算出するブロック処理値算出手段の一例として機能する。  As described above, the block / data generating unit 3a functions as an example of a block dividing unit that divides a frame image of moving image data into predetermined blocks. The block data generation unit 3a functions as an example of a block processing value calculation unit that performs preprocessing for image processing on each block and calculates a block processing value of each block.

次に、図4に示すように、局所領域データ生成部3cは、ブロック・データ生成部3aからのブロック・ヒストグラムBn[i、j]のデータを処理するY方向の加算処理部10と、Y方向の加算処理部10からのデータを処理するX方向の加算処理部20と、ブロック・ヒストグラムBn[i、j]の値を、ブロックの画素数で割り、1画素当たりの画素処理値を算出する除算器(図示せず)とを備える。  Next, as shown in FIG. 4, the local region data generation unit 3 c includes a Y direction addition processing unit 10 that processes the data of the block histogram Bn [i, j] from the block data generation unit 3 a, and Y The X direction addition processing unit 20 that processes data from the direction addition processing unit 10 and the value of the block histogram Bn [i, j] are divided by the number of pixels of the block to calculate the pixel processing value per pixel. And a divider (not shown).

局所領域データ生成部3cは、ブロック・データ生成部3aがブロック・ヒストグラムを算出しているフレームに対して局所領域を設定する。そして、局所領域データ生成部3cは、局所領域に対応する各ブロックのブロック・ヒストグラムから、局所領域に対して局所ヒストグラム(局所処理値の一例)を算出する。  The local area data generation unit 3c sets a local area for the frame for which the block data generation unit 3a calculates a block histogram. Then, the local area data generation unit 3c calculates a local histogram (an example of a local processing value) for the local area from the block histogram of each block corresponding to the local area.

なお、Y方向の加算処理部10およびX方向の加算処理部20が、Box-Filtering方式を実現し、計算を高速化する。また、除算器は、固定小数点法を用いた割り算を行う機能を有する。また、局所領域の大きさは、ブロックの大きさより大きいとする。例えば、8画素×8画素のブロックとすると、191画素×191画素の局所領域となる。また、この除算器は、ブロックの画素数が2のべき乗の場合は、シフト演算(切捨て無しの固定主数点除算なので、小数点の位置だけをずらす)等によって、ブロックの画素数が2のべき乗では無い場合は、繰り返し除算法、引き戻し法、引き放し法等により、演算を行う。  Note that the Y-direction addition processing unit 10 and the X-direction addition processing unit 20 implement the Box-Filtering method, and speed up the calculation. The divider has a function of performing division using a fixed point method. Further, it is assumed that the size of the local region is larger than the size of the block. For example, if it is a block of 8 pixels × 8 pixels, it becomes a local area of 191 pixels × 191 pixels. In addition, when the number of pixels in the block is a power of 2, this divider can increase the number of pixels in the block to a power of 2 by a shift operation (since it is a fixed principal point division without truncation, only the position of the decimal point is shifted). If not, the calculation is performed by the iterative division method, pullback method, release method, or the like.

ここで、X方向は、画像処理の対象である原画像(例えば、動画データのフレーム画像)に対して走査する方向であり、Y方向とは、原画像に対してX方向に走査してX方向の端に来ると、Y方向に順に走査を1画素移動させる方向である。  Here, the X direction is a direction for scanning an original image (for example, a frame image of moving image data) that is an object of image processing, and the Y direction is an X direction for scanning the original image in the X direction. When it comes to the end of the direction, it is a direction in which scanning is moved by one pixel in order in the Y direction.

このように、局所領域データ生成部3cは、フレームに対して局所領域を設定する局所領域設定手段の一例としての機能を有する。また、局所領域データ生成部3cは、局所領域に対応する各ブロック処理値から、局所領域に対して前処理による局所処理値を算出する局所処理値算出手段の一例としての機能を有する。また、局所領域データ生成部3cは、局所領域に属する画素に対応する画素処理値から、局所処理値を算出する局所処理値算出手段の一例としての機能を有する。また局所領域データ生成部3cは、ブロックにおけるブロック処理値と、ブロックの画素数とから、1画素当たりの画素処理値を算出する画素処理値算出手段の一例としての機能を有する。また、局所領域データ生成部3cは、ブロックにおける処理値を、ブロックの画素数で割る際に、固定小数点法を用いた割り算により、画素処理値を算出する画素処理値算出手段の一例としての機能を有する。  Thus, the local area data generation unit 3c has a function as an example of a local area setting unit that sets a local area for a frame. Further, the local region data generation unit 3c has a function as an example of a local processing value calculation unit that calculates a local processing value by preprocessing for a local region from each block processing value corresponding to the local region. The local region data generation unit 3c has a function as an example of a local processing value calculation unit that calculates a local processing value from pixel processing values corresponding to pixels belonging to the local region. The local region data generation unit 3c has a function as an example of a pixel processing value calculation unit that calculates a pixel processing value per pixel from the block processing value in the block and the number of pixels in the block. In addition, the local area data generation unit 3c functions as an example of a pixel processing value calculation unit that calculates a pixel processing value by dividing using a fixed-point method when the processing value in the block is divided by the number of pixels in the block. Have

そして、画像処理部3は、Y方向の加算処理部10およびX方向の加算処理部20により、座標[xc,yc]である対象画素PIX[xc,yc]の輝度値L[xc,yc]を中心とした局所領域(タップ数2N+1の正方領域)の統計情報として、局所領域のヒストグラムを構成する各階級値SumCnを算出する。ここで、階級数(ビン数)が4の場合、SumCnは、SumC0、SumC1、SumC2、SumC3を示す。  Then, the image processing unit 3 uses the Y-direction addition processing unit 10 and the X-direction addition processing unit 20 to determine the luminance value L [xc, yc] of the target pixel PIX [xc, yc] at the coordinates [xc, yc]. As the statistical information of the local region (square region with 2N + 1 taps) centered at, each class value SumCn constituting the histogram of the local region is calculated. Here, when the number of classes (number of bins) is 4, SumCn indicates SumC0, SumC1, SumC2, and SumC3.

(1.3 Y方向の加算処理部10の概要構成および機能)
次に、Y方向の加算処理部10の概要構成および機能について、図5を用いて説明する。なお、データについては、データB0[i、j]を用いて説明を行い、データB1、B2、B3に関しては同様なので、省略する。
(1.3 Outline Configuration and Function of Y Direction Addition Processing Unit 10)
Next, a schematic configuration and function of the Y direction addition processing unit 10 will be described with reference to FIG. Data will be described using data B0 [i, j], and data B1, B2, and B3 are the same and will be omitted.

図5は、Y方向の加算処理部10の概要構成例を示すブロック図である。  FIG. 5 is a block diagram illustrating a schematic configuration example of the addition processor 10 in the Y direction.

図5に示すように、Y方向の加算処理部10は、入力側からのブロック・データ生成部3aの出力データB0[i(xc+N),j(yc+N)]と、出力側からのフィードバックされたデータとを加算する加算器11と、加算器11からの出力データから、入力側からのブロック・データ生成部3aの出力データB0[i(xc+N),j(yc−N−1)]を減算する減算器12と、減算器12からのデータBarC0を1ライン分(原画像のX方向の画素数個分)順に記憶するラインメモリ13と、を有する。なお、i(x)は、X方向におけるX座標xに対応するブロックアドレスiであり、j(y)は、Y方向におけるX座標yに対応するブロックアドレスjである。また、画像データの座標は一例である。  As shown in FIG. 5, the addition processing unit 10 in the Y direction is fed back from the output side B0 [i (xc + N), j (yc + N)] of the block data generation unit 3a from the input side. The adder 11 that adds the data and the output data B0 [i (xc + N), j (yc−N−1)] of the block data generation unit 3a from the input side are subtracted from the output data from the adder 11. And a line memory 13 for storing data BarC0 from the subtracter 12 in order for one line (for several pixels in the X direction of the original image). Note that i (x) is a block address i corresponding to the X coordinate x in the X direction, and j (y) is a block address j corresponding to the X coordinate y in the Y direction. The coordinates of the image data are an example.

加算器11は、例えば、半加算器や全加算器等から構成された複数ビット用の加算器であり、任意の桁数の2進数の加算を行う。  The adder 11 is, for example, an adder for a plurality of bits composed of a half adder, a full adder, and the like, and adds a binary number having an arbitrary number of digits.

減算器12は、例えば、not回路や全加算器等から構成された複数ビット用の減算器であり、任意の桁数の2進数の減算を行う。  The subtractor 12 is a subtracter for a plurality of bits configured by, for example, a not circuit, a full adder, and the like, and performs subtraction of a binary number having an arbitrary number of digits.

ラインメモリ13は、原画像のX方向のライン分の長さの画素データ等を記憶するメモリであり、減算器12からの出力のデータBarC0[xc+N,yc]を記憶し、1ライン分遅れたデータを加算器11に出力するシフトレジスタとして機能する。すなわち、加算処理のたびに、参照したBarC0[xc+N,yc−1]を破棄し、生成したBarC0[xc+N,yc]を記憶するFIFOメモリとして機能する。ここで、画像処理装置1は、X方向に1画素ずつ走査していき、1ライン分遅れた画素データを出力するので、ラインメモリ13は、Y方向に1画素マイナスの画素データを出力する。  The line memory 13 is a memory for storing pixel data having a length corresponding to the line in the X direction of the original image. The line memory 13 stores data BarC0 [xc + N, yc] output from the subtractor 12 and is delayed by one line. It functions as a shift register that outputs data to the adder 11. In other words, each time the addition process is performed, the referenced BarC0 [xc + N, yc-1] is discarded, and functions as a FIFO memory that stores the generated BarC0 [xc + N, yc]. Here, the image processing apparatus 1 scans pixel by pixel in the X direction and outputs pixel data delayed by one line, so the line memory 13 outputs pixel data minus one pixel in the Y direction.

Y方向の加算処理部10の入力は、加算器11の一方の入力端および減算器12の一方の入力端により形成されている。加算器11の出力端は、減算器12の入力端に接続され、減算器12の出力端は、Y方向の加算処理部10の外部に出力する出力端を形成し、この分岐がラインメモリ13の入力端に接続されている。そして、ラインメモリ13の出力端は、加算器11の入力端に接続されている。  The input of the addition processor 10 in the Y direction is formed by one input terminal of the adder 11 and one input terminal of the subtractor 12. The output terminal of the adder 11 is connected to the input terminal of the subtractor 12, and the output terminal of the subtractor 12 forms an output terminal that outputs to the outside of the addition processor 10 in the Y direction. Is connected to the input terminal. The output end of the line memory 13 is connected to the input end of the adder 11.

(1.4 X方向の加算処理部20の概要構成および機能)
次に、X方向の加算処理部20の概要構成および機能について、図6を用いて説明する。なお、データについては、データBarC0を用いて説明を行い、データBarC1、BarC2、BarC3に関しては同様なので、省略する。
(1.4 Outline Configuration and Function of X Direction Addition Processing Unit 20)
Next, the schematic configuration and function of the X-direction addition processing unit 20 will be described with reference to FIG. Note that the data will be described using the data BarC0, and the data BarC1, BarC2, and BarC3 are the same and will be omitted.

図6は、X方向の加算処理部20の概要構成例を示すブロック図である。  FIG. 6 is a block diagram illustrating a schematic configuration example of the addition processing unit 20 in the X direction.

図6に示すように、X方向の加算処理部20は、入力側からの入力のデータBarC0[xc+N,yc]と、出力側からのフィードバックされたデータSumC0[xc,yc]とを加算する加算器21と、加算器21からの出力データから、シフトレジストされた入力側からの入力のデータBarC0[xc−N−1,yc]を減算して外部に出力する減算器22と、入力側からの入力のデータBarC0[xc+N,yc]をシフトレジストするシフトレジスタ23と、減算器22の出力のデータSumC0[xc,yc]を1データ分記憶して、データSumC0[xc−1,yc]を加算器21に出力する記憶器24と、を有する。  As shown in FIG. 6, the X-direction addition processing unit 20 adds the input data BarC0 [xc + N, yc] from the input side and the fed back data SumC0 [xc, yc] from the output side. The subtracter 22 that subtracts the input data BarC0 [xc−N−1, yc] from the input side subjected to shift registration from the output data from the adder 21 and the output data from the adder 21, and outputs from the input side. The shift register 23 that shift-registers the input data BarC0 [xc + N, yc] and the data SumC0 [xc, yc] output from the subtractor 22 are stored for one data, and the data SumC0 [xc-1, yc] is stored. And a storage unit 24 for outputting to the adder 21.

加算器21は、加算器11と同様の構成および機能を有し、減算器22は、減算器12と同様の構成および機能を有する。  The adder 21 has the same configuration and function as the adder 11, and the subtractor 22 has the same configuration and function as the subtractor 12.

シフトレジスタ23は、タップ数分のデータを記憶するシフトレジスタであり、入力側からの入力のデータBarC0[xc+N,yc]を記憶し、タップ数分遅れたデータBarC0[xc−N−1,yc]を減算器22に出力するシフトレジスタとして機能する。  The shift register 23 is a shift register that stores data for the number of taps, stores input data BarC0 [xc + N, yc] from the input side, and data BarC0 [xc−N−1, yc delayed by the number of taps. ] As a shift register that outputs to the subtractor 22.

記憶器24は、データ1個分を記憶する遅延素子である。  The storage device 24 is a delay element that stores one piece of data.

X方向の加算処理部20の入力は、加算器21およびシフトレジスタ23の入力端に接続されている。加算器21およびシフトレジスタ23の出力端は、減算器22の入力端に接続され、減算器22の出力端は、X方向の加算処理部20の外部に出力する出力端を形成し、この分岐が記憶器24の入力端に接続されている。そして、記憶器24の出力端は、加算器21の入力端に接続されている。  The input of the addition processor 20 in the X direction is connected to the input terminals of the adder 21 and the shift register 23. The output terminals of the adder 21 and the shift register 23 are connected to the input terminal of the subtracter 22, and the output terminal of the subtracter 22 forms an output terminal that outputs to the outside of the addition processing unit 20 in the X direction. Is connected to the input end of the memory 24. The output terminal of the storage device 24 is connected to the input terminal of the adder 21.

[2.画像処理装置における第1実施形態の動作]
(2.1 画像処理装置の動作例)
次に、画像処理装置1の動作例について、図7から図9を用いて説明する。
[2. Operation of First Embodiment in Image Processing Device]
(2.1 Example of operation of image processing apparatus)
Next, an operation example of the image processing apparatus 1 will be described with reference to FIGS.

図7は、画像処理装置1における第1実施形態の動作例を示すフローチャートである。図8は、動画データのフレーム画像おいて、対象画素を中心とした局所領域の一例を示す模式図である。図9は、局所領域とブロックとの関係の一例を示す模式図である。  FIG. 7 is a flowchart illustrating an operation example of the first embodiment in the image processing apparatus 1. FIG. 8 is a schematic diagram illustrating an example of a local region centered on a target pixel in a frame image of moving image data. FIG. 9 is a schematic diagram illustrating an example of a relationship between a local region and a block.

まず、図7に示すように、画像処理装置1は、動画データを取得する(ステップS1)。具体的には、画像処理装置1の入出力部5が、リアルタイムで、動画データのフレームとして、1のフレーム画像のデータを取得し、フレームに対して、任意の画像信号(例えば、RGB信号)から、Y,Cb,Cr信号等の輝度と色を示す画像信号に変換する。  First, as shown in FIG. 7, the image processing apparatus 1 acquires moving image data (step S1). Specifically, the input / output unit 5 of the image processing apparatus 1 acquires data of one frame image as a frame of moving image data in real time, and an arbitrary image signal (for example, RGB signal) with respect to the frame. Are converted into image signals indicating luminance and color such as Y, Cb, and Cr signals.

このように、画像処理装置1は、複数のフレームからなる動画データを取得する動画データ取得手段の一例として機能する。  As described above, the image processing apparatus 1 functions as an example of a moving image data acquisition unit that acquires moving image data including a plurality of frames.

次に、画像処理装置1は、動画データのフレームの画像を所定のブロック毎に分割する(ステップS2)。具体的には、画像処理装置1における画像処理部3のブロック・データ生成部3aが、図3に示すように、例えば、1920画素×1080画素のフレーム画像に対して、8画素×8画素のブロックBに分割し、ブロックアドレス[i、j]を決定する。なお、8画素×8画素のブロックの場合、1920画素×1080画素のフレーム画像は、240ブロック×135ブロックに分割される。  Next, the image processing apparatus 1 divides the frame image of the moving image data into predetermined blocks (step S2). Specifically, as shown in FIG. 3, the block data generation unit 3a of the image processing unit 3 in the image processing apparatus 1 has, for example, 8 pixels × 8 pixels with respect to a 1920 × 1080 pixel frame image. Dividing into blocks B, block address [i, j] is determined. In the case of a block of 8 pixels × 8 pixels, a frame image of 1920 pixels × 1080 pixels is divided into 240 blocks × 135 blocks.

このように、画像処理装置1は、動画データのフレームの画像を所定のブロック毎に分割するブロック分割手段の一例として機能する。  As described above, the image processing apparatus 1 functions as an example of a block dividing unit that divides a frame image of moving image data into predetermined blocks.

次に、画像処理装置1は、各ブロックに対して、ブロック・ヒストグラムを算出する(ステップS3)。具体的には、ブロック・データ生成部3aが、式(1)に従い、ブロック・ヒストグラム(画像処理のための前処理によるブロック処理値の一例)を算出する。  Next, the image processing apparatus 1 calculates a block histogram for each block (step S3). Specifically, the block data generation unit 3a calculates a block histogram (an example of a block processing value obtained by preprocessing for image processing) according to Expression (1).

L[x,y] <=63の時、B0[i,j]のカウントを1つ増加、
64<= L[x,y] <=127の時、B1[i,j]のカウントを1つ増加、
128<= L[x,y] <=191の時、B2[i,j]のカウントを1つ増加、
192<= L[x,y]の時、B3[i,j]のカウントを1つ増加
・・・(1)
When L [x, y] <= 63, the count of B0 [i, j] is incremented by 1,
When 64 <= L [x, y] <= 127, the count of B1 [i, j] is incremented by 1,
When 128 <= L [x, y] <= 191, the count of B2 [i, j] is incremented by 1,
When 192 <= L [x, y], the count of B3 [i, j] is incremented by one (1)

なお、式(1)は、ビン数が4、最大輝の範囲が0から255の場合であって、x,yは、画像の座標、L[x,y]は座標[x,y]の輝度値、[i,j]は、座標[x,y]に対応するブロックアドレスである。また、B0[i,j]からB3[i,j]は、Bn[i,j]のヒストグラムを構成する階級値(画素数)であり、B0[i,j]は、輝度値が0〜63の階級の階級値、B1[i,j]は、輝度値が64〜127の階級の階級値、B2[i,j]は、輝度値が128〜191の階級の階級値、B3[i,j]は、輝度値が192〜255の階級の階級値である。ブロック・データ用メモリ3bにおけるBn[i,j]は、ブロック毎のヒストグラム生成時には、全てゼロで初期化される。  Equation (1) is for the case where the number of bins is 4 and the range of maximum brightness is 0 to 255, where x and y are the coordinates of the image, and L [x, y] is the coordinates [x, y]. The luminance value [i, j] is a block address corresponding to the coordinates [x, y]. B0 [i, j] to B3 [i, j] are class values (number of pixels) constituting the histogram of Bn [i, j], and B0 [i, j] has a luminance value of 0 to 0. 63 class values, B1 [i, j] is a class value having a luminance value of 64-127, B2 [i, j] is a class value having a luminance value of 128-191, B3 [i , J] are class values of classes having luminance values of 192 to 255. Bn [i, j] in the block data memory 3b is all initialized to zero when generating a histogram for each block.

このように、画像処理装置1は、各ブロックに対して、画像処理のための前処理を行い、各ブロックのブロック処理値を算出するブロック処理値算出手段の一例として機能する。また、画像処理のための前処理によるブロック処理値の一例が、ブロックにおける明るさに関するヒストグラムである。なお、前処理は、ヒストグラムの生成、重み付けヒストグラムの生成、輝度値変換による輝度値を求める処理等が挙げられる。  As described above, the image processing apparatus 1 functions as an example of a block processing value calculation unit that performs preprocessing for image processing on each block and calculates a block processing value of each block. An example of a block processing value obtained by preprocessing for image processing is a histogram relating to brightness in a block. Note that the preprocessing includes generation of a histogram, generation of a weighted histogram, processing for obtaining a luminance value by luminance value conversion, and the like.

次に、画像処理装置1は、フレームに対して対象画素を設定する(ステップS4)。具体的には、画像処理装置1における画像処理部3の局所領域データ生成部3cが、リアルタイムで、動画データのフレームとして、ステップS1で取得したフレーム画像に対して次のフレーム画像のデータを取得し、フレームに対して、任意の画像信号(例えば、RGB信号)から、Y,Cb,Cr信号等の輝度と色を示す画像信号に変換する。そして、局所領域データ生成部3cが、フレーム画像から処理の対象画素を設定する。さらに具体的には、局所領域データ生成部3cが、画像処理の対象であるフレーム画像に対してX方向に走査してX方向の端に来ると、Y方向に順に走査を1画素移動させて、対象画素を設定していき、フレーム画像を画素毎に順次ディジタル処理する。  Next, the image processing apparatus 1 sets a target pixel for the frame (step S4). Specifically, the local region data generation unit 3c of the image processing unit 3 in the image processing device 1 acquires the data of the next frame image with respect to the frame image acquired in step S1 as the frame of the moving image data in real time. Then, an arbitrary image signal (for example, RGB signal) is converted into an image signal indicating luminance and color such as Y, Cb, and Cr signals for the frame. Then, the local region data generation unit 3c sets a processing target pixel from the frame image. More specifically, when the local area data generation unit 3c scans the frame image that is the target of image processing in the X direction and reaches the end in the X direction, the scanning is moved by one pixel in the Y direction sequentially. The target pixel is set, and the frame image is sequentially digitally processed for each pixel.

次に、画像処理装置1は、フレームの局所領域を設定する(ステップS5)。具体的には、局所領域データ生成部3cが、図8に示すように、対象画素31を中心とした局所領域32(例えば、191画素×191画素)を設定する。ここで、Box-Filtering方式を利用する場合、タップ数を設定することにより、局所領域が決定される。対象画素31を1画素ずつ走査して、2箇所の画素データを入力することにより、局所ヒストグラムを求める局所領域も移動したことになる。  Next, the image processing apparatus 1 sets a local region of the frame (step S5). Specifically, as shown in FIG. 8, the local region data generation unit 3 c sets a local region 32 (for example, 191 pixels × 191 pixels) centered on the target pixel 31. Here, when the Box-Filtering method is used, the local region is determined by setting the number of taps. By scanning the target pixel 31 pixel by pixel and inputting pixel data at two locations, the local region for obtaining the local histogram has also moved.

このように、画像処理装置1は、フレームに対して局所領域を設定する局所領域設定手段の一例として機能する。  Thus, the image processing apparatus 1 functions as an example of a local area setting unit that sets a local area for a frame.

次に、画像処理装置1は、ブロック・ヒストグラムとブロックの画素数とから、ブロックにおける1画素当たりの階級値を算出する(ステップS6)。具体的には、局所領域データ生成部3cの除算器が、各ブロック(ブロックアドレス[i、j])におけるブロック・ヒストグラムの各階級値B0[i、j]、B1[i、j]、B2[i、j]、B3[i、j]に対して、ブロックの画素数(例えば、64(8×8))で固定小数点法を用いた割り算を行い、ブロックアドレス[i、j]における1画素当たりの階級値B0[i、j]/ブロックの画素数、B1[i、j]/ブロックの画素数、B2[i、j]/ブロックの画素数、B3[i、j]/ブロックの画素数(例えば、階級値B0[i、j]/64、B1[i、j]/64、B2[i、j]/64、B3[i、j]/64)を算出する。  Next, the image processing apparatus 1 calculates a class value per pixel in the block from the block histogram and the number of pixels of the block (step S6). Specifically, the divider of the local area data generation unit 3c performs block class values B0 [i, j], B1 [i, j], B2 in each block (block address [i, j]). [I, j], B3 [i, j] is divided by the number of pixels of the block (for example, 64 (8 × 8)) using the fixed point method, and 1 in the block address [i, j] is obtained. Class value per pixel B0 [i, j] / number of blocks, B1 [i, j] / number of blocks, B2 [i, j] / number of blocks, B3 [i, j] / number of blocks The number of pixels (for example, class values B0 [i, j] / 64, B1 [i, j] / 64, B2 [i, j] / 64, B3 [i, j] / 64) is calculated.

ここで、次のステップS7において、局所領域に含まれるブロック・ヒストグラムBn[i,j]を、全て加算して、局所領域の局所ヒストグラムを生成するが、図9に示すように、局所領域32に完全に含まれるブロックBと、局所領域32に一部含まれるブロックBがある場合がある。例えば、図9に示すような場合、i=1においてj=0からj=6までのブロックB、i=7においてj=0からj=6までのブロックB、j=0においてi=1からi=7までのブロックB、および、j=6においてi=1からi=7までのブロックBは、局所領域32に一部含まれるブロックBである。  Here, in the next step S7, all the block histograms Bn [i, j] included in the local region are added to generate a local histogram of the local region. As shown in FIG. There may be a block B that is completely included in the block B and a block B that is partially included in the local region 32. For example, in the case shown in FIG. 9, a block B from j = 0 to j = 6 at i = 1, a block B from j = 0 to j = 6 at i = 7, and from i = 1 at j = 0. The block B up to i = 7 and the block B from i = 1 to i = 7 at j = 6 are blocks B partially included in the local region 32.

局所領域32に完全に含まれるブロックBに関しては、ブロック・データ用メモリ3bに記憶された情報自体を利用でき、ブロック・ヒストグラムBn[i,j]のデータをそのまま使う分には情報の劣化は生じない。しかし、局所領域32に一部含まれるブロックBに関しては、ブロックBに含まれるブロック・ヒストグラムの階級値の平均値(ブロック・ヒストグラムの階級値をブロック画素数で割った1画素当たりの階級値)を、局所領域32に含まれるブロックBの面積の割合で積算した値を利用する。この際、丸め誤差が生じないように、固定小数点法を用いた割り算を行う。  As for the block B completely included in the local area 32, the information itself stored in the block data memory 3b can be used, and the information deterioration is caused by using the data of the block histogram Bn [i, j] as it is. Does not occur. However, for the block B partially included in the local region 32, the average value of the class values of the block histogram included in the block B (the class value per pixel obtained by dividing the class value of the block histogram by the number of block pixels). Is integrated by the ratio of the area of the block B included in the local region 32. At this time, division using a fixed point method is performed so that no rounding error occurs.

このように、画像処理装置1は、ブロックにおけるブロック処理値と、ブロックの画素数とから、1画素当たりの画素処理値を算出する画素処理値算出手段の一例として機能する。また、画像処理装置1は、ブロックにおけるブロック処理値を、ブロックの画素数で割る際に、固定小数点法を用いた割り算により、画素処理値を算出する画素処理値算出手段の一例として機能する。  As described above, the image processing apparatus 1 functions as an example of a pixel processing value calculation unit that calculates a pixel processing value per pixel from the block processing value in the block and the number of pixels in the block. Further, the image processing apparatus 1 functions as an example of a pixel processing value calculation unit that calculates a pixel processing value by division using a fixed point method when dividing a block processing value in a block by the number of pixels in the block.

次に、画像処理装置1は、局所領域に属する画素に対応するブロックにおける1画素当たりの階級値から、局所ヒストグラムを算出する(ステップS7)。具体的には、局所領域データ生成部3cが、1画素におけるBn[i、j]/ブロックの画素数の値に対して、Box-Filtering方式を利用して、各局所領域における局所ヒストグラムを算出する。さらに具体的には、図4に示すように、局所領域データ生成部3cのY方向の加算処理部10およびX方向の加算処理部20が、Bn[i(xc+N)、j(yc+N)]/ブロックの画素数と、Bn[i(xc+N)、j(yc−N−1)]/ブロックの画素数とから、局所ヒストグラムSumCn[xc、yc]を出力する。但し、図4においては、”/ブロックの画素”を省略した。  Next, the image processing apparatus 1 calculates a local histogram from the class value per pixel in the block corresponding to the pixel belonging to the local region (step S7). Specifically, the local region data generation unit 3c calculates a local histogram in each local region using the Box-Filtering method for the value of the number of pixels of Bn [i, j] / block in one pixel. To do. More specifically, as shown in FIG. 4, the Y-direction addition processing unit 10 and the X-direction addition processing unit 20 of the local region data generation unit 3c perform Bn [i (xc + N), j (yc + N)] / A local histogram SumCn [xc, yc] is output from the number of pixels in the block and the number of pixels in Bn [i (xc + N), j (yc−N−1)] / block. However, in FIG. 4, “/ block pixel” is omitted.

なお、Box-Filtering方式を用いない場合は、局所領域データ生成部3cが、局所ヒストグラムの階数毎に、ブロック・ヒストグラムBn[i、j]を合計して、局所ヒストグラムを算出する。例えば、局所ヒストグラムの階級0の値は、局所領域32に完全に含まれるブロックBにおける階級値B0[i、j]の和(例えば、[i=2、j=1]から[i=6、j=5]まで階級値B0[i、j]の和)と、局所領域32に一部含まれるブロックBにおけるB0[i、j]/ブロックの画素数×ブロック面積比との合計から算出される。ここで、ブロックの面積比は、各ブロックにおいて局所領域が占める面積/ブロックの面積である。  When the Box-Filtering method is not used, the local region data generation unit 3c calculates the local histogram by adding the block histograms Bn [i, j] for each rank of the local histogram. For example, the value of class 0 of the local histogram is the sum of class values B0 [i, j] (for example, [i = 2, j = 1] to [i = 6, j = 5] is calculated from the sum of the class values B0 [i, j]) and B0 [i, j] / the number of pixels of the block × the block area ratio in the block B partially included in the local region 32. The Here, the block area ratio is the area occupied by the local region in each block / the area of the block.

または、局所領域データ生成部3cが、局所領域32に属する各画素に対して、各画素の座標[x,y]に対するブロックアドレス[i,j]を求め、Bn[i,j]/ブロックの画素数の値の和を階級毎に加算して、局所ヒストグラムを算出してもよい。  Alternatively, the local area data generation unit 3c obtains a block address [i, j] with respect to the coordinates [x, y] of each pixel for each pixel belonging to the local area 32, and Bn [i, j] / block A local histogram may be calculated by adding the sum of the number of pixels for each class.

ステップS7において、局所ヒストグラムが算出されたら、画像処理装置1は、局所ヒストグラムを利用して、コントラスト調整等の様々な画像処理をフレーム画像に対して行う。  In step S7, when the local histogram is calculated, the image processing apparatus 1 performs various image processing such as contrast adjustment on the frame image using the local histogram.

画像処理装置1は、次のフレーム画像を取得して、ブロック・データ生成部3aが、次のフレーム画像のブロック・ヒストグラムを算出し、ブロック・データ用メモリ3bに記憶する。局所領域データ生成部3cは、ブロック・データ用メモリ3bに記憶されている前のフレーム画像のブロック・ヒストグラムから、局所ヒストグラムを算出する。  The image processing apparatus 1 acquires the next frame image, and the block / data generation unit 3a calculates a block / histogram of the next frame image and stores it in the block / data memory 3b. The local area data generation unit 3c calculates a local histogram from the block histogram of the previous frame image stored in the block data memory 3b.

このように、画像処理装置1は、局所領域に対応する各ブロック処理値から、局所領域に対する前処理による局所処理値を算出する局所処理値算出手段の一例として機能する。また、画像処理装置1は、局所領域に属する画素に対応する画素処理値から、局所処理値を算出する局所処理値算出手段の一例として機能する。また、画像処理装置1は、ブロックが局所領域に重なる部分の大きさに基づき、局所領域に属する画素に対応する画素処理値から、局所処理値を算出する局所処理値算出手段の一例として機能する。また、画像処理装置1は、局所領域に属する画素に対応する画素処理値から、ボックスフィルタ方式により局所処理値を算出する局所処理値算出手段の一例として機能する。また、画像処理装置1は、局所領域に対応する前記各ブロックのヒストグラムから、前記局所処理値として、局所領域における明るさに関する局所ヒストグラムを算出する局所処理値算出手段の一例として機能する。  As described above, the image processing apparatus 1 functions as an example of a local processing value calculation unit that calculates a local processing value by preprocessing for a local region from each block processing value corresponding to the local region. The image processing apparatus 1 functions as an example of a local processing value calculation unit that calculates a local processing value from pixel processing values corresponding to pixels belonging to the local region. The image processing apparatus 1 functions as an example of a local processing value calculation unit that calculates a local processing value from a pixel processing value corresponding to a pixel belonging to the local region based on the size of a portion where the block overlaps the local region. . Further, the image processing apparatus 1 functions as an example of a local processing value calculation unit that calculates a local processing value from a pixel processing value corresponding to a pixel belonging to a local region by a box filter method. In addition, the image processing apparatus 1 functions as an example of a local processing value calculation unit that calculates a local histogram related to brightness in a local region as the local processing value from the histogram of each block corresponding to the local region.

以上のように、画像処理装置1は、動画に対して、各フレーム画像の局所ヒストグラムを求め、様々な画像処理を行っていく。  As described above, the image processing apparatus 1 obtains a local histogram of each frame image for a moving image and performs various image processing.

なお、時間的に1つ前のフレーム画像の局所ヒストグラム等の局所処理値に基づき、フレーム画像に対して、輝度変換等の画像処理を行う。そのため、動画に対しても、高速で画像処理を行うことができる。  Note that image processing such as luminance conversion is performed on the frame image based on a local processing value such as a local histogram of the previous frame image in time. Therefore, it is possible to perform image processing on a moving image at high speed.

(2.2 Box-Filtering方式)
次に、Box-Filtering方式に関して、図10から図13を用いて説明する。
(2.2 Box-Filtering method)
Next, the Box-Filtering method will be described with reference to FIGS.

図10に示すように、画素1(31)は、局所領域32の中心画素PIX[xc,yc]の座標である。ここで、画素1に対する局所領域をとする。また、便宜上、図10から図13において、ブロックの大きさを4画素×4画素、局所領域の大きさを、5画素×5画素(N=2)として説明する。  As illustrated in FIG. 10, the pixel 1 (31) is a coordinate of the central pixel PIX [xc, yc] of the local region 32. Here, a local region for the pixel 1 is assumed. For convenience, in FIGS. 10 to 13, the block size is assumed to be 4 pixels × 4 pixels, and the size of the local area is assumed to be 5 pixels × 5 pixels (N = 2).

この局所領域の局所ヒストグラムを構成する各階級値を、階数が4の場合、SumC0[xc,yc]、SumC1[xc,yc]、SumC2[xc,yc]、SumC3[xc,yc]とする。また、SumC0[xc,yc]は、輝度値が0〜63の階級の階級値、SumC1[xc,yc]は、輝度値が64〜127の階級の階級値、SumC2[xc,yc]は、輝度値が128〜191の階級の階級値、SumC3[xc,yc]は、輝度値が192〜255の階級の階級値とする。なお、以下、階級0に関して、SumC0[xc,yc]を例に説明する。  When the rank is 4, the rank values constituting the local histogram of the local area are SumC0 [xc, yc], SumC1 [xc, yc], SumC2 [xc, yc], and SumC3 [xc, yc]. SumC0 [xc, yc] is a class value having a luminance value of 0 to 63, SumC1 [xc, yc] is a class value having a luminance value of 64 to 127, and SumC2 [xc, yc] is The class value of the class having a luminance value of 128 to 191 and SumC3 [xc, yc] are the class values of the class having a luminance value of 192 to 255. Hereinafter, SumC0 [xc, yc] will be described as an example for class 0.

まず、図10に示すように、対象画素である画素1より、X方向に1画素前の画素PIX[xc−1,yc]に対する局所領域として領域2を設定する。なお、局所領域データ生成部3cが、走査における1画素前に、局所領域である領域2における局所ヒストグラムSumC0[xc−1,yc]を既に求めたとする。また、図10における画素に対応する各マス(ブロックアドレス[i、j]の位置)は、B0[i、j]/ブロックの画素数の値(例えば、B0[i、j]/16)も示している。  First, as illustrated in FIG. 10, the region 2 is set as a local region for the pixel PIX [xc−1, yc] that is one pixel before the pixel 1 as the target pixel in the X direction. It is assumed that the local region data generation unit 3c has already obtained the local histogram SumC0 [xc-1, yc] in the region 2 that is the local region one pixel before the scanning. Further, each square (the position of the block address [i, j]) corresponding to the pixel in FIG. 10 also has a value of B0 [i, j] / the number of pixels of the block (for example, B0 [i, j] / 16). Show.

領域1と領域2には、共通領域が存在する。その差分は、図11に示すように、領域4と領域5である。領域4または領域5内におけるブロック・ヒストグラムB0[i、j]の総和(領域内のブロックアドレス[i、j]におけるB0[i、j]/ブロックの画素数の値の総和)を、BarC0[x,y](但し、x,yは、各領域の中央部の座標)、局所領域一辺の長さを2N+1とすると、
領域1 = 領域2 − 領域4 + 領域5
である。
A common area exists in the areas 1 and 2. The difference is between region 4 and region 5, as shown in FIG. The sum of the block histograms B0 [i, j] in the region 4 or the region 5 (B0 [i, j] / the sum of the values of the number of pixels in the block address [i, j] in the region) is expressed as BarC0 [ x, y] (where x, y are the coordinates of the center of each region), and the length of one side of the local region is 2N + 1,
Area 1 = area 2-area 4 + area 5
It is.

従って、
となる。
Therefore,
It becomes.

ここで、図11に示すように、領域4内におけるブロック・ヒストグラムB0[i、j]の総和BarC0[xc−N−1,yc]は、ブロックアドレス[1、0]に属する画素が2つ、ブロックアドレス[1、1]に属する画素が3つなので、
B0[1、0]/16×2+B0[1、1]/16×3
となる。
Here, as shown in FIG. 11, the sum BarC0 [xc−N−1, yc] of the block histogram B0 [i, j] in the region 4 has two pixels belonging to the block address [1,0]. Since there are three pixels belonging to the block address [1, 1],
B0 [1, 0] / 16 × 2 + B0 [1, 1] / 16 × 3
It becomes.

次に、領域5に対応するBar0[xc+N,yc]の生成方法を説明する。  Next, a method for generating Bar0 [xc + N, yc] corresponding to the region 5 will be described.

領域5(Bar0[xc+N,yc])の中心画素は、図12に示すように、画素2(PIX[xc+N,yc])である。Bar0[xc+N,yc](領域5)の生成に当たり、図12に示すように、領域5から見てY方向に−1画素(図中、1画素上)の領域である領域6、すなわち、BarC0[xc+N,yc−1]を設定する。  The central pixel of the region 5 (Bar0 [xc + N, yc]) is the pixel 2 (PIX [xc + N, yc]) as shown in FIG. In generating Bar0 [xc + N, yc] (region 5), as shown in FIG. 12, region 6 which is a region of −1 pixel (up one pixel in the figure) in the Y direction when viewed from region 5, that is, BarC0 [Xc + N, yc-1] is set.

図13に示すように、領域5と領域6にも共通部分が存在するので、非共通部分である画素3(PIX[xc+N,yc+N])と画素4(PIX[xc−N,yc−N−1])より、
領域5 = 領域6 − 画素4 + 画素3
である。
As shown in FIG. 13, since there is a common portion in the region 5 and the region 6, the pixel 3 (PIX [xc + N, yc + N]) and the pixel 4 (PIX [xc-N, yc-N-) which are non-common portions are also present. 1])
Region 5 = region 6-pixel 4 + pixel 3
It is.

従って、
となる。
Therefore,
It becomes.

ここで、BarC0[x,y]を1ライン分記憶したMemC0を設定する(回路上はラインメモリ13に記憶される)。MemC0の領域は、図13に示す領域7とする。  Here, MemC0 in which BarC0 [x, y] is stored for one line is set (stored in the line memory 13 on the circuit). The region of MemC0 is the region 7 shown in FIG.

すなわち、
とする。
That is,
And

BarC0[xc+N,yc]を求めるに当たり、BarC0[xc+N,yc−1]は、MemC0より参照する。一方、MemC0は、BarC0[xc+N,yc]生成後、参照したBarC0[xc+N,yc−1]を削除し、生成したBarC0[xc+N,yc]を追加することとする。この操作によって、次の対象画素である、PIX[xc+1,yc]に備えることが可能となる。  In determining BarC0 [xc + N, yc], BarC0 [xc + N, yc-1] is referred to by MemC0. On the other hand, MemC0 deletes the referenced BarC0 [xc + N, yc-1] after adding BarC0 [xc + N, yc], and adds the generated BarC0 [xc + N, yc]. This operation makes it possible to prepare for the next target pixel, PIX [xc + 1, yc].

以上より、局所ヒストグラムSumC0[xc,yc]を求めるためには、画素4と画素3のみ参照すればよいので、少しの演算で、局所ヒストグラムSumC0[xc,yc]を求めることが可能となる。また、この方式は局所領域の大きさに関わらず、演算コストは同一となる。  As described above, in order to obtain the local histogram SumC0 [xc, yc], only the pixel 4 and the pixel 3 need to be referred to. Therefore, the local histogram SumC0 [xc, yc] can be obtained with a little calculation. In addition, this method has the same calculation cost regardless of the size of the local region.

次に、式(2)から式(4)で示した方法を、ステップS7において適用し、局所領域データ生成部3cは、局所ヒストグラムを求める。  Next, the method shown in Expression (2) to Expression (4) is applied in Step S7, and the local region data generation unit 3c obtains a local histogram.

なお、Y方向の加算処理部10は、式(3)に従う処理を行う。式(3)において、BarC0[xc+N,yc−1]は、ラインメモリ(MemC0)13より参照される。X方向の加算処理部20は、式(2)に従う処理を行う。  Note that the Y-direction addition processing unit 10 performs processing according to Equation (3). In Expression (3), BarC0 [xc + N, yc-1] is referred to by the line memory (MemC0) 13. The X direction addition processing unit 20 performs processing according to Expression (2).

本実施形態によれば、複数のフレームからなる動画データを取得し、フレームに対して局所領域32を設定し、動画データのフレームの画像を、局所領域32より大きさが小さい所定のブロックB毎に分割し、各ブロックBに対して、画像処理のための前処理を行い前記各ブロックのブロック処理値(例えば、ブロック・ヒストグラム)を算出し、局所領域32に対応する各ブロック処理値から、局所領域32に対する前処理による局所処理値(例えば、局所ヒストグラム)を算出することにより、画像処理のための前処理によりブロック単位にブロック処理値を算出し、例えば、時間的に次のフレームにおいて、局所領域に対応するブロック処理値から、局所処理値を算出しているので、画素単位に各局所領域の局所処理値を記憶しておく必要がないため、メモリの大きさを軽減することができる。  According to the present embodiment, moving image data including a plurality of frames is acquired, a local region 32 is set for the frame, and an image of a frame of the moving image data is provided for each predetermined block B having a smaller size than the local region 32. The block B is subjected to pre-processing for image processing to calculate the block processing value (for example, block histogram) of each block, and from each block processing value corresponding to the local region 32, By calculating a local processing value (for example, a local histogram) by preprocessing for the local region 32, a block processing value is calculated for each block by preprocessing for image processing. For example, in the next frame in time, Since the local processing value is calculated from the block processing value corresponding to the local region, the local processing value of each local region is stored in pixel units. Since there is no necessity, it is possible to reduce the size of the memory.

すなわち、回路またはCPUを用いた計算において、少ないメモリで局所ヒストグラム等の局所領域における局所処理値を算出できる。例えば、高精細度マルチメディアインターフェース用の画像の場合において、局所領域の大きさの一辺が191画素とすると、通常、必要なメモリは約1MBとなる。しかし、本実施形態では、1パス目において8画素×8画素のブロック・ヒストグラムを取得した場合、約95KBのメモリで済み、必要なメモリの大きさは、約1/10となる。  That is, in a calculation using a circuit or a CPU, a local processing value in a local region such as a local histogram can be calculated with a small amount of memory. For example, in the case of an image for a high definition multimedia interface, if one side of the size of the local area is 191 pixels, the required memory is normally about 1 MB. However, in this embodiment, when a block histogram of 8 pixels × 8 pixels is acquired in the first pass, only about 95 KB of memory is required, and the required memory size is about 1/10.

また、ブロックBにおけるブロック処理値(例えば、ブロック・ヒストグラム)と、ブロックの画素数とから、1画素当たりの画素処理値(例えば、Bn[i、j]/ブロックの画素数)を算出し、局所領域32に属する画素に対応する画素処理値から、局所処理値(例えば、局所ヒストグラム)を算出する場合、ブロックにおけるブロック処理値に対応した1画素当たりの画素処理値により、メモリの大きさを軽減して、局所ヒストグラム等の局所処理値を算出できる。  Further, a pixel processing value (for example, Bn [i, j] / number of pixels of the block) per pixel is calculated from the block processing value (for example, block histogram) in the block B and the number of pixels of the block. When calculating a local processing value (for example, a local histogram) from a pixel processing value corresponding to a pixel belonging to the local region 32, the size of the memory is determined by the pixel processing value per pixel corresponding to the block processing value in the block. It is possible to reduce and calculate a local processing value such as a local histogram.

ブロックにおけるブロック処理値を、ブロックの画素数で割る際に、固定小数点法を用いた割り算により、画素処理値を算出する場合、丸め誤差が発生しないので、高精度に局所ヒストグラム等の局所処理値を算出できる。  When dividing the block processing value in the block by the number of pixels in the block, when calculating the pixel processing value by division using the fixed-point method, no rounding error occurs. It can be calculated.

ブロックBが局所領域32に重なる部分の大きさに基づき、局所領域32に属する画素に対応する画素処理値から、局所処理値を算出する場合、局所領域32に完全に含まれないブロックBが存在しても、局所ヒストグラム等の局所処理値を高精度に算出できる。  When the local processing value is calculated from the pixel processing values corresponding to the pixels belonging to the local region 32 based on the size of the portion where the block B overlaps the local region 32, there is a block B that is not completely included in the local region 32 Even so, local processing values such as a local histogram can be calculated with high accuracy.

局所領域32に属する画素に対応する画素処理値から、ボックスフィルタ方式により局所処理値を算出する場合、少ないメモリで局所ヒストグラム等の局所処理値を算出できる。  When the local processing value is calculated from the pixel processing values corresponding to the pixels belonging to the local region 32 by the box filter method, the local processing value such as the local histogram can be calculated with a small amount of memory.

画像処理のための前処理によるブロック処理値がブロックにおける明るさに関するヒストグラムであって、局所領域に対応する各ブロックのヒストグラム(ブロック・ヒストグラムBn[i、j])から、局所処理値として、局所領域における明るさに関する局所ヒストグラムSumC0[xc,yc]を算出する場合、メモリを軽減した回路、または、計算により、局所領域における画像の統計量として局所ヒストグラムを算出できる。  The block processing value obtained by the preprocessing for image processing is a histogram relating to the brightness in the block. From the histogram (block histogram Bn [i, j]) of each block corresponding to the local region, the local processing value When calculating the local histogram SumC0 [xc, yc] related to the brightness in the region, the local histogram can be calculated as an image statistic in the local region by a circuit or calculation with reduced memory.

(第2実施形態)
[3.第2実施形態に係る画像処理装置の構成および機能]
(3.1 画像処理装置の構成および機能)
次に、本発明の第2実施形態に係る画像処理装置について図を用いて説明する。
(Second Embodiment)
[3. Configuration and Function of Image Processing Device According to Second Embodiment]
(3.1 Configuration and function of image processing apparatus)
Next, an image processing apparatus according to a second embodiment of the present invention will be described with reference to the drawings.

第2実施形態に係る画像処理装置の概要構成は第1実施形態とほぼ同じである。但し、ブロック・データ生成部3aは、ブロック・ヒストグラムBn[i、j]の代わりに、画像処理のための前処理によるブロック処理値の一例として、各ブロックにおいて輝度値変換による値(ブロック輝度値)BCs[i、j]、BCm[i、j]、BCh[i、j]を算出し、ブロック・データ用メモリ3bは、値BCs[i、j]、BCm[i、j]、BCh[i、j]を記憶する。局所領域データ生成部3cは、局所ヒストグラムSumCn[xc,yc]の代わりに、輝度値変換により変換した輝度値の総和のデータSumCs[xc,yc]、SumCm[xc,yc]、SumCh[xc,yc]を算出する。なお、前記第1実施形態と同一または対応する部分には、同一の符号を用いて異なる構成および作用のみを説明する。その他の実施形態および変形例も同様とする。  The schematic configuration of the image processing apparatus according to the second embodiment is substantially the same as that of the first embodiment. However, instead of the block histogram Bn [i, j], the block data generation unit 3a uses, as an example of a block processing value by preprocessing for image processing, a value (block luminance value) obtained by luminance value conversion in each block. ) BCs [i, j], BCm [i, j], BCh [i, j] are calculated, and the block data memory 3b stores the values BCs [i, j], BCm [i, j], BCh [ i, j]. The local region data generation unit 3c, instead of the local histogram SumCn [xc, yc], sum data of luminance values converted by luminance value conversion SumCs [xc, yc], SumCm [xc, yc], SumCh [xc, yc] is calculated. Note that the same or corresponding parts as those in the first embodiment will be described using only the same reference numerals and different configurations and operations. The same applies to other embodiments and modifications.

図14は、本発明の第2実施形態に係る画像処理装置において、図1の画像処理部の概要構成例を示すブロック図である。  FIG. 14 is a block diagram illustrating a schematic configuration example of the image processing unit in FIG. 1 in the image processing apparatus according to the second embodiment of the present invention.

図14に示すように、画像処理部3のブロック・データ生成部3aは、原画像の画素データの輝度値に応じて輝度値を変換する輝度値変換関数を実現する輝度値変換テーブル部TCs、TCm、TChを更に備える。  As illustrated in FIG. 14, the block data generation unit 3 a of the image processing unit 3 includes a luminance value conversion table unit TCs that realizes a luminance value conversion function that converts a luminance value according to the luminance value of the pixel data of the original image. TCm and TCh are further provided.

輝度値変換テーブル部TCsは、低輝度領域用の輝度値変換テーブルを有し、輝度値変換テーブル部TCmは、中輝度領域用の輝度値変換テーブルを有し、輝度値変換テーブル部TChは、高輝度領域用の輝度値変換テーブルを有する。  The luminance value conversion table unit TCs includes a luminance value conversion table for a low luminance region, the luminance value conversion table unit TCm includes a luminance value conversion table for a medium luminance region, and the luminance value conversion table unit TCh includes: It has a luminance value conversion table for a high luminance area.

各輝度値変換テーブル部TCs、TCm、TChに、原画像の局所領域内のある画素の輝度値L[x,y]に対して、各輝度値変換テーブル部TCs、TCm、TChは、各輝度値変換テーブルに対応した値Cs[x,y]、Cm[x,y]、Ch[x,y]を出力する。  For each luminance value conversion table unit TCs, TCm, TCh, each luminance value conversion table unit TCs, TCm, TCh has a luminance value L [x, y] of a pixel in a local area of the original image. The values Cs [x, y], Cm [x, y], and Ch [x, y] corresponding to the value conversion table are output.

(3.2 第2実施形態に係る画像処理装置の動作例)
次に、第2実施形態に係る画像処理装置1の動作例について、図15から図19に基づき説明する。
(3.2 Example of Operation of Image Processing Device According to Second Embodiment)
Next, an operation example of the image processing apparatus 1 according to the second embodiment will be described with reference to FIGS.

ここで、局所領域に含まれる輝度変換後の低輝度データであるCs[x,y]、同じく中輝度データであるCm[x,y]、同じく高輝度データであるCh[x,y]に関して、それぞれ同じ処理になるので、Cs[x,y]を例に説明する。  Here, regarding Cs [x, y] which is low luminance data after luminance conversion included in the local region, Cm [x, y] which is also medium luminance data, and Ch [x, y] which is also high luminance data. Since the processes are the same, Cs [x, y] will be described as an example.

図15に示すように、画像処理装置1は、各輝度領域に対応した輝度領域関数を設定する(ステップS10)。具体的には、画像処理装置1のCPU部2が、図16に示すように、輝度領域(明るさ領域の一例)を低輝度領域Bs,中輝度領域Bm,高輝度領域Bhに、重みにより区分するための輝度領域関数Ws,Wm,Wh(明るさ領域関数の一例)を各々設定する。輝度領域関数Ws,Wm,Whは、輝度に対する重みにより各輝度領域を規定する。低輝度領域Bsは、輝度領域関数Wsの重みに従って、輝度を表す値が0から255まで広がる領域である。中輝度領域Bmは、輝度領域関数Wmの重みに従って、輝度0から輝度256まで広がる領域である。高輝度領域Bhは、輝度領域関数Whの重みに従って、輝度0から輝度256まで広がる領域である。  As shown in FIG. 15, the image processing apparatus 1 sets a brightness area function corresponding to each brightness area (step S10). Specifically, as shown in FIG. 16, the CPU unit 2 of the image processing apparatus 1 changes the luminance area (an example of the brightness area) into the low luminance area Bs, the medium luminance area Bm, and the high luminance area Bh by weight. Luminance area functions Ws, Wm, Wh (an example of a brightness area function) for classification are set. The brightness area functions Ws, Wm, and Wh define each brightness area by weights for brightness. The low luminance region Bs is a region where a value representing luminance extends from 0 to 255 according to the weight of the luminance region function Ws. The middle luminance region Bm is a region that extends from luminance 0 to luminance 256 according to the weight of the luminance region function Wm. The high luminance region Bh is a region that extends from luminance 0 to luminance 256 according to the weight of the luminance region function Wh.

輝度値Lの関数である輝度領域関数Ws,Wm,Whは、例えば、式(5)により設定される。
Luminance area functions Ws, Wm, and Wh that are functions of the luminance value L are set by, for example, Expression (5).

輝度領域関数Wsおよび輝度領域関数Whは、ガウス関数であり、また、低、中、高の各領域の面積(重みの合計)がほぼ等しくなるように、分散値σが調整される。また、輝度領域関数Wmは、ある輝度値における各輝度領域の重みの合計が、1になるように設定される。なお、本実施形態では、ガウス関数を用いたが、シグモイド曲線等、他の関数を用いてもよい。但し、関数は連続的な変化をする関数であることが好ましい。また、分割される領域数は3に限らず、2や4でもよい。  The luminance area function Ws and the luminance area function Wh are Gaussian functions, and the variance value σ is adjusted so that the areas (total weights) of the low, medium, and high areas are substantially equal. The luminance area function Wm is set so that the sum of the weights of the luminance areas at a certain luminance value is 1. In the present embodiment, a Gaussian function is used, but other functions such as a sigmoid curve may be used. However, the function is preferably a function that changes continuously. Further, the number of regions to be divided is not limited to 3, and may be 2 or 4.

このように、画像処理装置1は、明るさに対する重みにより明るさ領域(低輝度領域Bs等)を規定するための明るさ領域関数(輝度領域関数Ws等)を設定する明るさ領域関数設定手段の一例として機能する。また、画像処理装置1は、明るさ領域毎(各輝度領域Bs、Bm,Bh)に、各明るさ領域関数を設定する明るさ領域関数設定手段の一例として機能する。  In this way, the image processing apparatus 1 is a brightness area function setting unit that sets a brightness area function (such as a brightness area function Ws) for defining a brightness area (such as a low brightness area Bs) by a weight for brightness. Functions as an example. The image processing apparatus 1 functions as an example of a brightness area function setting unit that sets each brightness area function for each brightness area (each luminance area Bs, Bm, Bh).

次に、画像処理装置1は、輝度領域関数から輝度領域毎の輝度値変換関数を設定する(ステップS11)。具体的には、画像処理装置1のCPU部2が、輝度領域関数Ws、Wm,Whを累積した輝度累積関数Fs,Fm、Fhを求める。輝度累積関数Fs,Fm、Fhは、
である。ここで、最小輝度は0とし、最大輝度をLmaxとする。
Next, the image processing apparatus 1 sets a luminance value conversion function for each luminance region from the luminance region function (step S11). Specifically, the CPU unit 2 of the image processing apparatus 1 obtains luminance accumulation functions Fs, Fm, and Fh obtained by accumulating the luminance area functions Ws, Wm, and Wh. The luminance accumulation functions Fs, Fm, Fh are
It is. Here, the minimum luminance is 0, and the maximum luminance is Lmax.

そして、画像処理装置1のCPU部2が、図17に示すように、輝度累積関数Fs,Fm、Fhより、輝度値変換関数Cs、Cm、Ch(明るさ変換関数の一例)を設定する。
Then, as shown in FIG. 17, the CPU unit 2 of the image processing apparatus 1 sets luminance value conversion functions Cs, Cm, and Ch (an example of a brightness conversion function) from the luminance accumulation functions Fs, Fm, and Fh.

ここで、輝度値変換関数Cs、Cm、Chは、正規化するために、輝度累積関数Fs,Fm、Fhを、輝度累積関数Fs,Fm、Fhの各々最大値である最大値max[Fs]、max[Fm]、max[Fh]で割った関数である。  Here, in order to normalize the luminance value conversion functions Cs, Cm, and Ch, the luminance accumulation functions Fs, Fm, and Fh are converted into maximum values max [Fs] that are the maximum values of the luminance accumulation functions Fs, Fm, and Fh, respectively. , Max [Fm], max [Fh].

このように、画像処理装置1は、明るさ領域関数(輝度領域関数Ws,Wm,Wh)を明るさ(輝度)に対して累積することにより、輝度累積関数Fs,Fm、Fhを求め、明るさ変換関数(輝度値変換関数Cs、Cm、Ch)を設定する明るさ変換関数設定手段の一例として機能する。また、画像処理装置1は、各明るさ領域関数に対して、各明るさ変換関数(輝度値変換関数Cs、Cm、Ch)を設定する明るさ変換関数設定手段の一例として機能する。  As described above, the image processing apparatus 1 obtains the luminance accumulation functions Fs, Fm, and Fh by accumulating the brightness region functions (luminance region functions Ws, Wm, and Wh) with respect to the brightness (luminance). It functions as an example of a brightness conversion function setting means for setting a height conversion function (luminance value conversion functions Cs, Cm, Ch). The image processing apparatus 1 functions as an example of a brightness conversion function setting unit that sets each brightness conversion function (brightness value conversion functions Cs, Cm, Ch) for each brightness area function.

次に、画像処理装置1は、輝度領域毎の上・下限変換関数を設定する(ステップS12)。具体的には、画像処理装置1のCPU部2が、図18A、図18B、図18Cに示すように、輝度変換の上限値と下限値を規定するために、輝度領域Bs、Bm、Bh毎に上限変換関数として、上限ガンマ曲線関数Gs1、Gm1、Gh1と、下限変換関数として、下限ガンマ曲線関数Gs0、Gm0、Gh0とを設定する。ここで、各ガンマ曲線関数(ガンマ補正関数)のガンマ値は任意に設定可能とする。  Next, the image processing apparatus 1 sets an upper / lower limit conversion function for each luminance region (step S12). Specifically, as shown in FIGS. 18A, 18B, and 18C, the CPU unit 2 of the image processing apparatus 1 defines the upper limit value and the lower limit value of the luminance conversion for each of the luminance regions Bs, Bm, and Bh. The upper limit gamma curve functions Gs1, Gm1, and Gh1 are set as upper limit conversion functions, and the lower limit gamma curve functions Gs0, Gm0, and Gh0 are set as lower limit conversion functions. Here, the gamma value of each gamma curve function (gamma correction function) can be arbitrarily set.

なお、上限変換関数(上限ガンマ曲線関数Gs1、Gm1、Gh1)は、輝度に対して連続かつ単調増加であり、輝度変換の出力の上限を決める。下限変換関数(下限ガンマ曲線関数Gs0、Gm0、Gh0)は、輝度に対して連続かつ単調増加であり、輝度変換の出力の下限を決める。また、上限ガンマ曲線関数Gs1、Gm1、Gh1および下限ガンマ曲線関数Gs0、Gm0、Gh0は、ガンマ補正関数である。また、ガンマ補正関数は、明るさに対する視覚特性に合うように補正する関数の一例である。また、本実施形態では上限変換関数および下限変換関数の一例として、ガンマ曲線関数を挙げたが、上限変換関数および下限変換関数を生成する曲線は、単調増加であれば、ガンマ曲線関数に限定されるものでは無い。例えば、複数のガンマ曲線関数を合成した曲線や、直線とガンマ曲線関数を合成した曲線等であってもよい。  The upper limit conversion functions (upper limit gamma curve functions Gs1, Gm1, and Gh1) are continuous and monotonically increasing with respect to the luminance, and determine the upper limit of the luminance conversion output. The lower limit conversion function (lower limit gamma curve function Gs0, Gm0, Gh0) is continuous and monotonically increasing with respect to the luminance, and determines the lower limit of the luminance conversion output. The upper limit gamma curve functions Gs1, Gm1, and Gh1 and the lower limit gamma curve functions Gs0, Gm0, and Gh0 are gamma correction functions. Further, the gamma correction function is an example of a function for correcting so as to match the visual characteristic with respect to brightness. In this embodiment, the gamma curve function is given as an example of the upper limit conversion function and the lower limit conversion function. However, the curves that generate the upper limit conversion function and the lower limit conversion function are limited to the gamma curve function as long as they are monotonically increasing. It is not something. For example, a curve obtained by combining a plurality of gamma curve functions, a curve obtained by combining a straight line and a gamma curve function, or the like may be used.

次に、画像処理装置1は、動画データの取得し、動画データの第1フレームの画像を所定のブロック毎に分割する(ステップS13)。具体的には、画像処理装置1の入出力部5が、ステップS1のように、動画データを取得し、ステップS2のように、画像処理装置1における画像処理部3のブロック・データ生成部3aが、動画データの第1フレームの画像を所定のブロック毎に分割する。なお、第1フレームは、輝度変換等の画像処理をしたい第2フレームに対して、時間的に1つ前のフレームである。また、第2フレームの時間をtとすると、第1フレームの時間はt−1となる。  Next, the image processing apparatus 1 acquires moving image data and divides the first frame image of the moving image data into predetermined blocks (step S13). Specifically, the input / output unit 5 of the image processing apparatus 1 acquires moving image data as in step S1, and the block / data generation unit 3a of the image processing unit 3 in the image processing apparatus 1 as in step S2. However, the image of the first frame of the moving image data is divided into predetermined blocks. The first frame is a temporally previous frame with respect to the second frame on which image processing such as luminance conversion is desired. If the time of the second frame is t, the time of the first frame is t-1.

このように画像処理装置1は、画像処理を行う原画像の入力を受け付ける原画像入力手段の一例として機能する。  As described above, the image processing apparatus 1 functions as an example of an original image input unit that receives an input of an original image for image processing.

次に、画像処理装置1は、各ブロックにおける輝度変換値関数で変換した輝度値を算出する(ステップS14)。具体的には、ブロック・データ生成部3aが、第1フレーム(t−1)において、ブロック([i、j])に属する各画素[x,y]に対して、各輝度領域Bs、Bm、Bhに輝度値変換関数Cs[L]、Cm[L]、Ch[L]で変換した輝度値Cs[x,y]、Cm[x,y]、Ch[x,y]を求め、ブロック内での和を算出し、輝度値BCs[i、j]、BCm[i、j]、BCh[i、j]とする。さらに具体的には、図14に示すように、画像処理部3の輝度値変換テーブル部TCs、TCm、TChが、局所領域の各画素に対して、各領域の輝度値変換関数Cs[L]、Cm[L]、Ch[L]の値を求める。そして、ブロック・データ生成部3aが、各ブロック(ブロックアドレス[i、j])での和の輝度値(ブロック輝度値)BCs[i、j]、BCm[i、j]、BCh[i、j]を算出し、ブロック・データ用メモリ3bに記憶する。  Next, the image processing apparatus 1 calculates the luminance value converted by the luminance conversion value function in each block (step S14). Specifically, the block data generation unit 3a applies the luminance regions Bs and Bm to the pixels [x, y] belonging to the block ([i, j]) in the first frame (t−1). , Bh, the luminance values Cs [x, y], Cm [x, y], and Ch [x, y] converted by the luminance value conversion functions Cs [L], Cm [L], and Ch [L] are obtained, and the block Are calculated as luminance values BCs [i, j], BCm [i, j], and BCh [i, j]. More specifically, as shown in FIG. 14, the luminance value conversion table units TCs, TCm, and TCh of the image processing unit 3 perform the luminance value conversion function Cs [L] of each region for each pixel of the local region. , Cm [L] and Ch [L] are obtained. The block data generation unit 3a then adds the sum luminance values (block luminance values) BCs [i, j], BCm [i, j], BCh [i, in each block (block address [i, j]). j] is calculated and stored in the block data memory 3b.

次に、画像処理装置1は、ステップS4およびS5のように、第2フレームに対して対象画素を設定し、第1フレームより時間的に後の第2フレームの局所領域を設定する(ステップS15)。  Next, as in steps S4 and S5, the image processing apparatus 1 sets a target pixel for the second frame, and sets a local region of the second frame that is temporally later than the first frame (step S15). ).

このように画像処理装置1は、原画像から、明るさの変換を行う画素を中心とした局所領域を設定する局所領域設定手段の一例として機能する。  As described above, the image processing apparatus 1 functions as an example of a local region setting unit that sets a local region centered on a pixel that performs brightness conversion from an original image.

次に、画像処理装置1は、第2フレーム(t)において、各輝度領域に対して対象画素の輝度値における上限・下限変換関数値を算出する(ステップS16)。具体的には、画像処理装置1のCPU部2が、低輝度領域Bsの場合、図19Aに示すように、第2フレーム(t)における局所領域の対象画素PIX[xc,yc]の輝度値L[xc,yc]における上限変換関数値Gs1[L[xc,yc]]および下限変換関数値Gs0[L[xc,yc]]を算出する。中輝度領域Bmの場合、図19Bに示すように、画像処理装置1のCPU部2が、対象画素[xc,yc]の輝度値L[xc,yc]における上限変換関数値Gm1[L[xc,yc]]および下限変換関数値Gm0[L[xc,yc]]を算出する。高輝度領域Bhの場合、図19Cに示すように、画像処理装置1のCPU部2が、対象画素[xc,yc]の輝度値L[xc,yc]における上限変換関数値Gh1[L[xc,yc]]および下限変換関数値Gh0[L[xc,yc]]を算出する。このように、画像処理装置1は、第2フレーム(t)における上限変換関数値Gs1、Gm1、Gh1および下限変換関数値Gs0、Gm0、Gh0を算出する。  Next, the image processing apparatus 1 calculates the upper limit / lower limit conversion function value in the luminance value of the target pixel for each luminance region in the second frame (t) (step S16). Specifically, when the CPU unit 2 of the image processing apparatus 1 is in the low luminance region Bs, as shown in FIG. 19A, the luminance value of the target pixel PIX [xc, yc] in the local region in the second frame (t) The upper limit conversion function value Gs1 [L [xc, yc]] and the lower limit conversion function value Gs0 [L [xc, yc]] in L [xc, yc] are calculated. In the case of the middle luminance region Bm, as shown in FIG. 19B, the CPU unit 2 of the image processing apparatus 1 uses the upper limit conversion function value Gm1 [L [xc] for the luminance value L [xc, yc] of the target pixel [xc, yc]. , yc]] and the lower limit conversion function value Gm0 [L [xc, yc]]. In the case of the high luminance region Bh, as shown in FIG. 19C, the CPU unit 2 of the image processing apparatus 1 uses the upper limit conversion function value Gh1 [L [xc] for the luminance value L [xc, yc] of the target pixel [xc, yc]. , yc]] and a lower limit conversion function value Gh0 [L [xc, yc]]. As described above, the image processing apparatus 1 calculates the upper limit conversion function values Gs1, Gm1, and Gh1 and the lower limit conversion function values Gs0, Gm0, and Gh0 in the second frame (t).

なお、上限変換関数値Gs1[L[xc,yc]]、Gm1[L[xc,yc]]、Gh1[L[xc,yc]]は、各輝度領域において、変換を行う画素(対象画素PIX[xc,yc])の明るさ(輝度値L[xc,yc])における上限変換関数Gs1、Gm1、Gh1の値である上限値である。下限変換関数値Gs0[L[xc,yc]]、Gm0[L[xc,yc]]、Gh0[L[xc,yc]]は、各輝度領域において、変換を行う画素(対象画素PIX[xc,yc])の明るさ(輝度値L[xc,yc])における下限変換関数Gs0、Gm0、Gh0の値である下限値である。  The upper limit conversion function values Gs1 [L [xc, yc]], Gm1 [L [xc, yc]], and Gh1 [L [xc, yc]] are pixels to be converted (target pixel PIX) in each luminance region. [Xc, yc]) is an upper limit value that is a value of the upper limit conversion functions Gs1, Gm1, and Gh1 in brightness (luminance value L [xc, yc]). Lower limit conversion function values Gs0 [L [xc, yc]], Gm0 [L [xc, yc]], and Gh0 [L [xc, yc]] are pixels (target pixel PIX [xc] to be converted in each luminance region. , yc]) is the lower limit value that is the value of the lower limit conversion function Gs0, Gm0, Gh0 in the brightness (luminance value L [xc, yc]).

このように、画像処理装置1は、明るさに対して連続かつ単調増加であり、明るさの変換の出力上限を決める上限変換関数を設定する上限変換関数設定手段、明るさに対して連続かつ単調増加であり、明るさの変換の出力下限を決める下限変換関数を設定する下限変換関数設定手段の一例として機能する。また、画像処理装置1は、各明るさ領域(輝度領域Bs,Bm,Bh)に対応して上限変換関数(上限ガンマ曲線関数Gs1、Gm1、Gh1)を設定する上限変換関数設定手段の一例として機能する。また、画像処理装置1は、各明るさ領域(輝度領域Bs,Bm,Bh)に対応して下限変換関数(下限ガンマ曲線関数Gs0、Gm0、Gh0)を設定する下限変換関数設定手段の一例として機能する。  As described above, the image processing apparatus 1 has an upper limit conversion function setting unit that sets an upper limit conversion function that determines an output upper limit of brightness conversion, which is continuous and monotonically increasing with respect to the brightness. It is monotonically increasing and functions as an example of a lower limit conversion function setting means for setting a lower limit conversion function that determines an output lower limit of brightness conversion. The image processing apparatus 1 is an example of an upper limit conversion function setting unit that sets an upper limit conversion function (upper limit gamma curve functions Gs1, Gm1, Gh1) corresponding to each brightness region (luminance regions Bs, Bm, Bh). Function. Further, the image processing apparatus 1 is an example of lower limit conversion function setting means for setting a lower limit conversion function (lower limit gamma curve functions Gs0, Gm0, Gh0) corresponding to each brightness region (luminance regions Bs, Bm, Bh). Function.

また、画像処理装置1は、変換を行う画素の明るさにおける上限変換関数の値である上限値および下限変換関数の値である下限値を算出する上限・下限値算出手段の一例として機能する。また、画像処理装置1は、各明るさ領域(輝度領域Bs,Bm,Bh)に対応する上限変換関数および下限変換関数に応じて、各上限値および下限値を算出する上限・下限値算出手段の一例として機能する。  The image processing apparatus 1 functions as an example of an upper limit / lower limit calculation unit that calculates an upper limit value that is an upper limit conversion function value and a lower limit value that is a lower limit conversion function value for the brightness of a pixel to be converted. In addition, the image processing apparatus 1 includes upper limit / lower limit value calculating means for calculating the upper limit value and the lower limit value according to the upper limit conversion function and the lower limit conversion function corresponding to each brightness region (luminance regions Bs, Bm, Bh). Functions as an example.

次に、画像処理装置1は、ブロックの画素数から、ブロックにおける1画素当たりの変換した輝度値(ブロック輝度値)を算出する(ステップS17)。具体的には、ステップS6のように、局所領域データ生成部3cの除算器が、各ブロック(ブロックアドレス[i、j])での和の輝度値BCs[i、j]、BCm[i、j]、BCh[i、j]に対して、ブロックの画素数(例えば、64(8×8))で固定小数点法を用いた割り算を行い、ブロックアドレス[i、j]における1画素当たりの変換した輝度値BCs[i、j]/ブロックの画素数、BCm[i、j]/ブロックの画素数、BCh[i、j]/ブロックの画素数を算出する。このように、画像処理装置1は、第1フレーム(t−1)において、ブロックにおける1画素当たりの変換した輝度値(ブロック輝度値)を算出する。  Next, the image processing apparatus 1 calculates a converted luminance value (block luminance value) per pixel in the block from the number of pixels in the block (step S17). Specifically, as in step S6, the divider of the local region data generation unit 3c performs sum luminance values BCs [i, j], BCm [i, in each block (block address [i, j]). j] and BCh [i, j] are divided by the fixed-point method with the number of pixels of the block (for example, 64 (8 × 8)), and the per pixel per block address [i, j] The converted luminance value BCs [i, j] / number of blocks, BCm [i, j] / number of blocks, and BCh [i, j] / number of blocks are calculated. Thus, the image processing apparatus 1 calculates the converted luminance value (block luminance value) per pixel in the block in the first frame (t−1).

次に、画像処理装置1は、局所領域における輝度値変換関数で変換した輝度値の総和を求め、分割比率を算出する(ステップS18)。具体的には、画像処理装置1の画像処理部3(局所領域データ生成部3c)が、座標[xc,yc]である対象画素PIX[xc,yc]の輝度値L[xc,yc]を中心とした局所領域32の統計情報として、第1フレーム(t−1)において、各輝度領域Bs、Bm、Bhに輝度値変換関数Cs[L]、Cm[L]、Ch[L]で変換した輝度値の総和のデータSumCs、SumCm、SumChを各々求めるために、第1実施形態のBn[i、j]/ブロックの画素数の値の代わりに、ブロックアドレス[i、j]における1画素当たりの変換した輝度値BCs[i、j]/ブロックの画素数、BCm[i、j]/ブロックの画素数、BCh[i、j]/ブロックの画素数の値に対して、Box-Filtering方式を利用する。画像処理部3のY方向の加算処理部10およびX方向の加算処理部20が、第1フレーム(t−1)における総和のデータSumCs、SumCm、SumChを求める。  Next, the image processing apparatus 1 calculates the sum of the luminance values converted by the luminance value conversion function in the local region, and calculates the division ratio (step S18). Specifically, the image processing unit 3 (local region data generation unit 3c) of the image processing apparatus 1 calculates the luminance value L [xc, yc] of the target pixel PIX [xc, yc] having the coordinates [xc, yc]. As the statistical information of the local region 32 as the center, in the first frame (t−1), the luminance regions Bs, Bm, and Bh are converted by the luminance value conversion functions Cs [L], Cm [L], and Ch [L]. In order to obtain the summation data SumCs, SumCm, SumCh of each luminance value, one pixel at the block address [i, j] instead of the value of the number of pixels of Bn [i, j] / block of the first embodiment Box-Filtering with respect to the brightness value BCs [i, j] / number of pixels of the block, BCm [i, j] / number of pixels of the block, and BCh [i, j] / number of pixels of the block Use the method. The addition processing unit 10 in the Y direction and the addition processing unit 20 in the X direction of the image processing unit 3 obtain sum data SumCs, SumCm, and SumCh in the first frame (t−1).

そして、画像処理装置1のCPU部2は、画像処理部3から、総和のデータSumCs、SumCm、SumChのデータを受信し、正規化するために、各総和のデータSumCs、SumCm、SumChは局所領域に含まれる画素数SUMで各々割り、第1フレーム(t−1)における各分割比率Hs、Hm、Hhを求める。  Then, the CPU unit 2 of the image processing apparatus 1 receives the sum data SumCs, SumCm, SumCh from the image processing unit 3 and normalizes the sum data SumCs, SumCm, SumCh in the local region. Are respectively divided by the number of pixels SUM, and the division ratios Hs, Hm, and Hh in the first frame (t−1) are obtained.

各分割比率Hs、Hm、Hhを式で表すと式(8)になる。
When each division ratio Hs, Hm, and Hh is expressed by an equation, equation (8) is obtained.

ここで、局所領域は一辺の長さを2N+1の大きさの正方形とする。また、局所領域に含まれる各画素の輝度をL[i,j]とする。また、Cs[L[i,j]]、Cm[L[i,j]]、Ch[L[i,j]]を、各々単にCs[i,j]、Cm[i,j]、Ch[i,j]と記載する。  Here, the local region is a square with a side length of 2N + 1. Further, the luminance of each pixel included in the local area is L [i, j]. Also, Cs [L [i, j]], Cm [L [i, j]], and Ch [L [i, j]] are simply replaced with Cs [i, j], Cm [i, j], and Ch, respectively. [I, j].

なお、各分割比率Hs、Hm、Hhは、Y方向の加算処理部10およびX方向の加算処理部20により、Box-Filtering方式で高速に算出される。また、本実施形態では、局所領域の形を正方形としたが、任意の縦横比の長方形でもよい。また、各座標値[i,j]は、ラスタスキャン順に増加する。  Each division ratio Hs, Hm, and Hh is calculated at high speed by the box-filtering method by the Y-direction addition processing unit 10 and the X-direction addition processing unit 20. In this embodiment, the shape of the local region is a square, but it may be a rectangle having an arbitrary aspect ratio. Each coordinate value [i, j] increases in the raster scan order.

次に、画像処理装置1は、第2フレーム(t)における上限・下限変換関数値と、第1フレーム(t−1)における分割比率とより、第2フレーム(t)における各輝度領域の変換輝度値を求める(ステップS19)。具体的には、画像処理装置1のCPU部2が、輝度領域Bs、Bm、Bh毎に、第2フレーム(t)における対象画素PIX[xc,yc]の輝度値L[xc,yc]に対応する、各領域の上限ガンマ値と下限ガンマ値に対して、第1フレーム(t−1)から求めた分割比率Hs,Hm、Hhを利用して、第2フレーム(t)における輝度領域毎の変換輝度値Ls、Lm、Lhを、式(9)より求める。
Next, the image processing apparatus 1 converts each luminance region in the second frame (t) from the upper limit / lower limit conversion function value in the second frame (t) and the division ratio in the first frame (t−1). A luminance value is obtained (step S19). Specifically, the CPU unit 2 of the image processing apparatus 1 sets the luminance value L [xc, yc] of the target pixel PIX [xc, yc] in the second frame (t) for each of the luminance regions Bs, Bm, and Bh. For each corresponding upper limit gamma value and lower limit gamma value of each area, the division ratios Hs, Hm, and Hh obtained from the first frame (t-1) are used for each luminance area in the second frame (t). The converted luminance values Ls, Lm, and Lh are obtained from Equation (9).

図19Aに示すように、低輝度領域Bsの場合、輝度値L[xc,yc]における各領域の下限ガンマ値Gs0[L[xc,yc]]および上限ガンマ値Gs1[L[xc,yc]]から、分割比率Hs[xc,yc]から、式(9)に従って変換輝度値Ls[xc,yc]を求める。  As shown in FIG. 19A, in the case of the low luminance region Bs, the lower limit gamma value Gs0 [L [xc, yc]] and the upper limit gamma value Gs1 [L [xc, yc] of each region in the luminance value L [xc, yc]. ], The converted luminance value Ls [xc, yc] is obtained from the division ratio Hs [xc, yc] according to the equation (9).

また、図19Bに示すように、中輝度領域Bmの場合、輝度値L[xc,yc]における各領域の下限ガンマ値Gm0[L[xc,yc]]および上限ガンマ値Gm1[L[xc,yc]]から、分割比率Hm[xc,yc]から、式(9)に従って変換輝度値Lm[xc,yc]を求める。  Further, as shown in FIG. 19B, in the case of the middle luminance region Bm, the lower limit gamma value Gm0 [L [xc, yc]] and the upper limit gamma value Gm1 [L [xc, yc]], the conversion luminance value Lm [xc, yc] is obtained from the division ratio Hm [xc, yc] according to the equation (9).

また、図19Cに示すように、高輝度領域Bhの場合、輝度値L[xc,yc]における各領域の下限ガンマ値Gh0[L[xc,yc]]および上限ガンマ値Gh1[L[xc,yc]]から、分割比率Hh[xc,yc]から、式(9)に従って変換輝度値Lh[xc,yc]を求める。  As shown in FIG. 19C, in the case of the high luminance region Bh, the lower limit gamma value Gh0 [L [xc, yc]] and the upper limit gamma value Gh1 [L [xc, yc]], the conversion luminance value Lh [xc, yc] is obtained from the division ratio Hh [xc, yc] according to the equation (9).

このように、画像処理装置1は、局所領域における各画素の明るさ(輝度)に応じて、上限値と下限値との間の値を設定するための比率(分割比率H)を算出する比率算出手段の一例として機能する。また、画像処理装置1は、局所領域における各画素の明るさに明るさ変換関数(輝度値変換関数Cs、Cm、Ch)を適用して、比率を算出する比率算出手段の一例として機能する。また、画像処理装置1は、各明るさ変換関数(輝度値変換関数Cs、Cm、Ch)を適用して、各上限値および下限値に対する各比率(分割比率Hs、Hm、Hh)を算出する比率算出手段の一例として機能する。  As described above, the image processing apparatus 1 calculates a ratio (division ratio H) for setting a value between the upper limit value and the lower limit value according to the brightness (luminance) of each pixel in the local region. It functions as an example of calculation means. The image processing apparatus 1 functions as an example of a ratio calculation unit that calculates a ratio by applying a brightness conversion function (brightness value conversion functions Cs, Cm, Ch) to the brightness of each pixel in the local region. In addition, the image processing apparatus 1 calculates each ratio (division ratio Hs, Hm, Hh) with respect to each upper limit value and lower limit value by applying each brightness conversion function (brightness value conversion functions Cs, Cm, Ch). It functions as an example of the ratio calculation means.

次に、画像処理装置1は、各輝度領域の変換輝度値より変換輝度を求める(ステップS20)。具体的には、画像処理装置1のCPU部2が、式(10)のように、各領域の変換輝度値Ls[xc,yc]、Lm[xc,yc]、Lh[xc,yc]を加算し、対象画素PIX[xc,yc]における輝度値を変換した輝度Lout[xc,yc]を求める。
Next, the image processing apparatus 1 obtains converted luminance from the converted luminance value of each luminance region (step S20). Specifically, the CPU unit 2 of the image processing apparatus 1 calculates the converted luminance values Ls [xc, yc], Lm [xc, yc], and Lh [xc, yc] of each region as shown in Expression (10). The luminance Lout [xc, yc] obtained by converting the luminance value in the target pixel PIX [xc, yc] is obtained by addition.

このように、画像処理装置1は、上限値と下限値と比率とにより、明るさ(輝度)の変換を行う画素の変換後の明るさ(輝度Lout)を算出する明るさ算出手段の一例として機能する。また、画像処理装置1は、各上限値および下限値と、各比率(分割比率Hs、Hm、Hh)とより、変換後の明るさを算出する明るさ算出手段の一例として機能する。  As described above, the image processing apparatus 1 is an example of the brightness calculation unit that calculates the brightness (luminance Lout) after conversion of the pixel that performs brightness (luminance) conversion based on the upper limit value, the lower limit value, and the ratio. Function. Further, the image processing apparatus 1 functions as an example of a brightness calculation unit that calculates the brightness after conversion from each upper limit value and lower limit value and each ratio (division ratio Hs, Hm, Hh).

次に、画像処理装置1は、フレーム画像を走査して、最後の画素まで上記の処理を行う。  Next, the image processing apparatus 1 scans the frame image and performs the above processing up to the last pixel.

なお、輝度値変換関数Cs、Cm、Chが、輝度の軸の方向で反転させた場合でもよい。  Note that the luminance value conversion functions Cs, Cm, and Ch may be reversed in the direction of the luminance axis.

例えば、輝度値変換関数Csは、
Cs=1−Fs[L]/max[Fs] ・・・(11)
でもよい。
For example, the luminance value conversion function Cs is
Cs = 1−Fs [L] / max [Fs] (11)
But you can.

本実施形態によれば、複数のフレームからなる動画データを取得し、フレームに対して局所領域32を設定し、動画データのフレームの画像を、局所領域32より大きさが小さい所定のブロックB毎に分割し、各ブロックBに対して、画像処理のための前処理を行い各ブロックのブロック処理値(例えば、ブロック輝度値BCs[i、j]、BCm[i、j]、BCh[i、j])を算出し、局所領域32に対応する各ブロック処理値から、局所領域32に対する前処理による局所処理値(例えば、変換した輝度値の総和のデータSumCs、SumCm、SumCh)を算出することにより、画像処理のための前処理によりブロック単位にブロック処理値を算出し、例えば、時間的に次のフレームにおいて、局所領域に対応するブロック処理値から、局所処理値を算出しているので、画素単位に各局所領域の局所処理値を記憶しておく必要がないため、メモリの大きさを軽減することができる。  According to the present embodiment, moving image data including a plurality of frames is acquired, a local region 32 is set for the frame, and an image of a frame of the moving image data is provided for each predetermined block B having a smaller size than the local region 32. Each block B is subjected to preprocessing for image processing, and block processing values of each block (for example, block luminance values BCs [i, j], BCm [i, j], BCh [i, j]), and from each block processing value corresponding to the local region 32, a local processing value (for example, sum data of converted luminance values SumCs, SumCm, SumCh) by preprocessing for the local region 32 is calculated. Thus, a block processing value is calculated for each block by preprocessing for image processing.For example, in the next frame in time, the block processing value corresponding to the local region is calculated. The value, since the calculated local processing value, since it is not necessary to store the local treatment value for each local region in pixel units, it is possible to reduce the size of the memory.

また、本実施形態によれば、明るさが連続する画像でも精度よく各画素の輝度を変換できる。すなわち、空等のグラデーション領域を含む画像であっても、良好な輝度変換を行うことができる。  Further, according to the present embodiment, the luminance of each pixel can be accurately converted even in an image with continuous brightness. That is, even for an image including a gradation area such as the sky, it is possible to perform good luminance conversion.

局所領域32における各画素の輝度に応じて、分割比率Hs、Hm、Hhを算出している。例えば、対象画素の局所領域内に含まれる画素に対する総和のデータSumCs、SumCm、SumChのような、局所領域内における平均的な値により、分割比率Hs、Hm、Hhを算出している。このため、対象画素が、1画素ずれても、分割比率Hs、Hm、Hhの値が大きく変化しなく、対象画素の近傍の他の対象画素でも、変換の割合が大きく変化しない。従って、空等のグラデーション領域を含む画像であっても、良好な輝度変換を行うことができる。  The division ratios Hs, Hm, and Hh are calculated according to the luminance of each pixel in the local region 32. For example, the division ratios Hs, Hm, and Hh are calculated based on average values in the local region such as sum data SumCs, SumCm, and SumCh for the pixels included in the local region of the target pixel. For this reason, even if the target pixel is shifted by one pixel, the values of the division ratios Hs, Hm, and Hh do not change greatly, and the conversion rate does not change greatly even in other target pixels near the target pixel. Therefore, even in an image including a gradation area such as the sky, it is possible to perform good luminance conversion.

なお、従来の手法では、空等のグラデーション領域を含む画像のように、輝度が緩やかに変化する画像の場合、輝度のヒストグラムが特定の輝度に集中した形状で、輝度変換を行うと、ヒストグラムの形状が広がり、良好な輝度変換を行うことができなかった。しかし、本実施形態によれば、上限変換関数(Gs1等)および下限変換関数Gs0等)により、極端な輝度変換が防止でき、空等のグラデーション領域を含む画像であっても、良好な輝度変換を行うことができる。  In the conventional method, in the case of an image with a gradual change in luminance, such as an image including a gradation area such as the sky, if the luminance conversion is performed in a shape in which the luminance histogram is concentrated to a specific luminance, The shape spreads and good luminance conversion could not be performed. However, according to the present embodiment, extreme luminance conversion can be prevented by the upper limit conversion function (Gs1 and the like) and the lower limit conversion function Gs0 and the like, and good luminance conversion can be performed even for an image including a gradation region such as the sky. It can be performed.

また、本実施形態によれば、ブロックノイズが無く、高精度にコントラストの改善ができる。また、画像処理装置1は、時間的に前の第1フレームの画像データから局所領域における局所値を利用しているので、高速化で適切に各画素の明るさを変換できる。  Further, according to the present embodiment, there is no block noise, and the contrast can be improved with high accuracy. Moreover, since the image processing apparatus 1 uses the local value in the local area from the image data of the first frame that is temporally previous, the brightness of each pixel can be appropriately converted at high speed.

また、画像処理装置1が、明るさ(輝度)に対する重みにより明るさ領域(低輝度領域Bs等)を規定するための明るさ領域関数(輝度領域関数Ws等)を設定し、明るさ領域関数を明るさに対して累積することにより(輝度累積関数Fs等)、明るさ変換関数(輝度値変換関数Cs等)を設定し、局所領域における各画素の明るさに明るさ変換関数を適用して、分割比率Hs等を算出する場合、局所領域における各画素の情報を反映した分割比率が決定でき、明るさ変換の精度を向上させることができる。  In addition, the image processing apparatus 1 sets a brightness area function (such as a brightness area function Ws) for defining a brightness area (such as a low brightness area Bs) by weighting the brightness (brightness). Is set with respect to the brightness (luminance accumulation function Fs, etc.), the brightness conversion function (luminance value conversion function Cs, etc.) is set, and the brightness conversion function is applied to the brightness of each pixel in the local region. Thus, when the division ratio Hs or the like is calculated, the division ratio reflecting the information of each pixel in the local region can be determined, and the accuracy of brightness conversion can be improved.

また、画像処理装置1が、明るさ領域毎(輝度領域Bs,Bm,Bh)に、各明るさ領域関数(輝度領域関数Ws,Wm,Wh)を設定し、各明るさ領域関数に対して、各明るさ変換関数(輝度値変換関数Cs、Cm、Ch)を設定し、各明るさ領域に対応して上限変換関数(上限ガンマ曲線関数Gs1、Gm1、Gh1)を設定し、各明るさ領域に対応して下限変換関数(下限ガンマ曲線関数Gs0、Gm0、Gh0)を設定する。そして、画像処理装置1が、各明るさ領域に対応する上限変換関数および下限変換関数に応じて、各上限値および下限値を算出し、各明るさ変換関数を適用して、各上限値および下限値に対する各比率(分割比率Hs、Hm、Hh)を算出し、各上限値および下限値と、各比率とにより、変換後の明るさを算出する場合、ユーザが輝度領域毎に、輝度領域関数Ws,Wm,Wh、上限変換関数、および、下限変換関数の少なくとも1つを調整することにより、コントラスト等の調節ができる。  Further, the image processing apparatus 1 sets each brightness area function (luminance area functions Ws, Wm, Wh) for each brightness area (luminance areas Bs, Bm, Bh), and for each brightness area function, Each brightness conversion function (luminance value conversion function Cs, Cm, Ch) is set, and an upper limit conversion function (upper limit gamma curve function Gs1, Gm1, Gh1) is set corresponding to each brightness area, and each brightness A lower limit conversion function (lower limit gamma curve functions Gs0, Gm0, Gh0) is set corresponding to the region. Then, the image processing apparatus 1 calculates each upper limit value and lower limit value according to the upper limit conversion function and the lower limit conversion function corresponding to each brightness region, and applies each brightness conversion function to each upper limit value and When each ratio (division ratio Hs, Hm, Hh) with respect to the lower limit value is calculated, and the brightness after conversion is calculated based on each upper limit value, lower limit value, and each ratio, the user determines the brightness area for each brightness area. The contrast or the like can be adjusted by adjusting at least one of the functions Ws, Wm, Wh, the upper limit conversion function, and the lower limit conversion function.

また、明るさ領域関数(輝度領域関数Ws,Wm,Wh)が、連続関数である場合、特に、原画像の明るさが連続する領域における、画像処理の精度を向上させることができる。  Further, when the brightness area function (luminance area functions Ws, Wm, Wh) is a continuous function, the accuracy of image processing can be improved particularly in an area where the brightness of the original image is continuous.

また、上限変換関数および下限変換関数が、ガンマ補正関数のように、明るさに対する視覚特性に合うように補正する関数である場合、人間の感覚にあった画像補正ができる。  In addition, when the upper limit conversion function and the lower limit conversion function are functions that are corrected so as to match the visual characteristics with respect to brightness, such as a gamma correction function, image correction suitable for human senses can be performed.

なお、第1および第2実施形態の処理は、コンピュータにより実行してもよい。この場合、第1および第2実施形態の処理を実行するプログラムを記憶した記録媒体等をコンピュータが読み出し実行する。  Note that the processing of the first and second embodiments may be executed by a computer. In this case, the computer reads and executes a recording medium or the like that stores a program for executing the processing of the first and second embodiments.

第1および第2実施形態の処理をコンピュータソフトウエアで実装する場合においても、組み込み機器等に実装するときは、コンピュータのCPUが使用するメモリが少ない方が、より高速な処理が可能になる可能性が高くなる。  Even when the processing of the first and second embodiments is implemented by computer software, when implemented in an embedded device or the like, faster processing may be possible with less memory used by the computer CPU. Increases nature.

また、例えばトーンカーブを変更し、画像変換の結果を人間が見ながら修正して行くようなアプリケーションソフトでは、適切な画像変換結果を得るまで何度もパラメータを変えて画像変換を繰り返すような操作を行なうアプリケーションソフトの形態が考えられる。  In addition, for example, in application software that changes the tone curve and the image conversion result is corrected by human beings, it is necessary to change the parameter many times until the appropriate image conversion result is obtained. A form of application software for performing the above is conceivable.

このようなアプリケーションでは原画像自体は変化しないので、原画像から生成される局所ヒストグラムは一度生成すればよいが、パラメータを変更した場合、何度も画像変換を行う必要がある。また、局所ヒストグラム等の局所処理値のデータは、元データより大きくなる場合が多々存在する。このような場合、局所ヒストグラム等の局所処理値の代わりに、ブロック・ヒストグラムのようなブロック処理値を、ブロック・データ用メモリ3bに保存しておけば、より少ないメモリの消費で済み、良好な実行速度を得ることが可能である。  In such an application, since the original image itself does not change, a local histogram generated from the original image may be generated once. However, when the parameter is changed, it is necessary to perform image conversion many times. In addition, data of local processing values such as a local histogram often becomes larger than the original data. In such a case, if a block processing value such as a block histogram is stored in the block data memory 3b instead of a local processing value such as a local histogram, less memory is consumed, which is good. It is possible to obtain execution speed.

また、第1および第2実施形態における画像補正技術は、ディジタルスチルカメラやビデオカメラでの画像処理のみならず、医療、車載、監視等、様々な用途に適用できる。  The image correction technique in the first and second embodiments can be applied not only to image processing with a digital still camera and a video camera but also to various uses such as medical treatment, in-vehicle use, and monitoring.

さらに、本発明は、上記各実施形態に限定されるものではない。上記各実施形態は、例示であり、本発明の特許請求の範囲に記載された技術的思想と実質的に同一な構成を有し、同様な作用効果を奏するものは、いかなるものであっても本発明の技術的範囲に包含される。  Furthermore, the present invention is not limited to the above embodiments. Each of the embodiments described above is an exemplification, and any configuration that has substantially the same configuration as the technical idea described in the claims of the present invention and has the same operational effects can be used. It is included in the technical scope of the present invention.

1:画像処理装置
2:CPU部
3:画像処理部
3a:ブロック・データ生成部
3b:ブロック・データ用メモリ
3c:局所領域データ生成部
4:記憶部
10:Y方向の加算処理部
20:X方向の加算処理部
30:原画像
31:画素
32:局所領域
L:輝度値(明るさ)
B:ブロック
Bn:ブロック・ヒストグラム(ブロック処理値)
SumCn:局所ヒストグラム(局所処理値)
BCs、BCm、BCh:ブロック輝度値(ブロック処理値)
SumCs、SumCm、SumC:変換した輝度値の総和のデータ(局所処理値)
1: Image processing device 2: CPU unit 3: Image processing unit 3a: Block data generation unit 3b: Memory for block data 3c: Local area data generation unit 4: Storage unit 10: Addition processing unit in Y direction 20: X Direction addition processing unit 30: original image 31: pixel 32: local region L: luminance value (brightness)
B: Block Bn: Block histogram (block processing value)
SumCn: Local histogram (local processing value)
BCs, BCm, BCh: Block luminance value (block processing value)
SumCs, SumCm, SumC: Data of sum of converted luminance values (local processing value)

Claims (9)

Translated fromJapanese
複数のフレームからなる動画データを取得する動画データ取得手段と、
前記フレームに対して所定の方向に走査させる局所領域を設定する局所領域設定手段と、
前記動画データのフレームの画像を、前記局所領域より大きさが小さい所定のブロック毎に分割するブロック分割手段と、
前記各ブロックに対して、画像処理のための前処理を行い前記各ブロックのブロック処理値を算出するブロック処理値算出手段と、
前記局所領域に対応する前記各ブロック処理値から、前記局所領域に対する前記前処理による局所処理値を算出する局所処理値算出手段と、
を備えることを特徴とする画像処理装置。
Video data acquisition means for acquiring video data comprising a plurality of frames;
Local region setting means for setting a local regionto be scanned in a predetermined direction with respect to the frame;
Block dividing means for dividing the image of the frame of the moving image data into predetermined blocks smaller in size than the local region;
Block processing value calculation means for performing preprocessing for image processing on each block and calculating a block processing value for each block;
Local processing value calculation means for calculating a local processing value by the preprocessing for the local region from each block processing value corresponding to the local region;
An image processing apparatus comprising:
請求項1に記載の画像処理装置において、
前記ブロック処理値と、前記ブロックの画素数とから、1画素当たりの画素処理値を算出する画素処理値算出手段を更に備え、
前記局所処理値算出手段が、前記局所領域に属する画素に対応する前記画素処理値から、前記局所処理値を算出することを特徴とする画像処理装置。
The image processing apparatus according to claim 1.
A pixel processing value calculating means for calculating a pixel processing value per pixel from the block processing value and the number of pixels of the block;
The image processing apparatus, wherein the local processing value calculation means calculates the local processing value from the pixel processing value corresponding to a pixel belonging to the local region.
請求項2に記載の画像処理装置において、
前記画素処理値算出手段が、前記ブロック処理値を、前記ブロックの画素数で割る際に、固定小数点法を用いた割り算により、前記画素処理値を算出することを特徴とする画像処理装置。
The image processing apparatus according to claim 2,
The image processing apparatus, wherein the pixel processing value calculation means calculates the pixel processing value by division using a fixed point method when dividing the block processing value by the number of pixels of the block.
請求項2または請求項3に記載の画像処理装置において、
前記局所処理値算出手段が、前記ブロックが前記局所領域に重なる部分の大きさに基づき、前記局所領域に属する画素に対応する前記画素処理値から、前記局所処理値を算出することを特徴とする画像処理装置。
The image processing apparatus according to claim 2 or 3,
The local processing value calculation means calculates the local processing value from the pixel processing value corresponding to a pixel belonging to the local region based on a size of a portion where the block overlaps the local region. Image processing device.
請求項2または請求項3に記載の画像処理装置において、
前記局所処理値算出手段が、前記局所領域に属する画素に対応する前記画素処理値から、ボックスフィルタ方式により前記局所処理値を算出することを特徴とする画像処理装置。
The image processing apparatus according to claim 2 or 3,
The image processing apparatus, wherein the local processing value calculation means calculates the local processing value by a box filter method from the pixel processing values corresponding to the pixels belonging to the local region.
請求項1から請求項5のいずれか1項に記載の画像処理装置において、
前記ブロック処理値が、前記ブロックにおける明るさに関するヒストグラムであって、
前記局所処理値算出手段が、前記局所領域に対応する前記各ブロックのヒストグラムから、前記局所処理値として、前記局所領域における明るさに関する局所ヒストグラムを算出することを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 5,
The block processing value is a histogram relating to brightness in the block,
The image processing apparatus, wherein the local processing value calculation means calculates a local histogram relating to brightness in the local region as the local processing value from the histogram of each block corresponding to the local region.
画像処理装置が画像処理をする画像処理方法において、
複数のフレームからなる動画データを取得する動画データ取得ステップと、
前記フレームに対して所定の方向に走査させる局所領域を設定する局所領域設定ステップと、
前記動画データのフレームの画像を、前記局所領域より大きさが小さい所定のブロック毎に分割するブロック分割ステップと、
前記各ブロックに対して、画像処理のための前処理を行い前記各ブロックのブロック処理値を算出するブロック処理値算出ステップと、
前記局所領域に対応する前記各ブロック処理値から、前記局所領域に対する前記前処理による局所処理値を算出する局所処理値算出ステップと、
を含むことを特徴とする画像処理方法。
In an image processing method in which an image processing apparatus performs image processing,
A video data acquisition step of acquiring video data consisting of a plurality of frames;
A local region setting step for setting a local regionto be scanned in a predetermined direction with respect to the frame;
A block dividing step of dividing the image of the frame of the moving image data into predetermined blocks smaller in size than the local region;
A block processing value calculation step for performing preprocessing for image processing on each block and calculating a block processing value of each block;
A local processing value calculating step for calculating a local processing value by the preprocessing for the local region from the block processing values corresponding to the local region;
An image processing method comprising:
コンピュータを、
複数のフレームからなる動画データを取得する動画データ取得手段、
前記フレームに対して所定の方向に走査させる局所領域を設定する局所領域設定手段、
前記動画データのフレームの画像を、前記局所領域より大きさが小さい所定のブロック毎に分割するブロック分割手段、
前記各ブロックに対して、画像処理のための前処理を行い前記各ブロックのブロック処理値を算出するブロック処理値算出手段および、
前記局所領域に対応する前記各ブロック処理値から、前記局所領域に対する前記前処理による局所処理値を算出する局所処理値算出手段として機能させることを特徴とする画像処理用プログラム。
Computer
Movie data acquisition means for acquiring movie data consisting of a plurality of frames,
Local area setting means for setting a local areato be scanned in a predetermined direction with respect to the frame;
Block dividing means for dividing the image of the frame of the moving image data into predetermined blocks smaller in size than the local region;
Block processing value calculation means for performing preprocessing for image processing on each block and calculating a block processing value of each block; and
An image processing program that functions as a local processing value calculation unit that calculates a local processing value by the preprocessing for the local region from the block processing values corresponding to the local region.
コンピュータを、
複数のフレームからなる動画データを取得する動画データ取得手段、
前記フレームに対して所定の方向に走査させる局所領域を設定する局所領域設定手段、
前記動画データのフレームの画像を、前記局所領域より大きさが小さい所定のブロック毎に分割するブロック分割手段、
前記各ブロックに対して、画像処理のための前処理を行い前記各ブロックのブロック処理値を算出するブロック処理値算出手段、および、
前記局所領域に対応する前記各ブロック処理値から、前記局所領域に対する前記前処理による局所処理値を算出する局所処理値算出手段として機能させることを特徴とする画像
処理用プログラムがコンピュータ読み取り可能に記録された記録媒体。
Computer
Movie data acquisition means for acquiring movie data consisting of a plurality of frames,
Local area setting means for setting a local areato be scanned in a predetermined direction with respect to the frame;
Block dividing means for dividing the image of the frame of the moving image data into predetermined blocks smaller in size than the local region;
Block processing value calculation means for performing preprocessing for image processing on each block and calculating a block processing value of each block; and
An image processing program is recorded so as to be readable by a computer, and functions as local processing value calculation means for calculating a local processing value by the preprocessing for the local region from each block processing value corresponding to the local region. Recorded media.
JP2012132712A2012-06-122012-06-12 Image processing apparatus, image processing method, image processing program, and recording mediumActiveJP6019782B2 (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
JP2012132712AJP6019782B2 (en)2012-06-122012-06-12 Image processing apparatus, image processing method, image processing program, and recording medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
JP2012132712AJP6019782B2 (en)2012-06-122012-06-12 Image processing apparatus, image processing method, image processing program, and recording medium

Publications (2)

Publication NumberPublication Date
JP2013258526A JP2013258526A (en)2013-12-26
JP6019782B2true JP6019782B2 (en)2016-11-02

Family

ID=49954626

Family Applications (1)

Application NumberTitlePriority DateFiling Date
JP2012132712AActiveJP6019782B2 (en)2012-06-122012-06-12 Image processing apparatus, image processing method, image processing program, and recording medium

Country Status (1)

CountryLink
JP (1)JP6019782B2 (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JPH07220066A (en)*1994-01-281995-08-18Matsushita Electric Ind Co Ltd Image processing device
JP3666900B2 (en)*1994-04-252005-06-29キヤノン株式会社 Imaging apparatus and imaging method
JP3218022B2 (en)*1999-04-012001-10-15松下電器産業株式会社 Gradation correction device and gradation correction method for imaging device
JP3902894B2 (en)*1999-10-152007-04-11理想科学工業株式会社 Image processing apparatus and image processing method
JP5024112B2 (en)*2008-02-262012-09-12株式会社Jvcケンウッド Image signal processing apparatus and image signal processing program
EP2124190B1 (en)*2008-05-192011-08-31Mitsubishi Electric Information Technology Centre Europe B.V.Image processing to enhance image sharpness
JP5493717B2 (en)*2009-10-302014-05-14大日本印刷株式会社 Image processing apparatus, image processing method, and image processing program

Also Published As

Publication numberPublication date
JP2013258526A (en)2013-12-26

Similar Documents

PublicationPublication DateTitle
CN110930301B (en)Image processing method, device, storage medium and electronic equipment
US10515437B2 (en)Image processing apparatus and image processing method that perform noise reduction processing on image data
US8576295B2 (en)Image processing apparatus and image processing method
US10255665B2 (en)Image processing device and method, image capturing device, program, and record medium
US8170362B2 (en)Edge-enhancement device and edge-enhancement method
JP5493717B2 (en) Image processing apparatus, image processing method, and image processing program
CN106485720A (en)Image processing method and device
CN114240767A (en)Image wide dynamic range processing method and device based on exposure fusion
CN114418873B (en)Dark light image noise reduction method and device
CN111223061A (en) Image correction method, correction device, terminal device, and readable storage medium
CN110889809A (en)Image processing method and device, electronic device and storage medium
WO2012008116A1 (en)Image processing apparatus, image processing method, and program
JP6957665B2 (en) Image processing equipment, image processing methods and programs
JP5966603B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium
CN107404600B (en) Image processing device and method
US10764632B2 (en)Video signal processing apparatus, video signal processing method, and program
CN113438386A (en)Dynamic and static judgment method and device applied to video processing
TWI840207B (en)Image enhancement method and electronic device
JP6019782B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium
JP2024036374A (en) Information processing device, information processing method, and program
JP2018201137A (en)Image composition device, image composition method, and image processing system, and program and recording medium
JP4369030B2 (en) Image correction method and apparatus, and computer-readable recording medium storing image correction program
JP2001292325A (en) Edge enhancement device, edge enhancement method, and recording medium
JP5863236B2 (en) Image processing apparatus and image processing method
JP2022112995A (en) Image processing method

Legal Events

DateCodeTitleDescription
A621Written request for application examination

Free format text:JAPANESE INTERMEDIATE CODE: A621

Effective date:20150514

A977Report on retrieval

Free format text:JAPANESE INTERMEDIATE CODE: A971007

Effective date:20151228

A131Notification of reasons for refusal

Free format text:JAPANESE INTERMEDIATE CODE: A131

Effective date:20160119

A521Request for written amendment filed

Free format text:JAPANESE INTERMEDIATE CODE: A523

Effective date:20160318

TRDDDecision of grant or rejection written
A01Written decision to grant a patent or to grant a registration (utility model)

Free format text:JAPANESE INTERMEDIATE CODE: A01

Effective date:20160906

A61First payment of annual fees (during grant procedure)

Free format text:JAPANESE INTERMEDIATE CODE: A61

Effective date:20160919

R150Certificate of patent or registration of utility model

Ref document number:6019782

Country of ref document:JP

Free format text:JAPANESE INTERMEDIATE CODE: R150


[8]ページ先頭

©2009-2025 Movatter.jp