MATLAB: Trying to identify directions of overlapping lines in images, at the wit’s end

image processing

Hello everyone,
I have a large number of thermographic pictures of carbon-fibre reinforced plastic parts. My task is to build a Matlab tool which will read the image and give me the orientation of the fibres in the image. So far, I can recognise the orientation in single layers, like the image on the left:
I get the image matrix variance along lines in -45, 0, 45, and 90 degree angles. The direction with the least variance is the direction the lines have.
However, that breaks down when I get images like the one on the right.
Other things I've tried:
  • Get the gradient image, do Hough analysis: Works on the first picture, but the edge detection doesn't recognise the diagonal lines in the second image.
  • Use parts from the first picture, manually add lines with known angle to the picture, compute the similarity between my altered 1st image and the second image: Flat out doesn't work at all, neither ssim nor normxcorr2 give a higher degree of correlation/similarity for pictures with lines in the correct angle
  • Use parts from the first picture, stretch the image via imdilate function: Same problem as above.
Right now I'm getting desperate, because I've done all I can think of, and my supervisor is not content.
If anyone has any ideas, I'd be very grateful!

Best Answer

Have you looked into radon transforms? You might get some "signal" at the 45 and 135 directions for the right image...
If these are just small samples of images over larger areas, maybe fft could give you spokes in the right directions
It looks like you may have artifacts of your camera lens or something that isn't doing you any favors, e.g., there's some kind of line that cuts across the bottom right corner of hte image at a 45 degree angle on both images...