Created
February 27, 2012 17:23
-
-
Save sinc/1925626 to your computer and use it in GitHub Desktop.
Gradient
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ret_corners[num_corners].dIx = (p[pixel[4]] - p[pixel[12]]) + | |
(p[pixel[3]] + p[pixel[5]] - p[pixel[11]] - p[pixel[13]])*0.924f + | |
(p[pixel[2]] + p[pixel[6]] - p[pixel[10]] - p[pixel[14]])*0.707f + | |
((p[pixel[1]] + p[pixel[7]] - p[pixel[9]] - p[pixel[15]])*0.383f); | |
ret_corners[num_corners].dIy = (p[pixel[0]] - p[pixel[8]]) + | |
(p[pixel[1]] + p[pixel[15]] - p[pixel[7]] - p[pixel[9]])*0.924f + | |
(p[pixel[2]] + p[pixel[14]] - p[pixel[6]] - p[pixel[10]])*0.707f + | |
((p[pixel[3]] + p[pixel[13]] - p[pixel[5]] - p[pixel[11]])*0.383f); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment