Detect cap insets for images.