matlab - 调整双数组 - Matlab
问题描述
如何调整看起来像这样的边界双数组:
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}
解决方案
% consider A is your matrix.
At=A.';
At(:) % this matrix will give what you want.
推荐阅读
- tensorflow - 带有张量流的图像检测器
- javascript - 如何在 nz datepicker angular 中设置 CURRENT DATE 和 HOUR 的值
- reactjs - 使用 Typescript 在 React 组件中使用 state 属性出现错误 TS2416
- mysql - 计数超过 1 个有子句
- css - Create-React-app 不透明度转换不起作用
- python - 如何解决 Conda HTTP000error?
- node.js - Node.js 内置分布式缓存
- c - db_stat 对于 Berkeley DB 无法正常工作
- functional-programming - ELM QueryString 解析器不编译
- .net-core - Azure 管道部署到 Amazon Lambda 很少在构建时失败