MATLAB: Edge detection

edge detectionimage processingwebcam

Hi,I have a question.
I have an image that I capture from a webcam,here is it: http://www.flickr.com/photos/48230201@N02/5653553606/in/photostream/
I use canny method to detect the edges of all objects this this image. Here is the result: http://www.flickr.com/photos/48230201@N02/5655801861/in/photostream/
How can I remove all noise and just retain the edge of two circles, boundary(two parallel rectangles) and fill in these areas white color,just like this:
And How can I determine where is the edge of circle or rectangle to do something like painting rectangle with red and circles with blue.
Thanks a lot.

Best Answer

let me preface - I am no image analyst, but it would seem that segmenting the the color dots would be easy since they are red & green. As for the outer boundary maybe the hough transform would be of some help?
Related Question