Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

std::vector<Array2dScalarReal64*> Impala::Core::Array::InvQuasi ( Array2dVec3Real64 *  src,
double  sigma,
double  precision 
) [inline]

input:

  • rgb image Vec3Real64 format
  • sigma of gaussian derivative
  • precision of used kernel in gaussian derivative (2 or 3 are good values) output:
  • specular quasi invariant
  • specular quasi variant
  • shadow-shading quasi invariant
  • shadow-shading quasi invariant
  • specular shadow-shading quasi invariant
  • specular shadow-shading quasi variant

these are the images in Joost van de Weijers matlab code found on http://lear.inrialpes.fr/people/vandeweijer/research1 this code is a port of said matlab code

Todo:
perhaps this function should be split in 3 functions that compute the quasi invariant and variant for the three categories...

Definition at line 42 of file InvQuasi.h.

References Add(), AddSquared(), InvCompDer(), InvHsiDer(), InvOpponentDer(), InvSphericalDer(), and Sqrt().

Referenced by main().

00043 {
00044     std::vector<Array2dScalarReal64*> quasiInvariants;
00045 
00046     // get needed Derivatives
00047     std::vector<Array2dScalarReal64*> rgbDerList = InvCompDer(src, sigma, precision);
00048     std::vector<Array2dScalarReal64*> opponentDerList = InvOpponentDer(rgbDerList);
00049     std::vector<Array2dScalarReal64*> sphericalDerList = InvSphericalDer(rgbDerList);
00050     std::vector<Array2dScalarReal64*> hsiDerList = InvHsiDer(rgbDerList);
00051 
00052     //specular quasi invariant & variant
00053     //sp_inv=sqrt(O1_x.^2+O1_y.^2+O2_x.^2+O2_y.^2+eps);
00054     Array2dScalarReal64* temp = 0;
00055     Array2dScalarReal64* image = 0;
00056     AddSquared(image, opponentDerList[0], opponentDerList[1]);
00057     AddSquared(temp, opponentDerList[2], opponentDerList[3]);
00058     Add(image, image, temp);
00059     Sqrt(image, image);
00060     quasiInvariants.push_back(image);
00061  
00062     //sp_var=sqrt(O3_x.^2+O3_y.^2+eps);
00063     temp = 0;
00064     image = 0;
00065     AddSquared(image, opponentDerList[4], opponentDerList[5]);
00066     Sqrt(image, image);
00067     quasiInvariants.push_back(image);
00068 
00069     //shadow-shading quasi invariant & variant
00070     //ss_inv=sqrt(theta_x.^2+theta_y.^2+phi_x.^2+phi_y.^2+eps);
00071     temp = 0;
00072     image = 0;
00073     AddSquared(image, sphericalDerList[0], sphericalDerList[1]);
00074     AddSquared(temp, sphericalDerList[2], sphericalDerList[3]);
00075     Add(image, image, temp);
00076     Sqrt(image, image);
00077     quasiInvariants.push_back(image);
00078 
00079     //ss_var=sqrt(r_x.^2+r_y.^2+eps);
00080     temp = 0;
00081     image = 0;
00082     AddSquared(image, sphericalDerList[4], sphericalDerList[5]);
00083     Sqrt(image, image);
00084     quasiInvariants.push_back(image);
00085     
00086     //specular shadow-shading quasi invariant & variant
00087     //spss_inv=sqrt(h_x.^2+h_y.^2+eps);
00088     temp = 0;
00089     image = 0;
00090     AddSquared(image, hsiDerList[0], hsiDerList[1]);
00091     Sqrt(image, image);
00092     quasiInvariants.push_back(image);
00093 
00094     //spss_var=sqrt(i_x.^2+i_y.^2+s_x.^2+s_y.^2+eps);
00095     temp = 0;
00096     image = 0;
00097     AddSquared(image, hsiDerList[2], hsiDerList[3]);
00098     AddSquared(temp, hsiDerList[4], hsiDerList[5]);
00099     Add(image, image, temp);
00100     Sqrt(image, image);
00101     quasiInvariants.push_back(image);
00102 
00103     int i;
00104     for(i=0 ; i<rgbDerList.size() ; ++i)
00105         delete rgbDerList[i];
00106     for(i=0 ; i<opponentDerList.size() ; ++i)
00107         delete opponentDerList[i];
00108     for(i=0 ; i<sphericalDerList.size() ; ++i)
00109         delete sphericalDerList[i];
00110     for(i=0 ; i<hsiDerList.size() ; ++i)
00111         delete hsiDerList[i];
00112 
00113     return quasiInvariants;
00114 }

Here is the call graph for this function:


Generated on Fri Mar 19 10:57:17 2010 for ImpalaSrc by  doxygen 1.5.1