Living under intense predation pressure, octopuses evolved an effective and impressive camouflaging ability that exploits features of their surroundings to enable them to "blend in." To achieve such background matching, an animal may use general resemblance and reproduce characteristics of its entire surroundings, or it may imitate a specific object in its immediate environment. Using image analysis algorithms, we examined correlations between octopuses and their backgrounds. Field experiments show that when camouflaging, Octopus cyanea and O. vulgaris base their body patterns on selected features of nearby objects rather than attempting to match a large field of view. Such an approach enables the octopus to camouflage in partly occluded environments and to solve the problem of differences in appearance as a function of the viewing inclination of the observer.