I am using uv4l with raspi-disp driver to take a "screenshot" of what is displaying, with OpenCv in C++ project.
This is uv4l command that I use: