Typedefs | Functions | Variables
createPlanarModel.cpp File Reference

Creates a planar object model. More...

#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"
Include dependency graph for createPlanarModel.cpp:

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

Detailed Description

Creates a planar object model.

Creates a planar object model from an image and the dimensions of the object

This file is part of the RoboEarth ROS WP1 package.

It file was originally created for RoboEarth. The research leading to these results has received funding from the European Union Seventh Framework Programme FP7/2007-2013 under grant agreement no248942 RoboEarth.

Copyright (C) 2010 by Dorian Galvez-Lopez, University of Zaragoza

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Author:
Dorian Galvez-Lopez
Version:
1.0
Date:
2010
RoboEarth.org_logo.gif

Definition in file createPlanarModel.cpp.


Typedef Documentation

Definition at line 63 of file createPlanarModel.cpp.

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 61 of file createPlanarModel.cpp.

Definition at line 62 of file createPlanarModel.cpp.


Function Documentation

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

Parameters:
imimage
width
heightreal dimensions of the given image
cameravirtual camera

Definition at line 225 of file createPlanarModel.cpp.

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.

Parameters:
imgsource color image
width
heightdimensions of the real object in metres. One dimension can be zero
surfsetsurfs extracted from img
plypointcreated 3d points

Definition at line 182 of file createPlanarModel.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 114 of file createPlanarModel.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

Parameters:
model_diroutput model directory
face_idxindex of this face
imgface image
surfssurfs from img
plypoints3d coords of the surfs keypoints
cameraintrinsic parameters of camera

Variable Documentation

const int DEFAULT_HESSIAN_THRESHOLD = 400 [static]

Definition at line 110 of file createPlanarModel.cpp.



re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:33:45