#include <BenchmarkLUT.h>
Definition at line 7 of file BenchmarkLUT.h.
§ BenchmarkLUT() [1/3]
BenchmarkLUT::BenchmarkLUT |
( |
| ) |
|
|
inline |
§ BenchmarkLUT() [2/3]
BenchmarkLUT::BenchmarkLUT |
( |
ImageData * |
lut | ) |
|
§ BenchmarkLUT() [3/3]
BenchmarkLUT::BenchmarkLUT |
( |
const char * |
file | ) |
|
§ CleanupLUT()
void BenchmarkLUT::CleanupLUT |
( |
ImageData & |
lut | ) |
|
|
static |
§ GenerateLUT()
void BenchmarkLUT::GenerateLUT |
( |
ImageData * |
lut | ) |
|
Definition at line 70 of file BenchmarkLUT.cpp.
72 float M = lut->
w / (float)
lut_w;
74 for (
int y=0;y<lut->
h;y++) {
75 for (
int x=0;x<lut->
w;x++) {
T Interpolate1D(T *d, int len, float x)
std::vector< float > normprof
§ GenerateSample()
void BenchmarkLUT::GenerateSample |
( |
ImageData * |
image, |
|
|
vector3f |
pos, |
|
|
float |
minRadius, |
|
|
float |
maxRadius |
|
) |
| |
Definition at line 82 of file BenchmarkLUT.cpp.
84 float radialDensity=
lut_w / (maxRadius-minRadius);
86 if(pos.
z<0.0f) pos.
z=0.0f;
89 for (
int y=0;y<image->
h;y++)
90 for (
int x=0;x<image->
w;x++)
94 float r = (
sqrt(dx*dx+dy*dy)-minRadius)*radialDensity;
96 float profpos = r / maxline;
vector3< T > sqrt(const vector3< T > &a)
T Interpolate1D(T *d, int len, float x)
std::vector< float > normprof
§ Load() [1/2]
Definition at line 22 of file BenchmarkLUT.cpp.
24 std::vector<float> max_x,max_y;
29 for (
int i=lut->
h/5;i<lut->h*3/4;i++) {
31 float maxval = lut->
at(0, i);
32 for (
int x=1;x<lut->
w;x++)
33 if (maxval < lut->at(x,i)) {
34 maxval = lut->
at(x,i);
37 max_x.push_back(maxpos);
47 std::vector<int> numsmp(lut->
w);
49 for (
int r=0;r<lut->
w;r++) {
52 for (
int y=0;y<lut->
h;y++) {
53 float x=r*fit.compute(y)/fit.c;
64 for (
int i=0;i<lut->
w;i++) {
T interpolate(float x, float y, bool *outside=0)
std::vector< float > normprof
§ Load() [2/2]
void BenchmarkLUT::Load |
( |
const char * |
file | ) |
|
Definition at line 15 of file BenchmarkLUT.cpp.
int ReadJPEGFile(uchar *srcbuf, int srclen, uchar **data, int *width, int *height)
void Load(ImageData *lut)
§ lut_h
§ lut_w
§ max_a
float BenchmarkLUT::max_a |
§ max_b
float BenchmarkLUT::max_b |
§ max_c
float BenchmarkLUT::max_c |
§ normprof
std::vector<float> BenchmarkLUT::normprof |
The documentation for this class was generated from the following files: