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.
我需要有效的填充算法来填充封闭的多边形(例如扫描线填充),我可以在 CUDA 上运行它。你有什么建议吗?
提前感谢任何重播!
Thrust有一个非常好的扫描算法,但仅限于单行。您可能需要对其进行一些扩展以处理图像。假设边缘在其他任何地方都是 1 和 0,那么您需要做的就是对图像执行前缀求和。前缀和完成后,您需要做的就是填充总和为奇数的区域。