Crack detection is a crucial task in the periodic survey of high-rise buildings and infrastructure. Manual survey is notorious for low productivity. This study is aimed at establishing an image processing-based method for detecting cracks on concrete wall surfaces in an automatic manner. The Roberts, Prewitt, Canny, and Sobel algorithms are employed as the edge detection methods for revealing the crack textures appearing in concrete walls. The median filtering and object cleaning operations are used to enhance the image and facilitate the crack recognition outcome. Since the edge detectors, the median filter, and the object cleaning operation all require the appropriate selection of tuning parameters, this study relies on the differential flower pollination algorithm as a metaheuristic to optimize the image processing-based crack detection model. Experimental results point out that the newly constructed approach that employs the Prewitt algorithm can achieve a good prediction outcome with classification accuracy rate = 89.95% and area under the curve = 0.90. Therefore, the proposed metaheuristic optimized image processing approach can be a promising alternative for automatic recognition of cracks on the concrete wall surface.