I have text file which contains pixel values of an image i want to import this text file and read its data(which are pixel values of an image) and want to show it as an image. how to do this???

2 views (last 30 days)
the text file contains 48x48 pixel grayscale images of face.

Answers (1)

KL
KL on 2 Nov 2017
maybe something like,
data = dlmread('filename.txt');
imagesc(data)
  1 Comment
saeeda saher
saeeda saher on 3 Nov 2017
i tried this, but it shows a graph, my text file contains pixel values of an gray image which is a face, i want to get that face image y reading pixel values. i do not want image of a graph. kindly, help in this. thank you

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!