1 | initial version |
Mat image =imread(argv[1],1); Mat k=(Mat_<float>(3,3)<<0.299,0.587,0.114, 0.596,-0.274,-0.322,0.211,-0.523,0.312); Mat Result; cvtColor(image,image,CV_BGR2RGB); transform(image,Result,k); cvtColor(Result,Result,CV_RGB2BGR); T
2 | No.2 Revision |
Code: Mat image =imread(argv[1],1);
Mat k=(Mat_<float>(3,3)<<0.299,0.587,0.114, 0.596,-0.274,-0.322,0.211,-0.523,0.312);
Mat Result;
cvtColor(image,image,CV_BGR2RGB);
transform(image,Result,k);
cvtColor(Result,Result,CV_RGB2BGR);
TcvtColor(Result,Result,CV_RGB2BGR);
3 | No.3 Revision |
Code: @ berak :Code:- Mat image =imread(argv[1],1);
Mat k=(Mat_<float>(3,3)<<0.299,0.587,0.114, 0.596,-0.274,-0.322,0.211,-0.523,0.312);
Mat Result;
cvtColor(image,image,CV_BGR2RGB);
transform(image,Result,k);
cvtColor(Result,Result,CV_RGB2BGR);
4 | No.4 Revision |
@ berak :Code:-
Mat image =imread(argv[1],1);
Mat k=(Mat_<float>(3,3)<<0.299,0.587,0.114, k=(Mat_<float>(3,3) << 0.299,0.587,0.114, 0.596,-0.274,-0.322,0.211,-0.523,0.312);
Mat Result;
cvtColor(image,image,CV_BGR2RGB);
transform(image,Result,k);
cvtColor(Result,Result,CV_RGB2BGR);cvtColor(Result,Result,CV_RGB2BGR);