Jump to content
  • Advertisement


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


Bitmap Edge Detection

This topic is 5964 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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 this post

Link to post
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 this post

Link to post
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.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!