Motion correction of a three-dimensional (3D) image dataset reconstructed from a plurality of two-dimensional (2D) projection images acquired by an X-ray device is provided. In order to acquire the projection images, each of two acquisition assemblies covers an angular range of projection angles, and pairs of projection images of a region under examination are acquired at least substantially simultaneously at each acquisition time instant. For each pair of projection images, at least one marker object lying in the region under examination is automatically localized in order to determine 2D location information. 3D position information about the marker object is determined using acquisition geometries of the respective pair of projection images. Motion information describing a motion profile of the marker object over the acquisition period is ascertained from the position information at different acquisition time instants, and the motion information is used for motion correction of the image dataset.