* radius effects the level of details that will effected during sharpening * process amount value should be in the range [0,1] or [1,] note: value of 1.0 * for amount results unsharp masking values > 1.0 results in highboost filter * effect * */
| 43 | * effect |
| 44 | * */ |
| 45 | array usm(const array &in, float radius, float amount) { |
| 46 | int gKernelLen = 2 * radius + 1; |
| 47 | array blurKernel = gaussianKernel(gKernelLen, gKernelLen); |
| 48 | array blur = convolve(in, blurKernel); |
| 49 | return (in + amount * (in - blur)); |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * x,y - starting position of zoom |
no test coverage detected