Solved

Image comparison techniques

Posted on 2009-04-01
7
835 Views
Last Modified: 2013-11-13
Hello,
I'm trying to develop an application that will detect objects inside a picture. The objects that I'm trying to detect are also moving, so I've tried a technique where I sample every 100ms and XOR the old and new pictures and unchanged pixels become black. I didn't have too much success doing this...

I've also tried searching through the 100ms samples for the images I'm trying to detect, this technique is obviously slow. I've tried to optimize it by stepping 3 pixels, but it still takes around 150ms to process the image.

Are there any techniques I can use? Fortunately, noise isn't really an issue in the images as they are computer generated images (it's a video game).

Thanks.
Brian
0
Comment
Question by:BrianGEFF719
  • 4
  • 2
7 Comments
 
LVL 27

Accepted Solution

by:
aburr earned 500 total points
ID: 24046369
Reverse engineer a digital camera with a face detecting feature.
0
 
LVL 27

Expert Comment

by:aburr
ID: 24046385
Photoshop has a feature which will subtract out from a picture any object which has moved.
0
 
LVL 27

Expert Comment

by:aburr
ID: 24046452
do you have a copy of the picture without the object? If so the object will be only those pixels which have changed.
If the object is solid color, different from background, and the object moves from off screen, then the object pixels will change from background to object and later from object to background again. That info might alow you to reconstruct the object.
Obviously I do not know enough of your particular situation to offer much more.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 19

Author Comment

by:BrianGEFF719
ID: 24046920
>>Photoshop has a feature which will subtract out from a picture any object which has moved.

The subtraction you're talking about is very similar to the XOR technique I previously mentioned. XORing will produce a similar result, all pixels that haven't changed will be black, changed pixel will have some color.

I do appreciate the suggestion but I'm looking for techniques that I can implement myself in my application. Do you perhaps have links to papers written on the subject?


Thanks for your time.

Brian
0
 
LVL 27

Expert Comment

by:aburr
ID: 24049875
Here are a few papers. They may help. I hope the links come through.


This paper details two moving-image processing algorithms, a visual-information processing we devel- oped to guide a vehicle through white-line detection ...
ieeexplore.ieee.org/iel2/637/6472/00254489.pdf?arnumber=254489 -
by S Shimizu - 1992 -


Image Subtraction for Real Time Moving Object Extraction. Full text, Full text available on the Publisher site Publisher Site. Source, CGIV archive ...
portal.acm.org/citation.cfm?id=1018415.1019172&coll=&dl=&CFID=15151515&CFTOKEN=6184618

Welcome to IEEE Xplore 2.0: Image subtraction for real time moving ...
Aug 24, 2004 ... Image subtraction for real time moving object extraction. Desa, S.M. Salih, Q.A.. Fac. of Inf. Technol., Multimedia Univ., Malaysia; ...
ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1323958
0
 
LVL 5

Expert Comment

by:InvincibleShield
ID: 24459408
I've done a bit of work with detection of objects and changing colours. Here are a couple of techniques I've used:

1. For each pixel analyzed, get the R, G, B, and find their the percent difference from the R, G, B of the expected colour (which could be the last colour detected). If the percent difference is low enough, and matches the colour that you were searching for, then you have a match. That's usually a pretty good technique for making bots (eg, shoot when the retical turns red).

2. If you are expecting to run into a lot of gradients, shades, or noise, take an average sample of the surrounding pixels. For instance, the average R, G, and B of (x, y), (x+1, y), (x-1, y), (x, y+1), etc...

3. I once used a function recursion to detect moving objects through a web cam. It was fairly basic - used the above two techniques to detect changes in brightness, and called itself, searching all surrounding sampled pixels to find the size of the moving object, allowing me to predict exactly where the object was and where it was moving. It was fairly complicated but worked quite well!

Hope this helps!
0
 
LVL 5

Expert Comment

by:InvincibleShield
ID: 24459563
** I started by saying #3 was fairly basic then finished with it being fairly complicated :P.

The concept is basic, but implementation was complicated. **
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mp4 file audio extraction 16 133
scores100 challenge 3 98
how to blot out certain parts of a video 2 62
Simple Calculation for Value of Availablity 5 77
A Guide to the PMT, FV, IPMT and PPMT Functions In MS Excel we have the PMT, FV, IPMT and PPMT functions, which do a fantastic job for interest rate calculations.  But what if you don't have Excel ? This article is for programmers looking to re…
This article seeks to propel the full implementation of geothermal power plants in Mexico as a renewable energy source.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now