# Corner/Edge Detection

Hello guys,

Times ago I asked about a way to detect the corner, and some guys said that I have to measure the angle between the lines, (I made to vectors, one for each line, and then I taked the angle), but in this way the result was not good, does anyone know another way to detect the corner ?

Tnks
Best regards
Kurt

???

am I trying to do something that is impossible ???

Any help or tip will be apreciated.

Tnks
RGDS
Kurt

hmm what corner/edge do you want to detect???
If you are trying to detect a corner in your rendered buffer than it is getting pretty dirty, complicated and hmmm difficult.

Yeah, what do you want to do???

Let’s imagine that I have a cloud of points that describe my model, this model is structured in slices that are segment of lines, (polylines), now I want to know were are the corners in this polyline, you know, I have something like a curve, and in some place I have corners, and I want to detect these corners. Hope, I’m clear enough.

Thank you
Best regards

Kurt

My corners is something like edges , sharp edges.

Tnks
RGDS
Kurt

hmm lets see if i got it.

You have your vertices and the lines which are connecting the vertices, and now you want to know which lines are in a plane and which lines are a corner of an object

[This message has been edited by DaViper (edited 04-11-2001).]

What’s exactly the problem about it?

[This message has been edited by Michael Steinberg (edited 04-11-2001).]

Yes , it is something like, do you want some picture ???

Tnks
RGDS

Kurt

just calcualte the normals of the 2 Polygon adjactet to each line. If the normals point in different directions you have a corner

DaViper,

Do you want some picture ???

RGDS

Kurt

I wanna have a picture

Look in your email.

yup send it to
schroll@lpr.e-technik.tu-muenchen.de

Now you have any three following points.

v1 = p2-p1;
v2 = p2-p3; // This is a simple flip because I want the angle to be near 0 degrees not near 180 degrees

cos(alpha) = (v1v2)/(|v1||v2|)
alpha_degree = arcuscos(alpha);

if ( alpha_degree > max_degree ) {
// we’ve got a corner here
}

Well just wrote that down so I don’t know if it’s correct. Simply say that max_degree is 10 or so and you’ll find the corners.

[This message has been edited by Michael Steinberg (edited 04-11-2001).]

[This message has been edited by Michael Steinberg (edited 04-11-2001).]

Ok… I will try…

Tnks
RGDS

Kurt

Corrected my posting somewhat.

Ok Michael,

So now, I want to create a new curve using the points that are the edges, in the method that you showed me, we have two vectors, how will I know witch of this is the point, that is the edge ?

Have you undertood my question ?

Tnks
RGDS

Kurt

Hello,

I think I found the answer for my last question, P2 will be the point that the corner is, right ??

Tnks
RGDS

Kurt