This paper presents a novel algorithm based on the gradient direction to separate the multiple attaching and overlapping objects. The idea is based on the fact that the gradient directions of north,east,south,and west neighbourhood pixels are divergent when the gradient direction of the pixel located in the boundary region is used as a reference line.The proposed algorithm is composed of three steps:image denoising,pixel classification,and boundary extraction.The performance of the proposed approach is evaluated using the correctness of connected object counting and boundary accuracy measurement.Both evaluation results are compared with those from the traditional watershed algorithm. The evaluation results show that the proposed method provide better performance compared to the traditional watershed algorithm.