template<class DstArrayT, class SrcArrayT>
Actual operation.
Definition at line 41 of file M9N4poFHS.h. References Impala::Core::Array::Element::E1Sqrt(), and Impala::Core::Array::Trait::M9N4poFHS< DstArrayT, SrcArrayT >::mC. 00045 { 00046 SrcArithT saturation = Element::E1Sqrt(2*(R*R + G*G + B*B - R*G - R*B - G*B)); 00047 00048 *FHx = (saturation == 0) ? 0 : (R*(Bx-Gx) + G*(Rx-Bx) + B*(Gx-Rx)) / saturation; 00049 *FHy = (saturation == 0) ? 0 : (R*(By-Gy) + G*(Ry-By) + B*(Gy-Ry)) / saturation; 00050 saturation *= mC; //because S divides by sqrt(3)*saturation 00051 *FSx = (saturation == 0) ? 0 : (R*(2.*Rx-Gx-Bx)+G*(2.*Gx-Rx-Bx)+B*(2.*Bx-Rx-Gx)) / saturation; 00052 *FSy = (saturation == 0) ? 0 : (R*(2.*Ry-Gy-By)+G*(2.*Gy-Ry-By)+B*(2.*By-Ry-Gy)) / saturation; 00053 }
Here is the call graph for this function:
|