Converted uint8 to double for xcorr2