v3
This commit is contained in:
1 parent
62bfe609d0
commit
5a95811433
2 files changed
+8
-5
No files matched your search
@@ -3,7 +3,7 @@ import os, oss2, time, redis, requests, shutil, sys, subprocess, json, platform
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
from retrying import retry
|
||||
import atexit,platform
|
||||
import white_purification_v2,white_purification
|
||||
import white_purification_v3,white_purification
|
||||
if platform.system() == 'Windows':
|
||||
sys.path.append('e:\\libs\\')
|
||||
import common
|
||||
@@ -152,7 +152,7 @@ def team_check(r):
|
||||
imagePath = os.path.join(workdir, 'print', pid,pid+"Tex1.jpg")
|
||||
print("开始处理白色提纯")
|
||||
#white_purification.white_purification_utils(imagePath)
|
||||
os.system(f'python D:\\make2\\apps\white_purification_v2.py -i {imagePath}')
|
||||
os.system(f'python D:\\make2\\apps\white_purification_v3.py -i {imagePath}')
|
||||
|
||||
print("贴图文件白色提纯完成",imagePath)
|
||||
#提纯完重新上传提纯图片
|
||||
|
||||
@@ -124,13 +124,17 @@ def correct_texture_image(input_path,image_result_dir,output_path):
|
||||
}
|
||||
image_cache_dir= os.path.join(image_result_dir,"cache")
|
||||
os.makedirs(image_cache_dir, exist_ok=True)
|
||||
image_light_down_fix_up_path = remove_gray_and_sharpening(input_path, image_cache_dir)
|
||||
out_put_path = os.path.join(image_cache_dir, image_name)
|
||||
shadow_up_path = out_put_path.replace(".jpg", "_shadow_up.jpg")
|
||||
photoshop_actions_emulation(input_path, shadow_up_path)
|
||||
image_light_down_fix_up_path = remove_gray_and_sharpening(shadow_up_path, image_cache_dir)
|
||||
output_light_up_path = image_light_down_fix_up_path.replace(".jpg", "_light_down.jpg")
|
||||
process_image(image_light_down_fix_up_path, output_light_up_path, **params)
|
||||
output_result_image_path=correct_light_again_hsv(output_light_up_path)
|
||||
shutil.copy(output_result_image_path,output_path)
|
||||
time.sleep(1)
|
||||
try:
|
||||
os.remove(shadow_up_path)
|
||||
os.remove(image_light_down_fix_up_path)
|
||||
os.remove(output_light_up_path)
|
||||
os.remove(output_result_image_path)
|
||||
@@ -153,5 +157,4 @@ if __name__ == "__main__":
|
||||
print(f"处理成功,耗时 {total_time} 秒,")
|
||||
"""
|
||||
1、暗部提亮->白色提纯(220)->高光压暗->二次亮度调整
|
||||
"""
|
||||
|
||||
"""
|
||||
Reference in new issue
Block a user