边缘检测外文翻译两
边缘检测

Edge detectionEdge detection is a terminology in image processing and computer vision, particularly in the areas of feature detection and feature extraction, to refer to algorithms which aim at identifying points in a digital image at which the image brightness changes sharply or more formally has discontinuities. Although point and line detection certainly are important in any discussion on segmentation, edge detection is by far the most common approach for detecting meaningful disco unties in gray level.Although certain literature has considered the detection of ideal step edges, the edges obtained from natural images are usually not at all ideal step edges. Instead they are normally affected by one or several of the following effects: 1.focal blur caused by a finite depth-of-field and finite point spread function; 2.penumbral blur caused by shadows created by light sources of non-zero radius; 3.shading at a smooth object edge; 4.local secularities or antireflections in the vicinity of object edges.A typical edge might for instance be the border between a block of red color and a block of yellow. In contrast a line (as can be extracted by a ridge detector) can be a small number of pixels of a different color on an otherwise unchanging background. For a line, there may therefore usually be one edge on each side of the line.To illustrate why edge detection is not a trivial task, let us consider the problem of detecting edges in the following one-dimensional signal. Here, we may intuitively say that there should be an edge between the 4th and 5th pixels.If the intensity difference were smaller between the 4th and the 5th pixels and if the intensity differences between the adjacent neighboring pixels were higher, it would not be as easy to say that there should be an edge in the corresponding region. Moreover, one could argue that this case is one in which there are several edges. Hence, to firmly state a specific threshold on how large the intensity change between two neighboring pixels must be for us to say that there should be an edge between these pixels is not always a simple problem. Indeed, this is one of the reasons why edge detection may be a non-trivial problem unless the objects in the scene are particularly simple and the illumination conditions can be well controlled.There are many methods for edge detection, but most of them can be grouped into two categories, search-based and zero-crossing based. The search-based methods detect edges by first computing a measure of edge strength, usually a first-order derivative expression such as the gradient magnitude, and then searching for localdirectional maxima of the gradient magnitude using a computed estimate of the local orientation of the edge, usually the gradient direction. The zero-crossing based methods search for zero crossings in a second-order derivative expression computed from the image in order to find edges, usually the zero-crossings of the Appalachian or the zero-crossings of a non-linear differential expression, as will be described in the section on differential edge detection following below. As a pre-processing step to edge detection, a smoothing stage, typically Gaussian smoothing, is almost always applied (see also noise reduction).The edge detection methods that have been published mainly differ in the types of smoothing filters that are applied and the way the measures of edge strength are computed. As many edge detection methods rely on the computation of image gradients, they also differ in the types of filters used for computing gradient estimates in the x- and y-directions.Once we have computed a measure of edge strength (typically the gradient magnitude), the next stage is to apply a threshold, to decide whether edges are present or not at an image point. The lower the threshold, the more edges will be detected, and the result will be increasingly susceptible to noise, and also to picking out irrelevant features from the image. Conversely a high threshold may miss subtle edges,or result in fragmented edges.If the edge shareholding is applied to just the gradient magnitude image, the resulting edges will in general be thick and some type of edge thinning post-processing is necessary. For edges detected with non-maximum suppression however, the edge curves are thin by definition and the edge pixels can be linked into edge polygon by an edge linking (edge tracking) procedure. On a discrete grid, the non-maximum suppression stage can be implemented by estimating the gradient direction using first-order derivatives, then rounding off the gradient direction to multiples of 45 degrees, and finally comparing the values of the gradient magnitude in the estimated gradient direction.A commonly used approach to handle the problem of appropriate thresholds for shareholding is by using shareholding with hysteretic. This method uses multiple thresholds to find edges. We begin by using the upper threshold to find the start of an edge. Once we have a start point, we then trace the path of the edge through the image pixel by pixel, marking an edge whenever we are above the lower threshold. We stop marking our edge only when the value falls below our lower threshold. This approach makes the assumption that edges are likely to be in continuous curves, and allows us to follow a faint section of an edge we have previously seen, without meaning thatevery noisy pixel in the image is marked down as an edge. Still, however, we have the problem of choosing appropriate shareholding parameters, and suitable shareholding values may vary over the image.Some edge-detection operators are instead based upon second-order derivatives of the intensity. This essentially captures the rate of change in the intensity gradient. Thus, in the ideal continuous case, detection of zero-crossings in the second derivative captures local maxima in the gradient.We can come to a conclusion that, to be classified as a meaningful edge point, the transition in gray level associated with that point has to be significantly stronger than the background at that point. Since we are dealing with local computations, the method of choice to determine whether a value is “significant” or not id to use a threshold. Thus we define a point in an image as being as being an edge point if its two-dimensional first-order derivative is greater than a specified criterion of connectedness is by definition an edge. The term edge segment generally is used if the edge is short in relation to the dimensions of the image. A key problem in segmentation is to assemble edge segments into longer edges. An alternate definition if we elect to use the second-derivative is simply to define the edge points in an image as the zero crossings of its second derivative. The definition of an edge in this case isthe same as above. It is important to note that these definitions do not guarantee success in finding edge in an image. They simply give us a formalism to look for them. First-order derivatives in an image are computed using the gradient. Second-order derivatives are obtained using the Palladian.边缘检测边缘检测是图像处理和计算机视觉中的术语,尤其在特征检测和特征抽取领域,是一种用来识别数字图像亮度骤变点即不连续点的算法。
外文翻译---图像的边缘检测

附:英文资料翻译图像的边缘检测To image edge examination algorithm research academic reportAbstractDigital image processing took a relative quite young discipline, is following the computer technology rapid development, day by day obtains the widespread application.The edge took the image one kind of basic characteristic, in the pattern recognition, the image division, the image intensification as well as the image compression and so on in the domain has a more widespread application.Image edge detection method many and varied, in which based on brightness algorithm, is studies the time to be most long, the theory develops the maturest method, it mainly is through some difference operator, calculates its gradient based on image brightness the change, thus examines the edge, mainly has Robert, Laplacian, Sobel, Canny, operators and so on LOG. First as a whole introduced digital image processing and the edge detection survey, has enumerated several kind of at present commonly used edge detection technology and the algorithm, and selects two kinds to use Visual the C language programming realization, through withdraws the image result to two algorithms the comparison, the research discusses their good and bad points.对图像边缘检测算法的研究学术报告摘要数字图像处理作为一门相对比较年轻的学科, 伴随着计算机技术的飞速发展, 日益得到广泛的应用. 边缘作为图像的一种基本特征, 在图像识别,图像分割,图像增强以及图像压缩等的领域中有较为广泛的应用.图像边缘提取的手段多种多样,其中基于亮度的算法,是研究时间最久,理论发展最成熟的方法, 它主要是通过一些差分算子, 由图像的亮度计算其梯度的变化, 从而检测出边缘, 主要有Robert, Laplacian, Sobel, Canny, LOG 等算子. 首先从总体上介绍了数字图像处理及边缘提取的概况, 列举了几种目前常用的边缘提取技术和算法,并选取其中两种使用Visual C++语言编程实现,通过对两种算法所提取图像结果的比较,研究探讨它们的优缺点.First chapter introduction§1.1 image edge examination introductionThe image edge is one of image most basic characteristics, often is carrying image majority of informations.But the edge exists in the image irregular structure and innot the steady phenomenon, also namely exists in the signal point of discontinuity place, these spots have given the image outline position, these outlines are frequently we when the imagery processing needs the extremely important some representative condition, this needs us to examine and to withdraw its edge to an image. But the edge examination algorithm is in the imagery processing question one of classical technical difficult problems, its solution carries on the high level regarding us the characteristic description, the recognition and the understanding and so on has the significant influence; Also because the edge examination all has in many aspects the extremely important use value, therefore how the people are devoting continuously in study and solve the structure to leave have the good nature and the good effect edge examination operator question.In the usual situation, we may the signal in singular point and the point of discontinuity thought is in the image peripheral point, its nearby gradation change situation may reflect from its neighboring picture element gradation distribution gradient. According to this characteristic, we proposed many kinds of edge examination operator: If Robert operator, Sobel operator, Prewitt operator, Laplace operator and so on.These methods many are wait for the processing picture element to carry on the gradation analysis for the central neighborhood achievement the foundation, realized and has already obtained the good processing effect to the image edge extraction. . But this kind of method simultaneously also exists has the edge picture element width, the noise jamming is serious and so on the shortcomings, even if uses some auxiliary methods to perform the denoising, also corresponding can bring the flaw which the edge fuzzy and so on overcomes with difficulty.Along with the wavelet analysis appearance, its good time frequency partial characteristic by the widespread application in the imagery processing and in the pattern recognition domain, becomes in the signal processing the commonly used method and the powerful tool.Through the wavelet analysis, may interweave decomposes in the same place each kind of composite signal the different frequency the block signal, but carries on the edge examination through the wavelet transformation, may use its multi-criteria and the multi-resolution nature fully , real effective expresses the image the edge characteristic.When the wavelet transformation criterion reduces, is more sensitive to the image detail; But when the criterion increases, the image detail is filtered out, the examination edge will be only the thick outline.This characteristic is extremely useful in the pattern recognition, we may be called this thick outline the image the main edge.If will be able an image main edge clear integrity extraction, this to the goal division, the recognition and so on following processing to bring the enormous convenience.Generally speaking, the above method all is the work which does based on the image luminance information.In the multitudinous scientific research worker under, has obtained the very good effect diligently.But, because the image edge receives physical condition and so on the illumination influences quite to be big above, often enables many to have a common shortcoming based on brightness edge detection method, that is the edge is not continual, does not seal up.Considered the phase information in the image importance as well as its stable characteristic, causes using the phase information to carry on the imagery processing into new research topic. In this paper soon introduces one kind based on the phase image characteristic examination method - - phase uniform method.It is not uses the image the luminance information, but is its phase characteristic, namely supposition image Fourier component phase most consistent spot achievement characteristic point.Not only it can examine brightness characteristics and so on step characteristic, line characteristic, moreover can examine Mach belt phenomenon which produces as a result of the human vision sensation characteristic.Because the phase uniformity does not need to carry on any supposition to the image characteristic type, therefore it has the very strong versatility.第一章绪论§1.1 图像边缘检测概论图像边缘是图像最基本的特征之一, 往往携带着一幅图像的大部分信息. 而边缘存在于图像的不规则结构和不平稳现象中,也即存在于信号的突变点处,这些点给出了图像轮廓的位置,这些轮廓常常是我们在图像处理时所需要的非常重要的一些特征条件, 这就需要我们对一幅图像检测并提取出它的边缘. 而边缘检测算法则是图像处理问题中经典技术难题之一, 它的解决对于我们进行高层次的特征描述, 识别和理解等有着重大的影响; 又由于边缘检测在许多方面都有着非常重要的使用价值, 所以人们一直在致力于研究和解决如何构造出具有良好性质及好的效果的边缘检测算子的问题.在通常情况下,我们可以将信号中的奇异点和突变点认为是图像中的边缘点,其附近灰度的变化情况可从它相邻像素灰度分布的梯度来反映. 根据这一特点,我们提出了多种边缘检测算子:如Robert 算子,Sobel算子,Prewitt 算子, Laplace 算子等.这些方法多是以待处理像素为中心的邻域作为进行灰度分析的基础,实现对图像边缘的提取并已经取得了较好的处理效果. 但这类方法同时也存在有边缘像素宽, 噪声干扰较严重等缺点,即使采用一些辅助的方法加以去噪,也相应的会带来边缘模糊等难以克服的缺陷.随着小波分析的出现, 其良好的时频局部特性被广泛的应用在图像处理和模式识别领域中, 成为信号处理中常用的手段和有力的工具. 通过小波分析, 可以将交织在一起的各种混合信号分解成不同频率的块信号,而通过小波变换进行边缘检测,可以充分利用其多尺度和多分辨率的性质,真实有效的表达图像的边缘特征.当小波变换的尺度减小时,对图像的细节更加敏感;而当尺度增大时,图像的细节将被滤掉,检测的边缘只是粗轮廓.该特性在模式识别中非常有用,我们可以将此粗轮廓称为图像的主要边缘.如果能将一个图像的主要边缘清晰完整的提取出来,这将对目标分割,识别等后续处理带来极大的便利.总的说来,以上方法都是基于图像的亮度信息来作的工作. 在众多科研工作者的努力下,取得了很好的效果.但是,由于图像边缘受到光照等物理条件的影响比较大, 往往使得以上诸多基于亮度的边缘提取方法有着一个共同的缺点, 那就是边缘不连续, 不封闭. 考虑到相位信息在图像中的重要性以及其稳定的特点, 使得利用相位信息进行图像处理成为新的研究课题. 在本文中即将介绍一种基于相位的图像特征检测方法——相位一致性方法. 它并不是利用图像的亮度信息,而是其相位特点,即假设图像的傅立叶分量相位最一致的点作为特征点.它不但能检测到阶跃特征, 线特征等亮度特征, 而且能够检测到由于人类视觉感知特性而产生的的马赫带现象. 由于相位一致性不需要对图像的特征类型进行任何假设,所以它具有很强的通用性.§1.2 image edge definitionThe image majority main information all exists in the image edge, the main performance for the image partial characteristic discontinuity, is in the image the gradation change quite fierce place, also is the signal which we usually said has the strange change place. The strange signal the gradation change which moves towards along the edge is fierce, usually we divide the edge for the step shape and the roof shape two kind of types (as shown in Figure 1-1).In the step edge two side grey levels have the obvious change; But the roof shape edge is located the gradation increase and the reduced intersection point.May portray the peripheral point in mathematics using the gradation derivative the change, to the step edge, the roof shape edge asks its step, the second time derivative separately. To an edge, has the possibility simultaneously to have the step and the line edge characteristic. For example on a surface, changes from a plane to the normal direction different another plane can produce the step edge; If this surface has the edges and corners which the regular reflection characteristic also two planes form quite to be smooth, then works as when edges and corners smooth surface normal after mirror surface reflection angle, as a result of the regular reflection component, can produce the bright light strip on the edges and corners smooth surface, such edge looked like has likely superimposed a line edge in the step edge. Because edge possible and in scene object important characteristic correspondence, therefore it is the very important image characteristic.Forinstance, an object outline usually produces the step edge, because the object image intensity is different with the background image intensity.§1.3 paper selected topic theory significanceThe paper selected topic originates in holds the important status and the function practical application topic in the image project.The so-called image project discipline is refers foundation discipline and so on mathematics, optics principles, the discipline which in the image application unifies which accumulates the technical background develops.The image project content is extremely rich, and so on divides into three levels differently according to the abstract degree and the research technique: Imagery processing, image analysis and image understanding.As shown in Figure 1-2, in the chart the image division is in between the image analysis and the imagery processing, its meaning is, the image division is from the imagery processing to the image analysis essential step, also is further understands the image the foundation. The image division has the important influence to the characteristic.The image division and based on thedivision goal expression, the characteristic extraction and the parameter survey and so on transforms the primitive image as a more abstract more compact form, causes the high-level image analysis and possibly understands into.But the edge examination is the image division core content, therefore the edge examination holds the important status and the function in the image project.Therefore the edge examination research always is in the image engineering research the hot spot and the focal point, moreover the people enhance unceasingly to its attention and the investment.§1.2 图像边缘的定义图像的大部分主要信息都存在于图像的边缘中, 主要表现为图像局部特征的不连续性, 是图像中灰度变化比较剧烈的地方, 也即我们通常所说的信号发生奇异变化的地方. 奇异信号沿边缘走向的灰度变化剧烈,通常我们将边缘划分为阶跃状和屋顶状两种类型(如图1-1 所示).阶跃边缘中两边的灰度值有明显的变化; 而屋顶状边缘位于灰度增加与减少的交界处. 在数学上可利用灰度的导数来刻画边缘点的变化,对阶跃边缘,屋顶状边缘分别求其一阶,二阶导数. 对一个边缘来说,有可能同时具有阶跃和线条边缘特性.例如在一个表面上,由一个平面变化到法线方向不同的另一个平面就会产生阶跃边缘; 如果这一表面具有镜面反射特性且两平面形成的棱角比较圆滑,则当棱角圆滑表面的法线经过镜面反射角时,由于镜面反射分量,在棱角圆滑表面上会产生明亮光条, 这样的边缘看起来象在阶跃边缘上叠加了一个线条边缘. 由于边缘可能与场景中物体的重要特征对应,所以它是很重要的图像特征.比如,一个物体的轮廓通常产生阶跃边缘, 因为物体的图像强度不同于背景的图像强度.§1.3 论文选题的理论意义论文选题来源于在图像工程中占有重要的地位和作用的实际应用课题.所谓图像工程学科是指将数学,光学等基础学科的原理,结合在图像应用中积累的技术经验而发展起来的学科.图像工程的内容非常丰富,根据抽象程度和研究方法等的不同分为三个层次:图像处理,图像分析和图像理解.如图1-2 所示,在图中,图像分割处于图像分析与图像处理之间,其含义是,图像分割是从图像处理进到图像分析的关键步骤,也是进一步理解图像的基础.图像分割对特征有重要影响. 图像分割及基于分割的目标表达, 特征提取和参数测量等将原始图像转化为更抽象更紧凑的形式, 使得更高层的图像分析和理解成为可能. 而边缘检测是图像分割的核心内容, 所以边缘检测在图像工程中占有重要的地位和作用. 因此边缘检测的研究一直是图像技术研究中热点和焦点,而且人们对其的关注和投入不断提高.。
edge_detection_边缘检测

边缘检测-edge detection1.问题描述边缘检测是图像处理和计算机视觉中的基本问题,边缘检测的目的是标识数字图像中亮度变化明显的点。
图像属性中的显著变化通常反映了属性的重要事件和变化。
这些包括(i)深度上的不连续、(ii)表面方向不连续、(iii)物质属性变化(iv)场景照明变化。
边缘检测是图像处理和计算机视觉中,尤其是特征提取中的一个研究领域。
边缘检测的评价是指对边缘检测结果或者边缘检测算法的评价。
诚然,不同的实际应用对边缘检测结果的要求存在差异,但大多数因满足以下要求:1)正确检测出边缘2)准确定位边缘3)边缘连续4)单边响应,即检测出的边缘是但像素的2.应用场合图像边缘检测大幅度地减少了数据量,并且剔除了可以认为不相关的信息,保留了图像重要的结构属性。
有许多方法用于边缘检测,它们的绝大部分可以划分为两类:基于查找一类和基于零穿越的一类。
基于查找的方法通过寻找图像一阶导数中的最大和最小值来检测边界,通常是将边界定位在梯度最大的方向。
基于零穿越的方法通过寻找图像二阶导数零穿越来寻找边界,通常是Laplacian过零点或者非线性差分表示的过零点。
3.研究历史和现状边缘检测作为图像处理的一个底层技术,是一个古老又年轻的课题,有着悠久的历史。
早在1959年,B.Julez就提到过边缘检测,随后,L.G.Robert于1965年对边缘检测进行系统的研究。
3.1一阶微分算子一阶微分算子是最原始,最基本的边缘检测方法,它的理论依据是边缘是图像中灰度发生急剧变化的地方,而图像的提督刻画了灰度的变化速率。
因此,通过一阶微分算子可以增强图像中的灰度变化区域,然后对增强的区域进一步判断边缘。
在点(x,y)的梯度为一个矢量,定义为:梯度模值为:梯度方向为:根据以上理论,人们提出了许多算法,经典的有:Robert算子,Sobel算子等等,这些一阶微分算子的区别在于算子梯度的方向,以及在这些方向上用离散化数值逼近连续导数的方式和将这些近似值合成梯度的方式不同。
edge

4 边缘检测(讲义 §5.2 §6.1)4.1 边缘检测edge detection(1) 梯度算子 Roberts, Sobel, Prewitt (2) 方向算子(3) 二阶算子 Laplacian, LoG 4.2 边界抽取(Boundary Extraction ) (4) 连通性 (5) 边界跟踪 (6) 细化 (7) 连接 (8) Hough 变换 4.3 边界表示 (1) 链码(2) Fourier 描述子(3) 直线拟合边缘检测(edge detection )连续图象f(x,y),其方向导数在边缘(法线)方向上有局部最大值。
边缘检测:求f(x,y)梯度的局部最大值和方向 f(x,y)在θ方向沿r 的梯度θθsin cos y x f f ry y f r x x f rf +=∂∂⋅∂∂+∂∂⋅∂∂=∂∂rf ∂∂的最大值条件是=∂⎪⎭⎫ ⎝⎛∂∂∂θr f 0cos sin =+g y g x f f θθxyg f f 1tan-=θ,orπθ+g梯度最大值22maxyx f f r f g +=⎪⎭⎫⎝⎛∂∂=或yx f f g +=梯度算子图象U(m,n)在两个正交方向上的梯度),(1n m g 和),(2n m g),(*),(),(11n m H n m U n m g =),(*),(),(22n m H n m U n m g =常用边缘检测算子各向同性(isotropic )微分算子坐标系统旋转 ),(y x ——未旋转,)','(y x ——旋转后 θθsin 'cos 'y x x -=, θθc o s 's i n 'y x y -=θθsin cos '''yf xf x y y f x x x f x f ∂∂+∂∂=∂∂⋅∂∂+∂∂⋅∂∂=∂∂ θθcos sin '''yf xf y y yf y x x f y f ∂∂+∂∂-=∂∂⋅∂∂+∂∂⋅∂∂=∂∂xf ∂∂,yf∂∂不是各向同性的,但它们的平方和各向同性。
第六章边缘检测

第六章边缘检测边缘(edge)是指图像局部亮度变化最显著的部分.边缘主要存庄于目标与目标、目标与背景、区域与区域(包括不同色彩)之间,是图像分割、纹理特征提取等图像分析的重要基础,图像分析和理解的第一步常常是边缘检测(edge detection),由于边缘检测十分重要,因此成为机器视觉研究领域最活跃的课题之一,本章主要讨论边缘检测和定位的基本概念,并通过几种常用的边缘检测器来说明边缘检测的基本问题。
图像中的边缘通常与图像亮度或图像亮度的一阶导数的不连续性有关.图像亮度的不连续可分为:①阶跃不连续,即图像亮度在不连续处的两边的象素灰度值有着显著的差异;②线条不连续,即图像亮度突然从一个值变化到另一个值,保持一个较小的行程后又返回到原来的值.在实际中,阶跃和线条边缘图像是很少见的,由于大多数传感元件具有低频特性,使得阶跃边缘变成斜坡型边缘,线条边缘变成屋顶形边缘,其中的亮度变化不是瞬间的,而是跨越一定的距离,这些边缘如图6.1所示。
对一个边缘来说,有可能同时具有阶跃和线条边缘特性.例如在一个表面上,由一个平面变化到法线方向不同的另一个平面就会产生阶跃边缘;如果这一表面具有镜面反射特性且两平面形成的棱角比较圆滑,则当棱角圆滑表面的法线经过镜面反射角时,由于镜面反射分量,在棱角圆滑表面上会产生明亮光条,这样的边缘看起来像在阶跃边缘上叠加了一个线条边缘.由于边缘可能与场景中物体的重要特征对应,所以它是很重要的图像特征.比如,一个物体的轮廓通常产生阶跃边缘,因为物体的图像亮度不同于背景的图像亮度。
在讨论边缘算子之前,首先给出一些术语的定义:边缘点:图像中亮度显著变化的点.边缘段:边缘点坐标[i,j]及其方向θ的总和,边缘的方向可以是梯度角.边缘检测器:从图像中抽取边缘(边缘点或边缘段)集合的算法.轮廓:边缘列表,或是一条边缘列表的曲线模型.边缘连接:从无序边缘表形成有序边缘表的过程.习惯上边缘的表示采用顺时针方向来排序.边缘跟踪:一个用来确定轮廓图像(指滤波后的图像)的搜索过程.边缘点的坐标可以是边缘位置象素点的行、列整数标号,也可以在子象素分辨率水平上表示.边缘坐标可以在原始图像坐标系上表示,但大多数情况下是在边缘检测滤波器的输出图像的坐标系表示,因为滤波过程可能导致图像坐标平移或缩放.边缘段可以用象素点尺寸大小的小线段定义,或用具有方向属性的一个点定义.请注意,在实际中,边缘点和边缘段都称为边缘。
边缘检测

边缘检测从Wikipedia,自由的百科全书跳转到:导航,搜索边缘检测是一种工具,对基本的图像处理和计算机视觉,特别是在以下领域特征检测和特征提取,其中一个目的是确定点数字图像在该图像的亮度急剧变化,或者更正式,有连续性。
内容[hide]∙ 1 动机∙ 2 边属性∙ 3 一个简单的边缘模型∙ 4 为什么边缘检测是一个不平凡的任务∙ 5 至边缘检测方法o 5.1 Canny边缘检测o 5.2 其他第一顺序的方法o 5.3 阈值和链接o 5.4 边缘细化o 5.5 二阶边缘检测方法5.5.1 微分边缘检测o 5.6 相位叠合的边缘检测∙ 6 参见∙7 参考资料[ 编辑 ] 动机Canny边缘检测应用到照片对检测图像的亮度急剧变化的目的是捕捉重要的事件和在世界性质的变化。
可以证明,在图像形成模型,而一般假设为一,在图像亮度不连续性可能对应[1][2] :∙间断深入,∙在表面方向的不连续性,∙在材料性质的变化和∙在场景照明变化。
在理想的情况下,申请一到图像边缘检测的结果可能导致指示对象的边界曲线连接的设置,表面标记以及边界曲线,对应于表面方向的不连续性。
因此,应用边缘检测算法的图像可能会显着减少的数据量要处理,因此可能筛选出的信息可能被视为不相关,同时保留了一个形象的重要结构特性。
如果边缘检测步骤是成功,诠释原始图像的信息含量后续任务可能因此大大简化。
然而,它并不总是能够获得中度复杂的现实生活中,这种理想的图像边缘。
边缘提取的非平凡的形象通常都是阻碍碎片,这意味着边缘曲线不连接,丢失边段以及伪边缘没有相应的图像有趣的现象-这样复杂的图像数据的后续任务的解释。
[3]边缘检测是计算机视觉技术之一的基本步骤,在图像处理,图像分析,图像模式识别。
[4]近年来,然而,大量(成功)的研究也已经[就计算机视觉的方法有哪些? ]不明确依赖于边缘检测作为预处理步骤。
[ 编辑 ] 边属性边缘提取一个三维场景二维图像可以被看作是视点依赖或独立的分类观点。
halcon 边缘检测算子
halcon 边缘检测算子(最新版)目录1.边缘检测的定义及目的2.边缘检测算子的分类3.常见边缘检测算子及其特点4.Halcon 边缘检测算子的应用案例5.总结正文边缘检测是图像处理中的一项重要技术,其目的是从图像中提取出具有亮度值(灰度)空间方向梯度大的边缘、线特征。
边缘指的是周围像素灰度有阶跃变化或屋顶等变化的那些像素的集合。
图像的边缘对应着图像灰度的不连续性。
显然,图像的边缘很少是从一个灰度跳到另一个灰度的理想状况。
真实图像的边缘通常都具有有限的宽度,呈现出陡峭的斜坡状。
边缘的锐利程度由图像灰度的梯度决定,梯度是指灰度变化的最快的方向和数量。
边缘检测算子分为多种类型,常见的有 Sobel 算子、Prewitt 算子、Roberts 算子、Laplacian 算子和 Canny 算子等。
这些算子都有各自的特点和适用场景。
Sobel 算子主要用来检测边缘,其技术特点是以离散型的差分算子,用来运算图像亮度函数的梯度的近似值。
Prewitt 算子和Roberts 算子也是常用的边缘检测算子,它们分别采用不同的计算方法来提取边缘信息。
Laplacian 算子则是一种二阶导数算子,可以用来检测图像中的突变区域。
Canny 算子是一种多步骤的边缘检测算法,能够有效地检测出图像中的边缘和线条。
在 Halcon 中,也可以使用这些边缘检测算子来实现边缘检测和线条检测。
以下是一个使用 Halcon 边缘检测算子的例子:```1.读取图像bmp") getimagesize,(image,,width,,height)2.提取边缘edgesimage(image,amp,dir,"lanser2",0.5,"none",-1,-1)3.使用 Hysteresis Threshold 进行边缘检测hysteresisthreshold(amp,margin,20,30,30)4.将彩色图像转换为灰度图像color2gray(image)5.使用 Canny 算子进行边缘检测cannyedge(image,50,150,5)```通过以上代码,我们可以使用 Halcon 实现边缘检测和线条检测。
C#Susan边缘检测(SusanEdgeDetection)
C#Susan边缘检测(SusanEdgeDetection)Susan边缘检测,⽅法简单,效率⾼,具体参照,修改dThreshold值,可以改变检测效果,⽤参照提供的重⼼法、⼒矩法可得到边缘⽅向;///https:///~steve/susan/susan/node6.htmlpublic unsafe static Bitmap SusanGray(this Bitmap sourceBitmap){int[] rowRadius = new int[7] { 1, 2, 3, 3, 3, 2, 1 };int width = sourceBitmap.Width;int height = sourceBitmap.Height;BitmapData sourceData = sourceBitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);int stride = sourceData.Stride;byte[] pixelBuffer = new byte[stride * sourceData.Height];byte[] resultBuffer = new byte[stride * sourceData.Height];Marshal.Copy(sourceData.Scan0, pixelBuffer, 0, pixelBuffer.Length);sourceBitmap.UnlockBits(sourceData);float rgb = 0;for (int k = 0; k < pixelBuffer.Length; k += 4){rgb = pixelBuffer[k] * 0.11f;rgb += pixelBuffer[k + 1] * 0.59f;rgb += pixelBuffer[k + 2] * 0.3f;pixelBuffer[k] = (byte)rgb;pixelBuffer[k + 1] = pixelBuffer[k];pixelBuffer[k + 2] = pixelBuffer[k];pixelBuffer[k + 3] = 255;}int[] susanMap = new int[height * width];int offset = stride - width * 4;GCHandle srchandle = GCHandle.Alloc(susanMap, GCHandleType.Pinned);IntPtr susan = srchandle.AddrOfPinnedObject();int dThreshold = 28;fixed (byte* pbuff = pixelBuffer, rbuff = resultBuffer){byte* src = pbuff + stride * 3 + 3 * 4;int* br = (int*)susan + height * 3 + 3;byte* dst = rbuff + stride * 3 + 3 * 4;for (int offsetY = 3; offsetY < height - 3; offsetY++){for (int offsetX = 3; offsetX < width - 3; offsetX++, src += 4,dst+=4, br++){byte nucleusValue = *src;int usan = 0;int cx = 0, cy = 0;for (int i = -3; i <= 3; i++){int r = rowRadius[i + 3];byte* ptr = (byte*)((int)src + stride * i);for (int j = -r; j <= r; j++){int c = (int)Math.Exp(-Math.Pow((System.Math.Abs(nucleusValue - ptr[j * 4]) / dThreshold), 6));usan += c;cx += j * c;cy += i * c;}}if (usan < 28)usan = 28 -usan;elseusan = 0;if ((usan < 6) && (cx != 0 || cy != 0)){*dst = 255;dst[1] = 255;dst[2] = 255;dst[3] = 255;}else{*dst = 0;dst[1] = 0;dst[2] = 0;dst[3] = 255;}*br = usan;}src += 6 * 4 + offset;dst += 6 * 4 + offset;br += 6;}}Bitmap resultBitmap = new Bitmap(sourceBitmap.Width, sourceBitmap.Height);BitmapData resultData = resultBitmap.LockBits(new Rectangle(0, 0,resultBitmap.Width, resultBitmap.Height),ImageLockMode.WriteOnly,PixelFormat.Format32bppArgb);Marshal.Copy(resultBuffer, 0, resultData.Scan0, resultBuffer.Length);resultBitmap.UnlockBits(resultData);return resultBitmap;}并⾏的⽅法:public unsafe static Bitmap ParallelSusan(this Bitmap sourceBitmap){int width = sourceBitmap.Width;int height = sourceBitmap.Height;BitmapData sourceData = sourceBitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);int stride = sourceData.Stride;byte[] pixelBuffer = new byte[stride * sourceData.Height];byte[] resultBuffer = new byte[stride * sourceData.Height];Marshal.Copy(sourceData.Scan0, pixelBuffer, 0, pixelBuffer.Length);sourceBitmap.UnlockBits(sourceData);float rgb = 0;for (int k = 0; k < pixelBuffer.Length; k += 4){rgb = pixelBuffer[k] * 0.11f;rgb += pixelBuffer[k + 1] * 0.59f;rgb += pixelBuffer[k + 2] * 0.3f;pixelBuffer[k] = (byte)rgb;pixelBuffer[k + 1] = pixelBuffer[k];pixelBuffer[k + 2] = pixelBuffer[k];pixelBuffer[k + 3] = 255;}int[] susanMap = new int[height * width];int offset = stride - width * 4;GCHandle srchandle = GCHandle.Alloc(pixelBuffer, GCHandleType.Pinned);IntPtr src = srchandle.AddrOfPinnedObject();GCHandle dsthandle = GCHandle.Alloc(resultBuffer, GCHandleType.Pinned);IntPtr dst = dsthandle.AddrOfPinnedObject();GCHandle suhandle = GCHandle.Alloc(susanMap, GCHandleType.Pinned);IntPtr susan = suhandle.AddrOfPinnedObject();System.Threading.Tasks.Parallel.For(3, height - 3, (offsetY) =>{for (int offsetX = 3; offsetX < width - 3; offsetX++){OneSusan(offsetY, offsetX, (byte*)src, (byte*)dst, stride);}});Bitmap resultBitmap = new Bitmap(sourceBitmap.Width, sourceBitmap.Height);BitmapData resultData = resultBitmap.LockBits(new Rectangle(0, 0,resultBitmap.Width, resultBitmap.Height),ImageLockMode.WriteOnly,PixelFormat.Format32bppArgb);Marshal.Copy(resultBuffer, 0, resultData.Scan0, resultBuffer.Length);resultBitmap.UnlockBits(resultData);return resultBitmap;}public unsafe static void OneSusan(int offsetY, int offsetX, byte* src, byte* dst, int stride){int[] rowRadius = new int[7] { 1, 2, 3, 3, 3, 2, 1 };int dThreshold = 28;src = (byte*)((int)src + stride * offsetY + offsetX * 4);dst = (byte*)((int)dst + stride * offsetY + offsetX * 4);byte nucleusValue = *src;int usan = 0;int cx = 0, cy = 0;float vX = 0, vY = 0, vXY = 0;for (int i = -3; i <= 3; i++){int r = rowRadius[i + 3];byte* ptr = (byte*)((int)src + stride * i);for (int j = -r; j <= r; j++){int c = (int)Math.Exp(-Math.Pow((System.Math.Abs(nucleusValue - ptr[j * 4]) / dThreshold), 6)); usan += c;cx += j * c;cy += i * c;vX += j * j * c;vY += i * i * c;vXY += i * j * c;}}if (usan < 28)usan = 28 - usan;elseusan = 0;if ((usan < 5) && (cx != 0 || cy != 0)){*dst = 255;dst[1] = 255;dst[2] = 255;dst[3] = 255;}else{*dst = 0;dst[1] = 0;dst[2] = 0;dst[3] = 255;}}。
NI VISION边缘检测
Definition of an EdgeAn edge is a significant change in the grayscale values between adjacent pixels in an image. In NI Vision, edge detection works on a 1D profile of pixel values along a search region, as shown in the following figure. The 1D search region can take the form of a line, the perimeter of a circle or ellipse, the boundary of a rectangle or polygon, or a freehand region. The software analyzes the pixel values along the profile to detect significant intensity changes. You can specify characteristics of the intensity changes to determine which changes constitute an edge.1 Search Lines2 EdgesCharacteristics of an EdgeThe following figure illustrates a common model that is used to characterize an edge.Gray LevelIntensitiesSearchDirection1 Grayscale Profile2 Edge Length3 Edge Strength4 Edge LocationThe following list includes the main parameters of this model.∙Edge strength—Defines the minimum difference in the grayscale values between the background and the edge. The edge strength is also called the edge contrast. The following figure shows an image that has different edge strengths. The strength of an edge can vary for the following reasons: ∙Lighting conditions—If the overall light in the scene is low, the edges in image will have low strengths. The following figure illustrates a change in the edge strength along the boundary of an object relative to different lighting conditions.∙Objects with different grayscale characteristics—The presence of a very bright object causes other objects in the image with lower overall intensities to have edges with smaller strengths.A B C∙Edge length—Defines the distance in which the desired grayscale difference between the edge and the background must occur. The length characterizes the slope of the edge. Use a longer edge length, defined by the size of the kernel used to detect edges, to detect edges with a gradual transition between the background and the edge.∙Edge location—The x, y location of an edge in the image.∙Edge polarity—Defines whether an edge is rising or falling. A rising edge is characterized by an increase in grayscale values as you cross the edge. A falling edge is characterized by a decrease in grayscale values as you cross the edge. The polarity of an edge is linked to the search direction.The following figure shows examples of edge polarities.Edge Detection MethodsNI Vision offers two ways to perform edge detection. Both methods compute the edge strength at each pixel along the 1D profile. An edge occurs when the edge strength is greater than a minimum strength. Additional checks find the correct location of the edge. You can specify the minimum strength by using the Minimum Edge Strength or Threshold Levelparameter in the software.Simple Edge DetectionThe software uses the pixel value at any point along the pixel profile to define the edge strength at that point. To locate an edge point, the software scans the pixel profile pixel by pixel from the beginning to the end. A rising edge is detected at the first point at which the pixel value is greater than a threshold value plus a hysteresis value. Set this threshold value to define the minimum edge strength required for qualifying edges. Use the hysteresis value to declare different edge strengths for the rising and falling edges. When a rising edge is detected, the software looks for a falling edge. A falling edge is detected when the pixel value falls below the specified threshold value. This process is repeated until the end of the pixel profile. The first edge along the profile can be either a rising or falling edge. The following figure illustrates the simple edge model.The simple edge detection method works well when there is little noise in the imageand when there is a distinct demarcation between the object and the background.Gray LevelIntensitiesPixels1 Grayscale Profile2 Threshold Value3 Hysteresis4 Rising Edge Location5 Falling Edge LocationAdvanced Edge Detection The edge detection algorithm uses a kernel operator to compute the edge strength. The kernel operator is a local approximation of a Fourier transform of the first derivative. The kernel is applied to each point in the search region where edges are to be located. For example, for a kernel size of 5, the operator is a ramp function that has 5 entries in the kernel. The entries are {–2, –1, 0, 1, 2}. The width of the kernel size is user-specified and should be based on the expected sharpness, or slope, of the edges to be located. The following figure shows the pixel data along a search line and the equivalent edge magnitudes computed using a kernel of size 5.Peaks in the edge magnitude profile above a user-specified threshold are the edge points detected by the algorithm.Pixel IntensitiesEdge Magnitudes1 Edge Location2 Minimum Edge ThresholdTo reduce the effect of noise in image, the edge detection algorithm can be configured to extract image data along a search region that is wider than the pixels in the image. The thickness of the search region is specified by the search width parameter. The data in the extracted region is averaged in a direction perpendicular to the search region before the edge magnitudes and edge locations are detected. A search width greater than 1 also can be used to find a “best” or “average”edge location or a poorly formed object. The following figure shows how the search width is defined.1 Search Width2 Search LineSubpixel AccuracyWhen the resolution of the image is high enough, most measurement applications make accurate measurements using pixel accuracy only. However, it is sometimes difficult to obtain the minimum image resolution needed by a machine vision application because of limits on the size of the sensors available or the price. In these cases, you need to find edge positions with subpixel accuracy.Subpixel analysis is a software method that estimates the pixel values that a higher resolution imaging system would have provided. In the edge detection algorithm, the subpixel location of an edge is calculated using a parabolic fit to the edge-detected data points. At each edge position of interest, the peak or maximum value is found along with the value of one pixel on each side of the peak. The peak position represents the location of the edge to the nearest whole pixel. Using the three data points and the coefficients a, b, and c, a parabola is fitted to the data points using the expression ax2 + bx2 + c.The procedure for determining the coefficients a, b, and c in the expression is as follows: Let the three points which include the whole pixel peak location and one neighbor on each side be represented by (x0, y0), (x1, y1), and (x2, y2). We will let x0 = –1, x1 = 0, and x2 = 1 without loss of generality. We now substitute these points in the equation for a parabola and solve for a, b, and c. The result isc = y1, which is not needed and can be ignored.The maximum of the function is computed by taking the first derivative of the parabolic function and setting the result equal to 0. Solving for x yieldsThis provides the subpixel offset from the whole pixel location where the estimate of the true edge location lies.The following illustrates how a parabolic function is fitted to the detected edge pixel location using the magnitude at the peak location and the neighboring pixels. The subpixel location of an edge point is estimated from the parabolic fit.1 Interpolated Peak Location3 Interpolating Function2 Neighboring PixelWith the imaging system components and software tools currently available, you can reliably estimate 1/25 subpixel accuracy. However, results from an estimation depend heavily on the imaging setup, such as lighting conditions, and the camera lens. Before resorting to subpixel information, try to improve the image resolution. Refer to system setup and calibration for more information about improving images.Signal-to-Noise RatioThe edge detection algorithm computes the signal-to-noise ratio for each detected edge point. The signal-to-noise ratio can be used to differentiate between a true, reliable, edge and a noisy, unreliable, edge. A high signal-to-noise ratio signifies a reliable edge, while a lowsignal-to-noise ratio implies the detected edge point is unreliable.In the edge detection algorithm, the signal-to-noise ratio is computed differently depending on the type of edges you want to search for in the image.When looking for the first, first and last, or all edges along search lines, the noise level associated with a detected edge point is the strength of the edge that lies immediately before the detected edge and whose strength is less than the user-specified minimum edge threshold, as shown in the following figure.1 Edge 1 Magnitude2 Edge 2 Magnitude3 Threshold Level4 Edge 2 Noise5 Edge 1 Noise When looking for the best edge, the noise level is the strength of the second strongest edge before or after the detected edge, as shown in the following figure.1 Best Edge Magnitude2 Best Edge Noise3 Threshold Level Calibration Support for Edge Detection The edge detection algorithm uses calibration information in the edge detection process if the original image is calibrated. For simple calibration, edge detection is performed directly onthe image and the detected edge point locations are transformed into real-world coordinates. For perspective and non-linear distortion calibration, edge detection is performed on a corrected image. However, instead of correcting the entire image, only the area corresponding to the search region used for edge detection is corrected. Figure A and Figure B illustrate the edge detection process for calibrated images. Figure A shows an uncalibrated distorted image. Figure B shows the same image in a corrected image space.1 Search Line2 Search Width3 Corrected AreaInformation about the detected edge points is returned in both pixels and real-world units. Refer to system setup and calibration for more information about calibrating images.Extending Edge Detection to 2D Search Regions The edge detection tool in NI Vision works on a 1D profile. The rake, spoke, and concentric rake tools extend the use of edge detection to two dimensions. In these edge detection variations, the 2D search area is covered by a number of search lines over which the edge detection is performed. You can control the number of the search lines used in the search region by defining the separation between the lines. RakeA Rake works on a rectangular search region, along search lines that are drawn parallel to the orientation of the rectangle. Control the number of lines in the area by specifying the search direction as left to right or right to left for a horizontally oriented rectangle. Specify the search direction as top to bottom or bottom to top for a vertically oriented rectangle. The following figure illustrates the basics of the rake function.1 Search Area2 Search Line3 Search Direction4 Edge PointsSpokeA Spoke works on an annular search region, along search lines that are drawn from the center of the region to the outer boundary and that fall within the search area. Control the number of lines in the region by specifying the angle between each line. Specify the search direction as either from the center outward or from the outer boundary to the center. The following figure illustrates the basics of the spoke function.1 Search Area2 Search Line3 Search Direction4 Edge PointsConcentric RakeA Concentric Rake works on an annular search region. It is an adaptation of the rake to an annular region. The following illustrates the basics of the concentric rake. Edge detection is performed along search lines that occur in the search region and that are concentric to the outer circular boundary. Control the number of concentric search lines that are used for the edge detection by specifying the radial distance between the concentric lines in pixels. Specify the direction of the search as either clockwise or anti-clockwise.1 Search Area2 Search Line3 Search Direction4 Edge PointsFinding Straight EdgesFinding straight edges is another extension of edge detection to 2D search regions. Finding straight edges involves finding straight edges, or lines, in an image within a 2D search region. Straight edges are located by first locating 1D edge points in the search region and then computing the straight lines that best fit the detected edge points. Straight edge methods can be broadly classified into two distinct groups based on how the 1D edge points are detected in the image. Rake-Based MethodsA Rake is used to detect edge points within a rectangular search region. Straight lines are then fit to the edge points. Three different options are available to determine the edge points through which the straight lines are fit.First EdgesA straight line is fit through the first edge point detected along each search line in the Rake. The method used to fit the straight line is described in dimensional measurements. The following figure shows an example of the straight edge detected on an object using the first dark to bright edges in the Rake along with the computed edge magnitudes along one search line in the Rake. Search DirectionBest EdgesA straight line is fit through the best edge point along each search line in the Rake. The method used to fit the straight line us described in dimensional measurements. The following figure showsan example of the straight edge detected on an object using the best dark to bright edges in the Rake along with the computed edge magnitudes along one search line in the Rake.Search DirectionHough-Based MethodsIn this method, a Hough transform is used to detect the straight edges, or lines, in an image. The Hough transform is a standard technique used in image analysis to find curves that can be parameterized, such as straight lines, polynomials, and circles. For detecting straight lines in an image, NI Vision uses the parameterized form of the lineρ = xcosθ + ysinθwhere, ρ is the perpendicular distance from the origin to the line and θ is the angle of the normal from the origin to the line. Using this parameterization, a point (x, y) in the image is transformed into a sinusoidal curve in the (ρ, θ), or Hough space. The following figure illustrates the sinusoidal curves formed by three image points in the Hough space. The curves associated with colinear points in the image, intersect at a unique point in the Hough space. The coordinates (ρ, θ) of the intersection are used to define an equation for the corresponding line in the image. For example, the intersection point of the curves formed by points 1 and 2 represent the equation for Line1 in the image.The following figure illustrates how NI Vision uses the Hough transform to detect straight edges in an image. The location (x, y) of each detected edge point is mapped to a sinusoidal curve in the (ρ, θ) space. The Hough space is implemented as a two-dimensional histogram where the axes represent the quantized values for ρ and θ. The range forρ is determined by the size of the search region, while the range for θ is determined by the angle range for straight lines to be detected in the image. Each edge location in the image maps to multiple locations in the Hough histogram, and the count at each location in the histogram is incremented by one. Locations in the histogram with a count of two or more correspond to intersection points between curves in the (ρ, θ) space. Figure B shows a two-dimensional image of the Hough histogram. The intensity of each pixel corresponds to the value of the histogram at that location. Locations where multiple curves intersect appear darker than other locations in the histogram. Darker pixels indicate stronger evidence for the presence of a straight edge in the original image because more points lie on the line. The following figure also shows the line formed by four edge points detected in the image and the corresponding intersection point in the Hough histogram.1 Edge Point2 Straight Edge3 Search Region4 Search LineStraight edges in the image are detected by identifying local maxima, or peaks in the Hough histogram. The local maxima are sorted in descending order based on the histogram count. To improve the computational speed of the straight edge detection process, only a few of the strongest peaks are considered as candidates for detected straight edges. For each candidate, a score is computed in the original image for the line that corresponds to the candidate. The line with the best score is returned as the straight edge. The Hough-based method also can be used to detect multiplestraight edges in the original image. In this case, the straight edges are returned based on their scores.Projection-Based Methods The projection-based method for detecting straight edges is an extension of the 1D edge detection process discussed in the advanced edge detection section. The following figure illustrates the projection-based straight edge detection process. The algorithm takes in a search region, search direction, and an angle range. The algorithm first either sums or finds the medians of the data in a direction perpendicular to the search direction. NI Vision then detects the edge position on the summed profile using the 1D edge detection function. The location of the edge peak is used to determine the location of the detected straight edge in the original image.To detect the best straight edge within an angle range, the same process is repeated by rotating the search ROI through a specified angle range and using the strongest edge found to determine the location and angle of the straight edge.Search DirectionSumPixels1 Projection Axis2 Best Edge Peak and Corresponding Line in the ImageThe projection-based method is very effective for locating noisy and low-contrast straight edges.The projection-based method also can detect multiple straight edges in the search region. For multiple straight edge detection, the strongest edge peak is computed for each point along the projection axis. This is done by rotating the search region through a specified angle range and computing the edge magnitudes at every angle for each point along the projection axis. The resulting peaks along the projection axis correspond to straight edges in the original image. Straight Edge ScoreNI Vision returns an edge detection score for each straight edge detected in an image. The score ranges from 0 to 1000 and indicates the strength of the detected straight edge.The edge detection score is defined as。
sobel算子图像边缘检测研究外文翻译
Real-time FPGA Based Implementation of ColorImage Edge DetectionAbstract—Color Image edge detection is very basic and important step for many applications such as image segmentation, image analysis, facial analysis, objects identifications/tracking and many others. The main challenge for real-time implementation of color image edge detection is because of high volume of data to be processed (3 times as compared to gray images). This paper describes the real-time implementation of Sobel operator based color image edge detection using FPGA. Sobel operator is chosen for edge detection due to its property to counteract the noise sensitivity of the simple gradient operator. In order to achieve real-time performance, a parallel architecture is designed, which uses three processing elements to compute edge maps of R, G, and B color components. The architecture is codedusing VHDL, simulated in ModelSim, synthesized using Xilinx ISE 10.1 and implemented on Xilinx ML510 (Virtex-5 FX130T) FPGA platform. The complete system is working at 27 MHz clock frequency. The measured performance of our system for standard PAL (720x576) size images is 50 fps (frames per second) and CIF (352x288) size images is 200 fps.Index Terms—Real-time Color Image Edge Detection, Sobel Operator, FPGA Implementation, VLSI Architecture, Color Edge Detection ProcessorI. INTRODUCTIONHigh speed industrial applications require very accurate and real-time edge detection. Edge detection in gray images does not give very accurate results due to loss of color information during color to gray scale image conversion. Therefore, to achieve desired accuracy, detection of edges in color images is necessary. The main challenge for real-time implementation of color image edge detection is in processing of high volume of data (3 times as compared to gray images) within real-time constraints. Therefore, it is hard to achieve real-time performance of edge detection for PAL sizes color images with serial processors. Due to inherent parallelism property, FPGAs can deliver real-time time performance for such applications. Furthermore, FPGAs provide the possibility to perform algorithm modifications in later stages of the system development [1].The main focus of most of the existing FPGA based implementations for edge detection using Sobel operator has been on achieving real-time performance for gray scale images by using various architectures and different design methodologies. As edge detection is low-level image processing operation, Single Instruction Multiple Data (SIMD) type architectures [2] are very suitable for edge detection to achieve real-time performance. These architectures use multiple data processing elements and therefore, require more FPGA resources. The architecture clockfrequency can be improved by using pipelining. A pipelined architecture for real-time gray image edge detection is presented in [3]. Some computation optimized architectures are presented in [4, 5]. Few more architectures for real-time gray image edge detection are available in [6 - 11]. In [12, 13], the architectures are designed using MA TLAB-Simulink based design methodology.In this paper, we show that real-time Sobel operator based color image edge detection can be achieved by using a FPGA based parallel architecture. For each color component in RGB space, one specific edge computation processor is developed. As Sobel operator is sliding window operator, smart buffer based Memory architecture is used to move the incoming pixels in computing window. The specific datapaths are designed and controller is developed to perform the complete task. The design and simulation is done using VHDL. The design is targeted to Xilinx ML 510 (Virtex –5 FX130T) FPGA platform. The implementation is tested for real world scenario. It can robustly detect the edges in color images.The rest of the paper is organized in the following way . In section 2 we describe the original Sobel operator based edge detection algorithm. We show, in section 3, the customized architecture for algorithm implementation and how each stage works. In section 4, practical tests are evaluated and synthesis results are shown taking into account system performance. Finally conclusions anddiscussions are presented in section 5.II. EDGE DETECTION SCHEMEIn this section the used algorithm is briefly described, for a more detailed description we refer to [14, 15]. The Sobel operator is widely used for edge detection in images. It is based on computing an approximation of thegradient of the image intensity function. The Sobel filter uses two 3x3 spatial masks which are convolved with the original image to calculate the approximations of thegradient. The Sobel operator uses two filters Hx and Hy.⎥⎥⎥⎦⎤⎢⎢⎢⎣⎡---=101202101X H (1)⎥⎥⎥⎦⎤⎢⎢⎢⎣⎡=1211001-2-1-y H (2)These filters compute the gradient components across the neighboring lines or columns, respectively. The smoothing is performed over three lines or columns before computing the respective gradients. In this Sobel operator, the higher weights are assigned in smoothing part to current center line and column as compared to simple gradient operators. The local edge strength is defined as the gradient magnitude given by equation 3.()22,Hy Hx y x GM += (3)This equation 3 is computationally costly because of square and square root operations for every pixel. It is more suitable computationally to approximate the square and square root operations by absolute values.()Hy Hx y x GM +=, (4)This expression is much easy to compute and still preserves the relative changes in intensity (edges in images).This above mentioned scheme is for gray scale images. For color images (RGB color space) this scheme is applied separately for each color component. Final color edge map of color image is computed by using the edge maps of each color component [16].)(B Edge or G Edge or EdgeR ColorEdge (5)III. PROPOSED ARCHITECTURETo detect edges in real-time in PAL (720x576) size color images, dedicated hardware architecture is implemented for Sobel operator based edge detection scheme. Fig. 1 shows the conceptual block diagram of complete system. The hardware setup includes a video camera, a video daughter card, and FPGA board. The video output of camera connects to Digilent VDEC1 Video Decoder Board which is interfaced with Xilinx ML510 (V irtex –5 FX130T) board using Interface PCB. Display Monitor is connected to the board using DVI connector. The video signals are decoded in Camera Interface Module. The output RGB data of camera interface module is applied to edge detection block. The edge detected output from the Edge Detection Block is displayed on the display monitor using DVI controller. The camera interface module also generates video timing signals which are necessary for proper functioning of edge detection block and DVI controller. A more detailed description of this Camera Interface Design can be found in[17].Figure 1. Complete System Block DiagramFig. 2 shows the basic block level data flow diagram for computation of edges in color images using Sobel operator. The goal is to perform edge detection three times, once each for red, green, and blue, and then the output is fused to form one edge map [16]. There are mainly four stages. First stage is Buffer Memory stage. In this stage, the three color components are separated andstored in three different memories. The second stage is gradient computation stage. In this stage the gradient is computed for each color component by adding absolute values of horizontal and vertical gradients. In third stage, the edge map is computed for each color component by comparing the gradient values with threshold. Final edge map is computed by combining the edge maps of each color components in stage four.Figure 2. Edge Detection in Color Images using Sobel OperatorThe streaming data processing cannot be used because the edge detection using Sobel operator algorithm is window based operation. Therefore, input data from camera is stored in on-chip memory (BRAM and Registers) before processing it on FPGA. The Sobel edge detection logic can begin processing as soon as two rows arrived in Buffer Memory. The Smart Buffer based Buffer Memory architecture [18] is used in the proposed Sobel operator based color edge detection implementation for data buffering. This approach (Fig. 3) works if one image pixel is coming from camera interface module in one clock cycle. The pixels are coming row by row. When buffers are filled, this architecture provides the access to the entire pixel neighborhood every clock cycle. The architecture places the highest demand on internal memory bandwidth. Because modern FPGA devices contain large amount of embedded memory, this approach does not cause problems [19]. The length of the shift registers depends on the width of input image. ForPAL (720x576) size images the length of FIFOs is 717 (i.e. 720 - 3). For CIF (352x288) size images, it is 349 (i.e. 352 – 3).Figure 3. Sliding Window Memory Buffer ArchitectureThe absolute values of gradient Hx and Hy for pixel data P2,2 is given by following expressions.())())*21333123,21,13,1,,,((P P P P P P Hx -+-+-= (6)())())*23,1332,12,31,11,3P P P P P P Hy -+-+-=,(( (7)The processing modules architectures for computing these horizontal and vertical gradients for each color components are shown in Fig. 4. Both the architectures are same except the inputs applied to them at a particular time. Each processing module performs additions, subtractions, and multiplication. The multiplication is costly in digital hardware but multiplication by 2 is easily achieved by shift operation.The complete architecture (Fig. 5) uses three processing elements in parallel (each for R, G , and B color components). The data coming from camera interface module is 24-bit RGB data. Incoming data is separated in three color components R, G , and B. Each color component data is of 8-bit (i.e. any value from 0 to 255). Three smart buffer based Sliding Window Memories are used to store two rows of the three color components. Each memory uses two First-in First-out (FIFO) shift-registers and 9 registers. The width of FIFOs and registers is 8-bit. Therefore, in total 6 FIFOs and 27 registers are required for designing Sliding Window Buffer Memory for RGB color image edge detection architecture. The designing of FIFOs using available registers in FPGA occupies large area in FPGA. Therefore, available Block RAMs on FPGA are used for designing the FIFOs. This resulted in efficient utilization of FPGA resources.Figure 4. Gradient Hx and Hy Computation Module ArchitecturesFor detecting edge in PAL (720x576) size color images, it takes 1440 (720x2) clock cycles to fill the two rows of image data in buffer memory. After this, in every clock cycle, each color component (R, G , and B) of new pixel is moved in their respective computing window (consists of 9 registers). The available 9 pixels in computing window (P1,1, P1,2, P1,3, P2,1, P2,2, P2,3, P3,1, P3,2, P3,3) are used for computing the Hx and Hy gradient values. These are computed according to equations 6 and 7 by using the processing module architectures shown in Fig 4. The approximate magnitude of the gradient is computed along each color component by adding the absolute values of Hx and Hy. After this, the approximate gradient of each color component is compared with a user defined threshold value. If the approximate value of gradient is more than the user defined threshold, the comparator output for that color component is 1 else it is 0. Theoutputs of all three comparators (R, G, and B) are finally fused to find the final edge map. The final edge map is computed by ORing the Edge Map outputs of each color component. It requires one three input OR gate. If the final edge map output is one, the each color component value is set to 11111111 else it is set to 00000000. These values are used by DVI controller to display the result on display Monitor.Figure 5. Complete Architecture for Color Image Edge Detection using Sobel OperatorIV. RESULTSThe proposed architecture is designed using VHDL and simulated in ModelSim. Synthesis is carried out using Xilinx ISE 10.3. Final design is implemented on Xilinx ML510 (Virtex–5 FX130T) FPGA board. It utilizes 294 Slice Registers, 592 Slice LUTs, 206 FPGA Slices, 642 LUT Flip Flop Pairs, 116 Route-thrus and 3 Block RAMS. The synthesis results (Table I) reveal that the FPGA resources utilized by proposed architecture are approximately 1% of total available resources. The FPGA resource utilization table is only for proposed color image edge detection architecture (i.e. buffer memory, gradient computation, edge map computation) and excludes the resources utilized by camera interface and display logic. The measured performance of our system at 27 MHz operating frequency for PAL (720x576) size images is 50 fps (frames per second), CIF (352x288) size images is 200 fps and QCIF (176x144) size images is 800 fps. PAL and CIF images are most commonly used video formats. Therefore, implemented system can easily detect edges in color images in real-time.TABLE I. SYNTHESIS RESULTSFigure 6. Input Color Image and Output Edge Detected ImageFigure 7. Input Color Image and Output Edge Detected ImageFigure 8. Input Color Image and Output Edge Detected ImageFigure 9. Complete SystemIn Fig. 6-8, the input PAL (720x576) size color test images taken from camera and respective output edge detected images produced by proposed architectures are shown. Fig. 9 shows the complete system. The images are captured by using Sony EVI D70P analog camera, processed by designed VLSI architecture running on FPGA, and displayed on monitor.V. CONCLUSIONIn this paper, the hardware architecture for Sobel operator based color image edge detection scheme has been presented. The architecture used approximately 1% of total FPGA resources and maintained real-time constraints of video processing. The system is tested for various real world situations and it robustly detects the edge in real-time with a frame rate of 50 fps for standard PAL video (60 fps for NTSC video) in color scale. The speed could be further improved by adding pipelining stages in gradient computation modules at the expense of increasing FPGA resources usage. The Xilinx ML510 (Virtex-5 FX130T) FPGA board is chosen for this implementation due to availability of large number of FPGA resources, Block RAMs, and PowerPC processor (for hardware-software co-design) so that same board can be used to implement other complex computer vision algorithms which make use of edge detection architecture. The proposed architecture is very suitable for high frame rate industrial applications. The future work will look at the use of this architecture for finding the focused areas in a scene for surveillance applications.A CKNOWLEDGMENTThe authors express their deep sense of gratitude to Director, Dr. Chandra Shekhar, forencouraging research and development. Also the authors would like to express their sincerethanks to Dr. AS Mandal and Group Leader, Raj Singh,for their precious suggestions in refining the research work. Authors specially thank Mr. Sanjeev Kumar, Technical Officer, for tool related support. We thank to reviewers, whose constructive suggestions have improved the quality of this research paper.REFERENCES[1] H. Jiang, H. Ardo, and V. Owall (2009), A Hardware Architecture for Real-Time Video Segmentation Utilizing Memory Reduction Techniques, IEEE Transactions on Circuits and Systems for V ideo Technology, vol. 19, no. 2, pp. 226–236.[2] R.L. Rosas, A.D. Luca, and F.B. Santillan (2005), SIMD Architecture for Image Segmentation using Sobel Operators Implemented in FPGA Technology, In Proceedings of 2nd International Conference on Electrical and Electronics Engineering, pp. 77-80.[3] T.A. Abbasi and M.U. Abbasi (2007), A Novel FPGA-based Architecture for Sobel Edge Detection Operator, International Journal of Electronics, vol. 94, no. 9, pp. 889-896, 2007.[4] Z.E.M. Osman, F.A. Hussin, And N.B.Z. Ali (2010a), Hardware Implementation of an Optimized Processor Architecture for Sobel Image Edge Detection Operator, In Proceeding of International Conference on Intelligent and Advanced Systems (ICIAS), pp. 1-4.[5] Z.E.M. Osman, F.A. Hussin, And N.B.Z. Ali (2010b), Optimization of Processor Architecture for Image Edge Detection Filter, In Proceeding of International Conference on Computer Modeling and Simulation, pp. 648-652[6] I. Y asri, N.H. Hamid, And V.V. Y ap (2008), Performance Analysis of FPGA based Sobel Edge Detection Operator, In Proceedings of International Conference on Electronic Design, pp. 1-4. [7] V. Sanduja and R. Patial (2012), Sobel Edge Detection using Parallel Architecture based on FPGA, International Journal of Applied Information Systems, vol. 3, no. 4, pp. 20-24.[8] G. Anusha, T.J. Prasad, and D.S. Narayana (2012), Implementation of SOBEL Edge Detection on FPGA, International Journal of Computer Trends and Technology, vol. 3, no. 3, pp. 472-475. [9] L.P. Latha (2012), Design of Edge Detection Technique Using FPGA(Field Programmable Gate Array) and DSP (Digital Signal Processor), VSRD International Journal of Electrical, Electronics & Communication Engineering, vol. 2, no. 6, pp. 346-352.[10] A.R. Ibrahim, N.A. Wahed, N. Shinwari, and M.A. Nasser (2011), Hardware Implementation of Real Time Video Edge Detection With Adjustable Threshold Level (Edge Sharpness) Using Xilinx Spartan-3A FPGA, Report.[11] P.S. Chikkali and K. Prabhushetty (2011), FPGA based Image Edge Detection and Segmentation, International Journal of Advanced Engineering Sciences and Technologies, V ol. 9, Issue 2, pp. 187-192.[12] R. Harinarayan, R. Pannerselvam, M.M. Ali, And D.K. Tripathi (2011), Feature extraction of Digital Aerial Images by FPGA based implementation of edge detection algorithms, In Proceedings of International Conference on Emerging Trends in Electrical and Computer Technology, pp. 631-635.[13] K.C. Sudeep and J. Majumdar (2011), A Novel Architecture for Real Time Implementation of Edge Detectors on FPGA, International Journal of Computer Science Issues, vol. 8, no. 1, pp. 193-202.[14] W. Burger and M.J. Burge (2008), Digital Image Processing: An Algorithmic Introduction Using Java, New Y ork: Springer, 120-123.中文翻译:基于FPGA的实时彩色实现图像边缘检测Sanjay Singh Saini *,阿尼尔库马尔,拉维赛尼IC设计组CSIR中央电子工程研究所,拉贾斯坦,印度333031个学位-。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
杭州电子科技大学信息工程学院毕业设计(论文)外文文献翻译毕业设计(论文)题目基于视觉的齿轮边缘检测算法设计与实现翻译(1)题目一个索贝尔图像边缘检测算法描述翻译(2)题目基于模糊逻辑技术图像上边缘检测系计算机专业计算机科学与技术姓名李俊俊班级08092313学号08923315指导教师孙志海译文一:1一个索贝尔图像边缘检测算法描述[1]摘要:图像边缘检测是一个确定图像边缘的过程,在输入的灰度图中的各个点寻找绝对梯度近似级对于边缘检测是非常重要的。
为边缘获得适当的绝对梯度幅度主要在与使用的方法。
Sobel算子就是在图像上进行2-D的空间梯度测量。
转换2-D像素列阵到性能统计数据集提高了数据冗余消除,因此,作为代表的数字图像,数据量的减少是需要的。
Sobel边缘检测器采用一对3×3的卷积模板,一块估计x-方向的梯度,另一块估计y-方向的梯度。
Sobel检测器对于图像中的噪音很敏感,它能有效地突出边缘。
因此,Sobel算子被建议用在数据传输中的大量数据通信。
关键词:图像处理,边缘检测,Sobel算子,通信数据,绝对梯度幅度。
引言图像处理在现代数据储存和数据传输方面十分重要,特别是图像的渐进传输,视频编码(电话会议),数字图书馆,图像数据库以及遥感。
它与处理靠算法产生所需的图像有关(Milan et al., 2003)。
数字图像处理(DSP)提高了在极不利条件下所拍摄的图像的质量,具体方法有:调整亮度与对比度,边缘检测,降噪,调整重点,减少运动模糊等(Gonzalez, 2002)。
图像处理允许更广泛的范围被应用到输入数据,以避免如噪声和信号失真集结在加工过程中存在的问题(Baker & Nayar, 1996)。
在19世纪60年代的Jet Propulsion实验室,美国麻省理工学院(MIT),贝尔实验室以及一些其他的地方,数字图像处理技术不断发展。
但是,因为当时的计算设备关系,处理的成本却很高。
随着20世纪快速计算机和信号处理器的应用,数字图像处理变成了图像处理最通用的形式,因为它不只是最多功能的,还是最便宜的。
图像处理过程中允许一些更复杂算法的使用,从而可以在简单任务中提供更先进的性能,同时可以实现模拟手段不能实现的方法(Micheal, 2003)。
因此,计算机搜集位表示像素或者点形成的图片元素,以此储存在电脑中(Vincent, 2006)。
首先,图像是在空间上的参数测量,而大多数的信号是在时间上的参数测量。
其次,它们包含了大量的信息[1] A Descriptive Algorithm for Sobel Image Edge Detection[C]. Proceedings of Informing Science& IT Education Conference (InSITE) 2009: 97-107.(Guthe和Strasser, 2004);图像处理是当输入是图像时的信息处理方式,就像是帧视频;输出不一定是图像,也有可能是比如图像的一个特征(Yuval, 1996)。
大多数图像处理技术包括把图像视为一个二维信号,以及包括信号处理技术的应用标准。
这一过程涉及图像的增强或操纵,导致产生另一图像,冗余数据的清除和2-D像素阵列到静态不相关数据集的转化(Priotr, 2004)。
由于图像包含大量的冗余数据,学者们发现最重要的信息在它的边缘(Canny, 1986)。
边作为像素的局部特征和最接近的近邻,特征边界(Chaug-Huang, 2002)。
它们对应于对象的界限,表面方向的改变和一个小幅度的对失败的描述。
边通常对应图像上的点,图像上灰度明显地从一个像素变化到下一个。
边代表图像上具有很强对比度的区域;以图像的边缘代表一幅图像有一个基本优点,当以高频率保留图像的大多数的重要信息时,数据量明显的减少(Keren, Osadchy, & Gotsman, 2001)。
因此,检测边缘帮助提取图像突然变化区域的有用的信息特征(Folorunso et al., 2007)。
边缘检测是一个定位图像边缘的一个过程。
在一图像中边缘检测是理解图像特征的一个重要步骤。
边组成了有意义的特征并且包含了重要的信息。
它显著地减少了图像尺寸的量并且过滤了一些可能被认为相关性较小的信息,保持了一幅图像的重要结构特征(Yuval, 1996)。
当图像被改时,大多数的图像包含一些当边被检测或更换时被移走的冗余(Osuna etal., 1997)。
消除冗余可以通过边缘检测来完成。
当进行图像边缘检测时,图像中纯在的每一种冗余都被删除(Sparr, 2000)。
检测图像亮度的急剧变化的目的是要捕捉重要的事件。
在保持重要结构特征的前提下,对一幅图像进行边缘检测会大大减少要处理的数据量并且可能因此过滤掉那些被认为不太有关的信息。
图像质量反映了输出边缘的重要信息,并且图像的尺寸是在减小的。
这反过来又进一步解释了边缘检测是一种解决了高容量空间图像占用电脑内存的问题的方法。
储存,通过互联网和宽带传输这些问题在进行边缘检测时可以很简单的就解决掉(Vincent, 2007)。
由于边缘通常出现在图像边界地区,边缘检测被广泛应用在当图像被分成对应不同对象区域的图像分割。
相关方法不同的方法被用于图像处理上的边缘检测,其中有Roberts交叉算法。
Robert 将一幅照片处理成一个线条制图,再将线条图转化成一个立体的图像,最后从任何角度显示所有删除了的隐藏线条的三维结构(Robert, 1965)。
Roberts交叉算法执行图像上的二维空间梯度的卷积。
其主要思想是呈现出水平和垂直边缘,然后把边缘检测结果放在一起。
这两个过滤器突出了具有特殊频率的区域,趋向于在图像中定义一个物理边缘。
两个过滤器被设计的目的是实现对图像的角线边缘。
由于Gy图片呈现从右上角到左下方的边,Gx图像将阐明从左上角到右下角的对角线。
这两个独立的Gx和Gy图像使用近似公式相组合Gy Gx G +=。
Canny 边缘检测算子是由John F 发现的。
在1986年,Canny 使用多级算法来检测图像中广范围的边。
此外,Canny 边缘检测器是一个复杂的最优边缘检测器,它要花相当长的时间来得到计算结果。
图像首先通过高斯模糊来处理噪音。
当算法被应用时,角度和大小被得到用来确定保留边缘部分。
设置两个截止阀值点,当图像中的某些值低于第一个阀值时则降到零,当值高于第二个阀值时提高到一。
Canny(1986)认为推导一个最佳的平滑的过滤器的数学问题是给出检测的标准,定位以及减少单个边的多个响应。
他指出最佳过滤器给出的这些假设是四指数项的总和。
他还表明这种过滤器可以很好的被逼近高斯一介导数。
Canny 还介绍了非最大抑制的概念,给出presmoothing 过滤器,边缘点被定义为梯度幅度上假定的一个在梯度方向最大的点。
另一种被使用的算法是Susan 边缘检测器。
这种边缘检测算法跟着常用的算法—获取一幅图像并且使用预先确定的窗口集中在图像中的每个像素,该图像使用本地代理的一套规则给出一个边缘响应(Vincent ,2006)。
该响应再经过处理得到作为边集的输出。
Susan 边缘过滤器已经通过使用圆形遮罩(内核)以及近似的使用或常数加权或高斯加权而给出同位素反应被实现。
半径通常是3.4像素,给出37像素的遮罩,最小的遮罩被认为是传统的3.3遮罩。
被使用在所有特征检测实验中的37像素圆形遮罩被安放在图像中的每个点上,对每个点来说,遮罩上的每个像素的亮度被拿来与内核进行比较。
比较方程是:C ()0r r ,=()()()()⎪⎩⎪⎨⎧>-≤-tr I t r I 00r I if 0r I if 1 (1) 三维图像中,r 的位置即是核所在的位置,0r 是遮罩上的一些其他点的位置,I ()r 是像素的亮度,t 是不同阀值上的亮度,C 是对比后的输出。
对比是遮罩上每个像素之间的比较,而该遮罩上所有输出(C)的n 如下所示n ()0r =∑rC ()0r r , (2) Sobel 滤波器设计大多数的边缘检测方法只能在假设边缘存在时使用,即在强度函数里有一个不连续段或图像中有一个非常陡峭的强度梯度。
使用这种假设,如果取得图像强度值的导数并且找到最大导数的点,那么边缘就能确定了。
梯度是一个向量,其组成部分测量在X 和Y 方向距离变化时如何快速地测出像素值。
因此,梯度的部分也许可以通过使用下面的近似来找到:()()()dxy x f y dx x f x x y x f ,,,-+=∆=∂∂ (3) ()()()dyy x f dy y x f y x y x f ,,,-+=∆=∂∂ (4) 沿着X 和Y 方向,分别用d x 和d y 代表距离。
在离散图像中,像素两点之间的成员组可以用d x 和d y 来代替。
d x =d y =1(像素间距)像素坐标上的点是(i ,j),因此()()j i f j i f x ,,1-+=∆ (5)()()j i f j i f y ,1,-+=∆ (6)为检测是否存在一个梯度间断,可以计算(i ,j )梯度上的变化。
这可以通过寻找以下幅度测量来完成, M=22y x ∆+∆ (7)梯度方向可以通过下式得出:⎥⎦⎤⎢⎣⎡∆∆=-x y 1tan θ (8) 滤波器的设计方法有许多方法可以检测边缘;多数的不同方法可以被分为这两类:梯度:梯度方法通过寻找图像的一阶导数的最大值和最小值来检测边缘。
例如Roberts ,Sobel 检测有非常尖锐边缘的特征(见图1)。
拉普拉斯算子:拉普拉斯方法通过搜索图像的二阶导数上的零交叉点来寻找边缘。
例如希尔德雷斯,高斯的拉普拉斯等等。
一个边缘有一个坡道的一维形状并且计算图像导数可以突出其位置(见图2)。
边的观点依赖:当视角变化是边也可能变化,并且通常能反映几何结构,反过来也可以反映视角的性能比如表面标志和表面形状。
相反的一个典型边缘也许是介于红色块和黄色块的边界。
然而,当一个人看到图像的像素时,一个边的可见部分是夯实的。
输入图像 输出边图1 梯度方法输入图像 输出边缘图2 拉普拉斯方法Sobel 算子是梯度算法的一个例子。
这个算子是一个离散的微分算子,计算图像强度函数的近似梯度(Sobel 和Feldman ,1968)。
式(5)和(6)上的不同算子对应于用下列标志缠绕图像。
⎥⎦⎤⎢⎣⎡-=∆0011x ,⎥⎦⎤⎢⎣⎡-=∆0101y 如果这已经完成,那么:1. 反过来,适当遮掩的左上角是叠加在图像的每个像素上。
2. 通过使用像素值(i ,j)的加权总和及他邻居上的遮掩系数来得到x d 和y d3. 这些遮掩被称作卷积遮掩或有时也称卷积内核。