Confocal microscopy offers enhanced image contrast and signal-to-noise ratio compared to wide-field illumination microscopy, achieved by effectively eliminating out-of-focus background noise. In our study, we initially showcase the functionality of a line-scanning confocal microscope aligned through the utilization of a Digital Light Projector (DLP) and a rolling shutter CMOS camera. In this technique, a sequence of illumination lines is projected onto a sample using a DLP and focusing objective (50X, NA=0.55). The reflected light is imaged with the camera. Line-scanning confocal imaging is accomplished by synchronizing the illumination lines with the rolling shutter of the sensor, leading to a substantial enhancement of approximately 50% in image contrast. Subsequently, this setup is employed to create a dataset comprising 500 pairs of images of paper tissue. This dataset is employed for training a Generative Adversarial Network (cGAN). Roughly 45% contrast improvement was measured in the test images for the trained network, in comparison to the ground-truth images.