Search code examples
matlabgismotion-detection

Efficiently way to compute colocation in space


Given a polyline P = {(x1, y1), ..., (xn, yn)} and another polyline Q = {(x1, y1), ..., (xm, ym)} (m not equal n, so polylines could have different length), colocation in space occurs when the trajectories of moving objects P and Q, have some positions in common (Point A, B and C as seen in example figure)

The concept is quite simple and visual perspective easily identify where colocation happen. Hardest part is how to realize an algorithm that efficiently compute colocation and return the x and y coords where colocation happens!! This algorithm will be developed in matlab so I have all necessary to rapidly work.

Best regards


Solution

  • You may want to look at the function INTERSECTIONS from the Matlab File Exchange. See also the corresponding entry in the File Exchange Pick of the week

    enter image description here