grayscale image, adjust color intesity
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I have image.
I1= imread('strom','bmp');
imshow(I1)
I2=rgb2gray(I1);
imshow(I2);
[m n]=size(I2)
P = [];
for i=1:m
for j=1:n
if I2(i,j)>=0 && I2(i,j)<=64
P = [P ; i j ];
end
end
end
size(P);
MON=P;
how i set all shades of gray in matrix.
Thanks.
0 comentarios
Respuestas (1)
Image Analyst
el 16 de Mzo. de 2014
Do this instead:
[rows, columns, numberOfColorChannels] = size(yourImage);
And I don't know what "set" means to you. Do you just want (for some reason) an N by 2 list of the (row, column) locations of all gray levels in a certain range? If so do this:
binaryImage = I2 >= 0 & I2 <= 64;
[rows, columns] = find(binaryImage);
13 comentarios
Image Analyst
el 17 de Mzo. de 2014
I gave you an example for a color image, but then you said "I don't know,what to do,if I have grayscale image." so I gave you suggestions for grayscale images. But now you show a color image again. And you ask "I don't know show image." whatever that means. Why not just use imshow() to show an image? Why are you confusing me by keep switching color mode? I've given suggestions for both but whenever I do you ask about the other. Sorry, but I think maybe it's best if we let someone who has kmeans() to take over and help you now. They will be able to understand you better than me.
Ver también
Categorías
Más información sobre Image Processing Toolbox en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!