JP2009231965A - Image processor - Google Patents

Image processor Download PDF

Info

Publication number
JP2009231965A
JP2009231965A JP2008072287A JP2008072287A JP2009231965A JP 2009231965 A JP2009231965 A JP 2009231965A JP 2008072287 A JP2008072287 A JP 2008072287A JP 2008072287 A JP2008072287 A JP 2008072287A JP 2009231965 A JP2009231965 A JP 2009231965A
Authority
JP
Japan
Prior art keywords
color difference
pixel
data
processing target
difference data
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
JP2008072287A
Other languages
Japanese (ja)
Inventor
Nariyasu Kyo
成泰 姜
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.)
Murata Machinery Ltd
Original Assignee
Murata Machinery 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 Murata Machinery Ltd filed Critical Murata Machinery Ltd
Priority to JP2008072287A priority Critical patent/JP2009231965A/en
Publication of JP2009231965A publication Critical patent/JP2009231965A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Color Television Systems (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processor that converts an original image in YCC422 format into an expanded image in YCC444 format without generating a color blur nearby a border of colors. <P>SOLUTION: The image processor includes a processing object pixel extraction unit which extracts two pixels allocated with common color difference data on the original image as pixels to be processed, a luminance change detection unit which determines a difference value of luminance between pixels in the pixels to be processed as a first difference, a first comparison unit which compares the first difference and a first threshold with each other, and a color difference data conversion unit which generates two color difference data to be newly allocated to the respective pixels in the pixels to be processed on the basis of the comparison result of the first comparison unit and color difference data between a front pixel and a rear pixel adjacent to each other in the array direction of the respective pixels in the pixels to be processed on the original image. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、画像処理装置に係り、さらに詳しくは、1ピクセルごとの輝度データと2ピクセルごとの色差データとからなる原画像を1ピクセルごとの輝度データ及び色差データからなる伸張画像に変換して出力する画像処理装置の改良に関する。   The present invention relates to an image processing apparatus. More specifically, the present invention converts an original image composed of luminance data for each pixel and color difference data for every two pixels into an expanded image composed of luminance data and color difference data for each pixel. The present invention relates to an improvement of an output image processing apparatus.

デジタルテレビ放送などのカラー映像信号に用いられる画像データのフォーマットとして、YCbCr422フォーマットがある。YCbCr422フォーマットは、RGBフォーマットからYCbCr422フォーマットへのデータ圧縮時に色情報の損失が少ないフォーマットとして知られている。YCbCr422フォーマットの画像データは、輝度(Y)成分と、色差(Cb及びCr)成分とからなり、画像上で互いに隣接する2×2=4ピクセル当たりに、4つのYデータと、それぞれ2つのCbデータ及びCrデータによって構成される。一方、RGBフォーマットの画像データは、R(赤)、G(緑)、B(青)の色成分からなり、1ピクセル当たりに、それぞれ1つの輝度データによって構成される。一般に、CCD(Charge Coupled Devices:電荷結合素子)などの撮像素子によって得られるRGBフォーマットの画像データをYCbCr422フォーマットの画像データに変換することにより、1ピクセル当たりのデータ量を抑えることができる。   There is a YCbCr422 format as a format of image data used for color video signals such as digital television broadcasting. The YCbCr422 format is known as a format with little loss of color information when data is compressed from the RGB format to the YCbCr422 format. The image data in the YCbCr422 format is composed of a luminance (Y) component and a color difference (Cb and Cr) component, and for each 2 × 2 = 4 pixels adjacent to each other on the image, four Y data and two Cb respectively. Data and Cr data. On the other hand, image data in the RGB format is composed of R (red), G (green), and B (blue) color components, and is composed of one piece of luminance data for each pixel. In general, the amount of data per pixel can be suppressed by converting RGB format image data obtained by an image sensor such as a charge coupled device (CCD) into image data in the YCbCr422 format.

しかしながら、RGBフォーマットの画像データをYCbCr422フォーマットの画像データに変換した場合、Y成分が1ピクセルごとに変化するデータであるのに対して、Cb及びCr成分は、いずれも2ピクセルごとに変化するデータとなる。このため、Y成分が大きく変化する変化点とCb又はCr成分が大きく変化する変化点との間に1ピクセル分のずれが生じる場合があった。この様に、Y成分の変化点とCb及びCr成分の変化点との間にずれが生じた場合、色の境界によっては、Y成分の変化点とCb及びCr成分の変化点とが必ずしも一致しないこととなる。通常、YCbCr422フォーマットの画像データを表示装置などの出力装置に入力する場合、RGBコンバータなどの画像処理装置を用いて、YCbCr422フォーマットの画像データをRGBフォーマットの画像データに変換し、画像を伸張させる処理が行われる。この様な従来の画像処理装置では、YCbCr422フォーマットの画像データをRGBフォーマットの画像データに変換した際に、上述した理由によって変化の度合いが大きな色の境界付近に色のにじみが発生し、境界付近が目立ってしまうという問題があった。   However, when RGB format image data is converted to YCbCr422 format image data, the Y component changes every pixel, whereas the Cb and Cr components both change every 2 pixels. It becomes. For this reason, a shift of one pixel may occur between the change point where the Y component changes greatly and the change point where the Cb or Cr component changes greatly. As described above, when a deviation occurs between the change point of the Y component and the change point of the Cb and Cr components, the change point of the Y component and the change point of the Cb and Cr components may not necessarily coincide depending on the color boundary. Will not. Normally, when YCbCr422 format image data is input to an output device such as a display device, an image processing device such as an RGB converter is used to convert the YCbCr422 format image data to RGB format image data and decompress the image. Is done. In such a conventional image processing apparatus, when YCbCr422 format image data is converted into RGB format image data, color blur occurs near the color boundary having a large degree of change due to the above-described reason. There was a problem that would stand out.

本発明は、上記の事情に鑑みてなされたものであり、変化の度合いが大きな色の境界付近で色のにじみが発生するのを抑制することができる画像処理装置を提供することを目的とする。特に、色の境界付近で色のにじみを発生させることなく、YCbCr422フォーマットの原画像をYCbCr444フォーマットの伸張画像に変換することができる画像処理装置を提供することを目的とする。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide an image processing apparatus capable of suppressing the occurrence of color bleeding near the boundary between colors having a large degree of change. . In particular, an object of the present invention is to provide an image processing apparatus capable of converting an original image in YCbCr422 format into a decompressed image in YCbCr444 format without causing color blurring in the vicinity of the color boundary.

第1の本発明による画像処理装置は、1ピクセルごとの輝度データ及び2ピクセルごとの色差データからなる原画像を1ピクセルごとの輝度データ及び色差データからなる伸張画像に変換して出力する画像処理装置であって、上記原画像上で共通の色差データが割り当てられた互いに隣接する2つのピクセルを処理対象ピクセルとして抽出する処理対象ピクセル抽出部と、上記処理対象ピクセル内の各ピクセル間における輝度の差分値を第1差分として求める輝度変化検知部と、第1差分及び第1閾値を比較する第1比較部と、第1比較部による比較結果、及び、上記処理対象ピクセルに隣接する隣接ピクセルのうち、上記原画像上で上記処理対象ピクセル内の各ピクセルの配列方向に隣接する前ピクセル及び後ピクセルの色差データに基づいて、上記処理対象ピクセル内の各ピクセルに新たに割り当てる2つの色差データを生成する色差データ変換部とを備えて構成される。   The image processing apparatus according to the first aspect of the present invention converts an original image composed of luminance data for each pixel and color difference data for each two pixels into an expanded image composed of luminance data and color difference data for each pixel and outputs the image. A processing target pixel extraction unit that extracts two adjacent pixels assigned common color difference data on the original image as processing target pixels, and brightness of each pixel in the processing target pixel A luminance change detection unit that obtains a difference value as a first difference, a first comparison unit that compares the first difference and the first threshold, a comparison result by the first comparison unit, and an adjacent pixel adjacent to the processing target pixel Of these, based on the color difference data of the previous pixel and the subsequent pixel adjacent to each other in the arrangement direction of each pixel in the processing target pixel on the original image. Te, and and a color difference data conversion unit for generating the two color difference data newly assigned to each pixel in the processing target pixel.

この画像処理装置では、共通の色差データが割り当てられた2つのピクセルが処理対象ピクセルとして抽出され、処理対象ピクセル内の各ピクセル間の輝度の差分値が求められる。そして、この差分値と第1閾値との比較結果と、原画像上で処理対象ピクセル内の各ピクセルの配列方向に隣接する前ピクセル及び後ピクセルの色差データに基づいて、処理対象ピクセル内の各ピクセルに新たに割り当てる2つの色差データが生成される。この様な構成によれば、輝度の差分値と第1閾値との比較結果に基づいて新たに割り当てる2つの色差データが生成されるので、処理対象ピクセルについて輝度が大きく変化している場合に、新たに割り当てる色差データを元の色差データと異ならせることができる。また、処理対象ピクセルに隣接する前ピクセル及び後ピクセルの色差データに基づいて上記2つの色差データが生成されるので、新たに割り当てる色差データを元の色差データと異ならせる場合に、前後のピクセルの色差に応じた適切な色差を割り当てることができる。   In this image processing apparatus, two pixels to which common color difference data is assigned are extracted as processing target pixels, and a luminance difference value between each pixel in the processing target pixels is obtained. Then, based on the comparison result between the difference value and the first threshold value, and the color difference data of the previous pixel and the subsequent pixel adjacent to each other in the arrangement direction of each pixel in the processing target pixel on the original image, Two color difference data newly assigned to the pixel are generated. According to such a configuration, since two color difference data to be newly assigned are generated based on the comparison result between the luminance difference value and the first threshold value, when the luminance is greatly changed for the processing target pixel, The newly assigned color difference data can be made different from the original color difference data. In addition, since the above two color difference data are generated based on the color difference data of the previous pixel and the subsequent pixel adjacent to the processing target pixel, when making the newly assigned color difference data different from the original color difference data, An appropriate color difference according to the color difference can be assigned.

第2の本発明による画像処理装置は、上記構成に加え、上記前ピクセル及び上記処理対象ピクセル間における色差の差分値を第2差分として求めるとともに、上記後ピクセル及び上記処理対象ピクセル間における色差の差分値を第3差分として求める色差変化検知部と、第2差分及び第3差分のうち、大きい方の差分値と第2閾値とを比較するとともに、小さい方の差分値と第2閾値よりも小さな第3閾値とを比較する第2比較部とを備え、上記色差データ変換部が、第1比較部及び第2比較部による比較結果に基づいて、上記2つの色差データを生成するように構成される。この様な構成によれば、処理対象ピクセルについて、輝度が大きく変化しているか否かと、前後のピクセルとの間で色差が大きく変化しているか否かとに応じて新たに割り当てる色差データを生成することができる。   In addition to the above configuration, the image processing apparatus according to the second aspect of the present invention obtains a difference value of a color difference between the previous pixel and the processing target pixel as a second difference, and calculates a color difference between the rear pixel and the processing target pixel. The color difference change detection unit that obtains the difference value as the third difference and the larger difference value of the second difference and the third difference are compared with the second threshold value, and the smaller difference value and the second threshold value are compared. A second comparison unit that compares a small third threshold value, and the color difference data conversion unit generates the two color difference data based on the comparison results of the first comparison unit and the second comparison unit. Is done. According to such a configuration, the color difference data to be newly assigned is generated for the processing target pixel depending on whether or not the luminance has changed greatly and whether or not the color difference has changed greatly between the preceding and following pixels. be able to.

第3の本発明による画像処理装置は、上記構成に加え、上記色差データ変換部が、上記処理対象ピクセルに割り当てられている色差データと、上記前ピクセル及び上記後ピクセルのうち、上記処理対象ピクセルとの間で色差の差分値が大きな隣接ピクセルの色差データとから上記2つの色差データを生成するように構成される。この様な構成によれば、処理対象ピクセルについて、色差の変化が大きな隣接ピクセルの色差データと元の色差データとから新たに割り当てる色差データが生成されるので、輝度の変化点付近における色差の変化を効果的に平滑化することができる。   In addition to the above-described configuration, the image processing apparatus according to a third aspect of the present invention is configured such that the color difference data conversion unit includes the color difference data assigned to the pixel to be processed, and the pixel to be processed among the previous pixel and the rear pixel. The two color difference data are generated from the color difference data of adjacent pixels having a large difference value of the color difference between them. According to such a configuration, color difference data to be newly assigned is generated from the color difference data of an adjacent pixel having a large change in color difference and the original color difference data for the processing target pixel, so that the change in color difference near the luminance change point is generated. Can be effectively smoothed.

第4の本発明による画像処理装置は、上記構成に加え、上記色差データ変換部が、第1差分が第1閾値を上回っており、かつ、上記大きい方の差分値が第2閾値を上回っているとともに、上記小さい方の差分値が第3閾値以下となっている場合に、上記処理対象ピクセルに割り当てられている色差データとは異なるデータを上記2つの色差データとして生成するように構成される。この様な構成によれば、処理対象ピクセルについて、輝度が大きく変化し、かつ、色差が前後のピクセルの一方に対してだけ大きく変化している場合に、新たに割り当てる色差データを元の色差データと異ならせることができる。これにより、輝度の変化点付近における色差の変化を平滑化できるので、変化の度合いが大きな色の境界付近で色のにじみが発生するのを抑制することができる。   In the image processing apparatus according to the fourth aspect of the present invention, in addition to the above configuration, the color difference data conversion unit includes a first difference that exceeds the first threshold value, and a larger difference value that exceeds the second threshold value. In addition, when the smaller difference value is equal to or smaller than the third threshold value, data different from the color difference data assigned to the processing target pixel is generated as the two color difference data. . According to such a configuration, when the luminance of the processing target pixel is greatly changed and the color difference is greatly changed only for one of the preceding and succeeding pixels, the newly assigned color difference data is changed to the original color difference data. Can be different. As a result, the color difference change in the vicinity of the luminance change point can be smoothed, so that it is possible to suppress the occurrence of color blurring near the color boundary where the degree of change is large.

第5の本発明による画像処理装置は、上記構成に加え、上記2つの色差データのうちの一方が、上記処理対象ピクセルに割り当てられている元の色差データであるように構成される。この様な構成によれば、処理対象ピクセルに元の色差データと異なるデータを割り当てる場合に、新たに割り当てる2つの色差データのうちの一方が元の色差データであるので、原画像における色差データからのずれが後で処理されるピクセルほど大きくなるのを抑制することができる。   In addition to the above-described configuration, the image processing apparatus according to the fifth aspect of the present invention is configured such that one of the two color difference data is the original color difference data assigned to the processing target pixel. According to such a configuration, when data different from the original color difference data is assigned to the processing target pixel, one of the two newly assigned color difference data is the original color difference data. It is possible to suppress the deviation of the pixel from becoming larger as the pixel is processed later.

第6の本発明による画像処理装置は、上記構成に加え、上記色差データ変換部が、上記処理対象ピクセル内の各ピクセルに上記2つの色差データを割り当てる際に、上記前ピクセル及び上記後ピクセルのうち、上記処理対象ピクセルとの間で色差の差分値が小さな隣接ピクセルに隣接するピクセルに対して、上記元の色差データを割り当てるように構成される。この様な構成によれば、処理対象ピクセルについて、色差の変化が小さな隣接ピクセルに隣接するピクセルに元の色差データが割り当てられるので、輝度の変化点付近における色差の変化を効果的に平滑化することができる。   In addition to the above-described configuration, the image processing apparatus according to a sixth aspect of the present invention is configured such that when the color difference data conversion unit assigns the two color difference data to each pixel in the processing target pixel, Of these, the original color difference data is assigned to a pixel adjacent to an adjacent pixel having a small color difference value with respect to the processing target pixel. According to such a configuration, since the original color difference data is assigned to a pixel adjacent to an adjacent pixel having a small change in color difference for the processing target pixel, the change in color difference near the luminance change point is effectively smoothed. be able to.

本発明による画像処理装置によれば、処理対象ピクセルについて、輝度が大きく変化しているか否かと、前後のピクセルとの間で色差が大きく変化しているか否かとに応じて新たに割り当てる色差データを生成することができる。特に、処理対象ピクセルについて、輝度が大きく変化し、かつ、色差が前後のピクセルの一方に対してだけ大きく変化している場合に、新たに割り当てる色差データを元の色差データと異ならせることができる。これにより、輝度の変化点付近における色差の変化を平滑化できるので、変化の度合いが大きな色の境界付近で色のにじみが発生するのを抑制することができる。従って、色の境界付近で色のにじみを発生させることなく、YCbCr422フォーマットの原画像をYCbCr444フォーマットの伸張画像に変換することができる画像処理装置を実現することができる。   According to the image processing apparatus of the present invention, the color difference data to be newly assigned according to whether or not the luminance is greatly changed for the processing target pixel and whether or not the color difference is greatly changed between the preceding and following pixels. Can be generated. In particular, when the luminance of the pixel to be processed is greatly changed and the color difference is greatly changed only with respect to one of the preceding and succeeding pixels, the newly assigned color difference data can be made different from the original color difference data. . As a result, the color difference change in the vicinity of the luminance change point can be smoothed, so that it is possible to suppress the occurrence of color blurring near the color boundary where the degree of change is large. Therefore, it is possible to realize an image processing apparatus that can convert an original image in the YCbCr422 format into a decompressed image in the YCbCr444 format without causing color blurring in the vicinity of the color boundary.

図1は、本発明の実施の形態による画像処理装置を含む画像処理システム1の一構成例を示したシステム図である。この画像処理システム1は、デジタルビデオカメラ2、画像処理装置3、解像度変更処理部4及び出力装置5からなり、デジタルビデオカメラ2で撮影された映像信号が出力装置5において可視化される。   FIG. 1 is a system diagram showing a configuration example of an image processing system 1 including an image processing apparatus according to an embodiment of the present invention. The image processing system 1 includes a digital video camera 2, an image processing device 3, a resolution change processing unit 4, and an output device 5, and a video signal photographed by the digital video camera 2 is visualized by the output device 5.

デジタルビデオカメラ2は、被写体を撮影して映像信号を出力する撮影装置であり、CCD21及び色空間変換部22からなる。CCD21は、多数の受光素子からなる撮像素子であり、受光量に応じた画素信号として、R、G、Bの色成分ごとの輝度データが生成される。   The digital video camera 2 is a photographing device that photographs a subject and outputs a video signal, and includes a CCD 21 and a color space conversion unit 22. The CCD 21 is an image sensor including a large number of light receiving elements, and brightness data for each of R, G, and B color components is generated as a pixel signal corresponding to the amount of received light.

このRGBフォーマットの画像データは、色空間変換部22によってYCbCr422フォーマットの画像データに変換され、映像信号として出力される。ここでは、映像信号として、所定のフレームレートからなる動画像が出力されるものとする。   The RGB format image data is converted into YCbCr422 format image data by the color space conversion unit 22 and output as a video signal. Here, it is assumed that a moving image having a predetermined frame rate is output as the video signal.

画像処理装置3に入力するYCbCr422フォーマットの映像信号は、デジタルビデオカメラ2の出力に限られるものではなく、例えば、DVDプレーヤーなど、一般的なコンポジット又はコンポーネント形式のあらゆる映像信号が想定される。また、画像処理装置3に入力するYCbCr422フォーマットの映像信号は、必要に応じて、ビデオデコーダーなどを経由させることによって、アナログYCbCr422フォーマットからデジタルYCbCr422フォーマットに量子化されるものとする。   The video signal in YCbCr422 format input to the image processing device 3 is not limited to the output of the digital video camera 2, and for example, any general composite or component video signal such as a DVD player is assumed. Further, it is assumed that the YCbCr422 format video signal input to the image processing device 3 is quantized from the analog YCbCr422 format to the digital YCbCr422 format via a video decoder or the like as necessary.

画像処理装置3は、1ピクセルごとの輝度データと2ピクセルごとの色差データとからなる原画像を1ピクセルごとの輝度データ及び色差データからなる伸張画像に変換して出力するフォーマット変換装置である。この画像処理装置3では、色空間変換部22からの映像信号を原画像として時系列に処理し、YCbCr444又はRGBフォーマットの画像データを伸張画像として生成する動作が行われる。   The image processing device 3 is a format conversion device that converts an original image composed of luminance data for each pixel and color difference data for every two pixels into an expanded image composed of luminance data and color difference data for each pixel and outputs the converted image. In the image processing apparatus 3, an operation is performed in which the video signal from the color space conversion unit 22 is processed in time series as an original image, and image data in YCbCr444 or RGB format is generated as an expanded image.

ここで、YCbCr444フォーマットの画像データとは、画像上で互いに隣接する2×2=4ピクセル当たりに、4つのYデータと、それぞれ4つのCbデータ及びCrデータによって構成される画像データのことである。   Here, the image data in the YCbCr444 format is image data composed of four Y data and four Cb data and Cr data, respectively, per 2 × 2 = 4 pixels adjacent to each other on the image. .

出力装置5は、映像信号を可視化するための装置であり、画像処理装置3及び解像度変更処理部4からの画像データが処理される。この様な出力装置5としては、映像を画面表示する表示装置、静止画像を用紙に印刷するプリンタなどが用いられる。   The output device 5 is a device for visualizing the video signal, and the image data from the image processing device 3 and the resolution change processing unit 4 is processed. As such an output device 5, a display device that displays an image on a screen, a printer that prints a still image on paper, or the like is used.

解像度変更処理部4は、画像を必要に応じて拡大又は縮小させるための処理装置であり、拡大及び縮小によって画質を低下させないようにするために、画像処理装置によってYCbCr444又はRGBフォーマットに変換された後の画像データが処理される。拡大処理及び縮小処理は、いずれも単位長さあたりの画素数を変更する処理であることから、これらの処理によって解像度を変更することができる。   The resolution change processing unit 4 is a processing device for enlarging or reducing an image as necessary, and has been converted into YCbCr444 or RGB format by the image processing device so as not to deteriorate the image quality due to enlargement and reduction. Later image data is processed. Since both the enlargement process and the reduction process are processes for changing the number of pixels per unit length, the resolution can be changed by these processes.

図2は、図1の画像処理装置3の構成例を示したブロック図である。この画像処理装置3は、処理対象ピクセル抽出部11、輝度変化検知部12、閾値記憶部13,16、第1比較部14、色差変化検知部15、第2比較部17及び色差データ変換部18により構成される。   FIG. 2 is a block diagram illustrating a configuration example of the image processing apparatus 3 of FIG. The image processing device 3 includes a processing target pixel extraction unit 11, a luminance change detection unit 12, threshold storage units 13 and 16, a first comparison unit 14, a color difference change detection unit 15, a second comparison unit 17, and a color difference data conversion unit 18. Consists of.

処理対象ピクセル抽出部11は、画像データのフォーマットを変換するために、原画像から処理対象ピクセルを抽出する動作を行っている。この処理対象ピクセルは、原画像上で共通の色差データが割り当てられた互いに隣接する2つのピクセルである。処理対象ピクセル抽出部11では、映像信号として入力されるYCbCr422フォーマットの画像データが原画像として時系列に処理され、抽出した処理対象ピクセル情報が輝度変化検知部12、色差変化検知部15及び色差データ変換部18へ出力される。   The processing target pixel extraction unit 11 performs an operation of extracting processing target pixels from the original image in order to convert the format of the image data. This processing target pixel is two pixels adjacent to each other to which common color difference data is assigned on the original image. In the processing target pixel extraction unit 11, image data in YCbCr422 format input as a video signal is processed in time series as an original image, and the extracted processing target pixel information is used as the luminance change detection unit 12, the color difference change detection unit 15, and the color difference data. The data is output to the conversion unit 18.

輝度変化検知部12は、処理対象ピクセル内の各ピクセル間における輝度の差分値(変化量)を第1差分として求める動作を行っている。第1比較部14は、この第1差分と、閾値記憶部13に保持されている第1閾値とを比較し、この比較結果を色差データ変換部18へ出力する動作を行っている。   The luminance change detection unit 12 performs an operation of obtaining a luminance difference value (change amount) between the pixels in the processing target pixel as the first difference. The first comparison unit 14 compares the first difference with the first threshold value stored in the threshold value storage unit 13 and outputs the comparison result to the color difference data conversion unit 18.

色差変化検知部15は、処理対象ピクセルに隣接する隣接ピクセルのうち、前ピクセル及び当該処理対象ピクセル間における色差の差分値(変化量)を第2差分として求める動作を行っている。また、色差変化検知部15は、処理対象ピクセルに隣接する隣接ピクセルのうち、後ピクセル及び当該処理対象ピクセル間における色差の差分値を第3差分として求める動作を行っている。   The color difference change detection unit 15 performs an operation of obtaining a difference value (change amount) of a color difference between the previous pixel and the processing target pixel as a second difference among adjacent pixels adjacent to the processing target pixel. In addition, the color difference change detection unit 15 performs an operation of obtaining a difference value of the color difference between the subsequent pixel and the processing target pixel among the adjacent pixels adjacent to the processing target pixel as the third difference.

上記前ピクセル及び後ピクセルは、原画像上で処理対象ピクセル内の各ピクセルの配列方向に隣接する2つのピクセルである。例えば、前ピクセルは、処理対象ピクセルの直前に処理された隣接ピクセルであり、後ピクセルは、処理対象ピクセルの直後に処理される隣接ピクセルとなっている。   The front pixel and the rear pixel are two pixels adjacent in the arrangement direction of each pixel in the processing target pixel on the original image. For example, the front pixel is an adjacent pixel processed immediately before the processing target pixel, and the rear pixel is an adjacent pixel processed immediately after the processing target pixel.

第2比較部17は、第2差分及び第3差分のうち、大きい方の差分値と第2閾値とを比較するとともに、小さい方の差分値と第2閾値よりも小さな第3閾値とを比較し、この比較結果を色差データ変換部18へ出力する動作を行っている。第2閾値及び第3閾値は、いずれも閾値記憶部16内に予め格納されている。   The second comparison unit 17 compares the larger difference value of the second difference and the third difference with the second threshold value, and compares the smaller difference value with a third threshold value smaller than the second threshold value. The comparison result is output to the color difference data conversion unit 18. Both the second threshold value and the third threshold value are stored in advance in the threshold value storage unit 16.

色差データ変換部18は、第1比較部14及び第2比較部17による比較結果に基づいて、処理対象ピクセル内の各ピクセルに新たに割り当てる2つの色差データを生成し、YCbCr444データの色差成分として出力する動作を行っている。処理対象ピクセルに新たに割り当てる2つの色差データは、当該処理対象ピクセルに割り当てられている元の色差データと、前ピクセル及び後ピクセルのいずれかの色差データとに基づいて決定される。なお、YCbCr422データの輝度成分は、YCbCr444データの輝度成分としてそのまま出力される。   The color difference data conversion unit 18 generates two color difference data to be newly assigned to each pixel in the processing target pixel based on the comparison result by the first comparison unit 14 and the second comparison unit 17, and as the color difference component of the YCbCr444 data. The operation to output is performed. The two color difference data newly assigned to the processing target pixel are determined based on the original color difference data assigned to the processing target pixel and the color difference data of one of the previous pixel and the subsequent pixel. Note that the luminance component of the YCbCr422 data is output as it is as the luminance component of the YCbCr444 data.

YCbCr422フォーマットからYCbCr444フォーマットへの画像データの変換は、変化の度合いが大きな色の境界において、Y成分の変化点とCb及びCr成分の変化点とが異なる場合に、色差成分を調整することによって行われる。   Conversion of image data from the YCbCr422 format to the YCbCr444 format is performed by adjusting the color difference component when the change point of the Y component and the change point of the Cb and Cr components are different at the boundary of the color where the degree of change is large. Is called.

色差成分の調整は、次のルール(a)〜(d)に従って行われる。
(a)Y成分については、調整を行わず、入力データをそのまま出力データとして出力する。
(b)調整は、色差成分について行い、Cb成分及びCr成分をそれぞれ個別に独立して調整する。
(c)調整を行うか否かは、Y成分の変化と色差成分の変化との関連性によって判断する。
(d)調整を行う場合には、処理対象ピクセルに新たに割り当てる2つの色差データとして、元の色差データとは異なる色差データを生成する。このとき、新たに割り当てる2つの色差データのうちの一方には、元の色差データ、すなわち、オリジナルデータがそのまま残るようにする。
The adjustment of the color difference component is performed according to the following rules (a) to (d).
(A) The Y component is not adjusted and the input data is output as it is as output data.
(B) Adjustment is performed for the color difference component, and the Cb component and the Cr component are individually adjusted independently.
(C) Whether or not to perform the adjustment is determined based on the relationship between the change in the Y component and the change in the color difference component.
(D) When adjustment is performed, color difference data different from the original color difference data is generated as two color difference data newly assigned to the processing target pixel. At this time, the original color difference data, that is, the original data is left as it is in one of the two newly assigned color difference data.

具体的には、第1差分が第1閾値を上回っており、かつ、第2差分及び第3差分のうちの大きい方の差分値が第2閾値を上回っているとともに、小さい方の差分値が第3閾値以下となっている場合に、処理対象ピクセルに割り当てられている色差データとは異なる色差データが生成される。一方、第1差分が第1閾値以下である場合と、第1差分が第1閾値を上回っていても、第2差分及び第3差分のうちの大きい方の差分値が第2閾値以下であるか、或いは、小さい方の差分値が第3閾値を上回っている場合には、調整を行わず、元の色差データと同じ色差データが生成される。   Specifically, the first difference is greater than the first threshold, and the larger difference value of the second difference and the third difference is greater than the second threshold, and the smaller difference value is When the value is equal to or smaller than the third threshold, color difference data different from the color difference data assigned to the processing target pixel is generated. On the other hand, when the first difference is less than or equal to the first threshold and when the first difference is greater than the first threshold, the larger difference value of the second difference and the third difference is less than or equal to the second threshold. Alternatively, if the smaller difference value exceeds the third threshold value, the same color difference data as the original color difference data is generated without adjustment.

また、調整を行う場合には、前ピクセル及び後ピクセルのうち、処理対象ピクセルとの間で色差の差分値が大きな隣接ピクセルの色差データと、元の色差データとに基づいて、2つの色差データが定められる。すなわち、処理対象ピクセルに新たに割り当てる2つの色差データのうちの一方には、元の色差データがそのまま用いられる。これに対し、2つの色差データのうちの他方の色差データは、前ピクセル及び後ピクセルのうち、処理対象ピクセルとの間で色差の差分値の大きな隣接ピクセルの色差データと元の色差データとから定められる。例えば、隣接ピクセルの色差と元の色差との平均値が2つの色差データのうちの他方の色差データとして出力される。   Further, when adjustment is performed, two color difference data based on the color difference data of an adjacent pixel having a large difference value of the color difference between the previous pixel and the rear pixel and the original color difference data. Is determined. That is, the original color difference data is used as it is for one of the two color difference data newly assigned to the processing target pixel. On the other hand, the other color difference data of the two color difference data is obtained from the color difference data of the adjacent pixel having a large color difference value between the previous pixel and the subsequent pixel and the original color difference data. Determined. For example, the average value of the color difference between adjacent pixels and the original color difference is output as the other color difference data of the two color difference data.

また、処理対象ピクセルとして抽出された各ピクセルに2つの色差データを割り当てる際には、前ピクセル及び後ピクセルのうち、処理対象ピクセルとの間で色差の差分値が大きな隣接ピクセルに隣接するピクセルに対して、元の色差データとは異なる色差データが割り当てられる。すなわち、色差の差分値が大きな隣接ピクセル側のピクセルに対して、元の色差データとは異なる色差データ、ここでは、隣接ピクセルの色差と元の色差との平均値が割り当てられる。これに対し、前ピクセル及び後ピクセルのうち、処理対象ピクセルとの間で色差の差分値が小さな隣接ピクセルに隣接するピクセルに対して、元の色差データが割り当てられる。   In addition, when assigning two color difference data to each pixel extracted as the processing target pixel, the pixel adjacent to the adjacent pixel having a large color difference difference value between the processing target pixel and the previous pixel and the subsequent pixel. On the other hand, color difference data different from the original color difference data is assigned. That is, the color difference data different from the original color difference data, here, the average value of the color difference of the adjacent pixels and the original color difference is assigned to the pixel on the adjacent pixel side where the difference value of the color difference is large. On the other hand, the original color difference data is assigned to a pixel adjacent to an adjacent pixel having a small color difference difference value between the previous pixel and the rear pixel.

図3は、図2の画像処理装置3における動作の一例を示した図であり、処理対象のYCbCr422フォーマットの画像データの流れが示されている。Y成分データは、1ピクセルごとに変化するデータであり、例えば、Y0からY11までのデータがこの順序で時系列に処理される。   FIG. 3 is a diagram showing an example of the operation in the image processing apparatus 3 of FIG. 2, and shows the flow of image data in the YCbCr422 format to be processed. The Y component data is data that changes for each pixel. For example, data from Y0 to Y11 is processed in time order in this order.

これに対し、Cb及びCr成分の色差データは、いずれも2ピクセルごとに変化するデータであり、2つのY成分データに1つの色差データが対応している。   On the other hand, the color difference data of the Cb and Cr components is data that changes every two pixels, and one color difference data corresponds to two Y component data.

この様なYCbCr422フォーマットの画像データをYCbCr444フォーマットの画像データに変換する際には、共通の色差データが割り当てられた2つのピクセルが処理対象として抽出される。そして、抽出された処理対象ピクセルについて、色差データの調整を行うか否かを判断するために、処理対象ピクセルのY成分データ及び色差データと、処理対象ピクセルに隣接する隣接ピクセル(前ピクセル及び後ピクセル)の色差データとが参照される。つまり、処理対象ピクセルと、前ピクセル及び後ピクセルとからなる4ピクセルの区間が色差データの調整区間となっている。   When such image data in the YCbCr422 format is converted into image data in the YCbCr444 format, two pixels to which common color difference data is assigned are extracted as processing targets. Then, for the extracted processing target pixel, in order to determine whether or not to adjust the color difference data, the Y component data and the color difference data of the processing target pixel and the adjacent pixels (the previous pixel and the rear pixel) that are adjacent to the processing target pixel. Pixel) color difference data. That is, a 4-pixel section composed of the processing target pixel, the previous pixel, and the rear pixel is an adjustment section for color difference data.

画像データの変換処理は、処理対象ピクセルを変更するごとに、この様な調整区間を2ピクセルずつずらしながら行われる。ただし、原画像の先頭ピクセル及び最終ピクセルについては、前ピクセル又は後ピクセルが存在しないので、これらの先頭ピクセル又は最終ピクセルが処理対象ピクセルに含まれている場合に限り、先頭ピクセル又は最終ピクセルが続いているものとして扱う。   The image data conversion process is performed while shifting such an adjustment interval by two pixels each time the processing target pixel is changed. However, for the first pixel and the last pixel of the original image, there is no previous pixel or subsequent pixel. Therefore, only when the first pixel or the last pixel is included in the processing target pixel, the first pixel or the last pixel continues. Treat it as

図4は、図2の画像処理装置3における動作の一例を示した図であり、YCbCr422フォーマットからYCbCr444フォーマットへの画像データの変換の様子が示されている。n番目及び(n+1)番目のピクセルが処理対象ピクセルの場合、(n−1)番目のピクセルが前ピクセルであり、(n+2)番目のピクセルが後ピクセルである。そして、(n−1)番目から(n+2)番目のピクセルが調整区間となる。   FIG. 4 is a diagram showing an example of the operation in the image processing apparatus 3 of FIG. 2, and shows how image data is converted from the YCbCr422 format to the YCbCr444 format. When the nth and (n + 1) th pixels are pixels to be processed, the (n−1) th pixel is the previous pixel and the (n + 2) th pixel is the subsequent pixel. The (n−1) th to (n + 2) th pixels are adjustment intervals.

画像データの変換処理では、Y成分データについては入力データがそのまま出力データとして出力されるのに対して、色差データについては、処理対象ピクセルの各ピクセルに新たに割り当てる2つの色差データが生成される。この例では、共通の色差データCb及びCrが割り当てられているn番目及び(n+1)番目のピクセルに対して、それぞれ新たに色差データが割り当てられる。   In the image data conversion processing, input data is output as output data as it is for Y component data, whereas two color difference data newly assigned to each pixel of the processing target pixel is generated for color difference data. . In this example, color difference data is newly assigned to the nth and (n + 1) th pixels to which common color difference data Cb and Cr are assigned.

色差成分の調整を行う場合には、処理対象ピクセルに新たに割り当てる2つの色差データのうち、一方をオリジナルデータ、すなわち、元の色差データとし、他方を元の色差データとは異なる色差データとする調整が行われる。一方、色差成分の調整を行わない場合には、処理対象ピクセルに新たに割り当てる2つの色差データを共に元の色差データとし、元の色差データがそのまま処理対象ピクセルの各ピクセルに割り当てられる。   When adjusting the color difference component, one of the two color difference data newly assigned to the processing target pixel is the original data, that is, the original color difference data, and the other is the color difference data different from the original color difference data. Adjustments are made. On the other hand, when the color difference component is not adjusted, the two color difference data newly assigned to the processing target pixel are used as the original color difference data, and the original color difference data is directly assigned to each pixel of the processing target pixel.

処理対象ピクセルとして抽出された2つのピクセルのいずれにオリジナルデータが割り当てられるかは、処理対象ピクセルと前後の隣接ピクセルとの間における色差の変化量に基づいて決定される。   Which of the two pixels extracted as the processing target pixel is assigned with the original data is determined based on a change amount of the color difference between the processing target pixel and the adjacent pixels before and after the processing target pixel.

また、色差成分の調整を行うか否かは、次の条件(1)及び(2)によって決定される。
(1)処理対象ピクセルの各ピクセル間において、輝度に一定値(第1閾値)を越える変化があること。
(2)処理対象ピクセルと前後の隣接ピクセルとの間における色差の変化量のうち、大きい方の変化量(差分値)が一定値(第2閾値)を越え、かつ、小さい方の変化量が一定値(第3閾値)以下であること。
Whether or not to adjust the color difference component is determined by the following conditions (1) and (2).
(1) There is a change in luminance exceeding a certain value (first threshold value) between the pixels to be processed.
(2) Of the amount of change in color difference between the pixel to be processed and the adjacent pixels before and after, the larger amount of change (difference value) exceeds a certain value (second threshold), and the smaller amount of change is Must be below a certain value (third threshold).

これらの条件(1)及び(2)を両方とも満たす場合に、色差成分の調整が行われる。上記第1閾値としては、例えば、Y成分が、ITU−R BT.601の国際規格に従って、16以上235以下の範囲内の整数として量子化されている場合、又は、8ビットのフルレンジに拡張して0以上255以下の範囲内の整数として量子化されている場合、25程度に定められる。   When both of these conditions (1) and (2) are satisfied, the color difference component is adjusted. As the first threshold, for example, the Y component is ITU-R BT. According to the international standard of 601, when quantized as an integer in the range of 16 to 235, or expanded to an 8-bit full range and quantized as an integer in the range of 0 to 255, It is set to about 25.

また、上記第2閾値及び第3閾値としては、例えば、Cb及びCr成分が、いずれもITU−R BT.601の国際規格に従って、16以上240以下の範囲内の整数として量子化されている場合、又は、8ビットのフルレンジに拡張して0以上255以下の範囲内の整数として量子化されている場合、第2閾値は40程度、第3閾値は10程度に定められる。ただし、第1から第3閾値の各設定値については、必要に応じて調整が可能な構成とする。   Moreover, as said 2nd threshold value and 3rd threshold value, for example, both Cb and Cr components are ITU-R BT. According to the international standard of 601, when quantized as an integer in the range of 16 to 240, or expanded to an 8-bit full range and quantized as an integer in the range of 0 to 255, The second threshold is set to about 40, and the third threshold is set to about 10. However, the setting values of the first to third threshold values can be adjusted as necessary.

図5〜図10は、図2の画像処理装置3における動作の一例を示した図であり、画像データの変換処理の具体例が示されている。図5には、処理対象ピクセルにおける輝度の変化量(差分値)が第1閾値以下である場合が示されている。この例では、処理対象ピクセルのY成分について、n番目のピクセル及び(n+1)番目のピクセルの輝度値が共に100であり、輝度の変化量が0となっている。   5 to 10 are diagrams showing an example of the operation in the image processing apparatus 3 of FIG. 2, and a specific example of the image data conversion process is shown. FIG. 5 shows a case where the amount of change in luminance (difference value) in the processing target pixel is equal to or less than the first threshold value. In this example, for the Y component of the processing target pixel, the luminance values of the nth pixel and the (n + 1) th pixel are both 100, and the luminance change amount is 0.

この様なケースは、条件(1)を満たさず、輝度の変化が小さくて、色の境界が目立たないと考えられることから、色差成分(Cb及びCr)の調整は行わない。   In such a case, the color difference components (Cb and Cr) are not adjusted because the condition (1) is not satisfied, the change in luminance is small, and the color boundary is considered inconspicuous.

図6には、処理対象ピクセルにおける輝度の変化量が第1閾値を越えているが、前後で色差変化が小さい場合が示されている。この例では、処理対象ピクセルのY成分について、n番目のピクセルの輝度値が50であり、(n+1)番目のピクセルの輝度値が150となっている。従って、処理対象ピクセルについて、輝度の変化量は100となっている。   FIG. 6 shows a case where the amount of change in luminance at the processing target pixel exceeds the first threshold, but the color difference change is small before and after. In this example, for the Y component of the pixel to be processed, the luminance value of the nth pixel is 50, and the luminance value of the (n + 1) th pixel is 150. Therefore, the amount of change in luminance is 100 for the processing target pixel.

しかし、処理対象ピクセルと前後の隣接ピクセルとの間における色差の変化量は、共に0であることから、処理対象ピクセルの前後で色差の変化量が小さく、条件(2)を満たさないので、色差成分の調整は行わない。   However, since the change amount of the color difference between the processing target pixel and the adjacent pixels before and after the pixel is both 0, the change amount of the color difference before and after the processing target pixel is small and does not satisfy the condition (2). No component adjustments are made.

図7には、処理対象ピクセルにおける輝度の変化量が第1閾値を越えているが、色差の変化量が前後で同じである場合が示されている。この例では、処理対象ピクセルのY成分について、n番目のピクセルの輝度値が50であり、(n+1)番目のピクセルの輝度値が150となっている。従って、処理対象ピクセルについて、輝度の変化量は100となっている。   FIG. 7 shows a case where the amount of change in luminance at the processing target pixel exceeds the first threshold, but the amount of change in color difference is the same before and after. In this example, for the Y component of the pixel to be processed, the luminance value of the nth pixel is 50, and the luminance value of the (n + 1) th pixel is 150. Therefore, the amount of change in luminance is 100 for the processing target pixel.

しかし、処理対象ピクセルと前後の隣接ピクセルとの間における色差の変化量は、共に25となっている。具体的には、(n−2)番目及び(n−1)番目のピクセルについて色差値が100であり、n番目及び(n+1)番目のピクセルについて色差値が125となっている。また、(n+2)及び(n+3)番目のピクセルについて色差値が150となっており、前後の隣接ピクセルとの色差の変化量は、共に25となっている。このため、色差の変化量が処理対象ピクセルの前後で同じであり、条件(2)を満たさないので、色差成分の調整は行わない。   However, the amount of change in color difference between the pixel to be processed and the adjacent pixels before and after is 25. Specifically, the color difference value is 100 for the (n-2) th and (n-1) th pixels, and the color difference value is 125 for the nth and (n + 1) th pixels. Further, the color difference value is 150 for the (n + 2) and (n + 3) th pixels, and the amount of change in the color difference between the adjacent pixels before and after is 25. For this reason, the change amount of the color difference is the same before and after the pixel to be processed, and the condition (2) is not satisfied, so the color difference component is not adjusted.

図8には、処理対象ピクセルにおける輝度の変化量が第1閾値を越えているが、色差の変化量が前後で同じである場合の他の例が示されている。この例では、処理対象ピクセルのY成分について、n番目のピクセルの輝度値が50であり、(n+1)番目のピクセルの輝度値が150となっている。従って、処理対象ピクセルについて、輝度の変化量は100となっている。   FIG. 8 shows another example in which the amount of change in luminance at the pixel to be processed exceeds the first threshold, but the amount of change in color difference is the same before and after. In this example, for the Y component of the pixel to be processed, the luminance value of the nth pixel is 50, and the luminance value of the (n + 1) th pixel is 150. Therefore, the amount of change in luminance is 100 for the processing target pixel.

しかし、処理対象ピクセルと前後の隣接ピクセルとの間における色差の変化量は、共に50となっている。具体的には、(n−2)番目及び(n−1)番目のピクセルについて色差値が100であり、n番目及び(n+1)番目のピクセルについて色差値が50となっている。また、(n+2)及び(n+3)番目のピクセルについて色差値が100となっており、前後の隣接ピクセルとの色差の変化量は、共に50となっている。このため、色差の変化量が処理対象ピクセルの前後で同じであり、条件(2)を満たさないので、色差成分の調整は行わない。   However, the amount of change in color difference between the pixel to be processed and the adjacent pixels before and after is 50. Specifically, the color difference value is 100 for the (n-2) th and (n-1) th pixels, and the color difference value is 50 for the nth and (n + 1) th pixels. In addition, the color difference value is 100 for the (n + 2) and (n + 3) th pixels, and the amount of change in the color difference between the adjacent pixels before and after is 50. For this reason, the change amount of the color difference is the same before and after the pixel to be processed, and the condition (2) is not satisfied, so the color difference component is not adjusted.

図6〜図7の様なケースでは、色差の変化が一定間隔で段階的であるので、色の境界が目立たないと考えられる。また、図8の様なケースでは、色の境界に輪郭線が存在すると考えられることから、これらのケースでは、色差成分の調整は行わない。   In the cases as shown in FIGS. 6 to 7, since the change in color difference is stepwise at regular intervals, it is considered that the color boundary is inconspicuous. Further, in the case as shown in FIG. 8, since it is considered that an outline exists at the boundary of the color, in these cases, the color difference component is not adjusted.

図9には、処理対象ピクセルにおける輝度の変化量が第1閾値を越えており、しかも色差の変化量が条件(2)を満たす場合が示されている。この例では、処理対象ピクセルのY成分について、n番目のピクセルの輝度値が50であり、(n+1)番目のピクセルの輝度値が150となっている。従って、処理対象ピクセルについて、輝度の変化量は100となっている。   FIG. 9 shows a case where the amount of change in luminance at the processing target pixel exceeds the first threshold and the amount of change in color difference satisfies the condition (2). In this example, for the Y component of the pixel to be processed, the luminance value of the nth pixel is 50, and the luminance value of the (n + 1) th pixel is 150. Therefore, the amount of change in luminance is 100 for the processing target pixel.

しかも、処理対象ピクセルと前後の隣接ピクセルとの間における色差の変化量は、一方が0であり、他方が50となっている。具体的には、(n−2)番目及び(n−1)番目のピクセルについて色差値が100であり、n番目及び(n+1)番目のピクセルについて色差値が100となっている。また、(n+2)及び(n+3)番目のピクセルについて色差値が150となっており、前ピクセルとの色差の変化量が0であるのに対して、後ピクセルとの色差の変化量は50となっている。   In addition, the amount of change in color difference between the processing target pixel and the adjacent pixels before and after the pixel is 0 on one side and 50 on the other side. Specifically, the color difference value is 100 for the (n-2) th and (n-1) th pixels, and the color difference value is 100 for the nth and (n + 1) th pixels. The color difference value is 150 for the (n + 2) and (n + 3) th pixels, and the change amount of the color difference from the previous pixel is 0, whereas the change amount of the color difference from the subsequent pixel is 50. It has become.

この様なケースは、条件(1)及び(2)を満たすので、色差成分の調整が行われる。色差成分の調整を行う場合、処理対象ピクセルの2つのピクセルのうちの一方には、オリジナルデータが割り当てられる。一方、他方には、前ピクセル及び後ピクセルのうち、処理対象ピクセルとの間で色差の差分値の大きな隣接ピクセルの色差値と処理対象ピクセルの色差値との平均値が割り当てられる。   In such a case, since the conditions (1) and (2) are satisfied, the color difference component is adjusted. When the color difference component is adjusted, original data is assigned to one of the two pixels to be processed. On the other hand, the average value of the color difference value of the adjacent pixel and the color difference value of the processing target pixel, which have a large difference value of the color difference between the previous pixel and the rear pixel, is assigned to the other pixel.

隣接ピクセルの色差値と処理対象ピクセルの色差値との平均値を割り当てるピクセルは、前ピクセル及び後ピクセルのうち、処理対象ピクセルとの間で色差の差分値が大きな隣接ピクセルに隣接するピクセルとなっている。   The pixel to which the average value of the color difference value of the adjacent pixel and the color difference value of the processing target pixel is assigned is a pixel adjacent to the adjacent pixel having a large color difference value between the previous pixel and the subsequent pixel. ing.

すなわち、処理対象ピクセルの色差値と、前後の隣接ピクセルの色差値とを比較し、処理対象ピクセルの色差値が前後の隣接ピクセルのいずれに近いかを判断する。そして、前ピクセルの色差値に近い場合には、当該前ピクセルに隣接している処理対象ピクセルにはオリジナルデータを割り当て、後ピクセルに隣接する処理対象ピクセルには平均値を割り当てる。一方、後ピクセルの色差値に近い場合には、当該後ピクセルに隣接している処理対象ピクセルにはオリジナルデータを割り当て、前ピクセルに隣接する処理対象ピクセルには平均値を割り当てる。   That is, the color difference value of the processing target pixel is compared with the color difference values of the adjacent pixels before and after, and it is determined which of the adjacent pixels before and after the color difference value of the processing target pixel is close. If the color difference value of the previous pixel is close, the original data is assigned to the processing target pixel adjacent to the previous pixel, and the average value is assigned to the processing target pixel adjacent to the subsequent pixel. On the other hand, when it is close to the color difference value of the subsequent pixel, the original data is assigned to the processing target pixel adjacent to the subsequent pixel, and the average value is assigned to the processing target pixel adjacent to the previous pixel.

図9では、処理対象ピクセルの色差値が前ピクセルの色差値に近くなっており、前ピクセルに隣接している処理対象ピクセルにはオリジナルデータ100が割り当てられ、後ピクセルに隣接する処理対象ピクセルには平均値125が割り当てられている。   In FIG. 9, the color difference value of the processing target pixel is close to the color difference value of the previous pixel, the original data 100 is assigned to the processing target pixel adjacent to the previous pixel, and the processing target pixel adjacent to the subsequent pixel is assigned. Is assigned an average value of 125.

図10には、処理対象ピクセルにおける輝度の変化量が第1閾値を越えており、しかも色差の変化量が条件(2)を満たす場合の他の例が示されている。この例では、処理対象ピクセルのY成分について、n番目のピクセルの輝度値が50であり、(n+1)番目のピクセルの輝度値が150となっている。従って、処理対象ピクセルについて、輝度の変化量は100となっている。   FIG. 10 shows another example in which the amount of change in luminance at the processing target pixel exceeds the first threshold and the amount of change in color difference satisfies the condition (2). In this example, for the Y component of the pixel to be processed, the luminance value of the nth pixel is 50, and the luminance value of the (n + 1) th pixel is 150. Therefore, the amount of change in luminance is 100 for the processing target pixel.

しかも、処理対象ピクセルと前後の隣接ピクセルとの間における色差の変化量は、一方が50であり、他方が0となっている。具体的には、(n−2)番目及び(n−1)番目のピクセルについて色差値が100であり、n番目及び(n+1)番目のピクセルについて色差値が150となっている。また、(n+2)及び(n+3)番目のピクセルについて色差値が150となっており、前ピクセルとの色差の変化量が50であるのに対して、後ピクセルとの色差の変化量は0となっている。   Moreover, the amount of change in the color difference between the processing target pixel and the adjacent pixels before and after is 50 for one and 0 for the other. Specifically, the color difference value is 100 for the (n-2) th and (n-1) th pixels, and the color difference value is 150 for the nth and (n + 1) th pixels. Further, the color difference value is 150 for the (n + 2) and (n + 3) th pixels, and the change amount of the color difference from the previous pixel is 50, whereas the change amount of the color difference from the subsequent pixel is 0. It has become.

この様なケースは、条件(1)及び(2)を満たすので、色差成分の調整が行われる。色差成分の調整を行う場合、処理対象ピクセルの2つのピクセルのうちの一方には、オリジナルデータが割り当てられる。一方、他方には、前ピクセル及び後ピクセルのうち、処理対象ピクセルとの間で色差の差分値の大きな隣接ピクセルの色差値と処理対象ピクセルの色差値との平均値が割り当てられる。   In such a case, since the conditions (1) and (2) are satisfied, the color difference component is adjusted. When the color difference component is adjusted, original data is assigned to one of the two pixels to be processed. On the other hand, the average value of the color difference value of the adjacent pixel and the color difference value of the processing target pixel, which have a large difference value of the color difference between the previous pixel and the rear pixel, is assigned to the other pixel.

隣接ピクセルの色差値と処理対象ピクセルの色差値との平均値を割り当てるピクセルは、前ピクセル及び後ピクセルのうち、処理対象ピクセルとの間で色差の差分値が大きな隣接ピクセルに隣接するピクセルとなっている。   The pixel to which the average value of the color difference value of the adjacent pixel and the color difference value of the processing target pixel is assigned is a pixel adjacent to the adjacent pixel having a large color difference value between the previous pixel and the subsequent pixel. ing.

図10では、処理対象ピクセルの色差値が後ピクセルの色差値に近くなっており、後ピクセルに隣接している処理対象ピクセルにはオリジナルデータ150が割り当てられ、前ピクセルに隣接する処理対象ピクセルには平均値125が割り当てられている。   In FIG. 10, the color difference value of the processing target pixel is close to the color difference value of the subsequent pixel, the original data 150 is assigned to the processing target pixel adjacent to the subsequent pixel, and the processing target pixel adjacent to the previous pixel is assigned. Is assigned an average value of 125.

本実施の形態によれば、処理対象ピクセルについて、輝度が大きく変化しているか否かと、前後のピクセルとの間で色差が大きく変化しているか否かとに応じて新たに割り当てる色差データを生成することができる。特に、処理対象ピクセルについて、輝度が大きく変化し、かつ、色差が前後のピクセルの一方に対してだけ大きく変化している場合に、新たに割り当てる色差データを元の色差データと異ならせることができる。これにより、輝度の変化点付近における色差の変化を平滑化できるので、変化の度合いが大きな色の境界付近で色のにじみが発生するのを抑制することができる。   According to the present embodiment, the color difference data to be newly assigned is generated for the processing target pixel depending on whether or not the luminance has changed greatly and whether or not the color difference has changed greatly between the previous and subsequent pixels. be able to. In particular, when the luminance of the pixel to be processed is greatly changed and the color difference is greatly changed only with respect to one of the preceding and succeeding pixels, the newly assigned color difference data can be made different from the original color difference data. . As a result, the color difference change in the vicinity of the luminance change point can be smoothed, so that it is possible to suppress the occurrence of color blurring near the color boundary where the degree of change is large.

また、処理対象ピクセルに元の色差データと異なるデータを割り当てる場合に、新たに割り当てる2つの色差データのうちの一方が元の色差データであるので、原画像における色差データからのずれが後で処理されるピクセルほど大きくなるのを抑制することができる。   Further, when data different from the original color difference data is assigned to the processing target pixel, since one of the two newly assigned color difference data is the original color difference data, the deviation from the color difference data in the original image is processed later. It is possible to suppress an increase in the size of a pixel to be made.

なお、本実施の形態では、処理対象ピクセルと隣接ピクセルとの間における色差の変化量を前ピクセル及び後ピクセルについてそれぞれ閾値と比較することによって色差成分の調整を行うか否かが決定される場合の例について説明したが、本発明はこれに限られるものではない。例えば、処理対象ピクセルと前後の隣接ピクセルとの間における色差の変化量を前ピクセル及び後ピクセル間で直接に比較し、この比較結果に基づいて色差成分の調整を行うか否かを決定しても良い。   In this embodiment, it is determined whether or not to adjust the color difference component by comparing the change amount of the color difference between the processing target pixel and the adjacent pixel with the threshold value for each of the previous pixel and the subsequent pixel. However, the present invention is not limited to this example. For example, the change amount of the color difference between the processing target pixel and the adjacent pixels before and after is directly compared between the previous pixel and the subsequent pixel, and it is determined whether or not to adjust the color difference component based on the comparison result. Also good.

本発明の実施の形態による画像処理装置を含む画像処理システム1の一構成例を示したシステム図である。1 is a system diagram showing a configuration example of an image processing system 1 including an image processing apparatus according to an embodiment of the present invention. 図1の画像処理装置3の構成例を示したブロック図である。FIG. 2 is a block diagram illustrating a configuration example of the image processing apparatus 3 in FIG. 1. 図2の画像処理装置3における動作の一例を示した図であり、処理対象のYCbCr422フォーマットの画像データの流れが示されている。FIG. 3 is a diagram illustrating an example of an operation in the image processing apparatus 3 in FIG. 2, and illustrates a flow of image data in a YCbCr422 format to be processed. 図2の画像処理装置3における動作の一例を示した図であり、YCbCr444フォーマットへの画像データの変換の様子が示されている。FIG. 4 is a diagram illustrating an example of an operation in the image processing apparatus 3 in FIG. 2, and illustrates how image data is converted into the YCbCr444 format. 図2の画像処理装置3における動作の一例を示した図であり、処理対象ピクセルにおける輝度の変化量(差分値)が第1閾値以下である場合が示されている。FIG. 3 is a diagram illustrating an example of an operation in the image processing apparatus 3 in FIG. 2, and illustrates a case where the amount of change in luminance (difference value) in the processing target pixel is equal to or less than a first threshold value. 図2の画像処理装置3における動作の一例を示した図であり、輝度の変化量が第1閾値を越えているが、前後で色差変化が小さい場合が示されている。FIG. 3 is a diagram illustrating an example of an operation in the image processing apparatus 3 of FIG. 2, in which the amount of change in luminance exceeds a first threshold value but the change in color difference between before and after is small. 図2の画像処理装置3における動作の一例を示した図であり、輝度の変化量が第1閾値を越えているが、色差の変化量が前後で同じである場合が示されている。FIG. 3 is a diagram illustrating an example of an operation in the image processing apparatus 3 of FIG. 2, in which the change amount of luminance exceeds the first threshold value, but the change amount of color difference is the same before and after. 図2の画像処理装置3における動作の一例を示した図であり、色差の変化量が前後で同じである場合の他の例が示されている。It is the figure which showed an example of the operation | movement in the image processing apparatus 3 of FIG. 2, and the other example in case the variation | change_quantity of a color difference is the same before and behind is shown. 図2の画像処理装置3における動作の一例を示した図であり、輝度の変化量が第1閾値を越え、しかも色差の変化量が条件(2)を満たす場合が示されている。FIG. 5 is a diagram illustrating an example of an operation in the image processing apparatus 3 of FIG. 2, and illustrates a case where the amount of change in luminance exceeds the first threshold and the amount of change in color difference satisfies the condition (2). 図2の画像処理装置3における動作の一例を示した図であり、色差の変化量が条件(2)を満たす場合の他の例が示されている。It is a figure showing an example of operation in image processing device 3 of Drawing 2, and other examples in case the amount of change of color difference fulfills condition (2) are shown.

符号の説明Explanation of symbols

1 画像処理システム
2 デジタルビデオカメラ
3 画像処理装置
4 解像度変更処理部
5 出力装置
11 処理対象ピクセル抽出部
12 輝度変化検知部
13,16 閾値記憶部
14 第1比較部
15 色差変化検知部
17 第2比較部
18 色差データ変換部
DESCRIPTION OF SYMBOLS 1 Image processing system 2 Digital video camera 3 Image processing apparatus 4 Resolution change process part 5 Output device 11 Processing object pixel extraction part 12 Luminance change detection part 13, 16 Threshold storage part 14 1st comparison part 15 Color difference change detection part 17 2nd Comparison unit 18 Color difference data conversion unit

Claims (6)

1ピクセルごとの輝度データ及び2ピクセルごとの色差データからなる原画像を1ピクセルごとの輝度データ及び色差データからなる伸張画像に変換して出力する画像処理装置において、
上記原画像上で共通の色差データが割り当てられた互いに隣接する2つのピクセルを処理対象ピクセルとして抽出する処理対象ピクセル抽出部と、
上記処理対象ピクセル内の各ピクセル間における輝度の差分値を第1差分として求める輝度変化検知部と、
第1差分及び第1閾値を比較する第1比較部と、
第1比較部による比較結果、及び、上記処理対象ピクセルに隣接する隣接ピクセルのうち、上記原画像上で上記処理対象ピクセル内の各ピクセルの配列方向に隣接する前ピクセル及び後ピクセルの色差データに基づいて、上記処理対象ピクセル内の各ピクセルに新たに割り当てる2つの色差データを生成する色差データ変換部とを備えたことを特徴とする画像処理装置。
In an image processing apparatus for converting an original image composed of luminance data for each pixel and color difference data for every two pixels into an expanded image composed of luminance data and color difference data for each pixel and outputting the same,
A processing target pixel extraction unit that extracts two adjacent pixels assigned common color difference data on the original image as processing target pixels;
A luminance change detection unit that obtains a luminance difference value between the pixels in the processing target pixel as a first difference;
A first comparison unit for comparing the first difference and the first threshold;
The comparison result by the first comparison unit and the color difference data of the previous pixel and the subsequent pixel adjacent in the arrangement direction of each pixel in the processing target pixel on the original image among the adjacent pixels adjacent to the processing target pixel. An image processing apparatus comprising: a color difference data conversion unit that generates two color difference data newly assigned to each pixel in the processing target pixel.
上記前ピクセル及び上記処理対象ピクセル間における色差の差分値を第2差分として求めるとともに、上記後ピクセル及び上記処理対象ピクセル間における色差の差分値を第3差分として求める色差変化検知部と、
第2差分及び第3差分のうち、大きい方の差分値と第2閾値とを比較するとともに、小さい方の差分値と第2閾値よりも小さな第3閾値とを比較する第2比較部とを備え、
上記色差データ変換部が、第1比較部及び第2比較部による比較結果に基づいて、上記2つの色差データを生成することを特徴とする請求項1に記載の画像処理装置。
A color difference change detection unit that obtains a difference value of a color difference between the previous pixel and the processing target pixel as a second difference and obtains a difference value of the color difference between the rear pixel and the processing target pixel as a third difference;
Of the second difference and the third difference, a larger difference value and the second threshold value are compared, and a second comparison unit that compares the smaller difference value and the third threshold value that is smaller than the second threshold value. Prepared,
The image processing apparatus according to claim 1, wherein the color difference data conversion unit generates the two color difference data based on a comparison result by the first comparison unit and the second comparison unit.
上記色差データ変換部は、上記処理対象ピクセルに割り当てられている色差データと、上記前ピクセル及び上記後ピクセルのうち、上記処理対象ピクセルとの間で色差の差分値が大きな隣接ピクセルの色差データとから上記2つの色差データを生成することを特徴とする請求項1又は2に記載の画像処理装置。   The color difference data conversion unit includes color difference data allocated to the processing target pixel, and color difference data of an adjacent pixel having a large color difference difference value between the processing target pixel and the previous pixel and the rear pixel. The image processing apparatus according to claim 1, wherein the two color difference data are generated from the image data. 上記色差データ変換部は、第1差分が第1閾値を上回っており、かつ、上記大きい方の差分値が第2閾値を上回っているとともに、上記小さい方の差分値が第3閾値以下となっている場合に、上記処理対象ピクセルに割り当てられている色差データとは異なるデータを上記2つの色差データとして生成することを特徴とする請求項2に記載の画像処理装置。   In the color difference data converting unit, the first difference exceeds the first threshold, the larger difference value exceeds the second threshold, and the smaller difference value becomes equal to or less than the third threshold. 3. The image processing apparatus according to claim 2, wherein, when the data is different from the color difference data assigned to the processing target pixel, the image processing apparatus generates data as the two color difference data. 上記2つの色差データのうちの一方が、上記処理対象ピクセルに割り当てられている元の色差データであることを特徴とする請求項1又は2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein one of the two color difference data is original color difference data assigned to the processing target pixel. 上記色差データ変換部は、上記処理対象ピクセル内の各ピクセルに上記2つの色差データを割り当てる際に、上記前ピクセル及び上記後ピクセルのうち、上記処理対象ピクセルとの間で色差の差分値が小さな隣接ピクセルに隣接するピクセルに対して、上記元の色差データを割り当てることを特徴とする請求項5に記載の画像処理装置。   When assigning the two color difference data to each pixel in the processing target pixel, the color difference data conversion unit has a small color difference difference value between the processing target pixel and the previous pixel and the rear pixel. 6. The image processing apparatus according to claim 5, wherein the original color difference data is assigned to a pixel adjacent to an adjacent pixel.
JP2008072287A 2008-03-19 2008-03-19 Image processor Pending JP2009231965A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008072287A JP2009231965A (en) 2008-03-19 2008-03-19 Image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008072287A JP2009231965A (en) 2008-03-19 2008-03-19 Image processor

Publications (1)

Publication Number Publication Date
JP2009231965A true JP2009231965A (en) 2009-10-08

Family

ID=41246917

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008072287A Pending JP2009231965A (en) 2008-03-19 2008-03-19 Image processor

Country Status (1)

Country Link
JP (1) JP2009231965A (en)

Similar Documents

Publication Publication Date Title
JP5451782B2 (en) Image processing apparatus and image processing method
JP5591261B2 (en) Image processing device
JP2931520B2 (en) Color separation circuit for single-chip color video camera
JP4290193B2 (en) Image processing device
JP6087612B2 (en) Image processing apparatus and image processing method
JP2010141663A (en) Imaging device
JP2011171885A (en) Image processing apparatus and image processing method
JP2008060814A (en) Imaging apparatus
JP2010206776A (en) Image capture apparatus, method of controlling the same and program
JP5012493B2 (en) VIDEO OUTPUT DEVICE, VIDEO OUTPUT METHOD, VIDEO OUTPUT PROGRAM, VIDEO PROCESSING SYSTEM, VIDEO PROCESSING DEVICE, VIDEO PROCESSING METHOD, AND VIDEO PROCESSING PROGRAM
WO2017154293A1 (en) Image processing apparatus, imaging apparatus, image processing method, and program
KR100700017B1 (en) Apparatus for color interpolation by using adjustable threshold
WO2014034182A1 (en) Image processing method
JP4734032B2 (en) Image processing device
JP2009231965A (en) Image processor
JP6200687B2 (en) Image processing apparatus and image processing method
JP5457687B2 (en) Color camera and noise removal method
US9013606B2 (en) Image processing apparatus and control method thereof
WO2021192096A1 (en) Image processing device, image processing method, and image processing program
JP4471748B2 (en) Image signal processing device
JP6478482B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
JP5775413B2 (en) Image processing apparatus, image processing method, and program
JP2017091044A (en) Image processing device and image processing method
JP2014086957A (en) Image processing device and image processing method
JP4889391B2 (en) Image processing apparatus and image processing method