#include "ros/ros.h"#include <iostream>#include <iomanip>#include <vector>#include <string>#include <sstream>#include <opencv/cv.h>#include <opencv/highgui.h>#include "../MetaFile.h"#include "DUtils.h"#include "DUtilsCV.h"#include "DVision.h"
Go to the source code of this file.
Typedefs | |
| typedef DVision::Bundle::CameraFile::Camera | Camera |
| typedef DVision::PMVS::PLYFile | PLYFile |
| typedef DVision::PMVS::PLYFile::PLYPoint | PLYPoint |
Functions | |
| void | createCamera (const cv::Mat &im, float width, float height, Camera &camera) |
| void | createPLYpoints (const cv::Mat &img, float width, float height, const DVision::SurfSet &surfset, std::vector< PLYPoint > &plypoints) |
| int | main (int argc, char **argv) |
| void | saveFace (const std::string &model_dir, int face_idx, const cv::Mat &img, const DVision::SurfSet &surfs, const std::vector< PLYPoint > &plypoints, const Camera &camera) |
Variables | |
| static const int | DEFAULT_HESSIAN_THRESHOLD = 400 |
Definition at line 65 of file createPointCloudModelBak.cpp.
| typedef DVision::PMVS::PLYFile PLYFile |
Usage: createPlanarModel <training image>=""> <object name>=""> <width (m)> <height (m)> <output model="" dir>=""> [surf threshold]
training image: undistorted image of the object object name width, height: real width and height of the object in metres output model dir: directory to store the files of the model in (must exist)
Definition at line 63 of file createPointCloudModelBak.cpp.
Definition at line 64 of file createPointCloudModelBak.cpp.
| void createCamera | ( | const cv::Mat & | im, |
| float | width, | ||
| float | height, | ||
| Camera & | camera | ||
| ) |
Creates a virtual camera that would watch the object in front of it The virtual camera is suposed to be oriented as the object, at a distance of 1 metre
| im | image |
| width | |
| height | real dimensions of the given image |
| camera | virtual camera |
| void createPLYpoints | ( | const cv::Mat & | img, |
| float | width, | ||
| float | height, | ||
| const DVision::SurfSet & | surfset, | ||
| std::vector< PLYPoint > & | plypoints | ||
| ) |
Generates the 3D points of the given surf features. The 3D points are given in the object reference, located in the center of the object, x pointing right, y pointing down, z going away the camera.
| img | source color image |
| width | |
| height | dimensions of the real object in metres. One dimension can be zero |
| surfset | surfs extracted from img |
| plypoint | created 3d points |
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 116 of file createPointCloudModelBak.cpp.
| void saveFace | ( | const std::string & | model_dir, |
| int | face_idx, | ||
| const cv::Mat & | img, | ||
| const DVision::SurfSet & | surfs, | ||
| const std::vector< PLYPoint > & | plypoints, | ||
| const Camera & | camera | ||
| ) |
Generates under the directory model_dir the files of one face of the model
| model_dir | output model directory |
| face_idx | index of this face |
| img | face image |
| surfs | surfs from img |
| plypoints | 3d coords of the surfs keypoints |
| camera | intrinsic parameters of camera |
const int DEFAULT_HESSIAN_THRESHOLD = 400 [static] |
Definition at line 112 of file createPointCloudModelBak.cpp.