A method for detecting a crack in a structural component, comprising: determining , using an algorithm, a critical location of a structural component by detecting repetitive shapes in an image of an area of the structural component when load is transferred, wherein the critical location includes a location where metal fatigue of the structural component is likely to occur; directing a camera toward the critical location in response to determining the critical location via the algorithm; receiving , with a processor, at least one image for the critical location in the structural component; determining, with the processor, at least one shape in the at least one image, the at least one shape being representative of a structure of the critical location; representing, with the processor, at least one region around the structure into a matrix; and applying, with the processor, image processing on the matrix to detect cracks in the at least one region of the structural component; modulating a light beam comprising a plurality of light sources and directing the modulated light beam onto the structural component for illuminating the critical location, the light beam modulated and directed over a range of angular positions relative to the structural component; and selectively illuminating each of the plurality of light sources in an individual manner, characterized in that applying image processing on the matrix includes applying a contextual model to the matrix that includes multiplying the matrix by a prior matrix that indicates a likelihood of a crack to occur and performing a robust principle component analysis, the robust principle component analysis including decomposing the matrix into a normal component matrix and a sparse component matrix, the sparse component matrix containing information pertaining to cracks or deformation of the structural component. determining , using an algorithm, a critical location of a structural component by detecting repetitive shapes in an image of an area of the structural component when load is transferred, wherein the critical location includes a location where metal fatigue of the structural component is likely to occur; directing a camera toward the critical location in response to determining the critical location via the algorithm; receiving , with a processor, at least one image for the critical location in the structural component; determining, with the processor, at least one shape in the at least one image, the at least one shape being representative of a structure of the critical location; representing, with the processor, at least one region around the structure into a matrix; and applying, with the processor, image processing on the matrix to detect cracks in the at least one region of the structural component; modulating a light beam comprising a plurality of light sources and directing the modulated light beam onto the structural component for illuminating the critical location, the light beam modulated and directed over a range of angular positions relative to the structural component; and selectively illuminating each of the plurality of light sources in an individual manner, characterized in that applying image processing on the matrix includes applying a contextual model to the matrix that includes multiplying the matrix by a prior matrix that indicates a likelihood of a crack to occur and performing a robust principle component analysis, the robust principle component analysis including decomposing the matrix into a normal component matrix and a sparse component matrix, the sparse component matrix containing information pertaining to cracks or deformation of the structural component. <EOS>