-
Notifications
You must be signed in to change notification settings - Fork 8
/
Util.h
34 lines (29 loc) · 1.14 KB
/
Util.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#pragma once
#include <string>
#include <opencv2/core/core.hpp>
#include <opencv2/ocl/ocl.hpp>
#include "LightFieldPicture.h"
#include "CameraPoseEstimator.h"
const Point2f UNIT_VECTORS[3] = { Point2f(0, 0), Point2f(1, 0),
Point2f(0, 1) };
double round(double value);
Vec2d round(Vec2d vector);
double roundTo(double value, double target);
double roundToZero(double value);
Vec2d roundToZero(Vec2d vector);
void adjustLuminanceSpace(Mat& image);
void appendRayCountingChannel(Mat& image);
void normalizeByRayCount(Mat& image);
void appendRayCountingChannel(oclMat& image);
void normalizeByRayCount(oclMat& image);
oclMat extractRayCountMat(const oclMat& image);
void normalizeByRayCount(oclMat& image, const oclMat& rayCountMat);
void normalize(oclMat& mat);
// debugging functions
void saveImageToPNGFile(string fileName, Mat image);
// unused, translates the view on a cirle, renders and saves images
void saveImageArc(LightFieldPicture lightfield, string sourceFileName,
int imageCount);
void visualizeCameraTrajectory(const CameraPoseEstimator& estimator,
const Matx33d& calibrationMatrix);
void visualizePointCloud(const Mat& pointCloud, const Mat& colors);