Commit 243e8bfc authored by Alexandre Abraham's avatar Alexandre Abraham
Browse files

Fix coeff.

	* nature/nature.cc: Fix coeff.


git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@3184 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent c30315b2
2009-01-21 Alexandre Abraham <abraham@lrde.epita.fr>
Fix coeff.
* nature/nature.cc: Fix coeff.
2009-01-21 Alexandre Abraham <abraham@lrde.epita.fr>
Fix call to 'at'.
......
......@@ -191,17 +191,17 @@ int main (int argc, const char * argv [])
score[PHOTO] += 100 - max;
score[TEXT] += max * 2;
score[SCREENSHOT] += 50 + max / 2;
score[SCREENSHOT] += 80 + max / 2;
score[DRAWING] += 50 + max / 2;
std::cout << "Test 2 : co-occurence matrix diag_max[" << max << "]" << std::endl
<< "Photo : +" << 100 - max << std::endl;
std::cout << "Screenshot : +" << 50 + max / 2 << std::endl;
std::cout << "Screenshot : +" << 80 + max / 2 << std::endl;
std::cout << "Text : +" << max * 2 << std::endl;
std::cout << "Drawing : +" << 50 + max / 2 << std::endl << std::endl;
std::cout << "Drawing : +" << 80 + max / 2 << std::endl << std::endl;
......@@ -385,15 +385,15 @@ int main (int argc, const char * argv [])
cpt = 50;
score[PHOTO] += 50 - cpt;
score[SCREENSHOT] += cpt * 5;
score[TEXT] += 50 + cpt * max / 10;
score[DRAWING] += 2 * (50 - cpt);
score[SCREENSHOT] += cpt * 8;
score[TEXT] += 50 + cpt * max / 3;
score[DRAWING] += 2 * (60 - cpt);
std::cout << "Test 3 : rectangle detection[" << cpt << "]" << std::endl
<< "Photo : +" << 50 - cpt << std::endl
<< "Screenshot : +" << cpt * 8 << std::endl
<< "Text : +" << 50 + cpt * max / 10 << std::endl
<< "Drawing : +" << 2 * (50 - cpt) << std::endl << std::endl;
<< "Text : +" << 50 + cpt * max / 3 << std::endl
<< "Drawing : +" << 2 * (60 - cpt) << std::endl << std::endl;
// Last but not least : text detection thanks to FFT
......@@ -464,15 +464,15 @@ int main (int argc, const char * argv [])
dist = dist / (log(fftb.nelements()) / log(10));
score[PHOTO] += dist * 25;
score[SCREENSHOT] += dist * 25;
score[TEXT] += (1 + cos(arg)) * (4 - dist) * 25;
score[DRAWING] += dist * 25;
score[SCREENSHOT] += dist * 50;
score[TEXT] += (1 + abs(cos(arg))) * (4 - dist) * 40;
score[DRAWING] += dist * 50;
std::cout << "Test 4 : Fourier distance[" << dist << "]" << std::endl
<< "Photo : +" << dist * 25 << std::endl
<< "Screenshot : +" << dist * 25 << std::endl
<< "Text : +" << (1 + cos(arg)) * (4 - dist) * 25 << std::endl
<< "Drawing : +" << dist * 25 << std::endl << std::endl;
<< "Screenshot : +" << dist * 50 << std::endl
<< "Text : +" << (1 + abs(cos(arg))) * (4 - dist) * 40 << std::endl
<< "Drawing : +" << dist * 50 << std::endl << std::endl;
// io::pbm::save(binarization::threshold(fft, max * 4 / 10), name.append("_fft.pbm"));
......
Supports Markdown
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