SIP Toolbox

imconv - 2D convolution

Calling Sequence

Outm = imconv(Img, mask [, form])

Input Parameters

Output Parameters

Description

Function imconv performs 2D spatial convolution of a grayscale image and a mask.

edge(Img)
Detects edges in Img, using the sobel gradient estimator, 0.5 threshold level and in both horizontal and vertical directions.

The other parameters are optional and non-positional. That is, they may be passed to the function by their name. The following example illustrates this.

Examples

       initial_dir = PWD;
       chdir (SIPDIR + 'images');
       // Detect horizontal lines
       h = [ -1    -1 -1
         2     2  2
        -1    -1 -1]
       img = imread('gra.jpg');
       res = imconv(img,h);
       imshow(res,[]);
       // Detect diagonal lines
       d = [ -1    -1  2
        -1     2 -1
         2    -1 -1]
       res = imconv(img,d);
       imshow(res,[]);
       chdir(initial_dir);
   

Authors

Ricardo Fabbri <ricardofabbri (AT) users DOT sf DOT net>, with help from
Scilab Group <Scilab@inria.fr>

Availability

The latest version of the Scilab Image Processing toolbox can be found at

http://siptoolbox.sourceforge.net

See Also

mkfilter,  edge,