Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
CAMP
campvis-public
Commits
d505a70f
Commit
d505a70f
authored
Dec 09, 2014
by
Declara Denis
Committed by
Christian Schulte zu Berge
Feb 18, 2015
Browse files
Wired the reset weights button in ConfidenceMapsSolver to the actual logic
parent
aca4c040
Changes
3
Hide whitespace changes
Inline
Side-by-side
modules/cudaconfidencemaps/core/cm_cusp.h
View file @
d505a70f
...
...
@@ -17,9 +17,10 @@ public:
virtual
const
float
*
getSolution
(
int
&
width
,
int
&
height
)
const
;
private:
// Input image data
int
width
,
height
;
private:
// Matrices and Vectors
CuspGPUData
*
gpuData
;
...
...
modules/cudaconfidencemaps/processors/cudaconfidencemapssolver.cpp
View file @
d505a70f
...
...
@@ -64,10 +64,13 @@ namespace campvis {
CudaConfidenceMapsSolver
::~
CudaConfidenceMapsSolver
()
{
}
void
CudaConfidenceMapsSolver
::
init
()
{
//CUSP_CM_initCuda();
p_resetResult
.
s_clicked
.
connect
(
this
,
&
CudaConfidenceMapsSolver
::
resetSolutionVector
);
resetSolutionVector
();
}
void
CudaConfidenceMapsSolver
::
deinit
()
{
}
void
CudaConfidenceMapsSolver
::
deinit
()
{
p_resetResult
.
s_clicked
.
disconnect
(
this
);
}
void
CudaConfidenceMapsSolver
::
updateResult
(
DataContainer
&
data
)
{
...
...
@@ -101,4 +104,17 @@ namespace campvis {
}
void
CudaConfidenceMapsSolver
::
updateProperties
(
DataContainer
&
dataContainer
)
{
}
void
CudaConfidenceMapsSolver
::
resetSolutionVector
()
{
// Create a linear gradient image of the same size as the input image
size_t
elementCount
=
_solver
.
width
*
_solver
.
height
;
std
::
vector
<
float
>
gradient
(
elementCount
);
for
(
size_t
i
=
0
;
i
<
elementCount
;
++
i
)
{
float
value
=
static_cast
<
float
>
(
i
/
_solver
.
width
)
/
static_cast
<
float
>
(
_solver
.
height
-
1
);
gradient
[
i
]
=
value
;
}
_solver
.
setInitialSolution
(
gradient
);
}
}
\ No newline at end of file
modules/cudaconfidencemaps/processors/cudaconfidencemapssolver.h
View file @
d505a70f
...
...
@@ -94,6 +94,7 @@ namespace campvis {
protected:
void
resetSolutionVector
();
CuspConfidenceMapSolver
_solver
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment