Given a 2D array that has been converted to binary, for some index values of the binary array how do you find the corresponding values in the original?
%# create some test data
m = magic(4);
%# make binary image
bw = m>10;
%# read values from m
values = m(bw);
%# alternatively, if you have linear indices (as found via find)...
linIdx = find(bw);
%# ...you can use that instead
values = m(linIdx);