题目内容
以下程序先读入一幅彩色图像,然后将其转换为灰度图像后再将灰度图像保存成文件,最后显示彩色图像和灰度图像,请将程序补充完整。int main( int argc, char** argv ){char* imageName = argv[1];Mat image;image = imread( imageName, CV_LOAD_IMAGE_COLOR);Mat gray_image;_________( image, gray_image, CV_RGB2GRAY,1);_________( "../../images/Gray_Image.jpg", gray_image );namedWindow( imageName, CV_WINDOW_AUTOSIZE );namedWindow( "Gray image", CV_WINDOW_AUTOSIZE );_________ ( imageName, image );imshow( "Gray image", gray_image );waitKey(0);return 0;}
查看答案
搜索结果不匹配?点我反馈