A cognitive model for visual attention and its application