In python I am computing the difference between two images uses ImageChops.difference is there a faster way to do this computation? Since it's relatively slow on 720p images, I let it run for about 6 loops, and it took about 30 seconds (using the line_profiler) for analysis.
Asked
Active
Viewed 297 times
0
-
1Do you want to stick with ImageChops? OpenCV can do what you need and is really good performance-wise. – Igonato Oct 05 '13 at 15:16
-
Only reason I haven't delved into OCV is the Raspberry camera module I am using isn't well supported on it - but hopefully I'll be able to implement this in the future. – eWizardII Oct 05 '13 at 19:04
1 Answers
2
Use numpy. Put the image data in 2 numpy float arrays, then just do the difference between the two arrays.

mguijarr
- 7,641
- 6
- 45
- 72
-
Thanks the seems to have reduced the speed drastically - just have to figure out a faster way to do Image.resize images now. – eWizardII Oct 05 '13 at 19:04
-