An optimization for adaptive multi-filter estimation in medical images and EEG based signal denoising