JP2008271259A - Image processor, image processing method, image processing program and recording medium which records the program - Google Patents
Image processor, image processing method, image processing program and recording medium which records the program Download PDFInfo
- Publication number
- JP2008271259A JP2008271259A JP2007112356A JP2007112356A JP2008271259A JP 2008271259 A JP2008271259 A JP 2008271259A JP 2007112356 A JP2007112356 A JP 2007112356A JP 2007112356 A JP2007112356 A JP 2007112356A JP 2008271259 A JP2008271259 A JP 2008271259A
- Authority
- JP
- Japan
- Prior art keywords
- correction
- value
- pixel
- image processing
- maximum value
- 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
Links
Images
Landscapes
- Picture Signal Circuits (AREA)
- Editing Of Facsimile Originals (AREA)
- Control Of Indicators Other Than Cathode Ray Tubes (AREA)
- Controls And Circuits For Display Device (AREA)
- Image Processing (AREA)
Abstract
Description
本発明は、画像を拡大または縮小するスケーリング処理を用いた画像処理装置、画像処理方法、画像処理プログラム、および該プログラムを記録した記録媒体に関する。 The present invention relates to an image processing apparatus, an image processing method, an image processing program, and a recording medium storing the program using a scaling process for enlarging or reducing an image.
近年、HD(high definition)映像などの高画質かつ高精度の映像を表示できる高解像度の液晶モニタおよび液晶テレビが急速に普及し、表示デバイスの高解像度化が進んでいる。一方、SD(standard definition)映像などの低解像度コンテンツも未だ多く残されており、低解像度コンテンツを高解像度デバイスに表示することも少なくない。 In recent years, high-resolution liquid crystal monitors and liquid crystal televisions that can display high-definition and high-definition images such as HD (high definition) images have rapidly spread, and display devices have been increased in resolution. On the other hand, there are still many low resolution contents such as SD (standard definition) video, and low resolution contents are often displayed on a high resolution device.
しかし、低解像度コンテンツを高解像度デバイスによって表示するには、低解像度コンテンツを拡大表示する必要があり、画像の鮮鋭度、特に拡大した画像の輪郭部分の鮮鋭度が著しく低下してしまう。したがって、低解像度コンテンツを高解像度デバイスに表示する場合には、拡大した画像の鮮鋭度の低下を改善するために、輪郭強調処理を施している。 However, in order to display low-resolution content by a high-resolution device, it is necessary to enlarge and display the low-resolution content, and the sharpness of the image, particularly the sharpness of the contour portion of the enlarged image, is significantly reduced. Therefore, when low-resolution content is displayed on a high-resolution device, contour enhancement processing is performed in order to improve the reduction in sharpness of the enlarged image.
非特許文献1には、ハイパスフィルタを用いた輪郭強調処理技術が開示されている。上記技術を具体的に説明すると、ハイパスフィルタを用いて輪郭部分を抽出した信号を生成し、これを元信号に加算することによって輪郭部分の信号を増大させた信号を生成する技術である。これによって、輪郭部分の濃度変化を強調できるため、原画像と比較して処理後の画像の鮮鋭度が向上したように見える。
Non-Patent
しかし、特許文献1に記載の輪郭強調処理技術は、図12に示すように、原画像にはないアンダーシュートおよびオーバーシュートが形成されてしまい、輪郭強調処理後の画像が不自然に見える部分が生じる。図12は、従来の輪郭補正処理における補正前の画像データにおける輝度グラフおよび補正後の画像データにおける輝度グラフを示す図である。
However, in the edge enhancement processing technique described in
また、画像全体を一律に処理するため、字幕またはテロップ部分などの元々急峻な輪郭部分に合わせて処理された場合には、背景部分の処理度合いが微小となり、鮮鋭度がほとんど向上せず、風景などの緩慢な輪郭部分を強調する場合には、元々急峻な輪郭部分がさらに鮮鋭となり、ぎらついた映像となる問題が生じる。この他にも、ノイズ部分も強調されることによって、逆に画質が悪くなる問題も有している。 In addition, since the entire image is processed uniformly, when it is processed according to the originally steep outline part such as subtitles or telop part, the processing degree of the background part becomes minute, the sharpness is hardly improved, and the landscape In the case of emphasizing a sluggish contour portion, the originally steep contour portion is further sharpened, resulting in a problem of a glaring image. In addition to this, there is also a problem that the image quality is worsened by emphasizing the noise part.
非特許文献2および3には、上記の問題を解決するために、一律に輪郭強調処理を施すのではなく、輪郭部分を検出し、処理領域を選択することによって画像を補正する画像処理技術が開示されている。以下に、上記技術を具体的に説明する。まず、検出したい輪郭幅(輪郭)ごとにあらかじめ容易した階調の遷移パターンと入力画素とを比較することによって輪郭を抽出する。そして、抽出した輪郭における補正対象画素周辺を、あらかじめ定められた倍率制御パターンによりスケーリングすることによって検出した輪郭を補正する。
これによって、字幕またはテロップ部分などを輪郭補正(以下、単に補正とも称する)処理によって鮮明にさせつつ、微小振幅などのノイズ部分には輪郭補正処理を施さない処理を実現できる。 As a result, it is possible to realize a process in which the caption correction process is not performed on a noise portion such as a minute amplitude while the subtitle or the telop portion is sharpened by the contour correction (hereinafter also simply referred to as correction) processing.
また、非特許文献1に記載の技術のようにアンダーシュートおよびオーバーシュートを付加する処理方法を用いて処理せず、スケーリング技術を用いて処理するため、処理後の画像にシュートが生じる問題を解消できる。
しかし、非特許文献2および3に記載の技術では、輪郭幅の検出には、あらかじめ用意した階調の遷移パターンと入力画素とを比較する必要があるため、輪郭幅に応じて階調の遷移パターンを多数用意する必要がある。したがって、上記の技術をハード化する場合、または画像処理装置をソフトにより制御する場合には、非常に多量のリソースを必要とする。また、あらかじめ用意されている階調の遷移パターンに輪郭幅があてはまらない場合には、アルゴリズムが破綻してしまうおそれがある。
However, in the techniques described in
さらには、上記技術では、周波数成分に対して低域成分または高域成分を検出するための閾値を設けることによって、輪郭部の誤検出の発生する領域を判別している。これによって、誤検出であると判別された場合、上記技術では、輪郭補正を抑制するようにスケーリングの倍率を調整している。しかし、上記技術では、閾値付近の補正倍率の制御に関しては何ら考慮していない。したがって、上記技術における閾値制御では、閾値付近の輪郭部分において、同じ輪郭部分であるにも関わらず、補正される部分と補正されない部分とが生じ、補正後の画像において、画質の劣化が引き起こされるおそれがある。 Furthermore, in the above-described technique, a region for detecting a low frequency component or a high frequency component with respect to a frequency component is provided to determine a region where an erroneous detection of a contour portion occurs. Thus, when it is determined that the detection is erroneous, the above technique adjusts the scaling factor so as to suppress the contour correction. However, in the above technique, no consideration is given to the control of the correction magnification near the threshold. Therefore, in the threshold value control in the above technique, in the contour portion near the threshold value, a corrected portion and a non-corrected portion are generated even though the contour portion is the same, and the image quality is deteriorated in the corrected image. There is a fear.
本発明は、上記問題に鑑みたものであり、その主たる目的は、輪郭幅に応じた階調の遷移パターンをあらかじめ用意することなく、補正対象画像(原画像)におけるエッジ領域を検出し、必要なリソースの量を低減するとともに、エッジ領域を検出できずにアルゴリズムが破綻してしまうことを防止する画像処理装置を提供することである。 The present invention has been made in view of the above problems, and its main purpose is to detect an edge region in a correction target image (original image) without preparing a gradation transition pattern corresponding to the contour width in advance, and is necessary. An image processing apparatus that reduces the amount of resources and prevents an algorithm from failing because an edge region cannot be detected.
本発明に係る画像処理装置は、上記課題を解決するために、原画像の画像データを、所定の補正割合を用いたスケーリング処理によって補正する補正手段を備えた画像処理装置であって、上記画像データにおいて隣接する画素間の輝度値の差分の符号が変化した直前の画素から、次に変化する直前の画素までが3画素以上である区間を、エッジ領域として検出するエッジ領域検出手段と、上記エッジ領域を構成する画素の輝度値の最大値と最小値との差分値である全体差分値が予め定められた閾値以上である場合に、上記エッジ領域を上記補正手段による補正対象領域として設定する補正対象領域設定手段と、を備えていることを特徴としている。 In order to solve the above-described problem, an image processing apparatus according to the present invention is an image processing apparatus including a correction unit that corrects image data of an original image by a scaling process using a predetermined correction ratio. An edge area detecting means for detecting, as an edge area, a section having three or more pixels from the pixel immediately before the sign of the difference in luminance value between adjacent pixels in the data to the pixel immediately before the next change; The edge region is set as a correction target region by the correction unit when the overall difference value, which is the difference value between the maximum value and the minimum value of the luminance values of the pixels constituting the edge region, is equal to or greater than a predetermined threshold value. And a correction target area setting means.
上記の構成によれば、画像処理装置は、隣接した画素における輝度値の差分の符号が変化した直前の画素から、次に変化するまでが3画素以上である区間をエッジ領域として検出する。そして、検出したエッジ領域を構成する画素の輝度値の最大値と最小値の差分値、すなわち全体差分値を算出する。当該全体差分値が閾値以上である場合、画像処理装置は、検出したエッジ領域を補正対象であると判定する。 According to the above configuration, the image processing apparatus detects, as an edge region, a section in which there are three or more pixels until the next change from the pixel immediately before the sign of the difference in luminance value between adjacent pixels changes. Then, a difference value between the maximum value and the minimum value of the luminance values of the pixels constituting the detected edge region, that is, an overall difference value is calculated. If the overall difference value is equal to or greater than the threshold value, the image processing apparatus determines that the detected edge region is a correction target.
これによって、画像処理装置は、あらかじめ輪郭幅に応じた階調の遷移パターンを用意することなく、原画像の画像データにおけるエッジ領域を検出できる。したがって、画像処理装置において必要なリソースの量を低減するとともに、エッジ領域を検出できずにアルゴリズムが破綻してしまうことを防止できる効果を奏する。 As a result, the image processing apparatus can detect an edge region in the image data of the original image without preparing a transition pattern having a gradation corresponding to the contour width in advance. Therefore, it is possible to reduce the amount of resources required in the image processing apparatus and to prevent the algorithm from failing because the edge region cannot be detected.
また、本発明に係る画像処理装置では、さらに、上記全体差分値に基づく値を、上記補正対象領域に対する補正割合として設定する補正割合設定手段をさらに備えていることが好ましい。 The image processing apparatus according to the present invention preferably further includes a correction ratio setting means for setting a value based on the overall difference value as a correction ratio for the correction target area.
上記の構成によれば、算出した全体差分値を、補正対象領域であるか否かを判定するパラメータとしてだけでなく、補正割合を設定するためのパラメータとして用いることができる。すなわち、補正割合を、算出した全体差分値の値に応じた値として設定できる。これによって、閾値付近の補正対象領域においても画質の劣化を引き起こさないように補正割合を設定できる効果を奏する。 According to the above configuration, the calculated overall difference value can be used not only as a parameter for determining whether or not it is a correction target region, but also as a parameter for setting a correction ratio. That is, the correction ratio can be set as a value corresponding to the calculated overall difference value. As a result, the correction ratio can be set so as not to cause deterioration of the image quality even in the correction target region near the threshold value.
また、本発明に係る画像処理装置では、さらに、上記画像データにおいて隣接する各画素間の輝度値の差分値である部分差分値のうち最大値を算出する部分差分最大値算出手段をさらに備えており、上記補正対象領域設定手段は、上記部分差分値の最大値が予め定められた閾値以上である場合に、上記エッジ領域を上記補正対象領域として設定し、上記補正割合設定手段は、上記部分差分値の最大値が予め定められた閾値以上である場合に、上記部分差分値の最大値に基づく値を、上記補正対象領域に対する上記補正割合として設定することが好ましい。 Further, the image processing apparatus according to the present invention further includes partial difference maximum value calculation means for calculating a maximum value among partial difference values that are difference values of luminance values between adjacent pixels in the image data. The correction target area setting means sets the edge area as the correction target area when the maximum value of the partial difference values is equal to or greater than a predetermined threshold, and the correction ratio setting means When the maximum difference value is equal to or greater than a predetermined threshold value, it is preferable to set a value based on the maximum value of the partial difference value as the correction ratio with respect to the correction target region.
上記の構成によれば、補正対象であるエッジ領域から、エッジ領域内に急峻な区間を有しておらず、補正する必要がないエッジ領域を除去できる効果を奏する。 According to the above configuration, there is an effect that an edge region that does not have a steep section in the edge region and does not need to be corrected can be removed from the edge region to be corrected.
また、検出したエッジ領域における最も急峻な部分を検出し、その部分を中心に補正することによって、検出したエッジ領域に、より鮮鋭感のある画像となる補正を施すことができる効果を奏する。 Further, by detecting the steepest portion in the detected edge region and correcting the detected portion as the center, the detected edge region can be corrected to give a sharper image.
また、本発明に係る画像処理装置では、さらに、上記画像データにおいて隣接する各画素間の輝度値の差分値である部分差分値のうち最大値を算出する部分差分最大値算出手段と、上記部分差分値の最大値に基づいて、上記補正対象領域を構成する画素の上記補正対象領域における位置を検出する位置検出手段と、をさらに備えており、上記補正割合設定手段は、上記部分差分値の最大値が予め定められた閾値以上である場合に、上記位置に基づく値を、上記補正対象領域を構成する画素の補正に用いる上記補正割合として設定することが好ましい。 The image processing apparatus according to the present invention further includes a partial difference maximum value calculating unit that calculates a maximum value among partial difference values that are difference values of luminance values between adjacent pixels in the image data; Position detection means for detecting the position of the pixel constituting the correction target area in the correction target area based on the maximum difference value, and the correction ratio setting means When the maximum value is equal to or greater than a predetermined threshold, it is preferable to set the value based on the position as the correction ratio used for correcting the pixels constituting the correction target region.
上記の構成によれば、画素ごとに異なる補正割合を設定できるため、検出したエッジ領域をより一層滑らかなエッジとして補正できる効果を奏する。 According to said structure, since a different correction | amendment ratio can be set for every pixel, there exists an effect which can correct | amend the detected edge area | region as a still smoother edge.
また、本発明に係る画像処理装置では、さらに、上記画像データにおいて隣接する各画素間の輝度値の差分値である部分差分値のうち最大値を算出する部分差分最大値算出手段と、上記部分差分値の最大値と上記部分差分値との差分値であるグラデーション検出値を、上記部分差分値ごとに算出するグラデーション検出値算出手段と、をさらに備えており、上記補正割合設定手段は、上記部分差分値の最大値が予め定められた閾値以上である場合に、上記補正対象領域のうち上記部分差分値の算出対象とした上記画素ごとに、当該部分差分値に対応する上記グラデーション検出値に基づく値を、当該画素の補正に用いる上記補正割合として設定することが好ましい。 The image processing apparatus according to the present invention further includes a partial difference maximum value calculating unit that calculates a maximum value among partial difference values that are difference values of luminance values between adjacent pixels in the image data; Gradation detection value calculating means for calculating, for each partial difference value, a gradation detection value that is a difference value between the maximum difference value and the partial difference value, and the correction ratio setting means includes: When the maximum value of the partial difference value is equal to or greater than a predetermined threshold value, the gradation detection value corresponding to the partial difference value is set for each pixel that is the calculation target of the partial difference value in the correction target region. It is preferable to set the value based on the correction ratio used for correcting the pixel.
上記の構成によれば、グラデーションが形成されている部分には、グラデーションを考慮した補正割合を設定できるため、グラデーションが崩壊することによる画質の劣化を抑制できる効果を奏する。 According to the above configuration, since a correction ratio in consideration of gradation can be set in a portion where gradation is formed, there is an effect that deterioration in image quality due to collapse of gradation can be suppressed.
また、上記の構成によれば、補正割合を全体差分値、部分差分値の最大値、エッジ領域における位置、およびグラデーション検出値に基づいた値の組み合わせによって設定できる。これによって、補正対象領域を補正するために最も好適であるように補正割合を設定できる効果を奏する。 Further, according to the above configuration, the correction ratio can be set by a combination of values based on the overall difference value, the maximum value of the partial difference value, the position in the edge region, and the gradation detection value. As a result, the correction ratio can be set so as to be most suitable for correcting the correction target area.
また、本発明に係る画像処理装置では、さらに、上記補正手段は、上記補正対象領域における両端部の画素以外の画素を補正することが好ましい。 In the image processing apparatus according to the present invention, it is preferable that the correction unit corrects pixels other than the pixels at both ends in the correction target region.
上記の構成によれば、隣接するエッジ領域にも含まれる場合があるエッジ重なり部の画素が、いずれか一方のエッジ領域に基づいて補正されることを防ぐことができる。これによって、補正後の画像における画質の劣化を防ぐことができる効果を奏する。 According to said structure, it can prevent that the pixel of the edge overlap part which may be contained also in an adjacent edge area | region is correct | amended based on any one edge area | region. As a result, there is an effect that it is possible to prevent deterioration of image quality in the corrected image.
本発明に係る画像処理方法は、原画像の画像データを、所定の補正割合を用いたスケーリング処理によって補正する補正工程を含む画像処理方法であって、上記画像データにおいて隣接する画素間の輝度値の差分の符号が変化した直前の画素から、次に変化する直前の画素までが3画素以上である区間を、エッジ領域として検出するエッジ領域検出工程と、上記エッジ領域を構成する画素の輝度値の最大値と最小値との差分値である全体差分値が予め定められた閾値以上である場合に、上記エッジ領域を上記補正工程における補正対象領域として設定する補正対象領域設定工程と、を含むことを特徴としている。 An image processing method according to the present invention is an image processing method including a correction step of correcting image data of an original image by scaling processing using a predetermined correction ratio, and a luminance value between adjacent pixels in the image data. An edge area detecting step for detecting, as an edge area, a section in which there are three or more pixels from the pixel immediately before the difference sign changes to the pixel immediately before the next change, and the luminance value of the pixels constituting the edge area A correction target region setting step of setting the edge region as a correction target region in the correction step when an overall difference value, which is a difference value between the maximum value and the minimum value of the first and second values, is equal to or greater than a predetermined threshold value. It is characterized by that.
上記の構成によれば、本発明に係る画像処理装置と同様の作用効果を奏する。 According to said structure, there exists an effect similar to the image processing apparatus which concerns on this invention.
なお、上記画像処理装置は、コンピュータによって実現してもよい。この場合、コンピュータを上記各手段として動作させることにより上記画像処理装置をコンピュータにおいて実現する画像処理プログラム、およびその画像処理プログラムを記録したコンピュータ読み取り可能な記録媒体も、本発明の範疇に入る。 The image processing apparatus may be realized by a computer. In this case, an image processing program for realizing the image processing apparatus in the computer by operating the computer as each of the above means and a computer-readable recording medium on which the image processing program is recorded also fall within the scope of the present invention.
以上のように、本発明に係る画像処理装置は、原画像における画像データからエッジ領域を検出するエッジ領域検出手段と、検出したエッジ領域から算出した全体差分値に基づいて、当該エッジ領域が補正対象であるかどうかを判定するとともに補正割合を設定する補正対象エッジ領域検出手段と、を備えている。これによって、画像処理装置における必要なリソースの量を低減するとともに、エッジ領域を検出できずにアルゴリズムが破綻してしまうことを防止できる効果を奏する。 As described above, the image processing apparatus according to the present invention corrects the edge region based on the edge region detection unit that detects the edge region from the image data in the original image and the overall difference value calculated from the detected edge region. And a correction target edge region detecting means for determining whether or not the target is set and setting a correction ratio. Thus, it is possible to reduce the amount of necessary resources in the image processing apparatus and to prevent the algorithm from failing because the edge region cannot be detected.
〔実施形態1〕
本発明に係る画像処理装置の一実施形態について、図1〜図11を参照して以下に説明する。
An image processing apparatus according to an embodiment of the present invention will be described below with reference to FIGS.
(画像処理装置1の構成)
まず、本発明に係る画像処理装置1について、図1を参照して以下に説明する。図1は、本発明の一実施形態に係る画像処理装置1の要部構成を示すブロック図である。画像処理装置1は、図1に示すように、エッジ検出部2、スケーリング処理部3(補正手段)、メモリコントローラ4、ラインメモリ5、補正率算出部9、画素位置検出部10、補正方向設定部11およびグラデーション検出部12を備えている。
(Configuration of the image processing apparatus 1)
First, an
(エッジ検出部2の構成)
エッジ検出部2は、画像処理装置1に入力された補正対象画像の画像信号からエッジ領域を検出するためのものである。エッジ検出部2は、図1に示すように、差分符号検出部6(エッジ領域検出手段)、全体差分値検出部7(補正対象領域検出手段)および部分差分最大値検出部8を備えている。各部材の詳細については、後述する。
(Configuration of edge detection unit 2)
The
(スケーリング処理部3の構成)
スケーリング処理部3(補正手段)は、エッジ検出部2において検出されたエッジ領域に、後述する補正率算出部9(補正割合設定手段)、画素位置検出部10および補正方向設定部11において算出および設定された補正情報に基づいて補正対象画像をスケーリング処理するものである。スケーリング処理部3は、図1に示すように、ターゲット画素補正部13およびフィルタ演算部14を備えている。各部材の詳細については、後述する。
(Configuration of scaling processing unit 3)
The scaling processing unit 3 (correction unit) calculates and calculates the correction factor calculation unit 9 (correction ratio setting unit), the pixel
(メモリコントローラ4およびラインメモリ5)
メモリコントローラ4は、スケーリング処理部3において補正する補正対象画像におけるエッジ領域の画素の位置情報をスケーリング処理部3から受け取り、ラインメモリ5に伝えるものである。ラインメモリ5は、補正対象画像の画像信号を記録しているメモリであり、メモリコントローラ4から伝えられる情報に基づいて、スケーリングに必要な画素情報をスケーリング処理部3に供給する。
(
The
(補正率算出部9、画素位置検出部10、補正方向設定部11およびグラデーション検出部12)
補正率算出部9は、エッジ検出部2において検出されたエッジ領域における各画素の補正割合に基づいて補正率(補正割合)を算出するためのものである。画素位置検出部10は、エッジ検出部2において検出されたエッジ部分における画素位置を検出するものである。補正方向設定部11は、画素位置検出部10によって位置が明確となった画素の補正方向を設定するものである。グラデーション検出部12は、エッジ検出部2において検出されたエッジ領域においてグラデーションが形成されているか否かを判定するものである。各部材の詳細については後述する。
(Correction
The correction
ここで、本実施形態における「補正率」とは、スケーリング処理時に用いる補正割合を意味している。なお、本実施形態において「補正割合」とは、上記補正率を算出するためのパラメータであることを意味している。 Here, the “correction rate” in the present embodiment means a correction rate used during the scaling process. In the present embodiment, the “correction ratio” means a parameter for calculating the correction ratio.
(画像処理プロセスの概要)
次に、画像処理装置1における画像処理プロセスの概要について、図2を参照して以下に説明する。図2は、画像処理装置1における画像処理プロセスの概要を示すフローチャートである。
(Outline of image processing process)
Next, an outline of an image processing process in the
(画像信号の入力)
まず、画像処理装置1は、補正対象画像(原画像)の画像信号(画像データ)を取得する(ステップS50)。なお、補正対象画像は、特に限定されるものではなく、例えば、コンピュータなどから入力される静止画像であってもよいし、テレビまたはビデオなどから入力される動画像であってもよい。
(Image signal input)
First, the
(エッジ領域の検出)
エッジ検出部2は、入力された画像信号からエッジ領域を検出する(ステップS51)。具体的には、まず、エッジ検出部2の差分符号検出部6が、ステップS50において取得された画像信号における輝度値を検出し、検出した輝度値に基づいて、隣接する画素との輝度値の差分を取ったときの符号を差分符号として算出する。そして、符号が変化(+から−、または−から+に変化)した画素の一つ前の画素から、次に符号が変化する画素の一つ前の画素までが3画素以上である区間を「エッジ領域」として検出する。また、差分符号が変化する一つ前の画素は、エッジ重なり部として設定され、補正されない。エッジ重なり部として設定された画素が補正されない理由については、具体例を示しながら下記に説明する。
(Detection of edge area)
The
(補正対象とするエッジ領域の検出)
次に、エッジ検出部2は、検出したエッジ領域を補正の対象とするか否か判定する(ステップS52およびステップS53)。具体的には、エッジ検出部2の全体差分値検出部8が、エッジ領域における輝度値の最大値と最小値との差分値である全体差分値を算出する(ステップS52)。図3には、エッジ領域における全体差分値の一例を模式的に示している。
(Detection of edge area to be corrected)
Next, the
そして、ステップS53において、算出した全体差分値が、閾値よりも大きいか否かを判定する。全体差分値が閾値よりも小さい場合(ステップS53においてNo)には、検出したエッジ領域を微小振幅などのノイズ成分であると判定し、ノイズ成分などの輪郭強調を避けるために輪郭補正を施さない(ステップS55)。全体差分値が閾値よりも大きい場合(ステップS53においてYes)には、検出したエッジ領域を補正対象であると判定する。すなわち、全体差分値検出部7は、差分符号検出6において検出したエッジ領域から、スケーリング処理部3による補正の対象となるエッジ領域である「補正対象領域」を検出する。
In step S53, it is determined whether the calculated overall difference value is greater than a threshold value. If the overall difference value is smaller than the threshold value (No in step S53), it is determined that the detected edge region is a noise component such as a minute amplitude, and no contour correction is performed in order to avoid contour enhancement such as a noise component. (Step S55). If the overall difference value is larger than the threshold value (Yes in step S53), it is determined that the detected edge region is a correction target. That is, the entire difference value detection unit 7 detects “a correction target region” that is an edge region that is a correction target by the scaling
なお、ステップS53における閾値は、画像処理を操作する操作者によって適宜設定されてもよいし、あらかじめ設定された数値であってもよい。また、エッジ領域ごとによってその都度算出してもよい。
(補正が必要であるエッジ領域の検出)
全体差分値検出部7において、検出したエッジ領域が補正対象領域であると判定した場合(ステップS53においてYes)、エッジ検出部2は、検出した補正対象領域を補正するか否か判定する(ステップS54およびステップS56)。具体的には、エッジ検出部2の部分差分最大値検出部8が、部分差分最大値を算出する(ステップS54)。部分差分最大値は、隣接する画素間の輝度値の差分である部分差分値を算出し、算出した部分差分値の最大値を検出することによって設定される。図4には、エッジ領域における部分差分値および部分差分最大値の一例を模式的に示している。
Note that the threshold value in step S53 may be set as appropriate by an operator who operates the image processing, or may be a numerical value set in advance. Further, it may be calculated for each edge region each time.
(Detection of edge area that needs correction)
If the overall difference value detection unit 7 determines that the detected edge region is a correction target region (Yes in step S53), the
そして、ステップS56において、算出した部分差分最大値が、閾値よりも大きいか否かを判定する。すなわち、部分差分最大値検出部8では、検出した補正対象領域が、領域内に急峻な区間を有している場合に、補正対象領域をスケーリング処理部3による補正が必要であるエッジ領域として判定する。すなわち、部分差分最大値検出部8は、全体差分値検出部7において検出した補正対象領域のうち、補正が必要であるエッジ領域を絞り込む。
In step S56, it is determined whether or not the calculated partial difference maximum value is larger than a threshold value. That is, the partial difference maximum
部分差分最大値が閾値よりも小さい場合(ステップS56においてNo)には、検出した補正対象領域を補正する必要はないと判定し、輪郭補正を施さない。(ステップS55)。部分差分最大値が閾値よりも大きい場合(ステップS56においてYes)には、検出した補正対象領域を補正の必要なエッジ領域であると判定する。 When the partial difference maximum value is smaller than the threshold (No in step S56), it is determined that it is not necessary to correct the detected correction target region, and no contour correction is performed. (Step S55). When the partial difference maximum value is larger than the threshold value (Yes in step S56), it is determined that the detected correction target area is an edge area that needs to be corrected.
なお、ステップS56における閾値は、画像処理を操作する操作者によって適宜設定されてもよいし、あらかじめ設定された数値であってもよい。また、エッジ領域ごとによってその都度算出してもよい。 Note that the threshold value in step S56 may be set as appropriate by an operator who operates the image processing, or may be a numerical value set in advance. Further, it may be calculated for each edge region each time.
(補正方向の設定および補正率jの算出)
次に、補正率算出部9、画素位置検出部10および補正方向設定部11は、補正が必要であると判定した領域を補正するための補正情報を設定する(ステップS57)。なお、上記補正情報とは、補正率、補正方向および補正対象画素の座標である。
(Setting correction direction and calculating correction factor j)
Next, the correction
具体的には、補正率算出部9において、エッジ領域を補正するための補正率jを算出し、画素位置検出部10および補正方向設定部11において、エッジ領域を構成する各画素の補正方向を設定する。補正率jの算出方法および補正方向の設定方法のより詳細な求め方については、後で詳述する。
Specifically, the correction
(輪郭補正の実行)
最後に、スケーリング処理部3が、ステップS57において算出および設定された補正情報に基づいて、エッジ領域のスケーリング処理を実行する(ステップS58)。
(Execution of contour correction)
Finally, the scaling
具体的には、スケーリング処理部3におけるターゲット画素補正部13は、画素位置検出部10において検出した補正対象画素の位置とともに、ステップS57において算出および設定された補正情報を取得する。スケーリング処理部3が、ターゲット画素補正部13に補正率j、補正方向および補正対象画素の位置を取得すると、スケーリング処理部3は、補正対象画像の読み出したい画素位置をメモリコントローラ4へと送り、メモリコントローラ4は、ラインメモリ5からスケーリングに必要な画素情報を読み出す。フィルタ演算部14は、ラインメモリ5から読み出された画素情報をターゲット画素補正部13の有する補正率jおよび補正方向のパラメータに基づいてフィルタ演算する。
Specifically, the target
なお、画像を拡大する際には、出力先のデバイスにおける解像度に変換した後に等倍時と同様に処理することが最も好ましい。しかし、画像の拡大前に補正を施すターゲット画素のエッジ領域における位置関係に基づいて、補間画素のターゲット画素に対する補正率を算出することによって、画像を拡大すると同時に補正を施すこともできる。 Note that when enlarging an image, it is most preferable to perform the same processing as that at the same magnification after conversion to the resolution of the output destination device. However, by correcting the interpolation pixel with respect to the target pixel based on the positional relationship in the edge region of the target pixel to be corrected before the image is enlarged, the image can be enlarged and corrected at the same time.
以上の処理を経て、画像処理装置1は、補正後の画像信号を出力する。なお、スケーリング処理部4におけるスケーリング処理は、従来公知の手法を用いることができる。
Through the above processing, the
(本実施形態の利点)
以上のように、本発明に係る画像処理装置1では、あらかじめ用意した階調の遷移パターンと、補正対象画像における画像信号の画素とを比較することなく、補正対象画像におけるエッジ領域を検出できる。
(Advantages of this embodiment)
As described above, the
これによって、階調の遷移パターンをあらかじめ用意する必要がなくなるため、必要なリソースの量を低減できるとともに、検出したエッジ領域を構成する画素の輝度値に基づいて補正割合を算出することによって、階調の遷移パターンに当てはまらず、アルゴリズムが破綻することを防止できる。 This eliminates the need to prepare a gradation transition pattern in advance, thereby reducing the amount of necessary resources and calculating the correction ratio based on the luminance value of the pixels constituting the detected edge region. This does not apply to the key transition pattern, and the algorithm can be prevented from failing.
また、本発明に係る画像処理装置1では、エッジ領域を検出するために、差分符号検出部6において検出したエッジ領域における画素の輝度値の最大値と最小値の差分値、すなわち全体差分最大値を算出し、算出した全体差分最大値と閾値とを比較している(ステップS52および53)。
Further, in the
これによって、差分符号検出部6において検出したエッジ領域からノイズ成分などの微小振幅を除くことができる。これによって、ノイズ成分などを輪郭強調することによって、補正後の画像が劣化してしまうことを防止できる。
Thereby, a minute amplitude such as a noise component can be removed from the edge region detected by the
また、本発明に係る画像処理装置1では、隣接する画素間の輝度値の差分である部分差分値の最大値、すなわち部分差分最大値と閾値とを比較している(ステップS54および56)。
Further, in the
これによって、補正対象領域から、補正する必要がないエッジ領域を除去できる。また、エッジ領域における急峻な部分を検出し、その部分を中心に補正することによって、検出したエッジ領域に、より鮮鋭感のある画像となる補正を施すことができる。 As a result, the edge region that does not need to be corrected can be removed from the correction target region. Further, by detecting a steep portion in the edge region and correcting the detected portion as the center, the detected edge region can be corrected so as to have a sharper image.
(補正するエッジ領域の検出の具体例)
次に、上述した画像処理装置1において補正するエッジ領域の検出の具体例について、図5を参照して以下に説明する。図5は、画像処理装置1に入力された入力画像信号における輝度グラフ90、当該画像信号から算出されるデータ、および画像処理装置1から出力された出力画像信号における輝度グラフ100を示す図である。
(Specific example of detection of edge region to be corrected)
Next, a specific example of detection of an edge region to be corrected in the
図5における入力画像信号では、例えば、符号が変化(+から−、または−から+に変化)した画素90bの一つ前の画素90aから、次に符号が変化する画素90lの一つ前の画素90hまでがエッジ領域91として検出される。なお、図5において、符号は、一つ前の画素から輝度値が増加している場合には「+」、減少している場合には「−」として示している。
In the input image signal in FIG. 5, for example, from the
検出したエッジ領域91における全体差分値は、画素90a(輝度値:270)と画素90h(輝度値:3)との差分値である「227」となる。すなわち、閾値が「227」より大きい場合、全体差分値検出部7は、検出したエッジ領域91を補正の対象であると補正対象領域であると判定する。
The overall difference value in the detected
エッジ領域91における部分差分値は、それぞれ図5に示すようになり、画素90cと画素90dとの間の部分差分値である「68」が部分差分最大値となる。すなわち、閾値が「68」より大きい場合、部分差分最大値検出部8は、エッジ領域91を補正する必要があるエッジ領域であると判定する。
The partial difference values in the
また、画素90aおよび画素90hは、差分符号検出部6においてエッジ領域91が検出される際にエッジ重なり部として設定され、補正されない。これは、画素90aは、画素90iから画素90aまでの画素によって形成されるエッジ領域92にも含まれる画素であり、画素90aを補正すると、エッジ領域91またはエッジ領域92のどちらかに偏った補正となってしまい、画質が補正前よりも劣化してしまうおそれがあるからである。また、画素90hも、画素90hから画素90mまでの画素によって形成されるエッジ領域93に含まれる画素であり、画素90aの場合と同様である。したがって、差分符号検出部6では、補正できる点を少なくとも1点確保するために、符号が変化した画素の一つ前の画素から、次に符号が変化する画素の一つ前の画素までが3画素以上である区間をエッジ領域として検出している。
The
(補正方向の設定方法および補正率jの算出方法)
次に、ステップS57における補正率jのより詳細な算出方法、および補正方向のより詳細な設定方法について、図6を参照して以下に説明する。図6は、本実施の形態における補正率jのより詳細な算出方法、および補正方向のより詳細な設定方法を示すフローチャートである。
(Correction direction setting method and correction factor j calculation method)
Next, a more detailed calculation method of the correction rate j in step S57 and a more detailed setting method of the correction direction will be described below with reference to FIG. FIG. 6 is a flowchart showing a more detailed calculation method of the correction rate j and a more detailed setting method of the correction direction in the present embodiment.
まず、全体差分値請求項底部7および部分差分最大値8は、補正率jを算出するためのパラメータとして、補正割合fおよび補正割合gをそれぞれ設定する(ステップS57aおよびステップS57b)。補正割合fおよびgの詳細な設定方法については、後で詳述する。
First, the total difference value claim bottom 7 and the partial difference
次に、画素位置検出部10において、エッジ領域を構成する画素の位置を検出する(ステップS57c)。そして、検出した画素位置情報に基づいて、補正割合hを設定する(ステップS57d)。なお、補正割合hは、補正対象領域を構成する各画素ごとに設定される。画素位置の検出および補正割合hの詳細な設定方法については、後で詳述する。
Next, the pixel
なお、画素位置検出部10に検出されたエッジ領域を構成する画素の位置、すなわち画素座標は、補正割合hの設定の他にも、下記に説明する補正方向の設定およびスケーリング処理時におけるラインメモリ5からの画像信号の読み出しにも用いられる。
Note that the position of the pixels constituting the edge region detected by the pixel
その後、グラデーション検出部12は、補正を施すエッジ領域の各区間がグラデーションを形成しているか否かを判定する(ステップS57e)。エッジ領域においてグラデーションが形成されている場合には、図7に示すように、部分差分最大値と部分差分値との差分値が非常に小さくなっている。このような場合、部分差分最大値を有する区間を優先的に補正すると、図8に示すように、形成されていたグラデーションが崩れてしまい、補正後の画像において画質の劣化が引き起こされる。なお、図7には、エッジ領域におけるグラデーションの一例を模式的に示している。また、図8には、グラデーションの形成を無視し、画像を補正した場合の輝度グラフを示しており、実線が補正前の輝度グラフであり、破線が補正後の輝度グラフである。
Thereafter, the
したがって、グラデーション検出部12では、グラデーションの崩壊を防ぐために、部分差分最大値と部分差分値との差分値であるグラデーション検出値を部分差分値ごとに算出し、算出したグラデーション検出値に基づいて、補正割合iを設定する(ステップS57f)。なお、グラデーション検出値は、部分差分値ごとに算出されるため、補正割合iは補正対象領域を構成する画素それぞれに設定される。補正割合iの詳細な設定方法については、後で詳述する。
Therefore, the
補正割合f〜iが設定されると、補正率算出部9は、設定した補正割合f〜iを組み合わせることにより補正率jを算出する(ステップS57g)。補正率jの算出方法は、補正割合f〜iに基づいて算出されれば特に限定されるものではない。補正率jの算出方法として、例えば、補正割合f〜iの積(すなわちf×g×h×i)を算出する方法を一例として挙げることができる。
When the correction ratios f to i are set, the correction
補正率算出部9において補正率jが算出されると、補正方向設定部11は、画素位置検出部10によって検出された画素位置に基づいて、エッジ領域を構成する画素の補正方向を設定する(ステップS57h)。具体的には、部分差分最大値検出部8において算出された部分差分最大値を挟んで補正方向が変化するように、各画素に方向性フラグを設定する。なお、方向性フラグは、補正後のエッジ領域が急峻となるように設定される。すなわち、補正方向設定部11は、それぞれの画素の近傍に位置するエッジ重なり部の画素に近づくように方向性フラグを設定する。なお、方向性フラグは、補正する画素それぞれに設定される。
When the correction factor j is calculated by the
なお、本実施の形態においては、補正割合f、補正割合g、補正割合hそして補正割合iの順に補正割合を設定しているが、補正割合f〜iの設定順は、これに限定されるものではない。例えば、補正割合fおよびgを設定した後、補正割合i、補正割合hの順に設定してもよいし、また補正割合fおよびgを設定する前にグラデーションおよび画素位置を検出し、補正割合hおよびiを設定してもよい。 In this embodiment, the correction ratios are set in the order of the correction ratio f, the correction ratio g, the correction ratio h, and the correction ratio i. However, the setting order of the correction ratios f to i is limited to this. It is not a thing. For example, after setting the correction ratios f and g, the correction ratio i and the correction ratio h may be set in this order, or the gradation and the pixel position are detected before the correction ratios f and g are set, and the correction ratio h And i may be set.
また、本実施の形態においては、補正率jを算出した後に補正方向を設定しているが、これに限定されるものではなく、補正方向を設定した後に補正率jを算出してもよい。 In this embodiment, the correction direction is set after calculating the correction rate j. However, the present invention is not limited to this, and the correction rate j may be calculated after setting the correction direction.
(補正割合fの詳細な設定方法)
補正割合fの設定方法は、特に限定されるものではない。例えば、ステップS53において設定した閾値(th_ads)を補正割合0%と設定すると共に、補正割合を100%と設定する全体差分値(th_ade)を設定し、算出した全体差分最大値に応じて補正割合fを設定する方法を挙げることができる。例えば、図9に示すように、全体差分値と補正割合fとの間には比例関係が成立しており、その比例関係に基づいて補正割合fが設定されていてもよい。図9は、全体差分値と補正割合fと間の関係の一例を示す図である。
(Detailed setting method of correction ratio f)
The method for setting the correction ratio f is not particularly limited. For example, the threshold value (th_ads) set in step S53 is set as the
もちろん補正割合fは、th_adsとth_adeとの間における比例関係による設定に限定されるものではなく、指数関数的に増加するように設定されてもよいし、その他の関数に基づいて設定されてもよい。 Of course, the correction ratio f is not limited to the setting based on the proportional relationship between th_ads and th_ade, and may be set so as to increase exponentially or may be set based on other functions. Good.
これによって、全体差分値の大きさが小さい場合には補正割合を小さく、全体差分値の大きさが大きい場合には補正割合を大きく設定できるため、閾値付近のエッジ領域に対しても好適な補正割合を設定することができ、補正後の画像の劣化を防止できる。 This makes it possible to set a small correction ratio when the total difference value is small, and a large correction ratio when the total difference value is large. The ratio can be set and deterioration of the image after correction can be prevented.
なお、th_adeは、あらかじめ設定されている固定値でもよいし、操作者によって適宜設定されてもよい。また、算出された全体差分値に基づいて、エッジ領域ごとに適宜算出するようにしてもよい。 Note that th_ade may be a fixed value set in advance or may be set as appropriate by the operator. Further, it may be appropriately calculated for each edge region based on the calculated overall difference value.
なお、図8の具体例では、全体差分値検出部7は、全体差分値である「277」を用いて補正割合fを設定する。 In the specific example of FIG. 8, the overall difference value detection unit 7 sets the correction ratio f using “277” which is the overall difference value.
(補正割合gの詳細な設定方法)
補正割合gの設定方法は、補正割合fの設定方法と同様に特に限定されるものではない。例えば、ステップS56(図2参照)において設定した閾値(th_mds)を補正割合0%と設定すると共に、補正割合を100%と設定する部分差分最大値(th_mde)を設定し、算出した部分差分最大値に応じて補正割合gを設定する方法を挙げることができる。例えば、図10に示すように、部分差分最大値と補正割合g間には比例関係が成立しており、その比例関係に基づいて補正割合gが設定されていてもよい。図10は、部分差分最大値と補正割合gとの関係の一例を示す図である。
(Detailed setting method of correction ratio g)
The method for setting the correction ratio g is not particularly limited as is the case with the method for setting the correction ratio f. For example, the threshold value (th_mds) set in step S56 (see FIG. 2) is set as the
もちろん補正割合gは、th_mdsとth_mdeとの間における比例関係による設定に限定されるものではなく、指数関数的に増加するように設定されてもよいし、その他の関数に基づいて設定されてもよい。 Of course, the correction ratio g is not limited to the setting based on the proportional relationship between th_mds and th_mde, and may be set so as to increase exponentially or may be set based on other functions. Good.
これによって、部分差分最大値の大きさが小さい場合には補正割合を小さく、部分差分最大値の大きさが大きい場合には補正割合を大きく設定できるため、閾値付近のエッジ領域に対しても好適な補正割合を設定することができ、補正後の画像の劣化を防止できる。 This makes it possible to set a small correction ratio when the partial difference maximum value is small, and a large correction ratio when the partial difference maximum value is large. A correct correction ratio can be set, and deterioration of the image after correction can be prevented.
なお、th_mdeは、あらかじめ設定されている固定の値でもよいし、操作者によって適宜設定されてもよい。また、算出された部分差分最大値に基づいて、エッジ領域ごとに適宜算出するようにしてもよい。 Note that th_mde may be a fixed value set in advance or may be set as appropriate by the operator. Further, it may be appropriately calculated for each edge region based on the calculated partial difference maximum value.
なお、図8の具体例では、部分差分最大値検出部8は、部分差分最大値=68を用いて補正割合gを設定する。
In the specific example of FIG. 8, the partial difference maximum
(補正割合hの詳細な設定方法)
補正割合hの設定方法も、補正割合fおよびgの設定方法と同様に特に限定されるものではない。例えば、部分差分最大値検出部8において算出した部分差分最大値を有する画素を中心と設定し、中心と設定した画素から離れるにしたがって、補正割合を徐々に減ずる設定方法を挙げることができる。
(Detailed setting method of correction ratio h)
The method for setting the correction ratio h is not particularly limited as is the case with the method for setting the correction ratios f and g. For example, a setting method in which the pixel having the maximum partial difference value calculated by the partial difference maximum
補正割合hの設定方法の具体例について、図5を参照して以下に説明する。上述したように、エッジ領域91における部分差分最大値は、画素90cの輝度値と画素90dの輝度値との差分値であるため、画素位置検出部10は、画素90cおよび画素90dをエッジ領域91の中心と設定する。図5では、画素90cおよび画素90dをエッジ内位置「1」と設定している。続いて、画素90cおよび画素90dに隣接する画素である画素90bおよび画素90eをエッジ内位置「2」と設定する。以後同様に、画素90aおよび画素90fをエッジ内位置「3」、画素90gをエッジ内位置「4」、そして画素90hをエッジ内位置「5」と設定する。
A specific example of the method of setting the correction ratio h will be described below with reference to FIG. As described above, since the partial difference maximum value in the
エッジ位置検出部10は、エッジ領域91を構成する画素90a〜90hのエッジ内位置を設定すると、設定したエッジ内位置に基づいて、画素ごとに補正割合hを設定する。例えば、エッジ内位置を「1」と設定した画素90cおよび画素90dの補正割合hを100%、エッジ内位置を「2」と設定した画素90bおよび画素90eの補正割合hを80%、エッジ内位置を「3」と設定した画素90fの補正割合hを60%、そしてエッジ内位置を「4」と設定した画素90gの補正割合hを40%と設定する。なお、画素90aおよび画素90hは、エッジ重なり部として設定されているため、補正割合hは設定されない。
When the edge
このように、エッジ領域を構成する画素ごとに異なる補正割合を設定し、かつエッジ領域における両端の画素、すなわちエッジ重なり部として設定されている画素に近づくほど補正割合hを減少させることによって、補正後の画像におけるエッジ領域をより一層滑らかに補正できる。 In this way, a different correction ratio is set for each pixel constituting the edge area, and the correction ratio h is decreased as it approaches the pixels at both ends in the edge area, that is, the pixels set as the edge overlap portion. The edge area in the subsequent image can be corrected more smoothly.
なお、エッジ内位置における補正割合hは、あらかじめ設定されていてもよいし、操作者によって適宜設定されてもよい。また、例えば、エッジ内位置が「1」の補正割合hを100%とし、「2」の補正割合を60%とし、「3」の補正割合を50%とするように、エッジ内位置と補正割合hとの間に比例関係が成立していなくてもよい。 The correction ratio h at the in-edge position may be set in advance or may be set as appropriate by the operator. Further, for example, the correction is performed so that the correction ratio h for the position “1” within the edge is 100%, the correction ratio “2” is 60%, and the correction ratio “3” is 50%. The proportional relationship may not be established with the ratio h.
(補正割合iの詳細な設定方法)
補正割合iの設定方法も、補正割合f、gおよびhの設定方法と同様に、特に限定されるものではない。例えば、グラデーション検出値が0である場合を補正割合0%と設定すると共に、補正割合を100%と設定する閾値(th_dmax)を設定し、算出したグラデーション検出値に応じて補正割合iを設定する方法を挙げることができる。具体的には、図11に示すように、グラデーション検出値と補正割合i間には比例関係が成立しており、その比例式に基づいて補正割合iが設定されてもよい。図11は、部分差分最大値と補正割合iと間の関係の一例を示す図である。
(Detailed setting method of correction ratio i)
The method for setting the correction ratio i is not particularly limited, as is the method for setting the correction ratios f, g, and h. For example, when the gradation detection value is 0, the correction ratio is set to 0%, a threshold value (th_dmax) is set to set the correction ratio to 100%, and the correction ratio i is set according to the calculated gradation detection value. A method can be mentioned. Specifically, as shown in FIG. 11, a proportional relationship is established between the gradation detection value and the correction ratio i, and the correction ratio i may be set based on the proportional expression. FIG. 11 is a diagram illustrating an example of a relationship between the partial difference maximum value and the correction ratio i.
もちろん補正割合iは、グラデーション検出値0とth_dmaxとの間における比例関係による設定に限定されるものではなく、指数関数的に増加するように設定されてもよいし、その他の関数に基づいて設定されてもよい。
Of course, the correction ratio i is not limited to the setting based on the proportional relationship between the
これによって、グラデーションが形成されている部分には、グラデーションに応じた補正割合を設定できるため、グラデーションが崩れてしまうことによって補正後の画像における画質の劣化を防止できる。 As a result, a correction ratio corresponding to the gradation can be set in the portion where the gradation is formed. Therefore, the deterioration of the image quality in the image after the correction can be prevented due to the collapse of the gradation.
なお、th_dmaxは、あらかじめ設定されている固定の値でもよいし、操作者によって適宜設定されてもよい。また、算出されたグラデーション検出値に基づいて、エッジ領域ごとに適宜算出するようにしてもよい。 Note that th_dmax may be a fixed value set in advance, or may be set as appropriate by the operator. Further, it may be appropriately calculated for each edge region based on the calculated gradation detection value.
(補正方向設定の具体例)
補正方向を設定する具体例について、図5を参照して以下に説明する。
(Specific example of correction direction setting)
A specific example of setting the correction direction will be described below with reference to FIG.
エッジ領域91における部分差分最大値は上述したように、画素90cの輝度値と画素90dの輝度値との差分値である。したがって、エッジ領域91において、画素90bおよび画素90cの方向性フラグは上方向(図8においては「−1」)に、画素90d、画素90e、画素90fおよび画素90gの方向性フラグは下方向(図8においては「1」)に設定される。なお、エッジ重なり部である画素90aおよび画素90hは、補正されないため、補正方向は設定されない。
As described above, the partial difference maximum value in the
(補正率jの算出方法の変形例)
補正率算出部9において算出される補正率jは、補正割合f〜iの組み合わせに応じて適宜算出できる。すなわち、上述した例においては補正率jを補正割合f〜i全てを用いて算出しているが、これに限定されるものではない。これによって、補正率jを、検出したエッジ領域を補正するために最も好適である値として算出できる。
(Modification of calculation method of correction factor j)
The correction rate j calculated by the correction
例えば、補正割合fを除いた残りの3つの補正割合である補正割合g、補正割合hおよび補正割合iを用いて補正率jを算出してもよい。 For example, the correction rate j may be calculated using the correction rate g, the correction rate h, and the correction rate i, which are the remaining three correction rates excluding the correction rate f.
これによって、全体差分値の大きさに関わらず、部分差分最大値の大きさに基づいた補正率jを算出できる。 As a result, the correction factor j based on the size of the partial difference maximum value can be calculated regardless of the size of the overall difference value.
また、他には、補正割合hおよび補正割合iを除いた残りの2つの補正割合である補正割合fおよび補正割合gを用いて補正率jを算出した場合には、エッジ領域を構成する画素を全て同じ補正率を用いて補正できる。 In addition, when the correction rate j is calculated using the correction rate f and the correction rate g, which are the remaining two correction rates excluding the correction rate h and the correction rate i, the pixels constituting the edge region Can be corrected using the same correction factor.
この場合、補正割合f〜i全てを用いた補正よりも補正後の画像の滑らかさでは劣るものの、画素ごとの補正率を算出することなく補正できるために、補正に要する時間を短縮できる。 In this case, although the smoothness of the image after the correction is inferior to the correction using all the correction ratios f to i, the correction can be performed without calculating the correction rate for each pixel, so that the time required for the correction can be shortened.
もちろん、補正率jを算出する補正割合f〜iの組み合わせは上記例に限るものではなく、補正割合f〜iの組み合わせ、全12通り全てにおいて可能である。また、補正割合f〜jを組み合わせず、補正割合f〜iのいずれか1つを補正率jとして設定してもよい。 Of course, the combinations of the correction ratios f to i for calculating the correction ratio j are not limited to the above example, and the combinations of the correction ratios f to i are possible in all 12 ways. Further, any one of the correction ratios f to i may be set as the correction ratio j without combining the correction ratios f to j.
なお、通常、部分差分最大値を有する区間は、エッジの中心付近にあり、エッジ領域の両端部に近づくほど部分差分値は小さくなることから、画素ごとの補正率を等しくしても十分に滑らかな画像として補正できる。 In general, the section having the maximum partial difference value is near the center of the edge, and the partial difference value decreases as it approaches the both ends of the edge region. Therefore, even if the correction rate for each pixel is equal, it is sufficiently smooth. Can be corrected.
また、補正率jを算出するパラメータである補正割合f〜iは、エッジ領域の特性にしたがって自動的に設定されてもよいし、操作者により適宜選択されるようにしてもよい。 Further, the correction ratios f to i that are parameters for calculating the correction ratio j may be automatically set according to the characteristics of the edge region, or may be appropriately selected by the operator.
(付記事項)
最後に、画像処理装置1の各ブロックは、ハードウェアロジックによって構成してもよいし、次のようにCPUを用いてソフトウェアによって実現してもよい。
(Additional notes)
Finally, each block of the
すなわち、画像処理装置1は、各機能を実現する制御プログラムの命令を実行するCPU(central processing unit)、上記プログラムを格納したROM(read only memory)、上記プログラムを展開するRAM(random access memory)、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の目的は、上述した機能を実現するソフトウェアである画像処理装置1の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、上記画像処理装置1に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。
That is, the
上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ系、フロッピー(登録商標)ディスク/ハードディスクなどの磁気ディスクやCD−ROM/MO/MD/DVD/CD−Rなどの光ディスクを含むディスク系、ICカード(メモリカードを含む)/光カード等のカード系、あるいはマスクROM/EPROM/EEPROM/フラッシュROMなどの半導体メモリ系などを用いることができる。 Examples of the recording medium include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy (registered trademark) disks / hard disks, and optical disks such as CD-ROM / MO / MD / DVD / CD-R. Card systems such as IC cards, IC cards (including memory cards) / optical cards, or semiconductor memory systems such as mask ROM / EPROM / EEPROM / flash ROM.
また、画像処理装置1を通信ネットワークと接続可能に構成し、上記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークとしては、特に限定されず、例えば、インターネット、イントラネット、エキストラネット、LAN、ISDN、VAN、CATV通信網、仮想専用網(virtual private network)、電話回線網、移動体通信網、衛星通信網などが利用可能である。また、通信ネットワークを構成する伝送媒体としては、特に限定されず、例えば、IEEE1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL回線等の有線でも、IrDAやリモコンのような赤外線、Bluetooth(登録商標)、802.11無線、HDR、携帯電話網、衛星回線、地上波デジタル網などの無線でも利用可能である。なお、本発明は、上記プログラムコードが電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態でも実現され得る。
Further, the
なお、本発明は、上述した実施形態に限定されるものではなく、請求項に示した範囲において種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。 Note that the present invention is not limited to the above-described embodiments, and various modifications are possible within the scope of the claims, and can be obtained by appropriately combining technical means disclosed in different embodiments. Embodiments are also included in the technical scope of the present invention.
本発明に係る画像処理装置を用いることによって、画像を拡大表示した際であっても、鮮鋭度の低下していない画像として表示できる。具体的には、SD解像度において記録された映像をHD解像度を有するテレビに表示した際に、画質の劣化を抑制した鮮鋭な映像として表示できる。 By using the image processing apparatus according to the present invention, even when an image is enlarged and displayed, it can be displayed as an image whose sharpness is not lowered. Specifically, when an image recorded at the SD resolution is displayed on a television having an HD resolution, the image can be displayed as a sharp image in which deterioration in image quality is suppressed.
1 画像処理装置
2 エッジ検出部
3 スケーリング処理部(補正手段)
4 メモリコントローラ
5 ラインメモリ
6 差分符号検出部(エッジ領域検出手段)
7 全体差分値検出部(補正対象領域検出手段)
8 部分差分最大値検出部
9 補正率算出部(補正割合設定手段)
10 画素位置検出部
11 補正方向設定部
12 グラデーション検出部(グラデーション検出値算出手段)
13 ターゲット画素補正部
14 フィルタ演算部
DESCRIPTION OF
4
7 Overall difference value detection unit (correction target area detection means)
8 Partial difference maximum
DESCRIPTION OF
13 Target
Claims (9)
上記画像データにおいて隣接する画素間の輝度値の差分の符号が変化した直前の画素から、次に変化する直前の画素までが3画素以上である区間を、エッジ領域として検出するエッジ領域検出手段と、
上記エッジ領域を構成する画素の輝度値の最大値と最小値との差分値である全体差分値が予め定められた閾値以上である場合に、上記エッジ領域を上記補正手段による補正対象領域として設定する補正対象領域設定手段と、
を備えていることを特徴とする画像処理装置。 An image processing apparatus comprising correction means for correcting image data of an original image by scaling processing using a predetermined correction ratio,
Edge region detecting means for detecting, as an edge region, a section in which there are three or more pixels from the pixel immediately before the sign of the luminance value difference between adjacent pixels in the image data to the pixel immediately before the next change ,
The edge area is set as a correction target area by the correction means when the overall difference value, which is the difference value between the maximum value and the minimum value of the luminance values of the pixels constituting the edge area, is equal to or greater than a predetermined threshold value. Correction target area setting means to perform,
An image processing apparatus comprising:
上記補正対象領域設定手段は、上記部分差分値の最大値が予め定められた閾値以上である場合に、上記エッジ領域を上記補正対象領域として設定し、
上記補正割合設定手段は、上記部分差分値の最大値が予め定められた閾値以上である場合に、上記部分差分値の最大値に基づく値を、上記補正対象領域に対する上記補正割合として設定することを特徴とする請求項2に記載の画像処理装置。 The image data further includes a partial difference maximum value calculating means for calculating a maximum value among partial difference values that are difference values of luminance values between adjacent pixels.
The correction target area setting means sets the edge area as the correction target area when the maximum value of the partial difference values is equal to or greater than a predetermined threshold value,
The correction ratio setting means sets a value based on the maximum value of the partial difference value as the correction ratio for the correction target area when the maximum value of the partial difference value is equal to or greater than a predetermined threshold. The image processing apparatus according to claim 2.
上記部分差分値の最大値に基づいて、上記補正対象領域を構成する画素の上記補正対象領域における位置を検出する位置検出手段と、をさらに備えており、
上記補正割合設定手段は、上記部分差分値の最大値が予め定められた閾値以上である場合に、上記画素ごとに、上記位置に基づく値を、上記補正対象領域を構成する画素の補正に用いる上記補正割合として設定することを特徴とする請求項2または3に記載の画像処理装置。 A partial difference maximum value calculating means for calculating a maximum value among partial difference values that are difference values of luminance values between adjacent pixels in the image data;
Position detection means for detecting the position of the pixel constituting the correction target area in the correction target area based on the maximum value of the partial difference value;
The correction ratio setting means uses, for each pixel, a value based on the position for correcting the pixels constituting the correction target area when the maximum value of the partial difference values is equal to or greater than a predetermined threshold. 4. The image processing apparatus according to claim 2, wherein the correction ratio is set as the correction ratio.
上記部分差分値の最大値と上記部分差分値との差分値であるグラデーション検出値を、上記部分差分値ごとに算出するグラデーション検出値算出手段と、をさらに備えており、
上記補正割合設定手段は、上記部分差分値の最大値が予め定められた閾値以上である場合に、上記補正対象領域のうち上記部分差分値の算出対象とした上記画素ごとに、当該部分差分値に対応する上記グラデーション検出値に基づく値を、当該画素の補正に用いる上記補正割合として設定することを特徴とする請求項2から4のいずれか1項に記載の画像処理装置。 A partial difference maximum value calculating means for calculating a maximum value among partial difference values that are difference values of luminance values between adjacent pixels in the image data;
Gradation detection value calculating means for calculating, for each partial difference value, a gradation detection value that is a difference value between the maximum value of the partial difference value and the partial difference value;
When the maximum value of the partial difference value is equal to or greater than a predetermined threshold, the correction ratio setting unit performs the partial difference value for each pixel that is the calculation target of the partial difference value in the correction target region. 5. The image processing apparatus according to claim 2, wherein a value based on the gradation detection value corresponding to is set as the correction ratio used for correcting the pixel. 6.
上記画像データにおいて隣接する画素間の輝度値の差分の符号が変化した直前の画素から、次に変化する直前の画素までが3画素以上である区間を、エッジ領域として検出するエッジ領域検出工程と、
上記エッジ領域を構成する画素の輝度値の最大値と最小値との差分値である全体差分値が予め定められた閾値以上である場合に、上記エッジ領域を上記補正工程における補正対象領域として設定する補正対象領域設定工程と、
を含むことを特徴とする画像処理方法。 An image processing method including a correction step of correcting image data of an original image by a scaling process using a predetermined correction ratio,
An edge region detection step of detecting, as an edge region, a section in which there are three or more pixels from the pixel immediately before the change in the sign of the luminance value difference between adjacent pixels in the image data to the pixel immediately before the next change ,
The edge region is set as a correction target region in the correction step when an overall difference value that is a difference value between the maximum value and the minimum value of the luminance values of the pixels constituting the edge region is equal to or greater than a predetermined threshold value. Correction target area setting step to be performed,
An image processing method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007112356A JP2008271259A (en) | 2007-04-20 | 2007-04-20 | Image processor, image processing method, image processing program and recording medium which records the program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007112356A JP2008271259A (en) | 2007-04-20 | 2007-04-20 | Image processor, image processing method, image processing program and recording medium which records the program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008271259A true JP2008271259A (en) | 2008-11-06 |
Family
ID=40050167
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007112356A Pending JP2008271259A (en) | 2007-04-20 | 2007-04-20 | Image processor, image processing method, image processing program and recording medium which records the program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008271259A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019237837A1 (en) * | 2018-06-11 | 2019-12-19 | 京东方科技集团股份有限公司 | Image processing method and apparatus, and display device and computer storage medium |
-
2007
- 2007-04-20 JP JP2007112356A patent/JP2008271259A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019237837A1 (en) * | 2018-06-11 | 2019-12-19 | 京东方科技集团股份有限公司 | Image processing method and apparatus, and display device and computer storage medium |
US11380275B2 (en) | 2018-06-11 | 2022-07-05 | Chengdu Boe Optoelectronics Technology Co., Ltd. | Image processing method and device, display device and computer-readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9262684B2 (en) | Methods of image fusion for image stabilization | |
EP2059902B1 (en) | Method and apparatus for image enhancement | |
JP5257108B2 (en) | Projector, projection system, image display method, and image display program | |
JP5212380B2 (en) | Image correction apparatus, image correction program, and image correction method | |
KR102015926B1 (en) | Image processing apparatus, control method of image processing apparatus, and storage medium | |
JP5781370B2 (en) | Image processing apparatus, image processing method, image display apparatus including image processing apparatus, program, and recording medium | |
JP5072751B2 (en) | Image processing apparatus, image processing method, and program | |
JP2007104706A (en) | Image processing apparatus and image processing method | |
JP2009145991A (en) | Image processor, image processing method, program, and storage medium | |
JP2010066865A (en) | Difference extraction device and difference extraction program | |
US9589324B1 (en) | Overshoot protection of upscaled images | |
JP2007208723A (en) | Method and program for enhancing contour | |
JP4804271B2 (en) | Image processing apparatus and control method thereof | |
JP2008271259A (en) | Image processor, image processing method, image processing program and recording medium which records the program | |
JP5245991B2 (en) | BRIGHTNESS CORRECTION PROGRAM, BRIGHTNESS CORRECTION METHOD, AND BRIGHTNESS CORRECTION DEVICE | |
US20160110854A1 (en) | Image processing apparatus, image processing method, and program | |
WO2014034242A1 (en) | Image processing device, and method and program for image processing | |
JP2008219119A (en) | Image processing apparatus and program | |
JP2011090431A (en) | Image processor, printing system, image processing method, and program | |
JP4114319B2 (en) | Image correction apparatus, image correction method, and computer-readable recording medium storing image correction program | |
JP2009182935A (en) | Image processor and image processing method, program, and recording medium | |
JP5350497B2 (en) | Motion detection device, control program, and integrated circuit | |
JP2009010819A (en) | Image discriminating apparatus and method, and program | |
JP2010026690A (en) | Image processing device | |
JP5267277B2 (en) | Range correction program, range correction method, and range correction apparatus |