Skip to content

Instantly share code, notes, and snippets.

@santiagopuerta
Created December 28, 2012 00:50
Show Gist options
  • Save santiagopuerta/4393542 to your computer and use it in GitHub Desktop.
Save santiagopuerta/4393542 to your computer and use it in GitHub Desktop.
for(int i=0; i<fil; i+=reduccion){
for(int j=0; j<col; j+=reduccion){
med = valor_pixel(i,j);
for(int f=i; f<i+reduccion; f++){
for(int c=j; c<j+reduccion; c++){
med = med+valor_pixel(f,c);
}
}
med=med/reduccion;
if(cont2!=col){
i2.asigna_pixel(cont1,cont2,med);
cont2++;
med=0;
}else{
cont2=0;
cont1++;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment