Openholo
v4.2
Open Source Digital Holographic Library
ophACPAS.h
Go to the documentation of this file.
1
#pragma once
2
3
#ifndef __ophACPAS_h
4
#define __ophACPAS_h
5
6
#include "
ophGen.h
"
7
8
9
#define PI (3.14159265358979323846f)
10
#define M2_PI (PI*2.0)
11
#define RADIANS (PI/180.0) // Angle in radians
12
// DEGREE*asin(mytheta)
13
#define DEGREE2 (180./PI) // sin(RADIANS*DEGREE*asin(mytheta))
14
15
#define NUMTBL 1024
16
#define NUMTBL2 (NUMTBL-1)
17
#define MAX_STR_LEN 4000
18
#define FFT_SEG_SIZE 64
19
#define SEG_SIZE 8
20
21
struct
GEN_DLL
CGHEnvironmentData
22
{
23
int
CghWidth
;
// cgh width
24
int
CghHeight
;
// cgh height
25
int
SegmentationSize
;
26
int
fftSegmentationSize
;
27
float
rWaveLength
;
// red laser lambda
28
float
rWaveNumber
;
// red laser lambda
29
float
ThetaX
;
30
float
ThetaY
;
31
float
DefaultDepth
;
32
float
xInterval
;
33
float
yInterval
;
34
float
xiInterval
;
35
float
etaInterval
;
36
float
CGHScale
;
37
};
38
39
struct
GEN_DLL
Segment
40
{
41
bool
WorkingFlag
;
42
long
SegmentIndex
;
43
int
SegSize_x
;
44
int
SegSize_y
;
45
int
hSegSize_x
;
// Half size
46
int
hSegSize_y
;
// Half size
47
double
CenterX
;
48
double
CenterY
;
49
double
FrequencySlope
;
50
};
51
52
using namespace
oph
;
53
54
class
GEN_DLL
ophACPAS
:
public
ophGen
55
{
56
public
:
57
explicit
ophACPAS
();
58
protected
:
59
virtual
~
ophACPAS
();
60
61
public
:
62
bool
readConfig(
const
char
* fname);
63
int
loadPointCloud(
const
char
* pc_file);
64
int
save(
const
char
* fname, uint8_t bitsperpixel,
uchar
* src,
uint
px,
uint
py);
65
66
void
DataInit();
67
int
ACPASCalcuation(
unsigned
char
*cghfringe);
// ÆÐÅÏ°è»ê void ACPAS(); double *m_pHologram; float m_COStbl[NUMTBL]; float m_SINtbl[NUMTBL]; private: int n_points; OphPointCloudConfig pc_config_; OphPointCloudData pc_data_; CGHEnvironmentData env; }; #endif // !__ophPAS_h
68
void
ACPAS();
69
70
double
*
m_pHologram
;
71
72
float
m_COStbl[
NUMTBL
];
73
float
m_SINtbl[
NUMTBL
];
74
private
:
75
int
n_points;
76
OphPointCloudConfig
pc_config_;
77
OphPointCloudData
pc_data_;
78
CGHEnvironmentData
env;
79
};
80
81
82
83
#endif // !__ophPAS_h
CGHEnvironmentData::DefaultDepth
float DefaultDepth
Definition:
ophACPAS.h:31
ophGen.h
oph::uchar
unsigned char uchar
Definition:
typedef.h:64
NUMTBL
#define NUMTBL
Definition:
ophACPAS.h:15
Segment::WorkingFlag
bool WorkingFlag
Definition:
ophACPAS.h:41
CGHEnvironmentData::SegmentationSize
int SegmentationSize
Definition:
ophACPAS.h:25
CGHEnvironmentData::rWaveNumber
float rWaveNumber
Definition:
ophACPAS.h:28
Segment::CenterX
double CenterX
Definition:
ophACPAS.h:47
Segment::CenterY
double CenterY
Definition:
ophACPAS.h:48
CGHEnvironmentData::CghHeight
int CghHeight
Definition:
ophACPAS.h:24
CGHEnvironmentData::xiInterval
float xiInterval
Definition:
ophACPAS.h:34
CGHEnvironmentData::yInterval
float yInterval
Definition:
ophACPAS.h:33
CGHEnvironmentData::CghWidth
int CghWidth
Definition:
ophACPAS.h:23
ophACPAS::m_pHologram
double * m_pHologram
Definition:
ophACPAS.h:70
Segment
Definition:
ophACPAS.h:39
CGHEnvironmentData::ThetaY
float ThetaY
Definition:
ophACPAS.h:30
GEN_DLL
#define GEN_DLL
Definition:
ophGen.h:61
CGHEnvironmentData::rWaveLength
float rWaveLength
Definition:
ophACPAS.h:27
Segment::hSegSize_y
int hSegSize_y
Definition:
ophACPAS.h:46
CGHEnvironmentData::xInterval
float xInterval
Definition:
ophACPAS.h:32
CGHEnvironmentData::etaInterval
float etaInterval
Definition:
ophACPAS.h:35
CGHEnvironmentData
Definition:
ophACPAS.h:21
OphPointCloudConfig
Configuration for Point Cloud.
Definition:
ophGen.h:555
CGHEnvironmentData::CGHScale
float CGHScale
Definition:
ophACPAS.h:36
CGHEnvironmentData::ThetaX
float ThetaX
Definition:
ophACPAS.h:29
Segment::SegmentIndex
long SegmentIndex
Definition:
ophACPAS.h:42
OphPointCloudData
Data for Point Cloud.
Definition:
ophGen.h:582
Segment::SegSize_x
int SegSize_x
Definition:
ophACPAS.h:43
Segment::hSegSize_x
int hSegSize_x
Definition:
ophACPAS.h:45
CGHEnvironmentData::fftSegmentationSize
int fftSegmentationSize
Definition:
ophACPAS.h:26
Segment::SegSize_y
int SegSize_y
Definition:
ophACPAS.h:44
oph
Definition:
Bitmap.h:49
Segment::FrequencySlope
double FrequencySlope
Definition:
ophACPAS.h:49
oph::uint
unsigned int uint
Definition:
typedef.h:62
ophACPAS
Definition:
ophACPAS.h:54
ophGen
Definition:
ophGen.h:76
D:
Sources
Openholo
Openholo
build
include
ophACPAS.h
Generated by
1.8.14