How can i save a output image into a folder ?
Show older comments
imwrite(yourImageArray, filename);
How can i save the output displayed image by using above code?
Answers (1)
Image Analyst
on 16 Apr 2017
3 votes
That code is correct. Just supply a valid image variable, and a valid filename, and it will work. If it doesn't, read this thoroughly and edit your question so that it's answerable.
6 Comments
sam CP
on 17 Apr 2017
Image Analyst
on 17 Apr 2017
baseFileName = 'my new image.png'; % Whatever....
fullFileName = fullfile(someFolder, baseFileName);
imwrite(rgbImage, fullFileName);
sam CP
on 17 Apr 2017
Image Analyst
on 17 Apr 2017
someFolder is a string that is the name of the folder you want. It can be a variable or a literal. For examples
fullFileName = fullfile('D:/Valhalla', baseFileName);
or
folder = 'D:/Hawaii Photos/May 2017';
fullFileName = fullfile(folder, baseFileName);
I don't know what your Segmented is but it better be a string and not an image.
Min Min
on 29 Aug 2020
Dear sir: I want to transfer image from host pc to another pc's folder. What type of function should I use?
Image Analyst
on 30 Aug 2020
You can use copyfile(). I use it all the time to copy files back and forth to a shared folder on a server.
Categories
Find more on Images in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!