如何调整如下所示的边界双精度数组:
102 8
101 9
100 9
99 9
… …
成为看起来像这样的双数组:
102 8 101 9 100 9 99 9 … …
代码:
I = imread('coins.png');
BW = im2bw(I, graythresh(I));
[B,L] = bwboundaries(BW,'noholes');
boundary = B{1}
答案 0 :(得分:0)
% consider A is your matrix.
At=A.';
At(:) % this matrix will give what you want.