If you're looking for efficiency, you may consider using the OpenMaya
packages to access the OpenGL context for the views and render a Viewport 2.0 view to texture. Then access that texture programmatically.
Alternatively, you could write a plugin that wraps another rendering plugin, like Mayatomr, or the Hardware 2.0 renderer, and puts the rendered image into some shared memory space.
But these solutions are so incredibly involved, touching on so many undocumented features. You should probably just set the renderer to Hardware 2.0, save the image as a BMP (which OpenCV reads very quickly anyway), perhaps to a RAM disk like suggested above, and call it a day.
Amendment
There is an easier way, perhaps. Create a custom node that implements MPxHardwareShader
specifications described here:
http://images.autodesk.com/adsk/files/viewport_2_0_api_gold.pdf
In other words, override the Hardware / Viewport 2.0 rendering for a some node. Instead of actually drawing something, use your access to the OpenGL context to render the viewport to texture.
http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-14-render-to-texture/
Then do whatever you want with it. Clever, eh?