We propose a robust procedure based on the regularized phase-tracking (RPT) technique to demodulate squared-grating deflectograms. The use of squared gratings, already reported, lets us multiplex the information of the deflections in two orthogonal directions in a single image, thus avoiding the necessity of rotating the gratings. The good noise-rejection characteristics of the RPT technique are improved by use of a quasi-Newton optimization algorithm and a quality-map-based algorithm for the crystal-growing process.