MCPcopy Create free account
hub / github.com/SSARCandy/Coherent-Line-Drawing / MakeGaussianVector

Function MakeGaussianVector

src/CLD.cpp:13–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11}
12
13void MakeGaussianVector(double sigma, std::vector<double> &GAU)
14{
15 constexpr double threshold = 0.001;
16
17 int i = 0;
18 while (gauss(static_cast<double>(i), 0.0, sigma) >= threshold) {
19 ++i;
20 }
21 GAU.clear();
22 GAU.resize(i + 1);
23
24 GAU[0] = gauss(0.0, 0.0, sigma);
25 for (int j = 1; j < GAU.size(); ++j) {
26 GAU[j] = gauss(static_cast<double>(j), 0.0, sigma);
27 }
28}
29
30CLD::CLD()
31{

Callers 2

flowDoGMethod · 0.85
gradientDoGMethod · 0.85

Calls 1

gaussFunction · 0.85

Tested by

no test coverage detected