An apparatus comprising: an illumination source comprising: a controller coupled to a light emitter, the controller configured to modulate light emitted by the light emitter by a carrier signal so an intensity of the light pattern varies over time based on the carrier signal, and the light emitter configured to emit a structured light pattern modulated by the carrier signal; an imaging device configured to capture the modulated structured light pattern, characterized by the imaging device including a detector comprising: a plurality of pixel groups each including one or more pixels, each pixel group configured to receive a control signal determining when a pixel group captures light, the control signal causing pixel groups to capture light at different times relative to other pixel groups ; and a processor coupled to the imaging device , the 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 modulated pattern of structured light to be reflected from one or more objects in the local area and captured by the detector based on the determined phase of the carrier signal, determine distances from the detector to one or more objects in the local area from the determined times, and generate a frame including the pattern of structured light from the light captured by each pixel group in the detector at different times. a controller coupled to a light emitter, the controller configured to modulate light emitted by the light emitter by a carrier signal so an intensity of the light pattern varies over time based on the carrier signal, and the light emitter configured to emit a structured light pattern modulated by the carrier signal; an imaging device configured to capture the modulated structured light pattern, characterized by the imaging device including a detector comprising: a plurality of pixel groups each including one or more pixels, each pixel group configured to receive a control signal determining when a pixel group captures light, the control signal causing pixel groups to capture light at different times relative to other pixel groups ; and a processor coupled to the imaging device , the 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 modulated pattern of structured light to be reflected from one or more objects in the local area and captured by the detector based on the determined phase of the carrier signal, determine distances from the detector to one or more objects in the local area from the determined times, and generate a frame including the pattern of structured light from the light captured by each pixel group in the detector at different times. a plurality of pixel groups each including one or more pixels, each pixel group configured to receive a control signal determining when a pixel group captures light, the control signal causing pixel groups to capture light at different times relative to other pixel groups ; and a processor coupled to the imaging device , the 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 modulated pattern of structured light to be reflected from one or more objects in the local area and captured by the detector based on the determined phase of the carrier signal, determine distances from the detector to one or more objects in the local area from the determined times, and generate a frame including the pattern of structured light from the light captured by each pixel group in the detector at different times. <EOS>