JP7406886B2 - Image processing device, image processing method, and program - Google Patents

Image processing device, image processing method, and program Download PDF

Info

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
Application number
JP2019143099A
Other languages
Japanese (ja)
Other versions
JP2021026451A (en
Inventor
美央 松丸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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)

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.

米国特許公報2016/0005152US Patent Publication 2016/0005152

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

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

以下、添付の図面を参照して、本発明を好適な実施形態に基づいて詳細に説明する。なお、以下の実施形態において示す構成は一例にすぎず、本発明は図示された構成に必ずしも限定されるものではない。 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 image processing apparatus 100 of this embodiment. The image processing apparatus 100 of this embodiment includes 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 centrally controls each component described below. The RAM 102 is a memory that functions as the main memory and work area of the CPU 101, and the ROM 103 is a memory that stores programs that control processing within the image processing apparatus 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, for example, an interface such as serial ATA (SATA), and connects the HDD 105 as a secondary storage device to the system bus 108. The CPU 101 is capable of reading data from and writing 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 save the data expanded into the RAM 102 into the HDD 105. The CPU 101 can then regard the data developed in the RAM 102 as a program and execute it. Note that 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, for example, 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 an external memory 109 and an imaging unit 111 via an 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, for example, a video output interface such as DVI or HDMI (registered trademark). The image processing device 100 is connected to a display unit 110 via an 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 within the image processing apparatus 100 is interconnected 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 processed by the image processing apparatus 100. The display unit 110 is a display device such as a display, and can display images processed by the image processing device 100.

撮像部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 image processing apparatus 100 in this embodiment. The image processing device 100 includes a fog/haze removal processing section 200 that performs fog/haze removal processing and a learning data generation section 201 that generates learning data.

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

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

ブロック分割部203は、取得した晴天画像と霧霞画像とのペアを分割し、ブロック画像を出力する。ブロック分割部203は、後述するように、学習部204におけるニューラルネットワークの入力層のノード数に応じて、画像をブロックに分割する。ブロック分割部203は、分割したブロック画像のペアを順に領域判定部204に出力する。領域判定部204は、処理対象のブロックペアのうち晴天画像から抽出されたブロックに基づいて、空領域を含むか否かを判定する。領域判定部204は、空領域を含むと判定したブロックは学習部204に出力せず、空領域を含まないと判定したブロックは学習部205に出力する。 The block division unit 203 divides the acquired pair of the clear sky image and foggy image, and outputs block images. The block dividing 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, as described later. The block dividing unit 203 sequentially outputs pairs of divided block images to the area determining unit 204. The region determining unit 204 determines whether or not a sky region is included, based on the block extracted from the clear sky image among the block pairs to be processed. The area determination unit 204 does not output blocks determined to include a sky area to the learning unit 204, and outputs blocks determined to not include a sky area to the learning unit 205.

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

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

次に、学習用データ生成部201における学習処理の流れを、詳細に説明する。図5は、学習処理のフローチャートである。CPU101が、図5に示すフローチャートを実現可能なプログラムを読み出し実行することで、各構成(機能)が実現される。なお以下においては、フローチャートにおける各工程(ステップ)を、「S」と付して説明する。 Next, the flow of learning processing in the learning data generation unit 201 will be explained 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 that can realize the flowchart shown in FIG. In addition, below, each process (step) in a flowchart is attached|subjected with "S", and is demonstrated.

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 captured from the same location under the same wind conditions on a clear day, and a foggy image captured under the influence of scattered light due to occurrence of foggy haze, etc. are acquired. For example, two pieces of image data may be acquired by referring to the weather forecast from an external memory in which images captured by a fixed surveillance camera installed at a predetermined position are stored. In this case, it is preferable to obtain 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 dividing unit 203 divides one set of images into blocks. In this embodiment, block images of 16 pixels x 16 pixels are sequentially extracted from the upper left of the image. FIG. 3B is a diagram illustrating blocks divided by the block division unit 203. As shown in FIG. 3(b), the image is divided into blocks in the form of tiles, and a plurality of block images are extracted from one image. The block dividing unit 203 outputs two blocks extracted from the same position in the clear sky image and the corresponding haze image to the area determining 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 the block image of the clear sky image among the acquired pair of block images includes a sky area. A known technique may be used to determine whether the area is empty or not. In this embodiment, the hue is calculated from the R, G, and B pixel values of each pixel in the block, and it is determined whether the hue is within a preset range of hues that are likely to be sky. The area determination unit 204 calculates the number of pixels determined to be sky area pixels in the block, and determines that the block image includes a sky area if the number of sky area pixels is greater than or equal to a predetermined threshold; S504 is skipped and the process advances to S505. Further, if the number of pixels in the sky area is less than a predetermined threshold, the area determination unit 204 determines that the block image does not include a sky area, and the process proceeds to S504.

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

S507において学習部205は、入力された学習用データを用いて散乱の影響を低減した画像を推定する学習モデルのパラメータを生成する。S508において学習部205は生成した学習モデルのパラメータを、後述する第1の補正部209に出力する。 In S507, the learning unit 205 uses the input learning data to generate parameters for a learning model that estimates an image with reduced effects of scattering. In S508, the learning unit 205 outputs the parameters of the generated learning model to the first correction unit 209, which will be 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 explained. First, the image input unit 206 inputs an image to be processed in which the influence of scattering due to fog and haze is to be removed. The block dividing unit 207 divides the image to be processed into blocks. In this embodiment, the block dividing unit 207 divides the block image into blocks having the same size as the size of the block image extracted by the block dividing unit 203. The area determination unit 208 determines whether the block to be processed includes an empty area. The area determination unit 208 outputs blocks that do not include a sky area to the first correction unit 209 and outputs blocks that include a sky 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 section 209 has the same network structure as the learning section 205. Furthermore, each weighting coefficient and bias value in the neural network is set according to the parameters output from the learning section 205. In other words, the second correction unit 209 performs correction processing on the block to be processed based on a model that removes the influence of fog and haze, which is learned using an image that does not include a sky region. The first correction unit 209 estimates an image with the original contrast by removing the influence of fog from the image to be processed, and outputs a corrected block.

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

霧霞除去処理部200が実行する霧霞除去処理の流れを、詳細に説明する。図6は、霧霞除去処理のフローチャートである。CPU101が、図6に示すフローチャートを実現可能なプログラムを読み出し実行することで、各構成(機能)が実現される。 The flow of the fog and haze removal processing executed by the fog and haze removal processing unit 200 will be described in detail. FIG. 6 is a flowchart of fog removal processing. Each configuration (function) is realized by the CPU 101 reading and executing a program that can realize 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, similarly to the learning image data, a color image consisting of R, G, and B planes is used as the image to be processed. In S602, the block dividing unit 203 divides the image to be processed. In this embodiment, the image to be processed is divided into blocks of 16 pixels x 16 pixels.

S603において領域判定部208は、処理対象のブロックが空領域を含むか否かを判定する。ここでは上述したS503における領域判定部204と同様の方法により、ブロックに対する領域判定を行う。領域判定部208は、ブロックが空領域を含むと判定した場合は、S604に進みブロック画像を第1の補正部209に出力する。また領域判定部208は、ブロックが空領域を含まないと判定した場合は、S605に進みブロック画像を第2の補正210に出力する。 In S603, the area determination unit 208 determines whether the block to be processed includes an empty area. Here, area determination for the block is performed using a method similar to that of the area determination unit 204 in S503 described above. If the area determination unit 208 determines that the block includes a sky area, the process 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 a sky area, the process proceeds to step S<b>605 and outputs the block image to the second correction 210 .

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

S607において第2の補正部210は、入力された空領域を含むブロック画像に対して第2の補正処理を実行する。本実施形態において第2の補正処理は、彩度補正処理を実行する。第2の補正部210は、処理対象のブロックに含まれる画素を順に注目画素とし、まず、注目画素のR,G,Bの画素値をYCbCr色空間に変換する。色空間の変換処理は、公知の計算式を用いて実行する。第2の補正部201は、Cb、Cr成分に対して所定のゲインを乗算する。 In S607, the second correction unit 210 performs the second correction process on the input block image including the sky area. In the present embodiment, the second correction process is a saturation correction process. The second correction unit 210 sequentially sets the pixels included in the block to be processed as the pixel of interest, and first converts the R, G, and B pixel values of the pixel of interest into the YCbCr color space. The color space conversion process is executed 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 determination processing has been performed on all blocks in the image to be processed, and if there are unprocessed blocks, the process returns to S603. If the determination processing for all has been completed, the process advances to S609.

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

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

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

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

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

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 displays the image shown in FIG. 8 on the display unit 110. In S903, the position information acquisition unit 710 acquires indoor/outdoor information indicating the result of the user selecting either outdoors or indoors via the GUI.

S905において姿勢情報取得部711は、撮像部111から、撮像部111の仰角方向に関する情報を姿勢情報として取得する。なお本実施形態において姿勢情報取得部711は、撮像部111が真下の地面方向を向いている場合を-90度とし、水平方向を0度、真上の天井や空方向を向いている場合は90度として、仰角方向の角度を取得する。 In step S<b>905 , the attitude information acquisition unit 711 acquires information regarding the elevation angle direction of the imaging unit 111 from the imaging unit 111 as attitude information. In this embodiment, the attitude information acquisition unit 711 determines -90 degrees when the imaging unit 111 is facing the ground directly below, 0 degrees when the horizontal direction is facing, and 0 degrees when the imaging unit 111 is facing the ceiling or sky directly above. The angle in the elevation direction is obtained 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 a sky area, based on the position information and orientation information. When indoors is selected by user input, or when outdoors is selected and the orientation information indicates -45 to -90, it is determined that the image to be processed does not include a sky area. This is because even if the image is captured outdoors, the imaging direction is facing the ground or the floor, and there is a low possibility that the image includes a sky area. If it is determined that the image to be processed does not include a sky area, the image determination unit 712 then proceeds to S911 and outputs the image to be processed to the second correction unit 210. Furthermore, if outdoors is selected and the orientation information indicates -45 to 90 degrees, it is determined that the sky area is included. When determining that the image includes a sky area, the image determining unit 712 advances to S906.

S906において画像判定部712はさらに、処理対象の画像が空領域のみか否かを判定する。本実施形態では画像判定部712は、カラー画像における画素値から色相を算出し、保存しておく。さらに画像判定部712は、各画素の色相が空と認定される範囲にある画素の数をカウントし、所定の比率、例えば95%以上の画素が空の色相である場合には、空領域のみであると判定する。画像判定部712は空領域のみの画像である場合には、S907に進み、処理対象の画像を第1の補正部209に出力する。一方、空領域は含むが空領域のみではないと判定した場合には、画像判定部712はS909に進む。 In S906, the image determination unit 712 further determines whether the image to be processed is only a sky area. In this embodiment, the image determination unit 712 calculates the hue from the pixel values in the color image and stores it. Furthermore, the image determination unit 712 counts the number of pixels in which the hue of each pixel is within a range recognized as sky, and if a predetermined ratio, for example, 95% or more of the pixels have a sky hue, only the sky area is counted. It is determined that If the image is a sky area-only image, the image determination unit 712 proceeds to S907 and outputs the image to be processed to the first correction unit 209. On the other hand, if it is determined that the image includes a sky area but is not only a sky area, the image determination unit 712 advances 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 may refer to the hue of each pixel calculated and stored by the image determination unit 712.

S907において第2の補正部210には、空領域を含むブロック画像または、空領域のみの画像を入力される。S908において第2の補正部210は、入力された画像に対して第2の補正処理を実行する。 In S907, the second correction unit 210 receives a block image including a sky region or an image containing only a sky region. In S908, the second correction unit 210 performs second correction processing on the input image.

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

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

<その他の実施形態>
上述の実施形態においては、晴天画像を教師データとして、霧霞画像から霧霞を低減した画像を推定するモデルを学習する場合について、説明した。しかしながら、機会学習を用いた補正処理は、他の方法もある。例えば、霧霞画像を生徒データ、霧霞画像に対応する透過率マップを教師データとして学習することで、霧霞画像から透過率マップを推定する学習モデルを学習するようにしてもよい。このような学習モデルのパラメータが設定された補正処理を実行する場合はまず、ニューラルネットワークを介して処理対象の画像に対応する透過率マップを推定する。その後、透過率マップを参照して処理対象の画像における画素ごとにコントラスト調整する処理を実行すればよい。透過率マップを用いた霧霞除去処理については、公知であるため説明を省略する。
<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 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の補正処理を実行するとともに、当該画像の空領域以外の領域に対して前記第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に記載の画像処理装置。 2. The image processing apparatus according to claim 1, wherein the first correction processing means includes a neural network, and parameters are set according to the model. 前記第2の補正処理は、画素ごとの演算処理であることを特徴とする請求項1または2に記載の画像処理装置。 3. The image processing apparatus according to claim 1, wherein the second correction process is an arithmetic process for each pixel. 前記判定手段は、前記処理対象の画像のブロックごとに、判定することを特徴とする請求項1乃至3の何れか一項に記載の画像処理装置。 The image processing apparatus according to any one of claims 1 to 3, wherein the determination unit performs the determination for each block of the image to be processed. 前記判定手段は、前記処理対象の画像に対して判定し、
前記処理対象の画像が空領域を含まないと判定した場合は、前記処理対象の画像は前記第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.
前記判定手段が空領域のみであると判定した場合は、前記処理対象の画像は前記第2の補正処理手段による前記第2の補正処理のみが実行されることを特徴とする請求項6に記載の画像処理装置。 7. If the determining means determines that the image is only a sky area, only the second correction processing by the second correction processing means is performed on the image to be processed. image processing device. 前記判定手段が、前記処理対象の画像が空領域を含むが、空領域のみではないと判定した場合は、前記処理対象の画像は、ブロックごとに前記第1の補正処理または前記第2の補正処理の何れかが実行されることを特徴とする請求項6または7に記載の画像処理装置。 If the determination means determines that the image to be processed includes a sky area but not only a sky area, the image to be processed is subjected to the first correction process or the second correction process for each block. The image processing apparatus according to claim 6 or 7, wherein any one of the processes is executed. 前記判定手段は、前記処理対象の画像を撮像した撮像装置が屋内に設置されているか屋外に設置されているかを示す情報に基づいて、空領域を含むか否かを判定することを特徴とする請求項5乃至8の何れか一項に記載の画像処理装置。 The determination means determines whether the image includes a sky area based on information indicating whether the imaging device that captured the image to be processed is installed indoors or outdoors. The image processing device according to any one of claims 5 to 8. 前記判定手段は、前記処理対象の画像を撮像した撮像装置の撮像時の姿勢を示す姿勢情報に基づいて、前記空領域のみか否かを判定することを特徴とする請求項6乃至8の何れか一項に記載の画像処理装置。 9. The determining means determines whether or not there is only the sky area based on posture information indicating the posture at the time of image capturing of the image capturing device that captured the image to be processed. The image processing device according to item (1). コンピュータを請求項1乃至10の何れか1項に記載の画像処理装置として機能させるためのプログラム。 A program for causing a computer to function as the image processing apparatus according to any one of claims 1 to 10. 処理対象の画像に対して、散乱光の影響の少なくとも一部を除去した補正画像を生成する画像処理方法であって、
判定手段が、前記処理対象の画像に対して、空領域を含むか否かを判定し、
第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
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 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)

* 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
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