Title: Smart CCD/CMOS based image sensors with programmable, real-time, temporal and spatial convolution capabilities for applications in machine vision and optical metrology