Skip to content

Instantly share code, notes, and snippets.

@tochiz
Created November 5, 2011 03:36
Show Gist options
  • Save tochiz/1341066 to your computer and use it in GitHub Desktop.
Save tochiz/1341066 to your computer and use it in GitHub Desktop.
Sample for OpenCV for image input & output.
#include <cmath>
#include <cv.h>
int main()
{
// Mat形式の画像データを作る
cv::Mat img;
//
img = cv::imread("input.png");
// TODO: 画像を編集するならここ
// ファイル書き出し
cv::imwrite("output.jpg", img);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment