We present an image preprocessing method for particle image velocimetry (PIV) measurements of flow around an arbitrarily moving free surface. When performing PIV measurements of free surface flows, the interrogation windows neighboring the free surface are vulnerable to a lack, or even an absence, of seeding particles, which induces less reliable measurements of the velocity field. In addition, direct measurements of the free surface velocity using PIV have been challenging due to the intermittent appearance of the arbitrarily moving free surface. To address the aforementioned limitations, the PIV images with a curvilinear free surface can be treated to be suitable for a structured interrogation window arrangement in a Cartesian grid. The proposed image preprocessing method is comprised of a free surface detection method and an image transform process. The free surface position was identified using a free surface detection method based on multiple textons. The detected free surface points were used to transform PIV images of a curvilinear free surface into images with a straightened free surface using a cubic Hermite spline interpolation scheme. After the image preprocessing, PIV algorithms can be applied to the treated PIV images. The fluid-only region velocities were measured using standard PIV method with window deformation, and the free surface velocities were resolved using PIV/interface gradiometry method. The velocity field in the original PIV images was constructed by inverse transforming that in the transformed images. The accuracy of the proposed method was quantitatively evaluated with two sets of synthetic PIV images, and its applicability was examined by applying the present method to free surface flow images, specifically sloshing flow images.