I finished my first try using OpenVC and doing camera movement detection.
If you wanna look at the python-script code, it is in the blend-file to generate the chessboard-pattern pictures in this posting:
The python-OpenCV-script is not for running inside blender. It has to saved locally and run. I think as soon you use OpenCV-lib you can get in trouble when using the highgui-part. That is the part for GUI in/output.
Besides this a simple script can run inside blender, for example something like this:
creates a simple matrix, like used for the distortion camera params in OpenCV camera calibration functions.
# test for opencv
from opencv.cv import *
distortion = cvCreateMat(5,1,CV_32FC1)
i = 0
for l in (-0.1, 0.19, 0.0, -0.004, -0.7):
cvmSet(dist, 0, i, l)
i += 1
But take care if using more of the memory special OpenCV routines. OpenCV comes with a whole bunch of own memory, math, GUI routines.