JP2021026451A - Image processor, image processing method, and program - Google Patents

Image processor, image processing method, and program Download PDF

Info

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
Application number
JP2019143099A
Other languages
Japanese (ja)
Other versions
JP7406886B2 (en
Inventor
美央 松丸
Mio Matsumaru
美央 松丸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2019143099A priority Critical patent/JP7406886B2/en
Publication of JP2021026451A publication Critical patent/JP2021026451A/en
Application granted granted Critical
Publication of JP7406886B2 publication Critical patent/JP7406886B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

To realize processing using a model that appropriately learns an object in which contrast is decreased by a fog and a haze.SOLUTION: An image processor for generating a corrected image in which at least one portion of an influence of scattered light is removed for an image to be processed includes: determination means for determining whether a blank area is included for an image to be processed; first correction processing means for executing first correction processing to an image determined not to include a blank area by the determination means; and second correction processing means for executing second correction processing to an image determined to include a blank area by the determination means. The first correction processing executed by the first correction processing means is processing using a model that does not set an image only in a blank area having less influence of scattered light to be teacher data, but learns an image in an area other than a blank area with less influence of scattered light as teacher data.SELECTED DRAWING: Figure 2

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.

米国特許公報2016/0005152U.S. Patent Publication 2016/0005152

被写体によって、霧や霞などの微粒子による影響を受けたことにより視認性の変化は異なる。例えば、テクスチャのある建物などはコントラストが低下する一方、テクスチャの少ない空領域では、色相が変化する。しかしながら上述の特許文献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.

画像処理装置のハードウェア構成を示す図The figure which shows the hardware configuration of an image processing apparatus 画像処理装置の詳細な機能構成を示す図The figure which shows the detailed functional structure of an image processing apparatus 学習用画像の一例を示す図Diagram showing an example of a learning image ニューラルネットワークを説明する図Diagram explaining a neural network 学習処理のフローチャートFlow chart of learning process 霧霞除去処理のフローチャートFlowchart of fog haze removal process 画像処理装置の詳細な機能構成を示す図The figure which shows the detailed functional structure of an image processing apparatus 屋内外情報の入力用GUIを示す図Diagram showing GUI for inputting indoor / outdoor information 霧霞除去処理のフローチャートFlowchart of fog haze removal process

以下、添付の図面を参照して、本発明を好適な実施形態に基づいて詳細に説明する。なお、以下の実施形態において示す構成は一例にすぎず、本発明は図示された構成に必ずしも限定されるものではない。 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 image processing device 100 of the present embodiment. The image processing device 100 of this embodiment has a CPU 101, a RAM 102, a ROM 103, an HDD I / F 104, an HDD 105, an input I / F 106, an output I / F 107, and a system bus 108. The CPU 101 is a processor that comprehensively controls each configuration described below. The RAM 102 is a memory that functions as a main memory and a work area of the CPU 101, and a ROM 103 is a memory that stores a program that controls processing in the image processing device 100.

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 HDD 105 as a secondary storage device to the system bus 108. The CPU 101 can read data from the HDD 105 and write data to the HDD 105 via the HDD I / F 104. Further, the CPU 101 can expand the data stored in the HDD 105 into the RAM 102, and similarly, can store the data expanded in the RAM 102 in the HDD 105. Then, the CPU 101 can consider the data expanded in the RAM 102 as a program and execute it. The secondary storage device may be a storage device such as an optical disk drive in addition to the HDD. The input I / F 106 is a serial bus interface such as USB or IEEE1394.

画像処理装置100は、入力I/F106を介して、外部メモリ109および撮像部111に接続されている。CPU101は、入力I/F106を介して、外部メモリ109および撮像部111からデータを取得することができる。出力I/F107は、例えばDVIやHDMI(登録商標)等の映像出力インタフェースである。画像処理装置100は出力I/F107を介して表示部110と接続されている。CPU101は、出力I/F107を介して表示部110に画像を出力し、出力した画像を表示部110に表示することができる。 The image processing device 100 is connected to the external memory 109 and the image pickup unit 111 via the input I / F 106. The CPU 101 can acquire data from the external memory 109 and the imaging unit 111 via the input I / F 106. The output I / F 107 is a video output interface such as DVI or HDMI (registered trademark). The image processing device 100 is connected to the display unit 110 via the output I / F 107. The CPU 101 can output an image to the display unit 110 via the output I / F 107, and display the output image on the display unit 110.

システムバス108は、各種データの転送経路であり、画像処理装置100内の各構成部はシステムバス108を介して相互に接続されている。 The system bus 108 is a transfer path for various data, and each component in the image processing device 100 is connected to each other via the system bus 108.

外部メモリ109はハードディスク、メモリカード、CFカード、SDカード、USBメモリなどの記憶媒体であり、画像処理装置100で処理された画像データなどを保存することができる。表示部110は、ディスプレイなどの表示装置であり、画像処理装置100で処理された画像などを表示することができる。 The external memory 109 is a storage medium such as a hard disk, a memory card, a CF card, an SD card, or a USB memory, and can store image data or the like processed by the image processing device 100. The display unit 110 is a display device such as a display, and can display an image or the like processed by the image processing device 100.

撮像部111は、被写体の光情報をセンサで受光し、取得した画像をデジタルデータとして出力するカメラである。撮像部111が撮像することで得られた撮像画像においては、霧霞などが発生したシーンなど散乱光の影響によりコントラストが低下してしまっている場合がある。本実施形態では、撮像部111が撮像した画像に対して霧霞除去処理を実行することで、散乱光の影響が低減された画像を生成することができる。 The image pickup unit 111 is a camera that receives light information of a subject by a sensor and outputs the acquired image as digital data. In the captured image obtained by the imaging unit 111, the contrast may be lowered due to the influence of scattered light such as a scene in which fog haze or the like is generated. In the present embodiment, by executing the fog haze removal process 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 a detailed logical configuration of the image processing apparatus 100 according to the present embodiment. The image processing device 100 is composed of a fog haze removal processing unit 200 that executes a fog haze removal process and a learning data generation unit 201 for generating learning data.

まず、学習用データ生成部201について説明する。学習用データ生成部201は、機械学習を行う学習モデルのパラメータを最適化するための生徒データと教師データのペアである学習用データを生成する。学習モデルとは、入力された生徒データから生徒データに対応する霧霞低減画像を出力するニューラルネットワークに基づくネットワーク構造とそのパラメータとする。本実施形態における学習モデルは、霧霞による散乱光の影響を受けた画像から霧霞による散乱光の影響を低減した画像を推定する処理を行うモデルである。生徒データは、霧霞によりコントラストが低下している画像から生成される。また、教師データは、生徒データである画像において霧霞によるコントラスト低下がなかった場合の霧霞低減画像から生成される。 First, the learning data generation unit 201 will be described. The learning data generation unit 201 generates learning data that is a pair of student data and teacher data for optimizing the parameters of the learning model that performs machine learning. The learning model is a network structure based on a neural network that outputs a fog haze reduction image corresponding to the student data from the input student data and its parameters. The learning model in the present embodiment is a model that estimates an image in which the influence of the scattered light by the fog haze is reduced from the image affected by the scattered light by the fog haze. Student data is generated from images whose contrast is reduced by fog haze. Further, the teacher data is generated from the fog haze reduction image when there is no contrast reduction due to fog haze in the image which is the student data.

学習用データ生成201は、学習用画像取得部202、ブロック分割部203、領域判定部204、学習部205を有する。学習用画像取得部202は、同じシーンを同じ位置から同じ撮像条件により撮像した2つの画像を取得する。図3(a)は、学習用画像取得部202が取得する画像の一部を示す図である。このとき取得する2つの画像は、同じ位置から同じ風景を晴天時に撮像した晴天画像と、霧霞等が発生し散乱光による影響下で撮像した霧霞画像である。なおここでは、晴天画像と霧霞画像は同じ撮像条件(露出、画角など)で撮像されたものとする。また、晴天画像および霧霞画像はいずれもR(レッド)、G(グリーン)、B(ブルー)のプレーンからなるカラー画像である。学習用画像取得部202は、このような晴天画像と霧霞画像とのペアを複数、取得する。 The learning data generation 201 has a learning image acquisition unit 202, a block division unit 203, an area determination unit 204, and a learning unit 205. The learning image acquisition unit 202 acquires two images obtained by capturing the same scene from the same position under the same imaging conditions. FIG. 3A is a diagram showing a part of the image acquired by the learning image acquisition unit 202. The two images acquired at this time are a clear sky image obtained by capturing the same landscape from the same position in fine weather, and a fog haze image taken under the influence of scattered light due to fog haze and the like. Here, it is assumed that the clear sky image and the fog haze image are captured under the same imaging conditions (exposure, angle of view, etc.). The clear sky image and the fog haze image are both color images composed of R (red), G (green), and B (blue) planes. The learning image acquisition unit 202 acquires a plurality of pairs of such a clear sky image and a fog haze image.

ブロック分割部203は、取得した晴天画像と霧霞画像とのペアを分割し、ブロック画像を出力する。ブロック分割部203は、後述するように、学習部204におけるニューラルネットワークの入力層のノード数に応じて、画像をブロックに分割する。ブロック分割部203は、分割したブロック画像のペアを順に領域判定部204に出力する。領域判定部204は、処理対象のブロックペアのうち晴天画像から抽出されたブロックに基づいて、空領域を含むか否かを判定する。領域判定部204は、空領域を含むと判定したブロックは学習部204に出力せず、空領域を含まないと判定したブロックは学習部205に出力する。 The block division unit 203 divides the pair of the acquired clear sky image and the fog haze image, and outputs the block image. As will be described later, the block division unit 203 divides the image into blocks according to the number of nodes in the input layer of the neural network in the learning unit 204. The block division unit 203 outputs the divided block image pairs to the area determination unit 204 in order. The area determination unit 204 determines whether or not an empty area is included based on the blocks extracted from the clear sky image among the block pairs to be processed. The area determination unit 204 does not output the block determined to include the empty area to the learning unit 204, and outputs the block determined not to include the empty area to the learning unit 205.

学習部205は、ブロック分割部203から出力された空領域を含まないブロック画像のペアを用いて、内部に保持するニューラルネットワークのパラメータの学習を行う。 The learning unit 205 learns the parameters of the neural network held inside by using the pair of block images that do not include the empty area output from the block dividing unit 203.

ここでニューラルネットワークについて説明する。図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 learning unit 205 in the present embodiment uses the fog haze image as student data and the clear sky image as teacher data, a learning model that estimates an image in which the influence of scattering is reduced from the image affected by the scattered light by the fog haze. Generate parameters for.

次に、学習用データ生成部201における学習処理の流れを、詳細に説明する。図5は、学習処理のフローチャートである。CPU101が、図5に示すフローチャートを実現可能なプログラムを読み出し実行することで、各構成(機能)が実現される。なお以下においては、フローチャートにおける各工程(ステップ)を、「S」と付して説明する。 Next, the flow of the learning process in the learning data generation unit 201 will be described in detail. FIG. 5 is a flowchart of the learning process. Each configuration (function) is realized by the CPU 101 reading and executing a program capable of realizing the flowchart shown in FIG. In the following, each process (step) in the flowchart will be described with "S".

S501において学習用画像取得部202は、メモリ(不図示)から学習用に用意された1組の画像を取得する。上述の通りここでは、同じ位置から同じ風件を晴天時に撮像した晴天画像と、霧霞等が発生し散乱光による影響下で撮像した霧霞画像とを取得する。例えば所定の位置に設置された固定の監視カメラが撮像した画像が格納された外部のメモリから、天気予報を参照して2つの画像データを取得するようにしてもよい。この場合は、異なる複数の監視カメラが撮像した画像から、画像ペアを取得すると良い。 In S501, the learning image acquisition unit 202 acquires a set of images prepared for learning from a memory (not shown). As described above, here, a clear sky image obtained by capturing the same wind condition from the same position in fine weather and a fog haze image taken under the influence of scattered light due to fog haze or the like are acquired. For example, two image data may be acquired by referring to the weather forecast from an external memory in which an image captured by a fixed surveillance camera installed at a predetermined position is stored. In this case, it is preferable to acquire an image pair from images captured by a plurality of different surveillance cameras.

S502においてブロック分割部203は、1組の画像をブロックに分割する。本実施形態においては、画像における左上から、16画素×16画素のブロック画像を順に抽出する。図3(b)は、ブロック分割部203が分割するブロックを説明する図である。図3(b)に示すように、タイル状に画像をブロックに分割し、1つの画像から複数のブロック画像を抽出する。ブロック分割部203は、晴天画像と、対応する霧霞画像とにおいて、同じ位置から抽出された2つのブロックを1つのブロックペアとして領域判定部204に出力する。 In S502, the block division unit 203 divides a set of images into blocks. In the present embodiment, block images of 16 pixels × 16 pixels are extracted in order from the upper left of the image. FIG. 3B is a diagram illustrating a block to be divided by the block dividing unit 203. As shown in FIG. 3B, the image is divided into blocks in a tile shape, and a plurality of block images are extracted from one image. The block division unit 203 outputs the two blocks extracted from the same position in the clear sky image and the corresponding fog haze image to the area determination unit 204 as one block pair.

S503において領域判定部204は、取得したブロック画像のペアのうち晴天画像のブロック画像が空領域を含むか否かを判定する。空領域か否かを判定する方法は、公知の技術を適用すればよい。本実施形態では、ブロックにおける各画素のR,G,Bの画素値から色相を算出し、予め設定された空の可能性が高い色相の範囲か否かを判定する。領域判定部204は、ブロックにおいて空領域の画素であると判定した画素の数を算出し、空領域の画素の数が所定の閾値以上であれば、ブロック画像が空領域を含むと判定し、S504はスキップしてS505に進む。また、空領域の画素の数が所定の閾値未満であれば、領域判定部204は、ブロック画像は空領域を含まないと判定してS504に進む。 In S503, the area determination unit 204 determines whether or not the block image of the clear sky image includes an empty area among the acquired block image pairs. As a method for determining whether or not the region is empty, a known technique may be applied. In the present embodiment, the hue is calculated from the pixel values of R, G, and B of each pixel in the block, and it is determined whether or not the hue is in the preset range of hues that are likely to be empty. The area determination unit 204 calculates the number of pixels determined to be pixels in the empty area in the block, and if the number of pixels in the empty area is equal to or greater than a predetermined threshold, determines that the block image includes an empty area. S504 skips and proceeds to S505. If the number of pixels in the empty area is less than a predetermined threshold value, the area determination unit 204 determines that the block image does not include the empty area and proceeds to S504.

S504において領域判定部204は、空領域を含まないと判定されたブロック画像のペアのみを学習部205に出力する。S505において領域判定部204は、取得したブロック画像の全てに対して領域判定を行ったか否かを判定する。全てのブロック画像に対して領域判定をしていればS506に、未処理のブロック画像がある場合は、S503に戻る。また、S506において学習用画像取得部202は、全ての学習用画像を取得したか否かを判定する。全ての学習用画像を取得済であれば、S507に進み、未取得の学習用画像があればS501に戻る。 In S504, the area determination unit 204 outputs only the pair of block images determined not to include the empty area to the learning unit 205. In S505, the area determination unit 204 determines whether or not the area determination has been performed on all of the acquired block images. If the area is determined for all the block images, the process returns to S506, and if there is an unprocessed block image, the process returns to S503. Further, in S506, the learning image acquisition unit 202 determines whether or not all the learning images have been acquired. If all the learning images have been acquired, the process proceeds to S507, and if there are unacquired learning images, the process returns to S501.

S507において学習部205は、入力された学習用データを用いて散乱の影響を低減した画像を推定する学習モデルのパラメータを生成する。S508において学習部205は生成した学習モデルのパラメータを、後述する第1の補正部209に出力する。 In S507, the learning unit 205 generates parameters of a learning model that estimates an image in which the influence of scattering is reduced by using the input learning data. In S508, the learning unit 205 outputs the parameters of the generated learning model to the first correction unit 209 described later.

ここから、実際に霧霞除去を実行する霧霞除去処理部200について説明する。まず、画像入力部206は、霧霞により散乱の影響を除去したい処理対象の画像を入力する。ブロック分割部207は、処理対象の画像をブロックごとに分割する。本実施形態においてブロック分割部207は、ブロック分割部203が抽出したブロック画像のサイズと同じサイズのブロックに分割する。領域判定部208は、処理対象のブロックが空領域を含むか否かを判定する。領域判定部208は、空領域を含まないブロックは第1の補正部209に、空領域を含むブロックは第2の補正部210に出力する。 From here, the fog haze removal processing unit 200 that actually executes fog haze removal will be described. First, the image input unit 206 inputs an image to be processed for which the influence of scattering due to fog haze is to be removed. The block division unit 207 divides the image to be processed into blocks. In the present embodiment, the block division unit 207 divides into blocks having the same size as the block image extracted by the block division unit 203. The area determination unit 208 determines whether or not the block to be processed includes an empty area. The area determination unit 208 outputs a block that does not include an empty area to the first correction unit 209, and outputs a block that includes an empty area to the second correction unit 210.

第1の補正部209は、ニューラルネットワークを備える。ここで第1の補正部209は、学習部205と同じネットワーク構造を持つ。さらにニューラルネットワークにおける各重み係数やバイアス値は、学習部205から出力されたパラメータに従って設定されている。つまり第2の補正部209は、空領域を含まない画像を用いて学習した霧霞による影響を除去するモデルに基づいて、処理対象のブロックに対して補正処理を実行する。第1の補正部209は、処理対象の画像から霧霞による影響を除去した、本来のコントラストの画像を推定し、補正済ブロックを出力する。 The first correction unit 209 includes a neural network. Here, the first correction unit 209 has the same network structure as the learning unit 205. Further, each weighting coefficient and bias value in the neural network are set according to the parameters output from the learning unit 205. That is, the second correction unit 209 executes the correction processing on the block to be processed based on the model for removing the influence of the fog haze learned by using the image that does not include the empty area. The first correction unit 209 estimates an image having the original contrast obtained by removing the influence of fog haze from the image to be processed, and outputs the corrected block.

第2の補正部210は、処理対象のブロックに含まれる各画素について、順に所定のアルゴリズムに従った演算処理を実行し、空領域を含むブロックの補正済ブロックを出力する。本来霧霞の影響を受けると、霧霞の影響がない場合の画像に比べてコントラストは低下することが知られている。ただし空領域は複雑なテクスチャ成分は含まれていない場合が多く、霧霞除去処理としてコントラストを拡大すると、S/N比が低下してしまう。そこで本実施形態では、第2の補正部210は、空領域に適した補正処理を実行する。 The second correction unit 210 sequentially executes arithmetic processing according to a predetermined algorithm for each pixel included in the block to be processed, and outputs the corrected block of the block including the empty area. It is known that when the image is originally affected by the fog haze, the contrast is lowered as compared with the image when the fog haze is not affected. However, the empty area often does not contain a complicated texture component, and if the contrast is increased as a fog haze removal process, the S / N ratio is lowered. Therefore, in the present embodiment, the second correction unit 210 executes the correction process suitable for the empty area.

出力画像生成部211は、第1の補正部209から出力されたブロック画像と、第2の補正部210から出力されるブロック画像とを蓄積して1枚の画像を生成し、出力する。 The output image generation unit 211 accumulates the block image output from the first correction unit 209 and the block image output from the second correction unit 210 to generate and output one image.

霧霞除去処理部200が実行する霧霞除去処理の流れを、詳細に説明する。図6は、霧霞除去処理のフローチャートである。CPU101が、図6に示すフローチャートを実現可能なプログラムを読み出し実行することで、各構成(機能)が実現される。 The flow of the mist haze removal process executed by the mist haze removal process unit 200 will be described in detail. FIG. 6 is a flowchart of the fog haze removal process. Each configuration (function) is realized by the CPU 101 reading and executing a program capable of realizing the flowchart shown in FIG.

まずS601において画像入力部206は、処理対象の画像を入力する。ここでは学習用画像データと同様、R,G,Bのプレーンからなるカラー画像を処理対象の画像とする。S602においてブロック分割部203は、処理対象の画像を分割する。本実施形態においては、処理対象の画像を16画素×16画素のブロックに分割する。 First, in S601, the image input unit 206 inputs an image to be processed. Here, as with the learning image data, a color image composed of R, G, and B planes is used as the image to be processed. In S602, the block division unit 203 divides the image to be processed. In the present embodiment, the image to be processed is divided into blocks of 16 pixels × 16 pixels.

S603において領域判定部208は、処理対象のブロックが空領域を含むか否かを判定する。ここでは上述したS503における領域判定部204と同様の方法により、ブロックに対する領域判定を行う。領域判定部208は、ブロックが空領域を含むと判定した場合は、S604に進みブロック画像を第1の補正部209に出力する。また領域判定部208は、ブロックが空領域を含まないと判定した場合は、S605に進みブロック画像を第2の補正210に出力する。 In S603, the area determination unit 208 determines whether or not the block to be processed includes an empty area. Here, the area determination for the block is performed by the same method as the area determination unit 204 in S503 described above. When the area determination unit 208 determines that the block includes an empty area, the area determination unit 208 proceeds to S604 and outputs the block image to the first correction unit 209. If the area determination unit 208 determines that the block does not include an empty area, the area determination unit 208 proceeds to S605 and outputs the block image to the second correction 210.

S605において第1の補正部209は、入力されたブロック画像に対して第1の補正処理を実行する。ここで第1の補正処理とは、霧霞除去画像を推定する学習モデルに基づくパラメータが設定されたニューラルネットワークによる処理のことである。この処理により、ブロック画像は、コントラストが拡大した霧霞による影響が低減された補正済ブロックに変換される。 In S605, the first correction unit 209 executes the first correction process on the input block image. Here, the first correction process is a process by a neural network in which parameters based on a learning model for estimating a fog haze removal image are set. By this process, the block image is converted into a corrected block in which the influence of the fog haze with increased contrast is reduced.

S607において第2の補正部210は、入力された空領域を含むブロック画像に対して第2の補正処理を実行する。本実施形態において第2の補正処理は、彩度補正処理を実行する。第2の補正部210は、処理対象のブロックに含まれる画素を順に注目画素とし、まず、注目画素のR,G,Bの画素値をYCbCr色空間に変換する。色空間の変換処理は、公知の計算式を用いて実行する。第2の補正部201は、Cb、Cr成分に対して所定のゲインを乗算する。 In S607, the second correction unit 210 executes the second correction process on the block image including the input empty area. In the second correction process in the present embodiment, the saturation correction process is executed. The second correction unit 210 sequentially sets the pixels included in the block to be processed as the pixels of interest, and first converts the pixel values of R, G, and B of the pixels of interest into the YCbCr color space. The color space conversion process is performed using a known calculation formula. The second correction unit 201 multiplies the Cb and Cr components by a predetermined gain.

S608において領域判定部208は、処理対象の画像においてすべてのブロックに対して判定処理を実行したか否かを判定し、未処理ブロックがある場合には、S603に戻る。すべてに対する判定処理が完了していれば、S609に進む。 In S608, the area determination unit 208 determines whether or not the determination process has been executed for all the blocks in the image to be processed, and if there are unprocessed blocks, returns to S603. If the determination processing for all is completed, the process proceeds to S609.

S609において出力画像生成部211は、処理対象の画像において補正済ブロックのデータを蓄積し、1つの補正画像を生成し、出力する。以上で霧霞除去処理は完了する。 In S609, the output image generation unit 211 accumulates the data of the corrected block in the image to be processed, generates one corrected image, and outputs it. This completes the fog haze removal process.

以上の通り本実施形態においては、画像のうち空領域を含まない被写体領域に対しては、教師あり学習によって得られる学習モデルを用いて散乱光による影響を低減した補正画像を生成する。一方、空領域に対しては彩度補正処理によって散乱光による影響を低減した補正画像を生成する。 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 processing unit 700 in the present embodiment includes a position information acquisition unit 810, a posture information acquisition unit 711, and an image determination unit 712. The position information acquisition unit 710 causes the user to display the graphical user interface (GUI) shown in FIG. 8 and accepts input from the user. As a result, the position information acquisition unit 710 acquires indoor / outdoor information indicating whether or not the image pickup unit 111 is installed indoors or outdoors as position information.

姿勢情報取得部711は、処理対象画像を撮影した時の撮像部111の姿勢を示す情報を取得する。ここでは姿勢情報取得部711は、撮像部111から、撮像部111の仰角方向に関する情報を姿勢情報として取得する。すなわち、撮像部111には、仰角方向の角度を検出可能な角度センサ(不図示)が内蔵されており、処理対象の画像を霧霞除去処理部700に転送する際には、角度センサの角度情報も一緒に転送する。 The posture information acquisition unit 711 acquires information indicating the posture of the imaging unit 111 when the image to be processed is captured. Here, the posture information acquisition unit 711 acquires information regarding the elevation angle direction of the image pickup unit 111 as posture information from the image pickup unit 111. That is, the image pickup unit 111 has a built-in angle sensor (not shown) capable of detecting the angle in the elevation angle direction, and when the image to be processed is transferred to the fog haze removal processing unit 700, the angle of the angle sensor Information is also transferred.

画像判定部712は、処理対象の画像に空領域が含まれる可能性があるか否かを判定する。判定結果に応じて、処理対象の画像を、ブロック分割部207、第1の補正部209、第2の補正部210のいずれかに出力する。 The image determination unit 712 determines whether or not the image to be processed may include an empty area. The image to be processed is output to any of the block division unit 207, the first correction unit 209, and the second correction unit 210 according to the determination result.

霧霞除去処理部700が実行する霧霞除去処理の流れを、詳細に説明する。なお、第1の補正部209におけるニューラルネットワークのパラメータは、第1の実施形態と同様の学習方法により調整されたパラメータによって更新されている。図9は、霧霞除去処理のフローチャートである。 The flow of the mist haze removal process executed by the mist haze removal process unit 700 will be described in detail. The parameters of the neural network in the first correction unit 209 are updated by the parameters adjusted by the same learning method as in the first embodiment. FIG. 9 is a flowchart of the fog haze removal process.

S901において霧霞除去処理部700は、処理対象の画像を取得する。S902において位置情報取得部710は、表示部110に図8に示す画像を表示させる。S903において位置情報取得部710は、ユーザがGUIを介して屋外か屋内のいずれかを選択した結果を示す屋内外情報を取得する。 In S901, the fog haze removal processing unit 700 acquires an image to be processed. In S902, the position information acquisition unit 710 causes the display unit 110 to display the image shown in FIG. In S903, the position information acquisition unit 710 acquires indoor / outdoor information indicating the result of the user selecting either outdoor or indoor via the GUI.

S905において姿勢情報取得部711は、撮像部111から、撮像部111の仰角方向に関する情報を姿勢情報として取得する。なお本実施形態において姿勢情報取得部711は、撮像部111が真下の地面方向を向いている場合を−90度とし、水平方向を0度、真上の天井や空方向を向いている場合は90度として、仰角方向の角度を取得する。 In S905, the posture information acquisition unit 711 acquires information regarding the elevation angle direction of the image pickup unit 111 from the image pickup unit 111 as posture information. In the present embodiment, the attitude information acquisition unit 711 is -90 degrees when the image pickup unit 111 is facing the ground directly below, 0 degrees in the horizontal direction, and is facing the ceiling or the sky directly above. The angle in the elevation angle direction is acquired as 90 degrees.

S905において画像判定部712は、位置情報や姿勢情報に基づいて、処理対象の画像に空領域が含まれる可能性があるか否かを判定する。ユーザ入力により、屋内が選択された場合、および屋外が選択され、かつ姿勢情報が−45〜−90を示す場合は、処理対象の画像は空領域を含まないと判定する。これは屋外で撮像された画像であっても、撮像方向が地面や床を向いていて、空領域を含んでいる可能性が低いためである。処理対象の画像は空領域を含まないと判定すると、次に画像判定部712はS911に進み、処理対象の画像を第2の補正部210に出力する。また、屋外が選択され、かつ姿勢情報が−45〜90度を示す場合は、空領域を含むと判定する。画像が空領域を含むと判定すると画像判定部712は、S906に進む。 In S905, the image determination unit 712 determines whether or not there is a possibility that the image to be processed includes an empty area based on the position information and the posture information. When indoors are selected by user input, and when outdoor is selected and the posture information indicates 45-90, it is determined that the image to be processed does not include an empty area. This is because even if the image is taken outdoors, it is unlikely that the image is oriented toward the ground or the floor and includes an empty area. When it is determined that the image to be processed does not include an empty area, the image determination unit 712 then proceeds to S911 and outputs the image to be processed to the second correction unit 210. If outdoor is selected and the posture information shows 45 to 90 degrees, it is determined that an empty area is included. If it is determined that the image includes an empty area, the image determination unit 712 proceeds to S906.

S906において画像判定部712はさらに、処理対象の画像が空領域のみか否かを判定する。本実施形態では画像判定部712は、カラー画像における画素値から色相を算出し、保存しておく。さらに画像判定部712は、各画素の色相が空と認定される範囲にある画素の数をカウントし、所定の比率、例えば95%以上の画素が空の色相である場合には、空領域のみであると判定する。画像判定部712は空領域のみの画像である場合には、S907に進み、処理対象の画像を第1の補正部209に出力する。一方、空領域は含むが空領域のみではないと判定した場合には、画像判定部712はS909に進む。 In S906, the image determination unit 712 further determines whether or not the image to be processed is only an empty area. In the present embodiment, the image determination unit 712 calculates the hue from the pixel value in the color image and stores it. Further, the image determination unit 712 counts the number of pixels in the range where the hue of each pixel is recognized as empty, and when a predetermined ratio, for example, 95% or more of the pixels are empty hues, only the empty area is used. Is determined to be. When the image determination unit 712 is an image having only an empty area, the process proceeds to S907, and the image to be processed is output to the first correction unit 209. On the other hand, when it is determined that the empty area is included but not only the empty area, the image determination unit 712 proceeds to S909.

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 area determination unit 208 does not calculate the hue of each pixel, but the image determination unit 712 may refer to the calculated and stored hue of each pixel.

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 second correction unit 210. In S908, the second correction unit 210 executes the second correction process on the input image.

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 first correction unit 210. In S912, the first correction unit 209 executes the first correction process on the input image. In S913, when the correction processing for all the pixels is completed, the output image generation unit 211 outputs the corrected image.

以上の通り本実施形態においては、位置情報や姿勢情報に応じて、画像に対する霧霞除去処理を制御する。霧霞除去処理としては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 image determination unit 710 does not have to be executed every time the image to be processed is input. It may be executed only when the installation position is changed or the setting is reset, and in other cases, the result of the determination once may be diverted.

<その他の実施形態>
上述の実施形態においては、晴天画像を教師データとして、霧霞画像から霧霞を低減した画像を推定するモデルを学習する場合について、説明した。しかしながら、機会学習を用いた補正処理は、他の方法もある。例えば、霧霞画像を生徒データ、霧霞画像に対応する透過率マップを教師データとして学習することで、霧霞画像から透過率マップを推定する学習モデルを学習するようにしてもよい。このような学習モデルのパラメータが設定された補正処理を実行する場合はまず、ニューラルネットワークを介して処理対象の画像に対応する透過率マップを推定する。その後、透過率マップを参照して処理対象の画像における画素ごとにコントラスト調整する処理を実行すればよい。透過率マップを用いた霧霞除去処理については、公知であるため説明を省略する。
<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 image acquisition unit 203 Block division unit 204 Area determination unit 205 Learning unit 206 Image input unit 207 Block division unit 208 Area determination unit 209 First correction unit 210 Second correction unit 211 Output image generation unit

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に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the first correction processing means has a neural network and parameters corresponding to the model are set. 前記第2の補正処理は、画素ごとの演算処理であることを特徴とする請求項1または2に記載の画像処理装置。 The image processing apparatus according to claim 1 or 2, wherein the second correction process is a pixel-by-pixel calculation process. 前記判定手段は、前記処理対象の画像のブロックごとに、判定することを特徴とする請求項1乃至3の何れか一項に記載の画像処理装置。 The image processing apparatus according to any one of claims 1 to 3, wherein the determination means determines for each block of the image to be processed. 前記判定手段は、前記処理対象の画像に対して判定し、
前記処理対象の画像が空領域を含まないと判定した場合は、前記処理対象の画像は前記第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.
前記判定手段は、前記処理対象の画像が空領域を含むと判定した場合、さらに前記処理対象の画像は空領域のみであるか否かを判定することを特徴とする請求項5に記載の画像処理装置。 The image according to claim 5, wherein when the determination means determines that the image to be processed includes an empty area, it further determines whether or not the image to be processed contains only an empty area. Processing equipment. 前記判定手段が空領域のみであると判定した場合は、前記処理対象の画像は前記第2の補正処理手段による前記第2の補正処理のみが実行されることを特徴とする請求項6に記載の画像処理装置。 The sixth aspect of claim 6, wherein when it is determined that the determination means is only an empty area, only the second correction processing by the second correction processing means is executed for the image to be processed. Image processing equipment. 前記判定手段が、前記処理対象の画像が空領域を含むが、空領域のみではないと判定した場合は、前記処理対象の画像は、ブロックごとに前記第1の補正処理または前記第2の補正処理の何れかが実行されることを特徴とする請求項6または7に記載の画像処理装置。 When the determination means determines that the image to be processed includes an empty area but not only the empty area, the image to be processed is subjected to the first correction process or the second correction for each block. The image processing apparatus according to claim 6 or 7, wherein any of the processes is executed. 前記判定手段は、前記処理対象の画像を撮像した撮像装置が屋内に設置されているか屋外に設置されているかを示す情報に基づいて、空領域を含むか否かを判定することを特徴とする請求項5乃至8の何れか一項に記載の画像処理装置。 The determination means is characterized in that it determines whether or not an empty region is included based on information indicating whether the image pickup device that has captured the image to be processed is installed indoors or outdoors. The image processing apparatus according to any one of claims 5 to 8. 前記判定手段は、前記撮像装置の撮像時の姿勢を示す姿勢情報に基づいて、前記空領域のみか否かを判定することを特徴とする請求項6乃至8の何れか一項に記載の画像処理装置。 The image according to any one of claims 6 to 8, wherein the determination means determines whether or not the image is only in the empty region based on the attitude information indicating the attitude of the image pickup apparatus at the time of imaging. Processing equipment. コンピュータを請求項1乃至10の何れか1項に記載の画像処理装置として機能させるためのプログラム。 A program for operating a computer as the image processing device according to any one of claims 1 to 10. 処理対象の画像に対して、散乱光の影響の少なくとも一部を除去した補正画像を生成する画像処理方法であって、
前記処理対象の画像に対して、空領域を含むか否かを判定し、
空領域を含まないと判定された画像に対しては、散乱光の影響の少ない空領域のみの画像を教師データとせず、散乱光の影響の少ない空以外の領域の画像を教師データとして学習したモデルを用いる第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.
JP2019143099A 2019-08-02 2019-08-02 Image processing device, image processing method, and program Active JP7406886B2 (en)

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)

* Cited by examiner, † Cited by third party
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
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