Software > Software

Canny Edge Detector

(1/2) > >>

Somchaya:
Hey, is anyone familiar with the Canny Edge Detector? I found some tutorials online, but when I coded it, the results didn't look "right". I have some pictures below:



This is the original size image. The image from the webcam is 160x120, but I resize it to 32x24 before running the Canny edge detection. The smaller images from right to left are:

1) 32x24 version of the original
2) A gaussian smoothed version (with a 5x5 filter)
3) After running the Sobel edge detector (both horizontally and vertically)
4) After running the edge thresholding

An enlarged version of the picture is below:



For some reason, the edges I'm finding are really big. Is it because of the small size of the picture I'm using? Also, I haven't coded up the part where it suppresses edges to get a thin line, because I'm not entirely sure how that works.

I tried playing around with the thresholds, but it either breaks apart the line, or gets a lot of noise.

If anyone has a working copy of the Canny edge detector program where I can just load the image to test, it'll be great! The online ones I've found only load from a set of pre-determined pictures, so I couldn't test my own picture on it.


hgordon:
Give RoboRealm a try - it's free and it has Canny edge detector support -
    http://www.roborealm.com/help/Canny.php

You can process images live from your webcam. 

Admin:
Im assuming you are already using roborealm . . .

When I did mobot with a camera years ago, all I did was a simple middle mass algorithm. Ignore the color red (too much of it from the sun), and concentrate on just the brightest green and blue pixels.

But of course, you could probably write a better control algorithm if you can calculate the curvature of the white line by using edge detection . . .

Somchaya:
Oh actually I'm not running with Roborealm, partly cos my little laptop probably can't run it at real-time.. It's a measly 700 mhz transmeta crusoe with 112mb ram, so couple that with win xp sp2 and you get an idea how slow it runs  ;D

Right now, my algorithm runs by edge detection and thresholding, which kind of works, but strong sunlight and noise still kills the algo really badly. I'm still thinking of ways to go around that. Does the middle mass work well in sunlight and noise too?

Admin:
middle mass is effectively an average, so noise has no effect on it. but when the line splits into two different lines at the decision points, you will have to apply another special trick - when the line splits, the middle mass location wont have the line in it, thereby detecting the split.

for the sunlight problem, put a shaded lens (and maybe even an IR filter) on the cam.

Navigation

[0] Message Index

[#] Next page

Go to full version