Rank Detection Based On Generalized Eigenvalue Threshold In Arbitrary Noise