Code covered by the BSD License  

Highlights from
Sobel Edge Detection

4.22222

4.2 | 9 ratings Rate this file 132 Downloads (last 30 days) File Size: 61.51 KB File ID: #9303
image thumbnail

Sobel Edge Detection

by Anthony Gabrielson

 

07 Dec 2005 (Updated 11 May 2006)

Sobel Edge Detection

| Watch this File

File Information
Description

This code converts a BW image to an Edge Detected image in C with MEX. This code implements convolution with Sobel kernels to do the edge detection. I put this together for a school project and I couldn't find any good examples of MEX with image processing. One note the code is currently hard coded to handle only UINT8, however it should be trivial to convert that data type. Enjoy.

MATLAB release MATLAB 7.1.0 (R14SP3)
Other requirements I built this under Windows with VC 2003 & R2006A, but there is nothing platform or compiler specific about it.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (12)
04 Jan 2006 mcs swami  
10 May 2006 J H

Has a typo. Line 117 is
  SUM = labs(sumX) + labs(sumX);
It should be
  SUM = labs(sumX) + labs(sumY);
Other than that, seems to work fine.

11 May 2006 Anthony Gabrielson

JH, I just uploaded the fixed code. I also cleaned it up a bit to make it more readable.

01 Jun 2007 stefanos kouramidis

I have to write a study programming with MATLAB and i need informations.

07 Sep 2007 PARTHA PRATIM GHORAI  
07 Sep 2007 Viswanath Reddy Ramireddy

Excellent performance. More useful to students.

07 Jan 2008 Alfian Abdul Halin  
07 Sep 2008 JAGADISH KOTA  
20 Oct 2010 Kevin J. Delaney

Very nice--thanks for your contribution!

23 Aug 2011 Vivek Bhadouria

Nice code

12 Jan 2012 Saleha Samad

this is c code. i want matlab code plz

30 Jan 2012 Ramachandran M.G.

this is c code. i want matlab code plz

Please login to add a comment or rating.
Updates
11 May 2006

Fixed the labs bug line...
Changed to passing struct around, seems cleanier.

Tag Activity for this File
Tag Applied By Date/Time
image analysis Anthony Gabrielson 22 Oct 2008 08:09:23
sobel Anthony Gabrielson 22 Oct 2008 08:09:23
convolution Anthony Gabrielson 22 Oct 2008 08:09:23
mex Anthony Gabrielson 22 Oct 2008 08:09:23
bw Anthony Gabrielson 22 Oct 2008 08:09:23
image Anthony Gabrielson 22 Oct 2008 08:09:24
edge Anthony Gabrielson 22 Oct 2008 08:09:24
detect Anthony Gabrielson 22 Oct 2008 08:09:24
sobel ritu verma 08 Apr 2010 12:33:42
bw Milos 01 May 2011 07:40:17
sobel Stroiazzo 18 May 2011 03:55:35
sobel hihi dfhek 01 Jun 2011 13:35:18
sobel mike me 01 Jun 2011 15:26:22
edge Ruben 13 Jun 2011 10:07:55
bw Janet 09 Aug 2011 13:02:32
detect Mihir 11 Sep 2011 06:23:40
edge Joao nsingui 07 Nov 2011 14:36:34
bw Hoang Pham 08 Nov 2011 10:37:01
mex Deepti 10 Nov 2011 11:52:14

Contact us at files@mathworks.com