PHOC extraction in mex