#include "test_precomp.hpp" //CV_TEST_MAIN("cv") int main(int argc, char **argv) { cv::Mat raw = cv::imread(std::string("OpenCV2.4/opencv_extra/testdata/cv/") + "/cvtcolor/bayer_input.png", CV_LOAD_IMAGE_GRAYSCALE); cv::Mat rgb; cv::cvtColor(raw, rgb, CV_BayerRG2RGB); cv::imwrite(std::string("OpenCV2.4/opencv_extra/testdata/cv/") + "/cvtcolor/bayer_RGB.png",rgb); cv::Mat ref; cv::cvtColor(rgb,ref,CV_RGB2RGBA); cv::imwrite(std::string("OpenCV2.4/opencv_extra/testdata/cv/") + "/cvtcolor/bayer_REF.png",ref); cv::Mat rgba; cv::cvtColor(raw, rgba, CV_BayerRG2RGBA); cv::imwrite(std::string("OpenCV2.4/opencv_extra/testdata/cv/") + "/cvtcolor/bayer_RGBA.png",rgba); }