Jump to content
  • Advertisement

Archived

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

CJ

1 / 0 geometric figures

This topic is 6960 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

There's really no way the computer can guess which points make up a line without knowing something about the line they are a part of. You could have it assume that all pixels touching eachother constitute a line, but I don't think this will work very well for what you're trying to do. I would just keep a separate array of points describing the start and end of each line as it is detected.

Share this post


Link to post
Share on other sites
Advertisement
Hmmmmmm, and how would I go about curves and stuff.....

I don't want to let the user define the lines.

------------------
Dance with me......

Share this post


Link to post
Share on other sites
This is more theory, so I hope you can help me.

I have got an array which holds the values 0 or 1. In which 1 means that it is occupied. Anyway, those values are everywhere over the array. Since I got these values after edge detection they kinda represent an edge.
Now, i need to find geometric figures.

If, for example.....I have an array which looks like

[1][0][0][0][0][0][0][0][0][0]
[0][1][0][0][0][0][0][0][0][0]
[0][0][1][0][0][0][0][0][0][0]
[0][0][0][0][0][0][0][0][0][0]
[0][0][0][0][1][0][0][0][0][0]
[0][0][0][0][0][1][0][0][0][0]
[0][0][0][0][0][0][1][0][0][0]
[0][0][0][0][0][0][0][0][0][0]

and all the 1's represent ONE line. What will be a good way to find out? This example is easy, but there are other examples which will cause more trouble. Like:

[1][0][0][0][0][0][0][0][0][0]
[0][0][1][0][0][0][0][0][0][0]
[0][0][0][1][0][1][0][0][0][0]
[0][0][0][0][0][0][1][0][1][0]

I can't seem to figure it out........

------------------
Dance with me......

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!