How to define XY coordinates are on left and right side
4 次查看(过去 30 天)
显示 更早的评论
Hi,
I am working for the radar locations , where i have azimuth angles for each objects, with the help of this i am able to partially define the locations are on left/right side during straight road but unable to define it when there are sharp curve roads.
could you please do help me out to separate the above attached .mat file with XY coordinates belogn on Left/Right side ?
回答(1 个)
KSSV
2020-4-14
Follow the below steps.
- Pick a point (x,y) from the set of points.
- Using knnsearch get N number of points close to the (x,y) in trajectory points.
- Using polyfit, fit a striaght line with the N points.
- Use this: https://math.stackexchange.com/questions/324589/detecting-whether-a-point-is-above-or-below-a-slope. To know whether point is abive or below the given line.
This is the mehtod which I think shall work. There might be more elegant methods.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Detection 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!