We demonstrate a method for quickly and automatically detecting all three components of a remanent magnetic field around a shielded spin-exchange relaxation-free (SERF) atomic magnetometer (AM) using the trisection algorithm (TSA) for zero-field resonance (ZFR). To satisfy the measurement of AMs, a resonance light of the 87Rb D1 line with a spectral width of less than 1MHz is converted to circular polarization by a linear polarizer and a quarter-wave plate. After the light beam has passed through the alkali metal vapor cell, the residual magnetic field can be measured by searching for triaxial ZFR optical peaks. The TSA stably reduces the measurement time to 2.41 s on average and improves the measurement accuracy, significantly outpacing existing methods. The weighted averages of all measurements with corresponding uncertainties are (−15.437 ± 0.022)nT, (6.062 ± 0.021)nT, and (−14.158 ± 0.052)nT on the x-, y-, and z-axes, respectively. These improvements could facilitate more extremely weak magnetic studies in real time, such as magnetoencephalography (MEG) and magnetocardiography (MCG) measurements.