Generally speaking, the orientation of an image can easily be recognized by human beings. On the other hand, recognizing the orientation of an image is one of the challenges facing digital image processing. Several attempts have been made in this research area. However, the optimal solution still needs to be determined. For such a solution, the main issue is to obtain the precise angle for possible rotation. Numerous attempts have been made to address this issue; some of them mainly focus on coarse angles, whereas others have applied fuzzy logic in order to determine more precise angles. In this paper, a two-stage method is introduced in which a coarse angle estimation is achieved through the use of the Convolutional Neural Network (CNN) approach, and a more precise angle is acquired via fuzzy logic. An extensive evaluation of the proposed method is carried out on different public datasets. The results indicate an outstanding level of performance in terms of optimizing image orientation. INDEX TERMS Orientation of an image, precise angle estimation, convolutional neural network (CNN), fuzzy logic. A. OBTAINING AN ESTIMATE OF THE COARSE ANGLE (0 • , 90 • , 180 • , AND 270 •)