analyze_objects function

Analyzes objects in an image