0

I'm making kivy app to recognize character with camera on real-time. However, there is no document except recognizing face. I think there is a way because picamera is almost doing similar thing (creating opencv file from camera).

Would someone tell me to achieve this?

* PS * I'm on the way to capture image when camera sees the number, but I don't know how to make that trigger. Now this is the code, and I want to know when to break true sentence.

    cap = cv2.VideoCapture(0)
    while(True):
        ret, image = cap.read()
        cv2.imshow('image', image)
        results = tes.image_to_string(image, boxes=True)
        if results:
            break
    cap.release()
    cv2.destroyAllWindows()
    print(results)

but this one is too slow

1 Answers1

0

How about using pytesseract 0.2.4 for that purpose? It looks like best solution, according to dr. Google

Filip Matyja
  • 137
  • 1
  • 2
  • 11
  • Thank you Fillip, I tried but it only detects image file, not directly live-camara. –  Sep 02 '18 at 11:30
  • How about if you capture the image every let's say 300ms, and work on it as normal image? [Simillar topic 1](https://stackoverflow.com/questions/24574637/auto-capture-an-image-from-a-video-in-opencv-using-python) [Simillar topic 2](https://stackoverflow.com/questions/32943227/python-opencv-capture-images-from-webcam) – Filip Matyja Sep 02 '18 at 11:36
  • 1
    that may work...but may be slow. thanks anyway, until the idea comes up, I will do that way –  Sep 02 '18 at 11:38
  • I don't think you even have to save it. You can just take frame and work on it, as described in [this tutorial](https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_gui/py_video_display/py_video_display.html). – Filip Matyja Sep 02 '18 at 11:46
  • Oh! I didn't know that only capturing is not requiring saving! It might be help, I'm going to work in that way! –  Sep 02 '18 at 12:01