c*t
2 楼
easy. There is a scan line method.
Basically, let a horizontal line (or any arbitrary line, but horizontal
is easier computationally) go through the point. Then count the # of
interceptions of the curves on this line. If the point is inside the
curves, then the # of interceptions to the left of the point should be
odd.
,
【在 x*********l 的大作中提到】
: 请教大家一个算法的问题。在一个图像里有很多互相不相交的封闭曲线(任意形状),
: 如何判断任意一个点是在这些封闭曲线内,还是在曲线外?
Basically, let a horizontal line (or any arbitrary line, but horizontal
is easier computationally) go through the point. Then count the # of
interceptions of the curves on this line. If the point is inside the
curves, then the # of interceptions to the left of the point should be
odd.
,
【在 x*********l 的大作中提到】
: 请教大家一个算法的问题。在一个图像里有很多互相不相交的封闭曲线(任意形状),
: 如何判断任意一个点是在这些封闭曲线内,还是在曲线外?
x*l
4 楼
3x
【在 c*****t 的大作中提到】
: easy. There is a scan line method.
: Basically, let a horizontal line (or any arbitrary line, but horizontal
: is easier computationally) go through the point. Then count the # of
: interceptions of the curves on this line. If the point is inside the
: curves, then the # of interceptions to the left of the point should be
: odd.
:
: ,
【在 c*****t 的大作中提到】
: easy. There is a scan line method.
: Basically, let a horizontal line (or any arbitrary line, but horizontal
: is easier computationally) go through the point. Then count the # of
: interceptions of the curves on this line. If the point is inside the
: curves, then the # of interceptions to the left of the point should be
: odd.
:
: ,
l*u
5 楼
Sounds good. The only thing is that one needs to be careful in determining
if the line is intersecting, not just tangent, with the curve.
【在 c*****t 的大作中提到】
: easy. There is a scan line method.
: Basically, let a horizontal line (or any arbitrary line, but horizontal
: is easier computationally) go through the point. Then count the # of
: interceptions of the curves on this line. If the point is inside the
: curves, then the # of interceptions to the left of the point should be
: odd.
:
: ,
if the line is intersecting, not just tangent, with the curve.
【在 c*****t 的大作中提到】
: easy. There is a scan line method.
: Basically, let a horizontal line (or any arbitrary line, but horizontal
: is easier computationally) go through the point. Then count the # of
: interceptions of the curves on this line. If the point is inside the
: curves, then the # of interceptions to the left of the point should be
: odd.
:
: ,
相关阅读
node怎么和其他进程互相传递消息?Visual studio IDE 之父也被裁了 (转载)python的gc做得不如java 好微信进军可穿戴设备 IT巨头吞食移动健康蛋糕给不同客户做小网站,用什么host?找业余私活做JSON实际上有很多缺点原来码工就是"爱码士"python print filename and lineno有谁玩过C* + Spark?现在php都配nosql了吗?请教:移动APP的 服务端开发CentOS 7发布了北京诺基亚码工遭微软三哥裁员,3000只剩300 (转载)现在程序员不用Linux就太落伍了一些javascript syntax太丑了什么是Intuitive Web?有什么实际的例子?为什么要造轮子C++/CLI有人用吗?Is there a way to show if a method overrides a method in its superclass in Javascript