Frei-Chen Edge Detector

Michael Aye kmichael.aye at gmail.com
Wed Apr 24 14:56:48 EDT 2013


Concerning removal of whitespace noise, one could setup pre-commit git 
hooks to do that:
http://stackoverflow.com/questions/591923/make-git-automatically-remove-trailing-whitespace-before-committing


On Wednesday, April 24, 2013 3:48:52 AM UTC-7, Chintak Sheth wrote:
>
> Hi Umesh,
>
> As stated in the subject I'm presuming you want to implement an edge 
> detector, right ? As it says on the blog :
>
>> When we are using the Frei-Chen masks for edge detection we are searching 
>> for the cosine defined above and we use the first four masks as the 
>> elements of importance so the first sum above goes from one to four.
>>
>
> But in your implementation you are summing all the elements including the 
> 4 line masks. As can be seen from the function definition, M is the sum of 
> square of the convolution of relevant masks and S is the sum of square of 
> the convolution of all the masks. If you take all the masks as "relevant", 
> the ratio essentially works out to be 1.
>
> In short, you have to return the sqrt((mask1 + mask2 + mask3 + mask4) / ( 
> mask1 + mask2 + mask3 + mask4 + mask5 + mask6 + mask7 + mask8 + mask9))
> Where, mask : refers to the square of the convolution between the 
> corresponding mask and the image
>
> Also just one more note, before you submit a PR, clean up the whitespace 
> noise. You can use Sublime Text 2, with 4 white spaces for indentation as 
> Josh suggested. This is something I learned the hard way. To cross check if 
> the noise is actually cleared out, you can view it on the GitHub editor.
>
> I hope this sorts out the issue.
>
> This is the link you should provide : 
> https://github.com/umesh563/scikit-image/blob/master/skimage/filter/edges.py. Always 
> assume people are lazy. ;)
> Thanks,
> Chintak
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20130424/24670def/attachment.html>


More information about the scikit-image mailing list