Its not possible to do any image processing on the APM 2.6 itself as it is nowhere powerful enough. Usually the way to go would be to use a second computer such as a raspberry pi, or beaglebone black to do image processing and then just send relevant motion commands back to APM via MAVlink commands.
However I don’t think this sort of thing is suitable for a beginner, its best to start with the basics of getting a Quadcopter built and then you can start by playing with the code. I know that there is some shared code of doing image processing with arduplane on a pandaboard. It was used in the outback UAV challenge to automatically recognise outback Joe, so I am sure there will be some stuff you can learn from on how to integrate with ardupilot.
Hope that helps and will be great to share your progress on your project s it does sound interesting