Binary Dilation and Erosion

August 28, 2009 by Luigi Rosa · 2 Comments
Filed under: Image processing 
VN:F [1.8.8_1072]
Rating: 0 (from 0 votes)
VN:F [1.8.8_1072]
Rating: 0.0/10 (0 votes cast)

A faster implementation of binary dilation and erosion.

Our functions take advantage of MATLAB ’s decomposition of the structuring element but they may result much faster. Try to run example.m to see the speed improvement factor, changing the parameters.

Please contribute if you find this software useful.
Report any bug to luigi.rosa@tiscali.it

Luigi Rosa
Via Centrale 35
67042 Civita Di Bagno
L’Aquila — Italy

mobile +39 340 3463208
email luigi.rosa@tiscali.it

Download Now

VN:F [1.8.8_1072]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.8_1072]
Rating: 0 (from 0 votes)

Popularity: 4% [?]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Live
  • PDF
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Add to favorites
  • email
  • MySpace
  • RSS

Grayscale Dilation and Erosion

August 11, 2009 by Luigi Rosa · 3 Comments
Filed under: Image processing 
VN:F [1.8.8_1072]
Rating: 0 (from 0 votes)
VN:F [1.8.8_1072]
Rating: 10.0/10 (2 votes cast)

The zip file includes:

  • – readme.txt this file
  • – gdil.c —-> a c file which must be mex compiled
  • – gerod.c —> a c file which must be mex compiled
  • – graydil.m –> the m function (dilation)
  • – grayero.m –> the m function (erosion)
  • – provatempo.m —> many examplex of use

Grayscale erosion and dilation: a very fast implementation.

We have optimized execution time of grayscale erosion and dilation. Our functions take advantage of MATLAB’s decomposition of structuring elements.

  • graydil(im,se) to perform dilation
  • im is the input 2D matrix (uin8, uint16, uint32 or double)
  • se the structuring element (logical or strel)


  • grayero(im,se) to perform erosion
  • im is the input 2D matrix (uin8, uint16, uint32 or double)
  • se the structuring element (logical or strel)

Memory management is not optimized ( our routines can generateoverflow memory error) but execution time is 2, 3, 4 or 5 times smaller than MATLAB’s one.

Please contribute if you find this software useful.
Report bugs to luigi.rosa@tiscali.it

Download Now

VN:F [1.8.8_1072]
Rating: 10.0/10 (2 votes cast)
VN:F [1.8.8_1072]
Rating: 0 (from 0 votes)

Popularity: 27% [?]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Live
  • PDF
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Add to favorites
  • email
  • MySpace
  • RSS