An image processing apparatus comprising: a storage unit to store moving-image data including a plurality of frames captured by an image-capturing device communicable with the image processing apparatus , time-series data of an inclination angle of the image-capturing device with reference to a reference direction, and time-series data of angular velocities generated around three axes of an angular velocity sensor of the image-capturing device ; and a correction unit to, based on the time-series data of the angular velocities, rotate an image of each of the plurality of frames of the moving-image data to reduce a rotational distortion around the reference direction; and an output unit to output image data of the rotated image of each of the plurality of frames to an external device communicable with the image processing apparatus , characterized in that the image processing apparatus further comprises a camera front calculation unit to calculate a first front direction of the image-capturing device at a first time based on a value of the time-series data of the inclination angle at the first time, and after obtaining the first front direction, to calculate time-series values of the front direction of the image-capturing device over a plurality of times corresponding to the plurality of frames based on the time-series data of the angular velocities, wherein the front direction is the direction of an optical axis of the image-capturing device ; a correction angle calculation unit to calculate a correction angle for the rotation correction from the time-series values of the front direction of the image-capturing device in a predetermined frame among the plurality of frames, based on the time-series data of the inclination angle, wherein the correction unit rotates the image based on the calculated correction angle. a storage unit to store moving-image data including a plurality of frames captured by an image-capturing device communicable with the image processing apparatus , time-series data of an inclination angle of the image-capturing device with reference to a reference direction, and time-series data of angular velocities generated around three axes of an angular velocity sensor of the image-capturing device ; and a correction unit to, based on the time-series data of the angular velocities, rotate an image of each of the plurality of frames of the moving-image data to reduce a rotational distortion around the reference direction; and an output unit to output image data of the rotated image of each of the plurality of frames to an external device communicable with the image processing apparatus , characterized in that the image processing apparatus further comprises a camera front calculation unit to calculate a first front direction of the image-capturing device at a first time based on a value of the time-series data of the inclination angle at the first time, and after obtaining the first front direction, to calculate time-series values of the front direction of the image-capturing device over a plurality of times corresponding to the plurality of frames based on the time-series data of the angular velocities, wherein the front direction is the direction of an optical axis of the image-capturing device ; a correction angle calculation unit to calculate a correction angle for the rotation correction from the time-series values of the front direction of the image-capturing device in a predetermined frame among the plurality of frames, based on the time-series data of the inclination angle, wherein the correction unit rotates the image based on the calculated correction angle. <EOS>