Crack detection in concrete structures is an important issue in the maintenance and repair operations of the structures. Detecting and distinguishing cracks in concrete can help determine the structure's health and prevent the possibility of structural failure. An efficient method for separating cracks in concrete is to use wavelet transform. This paper proposes a new crack detection technique based on a two-dimensional discrete wavelet transform and the standard deviation obtained from its detail signals to select an optimum wavelet function. According to our findings, there is a significant relation between the statistical index standard deviation and the desired detail signal obtained from the two-dimensional discrete wavelet transform for selecting the optimum wavelet function. Specifically, results show that as the standard deviation of the matrix of detail signal increases by a given wavelet function, crack detection resolution increases by that wavelet function.