Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • LidarView/lidarview-core
  • nick.laurenson/lidarview-core
  • aerezarang/lidarview-core
3 results
Show changes
Showing
with 51 additions and 25 deletions
......@@ -27,7 +27,7 @@
// EIGEN
#include <Eigen/Dense>
#include "LidarCoreModule.h"
#include "lvCommonCoreModule.h"
/**
* @brief LoadCameraParamsFromCSV Load parameters from a csv file
......@@ -35,7 +35,7 @@
* @param filename filename that contains the parameters
* @param W loaded parameters
*/
LIDARCORE_EXPORT void LoadCameraParamsFromCSV(std::string filename, Eigen::VectorXd& W);
LVCOMMONCORE_EXPORT void LoadCameraParamsFromCSV(std::string filename, Eigen::VectorXd& W);
/**
* @brief WriteCameraParamsCSV Write parameters into a csv file
......@@ -43,7 +43,7 @@ LIDARCORE_EXPORT void LoadCameraParamsFromCSV(std::string filename, Eigen::Vecto
* @param filename filename to write the camera parameters
* @param W to write parameters
*/
LIDARCORE_EXPORT void WriteCameraParamsCSV(std::string filename, Eigen::VectorXd& W);
LVCOMMONCORE_EXPORT void WriteCameraParamsCSV(std::string filename, Eigen::VectorXd& W);
/**
* @brief FisheyeProjection Project a 3D point using a fisheye camera model
......@@ -53,7 +53,7 @@ LIDARCORE_EXPORT void WriteCameraParamsCSV(std::string filename, Eigen::VectorXd
* @param X 3D point to project
* @param shouldClip Clip points that are behind the camera plane
*/
LIDARCORE_EXPORT Eigen::Vector2d FisheyeProjection(const Eigen::Matrix<double, 15, 1>& W,
LVCOMMONCORE_EXPORT Eigen::Vector2d FisheyeProjection(const Eigen::Matrix<double, 15, 1>& W,
const Eigen::Vector3d& X,
bool shouldClip = false);
......@@ -70,7 +70,7 @@ LIDARCORE_EXPORT Eigen::Vector2d FisheyeProjection(const Eigen::Matrix<double, 1
* non injective behaviour between 3D direction and 2D pixels
* @param fovAngle angle of the field of view
*/
LIDARCORE_EXPORT Eigen::Vector2d BrownConradyPinholeProjection(const Eigen::Matrix<double, 17, 1>& W,
LVCOMMONCORE_EXPORT Eigen::Vector2d BrownConradyPinholeProjection(const Eigen::Matrix<double, 17, 1>& W,
const Eigen::Vector3d& X,
bool shouldPlaneClip = false);
......@@ -82,6 +82,6 @@ LIDARCORE_EXPORT Eigen::Vector2d BrownConradyPinholeProjection(const Eigen::Matr
* @param vmin minimal value of the reflectivity signal
* @param vmax maximal value of the reflectivity signal
*/
LIDARCORE_EXPORT Eigen::Vector3d GetRGBColourFromReflectivity(double v, double vmin, double vmax);
LVCOMMONCORE_EXPORT Eigen::Vector3d GetRGBColourFromReflectivity(double v, double vmin, double vmax);
#endif // CAMERA_PROJECTION_H
#include "Common/LVTime.h"
#include "LVTime.h"
double GetElapsedTime(const timeval& now)
{
......
......@@ -25,11 +25,11 @@
#include <sys/time.h>
#endif
#include "LidarCoreModule.h"
#include "lvCommonCoreModule.h"
#include <ctime>
double LIDARCORE_EXPORT GetElapsedTime(const timeval& now);
double LVCOMMONCORE_EXPORT GetElapsedTime(const timeval& now);
double LIDARCORE_EXPORT GetElapsedTime(const timeval& end, const timeval& start);
double LVCOMMONCORE_EXPORT GetElapsedTime(const timeval& end, const timeval& start);
#endif // LVTIME_H
add_subdirectory(Cxx)
vtk_add_test_cxx(lvCommonCoreCxxTests tests
NO_VALID NO_OUTPUT
TestBoundingBox.cxx
# TestVtkEigenTools.cxx
)
vtk_test_cxx_executable(lvCommonCoreCxxTests tests)
......@@ -25,7 +25,7 @@
#include <vtkMath.h>
// LOCAL
#include "Common/BoundingBox.h"
#include "BoundingBox.h"
#include "vtkEigenTools.h"
//-----------------------------------------------------------------------------
......
......@@ -17,6 +17,7 @@
#include <vector>
#include <numeric>
#include <algorithm>
// source: https://stackoverflow.com/questions/1719070
......
NAME
LidarView::CommonCore
LIBRARY_NAME
lvCommonCore
DEPENDS
Eigen3::Eigen
VTK::CommonCore
VTK::CommonExecutionModel
VTK::CommonDataModel
VTK::CommonTransforms
VTK::CommonMath
PRIVATE_DEPENDS
Boost::system
VTK::RenderingCore # For vtkCustomTransformInterpolator
YAML::yamlcpp
TEST_DEPENDS
LidarView::TestingCore
......@@ -50,7 +50,7 @@
#include <vector>
#include <vtkObject.h>
#include "LidarCoreModule.h"
#include "lvCommonCoreModule.h"
class vtkTransform;
class vtkMatrix4x4;
......@@ -60,7 +60,7 @@ class vtkQuaternionInterpolator;
class vtkTransformList;
struct vtkQTransform;
class LIDARCORE_EXPORT vtkCustomTransformInterpolator : public vtkObject
class LVCOMMONCORE_EXPORT vtkCustomTransformInterpolator : public vtkObject
{
public:
vtkTypeMacro(vtkCustomTransformInterpolator, vtkObject)
......
......@@ -30,7 +30,7 @@
// STD
#include <vector>
#include "LidarCoreModule.h"
#include "lvCommonCoreModule.h"
/**
* @brief AvgUnitQuaternions Computes and returns the average unit quaternion
......@@ -60,7 +60,7 @@ Eigen::Matrix3d AvgRotation(const std::vector<Eigen::Matrix3d>& rotations);
* with (X, Y, Z) being an orthonormal basis of R^3
* @param rotation input rotation to decompose
*/
Eigen::Vector3d LIDARCORE_EXPORT MatrixToRollPitchYaw(const Eigen::Matrix3d& rotation);
Eigen::Vector3d LVCOMMONCORE_EXPORT MatrixToRollPitchYaw(const Eigen::Matrix3d& rotation);
/**
* @brief RollPitchYawToMatrix Computes the rotation matrix from Euler
......@@ -75,8 +75,8 @@ Eigen::Vector3d LIDARCORE_EXPORT MatrixToRollPitchYaw(const Eigen::Matrix3d& rot
* @param pitch is the angle around Y-axis (in radian)
* @param yaw is the angle around Z-axis (in radian)
*/
Eigen::Matrix3d LIDARCORE_EXPORT RollPitchYawToMatrix(double roll, double pitch, double yaw);
Eigen::Matrix3d LIDARCORE_EXPORT RollPitchYawToMatrix(const Eigen::Vector3d& angles);
Eigen::Matrix3d LVCOMMONCORE_EXPORT RollPitchYawToMatrix(double roll, double pitch, double yaw);
Eigen::Matrix3d LVCOMMONCORE_EXPORT RollPitchYawToMatrix(const Eigen::Vector3d& angles);
/**
* @brief RollPitchYawInDegreeToMatrix Computes the rotation matrix from Euler
......@@ -91,26 +91,26 @@ Eigen::Matrix3d LIDARCORE_EXPORT RollPitchYawToMatrix(const Eigen::Vector3d& ang
* @param pitch is the angle around Y-axis (in dedgree)
* @param yaw is the angle around Z-axis (in dedgree)
*/
Eigen::Matrix3d LIDARCORE_EXPORT RollPitchYawInDegreeToMatrix(double roll, double pitch, double yaw);
Eigen::Matrix3d LVCOMMONCORE_EXPORT RollPitchYawInDegreeToMatrix(double roll, double pitch, double yaw);
/**
* @brief SignedAngle Computes the signed angle between two vectors
* @param v1 first vector
* @param v2 second vector
*/
double LIDARCORE_EXPORT SignedAngle(const Eigen::Vector3d& v1, const Eigen::Vector3d& v2);
double LVCOMMONCORE_EXPORT SignedAngle(const Eigen::Vector3d& v1, const Eigen::Vector3d& v2);
/**
* @brief AngleFromMatrix Computes the rotation angle (from angle axis representation) of a 3d rotation matrix
* @param R Rotation Matrix
*/
double LIDARCORE_EXPORT AngleFromMatrix(const Eigen::Matrix3d& R);
double LVCOMMONCORE_EXPORT AngleFromMatrix(const Eigen::Matrix3d& R);
/**
* @brief IsMatrixFinite Check if all the coefficients of a matrix are finite
* @param M matrix to checkr
*/
bool LIDARCORE_EXPORT IsMatrixFinite(const Eigen::Matrix3d& M);
bool LVCOMMONCORE_EXPORT IsMatrixFinite(const Eigen::Matrix3d& M);
/**
* @brief GetSphericalCoordinates compute the spherical coordinates
......@@ -121,10 +121,10 @@ bool LIDARCORE_EXPORT IsMatrixFinite(const Eigen::Matrix3d& M);
* (basis of the direction vector space)
* @param Origin origin of the affine space reference frame
*/
Eigen::Vector3d LIDARCORE_EXPORT GetSphericalCoordinates(const Eigen::Vector3d& X,
Eigen::Vector3d LVCOMMONCORE_EXPORT GetSphericalCoordinates(const Eigen::Vector3d& X,
const Eigen::Matrix3d& Basis,
const Eigen::Vector3d& Origin);
Eigen::Vector3d LIDARCORE_EXPORT GetSphericalCoordinates(const Eigen::Vector3d& X);
Eigen::Vector3d LVCOMMONCORE_EXPORT GetSphericalCoordinates(const Eigen::Vector3d& X);
/**
* @brief ComputeHomography compute the best homography (minimizing
......@@ -156,7 +156,7 @@ void EuclideanMLSSmoothing(const std::vector<Eigen::VectorXd>& X,
* descent algorithm with specific step value
* @param X The list of R^n vectors we want to compute the median
*/
Eigen::VectorXd LIDARCORE_EXPORT MultivariateMedian(const std::vector<Eigen::VectorXd> X, double epsilon = 1e-6, unsigned int maxCount = 10000);
Eigen::VectorXd LVCOMMONCORE_EXPORT MultivariateMedian(const std::vector<Eigen::VectorXd> X, double epsilon = 1e-6, unsigned int maxCount = 10000);
Eigen::Matrix<double, 4, 4> ToEigen(vtkMatrix4x4* M);
......@@ -164,7 +164,7 @@ Eigen::Matrix<double, 4, 4> ToEigen(vtkTransform* T);
Eigen::Transform<double, 3, Eigen::Affine> ToEigenTransform(vtkMatrix4x4* M);
Eigen::Transform<double, 3, Eigen::Affine> LIDARCORE_EXPORT ToEigenTransform(vtkTransform* T);
Eigen::Transform<double, 3, Eigen::Affine> LVCOMMONCORE_EXPORT ToEigenTransform(vtkTransform* T);
Eigen::Transform<double, 3, Eigen::Affine> ToEigenTransform(const Eigen::Matrix3d& R, const Eigen::Vector3d& T);
......