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 7.1.0 (R14SP3)
I built this under Windows with VC 2003 & R2006A, but there is nothing platform or compiler specific about it.