我有一个相机,它有自己的DLL库传递参数到相机,并采取图像。我试图通过python调用这个DLL库。我需要为原始图像数据制作一个指针,但我不太确定该怎么做。DLL有一个函数名,并将这些参数作为输入:
StTrg_TakeRawSnapShot(hCamera,pbyteraw,dwBufferSize,dwNumberOfByteTrans,dwFrameNo,dwMillisers)hCamera:
This parameter sets the camera control handle that obtains by StTrg_Open.
pbyteRaw:
This parameter sets pointer of the raw image.
dwBufferSize:
This parameter sets the buffer size.
pdwNumberOfByteTrans:
This parameter sets the pointer that obtains the total number of the bytes of the image.
pdwFrameNo:
This parameter sets the pointer that obtains the frame number of the image that counts in the camera.
This number can be use for the frame drop detection.
dwMilliseconds:
This parameter sets the timeout time (Unit is msecond).
正如相机文档中所述,pbyteraw是:“这个参数设置原始图像的指针”,这就是它们提供的所有细节。在
如何创建这个原始图像指针,然后将其读取到可以在python中使用的2D数组?相机是黑白的,所以我希望得到一个介于0到255之间的二维数组。在
^{pr2}$