added median filter and sharr edge detector