Masking particle image velocimetry images can be a time consuming process in experiments involving moving bodies. Aircraft store separation and pitching airfoil investigations are examples of studies where particle image velocimetry data has to be acquired for many different body positions to properly resolve the attributes of the unsteady flow field. Laser reflections, perspective projection of the body, and nonuniform illumination in raw images can cause intensitybased algorithmic masking routines to fail in determining the correct mask for each individual image. A novel approach for automatic masking in moving body experiments is introduced in this paper. A pitching airfoil experiment is used to demonstrate the capability of the methodology. Photogrammetry is used to locate the airfoil model in the images and map the 3D body to the image space and define a mask. After performing photogrammetry for several known angles of attack and calibrating the photogrammetry parameters for each angle, a model was developed to estimate the parameters at other angles of attack where calibration data are not available. Results indicate that obtaining the necessary parameters required for masking a few reference images allows for robust automated masking of the remaining images leading to significant time reduction in the masking process. Masks generated using the automated masking technique show agreement with those generated by direct photogrammetry; the error in the predicted location remains less than 0.3% of the chord length. The automaticallygenerated masks prove to be effective when processing PIV images with the airfoil in different locations.