Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Image Alignment Algorithms - Part II

, 21 Apr 2008 CPOL
Implementing and comparing the forwards compositional and the Hager-Belhumeur algorithms.
// Module: auxfunc.h
// Brief:  
// Author: Oleg A. Krivtsov
// Email:  olegkrivtsov@mail.ru
// Date:  March 2008

#ifndef __AUXFUNC_H__
#define __AUXFUNC_H__

#include "cv.h"

void init_warp(CvMat* W, float wz, float tx, float ty, float s);

void warp_image(IplImage* pSrcFrame, IplImage* pDstFrame, CvMat* W, float step=1.0f);
void draw_warped_rect(IplImage* pImage, CvRect rect, CvMat* W);

/*
 *  Helper macros for getting/setting CvMat elements.
 */

#define SET_VECTOR(X, u, v)\
	CV_MAT_ELEM(*(X), float, 0, 0) = (float)(u);\
	CV_MAT_ELEM(*(X), float, 1, 0) = (float)(v);\
	CV_MAT_ELEM(*(X), float, 2, 0) = 1.0f;

#define GET_VECTOR(X, u, v)\
	(u) = (int)CV_MAT_ELEM(*(X), float, 0, 0);\
	(v) = (int)CV_MAT_ELEM(*(X), float, 1, 0);
	
#endif //__AUXFUNC_H__

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Oleg Krivtsov
Software Developer
Russian Federation Russian Federation
No Biography provided

| Advertise | Privacy | Mobile
Web02 | 2.8.141029.1 | Last Updated 21 Apr 2008
Article Copyright 2008 by Oleg Krivtsov
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid