Improved image detection