5 |
|
5/22/92 Greg Ward |
6 |
|
|
7 |
|
Usage: |
8 |
< |
pcomb -x xres -y yres -f kern.cal -f filt.cal input.pic > output.pic |
8 |
> |
pcomb -x xres -y yres -f kern.cal -f filt.cal input.hdr > output.hdr |
9 |
|
|
10 |
|
The file "kern.cal" must define the constant function kern(x,y), which |
11 |
|
describes how the kernal behaves as a function of offset in x and y |
24 |
|
K20 : k( 1,-1); K21 : k( 1, 0); K22 : k( 1, 1); |
25 |
|
sumtotal : K00+K01+K02+K10+K11+K12+K20+K21+K22; |
26 |
|
|
27 |
< |
f(p) = ( K00*p(1,-1,-1) + K01*p(1,-1, 0) + K02*p(1,-1, 1) + |
28 |
< |
K10*p(1, 0,-1) + K11*p(1, 0, 0) + K12*p(1, 0, 1) + |
29 |
< |
K20*p(1, 1,-1) + K21*p(1, 1, 0) + K22*p(1, 1, 1) ) / sumtotal; |
27 |
> |
f(p,i) = ( K00*p(i,-1,-1) + K01*p(i,-1, 0) + K02*p(i,-1, 1) + |
28 |
> |
K10*p(i, 0,-1) + K11*p(i, 0, 0) + K12*p(i, 0, 1) + |
29 |
> |
K20*p(i, 1,-1) + K21*p(i, 1, 0) + K22*p(i, 1, 1) ) / sumtotal; |
30 |
|
|
31 |
< |
ro = f(ri); |
32 |
< |
go = f(gi); |
33 |
< |
bo = f(bi); |
31 |
> |
ro = f(ri,1); |
32 |
> |
go = f(gi,1); |
33 |
> |
bo = f(bi,1); |