Cost function with filtering
Threaded block denoising seems to be working. Reasonably fast.
Created JAR