Changeset View
Changeset View
Standalone View
Standalone View
imagelib/effects/kpEffectBlurSharpen.cpp
Show First 20 Lines • Show All 117 Lines • ▼ Show 20 Line(s) | 93 | { | |||
---|---|---|---|---|---|
118 | 118 | | |||
119 | const double RepeatMin = 1; | 119 | const double RepeatMin = 1; | ||
120 | const double RepeatMax = 2; | 120 | const double RepeatMax = 2; | ||
121 | const double repeat = qRound (RepeatMin + | 121 | const double repeat = qRound (RepeatMin + | ||
122 | (strength - 1) * | 122 | (strength - 1) * | ||
123 | (RepeatMax - RepeatMin) / | 123 | (RepeatMax - RepeatMin) / | ||
124 | (kpEffectBlurSharpen::MaxStrength - 1)); | 124 | (kpEffectBlurSharpen::MaxStrength - 1)); | ||
125 | 125 | | |||
126 | // I guess these values are more proper as they use an auto-calculated | | |||
127 | // radius but they cause sharpen() to be too slow. | | |||
128 | #if 0 | | |||
129 | const double radius = 0/*auto-calculate*/; | | |||
130 | | ||||
131 | const double SigmaMin = 0.6; | | |||
132 | const double SigmaMax = 1.0; | | |||
133 | const double sigma = SigmaMin + | | |||
134 | (strength - 1) * | | |||
135 | (SigmaMax - SigmaMin) / | | |||
136 | (kpEffectBlurSharpen::MaxStrength - 1); | | |||
137 | | ||||
138 | const double RepeatMin = 1; | | |||
139 | const double RepeatMax = 3; | | |||
140 | const double repeat = qRound (RepeatMin + | | |||
141 | (strength - 1) * | | |||
142 | (RepeatMax - RepeatMin) / | | |||
143 | (kpEffectBlurSharpen::MaxStrength - 1)); | | |||
144 | #endif | | |||
145 | 126 | | |||
146 | #if DEBUG_KP_EFFECT_BLUR_SHARPEN | 127 | #if DEBUG_KP_EFFECT_BLUR_SHARPEN | ||
147 | qCDebug(kpLogImagelib) << "kpEffectBlurSharpen.cpp:SharpenQImage(strength=" << strength << ")" | 128 | qCDebug(kpLogImagelib) << "kpEffectBlurSharpen.cpp:SharpenQImage(strength=" << strength << ")" | ||
148 | << " radius=" << radius | 129 | << " radius=" << radius | ||
149 | << " sigma=" << sigma | 130 | << " sigma=" << sigma | ||
150 | << " repeat=" << repeat | 131 | << " repeat=" << repeat | ||
151 | << endl; | 132 | << endl; | ||
152 | #endif | 133 | #endif | ||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |