Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

opencv, being a c++ library, is far more pesky about datatypes, than your usual python code, so when in doubt, you have to CHECK !

see:

>>> pts = [*map(ast.literal_eval, t.split(';'))]
>>> pts = np.array(pts)
>>> pts.dtype
dtype('float64')     ## aaaaaaaaarghhh !

so, it needs a conversion !

>>> pts = np.array(pts, dtype=np.float32)
>>> pts.dtype
dtype('float32')