Ask Your Question
1

What is the meaning of cv::Point::cross()?

asked 2013-05-07 03:07:58 -0600

Adi gravatar image

updated 2013-05-07 07:51:58 -0600

I noticed in the headers that cv::Point has a .cross() method returning a double.

Had it returned a cv::Point3d, it would have made sense as the cross-product of two 2D homogeneous points with the last coefficient implicitly being set to 1 (in this case, if the 2 points were 2D points in the image plane then the results is the 2D line passing through them).
In fact, the result of cv::Point::cross() is actually the 3rd element of the 3D cross-product above.

What is the intent and/or geometric meaning of the existing method?
More specifically, is there a projective interpretation for this value, given that 2D points are represented by 3-element vectors in projective space?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2013-05-07 03:31:57 -0600

The cross product which returns double for point is defined as follow:

P1.x*P2.y - P1.y * P2.x;

This is known as the magnitude, and it's similar to take the cross product on the XY plane (Z = 0). Some more explanations here.

edit flag offensive delete link more

Comments

1

Interesting. In my question I actually meant if there is a projective or homogeneous interpretation.

Adi gravatar imageAdi ( 2013-05-07 07:50:13 -0600 )edit

Question Tools

Stats

Asked: 2013-05-07 03:07:58 -0600

Seen: 7,996 times

Last updated: May 07 '13