A boom sprayer and method of adjusting a boom assembly. A camera is attached to the boom assembly and aimed forward of the boom sprayer. The camera collects information associated with the dimensions and location of oncoming structures, such as crops, hills, fences and the like, and relays the information to a controller. The controller uses various actuators to lift, tilt and/or pivot the boom assembly to position the boom assembly at a desired height when the boom assembly passes over the structures.