Camera Image Comparison

Discuss digital image processing techniques and algorithms. We encourage its application to ImageMagick but you can discuss any software solutions here.
Post Reply
Marsell4k
Posts: 2
Joined: 2012-04-30T04:34:50-07:00
Authentication code: 13

Camera Image Comparison

Post by Marsell4k »

Hi,

I am in the planning stages of a project that will use some sort of recognition software and after asking for advice, i was directed to this forum.
My project involves taking a picture & immediately comparing it to a stored image. Each new image is scored for comparison to the original & depending on the similarity score a simple switch is activated.  The image will be a side profile sillouette of something. This would be the sole use.
The camera taking the image would be stationary & would activate when something passes in front of it. With how I'm setting this up there should be a minimal amount of interuption by anything other than what i want to compare. Also I'm hoping light & dark won't affect it too much but if it does then I already have a solution for keeping it the same every time. Last i also need to know if it's possible to run this software without using a PC.

I'm not very technically skilled and any thoughts or advice people can pass on would be very useful.

Thanks,

Mike
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Camera Image Comparison

Post by fmw42 »

ImageMagic does have such a comparison function. It is called compare. It gives you a choice of comparison metrics for a single number score and also produces a difference image showing you where the changes occur. You can read about it at:

http://www.imagemagick.org/script/compare.php
http://www.imagemagick.org/Usage/compare/
http://www.imagemagick.org/Usage/compare/#statistics

If lighting is a problem, then one solution is to extract edges and threshold to binary edges. Then compare these images.

You must install ImageMagick on a computer (window, linux, mac) to run this function.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Camera Image Comparison

Post by anthony »

My response when redirecting user to this forum...


Essentially you "compare" (that is a program) the average of the last
few images against the current image, and if they get more than a small
amount of change (due to noise or light level changes) then something
activated it.

Note you can not just compare with a 'starting image' especially an
outside camera view, as lighting levels change the scene dramatically.

Also, you don't want someone leaving some new object in the image,
constantly triggering the test for more than a short period of time.
That is a new folder on a desk, or a car that was parked in camera view.

By averaging multiple images removes (reduces) most previous transient
noise effects from that image, so it compares better to the new image to
find 'new' transient effects. At least for a short period, until the new
change becomes a 'static' part of the view.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Marsell4k
Posts: 2
Joined: 2012-04-30T04:34:50-07:00
Authentication code: 13

Re: Camera Image Comparison

Post by Marsell4k »

Thanks for your responses.

Anthony the lighting and new object shouldn't be a problem. The conditions I'm planning on using the software in should mean these stay virtually the same every time without interruption. It would be the contours of a side profile shot that I would want to compare each time.

Mike
Post Reply