JPG Photo File Analysis Using Basic Stamp
Hi
Has anyone attempted to build a matrix from a JPG photo file using a Basic Stamp controller?
Resolution of the file could be pretty poor.
I would like to take a photo of an area of my yard.
Then after time has passed,
take another photo and compare it with the 1st photo to see if there are any differences.
Possibly aim my steering mechanism to point of the differences and
drive my platform to the difference point.
I realize I'm at this time being quite vague.
This is a new adventure and I'm needing a starting point.
I'm building a scarecrow type platform that will discourage rabbits, deer and ground hogs from eating my garden.
The prototype platform has been completed and is currently RC controlled.
I've used BS1 and BS2 controllers in the past and am willing to use Propeller or other microcontroller to accomplish this goal.
Has anyone attempted to build a matrix from a JPG photo file using a Basic Stamp controller?
Resolution of the file could be pretty poor.
I would like to take a photo of an area of my yard.
Then after time has passed,
take another photo and compare it with the 1st photo to see if there are any differences.
Possibly aim my steering mechanism to point of the differences and
drive my platform to the difference point.
I realize I'm at this time being quite vague.
This is a new adventure and I'm needing a starting point.
I'm building a scarecrow type platform that will discourage rabbits, deer and ground hogs from eating my garden.
The prototype platform has been completed and is currently RC controlled.
I've used BS1 and BS2 controllers in the past and am willing to use Propeller or other microcontroller to accomplish this goal.
Comments
That said, however, why not do the JPEG stuff on your PC and use a connected BASIC Stamp for controlling the pan, tilt, and zoom?
-Phil
Post #4 of my index has some Propeller machine vision links.
I was successfully able to complete my CNC project, although it runs very slowly.
Phil - What would be the max amount of Memory and Horsepower available for a project like this?
I need to compare what is available to what I need.
Erco - Where did you come up with the 10x10 blocks.
I may very easily be able to use resolution of 10x10 blocks.
Dave - Any suggestions on where to find a way to read the 8x8 blocks from the original file?
This sounds somewhat possible to me.
Duane - is NTSC the same thing that television uses to define the picture displayed?
If I can somehow read a series of line scan numbers, I may be able to determine if something has changed.
Thanks for all of your help so far.
Any additional comments would be appreciated.
Please understand that I'm trying to find a means to an end.
I've printed your comments so far and will be attempting to find answers to this path.
I've never gone down this road before.
I've looked at Parallax PIR Sensor, but if it moves it will detect movement that doesn't exist.
I've looked at Parallax X-band motion detector, but it seems like it will pretty much do what PIR Sensor does if
the motion detector moves to scan an area.
I've considered PING sensors, but I need to figure out how to make them see what they are talking about.
That's what lead me to believe it may be more reliable to somehow interpret some type of photo image and compare
it with a source image.
Thanks again
garyg
This might work for your application.
My experience with video capture was to use Hanno's method of capturing a black and white images from a NTSC camera (I think either a color or a b&w camera would work).
Hanno only used four of the eight bits of from the ADC chip in the image he had transmitted to a PC. Since I was interested in displaying the captured image on a 12 x 10 LED array, I used 8-bits but only 120 pixels.
I had an 120 byte buffer in the Props memory. My program would use whatever values were in these 120 byte to set the brightnss of the 120 LEDs.
Here's my setup displaying what the small camera (held by my fingers in the top left of the photo) sees, on the LED array.
It may not be clear, but the word "HI" on the white board is being displayed on the array.
In this example, I could save the 120 bytes from one capture and then compare it against a later capture. If the value (brightness level) of enough of the bytes in one section of the image changed beyond a predetermined threshold, this could be an indication of movement within the field of view of the camera.
I used 120 pixels in this case because that was the size of my LED array. You might want to use more pixel or fewer pixels. I'd think this would require a lot of experimentation.
Phil has developed several video capture methods for the Prop (including color capture). You might want to check out his techniques before deciding which method you want to try.
The NTSC camera matrix sounds pretty interesting
I also never really thought about using my PC to do the heavy lifting of photo analysis.
In some manner, I could possibly use a stationary camera platform with PC attached.
then activate my platform to travel to the photo difference area either by having the platform detach from the pc or
by some wireless means, even if the wireless means is controlling my RC transmitter using servo motors operated by
the PC.
It may take quite a bit of my time over this winter to work this all out.
I've purchased a couple of parallax sensors, compass and ping to help with direction and close range object measurements.
and
I will be starting to look at analyzing some photos.
Thanks again
Simple comparison of captured frames just does not work in the real world.
FYI - check OpenCV ( OpenComputerVision ) discussion board to get a feel for video challenges.