|
-
Apr 25th, 2002, 04:35 AM
#1
Thread Starter
New Member
Image Recognition
I am writing an application that takes snapshot images!
I would like to be able to call a function that will take any two images and give me an indicator that they have changed.
Basically a diff type function that would return a number indicating the threshold of the change.
ie. lDiff = jpregcompare(IMAGE1,IMAGE2) returns long;
lDiff would get some kind of number that I could use to determine weather or not the image changed enough for me to take action.
ie. video surveillance, turn on VCR, turn on Lights, ...etc
Anyone got any code or controls that will let you mess around like this????
-
Apr 25th, 2002, 05:19 AM
#2
Not NoteMe
A simple way would be to just loop through each pixel, and log when any are different. Then if this is a large enough number then count it as a change.
The more complicated way would be to, having logged a change, calculate how different it is, then decide based on that as well.
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
Apr 25th, 2002, 06:56 AM
#3
Frenzied Member
alright I am sure this is not the best way, but some way to go
you can invert the first picture and than draw the other one with paintpicture (BitBlt would do it too) with the operator vbSrcInvert onto the first one. Now you could look for any pixels not black and count them this will give you the total number of changed pixels.
Sanity is a full time job
Puh das war harter Stoff!
-
Apr 25th, 2002, 07:30 AM
#4
Good Ol' Platypus
However, since you are using JPEG and a video source, it will have a lot of different pictures because of compression and graininess. You better be careful with that method, rather than judging how many pixels changed, judge how much the pixels changed by.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Apr 25th, 2002, 07:49 AM
#5
Frenzied Member
true true I did not read through the post properly...
maybe the convolution thing would help you... (just a guess, not an answer to your problem) you could find some sample on that on www.ur.co.nz
Sanity is a full time job
Puh das war harter Stoff!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|