Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to multiply point3f with matx type

I'm not sure if this is trivial in OpenCV and c++, but after looking vastly around on websites, I still didn't find an elegant way to solve this.

So I have 3x3 camera matrix K of type Matx33f and #N-homogenous image points stored in a vector<point3f> named X. What I'd like to achieve is the calculation of the projective rays via:

Xn = K.inv() * X_vec,

whereby X_vec = [x1 x2 ... xN; y1 y2 ... yN; 1 1 ... 1]; (3xN)

I know how to achieve this with a loop, but I wonder if there isn't a simpler and elegant way. Can't imagine it to be that costly.

Many thanks in advance.

How to multiply point3f with matx type

I'm not sure if this is trivial in OpenCV and c++, but after looking vastly around on websites, I still didn't find an elegant way to solve this.

So I have 3x3 camera matrix K of type Matx33f and #N-homogenous image points stored in a vector<point3f> named X. What I'd like to achieve is the calculation of the projective rays via:

Xn = K.inv() * X_vec,

whereby X_vec = [x1 x2 ... xN; y1 y2 ... yN; 1 1 ... 1]; (3xN)

Edit: The problem is that X is of type Point2f and I need a vector form in the way of X_vec. I know how to achieve this to the muliplication with a loop, but I wonder if there isn't a simpler and elegant way. way to transform Point2f X into X_vec. Can't imagine it to be that costly.

Many thanks in advance.

How to multiply point3f with matx type

I'm not sure if this is trivial in OpenCV and c++, but after looking vastly around on websites, I still didn't find an elegant way to solve this.

So I have 3x3 camera matrix K of type Matx33f and #N-homogenous image points stored in a vector<point3f> named X. What I'd like to achieve is the calculation of the projective rays via:

Xn = K.inv() * X_vec,

whereby X_vec = [x1 x2 ... xN; y1 y2 ... yN; 1 1 ... 1]; (3xN)

Edit: The problem is that X is of type Point2f and but I need it in a vector form in the way of X_vec. I know how to to the muliplication with a loop, but I wonder if there isn't a simpler and elegant way to transform Point2f X into X_vec. Can't imagine it to be that costly.

Many thanks in advance.

How to multiply point3f with matx type

I'm not sure if this is trivial in OpenCV and c++, but after looking vastly around on websites, I still didn't find an elegant way to solve this.

So I have 3x3 camera matrix K of type Matx33f and #N-homogenous image points stored in a vector<point3f> named X. What I'd like to achieve is the calculation of the projective rays via:

Xn = K.inv() * X_vec,

whereby X_vec = [x1 x2 ... xN; y1 y2 ... yN; 1 1 ... 1]; (3xN)

Edit: The problem is that X is of type Point2f Point3f and but I need it in a vector form in the way of X_vec. I know how to to the muliplication with a loop, but I wonder if there isn't a simpler and elegant way to transform Point2f X into X_vec. Can't imagine it to be that costly.

Many thanks in advance.

How to multiply point3f with matx type

I'm not sure if this is trivial in OpenCV and c++, but after looking vastly around on websites, I still didn't find an elegant way to solve this.

So I have 3x3 camera matrix K of type Matx33f and #N-homogenous image points stored in a vector<point3f> named X. What I'd like to achieve is the calculation of the projective rays via:

Xn = K.inv() * X_vec,

whereby X_vec = [x1 x2 ... xN; y1 y2 ... yN; 1 1 ... 1]; (3xN)

Edit: The problem is that X is of type Point3f and but I need it in a vector form in the way of X_vec. I know how to to the muliplication with a loop, but I wonder if there isn't a simpler and elegant way to transform Point2f X into X_vec. Can't imagine it to be that costly.

<vector point3f="" &gt;="" but="" i="" need="" it="" in="" a="" vector="" form="" in="" the="" way="" of="" x_vec.="" i="" know="" how="" to="" to="" the="" muliplication="" with="" a="" loop,="" but="" i="" wonder="" if="" there="" isn't="" a="" simpler="" and="" more="" elegant="" way="" to="" transform="" <vector="" point3f="" &gt;="" x="" into="" x_vec.="" can't="" imagine="" it="" to="" be="" that="" costly.<="" p="">

Many thanks in advance.

How to multiply point3f with matx type

I'm not sure if this is trivial in OpenCV and c++, but after looking vastly around on websites, I still didn't find an elegant way to solve this.

So I have 3x3 camera matrix K of type Matx33f and #N-homogenous image points stored in a vector<point3f> named X. What I'd like to achieve is the calculation of the projective rays via:

Xn = K.inv() * X_vec,

whereby X_vec = [x1 x2 ... xN; y1 y2 ... yN; 1 1 ... 1]; (3xN)

Edit: The problem is that X is of type <vector point3f="" &gt;="" but="" i="" need="" it="" in="" a="" vector="" form="" in="" the="" way="" of="" x_vec.="" i="" know="" how="" to="" to="" the="" muliplication="" with="" a="" loop,="" but="" i="" wonder="" if="" there="" isn't="" a="" simpler="" and="" more="" elegant="" way="" to="" transform="" <vector="" point3f="" &gt;="" x="" into="" x_vec.="" can't="" imagine="" it="" to="" be="" that="" costly.<="" p="">

point3f=""> but I need it in a vector form in the way of X_vec. I know how to to the muliplication with a loop, but I wonder if there isn't a simpler and more elegant way to transform <vector point3f=""> X into X_vec. Can't imagine it to be that costly.

Many thanks in advance.

How to multiply point3f with matx type

I'm not sure if this is trivial in OpenCV and c++, but after looking vastly around on websites, I still didn't find an elegant way to solve this.

So I have 3x3 camera matrix K of type Matx33f and #N-homogenous image points stored in a vector<point3f> named X. What I'd like to achieve is the calculation of the projective rays via:

Xn = K.inv() * X_vec,

whereby X_vec = [x1 x2 ... xN; y1 y2 ... yN; 1 1 ... 1]; (3xN)

Edit: The problem is that X is of type <vector point3f=""> vector<point3f> but I need it in a vector form in the way of X_vec. I know how to to the muliplication with a loop, but I wonder if there isn't a simpler and more elegant way to transform <vector point3f=""> vector<point3f> X into X_vec. Can't imagine it to be that costly.

Many thanks in advance.