How to find row and column of a pixel in an Image?
39 views (last 30 days)
Show older comments
Karan Ratnaparkhi
on 21 Mar 2011
Commented: Image Analyst
on 23 Apr 2016
Guys I want to find the rows and columns of pixels of image so that i can put that in if condition inside for loop. Bt i am unable to write that code. plz help me.
3 Comments
Image Analyst
on 23 Apr 2016
Radha r, Start your own question and post your image and explain what "good" and "bad" means to you.
Accepted Answer
Wolfgang Schwanghart
on 21 Mar 2011
Hi, what about this:
[ROWS,COLUMNS] = ndgrid(1:size(I,1),1:size(I,2));
ROWS = ROWS(:);
COLUMNS = COLUMNS(:);
where I is your image.
Best regards, Wolfgang
More Answers (3)
Radha r
on 23 Apr 2016
it is not find the t my answer and what are you telling me i ont now please tell me example
1 Comment
Image Analyst
on 23 Apr 2016
Radha r, Start your own question and post your image and explain what "good" and "bad" means to you.
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!