From 7554fb0460a0b07f50506020f2a415d4ff0ebe2b Mon Sep 17 00:00:00 2001 From: Fictiverse <111762798+Fictiverse@users.noreply.github.com> Date: Sun, 29 Oct 2023 21:30:33 +0100 Subject: [PATCH] Add files via upload --- nodes/FV_ColorCorrection.py | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/nodes/FV_ColorCorrection.py b/nodes/FV_ColorCorrection.py index f47dfca..1133d10 100644 --- a/nodes/FV_ColorCorrection.py +++ b/nodes/FV_ColorCorrection.py @@ -11,19 +11,18 @@ class ColorCorrection: pass @classmethod - def INPUT_TYPES(s): + def INPUT_TYPES(cls): # Use cls instead of s return { "required": { "image": ("IMAGE",), "original_image": ("IMAGE",), - }), }, } + RETURN_TYPES = ("IMAGE",) FUNCTION = "color_correction" CATEGORY = "Fictiverse" - def color_correction(self, image, original_image): correction_target = cv2.cvtColor(np.asarray(image), cv2.COLOR_RGB2LAB) corrected_image = cv2.cvtColor(exposure.match_histograms( @@ -31,18 +30,8 @@ class ColorCorrection: correction_target, channel_axis=2 ), cv2.COLOR_LAB2RGB).astype("uint8") - #inverted_image = self.invert_image(corrected_image) return (corrected_image,) - - #def invert_image(self, image): - # inverted_image = 1.0 - image - # return inverted_image - - -# A dictionary that contains all nodes you want to export with their names -# NOTE: names should be globally unique NODE_CLASS_MAPPINGS = { "Color correction": ColorCorrection -} - +} \ No newline at end of file