Dear friends I'm trying binarise the image, it’ll look best if I cut the black parts out. To avoid any funny edge effects I’ll crop the pattern to a circle, and so our ‘mask’ is drawn below, along with the relevant snippet of Matlab
P = imread('Pattern.png');
P = 1-im2bw(P); % Keep black parts
Nmin = min(size(P));
% Crop into square, then circle
P = P(1:Nmin, 1:Nmin);
[xg, yg] = meshgrid(1:Nmin, 1:Nmin);
P((xg - Nmin/2).^2 + (yg - Nmin/2).^2 > 0.99*0.25*Nmin^2) = 0;
% Create a small border
P = padarray(P, [1 1], 0);
But for some reason I'm having issues with line 7,
Error: File: Try1.m Line: 7 Column: 42
Unbalanced or unexpected parenthesis or bracket.
please help me...
edit:
here is explanation