Lines Matching refs:state2

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