In the present work, automatic corner detection in soccer games based on image features (e.g., object-based features) has been studied. For this purpose, a framework has been proposed that consists of five steps. This paper mainly focuses on the first three steps and specially ball detection step. Ball position on the field plays an important role in determining which event has occurred in the game. Therefore, it is necessary to detect exact position of the ball in the playfield and then track it. Ball trajectory that can be obtained via tracking is useful for identifying and detecting main events of soccer games. In these three steps, the most important processing that has been applied to the images is based on image segmentation to detect playfield, field lines, and ball. Cleaning morphological method is applied to detect the ball. This method is real-time and automatic, it yields superior results in comparison with other common methods such as Template Matching and Circular Hough Transform (CHT). By applying the proposed method, only one candidate for the ball position is obtained and non-ball candidates are removed, hence, it is more reliable than other methods. The results of the proposed method are compared with those of CHT. They illustrate that the proposed method is fast, effective, and reliable.