Lines Matching defs:submat

1464 cvGetSubRect( const CvArr* arr, CvMat* submat, CvRect rect )
1477 if( !submat )
1494 cvDecRefData( submat );
1496 submat->data.ptr = mat->data.ptr + (size_t)rect.y*mat->step +
1498 submat->step = mat->step & (rect.height > 1 ? -1 : 0);
1499 submat->type = (mat->type & (rect.width < mat->cols ? ~CV_MAT_CONT_FLAG : -1)) |
1500 (submat->step == 0 ? CV_MAT_CONT_FLAG : 0);
1501 submat->rows = rect.height;
1502 submat->cols = rect.width;
1503 submat->refcount = 0;
1504 res = submat;
1515 cvGetRows( const CvArr* arr, CvMat* submat,
1529 if( !submat )
1543 cvDecRefData( submat );
1547 submat->rows = end_row - start_row;
1548 submat->step = mat->step & (submat->rows > 1 ? -1 : 0);
1552 submat->rows = (end_row - start_row + delta_row - 1)/delta_row;
1553 submat->step = mat->step * delta_row;
1556 submat->cols = mat->cols;
1557 submat->step &= submat->rows > 1 ? -1 : 0;
1558 submat->data.ptr = mat->data.ptr + (size_t)start_row*mat->step;
1559 submat->type = (mat->type | (submat->step == 0 ? CV_MAT_CONT_FLAG : 0)) &
1561 submat->refcount = 0;
1562 submat->hdr_refcount = 0;
1563 res = submat;
1574 cvGetCols( const CvArr* arr, CvMat* submat, int start_col, int end_col )
1588 if( !submat )
1603 cvDecRefData( submat );
1605 submat->rows = mat->rows;
1606 submat->cols = end_col - start_col;
1607 submat->step = mat->step & (submat->rows > 1 ? -1 : 0);
1608 submat->data.ptr = mat->data.ptr + (size_t)start_col*CV_ELEM_SIZE(mat->type);
1609 submat->type = mat->type & (submat->step && submat->cols < cols ? ~CV_MAT_CONT_FLAG : -1);
1610 submat->refcount = 0;
1611 submat->hdr_refcount = 0;
1612 res = submat;
1623 cvGetDiag( const CvArr* arr, CvMat* submat, int diag )
1637 if( !submat )
1648 cvDecRefData( submat );
1659 submat->data.ptr = mat->data.ptr + diag*pix_size;
1669 submat->data.ptr = mat->data.ptr - diag*mat->step;
1672 submat->rows = len;
1673 submat->cols = 1;
1674 submat->step = (mat->step + pix_size) & (submat->rows > 1 ? -1 : 0);
1675 submat->type = mat->type;
1676 if( submat->step )
1677 submat->type &= ~CV_MAT_CONT_FLAG;
1679 submat->type |= CV_MAT_CONT_FLAG;
1680 submat->refcount = 0;
1681 submat->hdr_refcount = 0;
1682 res = submat;