Home | History | Annotate | Download | only in src

Lines Matching refs:state

89     /* set initial state probabilities */
168 obs->state = (int*)icvAlloc( 2 * total * sizeof(int) );
184 icvFree( &(obs_info->state) );
252 hmm->u.state = all_states;
273 icvFree( &(hmm->u.state->mu) );
274 icvFree( &(hmm->u.state) );
291 first_state = hmm->u.state;
296 int state = (i * hmm->num_states)/obs_info->obs_x;
297 obs_info->state[i] = state;
321 int* num_samples; /* number of observations in every state */
322 int* counter; /* array of counters for every state */
324 int** a_class; /* for every state - characteristic array */
326 CvVect32f** samples; /* for every state - pointer to observation vectors */
327 int*** samples_mix; /* for every state - array of pointers to vectors mixtures */
334 CvEHMMState* first_state = hmm->u.state;
336 /* for every state integer is allocated - number of vectors in state */
339 /* integer counter is allocated for every state */
350 /* for every state the number of vectors which belong to it is computed (smth. like histogram) */
357 int state = obs->state[ i ];
358 num_samples[state] += 1;
362 /* for every state int* is allocated */
372 /* for every state vectors which belong to state are gathered */
381 int state = obs->state[i];
383 samples[state][counter[state]] = vector;
384 samples_mix[state][counter[state]] = &(obs->mix[i]);
385 counter[state]++;
488 /* Calculate probability of observation at state in logarithmic scale*/
524 // Purpose: The function computes the probability of every observation in every state
647 CvEHMMState* state = hmm->u.state;
652 int t = state[j].num_mix;
677 CvEHMMState* state = hmm->u.state;
685 int t = state[j].num_mix;
714 if( state[l].num_mix > m )
716 float* mu = state[l].mu + m*vect_size;
717 float* inv_var = state[l].inv_var + m*vect_size;
718 double prob = -state[l].log_var_val[m];
746 mp[l] *= state[l].weight[0];
759 if( m < state[l].num_mix )
761 mp[l + ofs] += mp[l] * state[l].weight[m];
785 CvEHMMState* state = ehmm->u.state;
804 matr_line[m] = icvComputeGaussMixture( vect, state[m].mu, state[m].inv_var,
805 state[m].log_var_val, vect_size, state[m].weight,
806 state[m].num_mix );
818 // Purpose: The function calculates the state and super state transition probabilities
820 // the state segmentation and the input parameters
851 /* compute how many transitions from state to state
853 int state;
856 state = info->state[counter];
862 nextstate = info->state[counter+1];
863 hmm->transP[ state * transP_size + nextstate] += 1;
910 CvEHMMState* state = hmm->u.state;
919 int e_state = info->state[i];
923 state[e_state].mu, info->obs_size);
926 for (m = 1; m < state[e_state].num_mix; m++)
929 state[e_state].mu + m * info->obs_size,
953 // and do state segmentation of observations
962 //CvEHMMState* first_state = hmm->u.state;
979 /* assign new state to observation vectors */
982 int state = super_q[i];
983 obs_info->state[i] = state;
1006 CvEHMMState* first_state = hmm->u.state;
1033 int state, mixture;
1034 state = info->state[i];
1037 to every mixture of every state */
1038 ((int*)(first_state[state].weight))[mixture] += 1;
1063 int state = info->state[j];
1066 CvVect32f mean = first_state[state].mu + mixture * vect_len;
1067 CvVect32f mean2 = first_state[state].inv_var + mixture * vect_len;
1080 CvEHMMState* state = &(first_state[i]);
1082 for (m = 0; m < state->num_mix; m++)
1085 CvVect32f mu = state->mu + m * vect_len;
1086 CvVect32f invar = state->inv_var + m * vect_len;
1088 if ( ((int*)state->weight)[m] > 1)
1090 float inv_gamma = 1.f/((int*)(state->weight))[m];
1106 state->log_var_val[m] = start_log_var_val;
1109 state->log_var_val[m] += (float)log( invar[k] );
1112 state->log_var_val[m] *= 0.5;