how can i find max intensity from cell image
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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
0 Commenti
Risposte (1)
Image Analyst
il 16 Mag 2014
Modificato: Image Analyst
il 18 Mag 2014
if max(max(Br{i})) == 255
% then do whatever you want to do
end
2 Commenti
Image Analyst
il 18 Mag 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;
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!