How to find row and column of a pixel in an Image?
Ältere Kommentare anzeigen
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 Kommentare
Camilo Andrés Roca Duarte
am 21 Mär. 2011
I think you first have to clarify a litle your question, because you can use the coman [row,col]=find(variable==#) to find the pixel you want once you have the matrix of the pixel ( if it is not in truecolor). If you know the color of the pixel you just have to find the number that represent it in a scale (for instance 256 colors). I give this lines of a code I wrote recently to find the pixels in an images that are not totally white (in a scale of 256 colors.
[row,col]=find(Imagen~=255);
Radha r
am 23 Apr. 2016
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
am 23 Apr. 2016
Radha r, Start your own question and post your image and explain what "good" and "bad" means to you.
Akzeptierte Antwort
Weitere Antworten (3)
Karan Ratnaparkhi
am 21 Mär. 2011
0 Stimmen
2 Kommentare
Wolfgang Schwanghart
am 21 Mär. 2011
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
am 22 Mär. 2011
Syed Ali Hassan
am 22 Feb. 2014
0 Stimmen
Check this [row_limit,col_limit]=size(img);
3 Kommentare
Image Analyst
am 22 Feb. 2014
A bit risky and dangerous in general. See http://blogs.mathworks.com/steve/2011/03/22/too-much-information-about-the-size-function/ - Steve's blog. Unless you know for a fact in advance that the image is gray scale, you'll be safer and more robust if you do this:
% This works for grayscale and RGB images:
[rows, columns, numberOfColorChannels] = size(yourImage);
Radha r
am 23 Apr. 2016
it is not find the t my answer and what are you telling me i ont now please tell me example
Radha r
am 23 Apr. 2016
plz help me sir
Radha r
am 23 Apr. 2016
0 Stimmen
it is not find the t my answer and what are you telling me i ont now please tell me example
1 Kommentar
Image Analyst
am 23 Apr. 2016
Radha r, Start your own question and post your image and explain what "good" and "bad" means to you.
Kategorien
Mehr zu Convert Image Type finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!