Skip to content

Instantly share code, notes, and snippets.

@yiling-chen
Created August 14, 2013 03:02
Show Gist options
  • Save yiling-chen/6227670 to your computer and use it in GitHub Desktop.
Save yiling-chen/6227670 to your computer and use it in GitHub Desktop.
Toy example of computing and manipulate integral image by OpenCV.
#include <iostream>
#include <opencv2/opencv.hpp>
using namespace std;
using namespace cv;
int main(int argc, char *argv[]) {
Mat m = Mat::ones(5,5, CV_8UC1);
cout << m << endl << endl;
Mat integ;
integral(m, integ);
cout << integ << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment