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

JP4156469B2 - Edge detection apparatus and method, profile determination apparatus and method, and program - Google Patents

Edge detection apparatus and method, profile determination apparatus and method, and program Download PDF

Info

Publication number
JP4156469B2
JP4156469B2 JP2003293486A JP2003293486A JP4156469B2 JP 4156469 B2 JP4156469 B2 JP 4156469B2 JP 2003293486 A JP2003293486 A JP 2003293486A JP 2003293486 A JP2003293486 A JP 2003293486A JP 4156469 B2 JP4156469 B2 JP 4156469B2
Authority
JP
Japan
Prior art keywords
pixels
adjacent
pixel
difference
differences
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003293486A
Other languages
Japanese (ja)
Other versions
JP2005063196A (en
Inventor
優子 阿部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Corp
Original Assignee
Fujifilm Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2003293486A priority Critical patent/JP4156469B2/en
Priority to US10/917,505 priority patent/US7764839B2/en
Publication of JP2005063196A publication Critical patent/JP2005063196A/en
Application granted granted Critical
Publication of JP4156469B2 publication Critical patent/JP4156469B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/403Edge-driven scaling; Edge-based scaling

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

本発明は、例えば画像データにより表される画像を拡大縮小するに際し、画像を構成する画素間に存在するエッジを検出するエッジ検出装置および方法、画像を構成する画素値のプロファイル形状を判定するプロファイル判定装置および方法並びにエッジ検出方法およびプロファイル判定方法をコンピュータに実行させるためのプログラムに関するものである。   The present invention relates to an edge detection apparatus and method for detecting edges existing between pixels constituting an image, and a profile for determining a profile shape of pixel values constituting an image, for example, when enlarging or reducing an image represented by image data The present invention relates to a determination apparatus and method, a program for causing a computer to execute an edge detection method and a profile determination method.

従来より、写真フイルムに記録された画像を光電的に読み取ることにより得られた画像データあるいはデジタルカメラやカメラ付き携帯電話等の撮像装置により被写体を撮像することにより得られた画像データを、それを再生するモニタのサイズに適合するように拡大縮小することが行われている。とくにカメラ付き携帯電話により被写体を撮像することにより得られた画像データを電子メールとして送信する際に、送信先の携帯電話が有する液晶モニタのサイズに応じて画像データを拡大縮小するサービスも提供されている。   Conventionally, image data obtained by photoelectrically reading an image recorded on a photographic film or image data obtained by imaging a subject with an imaging device such as a digital camera or a camera-equipped mobile phone is used as the image data. Enlargement and reduction are performed to fit the size of the monitor to be reproduced. In particular, when sending image data obtained by taking an image of a subject with a camera-equipped mobile phone as an e-mail, a service is also provided that scales the image data according to the size of the liquid crystal monitor of the destination mobile phone. ing.

このような画像データの拡大縮小は、画像データにより表される画像を構成する画素の間に拡大率に応じて新たな画素を補間することにより行われる。このように新たな画素を補間する方法としては、線形補間法、最近傍法、バイリニア法およびバイキュービック法等の各種方法が知られている。   Such enlargement / reduction of the image data is performed by interpolating new pixels according to the enlargement ratio between the pixels constituting the image represented by the image data. As methods for interpolating new pixels in this manner, various methods such as a linear interpolation method, a nearest neighbor method, a bilinear method, and a bicubic method are known.

しかしながら、単一の方法のみを用いて画像データを拡大縮小した場合、画像に含まれるエッジ部分にボケやシャギーが発生するという問題がある。このため、画像に含まれるエッジ成分を検出し、エッジ部分と非エッジ部分とで異なる処理により補間演算を行う方法が提案されている(特許文献1参照)。   However, when the image data is enlarged / reduced using only a single method, there is a problem that blur or shaggy occurs in an edge portion included in the image. For this reason, a method has been proposed in which an edge component included in an image is detected and an interpolation operation is performed by different processing between the edge portion and the non-edge portion (see Patent Document 1).

特許文献1に記載された方法等において画像からエッジを検出するためには、ソーベルフィルタやラプラシアンフィルタが一般的に用いられる。このようなソーベルフィルタやラプラシアンフィルタは、最短3タップの奇数タップ数を有し、フィルタリングにより注目画素がエッジであるか否かを判定することにより、エッジを検出することができる。
特開2002−319020号公報
In order to detect an edge from an image in the method described in Patent Document 1, a Sobel filter or a Laplacian filter is generally used. Such a Sobel filter or Laplacian filter has an odd number of taps of the shortest 3 taps, and can detect an edge by determining whether or not the pixel of interest is an edge by filtering.
JP 2002-312020 A

ところで、画像を拡大縮小する場合には、画素間に新たな画素を補間するため、画像に含まれる画素ではなく、画素の間にエッジがあるか否かを判定する必要がある。しかしながら、上述した奇数タップ数のフィルタを用いてエッジを検出する場合、画像中の注目画素そのものがエッジであるかどうかを判定することができるのみであり、画素間にエッジが存在するかどうかを判定することはできない。   By the way, when enlarging or reducing an image, since a new pixel is interpolated between pixels, it is necessary to determine whether or not there is an edge between pixels instead of the pixels included in the image. However, when an edge is detected using the above-described filter having an odd number of taps, it is only possible to determine whether the pixel of interest in the image itself is an edge, and whether an edge exists between pixels. It cannot be judged.

本発明は上記事情に鑑みなされたものであり、画像を構成する画素間に存在するエッジを検出できるようにすることを目的とする。   The present invention has been made in view of the above circumstances, and an object thereof is to be able to detect an edge existing between pixels constituting an image.

また、本発明は、画像を構成する画素値のプロファイル形状を判定できるようにすることを他の目的とする。   Another object of the present invention is to make it possible to determine a profile shape of pixel values constituting an image.

本発明による第1のエッジ検出装置は、画像上の隣接する2つの画素に対して差分フィルタによるフィルタリング処理を施して前記隣接する2つの画素の画素値の差分を得るフィルタリング手段と、
前記差分の絶対値が所定のしきい値以上であるか否かを判定し、該判定が肯定された場合に、前記隣接する2つの画素の間にエッジが存在すると判定する判定手段とを備えたことを特徴とするものである。
A first edge detection apparatus according to the present invention includes a filtering unit that performs a filtering process using a difference filter on two adjacent pixels on an image to obtain a difference between pixel values of the two adjacent pixels;
Determination means for determining whether or not the absolute value of the difference is equal to or greater than a predetermined threshold value, and determining that an edge exists between the two adjacent pixels when the determination is positive. It is characterized by that.

「差分フィルタ」とは、隣接する2つの画素の単純な差分を求めるフィルタのみならず、重み付け差分を求めることが可能なフィルタをも含む。具体的には、タップ数が偶数のフィルタ、例えばフィルタ値が(−1,1)の2タップのフィルタを用いることができる。   The “difference filter” includes not only a filter for obtaining a simple difference between two adjacent pixels but also a filter capable of obtaining a weighted difference. Specifically, a filter with an even number of taps, for example, a 2-tap filter with a filter value of (−1, 1) can be used.

本発明による第2のエッジ検出装置は、画像上の直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理を施して前記3つの画素ペアの画素値のそれぞれについての3つの1次差分を得、該3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ前記差分フィルタによるフィルタリング処理を施して2つの2次差分を得るフィルタリング手段と、
前記3つの1次差分および前記2つの2次差分の正負の関係に基づいて、前記直列に隣接する4つの画素の中央の2つの画素の間にエッジが存在するか否かを検出する検出手段とを備えたことを特徴とするものである。
The second edge detection apparatus according to the present invention performs a filtering process using a difference filter on each of three pixel pairs including two adjacent pixels included in four pixels adjacent in series on the image, and performs the process described above. Three primary differences are obtained for each of the pixel values of one pixel pair, and the filtering process by the difference filter is applied to each of the two adjacent primary difference pairs in the three primary differences to obtain two secondary Filtering means for obtaining a difference;
Detection means for detecting whether or not an edge exists between two central pixels of the four pixels adjacent in series based on a positive / negative relationship between the three primary differences and the two secondary differences It is characterized by comprising.

本発明による第3のエッジ検出装置は、画像上の直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理を施して前記3つの画素ペアの画素値のそれぞれについての3つの1次差分を得、該3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ前記差分フィルタによるフィルタリング処理を施して2つの2次差分を得る第1のフィルタリング手段と、
前記直列に隣接する4つの画素の中央の2つの画素に対して前記差分フィルタによるフィルタリング処理を施して前記中央の2つの画素の画素値の差分を得る第2のフィルタリング手段と、
前記3つの1次差分および前記2つの2次差分の正負の関係並びに前記中央の2つの画素の画素値の差分の絶対値が所定のしきい値以上であるか否かの判定結果に基づいて、前記中央の2つの画素の間にエッジが存在するか否かを検出する検出手段とを備えたことを特徴とするものである。
The third edge detection apparatus according to the present invention performs a filtering process using a difference filter on each of three pixel pairs including two adjacent pixels included in four pixels adjacent in series on the image, and performs the process described above. Three primary differences are obtained for each of the pixel values of one pixel pair, and the filtering process by the difference filter is applied to each of the two adjacent primary difference pairs in the three primary differences to obtain two secondary First filtering means for obtaining a difference;
Second filtering means for performing a filtering process by the difference filter on the two central pixels of the four pixels adjacent in series to obtain a difference between pixel values of the two central pixels;
Based on the positive / negative relationship between the three primary differences and the two secondary differences and the determination result of whether or not the absolute value of the difference between the pixel values of the two central pixels is equal to or greater than a predetermined threshold value. And detecting means for detecting whether or not an edge exists between the two central pixels.

本発明による第1のプロファイル判定装置は、画像上の画素において、直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理を施して前記3つの画素ペアの画素値のそれぞれについての3つの1次差分を得、該3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ前記差分フィルタによるフィルタリング処理を施して2つの2次差分を得るフィルタリング手段と、
前記3つの1次差分および前記2つの2次差分の正負の関係に基づいて、前記直列に隣接する4つの画素近傍の画素値のプロファイル形状を判定する判定手段とを備えたことを特徴とするものである。
The first profile determination device according to the present invention performs a filtering process using a difference filter on three pixel pairs including two adjacent pixels included in four pixels adjacent in series in the pixels on the image. Then, three primary differences are obtained for each of the pixel values of the three pixel pairs, and two adjacent primary difference pairs in the three primary differences are filtered by the difference filter, respectively. Filtering means for obtaining two secondary differences;
And determining means for determining profile shapes of pixel values in the vicinity of the four pixels adjacent in series based on a positive / negative relationship between the three primary differences and the two secondary differences. Is.

本発明による第2のプロファイル判定装置は、画像上の画素において、直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理を施して前記3つの画素ペアの画素値のそれぞれについての3つの1次差分を得、該3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ前記差分フィルタによるフィルタリング処理を施して2つの2次差分を得る第1のフィルタリング手段と、
前記直列に隣接する4つの画素の中央の2つの画素に対して差分フィルタによるフィルタリング処理を施して前記中央の2つの画素の画素値の差分を得る第2のフィルタリング手段と、
前記3つの1次差分および前記2つの2次差分の正負の関係並びに前記中央の2つの画素の画素値の差分の絶対値が所定のしきい値以上であるか否かの判定結果に基づいて、前記直列に隣接する4つの画素近傍の画素値のプロファイル形状を判定するプロファイル判定手段とを備えたことを特徴とするものである。
The second profile determination device according to the present invention performs a filtering process using a difference filter on three pixel pairs including two adjacent pixels included in four pixels adjacent in series in the pixels on the image. Then, three primary differences are obtained for each of the pixel values of the three pixel pairs, and two adjacent primary difference pairs in the three primary differences are filtered by the difference filter, respectively. First filtering means for obtaining two secondary differences;
Second filtering means for obtaining a difference between pixel values of the two central pixels by performing a filtering process using a differential filter on the two central pixels of the four pixels adjacent in series;
Based on the positive / negative relationship between the three primary differences and the two secondary differences and the determination result of whether or not the absolute value of the difference between the pixel values of the two central pixels is equal to or greater than a predetermined threshold value. And profile determination means for determining profile shapes of pixel values in the vicinity of the four pixels adjacent in series.

本発明による第1のエッジ検出方法は、画像上の隣接する2つの画素に対して差分フィルタによるフィルタリング処理を施して前記隣接する2つの画素の画素値の差分を得、
前記差分の絶対値が所定のしきい値以上であるか否かを判定し、該判定が肯定された場合に、前記隣接する2つの画素の間にエッジが存在すると判定することを特徴とするものである。
A first edge detection method according to the present invention obtains a difference between pixel values of two adjacent pixels by performing a filtering process using a difference filter on two adjacent pixels on an image,
It is determined whether or not the absolute value of the difference is equal to or greater than a predetermined threshold value, and when the determination is affirmative, it is determined that an edge exists between the two adjacent pixels. Is.

本発明による第2のエッジ検出方法は、画像上の直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理を施して前記3つの画素ペアの画素値のそれぞれについての3つの1次差分を得、該3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ前記差分フィルタによるフィルタリング処理を施して2つの2次差分を得、
前記3つの1次差分および前記2つの2次差分の正負の関係に基づいて、前記直列に隣接する4つの画素の中央の2つの画素の間にエッジが存在するか否かを検出することを特徴とするものである。
In the second edge detection method according to the present invention, a filtering process using a difference filter is performed on each of three pixel pairs including two pixels adjacent to each other included in four pixels adjacent in series on the image. Three primary differences are obtained for each of the pixel values of one pixel pair, and the filtering process by the difference filter is applied to each of the two adjacent primary difference pairs in the three primary differences to obtain two secondary Get the difference
Based on the positive / negative relationship between the three primary differences and the two secondary differences, it is detected whether an edge exists between the two central pixels of the four pixels adjacent in series. It is a feature.

本発明による第3のエッジ検出方法は、画像上の直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理を施して前記3つの画素ペアの画素値のそれぞれについての3つの1次差分を得、該3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ前記差分フィルタによるフィルタリング処理を施して2つの2次差分を得、
前記直列に隣接する4つの画素の中央の2つの画素に対して前記差分フィルタによるフィルタリング処理を施して前記中央の2つの画素の画素値の差分を得、
前記3つの1次差分および前記2つの2次差分の正負の関係並びに前記中央の2つの画素の画素値の差分の絶対値が所定のしきい値以上であるか否かの判定結果に基づいて、前記中央の2つの画素の間にエッジが存在するか否かを検出することを特徴とするものである。
In the third edge detection method according to the present invention, the three pixel pairs formed by two adjacent pixels included in the four pixels adjacent in series on the image are each subjected to a filtering process using a difference filter, and the 3 Three primary differences are obtained for each of the pixel values of one pixel pair, and the filtering process by the difference filter is applied to each of the two adjacent primary difference pairs in the three primary differences to obtain two secondary Get the difference
Applying a filtering process by the difference filter to the center two pixels of the four pixels adjacent in series to obtain a difference between pixel values of the center two pixels,
Based on the positive / negative relationship between the three primary differences and the two secondary differences and the determination result of whether or not the absolute value of the difference between the pixel values of the two central pixels is equal to or greater than a predetermined threshold value. , Detecting whether or not an edge exists between the two central pixels.

本発明による第1のプロファイル判定方法は、画像上の画素において、直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理を施して前記3つの画素ペアの画素値のそれぞれについての3つの1次差分を得、該3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ前記差分フィルタによるフィルタリング処理を施して2つの2次差分を得、
前記3つの1次差分および前記2つの2次差分の正負の関係に基づいて、前記直列に隣接する4つの画素近傍の画素値のプロファイル形状を判定することを特徴とするものである。
In the first profile determination method according to the present invention, a filtering process using a differential filter is performed on three pixel pairs each including two adjacent pixels included in four pixels adjacent in series in a pixel on an image. Then, three primary differences are obtained for each of the pixel values of the three pixel pairs, and two adjacent primary difference pairs in the three primary differences are filtered by the difference filter, respectively. Obtain two secondary differences,
A profile shape of pixel values in the vicinity of the four pixels adjacent in series is determined based on a positive / negative relationship between the three primary differences and the two secondary differences.

本発明による第2のプロファイル判定方法は、画像上の画素において、直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理を施して前記3つの画素ペアの画素値のそれぞれについての3つの1次差分を得、該3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ前記差分フィルタによるフィルタリング処理を施して2つの2次差分を得、
前記直列に隣接する4つの画素の中央の2つの画素に対して差分フィルタによるフィルタリング処理を施して前記中央の2つの画素の画素値の差分を得、
前記3つの1次差分および前記2つの2次差分の正負の関係並びに前記中央の2つの画素の画素値の差分の絶対値が所定のしきい値以上であるか否かの判定結果に基づいて、前記直列に隣接する4つの画素近傍の画素値のプロファイル形状を判定することを特徴とするものである。
In the second profile determination method according to the present invention, a filtering process using a difference filter is performed on each of three pixel pairs including two adjacent pixels included in four pixels adjacent in series. Then, three primary differences are obtained for each of the pixel values of the three pixel pairs, and two adjacent primary difference pairs in the three primary differences are filtered by the difference filter, respectively. Obtain two secondary differences,
Applying a filtering process using a difference filter to the center two pixels of the four pixels adjacent in series to obtain a difference between pixel values of the center two pixels,
Based on the positive / negative relationship between the three primary differences and the two secondary differences and the determination result of whether or not the absolute value of the difference between the pixel values of the two central pixels is equal to or greater than a predetermined threshold value. The profile shape of the pixel values in the vicinity of the four pixels adjacent in series is determined.

なお、本発明によるエッジ検出方法およびプロファイル判定方法をコンピュータに実行させるためのプログラムとして提供してもよい。   The edge detection method and profile determination method according to the present invention may be provided as a program for causing a computer to execute the method.

本発明の第1のエッジ検出装置および方法によれば、画像上の隣接する2つの画素に対して差分フィルタによるフィルタリング処理が施されて2つの画素の画素値の差分が得られ、この差分の絶対値が所定のしきい値以上であるか否かが判定される。ここで、隣接する2つの画素の画素値の差分の絶対値が大きい場合は、そこにエッジが存在すると見なすことができる。したがって、差分の絶対値が所定のしきい値以上であるか否かを判定することにより、画像の画素上ではなく、画素の間にエッジが存在するか否かを検出することができる。また、差分を算出しているのみであるため、簡易な演算により高速にエッジが存在するか否かを検出することができる。   According to the first edge detection apparatus and method of the present invention, a filtering process using a difference filter is performed on two adjacent pixels on an image to obtain a difference between pixel values of the two pixels. It is determined whether the absolute value is greater than or equal to a predetermined threshold value. Here, when the absolute value of the difference between the pixel values of two adjacent pixels is large, it can be considered that an edge exists there. Therefore, by determining whether or not the absolute value of the difference is greater than or equal to a predetermined threshold value, it is possible to detect whether or not there is an edge between pixels instead of on the pixels of the image. Further, since only the difference is calculated, it is possible to detect whether an edge exists at high speed by a simple calculation.

本発明の第2のエッジ検出装置および方法によれば、画像上の直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理が施されて3つの画素ペアの画素値のそれぞれについての3つの1次差分が得られる。さらに、3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ差分フィルタによるフィルタリング処理が施されて2つの2次差分が得られる。ここで、3つの1次差分および2つの2次差分の正負の値に応じて、直列に隣接する4つの画素の画素値のプロファイルを分類でき、3つの1次差分および2つの2次差分の正負の関係を見れば、直列に隣接する4つの画素のうちの中央の2つの画素の間にエッジが存在するか否かを判定できる。したがって、3つの1次差分および2つの2次差分の正負の関係に基づいて、直列に隣接する4つの画素の中央の2つの画素の間にエッジが存在するか否かを検出することにより、画像の画素上ではなく、画素の間にエッジが存在するか否かを検出することができる。また、差分を算出しているのみであるため、簡易な演算により高速にエッジが存在するか否かを検出することができる。   According to the second edge detection apparatus and method of the present invention, the filtering process by the difference filter is performed on each of the three pixel pairs including the two adjacent pixels included in the four pixels adjacent in series on the image. As a result, three primary differences are obtained for each of the pixel values of the three pixel pairs. Further, filtering processing using a difference filter is performed on two adjacent primary difference pairs in the three primary differences to obtain two secondary differences. Here, the profile of the pixel values of four pixels adjacent in series can be classified according to the positive and negative values of the three primary differences and the two secondary differences, and the three primary differences and the two secondary differences can be classified. If a positive / negative relationship is seen, it can be determined whether or not an edge exists between two central pixels of four pixels adjacent in series. Therefore, based on the positive / negative relationship between the three primary differences and the two secondary differences, by detecting whether there is an edge between the two central pixels of the four pixels adjacent in series, It is possible to detect whether there is an edge between pixels, not on the pixels of the image. Further, since only the difference is calculated, it is possible to detect whether an edge exists at high speed by a simple calculation.

本発明の第3のエッジ検出装置および方法によれば、画像上の直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理が施されて3つの画素ペアの画素値のそれぞれについての3つの1次差分が得られる。さらに、3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ差分フィルタによるフィルタリング処理が施されて2つの2次差分が得られる。また、直列に隣接する4つの画素のうちの中央の2つの画素に対して差分フィルタによるフィルタリング処理が施されて中央の2つの画素の画素値の差分が得られる。ここで、3つの1次差分および2つの2次差分の正負の値に応じて、直列に隣接する4つの画素値のプロファイルを分類でき、3つの1次差分および2つの2次差分の正負の関係を見れば、直列に隣接する4つの画素の中央の2つの画素の間にエッジが存在するか否かを判定できる。また、エッジが存在すると判定された場合において、中央の2つの画素の画素値の差分の絶対値が小さい場合にはそこにエッジが存在する確度は小さいが、差分の絶対値が大きい場合は、そこに真のエッジが存在すると見なすことができる。したがって、3つの1次差分および2つの2次差分の正負の関係並びに中央の2つの画素の画素値の差分の絶対値が所定のしきい値以上であるか否かの判定結果に基づいて、直列に隣接する4つの画素の中央の2つの画素の間にエッジが存在するか否かを検出することにより、画像の画素上ではなく、画素の間にエッジが存在するか否かを確実に検出することができる。また、差分を算出しているのみであるため、簡易な演算により高速にエッジが存在するか否かを検出することができる。   According to the third edge detection apparatus and method of the present invention, the filtering process by the difference filter is performed on each of the three pixel pairs including the two adjacent pixels included in the four pixels adjacent in series on the image. As a result, three primary differences are obtained for each of the pixel values of the three pixel pairs. Further, filtering processing using a difference filter is performed on two adjacent primary difference pairs in the three primary differences to obtain two secondary differences. Further, a filtering process using a difference filter is performed on two central pixels among four pixels adjacent in series to obtain a difference between pixel values of the two central pixels. Here, the profiles of four pixel values adjacent in series can be classified according to the positive and negative values of the three primary differences and the two secondary differences, and the positive and negative values of the three primary differences and the two secondary differences can be classified. From the relationship, it can be determined whether or not an edge exists between the two central pixels of four pixels adjacent in series. Also, when it is determined that an edge exists, if the absolute value of the difference between the pixel values of the two central pixels is small, the probability that the edge exists there is small, but if the absolute value of the difference is large, It can be assumed that there is a true edge there. Therefore, based on the positive / negative relationship between the three primary differences and the two secondary differences and the determination result of whether or not the absolute value of the difference between the pixel values of the two central pixels is equal to or greater than a predetermined threshold value, By detecting whether there is an edge between two pixels in the middle of four pixels adjacent in series, it is ensured that there is an edge between the pixels, not on the pixel of the image Can be detected. Further, since only the difference is calculated, it is possible to detect whether an edge exists at high speed by a simple calculation.

本発明の第1のプロファイル判定装置および方法によれば、画像上の直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理が施されて3つの画素ペアの画素値のそれぞれについての3つの1次差分が得られる。さらに、3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ差分フィルタによるフィルタリング処理が施されて2つの2次差分が得られる。ここで、3つの1次差分および2つの2次差分の正負の値に応じて、直列に隣接する4つの画素値のプロファイル形状を分類でき、3つの1次差分および2つの2次差分の正負の関係を見れば、直列に隣接する4つの画素値のプロファイル形状が、エッジであるかあるいはエッジではないかのように、どのような形状をなしているかを判定できる。したがって、3つの1次差分および2つの2次差分の正負の関係に基づいて、直列に隣接する4つの画素近傍のプロファイル形状を判定することにより、4つの画素近傍がエッジであるのか、エッジでないのか等を判定することができる。   According to the first profile determination apparatus and method of the present invention, the filtering process by the difference filter is performed on each of the three pixel pairs including the two adjacent pixels included in the four pixels adjacent in series on the image. As a result, three primary differences are obtained for each of the pixel values of the three pixel pairs. Further, filtering processing using a difference filter is performed on two adjacent primary difference pairs in the three primary differences to obtain two secondary differences. Here, the profile shapes of four pixel values adjacent in series can be classified according to the positive and negative values of the three primary differences and the two secondary differences, and the positive and negative of the three primary differences and the two secondary differences can be classified. From this relationship, it is possible to determine what shape the profile shape of the four pixel values adjacent in series is as an edge or not as an edge. Therefore, by determining the profile shape of four neighboring pixels in series based on the positive / negative relationship between the three primary differences and the two secondary differences, whether the four pixel neighborhoods are edges or not edges Or the like.

本発明の第2のプロファイル判定装置および方法によれば、画像上の直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理が施されて3つの画素ペアの画素値のそれぞれについての3つの1次差分が得られる。さらに、3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ差分フィルタによるフィルタリング処理が施されて2つの2次差分が得られる。また、直列に隣接する4つの画素の中央の2つの画素に対して差分フィルタによるフィルタリング処理が施されて中央の2つの画素の画素値の差分が得られる。ここで、3つの1次差分および2つの2次差分の正負の値に応じて、直列に隣接する4つの画素値のプロファイル形状を分類でき、3つの1次差分および2つの2次差分の正負の関係を見れば、直列に隣接する4つの画素値のプロファイル形状が、エッジであるかあるいはエッジではないかのように、どのような形状をなしているかを判定できる。また、プロファイル形状がエッジであると判定された場合において、中央の2つの画素の画素値の差分の絶対値が小さい場合にはそこにエッジが存在する確度は小さいが、差分の絶対値が大きい場合は、そこに真のエッジが存在することからプロファイル形状は真にエッジであると見なすことができる。したがって、3つの1次差分および2つの2次差分の正負の関係並びに中央の2つの画素の画素値の差分の絶対値が所定のしきい値以上であるか否かの判定結果に基づいて、直列に隣接する4つの画素近傍のプロファイル形状を判定することにより、4つの画素近傍がエッジであるのか、エッジでないのか等を確実に判定することができる。   According to the second profile determination apparatus and method of the present invention, the filtering process by the difference filter is performed on each of the three pixel pairs including the two adjacent pixels included in the four pixels adjacent in series on the image. As a result, three primary differences are obtained for each of the pixel values of the three pixel pairs. Further, filtering processing using a difference filter is performed on two adjacent primary difference pairs in the three primary differences to obtain two secondary differences. In addition, a filtering process using a difference filter is performed on two central pixels of four pixels adjacent in series to obtain a difference between pixel values of the two central pixels. Here, the profile shapes of four pixel values adjacent in series can be classified according to the positive and negative values of the three primary differences and the two secondary differences, and the positive and negative of the three primary differences and the two secondary differences can be classified. From this relationship, it is possible to determine what shape the profile shape of the four pixel values adjacent in series is as an edge or not as an edge. When the profile shape is determined to be an edge and the absolute value of the difference between the pixel values of the two central pixels is small, the probability that an edge exists there is small, but the absolute value of the difference is large. In this case, the profile shape can be regarded as a true edge because a true edge exists there. Therefore, based on the positive / negative relationship between the three primary differences and the two secondary differences and the determination result of whether or not the absolute value of the difference between the pixel values of the two central pixels is equal to or greater than a predetermined threshold value, By determining the profile shape in the vicinity of four pixels adjacent in series, it can be reliably determined whether the vicinity of the four pixels is an edge or not.

以下、本発明の実施形態について説明する。図1は本発明の第1の実施形態によるエッジ検出装置を適用した画像拡大縮小装置の構成を示す概略ブロック図である。図1に示すように、本発明の第1の実施形態による画像拡大縮小装置は、画像データS0および画像データS0の拡大率Kの入力を受け付ける入力部1、フィルタリング部2、判定部3、補間画素の画素値を算出する補間演算部4、並びに入力部1、フィルタリング部2、判定部3および補間演算部4の動作を制御する制御部5を備える。   Hereinafter, embodiments of the present invention will be described. FIG. 1 is a schematic block diagram showing the configuration of an image enlargement / reduction apparatus to which an edge detection apparatus according to a first embodiment of the present invention is applied. As shown in FIG. 1, the image enlargement / reduction apparatus according to the first embodiment of the present invention includes an input unit 1, a filtering unit 2, a determination unit 3, an interpolation unit that receives input of image data S0 and an enlargement factor K of the image data S0. An interpolation calculation unit 4 that calculates a pixel value of a pixel, and a control unit 5 that controls operations of the input unit 1, the filtering unit 2, the determination unit 3, and the interpolation calculation unit 4 are provided.

ここで、画像データS0により表される画像(以下画像についても同様に参照符号S0を用いる)は、図2に示すように2次元状に画素が並んで構成されてなるものであり、第1の実施形態および後述する他の実施形態においては、図2に示すようにx方向およびy方向を定めるものとする。   Here, the image represented by the image data S0 (hereinafter, the reference symbol S0 is also used for the image) is composed of two-dimensionally arranged pixels as shown in FIG. In this embodiment and other embodiments described later, the x direction and the y direction are defined as shown in FIG.

フィルタリング部2は、画像S0のx方向およびy方向のそれぞれについて一列毎に、拡大により補間される画素(以下補間画素Pとする)が間に位置する隣接する2つの画素に対して差分フィルタによるフィルタリング処理を施して2つの画素の画素値の差分d0を算出する。図3は差分フィルタの例を示す図である。図3に示すように、第1の実施形態のフィルタリング部2において使用される差分フィルタは、フィルタ値が(−1,1)の2タップのフィルタである。なお、差分フィルタはこれに限定されるものではなく、2つの画素値の重み付け差分を求めるフィルタ値を有するものや、2タップ以上の偶数タップ数を有するものを用いてもよい。   The filtering unit 2 uses a difference filter for two adjacent pixels between which pixels to be interpolated by enlargement (hereinafter referred to as interpolation pixels P) are located in each row in the x direction and the y direction of the image S0. A filtering process is performed to calculate the difference d0 between the pixel values of the two pixels. FIG. 3 is a diagram illustrating an example of the difference filter. As shown in FIG. 3, the difference filter used in the filtering unit 2 of the first embodiment is a 2-tap filter having a filter value of (−1, 1). Note that the difference filter is not limited to this, and a filter having a filter value for obtaining a weighted difference between two pixel values or a filter having an even number of taps of two or more taps may be used.

判定部3は、差分d0の絶対値が所定のしきい値Th1以上であるか否かを判定し、この判定が肯定されると差分d0を求めた隣接する2つの画素の間にエッジが存在すると判定し、判定結果を補間演算部4に出力する。   The determination unit 3 determines whether or not the absolute value of the difference d0 is greater than or equal to a predetermined threshold value Th1, and if this determination is affirmative, an edge exists between two adjacent pixels that have obtained the difference d0. Then, it is determined, and the determination result is output to the interpolation calculation unit 4.

補間演算部4は、判定部3の判定結果に基づいて、補間画素Pが間に位置する2つの隣接する画素の間がエッジであると判定された場合とエッジでないと判定された場合とで、それぞれ異なる演算により補間画素Pの画素値を算出する。具体的には、エッジでないと判定された場合はバイキュービック法を用いて補間画素Pの画素値を算出する。   Based on the determination result of the determination unit 3, the interpolation calculation unit 4 determines whether the interval between two adjacent pixels between which the interpolation pixel P is located is an edge or not. The pixel value of the interpolated pixel P is calculated by different calculations. Specifically, when it is determined that the pixel is not an edge, the pixel value of the interpolation pixel P is calculated using the bicubic method.

ここで、バイキュービック法は3次補間の一手法であり、補間画素Pの近傍の16画素を用いて補間画素Pの画素値を求める方法である。以下、バイキュービック法について説明する。   Here, the bicubic method is a method of cubic interpolation, and is a method of obtaining the pixel value of the interpolation pixel P using 16 pixels in the vicinity of the interpolation pixel P. Hereinafter, the bicubic method will be described.

図4はバイキュービック法を説明するための図である。図4に示すように点Pを補間画素Pの位置とした場合、図4中黒丸で示される画素は第1次近傍、白丸で示される画素は第2次近傍と称される。第1次近傍および第2次近傍のそれぞれについて、下記の式(1)に示すようにx方向およびy方向それぞれに独立に距離dx,dy(式(1)においては単にdと示す)に対して重みWx,Wyを求め、最終的にその画素に対する重みW=WxWyを得る。

Figure 0004156469
FIG. 4 is a diagram for explaining the bicubic method. As shown in FIG. 4, when the point P is set as the position of the interpolation pixel P, a pixel indicated by a black circle in FIG. 4 is referred to as a primary neighborhood, and a pixel indicated by a white circle is referred to as a secondary neighborhood. For each of the first-order neighborhood and the second-order neighborhood, as shown in the following equation (1), the distances dx and dy (simply indicated as d in the equation (1)) independently in the x direction and the y direction, respectively. The weights Wx and Wy are obtained, and finally the weight W = WxWy for the pixel is obtained.
Figure 0004156469

例えば、図4における(−1,−1)の画素(第2次近傍)に対して、重みWx,Wy,Wを求めると、

Figure 0004156469
For example, when the weights Wx, Wy, and W are obtained for the pixel (second order neighborhood) of (−1, −1) in FIG.
Figure 0004156469

となる。 It becomes.

そして、W(i,j)を画素(i,j)の重み、f(i,j)を画素(i,j)の画素値とすると、補間画素Pの画素値f′(P)は、

Figure 0004156469
When W (i, j) is the weight of the pixel (i, j) and f (i, j) is the pixel value of the pixel (i, j), the pixel value f ′ (P) of the interpolation pixel P is
Figure 0004156469

により算出することができる。 Can be calculated.

なお、第1の実施形態および後述する他の実施形態においては、バイキュービック法をx方向またはy方向の1次元方向にのみ適用して、補間画素Pの画素値を算出するものとする。   In the first embodiment and other embodiments described later, the pixel value of the interpolation pixel P is calculated by applying the bicubic method only in the one-dimensional direction of the x direction or the y direction.

一方、エッジであると判定された部分については、以下のようにして補間画素Pの画素値を求める。図5は、エッジであると判定された部分についての画素値のプロファイルを示す図である。なお、図5において、水平方向が画素が並ぶ方向であり、垂直方向が画素値の大きさを示す方向である。2つの隣接する画素G2,G3の間にエッジが存在すると判定された場合、その2つの画素にさらにそれぞれ隣接する2つの画素G1,G4を加えた直列に隣接する4つの画素G1〜G4の画素値のプロファイルは図5(a)または図5(b)に示すものとなる。   On the other hand, for the portion determined to be an edge, the pixel value of the interpolation pixel P is obtained as follows. FIG. 5 is a diagram illustrating a profile of pixel values for a portion determined to be an edge. In FIG. 5, the horizontal direction is the direction in which the pixels are arranged, and the vertical direction is the direction in which the magnitude of the pixel value is indicated. When it is determined that an edge exists between two adjacent pixels G2 and G3, two pixels G1 to G4 adjacent in series obtained by adding two adjacent pixels G1 and G4 to the two pixels, respectively. The value profile is as shown in FIG. 5 (a) or FIG. 5 (b).

プロファイルが図5(a)に示すステップエッジ形状をなす場合、画素が並ぶ方向において画素G2,G3間の距離を二等分する中線M(一点鎖線参照)を定め、中線Mの右側に補間画素(P1とする)が存在する場合には、画素G3,G4を結ぶ直線の延長線上の値を補間画素P1の画素値とする。また、中線Mの左側に補間画素(P2とする)が存在する場合には、画素G1,G2を結ぶ直線の延長線上の値を補間画素P2の画素値とする。   When the profile has the step edge shape shown in FIG. 5A, a middle line M (see the alternate long and short dash line) that bisects the distance between the pixels G2 and G3 in the direction in which the pixels are arranged is defined. When an interpolation pixel (referred to as P1) exists, the value on the extension line of the straight line connecting the pixels G3 and G4 is set as the pixel value of the interpolation pixel P1. When an interpolation pixel (P2) exists on the left side of the middle line M, the value on the extension line of the straight line connecting the pixels G1 and G2 is set as the pixel value of the interpolation pixel P2.

プロファイルが図5(b)に示すエッジ形状をなす場合、画素G1,G2を結ぶ直線の延長線と、画素G3,G4を結ぶ直線の延長線との交点Cを求める。そして、交点Cの右側に補間画素P1が存在する場合には、画素G3,G4を結ぶ直線の延長線上の値を補間画素P1の画素値とする。また、交点Cの左側に補間画素P2が存在する場合には、画素G1,G2を結ぶ直線の延長線上の値を補間画素P2の画素値とする。   When the profile has the edge shape shown in FIG. 5B, an intersection C between a straight line extension line connecting the pixels G1 and G2 and a straight line extension line connecting the pixels G3 and G4 is obtained. If the interpolation pixel P1 exists on the right side of the intersection C, the value on the extension line of the straight line connecting the pixels G3 and G4 is set as the pixel value of the interpolation pixel P1. When the interpolation pixel P2 exists on the left side of the intersection C, the value on the extension line of the straight line connecting the pixels G1 and G2 is set as the pixel value of the interpolation pixel P2.

なお、ここでは2つの画素の画素値のみを用いて補間画素Pの画素値を算出しているが、3以上の画素の画素値を用いてもよい。この場合、画素を直線で結ぶことが困難な場合がある。このため、スプライン曲線等の任意の関数により規定される曲線により画素を結び、その曲線の延長線上の値を補間画素Pの値とすればよい。   Here, the pixel value of the interpolation pixel P is calculated using only the pixel values of two pixels, but the pixel values of three or more pixels may be used. In this case, it may be difficult to connect the pixels with a straight line. For this reason, the pixels may be connected by a curve defined by an arbitrary function such as a spline curve, and the value on the extension line of the curve may be the value of the interpolation pixel P.

ここで、以降の説明において、エッジであると判定された場合の演算を第1の補間演算、エッジでないと判定された場合の演算を第2の補間演算と称する。   Here, in the following description, the calculation when it is determined to be an edge is referred to as a first interpolation calculation, and the calculation when it is determined not to be an edge is referred to as a second interpolation calculation.

次いで、第1の実施形態において行われる処理について説明する。図6は第1の実施形態において行われる処理を示すフローチャートである。なお、本実施形態においては、補間画素Pは、画像S0の画素の間に存在するものとする。まず、入力部1が拡大する画像データS0および画像データS0の拡大率Kの入力を受け付ける(ステップS1)。そして、画素を補間する方向をまずx方向に設定する(ステップS2)。次いで、拡大率Kに応じた最初の補間画素P(例えば拡大された画像データS1により表される画像(以下画像についても同様に参照符号S1を用いる)上左上に位置する画素)について、フィルタリング部2がその補間画素Pが間に位置する隣接する2つの画素に対して差分フィルタによるフィルタリング処理を施して差分d0を算出する(ステップS3)。   Next, processing performed in the first embodiment will be described. FIG. 6 is a flowchart showing processing performed in the first embodiment. In the present embodiment, it is assumed that the interpolation pixel P exists between the pixels of the image S0. First, the input unit 1 accepts input of the image data S0 to be enlarged and the enlargement factor K of the image data S0 (step S1). The direction for interpolating the pixels is first set in the x direction (step S2). Next, for the first interpolation pixel P corresponding to the enlargement factor K (for example, an image represented by the enlarged image data S1 (the pixel located in the upper left corner of the image hereinafter also using the reference symbol S1)), a filtering unit 2 calculates a difference d0 by applying a filtering process using a difference filter to two adjacent pixels between which the interpolated pixel P is located (step S3).

そして、判定部3が差分d0の絶対値がしきい値Th1以上であるか否かを判定する(ステップS4)。ステップS4が肯定されると、差分d0を求めた隣接する2つの画素の間にエッジが存在するものとして、補間演算部4は上記第1の補間演算により補間画素Pの画素値を算出する(ステップS5)。一方、ステップS4が否定されると、差分d0を求めた隣接する2つの画素の間にエッジが存在しないものとして、補間演算部4は上記第2の補間演算により補間画素Pの画素値を算出する(ステップS6)。   And the determination part 3 determines whether the absolute value of the difference d0 is more than threshold value Th1 (step S4). If step S4 is affirmed, the interpolation calculation unit 4 calculates the pixel value of the interpolation pixel P by the first interpolation calculation, assuming that an edge exists between two adjacent pixels for which the difference d0 has been obtained ( Step S5). On the other hand, if step S4 is negative, the interpolation calculation unit 4 calculates the pixel value of the interpolation pixel P by the second interpolation calculation, assuming that no edge exists between the two adjacent pixels for which the difference d0 is obtained. (Step S6).

そして、制御部5が全ての補間画素Pについて画素値を算出したか否かを判定し(ステップS7)、ステップS7が否定されると、画素値を算出する補間画素Pを次の補間画素Pに設定し(ステップS8)、ステップS3に戻る。   Then, the control unit 5 determines whether or not the pixel values have been calculated for all the interpolation pixels P (step S7). If step S7 is negative, the interpolation pixel P for calculating the pixel value is changed to the next interpolation pixel P. (Step S8), and the process returns to step S3.

ステップS7が肯定されると、y方向についても全ての補間画素Pについて画素値を算出したか否かを判定する(ステップS9)。ステップS9が否定されると、補間方向をy方向に設定し(ステップS10)、ステップS3に戻る。ステップS9が肯定されると、補間画素Pからなる拡大された画像データS1を出力し(ステップS11)、処理を終了する。   If step S7 is affirmed, it is determined whether or not pixel values have been calculated for all interpolation pixels P in the y direction (step S9). If step S9 is negative, the interpolation direction is set to the y direction (step S10), and the process returns to step S3. When step S9 is affirmed, the enlarged image data S1 including the interpolation pixel P is output (step S11), and the process is terminated.

このように第1の実施形態においては、画像上の隣接する2つの画素の画素値の差分d0の絶対値がしきい値Th以上である場合は、そこにエッジが存在すると見なすようにしたため、画像S0の画素上ではなく、画素の間にエッジが存在するか否かを検出することができる。また、差分d0を算出しているのみであるため、簡易な演算により高速にエッジが存在するか否かを検出することができる。   As described above, in the first embodiment, when the absolute value of the difference d0 between two adjacent pixels on the image is greater than or equal to the threshold Th, it is considered that an edge exists there. It is possible to detect whether there is an edge between pixels, not on the pixels of the image S0. Further, since only the difference d0 is calculated, it is possible to detect whether or not an edge exists at high speed by a simple calculation.

次いで、本発明の第2の実施形態について説明する。図7は本発明の第2の実施形態によるエッジ検出装置を適用した画像拡大縮小装置の構成を示す概略ブロック図である。図7に示すように、本発明の第2の実施形態による画像拡大縮小装置は、画像データS0および画像データS0の拡大率Kの入力を受け付ける入力部11、フィルタリング部12、判定部13、補間画素Pの画素値を算出する補間演算部14、並びに入力部11、フィルタリング部12、判定部13および補間演算部14の動作を制御する制御部15を備える。   Next, a second embodiment of the present invention will be described. FIG. 7 is a schematic block diagram showing a configuration of an image enlargement / reduction apparatus to which the edge detection apparatus according to the second embodiment of the present invention is applied. As shown in FIG. 7, the image enlargement / reduction apparatus according to the second embodiment of the present invention includes an input unit 11, a filtering unit 12, a determination unit 13, and an interpolation that receive input of image data S0 and an enlargement factor K of the image data S0. An interpolation calculation unit 14 that calculates the pixel value of the pixel P, and a control unit 15 that controls operations of the input unit 11, the filtering unit 12, the determination unit 13, and the interpolation calculation unit 14 are provided.

フィルタリング部12は、以下のようにしてフィルタリング処理を行う。図8は第2の実施形態におけるフィルタリング部12において行われるフィルタリング処理を説明するための図である。フィルタリング部12は、画像S0のx方向およびy方向のそれぞれについて一列毎に、補間画素Pが間に位置する隣接する2つの画素G2,G3およびこの2つの画素G2,G3のそれぞれに隣接する2つの画素G1,G4からなる直列に隣接する4つの画素G1〜G4について、互いに隣接する2つの画素からなる3つの画素ペアG1,G2、画素ペアG2,G3および画素ペアG3,G4に対して図3に示す差分フィルタによるフィルタリング処理を施して、画素ペアG1,G2、画素ペアG2,G3および画素ペアG3,G4の画素値の差分を1次差分d1,d2,d3として算出する。   The filtering unit 12 performs a filtering process as follows. FIG. 8 is a diagram for explaining a filtering process performed in the filtering unit 12 according to the second embodiment. The filtering unit 12 is adjacent to each of two adjacent pixels G2 and G3 between which the interpolation pixel P is located and each of the two pixels G2 and G3 for each column in the x direction and the y direction of the image S0. For four pixels G1 to G4 that are adjacent to each other in series, each consisting of two pixels G1 and G4, a diagram is shown for three pixel pairs G1 and G2, pixel pairs G2 and G3, and pixel pairs G3 and G4 each consisting of two adjacent pixels. The difference filter of the pixel value of pixel pair G1, G2, pixel pair G2, G3, and pixel pair G3, G4 is calculated as primary difference d1, d2, d3 by performing the filtering process by the difference filter shown in FIG.

続いて、フィルタリング部12は、3つの1次差分d1,d2,d3における隣接する2つの1次差分ペアd1,d2および1次差分ペアd2,d3に対して、同様に差分フィルタによるフィルタリング処理を施して、1次差分ペアd1,d2およびd2,d3の差分を2次差分d4,d5として算出する。   Subsequently, the filtering unit 12 similarly performs a filtering process using a difference filter on two adjacent primary difference pairs d1, d2 and primary difference pairs d2, d3 in the three primary differences d1, d2, d3. The difference between the primary difference pairs d1, d2 and d2, d3 is calculated as secondary differences d4, d5.

判定部13は、1次差分d1,d2,d3および2次差分d4,d5の正負の関係に基づいて、隣接する2つの画素G2,G3の間にエッジが存在するか否かを判定し、判定結果を補間演算部14に出力する。   The determination unit 13 determines whether an edge exists between two adjacent pixels G2 and G3 based on the positive / negative relationship between the primary differences d1, d2, and d3 and the secondary differences d4 and d5, The determination result is output to the interpolation calculation unit 14.

図9から図11は、直列に隣接する4つの画素の1次差分d1,d2,d3および2次差分d4,d5の正負と、直列に隣接する4つの画素のプロファイル形状との関係を示す表である。直列に隣接する4つの画素の1次差分d1,d2,d3および2次差分d4,d5の正負は全18種類の組み合わせがある。隣接する2つの画素G2,G3の間にエッジが存在する組み合わせは、図9に示すエッジ1およびエッジ2の2通りある。エッジ1は第1の実施形態における図5(a)に対応するものであり、(d1,d2,d3,d4,d5)=(+,+,+,+,−)となる右上がりエッジおよび(d1,d2,d3,d4,d5)=(−,−,−,−,+)となる左上がりエッジの2種類がある。エッジ2は第1の実施形態における図5(b)に対応するものであり、(d1,d2,d3,d4,d5)=(+,+,+,+,+)となる下に凸の右上がりエッジ、(d1,d2,d3,d4,d5)=(+,+,+,−,−)となる上に凸の右上がりエッジ、(d1,d2,d3,d4,d5)=(−,−,−,+,+)となる下に凸の左上がりエッジ、(d1,d2,d3,d4,d5)=(−,−,−,−,−)となる上に凸の左上がりエッジの4種類がある。   9 to 11 are tables showing the relationship between the positive / negative of the primary differences d1, d2, d3 and the secondary differences d4, d5 of the four pixels adjacent in series and the profile shape of the four pixels adjacent in series. It is. There are a total of 18 combinations of positive and negative of the primary differences d1, d2, d3 and the secondary differences d4, d5 of four pixels adjacent in series. There are two combinations of edge 1 and edge 2 shown in FIG. 9 in which an edge exists between two adjacent pixels G2 and G3. The edge 1 corresponds to FIG. 5A in the first embodiment, and a right rising edge and (d1, d2, d3, d4, d5) = (+, +, +, +, −) and There are two types of left rising edges where (d1, d2, d3, d4, d5) = (−, −, −, −, +). The edge 2 corresponds to FIG. 5B in the first embodiment, and is convex downward such that (d1, d2, d3, d4, d5) = (+, +, +, +, +). Upwardly rising edge where (d1, d2, d3, d4, d5) = (+, +, +, −, −), (d1, d2, d3, d4, d5) = ( Downward convex left rising edge that becomes −, −, −, +, +), and upward convex leftward that becomes (d1, d2, d3, d4, d5) = (−, −, −, −, −) There are four types of rising edges.

判定部13は、図9から図11に示す表を記憶しており、直列に隣接する4つの画素の1次差分d1,d2,d3および2次差分d4,d5の正負の関係が、図9に示すエッジ1およびエッジ2の関係となる場合に、隣接する2つの画素G2,G3の間にエッジが存在すると判定する。また、直列に隣接する4つの画素の1次差分d1,d2,d3および2次差分d4,d5の正負の関係が、図10および図11に示す山、谷およびその他の関係となる場合に、隣接する2つの画素G2,G3の間にエッジが存在しないと判定する。   The determination unit 13 stores the tables shown in FIGS. 9 to 11, and the positive / negative relationship between the primary differences d1, d2, d3 and the secondary differences d4, d5 of four pixels adjacent in series is shown in FIG. When the relationship between the edge 1 and the edge 2 shown in FIG. 2 is established, it is determined that an edge exists between two adjacent pixels G2 and G3. Further, when the positive / negative relationship of the primary differences d1, d2, d3 and the secondary differences d4, d5 of the four pixels adjacent in series is the peak, valley, and other relationships shown in FIGS. 10 and 11, It is determined that no edge exists between two adjacent pixels G2 and G3.

補間演算部14は、第1の実施形態における補間演算部4と同様に、補間画素Pが間に位置する2つの隣接する画素の間がエッジであると判定された場合に第1の補間演算を行い、エッジでないと判定された場合に第2の補間演算を行って補間画素Pの画素値を算出する。   Similar to the interpolation calculation unit 4 in the first embodiment, the interpolation calculation unit 14 performs the first interpolation calculation when it is determined that an edge is between two adjacent pixels between which the interpolation pixel P is located. When it is determined that the pixel is not an edge, the second interpolation calculation is performed to calculate the pixel value of the interpolation pixel P.

次いで、第2の実施形態において行われる処理について説明する。図12は第2の実施形態において行われる処理を示すフローチャートである。なお、第2の実施形態においても第1の実施形態と同様に、補間画素Pは画像S0の画素の間に存在するものとする。まず、入力部11が拡大する画像データS0および画像データS0の拡大率Kの入力を受け付ける(ステップS21)。そして、画素を補間する方向をまずx方向に設定する(ステップS22)。次いで、拡大率Kに応じた最初の補間画素P(例えば画像S1上左上に位置する画素)について、フィルタリング部12がその補間画素Pが間に位置する直列に隣接する4つの画素G1〜G4から1次差分d1,d2,d3および2次差分d4,d5を算出する(ステップS23)。   Next, processing performed in the second embodiment will be described. FIG. 12 is a flowchart showing processing performed in the second embodiment. In the second embodiment, it is assumed that the interpolation pixel P exists between the pixels of the image S0 as in the first embodiment. First, the input unit 11 receives input of the image data S0 to be enlarged and the enlargement factor K of the image data S0 (step S21). The direction for interpolating the pixels is first set in the x direction (step S22). Next, for the first interpolation pixel P corresponding to the enlargement factor K (for example, the pixel located in the upper left of the image S1), the filtering unit 12 starts from the four pixels G1 to G4 adjacent in series where the interpolation pixel P is located. The primary differences d1, d2, d3 and the secondary differences d4, d5 are calculated (step S23).

そして、判定部13が1次差分d1,d2,d3および2次差分d4,d5の正負の関係に基づいて、補間画素Pが間に位置する隣接する2つの画素G2,G3の間にエッジが存在するか否かを判定する(ステップS24)。ステップS24が肯定されると、補間演算部14は判定部13の判定結果に基づいて、上記第1の補間演算により補間画素Pの画素値を算出する(ステップS25)。一方、ステップS24が否定されると、補間演算部14は判定部13の判定結果に基づいて、上記第2の補間演算により補間画素Pの画素値を算出する(ステップS26)。   Then, based on the positive / negative relationship between the primary differences d1, d2, d3 and the secondary differences d4, d5, the determination unit 13 has an edge between two adjacent pixels G2, G3 between which the interpolation pixel P is located. It is determined whether or not it exists (step S24). If step S24 is positive, the interpolation calculation unit 14 calculates the pixel value of the interpolation pixel P by the first interpolation calculation based on the determination result of the determination unit 13 (step S25). On the other hand, if step S24 is negative, the interpolation calculation unit 14 calculates the pixel value of the interpolation pixel P by the second interpolation calculation based on the determination result of the determination unit 13 (step S26).

そして、制御部15が全ての補間画素Pについて画素値を算出したか否かを判定し(ステップS27)、ステップS27が否定されると、画素値を算出する補間画素Pを次の補間画素Pに設定し(ステップS28)、ステップS23に戻る。   Then, the control unit 15 determines whether or not the pixel values have been calculated for all the interpolation pixels P (step S27). If step S27 is negative, the interpolation pixel P for calculating the pixel value is changed to the next interpolation pixel P. (Step S28), and the process returns to step S23.

ステップS27が肯定されると、y方向についても全ての補間画素Pについて画素値を算出したか否かを判定する(ステップS29)。ステップS29が否定されると、補間方向をy方向に設定し(ステップS30)、ステップS23に戻る。ステップS29が肯定されると、補間画素Pからなる拡大された画像データS1を出力し(ステップS31)、処理を終了する。   If step S27 is affirmed, it is determined whether or not pixel values have been calculated for all interpolation pixels P in the y direction (step S29). If step S29 is negative, the interpolation direction is set to the y direction (step S30), and the process returns to step S23. When step S29 is affirmed, the enlarged image data S1 including the interpolation pixel P is output (step S31), and the process is terminated.

このように第2の実施形態においては、1次差分d1,d2,d3および2次差分d4,d5の正負の関係に基づいて、補間画素Pが間に位置する隣接する2つの画素G2,G3の間にエッジが存在するか否かを判定するようにしたため、画像S0の画素上ではなく、画素の間にエッジが存在するか否かを検出することができる。また、差分d1,d2,d3,d4,d5を算出しているのみであるため、簡易な演算により高速にエッジが存在するか否かを検出することができる。   As described above, in the second embodiment, based on the positive / negative relationship between the primary differences d1, d2, d3 and the secondary differences d4, d5, two adjacent pixels G2, G3 between which the interpolation pixel P is located. Since it is determined whether or not there is an edge between them, it is possible to detect whether or not there is an edge between pixels instead of on the pixel of the image S0. Further, since only the differences d1, d2, d3, d4, and d5 are calculated, it is possible to detect whether or not an edge exists at high speed by a simple calculation.

次いで、本発明の第3の実施形態について説明する。図13は本発明の第3の実施形態によるエッジ検出装置を適用した画像拡大縮小装置の構成を示す概略ブロック図である。図13に示すように、本発明の第3の実施形態による画像拡大縮小装置は、画像データS0および画像データS0の拡大率Kの入力を受け付ける入力部21、第1および第2のフィルタリング部22A,22B、判定部23、補間画素Pの画素値を算出する補間演算部24、並びに入力部21、第1および第2のフィルタリング部22A,22B、判定部23および補間演算部24の動作を制御する制御部25を備える。   Next, a third embodiment of the present invention will be described. FIG. 13 is a schematic block diagram showing a configuration of an image enlargement / reduction apparatus to which an edge detection apparatus according to the third embodiment of the present invention is applied. As shown in FIG. 13, the image enlargement / reduction apparatus according to the third embodiment of the present invention includes an input unit 21 that receives input of the image data S0 and the enlargement factor K of the image data S0, and the first and second filtering units 22A. , 22B, the determination unit 23, the interpolation calculation unit 24 that calculates the pixel value of the interpolation pixel P, and the operations of the input unit 21, the first and second filtering units 22A and 22B, the determination unit 23, and the interpolation calculation unit 24 are controlled. The control unit 25 is provided.

第1のフィルタリング部22Aは、上記第2の実施形態におけるフィルタリング部12と同様にして、補間画素Pが間に位置する隣接する2つの画素G2,G3およびこの2つの画素のそれぞれに隣接する2つの画素G1,G4からなる直列に隣接する4つの画素G1〜G4に対してフィルタリング処理を行い、1次差分d1,d2,d3および2次差分d4,d5を算出する。   In the same manner as the filtering unit 12 in the second embodiment, the first filtering unit 22A has two adjacent pixels G2 and G3 between which the interpolation pixel P is located and two adjacent to the two pixels. Filtering processing is performed on four pixels G1 to G4 that are adjacent in series, each consisting of two pixels G1 and G4, to calculate primary differences d1, d2, and d3 and secondary differences d4 and d5.

第2のフィルタリング部22Bは、上記第1の実施形態におけるフィルタリング部2と同様にして、直列に隣接する4つの画素G1〜G4の中央の2つの画素G2,G3に対してフィルタリング処理を行い、画素G2,G3の画素値の差分d0(=d2)を算出する。   The second filtering unit 22B performs the filtering process on the two central pixels G2 and G3 of the four pixels G1 to G4 adjacent in series in the same manner as the filtering unit 2 in the first embodiment. A difference d0 (= d2) between pixel values of the pixels G2 and G3 is calculated.

判定部23は、上記第2の実施形態における判定部13と同様に、第1のフィルタリング部22Aが算出した1次差分d1,d2,d3および2次差分d4,d5の正負の関係に基づいて、隣接する2つの画素G2,G3の間にエッジが存在するか否かを判定する(第1の判定)。すなわち、直列に隣接する4つの画素の1次差分d1,d2,d3および2次差分d4,d5の正負の関係が、図9に示すエッジ1およびエッジ2の関係となる場合に、隣接する2つの画素G2,G3の間にエッジが存在すると判定する。また、直列に隣接する4つの画素の1次差分d1,d2,d3および2次差分d4,d5の正負の関係が、図10および図11に示す山、谷およびその他の関係となる場合に、隣接する2つの画素G2,G3の間にエッジが存在しないと判定する。   Similar to the determination unit 13 in the second embodiment, the determination unit 23 is based on the positive / negative relationship between the primary differences d1, d2, d3 and the secondary differences d4, d5 calculated by the first filtering unit 22A. Then, it is determined whether or not an edge exists between two adjacent pixels G2 and G3 (first determination). That is, when the positive / negative relationship between the primary differences d1, d2, d3 and the secondary differences d4, d5 of the four pixels adjacent in series is the relationship between the edge 1 and the edge 2 shown in FIG. It is determined that an edge exists between the two pixels G2 and G3. Further, when the positive / negative relationship of the primary differences d1, d2, d3 and the secondary differences d4, d5 of the four pixels adjacent in series is the peak, valley, and other relationships shown in FIGS. 10 and 11, It is determined that no edge exists between two adjacent pixels G2 and G3.

さらに判定部23は、エッジが存在すると判定された場合に、上記第1の実施形態における判定部3と同様に、画素G2,G3の画素値の差分d0の絶対値が所定のしきい値Th1以上であるか否かを判定し(第2の判定)、第2の判定が肯定されると、そこに真にエッジが存在すると判定する。一方、第2の判定が否定されるとそこにはエッジは存在しないものと判定する。このように第2の判定を行うのは、第1の判定においてエッジが存在すると判定されても、例えば図14に示すように、画素G2,G3の画素値の差が非常にわずかでノイズと見なせるような場合に、そこがエッジであるとして補間演算部24が第1の補間演算を行い、かえってノイズが強調されてしまうことを防止するためである。そして、判定部23は、判定結果を補間演算部24に出力する。   Further, when it is determined that an edge is present, the determination unit 23 determines that the absolute value of the difference d0 between the pixel values of the pixels G2 and G3 is a predetermined threshold Th1, as in the determination unit 3 in the first embodiment. It is determined whether or not this is the case (second determination), and if the second determination is affirmed, it is determined that an edge exists truly. On the other hand, if the second determination is negative, it is determined that there is no edge there. In this way, the second determination is performed even if it is determined in the first determination that an edge is present, for example, as shown in FIG. This is to prevent the noise from being emphasized on the contrary when the interpolation calculation unit 24 performs the first interpolation calculation assuming that the edge is an edge. Then, the determination unit 23 outputs the determination result to the interpolation calculation unit 24.

補間演算部24は、第1の実施形態における補間演算部4と同様に、補間画素Pが間に位置する2つの隣接する画素の間がエッジであると判定された場合に第1の補間演算を行い、エッジでないと判定された場合に第2の補間演算を行って補間画素Pの画素値を算出する。   Similar to the interpolation calculation unit 4 in the first embodiment, the interpolation calculation unit 24 performs the first interpolation calculation when it is determined that an edge is between two adjacent pixels located between the interpolation pixels P. When it is determined that the pixel is not an edge, the second interpolation calculation is performed to calculate the pixel value of the interpolation pixel P.

次いで、第3の実施形態において行われる処理について説明する。図15は第3の実施形態において行われる処理を示すフローチャートである。なお、第3の実施形態においても第1の実施形態と同様に、補間画素Pは画像S0の画素の間に存在するものとする。まず、入力部21が拡大する画像データS0および画像データS0の拡大率Kの入力を受け付ける(ステップS41)。そして、画素を補間する方向をまずx方向に設定する(ステップS42)。次いで、拡大率Kに応じた最初の補間画素P(例えば画像S1上左上に位置する画素)について、第1のフィルタリング部22Aがその補間画素Pが間に位置する直列に隣接する4つの画素G1〜G4から1次差分d1,d2,d3および2次差分d4,d5を算出する(ステップS43)。また、第2のフィルタリング部22Bが画素G2,G3に対して差分フィルタによるフィルタリング処理を施して差分d0を算出する(ステップS44)。   Next, processing performed in the third embodiment will be described. FIG. 15 is a flowchart showing processing performed in the third embodiment. In the third embodiment, it is assumed that the interpolation pixel P exists between the pixels of the image S0 as in the first embodiment. First, the input unit 21 receives input of the image data S0 to be enlarged and the enlargement factor K of the image data S0 (step S41). The direction for interpolating the pixels is first set in the x direction (step S42). Next, for the first interpolation pixel P corresponding to the enlargement factor K (for example, the pixel located in the upper left of the image S1), the first filtering unit 22A has four pixels G1 adjacent in series with the interpolation pixel P positioned therebetween. The primary differences d1, d2, d3 and the secondary differences d4, d5 are calculated from -G4 (step S43). Further, the second filtering unit 22B performs a filtering process using a difference filter on the pixels G2 and G3 to calculate the difference d0 (step S44).

そして、判定部23が1次差分d1,d2,d3および2次差分d4,d5の正負の関係に基づいて、補間画素Pが間に位置する隣接する2つの画素G2,G3の間にエッジが存在するか否かを判定する(第1の判定、ステップS45)。ステップS45が肯定されると、判定部23が差分d0の絶対値がしきい値Th1以上であるか否かを判定する(第2の判定、ステップS46)。   Then, based on the positive / negative relationship between the primary differences d1, d2, d3 and the secondary differences d4, d5, the determination unit 23 detects an edge between two adjacent pixels G2, G3 between which the interpolation pixel P is located. It is determined whether or not it exists (first determination, step S45). If step S45 is positive, the determination unit 23 determines whether or not the absolute value of the difference d0 is greater than or equal to the threshold value Th1 (second determination, step S46).

ステップS46が肯定されると、補間演算部24は判定部23の判定結果に基づいて、上記第1の補間演算により補間画素Pの画素値を算出する(ステップS47)。一方、ステップS45およびステップS46が否定されると、補間演算部24は判定部23の判定結果に基づいて、上記第2の補間演算により補間画素Pの画素値を算出する(ステップS48)。   When step S46 is affirmed, the interpolation calculation unit 24 calculates the pixel value of the interpolation pixel P by the first interpolation calculation based on the determination result of the determination unit 23 (step S47). On the other hand, when step S45 and step S46 are denied, the interpolation calculation part 24 calculates the pixel value of the interpolation pixel P by the said 2nd interpolation calculation based on the determination result of the determination part 23 (step S48).

そして、制御部25が全ての補間画素Pについて画素値を算出したか否かを判定し(ステップS49)、ステップS49が否定されると、画素値を算出する補間画素Pを次の補間画素Pに設定し(ステップS50)、ステップS43に戻る。   Then, the control unit 25 determines whether or not the pixel values have been calculated for all the interpolation pixels P (step S49). If step S49 is negative, the interpolation pixel P for calculating the pixel value is changed to the next interpolation pixel P. (Step S50), and the process returns to step S43.

ステップS49が肯定されると、y方向についても全ての補間画素Pについて画素値を算出したか否かを判定する(ステップS51)。ステップS51が否定されると、補間方向をy方向に設定し(ステップS52)、ステップS43に戻る。ステップS51が肯定されると、補間画素Pからなる拡大された画像データS1を出力し(ステップS53)、処理を終了する。   If step S49 is affirmed, it is determined whether or not pixel values have been calculated for all interpolation pixels P in the y direction (step S51). If step S51 is negative, the interpolation direction is set to the y direction (step S52), and the process returns to step S43. When step S51 is affirmed, the enlarged image data S1 including the interpolation pixel P is output (step S53), and the process is terminated.

このように第3の実施形態においては、1次差分d1,d2,d3および2次差分d4,d5の正負の関係に基づいて、補間画素Pが間に位置する隣接する2つの画素G2,G3の間にエッジが存在するか否かを判定する第1の判定を行い、第1の判定が肯定されると、隣接する2つの画素G2,G3の画素値の差分d0の絶対値がしきい値Th以上であるか否かを判定する第2の判定を行い、第2の判定が肯定されると、そこに真にエッジが存在すると見なすようにしたため、画像S0の画素上ではなく、画素の間にエッジが存在するか否かを確実に検出することができる。また、差分d0,d1,d2,d3,d4,d5を算出しているのみであるため、簡易な演算により高速にエッジが存在するか否かを検出することができる。   Thus, in the third embodiment, based on the positive / negative relationship between the primary differences d1, d2, d3 and the secondary differences d4, d5, two adjacent pixels G2, G3 between which the interpolation pixel P is located. A first determination is made to determine whether or not an edge exists between the two, and if the first determination is affirmative, the absolute value of the difference d0 between the pixel values of two adjacent pixels G2 and G3 is a threshold. A second determination is made to determine whether or not the value Th is greater than or equal to the value Th, and if the second determination is affirmed, it is assumed that an edge is truly present there. It is possible to reliably detect whether an edge exists between the two. Further, since only the differences d0, d1, d2, d3, d4, and d5 are calculated, it is possible to detect whether or not an edge exists at high speed by a simple calculation.

次いで、本発明の第4の実施形態について説明する。図16は本発明の4の実施形態によるプロファイル判定装置の構成を示す概略ブロック図である。図16に示すように、本発明の第4の実施形態によるプロファイル判定装置は、画像データS0の入力を受け付ける入力部31、フィルタリング部32、判定部33、並びに入力部31、フィルタリング部32および判定部33の動作を制御する制御部35を備える。   Next, a fourth embodiment of the present invention will be described. FIG. 16 is a schematic block diagram showing a configuration of a profile determination device according to the fourth exemplary embodiment of the present invention. As shown in FIG. 16, the profile determination apparatus according to the fourth embodiment of the present invention includes an input unit 31, a filtering unit 32, a determination unit 33, and an input unit 31, a filtering unit 32, and a determination unit that receive input of image data S0. The control part 35 which controls operation | movement of the part 33 is provided.

フィルタリング部32は、上記第2の実施形態におけるフィルタリング部12と同様にして、補間画素Pが間に位置する隣接する2つの画素G2,G3およびこの2つの画素のそれぞれに隣接する2つの画素G1,G4からなる直列に隣接する4つの画素G1〜G4に対してフィルタリング処理を行い、1次差分d1,d2,d3および2次差分d4,d5を算出する。   In the same manner as the filtering unit 12 in the second embodiment, the filtering unit 32 includes two adjacent pixels G2 and G3 between which the interpolation pixel P is located, and two pixels G1 adjacent to each of the two pixels. , G4, the four adjacent pixels G1 to G4 are subjected to filtering processing to calculate primary differences d1, d2, d3 and secondary differences d4, d5.

判定部33は、1次差分d1,d2,d3および2次差分d4,d5の正負の関係に基づいて、図9から図11に示す表を参照して、直列に隣接する4つの画素G1〜G4の画素値のプロファイル形状が、エッジ1、エッジ2、山、谷およびその他のいずれであるか否かを判定し、判定結果R0を出力する。   Based on the positive / negative relationship between the primary differences d1, d2, d3 and the secondary differences d4, d5, the determination unit 33 refers to the tables shown in FIGS. It is determined whether the profile shape of the pixel value of G4 is edge 1, edge 2, mountain, valley, or the like, and a determination result R0 is output.

なお、判定結果R0は、画像S0上の画素の位置と対応づけて記録媒体に記録しておき、後で画像S0を拡大縮小する際にその判定結果R0を参照して、上記第1の実施形態と同様に、エッジであると判定された部分と、エッジでないと判定された部分とで異なる補間演算を行うようにすればよい。   Note that the determination result R0 is recorded on a recording medium in association with the position of the pixel on the image S0, and when the image S0 is scaled later, the determination result R0 is referred to to determine the first implementation. Similar to the embodiment, different interpolation calculations may be performed on a portion determined to be an edge and a portion determined not to be an edge.

次いで、第4の実施形態において行われる処理について説明する。図17は第4の実施形態において行われる処理を示すフローチャートである。まず、入力部11が画像データS0の入力を受け付ける(ステップS61)。そして、プロファイル形状を判定する方向をまずx方向に設定する(ステップS62)。次いで、プロファイル形状を判定する最初の画素(例えば画像S0上左上に位置する画素)について、フィルタリング部32がその画素を含む直列に隣接する4つの画素G1〜G4から1次差分d1,d2,d3および2次差分d4,d5を算出する(ステップS63)。そして、判定部33が1次差分d1,d2,d3および2次差分d4,d5の正負の関係に基づいて、図9から図11に示す表を参照して、直列に隣接する4つの画素のプロファイル形状が、エッジ1、エッジ2、山、谷およびその他のいずれであるかを判定し(ステップS64)、判定結果R0を出力する(ステップS65)。   Next, processing performed in the fourth embodiment will be described. FIG. 17 is a flowchart showing processing performed in the fourth embodiment. First, the input unit 11 receives an input of image data S0 (step S61). The direction for determining the profile shape is first set in the x direction (step S62). Next, with respect to the first pixel for determining the profile shape (for example, the pixel located in the upper left of the image S0), the filtering unit 32 calculates the primary differences d1, d2, d3 from the four adjacent pixels G1 to G4 including the pixel. And secondary differences d4 and d5 are calculated (step S63). Then, based on the positive / negative relationship between the primary differences d1, d2, d3 and the secondary differences d4, d5, the determination unit 33 refers to the tables shown in FIGS. It is determined whether the profile shape is edge 1, edge 2, mountain, valley, or other (step S64), and a determination result R0 is output (step S65).

そして、制御部35が全ての画素についてプロファイル形状を判定したか否かを判定し(ステップS66)、ステップS66が否定されると、プロファイル形状を判定する画素を次の画素に設定し(ステップS67)、ステップS63に戻る。   Then, the control unit 35 determines whether or not the profile shape has been determined for all the pixels (step S66). If step S66 is negative, the pixel for determining the profile shape is set as the next pixel (step S67). ), The process returns to step S63.

ステップS66が肯定されると、y方向についても全ての画素についてプロファイル形状を判定したか否かを判定する(ステップS68)。ステップS68が否定されると、プロファイル形状を判定する方向をy方向に設定し(ステップS69)、ステップS63に戻る。ステップS68が肯定されると、処理を終了する。   If step S66 is affirmed, it is determined whether or not the profile shape has been determined for all pixels in the y direction (step S68). If step S68 is negative, the direction for determining the profile shape is set to the y direction (step S69), and the process returns to step S63. If step S68 is positive, the process is terminated.

このように第4の実施形態においては、1次差分d1,d2,d3および2次差分d4,d5の正負の関係に基づいて、直列に隣接する4つの画素のプロファイル形状を判定しているため、4つの画素近傍がエッジであるのか、エッジでないのか等を判定することができる。   As described above, in the fourth embodiment, the profile shapes of four pixels adjacent in series are determined based on the positive / negative relationship between the primary differences d1, d2, d3 and the secondary differences d4, d5. It can be determined whether the vicinity of four pixels is an edge or not.

次いで、本発明の第5の実施形態について説明する。図18は本発明の第5の実施形態によるプロファイル判定装置の構成を示す概略ブロック図である。図18に示すように、本発明の第5の実施形態によるプロファイル判定装置は、画像データS0の入力を受け付ける入力部41、第1および第2のフィルタリング部42A,42B、判定部43、並びに入力部41、第1および第2のフィルタリング部42A,42Bおよび判定部43の動作を制御する制御部45を備える。   Next, a fifth embodiment of the present invention will be described. FIG. 18 is a schematic block diagram showing a configuration of a profile determination device according to the fifth exemplary embodiment of the present invention. As shown in FIG. 18, the profile determination apparatus according to the fifth embodiment of the present invention includes an input unit 41 that receives input of image data S0, first and second filtering units 42A and 42B, a determination unit 43, and an input. The control part 45 which controls operation | movement of the part 41, 1st and 2nd filtering part 42A, 42B, and the determination part 43 is provided.

第1のフィルタリング部42Aは、上記第2の実施形態におけるフィルタリング部12と同様にして、補間画素Pが間に位置する隣接する2つの画素G2,G3およびこの2つの画素のそれぞれに隣接する2つの画素G1,G4からなる直列に隣接する4つの画素G1〜G4に対してフィルタリング処理を行い、1次差分d1,d2,d3および2次差分d4,d5を算出する。   In the same manner as the filtering unit 12 in the second embodiment, the first filtering unit 42A has two adjacent pixels G2 and G3 between which the interpolation pixel P is located and two adjacent to the two pixels. Filtering processing is performed on four pixels G1 to G4 that are adjacent in series, each consisting of two pixels G1 and G4, to calculate primary differences d1, d2, and d3 and secondary differences d4 and d5.

第2のフィルタリング部42Bは、上記第1の実施形態におけるフィルタリング部2と同様にして、直列に隣接する4つの画素G1〜G4の中央の2つの画素G2,G3に対してフィルタリング処理を行い、画素G2,G3の画素値の差分d0を算出する。   Similarly to the filtering unit 2 in the first embodiment, the second filtering unit 42B performs a filtering process on the two central pixels G2 and G3 of the four pixels G1 to G4 adjacent in series. A difference d0 between pixel values of the pixels G2 and G3 is calculated.

判定部43は、1次差分d1,d2,d3および2次差分d4,d5の正負の関係に基づいて、図9から図11に示す表を参照して、直列に隣接する4つの画素G1〜G4の画素値のプロファイル形状が、エッジ1、エッジ2、山、谷およびその他のいずれであるか否かを判定する(第3の判定)。さらに、判定部43は、エッジ1,2と判定された場合に、上記第1の実施形態における判定部3と同様に、画素G2,G3の画素値の差分d0の絶対値が所定のしきい値Th1以上であるか否かを判定し(第4の判定)、第4の判定が肯定されると、そこに真にエッジが存在するため、第3の判定は正しいものとして、直列に隣接する4つの画素のプロファイル形状が、エッジ1、エッジ2のいずれかすなわちエッジであると判定する。一方、第4の判定が否定されるとそこにはエッジは存在しないものとして、直列に隣接する4つの画素のプロファイル形状をその他であると判定する。   Based on the positive / negative relationship between the primary differences d1, d2, d3 and the secondary differences d4, d5, the determination unit 43 refers to the tables shown in FIGS. It is determined whether the profile shape of the pixel value of G4 is any one of edge 1, edge 2, mountain, valley, and others (third determination). Further, when the determination unit 43 determines that the edges 1 and 2 are determined, as in the determination unit 3 in the first embodiment, the absolute value of the difference d0 between the pixel values of the pixels G2 and G3 is a predetermined threshold. It is determined whether or not the value is equal to or greater than the value Th1 (fourth determination). If the fourth determination is affirmed, an edge is truly present there, so that the third determination is correct and adjacent in series. The profile shape of the four pixels to be determined is either edge 1 or edge 2, that is, an edge. On the other hand, if the fourth determination is denied, it is determined that there is no edge there, and the profile shapes of the four pixels adjacent in series are determined to be other.

なお、判定結果R0は、画像S0上の画素の位置と対応づけて記録媒体に記録しておき、後で画像S0を拡大縮小する際にその判定結果R0を参照して、上記第1の実施形態と同様に、エッジであると判定された部分と、エッジでないと判定された部分とで異なる補間演算を行うようにすればよい。   Note that the determination result R0 is recorded on a recording medium in association with the position of the pixel on the image S0, and when the image S0 is scaled later, the determination result R0 is referred to to determine the first implementation. Similar to the embodiment, different interpolation calculations may be performed on a portion determined to be an edge and a portion determined not to be an edge.

次いで、第5の実施形態において行われる処理について説明する。図19は第5の実施形態において行われる処理を示すフローチャートである。まず、入力部11が画像データS0の入力を受け付ける(ステップS71)。そして、プロファイル形状を判定する方向をまずx方向に設定する(ステップS72)。次いで、プロファイル形状を判定する最初の画素(例えば画像S0上左上に位置する画素)について、フィルタリング部32がその画素を含む直列に隣接する4つの画素G1〜G4から1次差分d1,d2,d3および2次差分d4,d5を算出する(ステップS73)。また、第2のフィルタリング部42Bが画素G2,G3に対して差分フィルタによるフィルタリング処理を施して差分d0を算出する(ステップS74)。   Next, processing performed in the fifth embodiment will be described. FIG. 19 is a flowchart showing processing performed in the fifth embodiment. First, the input unit 11 receives an input of image data S0 (step S71). Then, the direction for determining the profile shape is first set in the x direction (step S72). Next, with respect to the first pixel for determining the profile shape (for example, the pixel located in the upper left of the image S0), the filtering unit 32 calculates the primary differences d1, d2, d3 from the four adjacent pixels G1 to G4 including the pixel. And secondary differences d4 and d5 are calculated (step S73). Further, the second filtering unit 42B performs a filtering process using a difference filter on the pixels G2 and G3 to calculate the difference d0 (step S74).

そして、判定部43が1次差分d1,d2,d3および2次差分d4,d5の正負の関係に基づいて、図9から図11に示す表を参照して、直列に隣接する4つの画素のプロファイル形状が、エッジ1、エッジ2、山、谷およびその他のいずれであるかを判定する(第3の判定、ステップS75)。そして、判定部43は、エッジ1,2であると判定されたか否かを判定し(ステップS76)、ステップS76が肯定されると、差分d0の絶対値がしきい値Th1以上であるか否かを判定する(第4の判定、ステップS77)。   Then, based on the positive / negative relationship between the primary differences d1, d2, d3 and the secondary differences d4, d5, the determination unit 43 refers to the tables shown in FIGS. It is determined whether the profile shape is edge 1, edge 2, mountain, valley, or other (third determination, step S75). Then, the determination unit 43 determines whether or not the edges 1 and 2 are determined (step S76). If the determination in step S76 is affirmative, whether or not the absolute value of the difference d0 is greater than or equal to the threshold value Th1. Is determined (fourth determination, step S77).

第4の判定が否定されると、そこにはエッジは存在しないものとして、直列に隣接する4つの画素のプロファイル形状をその他であると判定する(ステップS78)。第4の判定が肯定されると、そこに真にエッジが存在するため、第3の判定は正しいものとして、判定結果R0を出力する(ステップS79)。なお、ステップS76が否定された場合もステップS79に進み、判定結果R0を出力する。   If the fourth determination is negative, it is determined that there is no edge, and the profile shapes of the four pixels adjacent in series are determined to be other (step S78). If the fourth determination is affirmed, since an edge is truly present there, the determination result R0 is output assuming that the third determination is correct (step S79). In addition, also when step S76 is denied, it progresses to step S79 and outputs determination result R0.

そして、制御部35が全ての画素についてプロファイル形状を判定したか否かを判定し(ステップS80)、ステップS80が否定されると、プロファイルを判定する画素を次の画素に設定し(ステップS81)、ステップS73に戻る。   Then, the control unit 35 determines whether or not the profile shape has been determined for all the pixels (step S80). If step S80 is negative, the pixel for determining the profile is set to the next pixel (step S81). Return to step S73.

ステップS80が肯定されると、y方向についても全ての画素についてプロファイル形状を判定したか否かを判定する(ステップS82)。ステップS82が否定されると、プロファイル形状を判定する方向をy方向に設定し(ステップS83)、ステップS73に戻る。ステップS82が肯定されると、処理を終了する。   If step S80 is positive, it is determined whether or not the profile shape has been determined for all pixels in the y direction (step S82). If step S82 is negative, the direction for determining the profile shape is set to the y direction (step S83), and the process returns to step S73. If step S82 is positive, the process ends.

このように第5の実施形態においては、1次差分d1,d2,d3および2次差分d4,d5の正負の関係に基づいて、直列に隣接する4つの画素G1〜G4のプロファイル形状を判定する第3の判定を行い、さらにプロファイル形状がエッジであると判定された場合に、隣接する2つの画素G2,G3の画素値の差分d0の絶対値がしきい値Th以上であるか否かを判定する第4の判定を行い、第4の判定が否定されるとそこはエッジでないものと見なすようにしたため、4つの画素近傍がエッジであるのか、エッジでないのか等を精度よく判定することができる。   Thus, in the fifth embodiment, the profile shapes of the four pixels G1 to G4 adjacent in series are determined based on the positive / negative relationship of the primary differences d1, d2, d3 and the secondary differences d4, d5. When the third determination is performed and it is further determined that the profile shape is an edge, whether or not the absolute value of the difference d0 between the pixel values of two adjacent pixels G2 and G3 is greater than or equal to the threshold Th Since the fourth determination is performed and if the fourth determination is denied, it is regarded as not an edge. Therefore, it is possible to accurately determine whether the vicinity of the four pixels is an edge or not. it can.

なお、上記第1から第3の実施形態においては、エッジでないと判定された場合、バイキュービック法を用いて補間画素P近傍の16画素の画素値(1次元方向では4画素)から補間画素Pの画素値を算出しているが、補間画素P近傍の9画素(1次元方向では3画素)あるいは4画素(1次元方向では2画素)の画素値から補間画素Pの画素値を算出してもよい。また、x方向またはy方向の1次元の補間演算により補間画素Pの画素値を算出しているが、2次元の補間演算により補間画素Pの画素値を算出してもよい。さらに、バイキュービック法のみならず、線形補間法、最近傍法およびバイリニア法等を用いて補間画素Pの画素値を算出してもよい。   In the first to third embodiments, when it is determined that the edge is not an edge, the interpolation pixel P is calculated from 16 pixel values (4 pixels in the one-dimensional direction) near the interpolation pixel P using the bicubic method. The pixel value of the interpolation pixel P is calculated from the pixel values of 9 pixels (3 pixels in the one-dimensional direction) or 4 pixels (2 pixels in the one-dimensional direction) in the vicinity of the interpolation pixel P. Also good. Further, although the pixel value of the interpolation pixel P is calculated by one-dimensional interpolation calculation in the x direction or the y direction, the pixel value of the interpolation pixel P may be calculated by two-dimensional interpolation calculation. Furthermore, the pixel value of the interpolation pixel P may be calculated using not only the bicubic method but also a linear interpolation method, a nearest neighbor method, a bilinear method, or the like.

また、上記第2および第3の実施形態においては、直列に隣接する4つの画素の1次差分d1,d2,d3および2次差分d4,d5の正負の関係が、山、谷およびその他となる場合に、隣接する2つの画素G2,G3の間にエッジが存在しないと判定して、第2の補間演算により補間画素Pの画素値を算出しているが、山および谷と判定された場合と、その他と判定された場合とでさらに異なる補間演算を行って補間画素Pの画素値を算出してもよい。   In the second and third embodiments, the positive / negative relationship between the primary differences d1, d2, d3 and the secondary differences d4, d5 of four pixels adjacent in series is a peak, a valley, and others. In the case where it is determined that there is no edge between the two adjacent pixels G2 and G3, and the pixel value of the interpolation pixel P is calculated by the second interpolation calculation. The pixel value of the interpolated pixel P may be calculated by performing different interpolation calculations depending on whether or not the other is determined.

本発明の第1の実施形態によるエッジ検出装置を適用した画像拡大縮小装置の構成を示す概略ブロック図1 is a schematic block diagram showing the configuration of an image enlargement / reduction apparatus to which an edge detection apparatus according to a first embodiment of the present invention is applied. 画像データにより表される画像の画素配列を示す図The figure which shows the pixel arrangement | sequence of the image represented by image data 差分フィルタの例を示す図The figure which shows the example of difference filter バイキュービック法を説明するための図Illustration for explaining the bicubic method エッジであると判定された部分についての補間画素の画素値の算出を説明するための図The figure for demonstrating calculation of the pixel value of the interpolation pixel about the part determined to be an edge 第1の実施形態において行われる処理を示すフローチャートThe flowchart which shows the process performed in 1st Embodiment. 本発明の第2の実施形態によるエッジ検出装置を適用した画像拡大縮小装置の構成を示す概略ブロック図Schematic block diagram showing the configuration of an image enlargement / reduction apparatus to which an edge detection apparatus according to a second embodiment of the present invention is applied. 第2の実施形態におけるフィルタリング部において行われるフィルタリング処理を説明するための図The figure for demonstrating the filtering process performed in the filtering part in 2nd Embodiment. 1次差分d1,d2,d3および2次差分d4,d5の正負と、直列に隣接する4つの画素のプロファイル形状との関係を示す表(その1)Table showing the relationship between the positive and negative of primary differences d1, d2, d3 and secondary differences d4, d5 and the profile shapes of four pixels adjacent in series (part 1) 1次差分d1,d2,d3および2次差分d4,d5の正負と、直列に隣接する4つの画素のプロファイル形状との関係を示す表(その2)Table showing the relationship between the positive and negative of primary differences d1, d2, d3 and secondary differences d4, d5 and the profile shapes of four pixels adjacent in series (part 2) 1次差分d1,d2,d3および2次差分d4,d5の正負と、直列に隣接する4つの画素のプロファイル形状との関係を示す表(その3)Table showing the relationship between the positive and negative of primary differences d1, d2, d3 and secondary differences d4, d5 and the profile shapes of four pixels adjacent in series (part 3) 第2の実施形態において行われる処理を示すフローチャートThe flowchart which shows the process performed in 2nd Embodiment. 本発明の第3の実施形態によるエッジ検出装置を適用した画像拡大縮小装置の構成を示す概略ブロック図Schematic block diagram showing the configuration of an image enlargement / reduction apparatus to which an edge detection apparatus according to a third embodiment of the present invention is applied. 隣接する2つの画素の画素値の差が非常にわずかであるのにエッジと判定されるプロファイル形状の例を示す図The figure which shows the example of the profile shape determined as an edge, although the difference of the pixel value of two adjacent pixels is very slight 第3の実施形態において行われる処理を示すフローチャートThe flowchart which shows the process performed in 3rd Embodiment 本発明の第4の実施形態によるプロファイル判定装置の構成を示す概略ブロック図The schematic block diagram which shows the structure of the profile determination apparatus by the 4th Embodiment of this invention. 第4の実施形態において行われる処理を示すフローチャートThe flowchart which shows the process performed in 4th Embodiment 本発明の第5の実施形態によるプロファイル判定装置の構成を示す概略ブロック図The schematic block diagram which shows the structure of the profile determination apparatus by the 5th Embodiment of this invention. 第5の実施形態において行われる処理を示すフローチャートThe flowchart which shows the process performed in 5th Embodiment

符号の説明Explanation of symbols

1,11,21,31,41 入力部
2,12,22A,22B,32,42A,42B フィルタリング部
3,13,23,33,43 判定部
4,14,24 補間演算部
5,15,25,35,45 制御部
1,11,21,31,41 Input unit 2,12,22A, 22B, 32,42A, 42B Filtering unit 3,13,23,33,43 Judgment unit 4,14,24 Interpolation operation unit 5,15,25 , 35, 45 Control unit

Claims (9)

画像上の直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理を施して前記3つの画素ペアの画素値のそれぞれについての3つの1次差分d1,d2,d3を得、該3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ前記差分フィルタによるフィルタリング処理を施して2つの2次差分d4,d5を得るフィルタリング手段と、
前記3つの1次差分d1,d2,d3および前記2つの2次差分d4,d5の正負の関係が(d1,d2,d3,d4,d5)=(+,+,+,+,−)、(−,−,−,−,+)、(+,+,+,+,+)、(+,+,+,−,−)、(−,−,−,+,+)、(−,−,−,−,−)のいずれかとなる場合に、前記直列に隣接する4つの画素の中央の2つの画素の間にエッジが存在すると判定し、それ以外の場合にエッジが存在しないと判定する検出手段とを備えたことを特徴とするエッジ検出装置。
3 for each of the pixel values of the three pixel pairs by filtering each of the three pixel pairs including two adjacent pixels included in the four pixels adjacent in series on the image with a differential filter. Two primary differences d1, d2, and d3 are obtained, and two secondary differences d4 and d5 are obtained by performing filtering using the difference filter on two adjacent primary difference pairs in the three primary differences, respectively. Filtering means;
The positive / negative relationship between the three primary differences d1, d2, d3 and the two secondary differences d4, d5 is (d1, d2, d3, d4, d5) = (+, +, +, +, −), (-,-,-,-, +), (+, +, +, +, +), (+, +, +,-,-), (-,-,-, +, +), (- ,-,-,-,-) , It is determined that an edge exists between the two central pixels of the four pixels adjacent in series, and there is no edge in other cases. An edge detection apparatus comprising: a detection means for determining
画像上の直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理を施して前記3つの画素ペアの画素値のそれぞれについての3つの1次差分d1,d2,d3を得、該3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ前記差分フィルタによるフィルタリング処理を施して2つの2次差分d4,d5を得る第1のフィルタリング手段と、
前記直列に隣接する4つの画素の中央の2つの画素に対して前記差分フィルタによるフィルタリング処理を施して前記中央の2つの画素の画素値の差分d0を得る第2のフィルタリング手段と、
前記3つの1次差分d1,d2,d3および前記2つの2次差分d4,d5の正負の関係が(d1,d2,d3,d4,d5)=(+,+,+,+,−)、(−,−,−,−,+)、(+,+,+,+,+)、(+,+,+,−,−)、(−,−,−,+,+)、(−,−,−,−,−)のいずれかとなるとともに、前記中央の2つの画素の画素値の差分d0の絶対値が所定のしきい値以上となる場合に、前記中央の2つの画素の間にエッジが存在すると判定し、それ以外の場合にエッジが存在しないと判定する検出手段とを備えたことを特徴とするエッジ検出装置。
3 for each of the pixel values of the three pixel pairs by filtering each of the three pixel pairs including two adjacent pixels included in the four pixels adjacent in series on the image with a differential filter. Two primary differences d1, d2, and d3 are obtained, and two secondary differences d4 and d5 are obtained by performing filtering using the difference filter on two adjacent primary difference pairs in the three primary differences, respectively. First filtering means;
Second filtering means for obtaining a difference d0 of pixel values of the two central pixels by performing filtering processing by the differential filter on the central two pixels of the four pixels adjacent in series;
The positive / negative relationship between the three primary differences d1, d2, d3 and the two secondary differences d4, d5 is (d1, d2, d3, d4, d5) = (+, +, +, +, −), (-,-,-,-, +), (+, +, +, +, +), (+, +, +,-,-), (-,-,-, +, +), (- ,-,-,-,-), And when the absolute value of the difference d0 between the pixel values of the two central pixels is equal to or greater than a predetermined threshold value , between the two central pixels. edge detection device edge is determined that there exists, characterized by comprising a detecting means for determining that there is no edge otherwise to.
画像上の画素において、直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理を施して前記3つの画素ペアの画素値のそれぞれについての3つの1次差分d1,d2,d3を得、該3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ前記差分フィルタによるフィルタリング処理を施して2つの2次差分d4,d5を得る第1のフィルタリング手段と、
前記直列に隣接する4つの画素の中央の2つの画素に対して差分フィルタによるフィルタリング処理を施して前記中央の2つの画素の画素値の差分d0を得る第2のフィルタリング手段と、
前記3つの1次差分d1,d2,d3および前記2つの2次差分d4,d5の正負の関係が(d1,d2,d3,d4,d5)=(+,+,+,+,−)、(−,−,−,−,+)、(+,+,+,+,+)、(+,+,+,−,−)、(−,−,−,+,+)、(−,−,−,−,−)のいずれかとなるとともに、前記中央の2つの画素の画素値の差分d0の絶対値が所定のしきい値以上となる場合に、前記直列に隣接する4つの画素近傍の画素値のプロファイル形状がエッジであると判定し、それ以外の場合にエッジ以外の形状であると判定するプロファイル判定手段とを備えたことを特徴とするプロファイル判定装置。
In the pixels on the image, each of the pixel values of the three pixel pairs is obtained by performing filtering processing using a differential filter on three pixel pairs including two adjacent pixels included in four pixels adjacent in series. The three primary differences d1, d2, and d3 are obtained, and the filtering process by the difference filter is performed on each of the two adjacent primary difference pairs in the three primary differences to obtain two secondary differences d4 and d4. first filtering means for obtaining d5 ;
Second filtering means for obtaining a difference d0 between pixel values of the two central pixels by performing filtering processing using a differential filter on the central two pixels of the four pixels adjacent in series;
The positive / negative relationship between the three primary differences d1, d2, d3 and the two secondary differences d4, d5 is (d1, d2, d3, d4, d5) = (+, +, +, +, −), (-,-,-,-, +), (+, +, +, +, +), (+, +, +,-,-), (-,-,-, +, +), (- ,-,-,-,-) And the four pixels adjacent in series when the absolute value of the difference d0 between the pixel values of the two central pixels is equal to or greater than a predetermined threshold value. determines the profile shape of the pixel values in the vicinity of that edge, the profile judging device which is characterized in that a determining profile determination means that the shape other than the edge otherwise.
画像上の直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理を施して前記3つの画素ペアの画素値のそれぞれについての3つの1次差分d1,d2,d3を得、該3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ前記差分フィルタによるフィルタリング処理を施して2つの2次差分d4,d5を得、
前記3つの1次差分d1,d2,d3および前記2つの2次差分d4,d5の正負の関係が(d1,d2,d3,d4,d5)=(+,+,+,+,−)、(−,−,−,−,+)、(+,+,+,+,+)、(+,+,+,−,−)、(−,−,−,+,+)、(−,−,−,−,−)のいずれかとなる場合に、前記直列に隣接する4つの画素の中央の2つの画素の間にエッジが存在すると判定し、それ以外の場合にエッジが存在しないと判定することを特徴とするエッジ検出方法。
3 for each of the pixel values of the three pixel pairs by filtering each of the three pixel pairs including two adjacent pixels included in the four pixels adjacent in series on the image with a differential filter. Two primary differences d1, d2, and d3 are obtained, and two secondary differences d4 and d5 are obtained by performing filtering using the difference filter on two adjacent primary difference pairs in the three primary differences, respectively. ,
The positive / negative relationship between the three primary differences d1, d2, d3 and the two secondary differences d4, d5 is (d1, d2, d3, d4, d5) = (+, +, +, +, −), (-,-,-,-, +), (+, +, +, +, +), (+, +, +,-,-), (-,-,-, +, +), (- ,-,-,-,-) , It is determined that an edge exists between the two central pixels of the four pixels adjacent in series, and there is no edge in other cases. An edge detection method, characterized in that
画像上の直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理を施して前記3つの画素ペアの画素値のそれぞれについての3つの1次差分d1,d2,d3を得、該3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ前記差分フィルタによるフィルタリング処理を施して2つの2次差分d4,d5を得、
前記直列に隣接する4つの画素の中央の2つの画素に対して前記差分フィルタによるフィルタリング処理を施して前記中央の2つの画素の画素値の差分d0を得、
前記3つの1次差分d1,d2,d3および前記2つの2次差分d4,d5の正負の関係が(d1,d2,d3,d4,d5)=(+,+,+,+,−)、(−,−,−,−,+)、(+,+,+,+,+)、(+,+,+,−,−)、(−,−,−,+,+)、(−,−,−,−,−)のいずれかとなるとともに、前記中央の2つの画素の画素値の差分d0の絶対値が所定のしきい値以上となる場合に、前記中央の2つの画素の間にエッジが存在すると判定し、それ以外の場合にエッジが存在しないと判定することを特徴とするエッジ検出方法。
3 for each of the pixel values of the three pixel pairs by filtering each of the three pixel pairs including two adjacent pixels included in the four pixels adjacent in series on the image with a differential filter. Two primary differences d1, d2, and d3 are obtained, and two secondary differences d4 and d5 are obtained by performing filtering using the difference filter on two adjacent primary difference pairs in the three primary differences, respectively. ,
A filtering process using the difference filter is performed on the center two pixels of the four pixels adjacent in series to obtain a difference d0 between pixel values of the center two pixels,
The positive / negative relationship between the three primary differences d1, d2, d3 and the two secondary differences d4, d5 is (d1, d2, d3, d4, d5) = (+, +, +, +, −), (-,-,-,-, +), (+, +, +, +, +), (+, +, +,-,-), (-,-,-, +, +), (- , -, -, -, - it becomes either), when the absolute value of the difference d0 of the pixel values of two pixels of the center is equal to or greater than a predetermined threshold value, between two pixels of the central An edge detection method characterized in that it is determined that an edge is present, and in other cases it is determined that no edge exists .
画像上の画素において、直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理を施して前記3つの画素ペアの画素値のそれぞれについての3つの1次差分d1,d2,d3を得、該3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ前記差分フィルタによるフィルタリング処理を施して2つの2次差分d4,d5を得、
前記直列に隣接する4つの画素の中央の2つの画素に対して差分フィルタによるフィルタリング処理を施して前記中央の2つの画素の画素値の差分d0を得、
前記3つの1次差分d1,d2,d3および前記2つの2次差分d4,d5の正負の関係が(d1,d2,d3,d4,d5)=(+,+,+,+,−)、(−,−,−,−,+)、(+,+,+,+,+)、(+,+,+,−,−)、(−,−,−,+,+)、(−,−,−,−,−)のいずれかとなるとともに、前記中央の2つの画素の画素値の差分d0の絶対値が所定のしきい値以上となる場合に、前記直列に隣接する4つの画素近傍の画素値のプロファイル形状がエッジであると判定し、それ以外の場合にエッジ以外の形状であると判定することを特徴とするプロファイル判定方法。
In the pixels on the image, each of the pixel values of the three pixel pairs is obtained by performing filtering processing using a differential filter on three pixel pairs including two adjacent pixels included in four pixels adjacent in series. The three primary differences d1, d2, and d3 are obtained, and the filtering process by the difference filter is performed on each of the two adjacent primary difference pairs in the three primary differences to obtain two secondary differences d4 and d4. d5
A filtering process using a difference filter is performed on the center two pixels of the four pixels adjacent in series to obtain a difference d0 between pixel values of the center two pixels,
The positive / negative relationship between the three primary differences d1, d2, d3 and the two secondary differences d4, d5 is (d1, d2, d3, d4, d5) = (+, +, +, +, −), (-,-,-,-, +), (+, +, +, +, +), (+, +, +,-,-), (-,-,-, +, +), (- ,-,-,-,-) And the four pixels adjacent in series when the absolute value of the difference d0 between the pixel values of the two central pixels is equal to or greater than a predetermined threshold value. A profile determination method characterized by determining that the profile shape of a neighboring pixel value is an edge, and otherwise determining that the profile shape is other than an edge .
画像上の直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理を施して前記3つの画素ペアの画素値のそれぞれについての3つの1次差分d1,d2,d3を得、該3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ前記差分フィルタによるフィルタリング処理を施して2つの2次差分d4,d5を得る手順と、
前記3つの1次差分d1,d2,d3および前記2つの2次差分d4,d5の正負の関係が(d1,d2,d3,d4,d5)=(+,+,+,+,−)、(−,−,−,−,+)、(+,+,+,+,+)、(+,+,+,−,−)、(−,−,−,+,+)、(−,−,−,−,−)のいずれかとなる場合に、前記直列に隣接する4つの画素の中央の2つの画素の間にエッジが存在すると判定し、それ以外の場合にエッジが存在しないと判定することを特徴とするエッジ検出方法をコンピュータに実行させるためのプログラム。
3 for each of the pixel values of the three pixel pairs by filtering each of the three pixel pairs including two adjacent pixels included in the four pixels adjacent in series on the image with a differential filter. Two primary differences d1, d2, and d3 are obtained, and two secondary differences d4 and d5 are obtained by performing filtering using the difference filter on two adjacent primary difference pairs in the three primary differences, respectively. Procedure and
The positive / negative relationship between the three primary differences d1, d2, d3 and the two secondary differences d4, d5 is (d1, d2, d3, d4, d5) = (+, +, +, +, −), (-,-,-,-, +), (+, +, +, +, +), (+, +, +,-,-), (-,-,-, +, +), (- ,-,-,-,-) , It is determined that an edge exists between the two central pixels of the four pixels adjacent in series, and there is no edge in other cases. A program for causing a computer to execute an edge detection method characterized in that
画像上の直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理を施して前記3つの画素ペアの画素値のそれぞれについての3つの1次差分d1,d2,d3を得、該3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ前記差分フィルタによるフィルタリング処理を施して2つの2次差分d4,d5を得る手順と、
前記直列に隣接する4つの画素の中央の2つの画素に対して前記差分フィルタによるフィルタリング処理を施して前記中央の2つの画素の画素値の差分d0を得る手順と、
前記3つの1次差分d1,d2,d3および前記2つの2次差分d4,d5の正負の関係が(d1,d2,d3,d4,d5)=(+,+,+,+,−)、(−,−,−,−,+)、(+,+,+,+,+)、(+,+,+,−,−)、(−,−,−,+,+)、(−,−,−,−,−)のいずれかとなるとともに、前記中央の2つの画素の画素値の差分d0の絶対値が所定のしきい値以上となる場合に、前記中央の2つの画素の間にエッジが存在すると判定し、それ以外の場合にエッジが存在しないと判定する手順とを有することを特徴とするエッジ検出方法をコンピュータに実行させるためのプログラム。
3 for each of the pixel values of the three pixel pairs by filtering each of the three pixel pairs including two adjacent pixels included in the four pixels adjacent in series on the image with a differential filter. Two primary differences d1, d2, and d3 are obtained, and two secondary differences d4 and d5 are obtained by performing filtering using the difference filter on two adjacent primary difference pairs in the three primary differences, respectively. Procedure and
A procedure of obtaining a difference d0 between pixel values of the two central pixels by performing filtering processing by the difference filter on the central two pixels of the four pixels adjacent in series;
The positive / negative relationship between the three primary differences d1, d2, d3 and the two secondary differences d4, d5 is (d1, d2, d3, d4, d5) = (+, +, +, +, −), (-,-,-,-, +), (+, +, +, +, +), (+, +, +,-,-), (-,-,-, +, +), (- ,-,-,-,-), And when the absolute value of the difference d0 between the pixel values of the two central pixels is equal to or greater than a predetermined threshold value , between the two central pixels. program for the edge is determined that there exists, to execute the edge detection method characterized by having a step of determining an edge does not exist in the computer otherwise to.
画像上の画素において、直列に隣接する4つの画素に含まれる互いに隣接する2つの画素からなる3つの画素ペアに対してそれぞれ差分フィルタによるフィルタリング処理を施して前記3つの画素ペアの画素値のそれぞれについての3つの1次差分d1,d2,d3を得、該3つの1次差分における隣接する2つの1次差分ペアに対してそれぞれ前記差分フィルタによるフィルタリング処理を施して2つの2次差分d4,d5を得る手順と、
前記直列に隣接する4つの画素の中央の2つの画素に対して差分フィルタによるフィルタリング処理を施して前記中央の2つの画素の画素値の差分d0を得る手順と、
前記3つの1次差分d1,d2,d3および前記2つの2次差分d4,d5の正負の関係が(d1,d2,d3,d4,d5)=(+,+,+,+,−)、(−,−,−,−,+)、(+,+,+,+,+)、(+,+,+,−,−)、(−,−,−,+,+)、(−,−,−,−,−)のいずれかとなるとともに、前記中央の2つの画素の画素値の差分d0の絶対値が所定のしきい値以上となる場合に、前記直列に隣接する4つの画素近傍の画素値のプロファイル形状がエッジであると判定し、それ以外の場合にエッジ以外の形状であると判定する手順とを有することを特徴とするプロファイル判定方法をコンピュータに実行させるためのプログラム。
In the pixels on the image, each of the pixel values of the three pixel pairs is obtained by performing filtering processing using a differential filter on three pixel pairs including two adjacent pixels included in four pixels adjacent in series. The three primary differences d1, d2, and d3 are obtained, and the filtering process by the difference filter is performed on each of the two adjacent primary difference pairs in the three primary differences to obtain two secondary differences d4 and d4. a procedure for obtaining d5 ;
A procedure of obtaining a difference d0 between pixel values of the two central pixels by performing filtering processing using a difference filter on the two central pixels of the four pixels adjacent in series;
The positive / negative relationship between the three primary differences d1, d2, d3 and the two secondary differences d4, d5 is (d1, d2, d3, d4, d5) = (+, +, +, +, −), (-,-,-,-, +), (+, +, +, +, +), (+, +, +,-,-), (-,-,-, +, +), (- ,-,-,-,-) And the four pixels adjacent in series when the absolute value of the difference d0 between the pixel values of the two central pixels is equal to or greater than a predetermined threshold value. A program for causing a computer to execute a profile determination method, comprising: determining a profile shape of a neighboring pixel value as an edge, and determining a shape other than an edge in other cases .
JP2003293486A 2003-08-14 2003-08-14 Edge detection apparatus and method, profile determination apparatus and method, and program Expired - Fee Related JP4156469B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2003293486A JP4156469B2 (en) 2003-08-14 2003-08-14 Edge detection apparatus and method, profile determination apparatus and method, and program
US10/917,505 US7764839B2 (en) 2003-08-14 2004-08-13 Edge detecting apparatus and method, and image size enlarging and reducing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003293486A JP4156469B2 (en) 2003-08-14 2003-08-14 Edge detection apparatus and method, profile determination apparatus and method, and program

Publications (2)

Publication Number Publication Date
JP2005063196A JP2005063196A (en) 2005-03-10
JP4156469B2 true JP4156469B2 (en) 2008-09-24

Family

ID=34370419

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003293486A Expired - Fee Related JP4156469B2 (en) 2003-08-14 2003-08-14 Edge detection apparatus and method, profile determination apparatus and method, and program

Country Status (1)

Country Link
JP (1) JP4156469B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102020212381A1 (en) * 2020-09-30 2022-03-31 Continental Automotive Gmbh Method for characterizing an object in an area surrounding a motor vehicle
CN119068381A (en) * 2023-06-02 2024-12-03 戴尔产品有限公司 Method, electronic device and computer program product for identifying object regions of an image

Also Published As

Publication number Publication date
JP2005063196A (en) 2005-03-10

Similar Documents

Publication Publication Date Title
US7764839B2 (en) Edge detecting apparatus and method, and image size enlarging and reducing apparatus and method
CN103049914B (en) High-resolution depth map generation method and system based on boundary
US7391920B2 (en) Image processing method, apparatus, and program
US8175417B2 (en) Apparatus, method, and computer-readable recording medium for pixel interpolation
CN1319375C (en) Image zooming method based on edge detection
US10679326B2 (en) Image data processing apparatus and image data processing method that determine confidence data indicating a level of confidence in a pixel value in high resolution image data
US6798422B2 (en) Method and filtering system for filtering edge directions
JP3591859B2 (en) Digital video data interpolation method and circuit
JP2009205280A (en) Pixel interpolation device and pixel interpolation method
JP4388110B2 (en) Image processing apparatus, method, and program
US7123291B2 (en) Image processing device, image processing method and image processing program for joining a plurality of divided images
JP4156469B2 (en) Edge detection apparatus and method, profile determination apparatus and method, and program
JP6838918B2 (en) Image data processing device and method
JP4120872B2 (en) Image enlarging / reducing apparatus, method, and program
JP4629123B2 (en) Edge detection method, apparatus, and program
JP2005063197A (en) Image interpolation device and method, and program
JP2005141498A (en) Method, device, and program for edge detection
JP4414195B2 (en) Image interpolation method, apparatus and program
US20050036711A1 (en) Image interpolation apparatus and method, and edge detecting apparatus and method
JP4133746B2 (en) Interpolated pixel value calculation method, apparatus, and program
JP4716255B2 (en) Image processing apparatus, image processing method, and program thereof
JP4133742B2 (en) Interpolated pixel value calculation method, apparatus, and program
JP4500707B2 (en) Image data processing device
WO2016035568A1 (en) Signal processing device and signal processing method, solid-state imaging element, imaging device, electronic instrument, and program
JP2010141863A (en) Image processing method, apparatus and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060303

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20061206

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080115

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080122

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080319

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080415

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080610

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20080619

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080708

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080709

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

Free format text: PAYMENT UNTIL: 20110718

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110718

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120718

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120718

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130718

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees