#### Archived

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

# 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.

## 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 on other sites
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 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......

1. 1
2. 2
3. 3
Rutin
20
4. 4
5. 5
khawk
14

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633655
• Total Posts
3013186
×