-2

I'm developing an app for iOS that uses tesseract to convert a photographed image of an equation into text, so that it can then be solved. It will be something like what is in this tutorial: http://blog.ayoungprogrammer.com/2013/01/equation-ocr-part-1-using-contours-to.html

I know that this concept works on Windows using OpenCV and tesseract, but I would like to have this on iOS. I'm not very familiar with C++ and am trying to use OpenCV and tesseract on iOS.

There has already been a question on this: OCR for Equations and Formulae on the iOS Platform (Xcode) , but I know that it is indeed possible and not super ambitious, as it works on Windows.

I also believe that both OpenCV and Tesseract are supported on iOS, so there MUST be a way to get equation detection to work on iOS too.

Thanks in advance!

Community
  • 1
  • 1
Ankur Jain
  • 15
  • 1
  • 2
  • 8
  • Sorry but I fail to see a question there. What are you asking? if it is in fact possible to do? And to answer that, yes there is. – Leeloo Levin Mar 09 '14 at 21:33
  • Sorry if the question wasn't clear, but I want to know how do to it for iOS. Thanks – Ankur Jain Mar 09 '14 at 21:43
  • If there is a way to "convert a photographed image of an equation into text, so that it can then be solved." in general or in the specific manner that you ask about? – Leeloo Levin Mar 09 '14 at 21:45
  • Well in general for iOS, yes. I simply know of one solution which uses tesseract and OpenCV but I am not sure whether it works for iOS too. – Ankur Jain Mar 09 '14 at 21:47

1 Answers1

2

There are numerous ways of going about doing this, I've tinkered quite a bit myself on similar things and have gotten them to work for very specific conditions. As far as I can tell there is a tesseract that is made for equations and math in general. Tesseract for math and equations

And here is a link to an open source project that has a working iOS tesseract Pocket-OCR And here is the openCV framework for iOS openCV for iOS

If that's the route you want to go those links should get you up and running.

Leeloo Levin
  • 443
  • 2
  • 7
  • Thanks for the answer, and yes I know about the math/equation module and the iOS versions. I want to know HOW to use OpenCV to do this, because I know that it's implementation is different on Windows than iOS. How would I build the classes and call openCV and tesseract? How is the module used? I am not sure about these. Thanks – Ankur Jain Mar 09 '14 at 22:35
  • I would need at least a few days of hard coding to do it myself and that's with years of experience in C++ and obj-c. And to write a tutorial, that would take up several pages and quite possibly a video. I would urge you to try as best you can and whenever you stumble you ask a bit more specific question here on SO. here is a link to how to compile openCV in xcode http://stackoverflow.com/questions/15387596/compiling-opencv-2-4-on-a-64-bit-mac-in-xcode – Leeloo Levin Mar 09 '14 at 22:53
  • Ah, thanks for the response. By the way, would you know how to solve the problem of getting unrecognizable character/symbols when I use the equation module for tesseract? Would I need to "train" the characters? Once again, thanks for the help so far – Ankur Jain Mar 09 '14 at 23:20
  • As I have written my own algorithm for basically the same purpose and for other things not text related I'm not well versed in tessarects ability to learn completely new characters. I know it has the ability to learn new fonts, but I would say that you should in some way manipulate the lang.inttemp as it is the "Character shape templates for each unichar". Or use this http://vietocr.sourceforge.net/training.html to edit your characters. – Leeloo Levin Mar 09 '14 at 23:32
  • Okay, I'll look into that, thanks. Just to throw it out there, your algorithm isn't open is it? Sorry for the awkward question – Ankur Jain Mar 09 '14 at 23:35
  • My pleasure, hope I cleared some things up for you at least. And no sorry it is not openSource. Although I will at some point release it, but as it stands now it's not really a drag and drop kind of deal and would take to much setting up for people to be usable for anyone but me (that know every line of code). – Leeloo Levin Mar 09 '14 at 23:40