?
Solved

Image comparison techniques

Posted on 2009-04-01
7
Medium Priority
?
850 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 2000 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Have you ever thought of installing a power system that generates solar electricity to power your house? Some may say yes, while others may tell me no. But have you noticed that people around you are now considering installing such systems in their …
This article covers the basics of data encryption, what it is, how it works, and why it's important. If you've ever wondered what goes on when you "encrypt" data, you can look here to build a good foundation for your personal learning.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Suggested Courses
Course of the Month13 days, 20 hours left to enroll

807 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