I am looking for a method to plot the area intensity from a image. I can doing this in image J. In mathematica, I am using ImageValue function to get the profile I want. I can get a list of pixel value along a straight line by the following code:
img =Import["C:\\Users\\Michael\\Desktop\\20160727\\20160727_xuv03.tif"];
ImageProfiles[img_, x1_, y1_, x2_, y2_, npts_] := Table[{N@((i -
1)/(npts - 1)) Sqrt[(x1 - x2)^2 + (y1 - y2)^2],ImageValue[img, {x1 +
(x2 - x1) (i - 1)/(npts - 1), y1 + (y2 - y1) (i -1)/(npts - 1)}]}, {i, 1, npts}]
pt1 = {300, 1110};
pt2 = {2451, 1110};
IMGV = ImageValue[img, Table[{i, 1110}, {i, 300, 2451, 0.1}]]
Taking values from a single line may cause losing of data. I got really noisy spectrum. In order to improve the spectrum, I want to get the pixel value from a rectangular area in a image. I am not really know how to do it and I need some help. Photo Link: https://www.dropbox.com/s/5xzcigiiu71tawu/20160727_xuv03.tif?dl=0
Attachments: