A plurality of test patterns are printed with different print conditions, the test patterns each being formed by two inks out of a plurality of inks and a reaction liquid and including a plurality of patterns among which ejection positions of the reaction liquid relative to ejection positions of the two inks are displaced by a predetermined amount at a time. The optical properties of the respective test patterns printed on the print medium are detected. A displacement amount of the relative ejection positions of the reaction liquid from the ejection positions of the plurality of inks is obtained based on the optical property of the test pattern in which an optical density difference between the patterns in the test pattern is greater than a predetermined value and which has an optical density of a lowest level among the optical properties of the test patterns detected.