1. A system for crack detection, the system comprising: a storage device; and a processing system connected to the storage device; and a program stored in the storage device, wherein execution of the program by the processing system causes the system to perform functions, including functions that: (i) establish an appropriate structuring element based on a working distance and focal length of a three-dimensional (3D) structure of a scene; from a plurality of images of the scene; (ii) segment potential crack patterns by applying a morphological operation; (iii) determine appropriate features for each segmented pattern; and (iv) classify a crack from a non-crack pattern using a trained classifier, thereby forming a multiscale crack map, wherein: for the plurality of images of the scene there are a plurality of data acquisition parameters, wherein the relation between different image acquisition parameters is in accordance with the following: SF = ( WD FL ) ⁢ ( SS SR ) ⁢ n , where feature size (SF) is the size of a crack thickness represented by n pixels in an image, working distance (WD) is the working distance between camera and object, focal length (FL) is the camera focal length, sensor size (SS) (mm) is the camera sensor size, and sensor resolution (SR) is the camera sensor resolution in pixels; or the multiscale crack map is formulated in accordance with the following: and 0 otherwise; where J m is the crack map at scale m of a structuring element, S min , is the minimum structuring element size, C k is the binary crack image obtained by using k as the structuring element, and u and v are the pixel coordinates of the crack map image.