Project

General

Profile

Bug #12148

Highpass → 5-6% sharpness

Added by Timur Davletshin 4 months ago. Updated 3 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
04/21/2018
Due date:
% Done:

0%

Affected Version:
2.4.2
System:
other GNU/Linux
bitness:
64-bit
hardware architecture:
amd64/x86

Description

Steps to reproduce:

1. Enable 'highpass' module
2. Change sharpness to 6% contrast boost leave at 50%
3. Change sharpness to 5%

Sharpness disappears at all, gradual change is expected.

highpass6.png - 6% sharpness (562 KB) Timur Davletshin, 04/21/2018 04:29 PM

highpass5.png - 5% sharpness (57.8 KB) Timur Davletshin, 04/21/2018 04:29 PM

History

#1 Updated by Roel Baars 3 months ago

There seems to be some (unneccesary?) convoluted way to set the sigma of the filter.

int rad = MAX_RADIUS * (fmin(100.0f, d->sharpness + 1) / 100.0f);  
const int radius = MIN(MAX_RADIUS, ceilf(rad * roi_in->scale / piece->iscale));

/* sigma-radius correlation to match opencl vs. non-opencl. identified by numerical experiments but
* unproven. ask me if you need details. ulrich */
const float sigma = sqrt((radius * (radius + 1) * BOX_ITERATIONS + 2) / 3.0f);

Suggestion: set sigma directly through the d->sharpness setting. Values seem to be between 1 and 25, so possibly:

const float sigma = d->sharpness / 4.0f + 1.0f;

This will solve the issue entirely (but of course breaks backward compatibility of the module)

Also available in: Atom PDF