Lensless imaging with image sensors functioning as coded apertures