Prior knowledge can improve the performance of spectrum sensing. Instead of using universal features as prior knowledge, we propose to blindly learn the localized feature at the secondary user. Motivated by pattern recognition in machine learning, we define signal feature as the leading eigenvector of the signal's sample covariance matrix. Feature learning algorithm (FLA) for blind feature learning and feature template matching algorithm (FTM) for spectrum sensing are proposed. Furthermore, we implement the FLA and FTM in hardware. Simulations and hardware experiments show that signal feature can be learned blindly. In addition, by using signal feature as prior knowledge, the detection performance can be improved by about 2 dB. Motivated by experimental results, we derive several GLRT based spectrum sensing algorithms under rank-1 assumption, considering signal feature, signal power and noise power as the available parameters. The performance of our proposed algorithms is tested on both synthesized rank-1 signal and captured DTV data, and compared to other state-of-the-art covariance matrix based spectrum sensing algorithms. In general, our GLRT based algorithms have better detection performance. In addition, algorithms with signal feature as prior knowledge are about 2 dB better than algorithms without prior knowledge.