Currently, most camera calibration methods for traffic scenes are based on vanishing points and road geometry markings with simplified camera models, which can only be applied to scenes containing straight roads. However, in practical applications, cameras are usually installed with roll angles and scenes containing curved roads, to which existing methods are not applicable. To solve the above problems, we propose a novel optimization approach for camera calibration in traffic scenes, which can be applied to curved road scenes and predict camera roll angle. Firstly, a camera space model with a camera roll angle is established for image rotation. Secondly, vehicle trajectories are extracted for the best vanishing point by a parallel coordinate system and diamond space. Vehicle trajectories are also used to obtain calibration regions for extracting road markings and edges. The road markings, edges, and the best vanishing point obtained by the above two steps automatically are more accurate and stable, especially for curved road scenes. Based on the road markings and the best vanishing point, initial calibration can be conducted. Finally, by extracting redundant markings in the calibration region, the non-linear constraint of redundant markings on the road is proposed to obtain optimized calibration parameters and predict the camera roll angle. Through experimental validation on the public dataset BrnoCompSpeed and highway scenes, the proposed approach can achieve better calibration results in both straight and curved road scenes with the mean calibration error reduced by 30% compared with the previous calibration methods.