https://svn.lrde.epita.fr/svn/oln/trunk/milena/sandbox
Index: ChangeLog
from Alexandre Abraham <abraham(a)lrde.epita.fr>
Fix coeff.
* nature/nature.cc: Fix coeff.
nature.cc | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
Index: nature/nature.cc
--- nature/nature.cc (revision 3183)
+++ nature/nature.cc (working copy)
@@ -191,17 +191,17 @@
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 @@
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 @@
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"));