A principled approach to the detection of camouflaged objects