A system and method for controlling an agricultural implement connected to a vehicle is described. An actuator is arranged to control a lateral position of the implement with respect to the vehicle, also influencing the vertical angle of the implement. A camera mounted on the implement is connected to an image processing system which is adapted to derive the position of at least one row of plants in an image provided by the camera. An implement control unit controls the actuator to move the implement to a desired position based upon the derived position of the at least one row of plants, and a compensation arrangement compensates for the rotation of the camera around the vertical axis caused by the actuator based on the position of the actuator.