switched to Input/Output Array in  Mean Shift
refactored gpu::matchTemplate (converted it into Algorithm)