Motion detection is widely used as the key module for extracting moving objects from image sequences in Intelligent Transportation Systems (ITS). In most of the motion detection methods, backgrounds are subtracted from the captured images. This category of methods is called background subtraction. Since standard intensity can be expressed as the multiplication of illumination and reflectance, illumination changes will produce a poor difference image from background subtraction and affect the accuracy of motion detection. In this paper, we use ratio images as the basis of motion detection. To suitably threshold the target images, two-piece linear approximation is proposed for cumulative histograms to prevent the problems in the searching of peaks and valleys in histograms. Experimental results demonstrate that two-piece linear approximation for cumulative histograms performs very well in thresholding the target images. Moreover, the superiority of motion detection based on ratio images over motion detection based on difference images is also depicted in the experiments.