In image detection processes where there is a variation in brightness between pixels, techniques are required to obtain optimal and adaptable threshold values for these variations. Therefore, a comparison between the binary thresholding technique and the adaptive method of Otsu is made, in videos with dynamic and static background, weighing the response time of the algorithm, memory used, requirement of the central processing unit and hits in the detections, in the languages of Python and M (Matlab). The techniques in Python present better results in terms of response time and memory space; while, when using Matlab, the lowest percentage of machine requirement is presented. Also, the Otsu method improves the percentage of hits in 12.89 % and 11.3 % for videos with dynamic and static background, with respect to the binary thresholding technique.