2 #include <opencv2/opencv.hpp> 3 #include <gtest/gtest.h> 6 TEST(CvUtils, testLabelToRGB){
7 cv::Mat label_image = cv::Mat::zeros(1, 2, CV_32SC1);
8 label_image.at<
int>(0, 1) = 1;
12 EXPECT_EQ(0, cv::norm(rgb_image.at<cv::Vec3b>(0, 0)));
14 EXPECT_NE(0, cv::norm(rgb_image.at<cv::Vec3b>(0, 1)));
17 int main(
int argc,
char **argv){
18 testing::InitGoogleTest(&argc, argv);
19 return RUN_ALL_TESTS();
void labelToRGB(const cv::Mat src, cv::Mat &dst)
convert label image to rgb one.
int main(int argc, char **argv)
TEST(CvUtils, testLabelToRGB)