We estimate the two- and three-dimensional power spectra , P _ { 2 } ( K ) and P _ { 3 } ( k ) , of the galaxy distribution by applying a maximum likelihood estimator to pixel maps of the APM Galaxy Survey . The analysis provides optimal estimates of the power spectra and of their covariance matrices if the fluctuations are assumed to be Gaussian . Our estimates of P _ { 2 } ( K ) and P _ { 3 } ( k ) are in good agreement with previous work but we find that the errors at low wavenumbers have been underestimated in some earlier studies . If the galaxy power spectrum is assumed to have the same shape as the mass power spectrum , then the APM maximum likelihood P _ { 3 } ( k ) estimates at k \leq 0.19 h { Mpc } ^ { -1 } constrain the amplitude and shape parameter of a scale-invariant CDM model to lie within the 2 \sigma ranges 0.78 \leq ( \sigma _ { 8 } ) _ { g } \leq 1.18 and 0.05 \leq \Gamma \leq 0.38 . Using the Galactic extinction estimates of Schlegel , Finkbeiner and Davis , we show that Galactic obscuration has a negligible effect on galaxy clustering over most of the area of the APM Galaxy Survey .