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

template<class DstArrayT, class Src1ArrayT, class Src2ArrayT>
bool Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::LocalPixelInit ( PointValueT vp,
DstArithT arith,
Src1ArithT  img,
Src1ArithT  mask,
bool &  continua 
) [inline]

Definition at line 120 of file QbWatershed.h.

References Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::arith, Impala::Core::Array::Trait::CONTOURVAL, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::cost, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::costImage, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::curdist, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::distImage, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::globalOrderCounter, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::h, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::hist, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::hmin, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::img, Impala::Core::Array::Trait::INITVAL, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::lastDist, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::localOrderCounter, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::mask, Impala::Core::Array::Trait::MASKVAL, Impala::Core::Geometry::PointZ::mX, Impala::Core::Geometry::PointZ::mY, Impala::Core::Array::Trait::QbWatershed< DstArrayT, Src1ArrayT, Src2ArrayT >::structPointValue::point, and Impala::Core::Array::Trait::WSHEDVAL.

00122     { 
00123         vp.arith=arith;
00124         vp.img=img;
00125         vp.mask=mask;
00126         continua = true;
00127         bool q=false;
00128 
00129 //when I'm first time in this function (for level hmin) I fill the histogram
00130         if (h==hmin) {
00131             hist[img]=true;
00132         }
00133 //then, chech if the current level h exist in the image
00134         if (h!=hmin && !hist[h] ) {
00135             continua = false;
00136             return q;
00137         }
00138 
00139 //init for searching new local minima (with this one starts the algorithm) (point 4)
00140         if (img == h && arith == INITVAL && arith != CONTOURVAL ) {
00141             q=true; // do queue
00142             distImage(vp.point.mX, vp.point.mY)=0; // this I don't have to do, it
00143                                                  // was done in globalinit
00144             costImage(vp.point.mX, vp.point.mY)=1;
00145             vp.arith = MASKVAL;
00146             vp.lastDist = 0;
00147         }
00148 //init for the part of propagating "contour" pixels (point 1)
00149         if (img==h && (arith == CONTOURVAL || arith == WSHEDVAL) ) {
00150             distImage(vp.point.mX, vp.point.mY)= 1;
00151             costImage(vp.point.mX, vp.point.mY)= -2;
00152             curdist=1;
00153             vp.lastDist=1;
00154             q=true; // do queue
00155         }
00156 
00157         if (q) { 
00158             vp.localOrderCounter=globalOrderCounter++; // for equal values
00159                                                        // be a FIFO=QUEUE
00160             vp.cost=costImage(vp.point.mX, vp.point.mY);
00161         }
00162         arith=vp.arith;
00163         return q;
00164     }


Generated on Fri Mar 19 11:04:50 2010 for ImpalaSrc by  doxygen 1.5.1