The rapid, high-resolution material processing offered by ultrashort pulsed lasers enables a wide range of micro and nanomachining applications in a variety of disciplines. Complex laser processing jobs conducted on composite samples, require an awareness of the material type that is interacting with laser both for adjustment of the lasering process and for endpointing. This calls for real-time detection of the materials. Several methods such as X-ray diffraction (XRD), X-ray photoelectron spectroscopy (XPS), and energy dispersive X-Ray spectroscopy (EDS) can be used for material characterization. However, these methods often need interruption of the machining process to transfer the sample to another instrument for inspection. Such interruption significantly increases the required time and effort for the machining task, acting as a prohibitive factor for many laser machining applications. Laser induced breakdown spectroscopy (LIBS) is a powerful technique that can be used for material characterization, by analyzing a signal that is generated upon the interaction of laser with matter, and thus, it can be considered as a strong candidate for developing an in-situ characterization method. In this work, we propose a method that uses LIBS in a feedback loop system for real time detection and decision making for adjustment of the lasering process on-the-fly. Further, use of LIBS for automated material segmentation, in the 3D image resulting from consecutive lasering and imaging steps, is showcased.