Find black pixel co-ordinates in image

1 view (last 30 days)
Ritz 1234
Ritz 1234 on 2 May 2014
Hello all,
This a second part or extension of this question http://www.mathworks.com/matlabcentral/answers/126167-divide-an-image-into-n-sectors and according to this http://www.mathworks.com/matlabcentral/answers/126167#comment_208638 as answered by Jos we get the number of black pixels in each sector.
I need to find out the coordinates of black pixels in each sector, that is for every sector of 4 degree if there are any black pixels present then how to get the co-ordinates of those pixels for every sector.
Here's the sample image:-
I tried something like this to get the pixels but it ain't working : -
for i = 1 : max(SectorIdx)
[cx1, cx2] = find(bw(SectorIdx == i) == 0)
end
But it isn't working. For the code reference see the previous post link given above.
Thank you. Any help or reference would be of great help.

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!