computeedge thinning algorithm source code in MATLAB

I am trying to apply a thinning algorithm same as the thinning applied in the sobel filter. I looked at the edge.m for the algorithm but looks like it calls a mex file computeedge for the thinning. I could not find the source code of the mex file. What does this mex file exactly do? What is the thinning algorithm it performs??? Where can I find the source code for this mex file?? The thinning is called in edge.m as shown below:
function e = computeEdgesWithThinning(b,bx,by,kx,ky,offset,cutoff)
% This subfunction computes edges using edge thinning.
bx = abs(bx); % necessary for doing local maxima suppression
by = abs(by);
e = computeedge(b,bx,by,kx,ky,int8(offset),100*eps,cutoff);

Answers (1)

If it's a mex file, they did that for speed and/or they don't want you to see the actual source code. Regardless, they will however usually give you the citation of the paper that has the algorithm they implemented (if there is such an article that they followed), but you need to ask them specifically for it. Not sure why you need to know it anyway. Do you have a problem with how it's thinned?

3 Comments

I am trying to convert some files to c++ so that I can convert it into a mex file.I am trying to convert the Sobel of MATLAB to opencv.I get the same output with nothinning but thinning is applied by default in MATLAB.So can't figure out what is done in the thinning.
Did you ever find a solution? I am dealing with the exact same issue now. Thanks
I am dealing with the exact same issue. please aware me if you got new solution.

Sign in to comment.

Asked:

ab
on 5 Sep 2013

Commented:

on 14 Sep 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!