Skip to content

Commit

Permalink
fix R/B channel switch in skin tone calculation (#2589)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Marble <[email protected]>
  • Loading branch information
rbitr and Andrew Marble authored Nov 21, 2024
1 parent a512f00 commit 83e45f3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ def skin_pixel_from_image(image_path: str) -> List:
and (Cr <= ((-2.2857 * Cb) + 432.85))
):

blue.append(img_rgba[i, j].item(0))
blue.append(img_rgba[i, j].item(2))
green.append(img_rgba[i, j].item(1))
red.append(img_rgba[i, j].item(2))
red.append(img_rgba[i, j].item(0))
else:
img_rgba[i, j] = [0, 0, 0, 0]

Expand Down

0 comments on commit 83e45f3

Please sign in to comment.