hassan526 commited on
Commit
a3ee39c
·
verified ·
1 Parent(s): 9028cd5

Upload 10 files

Browse files
id_ocr/dependency/libimutils.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:260e9ecead1a8ef7598ee383c792bacc3dfeeca28f63a602e4e5f32210517bce
3
+ size 412424
id_ocr/dependency/libimutils.so_for_ubuntu22 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:41a366e1d555901c6a3207d9d0948c72f71f2f7c40d3d7a3f889e2fa2049f0fb
3
+ size 411600
id_ocr/dependency/libttvcore.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1334d5ca8b298b06d655cf2044174feb8c977d39950e21fbc2a7a19219363896
3
+ size 97975464
id_ocr/engine/bin/data1.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:38182bc12601153ae6c791fb73ddabc5ddb9bc841e3a622d2eec1346706c1658
3
+ size 190945284
id_ocr/engine/bin/data2.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f73ca54d3d76ac32ffaa3005a427d36372c1405931a176f3247af231519393d
3
+ size 15719219
id_ocr/engine/bin/data3.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c139b9935c79396a6be062c2fd4f3572f771a6c575ff4699c56d3777a91deba
3
+ size 197236740
id_ocr/engine/bin/data4.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18cd11b5750f9b5b3e94bba007d77f202fd089415904a8aaeddd293d7ab45b8f
3
+ size 133390117
id_ocr/engine/header.py ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
id_ocr/engine/libMetaChecker.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b75a53142c2dd58e2d50a5b97707b5dc525c215ae9732b36c827a3d898253a3c
3
+ size 1613856
id_ocr/engine/libOCR.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d4956b1149b67c5e6377653945d65b11437ef3f8a3974524d472223603c5ab9
3
+ size 1529136