|
Boost Users : |
Subject: Re: [Boost-users] Does anyone know how to detect image offset?
From: joel (joel.falcou_at_[hidden])
Date: 2009-06-09 06:28:04
blp330 wrote:
> Image difference will give 0? You mean there are no pixels different
> between offset3.png and offset4.png?
>
> I use boost::gil::equal_pixels, it returns false to me. I also use some
> comparison application, it hits me that the only different part is
> background pattern
Do a pixel-wise difference.
Result(x,y) = input1(x,y) - input2(x,y)
the resulting matrix will contains zone where the pixel value will be 0
and some where it wont.
It can be then thresholded so you get a mask.
I assume gil::equal_pixels do a reduction on such thing by returning a
single bool which is not what you want here
-- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35
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