Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to process output of VideoCapture::read #38

Open
DamianMel opened this issue Aug 23, 2019 · 2 comments
Open

Add possibility to process output of VideoCapture::read #38

DamianMel opened this issue Aug 23, 2019 · 2 comments

Comments

@DamianMel
Copy link

Hi!
I very like your project, great job!

I'm thinking about one feature which would be very useful:
OpenCV allows to grab frame after frame from realitme stream (https://docs.opencv.org/2.4/modules/highgui/doc/reading_and_writing_images_and_video.html#videocapture-read)

For now workaround would be to read frame, save it to file and read img file via PassportEye.

Could it be possible for you to add such feature?

Have a nice day.

@DamianMel
Copy link
Author

I recently found workaround for this issue:

is_success, buffer = cv2.imencode(".jpg", img)
io_buf = io.BytesIO(buffer)
mrz = read_mrz(io_buf)

Maybe it helps someone

@konstantint
Copy link
Owner

Hey, sorry for a delayed reaction. Good that you found the workaround.
In general it is true that forcing a file (or a file stream) as input is an unnecessary limitation, and supporting raw pixel arrays as input might be nice as well. I'll try to add this feature when I get the time to work on the code again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants