diff src/testtune.cpp @ 5:3b734fd6ee2b

v0.2
author pyon@macmini
date Thu, 06 Oct 2011 20:27:54 +0900
parents 1ea4f7981ff5
children b59dfcc84d7a
line wrap: on
line diff
--- a/src/testtune.cpp	Thu Oct 06 07:56:12 2011 +0900
+++ b/src/testtune.cpp	Thu Oct 06 20:27:54 2011 +0900
@@ -1,10 +1,11 @@
 // Filename   : testtune.cpp
-// Last Change: 29-Sep-2011.
+// Last Change: 06-Oct-2011.
 //
 
 #include "wx/utils.h"
 #include "wx/file.h"
 #include "wx/string.h"
+#include "wx/app.h"
 #include "wx/image.h"
 
 bool IsBlack( int r, int g, int b ) 
@@ -74,15 +75,15 @@
         if( IsBlack( (int)r, (int)g, (int)b ) ) black++;
     }
     float z = (float)black / h;
-    float zmin = 0.103428 * 0.95;
-    float zmax = 0.103428 * 1.05;
+    float zmin = 0.095713;
+    float zmax = 0.108600;
 
     wxFile f( file );
     long l = f.Length();
-    float lmin = 2181468 * 0.95;
-    float lmax = 2181468 * 1.05;
+    float lmin = 2072393;
+    float lmax = 2346082;
 
-    //wxPuts(wxString::Format(wxT("z = %f, len = %d"),z,len));
+    wxPuts(wxString::Format(wxT("z = %f, len = %d"),z,l));
     if ( zmin < z && z < zmax
       && lmin < l && l < lmax ) {
         return true;
@@ -93,9 +94,15 @@
 int main( int argc, char **argv ) 
 {
     wxInitAllImageHandlers();
-    wxString file = wxT("img\\img081.jpg");
+    //wxString file = wxT("nodetect/img045.jpg");
+    //wxString file = wxT("nodetect/img073.jpg");
+    //wxString file = wxT("nodetect/img174.jpg");
+    //wxString file = wxT("nodetect/img182.jpg");
+    //wxString file = wxT("nodetect/img246.jpg");
+    //wxString file = wxT("nodetect/img268.jpg");
+    wxString file = wxT("nodetect/img294.jpg");
 
-    if ( IsMarksheet( file ) ) wxPuts(wxT("perhaps marksheet !"));
+    if ( IsMarksheet( file ) ) wxPuts(file+wxT(" is perhaps marksheet !"));
     wxString hhs = GuessHhs( file );
     wxPuts(hhs);