Ok, now I know that the above line gives an arithmetic value, like 320-310 = 10 pixels.
But why when I use the line
heights(col) = rgbImage(320,col) - rgbImage(340,col);
I get the difference of pixel intensity values of those two pixels on the image? What's the difference between those two lines?
For instance if the pixel at position X: 320 Y: 454 has value of RGB: 88
And the pixel at position X: 340 Y: 454 has value RGB: 90
I will get result 2.
Why should I get result of 2 and NOT 20 which is the number of pixels between the two points?
Can someone explain clearly the difference?