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

template<class HistT, class ArrayT>
void Impala::Core::Histogram::MakeCooccurenceMatrix ( HistT *  hist,
ArrayT *  im,
Geometry::Rectangle  rect,
typename ArrayT::ArithType  safeBorderValue = -1 
)

Definition at line 29 of file MakeCooccurenceMatrix.h.

References Impala::Core::Array::Pattern::BORDERCONSTANT, Impala::Core::Array::CheckBorderSize(), Impala::Core::Geometry::GrowBorder(), Impala::Core::Array::MakeRoi(), Impala::Core::Array::Pattern::PatNgbOp2d(), and Impala::Core::Array::Pattern::PatSetBorder().

00030 {
00031     const int borderSize = 1;
00032     ArrayT* borderedIm = CheckBorderSize(im, borderSize, borderSize);
00033     typename ArrayT::ArithType dummy = 0;
00034     Array::Pattern::PatSetBorder(borderedIm, borderSize, borderSize, 
00035                                  Array::Pattern::BORDERCONSTANT, safeBorderValue,
00036                                  dummy, dummy, dummy, dummy);
00037     Geometry::Rectangle borderedRect = GrowBorder(rect, borderSize);
00038     ArrayT* roi = Array::MakeRoi(borderedIm, borderedRect);
00039     if(borderedIm != im)
00040         delete borderedIm;
00041     roi->GrowBorder(borderSize);
00042 
00043     hist->Clear();
00044     Histogram::NgbOutCooccurence cooccurence(hist);
00045     Array::Pattern::PatNgbOp2d(roi, roi, cooccurence, true);
00046     delete roi;
00047 }

Here is the call graph for this function:


Generated on Thu Jan 13 09:19:44 2011 for ImpalaSrc by  doxygen 1.5.1