# Import image saved as CSV file [closed]

I have saved my image file from ccd camera as a CSV file. How can I plot this file to get my image back? My file is here.

• Could you provide a ASCII file for test? – yode Mar 29 '17 at 6:45
• – Varun sharma Mar 29 '17 at 7:00
• You may be wondering why this question got downvotes. Think about how the original version reads. It was simply "I have saved my image file from ccd camera as ASCII file. How can I plot this file to get my image back?". There was no link to the file, no explanation of the file format, and most importantly, no evidence that you made an attempt to solve the problem yourself before asking. Have you tried searching the documentation for "CSV" to see how to import this format? – Szabolcs Mar 29 '17 at 8:54
• It is important to be aware that StackExchange is not a discussion forum. Questions should be asked in such a way to make them answerable without a lot of back and forth about what you really need. If you expect to get clarification questions, then the post is inappropriate. – Szabolcs Mar 29 '17 at 8:56
• Related docs that answer your question: reference.wolfram.com/language/tutorial/ImageProcessing.html, reference.wolfram.com/language/ref/format/CSV.html – Michael E2 Mar 29 '17 at 10:57

Mathematica is a toy more than a real tool for me, I'm glad to see you need it in your life. And I'm sorry you got those downvotes. In your case, you just:

data = Import["D:\\Downloads\\Idler_T_62_0001.ascii.csv"];
img=Image[Rescale[Most /@ data]]


Export[FileNameJoin[{\$HomeDirectory,"\\Desktop","restore.png"}],img]

• Use Rescale to avoid clipping: Image[Rescale[Most /@ data], "Real"]. – Alexey Popkov Mar 29 '17 at 8:20
• @AlexeyPopkov I'm confusing still.Since I have used "Real" or "Real32".I think it should not be clipped.. – yode Mar 29 '17 at 8:39
• @AlexeyPopkov Unfortunately the documentation does not spell this out, but Real and "Real32" (i.e. floating point) types do not clip in Image. Integer pixel types do clip. It is unfortunate that this is not made clear in the documentation because it is one of the first things that is explained on WRI image processing seminars ... – Szabolcs Mar 29 '17 at 8:57