Next: Segmentation, Previous: Transform, Up: Image Processing [Contents][Index]
The Guile-CV procedures and methods related to morphology.
Returns a new image or channel.
Performs the morpholgical erosion of image using a disc of a given radius. Here is an example:
(im-make 5 5 1 1.0) -| $2 = (5 5 1 (#f32(1.0 1.0 1.0 1.0 1.0 …))) (im-set! $2 1 2 0.0) (im-disc-erode $2 1) -| $3 = (5 5 1 (#f32(1.0 0.0 0.0 0.0 1.0 …))) (im-display $2 #:proc inexact->exact) -| Channel 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 (im-display $3 #:proc inexact->exact) -| Channel 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1
Returns a new image or channel.
Performs the morpholgical dilation of image using a disc of a given radius. Here is an example:
... -| $13 = (11 11 1 (#f32(0.0 0.0 0.0 0.0 0.0 …))) (im-disc-dilate $13 1) -| $14 = (11 11 1 (#f32(1.0 1.0 1.0 1.0 1.0 …))) (im-display $13 #:proc inexact->exact) -| Channel 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1 0 0 1 1 1 1 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 1 1 0 0 0 1 1 1 1 0 0 1 1 0 0 0 1 1 1 1 0 0 1 1 0 0 0 1 1 1 1 0 0 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (im-display $14 #:proc inexact->exact) -| Channel 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0
Returns a new image or channel.
Performs the dilation of the erosion of image using radius. Opening removes small objects.
Returns a new image or channel.
Performs the erosion of the dilation of image using radius. Closing removes small holes.
Returns a new image or channel.
The argument must be a BINARY image. As its name indicate, this procedure fill the holes of all and every objects in the image.
Returns a new image or channel.
Both threshold and radius must be exact integers.
Also known as ‘Edge Enhancement’, this procedure performs the delineation of image, obtained by applying the following pseudo code algorithm:
;; with ;; Min = (im-disc-erode image radius) ;; Max = (im-disc-dilate image radius) D = Max - Min If D < threshold ;; not an edge output pixel = input pixel ;; it is an edge If (pixel – Min) < (Max – pixel) output pixel = Min output pixel = Max
Here above, left being the original image - a small part of an optical
microscope capture of a sinter sample - you can see the difference
between im-delineate
called with the default threshold and
radius values, then called using #:threshold 25
and
#:radius 5
.
Returns a new image or channel.
Also know as ‘Distance Tranform’, this procedure performs the distance map of image, which consist of, for each background pixel, calculating its distance to the nearest object or contour. In the return new image or channel, all background pixels will be assigned the their distance value, all other pixels will be assigned to 0. Distances larger than 255 are labelled as 255.
The default backgroung pixel value is 'black
, the optional
#:bg keyword argument also accepts 'white
.
The default distance map mode is ’euclidean. Other valid optional #:mode keyword argument are ’chessboard and ’manhattan.
Here above, left being the original image - a few cells - you can see
the results obtained by calling im-distance-map
using respectively
the 'euclidean
, 'manhattan
and 'chessboard
modes.
Returns a new image.
This procedure implements a ‘binary morphological reconstruction’ algorithm, which extracts the connected components of image that are ‘marked’ by (any of) the connected components contained in seeds.
Morphological reconstruction is part of a set of image operators often referred to as ‘geodesic’ (geodesic distance, geodesic dilation …). Morphological (or geodesic) operations upon digital images come from and use the Mathematical morphology (MM) theory and technique developed for the analysis and processing of geometrical structures.
First described here24, this implementation is based on a revision of the same article published in ‘the IEEE Transactions on Image Processing, Vol. 2, No. 2, pp. 176-201, April 1993’, available here.
in Serra, Jean and Vincent, Luc (1992), "An overview of morphological filtering", Circuits, Systems and Signal Processing (Springer) 11 (1): 47-108
Next: Segmentation, Previous: Transform, Up: Image Processing [Contents][Index]