A camera with a 2-dimentional grid of sensors is currently the gold standard for conventional imaging. However, the obtained images using typical 2-dimentional sensors cannot provide depth information for extracting information from different axial regions from the original 3- dimentional field without additional post-processing. Depth selective photography will enable true 3-dimensional imaging of the world around us. Here, we describe an imaging system that utilizes a single pixel detector combined with structured light illumination to obtain depth resolved images in variable circumstances [1]. We utilize a double-pass geometry using a single digital micro-mirror device (DMD) to eliminate the out-of-focus background, in which addressable micro-mirrors on the DMD function as dynamic pinholes for spatial gating [2]. Specifically designed patterns allow the single pixel detector to integrate the signal emitted from the entire field of view. Since the bucket detector has inherently higher total yield than 2-dimentional sensor, it can produce higher signal-to-noise (SNR) ratio by approximately √𝑁 fold, where N is the total number of pixels constituting image, even in the case where object is surrounded by rather dense media. Our results demonstrate tunable selectivity in choosing the axial volume range to be measured and how the depth selectivity can be used to image beyond opaque layers.