Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MegEngine/src/opr/impl/customop/fillpoly /opr_impl.cu填充算法 #526

Open
sunchuanxi opened this issue Apr 23, 2024 · 0 comments
Open

Comments

@sunchuanxi
Copy link

环境

1.系统环境:
2.MegEngine版本:
3.python版本:

复现步骤

最近准备移植这个cuda版本fillpoly算法的时候发现代码有点小bug,例子
std::vector p1 = {300,100,400,250,400,600,200,900,150,200,100,100 };//xyxyxy
对上面的轮廓点进行填充,效果如下:
Image 3

不论换什么点集,总有一条线填充不正确,经过修改代码MegEngine/src/opr/impl/customop/fillpoly /opr_impl.cu162行:
if (edge.y1 <= h),将“<="改为"<",问题解决
Image 4

请提供关键的代码片段便于追查问题

请提供完整的日志及报错信息

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant