<<<<<<<<<<<<<<<<<

sv_ip_kernel(sv_ip) SunVision IP sv_ip_kernel(sv_ip)

NAME

sv_ip_kernel - load and save convolution kernels

DESCRIPTION

The sv_ip_kernel class generates convolution kernels.

SUPERCLASS

object

INSTANCE VARIABLES

filename is the name of a SunVision IP kernel. A large number are available in $SUNVISION/ip/kernel.

width is the width of the kernel. It is set as a side effect of the load! message.

height is the height of the kernel. It is set as a side effect of the load! message.

depth is the depth of the kernel. It is set as a side effect of the load! message.

MESSAGES

load! Loads the kernel from filename.

save! saves the current kernel to filename.

destroy! frees the storage fo the current kernel.

EXAMPLE

string new: `title' string_format=`Convolution using 1 kernel' = `sobel_col' ;

sv_ip_display new: car_image data_in=`car_ip' title= `Original data' render! ;

environment new: sunvision variable="SUNVISION" ;

string new: kernel_dir = [sunvision value?] + "/ip/kernel"; string new: `first_kernel' = kernel_dir + `/' + `sobel_col';

sv_ip_kernel new: kernel filename= first_kernel

;

sv_ip_convolve new: gauss3 data_in=`car_ip' kernel=`kernel' ;

sv_ip_display new: image data_in=`gauss3' title= title render! ;

motif create!;

motif_file_selection_box new: fsb parent=motif @ `directory' : kernel_dir @ `pattern' : "*" ok_action=`render' create! ;

actions new: `render' tick_actions=` kernel destroy! filename=[fsb @ `dirSpec' string_value?] ;

title = [fsb @ `dirSpec' string_value?] - [sunvision value?] - `/ip/kernel/' ; object # [image window?] store_name: title; image render!; ' ;

motif on! start!;

SEE ALSO

sv_ip_convolve, ip_load_kernel(3), ip_save_kernel(3), ip_destroy_kernel(3)


Please send comments and suggestions to
consult@rpi.edu