|
|
|
@ -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") |
|
|
|
image_cache_dir= os.path.join(image_result_dir,"cache") |
|
|
|
os.makedirs(image_cache_dir, exist_ok=True) |
|
|
|
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") |
|
|
|
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) |
|
|
|
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) |
|
|
|
output_result_image_path=correct_light_again_hsv(output_light_up_path) |
|
|
|
shutil.copy(output_result_image_path,output_path) |
|
|
|
shutil.copy(output_result_image_path,output_path) |
|
|
|
time.sleep(1) |
|
|
|
time.sleep(1) |
|
|
|
try: |
|
|
|
try: |
|
|
|
|
|
|
|
os.remove(shadow_up_path) |
|
|
|
os.remove(image_light_down_fix_up_path) |
|
|
|
os.remove(image_light_down_fix_up_path) |
|
|
|
os.remove(output_light_up_path) |
|
|
|
os.remove(output_light_up_path) |
|
|
|
os.remove(output_result_image_path) |
|
|
|
os.remove(output_result_image_path) |
|
|
|
@ -154,4 +158,3 @@ if __name__ == "__main__": |
|
|
|
""" |
|
|
|
""" |
|
|
|
1、暗部提亮->白色提纯(220)->高光压暗->二次亮度调整 |
|
|
|
1、暗部提亮->白色提纯(220)->高光压暗->二次亮度调整 |
|
|
|
""" |
|
|
|
""" |
|
|
|
|
|
|
|
|
|
|
|
|