JP2010130549A - Contamination detection device and method of detecting contamination of photographic device - Google Patents

Contamination detection device and method of detecting contamination of photographic device Download PDF

Info

Publication number
JP2010130549A
JP2010130549A JP2008305245A JP2008305245A JP2010130549A JP 2010130549 A JP2010130549 A JP 2010130549A JP 2008305245 A JP2008305245 A JP 2008305245A JP 2008305245 A JP2008305245 A JP 2008305245A JP 2010130549 A JP2010130549 A JP 2010130549A
Authority
JP
Japan
Prior art keywords
image
evaluation value
pixel
distance
dirt
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
JP2008305245A
Other languages
Japanese (ja)
Other versions
JP5207057B2 (en
Inventor
Noriyuki Mochizuki
規之 望月
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.)
Saxa Inc
Original Assignee
Saxa 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 Saxa Inc filed Critical Saxa Inc
Priority to JP2008305245A priority Critical patent/JP5207057B2/en
Publication of JP2010130549A publication Critical patent/JP2010130549A/en
Application granted granted Critical
Publication of JP5207057B2 publication Critical patent/JP5207057B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/81Camera processing pipelines; Components thereof for suppressing or minimising disturbance in the image signal generation
    • H04N23/811Camera processing pipelines; Components thereof for suppressing or minimising disturbance in the image signal generation by dust removal, e.g. from surfaces of the image sensor or processing of the image signal output by the electronic image sensor

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Closed-Circuit Television Systems (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To readily and positively detect contamination of an optical system of a photographic device using a stereoimage. <P>SOLUTION: A contamination detection apparatus is constituted of cameras 20 (L, R) which photograph a stereoimage of an object, an input unit 30, an image processing device 10 which processes a photographed stereoimage, and a display 40. In the contamination detection apparatus, the image processing device 10 determines parallax from the stereoimage and produces a distance image and an evaluation value image based on the determined parallax. On the other hand, a RAM 16 stores the distance image and the evaluation value image for reference as a distance background image and an evaluation value background image, respectively, and a comparison determining section 144 for detecting contamination compares the distance image and evaluation value image which are produced from the distance background image, the evaluation value background image, and the stereoimage photographed at arbitrary time to detect contamination in the optical system of the photographing means. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、ステレオ画像を利用して撮影装置の汚れ、とくにその光学系の汚れを検知する検知装置及び同検知方法に関する。   The present invention relates to a detection apparatus and a detection method for detecting dirt on an imaging apparatus, particularly dirt on its optical system, using stereo images.

従来から、監視対象領域に向けてカメラを設置し、それにより取得される光学的な画像に基づいて、侵入者の出現等を検出する画像監視装置が知られている。
この画像監視装置のカメラが設置される監視対象領域は様々である。そのため、カメラのレンズ面やカメラの収納ケースに設けられた監視窓の表面が、屋内においては、例えばタバコのヤニ等で汚れることがあり、また屋外においては、例えば風雨で埃や泥などで汚れることがある。このような汚れは、画像をぼやけさせたり霞ませて不鮮明なものとし、その画像に基づく監視の妨げとなり得る。
2. Description of the Related Art Conventionally, there has been known an image monitoring apparatus that installs a camera toward a monitoring target area and detects the appearance of an intruder based on an optical image acquired thereby.
There are various monitoring target areas where the cameras of the image monitoring apparatus are installed. For this reason, the lens surface of the camera and the surface of the monitoring window provided on the camera storage case may be soiled indoors, for example, with cigarette dust, etc., and outdoors, for example, dirt or mud due to wind and rain. Sometimes. Such dirt can blur or blur the image and make it unclear, which can hinder surveillance based on the image.

そこで、従来からこのような汚れをカメラにより取得された画像に基づいて検出することが知られている。
例えば、汚れにより画像が不鮮明になると、画像内の被写体同士の境界等の被写体の外縁を示す部分(いわゆる、エッジ)における画素値の変化の急峻さ(エッジ量と称する)が低下することを利用し、エッジ量が所定値以下になったことに基づいてレンズ面等の汚れを検知する画像監視装置が知られている。
この画像監視装置では、カメラのレンズ面等に汚れが付着すると、画像においてエッジ量が大きな領域の減少が比較的大きく、一方、エッジ量が小さな部分の領域の減少は比較的小さいこと、これに対し、照明が変動した場合などにおいては、通常程度のエッジ量の部分及びそれより大きなエッジ量の部分が同程度に変化するという事実を利用してレンズ面等の汚れを検知し、誤認識を抑制している(特許文献1参照)。
しかしながら、この画像監視装置では、エッジ画像の急峻性を以て判定するため、汚れがある程度ひどくならなければ検知できない。また、元々ぼやけたような輝度の物体が写ると、レンズが汚れたと誤認してしまうという問題がある。
Therefore, it is conventionally known to detect such dirt based on an image acquired by a camera.
For example, when the image becomes unclear due to dirt, the steepness (referred to as edge amount) of the change in pixel value at the portion indicating the outer edge of the subject (so-called edge) such as the boundary between subjects in the image is reduced. In addition, an image monitoring apparatus that detects dirt on a lens surface or the like based on the fact that the edge amount has become a predetermined value or less is known.
In this image monitoring device, when dirt is attached to the lens surface of the camera, the reduction in the area with a large edge amount in the image is relatively large, while the decrease in the area with a small edge amount is relatively small. On the other hand, when the illumination changes, the contamination of the lens surface is detected by utilizing the fact that the portion with the normal edge amount and the portion with the larger edge amount change to the same extent, and erroneous recognition is performed. (Refer to patent document 1).
However, since this image monitoring apparatus determines the sharpness of the edge image, it cannot be detected unless the contamination is severe to some extent. In addition, if an object with originally blurred brightness is captured, there is a problem that the lens is misidentified as dirty.

また、これとは別に、撮像素子とレンズの前にレンズカバー状導光部を設け、LEDの光を反射させて、レンズカバー表面に付着した汚れや水滴を検出する付着物検知機能付き車載用撮影装置が知られている(特許文献2参照)。
この車載用撮影装置では、レンズカバー状導光部という独特の機構とLEDなどの発光部を備える必要があるため、既存のシステムには使用することができないという問題がある。また、発光部が点灯しているときと、消灯しているときに得た画像の差分から汚れなどを検知する方法を採用しているため、毎フレーム連続でフレーム間の差分を利用するような画像認識には大きな制限を与えることになるという問題もある。
特許第4、087、600号公報 特開2008−064630号公報
Separately from this, a lens cover-shaped light guide is provided in front of the image sensor and the lens to reflect the LED light to detect dirt and water droplets adhering to the lens cover surface. An imaging device is known (see Patent Document 2).
This in-vehicle photographing apparatus has a problem that it cannot be used in an existing system because it needs to have a unique mechanism called a lens cover-shaped light guide unit and a light emitting unit such as an LED. In addition, since a method of detecting dirt or the like from the difference between the images obtained when the light emitting unit is turned on and off, the difference between frames is used continuously every frame. There is also a problem that image recognition is greatly limited.
Japanese Patent No. 4,087,600 JP 2008-066430 A

本発明は、監視カメラのレンズ等の汚れ検知についての従来技術の問題を解決すべくなされたものであって、その目的は、既存の監視システムに適用でき、しかも簡易な構成により、誤動作、つまりカメラ前方にある異物と例えばレンズ表面の水滴などの汚れを混同することなく、汚れを迅速且つ確実に検知することで、監視カメラの保守を常に的確に行えるようにすることである。   The present invention has been made in order to solve the problems of the prior art relating to the detection of dirt on the lens of a surveillance camera, and the object thereof is applicable to an existing surveillance system. It is to ensure that maintenance of the surveillance camera can always be performed accurately by detecting the dirt quickly and reliably without confusing foreign matters in front of the camera with dirt such as water droplets on the lens surface.

本願発明は汚れ検知装置であって、被写体のステレオ画像を撮影する手段と、ステレオ画像から視差を求める手段と、求めた視差に基づき距離画像及び評価値画像を作成する手段と、基準となる距離画像及び評価値画像をそれぞれ距離背景画像及び評価値背景画像として記憶する手段と、前記距離背景画像及び評価値背景画像と任意の時点で撮影したステレオ画像から作成した前記距離画像及び評価値画像とを比較して、前記撮影手段の光学系の汚れを検知する手段と、を有することを特徴とする。
本願の他の発明は汚れ検知方法であって、被写体のステレオ画像を撮影装置で撮影する工程と、ステレオ画像から視差を求める工程と、求めた視差に基づき前記距離画像及び評価値画像を作成する工程と、基準となる距離画像及び評価値画像をそれぞれ距離背景画像及び評価値背景画像として記憶する工程と、前記距離背景画像及び評価値背景画像と任意の時点で撮影したステレオ画像から作成した前記距離画像及び評価値画像とを比較して、前記撮影装置の光学系の汚れを判定する工程とを有することを特徴とする。
The present invention is a dirt detection device, a means for capturing a stereo image of a subject, a means for obtaining parallax from the stereo image, a means for creating a distance image and an evaluation value image based on the obtained parallax, and a reference distance Means for storing an image and an evaluation value image as a distance background image and an evaluation value background image, respectively, and the distance image and the evaluation value image created from the distance background image and the evaluation value background image and a stereo image taken at an arbitrary time point; And means for detecting contamination of the optical system of the photographing means.
Another invention of the present application is a stain detection method, which includes a step of taking a stereo image of a subject with a photographing device, a step of obtaining parallax from the stereo image, and creating the distance image and the evaluation value image based on the obtained parallax. A step, a step of storing a reference distance image and an evaluation value image as a distance background image and an evaluation value background image, respectively, and the distance background image and the evaluation value background image and the stereo image taken at an arbitrary time And comparing the distance image and the evaluation value image to determine dirt on the optical system of the photographing apparatus.

既存のカメラを利用して、カメラ前方にある異物とレンズ表面の汚れを混同することなく、早期に検出することができるため、カメラを常に正常な状態に容易に維持することができる。   Since an existing camera can be used for early detection without confusing foreign matter in front of the camera and dirt on the lens surface, the camera can always be easily maintained in a normal state.

以下、本発明のステレオ画像における視差を利用した汚れ検知装置及び同検知方法を説明するが、その前に、2台のカメラを用いて撮影したステレオ画像(左右両画像)を利用して視差を求める方法について、添付図面を参照して説明する。
図1は、室内に置かれた異物Eを2台のカメラ20Lと20Rで撮影する状態を示すカメラ20の斜め上部側からみた斜視図であり、図2はそれぞれのカメラ20(L、R)で撮影した撮影画像(ステレオ画像)を示す。
図1に示すステレオカメラによる撮影環境において、2台のカメラ20(L、R)を使ってステレオ画像として同じ対象物(異物)Eを撮影すると、2台のカメラ20(L、R)のレンズによる歪や2台のカメラ20間の内部パラメータの差異が全て補正されているものと仮定した場合には、撮影した写真(画像)は図2のように左右で僅かに位置がずれた同一画像になる。
つまり、2台のカメラ20(L、R)の設置位置の違いにより、左右の画像には、カメラ20(L、R)の左右レンズの配置位置の差に伴う視差が生じる。この場合、カメラは水平方向に並べて設置しているため、視差は水平方向に生じている。
Hereinafter, the dirt detection apparatus and the detection method using the parallax in the stereo image of the present invention will be described. Before that, the parallax is detected using the stereo image (both left and right images) photographed using two cameras. A method of obtaining will be described with reference to the accompanying drawings.
FIG. 1 is a perspective view seen from an oblique upper side of the camera 20 showing a state in which the foreign object E placed in the room is photographed by the two cameras 20L and 20R, and FIG. 2 shows each camera 20 (L, R). The photographed image (stereo image) photographed in step 1 is shown.
In the shooting environment of the stereo camera shown in FIG. 1, when the same object (foreign matter) E is shot as a stereo image using the two cameras 20 (L, R), the lenses of the two cameras 20 (L, R) are used. Assuming that all of the distortion caused by this and the difference in internal parameters between the two cameras 20 have been corrected, the photograph (image) taken is the same image slightly shifted in position on the left and right as shown in FIG. become.
That is, due to the difference in the installation positions of the two cameras 20 (L, R), parallax due to the difference in the arrangement positions of the left and right lenses of the cameras 20 (L, R) occurs in the left and right images. In this case, since the cameras are installed side by side in the horizontal direction, parallax occurs in the horizontal direction.

図3は、L画像(左側に設定したカメラ20Lの撮影画像)及びR画像(右側に設定したカメラ20Rの撮影画像)をX―Y座標上で上下に並べ替えて示した図である。
図中、矢印は視差を示し、その長さは視差の大きさを示す。この図から明らかなように、視差はカメラから見て手前にある物体ほど大きく奥にある物体ほど小さくなる、したがって、カメラ20(L、R)間距離と比べて十分遠い距離にある物体を撮影した場合は、視差は実質上ゼロになる。
FIG. 3 is a diagram showing the L image (the captured image of the camera 20L set on the left side) and the R image (the captured image of the camera 20R set on the right side) arranged vertically on the XY coordinates.
In the figure, the arrow indicates parallax, and the length indicates the magnitude of the parallax. As is clear from this figure, the parallax is larger for objects closer to the front as viewed from the camera and smaller for objects at the back. Therefore, an object that is sufficiently far away from the distance between the cameras 20 (L, R) is photographed. In this case, the parallax is substantially zero.

次に、図3を参照して、撮影した左右の画像中の物体が、どの程度の視差を持っているかを判別するためのステレオマッチング処理について説明する。
平行視の場合にはL画像中のあるポイントに対応するポイントがR画像中では必ず水平方向左側にあるはずであるので、画像をX−Y座標上に置いたとき、Y座標を固定してX座標上の座標を1つずつずらしながら、つまり走査しながら上記ポイントの位置を探していく。
Next, with reference to FIG. 3, a stereo matching process for determining how much parallax an object in the captured left and right images will be described.
In parallel viewing, a point corresponding to a certain point in the L image must be on the left side in the horizontal direction in the R image. Therefore, when the image is placed on the XY coordinates, the Y coordinate is fixed. The position of the point is searched while shifting the coordinates on the X coordinate one by one, that is, while scanning.

図3に示すように、L画像中に特定領域Sを定め、その特定領域Sに対応する領域SをR画像中で探す場合、まず、同じX座標上で調べて、そこから左へ走査していく。このときに用いる代表的な評価値として、特定領域S内の画素毎にL画像とR画像に対応する位置にある画素の輝度差の絶対値を求め、これを上記領域S内で総和して求めた差分絶対値和(SAD)があるので、これを用いてX座標にしたがって図中上にある領域と下にある領域との間でSADを求める。このSADを縦軸にまた横軸にX座標をとって順に並べることにより、評価値のグラフができる。   As shown in FIG. 3, when a specific area S is defined in the L image and the area S corresponding to the specific area S is searched for in the R image, first, the same X coordinate is examined, and then scanned to the left from there. To go. As a typical evaluation value used at this time, an absolute value of a luminance difference between pixels at positions corresponding to the L image and the R image is obtained for each pixel in the specific region S, and this is summed in the region S. Since there is the obtained sum of absolute differences (SAD), the SAD is obtained between the upper region and the lower region in the figure according to the X coordinate. By arranging the SADs in order with the X coordinate on the vertical axis and the horizontal axis, an evaluation value graph can be formed.

図4は、このようにして作成した評価値のグラフを示す。
上記グラフにおいて、X座標のほぼ60のところで評価値が最小となるため、その部分でL・R画像における対象ポイントがそれぞれ対応するということになり、この場合の視差は60であることを示している。
FIG. 4 shows a graph of evaluation values created in this way.
In the above graph, the evaluation value is the minimum at approximately 60 of the X coordinate, so that the target point in the L / R image corresponds to that portion, indicating that the parallax in this case is 60. Yes.

以上、水平に設置したカメラを用いてL・R画像を撮影した場合における両画像を利用して視差を求める方法について説明したが、次に、この方法を用いてカメラのレンズ等の光学系(ここでは透明なレンズカバーなども含む)の汚れと、実際の撮影対象物とを区別するための本発明の実施形態に係る汚れ検出方法について説明する。
本実施形態に係る汚れ検出方法は、求めた距離画像と評価値に基づいて作成した画像データ(ここでは便宜上評価値画像データという)を用いるものであって、具体的には、視差を求める段階で各画素における最小の評価値の値を求めておき、その値を画像を構成する画素毎に、つまり各画素に対応させて全画素についてそれぞれの画素に関連付けて記憶しておく。
The method for obtaining the parallax using both images in the case where the L / R images are taken using the horizontally installed camera has been described above. Next, an optical system (such as a lens of the camera) using this method ( Here, a dirt detection method according to an embodiment of the present invention for distinguishing between dirt on a transparent lens cover and the like and an actual photographing object will be described.
The stain detection method according to the present embodiment uses image data (herein, referred to as evaluation value image data for the sake of convenience) created based on the obtained distance image and the evaluation value. Then, the minimum evaluation value for each pixel is obtained, and that value is stored in association with each pixel for each pixel constituting the image, that is, for each pixel.

図5は、一方の画像(ここではL画像)についての過去(背景)画像と現在のL画像撮影レンズに汚れが付着した状態での画像を、それぞれ、入力画像と、距離画像と、評価値画像に分けて示した図である。
ここで、距離画像は、ステレオ撮影画像の各画素毎にカメラからの距離を求め、その距離データを各画素に対応させて備えた(記憶した)画像、つまり、距離データを付加した画像をいい、また、評価値画像は、上記の画像を各画素毎に求めたSADの最小値を各画素に対応させて付加した画像、つまり、上記差分絶対値和データを備えた画像をいう。
FIG. 5 shows a past (background) image of one image (here, L image) and an image in a state where dirt is attached to the current L image photographing lens, respectively, an input image, a distance image, and an evaluation value. It is the figure divided and shown to the image.
Here, the distance image is an image in which the distance from the camera is obtained for each pixel of the stereo image and the distance data is provided (stored) corresponding to each pixel, that is, an image to which the distance data is added. In addition, the evaluation value image is an image obtained by adding the SAD minimum value obtained for each pixel in association with the above image to each pixel, that is, an image including the difference absolute value sum data.

ここでは距離画像を、例えば3m以上を距離大、1.5m〜3mを距離中、1.5m未満を距離小に3分して画像にその区別を付して表したものであり、太線で描いた部分は大距離に属する領域、一点鎖線で描いた部分は中距離に属する領域、破線で描いた部分は小距離に属する領域を示す。
評価値画像は、上記評価値つまり差分絶対値和の最小値を所定の閾値と対比して、所定の閾値よりも小さい評価値を、さらに評価大、中、小にそれを3分して、画像にその区別を施し、それを識別出来るようにして表した画像である。
Here, for example, the distance image is represented by dividing the image into 3 parts by dividing the distance image into 3 parts by dividing the image by 3 m or more into a large distance, 1.5 m to 3 m in the distance, and less than 1.5 m into the small distance. A drawn portion indicates a region belonging to a large distance, a portion drawn by a one-dot chain line indicates a region belonging to a medium distance, and a portion drawn by a broken line indicates a region belonging to a small distance.
The evaluation value image is obtained by comparing the evaluation value, that is, the minimum value of the sum of absolute differences with a predetermined threshold value, and by dividing the evaluation value smaller than the predetermined threshold value into three parts, that is, evaluation large, medium, and small, It is an image that is displayed in such a manner that the image is distinguished and can be identified.

図5A(1)は、例えば左側のカメラ20Lで撮影した背景画像で、基準となる過去の画像である。これに対し、図5A(2)は、汚れを判定するため同じカメラで撮影した現時点画像(入力画像)である。
図示のように、図5A(2)の入力画像には、その中央にゴミ(ハッチングを施した丸)が写っている。付着したゴミが細かい塵であるときは、図示のように視界が遮られるわけではなく一定の範囲で円形にボヤける感じに写る。
FIG. 5A (1) is a background image taken by the left camera 20L, for example, and is a reference past image. On the other hand, FIG. 5A (2) is a current image (input image) photographed by the same camera in order to determine dirt.
As shown in the drawing, in the input image of FIG. 5A (2), dust (hatched circle) is shown in the center. When the adhering dust is fine dust, the field of view is not obstructed as shown in the figure, but it appears to be circularly blurred within a certain range.

この入力画像から視差を求めると、過去の背景画像から得た視差と比較して変化が生じる。例えば、汚れが付着した部分(円)の一部では視差が求められない。即ち、汚れはLカメラのレンズに付着した汚れであるから、図5A(2)はL画像には汚れが写り、その部分がぼやけ、他方、R画像の同じ場所に汚れは存在しないため、その両画像を対比しても、そこから視差が求められない部分が生じる。したがって、過去の背景画像と入力画像における上記距離画像に変化が生じる。
また、同様に、評価値画像にも変化が生じる。即ち、評価値は低いほど一致の精度が高いので、汚れが付着した部分では左右画像における対応性(一致精度)が低くなり、評価値が高くなる。図5C(2)は、その結果として、評価値が小だった部分が大になって、この場合は辛うじて閾値内であることを示している(閾値をこえると表示されない)。
When the parallax is obtained from the input image, a change occurs as compared with the parallax obtained from the past background image. For example, the parallax cannot be obtained in a part of the part (circle) to which dirt is attached. That is, since the dirt is dirt attached to the lens of the L camera, in FIG. 5A (2), the L image shows the dirt, and that part is blurred. On the other hand, there is no dirt at the same location of the R image. Even if the two images are compared, a portion where the parallax cannot be obtained occurs. Therefore, a change occurs in the distance image in the past background image and the input image.
Similarly, a change occurs in the evaluation value image. That is, the lower the evaluation value is, the higher the matching accuracy is. Therefore, the correspondence (matching accuracy) in the left and right images is lowered and the evaluation value is increased in a portion where dirt is attached. As a result, FIG. 5C (2) shows that the portion where the evaluation value was small becomes large, and in this case, it is barely within the threshold value (it is not displayed when the threshold value is exceeded).

本願発明では、以上のように左右に配置した2台のカメラによる左右両画像から上記距離画像と評価値画像を作成し、これを過去の基準となる背景画像(レンズの汚れのない画像)と現在画像(入力画像)とを対比することにより、レンズの汚れを的確に判定して監視カメラの保守管理を容易かつ迅速に行おうとするものである。   In the present invention, the distance image and the evaluation value image are created from both the left and right images by the two cameras arranged on the left and right as described above, and this is used as a past reference background image (image with no lens stain). By comparing the current image (input image) with the current image, it is possible to easily and quickly perform maintenance management of the surveillance camera by accurately determining dirt on the lens.

次ぎに、上記カメラ20等と共に本発明を実施するためのカメラのレンズ汚れの検知のための汚れ検知装置及び同装置の画像処理装置について説明する。
図6は、上記画像処理装置を含む汚れ検知装置を示すブロック図である。
本実施形態に係る汚れ検知装置は、図示のように画像処理装置10、カメラ20、入力装置30及び表示部40とから成っている。
カメラ20は例えばCCD(Charge Coupled Device)などの光電変換素子を備えたカメラであって、撮影した画像を画像データとして画像処理装置10に入力する。入力装置30は、画像処理装置の操作及び設定など必要なデータの入力等に用いる。表示部40は例えば液晶(LCD)等の表示手段を備え、画像処理装置10から出力される画像データを表示する。
画像処理装置10は、上記カメラ20などの外部機器との接続のためのインターフェース12と、CPU(Central Processing Unit)14と、RAM(Random Access Memory)16を有し、更に、CPU14はステレオ演算部141と、その他の演算部142と、背景更新部143と、汚れ検知用比較判定部144とを備え、RAM16には、取得画像データ記憶部161と、途中結果データ記憶部162と、背景データ記憶部163と、各種設定値記憶部164とを備え、かつ、本画像処理装置を駆動制御するためのプログラムを格納した図示しないROM(Read Only Memory)を備えている。
Next, a description will be given of a dirt detecting device for detecting lens dirt on a camera and an image processing apparatus of the same for implementing the present invention together with the camera 20 and the like.
FIG. 6 is a block diagram showing a dirt detection apparatus including the image processing apparatus.
The dirt detection device according to the present embodiment includes an image processing device 10, a camera 20, an input device 30, and a display unit 40 as illustrated.
The camera 20 is a camera provided with a photoelectric conversion element such as a CCD (Charge Coupled Device), for example, and inputs a photographed image to the image processing apparatus 10 as image data. The input device 30 is used for inputting necessary data such as operation and setting of the image processing apparatus. The display unit 40 includes display means such as a liquid crystal (LCD), and displays image data output from the image processing apparatus 10.
The image processing apparatus 10 includes an interface 12 for connection to an external device such as the camera 20, a CPU (Central Processing Unit) 14, and a RAM (Random Access Memory) 16. The CPU 14 further includes a stereo calculation unit. 141, the other calculation unit 142, the background update unit 143, and the stain detection comparison determination unit 144. The RAM 16 stores the acquired image data storage unit 161, the intermediate result data storage unit 162, and the background data storage. And a read only memory (ROM) (not shown) that stores a program for driving and controlling the image processing apparatus.

画像処理装置10には、カメラ例えばCCDカメラ20から画像データとして入力されたステレオ入力画像データが、インターフェース12を介して入力される。入力されたステレオ画像データはRAM16の取得画像データ記憶部161に記憶される。CPU141は取得画像データ記憶部161からステレオ入力画像データを読み出してステレオ演算部141で演算処理を行う。ここでは、前処理部141aにおいて、左右の画像の画素毎の視差を求め、これに基づきSADを求める演算処理を行うと共に、上記視差に基づき、距離演算部141bでは各画素毎に距離情報を求める演算処理を行う。   Stereo input image data input as image data from a camera such as a CCD camera 20 is input to the image processing apparatus 10 via the interface 12. The input stereo image data is stored in the acquired image data storage unit 161 of the RAM 16. The CPU 141 reads stereo input image data from the acquired image data storage unit 161 and performs a calculation process in the stereo calculation unit 141. Here, in the pre-processing unit 141a, a parallax for each pixel of the left and right images is obtained, and calculation processing for obtaining the SAD is performed based on the parallax. Perform arithmetic processing.

ステレオ演算部141での演算結果は、RAM16の途中結果データ記憶部のそれぞれ距離画像データ記憶部162aと評価値画像データ記憶部162bに記憶される。CPU14は、上記距離画像データ記憶部162aと評価値画像データ記憶部162bから、それぞれ距離画像データ及び評価値画像データを読み出し、上記その他の演算部142において、これらのデータに基づき、例えば、距離の大中小、或いは評価値画像データを読み出して予め定めた閾値と対比して、それよりも小さい評価値画像データについて更に大中小に分けてそれぞれを画素データに付加した画像を作成する処理を行う。   The calculation results in the stereo calculation unit 141 are stored in the distance image data storage unit 162a and the evaluation value image data storage unit 162b of the intermediate result data storage unit of the RAM 16, respectively. The CPU 14 reads out the distance image data and the evaluation value image data from the distance image data storage unit 162a and the evaluation value image data storage unit 162b, respectively. Based on these data in the other calculation unit 142, for example, a distance Evaluation value image data is read out and compared with a predetermined threshold value, and evaluation value image data smaller than that is further divided into large, medium, and small sizes, and an image is created by adding each to pixel data.

他方、CPU14の背景更新部143は、読み出した距離画像データ及び評価値画像データを背景データとして、これを背景データ記憶部163のそれぞれ距離背景画像データ記憶部163a及び評価値背景画像データ記憶部163bに記憶する処理を行う。
CPU14の汚れ検知用比較判定部144は、RAM16の途中結果データ記憶部162から現時点における距離画像データ及び評価値画像データを読み出し、同時に背景データ記憶部163から読み出した基準となる距離背景画像データと評価値背景画像データとを比較して画像の汚れからレンズ等の光学系の汚れの有無を判定する。
距離画像データ及び評価値画像データに基づく距離画像、評価値画像、及び汚れ検知用比較判定部144の判定結果は、インターフェース経由で外部の例えば液晶(LCD)表示部40の表示画面上に表示される。
On the other hand, the background update unit 143 of the CPU 14 uses the read distance image data and evaluation value image data as background data, and uses these as the distance background image data storage unit 163a and the evaluation value background image data storage unit 163b of the background data storage unit 163, respectively. The process to memorize is performed.
The stain detection comparison / determination unit 144 of the CPU 14 reads the current distance image data and the evaluation value image data from the midway result data storage unit 162 of the RAM 16, and simultaneously reads the distance background image data serving as a reference read from the background data storage unit 163. The evaluation value is compared with the background image data to determine the presence or absence of dirt on the optical system such as a lens from the dirt on the image.
The distance image based on the distance image data and the evaluation value image data, the evaluation value image, and the determination result of the stain detection comparison determination unit 144 are displayed on the display screen of an external liquid crystal (LCD) display unit 40 via the interface. The

図7は以上で説明した画像処理装置10を用いたレンズ等の光学系の汚れ検知のための処理フローを説明するフロー図である。
まず、2台の監視カメラを作動して監視領域の左右の画像を取得する(S101)。画像処理装置10は、取得された2枚の画像を用いて両画像の画素間の視差を求めるための一連の処理を行う(S102)。続いて、この視差に基づいてSADを求め、SADから評価値画像を取得し(S103)、また同様に上記視差に基づいて距離画像を取得する(S104)(なお、距離画像と評価値画像はいずれを先に取得してもよい)。ここで、監視カメラの光学系の汚れを検知する処理を行うか、或いはその他の処理、例えば、得られたステレオ画像を用いて異物監視処理を行う決定を行い(S105)、光学系の汚れを検知する処理を行うときは(S105、YES)、まず、背景を更新するか否か決定する(S107)。
FIG. 7 is a flowchart illustrating a processing flow for detecting contamination of an optical system such as a lens using the image processing apparatus 10 described above.
First, the left and right images of the monitoring area are acquired by operating the two monitoring cameras (S101). The image processing apparatus 10 performs a series of processes for obtaining the parallax between the pixels of both images using the two acquired images (S102). Subsequently, SAD is obtained based on the parallax, an evaluation value image is obtained from the SAD (S103), and similarly, a distance image is obtained based on the parallax (S104). Either one may be acquired first). Here, a process for detecting contamination of the optical system of the monitoring camera is performed, or other processing, for example, a determination to perform foreign matter monitoring processing using the obtained stereo image is performed (S105). When performing the detection process (S105, YES), first, it is determined whether or not to update the background (S107).

背景を更新する場合は(S107、YES)、背景更新部143は、入力されたR.L画像から評価値背景画像と(S108)距離背景画像を取得し(S109)、背景を更新しない場合は(S107,NO)、汚れ検知用比較判定部144は、そのまま、既存の評価値背景画像を用いて、ステップS103で取得した評価値画像と評価値背景画像を比較する(S110)。その結果、現在の画像の検査対象となる画素の評価値が評価値背景画像の同じ画素のそれに等しいか或いはそれよりも小さいときは(S111、YES)、当該画素については両画像が一致しているとみなし、当該画素の検査を終了する。   When the background is updated (S107, YES), the background update unit 143 receives the input R.D. The evaluation value background image and (S108) the distance background image are acquired from the L image (S109). When the background is not updated (S107, NO), the stain detection comparison / determination unit 144 continues to use the existing evaluation value background image. Are used to compare the evaluation value image acquired in step S103 with the evaluation value background image (S110). As a result, when the evaluation value of the pixel to be inspected of the current image is equal to or smaller than that of the same pixel of the evaluation value background image (S111, YES), both images match for the pixel. The pixel inspection is terminated.

ステップS111において、現在の検査対象の画素の評価値が評価背景画像の対応する画素のそれよりも大きいときは(S111、NO)、CPU14は、距離画像が求まっているか否かを判定し(S112)、求まっていなければ(S112、NO)、当該画素に、ここでは画素の汚れを指定する手段による具体的指定として汚れフラグを立て、また、距離画像が求まっていれば(S112,YES)、汚れ検知用比較判定部144は、当該画素について入力画像から作成した距離画像と距離背景画像を比較し(S113)、現在画像の距離と背景画像の距離が等しいときは(S114、YES)、距離が変わらないにも拘わらず評価値が背景画像のそれよりも高くなったのであるから、光学系に汚れが付着したと判定して、当該画素に汚れフラグを立てる。当該画素における現在画像の距離と背景画像の距離が等しくないときは(S114、NO)、背景にない物体が進入したことにより距離が変化したものと考えられるから、そのまま当該画素についての検査を終了する。   In step S111, when the evaluation value of the current pixel to be inspected is larger than that of the corresponding pixel of the evaluation background image (S111, NO), the CPU 14 determines whether or not a distance image is obtained (S112). If not found (S112, NO), a stain flag is set for the pixel as a specific designation by means for designating the stain of the pixel here, and if a distance image is found (S112, YES), The stain detection comparison / determination unit 144 compares the distance image created from the input image for the pixel with the distance background image (S113). If the distance between the current image and the background image is equal (S114, YES), the distance is determined. Although the evaluation value was higher than that of the background image even though the value did not change, it was determined that the optical system was contaminated, and the pixel was stained. A flag. When the distance between the current image and the background image at the pixel is not equal (S114, NO), it is considered that the distance has changed due to the entry of an object that is not in the background. To do.

当該画素についての検査が終了したときは、検査対象となる画素の全てについての検査が終了したか否かを判定し(S117)、まだ、終了していなければ次の画素について、上記ステップS111に戻って上記の処理を繰り返す。
検知対象となる全ての画素についての検知が終了したときは(S117、YES)、次に、汚れフラグ画像(全ての画素についての検査が終了した段階では、全ての画素にフラグが立っているか(ON)、立っていないか(OFF)のデータが付与されているので、これを2値画像とみて、ここでは汚れフラグ画像という)を取得し(S118)、汚れフラグ画像に基づき最終的な汚れ判定を行う(S119)。この汚れ判定後に処理を終了する。
When the inspection for the pixel has been completed, it is determined whether or not the inspection has been completed for all of the pixels to be inspected (S117). If the inspection has not yet been completed, the process proceeds to step S111 for the next pixel. Return and repeat the above process.
When the detection for all the pixels to be detected is completed (S117, YES), next, a dirt flag image (when all the pixels have been inspected, all the pixels are flagged ( (ON) or not standing (OFF) data is given, so that this is regarded as a binary image (herein referred to as a stain flag image) (S118), and the final stain is based on the stain flag image. A determination is made (S119). The processing is terminated after this dirt determination.

図8は、図7におけるステップS119を詳細に示したフロー図である。
ステップS119の汚れフラグ画像における汚れ判定は、本実施形態では以下で説明する1〜3の3方法がある。
第1の方法について
具体的には、画像全体の画素のうち汚れフラグを立てた画素を計数してその数値が予め定めた閾値を越えたとき、カメラのレンズに汚れがあると判定する。
図8Aは、第1の方法を示すフロー図である。
図7のフロー図に示す処理により汚れフラグを立てた画素数をカウントし(S119(1))、そのカウント数が閾値を越えたき(S119(2)YES)、汚れであると判定する(S119(3))。他方、上記カウント数が閾値を越えないときは汚れがなかったものとして処理を終了する。
FIG. 8 is a flowchart showing in detail step S119 in FIG.
In this embodiment, there are three methods 1 to 3 described below in the present embodiment for determining a stain in the stain flag image in step S119.
About the first method Specifically, the pixel with the dirt flag set is counted among the pixels of the entire image, and when the numerical value exceeds a predetermined threshold, it is determined that the camera lens is dirty.
FIG. 8A is a flowchart showing the first method.
The number of pixels for which the stain flag is set is counted by the processing shown in the flowchart of FIG. 7 (S119 (1)), and when the count number exceeds the threshold value (S119 (2) YES), it is determined that the pixel is dirty (S119). (3)). On the other hand, when the count number does not exceed the threshold value, it is determined that there is no dirt and the process is terminated.

第2の方法について
この方法では、対象画像を幾つかのブロックに分けて、各ブロックについて上記第1の方法と同様の方法で判定する。
この方法によれば、画像のどの当たりに汚れがあるか、つまり、レンズのどの辺に汚れがあるかが分かる。
この場合、例えば、全ブロック中所定の数を越えるブロックに汚れがあるとき、全体として汚れがあると判定してもよい。
図8Bは、この第2の方法のフロー図である。
この方法では、まず、汚れフラグ画像を複数のブロックに分割し(S119(4))、次に、各ブロック内の画素のうち汚れフラグが立った画素数をカウントし(S119(5))、その画素数が予め定めた閾値を越えたとき(S119(6)YES)、当該ブロックに汚れがあると判定する(S119(7))。ここで、この汚れ判定処理を各ブロック毎に全てのブロックについて行ったか否かを判定し(S119(8))、 行っていなければ(S119(8)NO)、ステップS119(5)に戻って上記処理を繰り返し、全てのブロックについて判定が終了したときは(S119(8)YES)、全体の汚れ判定を行うか否か判定し(S119(9))、判定するときは(S119(9)、YES)、汚れブロックと判定されたブロックをカウントし(S119(10))、カウント数が予め定めた所定値(閾値)を越えたとき(S119(11)YES)、画像全体の汚れがあると判定し(S119(12))、汚れ判定処理を終了する。
ステップS119(9)において、全体の汚れ判定を行わないときは(S119(9)、NO)そのまま、汚れ判定処理を終了する。
About the second method In this method, the target image is divided into several blocks, and each block is determined by the same method as the first method.
According to this method, it is possible to know which area of the image is soiled, that is, which side of the lens is soiled.
In this case, for example, when a block exceeding a predetermined number in all blocks is dirty, it may be determined that the entire block is dirty.
FIG. 8B is a flow diagram of this second method.
In this method, first, the dirt flag image is divided into a plurality of blocks (S119 (4)), and then the number of pixels in which the dirt flag is set is counted among the pixels in each block (S119 (5)). When the number of pixels exceeds a predetermined threshold (S119 (6) YES), it is determined that the block is dirty (S119 (7)). Here, it is determined whether or not this stain determination processing has been performed for all blocks for each block (S119 (8)). If not (S119 (8) NO), the process returns to step S119 (5). When the above process is repeated and the determination is completed for all the blocks (S119 (8) YES), it is determined whether or not the entire stain determination is performed (S119 (9)), and when the determination is made (S119 (9)). YES), the blocks determined to be dirty blocks are counted (S119 (10)), and when the count exceeds a predetermined value (threshold value) (S119 (11) YES), the entire image is dirty. (S119 (12)) and the stain determination process is terminated.
In step S119 (9), when the overall stain determination is not performed (S119 (9), NO), the stain determination process is terminated.

第3の方法について
この方法では、汚れフラグ画像を汚れフラグON、OFFによる2値画像と見立てて、汚れ画素にラベリングを施し、ラベリングされた画素のラベルの大きさが予め定めた一定の大きさを越えたら汚れがあると判定する。ラベリングは従来周知の方法で行う。
この方法では、ラベリングされた画素を基本とするため、画像のどの辺りが汚れたか判定することができる。
図8Cは、この第3の方法のフロー図である。
まず、汚れフラグ画像を構成する画素の汚れフラグに基づきラベリングを施し(S119(13))、次に、各ラベル毎にラベリングされまとめられた画素の面積を計算し(S119(14))、その面積が予め定めた閾値を越えたときは(S119(15)YES)、画像に汚れがあると判定して(S119(16))処理を終了し、ステップS119(15))で閾値を越えないときは(S119(15)、NO)そのまま処理を終了する。
以上の処理を左右の画像即ちL画像、R画像について行う。
About the third method In this method, the dirt flag image is regarded as a binary image by turning on and off the dirt flag, the dirt pixels are labeled, and the label size of the labeled pixels is a predetermined fixed size. If it exceeds, it is determined that there is dirt. Labeling is performed by a conventionally known method.
Since this method is based on labeled pixels, it can be determined which part of the image is dirty.
FIG. 8C is a flow diagram of this third method.
First, labeling is performed based on the dirt flag of the pixels constituting the dirt flag image (S119 (13)), and then the area of the pixels that are labeled and grouped for each label is calculated (S119 (14)). When the area exceeds a predetermined threshold value (S119 (15) YES), it is determined that the image is dirty (S119 (16)), and the process is terminated, and the threshold value is not exceeded in step S119 (15)). If so (S119 (15), NO), the process ends.
The above processing is performed on the left and right images, that is, the L image and the R image.

本実施形態では、ある画素について、現在と過去の評価値を比較し、等しいか現在の方が低ければ良くマッチしているということなので、汚れていないと判定する。逆に現在の方が高ければ汚れている可能性があるので汚れ判定を行う。
現在の画像で距離が求まらない画素があれば汚れの可能性があるので、その画素について汚れフラグを立てる(初期値は汚れフラグOFF)。
なお、評価値の大小の判定をするとき、ノイズ低減などの目的でマージンを設けてもよい。
In the present embodiment, for a certain pixel, the current and past evaluation values are compared, and if they are equal or the current is lower, it is better to match. On the contrary, if the current one is higher, there is a possibility that it is dirty.
If there is a pixel whose distance cannot be obtained in the current image, there is a possibility of contamination, and a contamination flag is set for that pixel (initial value is contamination flag OFF).
When determining the evaluation value, a margin may be provided for the purpose of noise reduction or the like.

以上は、視差に基づく距離画像と評価値画像に基づきレンズなどの光学系の汚れを検知する処理について説明したが、例えばレンズに付着した汚れ(例えば水滴)が大きい場合には、汚れが付着した部分は急に視差が求まらなくなり(評価値も変化する)、画像自体も過去のものと比較すると付着した部分は全く違った輝度に変化するので、その輝度の変化が所定の閾値を越えているか判定し、越えた場合にはレンズ汚れと判定することも可能である。   The processing for detecting dirt on an optical system such as a lens based on a distance image based on parallax and an evaluation value image has been described above. For example, when dirt (for example, water droplets) attached to a lens is large, dirt is attached. The part suddenly loses parallax (the evaluation value also changes), and the attached part changes to a completely different brightness compared to the past, so the change in brightness exceeds a predetermined threshold It is also possible to determine that the lens is dirty.

以上の説明はステレオカメラ(平行視)を用いて処理を行う場合を例に採って説明したが、視差を求めることができる構成のマルチカメラであれば、ステレオカメラに限らずいかなるカメラでも利用可能である。 The above explanation has been given taking the case of processing using a stereo camera (parallel viewing) as an example, but any camera can be used as long as it is a multi-camera configured to obtain parallax. It is.

室内に置かれた異物Eを2台のカメラで撮影する状態を示すカメラ上部側からみた斜視図である。It is the perspective view seen from the camera upper side which shows the state which image | photographs the foreign material E set | placed indoors with two cameras. カメラで撮影した左右の撮影画像を示す。The left and right photographed images taken with the camera are shown. L画像及びR画像をX―Y座標上で上下に並べ替えて示した図である。It is the figure which rearranged and showed L image and R image on the XY coordinate up and down. 評価値のグラフを示す。The graph of an evaluation value is shown. 一方の画像についての過去(背景)画像と現在の画像撮影レンズに汚れが付着した状態での画像を、それぞれ、入力画像と、距離画像と、評価値(SAD)画像に分けて示した図である。FIG. 6 is a diagram showing a past (background) image of one image and an image in a state where dirt is attached to the current imaging lens, which are divided into an input image, a distance image, and an evaluation value (SAD) image, respectively. is there. 画像処理装置を含む汚れ検知装置を示すブロック図である。It is a block diagram which shows the stain | pollution | contamination detection apparatus containing an image processing apparatus. 画像処理装置を用いたレンズの汚れ検知のための処理フローを説明するフロー図である。It is a flowchart explaining the processing flow for the stain | pollution | contamination detection of a lens using an image processing apparatus. 図7におけるステップS119を詳細に示したフロー図である。It is the flowchart which showed step S119 in FIG. 7 in detail.

符号の説明Explanation of symbols

10・・・画像処理装置、12・・・インターフェース、14・・・CPU、141・・・ステレオ演算部、142・・・その他の演算部、143・・・背景更新部、144・・・汚れ検知用比較判定部、16・・・RAM、161・・・取得画像データ記憶部、162・・・途中結果データ記憶部、163・・・背景データ記憶部、164・・・各種設定値記憶部、20・・・カメラ、30・・・入力装置、40・・・表示部。 DESCRIPTION OF SYMBOLS 10 ... Image processing apparatus, 12 ... Interface, 14 ... CPU, 141 ... Stereo calculating part, 142 ... Other calculating parts, 143 ... Background update part, 144 ... Dirt Comparison determination unit for detection, 16 ... RAM, 161 ... acquired image data storage unit, 162 ... intermediate result data storage unit, 163 ... background data storage unit, 164 ... various setting value storage units , 20... Camera, 30... Input device, 40.

Claims (11)

被写体のステレオ画像を撮影する手段と、撮影したステレオ画像を処理する画像処理装置とからなる汚れ検知装置とを備えた汚れ検知装置であって、
前記画像処理装置は、ステレオ画像から視差を求める手段と、求めた視差に基づき距離画像及び評価値画像を作成する手段と、基準となる距離画像及び評価値画像をそれぞれ距離背景画像及び評価値背景画像として記憶する手段と、前記距離背景画像及び評価値背景画像と任意の時点で撮影したステレオ画像から作成した前記距離画像及び評価値画像とを比較して、前記撮影手段の光学系の汚れを検知する手段、を有することを特徴とする汚れ検知装置。
A dirt detection device comprising a means for photographing a stereo image of a subject and a stain detection device comprising an image processing device for processing the captured stereo image,
The image processing apparatus includes means for obtaining parallax from a stereo image, means for creating a distance image and an evaluation value image based on the obtained parallax, and a distance image and an evaluation value background as a reference distance image and evaluation value image, respectively. An image storage means, and the distance background image and the evaluation value background image are compared with the distance image and the evaluation value image created from a stereo image photographed at an arbitrary time point, so that the optical system of the photographing means is stained. A dirt detection device comprising a detecting means.
請求項1に記載された汚れ検知装置において、
前記距離画像及び評価値画像を作成する手段は、取得した画像の各画素について求めた距離情報を付加して前記距離画像を作成し、かつ取得した画像の各画素について求めた評価値情報を付加して前記評価値画像を作成することを特徴とする汚れ検知装置。
In the dirt detector according to claim 1,
The means for creating the distance image and the evaluation value image adds the distance information obtained for each pixel of the acquired image to create the distance image, and adds the evaluation value information obtained for each pixel of the acquired image. And producing the evaluation value image.
請求項1又は2に記載された汚れ検知装置において、
前記撮影手段の光学系の汚れを検知する手段は、前記評価値背景画像と前記評価値画像とを比較して、前記評価値画像の画素に、その評価値が前記評価値背景画像のそれよりも大きな画素が存在することを条件に、当該画素についての距離情報が求められないとき、当該画素を汚れ画素として指定する手段を有し、前記汚れ画素に基づき前記撮影手段の光学系の汚れを判定することを特徴とする汚れ検知装置。
In the dirt detector according to claim 1 or 2,
The means for detecting contamination of the optical system of the photographing means compares the evaluation value background image and the evaluation value image, and the evaluation value is higher than that of the evaluation value background image in the pixels of the evaluation value image. If the distance information about the pixel cannot be obtained on the condition that there is a large pixel, the pixel is designated as a dirty pixel, and the optical system of the photographing means is cleaned based on the dirty pixel. A dirt detecting device characterized by determining.
請求項1又は2に記載された汚れ検知装置において、
前記撮影手段の光学系の汚れを検知する手段は、評価値背景画像と前記評価値画像とを比較して、前記評価値画像の画素に、その評価値が前記評価値背景画像のそれよりも大きな画素が存在することを条件に、当該画素の距離情報が距離背景画像のそれと等しいとき、当該画素を汚れ画素として指定する手段を有し、前記汚れ画素に基づき前記撮影手段の光学系の汚れを判定することを特徴とする汚れ検知装置。
In the dirt detector according to claim 1 or 2,
The means for detecting contamination of the optical system of the photographing means compares the evaluation value background image and the evaluation value image, and the evaluation value is higher than that of the evaluation value background image in the pixels of the evaluation value image. When the distance information of the pixel is equal to that of the distance background image on the condition that there is a large pixel, there is means for designating the pixel as a dirty pixel, and the stain of the optical system of the photographing means is based on the dirty pixel. A dirt detection apparatus characterized by determining whether
請求項3又は4の汚れ検知装置において、
前記撮影手段の光学系の汚れを検知する手段は、前記汚れ画素として指定された画素数を計数する手段を有し、その計数値が所定の閾値を越えたとき、撮影装置の光学系に汚れがあると判定することを特徴とする汚れ検知装置。
In the dirt detection device according to claim 3 or 4,
The means for detecting dirt on the optical system of the photographing means has means for counting the number of pixels designated as the dirty pixels, and when the counted value exceeds a predetermined threshold value, the optical system of the photographing apparatus becomes dirty. It is determined that there is a dirt detection device.
請求項3又は4に記載された汚れ検知装置において、
前記撮影手段の光学系の汚れを検知する手段は、画像を複数に分割した画像ブロック毎に前記汚れ画像として指定された画素数を計数する手段と、計数した汚れ画素数が所定の閾値を越えたか否か判定する手段と、計数した汚れ画素数が所定の閾値を越えたとき当該画像ブロックに汚れがあると判定することを特徴とする汚れ検知装置。
In the dirt detection device according to claim 3 or 4,
Means for detecting dirt in the optical system of the photographing means includes means for counting the number of pixels designated as the dirt image for each image block obtained by dividing the image, and the number of dirt pixels counted exceeds a predetermined threshold. And a dirt detection device for judging that the image block is dirty when the counted number of dirty pixels exceeds a predetermined threshold value.
請求項3又は4に記載された汚れ検知装置において、
前記撮影手段の光学系の汚れを検知する手段は、汚れ画素として指定した汚れ画素をラベリングする手段と、ラベリングした画素領域の面積を演算する手段と、演算されたラベリング面積と所定の閾値とを比較する手段と、当該比較の結果、前記ラベリング面積が前記閾値を越えたとき、当該ラベリング領域に汚れがあると判定することを特徴とする汚れ検知装置。
In the dirt detection device according to claim 3 or 4,
Means for detecting dirt in the optical system of the photographing means includes means for labeling the dirty pixels designated as dirty pixels, means for calculating the area of the labeled pixel region, and the calculated labeling area and a predetermined threshold. Means for comparing, and a stain detection apparatus, wherein, as a result of the comparison, when the labeling area exceeds the threshold, it is determined that the labeling region is soiled.
被写体撮影したステレオ画像に基づいて撮影装置の汚れを検知する汚れ検知方法であって、
被写体のステレオ画像を撮影する工程と、ステレオ画像から視差を求める工程と、求めた視差に基づき前記距離画像及び評価値画像を作成する工程と、基準となる距離画像及び評価値画像をそれぞれ距離背景画像及び評価値背景画像として記憶する工程と、前記距離背景画像及び評価値背景画像と任意の時点で撮影したステレオ画像から作成した前記距離画像及び評価値画像とを比較して、前記撮影装置の光学系の汚れを判定する工程と、を有することを特徴とする汚れ検知方法。
A dirt detection method for detecting dirt on a photographing device based on a stereo image taken of a subject,
A step of capturing a stereo image of a subject; a step of obtaining a parallax from the stereo image; a step of creating the distance image and the evaluation value image based on the obtained parallax; and a distance image as a reference and the evaluation value image as a distance background Storing the image and the evaluation value background image, and comparing the distance background image and the evaluation value background image with the distance image and the evaluation value image created from the stereo image photographed at an arbitrary time point. And a step of determining contamination of the optical system.
請求項8に記載された汚れ検知方法において、
前記距離画像及び評価値画像を作成する工程は、取得した画像の各画素について求めた距離情報を付加して前記距離画像を作成し、かつ取得した画像の各画素について求めた評価値情報を付加して前記評価値画像を作成する工程であることを特徴とする汚れ検知方法。
In the dirt detection method according to claim 8,
The step of creating the distance image and the evaluation value image includes adding the distance information obtained for each pixel of the acquired image to create the distance image, and adding the evaluation value information obtained for each pixel of the acquired image. Then, a stain detection method, which is a step of creating the evaluation value image.
請求項8又は9に記載された汚れ検知方法において、
前記撮影装置の光学系の汚れを判定する工程は、評価値背景画像と前記評価値画像とを比較して、前記評価値画像の画素に評価値が前記評価値背景画像のそれよりも大きな画素が存在することを条件に、当該画素の距離が求められないとき、当該画素を汚れ画素として指定する工程と、汚れ画素に基づき前記撮影装置の光学系の汚れを判定する工程と、を有することを特徴とする汚れ検知方法。
In the dirt detection method according to claim 8 or 9,
The step of determining the contamination of the optical system of the photographing apparatus compares the evaluation value background image with the evaluation value image, and the pixels of the evaluation value image have a larger evaluation value than that of the evaluation value background image. When the distance of the pixel cannot be obtained on the condition that the pixel exists, the method includes a step of designating the pixel as a dirty pixel and a step of determining the contamination of the optical system of the photographing apparatus based on the dirty pixel. A method for detecting dirt.
請求項8又は9に記載された汚れ検知方法において、
前記撮影装置の光学系の汚れを検知する工程は、評価値背景画像と任意の時点で作成した評価値画像とを比較して、前記評価値画像の画素に、評価値が前記評価値背景画像のそれよりも大きな画素が存在することを条件に、当該画素の距離情報と距離背景画像の距離情報が等しいとき、当該画素を汚れ画素として指定する工程と、指定した画素に基づき前記撮影装置の光学系の汚れを判定する工程と、を有することを特徴とする汚れ検知方法。
In the dirt detection method according to claim 8 or 9,
The step of detecting dirt on the optical system of the photographing apparatus compares the evaluation value background image with an evaluation value image created at an arbitrary time, and the evaluation value is applied to the pixels of the evaluation value image. When the distance information of the pixel is equal to the distance information of the distance background image on the condition that there is a pixel larger than that of the pixel, the step of designating the pixel as a dirty pixel and the imaging device based on the designated pixel And a step of determining contamination of the optical system.
JP2008305245A 2008-11-28 2008-11-28 Dirt detection device and method for detecting contamination of an imaging device Active JP5207057B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008305245A JP5207057B2 (en) 2008-11-28 2008-11-28 Dirt detection device and method for detecting contamination of an imaging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008305245A JP5207057B2 (en) 2008-11-28 2008-11-28 Dirt detection device and method for detecting contamination of an imaging device

Publications (2)

Publication Number Publication Date
JP2010130549A true JP2010130549A (en) 2010-06-10
JP5207057B2 JP5207057B2 (en) 2013-06-12

Family

ID=42330566

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008305245A Active JP5207057B2 (en) 2008-11-28 2008-11-28 Dirt detection device and method for detecting contamination of an imaging device

Country Status (1)

Country Link
JP (1) JP5207057B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150009296A1 (en) * 2013-07-03 2015-01-08 Kapsch Trafficcom Ab Method for identification of contamination upon a lens of a stereoscopic camera
WO2015128918A1 (en) * 2014-02-28 2015-09-03 パナソニックIpマネジメント株式会社 Imaging apparatus
JP2015179337A (en) * 2014-03-18 2015-10-08 株式会社リコー Image determination device, image processor, image determination program, image determination method, and mobile object
KR101839813B1 (en) 2015-07-29 2018-03-19 야마하하쓰도키 가부시키가이샤 Abnormal image detecting apparatus, image processing system with abnormal image detecting apparatus and vehicle mounted with image processing system
CN111008615A (en) * 2019-12-25 2020-04-14 京能源深(苏州)能源科技有限公司 Video monitoring-based method for inspecting surface pollution condition of roof photovoltaic module
WO2021149503A1 (en) * 2020-01-22 2021-07-29 ソニーセミコンダクタソリューションズ株式会社 Electronic device
CN117191809A (en) * 2023-08-30 2023-12-08 宿州绍宸智能科技有限公司 Glass detection equipment fault monitoring and early warning system based on data analysis

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09113263A (en) * 1995-10-18 1997-05-02 Nissan Motor Co Ltd Triangulation type passive range finder
JP2002032746A (en) * 2000-07-17 2002-01-31 Omron Corp Device and method for image processing
JP2003259358A (en) * 2002-03-06 2003-09-12 Nissan Motor Co Ltd Apparatus and method for detecting dirt on camera
JP2006157740A (en) * 2004-11-30 2006-06-15 Honda Motor Co Ltd Abnormality detecting device of image pickup apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09113263A (en) * 1995-10-18 1997-05-02 Nissan Motor Co Ltd Triangulation type passive range finder
JP2002032746A (en) * 2000-07-17 2002-01-31 Omron Corp Device and method for image processing
JP2003259358A (en) * 2002-03-06 2003-09-12 Nissan Motor Co Ltd Apparatus and method for detecting dirt on camera
JP2006157740A (en) * 2004-11-30 2006-06-15 Honda Motor Co Ltd Abnormality detecting device of image pickup apparatus

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150009296A1 (en) * 2013-07-03 2015-01-08 Kapsch Trafficcom Ab Method for identification of contamination upon a lens of a stereoscopic camera
US10432911B2 (en) * 2013-07-03 2019-10-01 Kapsch Trafficcom Ab Method for identification of contamination upon a lens of a stereoscopic camera
WO2015128918A1 (en) * 2014-02-28 2015-09-03 パナソニックIpマネジメント株式会社 Imaging apparatus
JP2015179337A (en) * 2014-03-18 2015-10-08 株式会社リコー Image determination device, image processor, image determination program, image determination method, and mobile object
KR101839813B1 (en) 2015-07-29 2018-03-19 야마하하쓰도키 가부시키가이샤 Abnormal image detecting apparatus, image processing system with abnormal image detecting apparatus and vehicle mounted with image processing system
CN111008615A (en) * 2019-12-25 2020-04-14 京能源深(苏州)能源科技有限公司 Video monitoring-based method for inspecting surface pollution condition of roof photovoltaic module
WO2021149503A1 (en) * 2020-01-22 2021-07-29 ソニーセミコンダクタソリューションズ株式会社 Electronic device
CN117191809A (en) * 2023-08-30 2023-12-08 宿州绍宸智能科技有限公司 Glass detection equipment fault monitoring and early warning system based on data analysis
CN117191809B (en) * 2023-08-30 2024-03-22 宿州绍宸智能科技有限公司 Glass detection equipment fault monitoring and early warning system based on data analysis

Also Published As

Publication number Publication date
JP5207057B2 (en) 2013-06-12

Similar Documents

Publication Publication Date Title
JP5207057B2 (en) Dirt detection device and method for detecting contamination of an imaging device
CN110632077B (en) Abnormality detection system for lens or lens cover of vision sensor
TWI484161B (en) Defect inspection system and filming device for defect inspection, image processing device for defect inspection, image processing program for defect inspection, recording media, and image processing method for defect inspection used therein
CN109100363B (en) Method and system for distinguishing defects of attached foreign matters from dust
US20090185716A1 (en) Dust detection system and digital camera
CN106604005A (en) Automatic projection TV focusing method and system
JP4245452B2 (en) Lens dirt determination method and apparatus
JP2012185149A (en) Defect inspection device and defect inspection processing method
KR20100025001A (en) Imaging device and method
JP4885471B2 (en) Method for measuring refractive index distribution of preform rod
JP6628185B2 (en) Inspection method for transparent objects
JP2009025050A (en) Quality discrimination device of visual field, quality discrimination method of visual field and computer program
KR101553707B1 (en) Image stain detection method for camera module defect determination
JP2021190515A (en) Workpiece left-over determination system
JP2008171142A (en) Spot defect detection method and device
JPH11108660A (en) Equipment for detecting distance
JP3870208B2 (en) Image processing method and inspection apparatus
JP2005140655A (en) Method of detecting stain flaw, and stain flaw detector
JP2003156451A (en) Defect detecting device
JP2014106141A (en) Defect inspection device and defect inspection method
JP5231779B2 (en) Appearance inspection device
CN111815705A (en) Laser tracker light filtering protective lens pollution identification method and device and electronic equipment
JP2019028004A (en) Three-dimensional measuring device and method for detecting abnormality in three-dimensional measuring device
JP3015325B2 (en) Streak inspection method and device
JP2021004748A (en) Appearance inspection management system, appearance inspection management device, appearance inspection management method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110802

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120717

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120807

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120919

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130206

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160301

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5207057

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150