53 #define GEN_DLL __declspec(dllexport) 55 #define GEN_DLL __declspec(dllimport) 59 #define GEN_DLL __attribute__((visibility("default"))) 108 virtual ~
ophGen(
void) = 0;
129 void initialize(
void);
148 bool readConfig(
const char* fname);
217 bool save(
const char* fname, uint8_t bitsperpixel = 8,
uchar* src =
nullptr,
uint px = 0,
uint py = 0);
223 void* load(
const char* fname);
232 virtual bool loadAsOhc(
const char *fname);
245 bool save(
const char* fname, uint8_t bitsperpixel,
uint px,
uint py,
uint fnum,
uchar* args ...);
278 void encoding(
unsigned int ENCODE_FLAG);
294 virtual void encoding(
unsigned int ENCODE_FLAG,
unsigned int SSB_PASSBAND,
Complex<Real>* holo =
nullptr,
Real* encoded =
nullptr);
314 void encoding(
unsigned int BIN_ENCODE_FLAG,
unsigned int ENCODE_FLAG,
Real threshold,
Complex<Real>* holo =
nullptr,
Real* encoded =
nullptr);
325 void waveCarry(
Real carryingAngleX,
Real carryingAngleY,
Real distance);
330 ivec2 m_vecEncodeSize;
340 uchar** m_lpNormalized;
354 void transVW(
int nVertex,
Real *dst,
Real *src);
369 void setResolution(
ivec2 resolution);
385 template <
typename T>
386 void RealPart(
Complex<T>* holo, T* encoded,
const int size);
387 template <
typename T>
388 void ImaginaryPart(
Complex<T>* holo, T* encoded,
const int size);
389 template <
typename T>
390 void Phase(
Complex<T>* holo, T* encoded,
const int size);
391 template <
typename T>
392 void Amplitude(
Complex<T>* holo, T* encoded,
const int size);
393 template <
typename T>
394 void TwoPhase(
Complex<T>* holo, T* encoded,
const int size);
395 template <
typename T>
396 void Burckhardt(
Complex<T>* holo, T* encoded,
const int size);
397 template <
typename T>
398 void SimpleNI(
Complex<T>* holo, T* encoded,
const int size);
421 enum ED_WType { FLOYD_STEINBERG, SINGLE_RIGHT, SINGLE_DOWN, ITERATIVE_DESIGN };
422 bool saveRefImages(
char* fnameW,
char* fnameWC,
char* fnameAS,
char* fnameSSB,
char* fnameHP,
char* fnameFreq,
char* fnameReal,
char* fnameBin,
char* fnameReconBin,
char* fnameReconErr,
char* fnameReconNo);
439 bool getWeightED(
const ivec2 holosize,
const int type,
ivec2* pNw);
440 bool shiftW(
ivec2 holosize);
442 void CorrectionChromaticAberration(
uchar* src,
uchar* dst,
int width,
int height,
int ch);
477 void encodeSideBand(
bool bCPU,
ivec2 sig_location);
489 void encodeSideBand_CPU(
int cropx1,
int cropx2,
int cropy1,
int cropy2,
ivec2 sig_location);
502 void encodeSideBand_GPU(
int cropx1,
int cropx2,
int cropy1,
int cropy2,
ivec2 sig_location);
520 void GetRandomPhaseValue(
Complex<Real>& rand_phase_val,
bool rand_phase);
523 void GetMaxMin(
Real *src,
int len,
Real& max,
Real& min);
538 void SetMode(
unsigned int mode) { m_mode = mode; }
561 int8_t* filter_shape_flag;
565 Real focal_length_lens_in;
567 Real focal_length_lens_out;
569 Real focal_length_lens_eye_piece;
574 : scale(0.0, 0.0, 0.0), distance(0.0), filter_shape_flag(0), focal_length_lens_in(0.0), focal_length_lens_out(0.0), focal_length_lens_eye_piece(0.0), tilt_angle(0.0, 0.0)
626 vector<int> render_depth;
628 bool change_depth_quantization;
630 uint default_depth_quantization;
632 uint num_of_depth_quantization;
636 OphDepthMapConfig() :fieldLength(0.0), near_depthmap(0.0), far_depthmap(0.0), num_of_depth(0), change_depth_quantization(false)
637 , default_depth_quantization(0), num_of_depth_quantization(0), random_phase(false) {}
665 Real propagation_distance;
668 : fieldLength(0.0), scale(0.0, 0.0, 0.0), num_wrp(0), wrp_location(0.0), propagation_distance(0.0)
672 : fieldLength(_fieldLength), scale(_scale), num_wrp(_num_wrp), wrp_location(_wrp_location), propagation_distance(_propagation_distance)
687 int num_of_iteration;
689 OphIFTAConfig() :near_depthmap(0), far_depthmap(0), num_of_depth(0), num_of_iteration(0) {}
691 :near_depthmap(_near_depthmap), far_depthmap(_far_depthmap), num_of_depth(_num_of_depth), num_of_iteration(_num_of_iteration) {}
695 #endif // !__ophGen_h
OphWRPConfig(Real _fieldLength, vec3 _scale, int _num_wrp, Real _wrp_location, Real _propagation_distance)
OphIFTAConfig(Real _near_depthmap, Real _far_depthmap, int _num_of_depth, int _num_of_iteration)
uchar ** getNormalizedBuffer(void)
Function for getting the normalized(0~255) complex field buffer.
ivec2 & getEncodeSize(void)
Function for getting encode size.
structure for 2-dimensional integer vector and its arithmetic.
bool GetRandomPhase()
Function for getting the random phase.
void normalize(const Complex< T > *src, Complex< T > *dst, const int &size)
Normalize all elements of Complex<T>* src from 0 to 1.
void SetMode(unsigned int mode)
void setEncodeMethod(unsigned int ENCODE_FLAG)
unsigned long long ulonglong
Real ** getEncodedBuffer(void)
Function for getting the encoded complex field buffer.
structure for 2-dimensional Real type vector and its arithmetic.
Real getElapsedTime()
Function for getting elapsed time.
Data for triangular mesh.
structure for 3-dimensional Real type vector and its arithmetic.
SSB_PASSBAND
Passband in Single-side band encoding.
virtual bool loadAsOhc(const char *fname)
Function to read OHC file.
Configuration for Point Cloud.
void SetRandomPhase(bool bRandomPhase)
Function for setting the random phase.
void setPrecision(uint precision)
Function for setting precision.
virtual void ophFree(void)
Pure virtual function for override in child classes.
Configuration for Depth Map.