gpt4 book ai didi

matlab - 使用编程查找每个像素的坐标

转载 作者:太空宇宙 更新时间:2023-11-03 19:36:02 25 4
gpt4 key购买 nike

用编程(openCV或MATLAB)如何找到下图中内圈(或外圈)每个像素的坐标?
imtool 提供此信息,但它是鼠标驱动的。

enter image description here

更新

我使用 imtool 来检测这些位置,方法是将鼠标光标放在圆上的每个点上并手动记录该值。但是我如何使用手动编程来完成它我不能在圆圈上做那么多品脱。

最佳答案

在 Matlab 中,你可以这样做:

im = imread('im.png');      %# load image
[y,x] = find(all(im<5, 3)); %# find black pixels
position = [x,y]; %# display them

关于matlab - 使用编程查找每个像素的坐标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11663268/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com