Commented image analysis script