Yes,
Look at TextureRenderTarget2D, and SceneCapture2D components.
Also, I recommend doing it not entirely in C++ but use Blueprints to ease setting up the SceneCaptture and TextureTargets, then work with the texture in C++ to process the pixels.
There are other threads regarding setting up the Blueprint, but the example to look at is the Security camera.