Icosohedron based camera view data generator. The class create some sphere views of camera towards a 3D object meshed from .ply files [101] .
More...
#include <opencv2/cnn_3dobj.hpp>
|
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...
|
|
Icosohedron based camera view data generator. The class create some sphere views of camera towards a 3D object meshed from .ply files [101] .
◆ 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. |
◆ 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()
Get the center of points on surface in .ply model.
- Parameters
-
cloud | Point cloud used for computing the center point. |
◆ getRadius()
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. |
◆ 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: