Home | History | Annotate | Download | only in src

Lines Matching full:p_model

77 //      p_model     - pointer to CvFGDStatModel structure
81 CvFGDStatModel* p_model = 0;
124 CV_CALL( p_model = (CvFGDStatModel*)cvAlloc( sizeof(*p_model) ));
125 memset( p_model, 0, sizeof(*p_model) );
126 p_model->type = CV_BG_MODEL_FGD;
127 p_model->release = (CvReleaseBGStatModel)icvReleaseFGDStatModel;
128 p_model->update = (CvUpdateBGStatModel)icvUpdateFGDStatModel;;
129 p_model->params = params;
134 buf_size = pixel_count*sizeof(p_model->pixel_stat[0]);
135 CV_CALL( p_model->pixel_stat = (CvBGPixelStat*)cvAlloc(buf_size) );
136 memset( p_model->pixel_stat, 0, buf_size );
138 buf_size = pixel_count*params.N2c*sizeof(p_model->pixel_stat[0].ctable[0]);
139 CV_CALL( p_model->pixel_stat[0].ctable = (CvBGPixelCStatTable*)cvAlloc(buf_size) );
140 memset( p_model->pixel_stat[0].ctable, 0, buf_size );
142 buf_size = pixel_count*params.N2cc*sizeof(p_model->pixel_stat[0].cctable[0]);
143 CV_CALL( p_model->pixel_stat[0].cctable = (CvBGPixelCCStatTable*)cvAlloc(buf_size) );
144 memset( p_model->pixel_stat[0].cctable, 0, buf_size );
149 p_model->pixel_stat[k].ctable = p_model->pixel_stat[0].ctable + k*params.N2c;
150 p_model->pixel_stat[k].cctable = p_model->pixel_stat[0].cctable + k*params.N2cc;
155 CV_CALL( p_model->Ftd = cvCreateImage(cvSize(first_frame->width, first_frame->height), IPL_DEPTH_8U, 1));
156 CV_CALL( p_model->Fbd = cvCreateImage(cvSize(first_frame->width, first_frame->height), IPL_DEPTH_8U, 1));
157 CV_CALL( p_model->foreground = cvCreateImage(cvSize(first_frame->width, first_frame->height), IPL_DEPTH_8U, 1));
159 CV_CALL( p_model->background = cvCloneImage(first_frame));
160 CV_CALL( p_model->prev_frame = cvCloneImage(first_frame));
161 CV_CALL( p_model->storage = cvCreateMemStorage());
167 CvBGStatModel* base_ptr = (CvBGStatModel*)p_model;
169 if( p_model && p_model->release )
170 p_model->release( &base_ptr );
172 cvFree( &p_model );
173 p_model = 0;
176 return (CvBGStatModel*)p_model;
327 // p_model - pointer to CvFGDStatModel structure