Commit a76f5609 authored by Kenneth Vanhoey's avatar Kenneth Vanhoey
Browse files

Minor selector and approximator modifications

parent 6e91eb68
...@@ -2020,7 +2020,7 @@ void EdgeSelector_Lightfield<PFP>::computeEdgeInfo(Dart d, EdgeInfo& einfo) ...@@ -2020,7 +2020,7 @@ void EdgeSelector_Lightfield<PFP>::computeEdgeInfo(Dart d, EdgeInfo& einfo)
const REAL& errLF = quadHF(newHF) ; // function coefficients const REAL& errLF = quadHF(newHF) ; // function coefficients
// Check if errated values appear // Check if errated values appear
if (errG < -1e-10 || errAngle < -1e-10 || errLF < -1e-10) if (errG < -1e-6 || errAngle < -1e-6 || errLF < -1e-6)
einfo.valid = false ; einfo.valid = false ;
else else
{ {
......
...@@ -204,7 +204,7 @@ void Approximator_HemiFuncCoefs<PFP>::approximate(Dart d) ...@@ -204,7 +204,7 @@ void Approximator_HemiFuncCoefs<PFP>::approximate(Dart d)
bool opt = m_quadricHF[d].findOptimizedCoefs(coefs) ; bool opt = m_quadricHF[d].findOptimizedCoefs(coefs) ;
// copy result // copy result
for (unsigned int i = 0 ; i < m_nbCoefs ; ++i) for (unsigned int i = 0 ; i < m_nbCoefs ; ++i)
this->m_approx[i][d] = opt ? coefs[i] : (m_coefs[i]->operator[](d) + m_coefs[i]->operator[](dd))/2 ; // if fail average coefs (TODO better) this->m_approx[i][d] = coefs[i] ;
if (!opt) if (!opt)
std::cerr << "LightfieldApproximator::Inversion failed: coefs are averaged" << std::endl ; std::cerr << "LightfieldApproximator::Inversion failed: coefs are averaged" << std::endl ;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment