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

Vector::VectorSet<Core::Array::Array2dScalarReal64>* Impala::Core::Feature::WeibullIRGB ( Core::Array::Array2dVec3UInt8 *  im,
Real64  sigma,
bool  doMu = false,
bool  doAnderson = false,
bool  doArjan = false 
)

Definition at line 57 of file Weibull.h.

References Impala::Core::Array::ArrayListDelete(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CH(), Impala::Core::Histogram::ComputeWeibull(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CW(), Impala::Core::Array::DivVal(), Impala::Core::Array::InvCompDer(), Impala::Core::Histogram::MakeHistogram1dSet(), Impala::Core::Array::RecGauss(), Impala::Core::Array::RGB2Intensity(), Impala::Application::DemoCamera2d::rgbList, and Impala::Core::Array::Set().

Referenced by Impala::Application::Im::DoWeibullIRGB().

00059 {
00060     typedef Array::Array2dScalarReal64 Array2dScalarReal64;
00061     typedef Vector::VectorTem<Real64> VectorReal64;
00062     typedef Array::ArraySet<Array2dScalarReal64> InvSetType;
00063     typedef Histogram::Histogram1dSet<Array2dScalarReal64> HistSetType;
00064     typedef HistSetType::HistT HistType;
00065     typedef Vector::VectorSet<Array2dScalarReal64> VecSetType;
00066 
00067     int histBinCount = 1001;
00068     Real64 histLow = -1;
00069     Real64 histHigh = 1;
00070     int borderSize = 15;
00071 
00072     int vecSize = (doMu) ? 3 : 2;
00073     if (doAnderson)
00074         vecSize++;
00075     Geometry::Rectangle rect(15, 15, im->CW() - 15, im->CH() - 15);
00076     if (doArjan)
00077         rect = Geometry::Rectangle(5, 5, 240, im->CH() - 5);
00078     Array::ArraySet<Array2dScalarReal64> invSet;
00079     Array::Array2dVec3Real64* imR = 0;
00080     Array::Set(imR, im);
00081     Array::DivVal(imR, imR, Array::Element::Vec3Real64(255, 255, 255));
00082     Array::Array2dScalarReal64* l = 0;
00083     Array::RGB2Intensity(l, imR);
00084     RecGauss(invSet.Array("Lx"), l, sigma, sigma, 1, 0, 3.0);
00085     RecGauss(invSet.Array("Ly"), l, sigma, sigma, 0, 1, 3.0);
00086     std::vector<Array2dScalarReal64*> rgbList;
00087     rgbList = InvCompDer(imR, sigma, 3.0, true);
00088     Array::Set(invSet.Array("Rx"), rgbList[1]);
00089     Array::Set(invSet.Array("Ry"), rgbList[2]);
00090     Array::Set(invSet.Array("Gx"), rgbList[4]);
00091     Array::Set(invSet.Array("Gy"), rgbList[5]);
00092     Array::Set(invSet.Array("Bx"), rgbList[7]);
00093     Array::Set(invSet.Array("By"), rgbList[8]);
00094     Array::ArrayListDelete(&rgbList);
00095     //Array::WriteRawList(invSet, "outIRGB.raw", true);
00096 
00097     HistSetType hSet(histLow, histHigh, histBinCount, invSet.Size());
00098     Histogram::MakeHistogram1dSet(&hSet, invSet, rect, true);
00099     VecSetType* res = new VecSetType(true, vecSize, invSet.Size());
00100     for (int h=0 ; h<hSet.Size() ; h++)
00101     {
00102         VectorReal64 v(vecSize);
00103         Histogram::ComputeWeibull(v, hSet.Hist(h), doMu, doAnderson);
00104         res->AddVector(v);
00105     }
00106 
00107     delete l;
00108     delete imR;
00109     invSet.Delete();
00110     return res;
00111 }

Here is the call graph for this function:


Generated on Fri Mar 19 11:08:37 2010 for ImpalaSrc by  doxygen 1.5.1