How can I adjust the boundary double array that looks like that:
102 8
101 9
100 9
99 9
… …
To be a double array that looks like this:
102 8 101 9 100 9 99 9 … …
Code:
I = imread('coins.png');
BW = im2bw(I, graythresh(I));
[B,L] = bwboundaries(BW,'noholes');
boundary = B{1}