Energy-efficient design of an always-on smart visual trigger