);
ASSERT_EQ(1, cn);
}
+
+TEST(Core_Mat, copyNx1ToVector)
+{
+ cv::Mat_<uchar> src(5, 1);
+ cv::Mat_<uchar> ref_dst8;
+ cv::Mat_<ushort> ref_dst16;
+ std::vector<uchar> dst8;
+ std::vector<ushort> dst16;
+
+ src << 1, 2, 3, 4, 5;
+
+ src.copyTo(ref_dst8);
+ src.copyTo(dst8);
+
+ ASSERT_PRED_FORMAT2(cvtest::MatComparator(0, 0), ref_dst8, cv::Mat_<uchar>(dst8));
+
+ src.convertTo(ref_dst16, CV_16U);
+ src.convertTo(dst16, CV_16U);
+
+ ASSERT_PRED_FORMAT2(cvtest::MatComparator(0, 0), ref_dst16, cv::Mat_<ushort>(dst16));
+}