
circuitBoard = (rgb2gray(imread('board.tif')));


circuitBoard = rot90(rgb2gray(imread('board.tif')));
imshow(circuitBoard)

offsets0 = [zeros(40,1) (1:40)'];

glcms = graycomatrix(circuitBoard,'Offset',offsets0);

stats = graycoprops(glcms,'Contrast Correlation');

figure, plot([stats.Correlation]);
title('Texture Correlation as a function of offset');
xlabel('Horizontal Offset')
ylabel('Correlation')