Ask Your Question
0

Norm function for Point2f and Point3f

asked 2013-02-09 10:39:09 -0600

benzun gravatar image

When i try to use the norm function for the classes of the template Point_ and Point3_ I get an error that says that there is no known conversion from Point_ to InputArray. Is this a bug? Please tell me how to resolve this. I can write my own norm function but that does not solve the problem.

Also norm seems to do ok with Point but not Point2f.

I am using opencv 2.3.1 do i need to upgrade?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-02-10 04:22:18 -0600

berak gravatar image

as of 2.4.2, it seems to work with all sorts of points here, so an upgrade might help.

in the meantime, you can calc your own norm:

Point3f p(17,1,8);
//double l = norm(p);
double l = sqrt( p.x*p.x + p.y*p.y + p.z*p.z );
edit flag offensive delete link more

Comments

Thanks for verifying it berak. I will mostly upgrade to newer version but now I will use my own function.

benzun gravatar imagebenzun ( 2013-02-18 12:05:25 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-02-09 10:39:09 -0600

Seen: 5,508 times

Last updated: Feb 10 '13