No BSD License
by Thomas Dideriksen
09 Jan 2006
(Updated 09 Jan 2006)
Generates a customized 2D gauss
Watch this File
Create a custom 2D gauss, which can be used for filtering, weighting, etc. All parameters are customizable, including standard deviations (sigmaX, sigmaY), rotation (theta), result size, center, etc.
The second function should be changed into this:
function val = rotgauss(y, x, theta, sigmax, sigmay, offset, factor, center)
x and y is flipped in the original code
Nice job Thomas, though it seems like you've switched sigmax and sigmay - comments?
Duane Hanselman: The nested loops are not necessary - use [rows,cols] = meshgrid(1:gsize(1),1:gsize(2)); and modify the remaining code to avoid them...
Great, very flexible, just what we want to have. THX
No big deal, Just works!
THX a lot for sharing!
Might be worthwhile, but help text is not helpful. No error checking is done. Are nested For loops required?