JP2015194829A - Image processor and image processing method - Google Patents

Image processor and image processing method Download PDF

Info

Publication number
JP2015194829A
JP2015194829A JP2014071546A JP2014071546A JP2015194829A JP 2015194829 A JP2015194829 A JP 2015194829A JP 2014071546 A JP2014071546 A JP 2014071546A JP 2014071546 A JP2014071546 A JP 2014071546A JP 2015194829 A JP2015194829 A JP 2015194829A
Authority
JP
Japan
Prior art keywords
image
value
color
image processing
processed
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.)
Pending
Application number
JP2014071546A
Other languages
Japanese (ja)
Inventor
英春 服部
Hideharu Hattori
英春 服部
影山 昌広
Masahiro Kageyama
昌広 影山
村上 智一
Tomokazu Murakami
智一 村上
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2014071546A priority Critical patent/JP2015194829A/en
Publication of JP2015194829A publication Critical patent/JP2015194829A/en
Pending legal-status Critical Current

Links

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To detect an object in an image by separating the object from a background even in the case that the brightness of the image in a video image changes.SOLUTION: An image processor includes a storage part for storing a plurality of images photographed by a photographing device, a correction part for correcting the color value of an image of a processing target so as to highlight light and darkness on the basis of a representative value of color values of the image of the processing target and a representative value of color values of one or more past images photographed at a time before a time when the image of the processing target is photographed, and a detection part for detecting an object of a detection target from the image of the processing target by comparing the corrected color value of the image of the processing target with a threshold, and outputting the result.

Description

本発明は、画像処理装置および画像処理方法に関する。   The present invention relates to an image processing apparatus and an image processing method.

近年、車載映像を用いて、道路や道路上付属物を簡易に点検することで点検コストを抑えたいというニーズが高まっている。従来は、車両に最低2人が搭乗し、一人は車両の運転を行い、もう一人は道路上の点検物を見つけた場合に、ドライブレコーダーの撮影ボタンを押して点検物の画像を取得している。しかし、走行車両の速度が速いため、点検物の見逃しまたは撮影ボタン押下の遅れによって点検物が画像に映っていないなどの課題があり、効率よく点検できず、全ての点検物の画像を取得するために点検車両が同じ経路を数回走行しなければならない。   In recent years, there is a growing need to reduce inspection costs by simply inspecting roads and road accessories using in-vehicle video. In the past, when at least two people boarded a vehicle, one driver operated the vehicle, and the other found an inspection item on the road, the image of the inspection item was acquired by pressing the shooting button on the drive recorder. . However, since the speed of the traveling vehicle is high, there are problems such as missing inspection items or delays in pressing the shooting button, and inspection items are not reflected in the image, so efficient inspection is not possible and images of all inspection items are acquired. Therefore, the inspection vehicle has to travel the same route several times.

従来技術として、特許文献1に記載された車両環境認識装置は、画像内のエッジ検出および画像の色変換を行い、画像内の色の平均値と速度標識などの形状を参考にして、車載映像内から速度標識を検出している。   As a conventional technique, the vehicle environment recognition apparatus described in Patent Document 1 detects an edge in an image and performs color conversion of the image, and refers to an average value of the color in the image and a shape such as a speed sign, and the vehicle-mounted image A speed indicator is detected from within.

特開2010−044445号公報JP 2010-044445 A

しかしながら、道路の経路に応じて車両の走行方向が変わり、光線の状態が順光、逆光、または直射日光等へ変化することによって、映像内の画像の明るさが徐々に変わるため、画像毎に、画像内の色の平均値を用いても、画像内の背景と背景内の物体(点検物)を分離できず、その結果、背景内の物体を検出できないという問題がある。   However, since the traveling direction of the vehicle changes according to the route of the road, the brightness of the image in the video changes gradually by changing the state of the light beam to forward light, backlight, direct sunlight, etc. Even if the average value of the colors in the image is used, the background in the image and the object (inspection object) in the background cannot be separated, and as a result, the object in the background cannot be detected.

図2は、本発明が解決しようとする課題の説明図である。   FIG. 2 is an explanatory diagram of a problem to be solved by the present invention.

図2(a)には、直射日光等によって画像が明るい場合の画像の例として、画像210を示す。画像210は、空211、壁212、番号板213及び道路214を含む。この例において、壁212は道路214の側壁であり、番号板213は、番号(例えば「123」)が表示され、側壁に設置された物体である。図2(a)の例では、直射日光等のため、空211、壁212、番号板213及び道路214がいずれも明るく写っている。このため、画像210の画素の階調値は、ヒストグラムH1に示すように高い値の範囲に偏って分布する。   FIG. 2A shows an image 210 as an example of an image when the image is bright due to direct sunlight or the like. The image 210 includes a sky 211, a wall 212, a number plate 213, and a road 214. In this example, the wall 212 is a side wall of the road 214, and the number plate 213 is an object on which a number (for example, “123”) is displayed and installed on the side wall. In the example of FIG. 2A, the sky 211, the wall 212, the number plate 213, and the road 214 are all bright because of direct sunlight. For this reason, the gradation values of the pixels of the image 210 are unevenly distributed in a high value range as shown in the histogram H1.

図2(b)には、順光等によって画像が鮮明な場合の画像の例として、画像220を示す。画像220は、空221、壁222、番号板223及び道路224を含む。これらは、それぞれ空211、壁212、番号板213及び道路214と同様のものであってよいが、少なくとも壁222、番号板223及び道路224は、それぞれ壁212、番号板213及び道路214より暗く写っている。このため、画像220の画素の階調値は、ヒストグラムH2に示すように中程度の値の範囲に分布する。   FIG. 2B shows an image 220 as an example of an image when the image is clear due to direct light or the like. The image 220 includes a sky 221, a wall 222, a number plate 223, and a road 224. These may be similar to sky 211, wall 212, number plate 213, and road 214, respectively, but at least wall 222, number plate 223, and road 224 are darker than wall 212, number plate 213, and road 214, respectively. It is reflected. For this reason, the gradation values of the pixels of the image 220 are distributed in a medium value range as shown in the histogram H2.

図2(c)には、逆光等によって画像が暗い場合の画像の例として、画像230を示す。画像230は、空231、壁232、番号板233及び道路234を含む。これらは、それぞれ空221、壁222、番号板223及び道路224と同様のものであってよいが、少なくとも壁232、番号板233及び道路234は、それぞれ壁222、番号板223及び道路224よりさらに暗く写っている。このため、画像230の画素の階調値は、ヒストグラムH3に示すように低い値の範囲に偏って分布する。   FIG. 2C shows an image 230 as an example of an image when the image is dark due to backlight or the like. The image 230 includes a sky 231, a wall 232, a number plate 233, and a road 234. These may be similar to sky 221, wall 222, number plate 223 and road 224, respectively, but at least wall 232, number plate 233 and road 234 are further than wall 222, number plate 223 and road 224, respectively. It looks dark. For this reason, the gradation values of the pixels of the image 230 are distributed unevenly in a low value range as shown in the histogram H3.

本発明の目的は、上記課題を鑑み、映像内の画像の明るさが変わる場合でも、画像内の背景と背景内の物体とを分離して、背景内の物体検知を実現する画像処理装置およびその方法を提供することである。   In view of the above problems, an object of the present invention is to provide an image processing apparatus that separates a background in an image from an object in the background and realizes object detection in the background even when the brightness of the image in the video changes. It is to provide that method.

上記の課題を解決するために、本発明は、撮影装置によって撮影された複数の画像を記憶する記憶部と、処理対象の画像の色値の代表値と、前記処理対象の画像が撮影された時刻より前の時刻に撮影された一つ以上の過去の画像の色値の代表値と、に基づいて、前記処理対象の画像の色値を、明暗を強調するように補正する補正部と、補正された前記処理対象の画像の色値を閾値と比較することによって、前記処理対象の画像から、検出対象の物体を検出し、その結果を出力する検出部と、を有することを特徴とする。   In order to solve the above problems, the present invention provides a storage unit that stores a plurality of images photographed by a photographing device, a representative value of color values of a processing target image, and the processing target image. A correction unit that corrects the color value of the image to be processed so as to emphasize light and dark based on the representative value of the color value of one or more past images taken at a time before the time; A detection unit that detects a detection target object from the processing target image by comparing the corrected color value of the processing target image with a threshold value, and outputs the result. .

本発明の一形態によれば、動画を処理する画像処理装置において、映像内の画像の明るさが変わる場合でも、画像内の背景と背景内の物体を分離して、背景内の物体を検出することができる。上記した以外の課題、構成、および効果は、以下の実施形態の説明によって明らかにされる。   According to an aspect of the present invention, in an image processing apparatus that processes a moving image, even when the brightness of an image in a video changes, the background in the image is separated from the object in the background, and the object in the background is detected. can do. Problems, configurations, and effects other than those described above will be clarified by the following description of embodiments.

本発明の実施例1に係る画像処理装置を示すブロック図である。1 is a block diagram illustrating an image processing apparatus according to Embodiment 1 of the present invention. 本発明が解決しようとする課題の説明図である。It is explanatory drawing of the subject which this invention tends to solve. 本発明の実施例1に係る画像処理装置の明暗補正部の動作の一例を説明する図である。It is a figure explaining an example of operation | movement of the brightness correction part of the image processing apparatus which concerns on Example 1 of this invention. 本発明の実施例1に係る画像処理装置の物体検出部の動作の一例を説明する図である。It is a figure explaining an example of operation | movement of the object detection part of the image processing apparatus which concerns on Example 1 of this invention. 本発明の実施例1に係る画像処理装置の描画部の動作の一例を説明する図である。It is a figure explaining an example of operation | movement of the drawing part of the image processing apparatus which concerns on Example 1 of this invention. 本発明の実施例1に係る画像処理装置の画像処理方法の動作を示すフローチャートである。3 is a flowchart illustrating an operation of an image processing method of the image processing apparatus according to the first embodiment of the present invention. 本発明の実施例2に係る画像処理装置を示すブロック図である。It is a block diagram which shows the image processing apparatus which concerns on Example 2 of this invention. 本発明の実施例2に係る画像処理装置の物体検出部の動作の一例を説明する図である。It is a figure explaining an example of operation | movement of the object detection part of the image processing apparatus which concerns on Example 2 of this invention. 本発明の実施例2に係る画像処理装置の画像処理方法の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the image processing method of the image processing apparatus which concerns on Example 2 of this invention.

以下、本発明の各実施例を、図面を参照して説明する。各図面において共通の構成要素には同一の符号を付与した。   Embodiments of the present invention will be described below with reference to the drawings. In each drawing, the same code | symbol was provided to the common component.

図1は、本発明の実施例1に係る画像処理装置1を示すブロック図である。画像処理装置1は、入力部10、画像補正部11、色空間変換部12、明暗補正部13、物体検出部14、描画部15、記録部16、制御部91およびメモリ90を備えている。   FIG. 1 is a block diagram illustrating an image processing apparatus 1 according to the first embodiment of the present invention. The image processing apparatus 1 includes an input unit 10, an image correction unit 11, a color space conversion unit 12, a light / dark correction unit 13, an object detection unit 14, a drawing unit 15, a recording unit 16, a control unit 91, and a memory 90.

各部の動作を説明する。入力部10には動画像データが入力される。例えば入力部10は、ドライブレコーダー等の撮像手段(図示省略)が、所定時間間隔で撮像した、JPG、Jpeg2000、PNG、BMP形式等の符号化された静止画像データ等を取得して、その画像を入力画像として画像補正部11に出力してもよい。また、入力部10は、MotionJPEG、MPEG、H.264、HD/SDI形式等の動画像データから、所定間隔のフレームの静止画像データを抜き出して、その画像を入力画像として画像補正部11に出力してもよい。また、入力部10は、撮像手段がバスまたはネットワーク等を介して取得した画像を入力画像として画像補正部11に出力してもよい。   The operation of each part will be described. Moving image data is input to the input unit 10. For example, the input unit 10 obtains encoded still image data such as JPG, Jpeg2000, PNG, BMP, etc. captured by imaging means (not shown) such as a drive recorder at predetermined time intervals, and the image May be output to the image correction unit 11 as an input image. In addition, the input unit 10 includes Motion JPEG, MPEG, H.264. It is also possible to extract still image data of frames at a predetermined interval from moving image data such as H.264, HD / SDI format, and output the image as an input image to the image correction unit 11. The input unit 10 may output an image acquired by the imaging unit via a bus or a network as an input image to the image correction unit 11.

また、入力部10は、後述するように、脱着可能な記録媒体に、既に記憶されていた画像を取得し、それを入力画像として画像補正部11に出力してもよい。   Further, as will be described later, the input unit 10 may acquire an image that has already been stored in a removable recording medium, and output the acquired image to the image correction unit 11 as an input image.

画像補正部11は、入力画像に対して画像の平滑化、輪郭強調およびコントラスト強調を行って、補正後の入力画像を作成する。この補正は、公知の方法を含む任意の方法によって実行することができる。   The image correction unit 11 performs image smoothing, contour enhancement, and contrast enhancement on the input image to create a corrected input image. This correction can be performed by any method including a known method.

色空間変換部12では、補正後の入力画像の色空間を変換した画像を作成する。   The color space conversion unit 12 creates an image obtained by converting the color space of the input image after correction.

明暗補正部13では、現在の画像(すなわち補正後の入力画像)の明るさ情報と、メモリ90に記憶した過去画像(すなわち現在の画像より古い補正後の入力画像)の明るさ情報とを用いて、現在の画像の明るさ変化量を求め、その明るさ変化量を用いて明暗を補正した画像を作成する。   The brightness correction unit 13 uses the brightness information of the current image (that is, the corrected input image) and the brightness information of the past image (that is, the corrected input image older than the current image) stored in the memory 90. Thus, the brightness change amount of the current image is obtained, and an image in which the brightness is corrected using the brightness change amount is created.

物体検出部14は、明暗補正後の画像から閾値を求め、その閾値を用いて、その画像内の背景と背景内の物体を分離して、背景内の物体を検出する。   The object detection unit 14 obtains a threshold value from the image after light and dark correction, uses the threshold value to separate the background and the object in the background, and detects the object in the background.

描画部15は、物体検出部14で検出した物体を囲むように検出枠を画像上に描画する。   The drawing unit 15 draws a detection frame on the image so as to surround the object detected by the object detection unit 14.

記録部16は、描画部15で原画像上に検出枠を描画した画像をメモリ90に保存する。   The recording unit 16 stores an image in which the detection frame is drawn on the original image by the drawing unit 15 in the memory 90.

制御部91は、画像処理装置1内の各要素(例えば上記の入力部10〜記録部16およびメモリ90)に接続される。画像処理装置1の各要素は、自律的に動作してもよいし、制御部91の指示に従って動作してもよい。   The control unit 91 is connected to each element in the image processing apparatus 1 (for example, the input unit 10 to the recording unit 16 and the memory 90 described above). Each element of the image processing apparatus 1 may operate autonomously or may operate according to an instruction from the control unit 91.

なお、上記の入力部10〜記録部16は、それぞれが専用のハードウェアによって実現されてもよいし、汎用のプロセッサがメモリ90に格納されたプログラムを実行することによって実現されてもよい。後者の場合、制御部91が入力部10〜記録部16を実現するプロセッサであってもよい。   Each of the input unit 10 to the recording unit 16 may be realized by dedicated hardware, or may be realized by a general-purpose processor executing a program stored in the memory 90. In the latter case, the controller 91 may be a processor that implements the input unit 10 to the recording unit 16.

このように、本実施例の画像処理装置1の特徴は、色空間変換部12で求めた色変換後の画像と、明暗補正部13で算出した画像の明るさ変化量を用いて、画像毎に画像の明暗強調割合を変更し、物体検出部14で明暗補正後の画像から閾値を求め、その閾値を用いて、画像内の背景と背景内の物体を分離して、背景内の物体を検出することである。   As described above, the feature of the image processing apparatus 1 according to the present embodiment is that the image after color conversion obtained by the color space conversion unit 12 and the brightness change amount of the image calculated by the light / dark correction unit 13 are used for each image. And the object detection unit 14 obtains a threshold value from the image after the brightness correction, separates the background in the image from the object in the background using the threshold value, and determines the object in the background. Is to detect.

以下、各部の構成と動作を詳細に説明する。   Hereinafter, the configuration and operation of each unit will be described in detail.

色空間変換部12は、例えば、従来技術を用いて、入力画像のRGB色空間をLab色空間に変換した画像を作成する。   The color space conversion unit 12 creates an image obtained by converting the RGB color space of the input image into the Lab color space using, for example, a conventional technique.

図3は、本発明の実施例1に係る画像処理装置1の明暗補正部13の動作の一例を説明する図である。   FIG. 3 is a diagram illustrating an example of the operation of the light / dark correction unit 13 of the image processing apparatus 1 according to the first embodiment of the present invention.

入力され、補正された画像Nから色空間変換部12が求めたLab色空間へ変換後の画像を画像NAとすると、明暗補正部13は、画像NAの色値であるa値を用いて、画像Nの領域R2内のa値の代表値を算出する。以下の例では、明暗補正部13は、a値の代表値として平均値aveR2およびa値の最小値minR2を算出する。また、明暗補正部13は、メモリ90から、画像N−1の領域R1内のa値の代表値として、平均値aveR1および最小値minR1を読込む。   Assuming that an image converted from the input and corrected image N into the Lab color space obtained by the color space conversion unit 12 is an image NA, the light and dark correction unit 13 uses the a value that is the color value of the image NA. A representative value of the a value in the region R2 of the image N is calculated. In the following example, the light / dark correction unit 13 calculates the average value aveR2 and the minimum value minR2 of the a value as representative values of the a value. Further, the light / dark correction unit 13 reads the average value aveR1 and the minimum value minR1 from the memory 90 as representative values of the a value in the region R1 of the image N-1.

ここで、画像N−1は、画像Nより前に撮影された画像である。例えば、走行中の車両に搭載された撮像手段がある時刻Nに撮影した画像が画像Nであり、当該車両の当該撮像手段が時刻Nより前の時刻N−1に撮影した画像が画像N−1である。以下、検出対象の物体が、図2の例と同様の番号板である場合を例として説明する。すなわち、画像Nは、空321、壁322、壁322上に設置された物体323及び道路324を含み、物体323は、画像処理装置1による検出の対象となる番号板である。本実施例では、この物体323が、ユーザによる点検の対象物である。   Here, the image N-1 is an image taken before the image N. For example, an image captured at a time N by an imaging unit mounted on a traveling vehicle is an image N, and an image captured by the imaging unit of the vehicle at a time N−1 before the time N is an image N−. 1. Hereinafter, a case where the detection target object is a number plate similar to the example of FIG. 2 will be described as an example. That is, the image N includes a sky 321, a wall 322, an object 323 installed on the wall 322, and a road 324, and the object 323 is a number plate to be detected by the image processing apparatus 1. In this embodiment, the object 323 is an object to be inspected by the user.

同様に、画像N−1は、空311、壁312、物体313及び道路314を含む。これらは、それぞれ、空321、壁322、壁322上に設置された物体323及び道路324と同種ではあるが、別の時刻に別の場所で撮影されたものである。例えば、車両の進行方向によって太陽光の角度が変わることで明るさが変化し、物体313は、物体323と明るさが異なる番号板である。したがって、画像Nの明るさは、画像N−1の明るさと異なる場合がある。   Similarly, the image N-1 includes a sky 311, a wall 312, an object 313, and a road 314. These are the same kind as the sky 321, the wall 322, the object 323 installed on the wall 322, and the road 324, but were taken at different times at different locations. For example, the brightness changes as the angle of sunlight changes depending on the traveling direction of the vehicle, and the object 313 is a number plate that is different in brightness from the object 323. Therefore, the brightness of the image N may be different from the brightness of the image N-1.

また、領域R2は、画像N内の所定の範囲に相当する領域であり、例えば画像Nの全体または所定の一部が領域R2であってもよい。例えば、撮像手段の設置位置、姿勢及び撮影される番号板の取り付け位置等の関係から、画像Nにおいて番号板が写っている可能性がある範囲が限定される場合、その範囲を領域R2と設定してもよい。画像N−1における領域R1は、画像Nにおける領域R2と同様である。   The region R2 is a region corresponding to a predetermined range in the image N. For example, the entire image N or a predetermined part of the image N may be the region R2. For example, when the range in which the number plate may be reflected in the image N is limited from the relationship between the installation position and orientation of the image pickup means and the position of the number plate to be photographed, the range is set as the region R2. May be. The region R1 in the image N-1 is the same as the region R2 in the image N.

次に、明暗補正部13は、式1を用いて、画像N−1およびそれよりさらに過去の画像の明るさ(上記の例ではa値)の平均値をブレンドしたaveR1に、さらに画像Nの明るさの平均値aveR2をブレンドした平均値aveRNを算出する。ただし、式1において、C1=C2+C3である。   Next, the light / darkness correction unit 13 further uses the equation 1 to aveR1 obtained by blending the average values of the brightness of the image N-1 and the past image (a value in the above example), and further to the image N. An average value aveRN obtained by blending the brightness average values aveR2 is calculated. However, in Formula 1, C1 = C2 + C3.

また、明暗補正部13は、式2を用いて、画像N−1およびそれよりさらに過去の画像の明るさの最小値をブレンドしたminR1に、さらに画像Nの明るさの最小値minR2をブレンドした最小値minRNを算出する。ただし、式2において、D1=D2+D3である。   Further, the brightness correction unit 13 blends the minimum value minR2 of the brightness of the image N with the minR1 obtained by blending the minimum value of the brightness of the image N-1 and the past image further using the formula 2. A minimum value minRN is calculated. However, in Formula 2, D1 = D2 + D3.

なお、処理対象である画像N及びそれより過去の画像に関して上記のようにaveRNおよびminRNを算出した後、画像Nより後に撮影された画像を新たな処理対象として新たなaveRNおよびminRNを計算する場合、明暗補正部13は、当該新たな処理対象の画像を新たな画像Nとし、前回計算されたaveRNを新たなaveR1とし、前回計算されたminRNを新たなminR1として式1および式2を計算する。このような計算方法は、処理対象の画像の画素値の代表値(上記の例では平均値および最小値)と、それより前の時刻に撮影された一つ以上の画像の画素値の代表値とを用いて、処理対象の画像の画素値の代表値をそれより前の時刻に撮影された一つ以上の画像の画素値の代表値に合成するための計算方法の一例である。   When calculating aveRN and minRN as described above for the image N to be processed and images past it, and then calculating new aveRN and minRN with the image taken after the image N as a new processing target The brightness correction unit 13 calculates Equations 1 and 2 with the new image to be processed as a new image N, the previous calculated aveRN as a new aveR1, and the previously calculated minRN as a new minR1. . Such a calculation method includes a representative value of pixel values of an image to be processed (average value and minimum value in the above example) and a representative value of pixel values of one or more images taken at a time earlier than that. And a representative value of pixel values of an image to be processed is an example of a calculation method for synthesizing the representative value of pixel values of one or more images taken at a time earlier than that.

なお、C1〜C3およびD1〜D3の値は、予め適切に設定しておくことができる。例えば、C2に対するC3の比率が小さいほど、撮影時刻が新しい画像の画素値の平均値の合成割合が小さくなる。同様に、D2に対するD3の比率が小さいほど、撮影時刻が新しい画像の画素値の最小値の合成割合が小さくなる。C1〜C3の値はそれぞれD1〜D3の値と同一であってもよいが、異なっていてもよい。一般に、画像全体が明るい場合と暗い場合とで物体の検出の困難性に相違があるため、C1〜C3とD1〜D3とを異なる値に設定することで物体の検出精度が向上する場合がある。   Note that the values of C1 to C3 and D1 to D3 can be appropriately set in advance. For example, the smaller the ratio of C3 to C2, the smaller the composite ratio of the average value of pixel values of an image with a new shooting time. Similarly, the smaller the ratio of D3 to D2, the smaller the composition ratio of the minimum pixel value of an image with a new shooting time. The values of C1 to C3 may be the same as the values of D1 to D3, respectively, but may be different. Generally, since there is a difference in the difficulty of object detection between when the image is bright and when it is dark, the object detection accuracy may be improved by setting C1 to C3 and D1 to D3 to different values. .

また、明暗補正部13は、式3を用いて、倍率値vを算出する。ただし、式3において、aveR1>=aveR2の場合、E1をaveR2、E2をaveR1とし、aveR1<aveR2の場合、E1をaveR1、E2をaveR2とする。   In addition, the light / dark correction unit 13 calculates the magnification value v using Equation 3. However, in Equation 3, when aveR1> = aveR2, E1 is aveR2, E2 is aveR1, and when aveR1 <aveR2, E1 is aveR1 and E2 is aveR2.

さらに、明暗補正部13は、式4を用いて、画像Nの明暗を強調するために、画像Nの領域R2内の平均値よりも暗い画素についてはより暗く、また、画像Nの領域R2内の平均値よりも明るい画素についてはより明るく画像Nを補正する。ただし、式4のanは、画像NAの各画素のa値を示す。   Furthermore, the brightness correction unit 13 uses Expression 4 to emphasize the brightness of the image N, so that the pixels that are darker than the average value in the region R2 of the image N are darker, and in the region R2 of the image N For the pixels brighter than the average value, the image N is corrected brighter. However, “an” in Expression 4 indicates the a value of each pixel of the image NA.

明暗補正部13は、画素毎に、補正後のa値であるanCor値を求め、これによって明暗を補正した画像NBを作成する。言い換えると、明暗補正部13は、画像Nの領域R2内の各画素のa値(画像NAのa値)を、領域R2内の平均値との差が拡大するように補正し、その拡大率が式3の倍率値vである。式3に示すように、倍率値vは、aveR1とaveR2との間の倍率値である。   The light / dark correction unit 13 obtains the anCor value, which is a value after correction, for each pixel, thereby creating an image NB with light and dark corrected. In other words, the brightness correction unit 13 corrects the a value of each pixel in the region R2 of the image N (the a value of the image NA) so that the difference from the average value in the region R2 increases, and the enlargement ratio Is the magnification value v of Equation 3. As shown in Equation 3, the magnification value v is a magnification value between aveR1 and aveR2.

物体検出部14は、式5を用いて、画像毎に閾値Thを求める。例えば、α=0.5、β=0.5を用いても良い。   The object detection unit 14 obtains a threshold value Th for each image using Expression 5. For example, α = 0.5 and β = 0.5 may be used.

物体検出部14は、画像毎に求めた閾値Thを用いて、画像内の各画素値(上記の例ではanCor値)と閾値Thを比較し、各画素値≦Thの場合はs値(例えば、s=255)、各画素値>Thの場合はt値(例えば、t=0)を設定し、その設定に基づいて、背景と物体を分離した画像を作成する。   The object detection unit 14 compares each pixel value in the image (an Cor value in the above example) with the threshold Th using the threshold Th obtained for each image. If each pixel value ≦ Th, an s value (for example, , S = 255), and when each pixel value> Th, a t value (for example, t = 0) is set, and an image in which the background and the object are separated is created based on the setting.

図4は、本発明の実施例1に係る画像処理装置1の物体検出部14の動作の一例を説明する図である。   FIG. 4 is a diagram illustrating an example of the operation of the object detection unit 14 of the image processing apparatus 1 according to the first embodiment of the invention.

図4の例では、画像Nの階調値(上記の例ではa値)は、ヒストグラムH4に示すように、中程度の値の範囲に偏って分布している。この画像Nから式3および式4を用いて生成した画像NBの階調値(上記の例ではanCor値)は、ヒストグラムH5に示すように、ヒストグラムH4より広い範囲に分散して分布する。これによって、閾値Thによる背景と物体の分離が容易になる。   In the example of FIG. 4, the gradation values of the image N (a value in the above example) are distributed in a biased range of medium values as shown in the histogram H4. The gradation values (an Cor value in the above example) of the image NB generated from the image N using the equations 3 and 4 are distributed and distributed over a wider range than the histogram H4 as shown in the histogram H5. This facilitates separation of the background and the object by the threshold Th.

閾値Th以下のanCor値をS値に、閾値Thより大きいanCor値をt値に変更することで得られた画像NDは、例えば図4に示すように、領域R2内の物体402として検出された部分が白く、それ以外の背景401の部分が黒く塗りつぶされた画像となる。この例において、検出された物体402の領域は、実際の物体323の領域と一致する。これによって、検出対象の物体を背景から分離することが可能となる。   An image ND obtained by changing the anCor value less than or equal to the threshold Th to the S value and the anCor value greater than the threshold Th to the t value was detected as an object 402 in the region R2, for example, as shown in FIG. The part is white and the other background 401 is black. In this example, the area of the detected object 402 matches the area of the actual object 323. This makes it possible to separate the detection target object from the background.

描画部15は、図5に示すように、前記物体検出部14が検出した物体を囲むように検出枠を画像上に描画する。   As illustrated in FIG. 5, the drawing unit 15 draws a detection frame on the image so as to surround the object detected by the object detection unit 14.

図5は、本発明の実施例1に係る画像処理装置1の描画部15の動作の一例を説明する図である。   FIG. 5 is a diagram illustrating an example of the operation of the drawing unit 15 of the image processing apparatus 1 according to the first embodiment of the invention.

描画部15は、図3または図4に示した画像Nに、画像NDのs値とt値の境界線に相当する検出枠501を重畳して描画することによって、画像NEを生成する。この検出枠501は、物体検出部14によって検出された物体402(上記の例では番号板)とその背景401の境界に相当する。例えばこの検出枠501をユーザが視認しやすい態様で(例えば目立つ色彩で)表示することによって、ユーザによる物体の点検を支援することができる。   The drawing unit 15 generates the image NE by drawing the image N shown in FIG. 3 or 4 by superimposing a detection frame 501 corresponding to the boundary line between the s value and the t value of the image ND. This detection frame 501 corresponds to the boundary between the object 402 (number plate in the above example) detected by the object detection unit 14 and the background 401 thereof. For example, by displaying the detection frame 501 in a manner that is easy for the user to visually recognize (for example, in a conspicuous color), it is possible to assist the user in checking the object.

記録部16は、前記描画部15が原画像上に検出枠を描画した画像NEをメモリ90に保存する。   The recording unit 16 stores in the memory 90 the image NE in which the drawing unit 15 has drawn the detection frame on the original image.

図6は、本発明の実施例1に係る画像処理装置1の画像処理方法の動作を示すフローチャートである。その手順を説明する。   FIG. 6 is a flowchart showing the operation of the image processing method of the image processing apparatus 1 according to the first embodiment of the present invention. The procedure will be described.

ステップ(S)601において、入力部10は、入力画像を画像補正部11に出力する。   In step (S) 601, the input unit 10 outputs an input image to the image correction unit 11.

ステップ602において、画像補正部11は、従来技術である画像の平滑化、輪郭強調およびコントラスト強調を行って、補正後の画像Nを作成する。   In step 602, the image correction unit 11 performs image smoothing, contour enhancement, and contrast enhancement, which are conventional techniques, and creates a corrected image N.

ステップ603において、色空間変換部12は、画像補正部11が出力した補正後の画像、すなわち、一例として、RGBの色空間画像をLab色空間画像に変換した画像NAを求める。   In step 603, the color space conversion unit 12 obtains a corrected image output from the image correction unit 11, that is, an image NA obtained by converting an RGB color space image into a Lab color space image as an example.

ステップ604において、明暗補正部13は、色空間変換部12が求めた画像NAから、画像Nの領域R2内の平均値aveR2および最小値minR2を算出する。また、明暗補正部13は、メモリ90から画像N−1の領域R1内の平均値aveR1および最小値minR1を読込む。次に、明暗補正部13は、式3および式4を用いて、明暗を補正した画像NBを作成する。   In step 604, the brightness correction unit 13 calculates an average value aveR2 and a minimum value minR2 in the region R2 of the image N from the image NA obtained by the color space conversion unit 12. Further, the light / dark correction unit 13 reads the average value aveR1 and the minimum value minR1 in the region R1 of the image N-1 from the memory 90. Next, the light / dark correction unit 13 creates an image NB with light and dark corrected using Expression 3 and Expression 4.

ステップ605において、物体検出部14は、式1、式2および式5を用いて、画像毎に閾値Thを求める。次に、ステップ606において、物体検出部14は、明暗を補正した画像NBの各画素値anCorについて、閾値Thとの比較を行う。すなわち、anCor≦閾値Thの場合、ステップ607に進み、anCor≦閾値Thでない場合、ステップ608に進む。物体検出部14は、ステップ607において、補正値にs値(例えば、255)を設定し、ステップ608において、補正値にt値(例えば、0)を設定する。   In step 605, the object detection unit 14 obtains a threshold value Th for each image using Equation 1, Equation 2, and Equation 5. Next, in step 606, the object detection unit 14 compares the pixel value anCor of the image NB with the corrected brightness with the threshold Th. That is, if anCor ≦ threshold Th, the process proceeds to step 607, and if not anCor ≦ threshold Th, the process proceeds to step 608. In step 607, the object detection unit 14 sets an s value (for example, 255) as the correction value, and in step 608, sets the t value (for example, 0) as the correction value.

ステップ609において、物体検出部14は、対象画像内の全ての画素について、補正値を求めたか否かを判定し、対象画像内の全ての画素について補正値を求めたと判定されるまで、上記ステップ606から608を繰り返す。上記ステップ605から609を行うことによって、例えば、図4の画像Nの領域R2は、物体検出後の画像NDに示すように背景401と物体402に分離可能となる。   In step 609, the object detection unit 14 determines whether or not correction values have been obtained for all pixels in the target image, and the above steps are determined until it is determined that correction values have been obtained for all pixels in the target image. Repeat 606 to 608. By performing the above steps 605 to 609, for example, the region R2 of the image N in FIG. 4 can be separated into the background 401 and the object 402 as shown in the image ND after the object detection.

ステップ610において、描画部15は、物体検出部14が検出した物体402を囲むように検出枠501を画像上に描画する   In step 610, the drawing unit 15 draws the detection frame 501 on the image so as to surround the object 402 detected by the object detection unit 14.

ステップ611において、記録部16は、物体の検出枠を描画した画像NEをメモリ90に保存する。   In step 611, the recording unit 16 stores the image NE in which the object detection frame is drawn in the memory 90.

画像Nについて図6のステップ601からステップ611までの処理が終了し、次に、当該画像Nより後に撮影された画像について図6の処理が実行される場合、前回の処理における画像Nが今回の処理における画像N−1となり、前回の画像Nの後に撮影された画像が今回の処理における画像Nとなって、上記の式1〜式5が計算される。このとき、前回式1によって計算されたaveRNが今回のaveR1となり、前回式2によって計算されたminRNが今回のminR1となる。これによって、過去の画像の明るさを示す値がブレンドされる。   When the processing from step 601 to step 611 in FIG. 6 is completed for the image N and then the processing in FIG. 6 is performed for an image captured after the image N, the image N in the previous processing is the current one. The image N-1 in the processing is obtained, and the image taken after the previous image N becomes the image N in the current processing, and the above formulas 1 to 5 are calculated. At this time, the aveRN calculated by the previous equation 1 becomes the current aveR1, and the minRN calculated by the previous equation 2 becomes the current minR1. Thereby, a value indicating the brightness of the past image is blended.

このように本実施例の画像処理装置1は、画像N−1までの過去の画像の明るさの平均値をブレンドしたaveR1と画像の明るさの最小値をブレンドしたminR1、および画像Nの明るさの平均値aveR2と画像Nの明るさの最小値minR2を用いて明暗を補正した画像NBを作成し、画像NB毎に閾値Thを求めている。したがって、閾値Thを用いて、画像N内の背景と背景内の物体を分離することが可能となる。   As described above, the image processing apparatus 1 according to the present exemplary embodiment includes aveR1 obtained by blending the average values of the brightness of the past images up to the image N-1, minR1 obtained by blending the minimum values of the image brightness, and the brightness of the image N. An image NB in which the brightness is corrected is created using the average value aveR2 and the minimum brightness value minR2 of the image N, and the threshold Th is obtained for each image NB. Therefore, it is possible to separate the background in the image N and the object in the background using the threshold Th.

上記の実施例1では、各画像の明るさ(具体例はa値)の代表値として平均値及び最小値を使用する例を示したが、他の代表値を使用することもできる。代表値は、画像に含まれる画素の明るさの偏りの状況(例えば明るい方に偏っているか暗い方に偏っているか、狭い範囲に集中しているか広い範囲に分散しているか、等)を示すパラメータであり、上記以外の使用可能な代表値の例として、最大値及び中央値が挙げられる。本実施例では検出対象である番号板がその背景の壁面より常に暗いことを想定しているため、閾値Thが平均値より暗くなるように、代表値として平均値及び最小値が使用される。しかし、例えば番号板が背景より常に明るいことが想定される場合には、代表値として最小値の代わりに最大値を使用してもよい。また、平均値の代わりに中央値を使用してもよい。いずれの場合も、上記の計算方法を適用することができる。ただし、画像全体の明るさをより強く反映するのは中央値より平均値であると考えられるため、平均値を使用することでより高い検出精度が期待できる。   In the first embodiment, the example in which the average value and the minimum value are used as the representative values of the brightness of each image (specific example: a value) is shown, but other representative values may be used. The representative value indicates the state of unevenness of the brightness of the pixels included in the image (for example, whether it is biased toward the brighter side or the darker side, concentrated in a narrow range, or distributed over a wide range). Examples of usable representative values other than those described above are the maximum value and the median value. In the present embodiment, it is assumed that the number plate to be detected is always darker than the background wall, so that the average value and the minimum value are used as representative values so that the threshold Th is darker than the average value. However, for example, when it is assumed that the number plate is always brighter than the background, the maximum value may be used instead of the minimum value as the representative value. Moreover, you may use a median instead of an average value. In any case, the above calculation method can be applied. However, since it is considered that the brightness of the entire image is more strongly reflected by the average value than the median value, higher detection accuracy can be expected by using the average value.

本実施例によれば、過去画像と対象画像の明るさ情報を用いて対象画像の明暗を強調した画像を作成し、画像毎に画像内の領域を分離する閾値を求めることで、移動車両の進む方向によって映像内の画像の明るさが変わる場合でも、画像内の物体をその背景から分離して検出することが可能となる。例えば、走行中の車両から撮像手段が連続的に撮影した膨大な画像の中から、上記の方法によって物体が検出された画像のみを抽出して、検出枠と共にユーザに提示することによって、点検作業に要するユーザの労力を低減することができる。   According to the present embodiment, the brightness information of the target image is created using the brightness information of the past image and the target image, and the threshold value for separating the region in the image for each image is obtained, whereby the moving vehicle Even when the brightness of the image in the video changes depending on the traveling direction, the object in the image can be detected separately from the background. For example, an inspection operation is performed by extracting only an image in which an object is detected by the above method from a vast number of images continuously captured by an imaging unit from a running vehicle and presenting it to a user together with a detection frame. It is possible to reduce the labor required for the user.

次に、本発明の実施例2を説明する。以下に説明する相違点を除き、実施例2の画像処理装置2の各部は、図1〜図6に示された実施例1の同一の符号を付された各部と同一の機能を有するため、それらの説明は省略する。   Next, a second embodiment of the present invention will be described. Except for the differences described below, each part of the image processing apparatus 2 according to the second embodiment has the same function as each part denoted by the same reference numeral in the first embodiment shown in FIGS. Those explanations are omitted.

図7は、本発明の実施例2に係る画像処理装置2を示すブロック図である。画像処理装置2は、実施例1の図1と同じ構成を含んでいるが、物体検出部24および制御部92の動作が図1と異なる。   FIG. 7 is a block diagram illustrating the image processing apparatus 2 according to the second embodiment of the present invention. The image processing apparatus 2 includes the same configuration as that in FIG. 1 of the first embodiment, but the operations of the object detection unit 24 and the control unit 92 are different from those in FIG.

図8は、本発明の実施例2に係る画像処理装置2の物体検出部24の動作の一例を説明する図である。   FIG. 8 is a diagram illustrating an example of the operation of the object detection unit 24 of the image processing apparatus 2 according to the second embodiment of the present invention.

図8(a)に示すように、移動車両(例えば画像Nを撮影した撮像手段を搭載した車両)の影801が領域R2内の背景(すなわち空321、壁322及び道路324の少なくとも一部)および物体323に重畳する場合、画像が暗くなり、背景と物体323の輝度および色の差が小さくなるため、画像毎に、画像内の色の平均値を用いても、背景と背景内の物体が適切に分離できないという課題がある。そこで、物体検出部24は、画像内の領域をさらに複数の小さい領域に分け、それらの領域毎に閾値を算出する。   As shown in FIG. 8 (a), a shadow 801 of a moving vehicle (for example, a vehicle equipped with an imaging means for capturing an image N) is a background in the region R2 (that is, at least a part of the sky 321, the wall 322, and the road 324). When the image is overlaid on the object 323, the image becomes dark, and the difference in brightness and color between the background and the object 323 is reduced. Therefore, even if the average value of the colors in the image is used for each image, the object in the background and the background There is a problem that cannot be separated properly. Therefore, the object detection unit 24 further divides the region in the image into a plurality of small regions, and calculates a threshold value for each of these regions.

例えば、物体検出部24は、図8(b)に示すように、画像Nの領域R2を3つの領域R21、R22およびR23に分ける。次に、物体検出部24は、各領域R21〜R23について、最小値と平均値、すなわち、minR21、aveR21、minR22、aveR22、minR23、aveR23を求める。次に、物体検出部24は、式6を用いて、領域毎に閾値Th21、Th22、Th23を求める。すなわち、閾値Th21を求めるためには、式6のγに21を設定する。例えば、α=0.5、β=0.5を用いても良い。図8(b)の例では、領域R21の明るさ(上記の例ではa値)の最小値および平均値が他の領域の値より高く、領域R23の明るさの最小値および平均値が他の領域の値より低いため、Th21≧Th22≧Th23となる。   For example, as shown in FIG. 8B, the object detection unit 24 divides the region R2 of the image N into three regions R21, R22, and R23. Next, the object detection unit 24 calculates a minimum value and an average value, that is, minR21, aveR21, minR22, aveR22, minR23, and aveR23 for each of the regions R21 to R23. Next, the object detection unit 24 obtains threshold values Th21, Th22, and Th23 for each region using Expression 6. That is, in order to obtain the threshold Th21, 21 is set to γ in Equation 6. For example, α = 0.5 and β = 0.5 may be used. In the example of FIG. 8B, the minimum value and the average value of the brightness of the region R21 (a value in the above example) are higher than the values of the other regions, and the minimum value and the average value of the brightness of the region R23 are the other values. Therefore, Th21 ≧ Th22 ≧ Th23.

次に、物体検出部24は、閾値Th21を用いて、各画素値≦Th21の場合はs値(例えば、s=255)、各画素値>Th21の場合はt値(例えば、t=0)を設定し、図8(c)に示す画像N21を作成する。同様に、閾値Th22およびTh23を用いて、図8(d)および図8(e)に示すように、画像N22および画像N23を作成する。図8の例において、画像N21では領域R2の全体が物体802として検出され、画像N23では領域R2の全体が背景805として検出されており、背景と物体の分離ができていない。一方、領域R22の閾値Th2の値に基づいて、番号板の明るさが暗くなるため、図8(d)に示すように、画像N22では、背景803と、物体323に相当する物体804との分離に成功している。したがって、背景803と物体804の分離に成功した画像N22の結果を用いることで、物体検出部24は、図8(f)に示すように、検出枠を描画した画像NFを作成することが可能となる。物体検出部24は、各画像の領域R2内で、s値とt値が1つ以上あれば、背景と物体の分離が成功したと判断する。従って、物体検出部24によって、移動車両の影を抑制して、画像内の背景と背景内の物体が分離可能となる。   Next, the object detection unit 24 uses the threshold value Th21 to set an s value (for example, s = 255) when each pixel value ≦ Th21, and a t value (for example, t = 0) when each pixel value> Th21. Is set to create an image N21 shown in FIG. Similarly, an image N22 and an image N23 are created using the threshold values Th22 and Th23 as shown in FIGS. 8D and 8E. In the example of FIG. 8, the entire region R2 is detected as the object 802 in the image N21, and the entire region R2 is detected as the background 805 in the image N23, and the background and the object cannot be separated. On the other hand, since the brightness of the number plate becomes dark based on the value of the threshold value Th2 of the region R22, the background 803 and the object 804 corresponding to the object 323 are displayed in the image N22 as shown in FIG. Separation is successful. Therefore, by using the result of the image N22 that has succeeded in separating the background 803 and the object 804, the object detection unit 24 can create an image NF in which a detection frame is drawn as shown in FIG. It becomes. The object detection unit 24 determines that the background and the object have been successfully separated if there is at least one s value and t value in the region R2 of each image. Therefore, the object detection unit 24 can suppress the shadow of the moving vehicle and can separate the background in the image from the object in the background.

制御部92は、画像処理装置2内の各要素(例えば上記の入力部10〜記録部16と物体検出部24およびメモリ90)に接続される。画像処理装置2の各要素は、自律的に動作してもよいし、制御部92の指示に従って動作してもよい。   The control unit 92 is connected to each element (for example, the input unit 10 to the recording unit 16, the object detection unit 24, and the memory 90) in the image processing apparatus 2. Each element of the image processing apparatus 2 may operate autonomously or may operate according to an instruction from the control unit 92.

図9は、本発明の実施例2に係る画像処理装置2の画像処理方法の動作を示すフローチャートである。その手順を説明する。   FIG. 9 is a flowchart showing the operation of the image processing method of the image processing apparatus 2 according to the second embodiment of the present invention. The procedure will be described.

ステップ901において、入力部10は、入力画像を画像補正部11に出力する。   In step 901, the input unit 10 outputs the input image to the image correction unit 11.

ステップ902において、画像補正部11は、従来技術である画像の平滑化、輪郭強調およびコントラスト強調を行って、補正後の画像を作成する。   In step 902, the image correction unit 11 performs image smoothing, contour enhancement, and contrast enhancement, which are conventional techniques, and creates a corrected image.

ステップ903において、色空間変換部12は、画像補正部11が出力した補正後の画像、すなわち、一例として、RGBの色空間画像をLab色空間画像に変換した画像NAを求める。   In step 903, the color space conversion unit 12 obtains a corrected image output from the image correction unit 11, that is, an image NA obtained by converting an RGB color space image into a Lab color space image as an example.

ステップ904において、明暗補正部13は、色空間変換部12が求めた画像NAから、画像Nの領域R2内の平均値aveR2および最小値minR2を算出する。また、明暗補正部13は、メモリ90から画像N−1の領域R1内の平均値aveR1および最小値minR1を読込む。次に、明暗補正部13は、式3および式4を用いて、明暗を補正した画像NBを作成する。   In step 904, the light / dark correction unit 13 calculates an average value aveR2 and a minimum value minR2 in the region R2 of the image N from the image NA obtained by the color space conversion unit 12. Further, the light / dark correction unit 13 reads the average value aveR1 and the minimum value minR1 in the region R1 of the image N-1 from the memory 90. Next, the light / dark correction unit 13 creates an image NB with light and dark corrected using Expression 3 and Expression 4.

ステップ905において、物体検出部24は、式1、式2および式6を用いて、領域毎にn個の閾値Thnを求める。すなわち、一例として、領域が3つの場合(n=3)、3つの閾値Th1、Th2、Th3を求める。次に、ステップ906において、物体検出部24は、iに1を設定する。次に、ステップ907において、物体検出部24は、明暗を補正した画像NBの各画素値anCorについて、閾値Thn(例:領域が3つの場合、nは1〜3)との比較を行う。すなわち、anCor≦閾値Thnの場合、ステップ908に進み、anCor≦閾値Thnでない場合、ステップ909に進む。物体検出部24は、ステップ908において、補正値にs値(例えば、255)を設定し、ステップ909において、補正値にt値(例えば、0)を設定する。   In step 905, the object detection unit 24 obtains n threshold values Thn for each region using Equation 1, Equation 2, and Equation 6. That is, as an example, when there are three regions (n = 3), three threshold values Th1, Th2, and Th3 are obtained. Next, in step 906, the object detection unit 24 sets 1 to i. Next, in step 907, the object detection unit 24 compares each pixel value anCor of the image NB with the corrected brightness with a threshold value Thn (eg, when there are three regions, n is 1 to 3). That is, if anCor ≦ threshold Thn, the process proceeds to step 908, and if not anCor ≦ threshold Thn, the process proceeds to step 909. In step 908, the object detection unit 24 sets an s value (eg, 255) as the correction value, and in step 909, sets a t value (eg, 0) as the correction value.

ステップ910において、物体検出部24は、対象画像の領域内の全ての画素について、補正値を求めたか否かを判定し、対象画像の領域内の全ての画素について補正値を求めたと判定されるまで、上記ステップ907から909を繰り返す。ステップ910において、全画素について補正値を求めたと判定され場合、ステップ911に進む。   In step 910, the object detection unit 24 determines whether correction values have been obtained for all pixels in the target image area, and is determined to have obtained correction values for all pixels in the target image area. Steps 907 to 909 are repeated until the above. If it is determined in step 910 that correction values have been obtained for all pixels, the process proceeds to step 911.

ステップ911において、物体検出部24は、i>nか否かを判定する。ステップ911において、i≦nの場合、全ての領域から求められた全ての閾値Thn(例:領域が3つの場合、Th1〜Th3の全て)について補正値が求められていないため、物体検出部24は、次の(すなわちまだ物体検出に使用されていない)閾値Thnについて、上記ステップ907から909を繰り返す。ステップ911において、i>nの場合、全ての閾値Thnについて、補正値を求めたことになる。例えば、図8(b)の領域R2を3つの領域R21〜R23に分けた場合、物体検出部24は、図8(b)の画像Nについて、図8(c)の画像N21、図8(d)の画像N22、および図8(e)の画像N23を求める。   In step 911, the object detection unit 24 determines whether i> n. In step 911, when i ≦ n, correction values are not obtained for all threshold values Thn obtained from all regions (eg, when there are three regions, all of Th1 to Th3). Repeat steps 907 to 909 for the next threshold value Thn (ie, not yet used for object detection). In step 911, when i> n, correction values are obtained for all threshold values Thn. For example, when the region R2 in FIG. 8B is divided into three regions R21 to R23, the object detection unit 24 uses the image N21 in FIG. 8C and the image N21 in FIG. The image N22 in d) and the image N23 in FIG.

上記907から911のステップを領域の個数分繰返し行い、背景と背景内の物体を分離した情報を用いることで、例えば、図8(b)の画像Nの領域R2は、物体検出後の画像N22に示す背景803と物体804に分離可能となる。   By repeating the above steps 907 to 911 for the number of regions and using information obtained by separating the background and the object in the background, for example, the region R2 of the image N in FIG. The background 803 and the object 804 shown in FIG.

ステップ912において、描画部15は、図8(f)の画像NFに示すように、物体検出部24が検出した物体804を囲むように検出枠501を画像上に描画する。   In step 912, the drawing unit 15 draws the detection frame 501 on the image so as to surround the object 804 detected by the object detection unit 24, as shown in the image NF in FIG.

ステップ913において、記録部16は、物体の検出枠を描画した画像NFをメモリ90に保存する。   In step 913, the recording unit 16 stores the image NF in which the object detection frame is drawn in the memory 90.

このように本実施例の画像処理装置2は、画像N−1までの過去の画像の明るさの平均値をブレンドしたaveR1と画像の明るさの最小値をブレンドしたminR1、および画像Nの明るさの平均値aveR2と画像Nの明るさの最小値minR2を用いて明暗を補正した画像NBを作成し、画像NBを複数の領域に分割し、領域毎に領域の個数分の閾値Thnを求めている。したがって、領域個数分の閾値Thnを用いて、閾値Thn毎に補正値を求めることで、移動車両の影が背景および背景内の物体にかかった場合でも、画像NB内の背景と背景内の物体を分離することが可能となる。   As described above, the image processing apparatus 2 according to the present exemplary embodiment has the aveR1 blended with the average brightness of the past images up to the image N-1, the minR1 blended with the minimum image brightness, and the brightness of the image N. An image NB corrected for light and dark is created using the average value aveR2 and the minimum brightness value minR2 of the image N, the image NB is divided into a plurality of regions, and a threshold value Thn corresponding to the number of regions is obtained for each region. ing. Therefore, by obtaining the correction value for each threshold value Thn using the threshold value Thn for the number of regions, even when the shadow of the moving vehicle is applied to the background and the object in the background, the background in the image NB and the object in the background Can be separated.

本実施例によれば、過去画像と対象画像の明るさ情報を用いて対象画像の明暗を強調した画像を作成し、画像内の領域毎に背景と背景内の物体を分離するための閾値を求めることで、移動車両の影が背景や背景内の物体にかかった場合でも、画像内の物体をその背景から分離して検出することが可能となる。   According to this embodiment, the brightness information of the target image is created using the brightness information of the past image and the target image, and the threshold for separating the background and the object in the background for each region in the image is set. As a result, even when the shadow of the moving vehicle is applied to the background or an object in the background, the object in the image can be detected separately from the background.

以上説明した各実施例によれば、いずれの場合も、より好適に背景内の物体を検出することが可能となる。なお、上記各実施例においては、次のような特有の効果を有する。   According to each embodiment described above, in any case, an object in the background can be detected more suitably. The above-described embodiments have the following specific effects.

実施例1によれば、過去画像と対象画像の明るさ情報を用いて対象画像の明暗を強調した画像が作成され、時系列に変化する画像の明るさに応じて画像毎に画像内の領域を分離する閾値が求められる。これによって、移動車両の進む方向に応じて映像内の画像の明るさが変わる場合でも、画像内の背景と背景内の物体を分離できるため、背景内の物体を検出することが可能となる。   According to the first embodiment, an image in which the brightness of the target image is emphasized using the brightness information of the past image and the target image is created, and an area in the image is set for each image according to the brightness of the image that changes in time series. A threshold value for separating is obtained. Thereby, even when the brightness of the image in the video changes according to the traveling direction of the moving vehicle, the background in the image and the object in the background can be separated, so that the object in the background can be detected.

実施例2によれば、過去画像と対象画像の明るさ情報を用いて対象画像の明暗を強調した画像が作成され、時系列に変化する画像の明るさに応じて画像内の領域毎に背景と背景内の物体を分離するための閾値が求められ、それらの閾値を用いて画像が分離される。これによって、例えば移動車両の影が背景や背景内の物体にかかったために画像の一部の明るさが変わった場合でも、画像内の背景と背景内の物体を分離して、背景内の物体を検出することが可能となる。   According to the second embodiment, an image in which the brightness of the target image is emphasized using the brightness information of the past image and the target image is created, and the background is set for each region in the image according to the brightness of the image that changes in time series. And threshold values for separating objects in the background are obtained, and images are separated using these threshold values. As a result, even if the brightness of a part of the image changes because the shadow of the moving vehicle is applied to the background or an object in the background, the object in the background is separated from the object in the background. Can be detected.

以上説明した各実施例については、次のような変形が可能である。   Each embodiment described above can be modified as follows.

色空間変換部12では、入力画像をLab色空間に変換した画像を作成したが、HSV色空間等の他の色空間の画像に変換してもよく、その場合も上記と同様の効果を有する。検出対象の物体と背景との間の色彩及び明るさの関係に応じて、それらを分離しやすい色値が得られる変換方法を選択することができる。   The color space conversion unit 12 creates an image obtained by converting the input image into the Lab color space. However, the image may be converted into an image in another color space such as the HSV color space, and in this case, the same effect as described above is obtained. . According to the relationship between the color and brightness between the object to be detected and the background, a conversion method that can obtain color values that can be easily separated can be selected.

物体検出部24では、図8(b)の領域R2を3つに分けたが、2つまたは4つ以上の領域に分けてもよく、いずれの場合も上記と同様の効果を有する。例えば、領域R2を領域R2の画像のライン数分に分けてライン数分の閾値を求め、それらの閾値を用いて、背景と背景内の物体を分離してもよく、その場合も上記と同様の効果を有する。   In the object detection unit 24, the region R2 in FIG. 8B is divided into three regions, but may be divided into two regions or four or more regions, and in either case, the same effect as described above is obtained. For example, the region R2 may be divided into the number of lines of the image of the region R2 to obtain threshold values for the number of lines, and the background and the object in the background may be separated using those threshold values. It has the effect of.

なお、本発明は上述した実施例に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施例は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施例の構成の一部を他の実施例の構成に置き換えることが可能であり、また、ある実施例の構成に他の実施例の構成を加えることも可能である。また、各実施例の構成の一部について、他の構成の追加・削除・置換をすることが可能である。   In addition, this invention is not limited to the Example mentioned above, Various modifications are included. For example, the above-described embodiments have been described in detail for easy understanding of the present invention, and are not necessarily limited to those having all the configurations described. Further, a part of the configuration of one embodiment can be replaced with the configuration of another embodiment, and the configuration of another embodiment can be added to the configuration of one embodiment. Further, it is possible to add, delete, and replace other configurations for a part of the configuration of each embodiment.

上記の各構成、機能、処理部、処理手段等は、それらの一部または全部を、例えば集積回路で設計する等によってハードウェアで実現してもよい。また、上記の各構成、機能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行することによってソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリ、ハードディスクドライブ、SSD(Solid State Drive)等の記憶装置、または、ICカード、SDカード、DVD等の計算機読み取り可能な非一時的データ記憶媒体に格納することができる。   Each of the above-described configurations, functions, processing units, processing means, and the like may be realized by hardware by designing a part or all of them with, for example, an integrated circuit. Further, each of the above-described configurations, functions, and the like may be realized by software by interpreting and executing a program that realizes each function by the processor. Information such as programs, tables, and files for realizing each function is a memory, a hard disk drive, a storage device such as an SSD (Solid State Drive), or a computer-readable non-transitory data such as an IC card, an SD card, or a DVD. It can be stored in a storage medium.

また、図面には、実施例を説明するために必要と考えられる制御線及び情報線を示しており、必ずしも、本発明が適用された実際の製品に含まれる全ての制御線及び情報線を示しているとは限らない。実際にはほとんど全ての構成が相互に接続されていると考えてもよい。   Further, the drawings show control lines and information lines that are considered necessary for explaining the embodiments, and not necessarily all control lines and information lines included in an actual product to which the present invention is applied. Not necessarily. Actually, it may be considered that almost all the components are connected to each other.

1…画像処理装置、10…入力部、11…画像補正部、12…色空間変換部、13…明暗補正部、14…物体検出部、15…描画部、16…記録部、91…制御部、2…画像処理装置、24…物体検出部、92…制御部 DESCRIPTION OF SYMBOLS 1 ... Image processing apparatus, 10 ... Input part, 11 ... Image correction part, 12 ... Color space conversion part, 13 ... Light / darkness correction part, 14 ... Object detection part, 15 ... Drawing part, 16 ... Recording part, 91 ... Control part DESCRIPTION OF SYMBOLS 2 ... Image processing apparatus, 24 ... Object detection part, 92 ... Control part

Claims (14)

撮影装置によって撮影された複数の画像を記憶する記憶部と、
処理対象の画像の色値の代表値と、前記処理対象の画像が撮影された時刻より前の時刻に撮影された一つ以上の過去の画像の色値の代表値と、に基づいて、前記処理対象の画像の色値を、明暗を強調するように補正する補正部と、
補正された前記処理対象の画像の色値を閾値と比較することによって、前記処理対象の画像から、検出対象の物体を検出し、その結果を出力する検出部と、を有することを特徴とする画像処理装置。
A storage unit for storing a plurality of images photographed by the photographing device;
Based on the representative value of the color value of the image to be processed and the representative value of the color value of one or more past images taken at a time before the time at which the image of the process target was taken, A correction unit that corrects the color value of the image to be processed so as to emphasize light and dark,
A detection unit that detects a detection target object from the processing target image by comparing the corrected color value of the processing target image with a threshold value, and outputs the result. Image processing device.
請求項1に記載の画像処理装置であって、
前記各画像の色値の代表値は、前記各画像の色値の平均値であり、
前記補正部は、
前記処理対象の画像の色値の平均値と、前記一つ以上の過去の画像の色値の平均値と、の間の倍率値を計算し、
前記処理対象の画像の色値の平均値との差が前記倍率値に従って拡大するように、前記処理対象の画像の各画素の色値を補正することを特徴とする画像処理装置。
The image processing apparatus according to claim 1,
The representative value of the color value of each image is an average value of the color value of each image,
The correction unit is
Calculating a magnification value between an average color value of the image to be processed and an average color value of the one or more past images;
An image processing apparatus that corrects a color value of each pixel of an image to be processed so that a difference from an average value of color values of the image to be processed is enlarged according to the magnification value.
請求項1に記載の画像処理装置であって、
前記検出部は、前記処理対象の画像の色値の代表値と、前記一つ以上の過去の画像の色値の代表値と、に基づいて前記閾値を計算することを特徴とする画像処理装置。
The image processing apparatus according to claim 1,
The detection unit calculates the threshold based on a representative value of color values of the image to be processed and a representative value of color values of the one or more past images. .
請求項3に記載の画像処理装置であって、
前記各画像の色値の代表値は、前記各画像の色値の最小値および平均値であり、
前記検出部は、前記一つ以上の過去の画像の色値の最小値及び前記処理対象の画像の色値の最小値を用いて、前記処理対象の画像の色値の最小値をそれより前の時刻に撮影された一つ以上の画像の色値の最小値に合成した値と、前記一つ以上の過去の画像の色値の平均値及び前記処理対象の画像の色値の平均値を用いて、前記処理対象の画像の色値の平均値をそれより前の時刻に撮影された一つ以上の画像の色値の平均値に合成した値と、のそれぞれに所定の係数を乗じて加算した値を前記閾値として計算することを特徴とする画像処理装置。
The image processing apparatus according to claim 3,
The representative value of the color value of each image is a minimum value and an average value of the color value of each image,
The detection unit uses the minimum value of the color value of the one or more past images and the minimum value of the color value of the image to be processed, and sets the minimum value of the color value of the image to be processed before that. A value synthesized with a minimum value of color values of one or more images photographed at a time, an average value of color values of the one or more past images, and an average value of color values of the image to be processed And a value obtained by combining the average value of the color values of the image to be processed with the average value of the color values of one or more images taken at a previous time, and multiplying each by a predetermined coefficient. An image processing apparatus that calculates an added value as the threshold value.
請求項3に記載の画像処理装置であって、
前記検出部は、
前記各画像を複数の領域に分割し、前記処理対象の画像の前記各領域の色値の代表値と、前記一つ以上の過去の画像の前記各領域の色値の代表値と、に基づいて、前記領域ごとに前記閾値を計算し、
いずれかの前記領域について計算された前記閾値を用いて、検出対象の物体の検出に成功した場合、前記検出の結果を出力することを特徴とする画像処理装置。
The image processing apparatus according to claim 3,
The detector is
Each image is divided into a plurality of regions, and based on the representative value of the color value of each region of the image to be processed and the representative value of the color value of each region of the one or more past images. Calculating the threshold for each region,
An image processing apparatus that outputs the detection result when an object to be detected is successfully detected using the threshold value calculated for any one of the regions.
請求項1に記載の画像処理装置であって、
前記各画像の色値の代表値は、前記各画像の色値の最小値、最大値、平均値または中央値の少なくともいずれかを含むことを特徴とする画像処理装置。
The image processing apparatus according to claim 1,
The representative value of the color value of each image includes at least one of a minimum value, a maximum value, an average value, and a median value of the color values of each image.
請求項1に記載の画像処理装置であって、
前記画像処理装置は、前記各画像の色空間をLab色空間に変換する色空間変換部をさらに有し、
前記各画像の色値は、前記Lab色空間におけるa値であることを特徴とする画像処理装置。
The image processing apparatus according to claim 1,
The image processing apparatus further includes a color space conversion unit that converts a color space of each image into a Lab color space,
The image processing apparatus according to claim 1, wherein the color value of each image is an a value in the Lab color space.
撮影装置によって撮影された複数の画像を記憶する記憶部と、前記記憶部に接続される制御部と、を有する画像処理装置が実行する画像処理方法であって、
処理対象の画像の色値の代表値と、前記処理対象の画像が撮影された時刻より前の時刻に撮影された一つ以上の過去の画像の色値の代表値と、に基づいて、前記処理対象の画像の色値を、明暗を強調するように補正する補正手順と、
補正された前記処理対象の画像の色値を閾値と比較することによって、前記処理対象の画像から、検出対象の物体を検出し、その結果を出力する検出手順と、を含むことを特徴とする画像処理方法。
An image processing method executed by an image processing apparatus having a storage unit that stores a plurality of images captured by an imaging device, and a control unit connected to the storage unit,
Based on the representative value of the color value of the image to be processed and the representative value of the color value of one or more past images taken at a time before the time at which the image of the process target was taken, A correction procedure for correcting the color value of the image to be processed so as to emphasize light and dark,
A detection procedure for detecting a detection target object from the processing target image by comparing the corrected color value of the processing target image with a threshold value, and outputting the result. Image processing method.
請求項8に記載の画像処理方法であって、
前記各画像の色値の代表値は、前記各画像の色値の平均値であり、
前記補正手順は、
前記処理対象の画像の色値の平均値と、前記一つ以上の過去の画像の色値の平均値と、の間の倍率値を計算する手順と、
前記処理対象の画像の色値の平均値との差が前記倍率値に従って拡大するように、前記処理対象の画像の各画素の色値を補正する手順と、を含むことを特徴とする画像処理方法。
The image processing method according to claim 8, comprising:
The representative value of the color value of each image is an average value of the color value of each image,
The correction procedure is as follows:
A procedure for calculating a magnification value between an average value of color values of the image to be processed and an average value of color values of the one or more past images;
And a procedure for correcting the color value of each pixel of the image to be processed so that the difference from the average value of the color values of the image to be processed is enlarged according to the magnification value. Method.
請求項8に記載の画像処理方法であって、
前記検出手順は、前記処理対象の画像の色値の代表値と、前記一つ以上の過去の画像の色値の代表値と、に基づいて前記閾値を計算する手順を含むことを特徴とする画像処理方法。
The image processing method according to claim 8, comprising:
The detection procedure includes a procedure of calculating the threshold based on a representative value of color values of the image to be processed and a representative value of color values of the one or more past images. Image processing method.
請求項10に記載の画像処理方法であって、
前記各画像の色値の代表値は、前記各画像の色値の最小値および平均値であり、
前記検出手順は、前記一つ以上の過去の画像の色値の最小値及び前記処理対象の画像の色値の最小値を用いて、前記処理対象の画像の色値の最小値をそれより前の時刻に撮影された一つ以上の画像の色値の最小値に合成した値と、前記一つ以上の過去の画像の色値の平均値及び前記処理対象の画像の色値の平均値を用いて、前記処理対象の画像の色値の平均値をそれより前の時刻に撮影された一つ以上の画像の色値の平均値に合成した値と、のそれぞれに所定の係数を乗じて加算した値を前記閾値として計算する手順を含むことを特徴とする画像処理方法。
The image processing method according to claim 10, comprising:
The representative value of the color value of each image is a minimum value and an average value of the color value of each image,
The detection procedure uses the minimum value of the color value of the one or more past images and the minimum value of the color value of the image to be processed, and sets the minimum value of the color value of the image to be processed before that. A value synthesized with a minimum value of color values of one or more images photographed at a time, an average value of color values of the one or more past images, and an average value of color values of the image to be processed And a value obtained by combining the average value of the color values of the image to be processed with the average value of the color values of one or more images taken at a previous time, and multiplying each by a predetermined coefficient. An image processing method comprising a step of calculating an added value as the threshold value.
請求項10に記載の画像処理方法であって、
前記検出手順は、
前記各画像を複数の領域に分割し、前記処理対象の画像の前記各領域の色値の代表値と、前記一つ以上の過去の画像の前記各領域の色値の代表値と、に基づいて、前記領域ごとに前記閾値を計算する手順と、
いずれかの前記領域について計算された前記閾値を用いて、検出対象の物体の検出に成功した場合、前記検出の結果を出力する手順と、を含むことを特徴とする画像処理方法。
The image processing method according to claim 10, comprising:
The detection procedure includes:
Each image is divided into a plurality of regions, and based on the representative value of the color value of each region of the image to be processed and the representative value of the color value of each region of the one or more past images. And calculating the threshold value for each region,
And a procedure of outputting the detection result when the detection target object is successfully detected using the threshold value calculated for any one of the regions.
請求項8に記載の画像処理方法であって、
前記各画像の色値の代表値は、前記各画像の色値の最小値、最大値、平均値または中央値の少なくともいずれかを含むことを特徴とする画像処理方法。
The image processing method according to claim 8, comprising:
The image processing method characterized in that the representative value of the color value of each image includes at least one of a minimum value, a maximum value, an average value, and a median value of the color values of each image.
請求項8に記載の画像処理方法であって、
前記各画像の色空間をLab色空間に変換する色空間変換手順をさらに含み、
前記各画像の色値は、前記Lab色空間におけるa値であることを特徴とする画像処理方法。
The image processing method according to claim 8, comprising:
A color space conversion procedure for converting the color space of each image into a Lab color space;
The image processing method according to claim 1, wherein the color value of each image is an a value in the Lab color space.
JP2014071546A 2014-03-31 2014-03-31 Image processor and image processing method Pending JP2015194829A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014071546A JP2015194829A (en) 2014-03-31 2014-03-31 Image processor and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014071546A JP2015194829A (en) 2014-03-31 2014-03-31 Image processor and image processing method

Publications (1)

Publication Number Publication Date
JP2015194829A true JP2015194829A (en) 2015-11-05

Family

ID=54433800

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014071546A Pending JP2015194829A (en) 2014-03-31 2014-03-31 Image processor and image processing method

Country Status (1)

Country Link
JP (1) JP2015194829A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102556609B1 (en) * 2022-12-29 2023-07-19 에이포시스템주식회사 Image correction apparatus and method for adaptively correcting image corresponding to illuminance variation and reflection of light for cctv

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102556609B1 (en) * 2022-12-29 2023-07-19 에이포시스템주식회사 Image correction apparatus and method for adaptively correcting image corresponding to illuminance variation and reflection of light for cctv

Similar Documents

Publication Publication Date Title
RU2664415C2 (en) Image processing system and machine readable recording medium
JP6046966B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP4415198B2 (en) Image composition apparatus and program
JP6635799B2 (en) Image processing apparatus, image processing method, and program
JP6818463B2 (en) Image processing equipment, image processing methods and programs
JP2007336019A (en) Image processing apparatus, imaging apparatus, image output apparatus, and method and program in these apparatuses
KR20120136813A (en) Apparatus and method for image processing
US10091422B2 (en) Image processing device and recording medium
JP2017050683A (en) Image processor, imaging apparatus, and image processing method and program
JP4900373B2 (en) Image output apparatus, image output method and program
KR20150077654A (en) Device for detecting object, device for detecting object for vehicle and method thereof
WO2017104291A1 (en) Image processing device and image processing method
JP2009205559A (en) Road surface marking image processor, road surface marking image processing method, and road surface marking image processing program
JP2015194829A (en) Image processor and image processing method
JP2010136207A (en) System for detecting and displaying pedestrian
KR101535630B1 (en) Apparatus for enhancing the brightness of night image using brightness conversion model
KR101468433B1 (en) Apparatus and method for extending dynamic range using combined color-channels transmission map
JP5218634B2 (en) Pseudo gray image generating apparatus and program
JP2005182232A (en) Luminance correcting device and method
Singh Foggy image enhancement and object identification by extended maxima algorithm
JP2009050035A (en) Image processing method, image processing system, and image processing program
JP2018160024A (en) Image processing device, image processing method and program
JP5178933B1 (en) Image processing device
JP2009194786A (en) Object detecting device, and imaging apparatus
KR101470198B1 (en) Apparatus and method for combining image