controlling 2 dc motors using an angle value as input

Hi all. I want to controll 2 dc motors using a 2 pwm’s. I use a raspberry pi and a raspicam to capture a line. After processing with opencv I get as an output an angle. I want to know how I can use that angle to drive the robot?