1. An apparatus comprising: a light emitter configured to emit a structured light pattern modulated by a carrier signal, wherein an intensity of the modulated structured light pattern varies over time based on the carrier signal; a detector configured to capture a portion of the modulated structured light pattern, the detector comprising a plurality of pixel groups, each pixel group configured to capture light at different times than other pixel groups; and a processor configured to: determine a phase of the carrier signal based on intensities of light received by different pixel groups in the detector, determine a time for the portion of the modulated pattern of structured light to be reflected from one or more objects in a local area and captured by the detector based on the determined phase of the carrier signal, and determine a distance from the detector to the one or more objects in the local area from the determined time.