Lines Matching defs:cn
958 int cn = channels();
961 if( dims > 2 && new_rows == 0 && new_cn != 0 && size[dims-1]*cn % new_cn == 0 )
965 hdr.size[dims-1] = hdr.size[dims-1]*cn / new_cn;
972 new_cn = cn;
974 int total_width = cols * cn;
1038 int i, depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
1039 CV_Assert(cn <= 4);
1045 for(i = 0; i < cn; i++)
1048 buf[i] = buf[i-cn];
1054 for(i = 0; i < cn; i++)
1057 buf[i] = buf[i-cn];
1063 for(i = 0; i < cn; i++)
1066 buf[i] = buf[i-cn];
1072 for(i = 0; i < cn; i++)
1075 buf[i] = buf[i-cn];
1081 for(i = 0; i < cn; i++)
1084 buf[i] = buf[i-cn];
1090 for(i = 0; i < cn; i++)
1093 buf[i] = buf[i-cn];
1099 for(i = 0; i < cn; i++)
1102 buf[i] = buf[i-cn];
1303 int t = CV_MAT_DEPTH(flags), cn = CV_MAT_CN(flags);
1307 mv[i] = Mat(1, cn, t, (void*)(&v[0] + esz*i));
2812 int type = _m.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type), kercn = cn, rowsPerWI = 1;
2813 int sctype = CV_MAKE_TYPE(depth, cn == 3 ? 4 : cn);
2817 if (cn == 1)
2826 format("-D T=%s -D T1=%s -D cn=%d -D ST=%s -D kercn=%d -D rowsPerWI=%d",
2828 ocl::memopTypeToStr(depth), cn,
2835 k.args(ocl::KernelArg::WriteOnly(m, cn, kercn),
2838 size_t globalsize[2] = { m.cols * cn / kercn, (m.rows + rowsPerWI - 1) / rowsPerWI };
3041 int type = _src.type(), cn = CV_MAT_CN(type), depth = CV_MAT_DEPTH(type),
3065 format("-D T=%s -D T1=%s -D cn=%d -D TILE_DIM=%d -D BLOCK_ROWS=%d -D rowsPerWI=%d%s",
3067 cn, TILE_DIM, BLOCK_ROWS, rowsPerWI, inplace ? " -D INPLACE" : ""));
3315 int i, k, cn = srcmat.channels();
3316 size.width *= cn;
3323 if( size.width == cn )
3324 for( k = 0; k < cn; k++ )
3328 for( k = 0; k < cn; k++ )
3330 WT a0 = src[k], a1 = src[k+cn];
3331 for( i = 2*cn; i <= size.width - 4*cn; i += 4*cn )
3334 a1 = op(a1, (WT)src[i+k+cn]);
3335 a0 = op(a0, (WT)src[i+k+cn*2]);
3336 a1 = op(a1, (WT)src[i+k+cn*3]);
3339 for( ; i < size.width; i += cn )
3530 int sdepth = CV_MAT_DEPTH(stype), cn = CV_MAT_CN(stype),
3556 tileHeight = min(tileHeight, defDev.localMemSize() / buf_cols / CV_ELEM_SIZE(CV_MAKETYPE(wdepth, cn)) / maxItemInGroupCount);
3560 cn=%d -D ddepth=%d"
3563 buf_cols, tileHeight, ops[op], cn, ddepth,
3593 cv::String build_opt = format("-D %s -D dim=%d -D cn=%d -D ddepth=%d"
3596 ops[op], dim, cn, ddepth, ocl::typeToStr(useOptimized ? ddepth : sdepth),
3633 int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), cn = CV_MAT_CN(stype);
3636 dtype = CV_MAKETYPE(dtype >= 0 ? dtype : stype, cn);
3639 CV_Assert( cn == CV_MAT_CN(dtype) );
3655 temp.create(dst.rows, dst.cols, CV_32SC(cn));
4573 convertData_(const void* _from, void* _to, int cn)
4577 if( cn == 1 )
4580 for( int i = 0; i < cn; i++ )
4585 convertScaleData_(const void* _from, void* _to, int cn, double alpha, double beta)
4589 if( cn == 1 )
4592 for( int i = 0; i < cn; i++ )
4596 typedef void (*ConvertData)(const void* from, void* to, int cn);
4597 typedef void (*ConvertScaleData)(const void* from, void* to, int cn, double alpha, double beta);
4836 int cn = channels();
4839 rtype = CV_MAKETYPE(rtype, cn);
4862 cvtfunc( from.ptr, to, cn );
4872 cvtfunc( from.ptr, to, cn, alpha, 0 );
4880 int cn = channels();
4883 rtype = CV_MAKETYPE(rtype, cn);
4899 cvtfunc( from.ptr, to, cn );
4909 cvtfunc( from.ptr, to, cn, alpha, beta );