Code for vision algorithms