1. A clustering method with a two-stage local binary pattern, the method comprising: dividing an image into a plurality of patches; generating a gradient direction value according to a center sub-block and neighbor sub-blocks of the patch; quantizing the gradient direction value, thereby generating a quantized gradient direction value; generating a gradient magnitude value according to the gradient direction value; quantizing the gradient magnitude value, thereby generating a quantized gradient magnitude value; concatenating the quantized gradient direction value and the quantized gradient magnitude value to generate a two-stage local binary pattern (2SLBP) value; and performing clustering of super-resolution imaging by using the 2SLBP value as an index.