早上好
我正在尝试使用以下功能加载相机配置文件(.ini):
pParam="config.ini"
ueye.is_ParameterSet(hCam, ueye.IS_PARAMETERSET_CMD_LOAD_FILE, pParam, 0)
但是我得到这个错误:
File "E:/Proyectos/PruebaIDS/FreerunMode.py", line 55, in <module> ueye.is_ParameterSet(hCam, ueye.IS_PARAMETERSET_CMD_LOAD_FILE, pParam, 0)
File "E:\Proyectos\PruebaIDS\venv\lib\site-packages\pyueye\ueye.py", line 8271, in is_ParameterSet _pParam = _pointer_cast(pParam, ctypes.c_void_p)
File "E:\Proyectos\PruebaIDS\venv\lib\site-packages\pyueye\ueye.py", line 102, in _pointer_cast _to_obj = ctypes.cast(ctypes.pointer(from_obj), to_type) TypeError: _type_ must have storage info
我要向函数传递正确的参数吗?
答案 0 :(得分:0)
此函数需要一个wchar_t *,因此您必须首先创建它的python对象,然后设置其值。这是方法:
pParam = ueye.wchar_p()
pParam.value = "config.ini"
ueye.is_ParameterSet(hCam, ueye.IS_PARAMETERSET_CMD_LOAD_FILE, pParam, 0)