Lines Matching defs:cn
123 int depth, cn;
139 cn = (cvtest::randInt(rng) & 1) + 3;
142 types[INPUT][0] = CV_MAKETYPE(depth, cn);
145 types[OUTPUT][1] = types[REF_OUTPUT][1] = CV_MAKETYPE(depth, cn);
147 inplace = cn == 3 && cvtest::randInt(rng) % 2 != 0;
210 int cn = src.channels(), dst_cn = dst.channels();
218 assert( (cn == 3 || cn == 4) && (dst_cn == 3 || dst_cn == 1) );
231 src_buf[j*3] = src_row[j*cn + blue_idx]*c8u;
232 src_buf[j*3+1] = src_row[j*cn + 1]*c8u;
233 src_buf[j*3+2] = src_row[j*cn + (blue_idx^2)]*c8u;
252 src_buf[j*3] = src_row[j*cn + blue_idx]*c16u;
253 src_buf[j*3+1] = src_row[j*cn + 1]*c16u;
254 src_buf[j*3+2] = src_row[j*cn + (blue_idx^2)]*c16u;
273 src_buf[j*3] = src_row[j*cn + blue_idx];
274 src_buf[j*3+1] = src_row[j*cn + 1];
275 src_buf[j*3+2] = src_row[j*cn + (blue_idx^2)];
305 int src_cn = dst.channels(), cn = dst2.channels();
313 assert( cn == 3 || cn == 4 );
334 dst_row[j*cn + blue_idx] = saturate_cast<uchar>(b);
335 dst_row[j*cn + 1] = saturate_cast<uchar>(g);
336 dst_row[j*cn + (blue_idx^2)] = saturate_cast<uchar>(r);
337 if( cn == 4 )
338 dst_row[j*cn + 3] = 255;
357 dst_row[j*cn + blue_idx] = saturate_cast<ushort>(b);
358 dst_row[j*cn + 1] = saturate_cast<ushort>(g);
359 dst_row[j*cn + (blue_idx^2)] = saturate_cast<ushort>(r);
360 if( cn == 4 )
361 dst_row[j*cn + 3] = 65535;
377 dst_row[j*cn + blue_idx] = b;
378 dst_row[j*cn + 1] = g;
379 dst_row[j*cn + (blue_idx^2)] = r;
380 if( cn == 4 )
381 dst_row[j*cn + 3] = 1.f;
441 int cn = CV_MAT_CN(types[INPUT][0]);
445 if( cn == 3 )
1290 int cn = CV_MAT_CN(types[INPUT][0]);
1296 types[INPUT][0] = types[OUTPUT][1] = types[REF_OUTPUT][1] = CV_MAKETYPE(CV_8U,cn);
1317 if( cn == 3 )
1341 int depth = src.depth(), cn = src.channels();
1349 //assert( (cn == 3 || cn == 4) && (dst_cn == 3 || (dst_cn == 2 && depth == CV_8U)) );
1364 uchar b = src_row[j*cn + blue_idx];
1365 uchar g = src_row[j*cn + 1];
1366 uchar r = src_row[j*cn + (blue_idx^2)];
1376 int b = src_row[j*cn + blue_idx] >> 3;
1377 int g = src_row[j*cn + 1] >> g_rshift;
1378 int r = src_row[j*cn + (blue_idx^2)] >> 3;
1380 if( cn == 4 && src_row[j*4+3] )
1393 ushort b = src_row[j*cn + blue_idx];
1394 ushort g = src_row[j*cn + 1];
1395 ushort r = src_row[j*cn + (blue_idx^2)];
1409 float b = src_row[j*cn + blue_idx];
1410 float g = src_row[j*cn + 1];
1411 float r = src_row[j*cn + (blue_idx^2)];
1427 int depth = src.depth(), cn = dst.channels();
1435 //assert( (cn == 3 || cn == 4) && (src_cn == 3 || (src_cn == 2 && depth == CV_8U)) );
1454 dst_row[j*cn + blue_idx] = b;
1455 dst_row[j*cn + 1] = g;
1456 dst_row[j*cn + (blue_idx^2)] = r;
1458 if( cn == 4 )
1459 dst_row[j*cn + 3] = 255;
1471 dst_row[j*cn + blue_idx] = b;
1472 dst_row[j*cn + 1] = g;
1473 dst_row[j*cn + (blue_idx^2)] = r;
1475 if( cn == 4 )
1478 dst_row[j*cn + 3] = alpha;
1495 dst_row[j*cn + blue_idx] = b;
1496 dst_row[j*cn + 1] = g;
1497 dst_row[j*cn + (blue_idx^2)] = r;
1499 if( cn == 4 )
1500 dst_row[j*cn + 3] = 65535;
1515 dst_row[j*cn + blue_idx] = b;
1516 dst_row[j*cn + 1] = g;
1517 dst_row[j*cn + (blue_idx^2)] = r;
1519 if( cn == 4 )
1520 dst_row[j*cn + 3] = 1.f;
1898 int cn = reference.channels();
1899 ssize.width *= cn;
1910 ts->printf(cvtest::TS::SUMMARY, "Error in: (%d, %d)\n", x / cn, y);
1921 std::cout << "lab: " << lab(cv::Rect(y, x / cn, 1, 1)) << std::endl;
1923 std::cout << "src: " << src(cv::Rect(y, x / cn, 1, 1)) << std::endl;
2166 int cn = reference.channels();
2167 ssize.width *= cn;
2177 ts->printf(cvtest::TS::SUMMARY, "Error in: (%d, %d)\n", x / cn, y);