Skip to content

Commit

Permalink
Fixed optimizer code in shared library
Browse files Browse the repository at this point in the history
  • Loading branch information
tjof2 committed Apr 13, 2016
1 parent 124686e commit 40e0775
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ project (PGURE-SVT CXX)
set(OS unix)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake_aux/Modules/")

option(BUILD_LIBRARY "Build the shared library" OFF)
option(BUILD_LIBRARY "Build the shared library" ON)
option(BUILD_EXECUTABLE "Build a standalone executable" ON)

include(CheckIncludeFileCXX)
Expand Down
22 changes: 19 additions & 3 deletions src/lib-PGURE-SVT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,12 @@ extern "C" int PGURESVT(double *X,
// Perform noise estimation
if(pgureOpt) {
NoiseEstimator *noise = new NoiseEstimator;
noise->Estimate(u, alpha, mu, sigma, 8, NoiseMethod);
noise->Estimate(u,
alpha,
mu,
sigma,
8,
NoiseMethod);
delete noise;
}

Expand All @@ -225,7 +230,12 @@ extern "C" int PGURESVT(double *X,
/////////////////////////////

MotionEstimator *motion = new MotionEstimator;
motion->Estimate(ufilter, timeiter, framewindow, num_images, Bs, Bo, MotionP);
motion->Estimate(ufilter,
timeiter,
framewindow,
num_images,
Bs,
MotionP);
arma::icube sequencePatches = motion->GetEstimate();
delete motion;

Expand All @@ -236,7 +246,13 @@ extern "C" int PGURESVT(double *X,
/////////////////////////////

PGURE *optimizer = new PGURE;
optimizer->Initialize(u, sequencePatches, Bs, Bo, alpha, sigma, mu);
optimizer->Initialize(u,
sequencePatches,
Bs,
Bo,
alpha,
sigma,
mu);
// Determine optimum threshold value (max 1000 evaluations)
if(pgureOpt) {
lambda = (timeiter == 0) ? arma::accu(u)/(Nx*Ny*T) : lambda;
Expand Down

0 comments on commit 40e0775

Please sign in to comment.