how can i find max intensity from cell image

1 回表示 (過去 30 日間)
Filza Ashraf
Filza Ashraf 2014 年 5 月 16 日
編集済み: Image Analyst 2014 年 5 月 18 日
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

回答 (1 件)

Image Analyst
Image Analyst 2014 年 5 月 16 日
編集済み: Image Analyst 2014 年 5 月 18 日
if max(max(Br{i})) == 255
% then do whatever you want to do
end
  2 件のコメント
Filza Ashraf
Filza Ashraf 2014 年 5 月 18 日
sir, this code is not working it is not detecting the 255 intensity pixels
Image Analyst
Image Analyst 2014 年 5 月 18 日
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;

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by