Use matrix of optical sensors to detect form, edges of object