Lines Matching defs:state2
105 static void icvInitStereoTabs( CvStereoGCState2* state2 )
107 int i, K = state2->K;
110 state2->dataCostFuncTab[i] = MIN(i*DENOMINATOR - K, 0);
113 state2->smoothnessR[i] = MIN(abs(i-CUTOFF), state2->interactionRadius);
118 state2->smoothnessGrayDiff[i] = diff < state2->Ithreshold ? state2->lambda1 : state2->lambda2;
525 static int64 icvComputeEnergy( const CvStereoGCState* state, const CvStereoGCState2* state2,
530 const int* dtab = state2->dataCostFuncTab;
531 int maxR = state2->interactionRadius;
532 const int* stabR = state2->smoothnessR + CUTOFF;
533 const int* stabI = state2->smoothnessGrayDiff + 255;
661 static int64 icvAlphaExpand( int64 Eprev, int alpha, CvStereoGCState* state, CvStereoGCState2* state2 )
670 int maxR = state2->interactionRadius;
671 const int* dtab = state2->dataCostFuncTab;
672 const int* stabR = state2->smoothnessR + CUTOFF;
673 const int* stabI = state2->smoothnessGrayDiff + 255;
814 E += icvGCMaxFlow( vbuf, nvtx, ebuf, state2->orphans, state2->maxOrphans );
844 CvStereoGCState2 state2;
845 state2.orphans = 0;
846 state2.maxOrphans = 0;
906 state2.Ithreshold = state->Ithreshold;
907 state2.interactionRadius = state->interactionRadius;
908 state2.lambda = cvRound(state->lambda*DENOMINATOR);
909 state2.lambda1 = cvRound(state->lambda1*DENOMINATOR);
910 state2.lambda2 = cvRound(state->lambda2*DENOMINATOR);
911 state2.K = cvRound(state->K*DENOMINATOR);
920 if( state2.lambda < 0 && (state2.K < 0 || state2.lambda1 < 0 || state2.lambda2 < 0) )
923 state2.lambda = cvRound(L*DENOMINATOR);
926 if( state2.K < 0 )
927 state2.K = state2.lambda*5;
928 if( state2.lambda1 < 0 )
929 state2.lambda1 = state2.lambda*3;
930 if( state2.lambda2 < 0 )
931 state2.lambda2 = state2.lambda;
933 icvInitStereoTabs( &state2 );
935 E = icvComputeEnergy( state, &state2, !useDisparityGuess );
941 int64 Enew = icvAlphaExpand( E, -alpha, state, &state2 );
959 cvFree( &state2.orphans );