The study of drugs to combat neurodegenerative diseases, such as Alzheimer and Parkinson, is frequently done in animal models such as rats. To evaluate the effectiveness of drugs and administered medication, videos of rats in a swimming pool are recorded and their behavior is analyzed. Although, there are several commercial and free access computer programs that allow recording the movement of the rat, they do not do it in an automatic way, given that the identification of some reference points such as the position and ratio of the pool is done by hand. In addition, it is required to identify the frame when the rat is released. This makes the study of these videos long, tedious and not reproducible. Therefore, in this paper, a new technique for the evaluation of the Morris test is introduced. It automatically detects and localises the pool and the rat notably reducing the time consumed in the evaluation. For the pool identification a segmentation method, based on the projection of the video frames, is done, eliminating the rat, while conserving the shape of the pool. Then, the Hough transformation is used to recognize the position and radius of the pool. The frame when the rat is released is found by using mathematical morphology techniques. The software was developed as a plugin of the free access software imageJ. The results obtained were validated, allowing to verify the quality of the proposed method.