Skip to content

Instantly share code, notes, and snippets.

View mhusme's full-sized avatar
🎯
Focusing

Mehedi H. mhusme

🎯
Focusing
View GitHub Profile
@mhusme
mhusme / gaussFilter1d.java
Created September 13, 2022 13:57 — forked from anastasiia-kornilova/gaussFilter1d.java
This is the simplest implementation of gaussian_filter1d from Python scipy library.
import static java.lang.Math.*;
public class GaussSmooth {
private static double gauss(double sigma, double x) {
double expVal = -0.5 * (pow(x, 2) / pow(sigma, 2));
return exp(expVal);
}
private static double[] gaussKernel1d(double sigma, int lw) {