hassan526 commited on
Commit
9028cd5
·
1 Parent(s): 0870d2e

Delete id_ocr/engine

Browse files
Files changed (1) hide show
  1. id_ocr/engine/header.py +0 -47
id_ocr/engine/header.py DELETED
@@ -1,47 +0,0 @@
1
- import os
2
- import sys
3
- import numpy as np
4
- import ctypes, ctypes.util
5
- from enum import Enum
6
- from ctypes import *
7
- from numpy.ctypeslib import ndpointer
8
-
9
- def print_log(fmt): print("[LOG] \033[98m{}\033[00m" .format(fmt))
10
- def print_info(fmt): print("[INFO] \033[92m{}\033[00m" .format(fmt))
11
- def print_error(fmt): print("[ERR] \033[91m{}\033[00m" .format(fmt))
12
- def print_warning(fmt): print("[WARNING] \033[93m{}\033[00m" .format(fmt))
13
-
14
-
15
- ocr_path = os.path.abspath(os.path.dirname(__file__)) + '/libOCR.so'
16
- ocr_engine = cdll.LoadLibrary(ocr_path)
17
-
18
- get_deviceid = ocr_engine.TTVOcrGetHWID
19
- get_deviceid.argtypes = []
20
- get_deviceid.restype = ctypes.c_char_p
21
-
22
- set_activation = ocr_engine.TTVOcrSetActivation
23
- set_activation.argtypes = []
24
- set_activation.restype = ctypes.c_char_p
25
-
26
- init_sdk = ocr_engine.TTVOcrInit
27
- init_sdk.argtypes = [ctypes.c_char_p]
28
- init_sdk.restype = ctypes.c_char_p
29
-
30
- ocr_id_card = ocr_engine.TTVOcrProcess
31
- ocr_id_card.argtypes = [ctypes.c_char_p, ctypes.c_char_p]
32
- ocr_id_card.restype = ctypes.c_char_p
33
-
34
- ocr_credit_card = ocr_engine.TTVOcrCreditCard
35
- ocr_credit_card.argtypes = [ctypes.c_char_p]
36
- ocr_credit_card.restype = ctypes.c_char_p
37
-
38
- ocr_barcode = ocr_engine.TTVOcrBarCode
39
- ocr_barcode.argtypes = [ctypes.c_char_p]
40
- ocr_barcode.restype = ctypes.c_char_p
41
-
42
- metacheck_path = os.path.abspath(os.path.dirname(__file__)) + '/libMetaChecker.so'
43
- meta_engine = cdll.LoadLibrary(metacheck_path)
44
-
45
- check_meta = meta_engine.ttv_if_checker
46
- check_meta.argtypes = [ctypes.c_char_p]
47
- check_meta.restype = ctypes.c_int32