Should the OpenCV C++ Core provide a Line class, similar to Point, Rect and Size?

asked 2014-09-08 13:13:37 -0600

rwong gravatar image

I noticed that despite providing various Point, Rect and Size struct templates, the OpenCV Core C++ headers do not provide struct templates for line equations or line segments.

Are there proposals for adding these to the OpenCV Core C++ headers?

My understanding is that there are two kinds of line classes useful for OpenCV C++ users:

  • A line segment class, denoted by two endpoints. These endpoints are not necessarily confined by some arbitrary bounds (such as the size of the image, or the size of the screen).

  • A line equation class, written in the general form of a*x + b*y + c == 0. See: Linear equation (Wikipedia)

A third kind of line class, known as a "ray" (a line with one starting point and going into infinity in its direction), might be useful to some OpenCV users.

Is there any known impediments or objections that prevent a line class from being added into OpenCV C++ Core?

edit retag flag offensive close merge delete



Reason of it not being there is limited resources! Give it a head and add a PR if you succeed in getting a decent result!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-09-08 13:19:51 -0600 )edit