Chris Hengge wrote:
> Yes, I understand what a loop is, and there was a loop but I didn't
> write that code into my email because I didn't need commenting on it.
> Here is the code so its clear incase you really care =P
Just because you don't need commenting on it doesn't mean it's not relevant.
E
Chris Hengge wrote:
> What I want to do with the data shouldn't really matter. I'm not
> completely sure what I want to do with the image data anyways, but for
> sake of arguement everything is happening in memory at this point, so
> 'objects' is correct. Images start in memory, and are being ev
Chris Hengge wrote:
> alist = difference(image1,image2)
> a = [b for b in alist.getdata() if b != (0,0,0)]
> if len(a) != 0:
>print "Not the same"
>
> is much slower then (9x)
>
> if im1.tostring() != im2.tostring()
>print "something changed!"
One reason the second version will be fa
What I want to do with the data shouldn't really matter. I'm not completely sure what I want to do with the image data anyways, but for sake of arguement everything is happening in memory at this point, so 'objects' is correct. Images start in memory, and are being evaluated in memory, never writte
Yes, I understand what a loop is, and there was a loop but I didn't write that code into my email because I didn't need commenting on it. Here is the code so its clear incase you really care =Pfrom PIL import Image
from PIL import ImageGrabimport timecapturedFrames = 100count = 0print "\nInitializi
Chris Hengge wrote:
> Thanks for the detailed examples again Luke. Sorry I wasn't more clear
> with my implimentation. The loop I was refering to was the one in the
> start of my post but using im.tostring() instead. I saw an example to
> make a webcam motion detector that used tostring(), but c
Chris Hengge wrote:
> alist = difference(image1,image2)
> a = [b for b in alist.getdata() if b != (0,0,0)]
> if len(a) != 0:
>print "Not the same"
>
> is much slower then (9x)
>
> if im1.tostring() != im2.tostring()
>print "something changed!"
>
> This loop itself is fairly slow by itse
alist = difference(image1,image2)a = [b for b in alist.getdata() if b != (0,0,0)]if len(a) != 0: print "Not the same"is much slower then (9x)if im1.tostring() != im2.tostring() print "something changed!"
This loop itself is fairly slow by itself though.. I'm going to try and see if there i
I tried the .tostring again, seems to be working using != instead of is not... Thanks for that thread link, very helpful. I'll look more into im.transform and see what I can come up with. I'm not sure I fully understand what it does, but I'm reading it as I'll remove the wanted section of im and tr
Thanks for the detailed examples again Luke. Sorry I wasn't more clear with my implimentation. The loop I was refering to was the one in the start of my post but using im.tostring() instead. I saw an example to make a webcam motion detector that used tostring(), but couldn't get the program to see
On Wed, 8 Nov 2006, Chris Hengge wrote:
> I'm trying to figure out how to compare im1 to im2 and recognize the
> difference. I dont care what the difference is...
>
> something like
>
> if im1 is not im2:
>print "Not same"
Do not use 'is' here. It is not doing any kind of equality testing
Chris Hengge wrote:
> I'm trying to figure out how to compare im1 to im2 and recognize the
> difference. I dont care what the difference is...
>
> something like
>
> if im1 is not im2:
> print "Not same"
Hey, Chris.
I'm supposing here that you are checking if the images are _visually_
differ
I'm trying to figure out how to compare im1 to im2 and recognize the difference. I dont care what the difference is... something likeif im1 is not im2: print "Not same"I've tried im.tostring
() but that doesn't ever enter the loop either.
13 matches
Mail list logo