Blender
V5.0
source
blender
freestyle
intern
view_map
SteerableViewMap.h
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
12
13
#include <map>
14
15
#include "
../geometry/Geom.h
"
16
17
#include "
../system/FreestyleConfig.h
"
18
19
#include "
MEM_guardedalloc.h
"
20
21
using namespace
std;
22
23
namespace
Freestyle
{
24
25
using namespace
Geometry
;
26
27
class
FEdge
;
28
class
ImagePyramid
;
29
class
GrayImage
;
30
34
class
SteerableViewMap
{
35
protected
:
36
// for each vector the list of nbOrientations weights corresponding to its contributions
37
// to the nbOrientations directional maps
38
map<uint, double *>
_mapping
;
39
uint
_nbOrientations
;
40
ImagePyramid
**
_imagesPyramids
;
// the pyramids of images storing the different SVM
41
42
// internal
43
double
_bound
;
// cos(Pi/N)
44
vector<Vec2d>
_directions
;
45
46
public
:
47
SteerableViewMap
(
uint
nbOrientations = 4);
48
SteerableViewMap
(
const
SteerableViewMap
&iBrother);
49
virtual
~SteerableViewMap
();
50
52
virtual
void
Reset
();
53
58
double
*
AddFEdge
(
FEdge
*iFEdge);
59
61
double
ComputeWeight
(
const
Vec2d
&dir,
uint
iNOrientation);
62
67
uint
getSVMNumber
(
Vec2f
dir);
68
73
uint
getSVMNumber
(
uint
id
);
74
89
void
buildImagesPyramids
(
GrayImage
**steerableBases,
90
bool
copy
=
false
,
91
uint
iNbLevels = 4,
92
float
iSigma = 1.0f);
93
113
float
readSteerableViewMapPixel
(
uint
iOrientation,
int
iLevel,
int
x
,
int
y
);
114
120
float
readCompleteViewMapPixel
(
int
iLevel,
int
x
,
int
y
);
121
123
uint
getNumberOfPyramidLevels
()
const
;
124
126
uint
getNumberOfOrientations
()
const
127
{
128
return
_nbOrientations
;
129
}
130
132
void
saveSteerableViewMap
()
const
;
133
134
protected
:
135
void
Clear
();
136
void
Build
();
137
138
MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:SteerableViewMap"
)
139
};
140
141
}
/* namespace Freestyle */
uint
unsigned int uint
Definition
BLI_sys_types.h:64
FreestyleConfig.h
Configuration definitions.
Geom.h
Vectors and Matrices (useful type definitions).
MEM_guardedalloc.h
Read Guarded memory(de)allocation.
Freestyle::FEdge
Definition
Silhouette.h:461
Freestyle::GrayImage
Definition
Image.h:299
Freestyle::ImagePyramid
Definition
ImagePyramid.h:22
Freestyle::SteerableViewMap::AddFEdge
double * AddFEdge(FEdge *iFEdge)
Definition
SteerableViewMap.cpp:111
Freestyle::SteerableViewMap::getSVMNumber
uint getSVMNumber(Vec2f dir)
Definition
SteerableViewMap.cpp:138
Freestyle::SteerableViewMap::Clear
void Clear()
Definition
SteerableViewMap.cpp:71
Freestyle::SteerableViewMap::_nbOrientations
uint _nbOrientations
Definition
SteerableViewMap.h:39
Freestyle::SteerableViewMap::readCompleteViewMapPixel
float readCompleteViewMapPixel(int iLevel, int x, int y)
Definition
SteerableViewMap.cpp:216
Freestyle::SteerableViewMap::_bound
double _bound
Definition
SteerableViewMap.h:43
Freestyle::SteerableViewMap::getNumberOfPyramidLevels
uint getNumberOfPyramidLevels() const
Definition
SteerableViewMap.cpp:221
Freestyle::SteerableViewMap::getNumberOfOrientations
uint getNumberOfOrientations() const
Definition
SteerableViewMap.h:126
Freestyle::SteerableViewMap::SteerableViewMap
SteerableViewMap(uint nbOrientations=4)
Definition
SteerableViewMap.cpp:33
Freestyle::SteerableViewMap::_mapping
map< uint, double * > _mapping
Definition
SteerableViewMap.h:38
Freestyle::SteerableViewMap::_directions
vector< Vec2d > _directions
Definition
SteerableViewMap.h:44
Freestyle::SteerableViewMap::~SteerableViewMap
virtual ~SteerableViewMap()
Definition
SteerableViewMap.cpp:66
Freestyle::SteerableViewMap::ComputeWeight
double ComputeWeight(const Vec2d &dir, uint iNOrientation)
Definition
SteerableViewMap.cpp:98
Freestyle::SteerableViewMap::Reset
virtual void Reset()
Definition
SteerableViewMap.cpp:92
Freestyle::SteerableViewMap::saveSteerableViewMap
void saveSteerableViewMap() const
Definition
SteerableViewMap.cpp:229
Freestyle::SteerableViewMap::readSteerableViewMapPixel
float readSteerableViewMapPixel(uint iOrientation, int iLevel, int x, int y)
Definition
SteerableViewMap.cpp:195
Freestyle::SteerableViewMap::Build
void Build()
Definition
SteerableViewMap.cpp:44
Freestyle::SteerableViewMap::_imagesPyramids
ImagePyramid ** _imagesPyramids
Definition
SteerableViewMap.h:40
Freestyle::SteerableViewMap::buildImagesPyramids
void buildImagesPyramids(GrayImage **steerableBases, bool copy=false, uint iNbLevels=4, float iSigma=1.0f)
Definition
SteerableViewMap.cpp:177
y
y
Definition
compositor_morphological_blur_infos.hh:22
Freestyle::Geometry
Definition
Geom.h:18
Freestyle::Geometry::Vec2d
VecMat::Vec2< double > Vec2d
Definition
Geom.h:23
Freestyle::Geometry::Vec2f
VecMat::Vec2< float > Vec2f
Definition
Geom.h:22
Freestyle
inherits from class Rep
Definition
AppCanvas.cpp:20
Freestyle::x
static uint x[3]
Definition
RandGen.cpp:77
copy
static void copy(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node)
Definition
node_texture_output.cc:130
Generated on
for Blender by
doxygen
1.16.1