Head,tail coordinates

I want to track coordinates of head and tail for the larvae how can I do this?