MATLAB: How to recognize the number

image processingImage Processing Toolbox

Hi everyone, I'm doing a project to recognize the speed limit traffic sign. I have a image like this:
how to make it become like this picture:
My problem is: how to mark pixels at the border between object and background like in above image.
Can you help me? thanks in advance!

Best Answer

I don't know what pixels you're talking about. If you want all the pixels on the object's perimeter, you can use bwperim() or bwboundaries(). If you want the bounding box, you can use regionprops. If you want those "c" points, you're going to have to extract those lines from the image and use find().