Save image that has been segmented in matlab

310 views Asked by At

I would like to know how can we save an image that has been segmented (using fuzzy c-means method) in MATLAB where the end product are images of each cluster group. I would like to save the images to use later.

1

There are 1 answers

2
cifz On BEST ANSWER

I assume you just want to save an image, this should be independent on how you produces that.

If I understood correctly you just have to use the function

imwrite(M, filename)

Where M is the matrix containing your image data. You just need to do this for each matrix/image you have.

Then you can reload the image from filename using imread.

imread(filename)

Note that if you want to specify the format for imwrite and not obtain it via the filename extension, you just to add an additional parameter as follow:

imwrite(M, filename, format)