How to define XY coordinates are on left and right side

조회 수: 5 (최근 30일)
SatyaPrakash Gupta
SatyaPrakash Gupta 2020년 4월 14일
댓글: Rik 2020년 4월 15일
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 ?
  댓글 수: 3
SatyaPrakash Gupta
SatyaPrakash Gupta 2020년 4월 14일
sorry missed to attached the vehicle trajectory , earlier attached are locations and now i have attached Vehicle trajectory . therefore it would be greateful , if you could help me with the code which tells the locations are on Left/Right with respect to the Vehicle Trajectory coordinates
Rik
Rik 2020년 4월 15일
Comment posted as flag by SatyaPrakash Gupta:
Can anyone from Mathwork will help me to resolve this issue , thank you

댓글을 달려면 로그인하십시오.

답변 (1개)

KSSV
KSSV 2020년 4월 14일
Follow the below steps.
  1. Pick a point (x,y) from the set of points.
  2. Using knnsearch get N number of points close to the (x,y) in trajectory points.
  3. Using polyfit, fit a striaght line with the N points.
  4. 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.
  댓글 수: 1
SatyaPrakash Gupta
SatyaPrakash Gupta 2020년 4월 14일
편집: SatyaPrakash Gupta 2020년 4월 14일
I believe that it will not work as well because when the vehicle is on the right side, then the closest locations will only visible on the right (using knnsearch), i just tried but not sucess.
could you help me with the code , I have been trying since 1-2 weeks, using cross product , azuimuth angle, yaw angle but did not successed and therefore i have raised this question.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Labeling, Segmentation, and Detection에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by