Kernel learning for visual perception