JPWO2017179510A1 - Image processing apparatus, image processing method, image processing program, and gas detection system - Google Patents

Image processing apparatus, image processing method, image processing program, and gas detection system Download PDF

Info

Publication number
JPWO2017179510A1
JPWO2017179510A1 JP2018511991A JP2018511991A JPWO2017179510A1 JP WO2017179510 A1 JPWO2017179510 A1 JP WO2017179510A1 JP 2018511991 A JP2018511991 A JP 2018511991A JP 2018511991 A JP2018511991 A JP 2018511991A JP WO2017179510 A1 JPWO2017179510 A1 JP WO2017179510A1
Authority
JP
Japan
Prior art keywords
change
pixel
value indicating
value
indicating
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
JP2018511991A
Other languages
Japanese (ja)
Other versions
JP6838605B2 (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.)
Konica Minolta Inc
Original Assignee
Konica Minolta 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 Konica Minolta Inc filed Critical Konica Minolta Inc
Publication of JPWO2017179510A1 publication Critical patent/JPWO2017179510A1/en
Application granted granted Critical
Publication of JP6838605B2 publication Critical patent/JP6838605B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B5/00Adjustment of optical system relative to image or object surface other than for focusing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)

Abstract

画像処理装置は、カメラによって撮影された時系列に並ぶ複数の画像に対して画像処理をする。前記画像処理装置は、前記複数の画像について、画素データの空間変化を示す値、及び、前記画素データの時間変化を示す値を算出する第1の算出部と、前記第1の算出部によって算出された前記空間変化を示す値、及び、前記時間変化を示す値を統計処理して、前記カメラのブレにより生じる前記複数の画像のそれぞれのブレを示す値を算出する第2の算出部と、を備える。The image processing apparatus performs image processing on a plurality of images arranged in time series photographed by a camera. The image processing device calculates a value indicating a spatial change of pixel data and a value indicating a temporal change of the pixel data for the plurality of images, and the first calculation unit. A second calculation unit that statistically processes the value indicating the spatial change and the value indicating the time change, and calculates a value indicating each blur of the plurality of images caused by the camera shake; Is provided.

Description

本発明は、カメラのブレによるノイズに対処できる画像処理技術に関する。   The present invention relates to an image processing technique that can cope with noise caused by camera shake.

ガス漏れが発生したとき、漏れたガスが漂っている空間では、わずかな温度変化が生じる。この原理を利用してガスを検知する技術として、赤外線カメラを利用したガス検知が知られている。   When a gas leak occurs, a slight temperature change occurs in the space where the leaked gas is drifting. As a technique for detecting gas using this principle, gas detection using an infrared camera is known.

赤外線カメラによって監視対象(例えば、ガス輸送管どうしが接続されている箇所)の撮影中に、赤外線カメラが揺れることにより、カメラのブレが生じることがある。これにより、赤外線カメラによって撮影された赤外画像には、カメラのブレによるノイズが含まれるので、ガスの検知精度が低下する。   The camera shake may occur due to the shaking of the infrared camera during the shooting of the monitoring target (for example, the place where the gas transport pipes are connected) by the infrared camera. Thereby, since the infrared image image | photographed with the infrared camera contains the noise by the blurring of a camera, the detection accuracy of gas falls.

カメラのブレに対処する技術として、前フレーム画像と現フレーム画像とをパターンマッチングすることにより手ブレ量を検出し、手ブレ量を基にして、現フレーム画像から低解像度画像を形成する撮像装置が提案されている(例えば、特許文献1参照)。   An imaging device that detects the amount of camera shake by pattern matching between the previous frame image and the current frame image, and forms a low-resolution image from the current frame image based on the amount of camera shake as a technique for dealing with camera shake Has been proposed (see, for example, Patent Document 1).

ガスの濃度を示す指標の一つとして、爆発下限界(Lower Explosive Limit)がある。単位は、vol%である。爆発下限界は、空気と混合した可燃性ガスが着火によって爆発を起こす最低濃度である。メタンの場合、爆発下限界は、5vol%である。また、爆発下限界の濃度を100とする濃度の単位として、%LELが知られている。即ち、メタンの濃度5vol%は、100%LELと等しく、メタンの濃度10vol%は、200%LELと等しい。   As one of the indexes indicating the gas concentration, there is a lower explosive limit (Low Explosive Limit). The unit is vol%. The lower explosion limit is the lowest concentration at which a combustible gas mixed with air will cause an explosion upon ignition. In the case of methane, the lower explosion limit is 5 vol%. Further,% LEL is known as a unit of concentration where the lower explosion limit concentration is 100. That is, a methane concentration of 5 vol% is equal to 100% LEL, and a methane concentration of 10 vol% is equal to 200% LEL.

赤外線カメラを利用したガス検知では、ガスが漂っている空間のガスの濃度を直接測定することができず、ガスの濃度厚み積を測定する。ガスの濃度厚み積とは、ガスの濃度を、ガスが漂っている空間の奥行き方向に沿って積分した値を意味する。ガスの濃度厚み積の単位は、%LEL・mである。例えば、ガスの濃度が200%LELであり、ガスの厚みが2mのとき、濃度厚み積は、400%LEL・mとなる。   In gas detection using an infrared camera, the gas concentration in the space where the gas is drifting cannot be directly measured, but the gas thickness product is measured. The gas concentration / thickness product means a value obtained by integrating the gas concentration along the depth direction of the space where the gas drifts. The unit of the gas concentration thickness product is% LEL · m. For example, when the gas concentration is 200% LEL and the gas thickness is 2 m, the concentration thickness product is 400% LEL · m.

赤外線カメラによって監視対象を遠隔(例えば、50m以上)から撮影し、ガス検知のアルゴリズムを用いて、比較的低い濃度(例えば、10%LEL・m)のメタンガスを検知する場合がある。このような場合、本発明者は、カメラのブレ量が極めて小さくても(例えば、0.01〜0.05画素)、カメラのブレによるノイズを画像から除去しなければ、ガス検知の精度が低下することを見出した。   In some cases, the object to be monitored is photographed remotely (for example, 50 m or more) with an infrared camera, and methane gas having a relatively low concentration (for example, 10% LEL · m) is detected using a gas detection algorithm. In such a case, even if the camera shake amount is extremely small (for example, 0.01 to 0.05 pixels), the present inventor has no gas detection accuracy unless noise from the camera shake is removed from the image. I found it to decline.

カメラのブレによるノイズを画像から除去するためには、カメラのブレにより生じる画像のブレを示す値(例えば、画像全体のブレ量)を求める必要がある。   In order to remove noise caused by camera shake from an image, it is necessary to obtain a value (for example, a blur amount of the entire image) indicating image blur caused by camera shake.

特開2006−067291号公報JP 2006-067291 A

本発明は、カメラのブレにより生じる画像のブレを示す値を算出できる画像処理装置、画像処理方法、画像処理プログラム、及び、ガス検知システムを提供することを目的とする。   An object of the present invention is to provide an image processing apparatus, an image processing method, an image processing program, and a gas detection system that can calculate a value indicating image blur caused by camera shake.

上記目的を達成する本発明の第1の局面に係る画像処理装置は、カメラによって撮影された時系列に並ぶ複数の画像に対して画像処理をする装置であって、第1の算出部と、第2の算出部と、を備える。前記第1の算出部は、前記複数の画像について、画素データの空間変化を示す値、及び、前記画素データの時間変化を示す値を算出する。前記第2の算出部は、前記第1の算出部によって算出された前記空間変化を示す値、及び、前記時間変化を示す値を統計処理して、前記カメラのブレにより生じる前記複数の画像のそれぞれのブレを示す値を算出する。   An image processing apparatus according to a first aspect of the present invention that achieves the above object is an apparatus that performs image processing on a plurality of images arranged in a time series photographed by a camera, and includes a first calculation unit, A second calculation unit. The first calculation unit calculates a value indicating a spatial change of pixel data and a value indicating a temporal change of the pixel data for the plurality of images. The second calculation unit statistically processes the value indicating the spatial change and the value indicating the time change calculated by the first calculation unit, and calculates the plurality of images generated by the camera shake. A value indicating each blur is calculated.

上記並びにその他の本発明の目的、特徴及び利点は、以下の詳細な記載と添付図面から明らかになるであろう。   The above and other objects, features and advantages of the present invention will become apparent from the following detailed description and the accompanying drawings.

現フレームと次のフレームとの間において発生したカメラのブレによる画素値の空間変化を示す値と、画素値の時間変化を示す値との関係を説明する説明図である。It is explanatory drawing explaining the relationship between the value which shows the spatial change of the pixel value by the camera shake generate | occur | produced between the present frame and the following frame, and the value which shows the time change of a pixel value. 次のフレームを構成する全画素のそれぞれについて、画素値のx軸方向の変化を示す値と画素値の時間変化を示す値との関係を示す三つのグラフである。It is three graphs which show the relationship between the value which shows the change of the x-axis direction of a pixel value, and the value which shows the time change of a pixel value about each of all the pixels which comprise the following flame | frame. 本実施形態に係る画像処理装置が適用されたガス検知システムの構成を示すブロック図である。It is a block diagram which shows the structure of the gas detection system to which the image processing apparatus which concerns on this embodiment was applied. 図3Aに示す画像処理装置のハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions of the image processing apparatus shown to FIG. 3A. 時系列画素データを説明する説明図である。It is explanatory drawing explaining time series pixel data. 第1実施形態に係る画像処理装置の動作を説明するフローチャートである。4 is a flowchart for explaining the operation of the image processing apparatus according to the first embodiment. 時系列画素データを構成する周波数成分データを説明する説明図である。It is explanatory drawing explaining the frequency component data which comprise time series pixel data. 図5のステップS1で用いられるバンドパスフィルターを説明する説明図である。It is explanatory drawing explaining the band pass filter used by step S1 of FIG. 1番目の画素の時系列画素データから抽出された所定の周波数成分データdを示すグラフである。It is a graph which shows the predetermined frequency component data d extracted from the time series pixel data of the 1st pixel. 所定の周波数成分データdをフレーム単位で説明する説明図である。It is explanatory drawing explaining the predetermined frequency component data d per frame. 図5のステップS2の処理を説明する説明図である。It is explanatory drawing explaining the process of step S2 of FIG. 第1実施形態において、1番目のフレームのSx及びSyを求める処理を説明する説明図である。It is explanatory drawing explaining the process which calculates | requires Sx and Sy of the 1st frame in 1st Embodiment. 第1実施形態において、2番目〜K番目のフレームのSx及びSyを求める処理を説明する説明図である。In 1st Embodiment, it is explanatory drawing explaining the process which calculates | requires Sx and Sy of the 2nd-Kth frame. 第2実施形態に係る画像処理装置の動作を説明するフローチャートである。It is a flowchart explaining operation | movement of the image processing apparatus which concerns on 2nd Embodiment. ∂G/∂tを算出する処理を説明する説明図である。It is explanatory drawing explaining the process which calculates ∂G / ∂t. 第2実施形態において、1番目のフレームのSx及びSyを求める処理を説明する説明図である。In 2nd Embodiment, it is explanatory drawing explaining the process which calculates | requires Sx and Sy of the 1st frame. 第2実施形態において、2番目〜K番目のフレームのSx及びSyを求める処理を説明する説明図である。In 2nd Embodiment, it is explanatory drawing explaining the process which calculates | requires Sx and Sy of the 2nd-Kth flame | frame. 第3実施形態において、Sxの確定処理を説明するフローチャートである。In the third embodiment, it is a flowchart for explaining the determination process of Sx. Sxの確定処理を説明する説明図である。It is explanatory drawing explaining the determination process of Sx. 二以上の領域に分割された一つのフレームの模式図である。It is a schematic diagram of one frame divided into two or more regions. 第4実施形態において、Sxを算出する処理を説明するフローチャートである。14 is a flowchart illustrating a process of calculating Sx in the fourth embodiment. ∂G/∂ω=y・∂G/∂x+x・∂G/∂yが成立することを説明する説明図である。It is explanatory drawing explaining that ∂G / ∂ω = y · ∂G / ∂x + x · ∂G / ∂y is established. ∂G/∂m=x・∂G/∂x+y・∂G/∂yが成立することを説明する説明図である。It is explanatory drawing explaining that ∂G / ∂m = x · ∂G / ∂x + y · ∂G / ∂y is established.

以下、図面に基づいて本発明の実施形態を詳細に説明する。各図において、同一符号を付した構成は、同一の構成であることを示し、その構成について、既に説明している内容については、その説明を省略する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In each figure, the structure which attached | subjected the same code | symbol shows that it is the same structure, The description is abbreviate | omitted about the content which has already demonstrated the structure.

本実施形態の原理について説明する。本実施形態は、カメラのブレにより生じる画像のブレ(画像全体のブレ)を示す値を、画像処理を用いて求め、この値と所定式とを用いて、カメラのブレに起因する信号変化Ns(すなわち、カメラのブレによるノイズ)を求める。図1は、現フレームと次のフレームとの間において発生したカメラのブレによる画素値Gの空間変化を示す値と、画素値Gの時間変化を示す値との関係を説明する説明図である。フレームは、動画を構成する一つの静止画像(画像)である。本実施形態は、カメラによって撮影された時系列に並ぶ複数の画像として、動画を例にして説明する。画素値Gは、画素の画素データの一例である。画素データは、画素が有する数値情報であり、例えば、赤外画像の場合、画素値G、又は、画素値Gを用いて演算された温度を意味する。   The principle of this embodiment will be described. In the present embodiment, a value indicating an image blur (blurring of the entire image) caused by camera shake is obtained using image processing, and a signal change Ns caused by camera shake is calculated using this value and a predetermined formula. (That is, noise due to camera shake). FIG. 1 is an explanatory diagram for explaining the relationship between a value indicating a spatial change in the pixel value G due to camera shake occurring between the current frame and the next frame, and a value indicating a temporal change in the pixel value G. . A frame is one still image (image) that constitutes a moving image. In the present embodiment, a moving image is described as an example of a plurality of images arranged in time series photographed by a camera. The pixel value G is an example of pixel data of a pixel. The pixel data is numerical information that the pixel has. For example, in the case of an infrared image, the pixel data means the pixel value G or a temperature calculated using the pixel value G.

現フレームは、j行目に位置する1番目〜5番目の画素が示され、5番目より後の画素は、省略されている。次のフレームは、j行目に位置する1番目〜4番目の画素が示され、4番目より後の画素は、省略されている。j行目の画素が並ぶ方向が、x軸方向とする。画素値Gのx軸方向の変化を示す値(∂G/∂x)は、一つのフレームにおいて、画素値G(画素データ)の空間変化を示す値の一例である。画素値Gは、輝度を示しており、階調は、256である。現フレームのj行目において、1番目の画素から5番目の画素に向かって画素値Gが徐々に大きくなっている。これは、1番目の画素から5番目の画素に向かって、被写体が徐々に明るくなっていることを意味する。   In the current frame, the first to fifth pixels located in the j-th row are shown, and the pixels after the fifth are omitted. In the next frame, the first to fourth pixels located in the j-th row are shown, and the pixels after the fourth are omitted. The direction in which the pixels in the j-th row are arranged is the x-axis direction. A value (∂G / ∂x) indicating a change in the x-axis direction of the pixel value G is an example of a value indicating a spatial change of the pixel value G (pixel data) in one frame. The pixel value G indicates luminance, and the gradation is 256. In the j-th row of the current frame, the pixel value G gradually increases from the first pixel toward the fifth pixel. This means that the subject gradually becomes brighter from the first pixel toward the fifth pixel.

被写体が変化することなく、現フレームと次のフレームとの間において、x軸の正方向にカメラのブレが発生したとする。1番目〜5番目の画素に向かって、被写体が徐々に明るくなっているので、次のフレームのN番目の画素の画素値Gは、現フレームのN番目の画素の画素値G以上になると考えられる。例えば、次のフレームの1番目の画素の画素値Gは、現フレームの1番目の画素の画素値G以上になると考えられる。   Assume that a camera shake occurs in the positive direction of the x-axis between the current frame and the next frame without changing the subject. Since the subject gradually becomes brighter toward the first to fifth pixels, the pixel value G of the Nth pixel in the next frame is considered to be greater than or equal to the pixel value G of the Nth pixel in the current frame. It is done. For example, the pixel value G of the first pixel in the next frame is considered to be greater than or equal to the pixel value G of the first pixel in the current frame.

次のフレームのN番目の画素の画素値Gが、現フレームのN番目の画素の画素値Gと比べて、どのくらい大きくなるか考える。カメラのブレにより、現フレームと次のフレームとにおいて、ブレ量が+0.1画素のブレが発生したとする。ブレ量は、カメラのブレにより生じるフレーム(画像)のブレを示す値の一例である。   Consider how much the pixel value G of the Nth pixel in the next frame is larger than the pixel value G of the Nth pixel in the current frame. Assume that a camera shake of +0.1 pixel occurs between the current frame and the next frame due to camera shake. The blur amount is an example of a value indicating blurring of a frame (image) caused by camera blurring.

ブレ量が1画素以内であれば、画素値Gの変化量とブレ量とは、正比例すると考えることができる。従って、ブレ量が、+0.1画素の場合、画素値Gは、以下のように変化すると考えられる。現フレームの1番目の画素の画素値Gは、0である。現フレームにおいて、1番目の画素と2番目の画素とにおいて、画素値Gのx軸方向の変化を示す値(∂G/∂x)は、10である。従って、次のフレームにおいて、1番目の画素の画素値Gは、1(=0+0.1×10)になる。   If the blur amount is within one pixel, it can be considered that the change amount of the pixel value G and the blur amount are directly proportional. Therefore, when the blur amount is +0.1 pixel, the pixel value G is considered to change as follows. The pixel value G of the first pixel of the current frame is 0. In the current frame, the value (∂G / ∂x) indicating the change in the x-axis direction of the pixel value G is 10 in the first pixel and the second pixel. Accordingly, in the next frame, the pixel value G of the first pixel is 1 (= 0 + 0.1 × 10).

現フレームの2番目の画素の画素値Gは、10である。現フレームにおいて、2番目の画素と3番目の画素とにおいて、画素値Gのx軸方向の変化を示す値(∂G/∂x)は、0である。従って、次のフレームにおいて、2番目の画素の画素値Gは、10(=10+0.1×0)になる。   The pixel value G of the second pixel of the current frame is 10. In the current frame, the value (∂G / ∂x) indicating the change in the x-axis direction of the pixel value G is 0 in the second pixel and the third pixel. Accordingly, in the next frame, the pixel value G of the second pixel is 10 (= 10 + 0.1 × 0).

現フレームの3番目の画素の画素値Gは、10である。現フレームにおいて、3番目の画素と4番目の画素とにおいて、画素値Gのx軸方向の変化を示す値(∂G/∂x)は、20である。従って、次のフレームにおいて、3番目の画素の画素値Gは、12(=10+0.1×20)になる。   The pixel value G of the third pixel in the current frame is 10. In the current frame, the value (∂G / ∂x) indicating the change in the x-axis direction of the pixel value G is 20 in the third pixel and the fourth pixel. Therefore, in the next frame, the pixel value G of the third pixel is 12 (= 10 + 0.1 × 20).

現フレームの4番目の画素の画素値Gは、30である。現フレームにおいて、4番目の画素と5番目の画素とにおいて、画素値Gのx軸方向の変化を示す値(∂G/∂x)は、10である。従って、次のフレームにおいて、4番目の画素の画素値Gは、31(=30+0.1×10)になる。   The pixel value G of the fourth pixel in the current frame is 30. In the current frame, the value (∂G / ∂x) indicating the change in the x-axis direction of the pixel value G is 10 in the fourth pixel and the fifth pixel. Therefore, in the next frame, the pixel value G of the fourth pixel is 31 (= 30 + 0.1 × 10).

連続する2つのフレームにおいて、画素値G(画素データ)の時間変化を示す値について説明する。現フレームと次のフレームとにおいて(連続する2つのフレームにおいて)、1番目の画素の画素値Gの時間変化を示す値(∂G/∂t)は、1(=1−0)であり、2番目の画素の画素値Gの時間変化を示す値(∂G/∂t)は、0(=10−10)であり、3番目の画素の画素値Gの時間変化を示す値(∂G/∂t)は、2(=12−10)であり、4番目の画素の画素値Gの時間変化を示す値(∂G/∂t)は、1(=31−30)である。   A value indicating a temporal change of the pixel value G (pixel data) in two consecutive frames will be described. In the current frame and the next frame (in two consecutive frames), the value (∂G / ∂t) indicating the temporal change in the pixel value G of the first pixel is 1 (= 1-0) The value (∂G / ∂t) indicating the time change of the pixel value G of the second pixel is 0 (= 10−10), and the value indicating the time change of the pixel value G of the third pixel (∂G / ∂t) is 2 (= 12-10), and the value (∂G / ∂t) indicating the temporal change of the pixel value G of the fourth pixel is 1 (= 31-30).

以上より、カメラのブレによる画素値G(画素データ)のx軸方向の変化を示す値(∂G/∂x)と、時間変化を示す値(∂G/∂t)との関係は、以下の式1で表されると推測できる。   From the above, the relationship between the value (∂G / ∂x) indicating the change in the x-axis direction of the pixel value G (pixel data) due to camera shake and the value (∂G / ∂t) indicating the time change is as follows. It can be assumed that this is expressed by the following formula 1.

∂G/∂t=Sx・∂G/∂x・・・(式1)     ∂G / ∂t = Sx · ∂G / ∂x (Expression 1)

Sxは、カメラのブレにより生じるフレーム(画像)のx軸方向のブレを示す値である。図1の場合、Sxは、連続する2つのフレーム(画像)間のx軸方向のブレ量である。   Sx is a value indicating blur in the x-axis direction of a frame (image) caused by camera blur. In the case of FIG. 1, Sx is a blur amount in the x-axis direction between two consecutive frames (images).

カメラのブレによる画素値Gの時間変化を示す値(∂G/∂t)は、カメラのブレに起因する信号変化Nsであり、従って、カメラのブレに起因する信号変化Nsは、以下の式2で表されると推測できる。   The value (∂G / ∂t) indicating the time change of the pixel value G due to camera shake is a signal change Ns caused by camera shake, and therefore the signal change Ns caused by camera shake is expressed by the following equation: It can be estimated that it is represented by 2.

Ns=∂G/∂t=Sx・∂G/∂x・・・(式2)     Ns = ∂G / ∂t = Sx · ∂G / ∂x (Expression 2)

図2は、次のフレームを構成する全画素のそれぞれについて、画素値Gのx軸方向の変化を示す値(∂G/∂x)と画素値Gの時間変化を示す値(∂G/∂t)との関係を示す三つのグラフである。グラフ1、グラフ2及びグラフ3の横軸は、画素値Gのx軸方向の変化を示す値(∂G/∂x)を示し、縦軸は、画素値Gの時間変化を示す値(∂G/∂t)を示す。直線SLで表される式は、式2である。×は、次のフレームを構成する各画素に対応する座標(∂G/∂x,∂G/∂t)を示す。例えば、図1を参照して、次のフレームの1番目の画素に対応する座標は、(9,1)となり、2番目の画素に対応する座標は、(2,0)となり、3番目の画素に対応する座標は、(19,2)となる。   FIG. 2 shows a value (∂G / ∂x) indicating a change in the x-axis direction of the pixel value G and a value (∂G / ∂) indicating a temporal change of the pixel value G for each of all pixels constituting the next frame. It is three graphs which show the relationship with t). The horizontal axis of graphs 1, 2 and 3 indicates a value (∂G / ∂x) indicating the change in the x-axis direction of the pixel value G, and the vertical axis indicates a value indicating the time change of the pixel value G (∂ G / ∂t). The expression represented by the straight line SL is Expression 2. X indicates coordinates (∂G / ∂x, ∂G / ∂t) corresponding to each pixel constituting the next frame. For example, referring to FIG. 1, the coordinates corresponding to the first pixel of the next frame are (9, 1), and the coordinates corresponding to the second pixel are (2, 0). The coordinates corresponding to the pixel are (19, 2).

図2を参照して、グラフ1は、被写体が変化しておらず、x軸方向にカメラのブレが発生した場合を示している。座標には、被写体変化に起因する信号変化が含まれておらず、カメラのブレに起因する信号変化Nsが含まれている。このため、座標は、直線SL上に分布している。被写体変化に起因する信号変化とは、例えば、ガス漏れの監視対象から漏れたガスの像を示す。   Referring to FIG. 2, graph 1 shows a case where the subject has not changed and camera shake occurs in the x-axis direction. The coordinates do not include signal changes due to subject changes, but include signal changes Ns due to camera shake. For this reason, the coordinates are distributed on the straight line SL. The signal change caused by the subject change indicates, for example, an image of gas leaked from a gas leak monitoring target.

グラフ2は、被写体が変化し、かつ、x軸方向にカメラのブレが発生した場合を示している。座標には、カメラのブレに起因する信号変化Ns、及び、被写体変化に起因する信号変化が含まれている。このため、直線SLより上に分布する座標、及び、直線SLより下に分布する座標が存在している。   Graph 2 shows a case where the subject changes and camera shake occurs in the x-axis direction. The coordinates include a signal change Ns caused by camera shake and a signal change caused by a subject change. For this reason, there are coordinates distributed above the straight line SL and coordinates distributed below the straight line SL.

被写体の変化は、一般に、x軸方向のカメラのブレと相関しないので、カメラのブレに起因する信号変化Nsと被写体変化に起因する信号変化とは、分離することができる。そこで、本実施形態は、フレームからカメラのブレに起因する信号変化Nsを除去する補正をする。これにより、カメラのブレに起因する信号変化Nsをフレームから除去し、被写体変化に起因する信号変化をフレームに残すことができる。グラフ3は、グラフ2に対して、カメラのブレに起因する信号変化Nsを除去する補正をした場合を示す。   Since the change in the subject generally does not correlate with the camera shake in the x-axis direction, the signal change Ns caused by the camera shake and the signal change caused by the subject change can be separated. Thus, in the present embodiment, correction is performed to remove the signal change Ns caused by camera shake from the frame. Thereby, the signal change Ns caused by camera shake can be removed from the frame, and the signal change caused by the subject change can be left in the frame. Graph 3 shows a case where correction for removing signal change Ns caused by camera shake is performed on graph 2.

Sx(カメラのブレにより生じるフレームのx軸方向のブレを示す値)を求める方法としては、平均値を利用する方法と統計処理を利用する方法がある。平均値を利用する方法は、グラフ2に示す座標(∂G/∂x,∂G/∂t)において、∂G/∂xの平均値、及び、∂G/∂tの平均値を求め、これらの平均値と式2とからSxを求める。但し、∂G/∂x=0付近では、Sxの値が不安定となるので、∂G/∂x=0付近の座標は除外する。   As a method for obtaining Sx (a value indicating blur in the x-axis direction of a frame caused by camera shake), there are a method using an average value and a method using statistical processing. In the method using the average value, the average value of ∂G / ∂x and the average value of ∂G / ∂t are obtained at the coordinates (∂G / ∂x, ∂G / ∂t) shown in the graph 2, Sx is obtained from these average values and Equation 2. However, since the value of Sx becomes unstable in the vicinity of ∂G / ∂x = 0, the coordinates in the vicinity of ∂G / ∂x = 0 are excluded.

統計処理を利用する方法は、グラフ2に示す座標(∂G/∂x,∂G/∂t)を統計処理(例えば、回帰直線を求める処理)することで、Sxを求める。グラフ2に示す座標を用いて求めた回帰直線は、直線SLとなるので、グラフ2に示す座標を用いて回帰直線を求めることにより、Sxが求まる。   In the method using statistical processing, Sx is obtained by performing statistical processing (for example, processing for obtaining a regression line) on the coordinates (∂G / ∂x, ∂G / ∂t) shown in the graph 2. Since the regression line obtained using the coordinates shown in the graph 2 is a straight line SL, Sx is obtained by obtaining the regression line using the coordinates shown in the graph 2.

統計処理は、空間変化の方向を示す軸と時間変化の方向を示す軸とで構成される座標系において、フレーム(画像)を構成する複数の画素のそれぞれについて、空間変化を示す値と時間変化を示す値とにより座標を構成する処理と、座標系での座標の分布を近似する回帰式を求める処理と、含む。回帰式で示される図形は、回帰直線、回帰曲線、回帰平面や回帰曲面がある。図2は、回帰直線の場合を示している。   Statistical processing is a coordinate system composed of an axis indicating the direction of spatial change and an axis indicating the direction of temporal change. For each of a plurality of pixels constituting a frame (image), a value indicating spatial change and temporal change And a process for obtaining a regression equation that approximates the distribution of coordinates in the coordinate system. The figure shown by the regression equation includes a regression line, a regression curve, a regression plane, and a regression surface. FIG. 2 shows the case of a regression line.

以上において、説明を簡単にするために、カメラのブレがx軸方向に発生した場合で説明した。カメラのブレがx軸方向及びy軸方向に発生した場合、カメラのブレに起因する信号変化Nsは、式1及び式2の場合と同様に考えると、以下の式3で表されると推測できる。   In the above, in order to simplify the description, the case where the camera shake occurs in the x-axis direction has been described. When camera shake occurs in the x-axis direction and y-axis direction, the signal change Ns caused by camera shake is assumed to be expressed by the following formula 3 in the same manner as in formulas 1 and 2. it can.

Ns=∂G/∂t=Sx・∂G/∂x+Sy・∂G/∂y・・・(式3)     Ns = ∂G / ∂t = Sx · ∂G / ∂x + Sy · ∂G / ∂y (Expression 3)

∂G/∂yは、画素値G(画素データ)のy軸方向の変化を示す値(画素値の空間変化を示す値)である。Syは、カメラのブレにより生じるフレーム(画像)のy軸方向のブレを示す値である。このような値として、例えば、連続する2つのフレーム間のy軸方向のブレ量がある。   ∂G / ∂y is a value indicating a change in the y-axis direction of the pixel value G (pixel data) (a value indicating a spatial change in the pixel value). Sy is a value indicating blur in the y-axis direction of a frame (image) caused by camera blur. As such a value, for example, there is a blur amount in the y-axis direction between two consecutive frames.

以上が本実施形態の原理の説明である。   The above is the description of the principle of the present embodiment.

図3Aを用いて、本実施形態に係る画像処理装置3が適用されたガス検知システム1について説明する。図3Aは、このシステム1の構成を示すブロック図である。ガス検知システム1は、赤外線カメラ2と画像処理装置3とを備える。   A gas detection system 1 to which the image processing apparatus 3 according to the present embodiment is applied will be described with reference to FIG. 3A. FIG. 3A is a block diagram showing the configuration of the system 1. The gas detection system 1 includes an infrared camera 2 and an image processing device 3.

赤外線カメラ2は、ガス漏れの監視対象及び背景の赤外画像の動画(監視対象の動画)を撮影し、動画を示す動画データD1を生成する。動画に限らず、赤外線カメラ2によって、ガス漏れの監視対象及び背景の赤外画像を複数の時刻で撮影してもよい。赤外線カメラ2は、光学系4、フィルター5、二次元イメージセンサー6及び信号処理部7を備える。   The infrared camera 2 captures a moving image of a monitoring target of gas leakage and a background infrared image (moving image to be monitored), and generates moving image data D1 indicating the moving image. Not only a moving image but also an infrared camera 2 may be used to capture a gas leak monitoring target and a background infrared image at a plurality of times. The infrared camera 2 includes an optical system 4, a filter 5, a two-dimensional image sensor 6, and a signal processing unit 7.

光学系4は、被写体(監視対象及び背景)の赤外画像を二次元イメージセンサー6上で結像させる。フィルター5は、光学系4と二次元イメージセンサー6との間に配置され、光学系4を通過した光のうち、特定波長の赤外線のみを通過させる。赤外の波長帯のうち、フィルター5を通過させる波長帯は、検知するガスの種類に依存する。例えばメタンの場合、3.2〜3.4μmの波長帯を通過させるフィルター5が用いられる。二次元イメージセンサー6は、例えば、冷却型インジウムアンチモン(InSb)イメージセンサーであり、フィルター5を通過した赤外線を受光する。信号処理部7は、二次元イメージセンサー6から出力されたアナログ信号を、デジタル信号に変換し、公知の画像処理をする。このデジタル信号が、動画データD1となる。   The optical system 4 forms an infrared image of the subject (monitoring target and background) on the two-dimensional image sensor 6. The filter 5 is disposed between the optical system 4 and the two-dimensional image sensor 6, and allows only infrared light having a specific wavelength to pass through the light that has passed through the optical system 4. Of the infrared wavelength band, the wavelength band that passes through the filter 5 depends on the type of gas to be detected. For example, in the case of methane, a filter 5 that passes a wavelength band of 3.2 to 3.4 μm is used. The two-dimensional image sensor 6 is a cooled indium antimony (InSb) image sensor, for example, and receives the infrared rays that have passed through the filter 5. The signal processing unit 7 converts the analog signal output from the two-dimensional image sensor 6 into a digital signal and performs known image processing. This digital signal becomes the moving image data D1.

画像処理装置3は、パーソナルコンピュータ、スマートフォン、タブレット端末等であり、機能ブロックとして、画像データ入力部8、画像処理部9、表示制御部10、ディスプレイ11及び入力部12を備える。   The image processing apparatus 3 is a personal computer, a smartphone, a tablet terminal, or the like, and includes an image data input unit 8, an image processing unit 9, a display control unit 10, a display 11, and an input unit 12 as functional blocks.

画像データ入力部8は、赤外線カメラ2の通信部(不図示)と通信する通信インターフェイスである。画像データ入力部8には、赤外線カメラ2の通信部から送られてきた動画データD1が入力される。画像データ入力部8は、動画データD1を画像処理部9へ送る。   The image data input unit 8 is a communication interface that communicates with a communication unit (not shown) of the infrared camera 2. The image data input unit 8 receives the moving image data D1 sent from the communication unit of the infrared camera 2. The image data input unit 8 sends the moving image data D1 to the image processing unit 9.

動画データD1は、フレームが時系列に複数並べられた構造を有する。複数のフレーム(複数の赤外画像)において、同じ位置にある画素の画素データを時系列に並べたデータを、時系列画素データとする。時系列画素データを具体的に説明する。図4は、時系列画素データを説明する説明図である。赤外画像の動画のフレーム数をKとする。一つのフレームがM個の画素、すなわち、1番目の画素、2番目の画素、・・・、M−1番目の画素、M番目の画素で構成されている。画素データは、上述したように、画素が有する数値情報であり、例えば、画素の画素値Gである。赤外画像の場合、画素値G、又は、画素値Gを用いて演算された温度である。   The moving image data D1 has a structure in which a plurality of frames are arranged in time series. Data obtained by arranging pixel data of pixels at the same position in time series in a plurality of frames (a plurality of infrared images) is referred to as time series pixel data. The time series pixel data will be specifically described. FIG. 4 is an explanatory diagram for explaining time-series pixel data. Let K be the number of frames of a moving image of an infrared image. One frame is composed of M pixels, that is, the first pixel, the second pixel,..., The M−1th pixel, and the Mth pixel. As described above, the pixel data is numerical information that the pixel has, for example, the pixel value G of the pixel. In the case of an infrared image, the pixel value G or the temperature calculated using the pixel value G is used.

複数(K個)のフレームの同じ位置にある画素とは、同じ順番の画素を意味する。例えば、1番目の画素で説明すると、1番目のフレームに含まれる1番目の画素の画素データ、2番目のフレームに含まれる1番目の画素の画素データ、・・・、K−1番目のフレームに含まれる1番目の画素の画素データ、K番目のフレームに含まれる1番目の画素の画素データを、時系列に並べたデータが、1番目の画素の時系列画素データとなる。また、M番目の画素で説明すると、1番目のフレームに含まれるM番目の画素の画素データ、2番目のフレームに含まれるM番目の画素の画素データ、・・・、K−1番目のフレームに含まれるM番目の画素の画素データ、K番目のフレームに含まれるM番目の画素の画素データを、時系列に並べたデータが、M番目の画素の時系列画素データとなる。時系列画素データの数は、一つのフレームを構成する画素の数と同じである。   Pixels at the same position in a plurality (K) of frames mean pixels in the same order. For example, in the case of the first pixel, pixel data of the first pixel included in the first frame, pixel data of the first pixel included in the second frame,..., K−1th frame. The data obtained by arranging the pixel data of the first pixel included in the pixel data and the pixel data of the first pixel included in the Kth frame in time series becomes the time series pixel data of the first pixel. In the case of the Mth pixel, the pixel data of the Mth pixel included in the first frame, the pixel data of the Mth pixel included in the second frame,..., The (K−1) th frame. The data obtained by arranging the pixel data of the Mth pixel included in the pixel data and the pixel data of the Mth pixel included in the Kth frame in time series becomes the time series pixel data of the Mth pixel. The number of time-series pixel data is the same as the number of pixels constituting one frame.

図3Aの説明に戻る。画像処理部9は、第1の算出部91、第2の算出部92、第3の算出部93及び補正部94を備える。これらについては、後で説明する。   Returning to the description of FIG. The image processing unit 9 includes a first calculation unit 91, a second calculation unit 92, a third calculation unit 93, and a correction unit 94. These will be described later.

表示制御部10は、動画データD1で示される動画、及び、画像処理部9で所定の処理がされた動画(別の表現を用いれば、画像処理部9によって補正された複数の画像が時系列に並べられた画像)を、ディスプレイ11に表示させる。   The display control unit 10 displays a moving image indicated by the moving image data D1 and a moving image that has been subjected to predetermined processing by the image processing unit 9 (if another expression is used, a plurality of images corrected by the image processing unit 9 are time-sequentially displayed. Are displayed on the display 11.

入力部12は、ガス検知に関連する各種入力がされる。   The input unit 12 receives various inputs related to gas detection.

図3Bは、図3Aに示す画像処理装置3のハードウェア構成を示すブロック図である。画像処理装置3は、CPU(Central Processing Unit)3a、RAM(Random Access Memory)3b、ROM(Read Only Memory)3c、HDD(Hard Disk Drive)3d、液晶ディスプレイ3e、通信インターフェイス3f、キーボード等3g、及び、これらを接続するバス3hを備える。液晶ディスプレイ3eは、ディスプレイ11を実現するハードウェアである。液晶ディスプレイ3eの替わりに、有機ELディスプレイ(Organic Light Emitting Diode display)、プラズマディスプレイ等でもよい。通信インターフェイス3fは、画像データ入力部8を実現するハードウェアである。キーボード等3gは、入力部12を実現するハードウェアである。キーボードの替わりに、タッチパネルでもよい。   FIG. 3B is a block diagram showing a hardware configuration of the image processing apparatus 3 shown in FIG. 3A. The image processing apparatus 3 includes a CPU (Central Processing Unit) 3a, a RAM (Random Access Memory) 3b, a ROM (Read Only Memory) 3c, a HDD (Hard Disk Drive) 3d, a liquid crystal display 3e, a communication interface 3f, a keyboard 3g, and the like. And the bus 3h which connects these is provided. The liquid crystal display 3 e is hardware that implements the display 11. Instead of the liquid crystal display 3e, an organic EL display (Organic Light Emitting Diode display), a plasma display, or the like may be used. The communication interface 3 f is hardware that implements the image data input unit 8. The keyboard 3g is hardware for realizing the input unit 12. A touch panel may be used instead of the keyboard.

HDD3dには、画像処理部9及び表示制御部10について、これらの機能ブロックをそれぞれ実現するためのプログラム、及び、各種データ(例えば、動画データD1)が格納されている。画像処理部9を実現するプログラムは、動画データD1(画像データ)を取得し、動画データD1に上記所定の処理をする画像処理プログラムである。表示制御部10を実現するプログラムは、例えば、動画データD1で示される動画をディスプレイ11に表示させたり、画像処理部9によって上記所定の処理がされた動画をディスプレイ11に表示させたりする表示制御プログラムである。これらのプログラムは、HDD3dに予め記憶されているが、これに限定されない。例えば、これらのプログラムを記録している記録媒体(例えば、磁気ディスク、光学ディスクのような外部記録媒体)が用意されており、この記録媒体に記憶されているプログラムがHDD3dに記憶されてもよい。また、これらのプログラムは、画像処理装置3とネットワーク接続されたサーバに格納されており、ネットワークを介して、これらのプログラムがHDD3dに送られ、HDD3dに記憶されてもよい。これらのプログラムは、HDD3dの替わりにROM3cに記憶してもよい。画像処理装置3は、HDD3dの替わりに、フラッシュメモリを備え、これらのプログラムはフラッシュメモリに記憶してもよい。   The HDD 3d stores programs for realizing these functional blocks and various data (for example, moving image data D1) for the image processing unit 9 and the display control unit 10. The program that realizes the image processing unit 9 is an image processing program that acquires moving image data D1 (image data) and performs the predetermined processing on the moving image data D1. The program that realizes the display control unit 10 displays, for example, a display control that displays a moving image indicated by the moving image data D1 on the display 11, or displays a moving image that has been subjected to the predetermined processing by the image processing unit 9 on the display 11. It is a program. These programs are stored in advance in the HDD 3d, but are not limited thereto. For example, a recording medium (for example, an external recording medium such as a magnetic disk or an optical disk) in which these programs are recorded is prepared, and the program stored in the recording medium may be stored in the HDD 3d. . These programs may be stored in a server connected to the image processing apparatus 3 via a network, and these programs may be sent to the HDD 3d via the network and stored in the HDD 3d. These programs may be stored in the ROM 3c instead of the HDD 3d. The image processing apparatus 3 includes a flash memory instead of the HDD 3d, and these programs may be stored in the flash memory.

CPU3aは、これらのプログラムを、HDD3dから読み出してRAM3bに展開させ、展開されたプログラムを実行することによって、画像処理部9及び表示制御部10が実現される。但し、画像処理部9の機能及び表示制御部10の機能について、各機能の一部又は全部は、CPU3aによる処理に替えて、又は、これと共に、DSP(Digital Signal Processor)による処理によって実現されてもよい。又、同様に、各機能の一部又は全部は、ソフトウェアによる処理に替えて、又は、これと共に、専用のハードウェア回路による処理によって実現されてもよい。   The CPU 3a reads out these programs from the HDD 3d, expands them in the RAM 3b, and executes the expanded programs, whereby the image processing unit 9 and the display control unit 10 are realized. However, some or all of the functions of the image processing unit 9 and the display control unit 10 are realized by processing by a DSP (Digital Signal Processor) instead of or by processing by the CPU 3a. Also good. Similarly, a part or all of each function may be realized by processing by a dedicated hardware circuit instead of or together with processing by software.

なお、画像処理装置3は、次に説明するように、第1実施形態から第4実施形態がある。これらの実施形態は、それぞれ、複数の要素によって構成される。従って、HDD3dには、これらの要素を実現するためのプログラムが格納されている。例えば、画像処理装置3の第1実施形態は、要素として、第1の算出部91、第2の算出部92、第3の算出部93及び補正部94を含む。HDD3dには、これらの要素のそれぞれを実現するためのプログラムが格納されている。これらのプログラムは、第1の算出プログラム、第2の算出プログラム、第3の算出プログラム、補正プログラムと表現される。   The image processing apparatus 3 includes the first to fourth embodiments as described below. Each of these embodiments is composed of a plurality of elements. Accordingly, the HDD 3d stores a program for realizing these elements. For example, the first embodiment of the image processing apparatus 3 includes a first calculation unit 91, a second calculation unit 92, a third calculation unit 93, and a correction unit 94 as elements. The HDD 3d stores a program for realizing each of these elements. These programs are expressed as a first calculation program, a second calculation program, a third calculation program, and a correction program.

これらのプログラムは、要素の定義を用いて表現される。第1の算出部91及び第1の算出プログラムを例にして説明する。第1の算出部91は、赤外線カメラ2によって撮影された時系列に並ぶ複数の画像(動画)について、画素データの空間変化を示す値、及び、画素データの時間変化を示す値を算出する。第1の算出プログラムは、赤外線カメラ2によって撮影された時系列に並ぶ複数の画像(動画)について、画素データの空間変化を示す値、及び、画素データの時間変化を示す値を算出するプログラムである。   These programs are expressed using element definitions. The first calculation unit 91 and the first calculation program will be described as an example. The first calculation unit 91 calculates a value indicating the spatial change of the pixel data and a value indicating the temporal change of the pixel data for a plurality of time-series images (moving images) photographed by the infrared camera 2. The first calculation program is a program for calculating a value indicating a spatial change of pixel data and a value indicating a temporal change of pixel data for a plurality of images (moving images) arranged in time series photographed by the infrared camera 2. is there.

CPU3aによって実行されるこれらのプログラム(第1の算出プログラム、第2の算出プログラム、第3の算出プログラム、補正プログラム)のフローチャートが、後で説明する図5である。   A flowchart of these programs (first calculation program, second calculation program, third calculation program, and correction program) executed by the CPU 3a is FIG. 5 described later.

上述したように、本実施形態に係る画像処理装置3には、第1実施形態〜第4実施形態がある。いずれの実施形態も、カメラのブレがx軸方向(第1の変化方向)及びy軸方向(第2の変化方向)に発生した場合を例にして説明する。この場合、カメラのブレに起因する信号変化Nsは、上記式3で表される。第1実施形態〜第4実施形態で用いられる主な用語について説明する。   As described above, the image processing apparatus 3 according to the present embodiment includes the first to fourth embodiments. In any of the embodiments, a case where camera shake occurs in the x-axis direction (first change direction) and the y-axis direction (second change direction) will be described as an example. In this case, the signal change Ns caused by camera shake is expressed by the above equation 3. Main terms used in the first to fourth embodiments will be described.

画素値G(画素データ)の空間変化を示す値として、画素値Gのx軸方向の変化を示す値(∂G/∂x)や、画素値G(画素データ)のy軸方向の変化を示す値(∂G/∂y)がある。∂G/∂xは、画素値Gのx軸方向の変化を方向微分することにより求められる。言い換えれば、∂G/∂xは、x軸方向に隣り合う画素の画素値Gの差分である。∂G/∂yは、画素値Gのy軸方向の変化を方向微分することにより求められる。言い換えれば、∂G/∂yは、y軸方向に隣り合う画素の画素値Gの差分である。∂G/∂x、∂G/∂yのいずれも、画素度G(画素データ)に対して空間変化の方向の方向微分をした値である。   As a value indicating a spatial change in the pixel value G (pixel data), a value (∂G / ∂x) indicating a change in the x-axis direction of the pixel value G or a change in the y-axis direction of the pixel value G (pixel data) is used. There is a value (∂G / ∂y) to indicate. ∂G / ∂x is obtained by directional differentiation of the change in the x-axis direction of the pixel value G. In other words, ∂G / ∂x is a difference between pixel values G of pixels adjacent in the x-axis direction. ∂G / ∂y is obtained by directional differentiation of a change in the y-axis direction of the pixel value G. In other words, ∂G / ∂y is a difference between pixel values G of pixels adjacent in the y-axis direction. Both ∂G / ∂x and ∂G / ∂y are values obtained by directional differentiation in the direction of spatial change with respect to the pixel degree G (pixel data).

画素値G(画素データ)の時間変化を示す値として、連続する2つのフレーム(画像)において、同じ順番の画素の画素値G(画素データ)を差分した値(∂G/∂t)や、図8及び図9に示す所定の周波数成分データdがある。前者は、第2及び第3実施形態で用いられ、言い換えれば、画素値Gに対して、時間変化の方向の方向微分をした値である。後者は、第1実施形態で用いられ、言い換えれば、1番目〜M番目の画素の画素データに含まれる交流成分である。   As a value indicating a temporal change of the pixel value G (pixel data), a value (∂G / 画素 t) obtained by subtracting the pixel values G (pixel data) of pixels in the same order in two consecutive frames (images), There is predetermined frequency component data d shown in FIGS. The former is used in the second and third embodiments. In other words, the former is a value obtained by differentiating the pixel value G in the direction of time change. The latter is used in the first embodiment, in other words, an AC component included in the pixel data of the first to Mth pixels.

カメラのブレにより生じる画像のブレを示す値として、カメラのブレにより生じるフレーム(画像)のx軸方向のブレを示す値(Sx)や、カメラのブレにより生じるフレーム(画像)のy軸方向のブレを示す値(Sy)がある。   As a value indicating image blur caused by camera shake, a value (Sx) indicating a frame (image) shake caused by camera shake in the x-axis direction or a frame (image) caused by camera shake in the y-axis direction. There is a value (Sy) indicating blurring.

Sxとして、カメラのブレにより生じる、連続する2つのフレーム(画像)間のx軸方向のブレ量や、カメラのブレにより生じる、各フレーム(画像)のx軸方向のブレの周波数成分がある。前者は、第2及び第3実施形態で用いられ、後者は、第1実施形態で用いられる。   Sx includes a blur amount in the x-axis direction between two consecutive frames (images) caused by camera shake and a frequency component of blur in the x-axis direction of each frame (image) caused by camera shake. The former is used in the second and third embodiments, and the latter is used in the first embodiment.

Syとして、カメラのブレにより生じる、連続する2つのフレーム(画像)間のy軸方向のブレ量や、カメラのブレにより生じる、各フレーム(画像)のy軸方向のブレの周波数成分がある。前者は、第2及び第3実施形態で用いられ、後者は、第1実施形態で用いられる。   As Sy, there are a blur amount in the y-axis direction between two consecutive frames (images) caused by camera shake, and a frequency component of a shake in the y-axis direction of each frame (image) caused by camera shake. The former is used in the second and third embodiments, and the latter is used in the first embodiment.

第1実施形態から順番に説明する。図5は、第1実施形態に係る画像処理装置3の動作を説明するフローチャートであり、画像処理装置3のCPU3aが画像処理プログラムに従って実行するものである。図3A及び図5を参照して、第1の算出部91は、バンドパス処理部の機能を有する。第1の算出部91は、図4に示す1番目〜K番目のフレームにより構成されるオリジナルの動画に対して、バンドパス処理をする(ステップS1)。   The description will be made in order from the first embodiment. FIG. 5 is a flowchart for explaining the operation of the image processing apparatus 3 according to the first embodiment, which is executed by the CPU 3a of the image processing apparatus 3 according to the image processing program. With reference to FIG. 3A and FIG. 5, the first calculation unit 91 has a function of a bandpass processing unit. The first calculation unit 91 performs band-pass processing on the original moving image composed of the first to Kth frames shown in FIG. 4 (step S1).

これについて説明する。図6は、時系列画素データを構成する周波数成分データを説明する説明図である。時系列画素データは、以下の(1)〜(5)の周波数成分データにより構成される。   This will be described. FIG. 6 is an explanatory diagram for explaining the frequency component data constituting the time-series pixel data. The time-series pixel data is composed of the following frequency component data (1) to (5).

(1)背景の温度変化を示す信号B(言い換えれば、背景の温度変化を示す周波数成分データ)
(2)カメラのブレに起因する信号変化Ns(言い換えれば、カメラのブレによるノイズを示す周波数成分データ)
(3)漏れたガスによる温度変化を示す信号NL(言い換えれば、漏れたガスによる温度変化を示す周波数成分データ)
(4)その他のノイズNc(言い換えれば、その他のノイズを示す周波数成分データ)
(5)高周波ノイズNh(言い換えれば、高周波ノイズを示す周波数成分データ)
(1) Signal B indicating background temperature change (in other words, frequency component data indicating background temperature change)
(2) Signal change Ns caused by camera shake (in other words, frequency component data indicating noise caused by camera shake)
(3) Signal NL indicating temperature change due to leaked gas (in other words, frequency component data indicating temperature change due to leaked gas)
(4) Other noise Nc (in other words, frequency component data indicating other noise)
(5) High frequency noise Nh (in other words, frequency component data indicating high frequency noise)

(3)によって、漏れたガスの像(ガス像)が形成される。(2)、(3)、(4)は、(1)より周波数が高く、(5)より周波数が低い。(1)は、(3)と比べて、かなり大きく、かつ、空間変化の方向の方向微分に対して値の偏りが発生するので、除去する必要がある。(2)及び(5)は、(1)に比べて小さいが、無視できない大きさなので、除去する必要がある。(4)は、(3)と比べてかなり小さいので、無視する。   By (3), an image of the leaked gas (gas image) is formed. (2), (3) and (4) have a higher frequency than (1) and a lower frequency than (5). (1) is considerably larger than (3), and a value bias occurs with respect to the directional differentiation in the direction of the spatial change, and therefore needs to be removed. Although (2) and (5) are smaller than (1), they are non-negligible and need to be removed. (4) is much smaller than (3) and is ignored.

第1の算出部91は、バンドパスフィルターを用いて、図4に示すM個の時系列画素データを処理することにより、M個の時系列画素データのそれぞれについて、背景の温度変化を示す信号B、及び、高周波ノイズNhを除去する。言い換えれば、第1の算出部91は、バンドパスフィルターを用いて、M個の時系列画素データを処理することにより、M個の時系列画素データのそれぞれから、所定の周波数成分データdを抽出する。所定の周波数成分データdは、カメラのブレに起因する信号変化Ns、漏れたガスによる温度変化を示す信号NL、及び、その他のノイズNcにより構成される。所定の周波数成分データdは、オリジナルの動画から、背景の温度変化を示す信号B、及び、高周波ノイズNhが除去された動画である。従って、所定の周波数成分データdは、ガス像の動画を含むが、背景(監視対象)の動画を含まない。このように、第1の算出部91は、抽出部(不図示)として機能し、抽出部は、フレームから予め定められた被写体(ここでは、ガス像)を抽出することを被写体抽出とし、1番目〜K番目のフレームのそれぞれに対して、被写体抽出をする。別の表現を用いれば、抽出部は、複数の画像(複数のフレーム)のそれぞれから、予め定められた被写体を抽出する。   The first calculation unit 91 processes the M time-series pixel data shown in FIG. 4 by using a bandpass filter, so that a signal indicating a background temperature change for each of the M time-series pixel data. B and high frequency noise Nh are removed. In other words, the first calculation unit 91 extracts predetermined frequency component data d from each of the M time-series pixel data by processing the M time-series pixel data using the bandpass filter. To do. The predetermined frequency component data d includes a signal change Ns caused by camera shake, a signal NL indicating a temperature change due to leaked gas, and other noise Nc. The predetermined frequency component data d is a moving image obtained by removing the signal B indicating the background temperature change and the high frequency noise Nh from the original moving image. Therefore, the predetermined frequency component data d includes the moving image of the gas image, but does not include the moving image of the background (monitoring target). Thus, the first calculation unit 91 functions as an extraction unit (not shown), and the extraction unit extracts a predetermined subject (here, a gas image) from the frame as subject extraction. Subject extraction is performed for each of the th to Kth frames. If another expression is used, the extraction unit extracts a predetermined subject from each of a plurality of images (a plurality of frames).

漏れたガスによる温度変化を示す信号NLの周波数を、0.3〜3Hzとする。例えば、0.3〜3Hzを抽出できる重み付け係数を用いて、図4に示すK個のフレーム数より少ない所定数のフレームを単位とする加重移動平均を算出する。これにより、時系列画素データから、所定の周波数成分データdが抽出される。   The frequency of the signal NL indicating the temperature change due to the leaked gas is set to 0.3 to 3 Hz. For example, using a weighting coefficient that can extract 0.3 to 3 Hz, a weighted moving average is calculated with a predetermined number of frames smaller than the number of K frames shown in FIG. Thereby, predetermined frequency component data d is extracted from the time-series pixel data.

図7は、ステップS1で用いられるバンドパスフィルターを説明する説明図である。横軸は、フレームを示し、縦軸は、重み付け係数を示している。所定数のフレームは、例えば、99フレームである。内訳は、ターゲットとなるフレーム、これより前の連続する49フレーム、これより後の連続する49フレームである。   FIG. 7 is an explanatory diagram for explaining the bandpass filter used in step S1. The horizontal axis indicates the frame, and the vertical axis indicates the weighting coefficient. The predetermined number of frames is, for example, 99 frames. The breakdown is a target frame, 49 consecutive frames before this, and 49 consecutive frames after this.

ステップS1の処理により、M個の所定の周波数成分データdが生成される。内訳は、1番目の画素の時系列画素データから抽出された所定の周波数成分データd、2番目の画素の時系列画素データから抽出された所定の周波数成分データd、・・・、M番目の画素の時系列画素データから抽出された所定の周波数成分データdである。   Through the process in step S1, M pieces of predetermined frequency component data d are generated. The breakdown includes predetermined frequency component data d extracted from the time-series pixel data of the first pixel, predetermined frequency component data d extracted from the time-series pixel data of the second pixel,. This is predetermined frequency component data d extracted from pixel time-series pixel data.

図8は、1番目の画素の時系列画素データから抽出された所定の周波数成分データdを示すグラフである。グラフの縦軸は、画素値Gを示し、横軸は、フレームの順番を示す。所定の周波数成分データdは、上述したように、カメラのブレに起因する信号変化Ns、漏れたガスによる温度変化を示す信号NL、及び、その他のノイズNcにより構成される。   FIG. 8 is a graph showing predetermined frequency component data d extracted from the time-series pixel data of the first pixel. The vertical axis of the graph indicates the pixel value G, and the horizontal axis indicates the frame order. As described above, the predetermined frequency component data d is composed of the signal change Ns caused by camera shake, the signal NL indicating the temperature change caused by the leaked gas, and other noise Nc.

図9は、所定の周波数成分データdをフレーム単位で説明する説明図である。各フレームにおいて、1番目の画素の所定の周波数成分データdの値をd(1)、2番目の画素の所定の周波数成分データdの値をd(2)、・・・、M番目の画素の所定の周波数成分データdの値をd(M)とする。各フレームの1番目の画素のd(1)を時系列に並べたデータが、1番目の画素の時系列画素データから抽出された所定の周波数成分データdとなり、各フレームの2番目の画素のd(2)を時系列に並べたデータが、2番目の画素の時系列画素データから抽出された所定の周波数成分データdとなり、・・・、各フレームのM番目の画素のd(M)を時系列に並べたデータが、M番目の画素の時系列画素データから抽出された所定の周波数成分データdとなる。   FIG. 9 is an explanatory diagram for explaining the predetermined frequency component data d in units of frames. In each frame, the value of the predetermined frequency component data d of the first pixel is d (1), the value of the predetermined frequency component data d of the second pixel is d (2),..., The Mth pixel The value of the predetermined frequency component data d is d (M). Data in which d (1) of the first pixel of each frame is arranged in time series becomes predetermined frequency component data d extracted from the time series pixel data of the first pixel, and the second pixel of each frame Data in which d (2) is arranged in time series becomes predetermined frequency component data d extracted from the time series pixel data of the second pixel,..., d (M) of the Mth pixel in each frame Is a predetermined frequency component data d extracted from the time-series pixel data of the Mth pixel.

d(1)〜d(M)は、それぞれ、1番目〜M番目の画素の画素データに含まれる交流成分(言い換えれば、周波数成分)である。d(1)〜d(M)は、連続する2フレームにおいて、画素値G(画素データ)の時間変化を示す値の例である。このように、第1の算出部91は、画素値G(画素データ)の時間変化を示す値を算出する。   d (1) to d (M) are AC components (in other words, frequency components) included in the pixel data of the first to Mth pixels, respectively. d (1) to d (M) are examples of values indicating temporal changes in the pixel value G (pixel data) in two consecutive frames. As described above, the first calculation unit 91 calculates a value indicating a temporal change in the pixel value G (pixel data).

図3A及び図5を参照して、第1の算出部91は、1番目〜K番目のフレームのそれぞれに対して、∂G/∂x及び∂G/∂yを算出する処理をする(ステップS2)。図10は、この処理を説明する説明図である。∂G/∂xは、一つのフレームにおいて、画素値Gのx軸方向の変化を示す値である。∂G/∂yは、一つのフレームにおいて、画素値Gのy軸方向の変化を示す値である。いずれも、一つのフレームにおいて、画素値G(画素データ)の空間変化を示す値である。   Referring to FIGS. 3A and 5, the first calculation unit 91 performs a process of calculating ∂G / ∂x and ∂G / ∂y for each of the first to Kth frames (Step S1). S2). FIG. 10 is an explanatory diagram for explaining this process. ∂G / ∂x is a value indicating a change in the x-axis direction of the pixel value G in one frame. ∂G / ∂y is a value indicating a change in the y-axis direction of the pixel value G in one frame. Both are values indicating the spatial change of the pixel value G (pixel data) in one frame.

ステップS1の処理及びステップS2の処理の順番は、いずれが先でもよいし、同時に処理をしてもよい。以上説明したように、第1の算出部91は、複数の画像(複数のフレーム)について、画素データの空間変化を示す値(ステップS2)、及び、画素データの時間変化を示す値を算出する(ステップS1)。   The order of the process of step S1 and the process of step S2 may be either first or may be performed simultaneously. As described above, the first calculation unit 91 calculates, for a plurality of images (a plurality of frames), a value indicating the spatial change of the pixel data (step S2) and a value indicating the temporal change of the pixel data. (Step S1).

図3A及び図5を参照して、第2の算出部92は、ステップS1の結果及びステップS2の結果を用いて、1番目〜K番目のフレームのそれぞれについて、Sx及びSyを算出する(ステップS3)。これについて説明する。   Referring to FIGS. 3A and 5, the second calculation unit 92 calculates Sx and Sy for each of the first to Kth frames using the result of step S1 and the result of step S2 (step S1). S3). This will be described.

図11は、1番目のフレームのSx及びSyを求める処理を説明する説明図である。図11に示す二つのグラフは、∂G/∂xを示す軸、∂G/∂yを示す軸、及び、dを示す軸を有する。これらの軸は、互いに直交している。∂G/∂x(画素値Gのx軸方向の変化を示す値)は、図10に示す1番目のフレームの∂G/∂xである。∂G/∂y(画素値Gのy軸方向の変化を示す値)は、図10に示す1番目のフレームの∂G/∂yである。d(画素値Gの時間変化を示す値)は、図9に示す所定の周波数成分データdのうち、1番目のフレームの周波数成分データd(1)〜d(M)である。∂G/∂xを示す軸は、第1の変化方向を示す軸であり、∂G/∂yを示す軸は、第2の変化方向を示す軸であり、dを示す軸は、時間方向の変化を示す軸である。   FIG. 11 is an explanatory diagram for explaining processing for obtaining Sx and Sy of the first frame. The two graphs shown in FIG. 11 have an axis indicating ∂G / ∂x, an axis indicating ∂G / ∂y, and an axis indicating d. These axes are orthogonal to each other. ∂G / ∂x (a value indicating the change of the pixel value G in the x-axis direction) is ∂G / ∂x of the first frame shown in FIG. ∂G / ∂y (a value indicating the change of the pixel value G in the y-axis direction) is ∂G / ∂y of the first frame shown in FIG. d (value indicating the temporal change of the pixel value G) is the frequency component data d (1) to d (M) of the first frame among the predetermined frequency component data d shown in FIG. The axis indicating ∂G / ∂x is the axis indicating the first change direction, the axis indicating ∂G / ∂y is the axis indicating the second change direction, and the axis indicating d is the time direction It is an axis which shows change of.

第2の算出部92は、図10に示す1番目のフレームを構成する1番目〜M番目の画素の∂G/∂x及び∂G/∂y、並びに、図9に示す1番目のフレームを構成する1番目〜M番目の画素のd(1)〜d(M)を用いて、1番目のフレームを構成する1番目〜M番目の画素のそれぞれについて、座標(∂G/∂x,∂G/∂y,d(1))〜座標(∂G/∂x,∂G/∂y,d(M))を生成し、これらの座標に対する回帰面を算出する。回帰面の算出は、統計処理の一例である。   The second calculator 92 calculates ∂G / ∂x and ∂G / ∂y of the first to Mth pixels constituting the first frame shown in FIG. 10, and the first frame shown in FIG. Using d (1) to d (M) of the first to Mth pixels constituting the coordinates, the coordinates (∂G / ∂x, ∂ for each of the first to Mth pixels constituting the first frame are used. G / ∂y, d (1)) to coordinates (∂G / ∂x, ∂G / ∂y, d (M)) are generated, and a regression surface for these coordinates is calculated. The calculation of the regression surface is an example of statistical processing.

第2の算出部92は、∂G/∂xを示す軸とdを示す軸とで規定される平面と、1番目のフレームの回帰面との交線を求め、∂G/∂xを示す軸に対するその交線の傾きを、1番目のフレームのSxとする(Sx(1))。第2の算出部92は、∂G/∂yを示す軸とdを示す軸とで規定される平面と、1番目のフレームの回帰面との交線を求め、∂G/∂yを示す軸に対するその交線の傾きを、1番目のフレームのSyとする(Sy(1))。すなわち、第2の算出部92は、第1の変化方向を示す軸と時間変化の方向を示す軸とで規定される平面と、回帰平面との交線を第1の交線とし、第2の変化方向を示す軸と時間変化の方向を示す軸とで規定される平面と、回帰平面との交線を第2の交線とし、第1の変化方向を示す軸に対する第1の交線の傾きを、第1の変化方向に沿ったフレーム(画像)のブレを示す値とし、第2の変化方向を示す軸に対する第2の交線の傾きを、第2の変化方向に沿ったフレーム(画像)のブレを示す値とする。これを上位概念で表現すると、第2の算出部92は、回帰式で示される図形が回帰平面の場合、空間変化の方向を示す軸と時間変化の方向を示す軸とで規定される平面と、回帰平面との交線の、空間変化の方向を示す軸に対する傾きを算出する。   The second calculation unit 92 obtains an intersection line between a plane defined by the axis indicating ∂G / ∂x and the axis indicating d and the regression plane of the first frame, and indicates ∂G / ∂x The slope of the intersection line with respect to the axis is set as Sx of the first frame (Sx (1)). The second calculation unit 92 obtains the intersection line between the plane defined by the axis indicating ∂G / ∂y and the axis indicating d and the regression plane of the first frame, and indicates ∂G / ∂y. The inclination of the intersection line with respect to the axis is set as Sy of the first frame (Sy (1)). That is, the second calculation unit 92 sets the intersection line between the plane defined by the axis indicating the first change direction and the axis indicating the time change direction and the regression plane as the first intersection line, The first line of intersection with respect to the axis indicating the first change direction is defined as the second line of intersection between the plane defined by the axis indicating the change direction and the axis indicating the time change direction and the regression plane. Is the value indicating the blur of the frame (image) along the first change direction, and the inclination of the second intersection line with respect to the axis indicating the second change direction is the frame along the second change direction. The value indicates the blur of (image). Expressing this in a superordinate concept, when the graphic represented by the regression equation is a regression plane, the second calculation unit 92 is a plane defined by an axis indicating the direction of spatial change and an axis indicating the direction of time change. The inclination of the line of intersection with the regression plane with respect to the axis indicating the direction of spatial change is calculated.

図12は、2番目のフレームのSx(Sx(2))及び2番目のフレームのSy(Sy(2))〜K番目のフレームのSx(Sx(K))及びK番目のフレームのSy(Sy(K))を求める処理を説明する説明図である。第2の算出部92は、2番目〜K番目のフレームのSx及びSyを、1番目のフレームと同様にして求める。以上説明したように、第2の算出部92は、第1の算出部91によって算出された空間変化を示す値、及び、時間変化を示す値を統計処理して、カメラのブレにより生じる複数の画像(複数のフレーム)のそれぞれのブレを示す値を算出する。   FIG. 12 shows the second frame Sx (Sx (2)) and the second frame Sy (Sy (2)) to the Kth frame Sx (Sx (K)) and the Kth frame Sy ( It is explanatory drawing explaining the process which calculates | requires (Sy (K)). The second calculation unit 92 obtains Sx and Sy of the second to Kth frames in the same manner as the first frame. As described above, the second calculation unit 92 statistically processes the value indicating the spatial change and the value indicating the time change calculated by the first calculation unit 91, and performs a plurality of processings caused by camera shake. A value indicating blur of each image (a plurality of frames) is calculated.

図3A及び図5を参照して、第3の算出部93は、ステップS2の結果及びステップS3の結果を用いて、カメラのブレに起因する信号変化Nsを算出する(ステップS4)。別の表現を用いれば、第3の算出部93は、複数の画像(複数のフレーム)の各画素について、空間変化を示す値、及び、画像のブレを示す値を用いて、カメラのブレに起因する信号変化Nsを算出する。これについて説明する。第3の算出部93は、1番目〜M番目の画素のそれぞれに関して、カメラのブレに起因する信号変化Nsを算出する。これを説明する表を、以下に示す。Nsは、上記式3を用いて算出する。   Referring to FIGS. 3A and 5, the third calculation unit 93 calculates a signal change Ns caused by camera shake using the result of step S2 and the result of step S3 (step S4). If another expression is used, the third calculation unit 93 uses a value indicating spatial change and a value indicating image blur for each pixel of a plurality of images (a plurality of frames). The resulting signal change Ns is calculated. This will be described. The third calculator 93 calculates a signal change Ns caused by camera shake for each of the first to Mth pixels. A table explaining this is shown below. Ns is calculated using Equation 3 above.

Figure 2017179510
Figure 2017179510

1番目の画素に関するNsから説明する。1番目の画素に関するNsは、1番目のフレームに含まれる1番目の画素に関するNs、2番目のフレームに含まれる1番目の画素に関するNs、・・・、K番目のフレームに含まれる1番目の画素に関するNsを時系列に並べたデータである。   A description will be given from Ns regarding the first pixel. Ns related to the first pixel is Ns related to the first pixel included in the first frame, Ns related to the first pixel included in the second frame,..., The first included in the Kth frame. This is data in which Ns related to pixels are arranged in time series.

1番目のフレームに含まれる1番目の画素に関するNsは、図10に示す1番目のフレームに含まれる1番目の画素の∂G/∂x及び∂G/∂y、並びに、図11に示す1番目のフレームのSx(Sx(1))及びSy(Sy(1))を、式3に代入することにより求められる。2番目のフレームに含まれる1番目の画素に関するNsは、図10に示す2番目のフレームに含まれる1番目の画素の∂G/∂x及び∂G/∂y、並びに、図12に示す2番目のフレームのSx(Sx(2))及びSy(Sy(2))を、式3に代入することにより求められる。K番目のフレームに含まれる1番目の画素に関するNsは、図10に示すK番目のフレームに含まれる1番目の画素の∂G/∂x及び∂G/∂y、並びに、図12に示すK番目のフレームのSx(Sx(K))及びSy(Sy(K))を、式3に代入することにより求められる。   Ns regarding the first pixel included in the first frame is ∂G / ∂x and ∂G / ∂y of the first pixel included in the first frame shown in FIG. 10 and 1 shown in FIG. It is obtained by substituting Sx (Sx (1)) and Sy (Sy (1)) of the second frame into Equation 3. Ns regarding the first pixel included in the second frame is ∂G / ∂x and ∂G / ∂y of the first pixel included in the second frame illustrated in FIG. 10, and 2 illustrated in FIG. 12. It is obtained by substituting Sx (Sx (2)) and Sy (Sy (2)) of the second frame into Equation 3. Ns regarding the first pixel included in the Kth frame is ∂G / ∂x and ∂G / ∂y of the first pixel included in the Kth frame illustrated in FIG. 10 and K illustrated in FIG. It is obtained by substituting Sx (Sx (K)) and Sy (Sy (K)) of the second frame into Equation 3.

2番目の画素に関するNsは、1番目のフレームに含まれる2番目の画素に関するNs、2番目のフレームに含まれる2番目の画素に関するNs、・・・、K番目のフレームに含まれる2番目の画素に関するNsを時系列に並べたデータである。M番目の画素に関するNsは、1番目のフレームに含まれるM番目の画素に関するNs、2番目のフレームに含まれるM番目の画素に関するNs、・・・、K番目のフレームに含まれるM番目の画素に関するNsを時系列に並べたデータである。   Ns related to the second pixel is Ns related to the second pixel included in the first frame, Ns related to the second pixel included in the second frame,..., The second included in the Kth frame. This is data in which Ns related to pixels are arranged in time series. Ns related to the Mth pixel is Ns related to the Mth pixel included in the first frame, Ns related to the Mth pixel included in the second frame,..., Mth included in the Kth frame. This is data in which Ns related to pixels are arranged in time series.

図3A及び図5を参照して、補正部94は、所定の周波数成分データdとカメラのブレに起因する信号変化Nsとの差分を算出する(ステップS5)。これについて説明する。図8及び表1を参照して、補正部94は、1番目の画素の時系列画素データから抽出された所定の周波数成分データdと、1番目の画素に関するNsとの差分、2番目の画素の時系列画素データから抽出された所定の周波数成分データdと、2番目の画素に関するNsとの差分、・・・、M番目の画素の時系列画素データから抽出された所定の周波数成分データdと、M番目の画素に関するNsとの差分を算出する。   With reference to FIGS. 3A and 5, the correction unit 94 calculates a difference between the predetermined frequency component data d and the signal change Ns caused by camera shake (step S <b> 5). This will be described. Referring to FIG. 8 and Table 1, the correction unit 94 calculates the difference between the predetermined frequency component data d extracted from the time-series pixel data of the first pixel and Ns related to the first pixel, the second pixel The difference between the predetermined frequency component data d extracted from the time-series pixel data and the Ns related to the second pixel,..., The predetermined frequency component data d extracted from the time-series pixel data of the M-th pixel And the difference between Ns for the Mth pixel.

図6を参照して、ステップS5の差分により得られた周波数成分データは、漏れたガスによる温度変化を示す信号NL、及び、その他のノイズNcにより構成される。その他のノイズNcは、漏れたガスによる温度変化を示す信号NLと比べてかなり小さいので、ステップS5の差分により得られた周波数成分データは、漏れたガスによる温度変化を示す信号NLと見なすことができる。従って、ステップS5は、ガス像の動画に対して、カメラのブレを補正する処理となる。   Referring to FIG. 6, the frequency component data obtained from the difference in step S5 is composed of a signal NL indicating a temperature change due to the leaked gas and other noise Nc. Since the other noise Nc is considerably smaller than the signal NL indicating the temperature change due to the leaked gas, the frequency component data obtained by the difference in step S5 can be regarded as the signal NL indicating the temperature change due to the leaked gas. it can. Accordingly, step S5 is a process for correcting camera shake for a moving gas image.

以上説明したように、補正部94は、カメラのブレに起因する信号変化Nsを用いて被写体(ここでは、ガス像)を補正することを第2の補正とし、動画を構成する1番目〜K番目のフレームのそれぞれから抽出された被写体に対して、第2の補正をする。別の表現を用いれば、補正部94は、上記抽出部により抽出された被写体を、第3の算出部93により算出された信号変化Nsを用いて補正する。   As described above, the correction unit 94 uses the signal change Ns caused by camera shake as a second correction to correct a subject (here, a gas image), and forms the moving image. A second correction is performed on the subject extracted from each of the th frames. If another expression is used, the correction unit 94 corrects the subject extracted by the extraction unit using the signal change Ns calculated by the third calculation unit 93.

図3A及び図5を参照して、表示制御部10は、ステップS5の差分により得られた周波数成分データで示される動画(すなわち、カメラのブレが補正されたガス像の動画)を、ディスプレイ11に表示させる(ステップS6)。   With reference to FIGS. 3A and 5, the display control unit 10 displays a moving image (that is, a moving image of a gas image in which camera shake is corrected) indicated by the frequency component data obtained by the difference in step S <b> 5 on the display 11. (Step S6).

第1実施形態の主な効果を説明する。図1を参照して、(a)カメラのブレが発生すれば、画素値Gの空間方向の変化と画素値Gの時間方向の変化とが発生する。(b)カメラのブレ量が1画素以内であれば、画素値Gの変化量とブレ量とは、正比例すると考えられる。本発明者は、これらを前提にして、赤外線カメラ2によって撮影された動画を構成する各フレーム(画像)について、フレームを構成する複数の画素のそれぞれの空間変化を示す値、及び、時間変化を示す値に対して、所定の統計処理(回帰平面の算出)をすれば、各フレームのSx及びSyが求まることを見出した(図11、図12)。   The main effects of the first embodiment will be described. Referring to FIG. 1, (a) if camera shake occurs, a change in the spatial direction of the pixel value G and a change in the temporal direction of the pixel value G occur. (B) If the camera shake amount is within one pixel, the change amount of the pixel value G and the camera shake amount are considered to be directly proportional. Based on these assumptions, the present inventor provides a value indicating a spatial change of each of a plurality of pixels constituting the frame and a temporal change for each frame (image) constituting the moving image photographed by the infrared camera 2. It was found that Sx and Sy of each frame can be obtained by performing predetermined statistical processing (calculation of regression plane) on the indicated values (FIGS. 11 and 12).

図5を参照して、第1実施形態は、上記(a)及び(b)を基にして、各フレームのSx及びSyを算出するので(ステップS3)、カメラのブレが極めて小さくても(例えば、0.01〜0.05画素)、各フレームのSx及びSyを算出することができる。そして、第1実施形態は、Sx及びSyを用いて、カメラのブレに起因する信号変化Nsを算出し(ステップS4)、信号変化Nsを用いて、ガス像を補正する(ステップS5)。従って、第1実施形態によれば、カメラのブレが極めて小さくても、それによるノイズを除去できるので、ガスの検知精度を向上させることができる。   Referring to FIG. 5, the first embodiment calculates Sx and Sy of each frame based on the above (a) and (b) (step S3), so even if the camera shake is extremely small ( For example, 0.01 to 0.05 pixels), Sx and Sy of each frame can be calculated. In the first embodiment, the signal change Ns caused by camera shake is calculated using Sx and Sy (step S4), and the gas image is corrected using the signal change Ns (step S5). Therefore, according to the first embodiment, even if the camera shake is extremely small, noise caused by the camera shake can be removed, so that the gas detection accuracy can be improved.

以上の効果は、第2実施形態〜第4実施形態でも言えることである。   The above effect can be said also in the second to fourth embodiments.

第2実施形態について説明する。第1実施形態は、カメラのブレが補正されたガス像の動画を生成している。これに対して、第2実施形態は、オリジナルの動画に対して、カメラのブレが補正された動画(すなわち、監視対象の像及びガス像を含む動画)を生成する。   A second embodiment will be described. In the first embodiment, a moving image of a gas image in which camera shake is corrected is generated. On the other hand, 2nd Embodiment produces | generates the moving image (namely, moving image containing the image of a monitoring object, and a gas image) by which the camera shake was correct | amended with respect to the original moving image.

図13は、第2実施形態に係る画像処理装置3の動作を説明するフローチャートであり、画像処理装置3のCPU3aが画像処理プログラムに従って実行するものである。図3A及び図13を参照して、第1の算出部91は、図4に示す1番目〜K番目のフレームにより構成されるオリジナルの動画に対して、∂G/∂x及び∂G/∂yを算出する処理、並びに、∂G/∂tを算出する処理をする(ステップS11)。∂G/∂x及び∂G/∂yを算出する処理は、第1実施形態のステップS2(図5)と同じなので、説明を省略する。   FIG. 13 is a flowchart for explaining the operation of the image processing apparatus 3 according to the second embodiment, which is executed by the CPU 3a of the image processing apparatus 3 according to the image processing program. With reference to FIG. 3A and FIG. 13, the first calculation unit 91 performs ∂G / ∂x and ∂G / ∂ on the original moving image composed of the first to Kth frames shown in FIG. A process of calculating y and a process of calculating ∂G / ∂t are performed (step S11). Since the process of calculating ∂G / ∂x and ∂G / ∂y is the same as step S2 (FIG. 5) of the first embodiment, the description thereof is omitted.

∂G/∂tを算出する処理について説明する。図14は、これを説明する説明図である。∂G/∂tは、画素値G(画素データ)に対して時間変化の方向の方向微分をした値である。第1実施形態では、時間変化を示す値として、図8及び図9で説明した所定の周波数成分データdを用いたが、第2実施形態では、時間変化を示す値として、∂G/∂tを用いる。∂G/∂tは、連続する2つのフレームにおいて、同じ順番の画素の画素値Gの差分である。   Processing for calculating ∂G / ∂t will be described. FIG. 14 is an explanatory diagram for explaining this. ∂G / ∂t is a value obtained by differentiating the pixel value G (pixel data) in the direction of time change. In the first embodiment, the predetermined frequency component data d described with reference to FIGS. 8 and 9 is used as a value indicating the time change. In the second embodiment, ∂G / ∂t is used as the value indicating the time change. Is used. ∂G / ∂t is a difference between pixel values G of pixels in the same order in two consecutive frames.

連続する2つのフレームは、2番目のフレームの場合、1番目と2番目のフレームであり、3番目のフレームの場合、2番目と3番目のフレームであり、・・・、K番目のフレームの場合、K−1番目とK番目のフレームである。1番目のフレームの場合、連続する2つのフレームがないので、1番目のフレームを構成する1番目〜M番目の画素の∂G/∂tには、所定値が割り当てられる。   Two consecutive frames are the first and second frames in the case of the second frame, the second and third frames in the case of the third frame, and so on. The K-1th and Kth frames. In the case of the first frame, since there are no two consecutive frames, a predetermined value is assigned to ∂G / ∂t of the first to Mth pixels constituting the first frame.

例えば、2番目のフレームにおいて、1番目の画素の∂G/∂tは、1番目のフレームに含まれる1番目の画素の画素値Gと、2番目のフレームに含まれる1番目の画素の画素値Gとの差分であり、2番目の画素の∂G/∂tは、1番目のフレームに含まれる2番目の画素の画素値Gと、2番目のフレームに含まれる2番目の画素の画素値Gとの差分であり、・・・、M番目の画素の∂G/∂tは、1番目のフレームに含まれるM番目の画素の画素値Gと、2番目のフレームに含まれるM番目の画素の画素値Gとの差分である。   For example, in the second frame, ∂G / ∂t of the first pixel is the pixel value G of the first pixel included in the first frame and the pixel of the first pixel included in the second frame. The difference from the value G, and 画素 G / の t of the second pixel is the pixel value G of the second pixel included in the first frame and the pixel of the second pixel included in the second frame Is the difference from the value G, and ∂G / ∂t of the Mth pixel is the pixel value G of the Mth pixel included in the first frame and the Mth pixel included in the second frame This is the difference from the pixel value G of this pixel.

図3A及び図13を参照して、第2の算出部92は、ステップS11の結果を用いて、1番目〜K番目のフレームのそれぞれについて、Sx及びSyを算出する(ステップS12)。これについて説明する。図15は、1番目のフレームのSx及びSyを求める処理を説明する説明図である。図15に示す二つのグラフは、∂G/∂xを示す軸、∂G/∂yを示す軸、及び、∂G/∂tを示す軸を有する。これらの軸は、互いに直交している。∂G/∂x(画素値Gのx軸方向の変化を示す値)は、図10に示す1番目のフレームの∂G/∂xである。∂G/∂y(画素値Gのy軸方向の変化を示す値)は、図10に示す1番目のフレームの∂G/∂yである。∂G/∂t(画素値Gの時間変化を示す値)は、1番目のフレームの∂G/∂tである。   With reference to FIG. 3A and FIG. 13, the 2nd calculation part 92 calculates Sx and Sy about each of the 1st-Kth flame | frame using the result of step S11 (step S12). This will be described. FIG. 15 is an explanatory diagram for explaining processing for obtaining Sx and Sy of the first frame. The two graphs shown in FIG. 15 have an axis indicating ∂G / ∂x, an axis indicating ∂G / ∂y, and an axis indicating ∂G / ∂t. These axes are orthogonal to each other. ∂G / ∂x (a value indicating the change of the pixel value G in the x-axis direction) is ∂G / ∂x of the first frame shown in FIG. ∂G / ∂y (a value indicating the change of the pixel value G in the y-axis direction) is ∂G / ∂y of the first frame shown in FIG. ∂G / ∂t (a value indicating a temporal change in the pixel value G) is ∂G / ∂t of the first frame.

第2の算出部92は、1番目のフレームを構成する1番目〜M番目の画素の∂G/∂x、∂G/∂y、及び、∂G/∂tを用いて、1番目のフレームを構成する1番目〜M番目の画素のそれぞれについて、座標(∂G/∂x,∂G/∂y,∂G/∂t)〜座標(∂G/∂x,∂G/∂y,∂G/∂t)を生成し、これらの座標に対する回帰面を算出する。回帰面の算出は、統計処理の一例である。   The second calculation unit 92 uses the first to Mth pixels ∂G / ∂x, ∂G / ∂y, and ∂G / ∂t of the first frame to form the first frame. For each of the first to M-th pixels constituting, coordinates (∂G / ∂x, ∂G / ∂y, ∂G / ∂t) to coordinates (∂G / ∂x, ∂G / ∂y, ∂ G / ∂t) is generated, and a regression surface with respect to these coordinates is calculated. The calculation of the regression surface is an example of statistical processing.

第2の算出部92は、∂G/∂xを示す軸と∂G/∂tを示す軸とで規定される平面と、1番目のフレームの回帰面との交線を求め、∂G/∂xを示す軸に対するその交線の傾きを、1番目のフレームのSxとする(Sx1)。第2の算出部92は、∂G/∂yを示す軸と∂G/∂tを示す軸とで規定される平面と、1番目のフレームの回帰面との交線を求め、∂G/∂yを示す軸に対するその交線の傾きを、1番目のフレームのSyとする(Sy1)。   The second calculation unit 92 obtains an intersection line between the plane defined by the axis indicating ∂G / ∂x and the axis indicating ∂G / ∂t and the regression plane of the first frame, and ∂G / The slope of the intersection line with respect to the axis indicating ∂x is defined as Sx of the first frame (Sx1). The second calculation unit 92 obtains an intersection line between the plane defined by the axis indicating ∂G / ∂y and the axis indicating ∂G / ∂t and the regression plane of the first frame, and ∂G / The slope of the intersection line with respect to the axis indicating ∂y is defined as Sy of the first frame (Sy1).

図16は、2番目のフレームのSx(Sx(2))及び2番目のフレームのSy(Sy(2))〜K番目のフレームのSx(Sx(K))及びK番目のフレームのSy(Sy(K))を求める処理を説明する説明図である。第2の算出部92は、2番目〜K番目のフレームのSx及びSyを、1番目のフレームと同様にして求める。   FIG. 16 illustrates the second frame Sx (Sx (2)) and the second frame Sy (Sy (2)) to the Kth frame Sx (Sx (K)) and the Kth frame Sy ( It is explanatory drawing explaining the process which calculates | requires (Sy (K)). The second calculation unit 92 obtains Sx and Sy of the second to Kth frames in the same manner as the first frame.

図3A及び図13を参照して、第3の算出部93は、ステップS11の結果及びステップS12の結果を用いて、カメラのブレに起因する信号変化Nsを算出する(ステップS13)。これは、表1を用いて説明した第1実施形態のステップS4(図5)と同じなので、説明を省略する。   With reference to FIG. 3A and FIG. 13, the 3rd calculation part 93 calculates the signal change Ns resulting from the camera shake using the result of step S11 and the result of step S12 (step S13). Since this is the same as step S4 (FIG. 5) of the first embodiment described using Table 1, the description thereof is omitted.

図3A及び図13を参照して、第3の算出部93は、ステップS13の結果を用いて、カメラのブレに起因する信号変化Nsを積算する処理をする(ステップS14)。これを説明する表を、以下に示す。   With reference to FIG. 3A and FIG. 13, the 3rd calculation part 93 processes the signal change Ns resulting from a camera shake using the result of step S13 (step S14). A table explaining this is shown below.

Figure 2017179510
Figure 2017179510

表1及び表2を参照して、1番目のフレームの場合、1番目の画素に関するNs積算値は、1番目のフレームに含まれる1番目の画素に関するNsであり、2番目の画素に関するNs積算値は、1番目のフレームに含まれる2番目の画素に関するNsであり、・・・、M番目の画素に関するNs積算値は、1番目のフレームに含まれるM番目の画素に関するNsである。   Referring to Tables 1 and 2, in the case of the first frame, the Ns integrated value related to the first pixel is Ns related to the first pixel included in the first frame, and the Ns integrated value related to the second pixel. The value is Ns related to the second pixel included in the first frame,..., The Ns integrated value related to the Mth pixel is Ns related to the Mth pixel included in the first frame.

2番目のフレームの場合、1番目の画素に関するNs積算値は、1番目のフレームに含まれる1番目の画素に関するNs+2番目のフレームに含まれる1番目の画素に関するNsであり、2番目の画素に関するNs積算値は、1番目のフレームに含まれる2番目の画素に関するNs+2番目のフレームに含まれる2番目の画素に関するNsであり、・・・、M番目の画素に関するNs積算値は、1番目のフレームに含まれるM番目の画素に関するNs+2番目のフレームに含まれるM番目の画素に関するNsである。   In the case of the second frame, the Ns integrated value related to the first pixel is Ns related to the first pixel included in the first frame + Ns related to the first pixel included in the second frame, and related to the second pixel. The Ns integrated value is Ns related to the second pixel included in the first frame + Ns related to the second pixel included in the second frame,..., And the Ns integrated value related to the Mth pixel is Ns related to the Mth pixel included in the frame + Ns related to the Mth pixel included in the second frame.

K番目のフレームの場合、1番目の画素に関するNs積算値は、1番目のフレームに含まれる1番目の画素に関するNs+2番目のフレームに含まれる1番目の画素に関するNs+・・・+K番目のフレームに含まれる1番目の画素に関するNsであり、2番目の画素に関するNs積算値は、1番目のフレームに含まれる2番目の画素に関するNs+2番目のフレームに含まれる2番目の画素に関するNs+・・・+K番目のフレームに含まれる2番目の画素に関するNsであり、・・・、M番目の画素に関するNs積算値は、1番目のフレームに含まれるM番目の画素に関するNs+2番目のフレームに含まれるM番目の画素に関するNs+・・・+K番目のフレームに含まれるM番目の画素に関するNsである。   In the case of the Kth frame, the Ns integrated value related to the first pixel is Ns + related to the first pixel included in the first frame + Ns +... + Kth related to the first pixel included in the second frame. Ns related to the first pixel included, and the Ns integrated value related to the second pixel is Ns related to the second pixel included in the first frame + Ns +... + K related to the second pixel included in the second frame. Ns for the second pixel included in the first frame, ..., the Ns integrated value for the Mth pixel is Ns for the Mth pixel included in the first frame + Mth included in the second frame Ns + related to the pixel No. + Ns related to the Mth pixel included in the Kth frame.

図3A及び図13を参照して、補正部94は、オリジナルの動画とステップS14の結果との差分を算出する(ステップS15)。これについて詳しく説明する。補正部94は、オリジナル動画の1番目のフレームを構成する1番目〜M番目の画素のそれぞれの画素値Gと、表2に示す1番目のフレームを構成する1番目〜M番目の画素に関するそれぞれのNs積算値との差分を算出する。補正部94は、オリジナル動画の2番目のフレームを構成する1番目〜M番目の画素のそれぞれの画素値Gと、表2に示す2番目のフレームを構成する1番目〜M番目の画素に関するそれぞれのNs積算値との差分を算出する。補正部94は、オリジナル動画の3番目〜K番目のフレームについても同様の処理をする。ステップS15の処理により、オリジナルの動画に対して、カメラのブレを補正することができる。   With reference to FIG. 3A and FIG. 13, the correction | amendment part 94 calculates the difference of an original moving image and the result of step S14 (step S15). This will be described in detail. The correction unit 94 is associated with the pixel values G of the first to Mth pixels constituting the first frame of the original moving image and the first to Mth pixels constituting the first frame shown in Table 2. The difference from the Ns integrated value is calculated. The correction unit 94 respectively relates to the pixel values G of the first to Mth pixels constituting the second frame of the original moving image and the first to Mth pixels constituting the second frame shown in Table 2. The difference from the Ns integrated value is calculated. The correction unit 94 performs the same process for the third to Kth frames of the original moving image. Through the processing in step S15, camera shake can be corrected for the original moving image.

以上説明したように、補正部94は、カメラのブレに起因する信号変化Nsを用いてフレームを補正することを第1の補正とし、動画を構成する1番目〜K番目のフレームのそれぞれに対して、第1の補正をする。別の表現を用いれば、補正部94は、第3の算出部93により算出された信号変化Nsを用いて複数の画像(複数のフレーム)を補正する。   As described above, the correction unit 94 sets the first correction to correct the frame using the signal change Ns caused by camera shake, and each of the first to Kth frames constituting the moving image. First correction is made. In other words, the correction unit 94 corrects a plurality of images (a plurality of frames) using the signal change Ns calculated by the third calculation unit 93.

図3A及び図13を参照して、表示制御部10は、ステップS15の差分により得られた動画(すなわち、カメラのブレが補正された動画)を、ディスプレイ11に表示させる(ステップS16)。   With reference to FIG. 3A and FIG. 13, the display control part 10 displays on the display 11 the moving image (namely, moving image with which the camera shake was correct | amended) obtained by the difference of step S15 (step S16).

ガス像だけの動画を生成する場合、画像処理部は、ステップS15の差分により得られた動画に対して、バンドパス処理をする(ステップS17)。この処理は、図5のステップS1と同様なので、説明を省略する。表示制御部10は、ステップS17の処理がされた動画(すなわち、カメラのブレが補正されたガス像の動画)を、ディスプレイ11に表示させる(ステップS18)。   When generating a moving image of only a gas image, the image processing unit performs bandpass processing on the moving image obtained by the difference in step S15 (step S17). Since this process is the same as step S1 in FIG. The display control unit 10 causes the display 11 to display the moving image processed in step S17 (that is, the moving image of the gas image corrected for camera shake) (step S18).

第3実施形態について説明する。第3実施形態は、ブレ量が大きい場合に対処することができる。図1を参照して、例えば、現フレームの2番目の画素と3番目の画素とは、画素値Gが同じである。このことからに、ブレ量が1画素を超えると、画素値Gの変化量とブレ量とは、正比例しなくなり、Sxの誤差が大きくなる(Syについても同様に誤差が大きくなる)。第3実施形態は、連続する2つのフレーム間のブレ量を1画素以下にしてNsを算出する。   A third embodiment will be described. The third embodiment can cope with a case where the blur amount is large. Referring to FIG. 1, for example, the second pixel and the third pixel of the current frame have the same pixel value G. For this reason, when the blur amount exceeds one pixel, the change amount of the pixel value G and the blur amount are not directly proportional to each other, and the error of Sx becomes large (the error similarly increases for Sy). In the third embodiment, Ns is calculated by setting the blur amount between two consecutive frames to be one pixel or less.

第3実施形態が、第2実施形態と異なるのは、図13に示すステップS12の替わりに、Sx及びSyの確定処理をすることである。図17は、第3実施形態において、Sxの確定処理を説明するフローチャートである。図18は、Sxの確定処理を説明する説明図である。図3A、図17及び図18を参照して、第2の算出部92は、図13のステップS12で算出した1番目のフレームのSx(Sx(1))〜K番目のフレームのSx(Sx(K))を、1番目のフレームのSx(Sx(1))〜K番目のフレームのSx(Sx(K))の初期値とする(ステップS21)。1番目のフレームのSx(Sx(1))の初期値は、0画素とする。   The third embodiment is different from the second embodiment in that a determination process of Sx and Sy is performed instead of step S12 shown in FIG. FIG. 17 is a flowchart for explaining Sx determination processing in the third embodiment. FIG. 18 is an explanatory diagram for explaining the determination process of Sx. With reference to FIG. 3A, FIG. 17 and FIG. 18, the second calculator 92 calculates the first frame Sx (Sx (1)) to the Kth frame Sx (Sx) calculated in step S12 of FIG. (K)) is set as an initial value of Sx (Sx (1)) of the first frame to Sx (Sx (K)) of the Kth frame (step S21). The initial value of Sx (Sx (1)) of the first frame is 0 pixels.

第2の算出部92は、Sx積算値を算出する(ステップS22)。具体的に説明する。2番目のフレームのSx(Sx(2))の初期値が、例えば、0.3画素とする。1番目のフレームのSx積算値は、0画素であり、2番目のフレームのSx積算値は、0.3画素(=0+0.3)である。第2の算出部92は、1番目のフレームのSx積算値、及び、2番目のフレームのSx積算値をそれぞれ、整数化する(ステップS23)。これは、Sx積算値を四捨五入する処理と同様である。1番目のフレームのSx積算値は、0画素なので、整数化すれば、0画素となる。2番目のフレームのSx積算値は、0.3画素なので、整数化すれば、0画素となる。   The second calculator 92 calculates the Sx integrated value (step S22). This will be specifically described. The initial value of Sx (Sx (2)) of the second frame is, for example, 0.3 pixels. The Sx integrated value of the first frame is 0 pixel, and the Sx integrated value of the second frame is 0.3 pixel (= 0 + 0.3). The second calculation unit 92 converts the Sx integrated value of the first frame and the Sx integrated value of the second frame into integers (step S23). This is the same as the process of rounding off the Sx integrated value. Since the Sx integrated value of the first frame is 0 pixel, if it is converted to an integer, it becomes 0 pixel. Since the Sx integrated value of the second frame is 0.3 pixel, it becomes 0 pixel when converted to an integer.

第2の算出部92は、連続する2つのフレームにおいて、整数化された積算値が、いずれも0画素か否かを判定する(ステップS24)。ここでは、連続する2つのフレームとは、1番目と2番目のフレームである。これらのフレームにおいて、整数化された積算値が、いずれも0画素なので(ステップS24でYes)、第2の算出部92は、1番目のフレームのSx(Sx(1))の初期値(0画素)を、1番目のフレームのSx(Sx(1))と確定し、2番目のフレームのSx(Sx(2))の初期値(0.3画素)を、2番目のフレームのSx(Sx(2))と確定する(ステップS25)。   The second calculation unit 92 determines whether or not the integral values converted into integers are 0 pixels in two consecutive frames (step S24). Here, the two consecutive frames are the first and second frames. In these frames, since the integral values converted into integers are all 0 pixels (Yes in step S24), the second calculation unit 92 calculates the initial value (0 of Sx (Sx (1)) of the first frame. Pixel) is determined as Sx (Sx (1)) of the first frame, and the initial value (0.3 pixel) of Sx (Sx (2)) of the second frame is determined as Sx (Sx (2)) of the second frame. Sx (2)) is confirmed (step S25).

第2の算出部92は、最後のフレームのSxを確定したか否かを判断する(ステップS26)。最後のフレームのSxが確定していないので(ステップS26でNo)、第2の算出部92は、次のフレームのSx積算値を算出する(ステップS22)。ここでは、3番目のフレームのSx積算値が算出される。3番目のフレームのSx(Sx(3))の初期値が、例えば、0.1画素とする。3番目のフレームのSx積算値は、0.4画素(=0.3+0.1)となる。   The second calculation unit 92 determines whether or not the Sx of the last frame has been determined (step S26). Since Sx of the last frame is not fixed (No in Step S26), the second calculation unit 92 calculates the Sx integrated value of the next frame (Step S22). Here, the Sx integrated value of the third frame is calculated. The initial value of Sx (Sx (3)) of the third frame is, for example, 0.1 pixel. The Sx integrated value of the third frame is 0.4 pixels (= 0.3 + 0.1).

第2の算出部92は、3番目のフレームのSx積算値を整数化する(ステップS23)。3番目のフレームのSx積算値は、0.4画素なので、整数化すれば、0画素となる。   The second calculation unit 92 converts the Sx integrated value of the third frame into an integer (step S23). Since the Sx integrated value of the third frame is 0.4 pixels, it becomes 0 pixels when converted to an integer.

第2の算出部92は、連続する2つのフレームにおいて、整数化された積算値が、いずれも0画素か否かを判定する(ステップS24)。ここでは、連続する2つのフレームとは、2番目と3番目のフレームである。これらのフレームにおいて、整数化された積算値が、いずれも0画素なので(ステップS24でYes)、第2の算出部92は、3番目のフレームのSx(Sx(3))の初期値(0.1画素)を、3番目のフレームのSx(Sx(3))と確定する(ステップS25)。   The second calculation unit 92 determines whether or not the integral values converted into integers are 0 pixels in two consecutive frames (step S24). Here, the two consecutive frames are the second and third frames. In these frames, since the integral values converted into integers are all 0 pixels (Yes in step S24), the second calculation unit 92 sets the initial value (0 of Sx (Sx (3)) of the third frame. .1 pixel) is determined as Sx (Sx (3)) of the third frame (step S25).

第2の算出部92は、最後のフレームのSxを確定したか否かを判断する(ステップS26)。最後のフレームのSxが確定していないので(ステップS26でNo)、第2の算出部92は、次のフレームのSx積算値を算出する(ステップS22)。ここでは、4番目のフレームのSx積算値が算出される。4番目のフレームのSx(Sx(4))の初期値が、例えば、0.7画素とする。4番目のフレームのSx積算値は、1.1画素(=0.4+0.7)となる。   The second calculation unit 92 determines whether or not the Sx of the last frame has been determined (step S26). Since Sx of the last frame is not fixed (No in Step S26), the second calculation unit 92 calculates the Sx integrated value of the next frame (Step S22). Here, the Sx integrated value of the fourth frame is calculated. The initial value of Sx (Sx (4)) of the fourth frame is, for example, 0.7 pixels. The Sx integrated value of the fourth frame is 1.1 pixels (= 0.4 + 0.7).

第2の算出部92は、4番目のフレームのSx積算値を整数化する(ステップS23)。4番目のフレームのSx積算値は、1.1画素なので、整数化すれば、1画素となる。第2の算出部92は、連続する2つのフレームにおいて、整数化された積算値が、いずれも0画素か否かを判定する(ステップS24)。ここでは、連続する2つのフレームとは、3番目と4番目のフレームである。4番目のフレームについて、整数化されたSx積算値が、1画素である(ステップS24でNo)。よって、第2の算出部92は、3番目のフレームと、x軸方向に−1画素ずらした4番目のフレームとを用いて、4番目のフレームのSx(Sx(4))を算出する(ステップS27)。この例では、Sx(4)は、−0.3画素となる。第2の算出部92は、4番目のフレームのSx(Sx(4))を−0.3画素と確定する(ステップS28)。   The second calculation unit 92 converts the Sx integrated value of the fourth frame into an integer (step S23). Since the Sx integrated value of the fourth frame is 1.1 pixels, if it is converted to an integer, it becomes 1 pixel. The second calculation unit 92 determines whether or not the integral values converted into integers are 0 pixels in two consecutive frames (step S24). Here, the two consecutive frames are the third and fourth frames. For the fourth frame, the integerized Sx integrated value is one pixel (No in step S24). Therefore, the second calculation unit 92 calculates Sx (Sx (4)) of the fourth frame using the third frame and the fourth frame shifted by −1 pixel in the x-axis direction ( Step S27). In this example, Sx (4) is −0.3 pixel. The second calculation unit 92 determines Sx (Sx (4)) of the fourth frame as −0.3 pixel (step S28).

第2の算出部92は、最後のフレームのSxを確定したか否かを判断する(ステップS26)。最後のフレームのSxが確定していないので(ステップS26でNo)、第2の算出部92は、次のフレームのSx積算値を算出する(ステップS22)。ここでは、5番目のフレームのSx積算値が算出される。5番目のフレームのSx(Sx(5))の初期値が、例えば、−0.8画素とする。5番目のフレームのSx積算値は、0.3画素(=1.1−0.8)となる。   The second calculation unit 92 determines whether or not the Sx of the last frame has been determined (step S26). Since Sx of the last frame is not fixed (No in Step S26), the second calculation unit 92 calculates the Sx integrated value of the next frame (Step S22). Here, the Sx integrated value of the fifth frame is calculated. The initial value of Sx (Sx (5)) of the fifth frame is assumed to be −0.8 pixels, for example. The Sx integrated value of the fifth frame is 0.3 pixels (= 1.1−0.8).

第2の算出部92は、5番目のフレームのSx積算値を整数化する(ステップS23)。5番目のフレームのSx積算値は、0.3画素なので、整数化すれば、0画素となる。第2の算出部92は、連続する2つのフレームにおいて、整数化された積算値が、いずれも0画素か否かを判定する(ステップS24)。ここでは、連続する2つのフレームとは、4番目と5番目のフレームである。4番目のフレームについて、整数化されたSx積算値が、1画素である(ステップS24でNo)。よって、第2の算出部92は、5番目のフレームと、x軸方向に−1画素ずらした4番目のフレームとを用いて、5番目のフレームのSx(Sx(5))を算出する(ステップS27)。この例では、Sx(5)は、0.2画素となる。第2の算出部92は、5番目のフレームのSx(Sx(5))を0.2画素と確定する(ステップS28)。   The second calculation unit 92 converts the Sx integrated value of the fifth frame into an integer (step S23). Since the Sx integrated value of the fifth frame is 0.3 pixel, it becomes 0 pixel if it is converted to an integer. The second calculation unit 92 determines whether or not the integral values converted into integers are 0 pixels in two consecutive frames (step S24). Here, the two consecutive frames are the fourth and fifth frames. For the fourth frame, the integerized Sx integrated value is one pixel (No in step S24). Therefore, the second calculation unit 92 calculates Sx (Sx (5)) of the fifth frame using the fifth frame and the fourth frame shifted by −1 pixel in the x-axis direction ( Step S27). In this example, Sx (5) is 0.2 pixels. The second calculation unit 92 determines Sx (Sx (5)) of the fifth frame as 0.2 pixels (step S28).

第2の算出部92は、6番目以降のフレームに対して、上記説明と同様の処理をする。第2の算出部92は、K番目のフレームのSxを確定したと判断したとき(ステップS26でYes)、Sxの確定処理が終了する。   The second calculation unit 92 performs the same processing as described above for the sixth and subsequent frames. When the second calculation unit 92 determines that Sx of the Kth frame has been confirmed (Yes in step S26), the Sx determination process ends.

第2の算出部92は、Syについても、Sxと同様にして確定処理をする。画像処理部9は、確定処理がされたSx及びSyを用いて、図13に示すステップS13以降の処理をする。   The second calculation unit 92 performs a determination process for Sy as in the case of Sx. The image processing unit 9 performs the processing after step S13 shown in FIG. 13 using Sx and Sy on which the confirmation processing has been performed.

第4実施形態について説明する。図3Aに示す赤外線カメラ2による動画の撮影中に、カメラのブレの発生に加えて、被写体(例えば、自動車、人、木の枝等)の動きが発生することがある。第1実施形態〜第3実施形態は、フレームを構成する複数の画素のそれぞれの空間変化を示す値及び時間変化を示す値を統計処理して、フレームのSx及びSyを算出する。この場合に、動く被写体の像を示す領域を構成する画素を含めて、フレームのSx及びSyが算出されれば、これらの値の精度が低下する。そこで、第4実施形態は、被写体の動きが発生しても、フレームのSx及びSyの精度が低下しないようにする。   A fourth embodiment will be described. During moving image shooting by the infrared camera 2 shown in FIG. 3A, in addition to camera shake, movement of a subject (for example, a car, a person, a tree branch, etc.) may occur. In the first to third embodiments, a value indicating a spatial change and a value indicating a temporal change of each of a plurality of pixels constituting the frame are statistically processed to calculate Sx and Sy of the frame. In this case, if the Sx and Sy of the frame are calculated including the pixels that constitute the region indicating the moving subject image, the accuracy of these values decreases. Therefore, in the fourth embodiment, the accuracy of the Sx and Sy of the frame is not lowered even when the subject moves.

動く被写体は、動画において、移動体の像として表れる。二以上の領域に分割されたフレームにおいて、移動体の像を示す領域のブレを示す値は、これ以外の領域のブレを示す値と異なる。そこで、第4実施形態は、二以上の領域に分割されたフレームにおいて、各領域のブレを示す値を用いて、フレームに含まれる移動体の像を示す領域を特定し、移動体の像を示す領域を除く二以上の領域のブレを示す値を用いて、カメラのブレにより生じる画像のブレを示す値を算出する。   A moving subject appears as an image of a moving object in a moving image. In a frame divided into two or more areas, the value indicating the blur of the area indicating the image of the moving object is different from the value indicating the blur of the other areas. Therefore, in the fourth embodiment, in a frame divided into two or more regions, a value indicating the blur of each region is used to identify a region indicating the image of the moving object, and the image of the moving object is determined. A value indicating blurring of an image caused by camera blur is calculated using a value indicating blurring of two or more areas excluding the indicated area.

図19は、二以上の領域Rに分割された一つのフレームの模式図である。二以上の領域Rのそれぞれに含まれる矢印は、その領域Rのブレ量の大きさ及び方向を示す。二以上の領域Rの中に、ブレ量の大きさ及び方向が他の領域Rと異なる領域Rが存在する場合がある。例えば、図19では、領域Ra、領域Rb、領域Rc、領域Rd、領域Re、領域Rfのブレ量の大きさ及び方向が、他の領域Rのブレ量の大きさ及び方向と異なる。第4実施形態は、領域Ra〜Rfを移動体の像を示す領域とし、一つのフレームのブレ量の算出に、領域Ra〜Rfのような領域Rを除外する。   FIG. 19 is a schematic diagram of one frame divided into two or more regions R. An arrow included in each of the two or more regions R indicates the magnitude and direction of the blur amount of the region R. In two or more regions R, there may be a region R in which the amount and direction of blurring are different from those of other regions R. For example, in FIG. 19, the magnitude and direction of the blur amount of the region Ra, the region Rb, the region Rc, the region Rd, the region Re, and the region Rf are different from the magnitude and direction of the blur amount of the other regions R. In the fourth embodiment, the regions Ra to Rf are regions that indicate the image of the moving body, and the region R such as the regions Ra to Rf is excluded from the calculation of the blur amount of one frame.

図20は、第4実施形態において、Sx,Syを算出する処理を説明するフローチャートである。第2の算出部92は、i=1に設定する(ステップS41)。これは、1番目のフレームに対する処理を意味する。第1実施形態〜第3実施形態では、一つのフレームの全体でSx,Syを算出したが(例えば、図13のステップS12)、第4実施形態の第2の算出部92は、1番目のフレームを、二以上の領域Rに分割し、二以上の領域Rのそれぞれについて、Sx,Syを算出する(ステップS42)。各領域RのSx,Syを算出する方法は、一つのフレームのSx,Syを算出する方法と同じである(例えば、図13のステップS12)。すなわち、第2の算出部92は、フレームのSx,Syの算出方法と同様の方法を用いて、二以上の領域RのそれぞれのSx,Syを算出する。   FIG. 20 is a flowchart illustrating a process of calculating Sx and Sy in the fourth embodiment. The second calculation unit 92 sets i = 1 (step S41). This means processing for the first frame. In the first to third embodiments, Sx and Sy are calculated for one entire frame (for example, step S12 in FIG. 13), but the second calculation unit 92 of the fourth embodiment is the first The frame is divided into two or more regions R, and Sx and Sy are calculated for each of the two or more regions R (step S42). The method of calculating Sx and Sy of each region R is the same as the method of calculating Sx and Sy of one frame (for example, step S12 in FIG. 13). That is, the second calculation unit 92 calculates Sx and Sy of each of the two or more regions R using a method similar to the calculation method of Sx and Sy of the frame.

第2の算出部92は、ステップS42で算出したベクトル(Sx,Sy)の平均値を算出する(ステップS43)。   The second calculation unit 92 calculates the average value of the vectors (Sx, Sy) calculated in step S42 (step S43).

第2の算出部92は、ステップS42で算出された複数の領域Rのそれぞれのベクトル(Sx,Sy)の中で、ステップS43で算出されたベクトル(Sx,Sy)の平均値と最も離れているベクトル(Sx,Sy)を探索する(ステップS44)。   The second calculation unit 92 is farthest from the average value of the vectors (Sx, Sy) calculated in step S43 among the vectors (Sx, Sy) of the plurality of regions R calculated in step S42. Search for a vector (Sx, Sy) that is present (step S44).

第2の算出部92は、ステップS44で探索されたベクトル(Sx,Sy)とステップS43で算出された平均値との差の絶対値が、予め定められた値以上か否かを判断する(ステップS45)。   The second calculation unit 92 determines whether or not the absolute value of the difference between the vector (Sx, Sy) searched in step S44 and the average value calculated in step S43 is equal to or greater than a predetermined value ( Step S45).

第2の算出部92が、ステップS44で探索されたベクトル(Sx,Sy)とステップS43で算出された平均値との差が、予め定められた値以上と判断したとき(ステップS45でYes)、ステップS44で探索されたベクトル(Sx,Sy)を有する領域Rを、移動体の像を示す領域として特定し、ステップS44で探索されたベクトル(Sx,Sy)を、平均値の算出に用いない決定をする(ステップS46)。すなわち、第2の算出部92は、二以上の領域Rのそれぞれのベクトル(Sx,Sy)を用いて、フレームに含まれる移動体の像を示す領域Rを特定する。そして、第2の算出部92は、ステップS43の処理に戻る。ここでは、第2の算出部92は、ステップS42で算出されたベクトル(Sx,Sy)の中から、ステップS46で決定されたベクトル(Sx,Sy)を除外して、ベクトル(Sx,Sy)の平均値を算出する(ステップS43)。そして、第2の算出部92は、ステップS44以降の処理をする。   When the second calculation unit 92 determines that the difference between the vector (Sx, Sy) searched in step S44 and the average value calculated in step S43 is equal to or greater than a predetermined value (Yes in step S45). The region R having the vector (Sx, Sy) searched in step S44 is specified as the region indicating the image of the moving object, and the vector (Sx, Sy) searched in step S44 is used for calculating the average value. Determination is made (step S46). That is, the second calculation unit 92 specifies a region R indicating an image of the moving body included in the frame, using the vectors (Sx, Sy) of the two or more regions R. Then, the second calculation unit 92 returns to the process of step S43. Here, the second calculation unit 92 excludes the vector (Sx, Sy) determined in step S46 from the vector (Sx, Sy) calculated in step S42, and the vector (Sx, Sy). Is calculated (step S43). And the 2nd calculation part 92 performs the process after step S44.

第2の算出部92が、ステップS44で探索されたベクトル(Sx,Sy)とステップS43で算出された平均値との差が、予め定められた値より小さいと判断したとき(ステップS45でNo)、第2の算出部92は、i=kか否かを判断する(ステップS47)。ここでは、i=1なので(ステップS47でNo)、第2の算出部92は、ステップS43で算出された直近の平均値を、i番目のフレームのベクトル(Sx,Sy)と確定する(ステップS48)。ここでは、1番目のフレームのベクトル(Sx,Sy)、すなわち、ベクトル(Sx(1),Sy(1))と確定される。すなわち、第2の算出部92は、移動体の像を示す領域Rを除く二以上の領域Rのベクトル(Sx,Sy)を用いて(ベクトル(Sx,Sy)の平均値)、フレームのベクトル(Sx,Sy)を算出する。   When the second calculation unit 92 determines that the difference between the vector (Sx, Sy) searched in step S44 and the average value calculated in step S43 is smaller than a predetermined value (No in step S45). ), The second calculation unit 92 determines whether i = k (step S47). Here, since i = 1 (No in step S47), the second calculation unit 92 determines the latest average value calculated in step S43 as the vector (Sx, Sy) of the i-th frame (step S43). S48). Here, the vector (Sx, Sy) of the first frame, that is, the vector (Sx (1), Sy (1)) is determined. That is, the second calculation unit 92 uses a vector (Sx, Sy) of two or more regions R excluding the region R indicating the image of the moving object (an average value of the vectors (Sx, Sy)), and a frame vector. (Sx, Sy) is calculated.

第2の算出部92は、i=i+1に設定する(ステップS49)。ここでは、i=2に設定される。そして、第2の算出部92は、ステップS42の処理に戻る。ここでは、第2の算出部92は、2番目のフレームを複数の領域Rに分割し、複数の領域Rのそれぞれについて、ベクトル(Sx,Sy)を算出する(ステップS42)。   The second calculation unit 92 sets i = i + 1 (step S49). Here, i = 2 is set. Then, the second calculation unit 92 returns to the process of step S42. Here, the second calculation unit 92 divides the second frame into a plurality of regions R, and calculates a vector (Sx, Sy) for each of the plurality of regions R (step S42).

第2の算出部92は、i=kと判断したとき(ステップS47でYes)、第2の算出部92は、ステップS43で算出された直近の平均値を、i番目のフレームのベクトル(Sx,Sy)と確定する。ここでは、K番目のフレームのベクトル(Sx,Sy)、すなわち、ベクトル(Sx(K),Sy(K))と確定される。   When the second calculation unit 92 determines that i = k (Yes in step S47), the second calculation unit 92 calculates the most recent average value calculated in step S43 as the i-th frame vector (Sx , Sy). Here, the vector (Sx, Sy) of the Kth frame, that is, the vector (Sx (K), Sy (K)) is determined.

以上が第4実施形態によるフレームのベクトル(Sx,Sy)の算出処理である。これは、第1実施形態〜第3実施形態のいずれのベクトル(Sx,Sy)の算出処理に置き換えることができる。   The above is the calculation processing of the frame vector (Sx, Sy) according to the fourth embodiment. This can be replaced with the calculation process of any vector (Sx, Sy) in the first to third embodiments.

本実施形態は、図11及び図12、並びに、図15及び図16で説明したように、回帰面を求め、回帰面を用いてSx及びSyを求めている。これは、以下の処理をしていることを意味する。   In this embodiment, as described with reference to FIGS. 11 and 12, and FIGS. 15 and 16, the regression surface is obtained, and Sx and Sy are obtained using the regression surface. This means that the following processing is performed.

図6を参照して、時系列画素データから、背景の温度変化を示す信号B及び高周波ノイズNhを引いた信号をgとする。gは、以下の式で表される。   Referring to FIG. 6, let g be a signal obtained by subtracting signal B indicating background temperature change and high-frequency noise Nh from time-series pixel data. g is represented by the following formula.

g=Ns+NL+Nc     g = Ns + NL + Nc

上述したように、Nsは、カメラのブレに起因する信号変化であり、NLは、漏れたガスによる温度変化を示す信号であり、Ncは、その他のノイズである。   As described above, Ns is a signal change caused by camera shake, NL is a signal indicating a temperature change due to leaked gas, and Nc is other noise.

上記gの式は、以下の式に変形できる。   The equation of g can be transformed into the following equation.

NL+Nc=g−Ns     NL + Nc = g−Ns

上述したように、カメラのブレがx軸方向及びy軸方向に発生した場合、カメラのブレに起因する信号変化Nsは、式3で表されると推測できる。カメラのブレに起因する信号変化Nsは、信号g、漏れたガスによる温度変化NL、及び、その他のノイズNcのそれぞれに対して、独立であり、相関関係を有さない。一つのフレーム(一つの画像)では、Sx及びSyがそれぞれ一定と仮定する。様々な値のSx及びSyの中で、信号値(NL+Nc=g−Ns)が最小となるSx及びSyの組み合わせが、Sx及びSyの正解値と思われる。これは、以下の式4で表される信号値の二乗ノルムが最小となるSx及びSyの組み合わせを求めればよいことを意味する。   As described above, when the camera shake occurs in the x-axis direction and the y-axis direction, it can be estimated that the signal change Ns caused by the camera shake is expressed by Expression 3. The signal change Ns caused by camera shake is independent of the signal g, the temperature change NL due to the leaked gas, and other noises Nc, and has no correlation. It is assumed that Sx and Sy are constant in one frame (one image). A combination of Sx and Sy that minimizes the signal value (NL + Nc = g−Ns) among various values of Sx and Sy is considered to be a correct value of Sx and Sy. This means that a combination of Sx and Sy that minimizes the square norm of the signal value represented by the following Expression 4 may be obtained.

Figure 2017179510
Figure 2017179510

式4を計算すると、式5となる。   When Equation 4 is calculated, Equation 5 is obtained.

Figure 2017179510
Figure 2017179510

信号値の二乗ノルムが最小となる点では、式5を、Sx及びSyで偏微分した値が、ともに0になると思われる。式5を、Sxで偏微分する式は、式6となり、式5を、Syで偏微分する式は、式7となる。   At the point where the square norm of the signal value is minimum, it is considered that the value obtained by partial differentiation of Equation 5 with Sx and Sy is 0. The equation for partial differentiation of Equation 5 with Sx is Equation 6, and the equation for partial differentiation of Equation 5 with Sy is Equation 7.

Figure 2017179510
Figure 2017179510

式6を計算(すなわち、式6をSxで偏微分)すると、式8となり、式7を計算(すなわち、式7をSyで偏微分)すると、式9となる。   When Equation 6 is calculated (ie, Equation 6 is partially differentiated by Sx), Equation 8 is obtained, and when Equation 7 is calculated (ie, Equation 7 is partially differentiated by Sy), Equation 9 is obtained.

Figure 2017179510
Figure 2017179510

式8及び式9から、Sxは式10となり、Syは式11となる。   From Expression 8 and Expression 9, Sx becomes Expression 10, and Sy becomes Expression 11.

Figure 2017179510
Figure 2017179510

第1実施形態〜第4実施形態では、式3を用いて、カメラのブレに起因する信号変化Nsを算出している。これは、カメラのブレがx軸方向及びy軸方向に発生した場合のNsである。カメラのブレが回転ブレ等の場合のNsについて説明する。   In the first to fourth embodiments, the signal change Ns caused by camera shake is calculated using Equation 3. This is Ns when camera shake occurs in the x-axis direction and the y-axis direction. Ns when the camera shake is rotational shake or the like will be described.

カメラのブレが回転ブレの場合、カメラのブレに起因する信号変化Nsは、式1及び式2の場合と同様に考えると、以下の式12で表されると推測できる。   When the camera shake is a rotational shake, the signal change Ns caused by the camera shake can be assumed to be expressed by the following Expression 12 when considered in the same manner as Expressions 1 and 2.

Ns=∂G/∂t=Sω・∂G/∂ω=Sω(y・∂G/∂x+x・∂G/∂y)・・・(式12)     Ns = ∂G / ∂t = Sω · ∂G / ∂ω = Sω (y · ∂G / ∂x + x · ∂G / ∂y) (Equation 12)

Sωは、カメラのブレが回転ブレの場合に生じるフレームの回転ブレを示す値である。このような値として、例えば、回転軸方向のフレームのブレ量がある。∂G/∂ωは、画素値Gの回転方向の変化を示す値を示す。式4から、∂G/∂x及び∂G/∂yが求まれば、∂G/∂ωを求めることなく、Nsが求まる。   Sω is a value indicating the rotational shake of the frame that occurs when the camera shake is a rotational shake. As such a value, for example, there is a blurring amount of the frame in the rotation axis direction. ∂G / ∂ω represents a value indicating a change in the rotation direction of the pixel value G. If 4G / ∂x and ∂G / ∂y are obtained from Equation 4, Ns can be obtained without obtaining ∂G / ∂ω.

式12によれば、∂G/∂ω=y・∂G/∂x+x・∂G/∂yである。これが成立することを説明する。図21は、これらを説明する説明図である。カメラが原点を中心として、角度Δωの回転をしたとき、座標(x1,y1)に位置する画素のx座標値の変化量Δx、及び、y座標値の変化量Δyは、以下の通りである。   According to Equation 12, ∂G / ∂ω = y · ∂G / ∂x + x · ∂G / ∂y. Explain that this is true. FIG. 21 is an explanatory diagram for explaining these. When the camera rotates around the origin by an angle Δω, the change amount Δx of the x coordinate value and the change amount Δy of the y coordinate value of the pixel located at the coordinates (x1, y1) are as follows. .

Δx≒y1・Δω
Δy≒x1・Δω
Δx ≒ y1 ・ Δω
Δy ≒ x1 ・ Δω

上記回転による座標(x1,y1)に位置する画素の画素値Gの変化量ΔGは、以下の通りである。   The change amount ΔG of the pixel value G of the pixel located at the coordinates (x1, y1) due to the rotation is as follows.

ΔG≒∂G/∂x・Δx+∂G/∂y・Δy
≒∂G/∂x・y1・Δω+∂G/∂y・x1・Δω
ΔG≈∂G / ∂x · Δx + ∂G / ∂y · Δy
≒ ∂G / ∂x ・ y1 ・ Δω + ∂G / ∂y ・ x1 ・ Δω

ΔGをΔωで割った式は、以下の通りである。   The equation obtained by dividing ΔG by Δω is as follows.

ΔG/Δω≒y1・∂G/∂x・+x1・∂G/∂y     ΔG / Δω≈y1 · ∂G / ∂x · + x1 · ∂G / ∂y

この式は、Δωが十分に小さい場合に成立する。従って、∂G/∂ω=y・∂G/∂x+x・∂G/∂yが成立することになる。   This equation holds when Δω is sufficiently small. Therefore, ∂G / ∂ω = y · ∂G / ∂x + x · ∂G / ∂y is established.

拡大縮小ブレ(フォーカス時等でレンズが駆動されるときに生じる像の大きさの変動、又は、被写体までの距離が変化するときに生じる像の大きさの変動)の場合、カメラのブレに起因する信号変化Nsは、式1及び式2の場合と同様に考えると、以下の式13で表されると推測できる。   In the case of enlargement / reduction blur (fluctuation in the size of the image that occurs when the lens is driven during focusing, or fluctuation in the size of the image that occurs when the distance to the subject changes), it is caused by camera shake. It can be estimated that the signal change Ns to be expressed is expressed by the following Expression 13 when considered in the same manner as Expressions 1 and 2.

Ns=∂G/∂t=Sm・∂G/∂m=Sm(x・∂G/∂x+y・∂G/∂y)・・・(式13)     Ns = ∂G / ∂t = Sm · ∂G / ∂m = Sm (x · ∂G / ∂x + y · ∂G / ∂y) (Formula 13)

Smは、拡大縮小ブレの場合に生じるフレームの拡大縮小ブレを示す値である。∂G/∂mは、拡大縮小ブレによる画素値Gの変化を示す値を示す。式13から、∂G/∂x、及び、∂G/∂yが求まれば、∂G/∂mを求めることなく、Nsが求まる。   Sm is a value indicating the enlargement / reduction blur of the frame that occurs in the case of enlargement / reduction blur. ∂G / ∂m indicates a value indicating a change in the pixel value G due to enlargement / reduction blur. From Equation 13, if ∂G / ∂x and ∂G / ∂y are obtained, Ns can be obtained without obtaining ∂G / ∂m.

式13によれば、∂G/∂m=x・∂G/∂x+y・∂G/∂yである。これが成立することを説明する。図22は、これらを説明する説明図である。カメラのズームが原点を中心として、(1+Δm)の拡大をしたとき、座標(x1,y1)に位置する画素のx座標値の変化量Δx、及び、y座標値の変化量Δyは、以下の通りである。   According to Equation 13, ∂G / ∂m = x · ∂G / ∂x + y · ∂G / ∂y. Explain that this is true. FIG. 22 is an explanatory diagram for explaining these. When the zoom of the camera is enlarged by (1 + Δm) with the origin as the center, the change amount Δx of the x coordinate value and the change amount Δy of the y coordinate value of the pixel located at the coordinates (x1, y1) are as follows: Street.

Δx=x1・Δm
Δy=y1・Δm
Δx = x1 · Δm
Δy = y1 ・ Δm

上記拡大による座標(x1,y1)に位置する画素の画素値Gの変化量ΔGは、以下の通りである。   The change amount ΔG of the pixel value G of the pixel located at the coordinates (x1, y1) due to the enlargement is as follows.

ΔG≒∂G/∂x・Δx+∂G/∂y・Δy
≒∂G/∂x・x1・Δm+∂G/∂y・y1・Δm
ΔG≈∂G / ∂x · Δx + ∂G / ∂y · Δy
≒ ∂G / ∂x ・ x1 ・ Δm + ∂G / ∂y ・ y1 ・ Δm

ΔGをΔmで割った式は、以下の通りである。   The formula obtained by dividing ΔG by Δm is as follows.

ΔG/Δm≒x1・∂G/∂x・+y1・∂G/∂y     ΔG / Δm≈x1 · ∂G / ∂x · + y1 · ∂G / ∂y

この式は、Δmが十分に小さい場合に成立する。従って、∂G/∂m=x・∂G/∂x+y・∂G/∂yが成立することになる。   This equation holds when Δm is sufficiently small. Therefore, ∂G / ∂m = x · ∂G / ∂x + y · ∂G / ∂y is established.

図3Aを参照して、第1実施形態〜第4実施形態では、説明を簡単にするために、二次元イメージセンサー6が受光した光量に対して、二次元イメージセンサー6の出力がリニアであることを前提として説明した。リニアでない場合、以下の2つの方法のいずれかで対処することができる。一つ目の対処方法は、信号処理部7が、二次元イメージセンサー6の出力をリニアに補正した後、動画データD1を生成する。二つ目の対処方法は、第2の算出部92が、統計処理として回帰曲面を算出し、この回帰曲面を用いて、Sx及びSyを算出する。   With reference to FIG. 3A, in the first to fourth embodiments, the output of the two-dimensional image sensor 6 is linear with respect to the amount of light received by the two-dimensional image sensor 6 in order to simplify the description. It explained on the assumption. If it is not linear, it can be dealt with in one of the following two ways. In the first coping method, the signal processing unit 7 linearly corrects the output of the two-dimensional image sensor 6, and then generates moving image data D1. In the second coping method, the second calculation unit 92 calculates a regression surface as statistical processing, and uses this regression surface to calculate Sx and Sy.

図3Aを参照して、第1実施形態〜第4実施形態では、画像処理部9が、動画に対して所定の画像処理をし、表示制御部10が、その画像処理がされた動画をディスプレイ11に表示させている。本発明は、この構成に限定されず、画像処理部9を備えるが、表示制御部10及びディスプレイ11を備えない構成でもよいし、画像処理部9及び表示制御部10を備えるが、ディスプレイ11を備えない構成でもよい。   With reference to FIG. 3A, in the first to fourth embodiments, the image processing unit 9 performs predetermined image processing on the moving image, and the display control unit 10 displays the moving image that has been subjected to the image processing. 11 is displayed. The present invention is not limited to this configuration, and includes the image processing unit 9, but may be configured not to include the display control unit 10 and the display 11, or includes the image processing unit 9 and the display control unit 10. The structure which is not provided may be sufficient.

第1実施形態〜第4実施形態では、カメラとして赤外線カメラ2を例に説明したが、本発明は、可視光カメラについても適用することができる。   In the first to fourth embodiments, the infrared camera 2 has been described as an example of the camera, but the present invention can also be applied to a visible light camera.

(実施形態の纏め)
上記目的を達成する本実施形態の第1の局面に係る画像処理装置は、カメラによって撮影された時系列に並ぶ複数の画像に対して画像処理をする装置であって、前記画像を構成する複数の画素のそれぞれについて、前記画素の画素データの空間変化を示す値、及び、前記画素の画素データの時間変化を示す値を算出することを第1の算出とし、複数の前記画像のそれぞれに対して、前記第1の算出をする第1の算出部と、前記画像を構成する複数の前記画素のそれぞれについて算出された前記空間変化を示す値、及び、前記時間変化を示す値を統計処理して、前記カメラのブレにより生じる前記画像のブレを示す値を算出することを第2の算出とし、複数の前記画像のそれぞれに対して、前記第2の算出をする第2の算出部と、を備える。別の表現を用いると、本実施形態の第1の局面に係る画像処理装置は、カメラによって撮影された時系列に並ぶ複数の画像に対して画像処理をする装置であって、前記複数の画像について、画素データの空間変化を示す値、及び、前記画素データの時間変化を示す値を算出する第1の算出部と、前記第1の算出部によって算出された前記空間変化を示す値、及び、前記時間変化を示す値を統計処理して、前記カメラのブレにより生じる前記複数の画像のそれぞれのブレを示す値を算出する第2の算出部と、を備える。
(Summary of embodiment)
An image processing apparatus according to a first aspect of the present embodiment that achieves the above object is an apparatus that performs image processing on a plurality of images arranged in a time series photographed by a camera, and the plurality of images that constitute the image For each of the pixels, a first calculation is to calculate a value indicating a spatial change in the pixel data of the pixel and a value indicating a temporal change in the pixel data of the pixel. Statistical processing of the first calculation unit for performing the first calculation, the value indicating the spatial change and the value indicating the time change calculated for each of the plurality of pixels constituting the image. Calculating a value indicating blurring of the image caused by blurring of the camera as a second calculation, and a second calculation unit that performs the second calculation for each of the plurality of images, Is provided. In other words, the image processing apparatus according to the first aspect of the present embodiment is an apparatus that performs image processing on a plurality of images arranged in a time series photographed by a camera, and the plurality of images A value indicating the spatial change of the pixel data, a first calculation unit for calculating a value indicating the temporal change of the pixel data, a value indicating the spatial change calculated by the first calculation unit, and A second calculation unit that statistically processes a value indicating the temporal change and calculates a value indicating each blur of the plurality of images caused by the camera blur.

カメラのブレが発生すれば、画素データの空間方向の変化と画素データの時間方向の変化とが発生する。カメラのブレ量が1画素以内であれば、画素データの変化量とブレ量とは、正比例すると考えられる。本発明者は、これらを前提にして、カメラによって撮影された時系列に並ぶ複数の画像について、画像を構成する複数の画素のそれぞれの空間変化を示す値、及び、時間変化を示す値に対して、所定の統計処理をすれば、カメラのブレにより生じる画像のブレを示す値が求まることを見出した。そこで、本実施形態の第1の局面に係る画像処理装置において、第1の算出部は、画像を構成する複数の画素のそれぞれについて、画素の画素データの空間変化を示す値、及び、画素の画素データの時間変化を示す値を算出し、第2の算出部は、画像を構成する複数の画素のそれぞれについて、第1の算出部によって算出された空間変化を示す値、及び、時間変化を示す値に対して、所定の統計処理をする。従って、本実施形態の第1の局面に係る画像処理装置によれば、カメラのブレにより生じる画像のブレを示す値を求めることができる。上記別の表現の場合についても、同様のことが言える。   If camera shake occurs, a change in the spatial direction of the pixel data and a change in the temporal direction of the pixel data occur. If the camera shake amount is within one pixel, the change amount of pixel data and the shake amount are considered to be directly proportional. Based on these assumptions, the present inventor, for a plurality of images arranged in a time series taken by a camera, for a value indicating a spatial change of each of a plurality of pixels constituting the image and a value indicating a temporal change. Thus, it has been found that if a predetermined statistical process is performed, a value indicating image blur caused by camera blur can be obtained. Therefore, in the image processing device according to the first aspect of the present embodiment, the first calculation unit includes, for each of a plurality of pixels constituting the image, a value indicating a spatial change in pixel data of the pixel, The second calculation unit calculates a value indicating the temporal change of the pixel data, and the second calculation unit calculates a value indicating the spatial change calculated by the first calculation unit and a temporal change for each of the plurality of pixels constituting the image. Predetermined statistical processing is performed on the indicated value. Therefore, according to the image processing apparatus according to the first aspect of the present embodiment, a value indicating image blur caused by camera blur can be obtained. The same can be said for the other expressions.

画素データとは、画素が有する数値情報であり、例えば、画素の画素値(輝度値)である。赤外画像の場合、画素値、又は、画素値を用いて算出された温度を意味する。   Pixel data is numerical information possessed by a pixel, for example, a pixel value (luminance value) of the pixel. In the case of an infrared image, it means a pixel value or a temperature calculated using the pixel value.

空間変化を示す値として、画素の画素データに対して空間変化の方向の方向微分をした値がある。   As a value indicating the spatial change, there is a value obtained by differentiating the pixel data of the pixel in the direction of the spatial change.

時間変化を示す値として、画素の画素データに対して時間変化の方向の方向微分をした値がある。また、時間変化を示す値として、複数の画素のそれぞれの画素データに含まれる交流成分がある。   As a value indicating time change, there is a value obtained by directional differentiation of the pixel data of the pixel in the direction of time change. Moreover, there exists an alternating current component contained in each pixel data of a some pixel as a value which shows a time change.

上記構成において、前記統計処理は、前記空間変化の方向を示す軸と前記時間変化の方向を示す軸とで構成される座標系において、前記画像を構成する複数の画素のそれぞれについて、前記空間変化を示す値と前記時間変化を示す値とにより座標を構成する処理と、前記座標系での前記座標の分布を近似する回帰式を求める処理と、含む。   In the above-described configuration, the statistical processing is performed for each of a plurality of pixels constituting the image in a coordinate system including an axis indicating the direction of spatial change and an axis indicating the direction of temporal change. And a process of constructing coordinates with a value indicating the time change and a process of obtaining a regression equation approximating the distribution of the coordinates in the coordinate system.

この構成は、統計処理の一例である。回帰式で示される図形は、回帰直線、回帰曲線、回帰平面や回帰曲面がある。   This configuration is an example of statistical processing. The figure shown by the regression equation includes a regression line, a regression curve, a regression plane, and a regression surface.

上記構成において、前記第2の算出部は、前記回帰式で示される図形が回帰平面の場合、前記空間変化の方向を示す軸を、第1の変化方向を示す軸、及び、前記第1の変化方向と直交する第2の変化方向を示す軸とし、前記第1の変化方向を示す軸と前記時間変化の方向を示す軸とで規定される平面と、前記回帰平面との交線を第1の交線とし、前記第2の変化方向を示す軸と前記時間変化の方向を示す軸とで規定される平面と、前記回帰平面との交線を第2の交線とし、前記第1の変化方向を示す軸に対する前記第1の交線の傾きを、前記第1の変化方向に沿った前記画像のブレを示す値とし、前記第2の変化方向を示す軸に対する前記第2の交線の傾きを、前記第2の変化方向に沿った前記画像のブレを示す値とする。別の表現を用いると、前記第2の算出部は、前記回帰式で示される図形が回帰平面の場合、前記空間変化の方向を示す軸と前記時間変化の方向を示す軸とで規定される平面と、前記回帰平面との交線の、前記空間変化の方向を示す軸に対する傾きを算出する。   In the above configuration, when the graphic represented by the regression equation is a regression plane, the second calculation unit includes an axis indicating the direction of the spatial change, an axis indicating the first change direction, and the first An axis indicating a second change direction orthogonal to the change direction, a plane defined by the axis indicating the first change direction and the axis indicating the time change direction, and an intersection line of the regression plane The intersection line of the regression plane and the plane defined by the axis indicating the second change direction and the axis indicating the direction of time change, and the first intersection line. The inclination of the first intersection line with respect to the axis indicating the change direction of the image is a value indicating blurring of the image along the first change direction, and the second intersection with respect to the axis indicating the second change direction. The inclination of the line is a value indicating the blurring of the image along the second change direction. When another expression is used, the second calculation unit is defined by an axis indicating the direction of the spatial change and an axis indicating the direction of the time change when the graphic represented by the regression equation is a regression plane. An inclination of an intersection line between the plane and the regression plane with respect to an axis indicating the direction of the spatial change is calculated.

回帰式で示される図形が回帰平面の場合、カメラのブレにより生じる画像のブレを示す値は、第1の変化方向に沿った画像のブレを示す値と、第2の変化方向に沿った画像のブレを示す値とに分けられる。第1の変化方向に沿った画像のブレを示す値は、第1の変化方向を示す軸に対する第1の交線の傾きである。第2の変化方向に沿った画像のブレを示す値は、第2の変化方向を示す軸に対する第2の交線の傾きである。上記別の表現の場合についても、同様のことが言える。   When the graphic represented by the regression equation is a regression plane, the value indicating the image blur caused by camera blur is the value indicating the image blur along the first change direction and the image along the second change direction. It is divided into the value indicating the blur of the. The value indicating the blurring of the image along the first change direction is the slope of the first intersection line with respect to the axis indicating the first change direction. The value indicating the blur of the image along the second change direction is the inclination of the second intersection line with respect to the axis indicating the second change direction. The same can be said for the other expressions.

上記構成において、前記画像を構成する複数の前記画素のそれぞれについて、前記空間変化を示す値、及び、前記画像のブレを示す値を用いて、前記カメラのブレに起因する信号変化を算出することを第3の算出とし、複数の前記画像のそれぞれに対して、前記第3の算出をする第3の算出部をさらに備える。別の表現を用いると、前記第3の算出部は、前記複数の画像の各画素について、前記空間変化を示す値、及び、前記画像のブレを示す値を用いて、前記カメラのブレに起因する信号変化を算出する。   In the above configuration, for each of the plurality of pixels constituting the image, a signal change caused by camera shake is calculated using a value indicating the spatial change and a value indicating the blur of the image. Is a third calculation, and further includes a third calculation unit that performs the third calculation for each of the plurality of images. When another expression is used, the third calculation unit uses a value indicating the spatial change and a value indicating the blur of the image for each pixel of the plurality of images, and causes the blur of the camera. The signal change to calculate is calculated.

この構成によれば、カメラのブレに起因する信号変化、すなわち、カメラのブレによるノイズを算出することができる。上記別の表現の場合についても、同様のことが言える。   According to this configuration, it is possible to calculate a signal change caused by camera shake, that is, noise due to camera shake. The same can be said for the other expressions.

上記構成において、前記信号変化を用いて前記画像を補正することを第1の補正とし、複数の前記画像のそれぞれに対して、前記第1の補正をする補正部をさらに備える。別の表現を用いると、前記補正部は、前記第3の算出部により算出された信号変化を用いて前記複数の画像を補正する。   The above configuration further includes a correction unit that corrects the image using the signal change as a first correction, and performs the first correction on each of the plurality of images. When another expression is used, the correction unit corrects the plurality of images using the signal change calculated by the third calculation unit.

この構成によれば、時系列に並ぶ複数の画像(例えば、ガス漏れの監視対象の画像)に対して、カメラのブレを補正することができる。上記別の表現の場合についても、同様のことが言える。   According to this configuration, camera shake can be corrected for a plurality of images arranged in time series (for example, images to be monitored for gas leakage). The same can be said for the other expressions.

上記構成において、前記画像に含まれる予め定められた被写体を抽出することを被写体抽出とし、複数の前記画像のそれぞれに対して、前記被写体抽出をする抽出部と、前記信号変化を用いて前記被写体を補正することを第2の補正とし、複数の前記画像のそれぞれから抽出された前記被写体に対して、前記第2の補正をする補正部と、をさらに備える。別の表現を用いると、抽出部は、前記複数の画像のそれぞれから、予め定められた被写体を抽出する。補正部は、前記抽出部により抽出された被写体を、前記第3の算出部により算出された信号変化を用いて補正する。   In the above configuration, extracting a predetermined subject included in the image is subject extraction, and for each of the plurality of images, an extraction unit that extracts the subject, and the subject using the signal change A correction unit that performs the second correction on the subject extracted from each of the plurality of images. When another expression is used, the extraction unit extracts a predetermined subject from each of the plurality of images. The correction unit corrects the subject extracted by the extraction unit using the signal change calculated by the third calculation unit.

この構成によれば、時系列に並ぶ複数の画像に含まれる被写体(例えば、ガス像)を抽出し、その被写体に対して、カメラのブレを補正することができる。上記別の表現の場合についても、同様のことが言える。   According to this configuration, a subject (for example, a gas image) included in a plurality of images arranged in time series can be extracted, and camera shake can be corrected for the subject. The same can be said for the other expressions.

上記構成において、前記第2の算出部は、前記画像を二以上の領域に分割し、二以上の前記領域のそれぞれについて、前記第2の算出(前記統計処理)をすることにより、前記カメラのブレにより生じる二以上の前記領域のそれぞれのブレを示す値を算出し、前記第2の算出部は、二以上の前記領域のそれぞれの前記ブレを示す値を用いて、前記画像に含まれる移動体の像を示す前記領域を特定し、前記第2の算出部は、前記移動体の像を示す前記領域を除く前記領域の前記ブレを示す値を用いて、前記カメラのブレにより生じる前記画像のブレを示す値を算出する。   In the above-described configuration, the second calculation unit divides the image into two or more regions, and performs the second calculation (the statistical processing) for each of the two or more regions, so that the camera A value indicating each blur of two or more of the regions caused by blur is calculated, and the second calculation unit uses a value indicating the blur of each of the two or more regions to move included in the image. The region indicating the image of the body is specified, and the second calculation unit uses the value indicating the blur of the region excluding the region indicating the image of the moving body to generate the image generated by the camera shake. A value indicating the blur of the image is calculated.

カメラによる画像の撮影中に、カメラのブレの発生に加えて、被写体(例えば、自動車、人、木の枝等)の動きが発生することがある。本実施形態の第1の局面に係る画像処理装置は、画像を構成する複数の画素のそれぞれの空間変化を示す値及び時間変化を示す値を統計処理して、カメラのブレにより生じる画像のブレを示す値を算出する。この場合に、動く被写体の像を示す領域を構成する画素を含めて、カメラのブレにより生じる画像のブレを示す値が算出されれば、この値の精度が低下する。   While taking an image with a camera, in addition to the occurrence of camera shake, movement of a subject (for example, a car, a person, a tree branch, etc.) may occur. An image processing apparatus according to a first aspect of the present embodiment statistically processes a value indicating a spatial change and a value indicating a temporal change of each of a plurality of pixels constituting an image, and blurs an image caused by camera shake. A value indicating is calculated. In this case, if a value indicating blurring of an image caused by camera blur is calculated including pixels that form a region indicating an image of a moving subject, the accuracy of this value decreases.

動く被写体は、時系列に並べられた複数の画像において、移動体の像として表れる。二以上の領域に分割された画像において、移動体の像を示す領域のブレを示す値は、これ以外の領域のブレを示す値と異なる。そこで、この構成は、二以上の領域に分割された画像において、各領域のブレを示す値を用いて、画像に含まれる移動体の像を示す領域を特定し、移動体の像を示す領域を除く領域のブレを示す値を用いて、カメラのブレにより生じる画像のブレを示す値を算出する。   A moving subject appears as an image of a moving body in a plurality of images arranged in time series. In an image divided into two or more regions, a value indicating blurring of a region indicating an image of a moving object is different from a value indicating blurring of other regions. Therefore, in this configuration, in an image divided into two or more regions, a region indicating an image of a moving object included in the image is specified by using a value indicating blur of each region, and the region indicating an image of the moving object is determined. A value indicating blurring of an image caused by camera blur is calculated using a value indicating blurring of a region excluding.

本実施形態の第2の局面に係る画像処理方法は、カメラによって撮影された時系列に並ぶ複数の画像に対して画像処理をする方法であって、前記画像を構成する複数の画素のそれぞれについて、前記画素の画素データの空間変化を示す値、及び、前記画素の画素データの時間変化を示す値を算出することを第1の算出とし、複数の前記画像のそれぞれに対して、前記第1の算出をする第1のステップと、前記第1のステップによって、前記画像を構成する複数の前記画素のそれぞれについて算出された前記空間変化を示す値、及び、前記時間変化を示す値を統計処理して、前記カメラのブレにより生じる前記画像のブレを示す値を算出することを第2の算出とし、複数の前記画像のそれぞれに対して、前記第2の算出をする第2のステップと、を備える。別の表現を用いると、本実施形態の第2の局面に係る画像処理方法は、カメラによって撮影された時系列に並ぶ複数の画像に対して画像処理をする方法であって、前記複数の画像について、画素データの空間変化を示す値、及び、前記画素データの時間変化を示す値を算出する第1のステップと、前記第1のステップによって算出された前記空間変化を示す値、及び、前記時間変化を示す値を統計処理して、前記カメラのブレにより生じる前記複数の画像のそれぞれのブレを示す値を算出する第2のステップと、を備える。   The image processing method according to the second aspect of the present embodiment is a method for performing image processing on a plurality of images arranged in a time series photographed by a camera, and each of a plurality of pixels constituting the image. , Calculating a value indicating a spatial change of pixel data of the pixel and a value indicating a temporal change of pixel data of the pixel as a first calculation, and for each of the plurality of images, the first Statistical processing of the value indicating the spatial change and the value indicating the temporal change calculated for each of the plurality of pixels constituting the image by the first step of calculating And calculating a value indicating blurring of the image caused by blurring of the camera as a second calculation, and performing the second calculation for each of the plurality of images; Equipped with a. If another expression is used, the image processing method according to the second aspect of the present embodiment is a method of performing image processing on a plurality of images arranged in a time series photographed by a camera, wherein the plurality of images A first step of calculating a value indicating a spatial change of pixel data and a value indicating a temporal change of the pixel data, a value indicating the spatial change calculated by the first step, and And a second step of statistically processing a value indicating a temporal change to calculate a value indicating each blur of the plurality of images caused by the camera blur.

本実施形態の第2の局面に係る画像処理方法は、本実施形態の第1の局面に係る画像処理装置を方法の観点から規定しており、本実施形態の第1の局面に係る画像処理装置と同様の作用効果を有する。上記別の表現の場合についても、同様のことが言える。   The image processing method according to the second aspect of the present embodiment defines the image processing apparatus according to the first aspect of the present embodiment from the viewpoint of the method, and the image processing according to the first aspect of the present embodiment. It has the same effect as the device. The same can be said for the other expressions.

本実施形態の第3の局面に係る画像処理プログラムは、カメラによって撮影された時系列に並ぶ複数の画像に対して画像処理をするプログラムであって、前記画像を構成する複数の画素のそれぞれについて、前記画素の画素データの空間変化を示す値、及び、前記画素の画素データの時間変化を示す値を算出することを第1の算出とし、複数の前記画像のそれぞれに対して、前記第1の算出をする第1のステップと、前記第1のステップによって、前記画像を構成する複数の前記画素のそれぞれについて算出された前記空間変化を示す値、及び、前記時間変化を示す値を統計処理して、前記カメラのブレにより生じる前記画像のブレを示す値を算出することを第2の算出とし、複数の前記画像のそれぞれに対して、前記第2の算出をする第2のステップと、をコンピュータに実行させる。別の表現を用いると、本実施形態の第3の局面に係る画像処理プログラムは、カメラによって撮影された時系列に並ぶ複数の画像に対して画像処理をするプログラムであって、前記複数の画像について、画素データの空間変化を示す値、及び、前記画素データの時間変化を示す値を算出する第1のステップと、前記第1のステップによって算出された前記空間変化を示す値、及び、前記時間変化を示す値を統計処理して、前記カメラのブレにより生じる前記複数の画像のそれぞれのブレを示す値を算出する第2のステップと、をコンピュータに実行させる。   The image processing program according to the third aspect of the present embodiment is a program for performing image processing on a plurality of images arranged in a time series photographed by a camera, and each of a plurality of pixels constituting the image. , Calculating a value indicating a spatial change of pixel data of the pixel and a value indicating a temporal change of pixel data of the pixel as a first calculation, and for each of the plurality of images, the first Statistical processing of the value indicating the spatial change and the value indicating the temporal change calculated for each of the plurality of pixels constituting the image by the first step of calculating The second calculation is to calculate a value indicating blurring of the image caused by the camera blur, and the second calculation is performed for each of the plurality of images. A step, the causes the computer to execute. If another expression is used, the image processing program according to the third aspect of the present embodiment is a program for performing image processing on a plurality of images arranged in time series photographed by a camera, and the plurality of images A first step of calculating a value indicating a spatial change of pixel data and a value indicating a temporal change of the pixel data, a value indicating the spatial change calculated by the first step, and A computer is caused to execute a second step of statistically processing a value indicating a temporal change and calculating a value indicating each blur of the plurality of images caused by the camera blur.

本実施形態の第3の局面に係る画像処理プログラムは、本実施形態の第1の局面に係る画像処理装置をプログラムの観点から規定しており、本実施形態の第1の局面に係る画像処理装置と同様の作用効果を有する。上記別の表現の場合についても、同様のことが言える。   The image processing program according to the third aspect of the present embodiment defines the image processing apparatus according to the first aspect of the present embodiment from the viewpoint of the program, and the image processing according to the first aspect of the present embodiment. It has the same effect as the device. The same can be said for the other expressions.

本実施形態の第4の局面に係るガス検知システムは、監視対象の動画を撮影し、複数の画像が時系列に並べられた動画データを出力する赤外線カメラと、前記赤外線カメラから入力された前記複数の画像について、画素データの空間変化を示す値、及び、前記画素データの時間変化を示す値を算出し、前記空間変化を示す値、及び、前記時間変化を示す値を統計処理して、前記赤外線カメラのブレにより生じる前記複数の画像のそれぞれのブレを示す値を算出し、前記複数の画像のそれぞれのブレを示す値に基づいて前記複数の画像のそれぞれを補正する画像処理部と、前記画像処理部によって補正された前記複数の画像が時系列に並べられた動画を表示するディスプレイと、を備える。   The gas detection system according to the fourth aspect of the present embodiment captures a moving image to be monitored and outputs moving image data in which a plurality of images are arranged in a time series, and the input from the infrared camera. For a plurality of images, calculate a value indicating a spatial change in pixel data and a value indicating a temporal change in the pixel data, and statistically process the value indicating the spatial change and the value indicating the temporal change, An image processing unit that calculates a value indicating each blur of the plurality of images caused by the blur of the infrared camera, and corrects each of the plurality of images based on a value indicating each blur of the plurality of images; A display for displaying a moving image in which the plurality of images corrected by the image processing unit are arranged in time series.

本実施形態の第4の局面に係るガス検知システムは、本実施形態の第1の局面に係る画像処理装置をガス検知システムの観点から規定しており、本実施形態の第1の局面に係る画像処理装置と同様の作用効果を有する。   The gas detection system according to the fourth aspect of the present embodiment defines the image processing apparatus according to the first aspect of the present embodiment from the viewpoint of the gas detection system, and relates to the first aspect of the present embodiment. It has the same effect as the image processing apparatus.

この出願は、2016年4月11日に出願された日本国特許出願特願2016−078578を基礎とするものであり、その内容は、本願に含まれるものである。   This application is based on Japanese Patent Application No. 2006-078578 filed on Apr. 11, 2016, the contents of which are included in the present application.

本発明を表現するために、上述において図面を参照しながら実施形態を通して本発明を適切且つ十分に説明したが、当業者であれば上述の実施形態を変更および/または改良することは容易に為し得ることであると認識すべきである。したがって、当業者が実施する変更形態または改良形態が、請求の範囲に記載された請求項の権利範囲を離脱するレベルのものでない限り、当該変更形態または当該改良形態は、当該請求項の権利範囲に包括されると解釈される。   In order to express the present invention, the present invention has been properly and fully described through the embodiments with reference to the drawings. However, those skilled in the art can easily change and / or improve the above-described embodiments. It should be recognized that this is possible. Therefore, unless the modifications or improvements implemented by those skilled in the art are at a level that departs from the scope of the claims recited in the claims, the modifications or improvements are not covered by the claims. To be construed as inclusive.

本発明によれば、画像処理装置、画像処理方法、画像処理プログラム、及び、ガス検知システムを提供することができる。   According to the present invention, it is possible to provide an image processing apparatus, an image processing method, an image processing program, and a gas detection system.

Claims (13)

カメラによって撮影された時系列に並ぶ複数の画像に対して画像処理をする装置であって、
前記複数の画像について、画素データの空間変化を示す値、及び、前記画素データの時間変化を示す値を算出する第1の算出部と、
前記第1の算出部によって算出された前記空間変化を示す値、及び、前記時間変化を示す値を統計処理して、前記カメラのブレにより生じる前記複数の画像のそれぞれのブレを示す値を算出する第2の算出部と、を備える画像処理装置。
An apparatus for performing image processing on a plurality of images arranged in time series photographed by a camera,
A first calculation unit that calculates a value indicating a spatial change in pixel data and a value indicating a temporal change in the pixel data for the plurality of images;
The value indicating the spatial change calculated by the first calculation unit and the value indicating the temporal change are statistically processed to calculate a value indicating each blur of the plurality of images caused by the camera shake. An image processing apparatus.
前記統計処理は、前記空間変化の方向を示す軸と前記時間変化の方向を示す軸とで構成される座標系において、前記画像を構成する複数の画素のそれぞれについて、前記空間変化を示す値と前記時間変化を示す値とにより座標を構成する処理と、前記座標系での前記座標の分布を近似する回帰式を求める処理と、含む請求項1に記載の画像処理装置。   The statistical processing includes a value indicating the spatial change for each of a plurality of pixels constituting the image in a coordinate system including an axis indicating the direction of spatial change and an axis indicating the direction of temporal change. The image processing apparatus according to claim 1, further comprising: processing for forming coordinates with values indicating the time change; and processing for obtaining a regression equation that approximates the distribution of the coordinates in the coordinate system. 前記第2の算出部は、前記回帰式で示される図形が回帰平面の場合、前記空間変化の方向を示す軸と前記時間変化の方向を示す軸とで規定される平面と、前記回帰平面との交線の、前記空間変化の方向を示す軸に対する傾きを算出する請求項2に記載の画像処理装置。   When the graphic represented by the regression equation is a regression plane, the second calculation unit includes a plane defined by an axis indicating the direction of the spatial change and an axis indicating the direction of the time change, and the regression plane The image processing apparatus according to claim 2, wherein an inclination of a line of intersection with respect to an axis indicating a direction of the spatial change is calculated. 前記複数の画像の各画素について、前記空間変化を示す値、及び、前記画像のブレを示す値を用いて、前記カメラのブレに起因する信号変化を算出する第3の算出部をさらに備える請求項1〜3のいずれか一項に記載の画像処理装置。   The image processing apparatus further includes a third calculation unit configured to calculate a signal change due to camera shake using a value indicating the spatial change and a value indicating the blur of the image for each pixel of the plurality of images. Item 4. The image processing device according to any one of Items 1 to 3. 前記第3の算出部により算出された信号変化を用いて前記複数の画像を補正する補正部をさらに備える請求項4に記載の画像処理装置。   The image processing apparatus according to claim 4, further comprising: a correction unit that corrects the plurality of images using the signal change calculated by the third calculation unit. 前記複数の画像のそれぞれから、予め定められた被写体を抽出する抽出部と、
前記抽出部により抽出された被写体を、前記第3の算出部により算出された信号変化を用いて補正する補正部と、をさらに備える請求項4に記載の画像処理装置。
An extraction unit for extracting a predetermined subject from each of the plurality of images;
The image processing apparatus according to claim 4, further comprising: a correction unit that corrects the subject extracted by the extraction unit using the signal change calculated by the third calculation unit.
前記第2の算出部は、前記画像を二以上の領域に分割し、二以上の前記領域のそれぞれについて、前記統計処理をすることにより、前記カメラのブレにより生じる二以上の前記領域のそれぞれのブレを示す値を算出し、
前記第2の算出部は、二以上の前記領域のそれぞれの前記ブレを示す値を用いて、前記画像に含まれる移動体の像を示す前記領域を特定し、
前記第2の算出部は、前記移動体の像を示す前記領域を除く前記領域の前記ブレを示す値を用いて、前記カメラのブレにより生じる前記画像のブレを示す値を算出する請求項1〜6のいずれか一項に記載の画像処理装置。
The second calculation unit divides the image into two or more regions, and performs the statistical processing for each of the two or more regions, thereby each of the two or more regions generated by camera shake. Calculate the value indicating blur,
The second calculation unit specifies the region indicating the image of the moving body included in the image using a value indicating the blur of each of the two or more regions,
The second calculation unit calculates a value indicating blurring of the image caused by blurring of the camera using a value indicating the blurring of the area excluding the area indicating the image of the moving body. The image processing apparatus as described in any one of -6.
前記空間変化を示す値は、前記画素データに対して前記空間変化の方向の方向微分をした値である請求項1〜7のいずれか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the value indicating the spatial change is a value obtained by performing a directional differentiation in the direction of the spatial change with respect to the pixel data. 前記時間変化を示す値は、前記画素データに対して前記時間変化の方向の方向微分をした値である請求項1〜8のいずれか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the value indicating the time change is a value obtained by directional differentiation of the pixel data in the direction of the time change. 前記時間変化を示す値とは、前記画素データに含まれる交流成分である請求項1〜8のいずれか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the value indicating the time change is an AC component included in the pixel data. カメラによって撮影された時系列に並ぶ複数の画像に対して画像処理をする方法であって、
前記複数の画像について、画素データの空間変化を示す値、及び、前記画素データの時間変化を示す値を算出する第1のステップと、
前記第1のステップによって算出された前記空間変化を示す値、及び、前記時間変化を示す値を統計処理して、前記カメラのブレにより生じる前記複数の画像のそれぞれのブレを示す値を算出する第2のステップと、を備える画像処理方法。
A method of performing image processing on a plurality of images arranged in time series photographed by a camera,
A first step of calculating a value indicating a spatial change of pixel data and a value indicating a temporal change of the pixel data for the plurality of images;
The value indicating the spatial change calculated by the first step and the value indicating the temporal change are statistically processed to calculate a value indicating each blur of the plurality of images caused by the camera shake. And a second step.
カメラによって撮影された時系列に並ぶ複数の画像に対して画像処理をするプログラムであって、
前記複数の画像について、画素データの空間変化を示す値、及び、前記画素データの時間変化を示す値を算出する第1のステップと、
前記第1のステップによって算出された前記空間変化を示す値、及び、前記時間変化を示す値を統計処理して、前記カメラのブレにより生じる前記複数の画像のそれぞれのブレを示す値を算出する第2のステップと、をコンピュータに実行させる画像処理プログラム。
A program for performing image processing on a plurality of images arranged in time series photographed by a camera,
A first step of calculating a value indicating a spatial change of pixel data and a value indicating a temporal change of the pixel data for the plurality of images;
The value indicating the spatial change calculated by the first step and the value indicating the temporal change are statistically processed to calculate a value indicating each blur of the plurality of images caused by the camera shake. An image processing program for causing a computer to execute the second step.
監視対象の動画を撮影し、複数の画像が時系列に並べられた動画データを出力する赤外線カメラと、
前記赤外線カメラから入力された前記複数の画像について、画素データの空間変化を示す値、及び、前記画素データの時間変化を示す値を算出し、
前記空間変化を示す値、及び、前記時間変化を示す値を統計処理して、前記赤外線カメラのブレにより生じる前記複数の画像のそれぞれのブレを示す値を算出し、
前記複数の画像のそれぞれのブレを示す値に基づいて前記複数の画像のそれぞれを補正する画像処理部と、
前記画像処理部によって補正された前記複数の画像が時系列に並べられた動画を表示するディスプレイと、を備えるガス検知システム。
An infrared camera that shoots a video to be monitored and outputs video data in which multiple images are arranged in time series;
For the plurality of images input from the infrared camera, a value indicating a spatial change of pixel data and a value indicating a temporal change of the pixel data are calculated,
Statistically processing the value indicating the spatial change and the value indicating the time change, and calculating a value indicating each blur of the plurality of images caused by the blur of the infrared camera,
An image processing unit that corrects each of the plurality of images based on a value indicating blur of each of the plurality of images;
A gas detection system comprising: a display that displays a moving image in which the plurality of images corrected by the image processing unit are arranged in time series.
JP2018511991A 2016-04-11 2017-04-07 Image processing device, image processing method, image processing program, and gas detection system Active JP6838605B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2016078578 2016-04-11
JP2016078578 2016-04-11
PCT/JP2017/014548 WO2017179510A1 (en) 2016-04-11 2017-04-07 Image processing device, image processing method, image processing program, and gas detection system

Publications (2)

Publication Number Publication Date
JPWO2017179510A1 true JPWO2017179510A1 (en) 2019-02-14
JP6838605B2 JP6838605B2 (en) 2021-03-03

Family

ID=60042484

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018511991A Active JP6838605B2 (en) 2016-04-11 2017-04-07 Image processing device, image processing method, image processing program, and gas detection system

Country Status (2)

Country Link
JP (1) JP6838605B2 (en)
WO (1) WO2017179510A1 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4985569B2 (en) * 2008-07-08 2012-07-25 株式会社Jvcケンウッド Imaging apparatus and imaging method
JP5304292B2 (en) * 2009-02-06 2013-10-02 日産自動車株式会社 Vehicle approaching object detection device

Also Published As

Publication number Publication date
WO2017179510A1 (en) 2017-10-19
JP6838605B2 (en) 2021-03-03

Similar Documents

Publication Publication Date Title
JP6620878B2 (en) Gas leak position estimation device, gas leak position estimation method, and gas leak position estimation program
EP3271867B1 (en) Local change detection in video
EP2677500B1 (en) Event-based image processing apparatus and method
TW201324435A (en) Information processing device, information processing method, and program
JP6493624B2 (en) Gas detection image processing apparatus, gas detection image processing method, and gas detection image processing program
JP6121302B2 (en) Attitude parameter estimation device, attitude parameter estimation system, attitude parameter estimation method, and program
JP5449980B2 (en) Motion compensation apparatus and method
JP2010124028A (en) Monitoring apparatus
WO2018123197A1 (en) Gas detection-use image processing device, gas detection-use image processing method, and gas detection-use image processing program
JP6030457B2 (en) Image detection apparatus, control program, and image detection method
US9842260B2 (en) Image processing apparatus and image processing method of performing image segmentation
WO2017179510A1 (en) Image processing device, image processing method, image processing program, and gas detection system
US10839553B2 (en) Image processing apparatus and method
JP5441737B2 (en) Image processing apparatus, image processing method, and image processing program
JP6432139B2 (en) Image processing device
WO2016142965A1 (en) Video processing device, video processing method, and storage medium storing video processing program
CN110692235B (en) Image processing apparatus, image processing program, and image processing method
CN104021575A (en) Moving object detection method, device and system
JP5416421B2 (en) Surveillance video retrieval device, surveillance video retrieval program, and surveillance video retrieval method
JP2014137629A (en) Image detection device, control program and image detection method
JP2018180964A (en) Image processing apparatus and image processing method
GB2560877A (en) Improvements in or relating to currency conversion
JP5602649B2 (en) Image search system
JP2023026293A (en) Information processor, information processing system, information processing method, and program
JP6274778B2 (en) Image processing method, image processing apparatus, and computer program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200326

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200818

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200924

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20201124

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20201228

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: 20210112

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210125

R150 Certificate of patent or registration of utility model

Ref document number: 6838605

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150