Provided are an image processing apparatus, a control method, and a control program to accurately determine whether or not a deflection of a fed medium has occurred, and to suitably control a feeding of the medium. A medium conveying apparatus includes a feed module to feed a medium, a motion detection module to detect a first change amount in a feeding direction of the medium placed on a medium tray and a second change amount in a direction perpendicular to a placing surface of the medium tray during feeding of the medium, a determination module to determine that a deflection of the medium has occurred when the first change amount is less than a first threshold value and the second change amount is equal to or more than a second threshold value, and a control module to stop feeding the medium according to the determination result.