File size: 631 Bytes
148ad99 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
import os
from ctypes import *
from numpy.ctypeslib import ndpointer
libPath = os.path.abspath(os.path.dirname(__file__)) + '/lib/libidlivesdk.so'
libidlivesdk = cdll.LoadLibrary(libPath)
getHWID = libidlivesdk.getHWID
getHWID.argtypes = []
getHWID.restype = c_char_p
setLicenseKey = libidlivesdk.setLicenseKey
setLicenseKey.argtypes = [c_char_p]
setLicenseKey.restype = c_int32
initSDK = libidlivesdk.initSDK
initSDK.argtypes = [c_char_p]
initSDK.restype = c_int32
processImage = libidlivesdk.processImage
processImage.argtypes = [ndpointer(c_ubyte, flags='C_CONTIGUOUS'), c_int32, c_int32]
processImage.restype = c_char_p
|