[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

hugin_base/vigra_ext/Correlation.h File Reference

#include <hugin_shared.h>
#include <vigra/stdimage.hxx>
#include <vigra/inspectimage.hxx>
#include <vigra/copyimage.hxx>
#include <vigra/resizeimage.hxx>
#include <vigra/transformimage.hxx>
#include <vigra/impex.hxx>
#include "hugin_utils/utils.h"
#include "hugin_math/hugin_math.h"
#include "vigra_ext/Pyramid.h"
#include "vigra_ext/FitPolynom.h"
#include "vigra_ext/utils.h"
#include "vigra_ext/ImageTransforms.h"

Include dependency graph for Correlation.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Namespaces

namespace  vigra_ext

Classes

struct  vigra_ext::CorrelationResult
 Maximum of correlation, position and value. More...
class  vigra_ext::RotateTransform
 clockwise rotation around a origin point, and a translation afterwards. More...

Defines

#define VIGRA_EXT_USE_FAST_CORR

Functions

template<class SrcImage, class DestImage, class KernelImage>
CorrelationResult correlateImageFast (SrcImage &src, DestImage &dest, KernelImage &kernel, vigra::Diff2D kul, vigra::Diff2D klr, double threshold=0.7)
 correlate a template with an image.
template<class Iterator, class Accessor>
CorrelationResult subpixelMaxima (vigra::triple< Iterator, Iterator, Accessor > img, vigra::Diff2D max)
 find the subpixel maxima by fitting 2nd order polynoms to x and y.
template<class IMAGET, class IMAGES>
CorrelationResult PointFineTune (const IMAGET &templImg, vigra::Diff2D templPos, int templSize, const IMAGES &searchImg, vigra::Diff2D searchPos, int sWidth)
 fine tune a point with normalized cross correlation
template<class IMAGET, class IMAGES>
CorrelationResult PointFineTuneRotSearch (const IMAGET &templImg, vigra::Diff2D templPos, int templSize, const IMAGES &searchImg, vigra::Diff2D searchPos, int sWidth, double startAngle, double stopAngle, int angleSteps)
 fine tune a point with normalized cross correlation, searches x,y and phi (rotation around z)
template<class SrcIterator, class SrcAccessor, class DestIterator, class DestAccessor, class KernelIterator, class KernelAccessor>
CorrelationResult correlateImage (SrcIterator sul, SrcIterator slr, SrcAccessor as, DestIterator dul, DestAccessor ad, KernelIterator ki, KernelAccessor ak, vigra::Diff2D kul, vigra::Diff2D klr, double threshold=0.7)
 correlate a template with an image.


Detailed Description

Author:
Pablo d'Angelo <pablo.dangelo@web.de>
$Id$

This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU General Public License along with this software; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


Define Documentation

#define VIGRA_EXT_USE_FAST_CORR
 


Function Documentation

template<class SrcIterator, class SrcAccessor, class DestIterator, class DestAccessor, class KernelIterator, class KernelAccessor>
CorrelationResult correlateImage SrcIterator  sul,
SrcIterator  slr,
SrcAccessor  as,
DestIterator  dul,
DestAccessor  ad,
KernelIterator  ki,
KernelAccessor  ak,
vigra::Diff2D  kul,
vigra::Diff2D  klr,
double  threshold = 0.7
 

correlate a template with an image.

most code is taken from vigra::convoluteImage. See its documentation for further information.

Correlation result already contains the maximum position and its correlation value. it should be possible to set a threshold here.

template<class SrcImage, class DestImage, class KernelImage>
CorrelationResult correlateImageFast SrcImage &  src,
DestImage &  dest,
KernelImage &  kernel,
vigra::Diff2D  kul,
vigra::Diff2D  klr,
double  threshold = 0.7
 

correlate a template with an image.

This tries to be faster than the other version, because it uses the image data directly.

most code is taken from vigra::convoluteImage. See its documentation for further information.

Correlation result already contains the maximum position and its correlation value. it should be possible to set a threshold here.

template<class IMAGET, class IMAGES>
CorrelationResult PointFineTune const IMAGET &  templImg,
vigra::Diff2D  templPos,
int  templSize,
const IMAGES &  searchImg,
vigra::Diff2D  searchPos,
int  sWidth
 

fine tune a point with normalized cross correlation

takes a patch of templSize by templSize from templImg images at tmplPos and searches it on the searchImg, at searchPos, in a neighbourhood of sWidth by sWidth.

The result in returned in tunedPos

Returns:
correlation value

template<class IMAGET, class IMAGES>
CorrelationResult PointFineTuneRotSearch const IMAGET &  templImg,
vigra::Diff2D  templPos,
int  templSize,
const IMAGES &  searchImg,
vigra::Diff2D  searchPos,
int  sWidth,
double  startAngle,
double  stopAngle,
int  angleSteps
 

fine tune a point with normalized cross correlation, searches x,y and phi (rotation around z)

takes a patch of templSize by templSize from templImg images at tmplPos and searches it on the searchImg, at searchPos, in a neighbourhood of sWidth by sWidth.

The result in returned in tunedPos

Returns:
correlation value

template<class Iterator, class Accessor>
CorrelationResult subpixelMaxima vigra::triple< Iterator, Iterator, Accessor >  img,
vigra::Diff2D  max
 

find the subpixel maxima by fitting 2nd order polynoms to x and y.

this estimates the x and y values separately. Don't know if this is the best way, but it works well


Generated on Mon Sep 20 01:01:31 2010 for Hugintrunk by doxygen 1.3.9.1