Borrar filtros
Borrar filtros

how can i find max intensity from cell image

1 visualización (últimos 30 días)
Filza Ashraf
Filza Ashraf el 16 de Mayo de 2014
Editada: Image Analyst el 18 de Mayo de 2014
i have divided my image into several cells by mat2cell function
if size(R)==[512,512];
else
R =imresize(R,[512,512]);
end
div = [128,128,128,128]; % block s
if true
% code
endize would be 128*128 and division of
%images would be 4*4 blocks
Br = mat2cell(R,div,div); % Division of Reference image into Blocks.
Br_r = size(Br,1);
Br_c = size(Br,2);
for i =1: Br_r*Br_c;
subplot(Br_r,Br_c,i);
figure(1),imshow(Br{i});
end
but now i wana read the each cell and find if there is any pixel of intensity 255 i dont know how to access the pixels i have applied impixel function but it gives ERROR help me please

Respuestas (1)

Image Analyst
Image Analyst el 16 de Mayo de 2014
Editada: Image Analyst el 18 de Mayo de 2014
if max(max(Br{i})) == 255
% then do whatever you want to do
end
  2 comentarios
Filza Ashraf
Filza Ashraf el 18 de Mayo de 2014
sir, this code is not working it is not detecting the 255 intensity pixels
Image Analyst
Image Analyst el 18 de Mayo de 2014
That's not exactly what you asked. You asked something slightly different and that was that if ANY pixel in the tile was 255 to do something. If you want to get a map (binary image) of where the image is 255 or not, then do this on the original image:
pixels255 = R == 255;

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by