0

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.

eWizardII
  • 1,916
  • 4
  • 32
  • 55
  • 1
    Do 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 Answers1

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