How to use raspberry pi to follow a uav?

HI,
I have a project that I need to do,
I need to connect a raspberry pi with a camera and a thermal camera to a pixhawk,
I need the raspberry pi to say to the pixhawk where to fly (to crash inside the uav),
how can I do that? what language is the code? can I do that?
thanks for the help

Yes it is possible, read the documentation about follow me mode. And all the documentation about machine vision that you can find.

I want the drone to crash into the uav is that possible in follow me mode?

No, no military applications are allowed. I will stop the discussion here!

its for a school project I need it to be proof of concept If I will really gonna do something like that my school wouldn’t let me do it