Skip to content
Browse files

interface clean pour test correction ortho

  • Loading branch information...
1 parent efd1ca0 commit 347918010b976762e3ea59a01a04224ec3e50b99 Chuck committed Dec 9, 2012
Showing with 1 addition and 31 deletions.
  1. +1 −2 OCR/Main.ml
  2. +0 −29 OCR/main.ml
View
3 OCR/Main.ml
@@ -22,5 +22,4 @@ let mtx3 = Pretreatment.new_binarisation
OSdl.display (Pretreatment.mtx2su mtx3 w h pfi) w h;
OSdl.wait ();
(*OSdl.display (Pretreatment.mtx2su mtx_debug w h pfi) w h;*)
- exit 0
-
+ exit 0
View
29 OCR/main.ml
@@ -1,29 +0,0 @@
-(*
-Entrée du programme.
-*)
-let main () =
- if Array.length (Sys.argv) < 2 then
- failwith "Aucun fichier à charger";
- OSdl.init ();
- let su = Sdlloader.load_image Sys.argv.(1) in
- let si = Sdlvideo.surface_info su and
- pfi = Sdlvideo.surface_format su in
- let w = si.Sdlvideo.w and h = si.Sdlvideo.h in
- let mtx = Pretreatment.su2grey su w h in
- let mtx2 = Pretreatment.conv_filter_3x3 mtx w h
- [|2;5;2;5;20;5;2;5;2|] (1./.48.) in
- let mtx2 = Binarisation.wiener mtx2 in(*
- [|0;1;0;1;-4;1;0;1;0|] (1.) in
-let mtx3 = Pretreatment.new_binarisation
- (Pretreatment.pre_bin mtx2 w h) w h in*)
- let mtx3 = Binarisation.niblack mtx2 in
- let angle = Rotation.hough_skew_detection mtx3 w h in
- let mtx3 = Rotation.rotate mtx3 w h (-.angle) in
- (* let mtx_debug = Rotation.trace_line mtx3 w h (angle) in
- *) print_string " degree:";print_float (Tools.rad2deg angle);
- OSdl.display (Pretreatment.mtx2su mtx3 w h pfi) w h;
- OSdl.wait ();
- (*OSdl.display (Pretreatment.mtx2su mtx_debug w h pfi) w h;*)
- exit 0
-
-let _ = main ();

0 comments on commit 3479180

Please sign in to comment.
Something went wrong with that request. Please try again.