JP7406886B2 - Image processing device, image processing method, and program - Google Patents
Image processing device, image processing method, and program Download PDFInfo
- Publication number
- JP7406886B2 JP7406886B2 JP2019143099A JP2019143099A JP7406886B2 JP 7406886 B2 JP7406886 B2 JP 7406886B2 JP 2019143099 A JP2019143099 A JP 2019143099A JP 2019143099 A JP2019143099 A JP 2019143099A JP 7406886 B2 JP7406886 B2 JP 7406886B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- sky
- processed
- area
- correction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012545 processing Methods 0.000 title claims description 98
- 238000003672 processing method Methods 0.000 title claims 3
- 238000012937 correction Methods 0.000 claims description 84
- 238000000034 method Methods 0.000 claims description 78
- 238000003384 imaging method Methods 0.000 claims description 21
- 238000013528 artificial neural network Methods 0.000 claims description 18
- 238000012549 training Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 8
- 238000002834 transmittance Methods 0.000 description 8
- 238000010801 machine learning Methods 0.000 description 5
- 239000003595 mist Substances 0.000 description 5
- 230000007423 decrease Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000004913 activation Effects 0.000 description 1
- 230000002238 attenuated effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 239000010419 fine particle Substances 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Description
本発明は、撮像画像における散乱光の影響を低減する画像処理技術に関する。 The present invention relates to an image processing technique that reduces the influence of scattered light on captured images.
監視カメラなどの分野において、カメラから被写体までの間に存在する微粒子(例えば、霧や霞)の影響によってコントラストが低下し、撮像画像の画質が劣化することが問題となっている。この原因として、光が大気中を通過する際に、微粒子成分によって光が散乱することが挙げられる。このような散乱光により視認性が低下した画像に対して、散乱光による影響を除去する画像処理技術が知られている。 BACKGROUND ART In the field of surveillance cameras and the like, it has become a problem that the contrast is reduced due to the influence of particulates (for example, fog and haze) that exist between the camera and the subject, and the image quality of captured images is degraded. The cause of this is that light is scattered by particulate components when it passes through the atmosphere. Image processing techniques for removing the influence of scattered light from images whose visibility has been degraded due to such scattered light are known.
特許文献1は、霧除去処理として機械学習を用いる方法について説明している。具体的には、霧画像の領域が入力されると、学習モデルは領域に対応する透過率を生成し、学習モデルによって得られた透過率を用いて霧除去画像を生成する。 Patent Document 1 describes a method using machine learning as fog removal processing. Specifically, when a region of a foggy image is input, the learning model generates transmittance corresponding to the region, and uses the transmittance obtained by the learning model to generate a fog-removed image.
被写体によって、霧や霞などの微粒子による影響を受けたことにより視認性の変化は異なる。例えば、テクスチャのある建物などはコントラストが低下する一方、テクスチャの少ない空領域では、色相が変化する。しかしながら上述の特許文献1による方法では、画像から透過率マップを出力するよう学習する際に、被写体によって視認性の変化の仕方が異なることを考慮しておらず、必ずしも適切な学習モデルを得られない。 Changes in visibility vary depending on the subject due to the influence of fine particles such as fog and haze. For example, the contrast of buildings with texture decreases, while the hue changes in areas of the sky with little texture. However, when learning to output a transmittance map from an image, the method disclosed in Patent Document 1 does not take into consideration the fact that visibility changes differently depending on the subject, and it is not always possible to obtain an appropriate learning model. do not have.
そこで本発明は、画像に対して機械学習を用いて霧霞除去処理をする際に、霧霞によってコントラストが低下する被写体について適切に学習されたモデルを用いた処理を実現することを目的とする。 Therefore, it is an object of the present invention to realize processing using a model that has been appropriately learned for subjects whose contrast decreases due to fog when performing fog and haze removal processing on images using machine learning. .
上記課題を解決するため本願発明は、処理対象の画像に対して、散乱光の影響の少なくとも一部を除去した補正画像を生成する画像処理装置であって、前記処理対象の画像に対して、空領域を含むか否かを判定する判定手段と、前記判定手段により、空領域を含まないと判定された画像に対して第1の補正処理を実行する第1の補正処理手段と、前記判定手段により、空領域を含むと判定された画像の空領域に対して第2の補正処理を実行するとともに、当該画像の空領域以外の領域に対して前記第1の補正処理を実行する第2の補正処理手段とを有し、前記第1の補正処理手段が実行する前記第1の補正処理は、散乱光の影響の少ない空領域のみの画像を教師データとせず、散乱光の影響の少ない空領域を含まない領域の画像を教師データとして学習したモデルを用いる処理であることを特徴とする。 In order to solve the above problems, the present invention provides an image processing apparatus that generates a corrected image in which at least a part of the influence of scattered light is removed from an image to be processed, the invention comprising: a determining means for determining whether or not a sky area is included; a first correction processing means for performing a first correction process on an image determined by the determining means to not include a sky area; A second correction process is executed by the means on the sky area of the image determined to include the sky area , and the first correction process is executed on the area other than the sky area of the image. The first correction processing executed by the first correction processing means does not use an image of only the sky region, which is less affected by scattered light, as training data; A feature of this process is that it uses a model learned using images of areas that do not include sky areas as training data.
本発明は、画像に対して機械学習を用いて霧霞除去処理をする際に、霧霞によってコントラストが低下する被写体について適切に学習されたモデルを用いた処理を実現できる。 According to the present invention, when performing fog/haze removal processing on an image using machine learning, it is possible to realize processing using a model appropriately learned for a subject whose contrast is reduced due to fog/haze.
以下、添付の図面を参照して、本発明を好適な実施形態に基づいて詳細に説明する。なお、以下の実施形態において示す構成は一例にすぎず、本発明は図示された構成に必ずしも限定されるものではない。 Hereinafter, the present invention will be described in detail based on preferred embodiments with reference to the accompanying drawings. Note that the configurations shown in the following embodiments are merely examples, and the present invention is not necessarily limited to the illustrated configurations.
<第1の実施形態>
第1の実施形態では、画像に対して霧霞除去処理を実行する画像処理装置について説明する。なお、霧霞除去処理とは、霧や霞などの微粒子成分による散乱光の影響を受けて、コントラストが低下した画像に対して、散乱光の影響を低減する処理のことを意味する。本実施形態においては、画像のうち空領域は予め設定されたパラメータを用いて画素ごとに補正し、空領域以外の領域に対しては霧霞のない画像と霧霞のある画像との相関を学習することによって得られる学習モデルのパラメータを用いて補正する。
<First embodiment>
In the first embodiment, an image processing apparatus that performs fog removal processing on an image will be described. Note that fog/haze removal processing refers to processing for reducing the influence of scattered light on an image whose contrast has been reduced due to the influence of scattered light due to particulate components such as fog and haze. In this embodiment, the sky region of the image is corrected pixel by pixel using preset parameters, and the correlation between the image without fog and the image with fog is calculated for regions other than the sky region. Correction is made using the parameters of the learning model obtained through learning.
図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 the hardware configuration of an
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, for example, an interface such as 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 imaging unit 111 is a camera that receives optical information of a subject with a sensor and outputs the acquired image as digital data. In a captured image obtained by imaging by the imaging unit 111, the contrast may be reduced due to the influence of scattered light, such as in a scene where fog or haze has occurred. In this embodiment, by performing fog removal processing on the image captured by the imaging unit 111, it is possible to generate an image in which the influence of scattered light is reduced.
図2は、本実施形態における画像処理装置100の詳細な論理構成を示すブロック図である。画像処理装置100は、霧霞除去処理を実行する霧霞除去処理部200と学習用データを生成するための学習用データ生成部201によって構成される。
FIG. 2 is a block diagram showing the 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, neural networks will be explained. FIG. 4 is a diagram illustrating a neural network. In FIG. 4, the intermediate layer is shown as one layer to simplify the explanation, but it is desirable to configure the intermediate layer with two or more layers. In the neural network shown in FIG. 4, the input layer has Mi nodes (n11, n12, ..., n1Mi), the middle layer has Mh nodes (n21, n22, ..., n2Mh), and the output layer (Final layer) has Mo nodes (n31, n32, . . . , n3Mo). The nodes of each layer are connected to all the nodes of adjacent layers, forming a three-layer hierarchical neural network that transmits information between layers.
入力層に画像を入力する場合、該入力層には、入力される画素とノードとが1対1となるように、入力する画素数分のノードを設ける。また、出力層においても出力する画素数分のノードが設定されている。つまり本実施形態においては、16画素×16画素のブロック画像が入力され、16画素×16画素の画素値を出力するので、入力層および出量層におけるノードは256個である。データは、図4の左から右へ、即ち、入力層、中間層、出力層の順で受け渡される。入力層の各ノードは中間層のすべてのノードに接続され、ノード間の接続はそれぞれ重みを持っている。一方のノードから結合を通して他方のノードに伝達される際の出力値は、結合の重みによって増強あるいは減衰される。このような接続に定められた重み係数、バイアス値の集合は学習モデルのパラメータである。なお活性化関数については特に限定しないが、ロジスティックシグモイド関数やRectified Linear Unit(ReLU)関数などを用いれば良い。学習方法としては、種々提案されているニューラルネットワークの学習方法を適用できる。例えば、入力層に生徒データを入力してニューラルネットワークを動作させた場合に出力層から得られる出力と、該生徒データに予め対応づけられている教師データと、の差分を計算し、該差分を極小化するように、重み係数及びバイアス値を調整する。このような学習処理によって生成される重み係数及びバイアス値が、学習モデルのパラメータである。本実施形態における学習部205は、霧霞画像を生徒データとし、晴天画像を教師データとするため、霧霞による散乱光の影響を受けた画像から散乱の影響を低減した画像を推定する学習モデルのパラメータを生成する。
When inputting an image to the input layer, nodes for the number of input pixels are provided in the input layer so that there is a one-to-one relationship between input pixels and nodes. Further, nodes for the number of pixels to be output are set in the output layer as well. That is, in this embodiment, a block image of 16 pixels x 16 pixels is input, and pixel values of 16 pixels x 16 pixels are output, so there are 256 nodes in the input layer and the output layer. 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 nodes in the hidden layer, and each connection between nodes has a weight. The output value transmitted from one node to another node through a connection is enhanced or attenuated by the weight of the connection. A set of weighting coefficients and bias values determined for such connections are parameters of the learning model. Note that the activation function is not particularly limited, but a logistic sigmoid function, a rectified linear unit (ReLU) function, or the like may be used. As the learning method, various proposed neural network learning methods can be applied. For example, when student data is input to the input layer and a neural network is operated, the difference between the output obtained from the output layer and the teacher data that is previously associated with the student data is calculated, and the difference is calculated. The weighting coefficient and bias value are adjusted to minimize them. The weighting coefficients and bias values generated by such learning processing are parameters of the learning model. In this embodiment, the
次に、学習用データ生成部201における学習処理の流れを、詳細に説明する。図5は、学習処理のフローチャートである。CPU101が、図5に示すフローチャートを実現可能なプログラムを読み出し実行することで、各構成(機能)が実現される。なお以下においては、フローチャートにおける各工程(ステップ)を、「S」と付して説明する。
Next, the flow of learning processing 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 S<b>504 , 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 fog and haze removal processing executed by the fog and 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 this embodiment, a corrected image in which the influence of scattered light is reduced is generated for a subject region that does not include a sky region in an image using a learning model obtained by supervised learning. On the other hand, for the sky region, a corrected image in which the influence of scattered light is reduced is generated by saturation correction processing.
通常、散乱光による影響を受けると、空領域以外の領域においては、コントラストが低下する。そのため、散乱光による影響を除去した画像は、散乱光による影響を受けた画像よりもコントラストを拡大する補正処理であることが望ましい。そこで、コントラストが低下した画像と低下していない画像とのペアを用いて、低下していない画像を推定する学習モデルを使った補正処理は、空以外の領域に対しては好適である。しかしながら空領域においては、もともとテクスチャ成分がないため、コントラストを拡大するとノイズ成分の増大により画質が劣化してしまう場合がある。晴天画像を教師データとして教師あり学習したモデルを空領域にも適用すると、コントラストの拡大によって空領域の画質が低下してしまう。すなわち空領域に対しては、学習したモデルを用いた補正処理ではなく、空領域に適した彩度補正処理を実行することで、より良好な散乱光の影響を低減した補正画像を生成することができる。 Normally, when affected by scattered light, contrast deteriorates in areas other than sky areas. Therefore, it is desirable that the image from which the influence of scattered light is removed is subjected to correction processing that increases the contrast of the image that is affected by scattered light. Therefore, correction processing using a learning model that estimates an image with contrast reduction using a pair of an image with reduced contrast and an image with no reduction is suitable for regions other than the sky. However, since there is no texture component in the sky region, increasing the contrast may degrade the image quality due to an increase in noise components. If a model that has undergone supervised learning using clear sky images as training data is applied to the sky region, the image quality of the sky region will deteriorate due to the increase in contrast. In other words, for the sky region, instead of correction processing using a learned model, a saturation correction process suitable for the sky region is executed to generate a corrected image that better reduces the effects of scattered light. Can be done.
また、空領域における散乱光による影響と、空以外の領域における散乱光による影響とは異なる。例えば、空領域であれば、晴天の場合は青っぽく、散乱光による影響を受けると灰色っぽく撮像される。従って空領域においては、霧霞除去処理によって灰色などの無彩色は青っぽく補正されることが望ましい。一方、空以外の領域においては、建造物など被写体自身が灰色である物体もある。そのため空以外の領域においては、必ずしも霧霞画像において灰色であっても、霧霞除去処理の結果、青色に補正されることが望ましいとは限らない。そのため、晴天画像を教師データとして、霧霞画像から霧霞の影響を除去した画像を推定するモデルを学習する際には、空以外の領域の画像を用いて学習することで、空領域以外における学習モデルをより適切に習得することができる。 Furthermore, the influence of scattered light in a sky region is different from the influence of scattered light in a region other than the sky. For example, in the case of a sky region, the image will appear bluish when the sky is clear, and grayish when affected by scattered light. Therefore, in the sky region, it is desirable that achromatic colors such as gray be corrected to appear bluish by fog removal processing. On the other hand, in areas other than the sky, there are objects such as buildings that are themselves gray. Therefore, in areas other than the sky, even if the area is gray in the fog image, it is not necessarily desirable to correct it to blue as a result of the fog removal process. Therefore, when learning a model that uses clear sky images as training data to estimate an image with the influence of fog and haze removed from a foggy image, it is possible to train using images of areas other than the sky. Learning models can be learned more appropriately.
<第2の実施形態>
第1の実施形態では、処理対象の画像に対して空領域を含むか否かを判定し、第1の補正処理と第2の補正処理を切り替える方法について説明した。本実施形態では、処理対象の画像を撮像した撮像装置が設置された位置情報および、姿勢情報を取得することで、補正処理を制御する方法について説明する。なお第1の実施形態と同一の構成については、同じ符号を付し、説明を省略する。
<Second embodiment>
In the first embodiment, a method has been described in which it is determined whether or not an image to be processed includes a sky area, and the first correction process and the second correction process are switched. In the present embodiment, a method will be described in which correction processing is controlled by acquiring position information and orientation information where an imaging device that captured an image to be processed is installed. Note that the same components as in the first embodiment are given the same reference numerals, and the description thereof will be omitted.
本実施形態における霧霞除去処理部700は、第1の実施形態に加えて、位置情報取得810、姿勢情報取得部711、画像判定部712を有する。位置情報取得部710は、図8に示すグラフィカルユーザーインターフェース(GUI)をユーザに表示させ、ユーザからの入力を受け付ける。これにより位置情報取得部710は、撮像部111が屋内に設置されているか、屋外に設置されているか否かを示す屋内外情報を位置情報として取得する。
The fog/haze
姿勢情報取得部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 fog and haze removal processing executed by the fog and 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 step S<b>905 , the attitude
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, the
S911において第1の補正部210には、空領域を含まないブロック画像または、空領域を含まない画像が入力される。S912において第1の補正部209は、入力された画像に対して、第1の補正処理を実行する。S913において、全ての画素に対する補正処理が完了すると、出力画像生成部211は、補正画像を出力する。
In S911, a block image that does not include a sky area or an image that does not include a sky area is input to the
以上の通り本実施形態においては、位置情報や姿勢情報に応じて、画像に対する霧霞除去処理を制御する。霧霞除去処理としては3つの方法に分類され、いずれかの方法によって画像は処理される。1つ目は、画像に対して画素ごとに演算処理を実行する補正処理を実行する方法であり、2つ目は、画像に対してニューラルネットワークを使った補正処理を実行する方法であり、3つ目は、ブロックに応じて1つ目の方法と2つ目の方法を切り替える方法である。例えば、監視カメラの場合は、一度設置されるとしばらく固定であることが多く、特に屋内に設置されている場合にはその監視カメラが撮像した画像に空領域が含まれる可能性は低い。そこで本実施形態ではまず、屋内外の情報や姿勢情報に基づいて、処理対象の画像が空領域を含むか否かを判定することとした。これにより、空領域のみ、あるいは空領域を含まない場合は、ブロック分割や領域判定処理を実行せず、それぞれの場合に適した補正処理を実行することができる。これにより、処理の負荷を軽減することができる。なお、画像判定部710による処理は、処理対象の画像が入力される度に実行しなくてもよい。設置位置が変更された場合や設定のリセットが実行された場合にのみ実行し、それ以外の場合には1度判定した結果を流用してもよい。
As described above, in this embodiment, fog removal processing for an image is controlled according to position information and orientation information. Fog removal processing is classified into three methods, and images are processed by one of these methods. The first is a method of performing correction processing that performs arithmetic processing on each pixel on the image, the second is a method of performing correction processing on the image using a neural network, and the third method is to perform correction processing on the image using a neural network. The second method is to switch between the first method and the second method depending on 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 sky area will be included in the image captured by the surveillance camera. Therefore, in this embodiment, it is first determined whether the image to be processed includes a sky region based on indoor/outdoor information and posture information. As a result, when only a sky region or no sky region is included, it is possible to perform correction processing suitable for each case without performing block division or region determination processing. Thereby, the processing load can be reduced. Note that the processing by the
<その他の実施形態>
上述の実施形態においては、晴天画像を教師データとして、霧霞画像から霧霞を低減した画像を推定するモデルを学習する場合について、説明した。しかしながら、機会学習を用いた補正処理は、他の方法もある。例えば、霧霞画像を生徒データ、霧霞画像に対応する透過率マップを教師データとして学習することで、霧霞画像から透過率マップを推定する学習モデルを学習するようにしてもよい。このような学習モデルのパラメータが設定された補正処理を実行する場合はまず、ニューラルネットワークを介して処理対象の画像に対応する透過率マップを推定する。その後、透過率マップを参照して処理対象の画像における画素ごとにコントラスト調整する処理を実行すればよい。透過率マップを用いた霧霞除去処理については、公知であるため説明を省略する。
<Other embodiments>
In the embodiment described above, a case has been described in which a model for estimating an image with reduced fog and haze from a fog and haze image is learned using a clear sky image as training data. However, there are other methods of correction processing using machine learning. For example, a learning model for estimating a transmittance map from a foggy haze image may be learned by learning a foggy haze image as student data and a transmittance map corresponding to the foggy haze image as teacher data. When performing a correction process in which parameters of such a learning model are set, first, a transmittance map corresponding to an image to be processed is estimated via a neural network. Thereafter, the contrast adjustment process may be performed for each pixel in the image to be processed by referring to the transmittance map. The mist removal process using the transmittance map is well known, so a description thereof will be omitted.
上述の実施形態においては、ブロックごとに空領域か否かを判定し、ブロックごとに第1または第2の補正処理を実行する形態を例に説明した。しかしながら、必ずしも矩形のブロックごとの処理ではなくても良い。例えば公知の意味的領域分割によって、空領域と空以外の領域に分割し、空領域のみを抽出した画像には第2の補正処理を、空以外の領域のみを抽出した画像に対しては第1の補正処理を実行するようにしてもよい。 In the above-described embodiment, an example has been described in which it is determined whether each block is an empty area or not, and the first or second correction processing is executed for each block. However, the processing does not necessarily have to be performed for each rectangular block. For example, an image is divided into a sky region and a non-sky region using well-known semantic region segmentation, and an image in which only the sky region is extracted is subjected to the second correction process, and an image in which only the non-sky region is extracted is subjected to the second correction process. The first correction process may be executed.
また第1実施形態の説明においては、処理対象の画像には、空領域と空以外の領域が混在していることを前提に説明した。しかしながら、画像に空領域が含まれない場合には、画像における全領域に対して第1補正処理を実行することになる。 Furthermore, the description of the first embodiment has been made on the premise that the image to be processed includes a sky region and a non-sky region. However, if the image does not include a sky area, the first correction process will be performed on the entire area in the image.
上述の実施形態では、晴天画像と霧霞画像とのペアを学習用画像として用いる例について説明した。しかしながら、同じ位置から同じ撮像条件において撮像した2つの画像がない場合もある。例えば、霧霞画像に対して、ダークチャンネル法などの公知の霧霞除去処理を用いて霧霞を低減した画像を生成し、教師データとしてもよい。 In the embodiment described above, an example was described in which a pair of a clear sky image and a haze image is used as a learning image. However, there are cases where there are no two images taken from the same position and under the same imaging conditions. For example, for a foggy image, a known foggy removal process such as a dark channel method may be used to generate an image in which foggy haze is reduced, and this image may be used as the teacher data.
また、領域の判定処理として、カラー画像における画素値から色相を算出する方法について説明したが、例えば画像に対応する距離画像を用いて空領域か否かを判定してもよい。 Further, although a method of calculating hue from pixel values in a color image has been described as an area determination process, for example, a distance image corresponding to the image may be used to determine whether or not it is a sky area.
なお、これまでの説明において、散乱光を発生させる要因として、霧や霧を例に挙げて説明したが、黄砂、PM2.5等の他の微粒子成分による散乱光によってコントラストが低下した画像に対しても同様に適用することができる。 In the previous explanations, fog and mist have been used as examples of factors that cause scattered light. It can be applied in the same way.
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。入力I/F106は、例えばUSBやIEEE1394等のシリアルバスインタフェースである。 The present invention provides a system or device with a program that implements one or more functions of the embodiments described above via a network or a storage medium, and one or more processors in a computer of the system or device reads and executes the program. This can also be achieved by processing. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions. The input I/F 106 is, for example, a serial bus interface such as USB or IEEE1394.
202 学習用画像取得部
203 ブロック分割部
204 領域判定部
205 学習部
206 画像入力部
207 ブロック分割部
208 領域判定部
209 第1の補正部
210 第2の補正部
211 出力画像生成部
202 Image acquisition unit for learning 203
Claims (12)
前記処理対象の画像に対して、空領域を含むか否かを判定する判定手段と、
前記判定手段により、空領域を含まないと判定された画像に対して第1の補正処理を実行する第1の補正処理手段と、
前記判定手段により、空領域を含むと判定された画像の空領域に対して第2の補正処理を実行するとともに、当該画像の空領域以外の領域に対して前記第1の補正処理を実行する第2の補正処理手段とを有し、
前記第1の補正処理手段が実行する前記第1の補正処理は、散乱光の影響の少ない空領域のみの画像を教師データとせず、散乱光の影響の少ない空領域を含まない領域の画像を教師データとして学習したモデルを用いる処理であることを特徴とする画像処理装置。 An image processing device that generates a corrected image in which at least part of the influence of scattered light is removed from an image to be processed,
determining means for determining whether the image to be processed includes a sky area;
a first correction processing unit that performs a first correction process on an image that is determined by the determination unit to not include a sky area;
A second correction process is executed on the sky area of the image determined by the determination means to include a sky area , and the first correction process is executed on areas other than the sky area of the image. a second correction processing means;
The first correction processing executed by the first correction processing means does not use an image of only a sky region that is less affected by scattered light as training data, but uses an image of an area that does not include a sky region that is less affected by scattered light as training data. An image processing device characterized in that processing uses a learned model as teacher data.
前記処理対象の画像が空領域を含まないと判定した場合は、前記処理対象の画像は前記第1の補正処理手段による前記第1の補正処理のみが実行されることを特徴とする請求項1乃至3の何れか一項に記載の画像処理装置。 The determination means determines the image to be processed,
If it is determined that the image to be processed does not include a sky area, only the first correction process by the first correction processing means is performed on the image to be processed. 4. The image processing device according to any one of 3 to 3.
対象の画像は空領域のみであるか否かを判定することを特徴とする請求項5に記載の画像
処理装置。 6. The image according to claim 5, wherein when the determining means determines that the image to be processed includes a sky area, the determining means further determines whether the image to be processed includes only a sky area. Processing equipment.
判定手段が、前記処理対象の画像に対して、空領域を含むか否かを判定し、
第1の補正処理手段が、空領域を含まないと判定された画像に対しては、散乱光の影響の少ない空領域のみの画像を教師データとせず、散乱光の影響の少ない空領域を含まない領域の画像を教師データとして学習したモデルを用いる第1の補正処理を実行し、
第2の補正処理手段が、空領域を含むと判定された画像の空領域に対して第2の補正処理を実行するとともに、当該画像の空領域以外の領域に対して前記第1の補正処理を実行する画像処理方法。 An image processing method for generating a corrected image in which at least part of the influence of scattered light is removed from an image to be processed, the method comprising:
a determining means determines whether the image to be processed includes a sky area;
For images determined not to include sky regions , the first correction processing means does not use images of only sky regions that are less affected by scattered light as training data, but includes sky regions that are less affected by scattered light. Executing a first correction process using a model learned using an image of an area where there is no area as training data,
A second correction processing means executes a second correction process on a sky area of the image determined to include a sky area , and performs the first correction process on an area other than the sky area of the image. An image processing method that performs
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 JP2021026451A (en) | 2021-02-22 |
JP7406886B2 true 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 |
---|---|
JP2021026451A (en) | 2021-02-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Tang et al. | Investigating haze-relevant features in a learning framework for image dehazing | |
US11948279B2 (en) | Method and device for joint denoising and demosaicing using neural network | |
EP3542347B1 (en) | Fast fourier color constancy | |
US8149336B2 (en) | Method for digital noise reduction in low light video | |
CN107316286B (en) | Method and device for synchronously synthesizing and removing rain and fog in image | |
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 | |
WO2018082185A1 (en) | Image processing method and device | |
JP6282095B2 (en) | Image processing apparatus, image processing method, and program. | |
CN102740082A (en) | Image processing apparatus and control method thereof | |
US9299011B2 (en) | Signal processing apparatus, signal processing method, output apparatus, output method, and program for learning and restoring signals with sparse coefficients | |
TWI777536B (en) | Enhanced training method and device for image recognition model | |
CN113284061B (en) | Underwater image enhancement method based on gradient network | |
JP5719123B2 (en) | Image processing apparatus, image processing method, and program | |
CN115209119B (en) | Video automatic coloring method based on deep neural network | |
WO2013114803A1 (en) | Image processing device, image processing method therefor, computer program, and image processing system | |
JP7406886B2 (en) | Image processing device, image processing method, and program | |
Sheu et al. | FIBS-Unet: feature integration and block smoothing network for single image dehazing | |
CN114549373A (en) | HDR image generation method and device, electronic equipment and readable storage medium | |
CN112215766A (en) | Image defogging method integrating image restoration and image enhancement and convolution network thereof | |
KR20180064028A (en) | Method and apparatus of image processing | |
JP6938282B2 (en) | Image processing equipment, image processing methods and programs | |
KR102619830B1 (en) | Method and apparatus for correcting image | |
CN113096033A (en) | Low-illumination image enhancement method based on Retinex model self-adaptive structure | |
WO2013114802A1 (en) | Image processing device, image processing method therefor, computer program, and image processing system |
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 |