1
! @(#)necsegment.prg 19.1 (ES0-DMD) 02/25/03 14:19:43
3
define/param P1 {ORDREF} IMA "Input image:"
4
define/param P2 &i IMA "Output image:"
5
define/param P3 3.5 NUM "Kappa factor:"
7
define/local segment/R/1/1 0.
8
define/local thres/R/1/1 0.
12
! Method 1 : Defines a threshold by histogram analysis
16
segment = outputr(1) + {P3}*outputr(2)
17
replace/image {P1} {P2} <,{segment}=0.
21
! Method 2 : Determines the background by wavelet transform
24
scale/twodim {P1} &w7 2 &w1 1
25
compute/image &s = {P1} - &w7
28
thres = outputr(1) + 2.*outputr(2)
30
replace/image &s {P2} <,{thres}=0.