MATLAB filter for OpenDiamond