Privacy-Preserving Image Filtering and Thresholding Using Numerical Methods for Homomorphically Encrypted Numbers