You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by gi...@git.apache.org on 2017/09/06 01:56:21 UTC

[GitHub] bignamehyp opened a new pull request #7756: The order of hue composed transformation

bignamehyp opened a new pull request #7756: The order of hue composed transformation
URL: https://github.com/apache/incubator-mxnet/pull/7756
 
 
   was incorrect. 
   According to https://beesbuzz.biz/code/hsv_color_transforms.php
   The final composed transform should be T_hsv  = T_rgb * T_H * T_S *  T_V * T_YIQ
   translating to
           t = np.dot(np.dot(self.ityiq, bt), self.tyiq).T
   
   With this correction, you can also change hue and saturation at the same time as  in https://beesbuzz.biz/code/hsv_color_transforms.php. 
   For example:
           su = alpha_s * np.cos(alpha_h * np.pi)
           sw = alpha_s * np.sin(alpha_h * np.pi)
           bt = np.array([[alpha_v, 0.0, 0.0],
                          [0.0, su, -sw],
                          [0.0, sw, su]])
           t = np.dot(np.dot(self.ityiq, bt), self.tyiq).T
           src = nd.dot(src, nd.array(t))
           return src
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services