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.


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]]

You can save your image into your desktop by this code.

  • $\begingroup$ Use Rescale to avoid clipping: Image[Rescale[Most /@ data], "Real"]. $\endgroup$ Mar 29 '17 at 8:20
  • 2
    $\begingroup$ @AlexeyPopkov I'm confusing still.Since I have used "Real" or "Real32".I think it should not be clipped.. $\endgroup$
    – yode
    Mar 29 '17 at 8:39
  • 4
    $\begingroup$ @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 ... $\endgroup$
    – Szabolcs
    Mar 29 '17 at 8:57
  • 3
    $\begingroup$ @AlexeyPopkov In my opinion, the description is accurate, but I do see why it is confusing, and I just submitted a suggestion to improve it. It says that values are displayed from 0..1, but it does not say that greater or smaller value are not stored. It says that values are coerced to the target type. This coercion necessitates clipping with integer types, but not (usually) with floating point type (unless you go above ~10^300). The same with rounding. Basically it says that M does whatever is needed to fit the value into the target type. $\endgroup$
    – Szabolcs
    Mar 29 '17 at 9:09
  • 1
    $\begingroup$ So do you "toy around with tools" or "tool around with toys"? (Sorry, couldn't help it) :) - (+1) for the answer. $\endgroup$
    – gwr
    Mar 30 '17 at 9:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.