#include "HxImageRep.h"
Go to the source code of this file.
Functions | |
| HxImageRep L_HXIMAGEREP | HxMakeGaussian1d (double sigma, int deri, double acc, int maxfsize, int fsize=-1) |
| Generate a kernel image resembling a Gaussian. More... | |
|
||||||||||||||||||||||||
|
Generate a kernel image resembling a Gaussian.
00015 {
00016 HxString fname("HxMakeGaussian1d");
00017
00018 if (sigma <= 0)
00019 {
00020 HxGlobalError::instance()->reportError(fname, "Illegal value of sigma", HxGlobalError::HX_GE_INVALID);
00021 return HxImageRep();
00022 }
00023 if (deri < 0)
00024 {
00025 HxGlobalError::instance()->reportError(fname, "Illegal value of deri", HxGlobalError::HX_GE_INVALID);
00026 return HxImageRep();
00027 }
00028 if (acc < 0)
00029 {
00030 HxGlobalError::instance()->reportError(fname, "Illegal value of acc", HxGlobalError::HX_GE_INVALID);
00031 return HxImageRep();
00032 }
00033 if (maxfsize < 1)
00034 {
00035 HxGlobalError::instance()->reportError(fname, "Illegal value of maxfsize (>=1)", HxGlobalError::HX_GE_INVALID);
00036 return HxImageRep();
00037 }
00038
00039 HxTagList tags;
00040
00041 HxAddTag(tags, "sigma", sigma);
00042 HxAddTag(tags, "derivative", deri);
00043 HxAddTag(tags, "accuracy", acc);
00044 HxAddTag(tags, "size", fsize);
00045 HxAddTag(tags, "maxSize", maxfsize);
00046
00047 return HxImageFactory::instance().fromNamedGenerator(
00048 HXIMAGESIG2DDOUBLE, "gauss1d", tags);
00049 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001