Intelligent Imaging and Sensing based on Programmable Metasurface