Prime component decomposition of images and its applications in an image understanding system