A large number of methods for circle detection have been studied in the last years for several image processing applications. The context application considered in this work is the soccer game. In the sequences of soccer images it is very important to identify the ball in order to verify the goal event. This domain is a challenging one as a great number of problems have to be faced, such as occlusions, shadows, objects similar to the ball, real-time processing and so on. In this work a visual framework trying to solve the above-stated problems, mainly considering real-time computational aspects, has been developed. The ball detection algorithm has to be very simple in terms of time processing and also has to be efficient in terms of false positive rate. Our framework consists of two sequential steps for solving the ball recognition problem: the first step uses a modified version of the directional circle Hough transform to detect the region of the image that is the best candidate to contain the ball; in the second step a neural classifier is applied on the selected region to confirm if the ball has been properly detected or a false positive has been found. Some tricks like background subtraction and ball tracking have been applied in order to maintain the search of the ball only in limited areas of the image. Different light conditions have been considered as they introduce strong modifications on the appearance of the ball in the image: when the image sequences are taken with natural light, as the light source is strictly directional, the ball, due to self-shades, appears as a spherical cap; this case has been taken in account and the search of the ball has been modified in order to manage this situation. A large number of experiments have been carried out showing that the proposed method obtains a high detection score.