46 #ifndef __ophDepthMap_h 47 #define __ophDepthMap_h 119 bool readConfig(
const char* fname);
120 bool readImageDepth(
const char* source_folder,
const char* img_prefix,
const char* depth_img_prefix);
127 Real generateHologram(
void);
129 virtual void encoding(
unsigned int ENCODE_FLAG);
130 virtual void encoding(
unsigned int ENCODE_FLAG,
unsigned int SSB_PASSBAND);
141 void setViewingWindow(
bool is_ViewingWindow);
149 void setResolution(ivec2 resolution);
165 inline void getRenderDepth(std::vector<int>& renderdepth) { renderdepth = dm_config_.render_depth; }
175 bool prepareInputdataCPU();
176 bool prepareInputdataGPU();
178 void getDepthValues();
179 void changeDepthQuanCPU();
180 void changeDepthQuanGPU();
186 void propagationAngularSpectrumGPU(
uint channel, cufftDoubleComplex* input_u,
Real propagation_dist);
194 bool is_ViewingWindow;
195 unsigned char* depth_img;
196 vector<uchar*> m_vecRGB;
199 unsigned char* img_src_gpu;
200 unsigned char* dimg_src_gpu;
201 Real* depth_index_gpu;
203 vector<Real *> m_vecImgSrc;
204 vector<int *> m_vecAlphaMap;
207 vector<short> depth_fill;
212 vector<Real> dlevel_transform;
220 #endif //>__ophDepthMap_h void setNearDepth(Real neardepth)
void getRenderDepth(std::vector< int > &renderdepth)
void setFieldLens(Real fieldlens)
void setConfig(OphDepthMapConfig config)
void normalize(const Complex< T > *src, Complex< T > *dst, const int &size)
Normalize all elements of Complex<T>* src from 0 to 1.
void setFarDepth(Real fardetph)
const OphDepthMapConfig & getConfig()
This class generates CGH based on depth map.
void setNumOfDepth(uint numofdepth)
Configuration for Depth Map.