You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

72 lines
1.5 KiB

#ifndef KERNELPARAMS_H
#define KERNELPARAMS_H
#include <QObject>
#include <QDebug>
#include <QByteArray>
#include <QList>
#include <math.h>
#define ARRAY_SIZE(X) X.length()
#define DYN_CNTR_CONST_PIECE_NO 256U
#define MIN_OUTPUT_LEVEL 3U
#define MAX_OUTPUT_LEVEL 252U
#define MAX_LOG_INPUT_LEVEL 24*2048
#define MIN_LOG_INPUT_DEFAULT 6U
#define MAX_LOG_INPUT_DEFAULT 21
#define GAIN_DEFAULT 4
#define CONTRAST_NUM_DEFAULT 1U
#define EPSILSON 1.401298E-45f
struct DynamicContrastParameters
{
float gain;
float min_output_level;
float max_output_level;
QList<float> const_piecewise_x;
QList<float> const_piecewise_y;
float max_log_input_level;
float app_min_log_input_level;
float app_max_log_input_level;
};
struct scanConversionParameters
{
quint32 pixelXNo;
quint32 pixelZNo;
quint32 gridX_size;
quint32 gridZ_size;
float dx;
float dz;
QList<float> gridX;
QList<float> gridZ;
QList<QList<float>> queryX;
QList<QList<float>> queryZ;
};
struct scanConversionMatrix
{
float a11;
float a12;
float b11;
float b12;
float b21;
float b22;
float c11;
float c12;
float dx;
float dz;
};
float linear_interpolate (float output, QList<float> x, QList<float> y, quint32 num);
float DynamicContrast(float input, DynamicContrastParameters &params);
QPair<qint32, qint32> readScanConversionIndex(float x, float z, scanConversionParameters &params);
float scanConversionFmaCalc(scanConversionMatrix &field);
#endif // KERNELPARAMS_H