mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Merge pull request #18335 from chargerKong:master
Ordinary quaternion * version 1.0 * add assumeUnit; add UnitTest; check boundary value; fix the func using method: func(obj); fix 4x4; add rodrigues vector transformation; fix mat to quat; * fix blank and tab * fix blank and tab modify test;cpp to hpp * mainly improve comment; add rvec2Quat;fix toRodrigues; fix throw to CV_Error * fix bug of quatd * int; combine hpp and cpp; fix << overload error in win system; modify include in test file; * move implementation to quaternion.ini.hpp; change some constructor to createFrom* function; change Rodrigues vector to rotation vector; change the matexpr to mat of 3x3 return type; improve comments; * try fix log function error in win * add enums for assumeUnit; improve docs; add using std::cos funcs * remove using std::* from header; add std::* in affine.hpp,warpers_inl.hpp; * quat: coding style * quat: AssumeType => QuatAssumeType
This commit is contained in:
@@ -363,8 +363,8 @@ void StereographicProjector::mapForward(float x, float y, float &u, float &v)
|
||||
|
||||
float r = sinf(v_) / (1 - cosf(v_));
|
||||
|
||||
u = scale * r * cos(u_);
|
||||
v = scale * r * sin(u_);
|
||||
u = scale * r * std::cos(u_);
|
||||
v = scale * r * std::sin(u_);
|
||||
}
|
||||
|
||||
inline
|
||||
@@ -625,7 +625,7 @@ void TransverseMercatorProjector::mapBackward(float u, float v, float &x, float
|
||||
v /= scale;
|
||||
|
||||
float v_ = asinf( sinf(v) / coshf(u) );
|
||||
float u_ = atan2f( sinhf(u), cos(v) );
|
||||
float u_ = atan2f( sinhf(u), std::cos(v) );
|
||||
|
||||
float cosv = cosf(v_);
|
||||
float x_ = cosv * sinf(u_);
|
||||
|
||||
Reference in New Issue
Block a user