X-ray scatter in planar radiography degrades the contrast resolution of the image, thus reducing its diagnostic utility. Antiscatter grids partially block scattered photons at the cost of increasing the dose delivered by two- to four-fold and posing geometrical restrictions that hinder their use for other acquisition settings, such as portable radiography. The few software-based approaches investigated for planar radiography mainly estimate the scatter map from a low-frequency version of the image. We present a novel method for scatter correction in planar imaging based on direct patient measurements. Samples from the shadowed regions of an additional partially obstructed projection acquired with a beam stopper placed between the X-ray source and the patient are used to estimate the scatter map. Evaluation with simulated and real data showed an increase in contrast resolution for both lung and spine and recovery of ground truth values superior to those of three recently proposed methods. Our method avoids the biases of post-processing methods and yields results similar to those for an antiscatter grid while removing geometrical restrictions at around half the radiation dose. It can be used in unconventional imaging techniques, such as portable radiography, where training datasets needed for deep-learning approaches would be very difficult to obtain.