I am not sure how to apply low-pass and high-pass filters on a jpg image.
The filters are calculated by:
functio