Color images
The case of RGB images
get three sets of equations, one per color channel:
Simple solution:  first solve for N using one channel
Then substitute known N into above equations to get kd s: