# Turn Image into graphic

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

What functions available does this image processing?

Thanks in advance,

Gabriel

• Something like ListPlot@Mean@ImageData[img] – Szabolcs Oct 11 '17 at 18:43
• 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 – Gabriel Das Neves Oct 12 '17 at 2:08
• 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 – george2079 Oct 12 '17 at 2:32
• @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. – halirutan Oct 12 '17 at 3:49
• The image is most likely sRGB-encoded, hence consider converting it into Linear RGB: mathematica.stackexchange.com/q/15596/280 – Alexey Popkov Oct 12 '17 at 4:03

## 1 Answer

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

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"];
ListLinePlot@Mean[grayData]


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