Unnamed
public text v1 · immutabletemplate <typename T> T* Matrix<T>::GetGaussianMask(int* size, float sigma) {
T *mask = new T[size[0]*size[1]];
for(int y = -1* (size[1]/2) ; y <= size[1] / 2; y++) {
for(int x = -1 * (size[0] / 2); x <= size[0] / 2; x++) {
mask[] = ( (1 / sigma * sqrt(2 * PI)) * exp(- (x*x + y*y) / 2*sigma*sigma) );
}
}
return mask;
}