代码如下:
int main() //hsv++yuv++rgb show
{
Mat img_h, img_s, img_v, imghsv;
Mat image;
string filepath01 = "E:\\xunleixx11\\pictures\\cio07.jpg"; //原图
string savepath001 = "E:\\xunleixx11\\txtxtxt\\txt525\\save_data001.txt";//路径1
string savepath002 = "E:\\xunleixx11\\txtxtxt\\txt525\\save_data002.txt";//路径2
string savepath003 = "E:\\xunleixx11\\txtxtxt\\txt525\\save_data003.txt";//路径3
image = imread(filepath01);
vector<cv::Mat> hsv_vec;
cvtColor(image, imghsv,COLOR_BGR2HSV);
//输入rgb图像,转换成yuv并分离
Mat imagey(image