how can i find max intensity from cell image
조회 수: 4 (최근 30일)
이전 댓글 표시
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
답변 (1개)
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
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!