How to Save image using imwrite?

조회 수: 7 (최근 30일)
HG24
HG24 2019년 6월 4일
답변: KSSV 2019년 6월 4일
I1 = imread('DiseasedBW.tif') ;
I2 =imread('HealthyBW.tif') ;
I3 = imshow([I2, I2, I2; I2, I1, I2; I2, I2, I2]);
imwrite(I3,'Middisease.tif');
% Error using imwrite (line 442)
% Expected DATA to be one of these types:
% numeric, logical
% Instead its type was matlab.graphics.primitive.Image.
I want to save the following image from the above code using imwrite however keeps displaying this error. What is going wrong and how do I solve this?

채택된 답변

KSSV
KSSV 2019년 6월 4일
I1 = imread('DiseasedBW.tif') ;
I2 =imread('HealthyBW.tif') ;
I3 = [I2, I2, I2; I2, I1, I2; I2, I2, I2];
imwrite(I3,'Middisease.tif');

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by