Coded rolling shutter for flexible space-time sampling