The Standard Hough Transform (SHT) is robust in detecting dashed or broken lines, but the main parts of it, blind vote, can cause excessive consumption of computation. To overcome this disadvantage, a fast straight line detection method based on directional coding(DCHT) is described in this paper. The algorithm turns the exhausted task of voting for all directions into an elegant task by constructing a sniffer and predicting direction of straight lines around the pixels. By using directional coding approach, the algorithm proposed here treats each direction of edge pixels differently, voting for a smaller angle range covering the direction of straight line which contains this edge pixel. In this way, half or more voting is removed. Experimental results show that DCHT algorithm has significant performance in reducing both execution time and the influence of noise on parameter space.