MEPP2 Project
FEVV
Filters
Generic
Manifold
JustNoticeableDistortion
models
threshold.h
Go to the documentation of this file.
1
// Copyright (c) 2012-2019 University of Lyon and CNRS (France).
2
// All rights reserved.
3
//
4
// This file is part of MEPP2; you can redistribute it and/or modify
5
// it under the terms of the GNU Lesser General Public License as
6
// published by the Free Software Foundation; either version 3 of
7
// the License, or (at your option) any later version.
8
//
9
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11
#pragma once
12
13
#include "
genericparametricmodel.h
"
14
15
#include "
contrastmasking.h
"
16
#include "
contrastsensitivity.h
"
17
18
//-----------------------------------------------------------------------------------
19
20
struct
NWHWD16_Param
21
{
22
SarkisonCSF
csf
;
23
DalyMasking
masking
;
24
};
25
35
36
class
NWHWD16_Threshold
37
:
public
GenericParametricModel
< NWHWD16_Param, Eigen::Vector2d, double >
38
{
39
40
//-----------------------------------------------------------------------------------
41
42
public
:
43
NWHWD16_Threshold
()
44
:
GenericParametricModel
<
ParameterType
,
InputType
,
OutputType
>()
45
{
46
default_params
();
47
}
48
49
NWHWD16_Threshold
(
const
ParameterType
&
param
)
50
:
GenericParametricModel
<
ParameterType
,
InputType
,
OutputType
>(
param
)
51
{
52
}
53
54
virtual
~NWHWD16_Threshold
() {}
55
56
//-----------------------------------------------------------------------------------
57
58
public
:
59
virtual
void
compute
(
const
InputType
&in,
OutputType
&out)
const
60
{
61
double
c = in(0);
62
double
f = in(1);
63
double
_csf =
m_param
.
csf
(f);
64
out =
m_param
.
masking
(c * _csf) / _csf;
65
}
66
67
//-----------------------------------------------------------------------------------
68
69
protected
:
73
virtual
void
default_params
()
74
{
75
m_param
.
csf
=
SarkisonCSF
(
SarkisonCSF::ParameterType
(-15.13, 0.0096, 0.64));
76
m_param
.
masking
=
77
DalyMasking
(
DalyMasking::ParameterType
(0.0078, 88.29, 1.0, 4.207));
78
}
79
};
80
81
//=================================================================================//
NWHWD16_Threshold::compute
virtual void compute(const InputType &in, OutputType &out) const
Definition:
threshold.h:59
genericparametricmodel.h
NWHWD16_Param
Definition:
threshold.h:21
GenericParametricModel< NWHWD16_Param, Eigen::Vector2d, double >::InputType
Eigen::Vector2d InputType
Definition:
genericparametricmodel.h:24
GenericParametricModel< Eigen::Vector3d, double, double >::ParameterType
Eigen::Vector3d ParameterType
Definition:
genericparametricmodel.h:23
NWHWD16_Threshold
Definition:
threshold.h:38
GenericParametricModel< NWHWD16_Param, Eigen::Vector2d, double >::param
const ParameterType & param() const
Definition:
genericparametricmodel.h:44
contrastsensitivity.h
NWHWD16_Param::masking
DalyMasking masking
Definition:
threshold.h:23
NWHWD16_Threshold::default_params
virtual void default_params()
Definition:
threshold.h:73
SarkisonCSF
Definition:
contrastsensitivity.h:27
NWHWD16_Threshold::NWHWD16_Threshold
NWHWD16_Threshold()
Definition:
threshold.h:43
NWHWD16_Param::csf
SarkisonCSF csf
Definition:
threshold.h:22
NWHWD16_Threshold::~NWHWD16_Threshold
virtual ~NWHWD16_Threshold()
Definition:
threshold.h:54
NWHWD16_Threshold::NWHWD16_Threshold
NWHWD16_Threshold(const ParameterType ¶m)
Definition:
threshold.h:49
GenericParametricModel< NWHWD16_Param, Eigen::Vector2d, double >::m_param
ParameterType m_param
Definition:
genericparametricmodel.h:88
contrastmasking.h
GenericParametricModel
Definition:
genericparametricmodel.h:18
GenericParametricModel< NWHWD16_Param, Eigen::Vector2d, double >::OutputType
double OutputType
Definition:
genericparametricmodel.h:25
DalyMasking
Definition:
contrastmasking.h:30
Generated by
1.8.20