Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • bob bob
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • bobbob
  • bobbob
  • Issues
  • #110
Closed
Open
Issue created Feb 18, 2013 by André Anjos@andre.anjos💬Owner

IP bug for rgb_to_hsl: returns NaNs

Created by: csmccool

The floating point implementations of "rgb_to_hsl" return NaNs if you pass an RGB array of ones (1.,1.,1.), however, the integer based methods don't seem to have this issue. Below are some examples of the problem using the python interface:

import bob;
import scipy;

bob.ip.rgb_to_hsl(scipy.array([[[1.]],[[1.]],[[1.]]]))   # Using a scipy array or numpy array

RETURNS

array([[[ nan]],

       [[ nan]],

       [[  1.]]])

While

bob.ip.rgb_to_hsl_f(1.,1.,1.)

RETURNS

(nan, nan, 1.0)

The integer based methods seem to be ok as can be seen below:

bob.ip.rgb_to_hsl_u8(255,255,255)
RETURNS
(0, 0, 255)

bob.ip.rgb_to_hsl_u16(65535,65535,65535)
RETURNS
(0, 0, 65535)

Cheers, Chris.

Assignee
Assign to
Time tracking