Files
45uee-ComfyUI-Color_Transfer/utils.py
T
2025-02-11 20:21:16 +02:00

10 lines
267 B
Python

import numpy as np
def EuclideanDistance(detected_colors, target_colors):
return np.linalg.norm(detected_colors - target_colors, axis=1)
def ManhattanDistance(detected_colors, target_colors):
return np.sum(np.abs(detected_colors - target_colors), axis=1)