Boost logo

Boost Users :

Subject: Re: [Boost-users] Does anyone know how to detect image offset?
From: Jens Weller (JensWeller_at_[hidden])
Date: 2009-06-07 14:03:28


> Hi,
>
> I have two images:
>
> http://mercurius.f-snet.com/offset1.png
> http://mercurius.f-snet.com/offset1.png
> http://mercurius.f-snet.com/offset2.png
> http://mercurius.f-snet.com/offset2.png
>
> They are the same in visually by eyes, but actually they are different
> because of margin.
>
> Does anyone know any algorithm or way to compare these two images but
> ignores the offset of images?
> (I mean, offset2.png can be treated like offset1.png + n pixels offset, it
> only moved, not changed.)
>
> If I do boost::gil::equal_pixels(offset1, offset2), I will get false
> because
> they are different.
> I need a way to compare offset1.png and offset2.png with moving detection.
>
> Any suggestion is welcome!

Trim the first lines and rows from both images, which only contain pixels of white/transparent color. But thats surley expensive, as you have to look at a lot of pixels.

regards,

Jens Weller

-- 
GMX FreeDSL mit DSL 6.000 Flatrate und Telefonanschluss nur 17,95 Euro/mtl.!
http://dslspecial.gmx.de/freedsl-aktionspreis/?ac=OM.AD.PD003K11308T4569a

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net