Object Recognition code in Ardupilot

I want to use a quadcopter for border management, surveillance purposes etc. So that a quadcopter with a camera would be able to detect any human on the scene, and when it do so then send an alert message to the system and also send some images of the detected object(probably a human).
Do Ardupilot has a built-in code for such purposes or do I have to add that code by myself? And if I have to do that by myself then please give me some guidelines to do so.

Ardupilot does not support this. It focus on flight control. A good way to go is adding a companion computer, with a attached camera and dedicated software. I suggest a Raspberry Pi (my preference) or a NVidia TX1. Then, you will need specialized software to do image recognition. I think there is no “install-and-go” solution. You will need to do some research, test some software, and most probably do some code programing. Your software can get flight information (location coordinates, altitude, heading…) from Ardupilot via a Mavlink link (see this example). Your software can also send commands to Ardupilot. As an example: if you detect something, send a RTL command.

I’m not sure if you need to take immediate action on detection. I so, this would make your project more difficult, because companion computers normally don’t have processing power to do elaborate image recognition. If an offline strategy is enough (i.e.: fly a mission, return, copy recorded images to laptop, analyze), then have look at Randy Mackay’s work on TAP-J Search and Rescue Challenge. It’s somewhat similar to what you want.

I’ve moved this to the ArduCopter category instead of “Blog” which causes the post to appear on the front page of ardupilot.org

Thanks a lot @FabricioSilva for your insight. You also suggested an offline approach but I really need an “on-the-spot” image processing, I think the Raspberry Pi will do my job. Thanks again!