Modeling the lifetime of wireless multimedia sensor networks