When the traditional Hough transform based on circle detection locates the human iris, it involves a three-dimensional parameter space, so there is a shortage of computational time and space overhead. Aiming at this problem, a Hough transform circle detection algorithm using gradient to reduce the spatial dimension of parameters is proposed. Firstly, the image is preprocessed by mathematical morphology to reduce noise and eyelash interference. Secondly, the ant colony optimization algorithm is used to preprocess the image. Edge extraction is performed to reduce the number of points participating in the Hough transform. Finally, the improved Hough transform is used to locate the iris. The high-quality and low-quality images are used to compare the traditional Hough transform method and the literature [13] method. The results show that the method not only improves the positioning speed, but also improves the positioning accuracy. Compared with other methods, the image quality is improved. The requirements are also significantly reduced.