plot integrated intensity profiles from image - java
I have integrated my grayscale image using Imgproc.integral as follows:
Mat graySum = new Mat(); Imgproc.integral(grayImg, graySum, -1);
Is there any way to show the resulted output array: graySum as an integrated intensity profile where y: intensity(gray value) and x: distance(pixels)?
Any help is highly appreciated, EleDiam
i don't think, this is feasible. can you take a look at the images here ?
what are you trying to do with the integral image ?
wait, can it be, you wanted something entirely else ? like the sum of the pixels over the x coords ?
What I want is to generate an intensity profile like this so that I can measure in the entire image the distance of a black track in the grayscale image. Yes instead of integration it can be the sum of the pixels along y.
helpful image ! but that's not an integral, but just the intensity along a line between 2 points.
if it was c++, you could use the LineIterator class (very easy), but java ? hmmm. probably need to reinvent your own bresenham line algorithm.
This could be a better example. In my case instead of getting the profile of the intensity along the line I would like to do it for the entire image. Probably is not something that could be done with java..
matlab, not helpful at all.
if you just want the pixels along the x or y axis, that would be a plain reduce
You were right this function can be helpful cause what I wanted after all was to convert my 2D image to 1D. Now I have to figure out how I could plot the output vector. Thanks a lot for your input!!