how to convert unit8 type images to logical type
조회 수: 14 (최근 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
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
