A Programmable and Flexible Vision Processor