I'm doing an experiment on Zeeman effect, and I have to turn an image into a graphic, like the example below:

Example of the desired result[1]

What functions available does this image processing?

Thanks in advance,


1 - http://www.ifsc.usp.br/~lavfis/images/BDApostilas/ApEfZeeman/EfeitoZeeman_Davidovich.pdf

  • 3
    $\begingroup$ Something like ListPlot@Mean@ImageData[img] $\endgroup$ – Szabolcs Oct 11 '17 at 18:43
  • $\begingroup$ Well, it worked. Not as fine as in the example, but maybe that's because of the quality of the images I got in the lab. Thanks a lot! If someone knows another way to do that, I'd appreciate, to compare the results. Gabriel $\endgroup$ – Gabriel Das Neves Oct 12 '17 at 2:08
  • $\begingroup$ you would likely get a sharper plot if you grabbed one row of pixels instead of the mean. ListPlot@ImageData[[n]] where n is half the image height $\endgroup$ – george2079 Oct 12 '17 at 2:32
  • $\begingroup$ @george2079 Not a good idea with noisy data. The line patterns in the image are almost vertical so taking the mean of a column is a nice way to get a stable measure for the intensity. $\endgroup$ – halirutan Oct 12 '17 at 3:49
  • $\begingroup$ The image is most likely sRGB-encoded, hence consider converting it into Linear RGB: mathematica.stackexchange.com/q/15596/280 $\endgroup$ – Alexey Popkov Oct 12 '17 at 4:03

First, you need the separated image for one of those measurements:

enter image description here

and then you can use something along the lines

img = Import["https://i.stack.imgur.com/gI1O1.png"];
grayData = ImageData[ColorConvert[RemoveAlphaChannel@img, "Grayscale"], "Real"];

Mathematica graphics

  • $\begingroup$ That's exactly what I was looking for! Thanks a lot for your help and your time! Gabriel $\endgroup$ – Gabriel Das Neves Oct 13 '17 at 1:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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