Mercurial > mercurial > hgweb_mover.cgi
comparison include/marksheet.h @ 5:3b734fd6ee2b
v0.2
| author | pyon@macmini |
|---|---|
| date | Thu, 06 Oct 2011 20:27:54 +0900 |
| parents | a505f7417742 |
| children |
comparison
equal
deleted
inserted
replaced
| 4:a505f7417742 | 5:3b734fd6ee2b |
|---|---|
| 1 // Filename : marksheet.h | 1 // Filename : marksheet.h |
| 2 // Last Change: 05-Oct-2011. | 2 // Last Change: 06-Oct-2011. |
| 3 // | 3 // |
| 4 #ifndef __MARKSHEET__ | 4 #ifndef __MARKSHEET__ |
| 5 #define __MARKSHEET__ | 5 #define __MARKSHEET__ |
| 6 | 6 |
| 7 | 7 |
| 75 g = img.GetGreen( x, y ); | 75 g = img.GetGreen( x, y ); |
| 76 b = img.GetBlue( x, y ); | 76 b = img.GetBlue( x, y ); |
| 77 if( IsBlack( (int)r, (int)g, (int)b ) ) black++; | 77 if( IsBlack( (int)r, (int)g, (int)b ) ) black++; |
| 78 } | 78 } |
| 79 float z = (float)black / h; | 79 float z = (float)black / h; |
| 80 float zmin = 0.103428 * 0.95; | 80 float zmin = 0.095713; |
| 81 float zmax = 0.103428 * 1.05; | 81 float zmax = 0.108600; |
| 82 | 82 |
| 83 wxFile f( file ); | 83 wxFile f( file ); |
| 84 long l = f.Length(); | 84 long l = f.Length(); |
| 85 float lmin = 2181468 * 0.95; | 85 float lmin = 2072393; |
| 86 float lmax = 2181468 * 1.05; | 86 float lmax = 2346082; |
| 87 | 87 |
| 88 //wxPuts(wxString::Format(wxT("z = %f, len = %d"),z,len)); | 88 //wxPuts(wxString::Format(wxT("z = %f, len = %d"),z,len)); |
| 89 if ( zmin < z && z < zmax | 89 if ( zmin < z && z < zmax |
| 90 && lmin < l && l < lmax ) { | 90 && lmin < l && l < lmax ) { |
| 91 return true; | 91 return true; |
