Efficient alternative to bwconncomp?

8 views (last 30 days)
Pacman Pacman
Pacman Pacman on 10 Aug 2014
Edited: Pacman Pacman on 10 Aug 2014
I have a binarized image (black is the background, white is signal) where I want to do the following: 1 - define a certain pixel as the "center"; 2 - "draw" concentric circles radiating out from this point; 3 - count the number of white pixels lying on each concentric circle.
I have pretty much figured out how to do 1 and 2 and these steps take about a minute for an 8000 x 8000 pixel image. However, step 3 is taking a long time (many minutes) when I am using bwconncomp. Is there any algorithm I can write or a built-in function that I can use to identify the number of 8-connected objects more rapidly?
Thank you.

Answers (1)

Ahmet Cecen
Ahmet Cecen on 10 Aug 2014
Have you tried using the circular Hough transform? I am not sure if it would be faster, but should be worth a try.
  1 Comment
Pacman Pacman
Pacman Pacman on 10 Aug 2014
Edited: Pacman Pacman on 10 Aug 2014
Hi Ahmet, thanks for your answer. Could you explain how the Hough transform will give me the number of objects? As I understand it this technique will only allow me to detect circular objects. I am hoping to count the number of white pixels lying on a predefined circle.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!