Does anyone know of a method to make images picklable? I am trying to pass OpenCV images between processes to separate display from real-time processing of an OpenCV video. I have tried PIL Image.tostring(), but to no avail. Is there a standard technique?
Asked
Active
Viewed 123 times
1
Kate Gregory
- 18,623
- 8
- 55
- 85
Raoul
- 1,842
- 3
- 25
- 47
2 Answers
1
This is what you are looking for: pickleable image object
Making it a dict and then using the information in the dict to recreate the image again. Hopefully this helps
Community
- 1
- 1
PurityLake
- 1,050
- 10
- 18
0
OpenCV's newer cv2 module uses NumPy arrays, which are inherently pickleable. See my answer here: https://stackoverflow.com/a/17054961/1510289
Community
- 1
- 1
Velimir Mlaker
- 10,151
- 4
- 43
- 55