Saturday, November 22, 2014

03 改變圖片的顏色

使用OpenCV 2 改變圖片的顏色成為灰色

更多顏色的調整, 請在 這裡http://docs.opencv.org/modules/imgproc/doc/miscellaneous_transformations.html



#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp>
#include <iostream>
#include <string.h>
#include <fstream>

using namespace cv;

int main( int argc, char** argv )

char* imageName = argv[1];

Mat image;
image = imread( imageName, 1 );

if( argc != 2



Screen Shot 2014-11-23 at 1.21.18 PM

 


 



03 改變圖片的顏色

No comments:

Post a Comment