In order to determine the appropriate time window width and center of short-time Fourier analysis(STFT), a method combining STFT and mathematical morphology is presented to analyze the components of a transient signal. According to the characteristics of power system signals, the identification of suitable structure elements and their discrete formulas, such as structural elements size formula and structural elements equations are investigated. Singular point location algorithm is used in STFT with mathematical morphology. The MATLAB simulation examples show that the method can rapidly and accurately access the main frequency and amplitude components of a transient signal compared to the traditional STFT.