Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4075571B2 - Image processing method and image processing apparatus - Google Patents
[go: Go Back, main page]

JP4075571B2 - Image processing method and image processing apparatus - Google Patents

Image processing method and image processing apparatus Download PDF

Info

Publication number
JP4075571B2
JP4075571B2 JP2002313116A JP2002313116A JP4075571B2 JP 4075571 B2 JP4075571 B2 JP 4075571B2 JP 2002313116 A JP2002313116 A JP 2002313116A JP 2002313116 A JP2002313116 A JP 2002313116A JP 4075571 B2 JP4075571 B2 JP 4075571B2
Authority
JP
Japan
Prior art keywords
principal component
value
component axis
pixel
image processing
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.)
Expired - Fee Related
Application number
JP2002313116A
Other languages
Japanese (ja)
Other versions
JP2004151770A (en
Inventor
弘 中村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toyota Motor Corp
Original Assignee
Toyota Motor Corp
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 Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2002313116A priority Critical patent/JP4075571B2/en
Publication of JP2004151770A publication Critical patent/JP2004151770A/en
Application granted granted Critical
Publication of JP4075571B2 publication Critical patent/JP4075571B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は画像処理方法および画像処理装置に関する。
【0002】
【従来の技術】
複数の画像で画像間の対応を取って三次元復元を行う際に、その対応を取るために画像を微分処理してエッジ検出を行う技術がある(たとえば特許文献1参照)。
【0003】
このようなこのエッジ検出をカラー画像で行う際には、従来、たとえばカラー画像を輝度画像に変換し、その輝度値に対してSobelフィルタをかけて得られた微分値を用いて、微分画像を得るようにしていた。あるいは、カラー画像の各画素におけるRGB値に対してそれぞれ独立にSobelフィルタをかけ、得られた3つの値でもっとも大きなものを微分値として採用して微分画像を構成するようにしていた。
【0004】
他方、画素ごとにオプティカルフローを求め、このオプティカルフローから画像における動体の移動を検出する画像処理も知られている。このような画像処理をカラー画像で行う際には、従来、カラー画像を輝度画像に変換し、その輝度値に対して時空間微分の関係式を用いてオプティカルフローを求めるようにしていた。
【0005】
【特許文献1】
特開2000−99760号公報
【0006】
【発明が解決しようとする課題】
ところが、上記従来技術において、エッジ検出を行う際には、輝度値を用いているので、色差が大きいにもかかわらず、輝度差が小さい場合、たとえば輝度差がほぼ同じの青色と赤色が隣接している場合には、その境目の微分値は小さくなってしまう。このため、この隣接部分はエッジ部として検出することができなくなってしまうという問題がある。また、オプティカルフローを求める際にも輝度値を利用しているので、同様の問題を生じるものであった。
【0007】
さらに、RGB値のうちのもっとも大きな微分値を採用する場合には、中間的な色、たとえば黄色や紫同士の境目の微分値が小さくなってしまい、やはりエッジ検出が困難になってしまうという問題があった。
【0008】
そこで、本発明の課題は、隣接する領域の色差は大きいが輝度差は小さい場合や、中間的な色同士が隣接する場合でも、エッジ検出や動体の移動の検出を確実に行うことができる画像処理方法および画像処理装置を提供することにある。
【0009】
【課題を解決するための手段】
上記課題を解決した本発明に係る画像処理方法は、カラー画像中における各画素が持つ2次元以上の空間における特徴量を特徴量検出手段が検出してカラー画像を画像処理する画像処理方法において、第1主成分軸算出手段が、注目画素および注目画素の周囲に位置する近傍画素のそれぞれにおける特徴量のベクトル値に基づいて、特徴量の第1主成分軸を算出し、投影値算出手段が、注目画素および近傍画素における特徴量のベクトル値をそれぞれ第1主成分軸に投影して、注目画素および近傍画素の特徴量の投影値を求め、画像処理手段が、投影値に基づいて微分処理を行い、第1主成分軸算出手段は、注目画素ごとに第1主成分軸を算出するものである。
【0010】
隣接する領域の色差は大きいが輝度差は小さい場合や、中間的な色同士が隣接する場合にエッジ検出等が困難となる理由として、本発明者は、RGB値がベクトル値である点に着目した。RGB値がベクトル値であることから、これをそのまま微分処理に利用することができないので、色差は大きいが輝度差が小さい場合の検出が困難になる原因と考えた。
【0011】
そこで、本発明に係る画像処理方法では、画素にベクトル値で表される特徴量がある場合に、そのベクトル値から第1主成分軸を算出して、各画素における特徴量のベクトル値を第1主成分軸に投影して第1主成分軸方向のスカラー値に置き換えている。このため、ベクトル値で表される各画素の特徴量をより反映させた微分処理を行うことができる。
また、各画素の特徴量から第1主成分軸を求めるので、中間的な色同士が隣接する場合であっても、その境目をエッジ部として確実に検出することができる。
【0016】
ここで、特徴量はカラー画像におけるRGB値であるとして、画像処理を行うのが好適である。
【0017】
RGB値はベクトル量であることから、そのままでは微分処理を行うことができなかったが、本発明のように、第1主成分軸に投影してスカラー値に置き換えることにより、画像処理に用いることができる。このようにRGB値を用いていることから、隣接する領域の色差は大きいが輝度差は小さい場合や、中間的な色同士が隣接する場合でも、エッジ検出を確実に行うことができる。
【0018】
また、上記課題を解決した本発明に係る画像処理装置は、カラー画像中における各画素が持つ2次元以上の空間における特徴量を検出する特徴量検出手段と、注目画素および注目画素の周囲に位置する近傍画素のそれぞれにおける特徴量のベクトル値に基づいて、特徴量の第1主成分軸を求める第1主成分軸算出手段と、注目画素および近傍画素における特徴量のベクトル値をそれぞれ第1主成分軸に投影して、注目画素および近傍画素の特徴量の投影値を求める投影値算出手段と、投影値に基づいて、カラー画像の各画素の微分処理を行う画像処理手段と、を有し、第1主成分軸算出手段は、注目画素ごとに第1主成分軸を算出するものである。
【0019】
さらに、上記課題を解決した本発明に係る画像処理装置は、カラー画像中における各画素が持つ2次元以上の空間における特徴量を検出する特徴量検出手段と、注目ウィンドウおよび所定時間経過後における注目ウィンドウにおける各画素の特徴量のベクトル値に基づいて、特徴量の第1主成分軸を算出する第1主成分軸算出手段と、注目ウィンドウおよび所定時間経過後における注目ウィンドウの特徴量のベクトル値を第1主成分軸に投影して、注目ウィンドウおよび所定時間経過後における注目ウィンドウにおける各画素の特徴量の投影値を求める投影値算出手段と、投影値に基づいて、前記カラー画像の各画素の微分処理を行い、各画素におけるオプティカルフローを求める画像処理手段と、を有するものである。
【0020】
【発明の実施の形態】
以下、図面を参照して、本発明の好適な実施形態について詳細に説明する。
【0021】
図1は、本発明の第1の実施形態に係る画像処理装置のブロック構成図である。図1に示すように、本実施形態に係る画像処理装置1には、周囲の画像をカラー画像で撮像するカメラ2が接続されている。また、画像処理装置1は、A/D変換部11と、特徴量検出手段であるRGB値検出部12と、第1主成分軸算出手段である第1主成分軸算出部13と、を備えている。さらに、画像処理装置1は、投影値算出手段である投影値算出部14と、画像処理手段である微分値算出部15と、やはり画像処理手段である微分画像生成部16と、を備えている。カメラ2によって撮像されたカラー画像は、画像処理装置1におけるA/D変換部11に出力される。
【0022】
A/D変換部11では、カメラ2によって撮像されたアナログ画像をデジタル画像に変換し、RGB値検出部12に出力する。このデジタル画像は、カラー画像を変換して生成されたものであり、変換されたデジタル画像における各画素は、特徴量である色相としてRGB値を有している。RGB値検出部12では、カラー画像の画素ごとにこのRGB値を検出して、第1主成分軸算出部13に出力する。
【0023】
第1主成分軸算出部13では、デジタル画像における各画素のRGB値に基づいて第1主成分軸を算出し、投影値算出部14に出力する。投影値算出部14では、各画素におけるRGB値と第1主成分軸とから、各画素の投影値を算出する。算出された各画素における投影値は、微分値算出部15に出力され、微分値算出部15で微分処理がなされて微分値が算出される。算出された微分値は微分画像生成部16に出力される。微分画像生成部16では、出力された微分値から微分画像を生成する。こうして生成された微分画像から、たとえば物体のエッジ検出が行われる。
【0024】
次に、本実施形態に係る画像処理方法の手順について説明する。
【0025】
図2は、本実施形態に係る画像処理方法の手順を示すフローチャートである。図2に示すように、本実施形態に係る画像処理方法においては、最初に、カメラ2で撮像され、A/D変換部11でA/D変換された画像をRGB値検出部12に出力する(S1)。RGB値検出部では、出力されたデジタル画像における各画素のRGB値をそれぞれ検出する(S2)。そして、デジタル画像におけるすべての画素のRGB値を検出して、第1主成分軸算出部13に出力する。
【0026】
第1主成分軸算出部13では、検出された各画素のRGB値に基づいて、第1主成分軸を求める(S3)。第1主成分軸を算出するにあたり、図3に示すように、3行3列の9つの画素からなるウィンドウWを設定しその中央の画素を注目画素P1とし、注目画素P1の周囲における8つの画素を近傍画素P2〜P8とする。これらの9つの画素P1〜P9は、色相情報として、いずれも固有のベクトル値であるRGB値を有している。これらの各画素のRGB値は、図4に示すように、RGB空間を示す座標系の座標軸上に座標値で表すことができる。このように、RGB空間に表された9つの画素の座標値P1〜P9に適宜の演算処理を施すことにより、9つの座標値P1〜P9に対応する第1主成分軸Mを求める(S3)。
【0027】
こうして第1主成分軸算出部13で求められた第1主成分軸は、信号化されて投影値算出部14に出力される。投影値算出部14においては、注目画素P1および近傍画素P2〜P8の各座標値を第1主成分軸Mに投影する(S4)。その投影の結果から、各画素におけるRGB値の投影値を求める。各画素のRGB値を第1主成分軸Mに投影することにより、各画素RGB値が第1主成分軸方向のスカラー値に置き換えられる。RGB値はベクトル値であるため、そのままでは微分処理に利用することができないが、このRGB値を第1主成分軸に投影した投影値は、スカラー値となるので、微分処理に利用することができるようになる。
【0028】
そして、投影値算出部14で求められた各投影値は、信号化されて微分値算出部15に出力される。微分値算出部15では、注目画素P1および近傍画素P2〜P8を第1主成分軸Mに投影して得られた投影値にたとえばSobelフィルタをかけて微分処理を行い、注目画素P1の微分値を求める(S5)。微分処理を行うためのSobelフィルタをかける際には、たとえば画像をX−Y平面としてみた場合のX軸方向のSobelフィルタおよびY軸方向のSobelフィルタを用い、X方向、Y方向それぞれの微分値を求める態様とすることができる。なお、本実施形態では、微分フィルタとしてSobelフィルタを用いているが、その他ラプラシアンフィルタなど、適宜の微分フィルタを用いることもできる。
【0029】
このようにして、ある一つの画素を注目画素P1として微分値を求める。それと同時に、デジタル画像における他の画素においても、同様の処理を行い、その画素とその周囲の近傍画素との第1主成分軸を求める。その画素を第1主成分軸に投影して投影値を求め、この投影値に基づいて微分処理を施して微分値を求める。そしてデジタル画像中における画素にそれぞれ同様の処理を施すことにより、すべての画素の微分値を求める。
【0030】
第1主成分軸を利用してデジタル画像におけるすべての画素の微分値を求めたら、そのすべての微分値を微分値算出部15から微分画像生成部16に出力する。微分画像生成部16では、出力された微分値に基づいて、エッジ強調した微分画像を生成する。そして、図示しないモニタ等に表示することができる。
【0031】
このように、本実施形態に係る画像処理方法においては、輝度値を用いることなく、画素が有するRGB値に基づいて微分画像を求めている。このため、たとえば輝度値がほぼ同じであるが、色差が大きいような場合には、その境目をエッジ部として確実に検出することができる。また、各画素のRGB値から第1主成分軸を求めて、この第1主成分軸に投影した投影値に基づいて、微分画像を求めている。このため、中間的な色同士が隣接する場合であっても、その境目をエッジ部として確実に検出することができる。
【0032】
また、上記実施形態では、ウィンドウWの大きさを3行3列に設定したが、ウィンドウの大きさは、これに限定されず、5行5列など、複数のm行n列に適宜設定することができる。また、注目画素の周囲の近傍画素としては、注目画素に隣接する8つの画素をすべて近傍画素としたが、たとえば注目画素の側方や上下に隣り合う画素のみを近傍画素としたり、上下左右に隣り合う画素のみを注目画素にしたりすることもできる。
【0033】
次に、本発明の第2の実施形態について説明する。
【0034】
図5は、本実施形態に係る画像処理装置のブロック構成図である。図5に示すように、本実施形態に係る画像処理装置3は、A/D変換部11、特徴量検出手段であるRGB値検出部12と、第1主成分軸算出手段である第1主成分軸算出部13と、を備えている。また、画像処理装置3は、投影値算出手段である投影値算出部14と、画像処理手段であるオプティカルフロー算出部31を備えている。
【0035】
A/D変換部11では、カメラ2によって撮像されたアナログ画像をデジタル画像に変換し、RGB値検出部12に出力する。このデジタル画像は、カラー画像を変換して生成されたものであり、変換されたデジタル画像における各画素は、特徴量である色相としてRGB値を有している。RGB値検出部12では、カラー画像の画素ごとにこのRGB値を検出して、第1主成分軸算出部13に出力する。
【0036】
第1主成分軸算出部13では、デジタル画像における各画素のRGB値に基づいて第1主成分軸を算出し、投影値算出部14に出力する。投影値算出部14では、各画素におけるRGB値と第1主成分軸とから、各画素の投影値を算出する。算出された各画素における投影値は、微分値算出部15に出力され、微分値算出部15で微分処理がなされて微分値が算出される。算出された微分値はオプティカルフロー算出部31に出力される。オプティカルフロー算出部31では、デジタル画像の色相情報等を用いたオプティカルフローを計算するアルゴリズムなどによって、オプティカルフローを求める。
【0037】
次に、本実施形態に係る画像処理方法の手順について説明する。
【0038】
図6は、本実施形態に係る画像処理方法の手順を示すフローチャートである。図6に示すように、本実施形態に係る画像処理方法では、図6に示すように、本実施形態に係る画像処理方法においては、最初に、カメラ2で撮像され、A/D変換部11でA/D変換された画像をRGB値検出部12に出力する(S11)。また、カメラ2は、所定時間経過した後に同一位置を撮像し、得られた画像をA/D変換部11に出力する。A/D変換部は、この所定時間経過した後の画像をRGB値検出部12に出力する(S12)。RGB値検出部では、先に出力されたデジタル画像および後に出力されたデジタル画像におけるすべての画素のRGB値をそれぞれ検出する(S13)。そして、検出されたすべての画素のRGB値を第1主成分軸算出部13に出力する。
【0039】
第1主成分軸算出部13では、検出された各画素のRGB値に基づいて、第1主成分軸を算出する(S14)。第1主成分軸を算出するにあたり、先に出力されたデジタル画像に、m行n列のウィンドウを設定するとともに、後に出力されたデジタル画像のうち、先に出力されたデジタル画像に対応する位置にやはりm行n列のウィンドウを設定する。こうして、2つのm行n列のウィンドウを設定したら、合計2×m×n個の各画素のRGB値から、第1主成分軸を求める(S14)
【0040】
こうして第1主成分軸算出部13で求められた第1主成分軸は、信号化されて投影値算出部14に出力される。投影値算出部14においては、前のデジタル画像におけるウィンドウおよび後のデジタル画像におけるウィンドウの各画素の座標値を第1主成分軸に投影する(S15)。その結果から、各画素におけるRGB値の投影値を求める。
【0041】
そして、投影値算出部14で求められた各投影値は、信号化されてオプティカルフロー算出部31に出力される。オプティカルフロー算出部31では、これらの2×m×n個の投影値から、時空間微分の関係式を用いたオプティカルフロー算出アルゴリズムを実行して、注目ウィンドウにおけるオプティカルフローを求める(S16)。そして、このオプティカルフローによりたとえば動体の移動を好適に検出することができる。
【0042】
このように、本実施形態に係る画像処理方法においては、輝度値を用いることなく、画素が有するRGB値に基づいてオプティカルフローを求めている。このため、たとえば輝度値がほぼ同じであるが、色差が大きいような場合には、その変化をオプティカルフローとして確実に算出することができる。
【0043】
以上、本発明の好適な実施形態について説明したが、本発明は上記各実施形態に限定されるものではない。たとえば、上記各実施形態において、特徴量として、色差を表すRGB値を用いているが、各画素が持つ可能性がある特徴量であれば他のものであってもよい。たとえば、CIE UCS色度空間、CIE1976Lab色空間などの色空間における特徴量、赤外線の輝度画像、マルチスペクトルの画像などの各画素が持つ特徴量の2次元以上の空間における特徴量を挙げることができる。
【0044】
【発明の効果】
以上のとおり、本発明によれば、隣接する領域の色差は大きいが輝度差は小さい場合や、中間的な色同士が隣接する場合でも、エッジ検出や動体の移動の検出を確実に行うことができる画像処理方法および画像処理装置を提供することができる。
【図面の簡単な説明】
【図1】本発明の第1の実施形態に係る画像処理装置のブロック構成図である。
【図2】第1の実施形態に係る画像処理方法の手順を示すフローチャートである。
【図3】画像に設定されたウィンドウを示す図である。
【図4】各画素のRGB値がプロットされたRGB空間を示す座標系のグラフである。
【図5】本発明の第2の実施形態に係る画像処理装置のブロック構成図である。
【図6】第2の実施形態に係る画像処理方法の手順を示すフローチャートである。
【符号の説明】
1…画像処理装置、2…カメラ、3…画像処理装置、11…A/D変換部、12…RGB値検出部、13…第1主成分軸算出部、14…投影値算出部、15…微分値算出部、16…微分画像生成部、31…オプティカルフロー算出部、M…第1主成分軸、P1…注目画素、P2〜P9…近傍画素、W…ウィンドウ。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing method and an image processing apparatus.
[0002]
[Prior art]
There is a technique of performing edge detection by differentiating an image in order to obtain the correspondence when performing correspondence between images with a plurality of images and performing three-dimensional restoration (for example, see Patent Document 1).
[0003]
When such edge detection is performed on a color image, conventionally, for example, a color image is converted into a luminance image, and a differential image obtained by applying a Sobel filter to the luminance value is used to generate a differential image. I was trying to get it. Alternatively, the Sobel filter is independently applied to the RGB values in each pixel of the color image, and the largest of the three obtained values is adopted as the differential value to construct the differential image.
[0004]
On the other hand, image processing is also known in which an optical flow is obtained for each pixel, and movement of a moving object in the image is detected from the optical flow. When such image processing is performed on a color image, conventionally, a color image is converted into a luminance image, and an optical flow is obtained using a relational expression of spatiotemporal differentiation with respect to the luminance value.
[0005]
[Patent Document 1]
JP-A-2000-99760 [0006]
[Problems to be solved by the invention]
However, in the above prior art, since the luminance value is used when performing edge detection, when the luminance difference is small even though the color difference is large, for example, blue and red having substantially the same luminance difference are adjacent to each other. If this is the case, the differential value at that boundary will be small. For this reason, there is a problem that this adjacent portion cannot be detected as an edge portion. In addition, since the luminance value is also used when obtaining the optical flow, the same problem occurs.
[0007]
Furthermore, when the largest differential value among the RGB values is adopted, the differential value at the boundary between intermediate colors, for example, yellow and purple, becomes small, and edge detection becomes difficult again. was there.
[0008]
Therefore, an object of the present invention is to provide an image that can reliably perform edge detection and movement detection even when the color difference between adjacent areas is large but the luminance difference is small, or even when intermediate colors are adjacent to each other. The object is to provide a processing method and an image processing apparatus.
[0009]
[Means for Solving the Problems]
An image processing method according to the present invention that solves the above-described problem is an image processing method in which a feature amount detection unit detects a feature amount in a space of two or more dimensions that each pixel in a color image has, and performs image processing on the color image. The first principal component axis calculation means calculates the first principal component axis of the feature quantity based on the vector value of the feature quantity in each of the target pixel and neighboring pixels located around the target pixel, and the projection value calculation means The vector values of the feature values of the target pixel and the neighboring pixels are respectively projected onto the first principal component axis to obtain the projection values of the feature values of the target pixel and the neighboring pixels, and the image processing means performs a differentiation process based on the projection values. The first principal component axis calculating means calculates the first principal component axis for each pixel of interest .
[0010]
As a reason why edge detection becomes difficult when the color difference between adjacent regions is large but the luminance difference is small, or when intermediate colors are adjacent to each other, the inventor pays attention to the fact that the RGB value is a vector value. did. Since the RGB value is a vector value, it cannot be used as it is for the differentiation process, so that it is considered that it is difficult to detect when the color difference is large but the luminance difference is small.
[0011]
Therefore, in the image processing method according to the present invention, when a pixel has a feature amount represented by a vector value, the first principal component axis is calculated from the vector value, and the feature value vector value in each pixel is calculated. It is projected onto one principal component axis and replaced with a scalar value in the first principal component axis direction. For this reason, it is possible to perform a differentiation process that more reflects the feature amount of each pixel represented by a vector value.
Further, since the first principal component axis is obtained from the feature amount of each pixel, even when intermediate colors are adjacent to each other, the boundary can be reliably detected as an edge portion.
[0016]
Here, it is preferable to perform image processing on the assumption that the feature amount is an RGB value in a color image.
[0017]
Since RGB values are vector quantities, differentiation processing cannot be performed as they are, but they are used for image processing by projecting on the first principal component axis and replacing them with scalar values as in the present invention. Can do. Since RGB values are used in this way, edge detection can be reliably performed even when the color difference between adjacent regions is large but the luminance difference is small, or even when intermediate colors are adjacent to each other.
[0018]
In addition, an image processing apparatus according to the present invention that solves the above-described problems includes a feature amount detection unit that detects a feature amount in a two-dimensional space or more possessed by each pixel in a color image, a target pixel, and a position around the target pixel. First principal component axis calculation means for obtaining a first principal component axis of the feature quantity based on the vector value of the feature quantity in each of the neighboring pixels to be processed, and the first principal component axis calculation means for calculating the first principal component axis of the feature quantity. by projecting component shaft has a projection value calculating means for calculating a projection value of a feature value of the pixel of interest and neighboring pixels, based on the projection value, image processing means for performing a differential processing of each pixel of a color image, the The first principal component axis calculation means calculates the first principal component axis for each pixel of interest .
[0019]
Furthermore, an image processing apparatus according to the present invention that has solved the above-described problems includes a feature amount detection unit that detects a feature amount in a two-dimensional space or more possessed by each pixel in a color image, an attention window, and attention after a predetermined time has elapsed. A first principal component axis calculating means for calculating a first principal component axis of the feature quantity based on a vector value of the feature quantity of each pixel in the window; and a vector value of the feature quantity of the target window and the target window after a predetermined time has elapsed. the projected to the first principal component axis, the projection value calculating means for obtaining the projection value of the feature amount of each pixel in the target window after the lapse subject window and a predetermined time, based on the projection values, each pixel of the color image And image processing means for obtaining an optical flow at each pixel .
[0020]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings.
[0021]
FIG. 1 is a block diagram of an image processing apparatus according to the first embodiment of the present invention. As shown in FIG. 1, a camera 2 that captures surrounding images as color images is connected to the image processing apparatus 1 according to the present embodiment. The image processing apparatus 1 also includes an A / D conversion unit 11, an RGB value detection unit 12 that is a feature amount detection unit, and a first principal component axis calculation unit 13 that is a first principal component axis calculation unit. ing. The image processing apparatus 1 further includes a projection value calculation unit 14 that is a projection value calculation unit, a differential value calculation unit 15 that is an image processing unit, and a differential image generation unit 16 that is also an image processing unit. . The color image captured by the camera 2 is output to the A / D conversion unit 11 in the image processing apparatus 1.
[0022]
The A / D conversion unit 11 converts the analog image captured by the camera 2 into a digital image and outputs the digital image to the RGB value detection unit 12. This digital image is generated by converting a color image, and each pixel in the converted digital image has an RGB value as a hue that is a feature amount. The RGB value detection unit 12 detects this RGB value for each pixel of the color image and outputs it to the first principal component axis calculation unit 13.
[0023]
The first principal component axis calculation unit 13 calculates the first principal component axis based on the RGB value of each pixel in the digital image and outputs the first principal component axis to the projection value calculation unit 14. The projection value calculation unit 14 calculates the projection value of each pixel from the RGB value of each pixel and the first principal component axis. The calculated projection value at each pixel is output to the differential value calculation unit 15, and the differential value calculation unit 15 performs differential processing to calculate the differential value. The calculated differential value is output to the differential image generation unit 16. The differential image generation unit 16 generates a differential image from the output differential value. For example, the edge detection of the object is performed from the differential image thus generated.
[0024]
Next, the procedure of the image processing method according to this embodiment will be described.
[0025]
FIG. 2 is a flowchart showing the procedure of the image processing method according to the present embodiment. As shown in FIG. 2, in the image processing method according to the present embodiment, first, an image captured by the camera 2 and A / D converted by the A / D converter 11 is output to the RGB value detector 12. (S1). The RGB value detection unit detects the RGB value of each pixel in the output digital image (S2). Then, the RGB values of all the pixels in the digital image are detected and output to the first principal component axis calculation unit 13.
[0026]
The first principal component axis calculation unit 13 obtains a first principal component axis based on the detected RGB value of each pixel (S3). In calculating the first principal component axis, as shown in FIG. 3, a window W consisting of nine pixels of 3 rows and 3 columns is set, and the central pixel is set as the target pixel P1, and the eight pixels around the target pixel P1 are set. Let the pixels be neighboring pixels P2 to P8. These nine pixels P1 to P9 all have RGB values as unique vector values as hue information. As shown in FIG. 4, the RGB values of these pixels can be represented by coordinate values on the coordinate axes of the coordinate system indicating the RGB space. As described above, the first principal component axis M corresponding to the nine coordinate values P1 to P9 is obtained by performing appropriate arithmetic processing on the coordinate values P1 to P9 of the nine pixels represented in the RGB space (S3). .
[0027]
Thus, the first principal component axis obtained by the first principal component axis calculation unit 13 is converted into a signal and output to the projection value calculation unit 14. The projection value calculation unit 14 projects the coordinate values of the target pixel P1 and the neighboring pixels P2 to P8 onto the first principal component axis M (S4). From the projection result, the projection value of the RGB value in each pixel is obtained. By projecting the RGB value of each pixel onto the first principal component axis M, the RGB value of each pixel is replaced with a scalar value in the first principal component axis direction. Since the RGB value is a vector value, it cannot be used for differentiation processing as it is, but the projection value obtained by projecting the RGB value onto the first principal component axis is a scalar value, so it can be used for differentiation processing. become able to.
[0028]
Each projection value obtained by the projection value calculation unit 14 is converted into a signal and output to the differential value calculation unit 15. The differential value calculation unit 15 performs differential processing by, for example, applying a Sobel filter to the projection value obtained by projecting the target pixel P1 and the neighboring pixels P2 to P8 onto the first principal component axis M, so that the differential value of the target pixel P1 is obtained. Is obtained (S5). When applying a Sobel filter for performing differentiation processing, for example, using an Sobel filter in the X-axis direction and a Sobel filter in the Y-axis direction when the image is viewed as an XY plane, differential values in the X direction and the Y direction are used. It can be set as the aspect which calculates | requires. In the present embodiment, the Sobel filter is used as the differential filter, but other appropriate differential filters such as a Laplacian filter can also be used.
[0029]
In this way, the differential value is obtained with one pixel as the target pixel P1. At the same time, the same processing is performed on other pixels in the digital image, and the first principal component axis between the pixel and the neighboring pixels around it is obtained. The pixel is projected onto the first principal component axis to obtain a projection value, and a differential process is performed based on the projection value to obtain a differential value. Then, the same processing is performed on each pixel in the digital image to obtain differential values of all the pixels.
[0030]
When the differential values of all the pixels in the digital image are obtained using the first principal component axis, all the differential values are output from the differential value calculation unit 15 to the differential image generation unit 16. The differential image generation unit 16 generates a differential image with edge enhancement based on the output differential value. And it can display on the monitor etc. which are not illustrated.
[0031]
As described above, in the image processing method according to the present embodiment, the differential image is obtained based on the RGB value of the pixel without using the luminance value. For this reason, for example, when the luminance values are substantially the same, but the color difference is large, the boundary can be reliably detected as an edge portion. Further, the first principal component axis is obtained from the RGB value of each pixel, and the differential image is obtained based on the projection value projected onto the first principal component axis. Therefore, even when intermediate colors are adjacent to each other, the boundary can be reliably detected as an edge portion.
[0032]
In the above embodiment, the size of the window W is set to 3 rows and 3 columns. However, the size of the window is not limited to this, and is appropriately set to a plurality of m rows and n columns such as 5 rows and 5 columns. be able to. In addition, as neighboring pixels around the target pixel, all the eight pixels adjacent to the target pixel are set as the neighboring pixels. For example, only the pixels adjacent to the side of the target pixel and the upper and lower sides are set as the neighboring pixels, Only adjacent pixels can be used as the target pixel.
[0033]
Next, a second embodiment of the present invention will be described.
[0034]
FIG. 5 is a block diagram of the image processing apparatus according to this embodiment. As shown in FIG. 5, the image processing apparatus 3 according to the present embodiment includes an A / D conversion unit 11, an RGB value detection unit 12 that is a feature amount detection unit, and a first main component axis calculation unit. And a component axis calculation unit 13. In addition, the image processing apparatus 3 includes a projection value calculation unit 14 that is a projection value calculation unit, and an optical flow calculation unit 31 that is an image processing unit.
[0035]
The A / D conversion unit 11 converts the analog image captured by the camera 2 into a digital image and outputs the digital image to the RGB value detection unit 12. This digital image is generated by converting a color image, and each pixel in the converted digital image has an RGB value as a hue that is a feature amount. The RGB value detection unit 12 detects this RGB value for each pixel of the color image and outputs it to the first principal component axis calculation unit 13.
[0036]
The first principal component axis calculation unit 13 calculates the first principal component axis based on the RGB value of each pixel in the digital image and outputs the first principal component axis to the projection value calculation unit 14. The projection value calculation unit 14 calculates the projection value of each pixel from the RGB value of each pixel and the first principal component axis. The calculated projection value at each pixel is output to the differential value calculation unit 15, and the differential value calculation unit 15 performs differential processing to calculate the differential value. The calculated differential value is output to the optical flow calculation unit 31. The optical flow calculation unit 31 obtains the optical flow by an algorithm for calculating the optical flow using the hue information of the digital image or the like.
[0037]
Next, the procedure of the image processing method according to this embodiment will be described.
[0038]
FIG. 6 is a flowchart showing the procedure of the image processing method according to the present embodiment. As shown in FIG. 6, in the image processing method according to the present embodiment, as shown in FIG. 6, in the image processing method according to the present embodiment, first, an image is captured by the camera 2, and the A / D conversion unit 11. The A / D converted image is output to the RGB value detection unit 12 (S11). The camera 2 captures the same position after a predetermined time has elapsed, and outputs the obtained image to the A / D converter 11. The A / D converter outputs the image after the predetermined time has passed to the RGB value detector 12 (S12). The RGB value detection unit detects the RGB values of all the pixels in the digital image output earlier and the digital image output later (S13). The detected RGB values of all the pixels are output to the first principal component axis calculation unit 13.
[0039]
The first principal component axis calculation unit 13 calculates the first principal component axis based on the detected RGB value of each pixel (S14). In calculating the first principal component axis, a window of m rows and n columns is set in the previously output digital image, and among the digital images output later, the position corresponding to the previously output digital image A window with m rows and n columns is set. When two windows of m rows and n columns are set in this way, the first principal component axis is obtained from the RGB values of a total of 2 × m × n pixels (S14).
[0040]
Thus, the first principal component axis obtained by the first principal component axis calculation unit 13 is converted into a signal and output to the projection value calculation unit 14. The projection value calculation unit 14 projects the coordinate values of each pixel of the window in the previous digital image and the window in the subsequent digital image onto the first principal component axis (S15). From the result, the projection value of the RGB value in each pixel is obtained.
[0041]
Each projection value obtained by the projection value calculation unit 14 is converted into a signal and output to the optical flow calculation unit 31. The optical flow calculation unit 31 executes an optical flow calculation algorithm using a relational expression of spatiotemporal differentiation from these 2 × m × n projection values to obtain an optical flow in the window of interest (S16). For example, the movement of the moving object can be suitably detected by this optical flow.
[0042]
As described above, in the image processing method according to the present embodiment, the optical flow is obtained based on the RGB values of the pixels without using the luminance values. For this reason, for example, when the luminance values are substantially the same, but the color difference is large, the change can be reliably calculated as an optical flow.
[0043]
The preferred embodiments of the present invention have been described above, but the present invention is not limited to the above embodiments. For example, in each of the above embodiments, the RGB value representing the color difference is used as the feature amount. However, any other feature amount may be used as long as each pixel may have a feature amount. For example, feature quantities in a color space such as CIE UCS chromaticity space, CIE 1976 Lab color space, feature quantities of each pixel such as an infrared luminance image, multispectral image, etc. can be listed in a two-dimensional or more space. .
[0044]
【The invention's effect】
As described above, according to the present invention, even when the color difference between adjacent areas is large but the luminance difference is small, or even when intermediate colors are adjacent to each other, edge detection and detection of movement of a moving object can be reliably performed. An image processing method and an image processing apparatus can be provided.
[Brief description of the drawings]
FIG. 1 is a block configuration diagram of an image processing apparatus according to a first embodiment of the present invention.
FIG. 2 is a flowchart showing a procedure of an image processing method according to the first embodiment.
FIG. 3 is a diagram showing a window set for an image.
FIG. 4 is a graph of a coordinate system showing an RGB space in which RGB values of each pixel are plotted.
FIG. 5 is a block diagram of an image processing apparatus according to a second embodiment of the present invention.
FIG. 6 is a flowchart illustrating a procedure of an image processing method according to the second embodiment.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Image processing apparatus, 2 ... Camera, 3 ... Image processing apparatus, 11 ... A / D conversion part, 12 ... RGB value detection part, 13 ... 1st principal component axis calculation part, 14 ... Projection value calculation part, 15 ... Differential value calculation unit, 16 ... differential image generation unit, 31 ... optical flow calculation unit, M ... first principal component axis, P1 ... target pixel, P2 to P9 ... neighboring pixels, W ... window.

Claims (3)

カラー画像中における各画素が持つ2次元以上の空間における特徴量を特徴量検出手段が検出して前記カラー画像を画像処理する画像処理方法において、
第1主成分軸算出手段が、注目画素および前記注目画素の周囲に位置する近傍画素のそれぞれにおける前記特徴量のベクトル値に基づいて、前記特徴量の第1主成分軸を算出し、
投影値算出手段が、前記注目画素および前記近傍画素における特徴量のベクトル値をそれぞれ前記第1主成分軸に投影して、前記注目画素および前記近傍画素の特徴量の投影値を求め、
画像処理手段が、前記投影値に基づいて微分処理を行い、
前記第1主成分軸算出手段は、前記注目画素ごとに第1主成分軸を算出することを特徴とする画像処理方法。
In an image processing method in which a feature amount detection unit detects a feature amount in a two-dimensional space or more possessed by each pixel in a color image and performs image processing on the color image.
A first principal component axis calculating unit calculates a first principal component axis of the feature amount based on a vector value of the feature amount in each of the target pixel and neighboring pixels located around the target pixel;
Projection value calculating means projects the feature value vector values of the target pixel and the neighboring pixels on the first principal component axis, respectively, to determine the feature value projection values of the target pixel and the neighboring pixels,
The image processing means performs a differentiation process based on the projection value ,
The image processing method according to claim 1, wherein the first principal component axis calculating means calculates a first principal component axis for each pixel of interest .
前記特徴量がカラー画像におけるRGB値であることを特徴とする請求項1に記載の画像処理方法。The image processing method according to claim 1 , wherein the feature amount is an RGB value in a color image. カラー画像中における各画素が持つ2次元以上の空間における特徴量を検出する特徴量検出手段と、
注目画素および前記注目画素の周囲に位置する近傍画素のそれぞれにおける前記特徴量のベクトル値に基づいて、前記特徴量の第1主成分軸を求める第1主成分軸算出手段と、
注目画素および前記近傍画素における特徴量のベクトル値をそれぞれ第1主成分軸に投影して、前記注目画素および前記近傍画素の特徴量の投影値を求める投影値算出手段と、
前記投影値に基づいて、前記カラー画像の前記各画素の微分処理を行う画像処理手段と、を有し、
前記第1主成分軸算出手段は、前記注目画素ごとに第1主成分軸を算出することを特徴とする画像処理装置。
Feature amount detection means for detecting a feature amount in a space of two or more dimensions of each pixel in the color image;
First principal component axis calculation means for obtaining a first principal component axis of the feature amount based on a vector value of the feature amount in each of the target pixel and neighboring pixels located around the target pixel;
Projection value calculation means for projecting the feature value vector values of the target pixel and the neighboring pixels on the first principal component axis, respectively, to obtain the projection values of the feature values of the target pixel and the neighboring pixels;
Image processing means for differentiating each pixel of the color image based on the projection value ;
The image processing apparatus according to claim 1, wherein the first principal component axis calculating means calculates a first principal component axis for each pixel of interest .
JP2002313116A 2002-10-28 2002-10-28 Image processing method and image processing apparatus Expired - Fee Related JP4075571B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002313116A JP4075571B2 (en) 2002-10-28 2002-10-28 Image processing method and image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002313116A JP4075571B2 (en) 2002-10-28 2002-10-28 Image processing method and image processing apparatus

Publications (2)

Publication Number Publication Date
JP2004151770A JP2004151770A (en) 2004-05-27
JP4075571B2 true JP4075571B2 (en) 2008-04-16

Family

ID=32457819

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002313116A Expired - Fee Related JP4075571B2 (en) 2002-10-28 2002-10-28 Image processing method and image processing apparatus

Country Status (1)

Country Link
JP (1) JP4075571B2 (en)

Also Published As

Publication number Publication date
JP2004151770A (en) 2004-05-27

Similar Documents

Publication Publication Date Title
JP4054184B2 (en) Defective pixel correction device
US6181376B1 (en) Method of determining missing color values for pixels in a color filter array
US5805217A (en) Method and system for interpolating missing picture elements in a single color component array obtained from a single color sensor
TWI516132B (en) An image processing apparatus, an image processing method, and a program
JP5036421B2 (en) Image processing apparatus, image processing method, program, and imaging apparatus
KR100548611B1 (en) Apparatus and method for edge emphasis in image processing
EP2334085B1 (en) Imaging processor
JP2816095B2 (en) Video camera signal processing circuit
CN101946519B (en) Image processing device, imaging device, correction coefficient calculating method, and image processing program
JP2000341707A (en) Image de-mosaicing method using directional smoothing operation
JPH11177994A (en) Image processing apparatus, image processing method, and camera
US20130342698A1 (en) Method of Processing Images and Apparatus
JP2000023174A (en) Image processing apparatus and image processing method
JP6825617B2 (en) Image processing equipment, imaging equipment, and image processing methods, and programs
US8606016B2 (en) Edge detection apparatus and computing circuit employed in edge detection apparatus
US5821999A (en) Method and system for fractally interpolating intensity values for a single color component array obtained from a single color sensor
JP4617870B2 (en) Imaging apparatus and method, and program
CN101796542A (en) Arrangement and method for procesing image data
JP4075571B2 (en) Image processing method and image processing apparatus
US20080002909A1 (en) Reconstructing Blurred High Resolution Images
JP5036524B2 (en) Image processing apparatus, image processing method, program, and imaging apparatus
US8068145B1 (en) Method, systems, and computer program product for demosaicing images
JP4605582B2 (en) Stereo image recognition apparatus and method
JP4334150B2 (en) Image interpolation device
KR100776385B1 (en) Color interpolation device for edge enhancement and noise removal

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050414

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070703

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070903

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071002

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071129

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080121

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

Free format text: PAYMENT UNTIL: 20110208

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110208

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120208

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120208

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130208

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130208

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140208

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees