How to find row and column of a pixel in an Image?

조회 수: 12 (최근 30일)
Karan Ratnaparkhi
Karan Ratnaparkhi 2011년 3월 21일
댓글: Image Analyst 2016년 4월 23일
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
Radha r
Radha r 2016년 4월 23일
how do find image row and coloumn pixel in matrix in train image because i would geetting the good and bad pixel find out
Image Analyst
Image Analyst 2016년 4월 23일
Radha r, Start your own question and post your image and explain what "good" and "bad" means to you.

댓글을 달려면 로그인하십시오.

채택된 답변

Wolfgang Schwanghart
Wolfgang Schwanghart 2011년 3월 21일
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
  댓글 수: 1
Radha r
Radha r 2016년 4월 23일
but how do find good and bad pixel in image

댓글을 달려면 로그인하십시오.

추가 답변 (3개)

Karan Ratnaparkhi
Karan Ratnaparkhi 2011년 3월 21일
Hi wolfgang I have an algorithm in which i am given a range of rows n columns lets say a to b (for rows) and c to d (for columns). now I hav to do operation only on those pixels which lie (whose rows n cols lie) in between a to b and c to d. Thats y i want to know how to get the row and column of given pixel (not the value of pixel.) Plz help me with this code.
  댓글 수: 2
Wolfgang Schwanghart
Wolfgang Schwanghart 2011년 3월 21일
This sounds to me as if you want to perform some calculations within a subset of your image. Without knowing what exactly you want to do there, I suggest to take a look at the roi-based image processing section of the documentation.
http://www.mathworks.com/help/toolbox/images/ref/roifilt2.html
HTH, Wolfgang
Karan Ratnaparkhi
Karan Ratnaparkhi 2011년 3월 22일
hey thnx wolfgang...

댓글을 달려면 로그인하십시오.


Syed Ali Hassan
Syed Ali Hassan 2014년 2월 22일
Check this [row_limit,col_limit]=size(img);
  댓글 수: 3
Radha r
Radha r 2016년 4월 23일
it is not find the t my answer and what are you telling me i ont now please tell me example
Radha r
Radha r 2016년 4월 23일
plz help me sir

댓글을 달려면 로그인하십시오.


Radha r
Radha r 2016년 4월 23일
it is not find the t my answer and what are you telling me i ont now please tell me example
  댓글 수: 1
Image Analyst
Image Analyst 2016년 4월 23일
Radha r, Start your own question and post your image and explain what "good" and "bad" means to you.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by