Created
December 9, 2015 13:18
-
-
Save MarcWang/3e62a2150827c56b5599 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <opencv2/opencv.hpp> | |
#include <iostream> | |
const std::string keys = | |
"{help | | print this message }" | |
; | |
int main( int argc, char *argv[] ) | |
{ | |
cv::CommandLineParser parser( argc, argv, keys); | |
parser.about("Integral Image"); | |
if (parser.has("help")){ | |
parser.printMessage(); | |
return 0; | |
} | |
cv::Mat srcMat = cv::imread("lena.jpg", CV_LOAD_IMAGE_GRAYSCALE); | |
cv::Mat sumMat, sqSumMat; | |
cv::integral( srcMat, sumMat, sqSumMat ); | |
cv::imshow("srcMat", srcMat); | |
cv::waitKey(0); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment