This study proposes an algorithm for recognition of crack patterns, which includes horizontal, vertical, diagonal$(-45^{\circ})$, diagonal$(+45^{\circ})$, and random cracks, based on image processing technique and artificial neural network. A MATLAB code was developed for the proposed algorithm, and then numerical tests were performed on thirty-eight crack images to examine validity of the algorithm. Within the limited tests in the present study, the proposed algorithm was revealed as accurately recognizing the crack patterns when compared to those classified by a human expert.