Akash Maity
Akash Maity

Reputation: 55

how to save an imshow picture in an matrix in matlab

i have generated an image by imshow( I, [100 200]); now i want this displayed image to be stored in another matrix which is to be used later for ssim function. how can i do this ?

Upvotes: 0

Views: 724

Answers (1)

Dev-iL
Dev-iL

Reputation: 24179

There's a function for that - getimage. If you have more than one image in a particular axes - see also imhandles.

Alternatively, if you have a handle to the image (i.e. if you previously did hIm = imshow( I, [100 200]);) you can simply use imMat = get(hIm,'CData');.

Upvotes: 2

Related Questions