In this study, we propose a method for detecting road markings recorded in an image captured by an in-vehicle camera by using a position-dependent classifier. Road markings are symbols painted on the road surface that help in preventing traffic accidents and in ensuring traffic smooth. Therefore, driver support systems for detecting road markings, such as a system that provides warning in the case when traffic signs are overlooked, and supporting the stopping of a vehicle are required. It is difficult to detect road markings because their appearance changes with the actual traffic conditions, e. g. the shape and resolution change. The variation in these appearances depend on the positional relation between the vehicle and the road markings, and on the vehicle posture. Although these variations are quite large in an entire image, they are relatively small in a local area of the image. Therefore, we try to improve the detection performance by taking into account the local variations in these appearances. We propose a method in which a position-dependent classifier is used to detect road markings recorded in images captured by an in-vehicle camera. Further, to train the classifier efficiently, we propose a generative learning method that takes into consideration the positional relation between the vehicle and road markings, and also the vehicle posture. Experimental results showed that the detection performance when the proposed method was used was better than when a method involving a single classifier was used.