Sobel and
Canny are major
edge detection algorithms in
Image Processing. Here I have implemented those algorithms using c#.
Download the source code from
here.
Canny Edge Detection (click to zoom)
Sobel Edge Detection (click to zoom)
You can improve the program by using optimization methods such as threading and loop optimization.
Would you be willing to repost a download link to the source? The existing link isn't working.
ReplyDeleteplz send me this code.ur link is not valid
ReplyDeleteplease send me url download of this code
ReplyDeletecheck the link now,
Deleteplease i dont have account could you please send me the code of canny edge detection
Deletehi. i need to canny code for c# . please send me this code.thanks
ReplyDeletecheck the download link, you may need to log to shared hosting site.
Deleteheyy man..Sobel Edge Detection source code plz...
ReplyDeleteyou can find it in the attached project.
Delete-imp4.cs and method is private void sobel ( )
for ( int wi = -1; wi < 2; wi++ )
ReplyDelete{
for ( int hw = -1; hw < 2; hw++ )
{
why the start value is -1
why not start by 0
Because of previous loops. Numbers depends on how you use them.
DeleteThis is a pure implementation of algorithm. Please use this in a optimized manner.
for ( int wi = -1; wi < 2; wi++ )
ReplyDelete{
for ( int hw = -1; hw < 2; hw++ )
{
rc = allPixR[ i + hw,j + wi];
new_rx += gx[ wi + 1,hw + 1] * rc;
new_ry += gy[ wi + 1,hw + 1] * rc;
gc = allPixG[ i + hw,j + wi];
new_gx += gx[ wi + 1,hw + 1] * gc;
new_gy += gy[ wi + 1,hw + 1] * gc;
bc = allPixB[ i + hw,j + wi];
new_bx += gx[ wi + 1,hw + 1] * bc;
new_by += gy[ wi + 1,hw + 1] * bc;
}
}
if ( new_rx * new_rx + new_ry * new_ry > limit || new_gx * new_gx + new_gy * new_gy > limit || new_bx * new_bx + new_by * new_by > limit )
bb.SetPixel (i, j, Color.Black);
//bb.SetPixel (i, j, Color.FromArgb(allPixR[i,j],allPixG[i,j],allPixB[i,j]));
else
bb.SetPixel (i, j, Color.White);
}
}
for ( int wi = -1; wi < 2; wi++ ) nah tlng bnget knpa mulainya dari -1 kenap ndak mulai dari 0..
artinya apa ini
for ( int hw = -1; hw < 2; hw++ )
{
rc = allPixR[ i + hw,j + wi];
new_rx += gx[ wi + 1,hw + 1] * rc;
new_ry += gy[ wi + 1,hw + 1] * rc;
saya belum paham ,kenapa gx[ wi + 1,hw + 1] * rc;??
I can not understand your language. :)
Delete
Deletebriefly describe the flow of the program??
what the mean for this loop??
for ( int hw = -1; hw < 2; hw++ )
{
rc = allPixR[ i + hw,j + wi];
new_rx += gx[ wi + 1,hw + 1] * rc;
new_ry += gy[ wi + 1,hw + 1] * rc;
Find the edge strength by taking the gradient of the image using Sobel operator
DeletePlease refer this article
http://en.wikipedia.org/wiki/Canny_edge_detector
how about rc = allPixR[ i + hw,j + wi], what the mean??
Deletei + hw,j + wi parameters for what? value is taken from where??
sorry many questions!!
:)
Thanks for sharing..
ReplyDeleteTeşekürler.Thank you.
ReplyDeletesorry,, I wanna ask you about this code, may i ask you by email?
ReplyDeletethank you so much :))
ReplyDeletevery helpfull code
ReplyDeleteThank you very much for sharing the source :-)
ReplyDeleteplz send me this code.ur link is not valid
ReplyDeleteSorry for late reply. Link is fixed now.
Delete