using im2double in main, add im2feature and corresponding tests, add threshold and corresponding test