Clear Filters
Clear Filters

finding black pixel position

2 views (last 30 days)
mohd
mohd on 11 Apr 2012
Commented: niranjan prasad on 1 Jul 2018
I need to scan black pixel row by row on image and store (or mark) only the position of first black pixel. after store the coordinate of first black pixel, do again in another row. this process is looping but i don't know how to do this. can anyone can help me...

Accepted Answer

Andrei Bobrov
Andrei Bobrov on 11 Apr 2012
[ii,jj] = find(all(I==0,3))
[~,k] = unique(ii,'first')
ij = [ii(k) jj(k)]
  2 Comments
mohd
mohd on 19 Apr 2012
many thanks andrei bobrov..:). its help me a lot.
niranjan prasad
niranjan prasad on 1 Jul 2018
Thanks a lot.This really works for me.

Sign in to comment.

More Answers (0)

Categories

Find more on Historical Contests in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!