JP2021026451A - Image processor, image processing method, and program - Google Patents
Image processor, image processing method, and program Download PDFInfo
- Publication number
- JP2021026451A JP2021026451A JP2019143099A JP2019143099A JP2021026451A JP 2021026451 A JP2021026451 A JP 2021026451A JP 2019143099 A JP2019143099 A JP 2019143099A JP 2019143099 A JP2019143099 A JP 2019143099A JP 2021026451 A JP2021026451 A JP 2021026451A
- Authority
- JP
- Japan
- Prior art keywords
- image
- processed
- correction
- empty area
- unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims 3
- 238000012937 correction Methods 0.000 claims abstract description 85
- 238000012545 processing Methods 0.000 claims abstract description 69
- 238000000034 method Methods 0.000 claims description 99
- 230000008569 process Effects 0.000 claims description 77
- 238000013528 artificial neural network Methods 0.000 claims description 17
- 238000003384 imaging method Methods 0.000 claims description 8
- 238000004364 calculation method Methods 0.000 claims description 2
- 230000003247 decreasing effect Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 238000002834 transmittance Methods 0.000 description 8
- 239000010419 fine particle Substances 0.000 description 5
- 239000003595 mist Substances 0.000 description 5
- 230000009467 reduction Effects 0.000 description 5
- 238000010801 machine learning Methods 0.000 description 4
- 238000012549 training Methods 0.000 description 4
- 230000007423 decrease Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000004913 activation Effects 0.000 description 1
- 230000002238 attenuated effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000004576 sand Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
Description
本発明は、撮像画像における散乱光の影響を低減する画像処理技術に関する。 The present invention relates to an image processing technique for reducing the influence of scattered light on a captured image.
監視カメラなどの分野において、カメラから被写体までの間に存在する微粒子(例えば、霧や霞)の影響によってコントラストが低下し、撮像画像の画質が劣化することが問題となっている。この原因として、光が大気中を通過する際に、微粒子成分によって光が散乱することが挙げられる。このような散乱光により視認性が低下した画像に対して、散乱光による影響を除去する画像処理技術が知られている。 In fields such as surveillance cameras, there is a problem that the contrast is lowered due to the influence of fine particles (for example, fog and haze) existing between the camera and the subject, and the image quality of the captured image is deteriorated. The cause of this is that when light passes through the atmosphere, the light is scattered by the fine particle components. An image processing technique for removing the influence of scattered light on an image whose visibility is deteriorated due to such scattered light is known.
特許文献1は、霧除去処理として機械学習を用いる方法について説明している。具体的には、霧画像の領域が入力されると、学習モデルは領域に対応する透過率を生成し、学習モデルによって得られた透過率を用いて霧除去画像を生成する。 Patent Document 1 describes a method of using machine learning as a mist removal process. Specifically, when a region of the fog image is input, the learning model generates a transmittance corresponding to the region, and a fog removal image is generated using the transmittance obtained by the learning model.
被写体によって、霧や霞などの微粒子による影響を受けたことにより視認性の変化は異なる。例えば、テクスチャのある建物などはコントラストが低下する一方、テクスチャの少ない空領域では、色相が変化する。しかしながら上述の特許文献1による方法では、画像から透過率マップを出力するよう学習する際に、被写体によって視認性の変化の仕方が異なることを考慮しておらず、必ずしも適切な学習モデルを得られない。 The change in visibility differs depending on the subject due to the influence of fine particles such as fog and haze. For example, in a textured building, the contrast decreases, while in an empty area with less texture, the hue changes. However, in the method according to Patent Document 1 described above, when learning to output a transmittance map from an image, it is not considered that the way of changing the visibility differs depending on the subject, and an appropriate learning model can always be obtained. Absent.
そこで本発明は、画像に対して機械学習を用いて霧霞除去処理をする際に、霧霞によってコントラストが低下する被写体について適切に学習されたモデルを用いた処理を実現することを目的とする。 Therefore, an object of the present invention is to realize a process using a model appropriately learned for a subject whose contrast is lowered by the fog haze when performing a fog haze removal process on an image by using machine learning. ..
上記課題を解決するため本願発明は、処理対象の画像に対して、散乱光の影響の少なくとも一部を除去した補正画像を生成する画像処理装置であって、前記処理対象の画像に対して、空領域を含むか否かを判定する判定手段と、前記判定手段により、空領域を含まないと判定された画像に対して第1の補正処理を実行する第1の補正処理手段と、前記判定手段により、空領域を含むと判定された画像に対して第2の補正処理を実行する第2の補正処理手段とを有し、前記第1の補正処理手段が実行する前記第1の補正処理は、散乱光の影響の少ない空領域のみの画像を教師データとせず、散乱光の影響の少ない空以外の領域の画像を教師データとして学習したモデルを用いる処理であることを特徴とする。 In order to solve the above problems, the present invention is an image processing apparatus that generates a corrected image in which at least a part of the influence of scattered light is removed from the image to be processed, and the image to be processed is subjected to the present invention. A determination means for determining whether or not an empty area is included, a first correction processing means for executing a first correction process on an image determined not to include an empty area by the determination means, and the determination. The first correction process executed by the first correction processing means, which has a second correction processing means for executing a second correction process on an image determined to include an empty area by the means. Is a process using a model in which an image of only an empty region, which is less affected by scattered light, is used as training data, and an image of a region other than the sky, which is less affected by scattered light, is used as training data.
本発明は、画像に対して機械学習を用いて霧霞除去処理をする際に、霧霞によってコントラストが低下する被写体について適切に学習されたモデルを用いた処理を実現できる。 INDUSTRIAL APPLICABILITY The present invention can realize a process using a model appropriately learned for a subject whose contrast is lowered by the fog haze when performing a fog haze removal process on an image by using machine learning.
以下、添付の図面を参照して、本発明を好適な実施形態に基づいて詳細に説明する。なお、以下の実施形態において示す構成は一例にすぎず、本発明は図示された構成に必ずしも限定されるものではない。 Hereinafter, the present invention will be described in detail with reference to the accompanying drawings, based on preferred embodiments. The configuration shown in the following embodiments is only an example, and the present invention is not necessarily limited to the illustrated configuration.
<第1の実施形態>
第1の実施形態では、画像に対して霧霞除去処理を実行する画像処理装置について説明する。なお、霧霞除去処理とは、霧や霞などの微粒子成分による散乱光の影響を受けて、コントラストが低下した画像に対して、散乱光の影響を低減する処理のことを意味する。本実施形態においては、画像のうち空領域は予め設定されたパラメータを用いて画素ごとに補正し、空領域以外の領域に対しては霧霞のない画像と霧霞のある画像との相関を学習することによって得られる学習モデルのパラメータを用いて補正する。
<First Embodiment>
In the first embodiment, an image processing apparatus that executes fog haze removal processing on an image will be described. The fog haze removal process means a process of reducing the influence of scattered light on an image whose contrast is lowered due to the influence of scattered light by fine particle components such as fog and haze. In the present embodiment, the empty area of the image is corrected for each pixel using a preset parameter, and the correlation between the image without fog haze and the image with fog haze is obtained for the area other than the empty area. Correction is performed using the parameters of the training model obtained by training.
図1は、本実施形態の画像処理装置100のハードウェア構成を示すブロック図である。本実施例の画像処理装置100は、CPU101、RAM102、ROM103、HDD I/F104、HDD105、入力I/F106、出力I/F107、システムバス108を有している。CPU101は、以下に述べる各構成を統括的に制御するプロセッサである。RAM102はCPU101の主メモリ、ワークエリアとして機能するメモリであり、ROM103は、画像処理装置100内での処理を司るプログラムを格納するメモリである。
FIG. 1 is a block diagram showing a hardware configuration of the
HDD I/F104は、例えばシリアルATA(SATA)等のインタフェースであり、二次記憶装置としてのHDD105をシステムバス108に接続する。CPU101は、HDD I/F104を介してHDD105からのデータ読み出し、およびHDD105へのデータ書き込みが可能である。さらにCPU101は、HDD105に格納されたデータをRAM102に展開し、同様に、RAM102に展開されたデータをHDD105に保存することが可能である。そしてCPU101は、RAM102に展開したデータをプログラムとみなし、実行することができる。なお、二次記憶装置はHDDの他、光ディスクドライブ等の記憶デバイスでもよい。入力I/F106は、例えばUSBやIEEE1394等のシリアルバスインタフェースである。
The HDD I / F 104 is an interface such as a serial ATA (SATA), and connects the
画像処理装置100は、入力I/F106を介して、外部メモリ109および撮像部111に接続されている。CPU101は、入力I/F106を介して、外部メモリ109および撮像部111からデータを取得することができる。出力I/F107は、例えばDVIやHDMI(登録商標)等の映像出力インタフェースである。画像処理装置100は出力I/F107を介して表示部110と接続されている。CPU101は、出力I/F107を介して表示部110に画像を出力し、出力した画像を表示部110に表示することができる。
The
システムバス108は、各種データの転送経路であり、画像処理装置100内の各構成部はシステムバス108を介して相互に接続されている。
The
外部メモリ109はハードディスク、メモリカード、CFカード、SDカード、USBメモリなどの記憶媒体であり、画像処理装置100で処理された画像データなどを保存することができる。表示部110は、ディスプレイなどの表示装置であり、画像処理装置100で処理された画像などを表示することができる。
The
撮像部111は、被写体の光情報をセンサで受光し、取得した画像をデジタルデータとして出力するカメラである。撮像部111が撮像することで得られた撮像画像においては、霧霞などが発生したシーンなど散乱光の影響によりコントラストが低下してしまっている場合がある。本実施形態では、撮像部111が撮像した画像に対して霧霞除去処理を実行することで、散乱光の影響が低減された画像を生成することができる。
The
図2は、本実施形態における画像処理装置100の詳細な論理構成を示すブロック図である。画像処理装置100は、霧霞除去処理を実行する霧霞除去処理部200と学習用データを生成するための学習用データ生成部201によって構成される。
FIG. 2 is a block diagram showing a detailed logical configuration of the
まず、学習用データ生成部201について説明する。学習用データ生成部201は、機械学習を行う学習モデルのパラメータを最適化するための生徒データと教師データのペアである学習用データを生成する。学習モデルとは、入力された生徒データから生徒データに対応する霧霞低減画像を出力するニューラルネットワークに基づくネットワーク構造とそのパラメータとする。本実施形態における学習モデルは、霧霞による散乱光の影響を受けた画像から霧霞による散乱光の影響を低減した画像を推定する処理を行うモデルである。生徒データは、霧霞によりコントラストが低下している画像から生成される。また、教師データは、生徒データである画像において霧霞によるコントラスト低下がなかった場合の霧霞低減画像から生成される。
First, the learning
学習用データ生成201は、学習用画像取得部202、ブロック分割部203、領域判定部204、学習部205を有する。学習用画像取得部202は、同じシーンを同じ位置から同じ撮像条件により撮像した2つの画像を取得する。図3(a)は、学習用画像取得部202が取得する画像の一部を示す図である。このとき取得する2つの画像は、同じ位置から同じ風景を晴天時に撮像した晴天画像と、霧霞等が発生し散乱光による影響下で撮像した霧霞画像である。なおここでは、晴天画像と霧霞画像は同じ撮像条件(露出、画角など)で撮像されたものとする。また、晴天画像および霧霞画像はいずれもR(レッド)、G(グリーン)、B(ブルー)のプレーンからなるカラー画像である。学習用画像取得部202は、このような晴天画像と霧霞画像とのペアを複数、取得する。
The
ブロック分割部203は、取得した晴天画像と霧霞画像とのペアを分割し、ブロック画像を出力する。ブロック分割部203は、後述するように、学習部204におけるニューラルネットワークの入力層のノード数に応じて、画像をブロックに分割する。ブロック分割部203は、分割したブロック画像のペアを順に領域判定部204に出力する。領域判定部204は、処理対象のブロックペアのうち晴天画像から抽出されたブロックに基づいて、空領域を含むか否かを判定する。領域判定部204は、空領域を含むと判定したブロックは学習部204に出力せず、空領域を含まないと判定したブロックは学習部205に出力する。
The
学習部205は、ブロック分割部203から出力された空領域を含まないブロック画像のペアを用いて、内部に保持するニューラルネットワークのパラメータの学習を行う。
The
ここでニューラルネットワークについて説明する。図4は、ニューラルネットワークを説明する図である。図4では説明を簡単にするため中間層を1層としているが、2層以上で中間層を構成することが望ましい。図4に示すニューラルネットワークでは、入力層はMi個のノード(n11、n12、…、n1Mi)を有し、中間層はMh個のノード(n21、n22、…、n2Mh)を有し、出力層(最終層)はMo個のノード(n31、n32、…、n3Mo)を有している。そして、各層のノードは隣接する層の全てのノードと結合しており、階層間で情報伝達を行う3層の階層型ニューラルネットワークを構成している。 Here, the neural network will be described. FIG. 4 is a diagram illustrating a neural network. In FIG. 4, the intermediate layer is one layer for the sake of simplicity, but it is desirable that the intermediate layer is composed of two or more layers. In the neural network shown in FIG. 4, the input layer has Mi nodes (n11, n12, ..., N1Mi), the intermediate layer has Mh nodes (n21, n22, ..., N2Mh), and the output layer. The (final layer) has Mo nodes (n31, n32, ..., N3Mo). The nodes of each layer are connected to all the nodes of the adjacent layers, and form a three-layer hierarchical neural network that transmits information between the layers.
入力層に画像を入力する場合、該入力層には、入力される画素とノードとが1対1となるように、入力する画素数分のノードを設ける。また、出力層においても出力する画素数分のノードが設定されている。つまり本実施形態においては、16画素×16画素のブロック画像が入力され、16画素×16画素の画素値を出力するので、入力層および出量層におけるノードは256個である。データは、図4の左から右へ、即ち、入力層、中間層、出力層の順で受け渡される。入力層の各ノードは中間層のすべてのノードに接続され、ノード間の接続はそれぞれ重みを持っている。一方のノードから結合を通して他方のノードに伝達される際の出力値は、結合の重みによって増強あるいは減衰される。このような接続に定められた重み係数、バイアス値の集合は学習モデルのパラメータである。なお活性化関数については特に限定しないが、ロジスティックシグモイド関数やRectified Linear Unit(ReLU)関数などを用いれば良い。学習方法としては、種々提案されているニューラルネットワークの学習方法を適用できる。例えば、入力層に生徒データを入力してニューラルネットワークを動作させた場合に出力層から得られる出力と、該生徒データに予め対応づけられている教師データと、の差分を計算し、該差分を極小化するように、重み係数及びバイアス値を調整する。このような学習処理によって生成される重み係数及びバイアス値が、学習モデルのパラメータである。本実施形態における学習部205は、霧霞画像を生徒データとし、晴天画像を教師データとするため、霧霞による散乱光の影響を受けた画像から散乱の影響を低減した画像を推定する学習モデルのパラメータを生成する。
When an image is input to the input layer, the input layer is provided with nodes for the number of pixels to be input so that the input pixels and the nodes are one-to-one. Also, in the output layer, nodes for the number of pixels to be output are set. That is, in the present embodiment, since the block image of 16 pixels × 16 pixels is input and the pixel value of 16 pixels × 16 pixels is output, the number of nodes in the input layer and the output layer is 256. Data is passed from left to right in FIG. 4, that is, in the order of input layer, intermediate layer, and output layer. Each node in the input layer is connected to all the nodes in the middle layer, and the connections between the nodes have their own weights. The output value transmitted from one node through the join to the other node is enhanced or attenuated by the weight of the join. The set of weighting factors and bias values defined for such a connection is a parameter of the learning model. The activation function is not particularly limited, but a logistic sigmoid function, a Rectifier Unit (ReLU) function, or the like may be used. As a learning method, various proposed neural network learning methods can be applied. For example, the difference between the output obtained from the output layer when the student data is input to the input layer and the neural network is operated and the teacher data associated with the student data in advance is calculated, and the difference is calculated. Adjust the weighting coefficient and bias value to minimize it. The weighting coefficient and the bias value generated by such a learning process are parameters of the learning model. Since the
次に、学習用データ生成部201における学習処理の流れを、詳細に説明する。図5は、学習処理のフローチャートである。CPU101が、図5に示すフローチャートを実現可能なプログラムを読み出し実行することで、各構成(機能)が実現される。なお以下においては、フローチャートにおける各工程(ステップ)を、「S」と付して説明する。
Next, the flow of the learning process in the learning
S501において学習用画像取得部202は、メモリ(不図示)から学習用に用意された1組の画像を取得する。上述の通りここでは、同じ位置から同じ風件を晴天時に撮像した晴天画像と、霧霞等が発生し散乱光による影響下で撮像した霧霞画像とを取得する。例えば所定の位置に設置された固定の監視カメラが撮像した画像が格納された外部のメモリから、天気予報を参照して2つの画像データを取得するようにしてもよい。この場合は、異なる複数の監視カメラが撮像した画像から、画像ペアを取得すると良い。
In S501, the learning
S502においてブロック分割部203は、1組の画像をブロックに分割する。本実施形態においては、画像における左上から、16画素×16画素のブロック画像を順に抽出する。図3(b)は、ブロック分割部203が分割するブロックを説明する図である。図3(b)に示すように、タイル状に画像をブロックに分割し、1つの画像から複数のブロック画像を抽出する。ブロック分割部203は、晴天画像と、対応する霧霞画像とにおいて、同じ位置から抽出された2つのブロックを1つのブロックペアとして領域判定部204に出力する。
In S502, the
S503において領域判定部204は、取得したブロック画像のペアのうち晴天画像のブロック画像が空領域を含むか否かを判定する。空領域か否かを判定する方法は、公知の技術を適用すればよい。本実施形態では、ブロックにおける各画素のR,G,Bの画素値から色相を算出し、予め設定された空の可能性が高い色相の範囲か否かを判定する。領域判定部204は、ブロックにおいて空領域の画素であると判定した画素の数を算出し、空領域の画素の数が所定の閾値以上であれば、ブロック画像が空領域を含むと判定し、S504はスキップしてS505に進む。また、空領域の画素の数が所定の閾値未満であれば、領域判定部204は、ブロック画像は空領域を含まないと判定してS504に進む。
In S503, the
S504において領域判定部204は、空領域を含まないと判定されたブロック画像のペアのみを学習部205に出力する。S505において領域判定部204は、取得したブロック画像の全てに対して領域判定を行ったか否かを判定する。全てのブロック画像に対して領域判定をしていればS506に、未処理のブロック画像がある場合は、S503に戻る。また、S506において学習用画像取得部202は、全ての学習用画像を取得したか否かを判定する。全ての学習用画像を取得済であれば、S507に進み、未取得の学習用画像があればS501に戻る。
In S504, the
S507において学習部205は、入力された学習用データを用いて散乱の影響を低減した画像を推定する学習モデルのパラメータを生成する。S508において学習部205は生成した学習モデルのパラメータを、後述する第1の補正部209に出力する。
In S507, the
ここから、実際に霧霞除去を実行する霧霞除去処理部200について説明する。まず、画像入力部206は、霧霞により散乱の影響を除去したい処理対象の画像を入力する。ブロック分割部207は、処理対象の画像をブロックごとに分割する。本実施形態においてブロック分割部207は、ブロック分割部203が抽出したブロック画像のサイズと同じサイズのブロックに分割する。領域判定部208は、処理対象のブロックが空領域を含むか否かを判定する。領域判定部208は、空領域を含まないブロックは第1の補正部209に、空領域を含むブロックは第2の補正部210に出力する。
From here, the fog haze
第1の補正部209は、ニューラルネットワークを備える。ここで第1の補正部209は、学習部205と同じネットワーク構造を持つ。さらにニューラルネットワークにおける各重み係数やバイアス値は、学習部205から出力されたパラメータに従って設定されている。つまり第2の補正部209は、空領域を含まない画像を用いて学習した霧霞による影響を除去するモデルに基づいて、処理対象のブロックに対して補正処理を実行する。第1の補正部209は、処理対象の画像から霧霞による影響を除去した、本来のコントラストの画像を推定し、補正済ブロックを出力する。
The
第2の補正部210は、処理対象のブロックに含まれる各画素について、順に所定のアルゴリズムに従った演算処理を実行し、空領域を含むブロックの補正済ブロックを出力する。本来霧霞の影響を受けると、霧霞の影響がない場合の画像に比べてコントラストは低下することが知られている。ただし空領域は複雑なテクスチャ成分は含まれていない場合が多く、霧霞除去処理としてコントラストを拡大すると、S/N比が低下してしまう。そこで本実施形態では、第2の補正部210は、空領域に適した補正処理を実行する。
The
出力画像生成部211は、第1の補正部209から出力されたブロック画像と、第2の補正部210から出力されるブロック画像とを蓄積して1枚の画像を生成し、出力する。
The output
霧霞除去処理部200が実行する霧霞除去処理の流れを、詳細に説明する。図6は、霧霞除去処理のフローチャートである。CPU101が、図6に示すフローチャートを実現可能なプログラムを読み出し実行することで、各構成(機能)が実現される。
The flow of the mist haze removal process executed by the mist haze
まずS601において画像入力部206は、処理対象の画像を入力する。ここでは学習用画像データと同様、R,G,Bのプレーンからなるカラー画像を処理対象の画像とする。S602においてブロック分割部203は、処理対象の画像を分割する。本実施形態においては、処理対象の画像を16画素×16画素のブロックに分割する。
First, in S601, the
S603において領域判定部208は、処理対象のブロックが空領域を含むか否かを判定する。ここでは上述したS503における領域判定部204と同様の方法により、ブロックに対する領域判定を行う。領域判定部208は、ブロックが空領域を含むと判定した場合は、S604に進みブロック画像を第1の補正部209に出力する。また領域判定部208は、ブロックが空領域を含まないと判定した場合は、S605に進みブロック画像を第2の補正210に出力する。
In S603, the
S605において第1の補正部209は、入力されたブロック画像に対して第1の補正処理を実行する。ここで第1の補正処理とは、霧霞除去画像を推定する学習モデルに基づくパラメータが設定されたニューラルネットワークによる処理のことである。この処理により、ブロック画像は、コントラストが拡大した霧霞による影響が低減された補正済ブロックに変換される。
In S605, the
S607において第2の補正部210は、入力された空領域を含むブロック画像に対して第2の補正処理を実行する。本実施形態において第2の補正処理は、彩度補正処理を実行する。第2の補正部210は、処理対象のブロックに含まれる画素を順に注目画素とし、まず、注目画素のR,G,Bの画素値をYCbCr色空間に変換する。色空間の変換処理は、公知の計算式を用いて実行する。第2の補正部201は、Cb、Cr成分に対して所定のゲインを乗算する。
In S607, the
S608において領域判定部208は、処理対象の画像においてすべてのブロックに対して判定処理を実行したか否かを判定し、未処理ブロックがある場合には、S603に戻る。すべてに対する判定処理が完了していれば、S609に進む。
In S608, the
S609において出力画像生成部211は、処理対象の画像において補正済ブロックのデータを蓄積し、1つの補正画像を生成し、出力する。以上で霧霞除去処理は完了する。
In S609, the output
以上の通り本実施形態においては、画像のうち空領域を含まない被写体領域に対しては、教師あり学習によって得られる学習モデルを用いて散乱光による影響を低減した補正画像を生成する。一方、空領域に対しては彩度補正処理によって散乱光による影響を低減した補正画像を生成する。 As described above, in the present embodiment, a corrected image in which the influence of scattered light is reduced is generated by using a learning model obtained by supervised learning for a subject area that does not include an empty area in the image. On the other hand, for the empty region, a corrected image in which the influence of scattered light is reduced is generated by the saturation correction processing.
通常、散乱光による影響を受けると、空領域以外の領域においては、コントラストが低下する。そのため、散乱光による影響を除去した画像は、散乱光による影響を受けた画像よりもコントラストを拡大する補正処理であることが望ましい。そこで、コントラストが低下した画像と低下していない画像とのペアを用いて、低下していない画像を推定する学習モデルを使った補正処理は、空以外の領域に対しては好適である。しかしながら空領域においては、もともとテクスチャ成分がないため、コントラストを拡大するとノイズ成分の増大により画質が劣化してしまう場合がある。晴天画像を教師データとして教師あり学習したモデルを空領域にも適用すると、コントラストの拡大によって空領域の画質が低下してしまう。すなわち空領域に対しては、学習したモデルを用いた補正処理ではなく、空領域に適した彩度補正処理を実行することで、より良好な散乱光の影響を低減した補正画像を生成することができる。 Normally, when affected by scattered light, the contrast decreases in regions other than the empty region. Therefore, it is desirable that the image from which the influence of the scattered light is removed is a correction process that enlarges the contrast as compared with the image affected by the scattered light. Therefore, the correction process using the learning model for estimating the image without reduction by using the pair of the image with reduced contrast and the image without reduction is suitable for the region other than the sky. However, in the empty region, since there is originally no texture component, the image quality may deteriorate due to the increase in the noise component when the contrast is increased. When a model trained with supervised learning using a clear sky image as teacher data is applied to an empty area, the image quality of the empty area deteriorates due to the expansion of contrast. That is, for the empty region, instead of the correction processing using the learned model, the saturation correction processing suitable for the empty region is executed to generate a corrected image with better reduced influence of scattered light. Can be done.
また、空領域における散乱光による影響と、空以外の領域における散乱光による影響とは異なる。例えば、空領域であれば、晴天の場合は青っぽく、散乱光による影響を受けると灰色っぽく撮像される。従って空領域においては、霧霞除去処理によって灰色などの無彩色は青っぽく補正されることが望ましい。一方、空以外の領域においては、建造物など被写体自身が灰色である物体もある。そのため空以外の領域においては、必ずしも霧霞画像において灰色であっても、霧霞除去処理の結果、青色に補正されることが望ましいとは限らない。そのため、晴天画像を教師データとして、霧霞画像から霧霞の影響を除去した画像を推定するモデルを学習する際には、空以外の領域の画像を用いて学習することで、空領域以外における学習モデルをより適切に習得することができる。 In addition, the effect of scattered light in the sky region is different from the effect of scattered light in regions other than the sky. For example, in the case of an empty region, the image is bluish in fine weather and grayish when affected by scattered light. Therefore, in the empty region, it is desirable that the achromatic color such as gray is corrected to be bluish by the fog haze removal treatment. On the other hand, in areas other than the sky, there are objects such as buildings whose subject itself is gray. Therefore, in a region other than the sky, even if it is gray in the fog haze image, it is not always desirable to correct it to blue as a result of the fog haze removal process. Therefore, when learning a model that estimates an image obtained by removing the influence of fog haze from a fog haze image using a clear sky image as teacher data, by learning using an image in a region other than the sky, it is possible to use an image in a region other than the sky. You can learn the learning model more appropriately.
<第2の実施形態>
第1の実施形態では、処理対象の画像に対して空領域を含むか否かを判定し、第1の補正処理と第2の補正処理を切り替える方法について説明した。本実施形態では、処理対象の画像を撮像した撮像装置が設置された位置情報および、姿勢情報を取得することで、補正処理を制御する方法について説明する。なお第1の実施形態と同一の構成については、同じ符号を付し、説明を省略する。
<Second embodiment>
In the first embodiment, a method of determining whether or not an empty area is included in the image to be processed and switching between the first correction process and the second correction process has been described. In the present embodiment, a method of controlling the correction process by acquiring the position information and the posture information in which the image pickup device that has captured the image to be processed is installed will be described. The same components as those in the first embodiment are designated by the same reference numerals, and the description thereof will be omitted.
本実施形態における霧霞除去処理部700は、第1の実施形態に加えて、位置情報取得810、姿勢情報取得部711、画像判定部712を有する。位置情報取得部710は、図8に示すグラフィカルユーザーインターフェース(GUI)をユーザに表示させ、ユーザからの入力を受け付ける。これにより位置情報取得部710は、撮像部111が屋内に設置されているか、屋外に設置されているか否かを示す屋内外情報を位置情報として取得する。
In addition to the first embodiment, the fog haze removing
姿勢情報取得部711は、処理対象画像を撮影した時の撮像部111の姿勢を示す情報を取得する。ここでは姿勢情報取得部711は、撮像部111から、撮像部111の仰角方向に関する情報を姿勢情報として取得する。すなわち、撮像部111には、仰角方向の角度を検出可能な角度センサ(不図示)が内蔵されており、処理対象の画像を霧霞除去処理部700に転送する際には、角度センサの角度情報も一緒に転送する。
The posture
画像判定部712は、処理対象の画像に空領域が含まれる可能性があるか否かを判定する。判定結果に応じて、処理対象の画像を、ブロック分割部207、第1の補正部209、第2の補正部210のいずれかに出力する。
The
霧霞除去処理部700が実行する霧霞除去処理の流れを、詳細に説明する。なお、第1の補正部209におけるニューラルネットワークのパラメータは、第1の実施形態と同様の学習方法により調整されたパラメータによって更新されている。図9は、霧霞除去処理のフローチャートである。
The flow of the mist haze removal process executed by the mist haze
S901において霧霞除去処理部700は、処理対象の画像を取得する。S902において位置情報取得部710は、表示部110に図8に示す画像を表示させる。S903において位置情報取得部710は、ユーザがGUIを介して屋外か屋内のいずれかを選択した結果を示す屋内外情報を取得する。
In S901, the fog haze
S905において姿勢情報取得部711は、撮像部111から、撮像部111の仰角方向に関する情報を姿勢情報として取得する。なお本実施形態において姿勢情報取得部711は、撮像部111が真下の地面方向を向いている場合を−90度とし、水平方向を0度、真上の天井や空方向を向いている場合は90度として、仰角方向の角度を取得する。
In S905, the posture
S905において画像判定部712は、位置情報や姿勢情報に基づいて、処理対象の画像に空領域が含まれる可能性があるか否かを判定する。ユーザ入力により、屋内が選択された場合、および屋外が選択され、かつ姿勢情報が−45〜−90を示す場合は、処理対象の画像は空領域を含まないと判定する。これは屋外で撮像された画像であっても、撮像方向が地面や床を向いていて、空領域を含んでいる可能性が低いためである。処理対象の画像は空領域を含まないと判定すると、次に画像判定部712はS911に進み、処理対象の画像を第2の補正部210に出力する。また、屋外が選択され、かつ姿勢情報が−45〜90度を示す場合は、空領域を含むと判定する。画像が空領域を含むと判定すると画像判定部712は、S906に進む。
In S905, the
S906において画像判定部712はさらに、処理対象の画像が空領域のみか否かを判定する。本実施形態では画像判定部712は、カラー画像における画素値から色相を算出し、保存しておく。さらに画像判定部712は、各画素の色相が空と認定される範囲にある画素の数をカウントし、所定の比率、例えば95%以上の画素が空の色相である場合には、空領域のみであると判定する。画像判定部712は空領域のみの画像である場合には、S907に進み、処理対象の画像を第1の補正部209に出力する。一方、空領域は含むが空領域のみではないと判定した場合には、画像判定部712はS909に進む。
In S906, the
S909、S910については、第1実施形態におけるS902、S903と同様の処理である。ただし、S903においては、領域判定部208は、各画素の色相を算出せず、画像判定部712が算出し、記憶した各画素の色相を参照すればよい。
S909 and S910 are the same processes as S902 and S903 in the first embodiment. However, in S903, the
S907において第2の補正部210には、空領域を含むブロック画像または、空領域のみの画像を入力される。S908において第2の補正部210は、入力された画像に対して第2の補正処理を実行する。
In S907, a block image including an empty area or an image of only an empty area is input to the
S911において第1の補正部210には、空領域を含まないブロック画像または、空領域を含まない画像が入力される。S912において第1の補正部209は、入力された画像に対して、第1の補正処理を実行する。S913において、全ての画素に対する補正処理が完了すると、出力画像生成部211は、補正画像を出力する。
In S911, a block image that does not include an empty area or an image that does not include an empty area is input to the
以上の通り本実施形態においては、位置情報や姿勢情報に応じて、画像に対する霧霞除去処理を制御する。霧霞除去処理としては3つの方法に分類され、いずれかの方法によって画像は処理される。1つ目は、画像に対して画素ごとに演算処理を実行する補正処理を実行する方法であり、2つ目は、画像に対してニューラルネットワークを使った補正処理を実行する方法であり、3つ目は、ブロックに応じて1つ目の方法と2つ目の方法を切り替える方法である。例えば、監視カメラの場合は、一度設置されるとしばらく固定であることが多く、特に屋内に設置されている場合にはその監視カメラが撮像した画像に空領域が含まれる可能性は低い。そこで本実施形態ではまず、屋内外の情報や姿勢情報に基づいて、処理対象の画像が空領域を含むか否かを判定することとした。これにより、空領域のみ、あるいは空領域を含まない場合は、ブロック分割や領域判定処理を実行せず、それぞれの場合に適した補正処理を実行することができる。これにより、処理の負荷を軽減することができる。なお、画像判定部710による処理は、処理対象の画像が入力される度に実行しなくてもよい。設置位置が変更された場合や設定のリセットが実行された場合にのみ実行し、それ以外の場合には1度判定した結果を流用してもよい。
As described above, in the present embodiment, the fog haze removal process for the image is controlled according to the position information and the posture information. The fog haze removal process is classified into three methods, and the image is processed by one of the methods. The first is a method of executing a correction process for executing arithmetic processing for each pixel on an image, and the second is a method of executing a correction process using a neural network on an image. The second is a method of switching between the first method and the second method according to the block. For example, in the case of a surveillance camera, once it is installed, it is often fixed for a while, and especially when it is installed indoors, it is unlikely that the image captured by the surveillance camera contains an empty area. Therefore, in the present embodiment, it is first determined whether or not the image to be processed includes an empty area based on indoor / outdoor information and posture information. As a result, when only the empty area or not including the empty area, the block division and the area determination process are not executed, and the correction process suitable for each case can be executed. As a result, the processing load can be reduced. The process by the
<その他の実施形態>
上述の実施形態においては、晴天画像を教師データとして、霧霞画像から霧霞を低減した画像を推定するモデルを学習する場合について、説明した。しかしながら、機会学習を用いた補正処理は、他の方法もある。例えば、霧霞画像を生徒データ、霧霞画像に対応する透過率マップを教師データとして学習することで、霧霞画像から透過率マップを推定する学習モデルを学習するようにしてもよい。このような学習モデルのパラメータが設定された補正処理を実行する場合はまず、ニューラルネットワークを介して処理対象の画像に対応する透過率マップを推定する。その後、透過率マップを参照して処理対象の画像における画素ごとにコントラスト調整する処理を実行すればよい。透過率マップを用いた霧霞除去処理については、公知であるため説明を省略する。
<Other Embodiments>
In the above-described embodiment, a case of learning a model for estimating an image in which fog haze is reduced from a fog haze image has been described using a clear sky image as teacher data. However, there are other methods for correction processing using opportunity learning. For example, a learning model for estimating the transmittance map from the fog haze image may be learned by learning the fog haze image as student data and the transmittance map corresponding to the fog haze image as teacher data. When executing the correction process in which the parameters of such a learning model are set, first, the transmittance map corresponding to the image to be processed is estimated via the neural network. After that, the process of adjusting the contrast for each pixel in the image to be processed may be executed with reference to the transmittance map. Since the fog haze removal treatment using the transmittance map is known, the description thereof will be omitted.
上述の実施形態においては、ブロックごとに空領域か否かを判定し、ブロックごとに第1または第2の補正処理を実行する形態を例に説明した。しかしながら、必ずしも矩形のブロックごとの処理ではなくても良い。例えば公知の意味的領域分割によって、空領域と空以外の領域に分割し、空領域のみを抽出した画像には第2の補正処理を、空以外の領域のみを抽出した画像に対しては第1の補正処理を実行するようにしてもよい。 In the above-described embodiment, a mode in which it is determined whether or not the area is empty for each block and the first or second correction process is executed for each block has been described as an example. However, the processing does not necessarily have to be for each rectangular block. For example, it is divided into an empty region and a non-empty region by a known semantic region division, and a second correction process is performed on an image in which only an empty region is extracted, and a second correction process is performed on an image in which only a non-empty region is extracted. The correction process of 1 may be executed.
また第1実施形態の説明においては、処理対象の画像には、空領域と空以外の領域が混在していることを前提に説明した。しかしながら、画像に空領域が含まれない場合には、画像における全領域に対して第1補正処理を実行することになる。 Further, in the description of the first embodiment, it has been described on the premise that the image to be processed contains a mixture of an empty area and a non-empty area. However, if the image does not include an empty area, the first correction process is executed for the entire area in the image.
上述の実施形態では、晴天画像と霧霞画像とのペアを学習用画像として用いる例について説明した。しかしながら、同じ位置から同じ撮像条件において撮像した2つの画像がない場合もある。例えば、霧霞画像に対して、ダークチャンネル法などの公知の霧霞除去処理を用いて霧霞を低減した画像を生成し、教師データとしてもよい。 In the above-described embodiment, an example in which a pair of a clear sky image and a fog haze image is used as a learning image has been described. However, there may be no two images captured from the same position under the same imaging conditions. For example, an image in which the fog haze is reduced by using a known fog haze removal process such as a dark channel method may be generated for the fog haze image and used as teacher data.
また、領域の判定処理として、カラー画像における画素値から色相を算出する方法について説明したが、例えば画像に対応する距離画像を用いて空領域か否かを判定してもよい。 Further, as the region determination processing, a method of calculating the hue from the pixel value in the color image has been described, but for example, it may be determined whether or not the region is an empty region by using a distance image corresponding to the image.
なお、これまでの説明において、散乱光を発生させる要因として、霧や霧を例に挙げて説明したが、黄砂、PM2.5等の他の微粒子成分による散乱光によってコントラストが低下した画像に対しても同様に適用することができる。 In the above description, fog and fog have been described as examples of factors that generate scattered light, but for images whose contrast is reduced by scattered light due to other fine particle components such as yellow sand and PM2.5. Can be applied in the same way.
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。入力I/F106は、例えばUSBやIEEE1394等のシリアルバスインタフェースである。 The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by the processing to be performed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions. The input I / F 106 is a serial bus interface such as USB or IEEE1394.
202 学習用画像取得部
203 ブロック分割部
204 領域判定部
205 学習部
206 画像入力部
207 ブロック分割部
208 領域判定部
209 第1の補正部
210 第2の補正部
211 出力画像生成部
202 Learning
Claims (12)
前記処理対象の画像に対して、空領域を含むか否かを判定する判定手段と、
前記判定手段により、空領域を含まないと判定された画像に対して第1の補正処理を実行する第1の補正処理手段と、
前記判定手段により、空領域を含むと判定された画像に対して第2の補正処理を実行する第2の補正処理手段とを有し、
前記第1の補正処理手段が実行する前記第1の補正処理は、散乱光の影響の少ない空領域のみの画像を教師データとせず、散乱光の影響の少ない空以外の領域の画像を教師データとして学習したモデルを用いる処理であることを特徴とする画像処理装置。 An image processing device that generates a corrected image in which at least a part of the influence of scattered light is removed from the image to be processed.
A determination means for determining whether or not an empty area is included in the image to be processed,
A first correction processing means that executes the first correction processing on an image determined not to include an empty area by the determination means, and
It has a second correction processing means for executing a second correction processing on an image determined to include an empty area by the determination means.
In the first correction process executed by the first correction processing means, the image of only the sky region less affected by the scattered light is not used as the teacher data, and the image of the region other than the sky less affected by the scattered light is used as the teacher data. An image processing device characterized in that it is a process using a model learned as.
前記処理対象の画像が空領域を含まないと判定した場合は、前記処理対象の画像は前記第1の補正処理手段による前記第1の補正処理のみが実行されることを特徴とする請求項1乃至3の何れか一項に記載の画像処理装置。 The determination means determines the image to be processed and determines the image.
Claim 1 is characterized in that, when it is determined that the image to be processed does not include an empty area, only the first correction process by the first correction processing means is executed for the image to be processed. The image processing apparatus according to any one of 3 to 3.
前記処理対象の画像に対して、空領域を含むか否かを判定し、
空領域を含まないと判定された画像に対しては、散乱光の影響の少ない空領域のみの画像を教師データとせず、散乱光の影響の少ない空以外の領域の画像を教師データとして学習したモデルを用いる第1の補正処理を実行し、
空領域を含むと判定された画像に対して第2の補正処理を実行する画像処理方法。 An image processing method for generating a corrected image in which at least a part of the influence of scattered light is removed from the image to be processed.
It is determined whether or not the image to be processed includes an empty area, and the image is determined.
For the image determined not to include the empty region, the image of only the empty region less affected by the scattered light was not used as the teacher data, and the image of the region other than the sky less affected by the scattered light was learned as the teacher data. Perform the first correction process using the model and
An image processing method for executing a second correction process on an image determined to include an empty area.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019143099A JP7406886B2 (en) | 2019-08-02 | 2019-08-02 | Image processing device, image processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019143099A JP7406886B2 (en) | 2019-08-02 | 2019-08-02 | Image processing device, image processing method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021026451A true JP2021026451A (en) | 2021-02-22 |
JP7406886B2 JP7406886B2 (en) | 2023-12-28 |
Family
ID=74663035
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019143099A Active JP7406886B2 (en) | 2019-08-02 | 2019-08-02 | Image processing device, image processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7406886B2 (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160005152A1 (en) * | 2014-07-01 | 2016-01-07 | Adobe Systems Incorporated | Multi-Feature Image Haze Removal |
JP2016126750A (en) * | 2014-12-26 | 2016-07-11 | 株式会社リコー | Image processing system, image processing device, imaging device, image processing method, program, and recording medium |
JP2017005389A (en) * | 2015-06-05 | 2017-01-05 | キヤノン株式会社 | Image recognition device, image recognition method, and program |
CN106530246A (en) * | 2016-10-28 | 2017-03-22 | 大连理工大学 | Image dehazing method and system based on dark channel and non-local prior |
WO2017047494A1 (en) * | 2015-09-18 | 2017-03-23 | 株式会社日立国際電気 | Image-processing device |
JP2018194346A (en) * | 2017-05-15 | 2018-12-06 | 日本電気株式会社 | Image processor, method for processing image, and image processing program |
-
2019
- 2019-08-02 JP JP2019143099A patent/JP7406886B2/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160005152A1 (en) * | 2014-07-01 | 2016-01-07 | Adobe Systems Incorporated | Multi-Feature Image Haze Removal |
JP2016126750A (en) * | 2014-12-26 | 2016-07-11 | 株式会社リコー | Image processing system, image processing device, imaging device, image processing method, program, and recording medium |
JP2017005389A (en) * | 2015-06-05 | 2017-01-05 | キヤノン株式会社 | Image recognition device, image recognition method, and program |
WO2017047494A1 (en) * | 2015-09-18 | 2017-03-23 | 株式会社日立国際電気 | Image-processing device |
CN106530246A (en) * | 2016-10-28 | 2017-03-22 | 大连理工大学 | Image dehazing method and system based on dark channel and non-local prior |
JP2018194346A (en) * | 2017-05-15 | 2018-12-06 | 日本電気株式会社 | Image processor, method for processing image, and image processing program |
Also Published As
Publication number | Publication date |
---|---|
JP7406886B2 (en) | 2023-12-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11948279B2 (en) | Method and device for joint denoising and demosaicing using neural network | |
US8965120B2 (en) | Image processing apparatus and method of controlling the same | |
TWI538522B (en) | Use of noise-optimized selection criteria to calculate scene white points | |
EP3542347B1 (en) | Fast fourier color constancy | |
US10055815B2 (en) | Image processing apparatus, image processing system, imaging apparatus and image processing method | |
CN110557584B (en) | Image processing method and device, and computer readable storage medium | |
CN107316286B (en) | Method and device for synchronously synthesizing and removing rain and fog in image | |
US9307213B2 (en) | Robust selection and weighting for gray patch automatic white balancing | |
JP7152065B2 (en) | Image processing device | |
JP2015103167A (en) | Image processor, image processing method and program | |
JP2017050683A (en) | Image processor, imaging apparatus, and image processing method and program | |
CN104823437A (en) | Picture processing method and device | |
WO2023005818A1 (en) | Noise image generation method and apparatus, electronic device, and storage medium | |
JP2017037357A (en) | Image processing device, program and recording medium | |
JP2016126750A (en) | Image processing system, image processing device, imaging device, image processing method, program, and recording medium | |
WO2013114803A1 (en) | Image processing device, image processing method therefor, computer program, and image processing system | |
JP7403995B2 (en) | Information processing device, control method and program | |
JP2011249939A (en) | Image processing apparatus, control method and program | |
JPWO2019188573A1 (en) | Arithmetic logic unit, arithmetic method and program | |
CN112215766A (en) | Image defogging method integrating image restoration and image enhancement and convolution network thereof | |
CN114549373A (en) | HDR image generation method and device, electronic equipment and readable storage medium | |
JP7406886B2 (en) | Image processing device, image processing method, and program | |
JP6938282B2 (en) | Image processing equipment, image processing methods and programs | |
WO2013114802A1 (en) | Image processing device, image processing method therefor, computer program, and image processing system | |
CN112243118A (en) | White balance correction method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220729 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230808 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20231006 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20231114 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20231213 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20231213 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7406886 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |