Lines Matching refs:img
977 IplImage* img = (IplImage*)arr; in cvCreateData() local
979 if( img->imageData != 0 ) in cvCreateData()
984 CV_CALL( img->imageData = img->imageDataOrigin = in cvCreateData()
985 (char*)cvAlloc( (size_t)img->imageSize )); in cvCreateData()
989 int depth = img->depth; in cvCreateData()
990 int width = img->width; in cvCreateData()
992 if( img->depth == IPL_DEPTH_32F || img->nChannels == 64 ) in cvCreateData()
994 img->width *= img->depth == IPL_DEPTH_32F ? sizeof(float) : sizeof(double); in cvCreateData()
995 img->depth = IPL_DEPTH_8U; in cvCreateData()
998 CvIPL.allocateData( img, 0, 0 ); in cvCreateData()
1000 img->width = width; in cvCreateData()
1001 img->depth = depth; in cvCreateData()
1082 IplImage* img = (IplImage*)arr; in cvSetData() local
1084 pix_size = ((img->depth & 255) >> 3)*img->nChannels; in cvSetData()
1085 min_step = img->width*pix_size; in cvSetData()
1087 if( step != CV_AUTOSTEP && img->height > 1 ) in cvSetData()
1091 img->widthStep = step; in cvSetData()
1095 img->widthStep = min_step; in cvSetData()
1098 img->imageSize = img->widthStep * img->height; in cvSetData()
1099 img->imageData = img->imageDataOrigin = (char*)data; in cvSetData()
1102 cvAlign(img->width * pix_size, 8) == step ) in cvSetData()
1104 img->align = 8; in cvSetData()
1108 img->align = 4; in cvSetData()
1156 IplImage* img = (IplImage*)arr; in cvReleaseData() local
1160 char* ptr = img->imageDataOrigin; in cvReleaseData()
1161 img->imageData = img->imageDataOrigin = 0; in cvReleaseData()
1166 CvIPL.deallocate( img, IPL_IMAGE_DATA ); in cvReleaseData()
1201 IplImage* img = (IplImage*)arr; in cvGetRawData() local
1204 *step = img->widthStep; in cvGetRawData()
1207 CV_CALL( *data = cvPtr2D( img, 0, 0 )); in cvGetRawData()
1211 if( img->roi ) in cvGetRawData()
1213 *roi_size = cvSize( img->roi->width, img->roi->height ); in cvGetRawData()
1217 *roi_size = cvSize( img->width, img->height ); in cvGetRawData()
1275 IplImage* img = (IplImage*)arr; in cvGetElemType() local
1276 type = CV_MAKETYPE( icvIplToCvDepth(img->depth), img->nChannels ); in cvGetElemType()
1309 IplImage* img = (IplImage*)arr; in cvGetDims() local
1314 sizes[0] = img->height; in cvGetDims()
1315 sizes[1] = img->width; in cvGetDims()
1376 IplImage* img = (IplImage*)arr; in cvGetDimSize() local
1381 size = !img->roi ? img->height : img->roi->height; in cvGetDimSize()
1384 size = !img->roi ? img->width : img->roi->width; in cvGetDimSize()
1438 IplImage* img = (IplImage*)arr; in cvGetSize() local
1440 if( img->roi ) in cvGetSize()
1442 size.width = img->roi->width; in cvGetSize()
1443 size.height = img->roi->height; in cvGetSize()
1447 size.width = img->width; in cvGetSize()
1448 size.height = img->height; in cvGetSize()
1936 IplImage* img = (IplImage*)arr; in cvPtr1D() local
1937 int width = !img->roi ? img->width : img->roi->width; in cvPtr1D()
2034 IplImage* img = (IplImage*)arr; in cvPtr2D() local
2035 int pix_size = (img->depth & 255) >> 3; in cvPtr2D()
2037 ptr = (uchar*)img->imageData; in cvPtr2D()
2039 if( img->dataOrder == 0 ) in cvPtr2D()
2040 pix_size *= img->nChannels; in cvPtr2D()
2042 if( img->roi ) in cvPtr2D()
2044 width = img->roi->width; in cvPtr2D()
2045 height = img->roi->height; in cvPtr2D()
2047 ptr += img->roi->yOffset*img->widthStep + in cvPtr2D()
2048 img->roi->xOffset*pix_size; in cvPtr2D()
2050 if( img->dataOrder ) in cvPtr2D()
2052 int coi = img->roi->coi; in cvPtr2D()
2056 ptr += (coi - 1)*img->imageSize; in cvPtr2D()
2061 width = img->width; in cvPtr2D()
2062 height = img->height; in cvPtr2D()
2069 ptr += y*img->widthStep + x*pix_size; in cvPtr2D()
2073 int type = icvIplToCvDepth(img->depth); in cvPtr2D()
2074 if( type < 0 || (unsigned)(img->nChannels - 1) > 3 ) in cvPtr2D()
2077 *_type = CV_MAKETYPE( type, img->nChannels ); in cvPtr2D()
2792 const IplImage* img = (const IplImage*)src; in cvGetMat() local
2795 if( img->imageData == 0 ) in cvGetMat()
2798 depth = icvIplToCvDepth( img->depth ); in cvGetMat()
2802 order = img->dataOrder & (img->nChannels > 1 ? -1 : 0); in cvGetMat()
2804 if( img->roi ) in cvGetMat()
2810 if( img->roi->coi == 0 ) in cvGetMat()
2814 CV_CALL( cvInitMatHeader( mat, img->roi->height, in cvGetMat()
2815 img->roi->width, type, in cvGetMat()
2816 img->imageData + (img->roi->coi-1)*img->imageSize + in cvGetMat()
2817 img->roi->yOffset*img->widthStep + in cvGetMat()
2818 img->roi->xOffset*CV_ELEM_SIZE(type), in cvGetMat()
2819 img->widthStep )); in cvGetMat()
2823 int type = CV_MAKETYPE( depth, img->nChannels ); in cvGetMat()
2824 coi = img->roi->coi; in cvGetMat()
2826 if( img->nChannels > CV_CN_MAX ) in cvGetMat()
2830 CV_CALL( cvInitMatHeader( mat, img->roi->height, img->roi->width, in cvGetMat()
2831 type, img->imageData + in cvGetMat()
2832 img->roi->yOffset*img->widthStep + in cvGetMat()
2833 img->roi->xOffset*CV_ELEM_SIZE(type), in cvGetMat()
2834 img->widthStep )); in cvGetMat()
2839 int type = CV_MAKETYPE( depth, img->nChannels ); in cvGetMat()
2844 CV_CALL( cvInitMatHeader( mat, img->height, img->width, type, in cvGetMat()
2845 img->imageData, img->widthStep )); in cvGetMat()
3183 cvGetImage( const CvArr* array, IplImage* img ) in cvGetImage() argument
3194 if( !img ) in cvGetImage()
3209 cvInitImageHeader( img, cvSize(mat->cols, mat->rows), in cvGetImage()
3211 cvSetData( img, mat->data.ptr, mat->step ); in cvGetImage()
3213 result = img; in cvGetImage()
3284 IplImage *img = 0; in cvCreateImageHeader() local
3292 CV_CALL( img = (IplImage *)cvAlloc( sizeof( *img ))); in cvCreateImageHeader()
3293 CV_CALL( cvInitImageHeader( img, size, depth, channels, IPL_ORIGIN_TL, in cvCreateImageHeader()
3302 img = CvIPL.createHeader( channels, 0, depth, (char*)colorModel, (char*)channelSeq, in cvCreateImageHeader()
3310 if( cvGetErrStatus() < 0 && img ) in cvCreateImageHeader()
3311 cvReleaseImageHeader( &img ); in cvCreateImageHeader()
3313 return img; in cvCreateImageHeader()
3321 IplImage *img = 0; in cvCreateImage() local
3327 CV_CALL( img = cvCreateImageHeader( size, depth, channels )); in cvCreateImage()
3328 assert( img ); in cvCreateImage()
3329 CV_CALL( cvCreateData( img )); in cvCreateImage()
3334 cvReleaseImage( &img ); in cvCreateImage()
3336 return img; in cvCreateImage()
3417 IplImage* img = *image; in cvReleaseImageHeader() local
3422 cvFree( &img->roi ); in cvReleaseImageHeader()
3423 cvFree( &img ); in cvReleaseImageHeader()
3427 CvIPL.deallocate( img, IPL_IMAGE_HEADER | IPL_IMAGE_ROI ); in cvReleaseImageHeader()
3446 IplImage* img = *image; in cvReleaseImage() local
3449 cvReleaseData( img ); in cvReleaseImage()
3450 cvReleaseImageHeader( &img ); in cvReleaseImage()
3535 cvGetImageROI( const IplImage* img ) in cvGetImageROI() argument
3543 if( !img ) in cvGetImageROI()
3546 if( img->roi ) in cvGetImageROI()
3547 rect = cvRect( img->roi->xOffset, img->roi->yOffset, in cvGetImageROI()
3548 img->roi->width, img->roi->height ); in cvGetImageROI()
3550 rect = cvRect( 0, 0, img->width, img->height ); in cvGetImageROI()