add toggle button for blueish cam fix (Force OpenCV2 BGR2RGB)

This commit is contained in:
underlines
2024-08-30 22:02:23 +02:00
parent 79c6615a68
commit c91ab8bbd2
5 changed files with 24 additions and 8 deletions

View File

@@ -49,8 +49,10 @@ def swap_face(source_face: Face, target_face: Face, temp_frame: Frame) -> Frame:
def process_frame(source_face: Face, temp_frame: Frame) -> Frame:
# Ensure the frame is in RGB format
temp_frame = cv2.cvtColor(temp_frame, cv2.COLOR_BGR2RGB)
# Ensure the frame is in RGB format if color correction is enabled
if modules.globals.color_correction:
temp_frame = cv2.cvtColor(temp_frame, cv2.COLOR_BGR2RGB)
if modules.globals.many_faces:
many_faces = get_many_faces(temp_frame)
if many_faces: