Advertisement

1 / 0 geometric figures

Started by November 20, 1999 02:34 PM
1 comment, last by CJ 25 years, 1 month ago
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.
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......

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

This topic is closed to new replies.

Advertisement