You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: manipulateFeature.m
    path of file: ./repos/Image-Harmonization-Dataset-iHarmony4/Xue et al/demo
    
    the code of the file until where you have to start completion: function outI = manipulateFeature(goal, I, Mask, shift_f, shift_b)
%INPUT: I: 3channel, 0~1
%INPUT: Mask, 1 channel, 0~1

    
function outI = manipulateFeature(goal, I, Mask, shift_f, shift_b)
%INPUT: I: 3channel, 0~1
%INPUT: Mask, 1 channel, 0~1

%% Parameters
mask_thrsh = 0.5;

% 1-GammaInv(245/255) = 0.0869; 1-GammaInv(118/255)/GammaInv(128/255) = 0.1607
cntrst_thrsh = 0.10;  % lowest cntrst we consider

top_ratio  = 1/1024; %robust highest end