Spaces:
Running
Running
File size: 759 Bytes
14df793 1c3792f |
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 26 |
import os
from ctypes import *
libPath = os.path.abspath(os.path.dirname(__file__)) + '/libalpr.so'
alprsdk = cdll.LoadLibrary(libPath)
getMachineCode = alprsdk.getMachineCode
getMachineCode.argtypes = []
getMachineCode.restype = c_char_p
setActivation = alprsdk.setActivation
setActivation.argtypes = [c_char_p]
setActivation.restype = c_int32
initSDK = alprsdk.initSDK
initSDK.argtypes = []
initSDK.restype = c_int32
getLicensePlate = alprsdk.get_license_using_bytes
getLicensePlate.argtypes = [c_char_p, c_ulong, POINTER(POINTER(c_char_p)), POINTER(c_int), POINTER(c_float)]
getLicensePlate.restype = c_int32
freeLicenseResults = alprsdk.free_license_results
freeLicenseResults.argtypes = [POINTER(c_char_p), c_int]
freeLicenseResults.restype = None |