#include "HxImageRep.h"
Go to the source code of this file.
Functions | |
HxImageRep L_HXIMAGEREP | HxGaussianDeblur (HxImageRep im, double dr=0.5, double dc=0.5) |
To reduce the variance of the Gausian blur by dr in the row direction and by dc in in the column direction, apply the mask 0 -0.5dr 0 -0.5dc 1+dr+dc -0.5dc 0 -0.5dr 0. More... |
|
To reduce the variance of the Gausian blur by dr in the row direction and by dc in in the column direction, apply the mask 0 -0.5dr 0 -0.5dc 1+dr+dc -0.5dc 0 -0.5dr 0. Reference: John Immerkær. "Use of Blur Space for Deblurring and Edge Preserving Noise Smoothing", in IEEE Transactions on Image Processing, 2000.
00015 { 00016 int pixelDimensionality=1; 00017 int dimensions=2; 00018 HxSizes sizes(3,3,1); 00019 double data[9]={ 0, -0.5*dr, 0, 00020 -0.5*dc,1+dr+dc, -0.5*dc, 00021 0, -0.5*dr, 0}; 00022 00023 HxImageRep kernel = HxMakeFromDoubleData( 00024 pixelDimensionality, 00025 dimensions, 00026 sizes, 00027 data); 00028 00029 return im.generalizedConvolution( 00030 kernel, "mul", "addAssign", HxImageRep::ARITH_PREC); 00031 } |