A computer implemented method for compensating for motion blur when performing a 3D scanning of at least a part of an object by means of an intra-oral scanner, where the motion blur occurs because the scanner and the object are moved relative to each other during the acquisition of a sequence B of focus plane images, and where the motion blur compensation comprises: - determining whether there is a relative motion between the scanner and the object during the acquisition of the sequence B of focus plane images by analysis of the sequence B and a sequence A obtained before said sequence B and a sequence C obtained after said sequence B generate three sub-scans A, B, C generated from each sequence A, B, C respectively wherein each sub-scan consists of a point cloud and a timestamp that indicates when each 3D point was recorded - determining the affine transformations T A, T B, T C from the coordinates of each sub-scan to a common world coordinate system; - determining an average timestamp t A, t B, tc for each sub-scan A, B, C; - determining the transformation T AtoB from sub-scan A to sub-scan B and transformation T BtoC from sub-scan B to sub-scan C, and the time between sub-scans A and B and B and C, t AtoB, t BtoC as t AtoB = t B -t A and t BtoC = t c - t B respectively; - determining that the motion of the intra-oral scanner has been sufficiently smooth, by: - time-normalizing the transformations T AtoB and T BtoC to determine time-normalized transformations T AtoB-norm and T BtoC-norm respectively, wherein T AtoB-norm =(T AtoB) 1/ t AtoB, and T BtoC-norm =(T BtoC) 1/ t BtoC - approximating the scan volume to a cube comprising 8 corners; - applying the time-normalized transformations T AtoB-norm and T BtoC-norm to each of the 8 corner points; - determining the distance between each pair of transformed corner points; - if all the found distances are below a threshold value, deeming that the motion of the intra-oral scanner has been sufficiently smooth; If it is determined that the motion has been sufficiently smooth then: - calculating the combined transformation T comb = T BtoC-norm o T AtoB-norm; - for each point in sub-scan B having timestamp t, determining the difference Deltat=t-t b,; - computing the transformation (T comb) -Deltat/2 - applying the computed transformation to the point to obtain the motion compensated point; and - generating a 3D surface from the motion-compensated position of each point in sub-scan B. - determining whether there is a relative motion between the scanner and the object during the acquisition of the sequence B of focus plane images by analysis of the sequence B and a sequence A obtained before said sequence B and a sequence C obtained after said sequence B generate three sub-scans A, B, C generated from each sequence A, B, C respectively wherein each sub-scan consists of a point cloud and a timestamp that indicates when each 3D point was recorded - determining the affine transformations T A, T B, T C from the coordinates of each sub-scan to a common world coordinate system; - determining an average timestamp t A, t B, tc for each sub-scan A, B, C; - determining the transformation T AtoB from sub-scan A to sub-scan B and transformation T BtoC from sub-scan B to sub-scan C, and the time between sub-scans A and B and B and C, t AtoB, t BtoC as t AtoB = t B -t A and t BtoC = t c - t B respectively; - determining that the motion of the intra-oral scanner has been sufficiently smooth, by: - time-normalizing the transformations T AtoB and T BtoC to determine time-normalized transformations T AtoB-norm and T BtoC-norm respectively, wherein T AtoB-norm =(T AtoB) 1/ t AtoB, and T BtoC-norm =(T BtoC) 1/ t BtoC - approximating the scan volume to a cube comprising 8 corners; - applying the time-normalized transformations T AtoB-norm and T BtoC-norm to each of the 8 corner points; - determining the distance between each pair of transformed corner points; - if all the found distances are below a threshold value, deeming that the motion of the intra-oral scanner has been sufficiently smooth; - time-normalizing the transformations T AtoB and T BtoC to determine time-normalized transformations T AtoB-norm and T BtoC-norm respectively, wherein T AtoB-norm =(T AtoB) 1/ t AtoB, and T BtoC-norm =(T BtoC) 1/ t BtoC - approximating the scan volume to a cube comprising 8 corners; - applying the time-normalized transformations T AtoB-norm and T BtoC-norm to each of the 8 corner points; - determining the distance between each pair of transformed corner points; - if all the found distances are below a threshold value, deeming that the motion of the intra-oral scanner has been sufficiently smooth; - calculating the combined transformation T comb = T BtoC-norm o T AtoB-norm; - for each point in sub-scan B having timestamp t, determining the difference Deltat=t-t b,; - computing the transformation (T comb) -Deltat/2 - applying the computed transformation to the point to obtain the motion compensated point; and - computing the transformation (T comb) -Deltat/2 - applying the computed transformation to the point to obtain the motion compensated point; and - generating a 3D surface from the motion-compensated position of each point in sub-scan B.