Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. cv::Mat image = cv::Mat::zeros(w,h, CV_8UC3);
  2. for(int x=0;x<w;x++)
  3. for(int y=0;y<h;y++)
  4. image.at<cv::Vec3b>(y,x) = cv::Vec3b(red[x][y], blue[x][y], green[x][y]);
  5. cv::imwrite("image.png", image);
  6.  
  7. IplImage *frameConverted = new IplImage(image);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement