Lines Matching refs:CV_MAT_ELEM
64 #define CV_MAT_3COLOR_ELEM(img,type,y,x,c) CV_MAT_ELEM(img,type,y,(x)*3+(c))
93 num += CV_MAT_ELEM(*f,uchar,i,j)!=0;
123 if (CV_MAT_ELEM(*f,uchar,i,j)!=0) {
215 a11=CV_MAT_ELEM(*t,float,i1,j1);
216 a22=CV_MAT_ELEM(*t,float,i2,j2);
219 if( CV_MAT_ELEM(*f,uchar,i1,j1) != INSIDE )
220 if( CV_MAT_ELEM(*f,uchar,i2,j2) != INSIDE )
227 else if( CV_MAT_ELEM(*f,uchar,i2,j2) != INSIDE )
246 CV_MAT_ELEM(*f,uchar,ii,jj) = (uchar)known;
256 if (CV_MAT_ELEM(*f,uchar,i,j)==INSIDE) {
261 CV_MAT_ELEM(*t,float,i,j) = dist;
262 CV_MAT_ELEM(*f,uchar,i,j) = BAND;
271 if (CV_MAT_ELEM(*f,uchar,i,j) == CHANGE) {
272 CV_MAT_ELEM(*f,uchar,i,j) = KNOWN;
273 CV_MAT_ELEM(*t,float,i,j) = -CV_MAT_ELEM(*t,float,i,j);
290 CV_MAT_ELEM(*f,uchar,ii,jj) = KNOWN;
298 if (CV_MAT_ELEM(*f,uchar,i,j)==INSIDE) {
303 CV_MAT_ELEM(*t,float,i,j) = dist;
309 if (CV_MAT_ELEM(*f,uchar,i,j+1)!=INSIDE) {
310 if (CV_MAT_ELEM(*f,uchar,i,j-1)!=INSIDE) {
311 gradT.x=(float)((CV_MAT_ELEM(*t,float,i,j+1)-CV_MAT_ELEM(*t,float,i,j-1)))*0.5f;
313 gradT.x=(float)((CV_MAT_ELEM(*t,float,i,j+1)-CV_MAT_ELEM(*t,float,i,j)));
316 if (CV_MAT_ELEM(*f,uchar,i,j-1)!=INSIDE) {
317 gradT.x=(float)((CV_MAT_ELEM(*t,float,i,j)-CV_MAT_ELEM(*t,float,i,j-1)));
322 if (CV_MAT_ELEM(*f,uchar,i+1,j)!=INSIDE) {
323 if (CV_MAT_ELEM(*f,uchar,i-1,j)!=INSIDE) {
324 gradT.y=(float)((CV_MAT_ELEM(*t,float,i+1,j)-CV_MAT_ELEM(*t,float,i-1,j)))*0.5f;
326 gradT.y=(float)((CV_MAT_ELEM(*t,float,i+1,j)-CV_MAT_ELEM(*t,float,i,j)));
329 if (CV_MAT_ELEM(*f,uchar,i-1,j)!=INSIDE) {
330 gradT.y=(float)((CV_MAT_ELEM(*t,float,i,j)-CV_MAT_ELEM(*t,float,i-1,j)));
340 if ((CV_MAT_ELEM(*f,uchar,k,l)!=INSIDE)&&
346 lev = (float)(1./(1+fabs(CV_MAT_ELEM(*t,float,k,l)-CV_MAT_ELEM(*t,float,i,j))));
352 if (CV_MAT_ELEM(*f,uchar,k,l+1)!=INSIDE) {
353 if (CV_MAT_ELEM(*f,uchar,k,l-1)!=INSIDE) {
359 if (CV_MAT_ELEM(*f,uchar,k,l-1)!=INSIDE) {
365 if (CV_MAT_ELEM(*f,uchar,k+1,l)!=INSIDE) {
366 if (CV_MAT_ELEM(*f,uchar,k-1,l)!=INSIDE) {
372 if (CV_MAT_ELEM(*f,uchar,k-1,l)!=INSIDE) {
392 CV_MAT_ELEM(*f,uchar,i,j) = BAND;
402 CV_MAT_ELEM(*f,uchar,ii,jj) = KNOWN;
410 if (CV_MAT_ELEM(*f,uchar,i,j)==INSIDE) {
415 CV_MAT_ELEM(*t,float,i,j) = dist;
421 if (CV_MAT_ELEM(*f,uchar,i,j+1)!=INSIDE) {
422 if (CV_MAT_ELEM(*f,uchar,i,j-1)!=INSIDE) {
423 gradT.x=(float)((CV_MAT_ELEM(*t,float,i,j+1)-CV_MAT_ELEM(*t,float,i,j-1)))*0.5f;
425 gradT.x=(float)((CV_MAT_ELEM(*t,float,i,j+1)-CV_MAT_ELEM(*t,float,i,j)));
428 if (CV_MAT_ELEM(*f,uchar,i,j-1)!=INSIDE) {
429 gradT.x=(float)((CV_MAT_ELEM(*t,float,i,j)-CV_MAT_ELEM(*t,float,i,j-1)));
434 if (CV_MAT_ELEM(*f,uchar,i+1,j)!=INSIDE) {
435 if (CV_MAT_ELEM(*f,uchar,i-1,j)!=INSIDE) {
436 gradT.y=(float)((CV_MAT_ELEM(*t,float,i+1,j)-CV_MAT_ELEM(*t,float,i-1,j)))*0.5f;
438 gradT.y=(float)((CV_MAT_ELEMCV_MAT_ELEM(*t,float,i,j)));
441 if (CV_MAT_ELEM(*f,uchar,i-1,j)!=INSIDE) {
442 gradT.y=(float)((CV_MAT_ELEM(*t,float,i,j)-CV_MAT_ELEM(*t,float,i-1,j)));
452 if ((CV_MAT_ELEM(*f,uchar,k,l)!=INSIDE)&&
458 lev = (float)(1./(1+fabs(CV_MAT_ELEM(*t,float,k,l)-CV_MAT_ELEM(*t,float,i,j))));
464 if (CV_MAT_ELEM(*f,uchar,k,l+1)!=INSIDE) {
465 if (CV_MAT_ELEM(*f,uchar,k,l-1)!=INSIDE) {
466 gradI.x=(float)((CV_MAT_ELEM(*out,uchar,km,lp+1)-CV_MAT_ELEM(*out,uchar,km,lm-1)))*2.0f;
468 gradI.x=(float)((CV_MAT_ELEM(*out,uchar,km,lp+1)-CV_MAT_ELEM(*out,uchar,km,lm)));
471 if (CV_MAT_ELEM(*f,uchar,k,l-1)!=INSIDE) {
472 gradI.x=(float)((CV_MAT_ELEM(*out,uchar,km,lp)-CV_MAT_ELEM(*out,uchar,km,lm-1)));
477 if (CV_MAT_ELEM(*f,uchar,k+1,l)!=INSIDE) {
478 if (CV_MAT_ELEM(*f,uchar,k-1,l)!=INSIDE) {
479 gradI.y=(float)((CV_MAT_ELEM(*out,uchar,kp+1,lm)-CV_MAT_ELEM(*out,uchar,km-1,lm)))*2.0f;
481 gradI.y=(float)((CV_MAT_ELEM(*out,uchar,kp+1,lm)-CV_MAT_ELEM(*out,uchar,km,lm)));
484 if (CV_MAT_ELEM(*f,uchar,k-1,l)!=INSIDE) {
485 gradI.y=(float)((CV_MAT_ELEM(*out,uchar,kp,lm)-CV_MAT_ELEM(*out,uchar,km-1,lm)));
490 Ia += (float)w * (float)(CV_MAT_ELEM(*out,uchar,km,lm));
500 CV_MAT_ELEM(*out,uchar,i-1,j-1) = cv::saturate_cast<uchar>(sat);
504 CV_MAT_ELEM(*f,uchar,i,j) = BAND;
522 CV_MAT_ELEM(*f,uchar,ii,jj) = KNOWN;
530 if (CV_MAT_ELEM(*f,uchar,i,j)==INSIDE) {
535 CV_MAT_ELEM(*t,float,i,j) = dist;
546 if ((CV_MAT_ELEM(*f,uchar,k,l)!=INSIDE)&&
553 if (CV_MAT_ELEM(*f,uchar,k+1,l)!=INSIDE) {
554 if (CV_MAT_ELEM(*f,uchar,k-1,l)!=INSIDE) {
561 if (CV_MAT_ELEM(*f,uchar,k-1,l)!=INSIDE) {
567 if (CV_MAT_ELEM(*f,uchar,k,l+1)!=INSIDE) {
568 if (CV_MAT_ELEM(*f,uchar,k,l-1)!=INSIDE) {
575 if (CV_MAT_ELEM(*f,uchar,k,l-1)!=INSIDE) {
600 CV_MAT_ELEM(*f,uchar,i,j) = BAND;
610 CV_MAT_ELEM(*f,uchar,ii,jj) = KNOWN;
618 if (CV_MAT_ELEM(*f,uchar,i,j)==INSIDE) {
623 CV_MAT_ELEM(*t,float,i,j) = dist;
634 if ((CV_MAT_ELEM(*f,uchar,k,l)!=INSIDE)&&
641 if (CV_MAT_ELEM(*f,uchar,k+1,l)!=INSIDE) {
642 if (CV_MAT_ELEM(*f,uchar,k-1,l)!=INSIDE) {
643 gradI.x=(float)(abs(CV_MAT_ELEM(*out,uchar,kp+1,lm)-CV_MAT_ELEM(*out,uchar,kp,lm))+
644 abs(CV_MAT_ELEM(*out,uchar,kp,lm)-CV_MAT_ELEM(*out,uchar,km-1,lm)));
646 gradI.x=(float)(abs(CV_MAT_ELEM(*out,uchar,kp+1,lm)-CV_MAT_ELEM(*out,uchar,kp,lm)))*2.0f;
649 if (CV_MAT_ELEM(*f,uchar,k-1,l)!=INSIDE) {
650 gradI.x=(float)(abs(CV_MAT_ELEM(*out,uchar,kp,lm)-CV_MAT_ELEM(*out,uchar,km-1,lm)))*2.0f;
655 if (CV_MAT_ELEM(*f,uchar,k,l+1)!=INSIDE) {
656 if (CV_MAT_ELEM(*f,uchar,k,l-1)!=INSIDE) {
657 gradI.y=(float)(abs(CV_MAT_ELEM(*out,uchar,km,lp+1)-CV_MAT_ELEM(*out,uchar,km,lm))+
658 abs(CV_MAT_ELEM(*out,uchar,km,lm)-CV_MAT_ELEM(*out,uchar,km,lm-1)));
660 gradI.y=(float)(abs(CV_MAT_ELEM(*out,uchar,km,lp+1)-CV_MAT_ELEM(*out,uchar,km,lm)))*2.0f;
663 if (CV_MAT_ELEM(*f,uchar,k,l-1)!=INSIDE) {
664 gradI.y=(float)(abs(CV_MAT_ELEM(*out,uchar,km,lm)-CV_MAT_ELEM(*out,uchar,km,lm-1)))*2.0f;
679 Ia += (float)w * (float)(CV_MAT_ELEM(*out,uchar,km,lm));
685 CV_MAT_ELEM(*out,uchar,i-1,j-1) = cv::saturate_cast<uchar>((double)Ia/s);
688 CV_MAT_ELEM(*f,uchar,i,j) = BAND;
700 CV_MAT_ELEM(*image,type,0,j) = value;\
703 CV_MAT_ELEM(*image,type,i,0) = CV_MAT_ELEM(*image,type,i,image->cols-1) = value;\
706 CV_MAT_ELEM(*image,type,erows-1,j) = value;\
714 if (CV_MAT_ELEM(*src,type,i,j)!=0)\
715 CV_MAT_ELEM(*dst,type,i+1,j+1) = INSIDE;\