Skip to content

calcPixelTemp will sometimes divide by zero #5

Open

Description

@raimondi1337

Line 79:
n=((0.23881) * R+(0.25499) * G+(-0.58291) * B) / ((0.11109) * R+(-0.85406) * G+(0.52289) * B)

'((0.11109) * R+(-0.85406) * G+(0.52289) * B)' will sometimes evaluate to zero. An exeption has to be made. The math is very abstract, but I suspect it happens when an attempt is made to calculate the temperature of a pure black pixel.

From: http://dsp.stackexchange.com/questions/8949/how-do-i-calculate-the-color-temperature-of-the-light-source-illuminating-an-ima

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions