  Quantum diamond microscopy (QDM), which employs nitrogen-vacancy (NV) center
ensembles, is a promising approach to quantitatively imaging magnetic fields
with both high resolution that approaches the diffraction limit and a wide
field of view. The commonly adopted setups of QDM capture the photoluminescence
through transparent diamonds, which inevitably entail aberrations -- optical
errors that degrade the optical resolution and contrast of the obtainable
image. In this study, we delve into the impact of optical aberrations, focusing
on their dependence on diamond thickness. We first introduce a rigorous model
[Richards et al., Braat et al.] of diffraction that incorporates aberrations,
producing the NV center optical image. We confirm that this model accurately
reproduces the confocal images of single NV centers obtained at various depths
in diamonds. Extending this model to a wide-field microscope, we find that the
model also accurately reproduces the USAF 1951 resolution test chart obtained
through diamonds of various thicknesses. Based on these investigations, we
quantitatively assess the consequent resolution constraints and propose
thinning the diamond as a viable solution. We present a robust method to
quantitatively ascertain resolution in optical systems influenced by
aberrations caused by ray transmission through diamonds. For instance, for a
typical microscope with an objective lens of NA = 0.7, the diffraction limit is
achievable through diamonds that are 30 {\mu}m thick, and a resolution of 1
{\mu}m is obtained through diamonds that are 100 {\mu}m thick. Those results
opens up avenues for enhanced performance in QDM.
