Question: architecture and hardware to write autopilot

I appreciate for your time!

Guys, I have task - need to get hardware (drone) and modify it’s autopilot so it can get image from drone’s camera, analyze it and make correction to it’s fly path
I am very new in this topic, can you suggest if it’s ok to buy for example 3DR Solo Drone (which is based on PX4 as far as I know), get latest version of PX4, modify it and upload to drone ?
If this solution will not work can you suggest hardware and framework ?

thank you VERY MUCH for ANY explanation from those who has experience in this topic