unibas-gravis / scalismo-faces

Scalable Image Analysis and Shape Modelling: Module to work with 2d images, with a focus on face images
Apache License 2.0
118 stars 27 forks source link

bugFix: sanitizing hue values when converting HSV to RGB #123

Closed Ghazi-Bouabene closed 5 years ago

Ghazi-Bouabene commented 5 years ago

conversion from HSV to RGB expects hue values between 0 and 2 Pi. At a couple of places the output of atan2 is passed as hue. This can triggers an exception since atan2 can return negative values.

If accepted, I suggest this should be released as a hot-fix v0.10.2

BernhardEgger commented 5 years ago

Looks good to me. Might it make sense to add the fix to HSV instead?