mistake |
C2664 |
'void pcl::eigen33<Eigen::Matrix3f,Eigen::Vector3d>(const Matrix &,float &,Vector &)': cannot convert argument 2 from 'Eigen::Matrix3d' to 'float &' |
3DVisionMFCshf |
F:\workcplus\3DVisionMFCshf\3DVisionMFCshf\3DVisionMFCshf.cpp |
3981 |
||||
severity |
the code |
illustrate |
project |
document |
OK |
Disable status |
|||
mistake |
C2338 |
YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY |
3DVisionMFCshf |
C:\pcl12\PCL 1.12.1\3rdParty\Eigen\eigen3\include\eigen3\Eigen\src\Core\AssignEvaluator.h |
834 |
I don’t know why the code in the above picture reported an error. After the computer system was reinstalled and all configurations were completed, only this line of the project reported an error. In the original system, this line of code was fine, and the specific reason was not found.
The solution is to modify the above code and change it to the following code to solve the problem
Eigen::Matrix3f eigenVectors;
Eigen::Vector3f eigenValues;
pcl::eigen33<Eigen::Matrix3f, Eigen::Vector3f>(covariance, eigenVectors, eigenValues);
This algorithm is mainly used when calculating the covariance matrix.