Digital Image Processing defines a large number of specialized functions in order to increase your productivity in performing many common image analysis operations.

<< ImageProcessing`

Intensity profiles

Function LineProfile is useful in obtaining details of amplitude variations in an image by returning pixel values along some arbitrary user-selected path. Here we use LineProfile to extract data values along a path defined by Line and ListPlot to plot them. The path was selected using the mouse.

linePath = 
      Line[Round[{{43.5533, 127.924}, {41.5416, 3.19557}}]]

This loads the example image.

G = ImageRead["gel.tif"]

This returns a graphics object showing the original image with a thin red line marking the selected path.

pic1 = 
        ShowRegionOfInterest[G, linePath, LineStyle -> Hue[0], 
          DisplayFunction -> Identity];

This displays the intensity profile along the selected path.

pic2 = 
        ListPlot[LineProfile[G, GraphicsRotate[linePath]], 
          PlotJoined -> True, 
          DisplayFunction -> Identity];

Show[GraphicsArray[{pic1, pic2}]];