-
Notifications
You must be signed in to change notification settings - Fork 6
/
BlendImages.h
executable file
·42 lines (39 loc) · 1.51 KB
/
BlendImages.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
///////////////////////////////////////////////////////////////////////////
//
// NAME
// BlendImages.h -- blend together a set of overlapping images
//
// SPECIFICATION
// CByteImage BlendImages(CImagePositionV ipv, float blendWidth);
//
// PARAMETERS
// ipv list (vector) of images and their locations
// blendWidth half-width of transition region (in pixels)
//
// DESCRIPTION
// This routine takes a collection of images aligned more or less horizontally
// and stitches together a mosaic.
//
// The images can be blended together any way you like, but I would recommend
// using a soft halfway blend of the kind Steve presented in the first lecture.
//
// Once you have blended the images together, you should crop the resulting
// mosaic at the halfway points of the first and last image. You should also
// take out any accumulated vertical drift using an affine warp.
// Lucas-Kanade Taylor series expansion of the registration error.
//
// SEE ALSO
// BlendImages.cpp implementation
//
// Copyright © Richard Szeliski, 2001. See Copyright.h for more details
// (modified for CSE455 Winter 2003)
//
///////////////////////////////////////////////////////////////////////////
struct CImagePosition
{
CByteImage img; // image
//float position[2]; // position relative to first image
CTransform3x3 position;
};
typedef std::vector<CImagePosition> CImagePositionV;
CByteImage BlendImages(CImagePositionV& ipv, float blendWidth);