• Announcements

Archived

This topic is now archived and is closed to further replies.

Bitmap Edge Detection

Recommended Posts

I want to be able to take a picture and find all of the edges in it. Is there a fomula to do this? I sure hope this world isn''t one big joke, because I don''t get it.

Share on other sites
This seems like a pretty complex problem to me, and if I understand you quickly it will most likely detect edges where there are (large) differences in the brightness of 2 or more pixels that are ..
One way would just to do this, scroll though pixel by pixel and compare it to all adjacent pixels, if the difference in brightness is greater than 50%, its an edge.
This isnt a pretty algorithm and you''ll probably have to modify the 50%, or how many pixels it compares to (it could compare to a group of pixels depending of their average brighness, it could get real messy).
in pseudocode (im lazy ):
for (int picSearch=0; {for (int x=-1; x<2; x++) for (int y=-1; y<2; y++)  if ((picture[picsearch].brightness-picture[picsearch+x][picsearch+y])> thenthisisedge}

I dont know much about this, but it was an interesting question and no-one else answered..sorry for my messy psuedo code, i wonder how it looks with formating?
Well its the thought/idea that counts

Share on other sites
this is a complex problem, especially if you are not comfortable with math. do some searches on google which will yeild some good results. be forewarned, most implementations cannot be done in realtime too well, espcially if you are coding in vb. check intels web site for there image library, they have some edge detection rountines in it that are pretty fast, though i think you can only use it with c/c++ code.

• Partner Spotlight

• Forum Statistics

• Total Topics
627657
• Total Posts
2978472

• 10
• 12
• 22
• 13
• 33