Quantitative in vivo measurement helps physicians determine abnormal tissue size or resection margin accurately. Herein, in vivo 3D imaging of abnormal features during endoscopic operation using a light switching microprojector is reported. The microprojector features rotational offset microlens arrays and a customized illumination fiber bundle fully integrated through a single illumination channel of a clinical endoscope. The illumination channel switches white light into structured laser patterns on demand. The 3D profiles are precisely extracted by calculating the distortion of uniform structured patterns on a target surface. The 3D endoscope allows the precise measurement of the size and volume of polyp phantoms within 7.70% and 13.33% errors, respectively. The experimental results show the accurate measurements of abnormal ex vivo human abnormal tissue and in vivo volume changes in the inflated stomach wall of an anesthetized pig. The microprojector can provide a new opportunity for in vivo 3D endoscopic imaging and biometric applications.