candreshidalgo wrote: ↑
Tue Feb 27, 2018 12:22 am
Maybe I'm thinking wrongly about the solution. What I need to do is to take photos
with the raspberry pi 3 and compare the photo with the previous one and if they are
not the same send them to google cloud vision and then...
No two separately taken images will ever be the same in the ImageChops.difference sense. There will always be some pixels that differ.
So you probably need a way to detect significant
differences in the presence of insignificant differences..
A good startingpoint might be the package "Motion" that should bein the repositories.
That compares successive images for significant changes and can save still images or video when changes are detected.
There are much smarter ways to do this sort of thing but itdoes getcomplex. Beyondlooking for pixels changing brightnss you could look for connected areas of pixels moving together, having the rough size and shape of a huma. You couldlook atpatterns of motion. You could use tensor flow AI to identify what's in the scene from shapes and motions. But that is all heavy stuff.
OpenCV is a great resource for this sort of thing but look for examples that do what you want. Computer vision is a really big subject.
You will find examples using OpenCV to detect faces in an image. Maybe that would help.
I suggest you start with Motion and see how well that detect changes that interest you. If that works for you write a script that posts the images saved by Motion off to the cloud for whatever processing you want to do there