LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Read OSD date from avi file (https://www.linuxquestions.org/questions/linux-newbie-8/read-osd-date-from-avi-file-4175642041/)

kzo81 11-09-2018 11:10 AM

Read OSD date from avi file
 
Hi All,

I'd like to read the OSD date from avi files with python or ffmpeg.
I thought that I would extract the first jpeg from the avi file,
find the corner and extract the date from that. I'm currently reading OpenCV's pattern matching docs
Does anyone know an easy way to do this?

I've managed to get the OSD part of an image from my camera:

Code:

import cv2
import pytesseract

frame = 'axis.png'

img = cv2.imread(frame, 0)

osd = img[0:15, 0:img.shape[1]]


cv2.imshow('test', osd)

cv2.waitKey(1000)

print(pytesseract.image_to_string(osd, lang='eng'))


Thanks,

Zoli

goldennuggets 11-16-2018 06:39 AM

I don't know exactly, but I do know where to point you to.
I just started his email course (17 day crash course on openCV) and am on day 4.
Search this blog: https://www.pyimagesearch.com/

l0f4r0 11-16-2018 07:41 AM

Quote:

Originally Posted by goldennuggets (Post 5926675)

Nice!
Maybe https://www.pyimagesearch.com/2018/0...ith-tesseract/ more specifically?

goldennuggets 11-16-2018 07:43 AM

Quote:

Originally Posted by l0f4r0 (Post 5926710)

Yes! That looks like the perfect match.


All times are GMT -5. The time now is 08:30 PM.