1. A shading detecting method for a camera module comprising: measuring a plurality of brightness values at a plurality of predetermined regions of a stable rectangular image generated by the camera module; calculating a plurality of brightness differences, each brightness difference being based on a comparison between a respective two of the predetermined brightness values, chosen from among the brightness values measured; judging whether at least one brightness difference exceeds a corresponding predetermined threshold; and rejecting the camera module if at least one brightness difference exceeds the corresponding predetermined threshold.