Access color and depth buffer of each frame?

Hi guys

I am using UE4 engine to do a computer graphics research, and I need to access the color(RGB) buffer and depth buffer of each frame, in a FPS game

How could I do that? Do I need to modify source code, if so ,which class to modify?

Thanks!