The present invention discloses an optical system for detecting a sample include a light source, one beam shaper, at least one lens, an image detecting module wherein the light source, one beam shaper, at least one lens are sequentially configured along a light path, wherein one beam shaper moves the focus along the light path back and forth so the light focused on the sample by the light source through one lens is focused onto different depths inside the sample, wherein the light source and the sample are placed at both sides of at least one lens. The image detection module is configured on a light path, and the sample is placed between at least one lens and the image detection module to capture images of different depths inside the sample. |