You might look at Image Magic. I am using Ruby which has a wrapper RMagick -
drawing outline boxes in blue on a black image. The Outline.tdrect sets up
the rectangles and gc.draw(izb) superimposes them on the tif image.  The
images vary slightly in size, so the bounding box information is used to
tweek things. It works, but could work better.

        Zlib::GzipReader.open("imagefiles/" + fname + ".tif.gz"){|gz|
          gzb = gz.read
          izb = ImageList.new
          izb.from_blob(gzb)
          bb = izb.bounding_box
          bbtxt = "#{bb.width}x#{bb.height}+#{bb.x}x#{bb.y}"
          gc = Outline.tdrect(bbtxt)
          gc.draw(izb)
          izb.resize(0.3).display
        `tesseract #{name + ".tif"} #{name}`
      )

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ocropus" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/ocropus?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to