I have been given a dataset consisting of .pgm images that will be used for some encoding in Matlab. I'm just wondering if it is possible to view the same image as .jpeg / .png in Matlab?
thank
To render an image in Matlab,
imshow(imread('im.pgm'))
To convert an image from pgmto jpeg:
pgm
jpeg
imwrite(imread('im.pgm'),'im.jpg')
The MathWorks imread docs seem to suggest that Matlab can read in the pgm file.
The display should consist of use imshowin the resulting array returned imread.
imshow
imread