Measuring the intensity of spectral line directly on the spectrum itself