thresholding: Fix pix convert error. Fix mem leak. Fix name
thresholding: Add test for thresholded image fetching