1. A method, comprising: receiving an image of a portion of an object captured by a confocal imaging device having a predetermined astigmatic character created by a particular astigmatic aberration in a light path of the confocal imaging device, wherein the particular astigmatic aberration is created by a lens adjacent to an image sensor, the image sensor including a plurality of pixels; determining an image pattern associated with the image; determining an intensity of the image pattern by determining an electric charge produced by the plurality of pixels of the image sensor in response to receiving the image; determining whether the intensity of the image pattern exceeds a particular threshold; and determining, in response to the intensity of the image pattern exceeding the particular threshold, a distance between a focus plane of the confocal imaging device and the portion of the object based, at least in part, on the plurality of pixels of the image sensor and the intensity of the image pattern.