A method of generating a three-dimensional virtual model of an intraoral object includes capturing, by an imaging apparatus for performing intraoral scans, surface scan data of the intraoral object while changing a position of at least one lens of focusing optics of the imaging apparatus, wherein the surface scan data comprises depth data for a plurality of points of the intraoral object. The method further includes adjusting the depth data for one or more of the plurality of points based at least in part on a value associated with a temperature of at least a portion of the imaging apparatus. The method further includes generating the three-dimensional virtual model of the intraoral object using the adjusted depth data.