Skip to content

Instantly share code, notes, and snippets.

@uploadcare-user
Created September 13, 2017 18:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save uploadcare-user/a1d0530e21c86064779137549eceec6c to your computer and use it in GitHub Desktop.
Optimizing normalization
k = &kk[xx * kmax];
for (x = (int) xmin; x < (int) xmax; x++) {
float w = filterp->filter((x - center + 0.5) * ss);
k[x - (int) xmin] = w;
ww = ww + w;
}
for (x = (int) xmin; x < (int) xmax; x++) {
k[x - (int) xmin] /= ww;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment