0

我正在尝试在 openCV 中实现连接组件树结构。在以一定间隔从 0..255 开始的一系列阈值之后,我获得了一组照片 - 例如: 阈值 150

阈值 170

如果第二张图像中的每个形状包含在第一张图像中的另一个形状中,是否有一种方法可以检测第二张图像中的每个形状?

非常感谢!

4

1 回答 1

0

Take the image with the shape in question (2nd image), and remove all other shapes. Then 'and' the image with the 1st image. If the result is the same as the image with the single shape, it is contained.

Obviously this can be optimized to not go through the entire process for each shape.

于 2015-01-08T12:14:21.130 回答