raspberrypi / picamera2

New libcamera based python library
BSD 2-Clause "Simplified" License
899 stars 190 forks source link

[HOW-TO] Capture continuous images from a stream #370

Closed h-robotics closed 2 years ago

h-robotics commented 2 years ago

Hello, I'm a beginner and I'm working on adding a text recognition feature for a robot I'm building using opencv and pytesseract. The tutorials I've found use the older picamera library and I've been looking for an alternative to the command picamera.capture_continuous and have not found it. Any ideas how to do this?

davidplowman commented 2 years ago

I don't think there's an API that is exactly the same, you would just put a capture_array or capture_file inside a loop. Here's one of our standard examples, showing one way to implement a continuous preview with text recognition: https://github.com/raspberrypi/picamera2/blob/main/examples/ocr.py

davidplowman commented 2 years ago

Hi, is there any other help you need with this question? If not, please do consider closing the issue, or I'll close it in a few days if nothing else comes up. Thanks!

h-robotics commented 2 years ago

Thank you, that helps! I will close the topic

On Fri, Oct 21, 2022 at 5:06 PM davidplowman @.***> wrote:

I don't think there's an API that is exactly the same, you would just put a capture_array or capture_file inside a loop. Here's one of our standard examples, showing one way to implement a continuous preview with text recognition: https://github.com/raspberrypi/picamera2/blob/main/examples/ocr.py

— Reply to this email directly, view it on GitHub https://github.com/raspberrypi/picamera2/issues/370#issuecomment-1286937419, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3XWZCQUHA5TT53VJGTYBWTWEKINRANCNFSM6AAAAAARLB4AZI . You are receiving this because you authored the thread.Message ID: @.***>