initial code import from CVPR 13 paper..