JP7463159B2 - Droplet Detector - Google Patents

Droplet Detector Download PDF

Info

Publication number
JP7463159B2
JP7463159B2 JP2020056804A JP2020056804A JP7463159B2 JP 7463159 B2 JP7463159 B2 JP 7463159B2 JP 2020056804 A JP2020056804 A JP 2020056804A JP 2020056804 A JP2020056804 A JP 2020056804A JP 7463159 B2 JP7463159 B2 JP 7463159B2
Authority
JP
Japan
Prior art keywords
droplet
unit
pixel
pixel line
candidate region
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2020056804A
Other languages
Japanese (ja)
Other versions
JP2021158524A (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.)
Denso Ten Ltd
Original Assignee
Denso Ten Ltd
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 Denso Ten Ltd filed Critical Denso Ten Ltd
Priority to JP2020056804A priority Critical patent/JP7463159B2/en
Publication of JP2021158524A publication Critical patent/JP2021158524A/en
Application granted granted Critical
Publication of JP7463159B2 publication Critical patent/JP7463159B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、レンズに付着した液滴を検出する液滴検出装置に関する。 The present invention relates to a droplet detection device that detects droplets adhering to a lens.

車載カメラによって撮影された画像は、車室内のモニタに表示される。車載カメラにおいて、汚れがレンズに付着することがある。特許文献1は、車載カメラのレンズに付着した白濁を除去するレンズ洗浄装置を開示している。このレンズ洗浄装置は、車載カメラにより生成された画像の輝度勾配に基づいてレンズの表面の白濁度合いを算出する。レンズに付着する白濁は、例えば、車両が未舗装路を走行することにより巻き上げられる埃等である。このレンズ洗浄装置は、算出した白濁度合いに基づいて、洗浄液又は圧縮空気の噴射形態を変更する。 Images captured by the onboard camera are displayed on a monitor inside the vehicle. In onboard cameras, dirt can adhere to the lens. Patent Document 1 discloses a lens cleaning device that removes cloudiness that has adhered to the lens of an onboard camera. This lens cleaning device calculates the degree of cloudiness on the lens surface based on the luminance gradient of the image generated by the onboard camera. The cloudiness that adheres to the lens is, for example, dust stirred up when the vehicle travels on an unpaved road. This lens cleaning device changes the spray form of cleaning liquid or compressed air based on the calculated degree of cloudiness.

特開2014-27539号公報JP 2014-27539 A

特許文献1に係るレンズ洗浄装置は、レンズに付着した水滴を除去できない場合がある。水滴に含まれる不純物が非常に少ない場合、この水滴が白濁しないためである。 The lens cleaning device described in Patent Document 1 may not be able to remove water droplets that have adhered to the lens. This is because if the water droplets contain very few impurities, they do not become cloudy.

また、水滴等の液滴がレンズに付着した場合、車両周辺環境が、カメラにより撮影された画像において、液滴により歪んで表現される虞がある。従って、レンズに液滴が付着した時点で、レンズに付着した液滴を除去することが望ましい。 In addition, if water droplets or other liquid droplets adhere to the lens, the environment around the vehicle may be distorted in the image captured by the camera. Therefore, it is desirable to remove the liquid droplets from the lens as soon as they adhere to the lens.

そこで、上記問題点に鑑み、本発明は、レンズに付着した液滴を検出することができる液滴検出装置を提供することを目的とする。 In view of the above problems, the present invention aims to provide a droplet detection device that can detect droplets adhering to a lens.

上記課題を解決するため、第1の発明は、液滴検出装置であって、画像取得部と、候補
領域特定部と、液滴判断部とを備える。画像取得部は、カメラにより互いに異なる時刻に生成された複数の撮影画像を取得する。候補領域特定部は、画像取得部により取得された撮影画像における所定方向の映像信号のレベルの時間変化を所定の単位領域ごとに特定し、特定したレベルの時間変化と予め設定された液滴候補閾値との比較により液滴候補領域を特定する。液滴判断部は、候補領域特定部により特定された液滴候補領域の形状に基づいて、液滴がカメラのレンズに付着しているか否かを判断する。
In order to solve the above problems, a first invention is a droplet detection device comprising an image acquisition unit, a candidate region identification unit, and a droplet determination unit. The image acquisition unit acquires a plurality of captured images generated by a camera at different times . The candidate region identification unit identifies a time change in the level of a video signal in a predetermined direction in the captured images acquired by the image acquisition unit for each predetermined unit region, and identifies a droplet candidate region by comparing the identified time change in the level with a preset droplet candidate threshold. The droplet determination unit determines whether or not a droplet is attached to the camera lens based on the shape of the droplet candidate region identified by the candidate region identification unit.

第1の発明によれば、液滴検出装置は、レンズに付着した液滴を検出することができる。 According to the first invention, the droplet detection device can detect droplets adhering to a lens.

第2の発明は、第1の発明であって、候補領域特定部は、統計値特定部と、差分計算部と、領域判断部とを含む。統計値特定部は、所定方向の映像信号のレベルの最大値及び最小値を一の単位領域において特定する。差分計算部は、統計値特定部により特定された最大値と最小値との差分絶対値を一の単位領域におけるレベルの時間変化として計算する。領域判断部は、差分計算部により計算された差分絶対値を液滴候補閾値と比較した結果に基づいて、一の単位領域が液滴候補領域に含まれるか否かを判断する。
A second invention is the first invention, in which the candidate region identification unit includes a statistical value identification unit, a difference calculation unit, and a region determination unit. The statistical value identification unit identifies a maximum value and a minimum value of a level of a video signal in a predetermined direction in one unit region. The difference calculation unit calculates an absolute difference value between the maximum value and the minimum value identified by the statistical value identification unit as a time change in the level in one unit region. The region determination unit determines whether or not the one unit region is included in the droplet candidate region based on a result of comparing the absolute difference value calculated by the difference calculation unit with a droplet candidate threshold.

第2の発明によれば、一の単位領域におけるレベル変化を容易に特定することができる。 According to the second invention, it is possible to easily identify the level change in one unit area.

第3の発明は、第1の発明又は第2の発明であって、液滴判断部は、輪郭特定部と、距離計算部と、距離判断部とを含む。輪郭特定部は、液滴候補領域の輪郭を形成する輪郭画素の配列を作成する。距離計算部は、輪郭画素の数がNである場合、輪郭特定部により作成された輪郭画素の配列において、k(kは1以上N/2以下の自然数)番目の画素と、k+N/2番目の画素との距離を計算する。距離判断部は、距離計算部により計算された距離のばらつきに基づいて、液滴がカメラのレンズに付着しているか否かを判断する。 The third invention is the first or second invention, and the droplet determination unit includes a contour identification unit, a distance calculation unit, and a distance determination unit. The contour identification unit creates an array of contour pixels that form the contour of the droplet candidate region. When the number of contour pixels is N, the distance calculation unit calculates the distance between the kth pixel (k is a natural number between 1 and N/2) and the k+N/2th pixel in the array of contour pixels created by the contour identification unit. The distance determination unit determines whether or not a droplet is attached to the camera lens based on the variation in the distance calculated by the distance calculation unit.

第3の発明によれば、レンズに付着した液滴の形状を考慮して液滴がカメラのレンズに付着しているか否かを判断するので、液滴の検出精度を向上させることができる。 According to the third invention, whether or not a droplet is attached to the camera lens is determined by taking into account the shape of the droplet attached to the lens, thereby improving the accuracy of droplet detection.

第4の発明は、第1~第3のいずれか1つの発明であって、画像取得部は、画素ライン取得部と、画素ライン決定部と、合成部とを含む。画素ライン取得部は、カメラにより第1時刻に生成された第1撮影画像から、水平方向の第1画素ラインを取得し、カメラにより第2時刻に生成された第2撮影画像から、水平方向の第2画素ラインを取得する。画素ライン決定部は、画素ライン取得部が第1画素ラインを第1撮影画像から取得した場合、第1画素ラインの位置に基づいて第2画素ラインを決定し、決定した第2画素ラインを画素ライン取得部に通知する。合成部は、画素ライン取得部により取得された第1画素ラインと第2画素ラインとを含む合成画像を生成する。候補領域特定部は、合成部により生成された合成画像から液滴候補領域を特定する。
A fourth invention is any one of the first to third inventions, in which the image acquisition unit includes a pixel line acquisition unit, a pixel line determination unit, and a synthesis unit. The pixel line acquisition unit acquires a first pixel line in the horizontal direction from a first captured image generated by the camera at a first time, and acquires a second pixel line in the horizontal direction from a second captured image generated by the camera at a second time. When the pixel line acquisition unit acquires the first pixel line from the first captured image, the pixel line determination unit determines a second pixel line based on a position of the first pixel line, and notifies the pixel line acquisition unit of the determined second pixel line. The synthesis unit generates a synthesis image including the first pixel line and the second pixel line acquired by the pixel line acquisition unit. The candidate region identification unit identifies a droplet candidate region from the synthesis image generated by the synthesis unit.

第4の発明によれば、第1撮影画像及び第2撮影画像から生成された合成画像を用いて、液滴がレンズに付着したか否かを判断するため、1つの撮影画像から取得する情報量を抑制することができる。この結果、液滴検出装置の処理負荷が撮影画像を取得するたびに一時的に高くなることを防ぎつつ、液滴を検出することができる。 According to the fourth invention, a composite image generated from the first captured image and the second captured image is used to determine whether or not droplets have adhered to the lens, so the amount of information acquired from one captured image can be reduced. As a result, droplets can be detected while preventing the processing load of the droplet detection device from temporarily increasing each time a captured image is acquired.

第5の発明は、レンズに付着した液滴を検出する液滴検出方法であって、a)ステップと、b)ステップと、c)ステップとを備える。a)ステップは、カメラにより互いに異なる時刻に生成された複数の撮影画像を取得する。b)ステップは、取得された撮影画像における所定方向の映像信号のレベルの時間変化を所定の単位領域ごとに特定し、特定したレベルの時間変化と予め設定された液滴候補閾値との比較により液滴候補領域を特定する。c)ステップは、特定された液滴候補領域の形状に基づいて、液滴がカメラのレンズに付着しているか否かを判断する。
A fifth invention is a droplet detection method for detecting droplets adhering to a lens, comprising steps a), b), and c). In step a), a plurality of captured images generated by a camera at different times are acquired. In step b), a change over time in the level of a video signal in a predetermined direction in the acquired captured images is identified for each predetermined unit area, and a droplet candidate area is identified by comparing the change over time in the identified level with a preset droplet candidate threshold . In step c), it is determined whether or not a droplet is adhering to the camera lens based on the shape of the identified droplet candidate area.

第5の発明は、第1の発明に用いられる。 The fifth invention is used in the first invention.

本発明によれば、レンズに付着した液滴を検出することができる。 The present invention makes it possible to detect droplets adhering to a lens.

本発明の実施の形態に係る液滴除去システムの構成を示す機能ブロック図である。1 is a functional block diagram showing a configuration of a droplet removal system according to an embodiment of the present invention. 図1に示す液滴検出装置の構成を示す機能ブロック図である。FIG. 2 is a functional block diagram showing a configuration of the droplet detection device shown in FIG. 1 . 図2に示す候補領域特定部の構成を示す機能ブロック図である。3 is a functional block diagram showing a configuration of a candidate region identifying unit shown in FIG. 2 . 図2に示す液滴判断部の構成を示す機能ブロック図である。3 is a functional block diagram showing the configuration of a droplet determination unit shown in FIG. 2 . 図2に示す画像取得部の構成を示す機能ブロック図である。3 is a functional block diagram showing a configuration of an image acquisition unit shown in FIG. 2 . 図1に示す液滴検出装置の動作を示すフローチャート図1に示す画像取得部により取得された撮影画像の画素ラインの構成を示す図である。2 is a flowchart showing the operation of the liquid droplet detection device shown in FIG. 1; FIG. 3 is a diagram showing the configuration of pixel lines of a captured image acquired by the image acquisition unit shown in FIG. 1; 図6に示す合成画像生成処理(ステップS1)を説明する図である。FIG. 7 is a diagram for explaining the composite image generating process (step S1) shown in FIG. 6; 図7に示す合成画像に含まれる映像信号のレベルの時間変化の一例を示すグラフである。8 is a graph showing an example of a change over time in the level of a video signal included in the composite image shown in FIG. 7 . 図2に示す画像取得部により生成された合成画像に含まれる液滴候補領域の一例を示す図である。3 is a diagram showing an example of a droplet candidate region included in a composite image generated by the image acquisition unit shown in FIG. 2 . 図2に示す候補領域特定部5の動作を示すフローチャートである。3 is a flowchart showing the operation of a candidate region identifying unit 5 shown in FIG. 2 . 図9に示す液滴候補領域50aの拡大図である。FIG. 10 is an enlarged view of a droplet candidate region 50a shown in FIG. 9. 図9に示す液滴候補領域の輪郭画素から生成された配列を示す図である。10 is a diagram showing an array generated from contour pixels of the droplet candidate region shown in FIG. 9 . 図9に示す液滴候補領域50bの拡大図である。FIG. 10 is an enlarged view of a droplet candidate region 50b shown in FIG. 9. 図6に示す液滴判断部処理(ステップS3)を示すフローチャートである。7 is a flowchart showing the droplet determination unit process (step S3) shown in FIG. 6. 本発明の実施の形態の変形例に係る液滴検出装置の動作を示すフローチャートである。10 is a flowchart showing an operation of a liquid droplet detection device according to a modified example of an embodiment of the present invention. CPUバス構成を示す図である。FIG. 2 is a diagram showing a CPU bus configuration.

以下、図面を参照し、本発明の実施の形態を詳しく説明する。図中同一又は相当部分には同一符号を付してその説明は繰り返さない。 The following describes in detail an embodiment of the present invention with reference to the drawings. The same or corresponding parts in the drawings are designated by the same reference numerals and their description will not be repeated.

[1.液滴除去システム100の構成]
図1は、本発明の実施の形態に係る液滴除去システム100の構成を示す機能ブロック図である。液滴除去システム100は、カメラCと、液滴検出装置2と、液滴除去装置3とを備える。液滴除去システム100は、カメラCのレンズ上に付着する水滴等の液滴を除去する。
[1. Configuration of droplet removal system 100]
1 is a functional block diagram showing the configuration of a droplet removal system 100 according to an embodiment of the present invention. The droplet removal system 100 includes a camera C, a droplet detection device 2, and a droplet removal device 3. The droplet removal system 100 removes droplets such as water droplets adhering to the lens of the camera C.

カメラCは、例えば、車両の周囲に取り付けられる。車両は、例えば自動車である。カメラCは、車両の周囲を撮影して撮影画像1を生成する。撮影画像1は、アナログ形式の映像信号であり、例えば、コンポジット映像信号である。カメラCは、その生成した撮影画像1を車室内に設置された図示しない表示部に出力する。表示部は、例えば、カーナビゲーション装置のモニタである。車両の運転者や同乗者は、表示部に表示された撮影画像1により、車両の周囲を確認できる。 Camera C is attached, for example, around the vehicle. The vehicle is, for example, an automobile. Camera C captures the surroundings of the vehicle to generate captured image 1. Captured image 1 is an analog video signal, for example a composite video signal. Camera C outputs the generated captured image 1 to a display unit (not shown) installed inside the vehicle cabin. The display unit is, for example, a monitor of a car navigation device. The driver and passengers of the vehicle can check the surroundings of the vehicle from captured image 1 displayed on the display unit.

液滴検出装置2は、カメラCにより生成された撮影画像1を受け、その受けた撮影画像1に基づいて液滴がカメラCのレンズに付着しているか否かを判断する。液滴検出装置2は、液滴がカメラCのレンズに付着していると判断した場合、液滴除去装置3を駆動するための駆動信号2Aを出力する。 The droplet detection device 2 receives the captured image 1 generated by the camera C, and determines whether or not droplets are attached to the lens of the camera C based on the received captured image 1. If the droplet detection device 2 determines that droplets are attached to the lens of the camera C, it outputs a drive signal 2A for driving the droplet removal device 3.

液滴除去装置3は、駆動信号2Aを液滴検出装置2から受けた場合、例えば圧縮した空気をカメラCのレンズに向けて噴射する。圧縮空気がカメラCのレンズに噴射されることにより、レンズに付着した液滴が除去される。 When the droplet removal device 3 receives the drive signal 2A from the droplet detection device 2, it sprays, for example, compressed air toward the lens of the camera C. By spraying the compressed air toward the lens of the camera C, droplets adhering to the lens are removed.

[2.1.液滴検出装置2の構成]
図2は、図1に示す液滴検出装置2の構成を示す機能ブロック図である。図2を参照して、液滴検出装置2は、画像取得部4と、候補領域特定部5と、液滴判断部6とを備える。
[2.1. Configuration of droplet detection device 2]
Fig. 2 is a functional block diagram showing a configuration of the liquid droplet detection device 2 shown in Fig. 1. Referring to Fig. 2, the liquid droplet detection device 2 includes an image acquisition unit 4, a candidate region specification unit 5, and a liquid droplet determination unit 6.

画像取得部4は、カメラCにより生成された撮影画像1を取得する。具体的には、画像取得部4は、互いに異なる時刻に生成された複数の撮影画像1から合成画像4Aを生成し、その生成した合成画像4Aを、候補領域特定部5に出力する。合成画像4Aの生成については、後述する。 The image acquisition unit 4 acquires the captured image 1 generated by the camera C. Specifically, the image acquisition unit 4 generates a composite image 4A from a plurality of captured images 1 generated at different times, and outputs the generated composite image 4A to the candidate area identification unit 5. The generation of the composite image 4A will be described later.

候補領域特定部5は、合成画像4Aを画像取得部4から受け、その受けた合成画像4Aにおける所定方向の映像信号のレベル変化を所定の単位領域ごとに特定する。本実施の形態において、所定方向とは、合成画像4Aの水平走査方向である。所定の単位領域とは、画素である。候補領域特定部5は、特定したレベル変化に基づいて、合成画像4Aにおいて液滴候補領域50を特定する。映像信号のレベル変化及び液滴候補領域50の詳細については、後述する。 The candidate area identification unit 5 receives the composite image 4A from the image acquisition unit 4, and identifies the level change of the video signal in a predetermined direction in the received composite image 4A for each predetermined unit area. In this embodiment, the predetermined direction is the horizontal scanning direction of the composite image 4A. The predetermined unit area is a pixel. The candidate area identification unit 5 identifies a droplet candidate area 50 in the composite image 4A based on the identified level change. Details of the video signal level change and the droplet candidate area 50 will be described later.

液滴判断部6は、候補領域特定部5により特定された液滴候補領域50の形状に基づいて、液滴がカメラCのレンズに付着しているか否かを判断する。液滴判断部6は、液滴がカメラCのレンズに付着していると判断した場合、駆動信号2Aを液滴除去装置3に出力する。 The droplet determination unit 6 determines whether or not a droplet is attached to the lens of the camera C based on the shape of the droplet candidate region 50 identified by the candidate region identification unit 5. If the droplet determination unit 6 determines that a droplet is attached to the lens of the camera C, it outputs a drive signal 2A to the droplet removal device 3.

[2.2.画像取得部4の構成]
図3を参照して、画像取得部4は、画素ライン取得部7と、画素ライン決定部8と、合成部9とを含む。以下の説明において、水平走査方向に一列に並ぶ画素のラインを「画素ライン」と記載する。
[2.2. Configuration of image acquisition unit 4]
3, image acquisition unit 4 includes a pixel line acquisition unit 7, a pixel line determination unit 8, and a synthesis unit 9. In the following description, a line of pixels aligned in the horizontal scanning direction will be referred to as a "pixel line".

画素ライン取得部7は、カメラCにより第1時刻に生成された撮影画像1Aから、水平方向の第1画素ラインL1を取得し、カメラCにより第2時刻に生成された撮影画像1Bから、水平方向の第2画素ラインL2を取得する。第2時刻は、第1時刻よりも後の時刻である。 The pixel line acquisition unit 7 acquires a first horizontal pixel line L1 from a captured image 1A generated by the camera C at a first time, and acquires a second horizontal pixel line L2 from a captured image 1B generated by the camera C at a second time. The second time is a time later than the first time.

本実施の形態において、第1画素ラインL1は、撮影画像1Aの画素ラインのうち、上から数えて奇数番目の画素ラインである。第2画素ラインL2は、撮影画像1Bの画素ラインのうち、上から数えて偶数番目の画素ラインである。 In this embodiment, the first pixel line L1 is the odd-numbered pixel line counting from the top of the pixel lines in the captured image 1A. The second pixel line L2 is the even-numbered pixel line counting from the top of the pixel lines in the captured image 1B.

画素ライン取得部7は、第1画素ラインを取得した場合、取得した第1画素ラインL1の位置を示すライン位置情報71を画素ライン決定部8に出力する。画素ライン取得部7は、第2画素ラインL2を取得した場合、取得した第2画素ラインL2の位置を示すライン位置情報71を画素ライン決定部8に出力する。 When the pixel line acquisition unit 7 acquires a first pixel line, it outputs line position information 71 indicating the position of the acquired first pixel line L1 to the pixel line determination unit 8. When the pixel line acquisition unit 7 acquires a second pixel line L2, it outputs line position information 71 indicating the position of the acquired second pixel line L2 to the pixel line determination unit 8.

画素ライン取得部7は、次に取得すべき画素ラインを指定するライン指定情報72を画素ライン決定部8から受けた場合、受けたライン指定情報72により指定される画素ラインを、新たに取得した撮影画像1から取得する。画素ライン取得部7は、第1画素ラインL1と第2画素ラインL2との各々を取得するたびに、取得した第1画素ラインL1と第2画素ラインL2とを合成部9に出力する。 When the pixel line acquisition unit 7 receives line designation information 72 from the pixel line determination unit 8, which designates the next pixel line to be acquired, it acquires the pixel line designated by the received line designation information 72 from the newly acquired captured image 1. Each time the pixel line acquisition unit 7 acquires each of the first pixel line L1 and the second pixel line L2, it outputs the acquired first pixel line L1 and second pixel line L2 to the synthesis unit 9.

画素ライン決定部8は、ライン位置情報71を画素ライン取得部7から受けた場合、その受けたライン位置情報71により示される画素ラインの位置に基づいて、次に取得すべき画素ラインを決定する。具体的には、ライン位置情報71が第1画素ラインL1を示す場合、画素ライン決定部8は、画素ラインL2を次に取得することを決定する。ライン位置情報71が第2画素ラインL2を示す場合、画素ライン決定部8は、画素ラインL1を次に取得することを決定する。画素ライン決定部8は、決定した画素ラインを示すライン指定情報72を画素ライン取得部7に出力する。 When the pixel line determination unit 8 receives line position information 71 from the pixel line acquisition unit 7, it determines the next pixel line to be acquired based on the position of the pixel line indicated by the received line position information 71. Specifically, when the line position information 71 indicates the first pixel line L1, the pixel line determination unit 8 determines that the pixel line L2 is to be acquired next. When the line position information 71 indicates the second pixel line L2, the pixel line determination unit 8 determines that the pixel line L1 is to be acquired next. The pixel line determination unit 8 outputs line designation information 72 indicating the determined pixel line to the pixel line acquisition unit 7.

合成部9は、第1画素ラインL1と第2画素ラインL2とを、画素ライン取得部7から受け、その受けた第1画素ラインL1と第2画素ラインL2とを含む合成画像4Aを生成する。合成部9は、その生成した合成画像4Aを、候補領域特定部5に出力する。 The synthesis unit 9 receives the first pixel line L1 and the second pixel line L2 from the pixel line acquisition unit 7, and generates a synthetic image 4A including the received first pixel line L1 and second pixel line L2. The synthesis unit 9 outputs the generated synthetic image 4A to the candidate area identification unit 5.

[2.3.候補領域特定部5の構成]
図4を参照して、候補領域特定部5は、統計値特定部10と、差分計算部11と、領域判断部12とを含む。
[2.3. Configuration of candidate region identification unit 5]
With reference to FIG. 4, the candidate region identifying unit 5 includes a statistical value identifying unit 10 , a difference calculation unit 11 , and a region determination unit 12 .

統計値特定部10は、合成画像4Aを画像取得部4から受け、その受けた合成画像4Aに含まれる一の単位領域における画素信号の統計値を特定する。単位領域は、画素である。統計値は、水平走査方向における画像信号のレベルの最大値及び最小値である。 The statistical value determination unit 10 receives the composite image 4A from the image acquisition unit 4, and determines the statistical value of the pixel signal in one unit area contained in the received composite image 4A. The unit area is a pixel. The statistical value is the maximum and minimum values of the image signal level in the horizontal scanning direction.

具体的には、統計値特定部10は、合成画像4Aに含まれる一の画素ラインに対応する信号を画素ごとに区分し、画素ごとに区分された信号のレベルの最大値及び最小値を特定する。信号のレベルの最大値及び最小値は、合成画像4Aに含まれる全ての画素において特定される。統計値特定部10は、合成画像4Aに含まれる各画素の最大値及び最小値を含む統計値情報101を差分計算部11に出力する。 Specifically, the statistical value determination unit 10 divides a signal corresponding to one pixel line included in the composite image 4A into pixel units, and determines the maximum and minimum values of the signal level divided into pixel units. The maximum and minimum values of the signal level are determined for all pixels included in the composite image 4A. The statistical value determination unit 10 outputs statistical value information 101 including the maximum and minimum values of each pixel included in the composite image 4A to the difference calculation unit 11.

差分計算部11は、統計値特定部10により特定された一の単位領域における最大値と最小値との差分絶対値を一の単位領域におけるレベル最大変化量として計算する。具体的には、差分計算部11は、統計値情報101を統計値特定部10から受け、その受けた統計値情報101を用いて、合成画像4Aに含まれる各画素のレベル最大変化量を計算する。レベル最大変化量は、一の画素における信号のレベルの最大値から信号のレベルの最小値を減算することにより得られる。差分計算部11は、合成画像4Aに含まれる各画素のレベル最大変化量を記録したレベル変化情報111を領域判断部12に出力する。 The difference calculation unit 11 calculates the absolute difference between the maximum and minimum values in one unit area identified by the statistical value identification unit 10 as the maximum level change amount in one unit area. Specifically, the difference calculation unit 11 receives statistical value information 101 from the statistical value identification unit 10, and uses the received statistical value information 101 to calculate the maximum level change amount of each pixel included in the composite image 4A. The maximum level change amount is obtained by subtracting the minimum signal level value from the maximum signal level value in one pixel. The difference calculation unit 11 outputs level change information 111 recording the maximum level change amount of each pixel included in the composite image 4A to the area determination unit 12.

領域判断部12は、差分計算部11により特定された一の単位領域の差分絶対値を所定の液滴候補閾値と比較し、その比較結果に基づいて、一の単位領域が液滴候補領域に含まれるか否かを判断する。所定の液滴候補閾値は、一の単位領域が液滴に対応する場合に取得されるレベル最大変化量に基づいて決定される。 The area determination unit 12 compares the absolute difference value of a unit area identified by the difference calculation unit 11 with a predetermined droplet candidate threshold, and determines whether or not the unit area is included in the droplet candidate area based on the comparison result. The predetermined droplet candidate threshold is determined based on the maximum level change amount obtained when the unit area corresponds to a droplet.

具体的には、領域判断部12は、レベル変化情報111を差分計算部11から受ける。領域判断部12は、その受けたレベル変化情報111に記録された各画素のレベル最大変化量を液滴候補閾値と比較する。領域判断部12は、その比較結果に基づいて、合成画像4Aに含まれる各画素が液滴候補領域に含まれるか否かを判断する。領域判断部12は、合成画像4Aの各画素が液滴候補領域に含まれるか否かの判断結果に基づいて、合成画像4Aにおける液滴候補領域50を特定する。 Specifically, the area determination unit 12 receives the level change information 111 from the difference calculation unit 11. The area determination unit 12 compares the maximum level change amount of each pixel recorded in the received level change information 111 with the droplet candidate threshold. Based on the comparison result, the area determination unit 12 determines whether each pixel included in the composite image 4A is included in the droplet candidate region. The area determination unit 12 identifies the droplet candidate region 50 in the composite image 4A based on the determination result of whether each pixel in the composite image 4A is included in the droplet candidate region.

[2.4.液滴判断部6の構成]
図5を参照して、液滴判断部6は、輪郭特定部13と、距離計算部14と、距離判断部15とを含む。
[2.4. Configuration of droplet determination unit 6]
With reference to FIG. 5, droplet determination unit 6 includes an outline specifying unit 13 , a distance calculation unit 14 , and a distance determination unit 15 .

輪郭特定部13は、液滴候補領域50を候補領域特定部5から受け、その受けた液滴候補領域50の輪郭を形成する輪郭画素を特定する。輪郭特定部13は、特定した輪郭画素の配列131を作成する輪郭特定部13は、その作成した輪郭画素の配列131を、距離計算部14に出力する。 The contour identification unit 13 receives the droplet candidate region 50 from the candidate region identification unit 5, and identifies the contour pixels that form the contour of the received droplet candidate region 50. The contour identification unit 13 creates an array 131 of the identified contour pixels. The contour identification unit 13 outputs the created array 131 of contour pixels to the distance calculation unit 14.

距離計算部14は、輪郭画素の配列131を輪郭特定部13から受け、その受けた配列131に含まれる輪郭画素のうち、所定の条件を満たす2つの画素の距離を暫定対向距離141として計算する。具体的には、輪郭画素の数がNである場合、距離計算部14は、配列131において、k番目の画素と、(k+N/2)番目の画素とを特定する。距離計算部14は、特定した2つの画素の距離を暫定対向距離141として計算する。k番目の画素と(k+N/2)番目の画素とは、輪郭画素の形状が円形であると仮定した場合に対向すると想定される画素である。kは1以上N/2以下の自然数である。N/2通りの画素の組み合わせが考えられるため、距離計算部14は、暫定対向距離141の計算をN/2回繰り返す。 The distance calculation unit 14 receives the array 131 of contour pixels from the contour identification unit 13, and calculates the distance between two pixels that satisfy a predetermined condition among the contour pixels included in the received array 131 as the provisional opposing distance 141. Specifically, when the number of contour pixels is N, the distance calculation unit 14 identifies the kth pixel and the (k+N/2)th pixel in the array 131. The distance calculation unit 14 calculates the distance between the two identified pixels as the provisional opposing distance 141. The kth pixel and the (k+N/2)th pixel are pixels that are assumed to be opposing when it is assumed that the contour pixels have a circular shape. k is a natural number between 1 and N/2. Since there are N/2 possible pixel combinations, the distance calculation unit 14 repeats the calculation of the provisional opposing distance 141 N/2 times.

距離判断部15は、暫定対向距離141を距離計算部14から受け、その受けた暫定対向距離141の統計的ばらつきに基づいて、液滴がカメラCのレンズに付着しているか否かを判断する。距離判断部15は、液滴がカメラCのレンズに付着している場合、駆動信号2Aを液滴除去装置3に出力して、カメラCのレンズに付着した液滴を液滴除去装置3に除去させる。 The distance determination unit 15 receives the provisional facing distance 141 from the distance calculation unit 14, and determines whether or not droplets are attached to the lens of the camera C based on the statistical variation of the received provisional facing distance 141. If droplets are attached to the lens of the camera C, the distance determination unit 15 outputs a drive signal 2A to the droplet removal device 3 to cause the droplet removal device 3 to remove the droplets attached to the lens of the camera C.

[3.動作]
[3.1.液滴検出装置2の動作]
図6は、図1に示す液滴検出装置2の動作を示すフローチャートである。液滴検出装置2は、カメラCが撮影画像1の生成を開始した場合、図6に示す処理を開始する。
[3. motion]
[3.1. Operation of Droplet Detection Device 2]
Fig. 6 is a flow chart showing the operation of the liquid droplet detection device 2 shown in Fig. 1. When the camera C starts generating the photographed image 1, the liquid droplet detection device 2 starts the process shown in Fig. 6.

図6を参照して、画像取得部4は、カメラCにより生成された複数の撮影画像1を用いて合成画像4Aを生成する(ステップS1)。候補領域特定部5は、ステップS1で生成された合成画像4Aにおける液滴候補領域50を特定する(ステップS2)。液滴判断部6は、ステップS2で特定された液滴候補領域50の形状に基づいて、液滴がカメラCのレンズに付着しているか否かを判断する(ステップS3)。液滴判断部6は、液滴がカメラCのレンズに付着していると判断した場合、液滴除去装置3を駆動させる。 Referring to FIG. 6, the image acquisition unit 4 generates a composite image 4A using multiple captured images 1 generated by the camera C (step S1). The candidate area identification unit 5 identifies a droplet candidate area 50 in the composite image 4A generated in step S1 (step S2). The droplet determination unit 6 determines whether or not a droplet is attached to the lens of the camera C based on the shape of the droplet candidate area 50 identified in step S2 (step S3). If the droplet determination unit 6 determines that a droplet is attached to the lens of the camera C, it drives the droplet removal device 3.

液滴検出装置2は、カメラCが撮影画像1の生成を終了したか否かを判断する(ステップS4)。カメラCが撮影画像1の生成を継続している場合(ステップS4においてYes)、液滴検出装置2は、ステップS1に戻る。カメラCが撮影画像1の生成を終了している場合(ステップS4においてNo)、液滴検出装置2は、図6に示す処理を終了する。 The droplet detection device 2 determines whether the camera C has finished generating the captured image 1 (step S4). If the camera C is continuing to generate the captured image 1 (Yes in step S4), the droplet detection device 2 returns to step S1. If the camera C has finished generating the captured image 1 (No in step S4), the droplet detection device 2 ends the process shown in FIG. 6.

[3.2.合成画像4Aの生成(ステップS1)]
図7は、図6に示す合成画像生成処理(ステップS1)を説明する図である。図7に示す例では、合成画像4Aは、撮影画像1A及び撮影画像1Bから生成される。合成画像4Aのサイズは、撮影画像1A及び1Bのサイズと同じである。撮影画像1Aは、時刻t1において、カメラCにより生成される。撮影画像1Bは、時刻t1より後の時刻t2において、カメラCにより生成される。撮影画像1Bは、撮影画像1Aの次のフレームである。
[3.2. Generation of composite image 4A (step S1)]
Fig. 7 is a diagram for explaining the composite image generating process (step S1) shown in Fig. 6. In the example shown in Fig. 7, a composite image 4A is generated from photographed images 1A and 1B. The size of the composite image 4A is the same as the size of the photographed images 1A and 1B. The photographed image 1A is generated by the camera C at time t1. The photographed image 1B is generated by the camera C at time t2, which is after time t1. The photographed image 1B is the next frame of the photographed image 1A.

撮影画像1Aは、画素ラインLa1~La10を含む。画素ラインLa1は、撮影画像1Aの上端に位置する。画素ラインLa2は、画素ラインLa1の下に隣接する。画素ラインLa10は、撮影画像1Aの下端に位置する。 The captured image 1A includes pixel lines La1 to La10. Pixel line La1 is located at the top of the captured image 1A. Pixel line La2 is adjacent to and below pixel line La1. Pixel line La10 is located at the bottom of the captured image 1A.

撮影画像1Bは、画素ラインLb1~Lb10を含む。画素ラインLb1~Lb10の位置は、画素ラインLa1~La10の位置に対応する。 Captured image 1B includes pixel lines Lb1 to Lb10. The positions of pixel lines Lb1 to Lb10 correspond to the positions of pixel lines La1 to La10.

画素ライン取得部7は、撮影画像1AをカメラCから受けた場合、撮影画像1Aから第1画素ラインを取得する。第1画素ラインは、撮影画像1の上から数えて、奇数番目の画素ラインである。具体的には、撮影画像1Aにおける第1画素ラインは、画素ラインLa1,La3,・・・,La9である。画素ライン取得部7は、取得した画素ラインLa1,La3,・・・,La9の位置を示すライン位置情報71を画素ライン決定部8に出力する。画素ライン取得部7は、撮影画像1BをカメラCから受けるまで待機する。 When the pixel line acquisition unit 7 receives the captured image 1A from the camera C, it acquires the first pixel line from the captured image 1A. The first pixel line is the odd-numbered pixel line counting from the top of the captured image 1. Specifically, the first pixel line in the captured image 1A is pixel line La1, La3, ..., La9. The pixel line acquisition unit 7 outputs line position information 71 indicating the positions of the acquired pixel lines La1, La3, ..., La9 to the pixel line determination unit 8. The pixel line acquisition unit 7 waits until it receives the captured image 1B from the camera C.

画素ライン決定部8は、第1画素ラインを示すライン位置情報71に基づいて、撮影画像1Bから取得すべき画素ラインを決定する。具体的には、ライン位置情報71が第1画素ラインを示すため、画素ライン決定部8は、第2画素ラインを撮影画像1Bから取得することを決定する。第2画素ラインは、撮影画像1Bにおいて偶数番目の画素ラインである。撮影画像1Bにおいて、第2画素ラインは、画素ラインLb2,Lb4,・・・,Lb10である。画素ライン決定部8は、画素ラインLb2,Lb4,・・・,Lb10を示すライン指定情報72を画素ライン取得部7に出力する。 The pixel line determination unit 8 determines the pixel line to be acquired from the captured image 1B based on the line position information 71 indicating the first pixel line. Specifically, because the line position information 71 indicates the first pixel line, the pixel line determination unit 8 determines to acquire the second pixel line from the captured image 1B. The second pixel line is an even-numbered pixel line in the captured image 1B. In the captured image 1B, the second pixel line is pixel line Lb2, Lb4, ..., Lb10. The pixel line determination unit 8 outputs line designation information 72 indicating pixel lines Lb2, Lb4, ..., Lb10 to the pixel line acquisition unit 7.

画素ライン取得部7は、撮影画像1BをカメラCから受けた場合、第2画素ラインを指定するライン指定情報72に基づいて、画素ラインLb2,Lb4,・・・L10を撮影画像1Bから取得する。 When the pixel line acquisition unit 7 receives the captured image 1B from the camera C, it acquires pixel lines Lb2, Lb4, ..., L10 from the captured image 1B based on line designation information 72 that designates the second pixel line.

合成部9は、第1画素ラインと第2画素ラインを画素ライン取得部7から受け、その受けた第1画素ラインL1と第2画素ラインL2とを含む合成画像4Aを生成する。具体的には、合成部9は、撮影画像1Aから取得された画素ラインLa1,La3,・・・,La9を、合成画像4Aにおける奇数番目の画素ラインに配置する。合成部9は、撮影画像1Bから取得された画素ラインLb2,Lb4,・・・,Lb10を、合成画像4Aにおける偶数番目の画素ラインに配置する。 The synthesis unit 9 receives the first pixel line and the second pixel line from the pixel line acquisition unit 7, and generates a synthetic image 4A including the received first pixel line L1 and second pixel line L2. Specifically, the synthesis unit 9 arranges the pixel lines La1, La3, ..., La9 acquired from the photographed image 1A on odd-numbered pixel lines in the synthetic image 4A. The synthesis unit 9 arranges the pixel lines Lb2, Lb4, ..., Lb10 acquired from the photographed image 1B on even-numbered pixel lines in the synthetic image 4A.

つまり、合成部9は、撮影画像1A及び1Bにおける画素ラインの位置と同じ合成画像4Aの位置に、第1画素ライン及び第2画素ラインの各々を配置する。図7に示すように、撮影画像1Aの画素ラインと、撮影画像1Bの画素ラインとが、合成画像4Aにおいて交互に配置される。 In other words, the synthesis unit 9 places the first pixel line and the second pixel line at the same positions in the synthetic image 4A as the positions of the pixel lines in the captured images 1A and 1B. As shown in FIG. 7, the pixel lines of the captured image 1A and the pixel lines of the captured image 1B are alternately arranged in the synthetic image 4A.

画像取得部4は、撮影画像1A及び1Bから合成画像4Aを生成した後に、上記の処理を繰り返す。合成画像4Aのフレーム間隔は、撮影画像1のフレーム間隔の2倍である。 After generating a composite image 4A from the captured images 1A and 1B, the image acquisition unit 4 repeats the above process. The frame interval of the composite image 4A is twice the frame interval of the captured image 1.

なお、画像取得部4は、3以上の撮影画像1を用いて合成画像を生成してもよい。この場合であっても、合成部9は、撮影画像1から取得された画素ラインの位置と、合成画像4Aに配置される画素ラインの位置とは同じである。合成画像4Aが、6つの撮影画像1Aから生成される場合、合成画像4Aのフレーム間隔は、撮影画像1のフレーム間隔の6倍である。 The image acquisition unit 4 may generate a composite image using three or more captured images 1. Even in this case, the position of the pixel line acquired by the synthesis unit 9 from the captured images 1 is the same as the position of the pixel line arranged in the composite image 4A. When the composite image 4A is generated from six captured images 1A, the frame interval of the composite image 4A is six times the frame interval of the captured images 1.

[3.3.液滴候補領域の特定]
候補領域特定部5は、合成画像4Aに含まれる各画素が液滴候補領域に含まれるか否かを判断する。これにより、合成画像4Aに含まれる各画素が液滴候補領域に含まれるか否かが判断される。
[3.3. Identification of droplet candidate regions]
The candidate region identifying unit 5 determines whether or not each pixel included in the composite image 4A is included in a droplet candidate region. In this way, it is determined whether or not each pixel included in the composite image 4A is included in a droplet candidate region.

[3.3.1.各画素の信号の取得]
統計値特定部10が、合成部9から合成画像4Aを取得し、取得した合成画像4Aに含まれる各画素の統計値を取得する。統計値は、具体的には、最大値及び最小値である。
[3.3.1. Acquisition of signals from each pixel]
The statistical value specification unit 10 acquires the composite image 4A from the composition unit 9, and acquires the statistical value of each pixel included in the acquired composite image 4A. Specifically, the statistical value is a maximum value and a minimum value.

統計値特定部10は、合成画像4Aに含まれる各画素のレベルの最大値及び最小値を特定するにあたり、合成画像4Aに含まれる各画素の信号を取得する。合成画像4Aに含まれる各画素の信号は、アナログ形式の映像信号である。合成画像4Aが、アナログ形式の映像信号である撮影画像1から生成されるためである。以下、図7に示す画素ラインLa1及びLb2を例として、各画素の信号を取得する統計値特定部10の動作を説明する。 When identifying the maximum and minimum levels of each pixel included in the composite image 4A, the statistical value identification unit 10 acquires the signal of each pixel included in the composite image 4A. The signal of each pixel included in the composite image 4A is an analog video signal. This is because the composite image 4A is generated from the captured image 1, which is an analog video signal. Below, the operation of the statistical value identification unit 10 that acquires the signal of each pixel will be described using pixel lines La1 and Lb2 shown in Figure 7 as an example.

なお、画素ラインLa1は、画素P1~P10を含む。画素P1は、画素ラインLa1の左端に位置する。画素Pmは、画素Pm+1の左に隣接する。mは、1以上R-1以下の整数である。Rは、画素ラインLa1に含まれる画素数であり、図7に示す例では10である。画素P10は、画素ラインLa1の右端に位置する。 Note that pixel line La1 includes pixels P1 to P10. Pixel P1 is located at the left end of pixel line La1. Pixel Pm is adjacent to pixel Pm+1 on the left. m is an integer between 1 and R-1. R is the number of pixels included in pixel line La1, which is 10 in the example shown in FIG. 7. Pixel P10 is located at the right end of pixel line La1.

統計値特定部10は、合成画像4Aの垂直同期信号を取得した場合、画素ラインLa1の信号の取得を開始するとともに、その受けた合成画像4Aの水平同期信号のカウントを開始する。画素ラインLa1は、合成画像4Aの映像信号のうち、垂直同期信号を取得した時刻から1回目の水平同期信号の時刻までの期間における信号に相当する。従って、統計値特定部10は、1回目の水平同期信号を取得した時刻に、画素ラインLa1の信号の取得を終了する。統計値特定部10は、画素ラインLa1の映像信号を画素ごとに区分することにより、画素ラインLa1に含まれる画素P1~P10の各々に対応する信号を取得する。 When the statistical value identification unit 10 acquires the vertical synchronization signal of the composite image 4A, it starts acquiring the signal of pixel line La1 and starts counting the horizontal synchronization signal of the received composite image 4A. Pixel line La1 corresponds to the signal in the video signal of the composite image 4A during the period from the time when the vertical synchronization signal is acquired to the time of the first horizontal synchronization signal. Therefore, the statistical value identification unit 10 stops acquiring the signal of pixel line La1 at the time when the first horizontal synchronization signal is acquired. The statistical value identification unit 10 acquires signals corresponding to each of the pixels P1 to P10 included in pixel line La1 by dividing the video signal of pixel line La1 by pixel.

図8は、合成画像4Aに含まれる映像信号のレベルの時間変化の一例を示すグラフである。図8を参照して、時刻t0が、合成画像4Aの垂直同期信号の時刻である。時刻t3が、合成画像4Aにおける1回目の水平同期信号の時刻である。従って、時刻t0から時刻t3までの期間TLが、画素ラインLa1の映像信号に相当する。 Figure 8 is a graph showing an example of the change over time in the level of the video signal contained in the composite image 4A. With reference to Figure 8, time t0 is the time of the vertical synchronization signal of the composite image 4A. Time t3 is the time of the first horizontal synchronization signal in the composite image 4A. Therefore, the period TL from time t0 to time t3 corresponds to the video signal of pixel line La1.

統計値特定部10は、画素ラインLa1の信号を1画素あたりの時間で区分することにより、画素P1~P10の信号を取得する。1画素あたりの時間は、1水平走査期間である期間TLを水平走査方向における画素の数で除することにより得られる。統計値特定部10は、時刻t0から時刻t1までの期間Taの信号を、画素P1の信号として取得する。統計値特定部10は、時刻t1から時刻t2までの期間Tbの信号を、画素P2の信号として取得する。図8では、画素P3~画素P10の信号の表示を省略している。 The statistical value identification unit 10 acquires the signals of pixels P1 to P10 by dividing the signal of pixel line La1 by the time per pixel. The time per pixel is obtained by dividing the period TL, which is one horizontal scanning period, by the number of pixels in the horizontal scanning direction. The statistical value identification unit 10 acquires the signal for period Ta, from time t0 to time t1, as the signal of pixel P1. The statistical value identification unit 10 acquires the signal for period Tb, from time t1 to time t2, as the signal of pixel P2. In Figure 8, the signals of pixels P3 to P10 are not shown.

なお、統計値特定部10は、合成画像4Aのうち、1回目の水平同期信号の時刻から2回目の水平同期信号の時刻までの信号を、画素ラインLb2として取得する。合成画像4Aに含まれる他の画素ラインの信号も、画素ラインLb2と同様に取得される。 The statistical value determination unit 10 acquires the signal from the time of the first horizontal synchronization signal to the time of the second horizontal synchronization signal in the composite image 4A as pixel line Lb2. The signals of the other pixel lines included in the composite image 4A are also acquired in the same manner as pixel line Lb2.

[3.3.2.統計値の取得]
統計値特定部10は、合成画像4Aに含まれる画素から一の画素を選択し、選択した画素の信号のレベルの最大値及び最小値を取得する。以下、液滴検出装置2の動作の説明において、図8を参照しながら、統計値特定部10の動作を説明する。
[3.3.2. Obtaining Statistics]
The statistical value determination unit 10 selects one pixel from the pixels included in the composite image 4A, and obtains the maximum and minimum values of the signal level of the selected pixel. In the following description of the operation of the droplet detection device 2, the operation of the statistical value determination unit 10 will be described with reference to FIG.

統計値特定部10は、画素P1の統計値として最大値A1及び最小値A2を特定する。期間Taが画素P1に対応するためである。統計値特定部10は、画素P1の最大値及び最小値を記録した統計値情報101を差分計算部11に出力する。 The statistical value determination unit 10 determines the maximum value A1 and the minimum value A2 as the statistical values of pixel P1. This is because the period Ta corresponds to pixel P1. The statistical value determination unit 10 outputs statistical value information 101 that records the maximum and minimum values of pixel P1 to the difference calculation unit 11.

画素P2が選択された場合、統計値特定部10は、画素P2に対応する信号のレベルの統計値として、最大値A3及び最小値A4を特定する。期間Tbが画素P2に対応するためである。統計値特定部10は、画素P1及びP2と同様に、合成画像4Aに含まれる他の画素の統計値を特定する。 When pixel P2 is selected, the statistical value identification unit 10 identifies a maximum value A3 and a minimum value A4 as statistical values of the signal level corresponding to pixel P2. This is because period Tb corresponds to pixel P2. The statistical value identification unit 10 identifies statistical values of other pixels included in the composite image 4A, similar to pixels P1 and P2.

[3.3.3.レベル最大変化量の計算]
差分計算部11は、統計値特定部10から受けた画素P1の統計値情報101に基づいて、画素P1のレベル最大変化量を計算する。以下、画素P1及びP2を例として差分計算部11の動作を説明する。
[3.3.3. Calculation of maximum level change amount]
The difference calculation unit 11 calculates the maximum amount of change in level of the pixel P1 based on the statistical value information 101 of the pixel P1 received from the statistical value specification unit 10. Hereinafter, the operation of the difference calculation unit 11 will be described using pixels P1 and P2 as an example.

差分計算部11は、画素P1の最大値A1及び最小値A2を統計値情報101から取得する。差分計算部11は、その取得した最大値A1と最小値A2との差分絶対値を画素P1のレベル最大変化量として計算する。差分計算部11は、画素P1のレベル最大変化量と画素P1の位置とを紐づけたレベル変化情報111を生成する。なお、画素P2のレベル最大変化量は、最大値A3と最小値A4の差分絶対値である。統計値特定部10は、画素P1及びP2と同様に、合成画像4Aに含まれる他の画素のレベル最大変化量を計算する。 The difference calculation unit 11 acquires the maximum value A1 and minimum value A2 of pixel P1 from the statistical value information 101. The difference calculation unit 11 calculates the absolute difference between the acquired maximum value A1 and minimum value A2 as the maximum level change amount of pixel P1. The difference calculation unit 11 generates level change information 111 that links the maximum level change amount of pixel P1 with the position of pixel P1. Note that the maximum level change amount of pixel P2 is the absolute difference value between the maximum value A3 and minimum value A4. The statistical value identification unit 10 calculates the maximum level change amounts of other pixels included in the composite image 4A in the same way as pixels P1 and P2.

[3.3.4.液滴候補閾値との比較]
領域判断部12は、レベル変化情報111に記録されたレベル最大変化量に基づいて、合成画像4Aに含まれる各画素が液滴候補領域に含まれるか否かを判断する。以下、画素P1を例として領域判断部12の動作を説明する。
3.3.4. Comparison with Droplet Candidate Threshold
The region determination unit 12 determines whether or not each pixel included in the composite image 4A is included in a droplet candidate region, based on the maximum level change amount recorded in the level change information 111. The operation of the region determination unit 12 will be described below using pixel P1 as an example.

領域判断部12は、差分計算部11から受けたレベル変化情報111から画素P1のレベル最大変化量を取得し、取得したレベル最大変化量を予め設定された液滴候補閾値と比較する。画素P1のレベル最大変化量が液滴候補閾値よりも小さい場合、領域判断部12は、画素P1が液滴候補領域に含まれると判断する。液滴がカメラCのレンズに付着した場合、液滴が付着した位置に対応する画素の信号のレベル最大変化量が小さくなる傾向にあるためである。画素P1のレベル最大変化量が液滴候補閾値を超える場合、領域判断部12は、画素P1が背景領域に含まれると判断する。なお、背景領域は、合成画像において液滴が付着していない領域である。 The area determination unit 12 obtains the maximum level change amount of pixel P1 from the level change information 111 received from the difference calculation unit 11, and compares the obtained maximum level change amount with a preset droplet candidate threshold. If the maximum level change amount of pixel P1 is smaller than the droplet candidate threshold, the area determination unit 12 determines that pixel P1 is included in the droplet candidate area. This is because when a droplet adheres to the lens of camera C, the maximum level change amount of the signal of the pixel corresponding to the position where the droplet adheres tends to be small. If the maximum level change amount of pixel P1 exceeds the droplet candidate threshold, the area determination unit 12 determines that pixel P1 is included in the background area. Note that the background area is an area in the composite image where no droplets are attached.

画素P1が液滴候補領域に含まれるか否かの判断がされた後に、統計値取得部10は、新たな画素(例えば、画素P2)を選択する。画素P1と同様に、選択された画素のレベル最大変化量に基づいて、選択された画素が液滴候補領域に含まれるか否かが判断される。 After determining whether pixel P1 is included in the droplet candidate region, the statistical value acquisition unit 10 selects a new pixel (e.g., pixel P2). As with pixel P1, it is determined whether the selected pixel is included in the droplet candidate region based on the maximum level change amount of the selected pixel.

[3.3.5.液滴候補領域の決定]
領域判断部12は、合成画像4Aに含まれる各画素が液滴候補領域に含まれるか否かを判断した結果に基づいて、合成画像4Aにおける液滴候補領域を特定する。以下の説明において、液滴候補領域に含まれると判断された画素を「候補画素」と記載する。
[3.3.5. Determination of droplet candidate regions]
The region determination unit 12 identifies a droplet candidate region in the composite image 4A based on the result of determining whether each pixel included in the composite image 4A is included in the droplet candidate region. In the following description, a pixel determined to be included in a droplet candidate region will be referred to as a "candidate pixel."

図9は、画像取得部4により生成された合成画像4Aに含まれる液滴候補領域の一例を示す図である。図9を例にして、液滴候補領域を決定する領域判断部12の動作を説明する。 Figure 9 is a diagram showing an example of a droplet candidate region included in a composite image 4A generated by the image acquisition unit 4. Using Figure 9 as an example, the operation of the region determination unit 12 that determines the droplet candidate region will be explained.

領域判断部12は、候補画素が連続する領域をラベリング処理により特定し、特定した領域を液滴候補領域に決定する。図9において、候補画素が連続する領域は、画素Pa1~Pa18により囲まれた領域50aと、画素Pb1~Pb12からなる領域50bである。領域判断部12は、領域50a及び50bの各々を液滴候補領域に決定する。領域50aは、カメラCのレンズに付着した雨滴に対応する。領域50bは、道路に描かれた白線に対応する。図9に示す領域50aにおいて、画素Pa1~Pa18を除く画素の表示を省略している。後述する図11及び図13についても同様である。 The region determination unit 12 identifies a region where candidate pixels are consecutive by a labeling process, and determines the identified region as a droplet candidate region. In FIG. 9, the region where candidate pixels are consecutive is region 50a surrounded by pixels Pa1 to Pa18, and region 50b consisting of pixels Pb1 to Pb12. The region determination unit 12 determines each of regions 50a and 50b as a droplet candidate region. Region 50a corresponds to a raindrop adhering to the lens of camera C. Region 50b corresponds to a white line drawn on the road. In region 50a shown in FIG. 9, pixels other than pixels Pa1 to Pa18 are omitted from the display. The same applies to FIG. 11 and FIG. 13 described below.

以下の説明において、領域50aを「液滴候補領域50a」と記載し、領域50bを「液滴候補領域50b」と記載する。 詳細については後述するが、一の液滴候補領域に含まれる画素群が所定の条件を満たす場合、一の液滴候補領域は、フロントガラスに付着した雨滴であると判断される。 In the following description, region 50a will be referred to as "droplet candidate region 50a" and region 50b will be referred to as "droplet candidate region 50b." Details will be described later, but if a group of pixels contained in one droplet candidate region meets a predetermined condition, the one droplet candidate region is determined to be a raindrop on the windshield.

[3.3.6.候補領域特定部5の動作]
図10は、図2に示す候補領域特定部5の動作を示すフローチャートである。候補領域特定部5は、合成画像4Aを画像取得部4から受けた場合、図10に示す処理を開始する。
[3.3.6. Operation of candidate region identification unit 5]
Fig. 10 is a flowchart showing the operation of the candidate region identifying section 5 shown in Fig. 2. When the candidate region identifying section 5 receives the composite image 4A from the image acquisition section 4, it starts the process shown in Fig. 10.

図10を参照して、統計値特定部10は、合成画像4Aに含まれる各画素の信号を取得する(ステップS201)。 Referring to FIG. 10, the statistical value determination unit 10 acquires the signal of each pixel included in the composite image 4A (step S201).

統計値特定部10は、合成画像4Aに含まれる画素のうち一つを選択する(ステップS202)。 The statistical value determination unit 10 selects one of the pixels contained in the composite image 4A (step S202).

統計値特定部10は、ステップS202で選択した画素の信号のレベルの最大値及び最小値を特定する(ステップS203)。 The statistical value determination unit 10 determines the maximum and minimum signal levels of the pixels selected in step S202 (step S203).

差分計算部11は、ステップS203で特定された最大値及び最小値に基づいて、ステップS202で選択した画素の信号のレベル最大変化量を計算する(ステップS204)。 The difference calculation unit 11 calculates the maximum change in the signal level of the pixel selected in step S202 based on the maximum and minimum values identified in step S203 (step S204).

領域判断部12は、ステップS204で計算されたレベル最大変化量を液滴候補閾値と比較する(ステップS205)。レベル最大変化量が液滴候補閾値より小さい場合(ステップS205においてYes)、領域判断部12は、ステップ202で選択した画素が液滴候補領域に含まれると判断する(ステップS206)。レベルの最大変化量が液滴候補閾値を超える場合(ステップS205においてNo)、領域判断部12は、ステップ202で選択した画素が背景領域に含まれると判断する(ステップS207)。 The region determination unit 12 compares the maximum level change amount calculated in step S204 with the droplet candidate threshold (step S205). If the maximum level change amount is smaller than the droplet candidate threshold (Yes in step S205), the region determination unit 12 determines that the pixel selected in step 202 is included in the droplet candidate region (step S206). If the maximum level change amount exceeds the droplet candidate threshold (No in step S205), the region determination unit 12 determines that the pixel selected in step 202 is included in the background region (step S207).

合成画像4Aにおける全ての画素が選択された場合(ステップS208においてYes)、領域判断部12は、連続する候補画素の領域を液滴候補領域50に決定する(ステップS209)。これにより、候補領域特定部5は、図10に示す処理を終了する。ステップS202で選択されていない画素がある場合(ステップS208においてNo)、候補領域特定部5は、ステップS202に戻る。 When all pixels in the composite image 4A have been selected (Yes in step S208), the region determination unit 12 determines the region of consecutive candidate pixels as the droplet candidate region 50 (step S209). This causes the candidate region identification unit 5 to end the process shown in FIG. 10. When there are pixels that have not been selected in step S202 (No in step S208), the candidate region identification unit 5 returns to step S202.

候補領域特定部5は、ステップS202で新たに実行する場合、液滴候補領域50に含まれるか否かの判断がされていない画素を選択する。画素を選択する順序は、ランダムでもよいし、予め設定されていてもよい。 When the candidate region identification unit 5 is newly executed in step S202, it selects pixels for which it has not yet been determined whether they are included in the droplet candidate region 50. The order in which the pixels are selected may be random or may be set in advance.

[3.4.液滴判断]
液滴判断部6は、候補領域特定部5により特定された液滴候補領域50の形状に基づいて、液滴がカメラCのレンズに付着しているか否かを判断する。液滴判断部6は、液滴がカメラCのレンズに付着していると判断した場合、液滴除去装置3を駆動させる。
[3.4. Droplet Judgment]
The droplet determination unit 6 determines whether or not a droplet is attached to the lens of the camera C based on the shape of the droplet candidate region 50 identified by the candidate region identification unit 5. When it is determined that droplets are attached to the lens of the camera C, the droplet removing device 3 is driven.

[3.4.1.輪郭画素の特定]
輪郭特定部13は、液滴候補領域50を領域判断部12から受け、受けた液滴候補領域50から一の液滴候補領域を選択し、選択した液滴候補領域の輪郭を形成する輪郭画素を特定する。
[3.4.1. Identifying Contour Pixels]
The contour identifying section 13 receives the droplet candidate regions 50 from the region determining section 12, selects one droplet candidate region from the received droplet candidate regions 50, and identifies contour pixels that form the contour of the selected droplet candidate region.

以下、選択された一の液滴候補領域が図9に示す液滴候補領域50aである場合を例にして、輪郭特定部13の動作を説明する。 Below, the operation of the contour identification unit 13 will be explained using an example in which the selected droplet candidate region is the droplet candidate region 50a shown in Figure 9.

図11は、図9に示す液滴候補領域50aの拡大図である。図11を参照して、輪郭特定部13は、液滴候補領域50aに含まれる画素のうち、画素Pa1~Pa18を輪郭画素として特定する。具体的には、輪郭特定部13は、液滴候補領域50aに含まれる候補画素を1つ選択する。選択した候補画素の全ての頂点のうち少なくとも1つの頂点が、候補画素ではない画素の頂点と一致する場合、輪郭特定部13は、選択した候補画素が輪郭画素であると判断する。あるいは、選択した候補画素が、液滴候補領域50aに含まれる他の候補画素に接していない辺を少なくとも1つ有する場合、輪郭特定部13は、選択した候補画素が輪郭画素であると判断してもよい。 Figure 11 is an enlarged view of the droplet candidate region 50a shown in Figure 9. With reference to Figure 11, the contour identification unit 13 identifies pixels Pa1 to Pa18 from among the pixels included in the droplet candidate region 50a as contour pixels. Specifically, the contour identification unit 13 selects one candidate pixel included in the droplet candidate region 50a. If at least one vertex out of all vertices of the selected candidate pixel matches a vertex of a pixel that is not a candidate pixel, the contour identification unit 13 determines that the selected candidate pixel is a contour pixel. Alternatively, if the selected candidate pixel has at least one side that is not in contact with other candidate pixels included in the droplet candidate region 50a, the contour identification unit 13 may determine that the selected candidate pixel is a contour pixel.

[3.4.2.除外閾値との比較]
輪郭特定部13は、特定した輪郭画素Pa1~Pa18の画素数を予め設定された除外閾値と比較する。除外閾値は、例えば、8である。比較の結果、輪郭画素Pa1~Pa18の画素数が除外閾値以上であるため、輪郭特定部13は、輪郭画素Pa1~Pa18を含む液滴候補領域50aの判断を継続する。選択した液滴候補領域50に含まれる輪郭画素の数が除外閾値より小さい場合、輪郭特定部13は、選択した液滴候補領域50の判断を終了する。これにより、カメラCのレンズに付着する液滴が、ユーザの視認に影響を及ぼさない程度の大きさであるものを除外することができる。また、液滴候補領域が略円形であるか否かを判断する精度を向上することができる。
3.4.2. Comparison with Exclusion Threshold
The contour specifying unit 13 compares the number of pixels of the specified contour pixels Pa1 to Pa18 with a preset exclusion threshold. The exclusion threshold is, for example, 8. As a result of the comparison, since the number of pixels of the contour pixels Pa1 to Pa18 is equal to or greater than the exclusion threshold, the contour specifying unit 13 continues to judge the droplet candidate region 50a including the contour pixels Pa1 to Pa18. If the number of contour pixels included in the selected droplet candidate region 50 is smaller than the exclusion threshold, the contour specifying unit 13 ends the judgment of the selected droplet candidate region 50. This makes it possible to exclude droplets that adhere to the lens of the camera C that are large enough not to affect the user's visibility. In addition, it is possible to improve the accuracy of judging whether or not the droplet candidate region is substantially circular.

[3.4.3.輪郭画素の配列の作成]
図11を参照して、輪郭特定部13は、輪郭画素Pa1を配列の先頭画素として選択し、輪郭画素の配列の要素番号を「1」に決定する。輪郭特定部13は、選択した輪郭画素Pa1から反時計回りの順に輪郭画素を特定し、特定した輪郭画素に配列の要素番号を付与する。配列の要素番号は、輪郭画素の各々に付与される。輪郭特定部13は、輪郭画素の各々に付与した要素番号にしたがって配列131を生成する。配列131の要素数は、輪郭画素の数に位置する。
[3.4.3. Creating an array of contour pixels]
11, contour identification unit 13 selects contour pixel Pa1 as the first pixel of the array, and determines the element number of the contour pixel array to be "1". Contour identification unit 13 identifies contour pixels in counterclockwise order starting from the selected contour pixel Pa1, and assigns array element numbers to the identified contour pixels. The array element numbers are assigned to each contour pixel. Contour identification unit 13 generates array 131 according to the element numbers assigned to each contour pixel. The number of elements in array 131 corresponds to the number of contour pixels.

図12は、図9に示す液滴候補領域50aの輪郭画素から生成された配列131を示す図である。図12に示す各画素の下に配置された数値が、配列131の要素番号である。 Figure 12 shows an array 131 generated from the contour pixels of the droplet candidate region 50a shown in Figure 9. The numbers placed under each pixel in Figure 12 are element numbers of the array 131.

[3.4.4.形状判断]
カメラCのレンズに付着した液滴は、液滴の表面張力によって略円形となる。従って、液滴候補領域50aが液滴である場合、液滴の輪郭上に位置する画素のうち下記の対向条件を満たす2つの画素を結ぶ線分は、円の直径に相当する。対向条件は、液滴の輪郭上に位置する画素のうち液滴候補領域50aの重心を挟んで対向することである。対向条件を満たす画素のペアを変更した場合であっても、変更されたペアに含まれる2つの画素を結ぶ線分が、円の直径に相当することに変わりはない。液滴候補領域50aが液滴である場合、対向する2つの画素の距離の分散は、小さくなると考えられる。
[3.4.4. Shape Judgment]
The droplet that adheres to the lens of the camera C becomes approximately circular due to the surface tension of the droplet. Therefore, when the droplet candidate region 50a is a droplet, the following opposing pixels located on the outline of the droplet are The line segment connecting two pixels that satisfy the condition corresponds to the diameter of a circle. The opposing condition is that the pixels located on the contour of the droplet face each other across the center of gravity of the droplet candidate region 50a. Even if the pair of pixels that satisfies the facing condition is changed, the line segment connecting the two pixels included in the changed pair still corresponds to the diameter of the circle. In the case of droplets, the variance in the distance between two opposing pixels is expected to be small.

距離計算部14は、液滴候補領域50aに含まれる画素のうち、液滴候補領域50aが液滴であれば対向すると想定される2つの画素を特定する。距離計算部14は、特定した2つの画素の距離を暫定対向距離141として計算する。以下、詳しく説明する。 The distance calculation unit 14 identifies two pixels that are expected to face each other if the droplet candidate region 50a is a droplet, among the pixels included in the droplet candidate region 50a. The distance calculation unit 14 calculates the distance between the two identified pixels as the provisional facing distance 141. This is explained in detail below.

図11及び図12を参照して、液滴候補領域50aが液滴である場合、輪郭画素Pa1~Pa18は、液滴の輪郭に沿って均等に配置される。k番目の画素から最も離れた画素は、(k+2/N)番目の画素である。Nは、輪郭画素の数であり、kは、1以上(2/N)以下の自然数である。距離計算部14は、k番目の画素と(k+2/N)番目の画素とを含む画素のペアを特定する。距離計算部14は、特定した画素のペアに含まれる2つの画素の距離を計算する。 Referring to Figures 11 and 12, when the droplet candidate region 50a is a droplet, the contour pixels Pa1 to Pa18 are evenly arranged along the contour of the droplet. The pixel furthest from the kth pixel is the (k+2/N)th pixel. N is the number of contour pixels, and k is a natural number between 1 and (2/N). The distance calculation unit 14 identifies a pixel pair including the kth pixel and the (k+2/N)th pixel. The distance calculation unit 14 calculates the distance between the two pixels included in the identified pixel pair.

図12において、Nは18である。従って、距離計算部14は、k=1の場合、距離計算部14により特定される輪郭画素は、画素Pa1及びPa10である。距離計算部14は、画素Pa1から画素Pa10までの距離Mk1を暫定対向距離141として計算する。k=2の場合、特定される輪郭画素は、画素Pa2及びPa11である。距離計算部14は、画素Pa2から画素Pa11までの距離Mk2を暫定対向距離141として計算する。その後、距離計算部14は、kをインクリメントする。距離計算部14は、kが9に達するまで、暫定対向距離141を計算する処理を繰り返す。 In FIG. 12, N is 18. Therefore, when k=1, the contour pixels identified by the distance calculation unit 14 are pixels Pa1 and Pa10. The distance calculation unit 14 calculates the distance Mk1 from pixel Pa1 to pixel Pa10 as the provisional opposing distance 141. When k=2, the contour pixels identified are pixels Pa2 and Pa11. The distance calculation unit 14 calculates the distance Mk2 from pixel Pa2 to pixel Pa11 as the provisional opposing distance 141. After that, the distance calculation unit 14 increments k. The distance calculation unit 14 repeats the process of calculating the provisional opposing distance 141 until k reaches 9.

距離判断部15は、距離計算部14により計算された全ての暫定対向距離141の分散を計算する。なお、距離判断部15は、計算された全ての暫定対向距離141の統計的ばらつきを計算するのであれば、分散でなくてもよい。距離判断部15は、計算した分散を予め設定された分散閾値と比較し、その比較結果に基づいて液滴候補領域50aが液滴であるか否かを判断する。分散閾値は、カメラのレンズに付着した液滴を用いて事前に計算される。 The distance determination unit 15 calculates the variance of all the provisional facing distances 141 calculated by the distance calculation unit 14. Note that the distance determination unit 15 does not have to use the variance as long as it calculates the statistical variation of all the calculated provisional facing distances 141. The distance determination unit 15 compares the calculated variance with a preset variance threshold, and determines whether the droplet candidate region 50a is a droplet or not based on the comparison result. The variance threshold is calculated in advance using droplets attached to the camera lens.

図12に示すように、液滴候補領域50aは、雨滴に対応するため、液滴候補領域50aから計算された分散は、分散閾値よりも低い。距離判断部15は、液滴候補領域50aが円形に近い形状を有しているため、液滴であると判断する。つまり、液滴候補領域50aは、液滴領域であると判断される。 As shown in FIG. 12, the droplet candidate region 50a corresponds to a raindrop, so the variance calculated from the droplet candidate region 50a is lower than the variance threshold. The distance determination unit 15 determines that the droplet candidate region 50a is a droplet because it has a shape close to a circle. In other words, the droplet candidate region 50a is determined to be a droplet region.

以下、液滴候補領域50bの形状判断について説明する。図13は、図9に示す液滴候補領域50bの拡大図である。 The following describes how to determine the shape of the droplet candidate region 50b. Figure 13 is an enlarged view of the droplet candidate region 50b shown in Figure 9.

図13を参照して、距離計算部14は、液滴候補領域50bが液滴であれば対向すると想定される2つの画素を、液滴候補領域50bに含まれる輪郭画素Pb1~Pb12の中から特定する。例えば、距離計算部14は、輪郭画素Pb1及びPb7を特定し、輪郭画素Pb1から輪郭画素Pb7までの距離Nk1を計算する。距離計算部14は、輪郭画素Pb3及びPb9を特定し、輪郭画素Pb3から輪郭画素Pb9までの距離Nk2を計算する。 Referring to FIG. 13, the distance calculation unit 14 identifies two pixels that are assumed to face each other if the droplet candidate region 50b is a droplet, from among the contour pixels Pb1 to Pb12 contained in the droplet candidate region 50b. For example, the distance calculation unit 14 identifies contour pixels Pb1 and Pb7, and calculates the distance Nk1 from contour pixel Pb1 to contour pixel Pb7. The distance calculation unit 14 identifies contour pixels Pb3 and Pb9, and calculates the distance Nk2 from contour pixel Pb3 to contour pixel Pb9.

液滴候補領域50bは、上述のように道路に描かれた白線に対応しており、円形ではない。距離Nk2が距離Nk1の数倍よりも大きいため、液滴候補領域50bから計算される分散は、分散閾値以上である。液滴候補領域50bが液滴でないため、距離判断部15は、液滴候補領域50bが背景領域であると判断する。 As described above, droplet candidate region 50b corresponds to a white line painted on the road and is not circular. Because distance Nk2 is several times greater than distance Nk1, the variance calculated from droplet candidate region 50b is greater than or equal to the variance threshold. Because droplet candidate region 50b is not a droplet, distance determination unit 15 determines that droplet candidate region 50b is a background region.

[3.4.5.液滴判断部6の動作]
図14は、図6に示す液滴判断部処理(ステップS3)を示すフローチャートである。液滴判断部6は、合成画像4Aに含まれる液滴候補領域を候補領域特定部5から受けた場合、図14に示す処理を開始する。
[3.4.5. Operation of droplet determination unit 6]
Fig. 14 is a flow chart showing the droplet determination unit process (step S3) shown in Fig. 6. When the droplet determination unit 6 receives a droplet candidate region included in the composite image 4A from the candidate region identification unit 5, it starts the process shown in Fig. 14.

図14を参照して、輪郭特定部13は、候補領域特定部5から受けた液滴候補領域の中から液滴候補領域を1つ選択する(ステップS104)。 Referring to FIG. 14, the contour identification unit 13 selects one droplet candidate region from the droplet candidate regions received from the candidate region identification unit 5 (step S104).

輪郭特定部13は、ステップS104で選択した液滴候補候補領域の輪郭画素を特定する(ステップS105)。 The contour identification unit 13 identifies the contour pixels of the droplet candidate region selected in step S104 (step S105).

輪郭特定部13は、ステップS105で特定した輪郭画素の画素数を除外閾値と比較する(ステップS106)。輪郭画素の画素数が除外閾値以上の場合(ステップS106においてYes)、輪郭特定部13は、輪郭画素の配列を作成する(ステップS107)。輪郭画素の画素数が除外閾値より小さい場合(ステップS106においてNo)、輪郭特定部13は、ステップS104で選択した液滴候補候補領域が背景領域であると判断する(ステップS114)。その後、液滴判断部6は、後述するステップS115に進む。 The contour identification unit 13 compares the number of contour pixels identified in step S105 with the exclusion threshold (step S106). If the number of contour pixels is equal to or greater than the exclusion threshold (Yes in step S106), the contour identification unit 13 creates an array of contour pixels (step S107). If the number of contour pixels is less than the exclusion threshold (No in step S106), the contour identification unit 13 determines that the droplet candidate region selected in step S104 is a background region (step S114). The droplet determination unit 6 then proceeds to step S115, which will be described later.

距離計算部14は、ステップS107で作成された配列を用いて、選択された液滴候補領域が液滴である場合に対向すると想定される輪郭画素のペアを特定する(ステップS108)。 The distance calculation unit 14 uses the array created in step S107 to identify pairs of contour pixels that are assumed to be opposing if the selected droplet candidate region is a droplet (step S108).

距離計算部14は、ステップS108で決定した2つの輪郭画素の距離を暫定対向距離141として計算する(ステップS109)。 The distance calculation unit 14 calculates the distance between the two contour pixels determined in step S108 as the provisional opposing distance 141 (step S109).

距離計算部14は、ステップS108で特定されていない輪郭画素のペアがある場合(ステップS110においてNo)、ステップS108及びステップS109の処理を繰り返す。ステップS108で全ての輪郭画素のペアが特定された場合(ステップS110においてYes)、距離計算部14は、ステップS109で計算された全ての距離の分散を計算する(ステップS111)。 If there are any contour pixel pairs that have not been identified in step S108 (No in step S110), the distance calculation unit 14 repeats the processes of steps S108 and S109. If all contour pixel pairs have been identified in step S108 (Yes in step S110), the distance calculation unit 14 calculates the variance of all distances calculated in step S109 (step S111).

なお、選択された液滴候補領域に含まれある輪郭画素の数が奇数である場合、距離計算部14は、ステップS110で、ステップS108で特定されなかった輪郭画素の数が1であるか否かを判断する。特定されなかった輪郭画素の数が1である場合、距離計算部14は、ステップS111に進む。 If the number of contour pixels contained in the selected droplet candidate region is odd, the distance calculation unit 14 determines in step S110 whether the number of contour pixels not identified in step S108 is 1. If the number of contour pixels not identified is 1, the distance calculation unit 14 proceeds to step S111.

距離判断部15は、ステップS111で計算された分散を分散閾値と比較する(ステップS112)。ステップS111で計算された分散が分散閾値以下の場合(ステップS112においてYes)、距離判断部15は、ステップS104で選択した液滴候補領域が液滴領域であると判断する(ステップS113)。 The distance determination unit 15 compares the variance calculated in step S111 with the variance threshold (step S112). If the variance calculated in step S111 is equal to or less than the variance threshold (Yes in step S112), the distance determination unit 15 determines that the droplet candidate region selected in step S104 is a droplet region (step S113).

ステップS111で計算された距離の分散が分散閾値を超える場合(ステップS112においてNo)、ステップS104で選択した液滴候補候補領域が背景領域であると判断する(ステップS114)。 If the variance of the distances calculated in step S111 exceeds the variance threshold (No in step S112), the droplet candidate region selected in step S104 is determined to be a background region (step S114).

ステップS113又はS115の後に、液滴判断部6は、ステップS104において未だ選択されていない液滴候補領域があるか否かを判断する(ステップS115)。液滴候補候補領域がある場合(ステップS115においてNo)、液滴判断部6は、新たな液滴候補領域を選択するために、ステップS104に戻る。全ての液滴候補領域が選択された場合(ステップS115においてYes)液滴判断部6は、液滴判断部処理(ステップS3)を終了する。 After step S113 or S115, the droplet determination unit 6 determines whether there are any droplet candidate regions that have not yet been selected in step S104 (step S115). If there are any droplet candidate regions (No in step S115), the droplet determination unit 6 returns to step S104 to select a new droplet candidate region. If all droplet candidate regions have been selected (Yes in step S115), the droplet determination unit 6 ends the droplet determination unit process (step S3).

液滴判断部6は、合成画像4Aに含まれる全ての液滴候補領域を判断した後に、液滴除去装置3を駆動するか否かを判断する。例えば、液滴判断部6は、合成画像4Aに含まれる液滴領域の数が基準値を超える場合、液滴除去装置3を駆動することを決定する。 After determining all droplet candidate regions included in the composite image 4A, the droplet determination unit 6 determines whether or not to drive the droplet removal device 3. For example, if the number of droplet regions included in the composite image 4A exceeds a reference value, the droplet determination unit 6 determines to drive the droplet removal device 3.

あるいは、液滴判断部6は、合成画像4Aに含まれる液滴領域の面積が予め設定された面積基準値を超える場合、液滴除去装置3を駆動することを決定する。例えば、液滴判断部6は、液滴領域であると判断された液滴候補領域に含まれる画素の数の積算値を液滴領域の面積として用いればよい。 Alternatively, the droplet determination unit 6 determines to drive the droplet removal device 3 when the area of the droplet region included in the composite image 4A exceeds a preset area reference value. For example, the droplet determination unit 6 may use the integrated value of the number of pixels included in the droplet candidate region determined to be a droplet region as the area of the droplet region.

以上説明したように、液滴検出装置2は、撮影画像1における画素ごとの映像信号のレベル変化に基づいて液滴候補領域50を特定する。液滴検出装置2は、特定した液滴候補領域50の形状に基づいて、液滴がカメラCのレンズに付着しているか否かを判断することができ、レンズに付着した液滴を検出することができる。 As described above, the droplet detection device 2 identifies a droplet candidate region 50 based on the change in the level of the video signal for each pixel in the captured image 1. The droplet detection device 2 can determine whether or not a droplet is attached to the lens of the camera C based on the shape of the identified droplet candidate region 50, and can detect droplets attached to the lens.

液滴検出装置2は、映像信号のレベルの最大値及び最小値を一の画素において特定する。液滴検出装置2は、特定された最大値と最小値との差分絶対値を一の画素におけるレベル変化として計算するので、一の画素におけるレベル変化を容易に特定することができる。 The droplet detection device 2 identifies the maximum and minimum values of the video signal level at a single pixel. The droplet detection device 2 calculates the absolute difference between the identified maximum and minimum values as the level change at a single pixel, so that the level change at a single pixel can be easily identified.

液滴検出装置2は、特定された液滴候補領域50の輪郭を形成する輪郭画素を用いて、液滴がカメラCのレンズに付着しているか否かを判断する。すなわち、液滴検出装置2は、カメラCのレンズに付着した液滴の形状を考慮して液滴がカメラのレンズに付着しているか否かを判断するので、液滴の検出精度を向上させることができる。 The droplet detection device 2 uses the contour pixels that form the contour of the identified droplet candidate region 50 to determine whether or not a droplet is attached to the lens of the camera C. In other words, the droplet detection device 2 determines whether or not a droplet is attached to the lens of the camera C by taking into account the shape of the droplet attached to the lens of the camera C, thereby improving the accuracy of droplet detection.

液滴検出装置2は、撮影画像1A及び撮影画像1Bから生成された合成画像4Aを用いて、液滴がレンズに付着したか否かを判断するため、1つの撮影画像から取得する情報量を抑制することができる。この結果、液滴検出装置2の処理負荷が撮影画像を取得するたびに一時的に高くなることを防ぎつつ、液滴を検出することができる。 The droplet detection device 2 uses a composite image 4A generated from the captured image 1A and the captured image 1B to determine whether or not a droplet has adhered to the lens, so the amount of information acquired from one captured image can be reduced. As a result, droplets can be detected while preventing the processing load of the droplet detection device 2 from temporarily increasing each time a captured image is acquired.

[変形例]
上記実施の形態では、液滴検出装置2が、撮影画像1から合成画像4Aを生成した後に、合成画像4Aに含まれる画素のレベル最大変化量を取得する例を説明した。しかし、液滴検出装置2は、画素ラインの取得と並行して、画素ラインに含まれる各画素のレベル最大変化量を取得してもよい。
[Modification]
In the above embodiment, an example has been described in which the liquid droplet detection device 2 acquires the maximum amount of change in level of pixels included in the composite image 4A after generating the composite image 4A from the captured image 1. However, the liquid droplet detection device 2 may acquire the maximum amount of change in level of each pixel included in the pixel line in parallel with acquiring the pixel line.

図15は、本発明の実施の形態の変形例に係る液滴検出装置2の動作を示すフローチャートである。本変形例に係る液滴検出装置2は、図6に示す処理を実行する際に、ステップS1及びS2に代えて図15に示す処理を実行する。図15に示す処理の結果、撮影画像1と同じサイズの液滴候補画像が生成される。液滴候補画像に含まれる各画素は、液滴候補領域に含まれるか否かを示す。 Figure 15 is a flowchart showing the operation of a droplet detection device 2 according to a modified embodiment of the present invention. When executing the process shown in Figure 6, the droplet detection device 2 according to this modified embodiment executes the process shown in Figure 15 instead of steps S1 and S2. As a result of the process shown in Figure 15, a droplet candidate image of the same size as the captured image 1 is generated. Each pixel included in the droplet candidate image indicates whether it is included in the droplet candidate region.

画像取得部4は、撮影画像1から取得すべき画素ラインを設定する(ステップS501)。例えば、画素ライン決定部8は、上記実施形態と同様に、撮影画像1Aにおける奇数番目の画素ラインを示すライン指定情報72を生成する。 The image acquisition unit 4 sets pixel lines to be acquired from the captured image 1 (step S501). For example, the pixel line determination unit 8 generates line designation information 72 indicating odd-numbered pixel lines in the captured image 1A, similar to the above embodiment.

図15に示されていないが、画像取得部4は、ステップS501の実行時において、水平同期信号のカウント値を1に初期化する。撮影画像1に含まれる画素は、上から順に入力されるためである。 Although not shown in FIG. 15, when executing step S501, the image acquisition unit 4 initializes the count value of the horizontal synchronization signal to 1. This is because the pixels contained in the captured image 1 are input in order from the top.

画像取得部4は、映像信号の映像信号の入力を開始する。画像取得部4は、水平同期信号のカウント値がライン指定情報72で指定された画素ラインに対応するか否かを判断する(ステップS502)。 The image acquisition unit 4 starts inputting the video signal. The image acquisition unit 4 determines whether the count value of the horizontal synchronization signal corresponds to the pixel line specified by the line specification information 72 (step S502).

カウント値がライン指定情報72で指定された画素ラインに対応しない場合(ステップS502においてNo)、画像取得部4は、1画素ラインに相当する時間が経過するまで待機する(ステップS508)。例えば、カウント値が2であり、かつ、ライン指定情報72が上から奇数番目の画素ラインを指定している場合、カウント値がライン指定情報72に対応しない。この場合、画像取得部4は、上から3番目の画素ラインの入力が開始されるまで待機する。 If the count value does not correspond to the pixel line specified by the line specification information 72 (No in step S502), the image acquisition unit 4 waits until a time equivalent to one pixel line has elapsed (step S508). For example, if the count value is 2 and the line specification information 72 specifies an odd-numbered pixel line from the top, the count value does not correspond to the line specification information 72. In this case, the image acquisition unit 4 waits until input of the third pixel line from the top begins.

カウント値がライン指定情報72で指定された画素ラインに対応する場合(ステップS502においてYes)、画像取得部4は、画素ラインの取得を開始する(ステップS503)。画像取得部4は、1画素の信号を取得する(ステップS504)。 If the count value corresponds to the pixel line specified by the line specification information 72 (Yes in step S502), the image acquisition unit 4 starts acquiring the pixel line (step S503). The image acquisition unit 4 acquires a signal for one pixel (step S504).

候補領域特定部5は、ステップS504で取得された画素の信号の統計値を取得する(ステップS505)。統計値は、最大値及び最小値である。ステップS505は、図10に示すステップS203に対応する。候補領域特定部5は、ステップS505で取得した統計値に基づいて、統計値を取得した画素のレベル最大変化量を計算する(ステップS506)。ステップS506は、図10に示すステップS204に対応する。候補領域特定部5は、統計値を特定した画素のレベル最大変化量に基づいて、統計値を特定した画素が液滴候補領域に含まれるか否かを判断する(ステップS507)。ステップS507は、図10に示すステップS205~S207に対応する。 The candidate area identification unit 5 acquires statistical values of the pixel signals acquired in step S504 (step S505). The statistical values are maximum and minimum values. Step S505 corresponds to step S203 shown in FIG. 10. The candidate area identification unit 5 calculates the maximum level change amount of the pixel from which the statistical values were acquired based on the statistical values acquired in step S505 (step S506). Step S506 corresponds to step S204 shown in FIG. 10. The candidate area identification unit 5 determines whether the pixel from which the statistical values were identified is included in the droplet candidate area based on the maximum level change amount of the pixel from which the statistical values were identified (step S507). Step S507 corresponds to steps S205 to S207 shown in FIG. 10.

画像取得部4は、水平同期信号及び垂直同期信号の両者が入力されない場合(ステップS509においてNo)、次の画素が液滴候補領域に含まれるか否かを判断するためにステップS504に戻る。 If neither the horizontal synchronization signal nor the vertical synchronization signal is input (No in step S509), the image acquisition unit 4 returns to step S504 to determine whether the next pixel is included in the droplet candidate region.

画像取得部4は、水平同期信号が入力された場合(ステップS509においてYes、ステップS510においてYes)、水平同期信号のカウント値をインクリメントする(ステップS511)。その後、画像取得部4は、新たな画素ラインを取得するために、ステップS502に戻る。 If the horizontal synchronization signal is input (Yes in step S509, Yes in step S510), the image acquisition unit 4 increments the count value of the horizontal synchronization signal (step S511). After that, the image acquisition unit 4 returns to step S502 to acquire a new pixel line.

垂直同期信号が入力された場合(ステップS509においてYes、ステップS510においてNo)、画像取得部4は、1フレーム分の撮影画像1の入力が終了したと判断する。この場合、画像取得部4が、液滴候補画像を生成することができる画素ラインを取得したか否かを判断する(ステップS512)。 When a vertical synchronization signal is input (Yes in step S509, No in step S510), the image acquisition unit 4 determines that the input of one frame of captured image 1 has been completed. In this case, the image acquisition unit 4 determines whether or not it has acquired a pixel line that can generate a droplet candidate image (step S512).

上記実施の形態では、上から奇数番目の画素ラインを撮影画像1Aから取得した時点では、合成画像4Aは生成されない。同様に、候補領域特定部5は、上から奇数番目の画素ラインを撮影画像1Aから取得した時点では、液滴候補画像を生成することができない。この場合、1フレーム分の画素ラインを取得していないため(ステップS512においてNo)、画像取得部4は、ステップS501に戻る。上から偶数番目の画素ラインを撮影画像1Bから取得するためである。 In the above embodiment, when the odd-numbered pixel lines from the top are acquired from the captured image 1A, the composite image 4A is not generated. Similarly, when the candidate area identification unit 5 acquires the odd-numbered pixel lines from the top from the captured image 1A, it is unable to generate a droplet candidate image. In this case, one frame's worth of pixel lines have not been acquired (No in step S512), so the image acquisition unit 4 returns to step S501. This is to acquire the even-numbered pixel lines from the top from the captured image 1B.

1フレーム分の画素ラインを複数の撮影画像1から取得した場合(ステップS512においてYes)、候補領域特定部5は、各画素についてのステップS507の結果に基づいて、液滴候補画像を生成する(ステップS513)。その後、候補領域特定部5は、液滴候補画像をラベリング処理することにより、液滴候補領域を特定する。 When pixel lines for one frame have been acquired from multiple captured images 1 (Yes in step S512), the candidate area identification unit 5 generates a droplet candidate image based on the results of step S507 for each pixel (step S513). The candidate area identification unit 5 then performs a labeling process on the droplet candidate image to identify the droplet candidate area.

なお、図8に示すステップS504は、ステップS505~S507と並行して実行される。 Note that step S504 shown in FIG. 8 is executed in parallel with steps S505 to S507.

画像取得部4は、垂直同期信号が入力される時刻t0から、画素ラインLa1の取得を開始する。時刻t0から時刻t1までの期間が1画素分の時間に相当するため、画像取得部4は、時刻t0から時刻t1までの映像信号を画素P1の信号として取得する(ステップS504)。候補領域特定部5は、時刻t0から時刻t1までの映像信号に基づいて、画素P1が液滴候補領域に含まれるか否かを判断する(ステップS505~S507)。 The image acquisition unit 4 starts acquiring pixel line La1 from time t0 when the vertical synchronization signal is input. Since the period from time t0 to time t1 corresponds to the time for one pixel, the image acquisition unit 4 acquires the video signal from time t0 to time t1 as the signal of pixel P1 (step S504). The candidate area identification unit 5 determines whether pixel P1 is included in the droplet candidate area based on the video signal from time t0 to time t1 (steps S505 to S507).

撮影画像1Aの映像信号の入力は、時刻t1以降も継続している。画像取得部4は、候補領域特定部5における上述の画素P1の判断と並行して、時刻t1から時刻t2までの映像信号を画素P2の信号として取得する(ステップS504)。候補領域特定部5は、画素P2の信号に基づいて、画素P2が液滴候補領域に含まれるか否かを判断する。以下、画素P3~P10の信号の取得と、画素P3~P10が液滴候補領域に含まれるの判断が繰り返される。この結果、画素の映像信号の取得と、画素が液滴候補領域に含まれるか否かの判断とが並行して実行される。 The input of the video signal of the captured image 1A continues even after time t1. In parallel with the above-mentioned determination of pixel P1 by the candidate area identification unit 5, the image acquisition unit 4 acquires the video signal from time t1 to time t2 as the signal of pixel P2 (step S504). Based on the signal of pixel P2, the candidate area identification unit 5 determines whether pixel P2 is included in the droplet candidate area. Thereafter, acquisition of the signals of pixels P3 to P10 and determination of whether pixels P3 to P10 are included in the droplet candidate area are repeated. As a result, acquisition of the pixel video signal and determination of whether the pixel is included in the droplet candidate area are performed in parallel.

[その他の変形例]
上記実施の形態では、単位領域が1つの画素である例を説明したが、これに限られない。単位領域は、水平方向に並ぶ複数の画素であってもよいし、垂直方向に並ぶ複数の画素であってもよい。あるいは、単位領域は、水平方向に並ぶ複数の画素と、垂直方向に並ぶ複数の画素とを含む矩形であってもよい。
[Other Modifications]
In the above embodiment, an example in which the unit region is one pixel has been described, but this is not limiting. The unit region may be a plurality of pixels arranged in the horizontal direction, or a plurality of pixels arranged in the vertical direction. Alternatively, the unit region may be a rectangle including a plurality of pixels arranged in the horizontal direction and a plurality of pixels arranged in the vertical direction.

上記実施の形態では、候補領域特定部5が、レベル最大変化量を用いて各画素が液滴候補領域に含まれるか否かを判断する例を説明したが、これに限られない。候補領域特定部5は、各画素のレベル変化を取得できればよい。例えば、候補領域特定部5は、画素の信号の極値を特定し、特定した極値の分散をレベル変化量として特定してもよい。 In the above embodiment, an example has been described in which the candidate area identification unit 5 uses the maximum level change amount to determine whether or not each pixel is included in the droplet candidate area, but this is not limiting. The candidate area identification unit 5 only needs to be able to obtain the level change of each pixel. For example, the candidate area identification unit 5 may identify the extreme values of the pixel signal and identify the variance of the identified extreme values as the level change amount.

上記実施の形態では、液滴判断部6が、輪郭画素から計算される暫定対向距離141の統計的ばらつきに基づいて、液滴候補領域が液滴であるか否かを判断する例を説明したが、これに限られない。液滴判断部6が液滴候補領域の形状に基づいて液滴候補領域が液滴であるか否かを判断するのであれば、液滴判断部6が使用するアルゴリズムは特に限定されない。例えば、液滴判断部6は、ハフ変換を用いてもよい。 In the above embodiment, an example has been described in which the droplet determination unit 6 determines whether or not a droplet candidate region is a droplet based on the statistical variation of the provisional facing distance 141 calculated from the contour pixels, but this is not limited to this. If the droplet determination unit 6 determines whether or not a droplet candidate region is a droplet based on the shape of the droplet candidate region, the algorithm used by the droplet determination unit 6 is not particularly limited. For example, the droplet determination unit 6 may use a Hough transform.

上記実施の形態では、撮影画像1がアナログ形式の画像信号である例を説明したが、これに限られない。撮影画像1は、ディジタル形式の画像信号であってもよい。この場合、画像取得部4は、カメラから受けた撮影画像1をD/A(Digital to Analog)変換することにより、アナログ形式の撮影画像1を生成すればよい。 In the above embodiment, an example has been described in which the captured image 1 is an image signal in analog format, but this is not limiting. The captured image 1 may be an image signal in digital format. In this case, the image acquisition unit 4 may generate the captured image 1 in analog format by D/A (Digital to Analog) converting the captured image 1 received from the camera.

上記実施の形態において、液滴検出装置2の各機能ブロックは、LSI等の半導体装置により個別に1チップ化されてもよいし、一部又は全部を含むように1チップ化されてもよい。ここでは、LSIとしたが、集積度の違いにより、IC、システムLSI、スーパーLSI、ウルトラLSIと呼称されることもある。 In the above embodiment, each functional block of the droplet detection device 2 may be individually integrated into a single chip using a semiconductor device such as an LSI, or may be integrated into a single chip to include some or all of the functional blocks. Here, we refer to it as an LSI, but depending on the level of integration, it may also be called an IC, system LSI, super LSI, or ultra LSI.

また、集積回路化の手法はLSIに限るものではなく、専用回路又は汎用プロセサで実現してもよい。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサを利用しても良い。 In addition, the method of integration is not limited to LSI, but may be realized by a dedicated circuit or a general-purpose processor. It is also possible to use a field programmable gate array (FPGA) that can be programmed after LSI manufacturing, or a reconfigurable processor that can reconfigure the connections and settings of circuit cells inside the LSI.

また、液滴検出装置2の各機能ブロックにより実行される処理の一部又は全部は、プログラムにより実現されるものであってもよい。上記各実施の形態の各機能ブロックの処理の一部又は全部は、コンピュータにおいて、中央演算装置(CPU)により行われる。それぞれの処理を行うためのプログラムは、ハードディスク、ROMなどの記憶装置に格納されており、ROMにおいて、あるいはRAMに読み出されて実行される。 In addition, some or all of the processing performed by each functional block of the droplet detection device 2 may be realized by a program. Some or all of the processing of each functional block in each of the above embodiments is performed by a central processing unit (CPU) in a computer. The programs for performing each process are stored in a storage device such as a hard disk or ROM, and are read out and executed in the ROM or RAM.

また、上記実施の形態の各処理をハードウェアにより実現してもよいし、ソフトウェア(OS(オペレーティングシステム)、ミドルウェア、あるいは、所定のライブラリとともに実現される場合を含む。)により実現してもよい。さらに、ソフトウェアおよびハードウェアの混在処理により実現しても良い。 In addition, each process in the above embodiments may be realized by hardware, or by software (including cases where it is realized together with an OS (operating system), middleware, or a specified library). Furthermore, it may be realized by a mixed process of software and hardware.

また、上記実施の形態における処理方法の実行順序は、必ずしも、上記実施の形態の記載に制限されるものではなく、発明の要旨を逸脱しない範囲で、実行順序を入れ替えてもよい。 In addition, the execution order of the processing methods in the above embodiments is not necessarily limited to that described in the above embodiments, and the execution order may be changed without departing from the spirit of the invention.

前述した方法をコンピュータに実行させるコンピュータプログラム及びそのプログラムを記録したコンピュータ読み取り可能な記録媒体は、本発明の範囲に含まれる。ここで、コンピュータ読み取り可能な記録媒体としては、例えば、フレキシブルディスク、ハードディスク、CD-ROM、MO、DVD、DVD-ROM、DVD-RAM、大容量DVD、次世代DVD、半導体メモリを挙げることができる。 The scope of the present invention includes a computer program that causes a computer to execute the above-mentioned method and a computer-readable recording medium on which the program is recorded. Here, examples of computer-readable recording media include flexible disks, hard disks, CD-ROMs, MOs, DVDs, DVD-ROMs, DVD-RAMs, large-capacity DVDs, next-generation DVDs, and semiconductor memories.

上記コンピュータプログラムは、上記記録媒体に記録されたものに限られず、電気通信回線、無線又は有線通信回線、インターネットを代表とするネットワーク等を経由して伝送されるものであってもよい。 The computer program is not limited to one recorded on the recording medium, but may be one transmitted via a telecommunications line, a wireless or wired communication line, a network such as the Internet, etc.

以上、本発明の実施の形態を説明したが、上述した実施の形態は本発明を実施するための例示に過ぎない。よって、本発明は上述した実施の形態に限定されることなく、その趣旨を逸脱しない範囲内で上述した実施の形態を適宜変形して実施することが可能である。 Although the embodiments of the present invention have been described above, the above-mentioned embodiments are merely examples for implementing the present invention. Therefore, the present invention is not limited to the above-mentioned embodiments, and it is possible to implement the above-mentioned embodiments by appropriately modifying them within the scope of the spirit of the present invention.

2 液滴検出装置
3 液滴除去装置
4 画像取得部
5 候補領域特定部
6 液滴判断部
7 画素ライン取得部
8 画素ライン決定部
9 合成部
10 統計値特定部
11 差分計算部
12 領域判断部
13 輪郭特定部
14 距離計算部
15 距離判断部
Reference Signs List 2 Droplet detection device 3 Droplet removal device 4 Image acquisition unit 5 Candidate area identification unit 6 Droplet judgment unit 7 Pixel line acquisition unit 8 Pixel line determination unit 9 Synthesis unit 10 Statistical value identification unit 11 Difference calculation unit 12 Area judgment unit 13 Contour identification unit 14 Distance calculation unit 15 Distance judgment unit

Claims (5)

カメラにより互いに異なる時刻に生成された複数の撮影画像を取得する画像取得部と、
前記画像取得部により取得された複数の撮影画像における所定方向の映像信号のレベルの時間変化を所定の単位領域ごとに特定し、特定したレベルの時間変化と予め設定された液滴候補閾値との比較により液滴候補領域を特定する候補領域特定部と、
前記候補領域特定部により特定された液滴候補領域の形状に基づいて、液滴が前記カメラのレンズに付着しているか否かを判断する液滴判断部と、を備える液滴検出装置。
an image acquisition unit that acquires a plurality of captured images generated by a camera at different times ;
a candidate region identifying unit that identifies a time change in a level of a video signal in a predetermined direction for each predetermined unit region in a plurality of captured images acquired by the image acquiring unit, and identifies a droplet candidate region by comparing the time change in the identified level with a preset droplet candidate threshold value;
a droplet determination unit that determines whether or not a droplet is attached to the camera lens based on the shape of the droplet candidate region identified by the candidate region identification unit.
請求項1に記載の液滴検出装置であって、
前記候補領域特定部は、
前記所定方向の映像信号のレベルの最大値及び最小値を一の単位領域において特定する統計値特定部と、
前記統計値特定部により特定された最大値と最小値との差分絶対値を前記一の単位領域におけるレベルの時間変化として計算する差分計算部と、
前記差分計算部により計算された差分絶対値を前記液滴候補閾値と比較した結果に基づいて、前記一の単位領域が前記液滴候補領域に含まれるか否かを判断する領域判断部と、を含む液滴検出装置。
2. The droplet detection device of claim 1,
The candidate region identification unit
a statistical value determination unit that determines a maximum value and a minimum value of the level of the video signal in the predetermined direction in one unit area;
a difference calculation unit that calculates an absolute difference between the maximum value and the minimum value specified by the statistical value specification unit as a time change in level in the one unit area;
A droplet detection device including: a region determination unit that determines whether the one unit region is included in the droplet candidate region based on the result of comparing the absolute difference value calculated by the difference calculation unit with the droplet candidate threshold.
請求項1又は請求項2に記載の液滴検出装置であって、
前記液滴判断部は、
前記液滴候補領域の輪郭を形成する輪郭画素の配列を作成する輪郭特定部と、
前記輪郭画素の数がNである場合、前記輪郭特定部により作成された輪郭画素の配列において、k(kは1以上N/2以下の自然数)番目の画素と、k+N/2番目の画素との距離を計算する距離計算部と、
前記距離計算部により計算された距離のばらつきに基づいて、液滴が前記カメラのレンズに付着しているか否かを判断する距離判断部と、を含む液滴検出装置。
3. The droplet detection device according to claim 1,
The droplet determination unit is
a contour identifying unit that creates an array of contour pixels that form the contour of the droplet candidate region;
a distance calculation unit that calculates a distance between a k-th pixel (k is a natural number between 1 and N/2) and a k+N/2-th pixel in the array of contour pixels created by the contour identification unit when the number of contour pixels is N;
and a distance determination unit that determines whether or not a droplet is attached to the camera lens based on the variation in distance calculated by the distance calculation unit.
請求項1~3のいずれか1項に記載の液滴検出装置であって、
前記画像取得部は、
前記カメラにより第1時刻に生成された第1撮影画像から、水平方向の第1画素ラインを取得し、前記カメラにより第2時刻に生成された第2撮影画像から、水平方向の第2画素ラインを取得する画素ライン取得部と、
前記画素ライン取得部が前記第1画素ラインを前記第1撮影画像から取得した場合、前記第1画素ラインの位置に基づいて前記第2画素ラインを決定し、決定した前記第2画素ラインを前記画素ライン取得部に通知する画素ライン決定部と、
前記画素ライン取得部により取得された第1画素ラインと第2画素ラインとを含む合成撮影画像を生成する合成部と、を含み、
前記候補領域特定部は、前記合成部により生成された合成撮影画像から前記液滴候補領域を特定する、液滴検出装置。
A droplet detection device according to any one of claims 1 to 3,
The image acquisition unit includes:
a pixel line acquisition unit that acquires a first pixel line in a horizontal direction from a first captured image generated by the camera at a first time and acquires a second pixel line in the horizontal direction from a second captured image generated by the camera at a second time;
a pixel line determination unit that, when the pixel line acquisition unit acquires the first pixel line from the first captured image, determines the second pixel line based on a position of the first pixel line and notifies the pixel line acquisition unit of the determined second pixel line;
a synthesis unit that generates a synthetic captured image including the first pixel line and the second pixel line acquired by the pixel line acquisition unit,
The candidate region identifying unit identifies the droplet candidate region from the composite captured image generated by the combining unit.
レンズに付着した液滴を検出する液滴検出方法であって、
カメラにより互いに異なる時刻に生成された複数の撮影画像を取得するステップと、
前記取得された複数の撮影画像における所定方向の映像信号のレベルの時間変化を所定の単位領域ごとに特定し、特定したレベルの時間変化と予め設定された液滴候補閾値との比較により液滴候補領域を特定するステップと、
前記特定された液滴候補領域の形状に基づいて、液滴が前記カメラのレンズに付着して
いるか否かを判断するステップと、を備える液滴検出方法。
A method for detecting droplets on a lens, comprising the steps of:
acquiring a plurality of captured images generated by a camera at different times ;
identifying a time change in a level of a video signal in a predetermined direction in the plurality of captured images for each predetermined unit area, and identifying a droplet candidate area by comparing the time change in the identified level with a preset droplet candidate threshold value ;
and determining whether or not a droplet is attached to the camera lens based on the shape of the identified droplet candidate region.
JP2020056804A 2020-03-26 2020-03-26 Droplet Detector Active JP7463159B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020056804A JP7463159B2 (en) 2020-03-26 2020-03-26 Droplet Detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020056804A JP7463159B2 (en) 2020-03-26 2020-03-26 Droplet Detector

Publications (2)

Publication Number Publication Date
JP2021158524A JP2021158524A (en) 2021-10-07
JP7463159B2 true JP7463159B2 (en) 2024-04-08

Family

ID=77918828

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020056804A Active JP7463159B2 (en) 2020-03-26 2020-03-26 Droplet Detector

Country Status (1)

Country Link
JP (1) JP7463159B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002207162A (en) 2001-01-12 2002-07-26 Minolta Co Ltd Digital camera
JP2009130700A (en) 2007-11-26 2009-06-11 Panasonic Corp Imaging apparatus
JP2010273014A (en) 2009-05-20 2010-12-02 Toshiba Alpine Automotive Technology Corp Camera device for mobile object and method of detecting attachment
JP2018049568A (en) 2016-09-23 2018-03-29 株式会社デンソーテン Water droplet detection device, water droplet detection method and water droplet detection program
JP2019029940A (en) 2017-08-02 2019-02-21 クラリオン株式会社 Accretion detector and vehicle system comprising the same
JP2019140605A (en) 2018-02-14 2019-08-22 キヤノン株式会社 Image processing system, image processing method and program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002207162A (en) 2001-01-12 2002-07-26 Minolta Co Ltd Digital camera
JP2009130700A (en) 2007-11-26 2009-06-11 Panasonic Corp Imaging apparatus
JP2010273014A (en) 2009-05-20 2010-12-02 Toshiba Alpine Automotive Technology Corp Camera device for mobile object and method of detecting attachment
JP2018049568A (en) 2016-09-23 2018-03-29 株式会社デンソーテン Water droplet detection device, water droplet detection method and water droplet detection program
JP2019029940A (en) 2017-08-02 2019-02-21 クラリオン株式会社 Accretion detector and vehicle system comprising the same
JP2019140605A (en) 2018-02-14 2019-08-22 キヤノン株式会社 Image processing system, image processing method and program

Also Published As

Publication number Publication date
JP2021158524A (en) 2021-10-07

Similar Documents

Publication Publication Date Title
CN104508725B (en) Three-dimensional body detection device and three-dimensional body detection method
CN105393293B (en) Vehicle-mounted device
CN104823214B (en) On-vehicle image processing device
JP2019096320A5 (en)
JP6832224B2 (en) Adhesion detection device and deposit detection method
CN104412573A (en) On-board device
JP2019096320A (en) Determination of clear or dirty captured image
CN109565536A (en) Car-mounted device
KR102606931B1 (en) Static soiling detection and correction
JP6817104B2 (en) Adhesion detection device, deposit detection method
US7265777B2 (en) Method for abstracting multiple moving objects
CN105069801A (en) Method for preprocessing video image based on image quality diagnosis
JP5785565B2 (en) Method and apparatus for detecting drops in a digital image and computer program for carrying out this method
JP7463159B2 (en) Droplet Detector
JP3934113B2 (en) Mobile object detection system, mobile object detection apparatus, mobile object detection method, and mobile object detection program
JP2021050932A (en) Attached matter detection device and attached matter detection method
JP4376199B2 (en) Image processing device
US11568547B2 (en) Deposit detection device and deposit detection method
WO2013152625A1 (en) Adhesive noise cancellation method and system
US20170297505A1 (en) Imaging apparatus, car, and variation detection method
CN102110297B (en) Detection method based on accumulated light stream and double-background filtration
JP6719328B2 (en) Exterior monitoring device
JP6348020B2 (en) Image processing apparatus, image processing method, and inspection method using the same
Lin et al. In-image rain wiper elimination for vision-based Advanced Driver Assistance Systems
JP7172932B2 (en) Attached matter detection device and attached matter detection method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20221130

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20231017

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20231031

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20231117

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240327

R150 Certificate of patent or registration of utility model

Ref document number: 7463159

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150