Results 1 to 7 of 7

Thread: OCR in scar?

  1. #1
    Join Date
    Jul 2007
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default OCR in scar?

    Is there an include or script would do OCR for a certain font?

    Or would I have to make bitmaps of each character?

    Thanks in advance.

  2. #2
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    Search in the scar manual for LoadCharsFromFont
    I made a new script, check it out!.

  3. #3
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    TheBitmap := CreateBitmapMaskFromText('OCR', TheFontHere)
    The fonts are found in SCAR >> Font >>

  4. #4
    Join Date
    Jul 2007
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the replies, I think I know how to use the font now.

    Thanks!

  5. #5
    Join Date
    Jul 2007
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    whered the edit button go?
    so my question is,
    do i need to specify what size the font is, or bold or italic?

    (suppose i wanted myriad pro bold size 28.5)

  6. #6
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    SCAR Code:
    program FontTest;
    const
      fontname      = 'Tahoma';
      size          = 16;
      bold          = false;
      italic        = false;
      underline     = false;
      strikethrough = false;
    var
      font, bitmap, sizex, sizey: integer;
    begin
      //Load the font into memory
      font := LoadCharsFromFont2(fontname, size, bold, italic, underline, strikethrough);

      //Generate a bitmap mask from the previously loaded font
      bitmap := CreateBitmapMaskFromText('Hello', font);

      //Display the font in the debug window
      GetBitmapSize(bitmap, sizex, sizey);
      DisplayDebugImgWindow(sizex, sizey);
      CopyCanvas(GetBitmapCanvas(bitmap), GetDebugCanvas, 0, 0, sizex, sizey, 0, 0, sizex, sizey);
    end.
    Interested in C# and Electrical Engineering? This might interest you.

  7. #7
    Join Date
    Jul 2007
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the example script, but how would I go upon using scar to search for the font on a webpage , and return what it typed in plain text on the debug window?

    suppose the page had Hello World in time new roman, but it was an image. How would i go about using SCAR to identify what the text says and show it in the debug window?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 15
    Last Post: 09-22-2008, 12:32 PM
  2. SCAR Divi 3.01 DONT associate .scar files!!!
    By chimpy in forum News and General
    Replies: 1
    Last Post: 04-21-2007, 08:49 PM
  3. Replies: 28
    Last Post: 06-22-2006, 04:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •