Lines Matching refs:imgW
96 int imgW = size.width; in icvFindStereoCorrespondenceByBirchfieldDP() local
109 uchar* dsi = (uchar*)cvAlloc(sizeof(uchar)*imgW*dispH); in icvFindStereoCorrespondenceByBirchfieldDP()
110 uchar* edges = (uchar*)cvAlloc(sizeof(uchar)*imgW*imgH); in icvFindStereoCorrespondenceByBirchfieldDP()
111 _CvDPCell* cells = (_CvDPCell*)cvAlloc(sizeof(_CvDPCell)*imgW*MAX(dispH,(imgH+1)/2)); in icvFindStereoCorrespondenceByBirchfieldDP()
112 _CvRightImData* rData = (_CvRightImData*)cvAlloc(sizeof(_CvRightImData)*imgW); in icvFindStereoCorrespondenceByBirchfieldDP()
122 for( j = 1; j < imgW; j++ ) in icvFindStereoCorrespondenceByBirchfieldDP()
136 dsi += imgW; in icvFindStereoCorrespondenceByBirchfieldDP()
138 for( j = i - 1; j < imgW - 1; j++ ) in icvFindStereoCorrespondenceByBirchfieldDP()
155 dsi -= (maxDisparity+1)*imgW; in icvFindStereoCorrespondenceByBirchfieldDP()
160 edges[y*imgW] = edges[y*imgW+1] = edges[y*imgW+2] = 2; in icvFindStereoCorrespondenceByBirchfieldDP()
161 edges[y*imgW+imgW-1] = edges[y*imgW+imgW-2] = edges[y*imgW+imgW-3] = 1; in icvFindStereoCorrespondenceByBirchfieldDP()
162 for( j = 3; j < imgW-4; j++ ) in icvFindStereoCorrespondenceByBirchfieldDP()
164 edges[y*imgW+j] = 0; in icvFindStereoCorrespondenceByBirchfieldDP()
169 edges[y*imgW+j] |= 1; in icvFindStereoCorrespondenceByBirchfieldDP()
174 edges[y*imgW+j] |= 2; in icvFindStereoCorrespondenceByBirchfieldDP()
180 for( x = 0; x < imgW; x++ ) in icvFindStereoCorrespondenceByBirchfieldDP()
193 for( x = 1; x < imgW; x++ ) in icvFindStereoCorrespondenceByBirchfieldDP()
196 uchar* _edges = edges + y*imgW + x; in icvFindStereoCorrespondenceByBirchfieldDP()
202 int s = dsi[d*imgW+x]; in icvFindStereoCorrespondenceByBirchfieldDP()
277 if( min_val > CELL(i,imgW-1).sum ) in icvFindStereoCorrespondenceByBirchfieldDP()
280 min_val = CELL(i,imgW-1).sum; in icvFindStereoCorrespondenceByBirchfieldDP()
285 for( x = imgW - 1; x > 0; x-- ) in icvFindStereoCorrespondenceByBirchfieldDP()
308 for( x = 0; x < imgW; x++ ) in icvFindStereoCorrespondenceByBirchfieldDP()
320 for( x = 0; x < imgW; x++ ) in icvFindStereoCorrespondenceByBirchfieldDP()
329 edges[y*imgW+x] |= 4; in icvFindStereoCorrespondenceByBirchfieldDP()
330 edges[(y+1)*imgW+x] |= 4; in icvFindStereoCorrespondenceByBirchfieldDP()
331 edges[(y-1)*imgW+x] |= 4; in icvFindStereoCorrespondenceByBirchfieldDP()
341 prev = edges[y*imgW]; in icvFindStereoCorrespondenceByBirchfieldDP()
342 for( x = 1; x < imgW - 1; x++ ) in icvFindStereoCorrespondenceByBirchfieldDP()
344 curr = edges[y*imgW+x]; in icvFindStereoCorrespondenceByBirchfieldDP()
347 !( edges[y*imgW+x+1] & 4 ) ) ) in icvFindStereoCorrespondenceByBirchfieldDP()
349 edges[y*imgW+x] -= 4; in icvFindStereoCorrespondenceByBirchfieldDP()
356 for( x = 0; x < imgW; x++ ) in icvFindStereoCorrespondenceByBirchfieldDP()
366 reliabilities[i*imgW+x] = s; in icvFindStereoCorrespondenceByBirchfieldDP()
372 for( x = 0; x < imgW; x++ ) in icvFindStereoCorrespondenceByBirchfieldDP()
377 if( reliabilities[y*imgW+x] >= param4 && !(edges[y*imgW+x] & 4) && in icvFindStereoCorrespondenceByBirchfieldDP()
384 if( ( edges[i*imgW+x] & 4 ) || in icvFindStereoCorrespondenceByBirchfieldDP()
386 reliabilities[i*imgW+x] >= param3 ) || in icvFindStereoCorrespondenceByBirchfieldDP()
387 ( reliabilities[y*imgW+x] < param5 && in icvFindStereoCorrespondenceByBirchfieldDP()
396 if( ( edges[i*imgW+x] & 4 ) || in icvFindStereoCorrespondenceByBirchfieldDP()
398 reliabilities[i*imgW+x] >= param3 ) || in icvFindStereoCorrespondenceByBirchfieldDP()
399 ( reliabilities[y*imgW+x] < param5 && in icvFindStereoCorrespondenceByBirchfieldDP()
416 for( x = 1; x < imgW; x++ ) in icvFindStereoCorrespondenceByBirchfieldDP()
419 for( ; x < imgW && dest[y*widthStep+x] == dest[y*widthStep+x-1]; x++ ); in icvFindStereoCorrespondenceByBirchfieldDP()
423 reliabilities[y*imgW+i] = s; in icvFindStereoCorrespondenceByBirchfieldDP()
431 for( x = 0; x < imgW; x++ ) in icvFindStereoCorrespondenceByBirchfieldDP()
434 if( reliabilities[y*imgW+x] >= param4 && !(edges[y*imgW+x] & 1) && in icvFindStereoCorrespondenceByBirchfieldDP()
441 if( (edges[y*imgW+i] & 1) || in icvFindStereoCorrespondenceByBirchfieldDP()
443 reliabilities[y*imgW+i] >= param3 ) || in icvFindStereoCorrespondenceByBirchfieldDP()
444 ( reliabilities[y*imgW+x] < param5 && in icvFindStereoCorrespondenceByBirchfieldDP()
451 for( i = x + 1; i < imgW; i++ ) in icvFindStereoCorrespondenceByBirchfieldDP()
453 if( (edges[y*imgW+i] & 1) || in icvFindStereoCorrespondenceByBirchfieldDP()
455 reliabilities[y*imgW+i] >= param3 ) || in icvFindStereoCorrespondenceByBirchfieldDP()
456 ( reliabilities[y*imgW+x] < param5 && in icvFindStereoCorrespondenceByBirchfieldDP()