JP2023084092A - Image processing device, image processing method, generation method, and program - Google Patents
Image processing device, image processing method, generation method, and program Download PDFInfo
- Publication number
- JP2023084092A JP2023084092A JP2022161834A JP2022161834A JP2023084092A JP 2023084092 A JP2023084092 A JP 2023084092A JP 2022161834 A JP2022161834 A JP 2022161834A JP 2022161834 A JP2022161834 A JP 2022161834A JP 2023084092 A JP2023084092 A JP 2023084092A
- Authority
- JP
- Japan
- Prior art keywords
- image
- gradation
- image data
- image processing
- neural network
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012545 processing Methods 0.000 title claims abstract description 349
- 238000000034 method Methods 0.000 title claims description 54
- 238000003672 processing method Methods 0.000 title claims description 5
- 238000013528 artificial neural network Methods 0.000 claims abstract description 143
- 230000006835 compression Effects 0.000 claims abstract description 46
- 238000007906 compression Methods 0.000 claims abstract description 46
- 238000012549 training Methods 0.000 claims description 48
- 230000006870 function Effects 0.000 claims description 24
- 230000006837 decompression Effects 0.000 claims description 8
- 230000002194 synthesizing effect Effects 0.000 claims description 5
- 230000007423 decrease Effects 0.000 claims description 3
- 230000000593 degrading effect Effects 0.000 abstract 1
- 238000012937 correction Methods 0.000 description 70
- 238000003384 imaging method Methods 0.000 description 58
- 230000008569 process Effects 0.000 description 39
- 238000010606 normalization Methods 0.000 description 11
- 238000004364 calculation method Methods 0.000 description 10
- 230000003287 optical effect Effects 0.000 description 10
- 238000013527 convolutional neural network Methods 0.000 description 9
- 230000009467 reduction Effects 0.000 description 8
- FTGYKWAHGPIJIT-UHFFFAOYSA-N hydron;1-[2-[(2-hydroxy-3-phenoxypropyl)-methylamino]ethyl-methylamino]-3-phenoxypropan-2-ol;dichloride Chemical compound Cl.Cl.C=1C=CC=CC=1OCC(O)CN(C)CCN(C)CC(O)COC1=CC=CC=C1 FTGYKWAHGPIJIT-UHFFFAOYSA-N 0.000 description 7
- 238000002156 mixing Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000035945 sensitivity Effects 0.000 description 6
- 230000008859 change Effects 0.000 description 5
- 210000002569 neuron Anatomy 0.000 description 5
- 239000011159 matrix material Substances 0.000 description 4
- 102100030148 Integrator complex subunit 8 Human genes 0.000 description 3
- 101710092891 Integrator complex subunit 8 Proteins 0.000 description 3
- 238000004590 computer program Methods 0.000 description 3
- 238000000605 extraction Methods 0.000 description 3
- 238000004088 simulation Methods 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- 230000004913 activation Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 241000283070 Equus zebra Species 0.000 description 1
- 101710092887 Integrator complex subunit 4 Proteins 0.000 description 1
- 102100037075 Proto-oncogene Wnt-3 Human genes 0.000 description 1
- 238000012952 Resampling Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005401 electroluminescence Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- ORQBXQOJMQIAOY-UHFFFAOYSA-N nobelium Chemical compound [No] ORQBXQOJMQIAOY-UHFFFAOYSA-N 0.000 description 1
- 230000005693 optoelectronics Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 239000010409 thin film Substances 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Studio Devices (AREA)
Abstract
Description
本発明は、画像処理装置、画像処理方法、生成方法及びプログラムに関する。 The present invention relates to an image processing device, an image processing method, a generation method and a program.
従来、中間層に複数の層を有するニューラルネットワーク(ディープニューラルネットワーク)を用いた画像処理技術が知られている。撮像装置(例えばカメラ)で撮影した画像には撮影時の撮像装置の設定や撮影状況に応じてノイズが発生することがあるため、撮影画像をディープニューラルネットワークに入力して、撮影画像のノイズを除去することができる。特許文献1は、ニューラルネットワークによって圧縮ノイズの除去やアップサンプリング等の処理を施した画像を出力する技術を開示している。 Conventionally, an image processing technique using a neural network (deep neural network) having a plurality of intermediate layers is known. Images taken with an imaging device (such as a camera) may contain noise depending on the settings of the imaging device at the time of shooting and the shooting conditions. can be removed. Japanese Patent Application Laid-Open No. 2002-200001 discloses a technique for outputting an image that has undergone processing such as compression noise removal and upsampling using a neural network.
ところで、一般に、畳み込みニューラルネットワーク(CNN)などのニューラルネットワークを用いる処理の演算量は多大であるため、その演算量を低減するためにネットワークの内部の演算精度を制限(例えばINT8に)することが考えられる。 By the way, in general, processing using a neural network such as a convolutional neural network (CNN) requires a large amount of computation. Conceivable.
特許文献1で提案される技術では、例えば、画素値が8ビットより大きいビット数で表される画像を撮像センサが出力する場合に、CNNでINT8の精度で処理を行うことは考慮されていない。すなわち、特許文献1で提案される技術において、処理対象の画像よりも小さいビット数で画素値を表現するCNNが上記画像を処理すると、画素値のビット数が削減されて階調が失われるという課題がある。
In the technology proposed in
本発明は、上記課題に鑑みてなされ、その目的は、対応するビット数が限られたニューラルネットワークであっても、適切な処理を行えるようにすることである。 SUMMARY OF THE INVENTION The present invention has been made in view of the above problem, and an object of the present invention is to enable appropriate processing even in a neural network with a limited number of corresponding bits.
この課題を解決するため、例えば本発明の画像処理装置は以下の構成を備える。すなわち、第1の画像データの階調を圧縮する階調圧縮手段と、前記階調圧縮手段によって階調が圧縮された画像データに対して、所定の画像処理を行うニューラルネットワークを適用することにより、前記所定の画像処理が行われた画像データを出力する処理手段と、前記所定の画像処理が行われた画像データの階調を伸長する階調伸長手段と、を有し、前記ニューラルネットワークの内部で画素値を表すビット数が前記第1の画像データの画素値を表すビット数よりも小さく、前記階調圧縮手段は、明るさが低いほど多くの階調が割り当てられる特性を用いて階調を圧縮する、とを有することを特徴とする。 In order to solve this problem, for example, the image processing apparatus of the present invention has the following configuration. That is, by applying a gradation compression means for compressing the gradation of the first image data and a neural network for performing predetermined image processing on the image data whose gradation is compressed by the gradation compression means, , processing means for outputting the image data on which the predetermined image processing has been performed, and gradation decompression means for decompressing the gradation of the image data on which the predetermined image processing has been performed; The number of bits representing the pixel value inside is smaller than the number of bits representing the pixel value of the first image data, and the gradation compression means uses the characteristic that the lower the brightness, the more gradation is assigned. and compressing the tone.
本発明によれば、対応するビット数が限られたニューラルネットワークであっても、適切な処理を行うことが可能になる。 According to the present invention, even a neural network with a limited number of corresponding bits can perform appropriate processing.
以下、添付図面を参照して実施形態を詳しく説明する。なお、以下の実施形態は特許請求の範囲に係る発明を限定するものではない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. In addition, the following embodiments do not limit the invention according to the scope of claims. Although multiple features are described in the embodiments, not all of these multiple features are essential to the invention, and multiple features may be combined arbitrarily. Furthermore, in the accompanying drawings, the same or similar configurations are denoted by the same reference numerals, and redundant description is omitted.
<撮像装置の構成例>
まず、図1を参照して、後述する推論処理を実行する撮像装置の機能構成例について説明する。以下の説明では、例えばデジタルカメラである撮像装置が推論処理を実行する場合を例に説明する。しかし、入力画像を取得して推論処理を実行することができれば、撮像手段を含まない画像処理装置が本実施形態を実施することもできる。撮像装置或いは画像処理装置は、推論処理を実行可能な電子機器であれば、デジタルカメラ以外の電子機器であってよい。なお、以下の実施形態において、「第1の」、「第2の」と付するものは、理解を容易にするために付すものであり、必ずしも特許請求の範囲において付される場合の「第1の」、「第2の」ものと同一のものを指すものではない。
<Configuration example of imaging device>
First, with reference to FIG. 1, an example of the functional configuration of an imaging device that executes inference processing, which will be described later, will be described. In the following description, a case in which an imaging device such as a digital camera executes inference processing will be described as an example. However, as long as an input image can be acquired and an inference process can be executed, an image processing apparatus that does not include an imaging means can implement this embodiment. The imaging device or image processing device may be an electronic device other than a digital camera as long as it is an electronic device capable of executing inference processing. In the following embodiments, the terms "first" and "second" are used to facilitate understanding, and are not necessarily used in the scope of claims. The terms "first" and "second" do not refer to the same thing.
撮像装置100は、例えば、プロセッサ106、ROM105、RAM107、画像処理部104、光学レンズ101、撮像素子102、フレームメモリ103、映像出力駆動部108、表示駆動部110、メタデータ抽出部112を含む。これらの各部は、内部バス113に接続されている。内部バス113に接続される各部は、内部バス113を介して互いにデータのやりとりを行うことができる。
The
光学レンズ101は、レンズや、レンズを駆動させるためのモータを含む。光学レンズ101は、制御信号に基づいて動作し、光学的に映像の拡大や縮小を行ったり、焦点距離などの調整を行うことができる。また、入射光量を調整したい場合、絞りの開口面積を制御することで、所望の明るさとなるように光量を調整することができる。レンズを透過した光は、撮像素子102で結像される。
The
撮像素子102は、CCDセンサやCMOSセンサなどが用いられ、光学的な信号を電気的な信号に変換する役割を果たす。撮像素子102は、制御信号に基づいて駆動され、画素内の電荷をリセットしたり、読み出しのタイミングを制御したりする。撮像素子102は、電気的なアナログ信号(電圧値)として読み出された画素信号にゲイン処理を行ったり、アナログ信号をデジタル信号に変換する機能を有するが、ゲイン処理やデジタル信号への変換は撮像素子102の外部で行われてもよい。
A CCD sensor, a CMOS sensor, or the like is used as the
画像処理部104は、撮像素子102より出力された画像に対して、様々な画像処理を行う。画像処理部104は、例えば、光学レンズ101の特性により発生した画像周辺部の光量を補正したり、撮像素子102の画素ごとの感度ばらつきを補正したり、色に関する補正や、フリッカ補正などを行うことができる。また、画像処理部104は、ニューラルネットワークを用いたノイズ低減処理を行う機能を有する。ノイズ低減処理の詳細については後述する。なお、画像処理部104は、プロセッサ106或いは不図示のGPUなどの他のプロセッサがプログラムを実行することにより実現されてよい。
The
フレームメモリ103は、揮発性の記憶媒体を含む。フレームメモリ103は、例えば、RAM(Random Access Memory)と呼ばれ、映像信号を一時的に記憶させておき、必要な時に読み出すことが可能な素子である。映像信号は膨大なデータ量であるため、高速かつ高容量のものが求められる。近年では、例えば、DDR4-SDRAM(Dual Data Rate 4 - Synchronous Dynamic RAM)などが用いられる。このフレームメモリ103を使えば、様々な処理が可能となる。フレームメモリ103は、例えば、時間的に異なる画を合成したり、必要な領域だけを切り出すなど、画像処理を行う上で有用である。
プロセッサ106は、1つ以上のプロセッサで構成されてよく、プロセッサは、例えば、CPU(Central Processing Unit)を含む。プロセッサ106は、CPUのほか、GPU(Graphics Processing Unit)や機械学習などの特定の演算を高速に処理するための特定用途用のプロセッサを含んでもよい。プロセッサ106は、撮像装置100の各機能を制御するための制御部として機能する。プロセッサ106には、ROM(Read Only Memory)やRAMが接続されている。ROM105は、不揮発性の記憶媒体であり、プロセッサ106を動作させるためのプログラムや、各種調整パラメータなどが記憶されている。また、ROM105は、推論処理を実行するための学習済みのモデルの情報、例えばディープニューラルネットワーク(単にニューラルネットワークともいう)の学習済みの重みパラメータやハイパーパラメータを含んでよい。ROM105から読み出されたプログラムは揮発性のRAM107に展開されて実行される。RAM107は、フレームメモリ103に比べて、低速、低容量のものが使用されてもよい。ニューラルネットワークは、例えば、入力画像のノイズを低減した画像を出力するように構成されるが、これに限らず、入力画像に対して何等かの所定の画像処理を施してその結果画像を出力するように構成されてよい。
The
メタデータ抽出部112は、例えば、レンズ駆動条件およびセンサ駆動条件等のメタデータ情報を抽出する。画像処理部104により生成された画像は映像出力駆動部108、および、映像端子109を介して撮像装置100の外部へ出力される。画像を外部へ出力するインタフェースは、外部モニタなどにリアルタイムな映像を表示可能にする。インタフェースは、例えば、SDI(Serial Digital Interface)、HDMI(登録商標)(High Definition Multimedia Interface)、他にもDisplayPort(登録商標)など様々なインタフェースであってよい。画像処理部104により生成された画像は表示駆動部110、および、表示部111を介して表示デバイスに表示される。
The
表示部111は、ユーザが表示内容を視認することができる表示デバイスである。表示部111は、例えば、画像処理部104で処理された映像や設定メニューなどを表示可能であり、ユーザは撮像装置100の動作状況を確認することができる。表示部111は、例えば、表示デバイスとしてLCD(Liquid Crystal Display)や有機EL(Electroluminescence)といった、小型で低消費電力のデバイスを利用可能である。また、表示部111は、タッチパネルと呼ばれる抵抗膜式や静電容量式の薄膜素子などが兼備される場合もある。プロセッサ106は、撮像装置100の設定状態などをユーザに知らせるための文字列や、撮像装置100の設定をするためのメニューを生成し、画像処理部104で処理された映像に重畳して、表示部111に表示する。文字情報の他にも、ヒストグラム、ベクトルスコープ、波形モニタ、ゼブラ、ピーキング、フォルスカラーなどのような撮影アシスト表示が重畳されてもよい。
The
<画像処理システムの概要>
次に、本実施形態の画像処理システムについて、図2を参照して説明する。画像処理システムでは、後述する学習処理を実行可能なシステムである。画像処理システムは、撮像装置200、画像処理装置210、表示装置220、ストレージ装置230から構成されるシステムである。撮像装置200の光学レンズ201及び撮像素子202の構成は、撮像装置100の光学レンズ101及び撮像素子102と実質的に同一の構成である。また、画像処理装置210のフレームメモリ203、画像処理部204、ROM205、プロセッサ206、RAM207はそれぞれ、フレームメモリ103、画像処理部104、ROM105、プロセッサ106、RAM107と実質的に同一の構成である。また、画像処理装置210のメタデータ抽出部208、内部バス218は、それぞれ、撮像装置100のメタデータ抽出部208、内部バス113と実質的に同一の構成である。このため、撮像装置100の構成と実質的に同一である構成についての詳細な説明は省略する。
<Overview of image processing system>
Next, the image processing system of this embodiment will be described with reference to FIG. The image processing system is a system capable of executing learning processing, which will be described later. The image processing system is a system composed of an
撮像装置200におけるカメラ制御部209は、画像処理装置210のカメラ通信接続部212から出力された通信信号に基づいて、光学レンズ201および撮像素子202の駆動制御を行う。
A
画像処理装置210の画像信号受信部211は、撮像装置200の撮像素子202から出力された画像信号を受信する受信部である。GPU213は、1つ以上のGPUを含み、画像処理部104或いはプロセッサ106の指示に応じてニューラルネットワークの学習処理を実行可能である。学習処理を実行する際には膨大な計算が必要とされるため、本実施形態では、CPUよりも画像処理に関して処理能力の高いGPUを用いている。GPU213は、また、表示装置220に表示させるための画像を生成するために使用されてもよい。その際、GPU213からの制御により生成された画像は、表示駆動部216と表示装置接続部217を介して、表示装置220に表示される。
An image
ストレージ装置230は、膨大な画像データを訓練画像として記憶させるために用いることができる。また、ストレージ装置230は、学習処理によって更新されたネットワークパラメータ(ニューラルネットワークの重みパラメータ等)やハイパーパラメータ等を記憶してもよい。画像処理装置210は、システムが有するストレージ駆動部214とストレージ接続部215を介して、ストレージ装置230とデータのやり取りを行う。
なお、本実施形態では、学習処理の動作時には図2に示した画像処理システムを使用し、推論処理の動作時には図1に示した撮像装置100を使用する場合を例に説明する。しかし、このような使用に限定されず、例えば図2に示した画像処理システムにおいて推論処理を実行してもよい。また、本実施形態では、一例として、訓練画像がベイヤー配列の画像であることを前提としている。しかし、三板式の撮像センサを用いて撮影された画像を使用しても良いし、FOVEONセンサのように垂直色分離方式の撮像センサなどで撮影された画像を使用してもよい。また、ベイヤー配列にとどまらず、その他の配列(ハニカム構造、X-Trans CMOSセンサのフィルタ配列など)に関しても同様である。ベイヤー配列の画像の場合、ベイヤー配列の1chのままとしても良いし、カラーチャネルごとに分離し、訓練画像としてもよい。さらに、本実施形態において、ニューラルネットワークに入力する訓練画像やニューラルネットワークから出力される画像が1枚である場合を例に説明するが、複数枚の画像を入力したり出力したりするニューラルネットワークを用いてもよい。
In this embodiment, an example will be described in which the image processing system shown in FIG. 2 is used during learning processing, and the
(実施形態1)
<撮像装置における推論処理の動作>
次に、図3及び図4を参照して、撮像装置100における推論処理の動作について説明する。なお、図3に示す一連の動作は、例えばプロセッサ106がROM105に記憶されたプログラムを実行することにより、撮像装置100の各部を制御して実現される。また、画像処理部104による動作は、プロセッサ106、或いは不図示のGPUなどの他のプロセッサが、ROM105に記憶されたプログラムを実行することにより実現されてよい。
(Embodiment 1)
<Operation of Inference Processing in Imaging Apparatus>
Next, operation of the inference processing in the
ステップS3001で、プロセッサ106は、ROM105に記録されているニューラルネットワークのパラメータ(ネットワークパラメータ)を、画像処理部104にあるニューラルネットワークに設定する。後述するように、ネットワークパラメータは、例えば、ニューラルネットワークを構成する重みやバイアスなどである。ステップS3001で設定するネットワークパラメータは、例えば、図2に示した画像処理システムの学習処理により予め算出されている。
In step S<b>3001 , the
ステップS3002で、撮像素子102は、第1の画像を取得し、取得した画像を画像処理部104に出力する。ステップS3003で、画像処理部104は第1の画像に対して補正処理を行う。ここでの補正処理は、光学レンズ101や撮像素子102のばらつきを低減するための補正処理などであり、例えば、周辺光量の補正や画素ごとの感度ばらつきの補正などである。ただし、補正処理をする必要のない場合はこのステップを行わなくてもよい。
In step S<b>3002 , the
ステップS3004で、画像処理部104は、補正処理が施された画像に、デジタルゲインをかける。なお、デジタルゲインの処理では、画像処理部104は、画素値がオフセットを持っている場合には、画素値から当該オフセットを引いてからゲインをかけ、その後、ゲインをかけた画素値にオフセットを足す。
In step S3004, the
ステップS3005で、画像処理部104は、ステップS3004でデジタルゲインをかけた画像の各画素値からオフセットを引いた第2の画像を生成する。ここでのオフセットは撮像素子102で加算された黒レベルのことである。ステップS3006で、画像処理部104は、第2の画像の各画素値を正規化した第3の画像を生成する。なお、本実施形態では、ステップS3002で撮像素子102から取得した第1の画像の各画素値は14ビットであり、ステップS3004で生成される第2の画像まで、各画素値は、14ビットのビット数のデータで表される。ここでの正規化は14ビットの各画素値を0から1の範囲に正規化するために各画素値を2の14乗で除算し、計算結果は小数点以下を含んだfloat32などの形式で取り扱う。
In step S3005, the
ステップS3007で、画像処理部104は、第3の画像の各画素値にガンマ補正をかけた第4の画像を生成する。ここでのガンマ補正は、以下の式(1)に従って適用される。例えば、本実施形態におけるガンマ補正は、明るさが低いほど多くの階調が割り当てられる特性を有する。
ステップS3008で、画像処理部104は、第4の画像の各画素値が8ビットになるように正規化を解除した第5の画像を生成する。ここでの正規化解除では、画像処理部104は、8ビットへ正規化解除するために各画素値に2の8乗を乗算する。計算結果はINT8などの形式で取り扱われる。すなわち、第5の画像の画素値は、8ビットのビット数で表される。
In step S3008, the
ここで、図4は、横軸をガンマ補正前の画素値の値、縦軸をガンマ補正後の画素値とするガンマ補正の特性を示している。式(1)においてγが1以上の場合、第4の画像の各画素値は図4に示すガンマカーブを描く。すなわち、このようなガンマ補正により、ガンマ補正前の低輝度域の画素値に多くの値が割り当てられたガンマ補正結果を得ることができるため、ステップS3008で8ビットへ正規化解除された際に下位ビットの階調を維持することが可能となる。 Here, FIG. 4 shows gamma correction characteristics with the horizontal axis representing pixel values before gamma correction and the vertical axis representing pixel values after gamma correction. When γ is 1 or more in Equation (1), each pixel value of the fourth image draws a gamma curve shown in FIG. That is, with such gamma correction, it is possible to obtain a gamma correction result in which many values are assigned to the pixel values in the low-luminance region before gamma correction. It becomes possible to maintain the gradation of the lower bits.
ステップS3009で、画像処理部104は、第5の画像をニューラルネットワークに入力する。ここでのニューラルネットワークは、ステップS3007でガンマ補正された画像に対して最適にノイズ除去を行うように学習された、学習済みのニューラルネットワークである。
In step S3009, the
ステップS3010で、画像処理部104は、ニューラルネットワークから出力される第6の画像の各画素値を正規化した第7の画像を生成する。ここでの正規化では、画像処理部104は、8ビットの各画素値を0から1の範囲に正規化するために各画素値を2の8乗で除算する。計算結果は小数点以下を含んだfloat32などの形式で取り扱われる。
In step S3010, the
ステップS3011で、画像処理部104は、第7の画像の各画素値にデガンマ補正をかけた第8の画像を生成する。ここでのデガンマ補正は、例えば、以下の式(2)に従って適用される。
ステップS3012で、画像処理部104は、第8の画像の各画素値を14ビットで正規化を解除した第9の画像を生成する。ここでの正規化解除では、画像処理部104は、14ビットへ正規化解除するために各画素値に2の14乗を乗算する。計算結果は14ビットの形式で取り扱われる。なお、本実施形態では、14ビットへ正規化を解除する場合を例に説明するが、撮像装置100からの映像出力規格やビット数に応じて14ビット以外へ正規化を解除してもよい。
In step S3012, the
ステップS3013で、画像処理部104は、第9の画像の各画素値にオフセットを足した第10画像を生成する。なお、本実施形態では、階調圧縮としてのガンマ補正と階調伸長としてのデガンマ補正とをそれぞれ用いる場合を例に説明したが、他の方法を用いてもよい。また、本実施形態では、ニューラルネットワークへ入力する前にデジタルゲインをかける場合を例に説明した。しかし、ニューラルネットワークを通した後にデジタルゲインをかけるようにしてもよい。この場合、各ニューラルネットワークはデジタルゲインをかける前の画像で最適に学習されたものを用いる。
In step S3013, the
<画像処理システムにおける学習処理の動作>
次に、図10及び図11を参照して、画像処理システム(撮像装置200、画像処理装置210、表示装置220、ストレージ装置230)における学習処理の動作について説明する。なお、図10に示す学習処理の動作は、画像処理装置210のプロセッサ206が、ROM205に記憶されたプログラムをRAM207に展開、実行し、画像処理装置210の各部(画像処理部204やGPU213等)を制御して実現される。また、画像処理部204による動作は、GPU213がROM205に記憶されたプログラムを実行することにより実現されてよい。
<Operation of learning processing in image processing system>
Next, with reference to FIGS. 10 and 11, operation of learning processing in the image processing system (
ステップS9001で、プロセッサ206は、ストレージ装置230から、訓練画像(ノイズ画像)と正解画像(教師画像)とを取得する。ここで、訓練画像とはノイズを含んだ画像である。正解画像とは、訓練画像と同一の被写体が写っており、且つノイズの無い(又は非常に少ない)画像である。訓練画像は、例えば、ノイズの影響が少ない正解画像に対して、シミュレーションでノイズを付与することで生成することができる。また、正解画像と同一の被写体を実際にノイズが発生しうる状況(例えば、高感度設定)で撮影した画像を用いても良い。この場合、例えば、訓練画像は低感度で撮影された画像であり、正解画像は高感度で撮影された画像、又は低照度で撮影された画像に感度補正を行って、正解画像と同程度の明るさになるよう補正された画像である。学習処理の動作において含まれていないノイズパターンや被写体の構造(エッジなど)は、後の推論処理の動作で精度よく推論することができない。そのため、様々なノイズパターンや被写体の構造が含まれるように生成された、複数の訓練画像と正解画像が準備されている。なお、ノイズ量は単一でも良いし、複数のノイズ量を混ぜても良い。
In step S<b>9001 , the
ステップS9002で、プロセッサ206は、ステップS9001で取得された訓練画像と正解画像を信号の上限値(飽和輝度値)で除算することで正規化し、上述の式(1)に従って各画素に対してガンマ補正をかける。ステップS9003で、プロセッサ206は、ステップS9002でガンマ補正された複数の訓練画像のうちの少なくとも一つを選択し、選択した訓練画像を画像処理部204のニューラルネットワークへ入力して、出力画像を生成する。このとき、学習処理の動作で用いる訓練画像のノイズ量は、他の訓練画像と同一でも良いし、変更されていても良い。
At step S9002, the
図11を参照して、ニューラルネットワークで行われる処理について説明する。図11は、ニューラルネットワークによる処理を模式的に示している。図11に示す例では、畳み込みニューラルネットワーク(CNN)を例に説明しているが、本実施形態はCNNに限定されるものではない。画像を出力するニューラルネットワークとして、GAN(Generative Adversarial Network)を用いても良い。或いは、ニューラルネットワークが、スキップコネクションなどを有しても良いし、RNN(Recurrent Neural Network)などのように再帰型のニューラルネットワークであっても良い。 Processing performed by the neural network will be described with reference to FIG. FIG. 11 schematically shows processing by a neural network. In the example shown in FIG. 11, a convolutional neural network (CNN) is described as an example, but this embodiment is not limited to CNN. A GAN (Generative Adversarial Network) may be used as a neural network that outputs an image. Alternatively, the neural network may have a skip connection or the like, or may be a recursive neural network such as an RNN (Recurrent Neural Network).
図11に示す入力画像1001は、ニューラルネットワークに入力する画像又は後述の特徴マップを表す。演算記号1002は、畳み込み演算を表す。畳み込み行列1003は、入力画像1001に対して畳み込み演算を行うフィルタである。バイアス1004は、入力画像1001と畳み込み行列1003との畳み込み演算によって出力された結果に加算する。特徴マップ1005は、バイアス1004を加算した畳み込み演算結果である。なお、図11では、簡単のために各ニューロンや中間層、チャネル数を少なく描いているが、ニューロンや層の数、またニューロン間の結合の数や重みなど、これに限定されるものではない。また、FPGAなどに実装する際に、ニューロン間の結合や重みを削減しても良い。本実施形態では、複数のカラーチャネルをまとめて学習処理の動作及び推論処理の動作を実行しているが、各色ごとに個別に学習処理の動作及び推論処理の動作を実行しても良い。
An
CNNにおいて、入力画像をあるフィルタによって畳み込み演算を実行することで入力画像の特徴マップを得る。なお、フィルタの大きさは任意である。次の層では、前層の特徴マップを別のフィルタによる畳み込み演算を実行することで異なる特徴マップを得る。各層において、ある入力信号を、接続の強さを表すフィルタの重みと掛け合わせ、バイアスとの和を取る。この結果に活性化関数を適用することによって、各ニューロンにおける出力信号を得る。なお、各層における重みとバイアスをネットワークパラメータと呼び、その値を学習処理の動作によって更新する。一般に用いられる活性化関数の例としては、シグモイド関数やReLU関数などがあり、本実施形態においては、以下の式(3)に従うLeaky ReLU関数が用いられるが、これに限定するものではない。
CNNは、畳み込み演算を繰り返し実行するための複数の層を有し、その後に、例えば1層以上の全結合層を有してもよく、当該全結合層の後に出力層が接続されてよい。 A CNN may have multiple layers for repeatedly performing convolution operations, followed by, for example, one or more fully connected layers, to which an output layer may be connected.
ステップS9004において、画像処理部204は、ニューラルネットワークの出力画像と正解画像とにそれぞれ画像処理を行う。推論処理の動作で行う画像処理と、学習処理の動作で行う画像処理の条件を合わせることで、推論時のノイズ低減処理の推論精度を向上させることができる。なお、画像処理を行うタイミングは、ステップS9004及びステップS9005の前であれば、いつ実行しても良い。例えば、ニューラルネットワークの入力側で実行しても良い。学習処理の動作で用いる訓練画像のノイズ量を複数パターン適用した場合、推論時に学習外のノイズ量を持つ撮像画像が入力されても、効果的にノイズ除去を行うことが可能である。訓練画像の枚数が十分でない場合は、切り取りや回転、反転などの水増し処理を行っても良い。その場合は、正解画像も同一の処理を施す必要がある。
In step S9004, the
ステップS9005では、画像処理部204は、ステップS9004で画像処理された出力画像と正解画像との誤差を算出する。正解画像も訓練画像と同様の並びの色成分の配列となっている。誤差の算出には、一般に各画素の平均二乗誤差や、各画素の差分の絶対値の総和が用いられるが、他の指標で算出しても良い。ステップS9006で、画像処理部204は、ステップS9005で算出した誤差が小さくなるように誤差逆伝播法を用いてニュートラルネットワークの各パラメータを更新する。ただし、本実施形態はこれに限定されるものではない。各パラメータの更新量は、固定でも良いし、変動させても良い。
In step S9005, the
次に、ステップS9007において、プロセッサ206は、所定の終了条件を満たしたかどうかを判定し、条件を満たさない場合、ステップS9001に戻り、新たに学習を進める。一方、所定の終了条件を満たす場合、ステップS9008に進む。所定の終了条件とは、学習回数が規定値に達した場合でも良いし、上記誤差がある所定の値以下になった場合でも良い。又は、上記誤差の減少がほとんどなくなった場合や、ユーザの判断で終了しても良い。次に、ステップS9008において、プロセッサ206は、学習によって更新されたネットワークパラメータやニューラルネットワークの構造などに関する情報を、ストレージ装置230に記憶させる。ストレージ装置230は、出力されたネットワークパラメータを保存するために用いても良い。本実施形態においてはストレージ装置に記憶させる前提で説明しているが、その他の記憶媒体であっても良い。
Next, in step S9007, the
ステップS9009では、プロセッサ206は、FP32で学習されたニューラルネットワークのパラメータをINT8にするための量子化を行う。データのビット幅やデータ型はこれに限らず、FP16のパラメータを用いてもよいし、INT4に量子化を行ってもよい。ステップS9010で、プロセッサ206は、量子化したネットワークパラメータをパラメータ保存領域に記憶する。プロセッサ206は、以上の動作で学習処理の動作を終了する。本学習処理により、学習済みのニューラルネットワークを得ることができる。
In step S9009, the
なお、ノイズ低減以外の処理に関しても、同様にシミュレーションで訓練画像と正解画像のペアを用意することで、学習処理の動作を実行することができる。例えば、超解像においては、正解画像をダウンサンプリングすることで訓練画像を用意することができる。このとき、正解画像と訓練画像はサイズ合わせを行っても良いし、行わなくても良い。また、ボケ除去やブレ除去(デブラー)であれば、正解画像にボケ関数を適用することで訓練画像を用意することができる。ホワイトバランス補正であれば、ホワイトバランスを適切に撮った正解画像に対し、適切に合わせていない、又は補正していない画像を訓練画像とすれば良い。カラーマトリクス補正などの色補正も同様である。欠損補間であれば、正解画像を欠損させることで訓練画像が得られる。デモザイキングであれば、三板式の撮像素子などを用いて正解画像を用意し、正解画像をベイヤー配列などで再サンプリングすることで訓練画像を用意しても良い。更に、色成分の推論では、正解画像に対して色成分を減らすことで訓練画像が用意できる。ディヘイズに関しては、霞などが無い正解画像に対して、物理現象のシミュレーションによる散乱光を付与することで、訓練画像を用意することができる。なお、動画などの複数フレームが連続する場合においては、所望のフレーム数を奥行き方向にまとめてニューラルネットワークに入力すると、より効果的にノイズの除去が可能である。 As for processing other than noise reduction, learning processing operations can be executed by similarly preparing a pair of a training image and a correct image in a simulation. For example, in super-resolution, training images can be prepared by downsampling correct images. At this time, the correct image and the training image may or may not be matched in size. In the case of deblurring or deblurring, a training image can be prepared by applying a blurring function to a correct image. In the case of white balance correction, an image that has not been properly adjusted or corrected may be used as a training image with respect to a correct image that has been photographed with an appropriate white balance. The same applies to color correction such as color matrix correction. With loss interpolation, a training image can be obtained by missing a correct image. In the case of demosaicing, correct images may be prepared using a three-chip imaging device or the like, and training images may be prepared by re-sampling the correct images using a Bayer array or the like. Furthermore, in inference of color components, a training image can be prepared by reducing the color components with respect to the correct image. As for dehaze, a training image can be prepared by adding scattered light obtained by simulating a physical phenomenon to a correct image without haze or the like. In addition, in the case where a plurality of frames such as a moving image continue, noise can be removed more effectively by collectively inputting a desired number of frames in the depth direction to the neural network.
以上説明したように本実施形態では、ニューラルネットワークの内部で画素値を表すビット数が、処理対象の画像データの画素値を表すビット数よりも小さい構成において、まず、当該画像データの階調を圧縮する。具体的には、画像データの階調を、明るさが低いほど多くの階調が割り当てられるように階調を圧縮する。そのうえで、階調が圧縮された画像データに対して、所定の画像処理を実施するニューラルネットワークを適用することにより出力画像を生成し、ニューラルネットワークから出力された画像データに階調を伸長する処理を実施する。このようにすることで、対応するビット数が限られたニューラルネットワークであっても、適切な処理を行うことが可能になる。換言すれば、画像の階調低下を抑制しながら、より演算負荷の少ないニューラルネットワークを用いることが可能になる。 As described above, in this embodiment, in a configuration in which the number of bits representing pixel values inside the neural network is smaller than the number of bits representing pixel values of image data to be processed, first, the gradation of the image data is adjusted. Compress. Specifically, the gradation of the image data is compressed so that the lower the brightness, the more gradation is assigned. Then, a neural network that performs predetermined image processing is applied to the image data whose gradation is compressed to generate an output image, and the image data output from the neural network is processed to expand the gradation. implement. By doing so, even a neural network with a limited number of corresponding bits can perform appropriate processing. In other words, it is possible to use a neural network with a smaller computational load while suppressing a decrease in image gradation.
(実施形態2)
次に、実施形態2について説明する。実施形態1では、階調圧縮のために予め特性の定められたガンマ補正を適用したが、実施形態2では、処理対象の画像の明るさに応じて特性の異なるガンマ補正を適用する点が実施形態1と異なる。しかし、撮像装置100の構成及び画像処理システムの機能構成例は、実施形態1と実質的に同一であってよい。従って、実質的に同一の構成及び処理については同一の参照符号を付して説明を省略し、相違点について重点的に説明する。
(Embodiment 2)
Next,
<撮像装置における推論処理の動作>
以下、図5及び図6を参照して、撮像装置100における推論処理の動作について説明する。なお、図5に示す一連の動作は、例えばプロセッサ106がROM105に記憶されたプログラムを実行することにより、撮像装置100の各部を制御して実現される。また、画像処理部104による動作は、プロセッサ106或いは不図示のGPUなどの他のプロセッサがROM105に記憶されたプログラムを実行することにより実現されてよい。まず、プロセッサ106又は画像処理部104は、ステップS3002からステップS3005において、実施形態1と同様に処理を実行し、第2の画像を生成する。
<Operation of Inference Processing in Imaging Apparatus>
The operation of inference processing in the
ステップS6001で、画像処理部104は、ステップS3005においてオフセットが除去された第2の画像の明るさを算出する。なお、本実施形態では、第2の画像の各画素値の平均値を明るさとして算出する場合を例に説明するが、各画素値を輝度に変換した値から算出してもよい。
In step S6001, the
ステップS6002で、プロセッサ106は、ROM105に記録されている各画素値の平均値とガンマ補正用のγ値との関係を示す第1のルックアップテーブルを参照する。そして、プロセッサ106は、当該第1のルックアップテーブルに基づいて、各画素値の平均値に応じたガンマ補正用のγ値を画像処理部104に設定する。ステップS6003で、プロセッサ106は、ROM105に記録されている各画素値の平均値とデガンマ補正用のγ値との関係を示す第2のルックアップテーブルを参照する。そして、プロセッサ106は、当該第2のルックアップテーブルに基づいて、各画素値の平均値に応じたデガンマ補正のγ値を画像処理部104に設定する。なお、本実施形態では、各画素値の平均値に応じたデガンマ補正のγ値(特性)を設定する場合を例に説明しているが、S6002で設定されたガンマ補正用のγ値に対応したデガンマ補正用の特性を設定してもよい。
In step S6002, the
ステップS6004で、プロセッサ106は、ROM105に記録されている各画素値の平均値とニューラルネットワークのパラメータとの関係を示す第3のルックアップテーブルを参照する。プロセッサ106は、当該第3のルックアップテーブルに基づいて、各画素値の平均値に応じたニューラルネットワークのパラメータを画像処理部104にあるニューラルネットワークに設定する。なお、本実施形態では、各画素値の平均値に応じたネットワークパラメータを取得する場合を例に説明しているが、ガンマ補正用のγ値ごとに対応したニューラルネットワークのパラメータを設定してもよい。例えば、段階的に異なるガンマ補正用のγ値に対してニューラルネットワークのパラメータを対応付けたルックアップテーブルを参照して、S6002で設定されたγ値に対応するニューラルネットワークのパラメータを画像処理部104に設定してもよい。
In step S6004, the
プロセッサ106は、更に、実施形態1と同様にステップS3006からステップS3013を実行して、ニューラルネットワークによって生成される第8の画像にデガンマ処理等を行ってその後第10の画像を生成する。プロセッサ106は、第10の画像を生成するとその後、本処理を終了する。
The
ここで、図6を参照して、本実施形態において適用するガンマ補正の特性について説明する。図6では、横軸はガンマ補正前の画素値の値を示し、縦軸はガンマ補正後の画素値を示している。図6には、上述の式(1)において、γが2.6、2.4、2.2、2.0、1.8、1.6、1.4のときのガンマカーブを描いている。本実施形態では、ステップS6001からS6004の動作では、各画素値の平均値に応じた特定のガンマカーブが対応付けられる。例えば、プロセッサ106は、画像の各画素値が所定の低輝度用閾値より低い場合にはγ=2.6のガンマカーブ(特性)を選択する。このようにすることで、ガンマ補正前の低輝度域の画素値に多くの階調が割り当てられたガンマ補正結果を得ることができるので、ステップS3008で8ビットへ正規化解除された際に低輝度域の画素の階調を維持することが可能となる。また、プロセッサ106は、画像の各画素値が所定の高輝度用閾値より高い場合にはγ=1.4のガンマカーブを選択する。このようにすることで、他のガンマカーブと比較してガンマ補正前の高輝度域の画素値に多くの階調が割り当てられたガンマ補正結果を得ることができる。このため、ステップS3008で8ビットへ正規化解除された際に高輝度域の画素の階調を維持することが可能となる。
Here, with reference to FIG. 6, the characteristics of gamma correction applied in this embodiment will be described. In FIG. 6, the horizontal axis indicates pixel values before gamma correction, and the vertical axis indicates pixel values after gamma correction. FIG. 6 shows gamma curves when γ is 2.6, 2.4, 2.2, 2.0, 1.8, 1.6, and 1.4 in the above equation (1). there is In this embodiment, in the operations of steps S6001 to S6004, a specific gamma curve corresponding to the average value of each pixel value is associated. For example,
<画像処理システムにおける学習処理の動作>
次に、図12を参照して、画像処理システム(撮像装置200、画像処理装置210、表示装置220、ストレージ装置230)における実施形態2に係る学習処理の動作について説明する。なお、図12に示す一連の動作は、画像処理装置210のプロセッサ206が、ROM205に記憶されたプログラムをRAM207に展開、実行し、画像処理装置210の各部(画像処理部204やGPU213等)を制御して実現される。また、画像処理部204による動作は、GPU213がROM205に記憶されたプログラムを実行することにより実現されてよい。まず、プロセッサ206又は画像処理部204が、実施形態1と同様に、ステップS9001からステップS9008までの処理を行う。
<Operation of learning processing in image processing system>
Next, with reference to FIG. 12, operation of learning processing according to the second embodiment in the image processing system (
ステップS10009では、プロセッサ206は、全ての条件の(例えば段階的に設けられた各画素値の平均値に対応する)ニューラルネットワークのネットワークパラメータを取得したかどうかを判定する。推論処理のS6004でネットワークパラメータを切り替える動作と学習処理の動作の条件を合わせることで、推論時のノイズ低減処理の推論精度を向上させることができる。そのため、推論時に複数条件で画像処理を行う(又は条件を切り替える)ことがある場合、条件ごとのネットワークパラメータを持つことに利点がある。プロセッサ206は、全ての条件のネットワークパラメータが取得されたと判定する場合、ステップS9009に進む。一方、プロセッサ206は、全ての条件のネットワークパラメータが取得されていないと判定した場合、ステップS10010に進んで、条件を変更する。プロセッサ206は、その後、処理をステップS9001に戻して再び上述の処理を行う。ネットワークパラメータは、条件ごとにパラメータ保存領域に記憶される。パラメータ保存領域は、ROM205でも良いしRAM207でも良い。また、必要に応じてパラメータ保存領域に記憶されたネットワークパラメータは、ストレージ装置230に記憶させても良い。また、プロセッサ206は、ステップS9009とS9010とを図10と同様に実行する。
In step S10009, the
以上説明したように、本実施形態では、段階的に異なる複数のガンマ補正の特性のうち、画像の明るさに応じたガンマ補正の特性を用いて階調を圧縮するようにした。また、予め学習された複数のニューラルネットワークのネットワークパラメータのうち、画像の明るさに応じた異なるネットワークパラメータを用いて、(ノイズ低減処理などの)画像処理を実施するようにした。更に、階調を伸長する複数のデガンマ補正の特性のうち、画像の明るさに応じた特性を用いて画像データの階調を伸長するようにした。また、学習処理では、条件ごと(例えば画像の明るさごと)に最適なネットワークパラメータを取得し、記憶するようにした。このようにすることで、画像の明るさなどの条件の変化によって影響を受ける画像処理についても、推論精度が影響されにくいニューラルネットワークを得ることができる。 As described above, in the present embodiment, among a plurality of gamma correction characteristics that differ in stages, the gamma correction characteristics corresponding to the brightness of the image are used to compress the gradation. Image processing (such as noise reduction processing) is performed using different network parameters according to the brightness of the image among the network parameters of a plurality of neural networks learned in advance. Furthermore, the gradation of the image data is expanded using the characteristic corresponding to the brightness of the image among the plurality of degamma correction characteristics for expanding the gradation. Also, in the learning process, optimal network parameters are acquired and stored for each condition (for example, each image brightness). By doing so, it is possible to obtain a neural network whose inference accuracy is less likely to be affected by image processing that is affected by changes in image brightness and other conditions.
なお、上述の例では、画像のノイズを低減するニューラルネットワークを例に説明した。しかし、ノイズ低減以外の処理に関しても、同様にシミュレーションにより訓練画像と正解画像のペアを用意することで、学習処理の動作を実行することができる。超解像においては、正解画像をダウンサンプリングすることで訓練画像を用意できる。このとき、正解画像と訓練画像はサイズ合わせを行っても良いし、行わなくても良い。ボケ除去やブレ除去(デブラー)であれば、正解画像にボケ関数を適用することで訓練画像を生成することができる。ホワイトバランス補正であれば、ホワイトバランスを適切に撮った正解画像に対し、適切に合わせていない、又は補正していない画像を訓練画像とすれば良い。カラーマトリクス補正などの色補正も同様である。欠損補間であれば、正解画像を欠損させることで訓練画像が得られる。デモザイキングであれば、三板式の撮像素子などを用いて正解画像を用意し、正解画像をベイヤー配列などで再サンプリングすることで訓練画像を生成しても良い。色成分の推論では、正解画像に対して色成分を減らすことで訓練画像を生成することができる。ディヘイズに関しては、霞などが無い正解画像に対して、物理現象のシミュレーションによる散乱光を付与することで、訓練画像を生成することができる。なお、動画などの複数フレームが連続する場合においては、所望のフレーム数を奥行き方向にまとめてニューラルネットワークに入力すると、より効果的にノイズの除去が可能である。 In the above example, a neural network for reducing image noise has been described as an example. However, for processing other than noise reduction, learning processing operations can be executed by similarly preparing pairs of training images and correct images through simulation. In super-resolution, training images can be prepared by downsampling the correct images. At this time, the correct image and the training image may or may not be matched in size. For deblurring and deblurring, a training image can be generated by applying a blurring function to the correct image. In the case of white balance correction, an image that has not been properly adjusted or corrected may be used as a training image with respect to a correct image that has been photographed with an appropriate white balance. The same applies to color correction such as color matrix correction. With loss interpolation, a training image can be obtained by missing a correct image. In the case of demosaicing, a training image may be generated by preparing a correct image using a three-chip imaging device or the like and resampling the correct image using a Bayer array or the like. In inference of color components, training images can be generated by reducing the color components of correct images. As for dehaze, a training image can be generated by adding scattered light obtained by simulating a physical phenomenon to a correct image without haze or the like. In addition, in the case where a plurality of frames such as a moving image continue, noise can be removed more effectively by collectively inputting a desired number of frames in the depth direction to the neural network.
なお、本実施形態では、ルックアップテーブルを用いて明るさに応じたγ値を一意的に選択する場合を例に説明した。しかし、γ値を大きく変更すると、出力される画像の輝度変化が大きくなり見づらい画像となる場合がある。そこで、ルックアップテーブルを用いて明るさに応じたγの値を一意的に選択するのではなく、現在のγ値から明るさに応じてROM205に記録されている近傍のγ値へ変更するようにしても良い。すなわち、図6に示すような、ルックアップテーブルに含まれる、段階的に異なる複数のガンマ補正のγ値(特性)のうち、現在のγ値(例えば2.2)に隣接するγ値(例えば2.4又は2.0)を選択する。この場合、γ値が一度に大きく変化することなく、時間を経て目標のγ値へ変更される。また、このようにする場合、γ値ごとにニューラルネットワークのパラメータを対応付けたルックアップテーブルを参照することで、上記近傍のγ値が設定された場合に、対応するニューラルネットワークのパラメータを設定可能である。更に、デガンマ補正については、段階的に異なるデガンマ補正の特定のうち、上記近傍のγ値に対応するデガンマ補正の特性を用いてデガンマ補正を行えばよい。また本実施形態では、ニューラルネットワークへ入力する前にデジタルゲインをかけたが、ニューラルネットワークによる処理を行った後にデジタルゲインをかけるようにしてもよい。この場合、各ニューラルネットワークはデジタルゲインをかける前の画像で最適に学習されたものを用意する。
In this embodiment, the case of uniquely selecting the γ value corresponding to the brightness using the lookup table has been described as an example. However, if the γ value is greatly changed, the luminance change of the output image becomes large and the image may become difficult to see. Therefore, instead of using a lookup table to uniquely select a γ value corresponding to the brightness, the current γ value is changed to a nearby γ value recorded in the
(実施形態3)
次に、実施形態3について説明する。実施形態2では、第2の画像の明るさを取得し、取得した明るさに基づいてガンマ補正値を設定した。実施形態3では、第2の画像の領域ごとに明るさを取得し、領域の明るさに基づいてガンマ補正値を設定する点で実施形態2と異なる。しかし、撮像装置100の構成及び画像処理システムの機能構成例は、実施形態1と実質的に同一であってよい。従って、実質的に同一の構成及び処理については同一の参照符号を付して説明を省略し、相違点について重点的に説明する。
(Embodiment 3)
Next, Embodiment 3 will be described. In the second embodiment, the brightness of the second image is obtained, and the gamma correction value is set based on the obtained brightness. Embodiment 3 differs from
<撮像装置100における推論処理の動作>
図7を参照して、撮像装置100における推論処理の動作について説明する。なお、図7に示す一連の動作は、例えばプロセッサ106がROM105に記憶されたプログラムを実行することにより、撮像装置100の各部を制御して実現される。また、画像処理部104による動作は、プロセッサ106或いは不図示のGPUなどの他のプロセッサがROM105に記憶されたプログラムを実行することにより実現されてよい。まず、プロセッサ106又は画像処理部104は、ステップS3002からステップS3005の処理を、実施形態2(図5)と同様に行って、第2の画像を生成する。
<Operation of Inference Processing in
The operation of inference processing in the
ステップS7001で、プロセッサ106は、ROM105に記録されている、領域毎の明るさを算出するための領域分割用の座標情報を取得する。そして、プロセッサ106は、当該領域分割用の座標情報に基づいて、第2の画像に対する分割領域の座標を画像処理部104に設定する。領域分割用の座標情報は、例えば、画像の左上隅画素を画像の座標原点(X,Y)=(0,0)としたときの座標原点に基づいて、領域毎の始点座標と終点座標の(X,Y)で構成されてよい。或いは、領域分割用の座標情報は、領域毎の始点座標(X,Y)と領域の幅と高さで構成されてもよい。また、プロセッサ106が、第2の画像の幅、高さ情報と、X方向、Y方向の分割数の情報から領域分割用の座標情報を算出してもよい。
In step S<b>7001 , the
例えば、本実施形態では、図8に示すように、第2の画像をX方向、Y方向にそれぞれ4分割することにより、合計で16の領域(領域801~816)に分割する場合を例に説明する。図8は、撮像装置100が、例えば、港湾監視などの用途で撮影された、暗い海と、灯台や電灯などの光とを含む画像の例を模式的に示している。画像全体の明るさを用いてガンマ補正の特性を設定する場合には灯台や電灯の光の影響を受けてしまうが、暗い海に応じた階調性を得ることが望ましい。このため、本実施形態では、ステップS7002~7004の処理により、暗い海の領域の明るさを取得する処理を行う。
For example, in this embodiment, as shown in FIG. 8, the second image is divided into four regions in the X direction and the Y direction, respectively, so that a total of 16 regions (
ステップS7002で、画像処理部104は、ステップS7001で設定された分割領域の座標に基づいて、第2の画像の領域毎の明るさを算出する。本実施形態では、第2の画像の領域毎の各画素値の平均値を明るさとして算出する場合を例に説明するが、各画素値を輝度に変換した値から算出してもよい。ステップS7003で、プロセッサ106は、ROM105で記録されている領域選択条件に基づいて、(ステップS7002で算出した領域毎の各画素値の平均値に応じて)第2の画像の領域を画像処理部104に設定する。なお、領域選択条件は、ユーザが1以上の任意の領域を選択するようにしてもよいし、使用する領域個数と各画素値の平均値の明暗の優先度から1以上の任意の領域を選択してもよい。或いは、各画素値の平均値が所定の閾値より低い1以上の領域を選択してもよい。例えば、領域選択条件として、使用する領域個数が8個であり且つ各画素値の平均値が暗い領域を優先する場合を考える。この場合、プロセッサ106は、図9に示す8つの領域(領域804、808、809、811、812、813、815及び816)をステップS7004で使用する第2の画像の領域として選択する。
In step S7002, the
なお、本実施形態では上述の領域選択条件によって、ステップS7004に使用する第2の画像の領域を選択しているが、領域の選択はこれに限らない。撮像装置100が、例えば監視カメラの用途で用いられるような場合に、以下のように画像の領域を選択してもよい。例えば、前日以前の時間情報と領域毎の明るさ情報に基づいて、時間毎に使用する第2の画像の領域を選択してもよい。また、その場合も使用する領域毎の明るさを算出し、前日以前の同じ領域の明るさとの乖離が所定値より大きい場合、前日以前とは異なる特殊な条件下であると判定し、使用する領域を変更してもよい。換言すれば、前日以前の同じ領域の明るさとの差が所定値以下である領域が選択される。また、使用する領域毎の明るさを算出し、前回算出した同じ領域からの明るさの変化が前日以前の同じ領域かつ同一時間帯での明るさの変化との乖離が所定値より大きい場合に、前日以前とは異なる特殊な条件下であると判定し、使用する領域を変更してもよい。例えば、日没から夜間の時間帯において、前日以前の同一時間帯の同じ領域では暗いのに対して、当日の同一時間帯の同じ領域において明るさが所定の閾値以上上がる場合には、照明が点灯したり、点灯した照明が移動してきたりすることが考えられる。上述の処理により、このような領域がガンマ補正の特性を選択する領域として適当ではないと判定することができる。
In this embodiment, the area of the second image to be used in step S7004 is selected according to the above-described area selection conditions, but selection of the area is not limited to this. For example, when the
ステップS7004で、画像処理部104は、ステップS7003で設定された第2の画像の領域毎の明るさを算出する。明るさの算出は、使用する領域毎の各画素値の平均値の和を使用する領域数で除算してもよい。また、ステップS7002で算出する領域毎の各画素値の平均値をRAM107に保持しておき、使用する領域の各画素値の平均値のみを読み出し、その和を使用する領域数で除算してもよい。
In step S7004, the
その後、画像処理部104は、ステップS6002からステップS3013までの動作を図5で説明したように実行し、S3013の処理の後に本一連の処理を終了する。
After that, the
以上説明したように、本実施形態では、画像内の所定の領域毎に明るさを算出し、算出した明るさに対応するガンマ補正と対応するニューラルネットワークを適用するようにした。このようにすることで、上述の実施形態の効果に加えて、領域ごとに明暗差の大きい画像を処理する場合に画像内の暗い領域において多くの階調が割り当てられるようになる。 As described above, in this embodiment, the brightness is calculated for each predetermined region in the image, and the gamma correction corresponding to the calculated brightness and the corresponding neural network are applied. By doing so, in addition to the effects of the above-described embodiments, when processing an image with a large difference in brightness for each area, many gradations are assigned to dark areas in the image.
なお、上述の説明では、装置内で画像或いは画像の領域内の明るさを算出する処理を例に説明したが、明るさを算出する代わりにルックアップテーブルから値を取得したり、外部の装置で算出した値を取得するようにしてもよい。 In the above description, the processing for calculating the brightness of an image or an area of an image within the device was explained as an example. You may make it acquire the value calculated by.
(実施形態4)
次に、実施形態4について説明する。実施形態4では、出力する画像の設定に応じた階調補正を画像に適用したうえで、ニューラルネットワークによる画像処理を行う。なお、撮像装置100の構成及び画像処理システムの機能構成例は、実施形態1と実質的に同一であってよい。従って、実質的に同一の構成及び処理については同一の参照符号を付して説明を省略し、相違点について重点的に説明する。
(Embodiment 4)
Next, Embodiment 4 will be described. In the fourth embodiment, image processing is performed using a neural network after tone correction is applied to the image according to the setting of the image to be output. Note that the configuration of the
<撮像装置100における推論処理の動作>
図13A及び図13Bを参照して、撮像装置100における推論処理の動作について説明する。なお、図13A及び図13Bに示す一連の動作は、例えばプロセッサ106がROM105に記憶されたプログラムを実行することにより、撮像装置100の各部を制御して実現される。また、画像処理部104による動作は、プロセッサ106或いは不図示のGPUなどの他のプロセッサがROM105に記憶されたプログラムを実行することにより実現されてよい。
<Operation of Inference Processing in
13A and 13B, the operation of inference processing in the
まず、ステップS13001で、プロセッサ106は、撮像装置100に設定されている画像の出力モードがHDR(High Dynamic Range)モードであるかSDR(Standard Dynamic Range)モードであるかを判定する。プロセッサ106は、例えば、RAM107に格納されている設定値を参照すること等により、画像の出力モードがHDRモードであるかSDRモードであるかを判定する。プロセッサ106は、設定されている画像の出力モードがHDRモードであると判定した場合はステップS13002に処理を進め、そうでない場合にはステップS13003に処理を進める。なお、本実施形態では、出力する画像の設定は、例えば、撮像装置100から出力される画像がHDRであるかSDRであるかを示す設定である場合を例に説明する。しかし、出力する画像の設定はこれに限らない。例えば、本一連の処理により出力される画像がHDRであるかSDRであるかを示す設定であってもよい。
First, in step S13001, the
ステップS13002で、プロセッサ106はROM105に記録されている第1のニューラルネットワークのパラメータを画像処理部104にあるニューラルネットワークに設定する。ここで、第1のニューラルネットワークは、階調数が例えば1024段階であるHDRの画像に対応する入力に最適化されたニューラルネットワークである。ステップS13003で、プロセッサ106はROM105に記録されている第2のニューラルネットワークのパラメータを画像処理部104にあるニューラルネットワークに設定する。ここで、第2のニューラルネットワークは、HDRよりも階調数が少ない(例えば256段階)SDRの画像に対応する入力に最適化されたニューラルネットワークである。なお、本実施形態では、出力する画像の階調数についての設定に応じてニューラルネットワークを設定する場合を例に説明している。しかし、出力する画像の輝度の最大値(或いは上限値)についての設定に応じてニューラルネットワークを設定してもよい。本実施形態では、それぞれの画像の出力モードに関連付けられたニューラルネットワークを設定する場合を例に説明している。しかし、HDRとSDRの両方を1つのニューラルネットワークで処理可能である場合には、ステップS13001の判定処理を行わなくてもよい。続いて、ステップS3002からステップS3005までの処理が上述の実施形態と同様に実行される。
In step S<b>13002 , the
ステップS13004で、プロセッサ106は、ステップS13001と同様に、設定されている画像の出力モードがHDRモードであるかSDRモードであるかを判定する。プロセッサ106は、画像の出力モードがHDRモードであると判定した場合にはステップS13005へ処理を進め、そうでない場合にはS13007に処理を進める。
In step S13004, the
ステップS13005で、画像処理部104は、第2の画像の各画素値を正規化した第3の画像を生成する。なお、本実施形態の例では、例えばステップS3002で撮像素子102から取得した第1の画像の各画素値が14ビットであるのに対し、ステップS3004でデジタルゲインをかけて生成される画像の各画素値が18ビットで取り扱われる場合を例に説明する。本ステップの正規化は18ビットの各画素値を0から1の範囲に対応付ける処理であり、画像処理部104は各画素値を2の18乗で除算する。計算結果は小数点以下を含んだfloat32などの形式で取り扱われる。
In step S13005, the
ステップS13006で、画像処理部104は、第3の画像の各画素値にPQカーブのOETF(Opto-Electronic Transfer Function)をかけた第4の画像を生成する。すなわち、画像処理部104は、第3の画像の各画素値にPQカーブのOETFを適用することにより、第3の画像の階調を圧縮する。OETFについては、図14(B)を参照して後述するが、ОETFは、明るさが低いほど多くの階調が割り当てられる特性を有する。また、OETFは、(ステップS13008について後述する)SDRモードの画像に対して適用されるガンマ補正の特性よりも、所定の低輝度領域において、多くの階調が割り当てられる特性を有する。つまり、画像処理部104は、画像の出力モードの設定において、処理対象の画像の画素値を表すビット数が大きい設定ほど、所定の低輝度領域において、より多くの階調が割り当てられる特性を用いる。
In step S13006, the
PQカーブとは、ITU-R(Radiocommunication Sector of ITU)BT.2100で規定されたEOTF(Electro-Optical Transfer Function)に準拠した階調値である。 The PQ curve is defined in ITU-R (Radiocommunication Sector of ITU) BT. 2100 compliant EOTF (Electro-Optical Transfer Function).
PQカーブについて図14を参照して説明する。図14(A)はPQカーブ(EOTF)の一例を示す。EOTFは、画像信号である階調値(輝度階調値)を光出力の輝度に変換する関数に対応する。具体的には図14(A)のEOTFは以下の式4で表される。pinは、EOTFの入力値であり、階調値(R値やG値、B値など)を0.0~1.0に正規化した値である。pin=1.0は階調値の上限(ビット数に応じた上限)に対応し、pin=0.0は階調値の下限に対応する。例えば、階調値のビット数が10ビットである場合は、階調値の上限は1023、階調値の下限は0となる。poutは、EOTFの出力値であり、輝度に比例する階調値(R値やG値、B値など)を0.0~1.0に正規化した階調値である。例えば、pout=0.0は0nitに対応し、pout=1.0は100000nitに対応する。max[x、y]は、xとyのうち大きい方の値を出力する関数である。
図14(B)は、図14(A)のEOTFとは真逆の特性を有するOETFの一例を示している。OETFは、輝度を画像信号の階調値に変換する関数に対応する。具体的には、図14(B)のOETFは以下の式5で表される。qinは、OETFの入力値であり、輝度に比例する階調値(R値やG値、B値など)を0.0~1.0に正規化した階調値である。例えば、qin=0.0は0nitに対応し、qin=1.0は10000nitに対応する。qoutは、OETFの出力値であり、階調値(R値やG値、B値など)を0.0~1.0に正規化した値である。qout=1.0は階調値の上限(ビット数に応じた上限)に対応し、qout=0.0は階調値の下限に対応する。例えば、階調値のビット数が10ビットである場合は、階調値の上限は1023、階調値の下限は0となる。
ステップS13007で、画像処理部104は、ステップS3005で生成した第2の画像の各画素値を所定値でクリップする処理を行い(例えば所定値以上の画素値を所定値とする)、処理後の値を正規化した第5の画像を生成する。所定値は、例えば、SDRで十分なダイナミックレンジの上限である。例えば、画像処理部104は14ビットの16383でクリップする。本ステップの正規化では、画像処理部104は、14ビットの各画素値を0から1の範囲に正規化するために各画素値を2の14乗で除算する。計算結果は小数点以下を含んだfloat32などの形式で取り扱われる。ステップS13008で、画像処理部104は、第5の画像の各画素値にガンマ補正をかけた第6の画像を生成する。ここでのガンマ補正は上述したステップS3007と同様の処理となる。
In step S13007, the
ステップS13009で、画像処理部104は、ステップS13006で生成した第4の画像もしくはステップS13008で生成した第6の画像の各画素値を8ビットに正規化を解除した第7の画像を生成する。本ステップの正規化解除は、上述したステップS3008と同様の処理となる。ステップS13010で、画像処理部104は第7の画像をニューラルネットワークに入力する。本ステップで用いられるニューラルネットワークは、ステップS13002もしくはステップS13003で設定された第1又は第2のニューラルネットワークであり、画像に対してノイズ除去を行うニューラルネットワークである。すなわち、本実施形態では、画像の出力モードの設定に応じて、予め学習された複数の前記ニューラルネットワークのパラメータのうちの異なるパラメータを用いて、ニューラルネットワークを適用する。
In step S13009, the
ステップS13011で、画像処理部104は、ニューラルネットワークから出力される第8の画像の各画素値を正規化した第9の画像を生成する。本ステップの正規化は、ステップS3010と同様の処理となる。ステップS13012で、プロセッサ106は、ステップS13001と同様に、設定されている画像の出力モードがHDRモードかSDRモードかを判定する。プロセッサ106は、画像の出力モードがHDRモードであると判定した場合はステップS13013へ処理を進め、そうでない場合には、S13015に処理を進める。
In step S13011, the
画像の出力モードがHDRモードであるため、ステップ13013で、画像処理部104は、第9の画像の各画素値にPQカーブのEOTFをかけた第10の画像を生成する。そして、ステップS13014で、画像処理部104は、第10の画像の各画素値を18ビットで正規化を解除した第11の画像を生成する。本ステップの正規化解除では、画像処理部104は、18ビットへ正規化解除するので各画素値に2の18乗を乗算する。計算結果は18ビットで取り扱われる。
Since the image output mode is the HDR mode, in step 13013, the
画像の出力モードがSDRモードであるため、ステップS13015で、画像処理部104は、第9の画像の各画素値にデガンマ補正をかけた第12の画像を生成する。本ステップのデガンマ補正の処理はステップS3011と同様の処理となる。ステップS13016で、画像処理部104は、第12の画像の各画素値を14ビットで正規化を解除した第13の画像を生成する。本ステップの正規化解除はステップS3012と同様の処理となる。このように本実施形態では、画像の出力モードの設定に応じて、階調を伸長する複数の特性(EOTF及びデガンマ補正の特性)のうちの異なる特性を用いて画像データの階調を伸長する。
Since the image output mode is the SDR mode, in step S13015, the
ステップS13017で、画像処理部104は、ステップS13014で生成した第11の画像もしくはステップS13016で生成した第13の画像と、第2の画像とをαブレンドした第14の画像を生成する。αブレンドとは2つの画像を各画素ごとに設定された重み(α値)に基づいて合成することである。画像処理部104は、入力された画像の画素値に応じてαブレンドを実行する。画像処理部104は、第14の画像に係数(1―α)を乗算し、第11の画像もしくは第13の画像に係数αを乗算した後に、乗算後の結果を加算する。このときのα値は、画素値の大きさに応じて0~1の間でリニア変換される。ただし、このαブレンドは必ずしも行う必要はない。
In step S13017, the
ステップS13018で、画像処理部104は、第14の画像の各画素値にオフセットを足した第15の画像を生成する。プロセッサ106は、第15の画像を生成すると、本一連の処理を終了する。なお、本実施形態では、階調圧縮を行うために、PQカーブのOETFやガンマ補正を適用するようにした。また、階調伸長を行うために、PQカーブのEOTFやデガンマ補正を適用するようにした。しかし、階調圧縮及び階調伸長のために、他の伝達関数や変換特性を用いてもよい。
In step S13018, the
以上、説明したように本実施形態では、出力する画像の設定に応じた階調補正を画像に適用したうえで、ニューラルネットワークによる画像処理を行うようにした。このようにすることで、出力する画像の設定(例えばHDR又はSDR)に応じて必要なダイナミックレンジを維持しながら、ビット数が限られたニューラルネットワークの処理を行うことができる。また、ニューラルネットワークを用いた処理を行う前の画像(例えば第2の画像等)を用いて、ニューラルネットワークを用いた処理を行った後の画像とαブレンドするようにした。このようにすることでビット縮小して失われた情報を復元することが可能となる。 As described above, in the present embodiment, the tone correction corresponding to the setting of the image to be output is applied to the image, and then the image processing is performed by the neural network. By doing so, neural network processing with a limited number of bits can be performed while maintaining the necessary dynamic range according to the setting of the image to be output (for example, HDR or SDR). Also, an image (for example, a second image) before processing using a neural network is used, and an image after processing using a neural network is alpha-blended. By doing so, it becomes possible to restore information lost by bit reduction.
なお、本実施形態では、出力する画像の設定が、HDRであるかSDRである(すなわち、出力する画像の階調数が異なる)場合を例に説明した。しかし、出力する画像の設定は、画像の階調を圧縮又は伸長する特性(例えばOETF/EOTF、γ値)であってもよい。或いは、出力する画像の設定は、出力する画像の画素値を表すビット数、画素値の上限値であってもよい。 In this embodiment, the case where the setting of the image to be output is HDR or SDR (that is, the number of gradations of the image to be output is different) has been described as an example. However, the setting of the image to be output may be a characteristic (for example, OETF/EOTF, γ value) that compresses or expands the gradation of the image. Alternatively, the setting of the image to be output may be the number of bits representing the pixel value of the image to be output, or the upper limit value of the pixel value.
また、本実施形態では、出力する画像の設定に応じて、階調圧縮に用いる特性、ニューラルネットワークのパラメータ、及び階調伸長に用いる特性を制御する場合を例に説明した。しかし、階調圧縮に用いる特性、ニューラルネットワークのパラメータ、及び階調伸長に用いる特性は、他の情報に基づいて制御されてもよい。例えば、階調圧縮に用いる特性等は、ニューラルネットワークに入力される画像の設定に基づいて制御されてもよい。ニューラルネットワークに入力される画像の設定は、例えば、当該画像の画素値を表すビット数、当該画像の階調数、或いは当該画像の画素値の上限値であってよい。 Further, in the present embodiment, the case where the characteristics used for tone compression, the parameters of the neural network, and the characteristics used for tone expansion are controlled according to the setting of the image to be output has been described as an example. However, the properties used for tone compression, the parameters of the neural network, and the properties used for tone expansion may be controlled based on other information. For example, the characteristics used for tone compression may be controlled based on the settings of the image input to the neural network. The setting of the image input to the neural network may be, for example, the number of bits representing the pixel values of the image, the number of gradations of the image, or the upper limit of the pixel values of the image.
(第5の実施形態)
更に、実施形態5について説明する。実施形態5では、入力する画像データをクリップしたうえで、階調処理やニューラルネットワークによる画像処理を行う。なお、撮像装置100の構成及び画像処理システムの機能構成例は、実施形態1と実質的に同一であってよい。従って、実質的に同一の構成及び処理については同一の参照符号を付して説明を省略し、相違点について重点的に説明する。
(Fifth embodiment)
Furthermore, Embodiment 5 will be described. In the fifth embodiment, after clipping input image data, image processing using gradation processing and a neural network is performed. Note that the configuration of the
<撮像装置100における推論処理の動作>
図15A及び図15Bを参照して、撮像装置100で行う推論処理について説明する。図15A及び図15Bに示す一連の動作は、例えばプロセッサ106がROM105に記憶されたプログラムを実行することにより、撮像装置100の各部を制御して実現される。また、画像処理部104による動作は、プロセッサ106或いは不図示のGPUなどの他のプロセッサがROM105に記憶されたプログラムを実行することにより実現されてよい。
<Operation of Inference Processing in
The inference processing performed by the
まず、ステップS3001からステップS3005までの処理が上述の実施形態と同様に実行され、ニューラルネットワークのパラメータの設定や、画像の画素値からオフセットを引いた第2の画像の生成などが行われる。 First, the processing from step S3001 to step S3005 is executed in the same manner as in the above-described embodiment to set parameters of the neural network and generate a second image by subtracting the offset from the pixel values of the image.
次に、ステップS15001で、画像処理部104は、第2の画像の画素値を所定値でクリップした(例えば所定値以上の画素値を所定値とした)第3の画像を生成する。本実施形態では、画素値の上限値を10ビットとして、1023でクリップした画像を生成する場合を例に説明しているが、この例に限らず撮像素子102から取得した画素値より小さいビット数であればどのビット数で画素値をクリップしてもよい。
Next, in step S15001, the
ステップS15002で、画像処理部104は、第3の画像の各画素値を正規化した第4の画像を生成する。本ステップの正規化では、画像処理部104は、10ビットの各画素値を0から1の範囲に正規化するために各画素値を2の10乗で除算する。計算結果は小数点以下を含んだfloat32などの形式で取り扱われる。ステップS15003で、画像処理部104は、第4の画像の各画素値にガンマ補正をかけた第5の画像を生成する。本ステップのガンマ補正の処理は上述したステップS3007と同様の処理となる。
In step S15002, the
ステップS15004で、画像処理部104は、第5の画像の各画素値を8ビットに正規化解除した第6の画像を生成する。本ステップの正規化解除は、ステップS3008と同様の処理である。ステップS15005で、画像処理部104は、第6の画像をニューラルネットワークに入力する。このニューラルネットワークは、ステップS15003においてガンマ補正された画像に対して最適に学習された、ノイズ除去を行うニューラルネットワークである。
In step S15004, the
ステップS15006で、画像処理部104は、ニューラルネットワークから出力される第7の画像の各画素値を正規化した第8の画像を生成する。ここでの正規化はステップS3010と同様の処理である。ステップS15007で、画像処理部104は、第8の画像の各画素値にデガンマ補正をかけた第9の画像を生成する。本ステップのデガンマ補正の処理は、ステップS3011と同様の処理である。ステップS15008で、画像処理部104は、第9の画像の各画素値を10ビットで正規化を解除した第10の画像を生成する。本ステップの正規化解除の処理では、画像処理部104は、10ビットへ正規化解除するので各画素値に2の10乗を乗算する。計算結果は10ビットで取り扱われる。
In step S15006, the
ステップS15009で、画像処理部104は、ステップS15008で生成した第10の画像と第2の画像をαブレンドした第11の画像を生成する。画像処理部104は入力された画素値に応じてαブレンドを実施する。画像処理部104は、第14の画像に係数(1―α)を乗算し、第11の画像もしくは第13の画像に係数αを乗算した後、乗算した結果を加算する。このときのα値は、画素値の大きさに応じて0~1の間でリニア変換される。ただし、このαブレンドは必ずしも行う必要はない。
In step S15009, the
ステップS15010で、画像処理部104は、第11の画像の各画素値にオフセットを足した第12の画像を生成する。プロセッサ106は、第12の画像を生成すると、本一連の処理を終了する。
In step S15010, the
以上、説明したように本実施形態では、ニューラルネットワークに入力するデータをクリップするようにした。このようにすることで、暗部の情報を多く残した画像を生成することができる。さらに、クリップされて失われた明部の情報にニューラルネットワークを用いた処理を行う前の画像をαブレンドするようにした。このようにすることでクリップされて失われた情報を復元することが可能となる。 As described above, in this embodiment, the data input to the neural network is clipped. By doing so, it is possible to generate an image in which much of the information in the dark part remains. Furthermore, the clipped and lost bright area information is alpha blended with the image before processing using the neural network. By doing so, it is possible to restore the information that has been clipped and lost.
なお、上述の実施形態の機能を実現するソフトウェアのプログラムを実行する場合も本発明に含む。従って、本発明の機能処理をコンピュータで実現するために、該コンピュータに供給、インストールされるプログラムコード自体も本発明を実現するものである。つまり、本発明の機能処理を実現するためのコンピュータプログラム自体も本発明に含まれる。その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等、プログラムの形態を問わない。 The present invention also includes the execution of a software program that implements the functions of the above-described embodiments. Therefore, in order to implement the functional processing of the present invention in a computer, the program code itself supplied and installed in the computer also implements the present invention. In other words, the present invention also includes the computer program itself for realizing the functional processing of the present invention. In that case, as long as it has the function of a program, the form of the program, such as an object code, a program executed by an interpreter, or script data supplied to the OS, does not matter.
プログラムを供給するための記録媒体としては、例えば、ハードディスク、磁気テープ等の磁気記録媒体、光/光磁気記憶媒体、不揮発性の半導体メモリでもよい。また、プログラムの供給方法としては、コンピュータネットワーク上のサーバに本発明を形成するコンピュータプログラムを記憶し、接続のあったクライアントコンピュータがコンピュータプログラムをダウンロードしてプログラムするような方法も考えられる。 The recording medium for supplying the program may be, for example, a hard disk, a magnetic recording medium such as a magnetic tape, an optical/magneto-optical storage medium, or a nonvolatile semiconductor memory. As a program supply method, a method of storing a computer program forming the present invention in a server on a computer network, and a connected client computer downloading and programming the computer program is also conceivable.
(その他の実施形態)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other embodiments)
The present invention supplies a program that implements one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in the computer of the system or apparatus reads and executes the program. It can also be realized by processing to It can also be implemented by a circuit (for example, ASIC) that implements one or more functions.
(本明細書の開示)
本明細書の開示は、以下の画像処理装置、画像処理方法、生成方法、及びプログラムを含む。
(Disclosure of this Specification)
The disclosure of this specification includes the following image processing apparatus, image processing method, generation method, and program.
(項目1)
第1の画像データの階調を圧縮する階調圧縮手段と、
前記階調圧縮手段によって階調が圧縮された画像データに対して、所定の画像処理を行うニューラルネットワークを適用することにより、前記所定の画像処理が行われた画像データを出力する処理手段と、
前記所定の画像処理が行われた画像データの階調を伸長する階調伸長手段と、を有し、
前記ニューラルネットワークの内部で画素値を表すビット数が前記第1の画像データの画素値を表すビット数よりも小さく、
前記階調圧縮手段は、明るさが低いほど多くの階調が割り当てられる特性を用いて階調を圧縮する、ことを特徴とする画像処理装置が開示される。
(Item 1)
gradation compression means for compressing the gradation of the first image data;
processing means for applying a neural network for performing predetermined image processing to image data whose gradation has been compressed by said gradation compression means, thereby outputting image data on which said predetermined image processing has been performed;
a gradation decompression means for decompressing the gradation of the image data on which the predetermined image processing has been performed;
the number of bits representing pixel values inside the neural network is smaller than the number of bits representing pixel values of the first image data;
The image processing apparatus is disclosed, wherein the gradation compression means compresses the gradation using a characteristic that more gradation is assigned as the brightness is lower.
(項目2)
前記第1の画像データの明るさを取得する取得手段を更に有し、
前記階調圧縮手段は、前記取得手段によって取得された明るさに応じて、明るさが低いほど多くの階調が割り当てられる複数の特性のうちの異なる特性を用いて、前記第1の画像データの階調を圧縮する、ことを特徴とする項目1に記載の画像処理装置が開示される。
(Item 2)
further comprising acquisition means for acquiring the brightness of the first image data;
The gradation compression means compresses the first image data using a different characteristic among a plurality of characteristics in which more gradations are assigned as the brightness is lower, according to the brightness acquired by the acquisition means. The image processing device according to
(項目3)
前記処理手段は、前記取得手段によって取得された明るさに応じて、予め学習された複数の前記ニューラルネットワークのパラメータのうちの異なるパラメータを用いて、前記ニューラルネットワークを適用する、ことを特徴とする項目2に記載の画像処理装置が開示される。
(Item 3)
The processing means applies the neural network using different parameters among a plurality of pre-learned parameters of the neural network according to the brightness acquired by the acquisition means. An image processing device according to
(項目4)
前記階調伸長手段は、前記取得手段によって取得された明るさに応じて、階調を伸長する複数の特性のうちの異なる特性を用いて画像データの階調を伸長する、ことを特徴とする項目2又は3に記載の画像処理装置が開示される。
(Item 4)
The gradation expansion means expands the gradation of the image data using a different one of a plurality of gradation expansion characteristics according to the brightness acquired by the acquisition means. An image processing device according to
(項目5)
前記取得手段は、第1の時間に撮影された前記第1の画像データの明るさと、前記第1の時間の後である第2の時間に撮影された第2の画像データの明るさを取得し、
前記階調圧縮手段は、画像データの明るさに対応した段階的に異なる前記複数の特性のうち、前記第1の画像データの明るさに対応する第1の特性に隣接する第2の特性を用いて前記第2の画像データの階調を圧縮する、ことを特徴とする項目2に記載の画像処理装置が開示される。
(Item 5)
The acquiring means acquires the brightness of the first image data captured at a first time and the brightness of the second image data captured at a second time after the first time. death,
The gradation compression means selects a second characteristic adjacent to the first characteristic corresponding to the brightness of the first image data, among the plurality of characteristics that differ in stages corresponding to the brightness of the image data. The image processing apparatus according to
(項目6)
前記処理手段は、画像データの明るさに対応した段階的に異なる前記複数の特性に対応付けられた複数の前記ニューラルネットワークのパラメータのうち、前記第2の特性に対応付けられたパラメータを用いて前記ニューラルネットワークを適用する、ことを特徴とする項目5に記載の画像処理装置が開示される。
(Item 6)
The processing means uses a parameter associated with the second characteristic among the plurality of neural network parameters associated with the plurality of characteristics that differ in stages corresponding to the brightness of the image data. The image processing device according to item 5 is disclosed, wherein the neural network is applied.
(項目7)
前記階調伸長手段は、階調を伸長するための段階的に異なる複数の特性のうち、前記第2の特性に対応する特性を用いて画像データの階調を伸長する、ことを特徴とする項目5又は6に記載の画像処理装置が開示される。
(Item 7)
The gradation expansion means expands the gradation of the image data using a characteristic corresponding to the second characteristic among a plurality of characteristics that differ in stages for expanding the gradation. An image processing device according to item 5 or 6 is disclosed.
(項目8)
前記取得手段は、前記第1の画像データの複数の領域のうちの選択された領域の明るさを取得し、
前記階調圧縮手段は、前記複数の特性のうち、前記選択された領域の明るさに対応する第3の特性を用いて、前記第1の画像データの階調を圧縮する、ことを特徴とする項目2に記載の画像処理装置が開示される。
(Item 8)
the acquiring means acquires brightness of a selected area from among a plurality of areas of the first image data;
The gradation compression means compresses the gradation of the first image data using a third characteristic corresponding to the brightness of the selected area among the plurality of characteristics. An image processing device according to
(項目9)
前記処理手段は、前記複数の特性に対応付けられた複数の前記ニューラルネットワークのパラメータのうち、前記選択された領域の明るさに対する前記第3の特性に対応するパラメータを用いて、前記ニューラルネットワークを適用する、ことを特徴とする項目8に記載の画像処理装置が開示される。
(Item 9)
The processing means uses a parameter corresponding to the third characteristic with respect to the brightness of the selected region, among the plurality of parameters of the neural network associated with the plurality of characteristics, to operate the neural network. The image processing device according to item 8 is disclosed, characterized in that:
(項目10)
前記選択された領域は、前記第1の画像データの複数の領域のうち、領域ごとの明るさが所定の閾値より低い領域である、ことを特徴とする項目8又は9に記載の画像処理装置が開示される。
(Item 10)
10. The image processing apparatus according to item 8 or 9, wherein the selected area is an area in which brightness of each area is lower than a predetermined threshold among the plurality of areas of the first image data. is disclosed.
(項目11)
前記選択された領域は、前記第1の画像データの複数の領域のうち、前日以前の同一時間帯における同じ領域の明るさとの差が所定値以下である領域である、ことを特徴とする項目8から10のいずれか1項に記載の画像処理装置が開示される。
(Item 11)
An item characterized in that the selected area is an area, among the plurality of areas of the first image data, whose difference in brightness from the same area in the same time zone on the previous day or earlier is equal to or less than a predetermined value. An image processing apparatus according to any one of 8 to 10 is disclosed.
(項目12)
前記階調圧縮手段は、所定の設定に応じて、明るさが低いほど多くの階調が割り当てられる複数の特性のうちの異なる特性を用いて、前記第1の画像データの階調を圧縮する、ことを特徴とする項目1に記載の画像処理装置が開示される。
(Item 12)
The gradation compression means compresses the gradation of the first image data using a different characteristic among a plurality of characteristics in which a larger number of gradations are assigned as brightness decreases, according to a predetermined setting. An image processing apparatus according to
(項目13)
前記階調圧縮手段は、前記所定の設定が、処理対象の画像データの画素値を表すビット数が大きい設定ほど、所定の低輝度領域においてより多くの階調が割り当てられる特性を用いる、ことを特徴とする項目12に記載の画像処理装置が開示される。
(Item 13)
The gradation compression means uses a characteristic that the larger the number of bits representing the pixel value of the image data to be processed, the more gradation is assigned to the predetermined low-luminance region. Disclosed is an image processing apparatus according to item 12, characterized.
(項目14)
前記処理手段は、前記所定の設定に応じて、予め学習された複数の前記ニューラルネットワークのパラメータのうちの異なるパラメータを用いて、前記ニューラルネットワークを適用する、ことを特徴とする項目12又は13に記載の画像処理装置が開示される。
(Item 14)
Item 12 or 13, wherein the processing means applies the neural network using different parameters among a plurality of pre-learned parameters of the neural network according to the predetermined setting. An image processing apparatus as described is disclosed.
(項目15)
前記階調伸長手段は、前記所定の設定に応じて、階調を伸長する複数の特性のうちの異なる特性を用いて画像データの階調を伸長する、ことを特徴とする項目12から14のいずれか1項に記載の画像処理装置が開示される。
(Item 15)
Items 12 to 14, wherein the gradation expansion means expands the gradation of the image data using a different one of a plurality of characteristics for expanding gradation in accordance with the predetermined setting. An image processing apparatus according to any one of the items is disclosed.
(項目16)
前記所定の設定は、前記画像処理装置から出力される画像データについての設定である、ことを特徴とする項目12から15のいずれか1項に記載の画像処理装置が開示される。
(Item 16)
The image processing apparatus according to any one of items 12 to 15 is disclosed, wherein the predetermined settings are settings for image data output from the image processing apparatus.
(項目17)
前記画像処理装置から出力される画像データについての設定は、階調圧縮に用いる特性、階調伸長に用いる特性、前記出力される画像データの階調数、及び前記出力される画像データの画素値を表すビット数、のいずれかを含む、ことを特徴とする項目16に記載の画像処理装置が開示される。
(Item 17)
The settings for the image data output from the image processing apparatus include the characteristics used for tone compression, the characteristics used for tone expansion, the number of tones of the output image data, and the pixel values of the output image data. 17. The image processing device according to item 16 is disclosed, characterized in that the number of bits representing .
(項目18)
前記所定の設定は、前記ニューラルネットワークに入力される画像データについての設定である、ことを特徴とする項目12から15のいずれか1項に記載の画像処理装置が開示される。
(Item 18)
16. The image processing apparatus according to any one of items 12 to 15, wherein the predetermined settings are settings for image data to be input to the neural network.
(項目19)
前記ニューラルネットワークに入力される画像データについての設定は、前記ニューラルネットワークに入力される画像データの画素値の上限値、当該画像データの階調数、及び、当該画像データの画素値を表すビット数のいずれかを含む、ことを特徴とする項目18に記載の画像処理装置が開示される。
(Item 19)
The settings for the image data input to the neural network include the upper limit of the pixel value of the image data input to the neural network, the number of gradations of the image data, and the number of bits representing the pixel value of the image data. 18. An image processing apparatus according to item 18, characterized by including any of
(項目20)
前記階調伸長手段により伸長された画像データと、前記第1の画像データとを合成する合成手段を更に有する、ことを特徴とする項目12から19のいずれか1項に記載の画像処理装置が開示される。
(Item 20)
20. The image processing apparatus according to any one of items 12 to 19, further comprising synthesizing means for synthesizing the image data decompressed by the tone decompression means and the first image data. disclosed.
(項目21)
前記第1の画像データは、予め定めらた画素値の上限値を用いてクリップされた画像データを含む、ことを特徴とする項目20に記載の画像処理装置が開示される。
(Item 21)
21. The image processing apparatus according to item 20, wherein the first image data includes image data clipped using a predetermined upper limit of pixel values.
(項目22)
ニューラルネットワークを学習させる画像処理装置であって、
訓練画像の画像データと正解画像の画像データの階調を圧縮する階調圧縮手段と、
前記訓練画像の画像データの階調を圧縮した画像データに対して、所定の画像処理を行う前記ニューラルネットワークを適用することにより、前記所定の画像処理が行われた画像データを出力する処理手段と、
前記所定の画像処理が行われた画像データと、前記正解画像の画像データの階調を圧縮した画像データとの誤差に基づいて、前記ニューラルネットワークのパラメータを変更する変更手段と、を有し、
前記ニューラルネットワークの内部で画素値を表すビット数が前記訓練画像の画像データの画素値を表すビット数よりも小さく、
前記階調圧縮手段は、明るさが低いほど多くの階調が割り当てられる特性を用いて階調を圧縮する、ことを特徴とする画像処理装置が開示される。
(Item 22)
An image processing device for learning a neural network,
a gradation compression means for compressing the gradation of the image data of the training image and the image data of the correct image;
a processing means for outputting image data on which the predetermined image processing has been performed by applying the neural network for performing predetermined image processing to the image data obtained by compressing the gradation of the image data of the training image; ,
changing means for changing parameters of the neural network based on an error between the image data on which the predetermined image processing has been performed and the image data obtained by compressing the gradation of the image data of the correct image;
The number of bits representing pixel values inside the neural network is smaller than the number of bits representing pixel values of the image data of the training image;
The image processing apparatus is disclosed, wherein the gradation compression means compresses the gradation using a characteristic that more gradation is assigned as the brightness is lower.
(項目23)
第1の画像データの階調を圧縮する階調圧縮工程と、
前記階調圧縮工程において階調が圧縮された画像データに対して、所定の画像処理を行うニューラルネットワークを適用することにより、前記所定の画像処理が行われた画像データを出力する処理工程と、
前記所定の画像処理が行われた画像データの階調を伸長する階調伸長工程と、を有し、
前記ニューラルネットワークの内部で画素値を表すビット数が前記第1の画像データの画素値を表すビット数よりも小さく、
前記階調圧縮工程では、明るさが低いほど多くの階調が割り当てられる特性を用いて階調を圧縮する、ことを特徴とする画像処理方法が開示される。
(Item 23)
a gradation compression step of compressing the gradation of the first image data;
a processing step of applying a neural network that performs predetermined image processing to the image data whose gradation has been compressed in the gradation compression step, thereby outputting image data that has been subjected to the predetermined image processing;
a gradation decompression step of decompressing the gradation of the image data on which the predetermined image processing has been performed;
the number of bits representing pixel values inside the neural network is smaller than the number of bits representing pixel values of the first image data;
An image processing method is disclosed, wherein, in the gradation compression step, the gradation is compressed using a characteristic that more gradation is assigned as the brightness is lower.
(項目24)
画像処理装置において各工程が実行される、学習済みのニューラルネットワークの生成方法であって、
訓練画像の画像データと正解画像の画像データの階調を圧縮する階調圧縮工程と、
前記訓練画像の画像データの階調を圧縮した画像データに対して、所定の画像処理を行う前記ニューラルネットワークを適用することにより、前記所定の画像処理が行われた画像データを出力する処理工程と、
前記所定の画像処理が行われた画像データと、前記正解画像の画像データの階調を圧縮した画像データとの誤差に基づいて、前記ニューラルネットワークのパラメータを変更する変更工程と、を含み、
前記ニューラルネットワークの内部で画素値を表すビット数が前記訓練画像の画像データの画素値を表すビット数よりも小さく、
前記階調圧縮工程では、明るさが低いほど多くの階調が割り当てられる特性を用いて階調を圧縮する、ことを特徴とする生成方法が開示される。
(Item 24)
A method for generating a trained neural network in which each step is executed in an image processing device,
a gradation compression step of compressing the gradation of the image data of the training image and the image data of the correct image;
a processing step of applying the neural network for performing predetermined image processing to the image data obtained by compressing the gradation of the image data of the training image, thereby outputting image data on which the predetermined image processing has been performed; ,
a changing step of changing parameters of the neural network based on an error between the image data on which the predetermined image processing has been performed and the image data obtained by compressing the gradation of the image data of the correct image,
The number of bits representing pixel values inside the neural network is smaller than the number of bits representing pixel values of the image data of the training image;
A generation method is disclosed in which, in the gradation compression step, the gradation is compressed using the characteristic that more gradation is assigned as the brightness is lower.
(項目25)
コンピュータを、項目1乃至21のいずれか1項に記載の画像処理装置の各手段として機能させるためのプログラムが開示される。
(Item 25)
A program for causing a computer to function as each means of the image processing apparatus according to any one of
発明は上記実施形態に制限されるものではなく、発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、発明の範囲を公にするために請求項を添付する。 The invention is not limited to the embodiments described above, and various modifications and variations are possible without departing from the spirit and scope of the invention. Accordingly, the claims are appended to make public the scope of the invention.
100…撮像装置、102…撮像素子、104…画像処理装置、105…ROM、106…プロセッサ、107…RAM
DESCRIPTION OF
Claims (25)
前記階調圧縮手段によって階調が圧縮された画像データに対して、所定の画像処理を行うニューラルネットワークを適用することにより、前記所定の画像処理が行われた画像データを出力する処理手段と、
前記所定の画像処理が行われた画像データの階調を伸長する階調伸長手段と、を有し、
前記ニューラルネットワークの内部で画素値を表すビット数が前記第1の画像データの画素値を表すビット数よりも小さく、
前記階調圧縮手段は、明るさが低いほど多くの階調が割り当てられる特性を用いて階調を圧縮する、ことを特徴とする画像処理装置。 gradation compression means for compressing the gradation of the first image data;
processing means for applying a neural network for performing predetermined image processing to image data whose gradation has been compressed by said gradation compression means, thereby outputting image data on which said predetermined image processing has been performed;
a gradation decompression means for decompressing the gradation of the image data on which the predetermined image processing has been performed;
the number of bits representing pixel values inside the neural network is smaller than the number of bits representing pixel values of the first image data;
The image processing apparatus according to claim 1, wherein the gradation compression means compresses the gradation using a characteristic that more gradation is assigned as the brightness is lower.
前記階調圧縮手段は、前記取得手段によって取得された明るさに応じて、明るさが低いほど多くの階調が割り当てられる複数の特性のうちの異なる特性を用いて、前記第1の画像データの階調を圧縮する、ことを特徴とする請求項1に記載の画像処理装置。 further comprising acquisition means for acquiring the brightness of the first image data;
The gradation compression means compresses the first image data using a different characteristic among a plurality of characteristics in which more gradations are assigned as the brightness is lower, according to the brightness acquired by the acquisition means. 2. The image processing apparatus according to claim 1, wherein the gradation of is compressed.
前記階調圧縮手段は、画像データの明るさに対応した段階的に異なる前記複数の特性のうち、前記第1の画像データの明るさに対応する第1の特性に隣接する第2の特性を用いて前記第2の画像データの階調を圧縮する、ことを特徴とする請求項2に記載の画像処理装置。 The acquiring means acquires the brightness of the first image data captured at a first time and the brightness of the second image data captured at a second time after the first time. death,
The gradation compression means selects a second characteristic adjacent to the first characteristic corresponding to the brightness of the first image data, among the plurality of characteristics that differ in stages corresponding to the brightness of the image data. 3. The image processing apparatus according to claim 2, wherein the gradation of said second image data is compressed using a .
前記階調圧縮手段は、前記複数の特性のうち、前記選択された領域の明るさに対応する第3の特性を用いて、前記第1の画像データの階調を圧縮する、ことを特徴とする請求項2に記載の画像処理装置。 the acquiring means acquires brightness of a selected area from among a plurality of areas of the first image data;
The gradation compression means compresses the gradation of the first image data using a third characteristic corresponding to the brightness of the selected area among the plurality of characteristics. 3. The image processing apparatus according to claim 2.
訓練画像の画像データと正解画像の画像データの階調を圧縮する階調圧縮手段と、
前記訓練画像の画像データの階調を圧縮した画像データに対して、所定の画像処理を行う前記ニューラルネットワークを適用することにより、前記所定の画像処理が行われた画像データを出力する処理手段と、
前記所定の画像処理が行われた画像データと、前記正解画像の画像データの階調を圧縮した画像データとの誤差に基づいて、前記ニューラルネットワークのパラメータを変更する変更手段と、を有し、
前記ニューラルネットワークの内部で画素値を表すビット数が前記訓練画像の画像データの画素値を表すビット数よりも小さく、
前記階調圧縮手段は、明るさが低いほど多くの階調が割り当てられる特性を用いて階調を圧縮する、ことを特徴とする画像処理装置。 An image processing device for learning a neural network,
a gradation compression means for compressing the gradation of the image data of the training image and the image data of the correct image;
a processing means for outputting image data on which the predetermined image processing has been performed by applying the neural network for performing predetermined image processing to the image data obtained by compressing the gradation of the image data of the training image; ,
changing means for changing parameters of the neural network based on an error between the image data on which the predetermined image processing has been performed and the image data obtained by compressing the gradation of the image data of the correct image;
The number of bits representing pixel values inside the neural network is smaller than the number of bits representing pixel values of the image data of the training image;
The image processing apparatus according to claim 1, wherein the gradation compression means compresses the gradation using a characteristic that more gradation is assigned as the brightness is lower.
前記階調圧縮工程において階調が圧縮された画像データに対して、所定の画像処理を行うニューラルネットワークを適用することにより、前記所定の画像処理が行われた画像データを出力する処理工程と、
前記所定の画像処理が行われた画像データの階調を伸長する階調伸長工程と、を有し、
前記ニューラルネットワークの内部で画素値を表すビット数が前記第1の画像データの画素値を表すビット数よりも小さく、
前記階調圧縮工程では、明るさが低いほど多くの階調が割り当てられる特性を用いて階調を圧縮する、ことを特徴とする画像処理方法。 a gradation compression step of compressing the gradation of the first image data;
a processing step of applying a neural network that performs predetermined image processing to the image data whose gradation has been compressed in the gradation compression step, thereby outputting image data that has been subjected to the predetermined image processing;
a gradation decompression step of decompressing the gradation of the image data on which the predetermined image processing has been performed;
the number of bits representing pixel values inside the neural network is smaller than the number of bits representing pixel values of the first image data;
The image processing method, wherein in the gradation compression step, the gradation is compressed using a characteristic that more gradation is assigned as the brightness is lower.
訓練画像の画像データと正解画像の画像データの階調を圧縮する階調圧縮工程と、
前記訓練画像の画像データの階調を圧縮した画像データに対して、所定の画像処理を行う前記ニューラルネットワークを適用することにより、前記所定の画像処理が行われた画像データを出力する処理工程と、
前記所定の画像処理が行われた画像データと、前記正解画像の画像データの階調を圧縮した画像データとの誤差に基づいて、前記ニューラルネットワークのパラメータを変更する変更工程と、を含み、
前記ニューラルネットワークの内部で画素値を表すビット数が前記訓練画像の画像データの画素値を表すビット数よりも小さく、
前記階調圧縮工程では、明るさが低いほど多くの階調が割り当てられる特性を用いて階調を圧縮する、ことを特徴とする生成方法。 A method for generating a trained neural network in which each step is executed in an image processing device,
a gradation compression step of compressing the gradation of the image data of the training image and the image data of the correct image;
a processing step of applying the neural network for performing predetermined image processing to the image data obtained by compressing the gradation of the image data of the training image, thereby outputting image data on which the predetermined image processing has been performed; ,
a changing step of changing parameters of the neural network based on an error between the image data on which the predetermined image processing has been performed and the image data obtained by compressing the gradation of the image data of the correct image,
The number of bits representing pixel values inside the neural network is smaller than the number of bits representing pixel values of the image data of the training image;
The generating method, wherein in the gradation compression step, the gradation is compressed using a characteristic that more gradation is assigned as the brightness is lower.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US18/059,498 US20230179772A1 (en) | 2021-12-06 | 2022-11-29 | Image processing apparatus, image processing method, generation method and storage medium |
EP22210106.5A EP4191516A1 (en) | 2021-12-06 | 2022-11-29 | Image processing using a neural network with reduced precision |
CN202211578815.9A CN116233332A (en) | 2021-12-06 | 2022-12-05 | Image processing apparatus, image processing method, generation method, and storage medium |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021197872 | 2021-12-06 | ||
JP2021197872 | 2021-12-06 |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2023084092A true JP2023084092A (en) | 2023-06-16 |
Family
ID=86731826
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2022161834A Pending JP2023084092A (en) | 2021-12-06 | 2022-10-06 | Image processing device, image processing method, generation method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2023084092A (en) |
-
2022
- 2022-10-06 JP JP2022161834A patent/JP2023084092A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7570390B2 (en) | Image processing device and method | |
JP5105209B2 (en) | Image processing apparatus and method, program, and recording medium | |
US7023580B2 (en) | System and method for digital image tone mapping using an adaptive sigmoidal function based on perceptual preference guidelines | |
JP5476793B2 (en) | Method and apparatus for compressing dynamic range of original image and digital camera | |
US7298917B2 (en) | Image processing program product and device for executing Retinex processing | |
US20220036523A1 (en) | Image processor | |
US9058640B2 (en) | Image processing apparatus, image processing method and recording medium | |
CN100366052C (en) | Image processing device and method | |
US8159616B2 (en) | Histogram and chrominance processing | |
CN110717868B (en) | Video high dynamic range inverse tone mapping model construction and mapping method and device | |
JP2009071621A (en) | Image processor and digital camera | |
EP3452979B1 (en) | Low cost color expansion module for expanding colors of an image | |
WO2021148057A1 (en) | Method and apparatus for generating low bit width hdr image, storage medium, and terminal | |
KR20120016475A (en) | Image processing method and image processing apparatus | |
Yu et al. | Adaptive inverse hyperbolic tangent algorithm for dynamic contrast adjustment in displaying scenes | |
US10387999B2 (en) | Image processing apparatus, non-transitory computer-readable medium storing computer program, and image processing method | |
JP5410378B2 (en) | Video signal correction apparatus and video signal correction program | |
JP4208767B2 (en) | Image processing apparatus and image processing method | |
JP2004221645A (en) | Image processing apparatus and method therefor, recording medium, and program | |
JP2008294524A (en) | Image processor and image processing method | |
JP2023084092A (en) | Image processing device, image processing method, generation method, and program | |
US11829885B2 (en) | Image processing apparatus that performs machine learning of learning model, method of controlling image processing apparatus, and storage medium | |
EP4191516A1 (en) | Image processing using a neural network with reduced precision | |
JP2012010227A (en) | Image processing apparatus, and image processing method | |
US11625817B2 (en) | Pyramid-based tone mapping |