I have a webcam that I want to do some image processing on using Python.
It's coming through as a Motion-JPEG. I want to try to process the stuff "live," but really what I want to do is this:
- Open the URL, start data streaming to some buffer...
- Read x bytes (where x is image size) to an image
- Process that image
- Display in result panel
- Return to number 2
The problem is that, while I do have the resolution, I have no idea how many bytes to read. I've tried googling the M-JPEG specification but can't find anything on if the images are separated by some header or what.
Anybody have any ideas?