how to convert unit8 type images to logical type
21 次查看(过去 30 天)
显示 更早的评论
if true
myFolder = 'E:\\inverted\\i1';
for PicNum = 100:-1:1;
fullFileName = fullfile(myFolder,sprintf('%d.bmp',PicNum));
fprintf(1, 'Now reading %s\n', fullFileName);
imageArray{PicNum}=imread(fullFileName);
logical(imageArray{PicNum});//here im trying to convert my images to logical but its not happening
imshow(imageArray{PicNum}); % Display image.
end
end
0 个评论
采纳的回答
Image Analyst
2015-2-16
To convert a gray level image to a logical binary image you must threshold:
binaryImage = grayImage > someValue;
4 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!