Hello, I am brand new to MATLAB (this is my first project). I managed to write the script to bring two files (JPG) into MatLab and run some basic processes.
Each newly converted file I want to automatically save as an image file and automatically save the generated surface plot to the current folder (TEST2_MATLAB). I plan to run many many files (TEST2_MATLAB, to TESTn_MATLAB) through these steps and really would like to minimize the tedium and human error from the repetition of having to individually save each file. I have attached a screenshot of what I would like the final 'current folder' to resemble. Files with the prefix M_ is a coverted file created and saved from 'imshow'. Files with M_P_ are the surface plots for each converted file. How can I automate this? When I try to do this all I can get is the file save window I would still need to select the file type and rename the file and select the location. Thank you THIS IS THE SCRIPT;
PHOTO=imread('digitalPhoto.JPG');
FILE=imread('digitalfile.jpg');
PHOTORESIZE=imresize(PHOTO, [30 NaN]);
surf(PHOTORESIZE);
photogray=rgb2gray(PHOTORESIZE);
imshow(photogray);
surf(photogray)
filegray=rgb2gray(FILE);
imshow(filegray);
surf(filegray);
imageDiffFP=abs(filegray-photogray);
imshow(imageDiffFP);
surf(imageDiffFP)
imageDiffPF=abs(photogray-filegray);
imshow(imageDiffPF);
surf(imageDiffPF);
save workspace