mirror of
https://github.com/Zeyi-Lin/HivisionIDPhotos.git
synced 2026-08-28 11:20:47 +08:00
fix:package
This commit is contained in:
@@ -1 +1,4 @@
|
||||
from .creator import IDCreator, Params as IDParams, Result as IDResult
|
||||
|
||||
|
||||
__all__ = ["IDCreator", "IDParams", "IDResult", "utils", "error"]
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
r"""
|
||||
@DATE: 2024/9/5 21:52
|
||||
@File: utils.py
|
||||
@IDE: pycharm
|
||||
@Description:
|
||||
hivision提供的工具函数
|
||||
"""
|
||||
from PIL import Image
|
||||
import io
|
||||
import numpy as np
|
||||
@@ -18,5 +18,5 @@ output_dir = os.path.join(now_dir, "temp")
|
||||
image = cv2.imread(image_path)
|
||||
creator = IDCreator()
|
||||
result = creator(image)
|
||||
cv2.imwrite(os.path.join(output_dir, "result.jpg"), result.standard)
|
||||
cv2.imwrite(os.path.join(output_dir, "result_hd.jpg"), result.hd)
|
||||
cv2.imwrite(os.path.join(output_dir, "result.png"), result.standard)
|
||||
cv2.imwrite(os.path.join(output_dir, "result_hd.png"), result.hd)
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
r"""
|
||||
@DATE: 2024/9/5 21:33
|
||||
@File: __init__.py
|
||||
@IDE: pycharm
|
||||
@Description:
|
||||
与核心无关的工具函数
|
||||
"""
|
||||
from .image_utils import *
|
||||
Reference in New Issue
Block a user