Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
HomographyRectification.cpp
1 /*
2 This file is part of the BIAS library (Basic ImageAlgorithmS).
3 
4 Copyright (C) 2003, 2004 (see file CONTACTS for details)
5 Multimediale Systeme der Informationsverarbeitung
6 Institut fuer Informatik
7 Christian-Albrechts-Universitaet Kiel
8 
9 
10 BIAS is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14 
15 BIAS is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU Lesser General Public License for more details.
19 
20 You should have received a copy of the GNU Lesser General Public License
21 along with BIAS; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24 
25 #include <Image/HomographyRectification.hh>
26 
27 using namespace BIAS;
28 using namespace std;
29 
30 template <class InputStorageType, class OutputStorageType>
33 {
34  //determine rectified bases
35  // return if forward movement
36  //set homographies
37  //determine bounding boxes clipp left and right individually
38  //set rectification parameters as projections
39  //use homography mapping for image generation
40 
41 
42  return 0;
43 }
44 
45 template <class InputStorageType, class OutputStorageType>
48 {
49  return 0;
50 }
51 
52 template <class InputStorageType, class OutputStorageType>
54 Disp2Depth(const Image<float>& DisparityMap,
55  Image<float>& DepthMap,
56  unsigned int border)
57 {
58  //use homgraphies to establish correspondances
59  //triangulate with orig params
60  return 0;
61 }
62 
63 template <class InputStorageType, class OutputStorageType>
67  {
69  dynamic_cast<const ProjectionParametersPerspective*>(proj);
70 
71  if (ppp == NULL) {
72  return false;
73  }
74 
75  return true;
76  }
77 
78 
79 //
80 // solve explicit instantiation JW
81 // TODO
82 //
83 //#define INSTANCE_HomRect(type) template class BIASImage_EXPORT Image<type>;
84 
85 // create instances
86 //INSTANCE_HomRect(unsigned char)
87 //INSTANCE_HomRect(float)
88 
89 //#ifdef BUILD_IMAGE_INT
90 //INSTANCE_HomRect(int)
91 //#endif
92 //#ifdef BUILD_IMAGE_CHAR
93 //INSTANCE_HomRect(char)
94 //#endif
95 //#ifdef BUILD_IMAGE_SHORT
96 //INSTANCE_HomRect(short)
97 //#endif
98 //#if defined(BUILD_IMAGE_USHORT)
99 //INSTANCE_HomRect(unsigned short)
100 //#endif
101 //#ifdef BUILD_IMAGE_DOUBLE
102 //INSTANCE_HomRect(double)
103 //#endif
104 //#ifdef BUILD_IMAGE_UINT
105 //INSTANCE_HomRect(unsigned int)
106 //#endif
virtual int Rectify()
Rectify with same internal parameters for both.
camera parameters which define the mapping between rays in the camera coordinate system and pixels in...
virtual bool IsInputCameraValid(const BIAS::Image< InputStorageType > &img, const BIAS::ProjectionParametersBase *proj)
virtual int RectifyMinImageSize()
Rectify so that images have minimal size.
virtual int Disp2Depth(const Image< float > &DisparityMap, Image< float > &DepthMap, unsigned int border)
Uses the passed disparity map for camera A to calculate the corresponding depth map.
Camera parameters which define the mapping between rays in the camera coordinate system and pixels in...