KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
orientation_energy.h
Go to the documentation of this file.
1 // orientation_energy.h - compute orientation energy
3 // Author: Doron Tal
4 // Date Created: March, 2000
5 
6 #ifndef _ORIENTATION_ENERGY_H
7 #define _ORIENTATION_ENERGY_H
8 
9 #include "wrap_dtlib_cpp/img.h"
10 
12 //Added by Prasad
13 
14 //This is to test the hypothesis of using color in contour
15 //Add Orientation energies obtained in color planes
16 
17 //#define USE_COLOR_IN_CONTOUR
18 
20 
21 namespace DTLib {
22 
24  // computes orientation energy for each orientation. INPUT = InSeq,
25  // the sequence of all convolutions with the kernels. OUTPUT =
26  // OutSeq, a sequence of images, corresponding to orientation energies
27  // at each scale and orientation of the oriented filterbank kernels
28  // (outer loop over scales, inner loop over orientations, so there are
29  // SCALES*ORIENTATIONS frames in this returned sequence).
30  void OrientationEnergy(const int& nGaussScales,
31  const int& nGaussOrientations,
32  CImgVec<float>& ConvVec,
33 
35 //Added by Prasad
36 
37 //This is to test the hypothesis of using color in contour
38 //Add Orientation energies obtained in color planes
39 
40 #ifdef USE_COLOR_IN_CONTOUR
41 
42  CImgVec<float>& AConvVec,
43  CImgVec<float>& BConvVec,
44 
45 #endif
47 
48  CImgVec<float>& OEVec);
49 
50  // operations on oe sequences:
51 
53  // INPUT:
54  // - 'OEVec' is the orientation energy sequence, i.e. for each scale, OEVec
55  // has N frames of orientation energy associated with the N orientations.
56  // - 'iScale' is the scale from which we seek the successive (OE, Theta)
57  // pairss
58  // - 'iTheta' is the index of the orientation for whom we want the triplet
59  // it is the index of the orientation at the center of the triplet.
60  // - 'x' and 'y' are the coordinate at which we take successive values
61  //
62  // OUTPUT: all arguments that are not const are output - they comprise
63  // the triplet of (OE, Theta) pairs centered on theta designated by
64  // 'iTheta'. 'iPrevTheta' and 'iNextTheta' are returned as indices into
65  // OEVec of the previous and next thetas, these indices were fixed so
66  // that they are always in the range [0..m_nGaussOrientations-1]
67  //
68  // NB: The thetas returned are not between 0 and pi, in order to
69  // ensure that parabolic interpolation treats them as points on the
70  // line, rather than points on the circle. So we add Pi to the thetas
71  // to make sure that they are returned in a sorted manner (sorted
72  // along the line, not just along the circle). Please note that some
73  // functions expect orientations to be in the range [0, Pi]. Such
74  // functions must first use the routine FixTheta() to bring each of
75  // the thetas here to that range, they can't use the 'Theta',
76  // 'PrevTheta' and 'NextTheta' returned by this function directly.
77 
78  // compute indices, energies, orientations for the max,
79  // previous-to-max and next-to-max of all those three,
80  // making sure to take care of phase wrapping when necessary
81 
82  void GetSuccessiveOEThetaPairs(CImgVec<float>& OEVec,
83  const int& nGaussOrientations,
84  const int& iScale,
85  const int& iTheta,
86  const int&x, const int& y,
87  int& iPrevTheta, int& iNextTheta,
88  float& PrevTheta,
89  float& Theta,
90  float& NextTheta,
91  float& PrevOE,
92  float& OE,
93  float& NextOE);
94 
95 } // namespace DTLib {
96 
97 #endif /* #ifndef _ORIENTATION_ENERGY_H */
void OrientationEnergy(const int &nGaussScales, const int &nGaussOrientations, CImgVec< float > &ConvVec, CImgVec< float > &OEVec)
Definition: orientation_energy.cpp:34
void GetSuccessiveOEThetaPairs(CImgVec< float > &OEVec, const int &nGaussOrientations, const int &iScale, const int &iTheta, const int &x, const int &y, int &iPrevTheta, int &iNextTheta, float &PrevTheta, float &Theta, float &NextTheta, float &PrevOE, float &OE, float &NextOE)
Definition: orientation_energy.cpp:219
x
Definition: APPgetLargeConnectedEdges.m:100