All pastes #921786 Raw Edit

Something

public text v1 · immutable
#921786 ·published 2008-02-28 09:37 UTC
rendered paste body
my gauss function:
void testApp::setGaussMatrix(float theta){
	float e = 2.71828182846f;
	
	
	for(int i = 0; i < 7; i++){
		for(int j = 0; j < 7; j++){
			int u = abs(i - 3);
			int v = abs(j - 3);
			float uSqrPlusvSqr = pow(u,2) + pow(v,2);
		    float exponent = (-1 * uSqrPlusvSqr)/ (2 * pow(theta,2) );
			
			gaussMatrix[i][j] = (1/ (2 * pi * (pow(theta,2) )) ) * pow(e, exponent); 
			
			
		}
	}

	

}


the equation I want to mimick:
http://en.wikipedia.org/wiki/Gaussian_blur