reset the counters on every new image