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.
我在一些图像上使用 Python 和 OpenCV,得到了我想要的结果。这是输出图像的示例。
所以重要的部分是opencv在它识别的对象周围绘制了红色矩形(我不想分享原始图像是什么,所以是的,在图像上运行了很多函数后,这些灰色补丁都是剩余的)。
现在我要做的是扩展矩形(这里有 2 个,但也可以有 3 个或 4 个),这样它们就尽可能大而不接触。我似乎无法想出任何算法来做到这一点。有什么建议么?