| OpenCV 3.4.3 Open Source Computer Vision

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
cv::cnn_3dobj::icoSphere Class Reference
3D object recognition and pose estimation API

Icosohedron based camera view data generator. The class create some sphere views of camera towards a 3D object meshed from .ply files [85] . More...

`#include "cnn_3dobj.hpp"`

## Public Member Functions
| icoSphere (float radius_in, int depth_in)
| Generating a sphere by mean of a iteration based points selection process. More...
cv::Point3d | getCenter (cv::Mat cloud)
| Get the center of points on surface in .ply model. More...
float | getRadius (cv::Mat cloud, cv::Point3d center)
| Get the proper camera radius from the view point to the center of model. More...

## Static Public Member Functions
static void | createHeader (int num_item, int rows, int cols, const char *headerPath)
| Create header in binary files collecting the image data and label. More...
static int | swapEndian (int val)
| Suit the position of bytes in 4 byte data structure for particular system. More...
static void | writeBinaryfile (String filenameImg, const char *binaryPath, const char *headerPath, int num_item, int label_class, int x, int y, int z, int isrgb)
| Write binary files used for training in other open source project including Caffe. More...

## Public Attributes
std::vector< cv::Point3d > | CameraPos
| Camera position on the sphere after duplicated points elimination. More...

## Detailed Description

Icosohedron based camera view data generator. The class create some sphere views of camera towards a 3D object meshed from .ply files [85] .

## Constructor & Destructor Documentation

## § icoSphere()

cv::cnn_3dobj::icoSphere::icoSphere | ( | float | radius_in,
|  | int | depth_in
| ) |  |

Generating a sphere by mean of a iteration based points selection process.

Parameters

  radius_in | Another radius used for adjusting the view distance.
  depth_in | Number of interations for increasing the points on sphere.

## Member Function Documentation

## § createHeader()

static void cv::cnn_3dobj::icoSphere::createHeader | ( | int | num_item,
|  | int | rows,
|  | int | cols,
|  | const char * | headerPath
| ) |  |
| static

Create header in binary files collecting the image data and label.

Parameters

  num_item | Number of items.
  rows | Rows of a single sample image.
  cols | Columns of a single sample image.
  headerPath | Path where the header will be stored.

## § getCenter()

cv::Point3d cv::cnn_3dobj::icoSphere::getCenter | ( | cv::Mat | cloud | ) |

Get the center of points on surface in .ply model.

Parameters

  cloud | Point cloud used for computing the center point.

## § getRadius()

float cv::cnn_3dobj::icoSphere::getRadius | ( | cv::Mat | cloud,
|  | cv::Point3d | center
| ) |  |

Get the proper camera radius from the view point to the center of model.

Parameters

  cloud | Point cloud used for computing the center point.
  center | center point of the point cloud.

## § swapEndian()

static int cv::cnn_3dobj::icoSphere::swapEndian | ( | int | val | ) |
| static

Suit the position of bytes in 4 byte data structure for particular system.

## § writeBinaryfile()

static void cv::cnn_3dobj::icoSphere::writeBinaryfile | ( | String | filenameImg,
|  | const char * | binaryPath,
|  | const char * | headerPath,
|  | int | num_item,
|  | int | label_class,
|  | int | x,
|  | int | y,
|  | int | z,
|  | int | isrgb
| ) |  |
| static

Write binary files used for training in other open source project including Caffe.

Parameters

  filenameImg | Path which including a set of images.
  binaryPath | Path which will output a binary file.
  headerPath | Path which header belongs to.
  num_item | Number of samples.
  label_class | Class label of the sample.
  x | Pose label of X.
  y | Pose label of Y.
  z | Pose label of Z.
  isrgb | Option for choice of using RGB images or not.

## Member Data Documentation

## § CameraPos

std::vector<cv::Point3d> cv::cnn_3dobj::icoSphere::CameraPos

Camera position on the sphere after duplicated points elimination.

The documentation for this class was generated from the following file:

- /build/3_4-contrib_docs-lin64/opencv_contrib/modules/cnn_3dobj/include/opencv2/cnn_3dobj.hpp