Lines Matching defs:cn
185 int cn=a.channels();
186 int total = (int)planes[0].total(), maxsize = std::min(12*12*std::max(12/cn, 1), total);
189 buf[0].create(1, maxsize, CV_64FC(cn));
191 buf[1].create(1, maxsize, CV_64FC(cn));
192 buf[2].create(1, maxsize, CV_64FC(cn));
193 scalarToRawData(gamma, buf[2].ptr(), CV_64FC(cn), (int)(maxsize*cn));
205 size_t k, n = (j2 - j)*cn;
511 randUniInt_(RNG& rng, _Tp* data, size_t total, int cn, const Scalar& scale, const Scalar& delta)
513 for( size_t i = 0; i < total; i += cn )
514 for( int k = 0; k < cn; k++ )
523 randUniFlt_(RNG& rng, _Tp* data, size_t total, int cn, const Scalar& scale, const Scalar& delta)
525 for( size_t i = 0; i < total; i += cn )
526 for( int k = 0; k < cn; k++ )
558 int depth = a.depth(), cn = a.channels();
559 size_t total = plane.total()*cn;
566 randUniInt_(rng, plane.ptr<uchar>(), total, cn, scale, delta);
569 randUniInt_(rng, plane.ptr<schar>(), total, cn, scale, delta);
572 randUniInt_(rng, plane.ptr<ushort>(), total, cn, scale, delta);
575 randUniInt_(rng, plane.ptr<short>(), total, cn, scale, delta);
578 randUniInt_(rng, plane.ptr<int>(), total, cn, scale, delta);
581 randUniFlt_(rng, plane.ptr<float>(), total, cn
584 randUniFlt_(rng, plane.ptr<double>(), total, cn, scale, delta);
660 int step = (int)(src.step/src.elemSize1()), cn = src.channels();
664 ofs.push_back(i*step + j*cn);
666 ofs.push_back(anchor.y*step + anchor.x*cn);
717 int step = (int)(src.step/src.elemSize1()), cn = src.channels();
721 ofs.push_back(i*step + j*cn);
723 ofs.push_back(anchor.y*step + anchor.x*cn);
797 int step = (int)(src.step/src.elemSize1()), cn = src.channels();
800 ofs.push_back(i*step + j*cn);
1128 norm_(const _Tp* src, size_t total, int cn, int normType, double startval, const uchar* mask)
1133 total *= cn;
1141 for( int c = 0; c < cn; c++ )
1145 result = std::max(result, (double)std::abs(0+src[i*cn + c]));
1154 for( int c = 0; c < cn; c++ )
1158 result += std::abs(0+src[i*cn + c]);
1170 for( int c = 0; c < cn; c++ )
1175 double v = src[i*cn + c];
1185 norm_(const _Tp* src1, const _Tp* src2, size_t total, int cn, int normType, double startval, const uchar* mask)
1190 total *= cn;
1198 for( int c = 0; c < cn; c++ )
1202 result = std::max(result, (double)std::abs(src1[i*cn + c] - src2[i*cn + c]));
1211 for( int c = 0; c < cn; c++ )
1215 result += std::abs(src1[i*cn + c] - src2[i*cn + c]);
1227 for( int c = 0; c < cn; c++ )
1232 double v = src1[i*cn + c] - src2[i*cn + c];
1280 int depth = src.depth(), cn = planes[0].channels();
1291 result = norm_((const uchar*)sptr, total, cn, normType, result, mptr);
1294 result = norm_((const schar*)sptr, total, cn, normType, result, mptr);
1297 result = norm_((const ushort*)sptr, total, cn, normType, result, mptr);
1300 result = norm_((const short*)sptr, total, cn, normType, result, mptr);
1303 result = norm_((const int*)sptr, total, cn, normType, result, mptr);
1306 result = norm_((const float*)sptr, total, cn, normType, result, mptr);
1309 result = norm_((const double*)sptr, total, cn, normType, result, mptr);
1361 int depth = src1.depth(), cn = planes[0].channels();
1373 result = norm_((const uchar*)sptr1, (const uchar*)sptr2, total, cn, normType, result, mptr);
1376 result = norm_((const schar*)sptr1, (const schar*)sptr2, total, cn, normType, result, mptr);
1379 result = norm_((const ushort*)sptr1, (const ushort*)sptr2, total, cn, normType, result, mptr);
1382 result = norm_((const short*)sptr1, (const short*)sptr2, total, cn, normType, result, mptr);
1385 result = norm_((const int*)sptr1, (const int*)sptr2, total, cn, normType, result, mptr);
1388 result = norm_((const float*)sptr1, (const float*)sptr2, total, cn, normType, result, mptr);
1391 result = norm_((const double*)sptr1, (const double*)sptr2, total, cn, normType, result, mptr);
2158 int d_rows, int d_cols, int a_cols, int cn,
2169 if( cn == 1 )
2224 int cn = a.channels();
2225 int a_step = (int)a.step1(), a_delta = cn;
2226 int b_step = (int)b.step1(), b_delta = cn;
2229 CV_Assert( a.type() == b.type() && a.dims == 2 && b.dims == 2 && cn <= 2 );
2248 c_delta = cn;
2264 (int)d.step1(), a_rows, b_cols, a_cols, cn, alpha, beta );
2268 (int)d.step1(), a_rows, b_cols, a_cols, cn, alpha, beta );
2303 // prepare cn x (cn + 1) transform matrix
2577 mean_(const _Tp* src, const uchar* mask, size_t total, int cn, Scalar& sum, int& nz)
2582 total *= cn;
2583 for( size_t i = 0; i < total; i += cn )
2585 for( int c = 0; c < cn; c++ )
2595 for( int c = 0; c < cn; c++ )
2596 sum[c] += src[i*cn + c];
2613 int depth = src.depth(), cn = src.channels();
2623 mean_((const uchar*)sptr, mptr, total, cn, sum, nz);
2626 mean_((const schar*)sptr, mptr, total, cn, sum, nz);
2629 mean_((const ushort*)sptr, mptr, total, cn, sum, nz);
2632 mean_((const short*)sptr, mptr, total, cn, sum, nz);
2635 mean_((const int*)sptr, mptr, total, cn, sum, nz);
2638 mean_((const float*)sptr, mptr, total, cn, sum, nz);
2641 mean_((const double*)sptr, mptr, total, cn, sum, nz);
2900 int i, depth = m.m->depth(), cn = m.m->channels(), width = m.m->cols*cn;