Expand|Select|Wrap|Line Numbers
- line = []
- cv.cvFitLine(img, cv.CV_DIST_L2, 0, 0.01, 0.01, line)
TypeError: in method 'cvFitLine', argument 6 of type 'float *'After googling around bit, I decided that ctypes would give me the array pointer that I needed, so I modified my code as follows:
Expand|Select|Wrap|Line Numbers
- FourFloats = ctypes.c_float * 4
- line = FourFloats()
- cv.cvFitLine(img, cv.CV_DIST_L2, 0, 0.01, 0.01, ctypes.byref(line))
Thanks...