Skip to content

Commit

Permalink
Fix histogram smoothing (was 5 times too strong)
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Sep 10, 2021
1 parent 763cbb6 commit 157cf66
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- Python: `app.saveProject` and `app.saveProjectAs` now do project variable substitution, as in `app.saveProjectAs("[Variable]/output.ntp")`.
- Fix ASCII curve import. #656
- New color selection dialog for RGB and RGBA knobs. #210
- Fix histogram smoothing (was 5 times too strong).

### Plugins

Expand Down
6 changes: 1 addition & 5 deletions Engine/Smooth1D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,11 @@ NATRON_NAMESPACE_ANONYMOUS_EXIT
namespace Smooth1D {


void iir_gaussianFilter1D(std::vector<float>& curve, int smoothingKernelSize)
void iir_gaussianFilter1D(std::vector<float>& curve, double sigma)
{
if (curve.size() < 3) {
return;
}
double sigma = 5.;
if (smoothingKernelSize > 1) {
sigma *= smoothingKernelSize;
}

double filter[7];
// calculate filter coefficients
Expand Down
2 changes: 1 addition & 1 deletion Engine/Smooth1D.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ NATRON_NAMESPACE_ENTER
namespace Smooth1D
{

void iir_gaussianFilter1D(std::vector<float>& curve, int smoothingKernelSize);
void iir_gaussianFilter1D(std::vector<float>& curve, double sigma);

void laplacian_1D(std::vector<float>& curve);

Expand Down

0 comments on commit 157cf66

Please sign in to comment.