Image convolution: Difference between revisions
J: reworked - more neutral padding, more concise kernel_filter
(J: reworked - more neutral padding, more concise kernel_filter) |
|||
Line 612:
<lang J>NB. pad the first n dimensions of an array with zeros
NB. (increasing all dimensions by 1 less than the kernel size)
pad=:
a"_`(<:@],0:)`(#1:)}~&# # b"_`(<:@],0:)`(#1:)}~&(1{$) #"1 ]
)
kernel_filter=:
)</lang>
|