What would be the outcome of this line?

1 view (last 30 days)
Stelios Fanourakis
Stelios Fanourakis on 25 Feb 2019
Commented: Rik on 25 Feb 2019
If I use this line code
for col = col1 : col2
row2 = find(mask(:, col), 1, 'last'); % Get bottom row of mask
heights(col) = row2 - topRow;
The heights will be a number of pixel intensity (e.g. pixel intensity value of X - pixel intensity value of Y) OR will be a number of pixels (e.g. 320 - 310 pixels = 10 pixels)??
Can you please clarify?
Thank you
Rik on 25 Feb 2019
You are subtracting positions to get a distance, you are subtracting values to get an intensity difference.
Since in this line
heights(col) = rgbImage(320,col) - rgbImage(340,col);
you're doing the second, it stands to reason you get an intensity difference, not a distance.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!