How to tell MATLAB to open and save specific files in the same directory

Posted by its-me on Stack Overflow See other posts from Stack Overflow or by its-me
Published on 2010-06-15T19:42:46Z Indexed on 2010/06/15 20:22 UTC
Read the original article Hit count: 129

Filed under:

I have to run an image processing algorithm on numerous images in a directory.

An image is saved as name_typeX.tif, so there are X different type of images for a given name.

The image processing algorithm takes an input image and outputs an image result.

I need to save this result as name_typeX_number.tif, where 'number' is also an output from the algorithm for a given image.

Now..

How do I tell MATLAB to open a specific 'typeX' file? Also note that there are other non-tif files in the same directory.

How to save the result as name_typeX_number.tif?

The results have to be saved in the same directory where the input images are present. How do I tell MATLAB NOT to treat the results that have been saved as an input images?

I have to run this as background code on a server... so no user inputs allowed

Thanks

© Stack Overflow or respective owner

Related posts about matlab