sharing everything

2D Convolution Source Code (conv2)

I have interested with 2D convolution in Matlab. You can check at Matlab with command conv2. I want to use this function in other language (C#), but can not get the source code in matlab conv2.m files. My friend (Herlan) search in the internet and get the algorithm for 2D convolution source code. This is algorithm 2D Convolution in C#. If you need the other algorithm, you can convert this source to other language (C/C++, VB or other) without much modification.

Copy this code to your C# project and run the program. The sample output from 2D convolution source code above is:

If you check at matlab, our conv2 source code result is same with conv2(A,A,’same’) in Matlab. Please send the comment if you have questions.
My name is Toto Sugito. This is my notes when I try something. Maybe, this is NOT THE BEST SOLUTION for your problems. If you have other method or idea that better with my post, please share in this blog. Thank for visiting my site.

No Comments Yet

Leave a Reply

Your email address will not be published. Required fields are marked *



Bloggers - Meet Millions of Bloggers