Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个二进制图像。
我如何找到最低白色像素的坐标?
如果在您的矩阵中有 0 和 1 值代表白色和黑色
你可以找到白色像素
[row,col,v] = find(A);
然后最低像素有坐标
x = max(row) y = col(find(row==max(row)))
如果您有多个最低像素,也许您可以简单地获取其中一个的坐标。例如:
mrow = max(row); y = col(find(row==mrow(1)))%if you wanna take the lowest pixel on the left