Detect outer contour and find contour's co-ordinates, at sub-pixel level, ignoring noise.
Hi,
I want to find the co-ordinates of an object's contour (similar to a circular rim) which will be rotated in 3D. This need not appear like a circle when rotated in 3D. (Only the outermost contour is sufficient)
Also, if the contour has little noise, then I want this algorithm to ignore noise, and detect the correct contour of rim.
This should be done at a subpixel level (detecting contours).
It should be fast.
These points I have mentioned above are the requirements I have.
In order to do this, I have tried the following:
- Simple Sobel / Canny edge detectors. These do not give sub-pixel accuracy. Moreover, it does not tolerate any noise.
- Chan Vese Active Contours without edges. This algorithm detects at subpixel level, but is extremely slow (I am working with images of resolution around 10MP).
- Detect circles with various radii in grayscale image via Hough Transform. This has given me the best results so far. Here are a couple of points about this algorithm:
- It has subpixel accuracy, as shown below:
![](/matlabcentral/answers/uploaded_files/22817/Example%20of%20Tao%20Peng's%20output.png)
- This is fast enough.
- It takes input as grayscale image and extracts contour information from this (instead of converting it to binary as many other algorithms I have come across do, therefore losing information).
- If it encounters any noise on the contours, it ignores it and finds the contour (As displayed in the image below (I have introduces a little noise on the left side of rim's contour, and the algorith still works very well!)).
![](/matlabcentral/answers/uploaded_files/22815/distorted_imgs.bmp)
- The problem with this is that when I rotate my object (circular rim) in 3D a little more, it cannot detect contour. (I have attached an image (Hough_grd_doesnt_work_for_this.bmp))
- Since I am interested in detecting the contours, I also want the co-ordinates of the detected contour for my further processing. Using this algorithm, I am not able to access the co-ordinates.
This is the problem I am facing.
I want to know if there's any other algorithm which I can use for my work. Or if I can make some changes to CircularHough_Grd to make it more flexible.
Any inputs will be appreciated.
Thank you.
回答(2 个)
另请参阅
类别
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!