back to iatexture

Function normgausker normalization

Synopse

The normgausker function performs a local normalization algorithm based on the Gaussian Kernel

  • g = *normgausker(f)
    • Output
      • g: output image
    • Input
      • f: ndarray: input image.

Description

The normgausker function performs a local normalization algorithm used to normalize the local mean and variance of the image estimated by a Gaussian Kernel using smoothing operators

Function Code

1. def normgausker(f):
2.     mu = f.mean()
3.     sigma = f.std()
4.     return 1.0*(f-mu)/sigma

Example

01. import ia636
02. from normgausker import normgausker
03. 
04. f = adreadgray('p/LesionMRI/EM/Iani Surian Batalini - 746587-5 - 32A/22.png')
05. roi = adreadgray('p/LesionMRI/EM/Iani Surian Batalini - 746587-5 - 32A/Peri_22_1.png')>0
06. adshow(f, 'original image')
07. print 'f.min,f.max()',f.min(),f.max()
08. 
09. result = normgausker(f)
10. adshow(ia636.ianormalize(result),'norm gaussian kernel result')
11. print 'result.min,result.max()',result.min(),result.max()
f.min,f.max() 1 254
result.min,result.max() -0.704345758699 6.58994984826

original image

norm gaussian kernel result