logo

请问openmvH4如何识别两个色块儿的边界呢,就比如这个箭头所指位置?

2021-11-05 14:18
O
nwm4
721a0903-a582-44cb-92c7-19edc80d9d34.png
2021-11-05 15:30
I
网红小智智 星瞳科技

你具体要做什么?你这么问,得不到想要的答案。

2021-11-05 20:33
K
d2xk

他的意思是怎么识别出这一坨色块的边界然后返回边界在相机中的坐标吧

2021-11-06 12:05
I
网红小智智 星瞳科技

一般来说找到所有边界的像素点意义不大,都是直接find_lines找直线。

2021-11-06 23:37
K
d2xk

@kidswong999 找到直线后怎么求出视野中最长的直线并获取直线的坐标呢?

2021-11-07 12:44
I
网红小智智 星瞳科技

那不是直线,是线段,用find_line_segments

https://docs.singtown.com/micropython/zh/latest/openmvcam/library/omv.image.html#image.Image.image.find_line_segments

写for循环遍历,判断length

https://docs.singtown.com/micropython/zh/latest/openmvcam/library/omv.image.html#image.line.line.length