Hi guys!
I want to create an algorithm which converts a two-dimensional binary matrix into vectors.
Input A:
Input B:
Output for either A or B:
Any idea on how to do this?
I want to create an algorithm which converts a two-dimensional binary matrix into vectors.
Input A:
B4X:
0 0 0 0 0 0 0 0
0 1 1 1 1 1 1 0
0 1 0 0 0 0 1 0
0 1 0 0 0 0 1 0
0 1 1 1 1 1 1 0
0 0 0 0 0 0 0 0
Input B:
B4X:
0 0 0 0 0 0 0 0
0 1 1 1 1 1 1 0
0 1 1 1 1 1 1 0
0 1 1 1 1 1 1 0
0 1 1 1 1 1 1 0
0 0 0 0 0 0 0 0
Output for either A or B:
B4X:
Vec1(6, 0) '6 Right
Vec2(4, 90) '4 Down
Vec3(6, 180) '6 Left
Vec3(4, 270) '4 Up
Any idea on how to do this?