Optical flow in Pixhawk with arduCoper

Hello
Px4Flow is used as a velocity sensor , it is sending vectors on the x-y movement because it is looking on features on the ground. These information are then added to IMU and other sensors (if available) and fused within the EKF to set the drone attitude.

So its low level attitude control loop , if your are looking for hi-level guided mode , you can read on this link : QuadCopter Object Tracking on a budget

If you need more autonomy, you need to go either SLAM or like in the video above with pretrained Deep Neural Network, that is actually the state of the art, but this is requiring a high level of expertise in both AI and Robotics.

Hope this helps