Saving a montage image
Show older comments
I created a montage of an RGB and logical image and stored t into a variable 'h'. The content of the variable 'h' is of the type 'image'. I would like to save 'h' into a folder. I have tried to use saveas and imwrite but I am unable to do so. My code and the resulting errors are as follows. How can I save the image in variable 'h'?
ImFileOut = fullfile(ImOutFolder, ImName)
ImCell = {RGBIm, LogicalIm};
h = montage(ImCell); %file type is '1x1 Image'
saveas(h,ImFileOut);
% Error using saveas
% Invalid handle.
imwrite(h,ImFileOut);
%Error using imwrite (line 427)
%Expected DATA to be one of these types:
%numeric, logical
%Instead its type was matlab.graphics.primitive.Image.
Accepted Answer
More Answers (0)
Categories
Find more on Image Data Acquisition in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!