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);
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);
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);
443 void CorrectionChromaticAberration(
uchar* src,
uchar* dst,
int width,
int height,
int scaleFactor = 2);
468 void encodeSideBand(
unsigned int passband);
480 void encodeSideBand_CPU(
int cropx1,
int cropx2,
int cropy1,
int cropy2,
ivec2 sig_location);
493 void encodeSideBand_GPU(
int cropx1,
int cropx2,
int cropy1,
int cropy2,
ivec2 sig_location);
511 void GetRandomPhaseValue(
Complex<Real>& rand_phase_val,
bool rand_phase);
514 void GetMaxMin(
Real *src,
int len,
Real& max,
Real& min);
529 void SetMode(
unsigned int mode) { m_mode = mode; }
565 : 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)
627 OphDepthMapConfig() :fieldLength(0.0), near_depthmap(0.0), far_depthmap(0.0), num_of_depth(0), change_depth_quantization(false)
628 , default_depth_quantization(0), num_of_depth_quantization(0), random_phase(false) {}
659 : fieldLength(0.0), scale(0.0, 0.0, 0.0), num_wrp(0), wrp_location(0.0), propagation_distance(0.0)
663 : fieldLength(_fieldLength), scale(_scale), num_wrp(_num_wrp), wrp_location(_wrp_location), propagation_distance(_propagation_distance)
680 OphIFTAConfig() :near_depthmap(0), far_depthmap(0), num_of_depth(0), num_of_iteration(0) {}
682 :near_depthmap(_near_depthmap), far_depthmap(_far_depthmap), num_of_depth(_num_of_depth), num_of_iteration(_num_of_iteration) {}
686 #endif // !__ophGen_h
Real focal_length_lens_eye_piece
Focal length of eyepiece lens.
OphWRPConfig(Real _fieldLength, vec3 _scale, int _num_wrp, Real _wrp_location, Real _propagation_distance)
Real fieldLength
fieldLength variable for viewing window.
Real distance
Offset value of point cloud.
OphIFTAConfig(Real _near_depthmap, Real _far_depthmap, int _num_of_depth, int _num_of_iteration)
ulonglong n_points
Number of points.
Complex< Real > * weightC
Real fieldLength
fieldLength variable for viewing window.
uchar ** getNormalizedBuffer(void)
Function for getting the normalized(0~255) complex field buffer.
Real ** m_lpEncoded
buffer to encoded.
Real focal_length_lens_out
Focal length of output lens of Telecentric.
vec2 tilt_angle
Tilt angle for spatial filtering.
ivec2 & getEncodeSize(void)
Function for getting encode size.
int num_wrp
Number of wavefront recording plane(WRP)
Real focal_length_lens_in
Focal length of input lens of Telecentric.
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)
bool random_phase
If true, random phase is imposed on each depth layer.
vec3 scale
Scaling factor of coordinate of point cloud.
void setEncodeMethod(unsigned int ENCODE_FLAG)
vec3 scale
Scaling factor of coordinate of point cloud.
Real m_elapsedTime
Elapsed time of generate hologram.
unsigned long long ulonglong
ivec2 m_vecEncodeSize
Encoded hologram size, varied from encoding type.
Real near_depthmap
near value of depth in object
Real ** getEncodedBuffer(void)
Function for getting the encoded complex field buffer.
Real wrp_location
Location distance of WRP.
structure for 2-dimensional Real type vector and its arithmetic.
Complex< Real > * fftTemp
Real far_depthmap
far value of depth in object
Real near_depthmap
near value of depth in object
Real getElapsedTime()
Function for getting elapsed time.
Data for triangular mesh.
int8_t * filter_shape_flag
Shape of spatial bandpass filter ("Circle" or "Rect" for now)
structure for 3-dimensional Real type vector and its arithmetic.
int SSB_PASSBAND
Passband in Single-side band encoding.
int n_colors
Number of color channel.
Vertex * vertices
Data of point clouds.
virtual bool loadAsOhc(const char *fname)
Function to read OHC file.
int num_of_depth
num_of_depth = num_of_depth_quantization
vec2 filter_width
Width of spatial bandpass filter.
Configuration for Point Cloud.
uchar ** m_lpNormalized
buffer to normalized.
Complex< Real > * AS
Binary Encoding - Error diffusion.
uint num_of_depth_quantization
depth level of input depthmap.
Real propagation_distance
Distance of Hologram plane.
void SetRandomPhase(bool bRandomPhase)
Function for setting the random phase.
bool change_depth_quantization
if true, change the depth quantization from the default value.
Complex< Real > * normalized
Real far_depthmap
far value of depth in object
vector< int > render_depth
Used when only few specific depth levels are rendered, usually for test purpose.
uint default_depth_quantization
default value of the depth quantization - 256
int ENCODE_METHOD
Encoding method flag.
void setPrecision(uint precision)
Function for setting precision.
virtual void ophFree(void)
Pure virtual function for override in child classes.
Configuration for Depth Map.