An imaging device of an embodiment comprises an aperture that transmits imaging light applied to a sample, a detector including a linear sensor comprising a linear light receiving surface extending in a first direction, a first image forming element that collects components of the imaging light in the first direction and forms an image on the light receiving surface with a first wave front aberration amount, and a second image forming element that collects components of the imaging light in a second direction orthogonal to the first direction and forms an image on the light receiving surface with a second wave front aberration amount smaller than the first wave front aberration amount.