JP6767255B2 - Image processing device and image processing method - Google Patents
Image processing device and image processing method Download PDFInfo
- Publication number
- JP6767255B2 JP6767255B2 JP2016246842A JP2016246842A JP6767255B2 JP 6767255 B2 JP6767255 B2 JP 6767255B2 JP 2016246842 A JP2016246842 A JP 2016246842A JP 2016246842 A JP2016246842 A JP 2016246842A JP 6767255 B2 JP6767255 B2 JP 6767255B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- camera
- vehicle
- inspection
- inspection image
- 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
Links
Images
Landscapes
- Closed-Circuit Television Systems (AREA)
- Studio Devices (AREA)
Description
本発明は、画像処理装置及び画像処理方法に関する。 The present invention relates to an image processing apparatus and an image processing method.
従来、車載カメラを用いて、例えば車両の駐車支援等の運転支援が行われている。車載カメラは、車両を工場から出荷する前に、車両に固定状態で取り付けられる。しかしながら、車載カメラは、例えば不意の接触や経年変化等によって、工場出荷時の取付状態から光軸ずれを起こすことがある。車載カメラの光軸がずれると、カメラ画像を利用して判断されるハンドルの操舵量等に誤差が生じるために、車載カメラのずれを検出することは重要である。 Conventionally, driving support such as vehicle parking support has been provided by using an in-vehicle camera. The on-board camera is fixedly attached to the vehicle before it is shipped from the factory. However, the on-board camera may cause an optical axis shift from the factory-installed state due to, for example, unexpected contact or aging. It is important to detect the deviation of the in-vehicle camera because if the optical axis of the in-vehicle camera shifts, an error occurs in the steering amount of the steering wheel determined by using the camera image.
特許文献1には、車載カメラの光軸ずれを検出する技術が開示される。特許文献1における車載カメラの光軸ずれ検出装置は、画像処理手段と判断手段とを備える。画像処理手段は、運転支援する車体部上のマーキングを含む範囲を撮影する車載カメラの撮像画像から該マーキングの位置情報を検出する。判断手段は、初期設定されたマーキング位置情報と、新たに検出されたマーキングの位置情報とを比較することにより、撮影光軸ずれを判断する。
車載カメラの撮影画像には、車両周囲の風景等が映るために、例えばマーキングがボンネットの一部の特定形状である場合、当該特定形状を簡単に抽出できないことがある。当該特定形状が誤検出されると、車載カメラの光軸ずれが正確に判断されない可能性がある。 Since the image taken by the in-vehicle camera reflects the scenery around the vehicle, for example, when the marking is a specific shape of a part of the bonnet, the specific shape may not be easily extracted. If the specific shape is erroneously detected, the optical axis deviation of the in-vehicle camera may not be accurately determined.
本発明は、上記課題に鑑みてなされたものであり、車載カメラの光軸ずれを適切に検出することを可能とする技術を提供することを目的とする。 The present invention has been made in view of the above problems, and an object of the present invention is to provide a technique capable of appropriately detecting an optical axis deviation of an in-vehicle camera.
上記目的を達成するために本発明の画像処理装置は、車載カメラで撮像されたカメラ画像を処理する画像処理装置であって、前記カメラ画像に基づいて、前記車載カメラを搭載する車両のボディの検査画像を取得する検査画像取得部を備え、前記検査画像取得部は、車種毎のボディ形状に応じて予め設定される前記ボディのエッジの探索領域を除いて画像のマスク処理を行い、前記検査画像を取得する構成(第1の構成)になっている。 In order to achieve the above object, the image processing device of the present invention is an image processing device that processes a camera image captured by an in-vehicle camera, and based on the camera image, a body of a vehicle equipped with the in-vehicle camera. An inspection image acquisition unit for acquiring an inspection image is provided, and the inspection image acquisition unit performs image masking processing excluding a search area for an edge of the body preset according to the body shape for each vehicle type, and performs the inspection. It has a configuration for acquiring an image (first configuration).
上記第1の構成の画像処理装置において、前記検査画像取得部は、前記マスク処理後に得られるエッジ画像のうち、前記ボディの設計値から想定されるエッジと異なると判断されるエッジを除去して前記検査画像を取得する構成(第2の構成)が好ましい。 In the image processing apparatus having the first configuration, the inspection image acquisition unit removes an edge image obtained after the mask processing that is determined to be different from the edge assumed from the design value of the body. A configuration for acquiring the inspection image (second configuration) is preferable.
上記第1又は第2の構成の画像処理装置は、前記車両に正常に取り付けられた前記車載カメラで撮像された前記カメラ画像を処理して得られた前記ボディの基準画像を記憶する記憶部と、前記基準画像と前記検査画像とを比較処理して前記車載カメラの光軸ずれを検出するずれ検出部と、を更に備える構成(第3の構成)が好ましい。 The image processing device having the first or second configuration includes a storage unit that stores a reference image of the body obtained by processing the camera image captured by the in-vehicle camera normally mounted on the vehicle. A configuration (third configuration) further comprising a deviation detection unit that detects the optical axis deviation of the vehicle-mounted camera by comparing the reference image and the inspection image is preferable.
上記第3の構成の画像処理装置において、前記検査画像取得部は、前記マスク処理後に、前記探索領域より狭い狭探索領域を除いてマスクを施す再マスク処理を行い、前記検査画像を取得する構成(第4の構成)が好ましい。 In the image processing apparatus having the third configuration, the inspection image acquisition unit acquires the inspection image by performing a remasking process of masking a narrow search area narrower than the search area after the mask processing. (Fourth configuration) is preferable.
上記第3又は第4の構成の画像処理装置において、前記検査画像中においてエッジとして検出された画素の数が所定の第1閾値より少ない場合に、前記ずれ検出部は、前記検査画像の再取得を要求する構成(第5の構成)であってよい。 In the image processing apparatus having the third or fourth configuration, when the number of pixels detected as edges in the inspection image is less than a predetermined first threshold value, the deviation detection unit reacquires the inspection image. It may be a configuration (fifth configuration) that requires.
上記第5の構成の画像処理装置において、前記検査画像取得部は、前記マスク処理後に、前記探索領域より狭い狭探索領域を除いてマスクを施す再マスク処理を行い、前記検査画像の再取得を行う場合に、前記検査画像取得部は、先の前記検査画像の取得時に比べて、前記探索領域と前記狭探索領域とのうちの少なくとも前記狭探索領域を拡大して前記検査画像を取得する構成(第6の構成)であってよい。 In the image processing apparatus having the fifth configuration, after the mask processing, the inspection image acquisition unit performs a remasking process of masking a narrow search area narrower than the search area, and reacquires the inspection image. In this case, the inspection image acquisition unit acquires the inspection image by expanding at least the narrow search area of the search area and the narrow search area as compared with the time of acquiring the inspection image. (Sixth configuration) may be used.
上記第5又は第6の構成の画像処理装置において、前記検査画像の再取得を行う場合に、前記検査画像取得部は、外部から取得される前記車両に関する情報に基づいて前記カメラ画像の取得タイミングを判断して前記検査画像を取得する構成(第7の構成)であってよい。 In the image processing apparatus having the fifth or sixth configuration, when the inspection image is reacquired, the inspection image acquisition unit acquires the camera image at the acquisition timing based on the information about the vehicle acquired from the outside. The inspection image may be acquired by determining the above (seventh configuration).
上記第5から第7のいずれかの構成の画像処理装置において、前記ずれ検出部は、前記検査画像の再取得を所定の回数繰り返しても前記画素の数が前記所定の第1閾値より少ない場合には、前記車載カメラが光軸ずれしていると判定する構成(第8の構成)であってよい。 In the image processing apparatus having any of the fifth to seventh configurations, the deviation detection unit is used when the number of pixels is less than the predetermined first threshold value even if the inspection image is reacquired a predetermined number of times. May be a configuration (eighth configuration) in which it is determined that the in-vehicle camera is misaligned with the optical axis.
上記第3から第8のいずれかの構成の画像処理装置において、前記ずれ検出部は、前記検査画像を複数の領域に分けて、当該複数の領域のそれぞれについて前記基準画像との比較処理を行い、得られた複数個の比較処理結果に基づいて前記光軸ずれの判定を行う構成(第9の構成)であってよい。 In the image processing apparatus having any of the third to eighth configurations, the deviation detection unit divides the inspection image into a plurality of regions and performs comparison processing with the reference image for each of the plurality of regions. , The configuration may be such that the optical axis deviation is determined based on the obtained plurality of comparison processing results (9th configuration).
上記第3から第9のいずれかの構成の画像処理装置において、前記基準画像は、前記カメラ画像に比べて少ない画素数を有する構成(第10の構成)であってよい。 In the image processing apparatus having any of the third to ninth configurations, the reference image may have a configuration having a smaller number of pixels than the camera image (tenth configuration).
上記第3から第10のいずれかの構成の画像処理装置において、前記ずれ検出部は、複数の前記検査画像に対して前記基準画像との比較結果を取得し、複数回の比較結果に応じて前記光軸ずれの判定を行う構成(第11の構成)であってよい。 In the image processing apparatus having any of the third to tenth configurations, the deviation detection unit acquires comparison results of the plurality of inspection images with the reference image, and responds to the comparison results of the plurality of times. It may be a configuration (11th configuration) for determining the optical axis deviation.
上記第1から第10のいずれかの構成の画像処理装置において、前記検査画像取得部は、異なるタイミングで撮像された複数の前記カメラ画像のそれぞれに対して前記マスク処理を含む処理を行って複数の合成前画像を取得し、前記複数の合成前画像を合成処理して前記検査画像を取得する構成(第12の構成)が好ましい。 In the image processing apparatus having any one of the first to tenth configurations, the inspection image acquisition unit performs a plurality of processes including the mask processing on each of the plurality of camera images captured at different timings. A configuration (12th configuration) is preferable in which the pre-composite image is acquired and the plurality of pre-composite images are combined to obtain the inspection image.
上記第12の構成の画像処理装置において、前記検査画像取得部は、合成処理用メモリに記憶される画像に前記合成前画像をアルファブレンドして前記合成処理用メモリに記憶される画像を更新する処理を順次繰り返して前記検査画像を取得する構成(第13の構成)が好ましい。 In the image processing apparatus having the twelfth configuration, the inspection image acquisition unit alpha-blends the pre-combination image with the image stored in the compositing processing memory and updates the image stored in the compositing processing memory. A configuration (13th configuration) in which the processing is sequentially repeated to acquire the inspection image is preferable.
上記第13の構成の画像処理装置において、前記合成処理用メモリに記憶される初期画像は、前記基準画像を所定の濃度に調整した画像である構成(第14の構成)であってよい。 In the image processing apparatus having the thirteenth configuration, the initial image stored in the compositing processing memory may be an image obtained by adjusting the reference image to a predetermined density (fourth configuration).
上記第13の構成の画像処理装置において、前記検査画像取得部は、前記合成前画像の信頼度に基づいて、当該合成前画像を前記合成処理用メモリに記憶される初期画像とするか否かを判断する構成(第15の構成)であってよい。 In the image processing apparatus having the thirteenth configuration, whether or not the inspection image acquisition unit sets the pre-composite image as an initial image stored in the compositing processing memory based on the reliability of the pre-synthesis image. It may be a configuration (15th configuration) for determining.
上記第13から第15のいずれかの構成の画像処理装置において、前記検査画像取得部は、前記合成前画像の信頼度と、外部から取得される前記車両に関する情報とのうちの少なくともいずれか一方に基づいて、アルファブレンドのブレンド率を変化させる構成(第16の構成)であってよい。 In the image processing apparatus having any of the thirteenth to fifteenth configurations, the inspection image acquisition unit has at least one of the reliability of the pre-composite image and the information about the vehicle acquired from the outside. Based on the above, the configuration may be such that the blending ratio of the alpha blend is changed (the 16th configuration).
上記第1から第16のいずれかの構成の画像処理装置において、前記検査画像取得部は、外部から取得される前記車両に関する情報に基づいて前記カメラ画像を取得するタイミングを判断する構成(第17の構成)が好ましい。 In the image processing device having any of the first to sixteenth configurations, the inspection image acquisition unit determines the timing of acquiring the camera image based on the information about the vehicle acquired from the outside (17th). The configuration of) is preferable.
上記第17の構成の画像処理装置において、前記検査画像取得部は、車両のACCオン、且つ、エンジン停止を検出した場合に、前記カメラ画像を取得する構成(第18の構成)であってよい。 In the image processing apparatus having the 17th configuration, the inspection image acquisition unit may have a configuration (18th configuration) of acquiring the camera image when the ACC of the vehicle is turned on and the engine stop is detected. ..
上記第1から第18のいずれかの構成の画像処理装置において、前記検査画像取得部は、前記車両周辺の照度が所定の第2閾値より低いと判断される場合に、前記車両のライト点灯を指示した後に前記カメラ画像を取得する構成(第19の構成)であってよい。 In the image processing device having any of the first to eighteenth configurations, the inspection image acquisition unit turns on the light of the vehicle when it is determined that the illuminance around the vehicle is lower than a predetermined second threshold value. The configuration may be such that the camera image is acquired after the instruction (19th configuration).
上記第1から第19のいずれかの構成の画像処理装置において、前記車載カメラが複数である場合、前記車載カメラ毎に画像処理条件が決定される構成(第20の構成)が好ましい。 In the image processing device having any of the first to nineteenth configurations, when there are a plurality of on-board cameras, it is preferable that the image processing conditions are determined for each of the on-board cameras (the twentyth configuration).
上記目的を達成するために本発明の画像処理方法は、画像処理装置によって、車載カメラで撮像されたカメラ画像を処理する画像処理方法であって、前記カメラ画像に基づいて、前記車載カメラを搭載する車両のボディの検査画像を取得する検査画像取得工程を備え、前記検査画像取得工程は、車種毎のボディ形状に応じて予め設定される前記車両のエッジの探索領域を除いて画像のマスク処理を行い、前記検査画像を取得する構成(第21の構成)になっている。 In order to achieve the above object, the image processing method of the present invention is an image processing method for processing a camera image captured by an in-vehicle camera by an image processing device, and the in-vehicle camera is mounted based on the camera image. The inspection image acquisition step of acquiring the inspection image of the body of the vehicle is provided, and the inspection image acquisition step masks the image except for the search area of the edge of the vehicle which is preset according to the body shape of each vehicle type. Is performed, and the inspection image is acquired (21st configuration).
本発明によると、車載カメラの光軸ずれを適切に検出することを可能とする技術を提供できる。 According to the present invention, it is possible to provide a technique capable of appropriately detecting an optical axis deviation of an in-vehicle camera.
以下、本発明の例示的な実施形態について、図面を参照しながら詳細に説明する。以下の説明では、車両の直進進行方向であって、運転席からハンドルに向かう方向を「前方向」とする。また、車両の直進進行方向であって、ハンドルから運転席に向かう方向を「後方向」とする。また、車両の直進進行方向及び鉛直線に垂直な方向であって、前方向を向いている運転者の右側から左側に向かう方向を「左方向」とする。また、車両の直進進行方向及び鉛直線に垂直な方向であって、前方向を向いている運転者の左側から右側に向かう方向を「右方向」とする。また、本明細書では、カメラの光軸ずれのことを、単にカメラずれと表現する場合がある。 Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings. In the following description, the direction in which the vehicle travels straight from the driver's seat to the steering wheel is referred to as the "forward direction". Further, the direction in which the vehicle travels straight from the steering wheel toward the driver's seat is defined as the "rear direction". Further, the direction from the right side to the left side of the driver who is facing the front direction, which is the direction perpendicular to the straight line and the vertical direction of the vehicle, is defined as the "left direction". Further, the direction from the left side to the right side of the driver who is facing the front direction, which is the direction perpendicular to the straight line and the vertical direction of the vehicle, is defined as the "right direction". Further, in the present specification, the optical axis deviation of the camera may be simply expressed as the camera deviation.
<<1.第1実施形態>>
<1−1.カメラずれ検出システムの概略>
図1は、第1実施形態のカメラずれ検出システムSYS1の構成を示すブロック図である。本実施の形態のカメラずれ検出システムSYS1は、車載カメラの光軸ずれを検出するシステムである。カメラずれ検出システムSYS1は、画像処理装置1と、撮像部2と、センサ部3と、車両制御装置4と、を備える。
<< 1. First Embodiment >>
<1-1. Outline of camera misalignment detection system>
FIG. 1 is a block diagram showing a configuration of the camera deviation detection system SYS1 of the first embodiment. The camera deviation detection system SYS1 of the present embodiment is a system that detects the optical axis deviation of the in-vehicle camera. The camera shift detection system SYS1 includes an
画像処理装置1は、車載カメラで撮像されたカメラ画像を処理する装置である。画像処理装置1は、車載カメラを搭載する車両ごとに備えられる。本実施の形態では、画像処理装置1は、撮像部2からカメラ画像を取得して処理する。また、画像処理装置1は、センサ部3から情報を取得して、取得情報に基づいて画像処理に関する判断を行う。なお、センサ部3は、場合によっては、カメラずれ検出システムSYS1に含まれなくてもよい。
The
本実施の形態では、画像処理装置1は、撮像部2で撮像されたカメラ画像を処理して、カメラずれの検出を行う。また、本実施の形態では、画像処理装置1は、撮像部2で撮像されたカメラ画像を処理して、カメラずれを検出するための基準画像の取得も行う。なお、基準画像の取得を行う画像処理装置は、画像処理装置1とは別に設けられる他の画像処理装置であってもよい。この場合、他の画像処理装置も本発明の画像処理装置の一例となる。
In the present embodiment, the
本実施の形態では、画像処理装置1は、表示装置5と運転支援装置6とに処理情報を出力する。なお、画像処理装置1は、これらの装置5、6から情報を受け取り、受け取った情報に基づいてカメラずれの検出処理を行ってもよい。この場合、これらの装置5、6もカメラずれ検出システムSYS1に含まれてよい。
In the present embodiment, the
表示装置5は、画像処理装置1から出力される情報を画面表示する装置であり、例えば液晶表示装置であってよい。表示装置5は、例えばタッチパネル方式等の入力部を備えて、外部から情報を入力できる構成であってよい。
The
運転支援装置6は、撮像部2で撮像された画像を用いて運転を支援する装置であり、例えば自動運転支援装置、自動駐車支援装置、自動緊急ブレーキ装置等を含んでよい。運転支援装置6は、例えば、エンジンの始動とともに自動的に運転支援を開始する構成であってよい。また、運転支援装置6は、例えば運転者によってボタン等が押された場合に運転支援を開始する構成であってよい。
The driving support device 6 is a device that supports driving by using an image captured by the
撮像部2は、車両周辺の状況を監視する目的で設けられる。撮像部2は、4つのカメラ21〜24を備える。4つのカメラ21〜24は、車載カメラである。図2は、4つのカメラ21〜24が車両7に配置される位置を例示する図である。
The
カメラ21は車両7の前端に設けられる。このため、カメラ21をフロントカメラ21とも呼ぶ。フロントカメラ21の光軸21aは上からの平面視で車両7の前後方向に沿っている。フロントカメラ21は車両7の前方向を撮影する。カメラ22は車両7の後端に設けられる。このため、カメラ22をバックカメラ22とも呼ぶ。バックカメラ22の光軸22aは上からの平面視で車両7の前後方向に沿っている。バックカメラ22は車両7の後方向を撮影する。フロントカメラ21及びバックカメラ22の取付位置は、車両7の左右中央であることが好ましいが、左右中央から左右方向に多少ずれた位置であってもよい。
The
カメラ23は車両7の左側ドアミラー71に設けられる。このため、カメラ23を左サイドカメラ23とも呼ぶ。左サイドカメラ23の光軸23aは上からの平面視で車両7の左右方向に沿っている。左サイドカメラ23は車両7の左方向を撮影する。カメラ24は車両7の右側ドアミラー72に設けられる。このため、カメラ24を右サイドカメラ24とも呼ぶ。右サイドカメラ24の光軸24aは上からの平面視で車両7の左右方向に沿っている。右サイドカメラ24は車両7の右方向を撮影する。
The
各カメラ21〜24の水平方向の画角θは180度以上である。このため、カメラ21〜24によって、車両7の水平方向における全周囲を撮影することができる。また、カメラ21〜24によって撮像される画像には、カメラ21〜24を搭載する車両のボディが映り込む。
The horizontal angle of view θ of each
なお、本実施の形態では、車載カメラの数を4つとしているが、この数は適宜変更されてよく、複数であっても単数であってもよい。例えば、車両7がバックで駐車することを支援する目的で車載カメラが搭載されている場合には、車載カメラは、バックカメラ22、左サイドカメラ23、右サイドカメラ24の3つで構成されてもよい。
In the present embodiment, the number of in-vehicle cameras is four, but this number may be changed as appropriate, and may be plural or singular. For example, when an in-vehicle camera is mounted for the purpose of assisting the
図1に戻って、センサ部3は、カメラ21〜24が搭載される車両7に関する情報を検出する複数のセンサを有する。車両7に関する情報には、車両自体の情報と、車両周辺の情報とが含まれてよい。本実施の形態では、センサ部3は、例えば、車両の速度を検出する車速度センサ、ステアリングホイールの回転角を検出する舵角センサ、車両の変速装置のシフトレバーの操作位置を検出するシフトセンサ、車両周辺の照度を検出する照度センサ等が含まれる。本実施の形態では、センサ部3で検出した情報は、画像処理装置1に直接入力される構成としているが、これは例示にすぎない。例えば、センサ部3で検出した情報は、車両制御装置4を介して画像処理装置1に入力されてもよい。
Returning to FIG. 1, the
車両制御装置4は、車両の動作全般に関わる制御を行う。車両制御装置4は、例えばエンジンを制御するエンジンECU、ステアリングを制御するステアリングECU、ブレーキを制御するブレーキECU、シフトを制御するシフトECU、電源制御用ECU、ライトを制御するライトECU、電動ミラーを制御するミラーECU等を含む。なお、ECUは、「Electronic Control Unit」の略である。本実施の形態では、車両制御装置4は、画像処理装置1と情報をやり取りする。
The vehicle control device 4 controls the overall operation of the vehicle. The vehicle control device 4 includes, for example, an engine ECU that controls an engine, a steering ECU that controls steering, a brake ECU that controls brakes, a shift ECU that controls shifts, an ECU for power supply control, a light ECU that controls lights, and an electric mirror. Includes a mirror ECU to control. The ECU is an abbreviation for "Electronic Control Unit". In the present embodiment, the vehicle control device 4 exchanges information with the
図3は、カメラずれ検出システムSYS1によるカメラずれの検出フローの一例を示すフローチャートである。図3に示すように、例えば自動車メーカー等の工場において、各車両7に対して4つのカメラ21〜24が取り付けられる(ステップS1)。各カメラ21〜24は、所定の向きに光軸21a〜24aが合された状態で、所定の取付位置に固定される。
FIG. 3 is a flowchart showing an example of a camera deviation detection flow by the camera deviation detection system SYS1. As shown in FIG. 3, four
また、工場においては、基準画像の取得が行われる(ステップS2)。基準画像は、カメラ21〜24を搭載した車両7を市場に出した後、カメラ21〜24の光軸がずれているか否かを検出する際に、基準として用いられる画像である。本実施の形態において、基準画像は、車両7に正常に取り付けられた車載カメラ21〜24で撮像されたカメラ画像を処理して得られた車両7のボディのエッジ画像である。基準画像は、画像処理装置1を用いて、各カメラ21〜24に対して取得される。基準画像の取得方式の詳細については後述する。
Further, in the factory, the reference image is acquired (step S2). The reference image is an image used as a reference when detecting whether or not the optical axis of the
本実施の形態においては、カメラ21〜24を搭載した車両が市場に出された後、画像処理装置1によってカメラずれの検出が行われる。カメラずれの検出は、各カメラ21〜24に対して行われる。画像処理装置1は、カメラずれを検出するタイミングか否かを判断する(ステップS3)。画像処理装置1は、ステップS3でNoの場合、カメラずれの検出タイミグか否かの判断を繰り返す。本実施の形態では、カメラずれの検出タイミングは、画像処理装置1が自動的に判断する。当該自動判断の詳細については後述する。
In the present embodiment, after the vehicles equipped with the
なお、画像処理装置1は、例えば、表示装置5等から運転者が入力するカメラずれの検出指示によって、カメラずれの検出タイミングを認識してもよい。また、画像処理装置1は、運転支援装置6からの指示が有った場合に、カメラ画像を取得する構成であってもよい。
The
画像処理装置1は、カメラずれの検出タイミングになると(ステップS3でYes)、カメラ画像を取得するとともに処理して検査画像を取得する(ステップS4)。画像処理装置1は、取得した検査画像と、工場で予め取得した基準画像との比較を行う(ステップS5)。画像処理装置1は、比較の結果、検査画像と基準画像とが一致しているか否かの判断を行う(ステップS6)。なお、ステップS3〜ステップS6を含むカメラずれの検出方式の詳細については後述する。
When the camera deviation detection timing comes (Yes in step S3), the
検査画像と基準画像とが一致していると判断される場合(ステップS6でYes)、画像処理装置1は、カメラの光軸ずれが発生していないと判断する(ステップS7)。この場合、画像処理装置1は、例えば運転支援装置6等にカメラが正常であることを通知してもよい。画像処理装置1は、ステップS3に戻って、次の検出タイミグを検出することよって、カメラずれの検出を繰り返す。
When it is determined that the inspection image and the reference image match (Yes in step S6), the
検査画像と基準画像とが一致していないと判断される場合(ステップS6でNo)、画像処理装置1は、カメラの光軸ずれが発生していると判断する(ステップS8)。本実施の形態では、画像処理装置1は、カメラずれが発生したことを表示装置5によって報知する。また、画像処理装置1は、運転支援装置6にカメラずれの発生を通知して、運転支援装置6による運転支援を停止させる。なお、本実施の形態では、4つのカメラ21〜24が存在するが、4つのカメラ21〜24のうちの1つでも光軸ずれが発生した場合には、上記報知処理及び停止処理を行うことが好ましい。
When it is determined that the inspection image and the reference image do not match (No in step S6), the
カメラずれの発生に伴い、車両のユーザは、例えばディーラにカメラの取付調整を依頼する。これに応じて、ディーラは、カメラの取付調整を行う(ステップS9)。また、ディーラは、上述した基準画像の再取得処理を行う(ステップS10)。この後は、ステップS3に戻って、画像処理装置1は、カメラずれの検出タイミングを検出すると、再取得した基準画像に基づいて、カメラずれの検出を行う。
When the camera shifts, the vehicle user requests, for example, the dealer to adjust the mounting of the camera. In response to this, the dealer adjusts the mounting of the camera (step S9). Further, the dealer performs the reacquisition process of the reference image described above (step S10). After that, returning to step S3, when the
なお、本実施の形態では、カメラずれを検出した場合に、カメラの取付調整を行う構成としているが、これは例示にすぎない。カメラずれを検出した場合に、画像処理装置1は、カメラの光軸ずれを補正してカメラ画像を用いる構成としてもよい。例えば、カメラの取付調整を前提とした、ずれ発生の報知処理や、運転支援の停止処理は、カメラのずれ状態が不明な場合のみ行う構成としてもよい。カメラのずれ状態が不明とは、例えば、カメラがどの程度位置ずれや角度ずれを起しているかが不明な状態を指す。カメラのずれ状態が明確で補正して使用できる場合には、画像処理装置1は、ずれ発生の報知処理や、運転支援の停止処理を行わない構成としてよい。
In the present embodiment, the camera mounting adjustment is performed when the camera deviation is detected, but this is merely an example. When the camera deviation is detected, the
<1−2.画像処理装置の詳細>
図1に戻って、画像処理装置1は、マイコン11及び記憶部12を含んで構成される。マイコン11は、不図示のCPU(Central Processing Unit)、RAM(Random Access Memory)、及びROM(Read Only Memory)を含む。記憶部12は、不揮発性のメモリである。マイコン11は、記憶部12に記憶されたプログラムに基づいて情報の処理及び送受信を行う。マイコン11は、有線又は無線で、撮像部2、センサ部3、車両制御装置4、表示装置5、及び、運転支援装置6に接続される。
<1-2. Details of image processing equipment>
Returning to FIG. 1, the
マイコン11は、第1検査画像取得部111と、比較処理部112と、第2検査画像取得部113と、ずれ検出部114と、を備える。マイコン11が備えるこれらの各部111〜114の機能は、プログラムに従ってCPUが演算処理を行うことによって実現される。
The
第1検査画像取得部111は、車載カメラ21〜24で撮像されたカメラ画像に基づいて、車載カメラ21〜24を搭載する車両7のボディの検査画像を取得する。本実施の形態では、車載カメラ21〜24の数は4つであり、第1検査画像取得部111は、各カメラ21〜24で撮像されるカメラ画像ごとに検査画像を取得する。なお、第1検査画像取得部111は、本発明の検査画像取得部の一例である。
The first inspection
比較処理部112は、第1検査画像取得部111で取得した検査画像と、車両7のボディ形状の設計データとの比較処理を行う。比較処理部112は、比較の結果、検査画像が正常な画像であると判断した場合には、当該検査画像を基準画像として記憶部12に記憶する。比較処理部112は、比較の結果、検査画像が正常な画像でないと判断した場合には、基準画像の取得に失敗したことを報知する。報知手段としては、例えば表示装置5が利用されてよい。
The
なお、第1検査画像取得部111及び比較処理部112は、基準画像を取得する機能を発揮する機能部である。画像処理装置1とは別の画像処理装置で基準画像の取得を行う場合には、画像処理装置1は、第1検査画像取得部111及び比較処理部112を備えなくてもよい。
The first inspection
第2検査画像取得部113は、第1検査画像取得部111と同様に、車載カメラ21〜24で撮像されたカメラ画像に基づいて、車載カメラ21〜24を搭載する車両7のボディの検査画像を取得する。本実施の形態では、車載カメラ21〜24の数は4つであり、第2検査画像取得部113は、各カメラ21〜24で撮像されるカメラ画像ごとに検査画像を取得する。本実施の形態では、第2検査画像取得部113は、第1検査画像取得部111と若干異なる処理を利用して検査画像を取得する。なお、第2検査画像取得部113は、本発明の検査画像取得部の一例である。
Similar to the first inspection
ずれ検出部114は、基準画像と検査画像とを比較処理して車載カメラ21〜24の光軸ずれを検出する。基準画像は、記憶部12に記憶されている。本実施の形態では、基準画像と比較される検査画像は、第2検査画像取得113によって取得された検査画像である。また、本実施の形態では、車載カメラ21〜24の数は4つであり、ずれ検出部114は、各カメラ21〜24に対してカメラずれの検出を行う。
The deviation detection unit 114 detects the optical axis deviation of the in-
なお、第2検査画像取得部113及びずれ検出部114は、市場においてカメラずれを検出する機能を発揮する機能部である。
The second inspection
(1−2−1.基準画像取得方式)
記憶部12に記憶される基準画像は、上述のように、工場において取得される。本実施の形態では、画像処理装置1が基準画像の取得処理を行う。工場において実施される基準画像の取得方式について説明しておく。図4は、基準画像の取得フローの一例を示すフローチャートである。なお、上述のように、4つのカメラ21〜24それぞれに対して基準画像が取得されるが、いずれのカメラ21〜24においても基準画像の取得方式は同じである。このために、ここでは、フロントカメラ21に対する基準画像が取得される場合を代表例として説明し、その他のカメラに対する基準画像の取得については説明を省略する。
(1-2-1. Reference image acquisition method)
The reference image stored in the
図4に示すように、まず、第1検査画像取得部111は、車両7に正常に取り付けられたフロントカメラ21からカメラ画像を取得する(ステップS11)。カメラ画像の取得にあたって、車両7のボディのエッジの誤検出を生じないように、例えば照明条件、路面の濃淡等の条件を適切に設定しておくことが好ましい。
As shown in FIG. 4, first, the first inspection
図5は、フロントカメラ21で撮像したカメラ画像の一例を示す模式図である。フロントカメラ21は、画角θが180度以上であり、図5に示すように、車両7のボディ70がカメラ画像に映り込む。なお、図5において、ボディ70は、ハッチングを施した部分が該当する。ボディ70の路面8との境界部分は、円弧状の曲線70aとなっている。
FIG. 5 is a schematic view showing an example of a camera image captured by the
図4に戻って、第1検査画像取得部111は、取得したカメラ画像に対して、前処理(ぼかし)を行う(ステップS12)。前処理は、カメラ画像を平滑化する処理であり、ノイズを低減する目的で行われる。前処理は、例えば、ガウシアンフィルタ処理やメディアンフィルタ処理であってよい。また、前処理は、カメラ画像の部位ごとに処理条件を変更して実施されてもよい。例えば、カメラ画像の中央側が先鋭であり、端側がぼやけた印象である場合には、画像の真ん中側のぼかしが端側より強調された処理となるように、カメラ画像の部位ごとに処理条件が変更されてよい。
Returning to FIG. 4, the first inspection
第1検査画像取得部111は、前処理を行ったカメラ画像に対して、エッジ検出を行う(ステップS13)。エッジは、画像内の画素の画素値が急激に変化している部分であり、画像内のオブジェクトの輪郭を表す線である。第1検査画像取得部111は、カメラ画像内の画素の画素値を微分処理することにより、カメラ画像内のエッジを検出する。カメラ画像内の画素の画素値を微分処理すると、カメラ画像内の画素の画素値が急激に変化している部分の微分値が大きくなる。第1検査画像取得部111は、予め決められた基準に基づいて、微分値が大きい部分をエッジとして検出する。なお、エッジ検出の手法としては、例えばCanny法等が用いられてよい。
The first inspection
第1検査画像取得部111は、エッジ検出を行って得られたエッジ画像に対して、マスク処理を行う(ステップS14)。本実施の形態では、第1検査画像取得部111は、車種毎のボディ形状に応じて予め設定される車両7のエッジの探索領域を除いて画像のマスク処理を行う。このために、例えば風景等の不要なエッジを適切に除去することができ、ボディ70のエッジを誤検出する可能性を低減することができる。これにより、基準画像を迅速に取得することが可能になる。
The first inspection
図6は、車種毎に準備されるマスクデータ9のイメージ図である。マスクデータ9は、カメラ画像と同じ画素数を有する。図6に示すように、マスクデータ9は、マスク領域9aと、探索領域9bとを有する。図6において、探索領域9bは、弓形状の部分(ハッチングを施した部分)である。
FIG. 6 is an image diagram of
本実施の形態においては、エッジ画像のうち、マスク領域9aと重なる部分は、マスク処理によって黒とされる。詳細には、マスク領域9aと重なる部分の各画素値は0とされる。エッジ画像のうち、探索領域9bと重なる部分は、マスクされないために、マスク処理前後で画素値は変更されない。
In the present embodiment, the portion of the edge image that overlaps with the
カメラ画像のどの範囲に、車両7のボディ70のエッジが映り込むかは、車種毎に設計値によって予め特定できる。カメラの取付誤差等によって、カメラ画像から得られる車両7のボディ70のエッジは、設計値によって想定されるエッジに対して多少のずれを生じる可能性がある。このために、探索領域9bは、設計値によって想定されるエッジを囲む、幅を有する領域とされている。本実施の形態では、マスクデータ9を用いたマスク処理によって、車両7のボディ70のエッジが映り込む可能性がある領域を除いて、マスクが施される。
The range in which the edge of the
図4に戻って、第1検査画像取得部111は、マスク処理後に得られるエッジ画像に対して、不要なエッジを除去する処理を行う(ステップS15)。本実施の形態では、第1検査画像取得部111は、マスク処理後に得られるエッジ画像のうち、車両7のボディ70の設計値から想定されるエッジと異なると判断されるエッジを除去する処理を行う。このために、不要なエッジを適切に除去することができ、ボディ70のエッジを誤検出する可能性を低減することができる。
Returning to FIG. 4, the first inspection
図7は、マスク処理後のエッジ画像を例示する模式図である。図7に示すように、マスク処理後においても、エッジ画像中には、ボディ70のエッジ以外の不要エッジ10が存在する。本実施の形態では、第1検査画像取得部111は、エッジ画像中において分断された各エッジの角度検出及び長さ検出を行う。第1検査画像取得部111は、例えば、設計値から想定されるエッジの角度及び長さと大きく隔たりがあるエッジについては、不要エッジとして除去する。
FIG. 7 is a schematic view illustrating an edge image after mask processing. As shown in FIG. 7, even after the mask processing,
以上の前処理、エッジ検出、マスク処理、及び、不要エッジ除去によって、基準画像として採用して問題がないか否かを検査する検査画像が取得される。 By the above preprocessing, edge detection, mask processing, and unnecessary edge removal, an inspection image that is adopted as a reference image and inspected for any problem is acquired.
図4に戻って、比較処理部112は、検査画像を取得すると、マッチング処理を行う(ステップS16)。本実施の形態では、比較処理部112は、車種毎に形状の設計値によって決まるエッジの設計ラインと、検査画像とを用いてテンプレートマッチング処理が実施される。この際、カメラの取付誤差範囲等を考慮して、設計ラインは、適宜、位置がずらされたり、回転されたりされる。その他、場合によっては、設計ラインは、拡大されたり、縮小されたりする。
Returning to FIG. 4, when the
次に、テンプレートマッチングによって、検査画像が、正常な画像であるか否かが判断される(ステップS17)。想定範囲内の移動等によって、検査画像のエッジと、設計ラインとが一致していると判断される場合には、検査画像が正常な画像であると判断され(ステップS17でYes)、比較処理部112は、取得した検査画像を基準画像として記憶部12に記憶する(ステップS18)。
Next, the template matching determines whether or not the inspection image is a normal image (step S17). If it is determined that the edge of the inspection image and the design line match due to movement within the assumed range, the inspection image is determined to be a normal image (Yes in step S17), and comparison processing is performed. The
図8は、基準画像の一例を示す模式図である。図8に示すように、基準画像中には、車両7のボディ70のエッジを示すラインLが存在する。なお、テンプレートマッチング処理の際に、車両7のボディ70のエッジとは異なる不要なエッジが検出されることもある。このような場合には、例えば、テンプレートマッチング処理後に不要なエッジを除去し、不要なエッジが除去された画像を基準画像として記憶部12に記憶する構成としてよい。
FIG. 8 is a schematic view showing an example of a reference image. As shown in FIG. 8, in the reference image, there is a line L indicating the edge of the
なお、記憶部12に記憶される基準画像は、カメラ画像と同じ画素数である構成でもよいが、カメラ画像より少ない画素数を有する構成であってもよい。図9は、記憶部12に記憶される基準画像の一例を説明するための模式図である。
The reference image stored in the
図9に示す例では、テンプレートマッチング処理後に、基準画像として決定された画像Rの一部の範囲rのみが抽出されて記憶部12に記憶される。一部の範囲rは、基準画像に映るボディ70のエッジLは削ることなく残して、その他の不要な部分を削った範囲である。なお、この際、抽出した範囲を特定するために、一部の座標点X,Yも画像と共に記憶しておく必要がある。図9に示す例では、四角の抽出枠の1つの角部の座標X,Yが記憶される。このように記憶部12に記憶される基準画像の画素数を少なくすることによって、記憶部12に占める基準画像の容量を小さくすることができる。記憶部12への基準画像の記憶に際しては、画像の圧縮処理が用いられてもよい。圧縮処理として、例えばランレングス圧縮等が挙げられる。
In the example shown in FIG. 9, after the template matching process, only a part range r of the image R determined as the reference image is extracted and stored in the
図4に戻って、検査画像が設計ラインと一致しない場合には、検査画像が正常な画像ではないと判断され(ステップS17でNo)、比較処理部112は、基準画像の取得に失敗したことを通知する(ステップS18)。当該エラーの通知は、例えば画像表示によって行われる。エラー通知によって、基準画像の取得のやり直しが行われる。基準画像の取得のやり直しに際しては、車両位置、照明位置等の環境条件の変更や、画像処理におけるパラメータ変更等が行われる。
Returning to FIG. 4, if the inspection image does not match the design line, it is determined that the inspection image is not a normal image (No in step S17), and the
なお、基準画像の取得に失敗した要因が明確である場合は、失敗要因を画面表示等によって通知する構成としてもよい。これにより、失敗要因に応じた対処を行うことができ、迅速に基準画像を取得することが可能になる。例えば、テンプレートマッチング処理において、画像の中央部や端部等だけが一致するといった傾向が得られた場合には、車両位置や照明条件が失敗の原因と推測できる。このために、このようなテンプレートマッチングにおける処理状況が通知される構成としてもよい。 If the cause of the failure to acquire the reference image is clear, the failure factor may be notified by a screen display or the like. As a result, it is possible to take measures according to the cause of failure, and it is possible to quickly acquire a reference image. For example, in the template matching process, if a tendency is obtained that only the central portion and the edge portion of the image match, it can be inferred that the vehicle position and the lighting conditions are the cause of the failure. For this reason, the configuration may be such that the processing status in such template matching is notified.
以上に示した基準画像の取得方式では、マスク処理がエッジ検出処理後に行われる構成としたが、これは例示である。例えば、マスク処理は、エッジ検出処理の前に行われる等してもよい。また、前処理や不要エッジ除去処理は、場合によっては省略されてもよい。 In the reference image acquisition method shown above, the mask processing is performed after the edge detection processing, but this is an example. For example, the mask processing may be performed before the edge detection processing. Further, the pre-processing and the unnecessary edge removal processing may be omitted in some cases.
(1−2−2.カメラずれ検出方式)
次に、本実施の形態の画像処理装置1を用いたカメラずれの検出方式について説明する。図10は、第1実施形態のカメラずれの検出フロー例を示すフローチャートである。なお、上述のように、4つのカメラ21〜24それぞれに対してカメラずれの検出が実施されるが、いずれのカメラ21〜24においてもカメラずれの検出方式は同じである。このために、ここでは、フロントカメラ21のカメラずれの検出が取得される場合を代表例として説明し、その他のカメラに対するカメラずれの検出については説明を省略する。
(1-2-2. Camera misalignment detection method)
Next, a camera deviation detection method using the
図10に示すように、まず、第2検査画像取得部113が、検査画像を取得するためのカメラ画像(検査用のカメラ画像)の取得タイミングであるか否かを判断する(ステップS21)。第2検査画像取得部113は、検査用のカメラ画像の取得タイミングとなるまで、当該確認を繰り返す。検査用のカメラ画像の取得タイミングは、車両の走行中であってもよいし、停止中であってもよい。検査用のカメラ画像の取得タイミングは、車両7のボディ70と路面との階調差が大きくなるタイミングが好ましい。また、検査用のカメラ画像の取得タイミングは、車両7のボディ70と路面との境界に、白線や車両の影等の、エッジの誤検出要因が無いタイミングが好ましい。
As shown in FIG. 10, first, the second inspection
第2検査画像取得部113は、外部から取得される車両7に関する情報に基づいてカメラ画像を取得するタイミングを判断してよい。車両7に関する情報としては、例えば、車速情報、走行距離情報、舵角情報、車両周辺の照度情報等が挙げられる。これらの情報は、例えばセンサ部3等から取得することができる。検査用のカメラ画像を取得するタイミグに関して、車両7に関する情報を考慮することによって、例えば、常に同じ位置に影が存在すると行ったシチュエーションを避けたり、車両7のボディ70が画像中に鮮明に映り難いシチュエーションを避けたりすることができる。このために、ボディ70のエッジの誤検出が発生する可能性を低減することができる。
The second inspection
また、第2検査画像取得部113は、車両7のACCオン、且つ、エンジン停止を検出した場合に、カメラ画像を取得する構成としてよい。ACCのオンオフ状態、及び、エンジンの動作状態は、例えば車両制御装置5から取得することができる。エンジンが停止している状態で検査用のカメラ画像を取得することによって、エンジンの振動による影響を除去した画像を取得することができるために、ボディ70のエッジを正確に検出ことが可能になる。
Further, the second inspection
また、第2検査画像取得部113は、車両7の周辺の照度が所定の閾値(本発明の第2閾値の一例)より低いと判断される場合に、車両7のライト点灯を指示した後にカメラ画像を取得する構成としてよい。本構成によれば、例えば夕方や夜間等の車両7の周辺が暗い場合においても、検査用のカメラ画像中に、鮮明に車両7のボディ70を映り込ませることができる。このために、検査画像を取得する際に、ボディ70のエッジが検出できない事態や、エッジを誤検出するといった事態が発生する可能性を低減することができる。車両7の周辺の照度は、例えばセンサ部3に含まれる照度センサから取得することが可能である。別の例として、検査用のカメラ画像を取得する前に、カメラ画像を取得し、当該カメラ画像から車両7の周辺の照度を判定してもよい。
Further, when it is determined that the illuminance around the
点灯されるライトは、車両7が有する複数のライトの中から適宜選択されればよく、1つでもよいが複数であってもよい。点灯されるライトには、例えば、ヘッドライト、スモールライト、バックライト、ナンバー灯、及び、ウェルカムランプのうちの少なくともいずれか1つが含まれてよい。目的のカメラ画像を取得した後におけるライトの消灯については、例えば、エンジン作動時にはオートライト機能に従う構成とし、エンジン停止時には目的のカメラ画像を取得後に即消灯する構成等としてもよい。
The light to be turned on may be appropriately selected from a plurality of lights included in the
また、例えば車両7のエンジンが停止した時点等の所定のタイミングでカメラ21〜24の位置が移動される車両7が存在する。例えば、電動式サイドミラーが自動で折り畳まれる構成ではカメラ23、24の位置が移動する。また、カメラ21〜24を保護する目的で、カメラ21〜24が筐体の中に自動で格納される車両7がある。これらの車両7については、第2検査画像取得部113は、検査用のカメラ画像を取得する前に、カメラ21〜24の位置が、検査に適した位置に存在するか否かを判断する構成としてもよい。
Further, there is a
検査に適した位置にカメラ21〜24が存在しない場合に、第2検査画像取得部113は、車両制御部4に対してカメラの位置を検査に適した位置に移動させるように指示し、当該指示後に検査用のカメラ画像を取得する構成としてもよい。また、別の例として、検査に適した位置にカメラ21〜24が存在しない場合には、第2検査画像取得部113は、検査用のカメラ画像を取得しない構成としてもよい。この場合には、運転支援装置6による運転支援は禁止される構成としてよい。
When the
その他、第2検査画像取得部113は、車両7に対する衝撃情報を検出した場合に、カメラずれの検出を行う構成としてもよい。衝撃情報を検出した場合には、運転支援装置6による運転支援が、カメラずれが生じていないことが確認されるまで禁止される構成としてよい。
In addition, the second inspection
第2検査画像取得部113は、検査用のカメラ画像を取得するタイミングであると判断すると(ステップS21でYes)、検査用のカメラ画像を取得する(ステップS22)。この後、前処理(ステップS23)、エッジ検出(ステップS24)、マスク処理(ステップS25)、不要エッジ除去(ステップS26)が行われる。これらの処理は、基準画像の取得方式(図4参照)で説明した処理と同様であるために、詳細な説明は省略する。
When the second inspection
第2検査画像取得部113は、車種毎のボディ形状に応じて予め設定されるボディ70のエッジの探索領域9b(図6参照)を除いて画像のマスク処理を行う。このために、第2検査画像取得部113は、例えば風景等の不要なエッジを適切に除去することができ、ボディ70のエッジを誤検出する可能性を低減することができる。また、第2検査画像取得部113は、検査画像を迅速に取得することができる。また、第2検査画像取得部113は、マスク処理後に得られるエッジ画像のうち、車両7のボディ70の設計値から想定されるエッジと異なると判断されるエッジを除去する処理を行う。このために、第2検査画像取得部113は、ボディ70のエッジを誤検出する可能性を低減することができる。なお、マスク処理は、例えば、エッジ検出の前に行われてもよい。
The second inspection
図10に示すように、第2検査画像取得部113は、マスク処理後に、探索領域9aより狭い狭探索領域を除いてマスクを施す再マスク処理を行う(ステップS27)。本実施の形態では、マスク処理と再マスク処理の間に、不要エッジ除去処理が行われる。ただし、マスク処理後の不要エッジ除去処理は、場合によっては省略されてもよい。また、例えば、不要エッジ除去処理は、再マスク処理の後に行われてもよい。
As shown in FIG. 10, after the masking process, the second inspection
図11は、再マスク処理を説明するためのイメージ図である。図11に示すように、本実施の形態では、狭探索領域9cは、探索領域9bによって周辺全体を囲まれる。第2検査画像取得部113は、基準画像におけるボディ70のエッジ(ラインL)を基準として、周辺(図11において上下左右方向)にn画素ずつ広げた領域を狭探索領域9cとする。n画素は、数画素であるのが好ましく、狭探索領域9cが探索領域9bと重なったり、はみ出たりしない範囲で設定される。
FIG. 11 is an image diagram for explaining the remasking process. As shown in FIG. 11, in the present embodiment, the
再マスク処理においては、第2検査画像取得部113は、狭探索領域9cを除いて、エッジ画像に対してマスクを施す。詳細には、マスクを施す部分は、画素値がゼロにされる。マスクが施されない狭探索領域9cにおいては、再マスク処理前後で画素値は変更されない。本実施の形態では、第2検査画像取得部113は、エッジ画像の再マスク処理によって検査画像を取得する。
In the remasking process, the second inspection
本実施の形態では、最初のマスク処理より更に広い範囲に対してマスクを施すために、ボディ70のエッジ近傍に存在する不要エッジをより適切に除去することができる。例えば、本実施の形態によれば、ボディ70のエッジの近傍に存在する白線や、ボディ70のエッジの近傍に存在したりボディ70に映り込んだりする影等の不要エッジを適切に除去することが可能になる。このために、エッジの誤検出が発生する可能性を低減することができる。また、カメラ21〜24は、車両7に強固に固定されるために、カメラずれは、簡単には発生しない。このために、検査画像における車両7のボディ70のエッジは、基準画像のエッジラインの近傍に発生する確率が高い。このために、本実施の形態のように再マスク処理を行うと、大概の場合において、カメラずれの確認処理を正確且つ迅速に行うことができる。
In the present embodiment, in order to apply a mask to a wider range than the initial masking process, unnecessary edges existing in the vicinity of the edges of the
図10に戻って、検査画像が取得されると、ずれ検出部114は、検査画像と基準画像とのパターンマッチング処理を行う(ステップS28)。基準画像は、記憶部12から読み出される。ここで、図12及び図13を参照しながら、パターンマッチング処理の詳細な説明を行う。図12は、パターンマッチング処理の処理フロー例を示すフローチャートである。図13は、検査画像と基準画像との比較イメージを示す模式図である。
Returning to FIG. 10, when the inspection image is acquired, the deviation detection unit 114 performs pattern matching processing between the inspection image and the reference image (step S28). The reference image is read from the
図12に示すように、ずれ検出部114は、まず、検査画像中においてエッジとして検出された画素(以下、エッジ画素と表現することがある)の数が所定の閾値(本発明の第1閾値の一例)以上であるか否かを確認する(ステップS280)。本実施の形態では、検査画像は2値化されている。エッジが無い部分の画素値は0であり、エッジがある部分の画素値は1である。このために、検査画像中において、画素値が1である部分がエッジ画素となる。なお、検査画像は2値化されることは必須ではない。2値化されない場合には、例えば画素値が所定の値以上であるか否かを判断して、所定の値以上の画素値を有する画素をエッジ画素と判断する構成としてよい。 As shown in FIG. 12, in the deviation detection unit 114, first, the number of pixels detected as edges in the inspection image (hereinafter, may be referred to as edge pixels) is a predetermined threshold value (first threshold value of the present invention). (Example)) It is confirmed whether or not it is the above (step S280). In the present embodiment, the inspection image is binarized. The pixel value of the portion without an edge is 0, and the pixel value of the portion with an edge is 1. Therefore, in the inspection image, the portion where the pixel value is 1 becomes the edge pixel. It is not essential that the inspection image is binarized. If it is not binarized, for example, it may be determined whether or not the pixel value is equal to or greater than a predetermined value, and a pixel having a pixel value equal to or greater than a predetermined value may be determined to be an edge pixel.
エッジ画素の数が少なすぎる場合には、信頼性の高いずれ検出を行うことができない。このために、本実施の形態では、ずれ検出部114は、検査画像中においてエッジとして検出された画素(エッジ画素)の数が所定の閾値(第1閾値)より少ない場合(ステップS280でNo)、検査画像の再取得を要求する(ステップS281)。本実施の形態では、ずれ検出部114は第2検査画像取得部113に検査画像の再取得を要求する。これにより、信頼性の高い検査画像を用いてカメラずれの判定を行えるために、カメラずれの検出確度を向上することができる。
If the number of edge pixels is too small, reliable detection cannot be performed eventually. Therefore, in the present embodiment, the deviation detecting unit 114 is when the number of pixels (edge pixels) detected as edges in the inspection image is less than a predetermined threshold value (first threshold value) (No in step S280). , Request reacquisition of the inspection image (step S281). In the present embodiment, the deviation detection unit 114 requests the second inspection
ずれ検出部114は、検査画像の再取得を要求した場合、一旦、パターンマッチング処理を終了する。検査画像の再取得を要求された第2検査画像取得部113は、先の条件と同様の条件で検査画像の取得を行ってもよいが、異なる条件で検査画像の再取得を行うことが好ましい。これにより、検査画像の再取得要求が繰り返される可能性を低減することができる。
When the deviation detection unit 114 requests the reacquisition of the inspection image, the pattern matching process is temporarily terminated. The second inspection
例えば、検査画像の再取得を行う場合に、第2検査画像取得部113は、外部から取得される車両7に関する情報に基づいてカメラ画像の取得タイミングを判断して検査画像を取得する構成であることが好ましい。車両7に関する情報に基づいて検査用のカメラ画像を取得するタイミングを判断する構成とすると、先の検査画像の取得時と、異なる環境下で検査用のカメラ画像を取得することが可能になる。すなわち、再取得した検査画像は、先の検査画像と異なったエッジ画像となることが期待できる。このために、検査画像の再取得要求が繰り返される可能性を低減することができる。
For example, when the inspection image is reacquired, the second inspection
車両7に関する情報としては、例えば、センサ部3に含まれる舵角センサからの情報が挙げられる。第2検査画像取得部113は、舵角センサによってハンドル操作があったと判断される場合に、検査用のカメラ画像を取得するタイミングであると判断する。このように構成すると、先に検査画像が取得された場合と比較して、車両7の方向が変わった状態で検査画像を取得することができる。車両7の向きが変わると、例えば、影の発生状況が変化する可能性が高く、検査画像の再取得要求が繰り返される可能性を低減することができる。
Examples of the information regarding the
また、車両7に関する情報は、走行距離等であってもよい。先に検査用のカメラ画像が取得されたタイミングから車両7の位置がある程度以上離れると、例えば路面の白線状況等が変化する可能性が高くなり、検査画像の取得結果が変わることが期待できるためである。また、車両7に関する情報は、車両周辺の照度であってもよい。照度が変わると、例えば車両が鮮明に撮影されたり、影の発生状況が変化したりする可能性が高くなり、検査画像の取得結果が変わることが期待できるためである。
Further, the information about the
また、例えば、検査画像の再取得を行う場合に、第2検査画像取得部113は、先の検査画像の取得時に比べて、探索領域9bと狭探索領域9cとのうちの少なくとも狭探索領域9cを拡大して検査画像を取得する構成としてよい。再取得要求が繰り返される場合には、例えば、第2検査画像取得部113は、検査画像の再取得処理ごとに、狭探索領域9cの範囲を徐々に拡げる構成としてもよい。狭探索領域9cを拡げても再取得要求が繰り返される場合には、探索領域9bの範囲を拡げてもよい。本構成のようにすることで、例えば、カメラ21に大きな光軸ずれが生じている場合でも、パターンマッチング処理を行って、どの程度の光軸ずれが生じているかを確認することが可能になる。
Further, for example, when reacquiring the inspection image, the second inspection
また、ずれ検出部114は、検査画像の再取得を所定の回数繰り返しても検査画像中のエッジ画素の数が所定の閾値より少ない場合には、車載カメラ21が光軸ずれしていると判定することが好ましい。このように構成することによって、カメラずれの検出に要する時間が必要以上に長くなることを避けることができる。なお、カメラ21が光軸ずれを生じていると判断された場合には、その旨が、表示装置5によって表示され、運転支援装置6による運転支援が禁止される構成としてよい。
Further, the deviation detection unit 114 determines that the in-
また、再取得が所定の回数繰り返された場合に、光軸ずれと判断する代わりに、検査画像の取得環境が劣悪であるために判定不能となっていると判断してもよい。この場合、例えば、所定の時間以上経過した後に、カメラずれの検出が行われるようにしてもよい。また、判定不能と判断された場合には、その旨が、表示装置5によって表示され、運転支援装置6による運転支援が禁止される構成としてよい。
Further, when the re-acquisition is repeated a predetermined number of times, instead of determining that the optical axis is displaced, it may be determined that the determination is impossible due to the poor acquisition environment of the inspection image. In this case, for example, the camera deviation may be detected after a predetermined time or more has elapsed. Further, when it is determined that the determination cannot be made, the
また、以上では、ずれ検出部114は、検査画像中のエッジ画素の数が少ない場合に、検査画像の再取得を要求する構成としているが、これは例示である。ずれ検出部114は、エッジ画素の数が少ない場合に、単に、ずれ判定不能であると判断する構成でもよい。ずれ判定不能と判断された場合には、その旨が、表示装置5によって表示され、運転支援装置6による運転支援が禁止される構成としてよい。
Further, in the above, the deviation detection unit 114 is configured to request reacquisition of the inspection image when the number of edge pixels in the inspection image is small, but this is an example. The deviation detection unit 114 may be configured to simply determine that the deviation cannot be determined when the number of edge pixels is small. If it is determined that the deviation cannot be determined, the
ずれ検出部114は、検査画像中のエッジ画素の数が所定の閾値以上であると判断した場合には(ステップS280でYes)、検査画像中の複数のエッジ画素の中から、基準画像との比較対象となるエッジ画素を順番に1つずつ抽出する(ステップS282)。図13の例を用いて説明すると、ずれ検出部114は、検査画像中の8つのエッジ画素E1〜E8の中から、まず、エッジ画素E1を抽出する。なお、図13において、複数の小さな四角の領域は画素を指す。また、文字が記載されていない画素は、エッジ画素ではない。 When the deviation detection unit 114 determines that the number of edge pixels in the inspection image is equal to or greater than a predetermined threshold value (Yes in step S280), the deviation detection unit 114 selects the reference image from the plurality of edge pixels in the inspection image. The edge pixels to be compared are extracted one by one in order (step S282). Explaining with reference to the example of FIG. 13, the deviation detection unit 114 first extracts the edge pixel E1 from the eight edge pixels E1 to E8 in the inspection image. In FIG. 13, the plurality of small square areas refer to pixels. Further, the pixel in which the character is not described is not an edge pixel.
次に、ずれ検出部114は、基準画像において、検査画像から抽出したエッジ画素と同位置にエッジ画素が存在するか否かを判断する(ステップS283)。図13の例を用いて説明すると、基準画像には、エッジ画素E1と同じ位置にエッジ画素e1が存在する。このために、ずれ検出部114は、検査画像のエッジ画素E1については、基準画像の同位置にエッジ画素が存在すると判断する。なお、本実施の形態では、基準画像も2値化処理されたエッジ画像であり、エッジ画素の画素値は1であり、その他の画素値は0である。ただし、これは例示であり、基準画像と同様に2値化されていなくてもよい。 Next, the shift detection unit 114 determines whether or not the edge pixel exists at the same position as the edge pixel extracted from the inspection image in the reference image (step S283). Explaining with reference to the example of FIG. 13, in the reference image, the edge pixel e1 exists at the same position as the edge pixel E1. Therefore, the deviation detection unit 114 determines that the edge pixel E1 of the inspection image has the edge pixel at the same position of the reference image. In the present embodiment, the reference image is also a binarized edge image, the pixel value of the edge pixel is 1, and the other pixel values are 0. However, this is an example and may not be binarized like the reference image.
ずれ検出部114は、抽出したエッジ画素と同位置にエッジ画素が存在すると(ステップS283でYes)、完全一致のスコアをカウントアップする(ステップS284)。完全一致のスコアの初期値は0である。図13の例を用いて説明すると、エッジ画素E1については、完全一致のスコアがカウントアップされ、スコアが0から1になる。 When the edge pixel exists at the same position as the extracted edge pixel (Yes in step S283), the deviation detection unit 114 counts up the exact match score (step S284). The initial value of the exact match score is 0. Explaining with reference to the example of FIG. 13, for the edge pixel E1, the score of the exact match is counted up, and the score becomes 0 to 1.
ずれ検出部114は、完全一致のスコアをカウントアップすると、検査画像中の全エッジ画素に対して基準画像との比較による判定を行ったか否かを確認する(ステップS285)。全てのエッジ画素に対する判定を行った場合には(ステップS285でYes)、ずれ検出部114はパターンマッチング処理を終了する。全てのエッジ画素に対する判定を行っていない場合には(ステップ285でNo)、ステップS282に戻って処理が繰り返される。 When the deviation detection unit 114 counts up the exact match score, it confirms whether or not all the edge pixels in the inspection image have been determined by comparison with the reference image (step S285). When the determination is made for all the edge pixels (Yes in step S285), the shift detection unit 114 ends the pattern matching process. If the determination is not made for all the edge pixels (No in step 285), the process returns to step S282 and the process is repeated.
図13の例では、エッジ画素E1の判定が行われた後、エッジ画素E2の判定が行われる。基準画像には、エッジ画素E2と同じ位置にエッジ画素e2が存在するために、エッジ画素E1と同じ処理が繰り返され、完全一致のスコアが2となる。次に行われるエッジ画素E3については、基準画像中の同じ位置にエッジ画素が存在しない。このために、ずれ検出部114は、基準画像の同位置にエッジ画素が存在しないと判断し(ステップS283でNo)、探索範囲を周囲1画素まで拡大する(ステップS286)。図13の基準画像中に示すように、ずれ検出部114は、エッジ画素E3と同位置の画素の周囲8つの画素にまで探索範囲を拡大する。 In the example of FIG. 13, after the determination of the edge pixel E1 is performed, the determination of the edge pixel E2 is performed. Since the edge pixel e2 exists at the same position as the edge pixel E2 in the reference image, the same processing as that of the edge pixel E1 is repeated, and the exact match score is 2. Regarding the edge pixel E3 performed next, the edge pixel does not exist at the same position in the reference image. Therefore, the shift detection unit 114 determines that the edge pixel does not exist at the same position of the reference image (No in step S283), and expands the search range to one peripheral pixel (step S286). As shown in the reference image of FIG. 13, the shift detection unit 114 extends the search range to eight pixels around the pixel at the same position as the edge pixel E3.
ずれ検出部114は、拡大した基準画像の探索範囲にエッジ画素が存在するか否かを確認する(ステップS287)。探索範囲内にエッジ画素が存在する場合(ステップS287でYes)、ずれ検出部114は、1画素ずれのスコアをカウントアップする(ステップS288)。1画素ずれのスコアの初期値も0である。なお、拡大した探索範囲内に1つではなく、複数のエッジ画素が存在する場合もあるが、いずれの場合でも、カウントアップの数は1である。当該カウントアップの後は、上述のステップS285に進んで全てのエッジ画素の判定が終了したか否かが確認される。一方、ずれ検出部114は、探索範囲内にエッジ画素が存在しない場合(ステップS287でNo)、上述のステップS285に進んで全てのエッジ画素の判定が終了したか否かを確認する。 The deviation detection unit 114 confirms whether or not edge pixels are present in the search range of the enlarged reference image (step S287). When the edge pixel exists in the search range (Yes in step S287), the deviation detection unit 114 counts up the score of the deviation of one pixel (step S288). The initial value of the score of 1 pixel deviation is also 0. In addition, there may be a plurality of edge pixels instead of one in the expanded search range, but in any case, the number of count-ups is one. After the count-up, the process proceeds to step S285 described above, and it is confirmed whether or not the determination of all the edge pixels is completed. On the other hand, when the edge pixel does not exist in the search range (No in step S287), the deviation detection unit 114 proceeds to step S285 described above and confirms whether or not the determination of all the edge pixels is completed.
図13の例では、検査画像中のエッジ画素E3については、ステップS287において、基準画像の探索範囲内にエッジ画素が存在しないと判断されるために、完全一致のスコア及び1画素ずれのスコアのいずれもカウントアップされない。検査画像中のエッジ画素E4、E5については、完全一致のスコアがカウントアップされる。検査画像中のエッジ画素E6については、基準画像中の同位置にエッジ画素が存在しないために完全一致のスコアはカウントアップされないが、周囲1画素まで拡大した探索範囲にエッジ画素e5、e6が存在するために、1画素ずれのスコアがカウントアップされる。検査画像中のエッジ画素E7、E8については、完全一致のスコアがカウントアップされる。エッジ画素E8の判定が終了した時点で、ステップS285にて、全てのエッジ画素の判定が終了したと判定されて、パターンマッチング処理が終了する。図13に示す例では、終了時において、完全一致のスコアは6であり、1画素ずれのスコアは1である。 In the example of FIG. 13, for the edge pixel E3 in the inspection image, since it is determined in step S287 that the edge pixel does not exist within the search range of the reference image, the score of the exact match and the score of one pixel deviation are obtained. Neither is counted up. For the edge pixels E4 and E5 in the inspection image, the exact match score is counted up. Regarding the edge pixel E6 in the inspection image, the exact match score is not counted up because the edge pixel does not exist at the same position in the reference image, but the edge pixels e5 and e6 exist in the search range expanded to one peripheral pixel. Therefore, the score of one pixel shift is counted up. For the edge pixels E7 and E8 in the inspection image, the exact match score is counted up. When the determination of the edge pixel E8 is completed, it is determined in step S285 that the determination of all the edge pixels is completed, and the pattern matching process is completed. In the example shown in FIG. 13, at the end, the score of exact match is 6, and the score of 1 pixel deviation is 1.
なお、以上の例では、周囲1画素までしか探索範囲を拡大しなかったが、これは例示にすぎない。例えば、周囲1画素まで探索範囲を拡大してもエッジ画素が見つからなかった場合には、周囲2画素まで探索範囲を拡大するという形式で、周囲n画素まで徐々に探索範囲を拡大する構成としてもよい。n値を大きくすることで、検査画像と基準画像とのずれの詳細を把握することが可能になる。 In the above example, the search range was expanded to only one pixel around it, but this is only an example. For example, if no edge pixel is found even if the search range is expanded to 1 peripheral pixel, the search range is expanded to 2 peripheral pixels, and the search range is gradually expanded to n peripheral pixels. Good. By increasing the n value, it becomes possible to grasp the details of the deviation between the inspection image and the reference image.
図10に戻って、ずれ検出部114は、パターンマッチング処理が終了すると、パターンマッチング処理の結果に基づいてカメラずれの判定を行う(ステップS29)。本実施の形態では、ずれ検出部114は、以下の式(1)によって検査画像の基準画像に対する一致率を算出する。
一致率(%)=(完全一致のスコア+周囲n画素ずれのスコア)/(検査画像中のエッジ画素の総数)×100 (1)
なお、本実施の形態では、式(1)におけるnは1である。nの数は適宜変更されてよい。また、図13の例では、一致率(%)=87.5(=(6+1)/8×100)となる。
Returning to FIG. 10, when the pattern matching process is completed, the shift detection unit 114 determines the camera shift based on the result of the pattern matching process (step S29). In the present embodiment, the deviation detection unit 114 calculates the matching rate of the inspection image with respect to the reference image by the following formula (1).
Match rate (%) = (exact match score + peripheral n pixel shift score) / (total number of edge pixels in the inspection image) x 100 (1)
In this embodiment, n in the formula (1) is 1. The number of n may be changed as appropriate. Further, in the example of FIG. 13, the match rate (%) = 87.5 (= (6 + 1) / 8 × 100).
本実施の形態では、ずれ検出部114は、一致率が所定の閾値以上である場合には、カメラずれが発生していないと判定する。ずれ検出部114は、一致率が所定の閾値より小さい場合にはカメラずれが発生していると判定する。本実施の形態では、マスク処理及び再マスク処理によって、エッジの誤検出を低減しながら検査画像が得られるために、ずれ検出部114は、迅速且つ正確にカメラずれを判定することができる。 In the present embodiment, the deviation detection unit 114 determines that no camera deviation has occurred when the matching rate is equal to or greater than a predetermined threshold value. The deviation detection unit 114 determines that the camera deviation has occurred when the matching rate is smaller than a predetermined threshold value. In the present embodiment, the deviation detection unit 114 can quickly and accurately determine the camera deviation because the inspection image can be obtained while reducing the false detection of the edge by the mask processing and the remask processing.
なお、ずれ検出部114がずれ判定する際の判定基準は、一定であってもよいが、検査画像の取得状況によって変更されてもよい。例えば、エンジン始動直後に取得された検査画像については、他のタイミングで取得された検査画像に比べて、上述の一致率の大小を判定する所定の閾値が小さくされたり、基準画像と比較する範囲が特定の範囲に狭められたりしてもよい。 The determination standard when the deviation detection unit 114 determines the deviation may be constant, but may be changed depending on the acquisition status of the inspection image. For example, for the inspection image acquired immediately after the engine is started, the predetermined threshold value for determining the magnitude of the above-mentioned matching rate is smaller than the inspection image acquired at other timings, or the range to be compared with the reference image. May be narrowed to a specific range.
図14は、第1実施形態のカメラずれの検出フローの変形例を示すフローチャートである。図14に示す変形例において、第2検査画像取得部113による検査画像の取得工程(ステップS21〜ステップS27)、及び、ずれ検出部114によるパターンマッチング処理(ステップS28)は、上述の構成と同様である。図14に示す変形例では、ずれ検出部114は、複数の検査画像に対して基準画像との比較結果を取得し、複数回の比較結果に応じてカメラの光軸ずれの判定を行う。この点が、上述した構成と異なる。
FIG. 14 is a flowchart showing a modified example of the camera deviation detection flow of the first embodiment. In the modified example shown in FIG. 14, the inspection image acquisition step (steps S21 to S27) by the second inspection
ずれ検出部114は、パターンマッチング処理が終了すると、規定回数の処理結果が得られたか否かを判断する(スッテプS28´)。規定回数の処理結果が得られた場合(ステップS28´でYes)、ずれ検出部114は、複数回の処理結果に基づいてカメラずれの判定を行う(ステップS29)。例えば、複数回の結果の平均値がカメラずれの判定に用いられてよい。一方、規定回数の処理結果が得られていない場合(ステップS28´でNo)、ずれ検出部114は、第2検査画像取得部113に更に検査画像の取得処理を行うように指示する。これにより、ステップS21に戻って、第2検査画像取得部113は、更に検査画像を取得する。
When the pattern matching process is completed, the shift detection unit 114 determines whether or not the processing result of the specified number of times has been obtained (step S28'). When the processing result of the specified number of times is obtained (Yes in step S28'), the deviation detection unit 114 determines the camera deviation based on the processing results of a plurality of times (step S29). For example, the average value of the results of a plurality of times may be used for determining the camera deviation. On the other hand, when the processing result of the specified number of times has not been obtained (No in step S28'), the deviation detection unit 114 instructs the second inspection
本変形例では、ずれ検出部114は、各回のパターンマッチング処理の結果を、例えばマイコン11が備えるRAM(不図示)に記憶する処理を行う。これにより、ずれ検出部114は、複数回の処理結果を比較処理することができる。本実施の形態では、複数の検査画像を用いてカメラずれの判定が行われるために、カメラずれの判定精度を向上させることができる。
In this modification, the shift detection unit 114 performs a process of storing the result of each pattern matching process in, for example, a RAM (not shown) included in the
図15は、ずれ検出部114によるずれ判定の変形例を説明するための模式図である。以上においては、ずれ検出部114は、検査画像の全領域に対する一致率を算出する構成としたが、これは例示である。ずれ検出部114は、検査画像を複数の領域に分けて、当該複数の領域のそれぞれについて基準画像との比較処理を行い、得られた複数個の比較処理結果に基づいてカメラの光軸ずれの判定を行う構成としてもよい。 FIG. 15 is a schematic diagram for explaining a modified example of the deviation determination by the deviation detecting unit 114. In the above, the deviation detection unit 114 is configured to calculate the matching rate for the entire area of the inspection image, which is an example. The deviation detection unit 114 divides the inspection image into a plurality of regions, performs comparison processing with the reference image for each of the plurality of regions, and based on the obtained plurality of comparison processing results, shifts the optical axis of the camera. It may be configured to make a determination.
例えば図15に示すように、ずれ検出部114は、検出画像を破線で区画された3領域R1〜R3に分割し、3つの領域R1〜R3のそれぞれについて、基準画像と比較して一致率を算出してよい。当該例では、1つの検査画像に対して3つの一致率が得られる。ずれ検出部114は、3つの領域R1〜R3の一致率に基づいてカメラずれを総合的に判定することができる。このために、カメラずれをより適切に検出することが可能になる。なお、分割領域の数は3つに限られず、その数は適宜変更されてよい。また、検出画像における領域の分割の仕方は、画像の横方向の位置で区切る構成に限定されない。例えば、複数の領域は、それぞれ、始点座標と、当該始点座標を基準とした縦及び横の画素数で指定されてもよい。各領域において縦及び横の画素数は同じでもよいし、異なってもよい。 For example, as shown in FIG. 15, the deviation detection unit 114 divides the detection image into three regions R1 to R3 divided by broken lines, and compares each of the three regions R1 to R3 with the reference image to determine the matching rate. It may be calculated. In this example, three matching rates are obtained for one inspection image. The deviation detection unit 114 can comprehensively determine the camera deviation based on the coincidence rates of the three regions R1 to R3. Therefore, it becomes possible to detect the camera deviation more appropriately. The number of divided regions is not limited to three, and the number may be changed as appropriate. Further, the method of dividing the region in the detected image is not limited to the configuration in which the region is divided at the position in the horizontal direction of the image. For example, the plurality of regions may be designated by the start point coordinates and the number of vertical and horizontal pixels with respect to the start point coordinates, respectively. The number of vertical and horizontal pixels in each region may be the same or different.
ずれ検出部114は、例えば、3つの領域R1〜R3の全てにおいて、一致率が閾値以上である場合にのみ、カメラずれが生じていないと判定してもよい。本構成の判定方法によれば、全体として一致率を判定した場合には、カメラずれが無いと判定されるような状況においても、分割した領域のいずれかに低い一致率が認められると、カメラずれを検出する。カメラずれが発生した場合、例えば、3つの領域の1つに偏ってずれが発生する場合がある。このために、本構成の判定方法によれば、カメラずれの発生を見落とす可能性を低減できる。 The deviation detection unit 114 may determine that no camera deviation has occurred, for example, only when the matching rate is equal to or greater than the threshold value in all three regions R1 to R3. According to the determination method of this configuration, when the match rate is determined as a whole, even in a situation where it is determined that there is no camera deviation, if a low match rate is found in any of the divided areas, the camera Detect deviation. When the camera shift occurs, for example, the shift may occur unevenly in one of the three regions. Therefore, according to the determination method of this configuration, the possibility of overlooking the occurrence of camera misalignment can be reduced.
別の例として、ずれ検出部114は、カメラずれが発生した場合における3つの領域R1〜R3に対する影響度に応じて、カメラずれの判定に対する重みづけを変更してカメラずれを判定してもよい。例えば、カメラずれが発生した場合に、中央領域R2の一致率に大きな影響を与え、端領域R1、R3の一致率に小さな影響しか与えない場合がある。このような場合には、中央領域R2と、端領域R1、R3とで一致率に対する判定基準を変更してよい。これにより、カメラずれの判定を正確且つ迅速に行うことができる。 As another example, the deviation detection unit 114 may determine the camera deviation by changing the weighting for the determination of the camera deviation according to the degree of influence on the three regions R1 to R3 when the camera deviation occurs. .. For example, when a camera shift occurs, it may have a large effect on the matching rate of the central region R2 and a small effect on the matching rate of the end regions R1 and R3. In such a case, the criterion for the matching rate may be changed between the central region R2 and the end regions R1 and R3. As a result, the camera deviation can be determined accurately and quickly.
また、3つの領域R1〜R3のうちの1つでも一致率が高い領域が有る場合には、カメラずれを外部に通知することなく、カメラ画像の補正を行いながら使用する構成としてもよい。 Further, when there is a region having a high matching rate even in one of the three regions R1 to R3, the configuration may be used while correcting the camera image without notifying the outside of the camera deviation.
また、図14に示すように、複数回の比較結果を用いてカメラずれの判定を行う構成の場合、各回で検査画像と基準画像との比較領域を変更する構成としてよい。例えば、初回は、左端領域R1の比較を行い、2回目は中央領域R2の比較を行い、3回目は右端領域の比較を行うといった方式で、順次、比較領域を変更してよい。このように構成すると、各回における比較処理の負荷を軽減することができる。 Further, as shown in FIG. 14, in the case of the configuration in which the camera deviation is determined using the comparison results of a plurality of times, the comparison area between the inspection image and the reference image may be changed each time. For example, the comparison region may be sequentially changed by a method in which the leftmost region R1 is compared at the first time, the central region R2 is compared at the second time, and the rightmost region is compared at the third time. With this configuration, the load of comparison processing at each time can be reduced.
<<2.第2実施形態>>
<2−1.カメラずれ検出システム>
第2実施形態のカメラずれ検出システムは、第1実施形態の構成と同様である。このために、カメラずれ検出システムの説明は省略する。
<< 2. Second Embodiment >>
<2-1. Camera misalignment detection system>
The camera deviation detection system of the second embodiment is the same as the configuration of the first embodiment. For this reason, the description of the camera misalignment detection system will be omitted.
<2−2.画像処理装置の詳細>
第2実施形態の画像処理装置の大まかな構成は、第1実施形態の構成と同様である。また、第2実施形態の画像処理装置によって実行される基準画像の取得方式も、第1実施形態と同様である。このために、これらに関する説明は省略する。また、第1実施形態と重複する構成については、同一の符号を付して説明する。第2実施形態の画像処理装置1は、カメラずれの検出方式について、第1実施形態と異なる部分を有する。以下、異なる部分に重点をおいて説明する。
<2-2. Details of image processing equipment>
The rough configuration of the image processing apparatus of the second embodiment is the same as that of the first embodiment. Further, the reference image acquisition method executed by the image processing apparatus of the second embodiment is also the same as that of the first embodiment. For this reason, the description thereof will be omitted. Further, the configuration overlapping with the first embodiment will be described with the same reference numerals. The
(2−2−1.カメラずれ検出方式)
第2実施形態の画像処理装置1も、第2検査画像取得部113とずれ検出部114とを備える。そして、これらが、第1実施形態と同様に、カメラずれを検出する機能を発揮する。
(2-2-1. Camera misalignment detection method)
The
ただし、第2実施形態では、第2検査画像取得部113は、異なるタイミングで撮像された複数のカメラ画像のそれぞれに対して上述のマスク処理を含む処理を行って複数の合成前画像を取得し、複数の合成前画像を合成処理して検査画像を取得する構成である点が異なる。このような構成とすると、カメラ画像1枚から取得される検査画像と、基準画像との比較によってカメラずれの判定を行う場合に比べて、カメラずれの判定結果に対する信頼度を向上することができる。
However, in the second embodiment, the second inspection
図16は、第2実施形態のカメラずれの検出フロー例を示すフローチャートである。第2実施形態でも、第1実施形態と同様に、第2検査画像取得部113は、検査用のカメラ画像を取得するタイミングを判断し(ステップS31)、取得タイミングとなるとカメラ画像を取得する(ステップS32)。第2検査画像取得部113は、取得したカメラ画像に対して、前処理(ステップS33)、エッジ検出(ステップS34)、マスク処理(ステップS35)、不要エッジ除去(ステップS36)、及び、再マスク処理(ステップS37)を順次行う。ステップS31〜ステップS37の詳細は、第1実施形態と同様であるために説明を省略する。
FIG. 16 is a flowchart showing an example of a camera deviation detection flow of the second embodiment. In the second embodiment as well, as in the first embodiment, the second inspection
第2検査画像取得部113は、ステップS37で取得した合成前画像を用いて合成処理を行う(ステップS38)。本実施の形態では、第2検査画像取得部113は、合成処理用メモリに記憶される画像に、ステップS37で取得した合成前画像をアルファブレンドして合成処理用メモリに記憶される画像を更新する処理を行う。合成処理用メモリは、例えばマイコン11が備えるRAM(不図示)であってよい。
The second inspection
第2検査画像取得部113は、合成処理用メモリに記憶される画像を更新すると、合成処理を終了して良いか否かを確認する(ステップS39)。合成処理の終了は、例えば、合成処理を行った回数が規定回数を超えたか否かで判断してもよい。合成処理が終了の場合(ステップS39でYes)、この時点で合成処理用メモリに記憶される画像が検査画像とされる。一方、合成処理が終了でない場合(ステップS39でNo)、第2検査画像取得部113は、ステップS31に戻って、次の合成前画像の取得処理を行う。
When the image stored in the compositing processing memory is updated, the second inspection
図17は、合成処理について詳細に説明するための模式図である。図17を参照しながら、本実施の形態の合成処理について更に詳細に説明する。図17に示すように、第2検査画像取得部113は、検査用のカメラ画像の取得タイミングとなった時点でカメラ画像Aを取得し、上述の処理を行って合成前画像Aを取得する。なお、本実施の形態では、合成前画像は、256階調のグレースケール画像であり、各画素の画素値は0〜255のいずれかの数値で表される。
FIG. 17 is a schematic diagram for explaining the synthesis process in detail. The synthesis process of the present embodiment will be described in more detail with reference to FIG. As shown in FIG. 17, the second inspection
第2検査画像取得部113は、合成処理用メモリに記憶される初期画像を読み出す。第2検査画像取得部113は、読み出した初期画像に合成前画像Aをアルファブレンドして更新画像Aを取得する。アルファブレンドのブレンド率は、適宜決定されてよいが、例えば10%とされる。すなわち、初期画像が90%、合成前画像Aが10%の割合でブレンド処理が行われる。
The second inspection
本実施の形態では、合成処理用メモリに記憶される初期画像は、基準画像を所定の濃度に調整した画像である。詳細には、初期画像は、基準画像のエッジ画素の画素値を低階調化した画像である。例えば、基準画像のエッジ画素の画素値が255であるとする。この場合、エッジ画素を基準画像の20%程度に低階調化することを想定すると、エッジ画素の画素値は50とされる。 In the present embodiment, the initial image stored in the compositing processing memory is an image obtained by adjusting the reference image to a predetermined density. Specifically, the initial image is an image in which the pixel values of the edge pixels of the reference image are reduced in gradation. For example, it is assumed that the pixel value of the edge pixel of the reference image is 255. In this case, assuming that the gradation of the edge pixels is reduced to about 20% of the reference image, the pixel value of the edge pixels is set to 50.
第2検査画像取得部113は、ブレンド処理によって更新画像Aを取得すると、合成処理用メモリに記憶される初期画像を更新画像Aに更新する。第2検査画像取得部113は、更新画像Aを取得すると、合成処理を終了する段階でない場合には、次の合成前画像の取得を行う。
When the second inspection
なお、合成処理の終了は、上述のように合成処理の回数で判断されてもよいが、別の手法によって判断されてもよい。例えば、合成処理の終了は、アルファブレンドによって得られた画像のエッジ画素の画素値が所定の閾値を超えたか否かで判断してもよい。全てのエッジ画素の画素値が所定の閾値を超えた時点で終了としてもよいが、所定の閾値を超えるエッジ画素の割合が所定の割合を超えた時点で終了としてもよい。また、別の例として、合成処理回数と、エッジ画素の画素値との両方を基準として、合成処理の終了判断が行われてもよい。合成処理回数が極端に少ない場合、合成画像におけるエッジの信頼度が低い可能性がある。このために、合成処理回数が所定の回数を超えない場合は、エッジ画素の画素値が所定の閾値を超えている場合でも、合成処理は終了しない構成としてもよい。 The end of the synthesis process may be determined by the number of times of the synthesis process as described above, but may be determined by another method. For example, the end of the compositing process may be determined by whether or not the pixel value of the edge pixel of the image obtained by the alpha blend exceeds a predetermined threshold value. It may end when the pixel values of all the edge pixels exceed a predetermined threshold value, but it may end when the proportion of edge pixels exceeding the predetermined threshold value exceeds a predetermined ratio. Further, as another example, the end determination of the compositing process may be performed based on both the number of compositing processes and the pixel value of the edge pixel. If the number of compositing processes is extremely small, the reliability of the edges in the compositing image may be low. Therefore, when the number of times of synthesis processing does not exceed a predetermined number of times, the composition processing may not be completed even if the pixel value of the edge pixel exceeds a predetermined threshold value.
図17に示す例では、第2検査画像取得部113は、合成処理用メモリに記憶される初期画像を更新画像Aに更新した後に、検査用のカメラ画像の取得タイミングとなった時点でカメラ画像Bを取得する。カメラ画像Bの取得タイミングは、例えば、先の検査用のカメラ画像を取得したタイミングや、合成処理用メモリの画像を更新したタイミングを基準として、所定の時間が経過した時点としてもよい。これとは別に、例えば、ハンドルの舵角が変更された等の車両情報に変動があった場合や、車両周辺の照度が変わった等の車両周辺情報に変動があった場合等に、カメラ画像Bは取得されてよい。
In the example shown in FIG. 17, the second inspection
第2検査画像取得部113は、カメラ画像Bを取得すると、カメラ画像Aの場合と同様にして、合成前画像Bを取得する。第2検査画像取得部113は、合成処理用メモリに記憶される更新画像Aを読み出し、更新画像Aに合成前画像Bをアルファブレンドして更新画像Bを取得する。第2検査画像取得部113は、合成処理用メモリに記憶される更新画像Aを更新画像Bに更新する。アルファブレンドのブレンド率は、更新画像Aを得た場合と同じである。
When the second inspection
その後、第2検査画像取得部113は、合成処理の終了と判断されるまで、更新画像Bを合成処理用メモリに記憶した場合と同じ手順で、更新画像C、更新画像D・・・と、合成処理用メモリに記憶される画像を更新する処理を順次繰り返して検査画像を取得する。例えば、車両7の走行シーン等では、影、白線、障害物等、ノイズ源が多く、1つのカメラ画像のみを処理して得られる検査画像だけでは、車両7のボディ70のエッジの抽出が難しい場合がある。この点、本構成では、異なるタイミングで取得した複数のカメラ画像を順次ブレンド処理する構成である。影等のノイズは、例えば車両7の移動等によって同じ箇所に出続けず、一方、車両7のボディ70は同じ箇所に出続ける。このために、本構成のように、ブレンド処理すると、ボディ70のエッジ強度を強めつつ、影や白線等の不要なエッジの強度を弱めた検査画像を取得することができる。
After that, the second inspection
また、本実施の形態では、アルファブレンドのベース画像(初期画像)として、基準画像を低階調化した画像を利用している。カメラずれは、通常は、簡単に生じないために、検査画像のエッジ位置は、基準画像のエッジ位置からずれないことが通常である。このために、本実施の形態のように構成することによって、多くの場合において、画像の合成処理回数を低減することが可能であり、カメラずれの検出処理に要する時間を短縮することが可能である。 Further, in the present embodiment, an image obtained by lowering the gradation of the reference image is used as the base image (initial image) of the alpha blend. Since camera deviation usually does not easily occur, the edge position of the inspection image usually does not deviate from the edge position of the reference image. For this reason, by configuring as in the present embodiment, in many cases, it is possible to reduce the number of times of image composition processing, and it is possible to shorten the time required for camera deviation detection processing. is there.
図16に戻って、アルファブレンドを利用した検査画像が取得されると、ずれ検出部114は、パターンマッチング処理を行う(ステップS40)。第2実施形態では、検査画像のうち、所定の閾値を超える画素値を有する画素をエッジ画素とみなす。この点は、第1実施形態と異なるが、その他については、第2実施形態で行われるパターンマッチング処理は、第1実施形態と概ね同様である。第2実施形態では、画素値が所定の閾値を超える複数の画素を用いて、基準画像との一致率が算出される。なお、所定の閾値を超えない画素についても、画素値が0でない、或いは、画素値が極端に小さくない場合には、パターンマッチング処理を行い、暫定の一致率を算出する構成としてもよい。 Returning to FIG. 16, when an inspection image using the alpha blend is acquired, the shift detection unit 114 performs pattern matching processing (step S40). In the second embodiment, among the inspection images, pixels having a pixel value exceeding a predetermined threshold value are regarded as edge pixels. This point is different from the first embodiment, but other than that, the pattern matching process performed in the second embodiment is substantially the same as that in the first embodiment. In the second embodiment, the matching rate with the reference image is calculated using a plurality of pixels whose pixel values exceed a predetermined threshold value. Even for pixels that do not exceed a predetermined threshold value, if the pixel value is not 0 or the pixel value is not extremely small, pattern matching processing may be performed to calculate a provisional matching rate.
ずれ検出部114は、パターンマッチング処理によって得られた一致率に基づいて、カメラずれの判定を行う(ステップS41)。カメラずれの判定手法は、第1実施形態と同様であるので、説明を省略する。本実施の形態では、パターンマッチング処理に用いる検査画像の信頼性を向上できるために、カメラずれの判定の信頼度も向上できる。 The deviation detection unit 114 determines the camera deviation based on the matching rate obtained by the pattern matching process (step S41). Since the camera deviation determination method is the same as that of the first embodiment, the description thereof will be omitted. In the present embodiment, since the reliability of the inspection image used for the pattern matching process can be improved, the reliability of the camera deviation determination can also be improved.
以上においては、最初の合成前画像を取得した時点で、合成処理用メモリに初期画像が記憶されている構成とした。これは例示にすぎない。図18は、合成処理の変形例を説明するための模式図である。図18に示すように、最初に取得した合成前画像Aが、合成処理用メモリに記憶される初期画像とされてもよい。図18に示す例において、初期画像が設定された後の処理は、図17に示す例と同様である。 In the above, the initial image is stored in the compositing processing memory when the first pre-compositing image is acquired. This is just an example. FIG. 18 is a schematic diagram for explaining a modification of the synthesis process. As shown in FIG. 18, the first acquired pre-composite image A may be used as the initial image stored in the compositing processing memory. In the example shown in FIG. 18, the processing after the initial image is set is the same as the example shown in FIG.
なお、最初に取得した合成前画像の信頼度が低い場合、このような画像を初期画像とすると、合成処理の終了までに長時間を要したり、合成処理によって得た検査画像に誤エッジが多く含まれたりする可能性がある。このために、第2検査画像取得部113は、合成前画像の信頼度に基づいて、当該合成前画像を合成処理用メモリに記憶される初期画像とするか否かを判断する構成とすることが好ましい。
If the reliability of the first image before compositing is low, if such an image is used as the initial image, it may take a long time to complete the compositing process, or the inspection image obtained by the compositing process may have an erroneous edge. It may be included in large quantities. For this purpose, the second inspection
合成前画像の信頼度は、例えば、合成画像中において、エッジと判断される画素の数で判断することができる。例えば、エッジと判断される画素の数が極端に低い場合には、信頼度が低いと判断される。第2検査画像取得部113は、最初に取得した合成前画像の信頼度が高いと判断される場合には、当該合成前画像を合成処理用メモリに記憶される初期画像とする。一方、第2検査画像取得部113は、最初に取得した合成前画像の信頼度が低いと判断される場合には、信頼度の高い合成前画像が得られるまで、合成前画像の取得を繰り返す。第2検査画像取得部113は、信頼度の高い合成前画像が得られた時点で、当該合成前画像を初期画像とする。なお、信頼度が高いか否かは、例えば、エッジと判断される画素の数が所定の閾値に到達しているか否かで判断すればよい。このように構成することにより、合成処理の終了までの時間が極端に長くなったり、合成処理によって得た検査画像に誤エッジが多く含まれたりする可能性を低減することができる。
The reliability of the pre-composite image can be determined, for example, by the number of pixels determined to be edges in the composite image. For example, when the number of pixels judged to be edges is extremely low, it is judged that the reliability is low. When the second inspection
また、以上においては、各回のアルファブレンドにおけるブレンド率が一定とされる構成とした。しかし、これは例示である。例えば、第2検査画像取得部113は、合成前画像の信頼度と、外部から取得される車両7に関する情報とのうちの少なくともいずれか一方に基づいて、アルファブレンドのブレンド率を変化させる構成としてもよい。
Further, in the above, the blending ratio in each alpha blend is set to be constant. However, this is an example. For example, the second inspection
例えば、信頼度の高い合成前画像のブレンド率は大きくされ、信頼度の低い合成前画像のブレンド率は小さくされる構成としてよい。信頼度の低い合成前画像については、場合によってはブレンド率を0とし、ブレンド処理を行わない構成としてもよい。このようにすることで、ボディ70のエッジ強度を強めつつ、影や白線等の不要なエッジの強度を弱めた検査画像を効率良く取得することができる。
For example, the blending ratio of the uncombined image having high reliability may be increased, and the blending ratio of the uncombined image having low reliability may be decreased. In some cases, the pre-composite image having low reliability may have a blend ratio of 0 and may not be blended. By doing so, it is possible to efficiently acquire an inspection image in which the edge strength of the
ブレンド率を変化させるか否かを判断するための車両7に関する情報には、例えば、車速情報、走行距離情報、舵角情報、車両周辺の照度情報のうちの少なくともいずれか1つが含まれてよい。これらの情報は、例えば、センサ部3から取得することができる。照度については、カメラ画像から取得してもよい。
The information regarding the
例えば、カメラ画像取得時における車速が速い場合にブレンド率が大きくされ、当該車速が遅い場合にブレンド率が小さくされる構成としてよい。これは、車速によって、先に取得したカメラ画像と比較した場合における、走行シーンの変化の大小が変わることを考慮している。走行シーンの変化が大きいと、影や白線等の不要エッジの抽出原因となる要素に変化が生じ、ブレンド処理によって不要エッジの強度を弱めることができる。 For example, the blend ratio may be increased when the vehicle speed at the time of acquiring the camera image is high, and the blend ratio may be decreased when the vehicle speed is slow. This takes into consideration that the magnitude of the change in the driving scene when compared with the previously acquired camera image changes depending on the vehicle speed. When the change in the driving scene is large, the elements that cause the extraction of unnecessary edges such as shadows and white lines change, and the strength of the unnecessary edges can be weakened by the blending process.
同様の考え方により、例えば、先のカメラ画像を取得してから今回のカメラ画像を得るまでの走行距離が長い場合にブレンド率が大きくされ、当該走行距離が短い場合にブレンド率が小さくされてよい。走行距離の違いによって走行シーンの変化状況が異なることを考慮している。また、例えば、先のカメラ画像を取得してから今回のカメラ画像を得るまでに舵角の大きな変化があった場合にブレンド率が大きくされ、当該舵角に大きな変化がなかった場合にブレンド率が小さくされてよい。進行方向の違いによって走行シーンの変化状況が異なることを考慮している。 Based on the same idea, for example, the blend ratio may be increased when the mileage from the acquisition of the previous camera image to the acquisition of the current camera image is long, and the blend ratio may be decreased when the mileage is short. .. It is taken into consideration that the change situation of the driving scene differs depending on the difference in the mileage. Further, for example, the blend ratio is increased when there is a large change in the steering angle between the acquisition of the previous camera image and the acquisition of the current camera image, and the blend ratio is increased when there is no significant change in the steering angle. May be made smaller. It is taken into consideration that the change situation of the driving scene differs depending on the difference in the traveling direction.
また、例えば、先のカメラ画像を取得してから今回のカメラ画像を得るまでにおける車両7の照度変更が大きい場合にブレンド率が大きくされ、当該照度変更が小さい場合にブレンド率が小さくされてよい。また、カメラ画像取得時に一定の照度がない場合には、ブレンド率が小さくされたり、ブレンド率が0とされたりしてよい。車両周辺の照度の違いによって、エッジ検出のされ方が大きく変わることを考慮している。例えば、左右のサイドカメラ23、24周辺は、夜間に光源がなく、エッジ検出を行えない可能性があり、カメラずれの誤検出防止のために、ブレンド処理が行われない方が好ましい場合がある。
Further, for example, the blend ratio may be increased when the illuminance change of the
その他、一旦、カメラずれに関する誤検出が行われた場合には、以降のブレンド率が変更されることが好ましい。 In addition, once a false detection regarding camera misalignment is performed, it is preferable to change the subsequent blending ratio.
<<3.留意点>>
本明細書における実施形態や変形例の構成は、本発明の例示にすぎない。実施形態や変形例の構成は、本発明の技術的思想を超えない範囲で適宜変更されてもよい。また、複数の実施形態及び変形例は、可能な範囲で組み合わせて実施されてよい。
<< 3. Points to keep in mind >>
The configurations of the embodiments and modifications in the present specification are merely examples of the present invention. The configurations of the embodiments and modifications may be appropriately changed without exceeding the technical idea of the present invention. In addition, a plurality of embodiments and modifications may be combined and implemented to the extent possible.
車載カメラが複数である場合、車載カメラ毎に画像処理条件が決定されてよい。画像処理条件には、例えば、エッジ検出のパラメータ、マッチング処理のパラメータ、アルファブレンドのブレンド率等が含まれてよい。カメラの取付位置等に合せてパラメータ等を変更することによって、正確なカメラずれの検出が可能になる。 When there are a plurality of in-vehicle cameras, image processing conditions may be determined for each in-vehicle camera. The image processing conditions may include, for example, edge detection parameters, matching processing parameters, alpha blend blending ratio, and the like. By changing the parameters and the like according to the mounting position of the camera and the like, accurate camera deviation can be detected.
デバッグ用途として、カメラずれを検出した場合には、ずれの検出に用いられた各種のデータを保存しておくことが好ましい。例えば、ずれ判定に用いられた検査画像が、ずれ判定データ(エッジ画素の数、一致率やずれ率等)と共に保存されることが好ましい。ずれ判定データは画像に重畳されてよい。また、検査画像の元になったカメラ画像も保存されることが好ましい。また、複数枚のカメラ画像を合成処理して検査画像が得られる場合には、合成処理のパラメータ(ブレンド率等)や、合成処理前の画像等も保存されることが好ましい。 When a camera deviation is detected for debugging purposes, it is preferable to save various data used for detecting the deviation. For example, it is preferable that the inspection image used for the deviation determination is stored together with the deviation determination data (number of edge pixels, matching rate, deviation rate, etc.). The deviation determination data may be superimposed on the image. It is also preferable that the camera image that is the basis of the inspection image is also saved. Further, when an inspection image is obtained by synthesizing a plurality of camera images, it is preferable to save the parameters of the synthesizing process (blending ratio and the like), the image before the synthesizing process, and the like.
また、以上に示した実施形態では、プログラムに従ったCPUの演算処理によってソフトウェア的に各種の機能が実現されていると説明したが、これらの機能のうちの少なくとも一部は電気的なハードウェア回路により実現されてもよい。また逆に、ハードウェア回路によって実現されるとした機能のうちの少なくとも一部は、ソフトウェア的に実現されてもよい。 Further, in the above-described embodiment, it has been described that various functions are realized by software by the arithmetic processing of the CPU according to the program, but at least a part of these functions is electrical hardware. It may be realized by a circuit. On the contrary, at least a part of the functions realized by the hardware circuit may be realized by software.
1・・・画像処理装置
7・・・車両
9b・・・探索領域
9c・・・狭探索領域
12・・・記憶部
21・・・フロントカメラ
22・・・バックカメラ
23・・・左サイドカメラ
24・・・右サイドカメラ
70・・・ボディ
111・・・第1検査画像取得部
113・・・第2検査画像取得部
114・・・ずれ検出部
1 ...
Claims (20)
前記カメラ画像に基づいて、前記車載カメラを搭載する車両のボディの検査画像を取得する検査画像取得部を備え、
前記検査画像取得部は、車種毎のボディ形状に応じて予め設定される前記ボディのエッジの探索領域を除いて画像のマスク処理を行い、前記マスク処理後に得られるエッジ画像のうち、前記ボディの設計値から想定されるエッジと異なると判断されるエッジを除去して前記検査画像を取得する、画像処理装置。 An image processing device that processes camera images captured by an in-vehicle camera.
An inspection image acquisition unit that acquires an inspection image of the body of the vehicle on which the in-vehicle camera is mounted based on the camera image is provided.
The inspection image acquisition unit performs mask processing of the image excluding the search area for the edge of the body, which is preset according to the body shape for each vehicle type , and among the edge images obtained after the mask processing, the body An image processing device that acquires the inspection image by removing an edge that is determined to be different from the edge assumed from the design value .
前記基準画像と前記検査画像とを比較処理して前記車載カメラの光軸ずれを検出するずれ検出部と、
を更に備える、請求項1に記載の画像処理装置。 A storage unit that stores a reference image of the body obtained by processing the camera image captured by the in-vehicle camera normally attached to the vehicle, and a storage unit.
A deviation detection unit that detects the optical axis deviation of the in-vehicle camera by comparing the reference image and the inspection image.
Further comprising, an image processing apparatus according to claim 1.
前記検査画像の再取得を行う場合に、前記検査画像取得部は、先の前記検査画像の取得時に比べて、前記探索領域と前記狭探索領域とのうちの少なくとも前記狭探索領域を拡大して前記検査画像を取得する、請求項4に記載の画像処理装置。 After the masking process, the inspection image acquisition unit performs a remasking process of masking a narrow search area narrower than the search area.
When reacquiring the inspection image, the inspection image acquisition unit expands at least the narrow search area of the search area and the narrow search area as compared with the time of acquiring the inspection image. The image processing apparatus according to claim 4 , which acquires the inspection image.
前記カメラ画像に基づいて、前記車載カメラを搭載する車両のボディの検査画像を取得する検査画像取得工程を備え、
前記検査画像取得工程においては、車種毎のボディ形状に応じて予め設定される前記車両のエッジの探索領域を除いて画像のマスク処理を行い、前記マスク処理後に得られるエッジ画像のうち、前記ボディの設計値から想定されるエッジと異なると判断されるエッジを除去して前記検査画像を取得する、画像処理方法。 An image processing method for processing a camera image captured by an in-vehicle camera by an image processing device.
The inspection image acquisition step of acquiring the inspection image of the body of the vehicle equipped with the in-vehicle camera based on the camera image is provided.
In the inspection image acquisition step , mask processing is performed on the image excluding the search area for the edge of the vehicle, which is preset according to the body shape for each vehicle type , and among the edge images obtained after the mask processing, the body An image processing method for acquiring the inspection image by removing an edge determined to be different from the expected edge from the design value of .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016246842A JP6767255B2 (en) | 2016-12-20 | 2016-12-20 | Image processing device and image processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016246842A JP6767255B2 (en) | 2016-12-20 | 2016-12-20 | Image processing device and image processing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2018101898A JP2018101898A (en) | 2018-06-28 |
| JP6767255B2 true JP6767255B2 (en) | 2020-10-14 |
Family
ID=62714540
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2016246842A Active JP6767255B2 (en) | 2016-12-20 | 2016-12-20 | Image processing device and image processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6767255B2 (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10664997B1 (en) * | 2018-12-04 | 2020-05-26 | Almotive Kft. | Method, camera system, computer program product and computer-readable medium for camera misalignment detection |
| JP2022090281A (en) * | 2020-12-07 | 2022-06-17 | 日東電工株式会社 | Detection method for marginal portion of optical film |
| JP2022152404A (en) * | 2021-03-29 | 2022-10-12 | 本田技研工業株式会社 | Axis deviation detection device |
| CN117011830B (en) * | 2023-08-16 | 2024-04-26 | 微牌科技(浙江)有限公司 | Image recognition method, device, computer equipment and storage medium |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2013129264A (en) * | 2011-12-20 | 2013-07-04 | Honda Motor Co Ltd | Calibration method for on-vehicle camera and calibration device for on-vehicle camera |
| JP6364797B2 (en) * | 2014-02-06 | 2018-08-01 | 株式会社デンソー | Image analysis apparatus and image analysis method |
| JP6260424B2 (en) * | 2014-04-16 | 2018-01-17 | 株式会社デンソー | In-vehicle camera mounting error detection device |
-
2016
- 2016-12-20 JP JP2016246842A patent/JP6767255B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2018101898A (en) | 2018-06-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5682304B2 (en) | Image providing device | |
| JP6767255B2 (en) | Image processing device and image processing method | |
| JP6213567B2 (en) | Predicted course presentation device and predicted course presentation method | |
| WO2018149593A1 (en) | Apparatus and method for displaying information | |
| WO2015118806A1 (en) | Image analysis apparatus and image analysis method | |
| JP7270499B2 (en) | Abnormality detection device, abnormality detection method, posture estimation device, and mobile body control system | |
| JP2007076396A (en) | Shading device for vehicle | |
| WO2017154317A1 (en) | Vehicle display control device, vehicle display system, vehicle display control method, and program | |
| JP6424449B2 (en) | Rear status display device, rear status display method | |
| JP7031799B1 (en) | Image processing device, image processing method, and image processing program | |
| JP7571843B2 (en) | Vehicle image processing device and vehicle image processing method | |
| JP4770385B2 (en) | Automatic sun visor | |
| JP2008258778A (en) | Imaging system | |
| US11323633B2 (en) | Automated creation of a freeform mask for automotive cameras | |
| US20230391192A1 (en) | Warning apparatus and warning method | |
| JP2017163345A (en) | VEHICLE DISPLAY CONTROL DEVICE, VEHICLE DISPLAY SYSTEM, VEHICLE DISPLAY CONTROL METHOD, AND PROGRAM | |
| JPWO2020121758A1 (en) | Imaging unit control device | |
| TWI630818B (en) | Dynamic image feature enhancement method and system | |
| WO2014010179A1 (en) | Field of view assistance device for vehicle | |
| JP2006349637A (en) | In-vehicle fog condition determination device and auto fog lamp system | |
| WO2018135413A1 (en) | Driving support system and driving support method | |
| JP2013009041A (en) | Vehicle photographing display control system | |
| JP6866212B2 (en) | Display control device, display control method and camera monitoring system | |
| JP2011160117A (en) | Image processor and image processing method | |
| JP6206334B2 (en) | Detection device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190930 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200604 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200630 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200720 |
|
| 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: 20200901 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200917 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6767255 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |