7 #include <glm/gtc/matrix_transform.hpp> 9 #include <opencv2/core/core.hpp> 10 #include <opencv2/imgcodecs/imgcodecs.hpp> 11 #include <opencv2/imgproc/imgproc.hpp> 28 const unsigned int cam_width = 320;
29 const unsigned int cam_height = 240;
30 const float cam_fx = 257.34;
31 const float cam_cx = 160;
32 const float cam_fy = 257.34;
33 const float cam_cy = 120;
51 obj.emplace(
"alien",
"./spaceinvader.obj");
57 SICAD si_cad(obj, cam_width, cam_height, cam_fx, cam_fy, cam_cx, cam_cy);
89 objpose_map.emplace(
"alien", obj_pose);
98 double cam_x[] = { 0, 0, 0};
99 double cam_o[] = {1.0, 0, 0, 0};
109 si_cad.
superimpose(objpose_map, cam_x, cam_o, img);
110 cv::imwrite(
"./spaceinvader.jpg", img);
std::unordered_map< std::string, std::string > ModelPathContainer
bool superimpose(const ModelPoseContainer &objpos_map, const double *cam_x, const double *cam_o, cv::Mat &img) override
Render the mesh models in the pose specified in objpos_map and move the virtual camera in cam_x posit...
std::vector< double > ModelPose
A Superimpose derived class to superimpose mesh models on images.
std::multimap< std::string, ModelPose > ModelPoseContainer