A new aproach and a NEW question of my previous query.
What I actually want to achieve is to get for every column of the image (see attached image) the sum of all its pixels. But not for the entire image. I want for part inside the red contour.
The counting should start from the bottom of the red segmented contour up until the top red contour. Is there a way to put a marker somewhere in the first one third of the image and tell Matlab to count from that point down to the bottom of the red contour, the total of pixels for every column and plot them.
YOu can see at image A3.jpg, I have marked with green pen the top point and the bottom point, of the area the pixel should be measured.
Is my question clear?