Guest User

Untitled

a guest
Nov 16th, 2011
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.21 KB | None | 0 0
  1. #include <tesseract/mfcpch.h>
  2. #include <ctype.h>
  3. #include <tesseract/applybox.h>
  4. #include <tesseract/control.h>
  5. #include <tesseract/tessvars.h>
  6. #include <tesseract/tessedit.h>
  7. #include <tesseract/baseapi.h>
  8. #include <tesseract/thresholder.h>
  9. #include <tesseract/pageres.h>
  10. #include <tesseract/imgs.h>
  11. #include <tesseract/varabled.h>
  12. #include <tesseract/tprintf.h>
  13. #include <tesseract/tesseractmain.h>
  14. #include <tesseract/stderr.h>
  15. #include <tesseract/notdll.h>
  16. #include <tesseract/mainblk.h>
  17. #include <tesseract/output.h>
  18. #include <tesseract/globals.h>
  19. #include <tesseract/helpers.h>
  20. #include <tesseract/blread.h>
  21. #include <tesseract/tfacep.h>
  22. #include <tesseract/callnet.h>
  23.  
  24. int main()
  25. {
  26.     tesseract::TessBaseAPI tmp;
  27.     tmp.Init("blah","eng");
  28.     tmp.SetPageSegMode(tesseract::PSM_AUTO);
  29.     IMAGE image;
  30.     image.read_header("newimage.tiff");
  31.     int bytes_per_line = check_legal_image_size(image.get_xsize(),
  32.                                                 image.get_ysize(),
  33.                                                 image.get_bpp());
  34.     tmp.SetInputName("newimage.tiff");
  35.         tmp.SetImage(image.get_buffer(), image.get_xsize(), image.get_ysize(),image.get_bpp() / 8, bytes_per_line);
  36.     tmp.GetUTF8Text();
  37. }
  38.  
Advertisement
Add Comment
Please, Sign In to add comment