A novel threshold detection technique for the automatic construction of attribute profiles in hyperspectral images