亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

canny edge detector

系統(tǒng) 2366 0

Canny Edge Detector

canny edge detector
Common Names: Canny edge detector

Brief Description

The Canny operator was designed to be an optimal edge detector (according to particular criteria --- there are other detectors around that also claim to be optimal with respect to slightly different criteria). It takes as input a gray scale image, and produces as output an image showing the positions of tracked intensity discontinuities.

How It Works

The Canny operator works in a multi-stage process. First of all the image is smoothed by Gaussian convolution . Then a simple 2-D first derivative operator (somewhat like the Roberts Cross ) is applied to the smoothed image to highlight regions of the image with high first spatial derivatives. Edges give rise to ridges in the gradient magnitude image. The algorithm then tracks along the top of these ridges and sets to zero all pixels that are not actually on the ridge top so as to give a thin line in the output, a process known as non-maximal suppression . The tracking process exhibits hysteresis controlled by two thresholds: T1 and T2 , with T1 > T2 . Tracking can only begin at a point on a ridge higher than T1 . Tracking then continues in both directions out from that point until the height of the ridge falls below T2 . This hysteresis helps to ensure that noisy edges are not broken up into multiple edge fragments.

Guidelines for Use

The effect of the Canny operator is determined by three parameters --- the width of the Gaussian kernel used in the smoothing phase, and the upper and lower thresholds used by the tracker. Increasing the width of the Gaussian kernel reduces the detector's sensitivity to noise, at the expense of losing some of the finer detail in the image. The localization error in the detected edges also increases slightly as the Gaussian width is increased.

Usually, the upper tracking threshold can be set quite high, and the lower threshold quite low for good results. Setting the lower threshold too high will cause noisy edges to break up. Setting the upper threshold too low increases the number of spurious and undesirable edge fragments appearing in the output.

One problem with the basic Canny operator is to do with Y-junctions i.e. places where three ridges meet in the gradient magnitude image. Such junctions can occur where an edge is partially occluded by another object. The tracker will treat two of the ridges as a single line segment, and the third one as a line that approaches, but doesn't quite connect to, that line segment.

We use the image

cln1

to demonstrate the effect of the Canny operator on a natural scene.

Using a Gaussian kernel with standard deviation 1.0 and upper and lower thresholds of 255 and 1, respectively, we obtain

cln1can1

Most of the major edges are detected and lots of details have been picked out well --- note that this may be too much detail for subsequent processing. The `Y-Junction effect' mentioned above can be seen at the bottom left corner of the mirror.

The image

cln1can2

is obtained using the same kernel size and upper threshold, but with the lower threshold increased to 220. The edges have become more broken up than in the previous image, which is likely to be bad for subsequent processing. Also, the vertical edges on the wall have not been detected, along their full length.

The image

cln1can3

is obtained by lowering the upper threshold to 128. The lower threshold is kept at 1 and the Gaussian standard deviation remains at 1.0. Many more faint edges are detected along with some short `noisy' fragments. Notice that the detail in the clown's hair is now picked out.

The image

cln1can4

is obtained with the same thresholds as the previous image, but the Gaussian used has a standard deviation of 2.0. Much of the detail on the wall is no longer detected, but most of the strong edges remain. The edges also tend to be smoother and less noisy.

Edges in artificial scenes are often sharper and less complex than those in natural scenes, and this generally improves the performance of any edge detector.

The image

wdg2

shows such an artificial scene, and

wdg2can1

is the output from the Canny operator.

The Gaussian smoothing in the Canny edge detector fulfills two purposes: first it can be used to control the amount of detail that appears in the edge image and second, it can be used to suppress noise.

To demonstrate how the Canny operator performs on noisy images we use

ufo2noi2

which contains Gaussian noise with a standard deviation of 15 . Neither the Roberts Cross nor the Sobel operator are able to detect the edges of the object while removing all the noise in the image. Applying the Canny operator using a standard deviation of 1.0 yields

ufo2can1

All the edges have been detected and almost all of the noise has been removed. For comparison,

ufo2sob6

is the result of applying the Sobel operator and thresholding the output at a value of 150 .

We use

ren1

to demonstrate how to control the details contained in the resulting edge image. The image

ren1can1

is the result of applying the Canny edge detector using a standard deviation of 1.0 and an upper and lower threshold of 255 and 1 , respectively. This image contains many details; however, for an automated recognition task we might be interested to obtain only lines that correspond to the boundaries of the objects. If we increase the standard deviation for the Gaussian smoothing to 1.8 , the Canny operator yields

ren1can2

Now, the edges corresponding to the uneveness of the surface have disappeared from the image, but some edges corresponding to changes in the surface orientation remain. Although these edges are `weaker' than the boundaries of the objects, the resulting pixel values are the same, due to the saturation of the image. Hence, if we scale down the image before the edge detection, we can use the upper threshold of the edge tracker to remove the weaker edges. The image

ren1can3

is the result of first scaling the image with 0.25 and then applying the Canny operator using a standard deviation of 1.8 and an upper and lower threshold of 200 and 1 , respectively. The image shows the desired result that all the boundaries of the objects have been detected whereas all other edges have been removed.

Although the Canny edge detector allows us the find the intensity discontinuities in an image, it is not guaranteed that these discontinuities correspond to actual edges of the object. This is illustrated using

prt2

We obtain

prt2can1

by using a standard deviation of 1.0 and an upper and lower threshold of 255 and 1 , respectively. In this case, some edges of the object do not appear in the image and many edges in the image originate only from reflections on the object. It is a demanding task for an automated system to interpret this image. We try to improve the edge image by decreasing the upper threshold to 150 , as can be seen in

prt2can2

We now obtain most of the edges of the object, but we also increase the amount of noise. The result of further decreasing the upper threshold to 100 and increasing the standard deviation to 2 is shown in

prt2can3

Common Variants

The problem with Y-junctions mentioned above can be solved by including a model of such junctions in the ridge tracker. This will ensure that no spurious gaps are generated at these junctions.

Interactive Experimentation

You can interactively experiment with this operator by clicking here .

Exercises

  1. Adjust the parameters of the Canny operator so that you can detect the edges of
    ufo2noi2

    while removing all of the noise.

  2. What effect does increasing the Gaussian kernel size have on the magnitudes of the gradient maxima at edges? What change does this imply has to be made to the tracker thresholds when the kernel size is increased?

  3. It is sometimes easier to evaluate edge detector performance after thresholding the edge detector output at some low gray scale value ( e.g. 1) so that all detected edges are marked by bright white pixels. Try this out on the third and fourth example images of the clown mentioned above. Comment on the differences between the two images.

  4. How does the Canny operator compare with the Roberts Cross and Sobel edge detectors in terms of speed? What do you think is the slowest stage of the process?

  5. How does the Canny operator compare in terms of noise rejection and edge detection with other operators such as the Roberts Cross and Sobel operators?

  6. How does the Canny operator compare with other edge detectors on simple artificial 2-D scenes? And on more complicated natural scenes?

  7. Under what situations might you choose to use the Canny operator rather than the Roberts Cross or Sobel operators? In what situations would you definitely not choose it?

References

R. Boyle and R. Thomas Computer Vision: A First Course , Blackwell Scientific Publications, 1988, p 52.

J. Canny A Computational Approach to Edge Detection , IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 8, No. 6, Nov. 1986.

E. Davies Machine Vision: Theory, Algorithms and Practicalities , Academic Press, 1990, Chap.5.

R. Gonzalez and R. Woods Digital Image Processing , Addison-Wesley Publishing Company, 1992, Chap.4.

Local Information

Specific information about this operator may be found here.

canny edge detector


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯(lián)系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發(fā)表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 亚洲精品影院一区二区 | 日日干夜夜草 | 天天操天天干天天操 | 在线观看精品国语偷拍 | 久久99久久精品97久久综合 | 毛片一区 | 国产91av视频 | 日本精品免费 | 欧美大交乱xxxxbbbb | 午夜论坛| 国产午夜精品一二区理论影院 | 五月天激情视频在线观看 | 福利色姬网站视频入口 | 狠狠色狠狠色综合 | 美女视频很黄很黄又免费的 | 亚州激情视频在线播放 | 色人阁网站 | 国产日产精品 | 国产欧美一区二区三区免费 | 亚洲性免费| 久操成人 | 看全大色黄大色黄大片一级爽 | 一a一片一级一片啪啪 | 奇米影视基地 | 久久综合中文字幕一区二区三区 | 国产剧情一区二区 | 日本人一级毛片免费完整视频 | 国产成人综合亚洲 | 免费国产成人高清在线观看视频 | 精品日韩二区三区精品视频 | 日韩在线看片中文字幕不卡 | 最新永久地址 | 曰批免费视频播放在线看片 | 久久图片| 亚洲欧美日韩中文综合在线不卡 | 国内免费一区二区三区视频 | 婷婷精品视频 | 国产亚洲精品成人久久网站 | 99久久99热久久 | 99精品国产免费久久国语 | 性欧美精品久久久久久久 |