Artifact 4121225a2ecdbc8ea3a3fdec7f9dc45a6a13345a:
- File demos/convolve_sobelhvm.tcl — part of check-in [112655e7fe] at 2010-09-21 08:02:26 on branch ak-experimental — Demos. Additional laplace/sobel variants. (user: andreask size: 541) [more...]
def op_convolve_sobelhvm { label {Sobel H+V/M} setup { # http://wiki.tcl.tk/9521 variable Kv [crimp kernel make { {1 0 -1} {2 0 -2} {1 0 -1}}] variable Kh [crimp kernel make { { 1 2 1} { 0 0 0} {-1 -2 -1}}] } setup_image { set gx [crimp filter convolve [base] $Kh] set gy [crimp filter convolve [base] $Kv] show_image [crimp alpha opaque \ [crimp remap \ [crimp add \ [crimp multiply $gx $gx] \ [crimp multiply $gy $gy]] \ [crimp map sqrt]]] } }